deprecate gtk_type_class().
2008-06-18 Michael Natterer <mitch@imendio.com> * gtk/gtktypeutils.[ch]: deprecate gtk_type_class(). * gtk/gtk.symbols: changed accordingly. * gtk/gtksettings.c (gtk_settings_install_property) (gtk_settings_install_property_parser): get rid of using gtk_type_class() by keeping a static reference to GtkSettingsClass around in both functions and passing that pointer on to settings_install_property_parser(). * tests/testgtk.c: use g_type_class_ref()/unref() instead of gtk_type_class(). * gtk/gtkobject.c: #undef GTK_DISABLE_DEPRECATED around including gtktypeutils.h. svn path=/trunk/; revision=20444
This commit is contained in:
committed by
Michael Natterer
parent
78c88e77d6
commit
73800758fd
@ -6077,7 +6077,7 @@ set_cursor (GtkWidget *spinner,
|
||||
|
||||
label = g_object_get_data (G_OBJECT (spinner), "user_data");
|
||||
|
||||
class = gtk_type_class (GDK_TYPE_CURSOR_TYPE);
|
||||
class = g_type_class_ref (GDK_TYPE_CURSOR_TYPE);
|
||||
vals = class->values;
|
||||
|
||||
while (vals && vals->value != c)
|
||||
@ -6087,6 +6087,8 @@ set_cursor (GtkWidget *spinner,
|
||||
else
|
||||
gtk_label_set_text (GTK_LABEL (label), "<unknown>");
|
||||
|
||||
g_type_class_unref (class);
|
||||
|
||||
cursor = gdk_cursor_new_for_display (gtk_widget_get_display (widget), c);
|
||||
gdk_window_set_cursor (widget->window, cursor);
|
||||
gdk_cursor_unref (cursor);
|
||||
@ -13941,7 +13943,7 @@ main (int argc, char *argv[])
|
||||
|
||||
/* bindings test
|
||||
*/
|
||||
binding_set = gtk_binding_set_by_class (gtk_type_class (GTK_TYPE_WIDGET));
|
||||
binding_set = gtk_binding_set_by_class (g_type_class_ref (GTK_TYPE_WIDGET));
|
||||
gtk_binding_entry_add_signal (binding_set,
|
||||
'9', GDK_CONTROL_MASK | GDK_RELEASE_MASK,
|
||||
"debug_msg",
|
||||
|
||||
Reference in New Issue
Block a user