[devhelp] Window: use default activate() GAction handler for win.gear-menu



commit 4bbe60ead71fade48494d49559593601cdb773c5
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sun Jan 28 20:19:26 2018 +0100

    Window: use default activate() GAction handler for win.gear-menu
    
    See the doc of GActionEntry.

 README          |    2 +-
 configure.ac    |    2 +-
 src/dh-window.c |   15 +--------------
 3 files changed, 3 insertions(+), 16 deletions(-)
---
diff --git a/README b/README
index bc81d52..3975d5e 100644
--- a/README
+++ b/README
@@ -8,7 +8,7 @@ The Devhelp web page:
 Dependencies
 ------------
 
-- glib >= 2.38
+- glib >= 2.40
 - gtk+ >= 3.22
 - webkit2gtk-4.0 >= 2.19.2
 - gsettings-desktop-schemas
diff --git a/configure.ac b/configure.ac
index adadab9..bd6f19f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -61,7 +61,7 @@ LT_LIB_M
 
 AX_REQUIRE_DEFINED([AX_PKG_CHECK_MODULES])
 AX_PKG_CHECK_MODULES([DEVHELP],
-                    [gio-2.0 >= 2.38  gtk+-3.0 >= 3.22  webkit2gtk-4.0 >= 2.19.2],
+                    [gio-2.0 >= 2.40  gtk+-3.0 >= 3.22  webkit2gtk-4.0 >= 2.19.2],
                     [gsettings-desktop-schemas])
 
 # i18n stuff
diff --git a/src/dh-window.c b/src/dh-window.c
index 6060377..ef292e7 100644
--- a/src/dh-window.c
+++ b/src/dh-window.c
@@ -418,19 +418,6 @@ go_forward_cb (GSimpleAction *action,
 }
 
 static void
-gear_menu_cb (GSimpleAction *action,
-              GVariant      *parameter,
-              gpointer       user_data)
-{
-        GVariant *state;
-
-        state = g_action_get_state (G_ACTION (action));
-        g_action_change_state (G_ACTION (action),
-                               g_variant_new_boolean (!g_variant_get_boolean (state)));
-        g_variant_unref (state);
-}
-
-static void
 add_action_entries (DhWindow *window)
 {
         DhWindowPrivate *priv = dh_window_get_instance_private (window);
@@ -459,7 +446,7 @@ add_action_entries (DhWindow *window)
                 { "go-forward", go_forward_cb },
 
                 /* Menu */
-                { "gear-menu", gear_menu_cb, NULL, "false" },
+                { "gear-menu", NULL, NULL, "false" },
         };
 
         g_action_map_add_action_entries (G_ACTION_MAP (window),


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