/* Gets folder type (OUTBOX headers will be opened in edit window */
if (modest_tny_folder_is_local_folder (folder))
- folder_type = modest_tny_folder_get_local_folder_type (folder);
+ folder_type = modest_tny_folder_get_local_or_mmc_folder_type (folder);
/* If the header is in the drafts folder then open the editor,
else the message view window */
- if (folder_type == TNY_FOLDER_TYPE_DRAFTS) {
+ if ((folder_type == TNY_FOLDER_TYPE_DRAFTS) ||
+ (folder_type == TNY_FOLDER_TYPE_OUTBOX)) {
/* we cannot edit without a valid account... */
if (!modest_account_mgr_has_accounts(modest_runtime_get_account_mgr(), TRUE)) {
run_account_setup_wizard(parent_win);
account_names = NULL;
}
-/*
- * Handler of the click on Send&Receive button in the main toolbar
- */
-void
-modest_ui_actions_on_send_receive (GtkAction *action, ModestWindow *win)
+void
+modest_do_refresh_current_folder(ModestWindow *win)
{
- /* Check if accounts exist */
- gboolean accounts_exist =
- modest_account_mgr_has_accounts(modest_runtime_get_account_mgr(), TRUE);
-
- /* If not, allow the user to create an account before trying to send/receive. */
- if (!accounts_exist)
- modest_ui_actions_on_accounts (NULL, win);
-
/* Refresh currently selected folder. Note that if we only
- want to retrive the headers, then the refresh only will
+ want to retreive the headers, then the refresh only will
invoke a poke_status over all folders, i.e., only the
total/unread count will be updated */
if (MODEST_IS_MAIN_WINDOW (win)) {
if (folder_store)
g_object_unref (folder_store);
}
+}
+
+
+/*
+ * Handler of the click on Send&Receive button in the main toolbar
+ */
+void
+modest_ui_actions_on_send_receive (GtkAction *action, ModestWindow *win)
+{
+ /* Check if accounts exist */
+ gboolean accounts_exist =
+ modest_account_mgr_has_accounts(modest_runtime_get_account_mgr(), TRUE);
+
+ /* If not, allow the user to create an account before trying to send/receive. */
+ if (!accounts_exist)
+ modest_ui_actions_on_accounts (NULL, win);
+
+ modest_do_refresh_current_folder (win);
/* Refresh the active account */
modest_ui_actions_do_send_receive (NULL, win);