From 865a87bb9f3e93f23994c5c11da966c9b598dfe8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sergio=20Villar=20Sen=C3=ADn?= Date: Fri, 20 Nov 2009 11:53:20 +0100 Subject: [PATCH] Do use the ModestColorButton instead of a HildonColorButton --- src/hildon2/modest-msg-edit-window.c | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/src/hildon2/modest-msg-edit-window.c b/src/hildon2/modest-msg-edit-window.c index 0950b2f..02d1423 100644 --- a/src/hildon2/modest-msg-edit-window.c +++ b/src/hildon2/modest-msg-edit-window.c @@ -75,6 +75,7 @@ #include #include "modest-maemo-utils.h" #include +#include "modest-color-button.h" #ifdef MODEST_USE_CALENDAR_WIDGETS #include @@ -1481,24 +1482,6 @@ set_msg (ModestMsgEditWindow *self, TnyMsg *msg, gboolean preserve_is_rich) g_free (bcc); } -#ifdef MODEST_USE_CALENDAR_WIDGETS -static void -color_button_clicked (GtkButton *button) -{ - PipCalendarColor color; - - /* Show ColorPicker dialog */ - color = pip_color_picker_select_color(PipCalendarColorInvalid, 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); - if (gdk_color) - hildon_color_button_set_color ((HildonColorButton *) button, gdk_color); - } -} -#endif - static void modest_msg_edit_window_setup_toolbar (ModestMsgEditWindow *window) { @@ -1528,7 +1511,7 @@ modest_msg_edit_window_setup_toolbar (ModestMsgEditWindow *window) /* font color */ priv->font_color_toolitem = GTK_WIDGET (gtk_tool_item_new ()); - priv->font_color_button = hildon_color_button_new (); + priv->font_color_button = modest_color_button_new (); gtk_widget_set_size_request (priv->font_color_button, -1, 48); GTK_WIDGET_UNSET_FLAGS (priv->font_color_toolitem, GTK_CAN_FOCUS); GTK_WIDGET_UNSET_FLAGS (priv->font_color_button, GTK_CAN_FOCUS); @@ -1541,13 +1524,6 @@ modest_msg_edit_window_setup_toolbar (ModestMsgEditWindow *window) G_CALLBACK (modest_msg_edit_window_color_button_change), window); - /* Yes I know this is a horrible hack, but it works for the - moment while we don't create a ModestColorButton */ -#ifdef MODEST_USE_CALENDAR_WIDGETS - GtkButtonClass *button_class = GTK_BUTTON_CLASS (HILDON_COLOR_BUTTON_GET_CLASS (priv->font_color_button)); - button_class->clicked = color_button_clicked; -#endif - /* Font size and face placeholder */ placeholder = gtk_ui_manager_get_widget (parent_priv->ui_manager, "/ToolBar/FontAttributes"); insert_index = gtk_toolbar_get_item_index(GTK_TOOLBAR (parent_priv->toolbar), GTK_TOOL_ITEM(placeholder)); -- 1.7.9.5