* Fixes some issues
[modest] / src / widgets / modest-account-view.c
index 488eb2a..aa03c39 100644 (file)
@@ -256,9 +256,9 @@ update_account_view (ModestAccountMgr *account_mgr, ModestAccountView *view)
 
 static void
 on_account_busy_changed(ModestAccountMgr *account_mgr, 
-                       const gchar *account_name,
-                       gboolean busy, 
-                       ModestAccountView *self)
+                        const gchar *account_name,
+                        gboolean busy, 
+                        ModestAccountView *self)
 {
        GtkListStore *model = GTK_LIST_STORE(gtk_tree_view_get_model (GTK_TREE_VIEW(self)));
        GtkTreeIter iter;
@@ -301,7 +301,9 @@ on_account_inserted (TnyAccountStore *account_store,
        self = MODEST_ACCOUNT_VIEW (user_data);
        priv = MODEST_ACCOUNT_VIEW_GET_PRIVATE (self);
 
-       update_account_view (priv->account_mgr, self);
+       /* Do not refresh the view with transport accounts */
+       if (TNY_IS_STORE_ACCOUNT (account))
+               update_account_view (priv->account_mgr, self);
 }
 
 static void
@@ -485,10 +487,11 @@ init_view (ModestAccountView *self)
         *
         * djcb: indeed, they have been removed for post-bora, i added the ifdefs...
                 */
-#ifdef MODEST_HILDON_VERSION_0 
+#ifdef MODEST_HAVE_HILDON0_WIDGETS
        g_object_set(G_OBJECT(self), "allow-checkbox-mode", FALSE, NULL);
        g_object_set(G_OBJECT(toggle_renderer), "checkbox-mode", FALSE, NULL);
-#endif /*MODEST_HILDON_VERSION_0 */
+#endif /* MODEST_HAVE_HILDON0_WIDGETS */
+
        g_signal_connect (G_OBJECT(toggle_renderer), "toggled", G_CALLBACK(on_account_default_toggled),
                          self);
        
@@ -519,7 +522,7 @@ init_view (ModestAccountView *self)
                                                       "account_inserted",
                                                       G_CALLBACK(on_account_inserted), self);
 
-       priv->acc_inserted_handler = g_signal_connect (G_OBJECT (modest_runtime_get_account_store ()),
+       priv->acc_changed_handler = g_signal_connect (G_OBJECT (modest_runtime_get_account_store ()),
                                                       "account_changed",
                                                       G_CALLBACK(on_account_changed), self);