mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-13 22:10:08 +00:00
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.
This commit is contained in:
parent
c613c6bef7
commit
7844a006f4
@ -1,5 +1,7 @@
|
|||||||
2005-11-21 Matthias Clasen <mclasen@redhat.com>
|
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/gtkmenu.c: Convert GtkMenu to g_type_class_add_private.
|
||||||
|
|
||||||
* gtk/gtk.symbols:
|
* gtk/gtk.symbols:
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
2005-11-21 Matthias Clasen <mclasen@redhat.com>
|
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/gtkmenu.c: Convert GtkMenu to g_type_class_add_private.
|
||||||
|
|
||||||
* gtk/gtk.symbols:
|
* gtk/gtk.symbols:
|
||||||
|
@ -99,24 +99,7 @@ static GtkWidgetClass *parent_class = NULL;
|
|||||||
GtkSocketPrivate *
|
GtkSocketPrivate *
|
||||||
_gtk_socket_get_private (GtkSocket *socket)
|
_gtk_socket_get_private (GtkSocket *socket)
|
||||||
{
|
{
|
||||||
GtkSocketPrivate *private;
|
return G_TYPE_INSTANCE_GET_PRIVATE (socket, GTK_TYPE_SOCKET, GtkSocketPrivate);
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GType
|
GType
|
||||||
@ -208,6 +191,8 @@ gtk_socket_class_init (GtkSocketClass *class)
|
|||||||
_gtk_boolean_handled_accumulator, NULL,
|
_gtk_boolean_handled_accumulator, NULL,
|
||||||
_gtk_marshal_BOOLEAN__VOID,
|
_gtk_marshal_BOOLEAN__VOID,
|
||||||
G_TYPE_BOOLEAN, 0);
|
G_TYPE_BOOLEAN, 0);
|
||||||
|
|
||||||
|
g_type_class_add_private (gobject_class, sizeof (GtkSocketPrivate));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user