Now "show more" button is shown in header window action area.
authorJose Dapena Paz <jdapena@igalia.com>
Fri, 30 Oct 2009 12:54:11 +0000 (13:54 +0100)
committerJose Dapena Paz <jdapena@igalia.com>
Thu, 5 Nov 2009 11:02:47 +0000 (12:02 +0100)
src/hildon2/modest-header-window.c

index 096b579..eaf6471 100644 (file)
@@ -71,6 +71,7 @@ struct _ModestHeaderWindowPrivate {
        GtkWidget *contents_view;
        GtkWidget *top_vbox;
        GtkWidget *new_message_button;
+       GtkWidget *show_more_button;
 
        /* state bar */
        ContentsState contents_state;
@@ -257,6 +258,7 @@ modest_header_window_init (ModestHeaderWindow *obj)
        priv->current_store_account = NULL;
        priv->sort_button = NULL;
        priv->new_message_button = NULL;
+       priv->show_more_button = NULL;
        priv->x_coord = 0;
        priv->y_coord = 0;
        priv->notify_model = 0;
@@ -415,6 +417,12 @@ connect_signals (ModestHeaderWindow *self)
                                           "clicked",
                                           G_CALLBACK (modest_ui_actions_on_new_msg), self);
 
+       priv->sighandlers =
+               modest_signal_mgr_connect (priv->sighandlers,
+                                          G_OBJECT (priv->show_more_button),
+                                          "clicked",
+                                          G_CALLBACK (modest_header_window_show_more), self);
+
        /* Delete using horizontal gesture */
        /* DISABLED because it's unreliabile */
        if (FALSE) {
@@ -792,8 +800,13 @@ modest_header_window_new (TnyFolder *folder, const gchar *account_name, const gc
        hildon_button_set_image (HILDON_BUTTON (priv->new_message_button), gtk_image_new_from_pixbuf (new_message_pixbuf));
        g_object_unref (new_message_pixbuf);
 
+       priv->show_more_button = hildon_button_new (MODEST_EDITABLE_SIZE, HILDON_BUTTON_ARRANGEMENT_VERTICAL);
+       hildon_button_set_title (HILDON_BUTTON (priv->show_more_button), _("TODO: show more"));
+
        gtk_box_pack_start (GTK_BOX (action_area_box), priv->new_message_button, TRUE, TRUE, 0);
+       gtk_box_pack_start (GTK_BOX (action_area_box), priv->show_more_button, TRUE, TRUE, 0);
        gtk_widget_show_all (priv->new_message_button);
+       gtk_widget_show_all (priv->show_more_button);
        hildon_tree_view_set_action_area_visible (GTK_TREE_VIEW (priv->header_view), TRUE);
        
        setup_menu (self);
@@ -937,9 +950,6 @@ static void setup_menu (ModestHeaderWindow *self)
        modest_hildon2_window_add_to_menu (MODEST_HILDON2_WINDOW (self), _("mcen_me_outbox_cancelsend"), NULL,
                                           APP_MENU_CALLBACK (modest_ui_actions_cancel_send),
                                           MODEST_DIMMING_CALLBACK (modest_ui_dimming_rules_on_cancel_sending_all));
-       modest_hildon2_window_add_to_menu (MODEST_HILDON2_WINDOW (self), _("TODO: show more"), NULL,
-                                          APP_MENU_CALLBACK (modest_header_window_show_more),
-                                          NULL);
 }
 
 static void