Changeset 3574

Show
Ignore:
Timestamp:
04/14/08 15:31:07
Author:
pvanhoof
Message:
        • Uncaching of the folder-list in case of tree-changing operations
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ChangeLog

    r3573 r3574  
    44        * Handling uncaching the password during account finalization 
    55        * mlock-ing the password memory of accounts 
     6        * Uncaching of the folder-list in case of tree-changing operations 
    67 
    782008-04-11  Philip Van Hoof <pvanhoof@gnome.org> 
  • trunk/libtinymail-camel/tny-camel-folder-priv.h

    r3482 r3574  
    5454        CamelException load_ex; 
    5555        GList *obs, *sobs; 
     56        gboolean cant_reuse_iter; 
    5657}; 
    5758 
  • trunk/libtinymail-camel/tny-camel-folder.c

    r3553 r3574  
    32143214                        if (TNY_IS_CAMEL_FOLDER (into)) { 
    32153215                                TnyCamelFolderPriv *tpriv = TNY_CAMEL_FOLDER_GET_PRIVATE (into); 
     3216                                tpriv->cant_reuse_iter = TRUE; 
    32163217                                to = g_strdup_printf ("%s/%s", tpriv->folder_name, new_name); 
    3217                         } else 
     3218                        } else { 
     3219                                TnyCamelStoreAccountPriv *sapriv = TNY_CAMEL_STORE_ACCOUNT_GET_PRIVATE (into); 
     3220                                sapriv->cant_reuse_iter = TRUE; 
    32183221                                to = g_strdup (new_name); 
     3222                        } 
    32193223 
    32203224                        tny_debug ("tny_folder_copy: rename %s to %s\n", from, to); 
     
    50345038        TnyCamelFolderPriv *priv = TNY_CAMEL_FOLDER_GET_PRIVATE (folder); 
    50355039 
     5040        priv->cant_reuse_iter = FALSE; 
    50365041        priv->iter = iter; 
    50375042 
     
    50555060tny_camel_folder_get_folders_default (TnyFolderStore *self, TnyList *list, TnyFolderStoreQuery *query, GError **err) 
    50565061{ 
     5062        gboolean cant_reuse_iter = TRUE; 
    50575063        TnyCamelFolderPriv *priv = TNY_CAMEL_FOLDER_GET_PRIVATE (self); 
    50585064        CamelFolderInfo *iter; 
     5065        TnyAccount *account = NULL; 
    50595066 
    50605067        if (!_tny_session_check_operation (TNY_FOLDER_PRIV_GET_SESSION(priv),  
     
    50635070                return; 
    50645071 
    5065         if (!priv->iter && priv->iter_parented) 
     5072        account = tny_folder_get_account (TNY_FOLDER (self)); 
     5073 
     5074        if (account) { 
     5075                TnyCamelStoreAccountPriv *aspriv = TNY_CAMEL_STORE_ACCOUNT_GET_PRIVATE (account); 
     5076                if (aspriv) 
     5077                        cant_reuse_iter = aspriv->cant_reuse_iter; 
     5078                g_object_unref (account); 
     5079        } 
     5080 
     5081        if (!cant_reuse_iter) 
     5082                cant_reuse_iter = cant_reuse_iter; 
     5083 
     5084        if ((!priv->iter && priv->iter_parented) || cant_reuse_iter) 
    50665085        { 
    50675086                CamelStore *store = priv->store; 
     
    50715090 
    50725091                priv->iter = camel_store_get_folder_info (store, priv->folder_name, 0, &ex); 
     5092 
     5093                priv->cant_reuse_iter = FALSE; 
    50735094 
    50745095                if (camel_exception_is_set (&ex)) 
     
    59936014        TnyCamelFolderPriv *priv = TNY_CAMEL_FOLDER_GET_PRIVATE (self); 
    59946015 
     6016        priv->cant_reuse_iter = TRUE; 
    59956017        priv->unread_read = FALSE; 
    59966018        priv->account = NULL;