diff options
author | Pablo Barciela <[email protected]> | 2019-08-08 13:37:10 +0200 |
---|---|---|
committer | lukefromdc <[email protected]> | 2019-08-09 22:20:58 +0000 |
commit | 8640daafd09dab89845c613b261724afebe888ca (patch) | |
tree | 0d5be4237d86c80e94795b2ac82d76282060ca38 /plugins/trailsave/pluma-trail-save-plugin.c | |
parent | a9ca8f33160fb3f6bc1629ddd3fc94246c92fd5d (diff) | |
download | pluma-8640daafd09dab89845c613b261724afebe888ca.tar.bz2 pluma-8640daafd09dab89845c613b261724afebe888ca.tar.xz |
pluma-trail-save-plugin: avoid 'g_type_class_add_private'
Diffstat (limited to 'plugins/trailsave/pluma-trail-save-plugin.c')
-rw-r--r-- | plugins/trailsave/pluma-trail-save-plugin.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/plugins/trailsave/pluma-trail-save-plugin.c b/plugins/trailsave/pluma-trail-save-plugin.c index 589a85c2..82b7a012 100644 --- a/plugins/trailsave/pluma-trail-save-plugin.c +++ b/plugins/trailsave/pluma-trail-save-plugin.c @@ -29,19 +29,8 @@ #include "pluma-trail-save-plugin.h" -#define PLUMA_TRAIL_SAVE_PLUGIN_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), \ - PLUMA_TYPE_TRAIL_SAVE_PLUGIN, \ - PlumaTrailSavePluginPrivate)) - static void peas_activatable_iface_init (PeasActivatableInterface *iface); -G_DEFINE_DYNAMIC_TYPE_EXTENDED (PlumaTrailSavePlugin, - pluma_trail_save_plugin, - PEAS_TYPE_EXTENSION_BASE, - 0, - G_IMPLEMENT_INTERFACE_DYNAMIC (PEAS_TYPE_ACTIVATABLE, - peas_activatable_iface_init)) - struct _PlumaTrailSavePluginPrivate { GtkWidget *window; @@ -52,6 +41,14 @@ enum { PROP_OBJECT }; +G_DEFINE_DYNAMIC_TYPE_EXTENDED (PlumaTrailSavePlugin, + pluma_trail_save_plugin, + PEAS_TYPE_EXTENSION_BASE, + 0, + G_ADD_PRIVATE_DYNAMIC (PlumaTrailSavePlugin) + G_IMPLEMENT_INTERFACE_DYNAMIC (PEAS_TYPE_ACTIVATABLE, + peas_activatable_iface_init)) + static void strip_trailing_spaces (GtkTextBuffer *text_buffer) { @@ -226,7 +223,7 @@ pluma_trail_save_plugin_init (PlumaTrailSavePlugin *plugin) { pluma_debug_message (DEBUG_PLUGINS, "PlumaTrailSavePlugin initializing"); - plugin->priv = PLUMA_TRAIL_SAVE_PLUGIN_GET_PRIVATE (plugin); + plugin->priv = pluma_trail_save_plugin_get_instance_private (plugin); } static void @@ -295,8 +292,6 @@ pluma_trail_save_plugin_class_init (PlumaTrailSavePluginClass *klass) object_class->get_property = pluma_trail_save_plugin_get_property; g_object_class_override_property (object_class, PROP_OBJECT, "object"); - - g_type_class_add_private (object_class, sizeof (PlumaTrailSavePluginPrivate)); } static void |