summaryrefslogtreecommitdiff
path: root/gtk/gtkappchooseronlinepk.c
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/gtkappchooseronlinepk.c')
-rw-r--r--gtk/gtkappchooseronlinepk.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/gtk/gtkappchooseronlinepk.c b/gtk/gtkappchooseronlinepk.c
index 5b70a5d75c..85722b280d 100644
--- a/gtk/gtkappchooseronlinepk.c
+++ b/gtk/gtkappchooseronlinepk.c
@@ -34,8 +34,18 @@
static void app_chooser_online_iface_init (GtkAppChooserOnlineInterface *iface);
static void app_chooser_online_pk_async_initable_init (GAsyncInitableIface *iface);
+struct _GtkAppChooserOnlinePkPrivate {
+ GSimpleAsyncResult *init_result;
+ guint watch_id;
+
+ GDBusProxy *proxy;
+ GSimpleAsyncResult *result;
+ GtkWindow *parent;
+};
+
G_DEFINE_TYPE_WITH_CODE (GtkAppChooserOnlinePk, gtk_app_chooser_online_pk,
G_TYPE_OBJECT,
+ G_ADD_PRIVATE (GtkAppChooserOnlinePk)
G_IMPLEMENT_INTERFACE (G_TYPE_ASYNC_INITABLE,
app_chooser_online_pk_async_initable_init)
G_IMPLEMENT_INTERFACE (GTK_TYPE_APP_CHOOSER_ONLINE,
@@ -44,15 +54,6 @@ G_DEFINE_TYPE_WITH_CODE (GtkAppChooserOnlinePk, gtk_app_chooser_online_pk,
g_define_type_id,
"packagekit", 10));
-struct _GtkAppChooserOnlinePkPrivate {
- GSimpleAsyncResult *init_result;
- guint watch_id;
-
- GDBusProxy *proxy;
- GSimpleAsyncResult *result;
- GtkWindow *parent;
-};
-
static void
gtk_app_chooser_online_pk_dispose (GObject *obj)
{
@@ -70,15 +71,12 @@ gtk_app_chooser_online_pk_class_init (GtkAppChooserOnlinePkClass *klass)
GObjectClass *oclass = G_OBJECT_CLASS (klass);
oclass->dispose = gtk_app_chooser_online_pk_dispose;
-
- g_type_class_add_private (klass, sizeof (GtkAppChooserOnlinePkPrivate));
}
static void
gtk_app_chooser_online_pk_init (GtkAppChooserOnlinePk *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GTK_TYPE_APP_CHOOSER_ONLINE_PK,
- GtkAppChooserOnlinePkPrivate);
+ self->priv = gtk_app_chooser_online_pk_get_instance_private (self);
}
static gboolean