Fix showing the calendar box when it shouldn't
authorJosé Dapena Paz <jdapena@igalia.com>
Thu, 17 Dec 2009 16:20:47 +0000 (17:20 +0100)
committerJosé Dapena Paz <jdapena@igalia.com>
Mon, 18 Jan 2010 16:12:49 +0000 (17:12 +0100)
src/widgets/modest-gtkhtml-msg-view.c

index 5631716..2bcb914 100644 (file)
@@ -1275,6 +1275,8 @@ modest_gtkhtml_msg_view_init (ModestGtkhtmlMsgView *obj)
 
        priv->calendar_actions_container = gtk_vbox_new (FALSE, 0);
        gtk_box_pack_start (GTK_BOX (priv->headers_box), priv->calendar_actions_container, FALSE, FALSE, 0);
+       gtk_widget_hide_all (priv->calendar_actions_container);
+       gtk_widget_set_no_show_all (priv->calendar_actions_container, TRUE);
 
 #ifndef MODEST_TOOLKIT_HILDON2
        separator = gtk_hseparator_new ();
@@ -1927,16 +1929,16 @@ set_message (ModestGtkhtmlMsgView *self, TnyMsg *msg, TnyMimePart *other_body)
 #ifdef MODEST_TOOLKIT_HILDON2
        gtk_widget_set_no_show_all (priv->priority_box, TRUE);
        gtk_widget_set_no_show_all (priv->calendar_box, TRUE);
-       gtk_widget_set_no_show_all (priv->calendar_actions_container, TRUE);
 #endif
+       gtk_widget_set_no_show_all (priv->calendar_actions_container, TRUE);
        gtk_widget_set_no_show_all (priv->attachments_box, TRUE);
        gtk_widget_show_all (priv->mail_header_view);
        gtk_widget_set_no_show_all (priv->attachments_box, FALSE);
 #ifdef MODEST_TOOLKIT_HILDON2
        gtk_widget_set_no_show_all (priv->priority_box, FALSE);
        gtk_widget_set_no_show_all (priv->calendar_box, FALSE);
-       gtk_widget_set_no_show_all (priv->calendar_actions_container, FALSE);
 #endif
+       gtk_widget_set_no_show_all (priv->calendar_actions_container, FALSE);
        gtk_widget_set_no_show_all (priv->mail_header_view, TRUE);
 
        html_vadj = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (priv->html_scroll));
@@ -2020,8 +2022,8 @@ set_header (ModestGtkhtmlMsgView *self, TnyHeader *header)
 #ifdef MODEST_TOOLKIT_HILDON2
        gtk_widget_hide_all (priv->priority_box);
        gtk_widget_hide_all (priv->calendar_box);
-       gtk_widget_hide_all (priv->calendar_actions_container);
 #endif
+       gtk_widget_hide_all (priv->calendar_actions_container);
        gtk_widget_set_no_show_all (priv->mail_header_view, TRUE);
        tny_mime_part_view_clear (TNY_MIME_PART_VIEW (priv->body_view));
        priv->idle_changes_count = 0;
@@ -2805,17 +2807,17 @@ set_calendar (ModestGtkhtmlMsgView *self, TnyHeader *header, TnyMsg *msg)
                gtk_box_pack_start (GTK_BOX (priv->calendar_actions_container), priv->calendar_actions_box, FALSE, FALSE, 0);
                g_signal_emit_by_name (G_OBJECT (self), "handle-calendar", calendar_part, priv->calendar_actions_box, &retval);
                if (retval) {
-                       gtk_widget_show (priv->calendar_actions_container);
+                       gtk_widget_show_all (priv->calendar_actions_container);
                        gtk_widget_show (priv->calendar_actions_box);
                } else {
-                       gtk_widget_hide (priv->calendar_actions_container);
+                       gtk_widget_hide_all (priv->calendar_actions_container);
                        gtk_widget_hide (priv->calendar_actions_box);
                }
                gtk_widget_show_all  (priv->calendar_box);
                g_object_unref (calendar_part);
        } else {
                gtk_widget_hide_all (priv->calendar_box);
-               gtk_widget_hide (priv->calendar_actions_container);
+               gtk_widget_hide_all (priv->calendar_actions_container);
                gtk_widget_hide (priv->calendar_actions_box);
        }