summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-08-01 22:56:12 +0200
committerlukefromdc <[email protected]>2019-08-05 05:17:07 +0000
commit206008a59a102122e457e7a1c82da83a6bf6f139 (patch)
treee1b8d3335483c4dbb3dbd924f607d1618f039f3a
parent5b59773d0ba5b66b78c809ce693cba2460ee1ff5 (diff)
downloadpluma-206008a59a102122e457e7a1c82da83a6bf6f139.tar.bz2
pluma-206008a59a102122e457e7a1c82da83a6bf6f139.tar.xz
pluma-file-browser-widget: avoid 'g_type_class_add_private'
-rw-r--r--plugins/filebrowser/pluma-file-browser-widget.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/plugins/filebrowser/pluma-file-browser-widget.c b/plugins/filebrowser/pluma-file-browser-widget.c
index 367a575e..25ec921a 100644
--- a/plugins/filebrowser/pluma-file-browser-widget.c
+++ b/plugins/filebrowser/pluma-file-browser-widget.c
@@ -42,10 +42,6 @@
#include "pluma-file-browser-marshal.h"
#include "pluma-file-browser-enum-types.h"
-#define PLUMA_FILE_BROWSER_WIDGET_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE((object), \
- PLUMA_TYPE_FILE_BROWSER_WIDGET, \
- PlumaFileBrowserWidgetPrivate))
-
#define XML_UI_FILE "pluma-file-browser-widget-ui.xml"
#define LOCATION_DATA_KEY "pluma-file-browser-widget-location"
@@ -235,8 +231,11 @@ static void on_action_filter_binary (GtkAction * action,
static void on_action_bookmark_open (GtkAction * action,
PlumaFileBrowserWidget * obj);
-G_DEFINE_DYNAMIC_TYPE (PlumaFileBrowserWidget, pluma_file_browser_widget,
- GTK_TYPE_BOX)
+G_DEFINE_DYNAMIC_TYPE_EXTENDED (PlumaFileBrowserWidget,
+ pluma_file_browser_widget,
+ GTK_TYPE_BOX,
+ 0,
+ G_ADD_PRIVATE_DYNAMIC (PlumaFileBrowserWidget))
static void
free_name_icon (gpointer data)
@@ -473,15 +472,12 @@ pluma_file_browser_widget_class_init (PlumaFileBrowserWidgetClass * klass)
G_TYPE_BOOLEAN,
1,
G_TYPE_POINTER);
-
- g_type_class_add_private (object_class,
- sizeof (PlumaFileBrowserWidgetPrivate));
}
static void
pluma_file_browser_widget_class_finalize (PlumaFileBrowserWidgetClass *klass)
{
- /* dummy function - used by G_DEFINE_DYNAMIC_TYPE */
+ /* dummy function - used by G_DEFINE_DYNAMIC_TYPE_EXTENDED */
}
static void
@@ -1265,7 +1261,7 @@ pluma_file_browser_widget_init (PlumaFileBrowserWidget * obj)
{
GdkDisplay *display;
- obj->priv = PLUMA_FILE_BROWSER_WIDGET_GET_PRIVATE (obj);
+ obj->priv = pluma_file_browser_widget_get_instance_private (obj);
obj->priv->bookmarks_hash = g_hash_table_new_full (g_file_hash,
(GEqualFunc)g_file_equal,