summaryrefslogtreecommitdiff
path: root/stickynotes/stickynotes_callbacks.c
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2016-07-31 21:46:48 +0200
committerraveit65 <[email protected]>2016-08-31 15:29:57 +0200
commitaf8334ea1159d64330d1c295000b78ed0daa9f63 (patch)
treef7ed73d7af78ef140d90bc4156d4b25fbf3b1715 /stickynotes/stickynotes_callbacks.c
parenta708224decae0f7417aa38b926318fa32747b161 (diff)
downloadmate-applets-af8334ea1159d64330d1c295000b78ed0daa9f63.tar.bz2
mate-applets-af8334ea1159d64330d1c295000b78ed0daa9f63.tar.xz
sticky-notes: drop duplicate code
Diffstat (limited to 'stickynotes/stickynotes_callbacks.c')
-rw-r--r--stickynotes/stickynotes_callbacks.c35
1 files changed, 1 insertions, 34 deletions
diff --git a/stickynotes/stickynotes_callbacks.c b/stickynotes/stickynotes_callbacks.c
index 57404d97..d1e23dde 100644
--- a/stickynotes/stickynotes_callbacks.c
+++ b/stickynotes/stickynotes_callbacks.c
@@ -192,40 +192,7 @@ void properties_apply_font_cb(StickyNote *note)
void
properties_color_cb (GtkWidget *button, StickyNote *note)
{
- char *color_str = NULL;
- char *font_color_str = NULL;
-
- if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(note->w_def_color)))
- {
-#if GTK_CHECK_VERSION (3, 0, 0)
- GdkRGBA color, font_color;
-
- gtk_color_button_get_rgba (GTK_COLOR_BUTTON (note->w_color), &color);
- gtk_color_button_get_rgba (GTK_COLOR_BUTTON (note->w_font_color), &font_color);
-
- color_str = gdk_rgba_to_string (&color);
- font_color_str = gdk_rgba_to_string (&font_color);
-#else
- GdkColor color, font_color;
-
- gtk_color_button_get_color (GTK_COLOR_BUTTON (note->w_color), &color);
- gtk_color_button_get_color (GTK_COLOR_BUTTON (note->w_font_color), &font_color);
-
- color_str = g_strdup_printf ("#%.2x%.2x%.2x",
- color.red / 256,
- color.green / 256,
- color.blue / 256);
- font_color_str = g_strdup_printf ("#%.2x%.2x%.2x",
- font_color.red / 256,
- font_color.green / 256,
- font_color.blue / 256);
-#endif
- }
-
- stickynote_set_color (note, color_str, font_color_str, TRUE);
-
- g_free (color_str);
- g_free (font_color_str);
+ properties_apply_color_cb (note);
}
/* Properties Dialog Callback : Font */