From: Sergio Villar SenĂ­n Date: Wed, 18 Nov 2009 19:28:16 +0000 (+0100) Subject: Remember last selected color, and select it next time calendar color dialog is shown. X-Git-Tag: 3.1.16~2 X-Git-Url: http://vcs.maemo.org/git/?a=commitdiff_plain;h=645ae86da233c18cde7691fc0315ec1cf4be467b;p=modest Remember last selected color, and select it next time calendar color dialog is shown. --- 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); }