summaryrefslogtreecommitdiff
path: root/plugins/time
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-08-08 02:40:40 +0200
committerlukefromdc <[email protected]>2019-08-09 22:21:19 +0000
commita66d039f91ef73ca502117fa7cc725ec0eb08de8 (patch)
tree24ca0045121ca02a1ca27f3be4e833270c5ddff9 /plugins/time
parentc4e914523da760b1504c51eaf3cb5c5bae55fd85 (diff)
downloadpluma-a66d039f91ef73ca502117fa7cc725ec0eb08de8.tar.bz2
pluma-a66d039f91ef73ca502117fa7cc725ec0eb08de8.tar.xz
pluma-time-plugin: avoid 'g_type_class_add_private'
Diffstat (limited to 'plugins/time')
-rw-r--r--plugins/time/pluma-time-plugin.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/plugins/time/pluma-time-plugin.c b/plugins/time/pluma-time-plugin.c
index fc4571c5..59cb53bc 100644
--- a/plugins/time/pluma-time-plugin.c
+++ b/plugins/time/pluma-time-plugin.c
@@ -47,10 +47,6 @@
#include <pluma/pluma-debug.h>
#include <pluma/pluma-utils.h>
-#define PLUMA_TIME_PLUGIN_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), \
- PLUMA_TYPE_TIME_PLUGIN, \
- PlumaTimePluginPrivate))
-
#define MENU_PATH "/MenuBar/EditMenu/EditOps_4"
/* GSettings keys */
@@ -174,6 +170,7 @@ G_DEFINE_DYNAMIC_TYPE_EXTENDED (PlumaTimePlugin,
pluma_time_plugin,
PEAS_TYPE_EXTENSION_BASE,
0,
+ G_ADD_PRIVATE_DYNAMIC (PlumaTimePlugin)
G_IMPLEMENT_INTERFACE_DYNAMIC (PEAS_TYPE_ACTIVATABLE,
peas_activatable_iface_init)
G_IMPLEMENT_INTERFACE_DYNAMIC (PEAS_GTK_TYPE_CONFIGURABLE,
@@ -198,7 +195,7 @@ pluma_time_plugin_init (PlumaTimePlugin *plugin)
{
pluma_debug_message (DEBUG_PLUGINS, "PlumaTimePlugin initializing");
- plugin->priv = PLUMA_TIME_PLUGIN_GET_PRIVATE (plugin);
+ plugin->priv = pluma_time_plugin_get_instance_private (plugin);
plugin->priv->settings = g_settings_new (TIME_SCHEMA);
}
@@ -1187,8 +1184,6 @@ pluma_time_plugin_class_init (PlumaTimePluginClass *klass)
object_class->get_property = pluma_time_plugin_get_property;
g_object_class_override_property (object_class, PROP_OBJECT, "object");
-
- g_type_class_add_private (object_class, sizeof (PlumaTimePluginPrivate));
}
static void