#ifdef MODEST_PLATFORM_MAEMO
#include "maemo/modest-osso-state-saving.h"
#include "maemo/modest-maemo-utils.h"
+#include "maemo/modest-hildon-includes.h"
#endif /* MODEST_PLATFORM_MAEMO */
#include "widgets/modest-ui-constants.h"
headers_action_mark_as_read (header, MODEST_WINDOW(parent_win), NULL);
/* Get account */
- account = modest_account_mgr_get_default_account (modest_runtime_get_account_mgr());
+ account = g_strdup (modest_window_get_active_account (MODEST_WINDOW (parent_win)));
if (!account)
- account = g_strdup (modest_window_get_active_account (MODEST_WINDOW (parent_win)));
+ account = modest_account_mgr_get_default_account (modest_runtime_get_account_mgr());
/* Gets folder type (OUTBOX headers will be opened in edit window */
if (modest_tny_folder_is_local_folder (folder))
GtkWidget *header_view;
header_view = modest_main_window_get_child_widget (MODEST_MAIN_WINDOW(window),
MODEST_WIDGET_TYPE_HEADER_VIEW);
- if (!header_view)
+ if (!header_view) {
+ modest_platform_information_banner (NULL, NULL, _CS("ckdg_ib_nothing_to_sort"));
+
return;
+ }
/* Show sorting dialog */
modest_platform_run_sort_dialog (GTK_WINDOW (window), MODEST_SORT_HEADERS);
delete_folder (main_window, TRUE);
}
+
+static void
+show_error (GtkWidget *parent_widget, const gchar* text)
+{
+ hildon_banner_show_information(parent_widget, NULL, text);
+
+#if 0
+ GtkDialog *dialog = GTK_DIALOG (hildon_note_new_information (parent_window, text)); */
+ /*
+ GtkDialog *dialog = GTK_DIALOG (gtk_message_dialog_new (parent_window,
+ (GtkDialogFlags)0,
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_OK,
+ text ));
+ */
+
+ gtk_dialog_run (dialog);
+ gtk_widget_destroy (GTK_WIDGET (dialog));
+#endif
+}
+
void
modest_ui_actions_on_password_requested (TnyAccountStore *account_store,
const gchar* server_account_name,
*cancel = FALSE;
} else {
+ show_error(GTK_WIDGET (main_window), _("mail_ib_login_cancelled"));
+
if (username)
*username = NULL;