* src/maemo/modest-msg-edit-window.c:
authorJose Dapena Paz <jdapena@igalia.com>
Mon, 30 Jul 2007 09:46:26 +0000 (09:46 +0000)
committerJose Dapena Paz <jdapena@igalia.com>
Mon, 30 Jul 2007 09:46:26 +0000 (09:46 +0000)
* 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

src/maemo/modest-msg-edit-window.c

index 93f2c7d..8abbada 100644 (file)
@@ -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.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);
        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));
        }
        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) {
        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_set_format (WP_TEXT_BUFFER (priv->text_buffer), buffer_format); */
-       wp_text_buffer_thaw (WP_TEXT_BUFFER (priv->text_buffer));
 
        g_free (current_format);
 
 
        g_free (current_format);