G_CALLBACK (modest_ui_actions_on_send_receive));
add_to_menu (self, HILDON_APP_MENU (app_menu), _("mcen_me_inbox_messagedetails"),
G_CALLBACK (modest_ui_actions_on_details));
+ add_to_menu (self, HILDON_APP_MENU (app_menu), _("mcen_me_inbox_sort"),
+ G_CALLBACK (modest_ui_actions_on_sort));
hildon_stackable_window_set_main_menu (HILDON_STACKABLE_WINDOW (self),
HILDON_APP_MENU (app_menu));
modest_ui_actions_on_sort (GtkAction *action,
ModestWindow *window)
{
+ GtkWidget *header_view = NULL;
+
g_return_if_fail (MODEST_IS_WINDOW(window));
if (MODEST_IS_MAIN_WINDOW (window)) {
- GtkWidget *header_view;
header_view = modest_main_window_get_child_widget (MODEST_MAIN_WINDOW(window),
MODEST_MAIN_WINDOW_WIDGET_TYPE_HEADER_VIEW);
- if (!header_view) {
- modest_platform_information_banner (NULL, NULL, _CS("ckdg_ib_nothing_to_sort"));
-
- return;
- }
+#ifdef MODEST_TOOLKIT_HILDON2
+ } else if (MODEST_IS_HEADER_WINDOW (window)) {
+ header_view = GTK_WIDGET (modest_header_window_get_header_view (MODEST_HEADER_WINDOW (window)));
+#endif
+ }
- /* Show sorting dialog */
- modest_utils_run_sort_dialog (GTK_WINDOW (window), MODEST_SORT_HEADERS);
+ if (!header_view) {
+ modest_platform_information_banner (NULL, NULL, _CS("ckdg_ib_nothing_to_sort"));
+
+ return;
}
+
+ /* Show sorting dialog */
+ modest_utils_run_sort_dialog (GTK_WINDOW (window), MODEST_SORT_HEADERS);
}
static void
#include "widgets/modest-main-window.h"
#include "modest-widget-memory.h"
#include "widgets/modest-sort-criterium-view.h"
+#ifdef MODEST_TOOLKIT_HILDON2
+#include "modest-header-window.h"
+#endif
GQuark
modest_utils_get_supported_secure_authentication_error_quark (void)
if (MODEST_IS_MAIN_WINDOW (parent_window)) {
header_view = MODEST_HEADER_VIEW(modest_main_window_get_child_widget (MODEST_MAIN_WINDOW(parent_window),
MODEST_MAIN_WINDOW_WIDGET_TYPE_HEADER_VIEW));
+#ifdef MODEST_TOOLKIT_HILDON2
+ } else if (MODEST_IS_HEADER_WINDOW (parent_window)) {
+ header_view = MODEST_HEADER_VIEW (modest_header_window_get_header_view (MODEST_HEADER_WINDOW (parent_window)));
+#endif
+
}
if (!header_view)
return;