gnome-terminal r2624 - trunk/src



Author: chpe
Date: Thu May 29 19:39:40 2008
New Revision: 2624
URL: http://svn.gnome.org/viewvc/gnome-terminal?rev=2624&view=rev

Log:
Use gtk_list_store_insert_with_values.


Modified:
   trunk/src/encoding.c

Modified: trunk/src/encoding.c
==============================================================================
--- trunk/src/encoding.c	(original)
+++ trunk/src/encoding.c	Thu May 29 19:39:40 2008
@@ -838,24 +838,20 @@
 update_single_tree_model (GtkListStore *store)
 {
   GSList *tmp;
-  GtkTreeIter parent_iter;
+  GtkTreeIter iter;
 
   gtk_list_store_clear (store);
-  
-  tmp = active_encodings;
-  while (tmp != NULL)
+
+  for (tmp = active_encodings; tmp != NULL; tmp = tmp->next)
     {
       TerminalEncoding *e = tmp->data;
       
-      gtk_list_store_append (store, &parent_iter);
-      gtk_list_store_set (store, &parent_iter,
-                          COLUMN_CHARSET,
-                          e->charset,
-                          COLUMN_NAME,
-                          e->name,
-                          -1);
-
-      tmp = tmp->next;
+      gtk_list_store_insert_with_values (store, &iter, -1,
+                                         COLUMN_CHARSET,
+                                         e->charset,
+                                         COLUMN_NAME,
+                                         e->name,
+                                         -1);
     }
 }
 



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