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/gtkmenuitem.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/gtkmenuitem.c')
-rw-r--r-- | gtk/gtkmenuitem.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/gtk/gtkmenuitem.c b/gtk/gtkmenuitem.c index 56afcd6c57..f300bb4b1f 100644 --- a/gtk/gtkmenuitem.c +++ b/gtk/gtkmenuitem.c @@ -215,6 +215,7 @@ static GtkBuildableIface *parent_buildable_iface; G_GNUC_BEGIN_IGNORE_DEPRECATIONS; G_DEFINE_TYPE_WITH_CODE (GtkMenuItem, gtk_menu_item, GTK_TYPE_BIN, + G_ADD_PRIVATE (GtkMenuItem) G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE, gtk_menu_item_buildable_interface_init) G_IMPLEMENT_INTERFACE (GTK_TYPE_ACTIVATABLE, @@ -538,8 +539,6 @@ gtk_menu_item_class_init (GtkMenuItemClass *klass) P_("The minimum desired width of the menu item in characters"), 0, G_MAXINT, 12, GTK_PARAM_READABLE)); - - g_type_class_add_private (klass, sizeof (GtkMenuItemPrivate)); } static void @@ -548,9 +547,7 @@ gtk_menu_item_init (GtkMenuItem *menu_item) GtkStyleContext *context; GtkMenuItemPrivate *priv; - priv = G_TYPE_INSTANCE_GET_PRIVATE (menu_item, - GTK_TYPE_MENU_ITEM, - GtkMenuItemPrivate); + priv = gtk_menu_item_get_instance_private (menu_item); menu_item->priv = priv; gtk_widget_set_has_window (GTK_WIDGET (menu_item), FALSE); |