X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Fhildon2%2Fmodest-msg-edit-window.c;h=3f4e51409bfeb53ddf74619dfdb820a4ed4fa11a;hb=cc351a65e779c443ea59bc6348bc5aed675a1a14;hp=c9c84974b559eff1e833225a49113916b476b65e;hpb=ced90e5f10d58d7662fcd36a271e09dcb8a51f97;p=modest diff --git a/src/hildon2/modest-msg-edit-window.c b/src/hildon2/modest-msg-edit-window.c index c9c8497..3f4e514 100644 --- a/src/hildon2/modest-msg-edit-window.c +++ b/src/hildon2/modest-msg-edit-window.c @@ -87,7 +87,7 @@ #define DEFAULT_FONT_SIZE 3 #define DEFAULT_FONT 2 #define DEFAULT_SIZE_BUTTON_FONT_FAMILY "Sans" -#define DEFAULT_MAIN_VBOX_SPACING 6 +#define DEFAULT_MAIN_VBOX_SPACING 0 #define SUBJECT_MAX_LENGTH 1000 #define IMAGE_MAX_WIDTH 560 #define DEFAULT_FONT_SCALE 1.5 @@ -1359,12 +1359,17 @@ set_msg (ModestMsgEditWindow *self, TnyMsg *msg, gboolean preserve_is_rich) modest_tny_msg_get_references (TNY_MSG (msg), NULL, &(priv->references), &(priv->in_reply_to)); priority_flags = tny_header_get_priority (header); - if (to) - modest_recpt_editor_set_recipients (MODEST_RECPT_EDITOR (priv->to_field), to); + if (to) { + gchar *quoted_names = modest_text_utils_quote_names (to); + modest_recpt_editor_set_recipients (MODEST_RECPT_EDITOR (priv->to_field), quoted_names); + g_free (quoted_names); + } field_view_set = TRUE; if (cc) { - modest_recpt_editor_set_recipients (MODEST_RECPT_EDITOR (priv->cc_field), cc); + gchar *quoted_names = modest_text_utils_quote_names (cc); + modest_recpt_editor_set_recipients (MODEST_RECPT_EDITOR (priv->cc_field), quoted_names); + g_free (quoted_names); gtk_widget_set_no_show_all (priv->cc_caption, FALSE); gtk_widget_show (priv->cc_caption); } else if (!modest_conf_get_bool (modest_runtime_get_conf (), MODEST_CONF_SHOW_CC, NULL)) { @@ -1376,7 +1381,9 @@ set_msg (ModestMsgEditWindow *self, TnyMsg *msg, gboolean preserve_is_rich) field_view_set = TRUE; if (bcc) { - modest_recpt_editor_set_recipients (MODEST_RECPT_EDITOR (priv->bcc_field), bcc); + gchar *quoted_names = modest_text_utils_quote_names (bcc); + modest_recpt_editor_set_recipients (MODEST_RECPT_EDITOR (priv->bcc_field), quoted_names); + g_free (quoted_names); gtk_widget_set_no_show_all (priv->bcc_caption, FALSE); gtk_widget_show (priv->bcc_caption); } else if (!modest_conf_get_bool (modest_runtime_get_conf (), MODEST_CONF_SHOW_BCC, NULL)) { @@ -3244,12 +3251,26 @@ void modest_msg_edit_window_undo (ModestMsgEditWindow *window) { ModestMsgEditWindowPrivate *priv; + ModestWindowPrivate *parent_priv; + gboolean was_rich_text, is_rich_text; g_return_if_fail (MODEST_IS_MSG_EDIT_WINDOW (window)); priv = MODEST_MSG_EDIT_WINDOW_GET_PRIVATE (window); - + parent_priv = MODEST_WINDOW_GET_PRIVATE (window); + + was_rich_text = wp_text_buffer_is_rich_text (WP_TEXT_BUFFER (priv->text_buffer)); + wp_text_buffer_undo (WP_TEXT_BUFFER (priv->text_buffer)); + is_rich_text = wp_text_buffer_is_rich_text (WP_TEXT_BUFFER (priv->text_buffer)); + + if (parent_priv->toolbar && was_rich_text != is_rich_text) { + if (is_rich_text) + gtk_widget_show (parent_priv->toolbar); + else + gtk_widget_hide (parent_priv->toolbar); + } + modest_ui_actions_check_toolbar_dimming_rules (MODEST_WINDOW (window)); modest_ui_actions_check_menu_dimming_rules (MODEST_WINDOW (window)); }