diff options
Diffstat (limited to 'stickynotes')
-rw-r--r-- | stickynotes/stickynotes.c | 12 | ||||
-rw-r--r-- | stickynotes/stickynotes_applet.c | 4 |
2 files changed, 10 insertions, 6 deletions
diff --git a/stickynotes/stickynotes.c b/stickynotes/stickynotes.c index b2b9e855..571242f6 100644 --- a/stickynotes/stickynotes.c +++ b/stickynotes/stickynotes.c @@ -428,6 +428,7 @@ stickynote_set_color (StickyNote *note, gboolean save) { char *color_str_actual, *font_color_str_actual; + gboolean force_default, use_system_color; GtkRcStyle *rc_style; if (save) { @@ -451,11 +452,14 @@ stickynote_set_color (StickyNote *note, note->color != NULL); } + force_default = g_settings_get_boolean (stickynotes->settings, "force-default"); + use_system_color = g_settings_get_boolean (stickynotes->settings, "use-system-color"); + /* If "force_default" is enabled or color_str is NULL, * then we use the default color instead of color_str. */ - if (!color_str || g_settings_get_boolean (stickynotes->settings, "force-default")) + if (!color_str || force_default) { - if (g_settings_get_boolean (stickynotes->settings, "use-system-color")) + if (use_system_color) color_str_actual = NULL; else color_str_actual = g_settings_get_string (stickynotes->settings, "default-color"); @@ -463,9 +467,9 @@ stickynote_set_color (StickyNote *note, else color_str_actual = g_strdup (color_str); - if (!font_color_str || g_settings_get_boolean (stickynotes->settings, "force-default")) + if (!font_color_str || force_default) { - if (g_settings_get_boolean (stickynotes->settings, "use-system-color")) + if (use_system_color) font_color_str_actual = NULL; else font_color_str_actual = g_settings_get_string (stickynotes->settings, "default-font-color"); diff --git a/stickynotes/stickynotes_applet.c b/stickynotes/stickynotes_applet.c index f7fbb853..133ca2bf 100644 --- a/stickynotes/stickynotes_applet.c +++ b/stickynotes/stickynotes_applet.c @@ -448,13 +448,13 @@ void stickynotes_applet_update_icon(StickyNotesApplet *applet) void stickynotes_applet_update_prefs (void) { - int height; + gint width, height; gboolean sys_color, sys_font, sticky, force_default, desktop_hide; char *font_str; char *color_str, *font_color_str; GdkColor color, font_color; - gint width = g_settings_get_int (stickynotes->settings, "default-width"); + width = g_settings_get_int (stickynotes->settings, "default-width"); width = MAX (width, 1); height = g_settings_get_int (stickynotes->settings, "default-height"); |