diff options
Diffstat (limited to 'plugins/filebrowser/pluma-file-browser-widget.c')
-rw-r--r-- | plugins/filebrowser/pluma-file-browser-widget.c | 18 |
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, |