#include <modest-defs.h>
#include <modest-ui-actions.h>
#include <modest-window.h>
-#include <hildon/hildon-program.h>
-#include <hildon/hildon-banner.h>
-#include <hildon/hildon-button.h>
+#include <hildon/hildon.h>
#include <tny-account-store-view.h>
#include <tny-gtk-folder-list-store.h>
#include <modest-header-window.h>
GdkModifierType accel_mods;
GtkAccelGroup *accel_group;
GtkWidget *top_alignment;
+#ifdef MODEST_TOOLKIT_HILDON2
+ GtkWidget *live_search;
+#endif
self = MODEST_FOLDER_WINDOW(g_object_new(MODEST_TYPE_FOLDER_WINDOW, NULL));
priv = MODEST_FOLDER_WINDOW_GET_PRIVATE(self);
self);
priv->folder_view = modest_platform_create_folder_view (query);
+#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 (pannable), priv->folder_view);
gtk_container_add (GTK_CONTAINER (top_alignment), pannable);
+#ifdef MODEST_TOOLKIT_HILDON2
+ gtk_box_pack_end (GTK_BOX (priv->top_vbox), live_search, FALSE, FALSE, 0);
+#endif
gtk_box_pack_end (GTK_BOX (priv->top_vbox), top_alignment, TRUE, TRUE, 0);
gtk_container_add (GTK_CONTAINER (self), priv->top_vbox);
if (proto && MODEST_IS_ACCOUNT_PROTOCOL (proto)) {
ModestAccountSettingsDialog *dialog =
modest_account_protocol_get_account_settings_dialog (proto, account_name);
- modest_window_mgr_set_modal (modest_runtime_get_window_mgr (),
- (GtkWindow *) dialog,
- (GtkWindow *) self);
- gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog), FALSE);
- gtk_widget_show (GTK_WIDGET (dialog));
+
+ if (dialog) {
+ modest_window_mgr_set_modal (modest_runtime_get_window_mgr (),
+ (GtkWindow *) dialog,
+ (GtkWindow *) self);
+ gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog), FALSE);
+ gtk_widget_show (GTK_WIDGET (dialog));
+ }
}
}
}
modest_hildon2_window_add_to_menu (MODEST_HILDON2_WINDOW (self), _("mcen_me_new_folder"), NULL,
APP_MENU_CALLBACK (modest_ui_actions_on_new_folder),
NULL);
+ modest_hildon2_window_add_to_menu (MODEST_HILDON2_WINDOW (self), _("mcen_me_inbox_sendandreceive"), NULL,
+ APP_MENU_CALLBACK (modest_ui_actions_on_send_receive),
+ MODEST_DIMMING_CALLBACK (modest_ui_dimming_rules_on_send_receive));
modest_hildon2_window_add_to_menu (MODEST_HILDON2_WINDOW (self), _("mcen_me_rename_folder"), NULL,
APP_MENU_CALLBACK (set_rename_edit_mode),
MODEST_DIMMING_CALLBACK (modest_ui_dimming_rules_on_rename_folder));
APP_MENU_CALLBACK (set_delete_edit_mode),
MODEST_DIMMING_CALLBACK (modest_ui_dimming_rules_on_folder_window_delete));
- /* send receive actions should be only one visible always */
- modest_hildon2_window_add_to_menu (MODEST_HILDON2_WINDOW (self), _("mcen_me_inbox_sendandreceive"), NULL,
- APP_MENU_CALLBACK (modest_ui_actions_on_send_receive),
- MODEST_DIMMING_CALLBACK (modest_ui_dimming_rules_on_send_receive));
-
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));