summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-07-08 02:14:54 +0200
committerZenWalker <[email protected]>2019-07-13 00:53:54 +0200
commit0ef5cb38c1962372d4caebe62a2fd442351fe318 (patch)
tree4be8bb6a973adf6710aad453d3d087405ec39338
parent27a9d409a74dbec138930a44760be8d5360b6ae2 (diff)
downloadpluma-0ef5cb38c1962372d4caebe62a2fd442351fe318.tar.bz2
pluma-0ef5cb38c1962372d4caebe62a2fd442351fe318.tar.xz
pluma-close-confirmation-dialog: avoid 'g_type_class_add_private'
-rw-r--r--pluma/dialogs/pluma-close-confirmation-dialog.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/pluma/dialogs/pluma-close-confirmation-dialog.c b/pluma/dialogs/pluma-close-confirmation-dialog.c
index 8c48c631..8f1fbdd4 100644
--- a/pluma/dialogs/pluma-close-confirmation-dialog.c
+++ b/pluma/dialogs/pluma-close-confirmation-dialog.c
@@ -77,15 +77,11 @@ struct _PlumaCloseConfirmationDialogPrivate
gboolean disable_save_to_disk;
};
-#define PLUMA_CLOSE_CONFIRMATION_DIALOG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), \
- PLUMA_TYPE_CLOSE_CONFIRMATION_DIALOG, \
- PlumaCloseConfirmationDialogPrivate))
-
#define GET_MODE(priv) (((priv->unsaved_documents != NULL) && \
(priv->unsaved_documents->next == NULL)) ? \
SINGLE_DOC_MODE : MULTIPLE_DOCS_MODE)
-G_DEFINE_TYPE(PlumaCloseConfirmationDialog, pluma_close_confirmation_dialog, GTK_TYPE_DIALOG)
+G_DEFINE_TYPE_WITH_PRIVATE (PlumaCloseConfirmationDialog, pluma_close_confirmation_dialog, GTK_TYPE_DIALOG)
static void set_unsaved_document (PlumaCloseConfirmationDialog *dlg,
const GList *list);
@@ -198,7 +194,7 @@ pluma_close_confirmation_dialog_init (PlumaCloseConfirmationDialog *dlg)
{
AtkObject *atk_obj;
- dlg->priv = PLUMA_CLOSE_CONFIRMATION_DIALOG_GET_PRIVATE (dlg);
+ dlg->priv = pluma_close_confirmation_dialog_get_instance_private (dlg);
dlg->priv->disable_save_to_disk =
pluma_app_get_lockdown (pluma_app_get_default ())
@@ -303,8 +299,6 @@ pluma_close_confirmation_dialog_class_init (PlumaCloseConfirmationDialogClass *k
gobject_class->get_property = pluma_close_confirmation_dialog_get_property;
gobject_class->finalize = pluma_close_confirmation_dialog_finalize;
- g_type_class_add_private (klass, sizeof (PlumaCloseConfirmationDialogPrivate));
-
g_object_class_install_property (gobject_class,
PROP_UNSAVED_DOCUMENTS,
g_param_spec_pointer ("unsaved_documents",