summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-07-09 00:16:06 +0200
committerZenWalker <[email protected]>2019-07-13 01:06:31 +0200
commit17a15f1bbe6dd39062e3d9d39204b52f5c81889f (patch)
tree610a7363107cc85b888dac4e83e55a5ff40034c4
parent0ef5cb38c1962372d4caebe62a2fd442351fe318 (diff)
downloadpluma-17a15f1bbe6dd39062e3d9d39204b52f5c81889f.tar.bz2
pluma-17a15f1bbe6dd39062e3d9d39204b52f5c81889f.tar.xz
pluma-encodings-dialog: avoid 'g_type_class_add_private'
-rw-r--r--pluma/dialogs/pluma-encodings-dialog.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/pluma/dialogs/pluma-encodings-dialog.c b/pluma/dialogs/pluma-encodings-dialog.c
index 3845a1b2..fe58ad54 100644
--- a/pluma/dialogs/pluma-encodings-dialog.c
+++ b/pluma/dialogs/pluma-encodings-dialog.c
@@ -46,10 +46,6 @@
#include "pluma-help.h"
#include "pluma-dirs.h"
-#define PLUMA_ENCODINGS_DIALOG_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), \
- PLUMA_TYPE_ENCODINGS_DIALOG, \
- PlumaEncodingsDialogPrivate))
-
struct _PlumaEncodingsDialogPrivate
{
GtkListStore *available_liststore;
@@ -62,7 +58,7 @@ struct _PlumaEncodingsDialogPrivate
GSList *show_in_menu_list;
};
-G_DEFINE_TYPE(PlumaEncodingsDialog, pluma_encodings_dialog, GTK_TYPE_DIALOG)
+G_DEFINE_TYPE_WITH_PRIVATE (PlumaEncodingsDialog, pluma_encodings_dialog, GTK_TYPE_DIALOG)
static void
pluma_encodings_dialog_finalize (GObject *object)
@@ -80,8 +76,6 @@ pluma_encodings_dialog_class_init (PlumaEncodingsDialogClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->finalize = pluma_encodings_dialog_finalize;
-
- g_type_class_add_private (object_class, sizeof (PlumaEncodingsDialogPrivate));
}
enum {
@@ -307,7 +301,7 @@ pluma_encodings_dialog_init (PlumaEncodingsDialog *dlg)
NULL
};
- dlg->priv = PLUMA_ENCODINGS_DIALOG_GET_PRIVATE (dlg);
+ dlg->priv = pluma_encodings_dialog_get_instance_private (dlg);
pluma_dialog_add_button (GTK_DIALOG (dlg), _("_Cancel"), "process-stop", GTK_RESPONSE_CANCEL);
pluma_dialog_add_button (GTK_DIALOG (dlg), _("_OK"), "gtk-ok", GTK_RESPONSE_OK);