[gnac/devel] Replaced gtk_list_store_append/set with gtk_list_store_insert_with_values



commit 30abfe6a24dcee45b449818f03455c3246fcaa51
Author: Benoît Dupasquier <bdupasqu src gnome org>
Date:   Thu Mar 7 00:33:07 2013 +0100

    Replaced gtk_list_store_append/set with gtk_list_store_insert_with_values

 src/profiles/gnac-profiles-manager.c    |    3 +--
 src/profiles/gnac-profiles-properties.c |    3 +--
 src/profiles/gnac-profiles.c            |    4 ++--
 3 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/src/profiles/gnac-profiles-manager.c b/src/profiles/gnac-profiles-manager.c
index 4c8d425..6d03a7e 100644
--- a/src/profiles/gnac-profiles-manager.c
+++ b/src/profiles/gnac-profiles-manager.c
@@ -597,8 +597,7 @@ gnac_profiles_mgr_insert(gpointer profile)
       generic->name, MAX_NAME_DISPLAY_SIZE);
   GtkTreeIter iter;
 
-  gtk_list_store_append(model, &iter);
-  gtk_list_store_set(model, &iter,
+  gtk_list_store_insert_with_values(model, &iter, -1,
       COL_NAME, formatted_name,
       COL_FORMAT, generic->format_name,
       COL_EXTENSION, generic->extension,
diff --git a/src/profiles/gnac-profiles-properties.c b/src/profiles/gnac-profiles-properties.c
index 6ba37d5..d66332d 100644
--- a/src/profiles/gnac-profiles-properties.c
+++ b/src/profiles/gnac-profiles-properties.c
@@ -164,13 +164,12 @@ gnac_profiles_properties_init_format(void)
     gchar *format_name = format_module->funcs.get_combo_format_name();
 
     g_hash_table_insert(formats, (gpointer) format_id, format_module);
-    gtk_list_store_append(model, &iter);
 
     // XXX hack to ensure 'Custom Format' is last in the combo
     const gchar *sort_key = gnac_utils_str_equal(format_id, "custom-format") ?
         "ZZZZZZZZZZZZZZZZZZZ" : format_name;
 
-    gtk_list_store_set(model, &iter,
+    gtk_list_store_insert_with_values(model, &iter, -1,
         COL_NAME, format_name,
         COL_MODULE, format_module,
         COL_SORT, sort_key,
diff --git a/src/profiles/gnac-profiles.c b/src/profiles/gnac-profiles.c
index 8f39c41..1c7c0d1 100755
--- a/src/profiles/gnac-profiles.c
+++ b/src/profiles/gnac-profiles.c
@@ -155,8 +155,8 @@ gnac_profiles_populate_combo(void)
     gchar *name = gnac_profiles_utils_get_combo_format_name(formatted_name,
         profile->extension);
     g_free(formatted_name);
-    gtk_list_store_append(model, &iter);
-    gtk_list_store_set(model, &iter, COL_NAME, name, COL_PROFILE, profile, -1);
+    gtk_list_store_insert_with_values(model, &iter, -1,
+        COL_NAME, name, COL_PROFILE, profile, -1);
     g_free(name);
   }
 


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