diff options
author | Pablo Barciela <[email protected]> | 2019-07-31 15:39:30 +0200 |
---|---|---|
committer | lukefromdc <[email protected]> | 2019-08-07 22:03:10 +0000 |
commit | 1ce1b2a54d33ac12276222239916abff26d48cae (patch) | |
tree | 83979b7d32b37419d2d2b22501dce4b49d17ad19 /plugins | |
parent | 1bafd3ae74b9107e11b7b098d73996669d1c0f6e (diff) | |
download | pluma-1ce1b2a54d33ac12276222239916abff26d48cae.tar.bz2 pluma-1ce1b2a54d33ac12276222239916abff26d48cae.tar.xz |
pluma-file-browser-store: avoid 'g_type_class_add_private'
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/filebrowser/pluma-file-browser-store.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/plugins/filebrowser/pluma-file-browser-store.c b/plugins/filebrowser/pluma-file-browser-store.c index 6a3feafc..03fd1fd2 100644 --- a/plugins/filebrowser/pluma-file-browser-store.c +++ b/plugins/filebrowser/pluma-file-browser-store.c @@ -33,10 +33,6 @@ #include "pluma-file-browser-error.h" #include "pluma-file-browser-utils.h" -#define PLUMA_FILE_BROWSER_STORE_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE((object), \ - PLUMA_TYPE_FILE_BROWSER_STORE, \ - PlumaFileBrowserStorePrivate)) - #define NODE_IS_DIR(node) (FILE_IS_DIR((node)->flags)) #define NODE_IS_HIDDEN(node) (FILE_IS_HIDDEN((node)->flags)) #define NODE_IS_TEXT(node) (FILE_IS_TEXT((node)->flags)) @@ -197,12 +193,13 @@ static void next_files_async (GFileEnumerator * enumerator, static void delete_files (AsyncData *data); G_DEFINE_DYNAMIC_TYPE_EXTENDED (PlumaFileBrowserStore, pluma_file_browser_store, - G_TYPE_OBJECT, - 0, - G_IMPLEMENT_INTERFACE_DYNAMIC (GTK_TYPE_TREE_MODEL, - pluma_file_browser_store_iface_init) - G_IMPLEMENT_INTERFACE_DYNAMIC (GTK_TYPE_TREE_DRAG_SOURCE, - pluma_file_browser_store_drag_source_init)) + G_TYPE_OBJECT, + 0, + G_ADD_PRIVATE_DYNAMIC (PlumaFileBrowserStore) + G_IMPLEMENT_INTERFACE_DYNAMIC (GTK_TYPE_TREE_MODEL, + pluma_file_browser_store_iface_init) + G_IMPLEMENT_INTERFACE_DYNAMIC (GTK_TYPE_TREE_DRAG_SOURCE, + pluma_file_browser_store_drag_source_init)) /* Properties */ enum { @@ -420,9 +417,6 @@ pluma_file_browser_store_class_init (PlumaFileBrowserStoreClass * klass) g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING); - - g_type_class_add_private (object_class, - sizeof (PlumaFileBrowserStorePrivate)); } static void @@ -460,7 +454,7 @@ pluma_file_browser_store_drag_source_init (GtkTreeDragSourceIface * iface) static void pluma_file_browser_store_init (PlumaFileBrowserStore * obj) { - obj->priv = PLUMA_FILE_BROWSER_STORE_GET_PRIVATE (obj); + obj->priv = pluma_file_browser_store_get_instance_private (obj); obj->priv->column_types[PLUMA_FILE_BROWSER_STORE_COLUMN_URI] = G_TYPE_STRING; |