summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-07-17 19:47:16 +0200
committerZenWalker <[email protected]>2019-07-21 12:31:29 +0200
commitb2f212e7c63b934312763c9c64dd3aefc76ce92c (patch)
treebdec456e66866b4bc724dea5f2362176282fb75a
parentb78a68f4d0e8510dd9b885ec491055d41f14b5ad (diff)
downloadpluma-b2f212e7c63b934312763c9c64dd3aefc76ce92c.tar.bz2
pluma-b2f212e7c63b934312763c9c64dd3aefc76ce92c.tar.xz
pluma-file-chooser-dialog: avoid 'g_type_class_add_private'
-rw-r--r--pluma/pluma-file-chooser-dialog.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/pluma/pluma-file-chooser-dialog.c b/pluma/pluma-file-chooser-dialog.c
index 2b50100e..b51e48c2 100644
--- a/pluma/pluma-file-chooser-dialog.c
+++ b/pluma/pluma-file-chooser-dialog.c
@@ -49,8 +49,6 @@
#include "pluma-enum-types.h"
#include "pluma-utils.h"
-#define PLUMA_FILE_CHOOSER_DIALOG_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), PLUMA_TYPE_FILE_CHOOSER_DIALOG, PlumaFileChooserDialogPrivate))
-
#define ALL_FILES _("All Files")
#define ALL_TEXT_FILES _("All Text Files")
@@ -64,14 +62,11 @@ struct _PlumaFileChooserDialogPrivate
GtkListStore *newline_store;
};
-G_DEFINE_TYPE(PlumaFileChooserDialog, pluma_file_chooser_dialog, GTK_TYPE_FILE_CHOOSER_DIALOG)
+G_DEFINE_TYPE_WITH_PRIVATE (PlumaFileChooserDialog, pluma_file_chooser_dialog, GTK_TYPE_FILE_CHOOSER_DIALOG)
static void
pluma_file_chooser_dialog_class_init (PlumaFileChooserDialogClass *klass)
{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
- g_type_class_add_private (object_class, sizeof(PlumaFileChooserDialogPrivate));
}
static void
@@ -354,7 +349,7 @@ all_text_files_filter (const GtkFileFilterInfo *filter_info,
static void
pluma_file_chooser_dialog_init (PlumaFileChooserDialog *dialog)
{
- dialog->priv = PLUMA_FILE_CHOOSER_DIALOG_GET_PRIVATE (dialog);
+ dialog->priv = pluma_file_chooser_dialog_get_instance_private (dialog);
}
static GtkWidget *