diff options
author | Matthias Clasen <matthiasc@src.gnome.org> | 2005-11-28 14:23:17 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2005-11-28 14:23:17 +0000 |
commit | d9cc3ecab6f5564aa4745eddf2ca7fc9e4055ebd (patch) | |
tree | 0331c5627bfc0b62b3890958fe5643f8c26d5e4e /gtk/gtkinputdialog.c | |
parent | 6be42231b834b00297e490d7ca3b04cb0e266902 (diff) | |
download | gtk+-d9cc3ecab6f5564aa4745eddf2ca7fc9e4055ebd.tar.gz |
Forgotten file
Diffstat (limited to 'gtk/gtkinputdialog.c')
-rw-r--r-- | gtk/gtkinputdialog.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/gtk/gtkinputdialog.c b/gtk/gtkinputdialog.c index 447a0798a3..98c668d291 100644 --- a/gtk/gtkinputdialog.c +++ b/gtk/gtkinputdialog.c @@ -153,22 +153,9 @@ gtk_input_dialog_get_type (void) static GtkInputDialogPrivate * gtk_input_dialog_get_private (GtkInputDialog *input_dialog) { - GtkInputDialogPrivate *private; - static GQuark private_quark = 0; - - if (!private_quark) - private_quark = g_quark_from_static_string ("gtk-input-dialog-private"); - - private = g_object_get_qdata (G_OBJECT (input_dialog), private_quark); - - if (!private) - { - private = g_new0 (GtkInputDialogPrivate, 1); - g_object_set_qdata_full (G_OBJECT (input_dialog), private_quark, - private, g_free); - } - - return private; + return G_TYPE_INSTANCE_GET_PRIVATE (input_dialog, + GTK_TYPE_INPUT_DIALOG, + GtkInputDialogPrivate); } static GtkInputDialog * @@ -189,6 +176,7 @@ input_dialog_from_widget (GtkWidget *widget) static void gtk_input_dialog_class_init (GtkInputDialogClass *klass) { + GObjectClass *object_class = (GObjectClass *) klass; GtkWidgetClass *widget_class = (GtkWidgetClass *)klass; parent_class = g_type_class_peek_parent (klass); @@ -217,6 +205,8 @@ gtk_input_dialog_class_init (GtkInputDialogClass *klass) _gtk_marshal_VOID__OBJECT, G_TYPE_NONE, 1, GDK_TYPE_DEVICE); + + g_type_class_add_private (object_class, sizeof (GtkInputDialogPrivate)); } static void |