mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-05 08:53:39 +02:00
gio: Use the new private instance data declaration
Use the newly added macros, and remove the explicit calls to g_type_class_add_private(). https://bugzilla.gnome.org/show_bug.cgi?id=700035
This commit is contained in:
@@ -706,8 +706,6 @@ g_menu_model_items_changed (GMenuModel *model,
|
||||
g_signal_emit (model, g_menu_model_items_changed_signal, 0, position, removed, added);
|
||||
}
|
||||
|
||||
G_DEFINE_ABSTRACT_TYPE (GMenuAttributeIter, g_menu_attribute_iter, G_TYPE_OBJECT)
|
||||
|
||||
struct _GMenuAttributeIterPrivate
|
||||
{
|
||||
GQuark name;
|
||||
@@ -715,6 +713,8 @@ struct _GMenuAttributeIterPrivate
|
||||
gboolean valid;
|
||||
};
|
||||
|
||||
G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (GMenuAttributeIter, g_menu_attribute_iter, G_TYPE_OBJECT)
|
||||
|
||||
/**
|
||||
* g_menu_attribute_iter_get_next:
|
||||
* @iter: a #GMenuAttributeIter
|
||||
@@ -851,7 +851,7 @@ g_menu_attribute_iter_finalize (GObject *object)
|
||||
static void
|
||||
g_menu_attribute_iter_init (GMenuAttributeIter *iter)
|
||||
{
|
||||
iter->priv = G_TYPE_INSTANCE_GET_PRIVATE (iter, G_TYPE_MENU_ATTRIBUTE_ITER, GMenuAttributeIterPrivate);
|
||||
iter->priv = g_menu_attribute_iter_get_private (iter);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -860,12 +860,8 @@ g_menu_attribute_iter_class_init (GMenuAttributeIterClass *class)
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (class);
|
||||
|
||||
object_class->finalize = g_menu_attribute_iter_finalize;
|
||||
|
||||
g_type_class_add_private (class, sizeof (GMenuAttributeIterPrivate));
|
||||
}
|
||||
|
||||
G_DEFINE_ABSTRACT_TYPE (GMenuLinkIter, g_menu_link_iter, G_TYPE_OBJECT)
|
||||
|
||||
struct _GMenuLinkIterPrivate
|
||||
{
|
||||
GQuark name;
|
||||
@@ -873,6 +869,8 @@ struct _GMenuLinkIterPrivate
|
||||
gboolean valid;
|
||||
};
|
||||
|
||||
G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (GMenuLinkIter, g_menu_link_iter, G_TYPE_OBJECT)
|
||||
|
||||
/**
|
||||
* g_menu_link_iter_get_next:
|
||||
* @iter: a #GMenuLinkIter
|
||||
@@ -1007,7 +1005,7 @@ g_menu_link_iter_finalize (GObject *object)
|
||||
static void
|
||||
g_menu_link_iter_init (GMenuLinkIter *iter)
|
||||
{
|
||||
iter->priv = G_TYPE_INSTANCE_GET_PRIVATE (iter, G_TYPE_MENU_LINK_ITER, GMenuLinkIterPrivate);
|
||||
iter->priv = g_menu_link_iter_get_private (iter);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1016,6 +1014,4 @@ g_menu_link_iter_class_init (GMenuLinkIterClass *class)
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (class);
|
||||
|
||||
object_class->finalize = g_menu_link_iter_finalize;
|
||||
|
||||
g_type_class_add_private (class, sizeof (GMenuLinkIterPrivate));
|
||||
}
|
||||
|
Reference in New Issue
Block a user