*/
#include <modest-header-window.h>
-#include <modest-osso-state-saving.h>
-#include <libosso.h>
#include <hildon/hildon-pannable-area.h>
#include <hildon/hildon-helper.h>
#include <modest-window-mgr.h>
GtkWidget *contents_view;
GtkWidget *top_vbox;
GtkWidget *new_message_button;
+ GtkWidget *show_more_button;
/* state bar */
ContentsState contents_state;
static gboolean on_key_press(GtkWidget *widget,
GdkEventKey *event,
gpointer user_data);
+static void modest_header_window_show_more (GtkAction *action, ModestWindow *win);
/* globals */
static GtkWindowClass *parent_class = NULL;
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;
"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) {
ModestHeaderWindowPrivate *priv;
header_view = modest_header_view_new (NULL, MODEST_HEADER_VIEW_STYLE_TWOLINES);
+ modest_header_view_set_show_latest (MODEST_HEADER_VIEW (header_view), 50);
priv = MODEST_HEADER_WINDOW_GET_PRIVATE (self);
priv->notify_model = g_signal_connect ((GObject*) header_view, "notify::model",
G_CALLBACK (on_header_view_model_changed), self);
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);
update_view (self, NULL);
- /* Load previous osso state, for instance if we are being restored from
- * hibernation: */
- modest_osso_load_state ();
-
/* Get device name */
modest_maemo_utils_get_device_name ();
return FALSE;
}
+
+static void
+modest_header_window_show_more (GtkAction *action, ModestWindow *win)
+{
+ ModestHeaderWindow *self;
+ ModestHeaderWindowPrivate *priv = NULL;
+
+ self = MODEST_HEADER_WINDOW (win);
+ priv = MODEST_HEADER_WINDOW_GET_PRIVATE (self);
+ if (!priv->header_view)
+ return;
+
+ if (modest_header_view_get_not_latest (MODEST_HEADER_VIEW (priv->header_view)) > 0) {
+ modest_header_view_set_show_latest (MODEST_HEADER_VIEW (priv->header_view),
+ modest_header_view_get_show_latest (MODEST_HEADER_VIEW (priv->header_view)) + 50);
+ }
+}