From 9d016b765f3c760d287e88a004d4e9dcd9ed7059 Mon Sep 17 00:00:00 2001 From: Bleak Grey Date: Fri, 10 Jul 2020 17:35:01 +0300 Subject: [PATCH] Make it compile --- src/Dialogs/MainWindow.vala | 10 ++++------ src/Services/Cache.vala | 8 ++++---- src/Widgets/Avatar.vala | 1 + 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/Dialogs/MainWindow.vala b/src/Dialogs/MainWindow.vala index 101929e..ec8a7cf 100644 --- a/src/Dialogs/MainWindow.vala +++ b/src/Dialogs/MainWindow.vala @@ -43,12 +43,10 @@ public class Tootle.Dialogs.MainWindow: Gtk.Window, ISavedWindow { timeline_switcher.valign = Align.FILL; timeline_stack.notify["visible-child"].connect (on_timeline_changed); - add_timeline_view (new Views.Bookmarks (), app.ACCEL_TIMELINE_0, 0); - add_timeline_view (new Views.Home (), app.ACCEL_TIMELINE_1, 1); - // add_timeline_view (new Views.Home (), app.ACCEL_TIMELINE_0, 0); - // add_timeline_view (new Views.Notifications (), app.ACCEL_TIMELINE_1, 1); - // add_timeline_view (new Views.Local (), app.ACCEL_TIMELINE_2, 2); - // add_timeline_view (new Views.Federated (), app.ACCEL_TIMELINE_3, 3); + add_timeline_view (new Views.Home (), app.ACCEL_TIMELINE_0, 0); + add_timeline_view (new Views.Notifications (), app.ACCEL_TIMELINE_1, 1); + add_timeline_view (new Views.Local (), app.ACCEL_TIMELINE_2, 2); + add_timeline_view (new Views.Federated (), app.ACCEL_TIMELINE_3, 3); settings.bind_property ("dark-theme", Gtk.Settings.get_default (), "gtk-application-prefer-dark-theme", BindingFlags.SYNC_CREATE); settings.notify["post-text-size"].connect (() => on_zoom_level_changed ()); diff --git a/src/Services/Cache.vala b/src/Services/Cache.vala index d7e6f18..e8fa530 100644 --- a/src/Services/Cache.vala +++ b/src/Services/Cache.vala @@ -82,13 +82,13 @@ public class Tootle.Cache : GLib.Object { Pixbuf? pixbuf = null; try { - var code = message.status_code; + var code = msg.status_code; if (code != Soup.Status.OK) { - var msg = network.describe_error (code); - throw new Oopsie.INSTANCE (@"Server returned $msg"); + var error = network.describe_error (code); + throw new Oopsie.INSTANCE (@"Server returned $error"); } - var data = message.response_body.flatten ().data; + var data = msg.response_body.flatten ().data; var stream = new MemoryInputStream.from_data (data); pixbuf = new Pixbuf.from_stream (stream); stream.close (); diff --git a/src/Widgets/Avatar.vala b/src/Widgets/Avatar.vala index 6315cd5..ce83c4e 100644 --- a/src/Widgets/Avatar.vala +++ b/src/Widgets/Avatar.vala @@ -42,6 +42,7 @@ public class Tootle.Widgets.Avatar : EventBox { public int get_scaled_size () { return size; //return size * get_scale_factor (); + } private void on_redraw () { set_size_request (get_scaled_size (), get_scaled_size ());