static void on_activity_changed (ModestFolderView *view,
gboolean activity,
ModestMailboxesWindow *folder_window);
+#ifdef MODEST_TOOLKIT_HILDON2
static gboolean on_key_press(GtkWidget *widget,
- GdkEventKey *event,
- gpointer user_data);
+ GdkEventKey *event,
+ gpointer user_data);
+#endif
typedef struct _ModestMailboxesWindowPrivate ModestMailboxesWindowPrivate;
struct _ModestMailboxesWindowPrivate {
#ifdef MODEST_TOOLKIT_HILDON2
MODEST_TYPE_HILDON2_WINDOW,
#else
- MODEST_TYPE_WINDOW,
+ MODEST_TYPE_SHELL_WINDOW,
#endif
"ModestMailboxesWindow",
&my_info, 0);
"clicked",
G_CALLBACK (modest_ui_actions_on_new_msg), self);
+#ifdef MODEST_TOOLKIT_HILDON2
/* connect window keys -> priv->folder_view scroll here? */
g_signal_connect(G_OBJECT(self), "key-press-event",
G_CALLBACK(on_key_press), self);
+#endif
}
ModestWindow *
GdkPixbuf *window_icon;
GtkWidget *scrollable;
GtkWidget *top_alignment;
+#ifdef MODEST_TOOLKIT_HILDON2
+ GtkWidget *live_search;
+#endif
self = MODEST_MAILBOXES_WINDOW(g_object_new(MODEST_TYPE_MAILBOXES_WINDOW, NULL));
priv = MODEST_MAILBOXES_WINDOW_GET_PRIVATE(self);
self);
priv->folder_view = modest_platform_create_folder_view (NULL);
+#ifdef MODEST_TOOLKIT_HILDON2
+ live_search = modest_folder_view_setup_live_search (MODEST_FOLDER_VIEW (priv->folder_view));
+ hildon_live_search_widget_hook (HILDON_LIVE_SEARCH (live_search), GTK_WIDGET (self), priv->folder_view);
+#endif
modest_folder_view_set_cell_style (MODEST_FOLDER_VIEW (priv->folder_view),
MODEST_FOLDER_VIEW_CELL_STYLE_COMPACT);
modest_folder_view_set_filter (MODEST_FOLDER_VIEW (priv->folder_view),
gtk_container_add (GTK_CONTAINER (scrollable), priv->folder_view);
gtk_box_pack_end (GTK_BOX (priv->top_vbox), scrollable, TRUE, TRUE, 0);
+#ifdef MODEST_TOOLKIT_HILDON2
+ gtk_box_pack_end (GTK_BOX (priv->top_vbox), live_search, FALSE, FALSE, 0);
+#endif
gtk_container_add (GTK_CONTAINER (top_alignment), priv->top_vbox);
gtk_container_add (GTK_CONTAINER (self), top_alignment);
return;
new_window = GTK_WIDGET (modest_folder_window_new (NULL));
+ active_account = modest_window_get_active_account (MODEST_WINDOW (self));
+ modest_window_set_active_account (MODEST_WINDOW (new_window), active_account);
registered = modest_window_mgr_register_window (modest_runtime_get_window_mgr (),
MODEST_WINDOW (new_window),
MODEST_WINDOW (self));
update_progress_hint (self);
}
-
+#ifdef MODEST_TOOLKIT_HILDON2
static gboolean
on_key_press(GtkWidget *widget, GdkEventKey *event, gpointer user_data)
{
return FALSE;
}
+#endif