Commit 7844a006 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen
Browse files

Convert GtkSocket to g_type_class_add_private.

2005-11-21  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtksocket.c: Convert GtkSocket to g_type_class_add_private.
parent c613c6be
2005-11-21 Matthias Clasen <mclasen@redhat.com>
* gtk/gtksocket.c: Convert GtkSocket to g_type_class_add_private.
* gtk/gtkmenu.c: Convert GtkMenu to g_type_class_add_private.
* gtk/gtk.symbols:
......
2005-11-21 Matthias Clasen <mclasen@redhat.com>
* gtk/gtksocket.c: Convert GtkSocket to g_type_class_add_private.
* gtk/gtkmenu.c: Convert GtkMenu to g_type_class_add_private.
* gtk/gtk.symbols:
......
......@@ -99,24 +99,7 @@ static GtkWidgetClass *parent_class = NULL;
GtkSocketPrivate *
_gtk_socket_get_private (GtkSocket *socket)
{
GtkSocketPrivate *private;
static GQuark private_quark = 0;
if (!private_quark)
private_quark = g_quark_from_static_string ("gtk-socket-private");
private = g_object_get_qdata (G_OBJECT (socket), private_quark);
if (!private)
{
private = g_new0 (GtkSocketPrivate, 1);
private->resize_count = 0;
g_object_set_qdata_full (G_OBJECT (socket), private_quark,
private, (GDestroyNotify) g_free);
}
return private;
return G_TYPE_INSTANCE_GET_PRIVATE (socket, GTK_TYPE_SOCKET, GtkSocketPrivate);
}
GType
......@@ -208,6 +191,8 @@ gtk_socket_class_init (GtkSocketClass *class)
_gtk_boolean_handled_accumulator, NULL,
_gtk_marshal_BOOLEAN__VOID,
G_TYPE_BOOLEAN, 0);
g_type_class_add_private (gobject_class, sizeof (GtkSocketPrivate));
}
static void
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment