diff options
author | infirit <[email protected]> | 2015-01-05 13:45:19 +0100 |
---|---|---|
committer | infirit <[email protected]> | 2015-01-05 14:17:32 +0100 |
commit | 336b8a375332133fe24413e2f362364399b40f50 (patch) | |
tree | 87373f5ed70585aaed35d2d127f45e5a46477739 /stickynotes/stickynotes.c | |
parent | 14ad0b4e9311e090865e3d613970bdc5b54ef274 (diff) | |
download | mate-applets-336b8a375332133fe24413e2f362364399b40f50.tar.bz2 mate-applets-336b8a375332133fe24413e2f362364399b40f50.tar.xz |
stickynotes: Small cleanups
Diffstat (limited to 'stickynotes/stickynotes.c')
-rw-r--r-- | stickynotes/stickynotes.c | 12 |
1 files changed, 8 insertions, 4 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"); |