[uim-commit] r426 - trunk/helper

kzk at freedesktop.org kzk at freedesktop.org
Mon Jan 31 06:57:31 PST 2005


Author: kzk
Date: 2005-01-31 06:57:28 -0800 (Mon, 31 Jan 2005)
New Revision: 426

Modified:
   trunk/helper/pref-gtk.c
Log:
* helper/pref-gtk.c
  - (update_custom_type_choice_cb): clear the contents of combobox
    by calling gtk_list_store_clear.


Modified: trunk/helper/pref-gtk.c
===================================================================
--- trunk/helper/pref-gtk.c	2005-01-31 14:48:24 UTC (rev 425)
+++ trunk/helper/pref-gtk.c	2005-01-31 14:57:28 UTC (rev 426)
@@ -613,20 +613,18 @@
 			 OBJECT_DATA_UIM_CUSTOM, custom,
 			 (GDestroyNotify) uim_custom_free);
   gtk_widget_set_sensitive(combobox, custom->is_active);
-#if 0
-  item = custom->range->as_choice.valid_items;
 
+  item = custom->range->as_choice.valid_items;
   if(item == NULL || *item == NULL)
     return;
   
   g_signal_handlers_disconnect_by_func(G_OBJECT(combobox), (gpointer)custom_combo_box_changed, NULL);
 
-  gtk_cell_layout_clear(GTK_CELL_LAYOUT(combobox));
+  gtk_list_store_clear(GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(combobox))));
   
   default_symbol = custom->value->as_choice->symbol;
-  
+
   while(*item) {
-    fprintf(stderr, "item = %s\n", (*item)->symbol);
     gtk_combo_box_append_text(GTK_COMBO_BOX(combobox), (*item)->label);
     if(!strcmp(default_symbol, (*item)->symbol))
       default_index = i;    
@@ -636,7 +634,6 @@
   gtk_combo_box_set_active(GTK_COMBO_BOX(combobox), default_index);
   g_signal_connect(G_OBJECT(combobox), "changed",
 		   G_CALLBACK(custom_combo_box_changed), NULL);
-#endif
 }
 
 static void



More information about the Uim-commit mailing list