[gnome-initial-setup] accounts: Small cleanup



commit 5b8e48d097e68d90f99a614032dabc079fba67db
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Jun 11 19:21:48 2012 -0400

    accounts: Small cleanup
    
    Don't set the name to the same thing it was before. Just don't
    set anything.

 gnome-initial-setup/gis-account-page.c |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)
---
diff --git a/gnome-initial-setup/gis-account-page.c b/gnome-initial-setup/gis-account-page.c
index ce5da25..26fdb82 100644
--- a/gnome-initial-setup/gis-account-page.c
+++ b/gnome-initial-setup/gis-account-page.c
@@ -287,7 +287,6 @@ set_account_model_row (SetupData *setup, gint row, gboolean active, const gchar
 {
         GtkTreeModel *model;
         GtkTreeIter iter;
-        gchar *n = NULL;
 
         model = gtk_tree_view_get_model (GTK_TREE_VIEW (WID("account-list")));
 
@@ -295,17 +294,15 @@ set_account_model_row (SetupData *setup, gint row, gboolean active, const gchar
         if (row == PANEL_ACCOUNT_ROW_REMOTE)
                 gtk_tree_model_iter_next (model, &iter);
 
-        if (name == NULL) {
-                gtk_tree_model_get (model, &iter, PANEL_ACCOUNT_COLUMN_NAME, &n, -1);
-                name = (const gchar *)n;
-        }
-
         gtk_list_store_set (GTK_LIST_STORE (model), &iter,
                             PANEL_ACCOUNT_COLUMN_ACTIVE, active,
-                            PANEL_ACCOUNT_COLUMN_NAME, name,
                             -1);
 
-        g_free (n);
+        if (name != NULL) {
+            gtk_list_store_set (GTK_LIST_STORE (model), &iter,
+                                PANEL_ACCOUNT_COLUMN_NAME, name,
+                                -1);
+        }
 }
 
 static void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]