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:
Emmanuele Bassi
2013-06-11 00:29:58 +01:00
parent aba80eea6c
commit 32747def4b
76 changed files with 387 additions and 730 deletions

View File

@@ -788,14 +788,14 @@ enum {
LAST_SIGNAL
};
guint signals[LAST_SIGNAL] = { 0 };
G_DEFINE_TYPE (GAppLaunchContext, g_app_launch_context, G_TYPE_OBJECT);
struct _GAppLaunchContextPrivate {
char **envp;
};
static guint signals[LAST_SIGNAL] = { 0 };
G_DEFINE_TYPE_WITH_PRIVATE (GAppLaunchContext, g_app_launch_context, G_TYPE_OBJECT)
/**
* g_app_launch_context_new:
*
@@ -825,8 +825,6 @@ g_app_launch_context_class_init (GAppLaunchContextClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
g_type_class_add_private (klass, sizeof (GAppLaunchContextPrivate));
object_class->finalize = g_app_launch_context_finalize;
/*
@@ -873,7 +871,7 @@ g_app_launch_context_class_init (GAppLaunchContextClass *klass)
static void
g_app_launch_context_init (GAppLaunchContext *context)
{
context->priv = G_TYPE_INSTANCE_GET_PRIVATE (context, G_TYPE_APP_LAUNCH_CONTEXT, GAppLaunchContextPrivate);
context->priv = g_app_launch_context_get_private (context);
}
/**