diff options
Diffstat (limited to 'editors/mousepad/files/patch-mousepad_mousepad-action-group.c')
-rw-r--r-- | editors/mousepad/files/patch-mousepad_mousepad-action-group.c | 59 |
1 files changed, 41 insertions, 18 deletions
diff --git a/editors/mousepad/files/patch-mousepad_mousepad-action-group.c b/editors/mousepad/files/patch-mousepad_mousepad-action-group.c index 3d50b3a5bd0a..d5af132b96ac 100644 --- a/editors/mousepad/files/patch-mousepad_mousepad-action-group.c +++ b/editors/mousepad/files/patch-mousepad_mousepad-action-group.c @@ -1,25 +1,48 @@ --- mousepad/mousepad-action-group.c.orig 2014-09-01 20:50:07 UTC +++ mousepad/mousepad-action-group.c -@@ -283,7 +283,8 @@ void - mousepad_action_group_set_active_style_scheme (MousepadActionGroup *self, - GtkSourceStyleScheme *scheme) - { -- GtkAction *action; -+ GtkAction *action; -+ const gchar *scheme_name = NULL; +@@ -124,7 +124,7 @@ mousepad_action_group_class_init (MousepadActionGroupC + G_SIGNAL_RUN_LAST, + 0, NULL, NULL, + g_cclosure_marshal_VOID__OBJECT, +- G_TYPE_NONE, 0, ++ G_TYPE_NONE, 1, + GTK_SOURCE_TYPE_LANGUAGE); + } - g_return_if_fail (MOUSEPAD_IS_ACTION_GROUP (self)); - -@@ -303,8 +304,11 @@ mousepad_action_group_set_active_style_s +@@ -302,11 +302,6 @@ mousepad_action_group_set_active_style_scheme (Mousepa + gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), TRUE); self->locked = FALSE; - /* update the setting when the active action is changed */ -+ if (scheme != NULL) -+ scheme_name = gtk_source_style_scheme_get_id(scheme); -+ - self->locked = TRUE; +- /* update the setting when the active action is changed */ +- self->locked = TRUE; - MOUSEPAD_SETTING_SET_STRING (COLOR_SCHEME, gtk_source_style_scheme_get_id (scheme)); -+ MOUSEPAD_SETTING_SET_STRING (COLOR_SCHEME, scheme_name); - self->locked = FALSE; - +- self->locked = FALSE; +- g_object_notify (G_OBJECT (self), "active-style-scheme"); + } + +@@ -473,6 +468,8 @@ static void + mousepad_action_group_style_scheme_action_activate (MousepadActionGroup *self, + MousepadStyleSchemeAction *action) + { ++ const gchar *scheme_name = NULL; ++ + /* only update the active action if we're not already in the process of + * setting it and the sender action is actually active */ + if (! self->locked && +@@ -481,7 +478,14 @@ mousepad_action_group_style_scheme_action_activate (Mo + GtkSourceStyleScheme *scheme; + + scheme = mousepad_style_scheme_action_get_style_scheme (action); +- mousepad_action_group_set_active_style_scheme (self, scheme); ++ ++ /* update the setting when the active action is changed */ ++ if (scheme != NULL) ++ scheme_name = gtk_source_style_scheme_get_id(scheme); ++ ++ self->locked = TRUE; ++ MOUSEPAD_SETTING_SET_STRING (COLOR_SCHEME, scheme_name); ++ self->locked = FALSE; + } + } + |