Revision: 6772
Author: nogu.dev
Date: Sat Sep 11 17:42:56 2010
Log: * helper/pref-gtk-custom-widgets.c
- (sync_value_int, sync_value_string, sync_value_choice,
sync_value_olist, sync_value_key):
Use gtk_widget_get_parent() for GTK+3.
http://code.google.com/p/uim/source/detail?r=6772
Modified:
/trunk/helper/pref-gtk-custom-widgets.c
=======================================
--- /trunk/helper/pref-gtk-custom-widgets.c Sat Sep 11 17:41:08 2010
+++ /trunk/helper/pref-gtk-custom-widgets.c Sat Sep 11 17:42:56 2010
@@ -259,7 +259,8 @@
custom = uim_custom_get(custom_sym);
g_return_if_fail(custom && custom->type == UCustom_Int);
- gtk_widget_set_sensitive(GTK_WIDGET(spin)->parent, custom->is_active);
+ gtk_widget_set_sensitive(gtk_widget_get_parent(GTK_WIDGET(spin)),
+ 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);
@@ -382,7 +383,8 @@
(custom->type == UCustom_Str ||
custom->type == UCustom_Pathname));
- gtk_widget_set_sensitive(GTK_WIDGET(entry)->parent, custom->is_active);
+ gtk_widget_set_sensitive(gtk_widget_get_parent(GTK_WIDGET(entry)),
+ custom->is_active);
if (custom->type == UCustom_Str) {
gtk_entry_set_text(GTK_ENTRY(entry), custom->value->as_str);
} else if (custom->type == UCustom_Pathname) {
@@ -608,7 +610,8 @@
}
gtk_combo_box_set_active(GTK_COMBO_BOX(combobox), default_index);
- gtk_widget_set_sensitive(GTK_WIDGET(combobox)->parent,
custom->is_active);
+ gtk_widget_set_sensitive(gtk_widget_get_parent(GTK_WIDGET(combobox)),
+ custom->is_active);
g_signal_handlers_unblock_by_func(G_OBJECT(combobox),
(gpointer)(uintptr_t)
custom_combo_box_changed, NULL);
@@ -688,7 +691,8 @@
}
gtk_entry_set_text(GTK_ENTRY(entry), str->str);
- gtk_widget_set_sensitive(GTK_WIDGET(entry)->parent, custom->is_active);
+ gtk_widget_set_sensitive(gtk_widget_get_parent(GTK_WIDGET(entry)),
+ custom->is_active);
g_string_free(str, TRUE);
uim_custom_free(custom);
@@ -1562,7 +1566,8 @@
}
gtk_entry_set_text(GTK_ENTRY(entry), str->str);
- gtk_widget_set_sensitive(GTK_WIDGET(entry)->parent, custom->is_active);
+ gtk_widget_set_sensitive(gtk_widget_get_parent(GTK_WIDGET(entry)),
+ custom->is_active);
g_string_free(str, TRUE);
uim_custom_free(custom);