diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2013-06-27 20:02:52 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2013-07-09 09:30:02 +0100 |
commit | 0899ef7cc9cf73824901923143f38bb9b6d224a3 (patch) | |
tree | 16207a8837da8a89a6f4a1d1a1c23074fd29aa1d /gtk/gtkwindow.c | |
parent | 365919d5f6da0a8648815ca5cf5805fb88c9be16 (diff) | |
download | gtk+-0899ef7cc9cf73824901923143f38bb9b6d224a3.tar.gz |
gtk: Use new macros for defining private data
https://bugzilla.gnome.org/show_bug.cgi?id=702996
Diffstat (limited to 'gtk/gtkwindow.c')
-rw-r--r-- | gtk/gtkwindow.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index 497dde838c..3d0847c030 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -547,6 +547,7 @@ static void ensure_state_flag_backdrop (GtkWidget *widget); static void unset_titlebar (GtkWindow *window); G_DEFINE_TYPE_WITH_CODE (GtkWindow, gtk_window, GTK_TYPE_BIN, + G_ADD_PRIVATE (GtkWindow) G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE, gtk_window_buildable_interface_init)) @@ -673,8 +674,6 @@ gtk_window_class_init (GtkWindowClass *klass) klass->activate_focus = gtk_window_real_activate_focus; klass->keys_changed = gtk_window_keys_changed; - g_type_class_add_private (gobject_class, sizeof (GtkWindowPrivate)); - /* Construct */ g_object_class_install_property (gobject_class, PROP_TYPE, @@ -1280,9 +1279,7 @@ gtk_window_init (GtkWindow *window) widget = GTK_WIDGET (window); - window->priv = G_TYPE_INSTANCE_GET_PRIVATE (window, - GTK_TYPE_WINDOW, - GtkWindowPrivate); + window->priv = gtk_window_get_instance_private (window); priv = window->priv; gtk_widget_set_has_window (widget, TRUE); @@ -9877,20 +9874,17 @@ gtk_window_has_toplevel_focus (GtkWindow *window) * freed. */ -G_DEFINE_TYPE (GtkWindowGroup, gtk_window_group, G_TYPE_OBJECT) +G_DEFINE_TYPE_WITH_PRIVATE (GtkWindowGroup, gtk_window_group, G_TYPE_OBJECT) static void gtk_window_group_init (GtkWindowGroup *group) { - group->priv = G_TYPE_INSTANCE_GET_PRIVATE (group, - GTK_TYPE_WINDOW_GROUP, - GtkWindowGroupPrivate); + group->priv = gtk_window_group_get_instance_private (group); } static void gtk_window_group_class_init (GtkWindowGroupClass *klass) { - g_type_class_add_private (klass, sizeof (GtkWindowGroupPrivate)); } /** |