X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fmodest-ui-actions.c;h=fa1d7b3e1d1ec6ac03b1dd180a641d1fa04390d2;hp=0fd4141083196d7ef2903451f8657687143525cd;hb=a8712a6b492bdc754ef169452802773ec89376cd;hpb=cbca7060e3dc8b122d66b238424d9cb6890cee2d diff --git a/src/modest-ui-actions.c b/src/modest-ui-actions.c index 0fd4141..fa1d7b3 100644 --- a/src/modest-ui-actions.c +++ b/src/modest-ui-actions.c @@ -882,11 +882,11 @@ static gboolean download_uncached_messages (TnyList *header_list, GtkWindow *win) { TnyIterator *iter; - gboolean found, retval; + gboolean retval; + gint uncached_messages = 0; iter = tny_list_create_iterator (header_list); - found = FALSE; - while (!tny_iterator_is_done (iter) && !found) { + while (!tny_iterator_is_done (iter)) { TnyHeader *header; TnyHeaderFlags flags; @@ -895,7 +895,8 @@ download_uncached_messages (TnyList *header_list, GtkWindow *win) /* TODO: is this the right flag?, it seems that some headers that have been previously downloaded do not come with it */ - found = !(flags & TNY_HEADER_FLAG_CACHED); + if (! (flags & TNY_HEADER_FLAG_CACHED)) + uncached_messages ++; g_object_unref (header); tny_iterator_next (iter); } @@ -903,11 +904,13 @@ download_uncached_messages (TnyList *header_list, GtkWindow *win) /* Ask for user permission to download the messages */ retval = TRUE; - if (found) { + if (uncached_messages > 0) { GtkResponseType response; response = modest_platform_run_confirmation_dialog (GTK_WINDOW (win), - _("mcen_nc_get_multi_msg_txt")); + ngettext("mcen_nc_get_msg", + "mcen_nc_get_msgs", + uncached_messages)); if (response == GTK_RESPONSE_CANCEL) retval = FALSE; } @@ -1640,6 +1643,7 @@ modest_ui_actions_on_send (GtkWidget *widget, ModestMsgEditWindow *edit_window) g_object_unref (G_OBJECT (mail_operation)); modest_msg_edit_window_free_msg_data (edit_window, data); + modest_msg_edit_window_set_sent (edit_window, TRUE); /* Save settings and close the window: */ gtk_widget_destroy (GTK_WIDGET (edit_window)); @@ -2756,6 +2760,10 @@ msgs_move_to_confirmation (GtkWindow *win, g_object_unref (header); g_object_unref (iter); + /* if no src_folder, message may be an attahcment */ + if (src_folder == NULL) + return GTK_RESPONSE_CANCEL; + /* If the source is a remote folder */ if (!modest_tny_folder_is_local_folder (src_folder)) { const gchar *message; @@ -2939,6 +2947,7 @@ modest_ui_actions_on_msg_view_window_move_to (GtkAction *action, /* Create header list */ header = modest_msg_view_window_get_header (MODEST_MSG_VIEW_WINDOW (win)); + headers = tny_simple_list_new (); tny_list_prepend (headers, G_OBJECT (header)); g_object_unref (header);