[gnome-clocks] window: Call set_help_overlay() before pane_changed() to avoid a null warning
- From: Bilal Elmoussaoui <bilelmoussaoui src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [gnome-clocks] window: Call set_help_overlay() before pane_changed() to avoid a null warning
 
- Date: Mon, 28 Dec 2020 20:14:19 +0000 (UTC)
 
commit 0b7905877d094a26a4186b6c273a8149562aac11
Author: Yetizone <andreii lisita gmail com>
Date:   Thu Oct 15 17:31:54 2020 +0300
    window: Call set_help_overlay() before pane_changed() to avoid a null warning
 src/window.vala | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/window.vala b/src/window.vala
index fe954b7..55ac1ba 100644
--- a/src/window.vala
+++ b/src/window.vala
@@ -68,6 +68,11 @@ public class Window : Hdy.ApplicationWindow {
         settings = new Settings ("org.gnome.clocks.state.window");
         settings.delay ();
 
+        // We need to set this manually, otherwise it fails in the devel version
+        var builder = new Gtk.Builder.from_resource ("/org/gnome/clocks/gtk/help-overlay.ui");
+        var dialog = (Gtk.ShortcutsWindow)builder.get_object ("help_overlay");
+        set_help_overlay (dialog);
+
         // GSettings gives us the nick, which matches the stack page name
         stack.visible_child_name = settings.get_string ("panel-id");
 
@@ -114,11 +119,6 @@ public class Window : Hdy.ApplicationWindow {
             stack.child_set_property (timer, "needs-attention", timer.is_running);
         });
 
-        // We need to set this manually, otherwise it fails in the devel version
-        var builder = new Gtk.Builder.from_resource ("/org/gnome/clocks/gtk/help-overlay.ui");
-        var dialog = (Gtk.ShortcutsWindow)builder.get_object ("help_overlay");
-        set_help_overlay (dialog);
-
         unowned Gtk.BindingSet binding_set = Gtk.BindingSet.by_class (get_class ());
 
         // plain ctrl+page_up/down is easten by the scrolled window...
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]