From: Jose Dapena Paz Date: Mon, 30 Jul 2007 09:46:26 +0000 (+0000) Subject: * src/maemo/modest-msg-edit-window.c: X-Git-Tag: git_migration_finished~2708 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=9f62ae5debde855663dca22567af8187b9f17b57 * src/maemo/modest-msg-edit-window.c: * Fixed an error in the condition to change colors in modest_msg_edit_window_set_format_state. The condition to declare a changeset was reversed. * (modest_msg_edit_window_set_format_state): now we set the bullet attribute out of the freeze/thaw region, as bullet format is applied only if not frozen (fixes NB#63500). pmo-trunk-r2842 --- diff --git a/src/maemo/modest-msg-edit-window.c b/src/maemo/modest-msg-edit-window.c index 93f2c7d..8abbada 100644 --- a/src/maemo/modest-msg-edit-window.c +++ b/src/maemo/modest-msg-edit-window.c @@ -1341,7 +1341,7 @@ modest_msg_edit_window_set_format_state (ModestMsgEditWindow *self, buffer_format->cs.bold = ((buffer_format->bold&0x1) != (current_format->bold&0x1)); buffer_format->cs.italic = ((buffer_format->italic&0x1) != (current_format->italic&0x1)); - buffer_format->cs.color = gdk_color_equal(&(buffer_format->color), &(current_format->color)); + buffer_format->cs.color = !gdk_color_equal(&(buffer_format->color), &(current_format->color)); buffer_format->cs.font_size = (buffer_format->font_size != current_format->font_size); buffer_format->cs.font = (buffer_format->font != current_format->font); buffer_format->cs.justification = (buffer_format->justification != current_format->justification); @@ -1379,11 +1379,11 @@ modest_msg_edit_window_set_format_state (ModestMsgEditWindow *self, if (buffer_format->cs.font) { wp_text_buffer_set_attribute (WP_TEXT_BUFFER (priv->text_buffer), WPT_FONT, (gpointer) (buffer_format->font)); } + wp_text_buffer_thaw (WP_TEXT_BUFFER (priv->text_buffer)); if (buffer_format->cs.bullet) { - wp_text_buffer_set_attribute (WP_TEXT_BUFFER (priv->text_buffer), WPT_BULLET, (gpointer) ((int)buffer_format->bullet)); + wp_text_buffer_set_attribute (WP_TEXT_BUFFER (priv->text_buffer), WPT_BULLET, (gpointer) ((buffer_format->bullet)?1:0)); } /* wp_text_buffer_set_format (WP_TEXT_BUFFER (priv->text_buffer), buffer_format); */ - wp_text_buffer_thaw (WP_TEXT_BUFFER (priv->text_buffer)); g_free (current_format);