[dconf-editor] Use GAction for hide_notification.



commit f74389ecafe47e997ca805e0c20397eebf89ea6e
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Thu Feb 15 17:24:24 2018 +0100

    Use GAction for hide_notification.

 editor/dconf-editor.ui   |    2 +-
 editor/dconf-window.vala |   14 +++++++-------
 2 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/editor/dconf-editor.ui b/editor/dconf-editor.ui
index 45b6873..e189683 100644
--- a/editor/dconf-editor.ui
+++ b/editor/dconf-editor.ui
@@ -213,10 +213,10 @@
                         <property name="visible">True</property>
                         <property name="focus-on-click">False</property>
                         <property name="relief">none</property>
+                        <property name="action-name">ui.hide-notification</property>
                         <style>
                           <class name="image-button"/>
                         </style>
-                        <signal name="clicked" handler="hide_notification"/>
                         <child>
                           <object class="GtkImage">
                             <property name="visible">True</property>
diff --git a/editor/dconf-window.vala b/editor/dconf-window.vala
index b114152..e488239 100644
--- a/editor/dconf-window.vala
+++ b/editor/dconf-window.vala
@@ -385,7 +385,8 @@ class DConfWindow : ApplicationWindow
         { "dismiss-change", dismiss_change, "s" },  // here because needs to be accessed from 
DelayedSettingView rows
         { "erase", erase_dconf_key, "s" },          // here because needs a reload_view as we enter 
delay_mode
 
-        { "copy-path", copy_path }
+        { "copy-path", copy_path },
+        { "hide-notification", hide_notification }
     };
 
     private void empty (/* SimpleAction action, Variant? variant */) {}
@@ -520,6 +521,11 @@ class DConfWindow : ApplicationWindow
             ((ConfigurationEditor) get_application ()).copy (current_path);
     }
 
+    private void hide_notification (/* SimpleAction action, Variant? variant */)
+    {
+        notification_revealer.set_reveal_child (false);
+    }
+
     /*\
     * * Directories tree
     \*/
@@ -940,10 +946,4 @@ class DConfWindow : ApplicationWindow
     {
         show_notification (_("There’s nothing in requested folder “%s”.").printf (full_name));
     }
-
-    [GtkCallback]
-    private void hide_notification ()
-    {
-        notification_revealer.set_reveal_child (false);
-    }
 }


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