[uim-commit] r562 - trunk/helper

makeinu at freedesktop.org makeinu at freedesktop.org
Sat Feb 5 18:33:11 PST 2005


Author: makeinu
Date: 2005-02-05 18:33:08 -0800 (Sat, 05 Feb 2005)
New Revision: 562

Modified:
   trunk/helper/pref-gtk-custom-widgets.c
Log:
* helper/pref-gtk-custom-widgets.c:
  - (sync_value_int): Also set sensitivity of label.
  - (sync_value_string): Ditto.
  - (sync_value_choice): Ditto.


Modified: trunk/helper/pref-gtk-custom-widgets.c
===================================================================
--- trunk/helper/pref-gtk-custom-widgets.c	2005-02-06 01:52:24 UTC (rev 561)
+++ trunk/helper/pref-gtk-custom-widgets.c	2005-02-06 02:33:08 UTC (rev 562)
@@ -203,7 +203,7 @@
   custom = uim_custom_get(custom_sym);
   g_return_if_fail(custom && custom->type == UCustom_Int);
 
-  gtk_widget_set_sensitive(GTK_WIDGET(spin), custom->is_active);
+  gtk_widget_set_sensitive(GTK_WIDGET(spin)->parent, custom->is_active);
   if (custom->range->as_int.min != (int) adj->lower ||
       custom->range->as_int.max != (int) adj->upper)
     gtk_spin_button_set_range(spin, custom->range->as_int.min, custom->range->as_int.max);
@@ -326,11 +326,10 @@
 		   (custom->type == UCustom_Str ||
 		    custom->type == UCustom_Pathname));
 
+  gtk_widget_set_sensitive(GTK_WIDGET(entry)->parent, custom->is_active);
   if (custom->type == UCustom_Str) {
-    gtk_widget_set_sensitive(GTK_WIDGET(entry), custom->is_active);
     gtk_entry_set_text(GTK_ENTRY(entry), custom->value->as_str);
   } else if (custom->type == UCustom_Pathname) {
-    gtk_widget_set_sensitive(GTK_WIDGET(entry)->parent, custom->is_active);
     gtk_entry_set_text(GTK_ENTRY(entry), custom->value->as_pathname);
   }
 
@@ -523,7 +522,7 @@
   }
   gtk_combo_box_set_active(GTK_COMBO_BOX(combobox), default_index);
 
-  gtk_widget_set_sensitive(GTK_WIDGET(combobox), custom->is_active);
+  gtk_widget_set_sensitive(GTK_WIDGET(combobox)->parent, custom->is_active);
 
   g_signal_handlers_unblock_by_func(G_OBJECT(combobox),
 				    (gpointer)custom_combo_box_changed, NULL);



More information about the Uim-commit mailing list