summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Natterer <mitch@imendio.com>2008-06-18 07:00:46 +0000
committerMichael Natterer <mitch@src.gnome.org>2008-06-18 07:00:46 +0000
commit73800758fd3914e182da139e58364d36d9bf7ed4 (patch)
tree56003a626f422176513e9e57f2aa971c1f03033d /tests
parent78c88e77d6c284e063e8a9ee7ea7c974b14f05dd (diff)
downloadgtk+-73800758fd3914e182da139e58364d36d9bf7ed4.tar.gz
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
Diffstat (limited to 'tests')
-rw-r--r--tests/testgtk.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/testgtk.c b/tests/testgtk.c
index ae0700b006..9fab6f4fbf 100644
--- a/tests/testgtk.c
+++ b/tests/testgtk.c
@@ -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",