2007-06-26 Murray Cumming <murrayc@murrayc.com>
authorMurray Cumming <murrayc@murrayc.com>
Tue, 26 Jun 2007 18:20:26 +0000 (18:20 +0000)
committerMurray Cumming <murrayc@murrayc.com>
Tue, 26 Jun 2007 18:20:26 +0000 (18:20 +0000)
* src/dbus_api/modest-dbus-callbacks.c: (add_folders_to_list):
Only return the first level of folders under accounts, because the
osso-global-search UI spec doesn't want the rest.
This fixed projects.maemo.org bug NB#61811.

pmo-trunk-r2443

ChangeLog2
src/dbus_api/modest-dbus-callbacks.c

index 2237316..883a6aa 100644 (file)
@@ -1,5 +1,12 @@
 2007-06-26  Murray Cumming  <murrayc@murrayc.com>
 
+       * src/dbus_api/modest-dbus-callbacks.c: (add_folders_to_list):
+       Only return the first level of folders under accounts, because the 
+       osso-global-search UI spec doesn't want the rest.
+       This fixed projects.maemo.org bug NB#61811.
+
+2007-06-26  Murray Cumming  <murrayc@murrayc.com>
+
        * src/modest-tny-account-store.c:
        * src/modest-tny-account-store.h:
        Added modest_tny_account_is_memory_card_account().
index 71b4ae6..73bb627 100644 (file)
@@ -1096,7 +1096,6 @@ add_folders_to_list (TnyFolderStore *folder_store, GList** list)
        if (TNY_IS_FOLDER (folder_store)) {
                add_single_folder_to_list (TNY_FOLDER (folder_store), list);
        }       
-       
                
        /* Recurse into child folders: */
                
@@ -1114,12 +1113,21 @@ add_folders_to_list (TnyFolderStore *folder_store, GList** list)
 
        TnyIterator *iter = tny_list_create_iterator (all_folders);
        while (!tny_iterator_is_done (iter)) {
+               
+               /* Do not recurse, because the osso-global-search UI specification 
+                * does not seem to want the sub-folders, though that spec seems to 
+                * be generally unsuitable for Modest.
+                */
                TnyFolder *folder = TNY_FOLDER (tny_iterator_get_current (iter));
+               add_single_folder_to_list (TNY_FOLDER (folder), list);
+                
+               #if 0
                if (TNY_IS_FOLDER_STORE (folder))
                        add_folders_to_list (TNY_FOLDER_STORE (folder), list);
                else {
                        add_single_folder_to_list (TNY_FOLDER (folder), list);
                }
+               #endif
                
                tny_iterator_next (iter);
        }