summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-07-30 17:36:41 +0200
committerlukefromdc <[email protected]>2019-08-01 19:35:20 +0000
commitd8dda3b297c5885f3640a9294fcb8a4cbb33aa0a (patch)
treec9dc9a3789a3770b719fa8b421ea782514a06e52
parent915d9832c83848688dbd62f1fd60f9d8bb745423 (diff)
downloadpluma-d8dda3b297c5885f3640a9294fcb8a4cbb33aa0a.tar.bz2
pluma-d8dda3b297c5885f3640a9294fcb8a4cbb33aa0a.tar.xz
pluma-docinfo-plugin: avoid 'g_type_class_add_private'
-rw-r--r--plugins/docinfo/pluma-docinfo-plugin.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/plugins/docinfo/pluma-docinfo-plugin.c b/plugins/docinfo/pluma-docinfo-plugin.c
index 9fec4023..42307df4 100644
--- a/plugins/docinfo/pluma-docinfo-plugin.c
+++ b/plugins/docinfo/pluma-docinfo-plugin.c
@@ -39,19 +39,8 @@
#define MENU_PATH "/MenuBar/ToolsMenu/ToolsOps_2"
-#define PLUMA_DOCINFO_PLUGIN_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), \
- PLUMA_TYPE_DOCINFO_PLUGIN, \
- PlumaDocInfoPluginPrivate))
-
static void peas_activatable_iface_init (PeasActivatableInterface *iface);
-G_DEFINE_DYNAMIC_TYPE_EXTENDED (PlumaDocInfoPlugin,
- pluma_docinfo_plugin,
- PEAS_TYPE_EXTENSION_BASE,
- 0,
- G_IMPLEMENT_INTERFACE_DYNAMIC (PEAS_TYPE_ACTIVATABLE,
- peas_activatable_iface_init))
-
typedef struct
{
GtkWidget *dialog;
@@ -79,6 +68,14 @@ struct _PlumaDocInfoPluginPrivate
DocInfoDialog *dialog;
};
+G_DEFINE_DYNAMIC_TYPE_EXTENDED (PlumaDocInfoPlugin,
+ pluma_docinfo_plugin,
+ PEAS_TYPE_EXTENSION_BASE,
+ 0,
+ G_ADD_PRIVATE_DYNAMIC (PlumaDocInfoPlugin)
+ G_IMPLEMENT_INTERFACE_DYNAMIC (PEAS_TYPE_ACTIVATABLE,
+ peas_activatable_iface_init))
+
enum {
PROP_0,
PROP_OBJECT
@@ -473,7 +470,7 @@ pluma_docinfo_plugin_init (PlumaDocInfoPlugin *plugin)
{
pluma_debug_message (DEBUG_PLUGINS, "PlumaDocInfoPlugin initializing");
- plugin->priv = PLUMA_DOCINFO_PLUGIN_GET_PRIVATE (plugin);
+ plugin->priv = pluma_docinfo_plugin_get_instance_private (plugin);
}
static void
@@ -618,8 +615,6 @@ pluma_docinfo_plugin_class_init (PlumaDocInfoPluginClass *klass)
object_class->get_property = pluma_docinfo_plugin_get_property;
g_object_class_override_property (object_class, PROP_OBJECT, "object");
-
- g_type_class_add_private (klass, sizeof (PlumaDocInfoPluginPrivate));
}
static void