2007-07-22 Armin Burgmeier <armin@openismus.com>
[modest] / src / modest-ui-actions.c
index e144aa4..9d6c944 100644 (file)
@@ -728,9 +728,9 @@ open_msg_cb (ModestMailOperation *mail_op,
        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))
@@ -1344,8 +1344,11 @@ modest_ui_actions_on_sort (GtkAction *action,
                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);