freebsd-ports/editors/mousepad/files/patch-mousepad_mousepad-action-group.c
Olivier Duchateau 4737f94818 - Add patches in order to fix warnings, when color scheme is not defined
- Bump PORTREVISION

PR:		199181
Reported by:	<admin@vladiom.com.ua>
Obtained from:	Xfce upstream repository
2015-07-11 06:02:20 +00:00

25 lines
921 B
C

--- 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;
g_return_if_fail (MOUSEPAD_IS_ACTION_GROUP (self));
@@ -303,8 +304,11 @@ mousepad_action_group_set_active_style_s
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;
- MOUSEPAD_SETTING_SET_STRING (COLOR_SCHEME, gtk_source_style_scheme_get_id (scheme));
+ MOUSEPAD_SETTING_SET_STRING (COLOR_SCHEME, scheme_name);
self->locked = FALSE;
g_object_notify (G_OBJECT (self), "active-style-scheme");