[dconf-editor] Use correct menu after window resize.



commit 784b13ab9e19cd3edf630bf6d25a0b9b7f9e7130
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Fri Dec 14 13:16:33 2018 +0100

    Use correct menu after window resize.

 editor/dconf-headerbar.vala | 6 ++----
 editor/dconf-window.vala    | 4 ----
 2 files changed, 2 insertions(+), 8 deletions(-)
---
diff --git a/editor/dconf-headerbar.vala b/editor/dconf-headerbar.vala
index d094040..b593e4b 100644
--- a/editor/dconf-headerbar.vala
+++ b/editor/dconf-headerbar.vala
@@ -44,7 +44,7 @@ private class DConfHeaderBar : BrowserHeaderBar, AdaptativeWidget
 
         add_show_modifications_button       (out show_modifications_button,     ref quit_button_stack);
         add_modifications_actions_button    (out modifications_actions_button,  ref this);
-        construct_changes_pending_menu      (out changes_pending_menu,          ref 
modifications_actions_button);
+        construct_changes_pending_menu      (out changes_pending_menu);
         construct_quit_delayed_mode_menu    (out quit_delayed_mode_menu);
 
         register_bookmarks_modes ();
@@ -239,14 +239,12 @@ private class DConfHeaderBar : BrowserHeaderBar, AdaptativeWidget
         _this.pack_end (modifications_actions_button);
     }
 
-    private static void construct_changes_pending_menu (out GLib.Menu changes_pending_menu, ref MenuButton 
modifications_actions_button)
+    private static void construct_changes_pending_menu (out GLib.Menu changes_pending_menu)
     {
         changes_pending_menu = new GLib.Menu ();
         changes_pending_menu.append (_("Apply all"), "ui.apply-delayed-settings");
         changes_pending_menu.append (_("Dismiss all"), "ui.dismiss-delayed-settings");
         changes_pending_menu.freeze ();
-
-        modifications_actions_button.set_menu_model (changes_pending_menu);
     }
 
     private static void construct_quit_delayed_mode_menu (out GLib.Menu quit_delayed_mode_menu)
diff --git a/editor/dconf-window.vala b/editor/dconf-window.vala
index 8c8e880..4354efa 100644
--- a/editor/dconf-window.vala
+++ b/editor/dconf-window.vala
@@ -135,10 +135,6 @@ private class DConfWindow : BrowserWindow
         revealer.modifications_handler = modifications_handler;
         browser_view.modifications_handler = modifications_handler;
         delayed_changes_changed_handler = modifications_handler.delayed_changes_changed.connect (() => {
-                if (!AdaptativeWidget.WindowSize.is_extra_thin (window_size)
-                 && !AdaptativeWidget.WindowSize.is_extra_flat (window_size))
-                    return;
-
                 uint total_changes_count = modifications_handler.dconf_changes_count + 
modifications_handler.gsettings_changes_count;
                 if (total_changes_count == 0)
                     headerbar.set_apply_modifications_button_sensitive (false);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]