summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-07-29 16:55:38 +0200
committerlukefromdc <[email protected]>2019-08-01 19:32:13 +0000
commit915d9832c83848688dbd62f1fd60f9d8bb745423 (patch)
treecb91e3d88aabb4e8869f4ccbed23fa7630ac50bf
parent7e97c8c54e0df87dc3c7fe233adf2d728115fe69 (diff)
downloadpluma-915d9832c83848688dbd62f1fd60f9d8bb745423.tar.bz2
pluma-915d9832c83848688dbd62f1fd60f9d8bb745423.tar.xz
pluma-changecase-plugin: avoid 'g_type_class_add_private'
-rw-r--r--plugins/changecase/pluma-changecase-plugin.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/plugins/changecase/pluma-changecase-plugin.c b/plugins/changecase/pluma-changecase-plugin.c
index edf15fb4..0c0f5289 100644
--- a/plugins/changecase/pluma-changecase-plugin.c
+++ b/plugins/changecase/pluma-changecase-plugin.c
@@ -33,19 +33,8 @@
#include <pluma/pluma-window.h>
#include <pluma/pluma-debug.h>
-#define PLUMA_CHANGECASE_PLUGIN_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), \
- PLUMA_TYPE_CHANGECASE_PLUGIN, \
- PlumaChangecasePluginPrivate))
-
static void peas_activatable_iface_init (PeasActivatableInterface *iface);
-G_DEFINE_DYNAMIC_TYPE_EXTENDED (PlumaChangecasePlugin,
- pluma_changecase_plugin,
- PEAS_TYPE_EXTENSION_BASE,
- 0,
- G_IMPLEMENT_INTERFACE_DYNAMIC (PEAS_TYPE_ACTIVATABLE,
- peas_activatable_iface_init))
-
struct _PlumaChangecasePluginPrivate
{
GtkWidget *window;
@@ -54,6 +43,14 @@ struct _PlumaChangecasePluginPrivate
guint ui_id;
};
+G_DEFINE_DYNAMIC_TYPE_EXTENDED (PlumaChangecasePlugin,
+ pluma_changecase_plugin,
+ PEAS_TYPE_EXTENSION_BASE,
+ 0,
+ G_ADD_PRIVATE_DYNAMIC (PlumaChangecasePlugin)
+ G_IMPLEMENT_INTERFACE_DYNAMIC (PEAS_TYPE_ACTIVATABLE,
+ peas_activatable_iface_init))
+
enum {
PROP_0,
PROP_OBJECT
@@ -280,7 +277,7 @@ pluma_changecase_plugin_init (PlumaChangecasePlugin *plugin)
{
pluma_debug_message (DEBUG_PLUGINS, "PlumaChangecasePlugin initializing");
- plugin->priv = PLUMA_CHANGECASE_PLUGIN_GET_PRIVATE (plugin);
+ plugin->priv = pluma_changecase_plugin_get_instance_private (plugin);
}
static void
@@ -446,8 +443,6 @@ pluma_changecase_plugin_class_init (PlumaChangecasePluginClass *klass)
object_class->get_property = pluma_changecase_plugin_get_property;
g_object_class_override_property (object_class, PROP_OBJECT, "object");
-
- g_type_class_add_private (klass, sizeof (PlumaChangecasePluginPrivate));
}
static void