Changeset 3728

Show
Ignore:
Timestamp:
07/28/08 19:53:07
Author:
svillar
Message:
  • Fixed a problem in POP3 provider
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ChangeLog

    r3726 r3728  
     12008-07-28  Sergio Villar Senin  <svillar@igalia.com> 
     2 
     3        * libtinymail-camel/camel-lite/camel/providers/pop3/camel-pop3-folder.c: 
     4        do not mark as expunged those messages that could not be retrieved due 
     5        to the user canceled the request 
     6 
    172008-07-23  Sergio Villar Senin  <svillar@igalia.com> 
    28 
  • trunk/libtinymail-camel/camel-lite/camel/providers/pop3/camel-pop3-folder.c

    r3687 r3728  
    11901190                         * the user has a delete-mail finger  ... ) */ 
    11911191 
    1192                         CamelFolder *folder = (CamelFolder *) pop3_folder; 
    1193                         CamelMessageInfo *mi = camel_folder_summary_uid (folder->summary, uid); 
    1194                         if (mi) { 
    1195                                 CamelFolderChangeInfo *changes = camel_folder_change_info_new (); 
    1196                                 ((CamelMessageInfoBase*)mi)->flags |= CAMEL_MESSAGE_EXPUNGED; 
    1197                                 if (mi->uid) { 
    1198                                         camel_folder_change_info_remove_uid (changes, mi->uid); 
    1199                                         camel_object_trigger_event (CAMEL_OBJECT (folder), "folder_changed", changes); 
     1192                        if (camel_operation_cancel_check (NULL)) { 
     1193                                camel_exception_setv(ex, CAMEL_EXCEPTION_USER_CANCEL, 
     1194                                        "User canceled message retrieval"); 
     1195                        } else { 
     1196                                CamelFolder *folder = (CamelFolder *) pop3_folder; 
     1197                                CamelMessageInfo *mi = camel_folder_summary_uid (folder->summary, uid); 
     1198                                if (mi) { 
     1199                                        CamelFolderChangeInfo *changes = camel_folder_change_info_new (); 
     1200                                        ((CamelMessageInfoBase*)mi)->flags |= CAMEL_MESSAGE_EXPUNGED; 
     1201                                        if (mi->uid) { 
     1202                                                camel_folder_change_info_remove_uid (changes, mi->uid); 
     1203                                                camel_object_trigger_event (CAMEL_OBJECT (folder), "folder_changed", changes); 
     1204                                        } 
     1205                                        camel_folder_summary_remove (folder->summary, mi); 
     1206                                        camel_folder_change_info_free (changes); 
     1207                                        camel_message_info_free (mi); 
    12001208                                } 
    1201                                 camel_folder_summary_remove (folder->summary, mi); 
    1202                                 camel_folder_change_info_free (changes); 
    1203                                 camel_message_info_free (mi); 
     1209 
     1210                                camel_exception_setv (ex, CAMEL_EXCEPTION_FOLDER_UID_NOT_AVAILABLE, 
     1211                                      "Message with UID %s is not currently available on the POP server. " 
     1212                                      "If you have a web E-mail account with POP access, make sure " 
     1213                                      "that you select to export all E-mails over POP for mail, " 
     1214                                      "the ones that have already been downloaded too. Also verify " 
     1215                                      "whether other E-mail clients that use the account are not " 
     1216                                      "configured to automatically delete E-mails from the POP server." , 
     1217                                      uid); 
    12041218                        } 
    1205  
    1206                         camel_exception_setv (ex, CAMEL_EXCEPTION_FOLDER_UID_NOT_AVAILABLE, 
    1207                           "Message with UID %s is not currently available on the POP server. " 
    1208                           "If you have a web E-mail account with POP access, make sure " 
    1209                           "that you select to export all E-mails over POP for mail, " 
    1210                           "the ones that have already been downloaded too. Also verify " 
    1211                           "whether other E-mail clients that use the account are not " 
    1212                           "configured to automatically delete E-mails from the POP server." , 
    1213                           uid); 
    12141219 
    12151220                        g_static_rec_mutex_unlock (pop3_store->uidl_lock);