[gtk/matthiasc/for-master: 5/5] windowhandle: Don't use an action muxer needlessly
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/for-master: 5/5] windowhandle: Don't use an action muxer needlessly
- Date: Sun, 19 Jul 2020 17:50:54 +0000 (UTC)
commit 75a30b1f98c6fcb3140f39356c21165aa55ca51c
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Jul 19 12:52:31 2020 -0400
windowhandle: Don't use an action muxer needlessly
The api that is meant to be used here is
gtk_widget_activate_action.
gtk/gtkwindowhandle.c | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
---
diff --git a/gtk/gtkwindowhandle.c b/gtk/gtkwindowhandle.c
index 437a13c7c6..ebc1394ed0 100644
--- a/gtk/gtkwindowhandle.c
+++ b/gtk/gtkwindowhandle.c
@@ -268,7 +268,6 @@ perform_titlebar_action (GtkWindowHandle *self,
GtkSettings *settings;
gchar *action = NULL;
gboolean retval = TRUE;
- GtkActionMuxer *context;
settings = gtk_widget_get_settings (GTK_WIDGET (self));
switch (button)
@@ -287,23 +286,21 @@ perform_titlebar_action (GtkWindowHandle *self,
break;
}
- context = _gtk_widget_get_action_muxer (GTK_WIDGET (self), TRUE);
-
if (action == NULL)
retval = FALSE;
else if (g_str_equal (action, "none"))
retval = FALSE;
/* treat all maximization variants the same */
else if (g_str_has_prefix (action, "toggle-maximize"))
- g_action_group_activate_action (G_ACTION_GROUP (context),
- "window.toggle-maximized",
- NULL);
+ gtk_widget_activate_action (GTK_WIDGET (self),
+ "window.toggle-maximized",
+ NULL);
else if (g_str_equal (action, "lower"))
lower_window (self);
else if (g_str_equal (action, "minimize"))
- g_action_group_activate_action (G_ACTION_GROUP (context),
- "window.minimize",
- NULL);
+ gtk_widget_activate_action (GTK_WIDGET (self),
+ "window.minimize",
+ NULL);
else if (g_str_equal (action, "menu"))
do_popup (self, event);
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]