#include "modest-color-button.h"
#endif
-#define DEFAULT_FONT_SIZE 3
-#define DEFAULT_FONT 2
-#define DEFAULT_SIZE_BUTTON_FONT_FAMILY "Sans"
#define DEFAULT_MAIN_VBOX_SPACING 0
#define SUBJECT_MAX_LENGTH 1000
#define IMAGE_MAX_WIDTH 560
+#ifdef MODEST_TOOLKIT_HILDON2
+#define DEFAULT_SIZE_BUTTON_FONT_FAMILY "Sans"
#define DEFAULT_FONT_SCALE 1.5
+#define DEFAULT_FONT_SIZE 3
+#define DEFAULT_FONT 2
+#else
+#define DEFAULT_SIZE_BUTTON_FONT_FAMILY "Sans"
+#define DEFAULT_FONT_SCALE 1.0
+#define DEFAULT_FONT_SIZE 2
+#define DEFAULT_FONT 2
+#endif
#define ATTACHMENT_BUTTON_WIDTH 118
#define MAX_FROM_VALUE 36
#define MAX_BODY_LENGTH 128*1024
switch (format) {
case MODEST_MSG_EDIT_FORMAT_HTML:
wp_text_buffer_enable_rich_text (WP_TEXT_BUFFER (priv->text_buffer), TRUE);
+ update_signature (self, priv->last_from_account, priv->last_from_account);
if (parent_priv->toolbar) gtk_widget_show (parent_priv->toolbar);
break;
case MODEST_MSG_EDIT_FORMAT_TEXT:
if (stream == NULL) {
modest_platform_information_banner (NULL, NULL,
- _FM("sfil_ib_opening_not_allowed"));
+ _FM_OPENING_NOT_ALLOWED);
g_free (filename);
g_object_unref (mime_part);
gnome_vfs_file_info_unref (info);
if (stream == NULL) {
- modest_platform_information_banner (NULL, NULL, _FM("sfil_ib_opening_not_allowed"));
+ modest_platform_information_banner (NULL, NULL, _FM_OPENING_NOT_ALLOWED);
g_object_unref (mime_part);
g_free (filename);
case MODEST_FILE_FORMAT_FORMATTED_TEXT:
wp_text_buffer_enable_rich_text (WP_TEXT_BUFFER (priv->text_buffer), TRUE);
remove_tags (WP_TEXT_BUFFER (priv->text_buffer));
+ update_signature (window, priv->last_from_account, priv->last_from_account);
if (parent_priv->toolbar)
gtk_widget_show (parent_priv->toolbar);
break;
priv->last_from_account = modest_selector_get_active_id (priv->from_field);
signature = modest_account_mgr_get_signature_from_recipient (mgr, new_account, &has_new_signature);
if (has_new_signature) {
+ gboolean is_rich;
gchar *full_signature = g_strconcat ((gtk_text_iter_starts_line (&iter)) ? "" : "\n",
MODEST_TEXT_UTILS_SIGNATURE_MARKER, "\n",
signature, NULL);
- gtk_text_buffer_insert (priv->text_buffer, &iter, full_signature, -1);
- g_free (full_signature);
+ is_rich = wp_text_buffer_is_rich_text (WP_TEXT_BUFFER (priv->text_buffer));
+ if (is_rich) {
+ WPTextBufferFormat *fmt;
+ GdkColor style_color;
+ if (!gtk_style_lookup_color (GTK_WIDGET (self)->style, "SecondaryTextColor", &style_color)) {
+ gdk_color_parse ("grey", &style_color);
+ }
+ fmt = g_new0 (WPTextBufferFormat, 1);
+ fmt->color = style_color;
+ fmt->cs.color = 0x1;
+ wp_text_buffer_insert_with_attribute (WP_TEXT_BUFFER (priv->text_buffer), &iter,
+ full_signature, -1,
+ fmt, TRUE);
+ g_free (fmt);
+ g_free (full_signature);
+ } else {
+ gtk_text_buffer_insert (priv->text_buffer, &iter, full_signature, -1);
+ }
}
g_free (signature);
gtk_text_buffer_end_user_action (priv->text_buffer);