* Do not try to select accounts in Fremantle
authorSergio Villar Senin <svillar@igalia.com>
Mon, 9 Feb 2009 12:50:54 +0000 (12:50 +0000)
committerSergio Villar Senin <svillar@igalia.com>
Mon, 9 Feb 2009 12:50:54 +0000 (12:50 +0000)
pmo-trunk-r7426

src/widgets/modest-account-view.c

index b40ef63..b4e4765 100644 (file)
@@ -63,7 +63,9 @@ static void on_display_name_changed            (ModestAccountMgr *self,
                                                const gchar *account,
                                                gpointer user_data);
 
                                                const gchar *account,
                                                gpointer user_data);
 
+#ifndef MODEST_TOOLKIT_HILDON2
 static void modest_account_view_select_first_account (ModestAccountView *account_view);
 static void modest_account_view_select_first_account (ModestAccountView *account_view);
+#endif
 
 static void on_account_updated (ModestAccountMgr* mgr, gchar* account_name,
                     gpointer user_data);
 
 static void on_account_updated (ModestAccountMgr* mgr, gchar* account_name,
                     gpointer user_data);
@@ -320,7 +322,9 @@ update_account_view (ModestAccountMgr *account_mgr, ModestAccountView *view)
                modest_account_view_select_account (view, selected_name);
                g_free (selected_name);
        } else {
                modest_account_view_select_account (view, selected_name);
                g_free (selected_name);
        } else {
+#ifndef MODEST_TOOLKIT_HILDON2
                modest_account_view_select_first_account (view);
                modest_account_view_select_first_account (view);
+#endif
        }
 }
 
        }
 }
 
@@ -415,8 +419,10 @@ on_account_removed (TnyAccountStore *account_store,
        
        selected_name = modest_account_view_get_selected_account (self);
        if (selected_name == NULL) {
        
        selected_name = modest_account_view_get_selected_account (self);
        if (selected_name == NULL) {
+#ifndef MODEST_TOOLKIT_HILDON2
                /* we select the first account if none is selected */
                /* we select the first account if none is selected */
-               modest_account_view_select_first_account (self);                
+               modest_account_view_select_first_account (self);
+#endif
        } else {
                g_free (selected_name);
        }
        } else {
                g_free (selected_name);
        }
@@ -799,6 +805,7 @@ modest_account_view_select_account (ModestAccountView *account_view,
        g_free (state);
 }
 
        g_free (state);
 }
 
+#ifndef MODEST_TOOLKIT_HILDON2
 static void
 modest_account_view_select_first_account (ModestAccountView *account_view)
 {
 static void
 modest_account_view_select_first_account (ModestAccountView *account_view)
 {
@@ -807,10 +814,11 @@ modest_account_view_select_first_account (ModestAccountView *account_view)
 
        if (gtk_tree_model_get_iter_first (model, &iter)) {
                GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (account_view));
 
        if (gtk_tree_model_get_iter_first (model, &iter)) {
                GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (account_view));
-       
+
                gtk_tree_selection_select_iter (selection, &iter);
        }
 }
                gtk_tree_selection_select_iter (selection, &iter);
        }
 }
+#endif
 
 static void
 on_default_account_changed (ModestAccountMgr *mgr,
 
 static void
 on_default_account_changed (ModestAccountMgr *mgr,