forked from AuroraMiddleware/gtk
windowhandle: Don't use an action muxer needlessly
The api that is meant to be used here is gtk_widget_activate_action.
This commit is contained in:
parent
c64a021af4
commit
75a30b1f98
@ -268,7 +268,6 @@ perform_titlebar_action (GtkWindowHandle *self,
|
|||||||
GtkSettings *settings;
|
GtkSettings *settings;
|
||||||
gchar *action = NULL;
|
gchar *action = NULL;
|
||||||
gboolean retval = TRUE;
|
gboolean retval = TRUE;
|
||||||
GtkActionMuxer *context;
|
|
||||||
|
|
||||||
settings = gtk_widget_get_settings (GTK_WIDGET (self));
|
settings = gtk_widget_get_settings (GTK_WIDGET (self));
|
||||||
switch (button)
|
switch (button)
|
||||||
@ -287,23 +286,21 @@ perform_titlebar_action (GtkWindowHandle *self,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
context = _gtk_widget_get_action_muxer (GTK_WIDGET (self), TRUE);
|
|
||||||
|
|
||||||
if (action == NULL)
|
if (action == NULL)
|
||||||
retval = FALSE;
|
retval = FALSE;
|
||||||
else if (g_str_equal (action, "none"))
|
else if (g_str_equal (action, "none"))
|
||||||
retval = FALSE;
|
retval = FALSE;
|
||||||
/* treat all maximization variants the same */
|
/* treat all maximization variants the same */
|
||||||
else if (g_str_has_prefix (action, "toggle-maximize"))
|
else if (g_str_has_prefix (action, "toggle-maximize"))
|
||||||
g_action_group_activate_action (G_ACTION_GROUP (context),
|
gtk_widget_activate_action (GTK_WIDGET (self),
|
||||||
"window.toggle-maximized",
|
"window.toggle-maximized",
|
||||||
NULL);
|
NULL);
|
||||||
else if (g_str_equal (action, "lower"))
|
else if (g_str_equal (action, "lower"))
|
||||||
lower_window (self);
|
lower_window (self);
|
||||||
else if (g_str_equal (action, "minimize"))
|
else if (g_str_equal (action, "minimize"))
|
||||||
g_action_group_activate_action (G_ACTION_GROUP (context),
|
gtk_widget_activate_action (GTK_WIDGET (self),
|
||||||
"window.minimize",
|
"window.minimize",
|
||||||
NULL);
|
NULL);
|
||||||
else if (g_str_equal (action, "menu"))
|
else if (g_str_equal (action, "menu"))
|
||||||
do_popup (self, event);
|
do_popup (self, event);
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user