Initialization speedups
authorPhilip Van Hoof <philip@codeminded.be>
Tue, 12 Jun 2007 14:16:46 +0000 (14:16 +0000)
committerPhilip Van Hoof <philip@codeminded.be>
Tue, 12 Jun 2007 14:16:46 +0000 (14:16 +0000)
pmo-trunk-r2182

src/maemo/modest-main-window.c
src/modest-mail-operation.c
src/widgets/modest-folder-view.c

index 4cd1d05..79a9f49 100644 (file)
@@ -713,13 +713,19 @@ modest_main_window_new (void)
        modest_maemo_utils_get_device_name ();
 
        /* folder view */
-       query = tny_folder_store_query_new ();
+       query = NULL; 
+
+       /* tny_folder_store_query_new ();
+
        tny_folder_store_query_add_item (query, NULL,
                                         TNY_FOLDER_STORE_QUERY_OPTION_SUBSCRIBED);
+       */
+
        priv->folder_view = MODEST_FOLDER_VIEW(modest_folder_view_new (query));
        if (!priv->folder_view)
                g_printerr ("modest: cannot instantiate folder view\n");
-       g_object_unref (G_OBJECT (query));
+       /* g_object_unref (G_OBJECT (query)); */
+
        modest_folder_view_set_style (priv->folder_view,
                                      MODEST_FOLDER_VIEW_STYLE_SHOW_ONE);
 
index ee0d6a1..b645273 100644 (file)
@@ -927,9 +927,7 @@ update_account_thread (gpointer thr_user_data)
                                tny_iterator_next (iter);
                        }
                        g_object_unref (iter);
-               } else /* If it's headers only, then just poke the folder status (this will update the unread and
-                       * total count of folder observers, like the folder list model*/
-                       tny_folder_poke_status (TNY_FOLDER (folder));
+               }
                
                tny_folder_remove_observer (TNY_FOLDER (folder), TNY_FOLDER_OBSERVER (observer));
                g_object_unref (observer);
index fe8fad9..a5e4978 100644 (file)
@@ -573,6 +573,8 @@ modest_folder_view_set_account_store (TnyAccountStoreView *self, TnyAccountStore
        priv->accounts_reloaded_signal = 
                g_signal_connect (G_OBJECT(account_store), "accounts_reloaded",
                                  G_CALLBACK (on_accounts_reloaded), self);
+
+       on_accounts_reloaded (account_store, (gpointer ) self);
        
        g_object_unref (G_OBJECT (device));
 }