diff options
author | Pablo Barciela <[email protected]> | 2019-08-17 15:01:07 +0200 |
---|---|---|
committer | Victor Kareh <[email protected]> | 2019-08-20 09:01:31 -0400 |
commit | 62ebc70ace4b477d030b43ead2edb7860f89a4f0 (patch) | |
tree | e44b9dae13a8f44bf48769606c04b8c8443c7857 | |
parent | a7ac3d41abc77a4c7d2afb00f4ee5fd2d580e8e8 (diff) | |
download | mate-settings-daemon-62ebc70ace4b477d030b43ead2edb7860f89a4f0.tar.bz2 mate-settings-daemon-62ebc70ace4b477d030b43ead2edb7860f89a4f0.tar.xz |
msd-ldsm-dialog: avoid 'g_type_class_add_private'
-rw-r--r-- | plugins/housekeeping/msd-ldsm-dialog.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/plugins/housekeeping/msd-ldsm-dialog.c b/plugins/housekeeping/msd-ldsm-dialog.c index 7d85c8c..7e3c1be 100644 --- a/plugins/housekeeping/msd-ldsm-dialog.c +++ b/plugins/housekeeping/msd-ldsm-dialog.c @@ -49,12 +49,10 @@ struct MsdLdsmDialogPrivate gchar *mount_path; }; -#define MSD_LDSM_DIALOG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), MSD_TYPE_LDSM_DIALOG, MsdLdsmDialogPrivate)) - static void msd_ldsm_dialog_class_init (MsdLdsmDialogClass *klass); static void msd_ldsm_dialog_init (MsdLdsmDialog *dialog); -G_DEFINE_TYPE (MsdLdsmDialog, msd_ldsm_dialog, GTK_TYPE_DIALOG); +G_DEFINE_TYPE_WITH_PRIVATE (MsdLdsmDialog, msd_ldsm_dialog, GTK_TYPE_DIALOG); static const gchar* msd_ldsm_dialog_get_checkbutton_text (MsdLdsmDialog *dialog) @@ -198,7 +196,7 @@ msd_ldsm_dialog_init (MsdLdsmDialog *dialog) GtkWidget *main_vbox, *text_vbox, *hbox; GtkWidget *image; - dialog->priv = MSD_LDSM_DIALOG_GET_PRIVATE (dialog); + dialog->priv = msd_ldsm_dialog_get_instance_private (dialog); main_vbox = gtk_dialog_get_content_area (GTK_DIALOG (dialog)); @@ -409,8 +407,6 @@ msd_ldsm_dialog_class_init (MsdLdsmDialogClass *klass) "Specify the mount path for the partition", "Unknown", G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); - - g_type_class_add_private (klass, sizeof (MsdLdsmDialogPrivate)); } MsdLdsmDialog* |