From b1561fdfa6b13cf13856513e7a49a834fdc5036e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sergio=20Villar=20Sen=C3=ADn?= Date: Wed, 18 Nov 2009 20:28:16 +0100 Subject: [PATCH] Remember last selected color, and select it next time calendar color dialog is shown. --- src/hildon2/modest-msg-edit-window.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/hildon2/modest-msg-edit-window.c b/src/hildon2/modest-msg-edit-window.c index a81374c..5ac30d8 100644 --- a/src/hildon2/modest-msg-edit-window.c +++ b/src/hildon2/modest-msg-edit-window.c @@ -1485,12 +1485,14 @@ set_msg (ModestMsgEditWindow *self, TnyMsg *msg, gboolean preserve_is_rich) static void color_button_clicked (GtkButton *button) { + static PipCalendarColor color = PipCalendarColorInvalid; + /* Show ColorPicker dialog */ - PipCalendarColor color = pip_color_picker_select_color(PipTextColorRed, PipColorPickerText); + color = pip_color_picker_select_color(color, PipColorPickerText); /* Check if some color is selected rather than dialog is dismissed */ if (color != PipCalendarColorInvalid) { - GdkColor *gdk_color = (GdkColor *) pip_calendar_color_get_gdkcolor(color); + GdkColor *gdk_color = (GdkColor *) pip_calendar_color_get_gdkcolor (color); if (gdk_color) hildon_color_button_set_color ((HildonColorButton *) button, gdk_color); } -- 1.7.9.5