Changeset 3228

Show
Ignore:
Timestamp:
01/09/08 18:49:20
Author:
svillar
Message:

Fixes a problem when adding folders

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ChangeLog

    r3227 r3228  
     12008-01-09  Sergio Villar Senin  <svillar@igalia.com> 
     2 
     3        * libtinymailui-gtk/tny-gtk-folder-store-tree-model.c: 
     4        (creater): added some checks in order to properly detect the parent of 
     5        the newly created folder 
     6 
    172008-01-09  Dirk-Jan C. Binnema <dirk-jan.binnema@nokia.com> 
    28         
    39        * small fixes / cleanups for tny-maemo-conic-device 
    410 
     11>>>>>>> .r3227 
    5122008-01-08  Sergio Villar Senin  <svillar@igalia.com> 
    613 
  • trunk/libtinymailui-gtk/tny-gtk-folder-store-tree-model.c

    r3161 r3228  
    950950 
    951951        if (!found) { 
    952                 if (fol && TNY_IS_FOLDER (fol)) 
     952                TnyAccount *maccount = NULL, *saccount = NULL; 
     953                const gchar *ma_id = NULL, *sa_id = NULL; 
     954 
     955                if (fol && TNY_IS_FOLDER (fol)) { 
    953956                        mid = tny_folder_get_id (TNY_FOLDER (fol)); 
    954                 if (parent_store && TNY_IS_FOLDER (parent_store)) 
     957                        if (!TNY_IS_MERGE_FOLDER (fol)) 
     958                                maccount = tny_folder_get_account (TNY_FOLDER (fol)); 
     959                        if (maccount) 
     960                                ma_id = tny_account_get_id (maccount); 
     961                } 
     962                if (parent_store && TNY_IS_FOLDER (parent_store)) { 
    955963                        sid = tny_folder_get_id (TNY_FOLDER (parent_store)); 
    956                 if (sid && mid && !strcmp (sid, mid)) 
    957                         found = TRUE; 
     964                        if (!TNY_IS_MERGE_FOLDER (parent_store)) 
     965                                saccount = tny_folder_get_account (TNY_FOLDER (parent_store)); 
     966                        if (saccount) 
     967                                sa_id = tny_account_get_id (saccount); 
     968                } 
     969                if (sid && mid && !strcmp (sid, mid)) { 
     970                        if (ma_id && sa_id) { 
     971                                if (!strcmp (ma_id, sa_id)) 
     972                                        found = TRUE; 
     973                        } else { 
     974                                found = TRUE; 
     975                        } 
     976                } 
     977                if (maccount) 
     978                        g_object_unref (maccount); 
     979                if (saccount) 
     980                        g_object_unref (saccount); 
    958981        } 
    959982