summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-07-30 18:00:51 +0200
committerlukefromdc <[email protected]>2019-08-01 19:43:29 +0000
commit37ca9afc991ff2abbf2b29d02163bcfd36a7c4dc (patch)
treeba99684ad62127861dccd10c3a4d2c3bbbfb028e
parentd8dda3b297c5885f3640a9294fcb8a4cbb33aa0a (diff)
downloadpluma-37ca9afc991ff2abbf2b29d02163bcfd36a7c4dc.tar.bz2
pluma-37ca9afc991ff2abbf2b29d02163bcfd36a7c4dc.tar.xz
pluma-file-bookmarks-store: avoid 'g_type_class_add_private'
-rw-r--r--plugins/filebrowser/pluma-file-bookmarks-store.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/plugins/filebrowser/pluma-file-bookmarks-store.c b/plugins/filebrowser/pluma-file-bookmarks-store.c
index 1a8ce12c..4493742c 100644
--- a/plugins/filebrowser/pluma-file-bookmarks-store.c
+++ b/plugins/filebrowser/pluma-file-bookmarks-store.c
@@ -27,10 +27,6 @@
#include "pluma-file-bookmarks-store.h"
#include "pluma-file-browser-utils.h"
-#define PLUMA_FILE_BOOKMARKS_STORE_GET_PRIVATE(object)( \
- G_TYPE_INSTANCE_GET_PRIVATE((object), PLUMA_TYPE_FILE_BOOKMARKS_STORE, \
- PlumaFileBookmarksStorePrivate))
-
struct _PlumaFileBookmarksStorePrivate
{
GVolumeMonitor * volume_monitor;
@@ -55,7 +51,11 @@ static gboolean find_with_flags (GtkTreeModel * model,
guint flags,
guint notflags);
-G_DEFINE_DYNAMIC_TYPE (PlumaFileBookmarksStore, pluma_file_bookmarks_store, GTK_TYPE_TREE_STORE)
+G_DEFINE_DYNAMIC_TYPE_EXTENDED (PlumaFileBookmarksStore,
+ pluma_file_bookmarks_store,
+ GTK_TYPE_TREE_STORE,
+ 0,
+ G_ADD_PRIVATE_DYNAMIC (PlumaFileBookmarksStore))
static void
pluma_file_bookmarks_store_dispose (GObject * object)
@@ -92,20 +92,18 @@ pluma_file_bookmarks_store_class_init (PlumaFileBookmarksStoreClass *klass)
object_class->dispose = pluma_file_bookmarks_store_dispose;
object_class->finalize = pluma_file_bookmarks_store_finalize;
-
- g_type_class_add_private (object_class, sizeof (PlumaFileBookmarksStorePrivate));
}
static void
pluma_file_bookmarks_store_class_finalize (PlumaFileBookmarksStoreClass *klass)
{
- /* dummy function - used by G_DEFINE_DYNAMIC_TYPE */
+ /* dummy function - used by G_DEFINE_DYNAMIC_TYPE_EXTENDED */
}
static void
pluma_file_bookmarks_store_init (PlumaFileBookmarksStore * obj)
{
- obj->priv = PLUMA_FILE_BOOKMARKS_STORE_GET_PRIVATE (obj);
+ obj->priv = pluma_file_bookmarks_store_get_instance_private (obj);
}
/* Private */