[gnome-clocks/bilelmoussaoui/window/help-overlay] Window: set the help overlay manually



commit fbfa4c2f40550da33418599eadcf83ac8fab6181
Author: Bilal Elmoussaoui <bil elmoussaoui gmail com>
Date:   Mon Feb 3 12:24:34 2020 +0000

    Window: set the help overlay manually
    
    It seems somehow, set_resource_base_path doesn't fix the show help overlay
    in the development version. By setting this manually we can ensure it always works.

 src/window.vala | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/src/window.vala b/src/window.vala
index 03b5649..de99937 100644
--- a/src/window.vala
+++ b/src/window.vala
@@ -110,6 +110,11 @@ public class Window : Gtk.ApplicationWindow {
             stack.child_set_property (timer, "needs-attention", timer.state == Timer.Face.State.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]