shell: Use G_DEFINE_TYPE_WITH_PRIVATE() and friends

This commit is contained in:
Florian Müllner
2015-09-24 18:56:13 +02:00
parent ffe4eaf00d
commit e25502aeb2
10 changed files with 33 additions and 58 deletions

View File

@ -33,7 +33,6 @@
* the GPid array to JS).
* See https://bugzilla.gnome.org/show_bug.cgi?id=645978
*/
G_DEFINE_TYPE (ShellMountOperation, shell_mount_operation, G_TYPE_MOUNT_OPERATION);
enum {
SHOW_PROCESSES_2,
@ -48,11 +47,12 @@ struct _ShellMountOperationPrivate {
gchar *message;
};
G_DEFINE_TYPE_WITH_PRIVATE (ShellMountOperation, shell_mount_operation, G_TYPE_MOUNT_OPERATION);
static void
shell_mount_operation_init (ShellMountOperation *self)
{
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, SHELL_TYPE_MOUNT_OPERATION,
ShellMountOperationPrivate);
self->priv = shell_mount_operation_get_instance_private (self);
}
static void
@ -135,8 +135,6 @@ shell_mount_operation_class_init (ShellMountOperationClass *klass)
G_SIGNAL_RUN_LAST,
0, NULL, NULL, NULL,
G_TYPE_NONE, 0);
g_type_class_add_private (klass, sizeof (ShellMountOperationPrivate));
}
GMountOperation *