diff options
author | Pablo Barciela <[email protected]> | 2019-08-08 13:55:23 +0200 |
---|---|---|
committer | lukefromdc <[email protected]> | 2019-08-09 22:21:07 +0000 |
commit | c4e914523da760b1504c51eaf3cb5c5bae55fd85 (patch) | |
tree | 7426316c42677dca2437563c4ae4b824a48d4a6e /plugins | |
parent | 8640daafd09dab89845c613b261724afebe888ca (diff) | |
download | pluma-c4e914523da760b1504c51eaf3cb5c5bae55fd85.tar.bz2 pluma-c4e914523da760b1504c51eaf3cb5c5bae55fd85.tar.xz |
pluma-spell-plugin: avoid 'g_type_class_add_private'
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/spell/pluma-spell-plugin.c | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/plugins/spell/pluma-spell-plugin.c b/plugins/spell/pluma-spell-plugin.c index b50319ce..fdc2588f 100644 --- a/plugins/spell/pluma-spell-plugin.c +++ b/plugins/spell/pluma-spell-plugin.c @@ -50,10 +50,6 @@ #define MENU_PATH "/MenuBar/ToolsMenu/ToolsOps_1" -#define PLUMA_SPELL_PLUGIN_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), \ - PLUMA_TYPE_SPELL_PLUGIN, \ - PlumaSpellPluginPrivate)) - /* GSettings keys */ #define SPELL_SCHEMA "org.mate.pluma.plugins.spell" #define AUTOCHECK_TYPE_KEY "autocheck-type" @@ -61,15 +57,6 @@ static void peas_activatable_iface_init (PeasActivatableInterface *iface); static void peas_gtk_configurable_iface_init (PeasGtkConfigurableInterface *iface); -G_DEFINE_DYNAMIC_TYPE_EXTENDED (PlumaSpellPlugin, - pluma_spell_plugin, - PEAS_TYPE_EXTENSION_BASE, - 0, - G_IMPLEMENT_INTERFACE_DYNAMIC (PEAS_TYPE_ACTIVATABLE, - peas_activatable_iface_init) - G_IMPLEMENT_INTERFACE_DYNAMIC (PEAS_GTK_TYPE_CONFIGURABLE, - peas_gtk_configurable_iface_init)) - enum { PROP_0, PROP_OBJECT @@ -88,6 +75,16 @@ struct _PlumaSpellPluginPrivate GSettings *settings; }; +G_DEFINE_DYNAMIC_TYPE_EXTENDED (PlumaSpellPlugin, + pluma_spell_plugin, + PEAS_TYPE_EXTENSION_BASE, + 0, + G_ADD_PRIVATE_DYNAMIC (PlumaSpellPlugin) + G_IMPLEMENT_INTERFACE_DYNAMIC (PEAS_TYPE_ACTIVATABLE, + peas_activatable_iface_init) + G_IMPLEMENT_INTERFACE_DYNAMIC (PEAS_GTK_TYPE_CONFIGURABLE, + peas_gtk_configurable_iface_init)) + static void spell_cb (GtkAction *action, PlumaSpellPlugin *plugin); static void set_language_cb (GtkAction *action, PlumaSpellPlugin *plugin); static void auto_spell_cb (GtkAction *action, PlumaSpellPlugin *plugin); @@ -165,7 +162,7 @@ pluma_spell_plugin_init (PlumaSpellPlugin *plugin) { pluma_debug_message (DEBUG_PLUGINS, "PlumaSpellPlugin initializing"); - plugin->priv = PLUMA_SPELL_PLUGIN_GET_PRIVATE (plugin); + plugin->priv = pluma_spell_plugin_get_instance_private (plugin); plugin->priv->settings = g_settings_new (SPELL_SCHEMA); } @@ -1462,8 +1459,6 @@ pluma_spell_plugin_class_init (PlumaSpellPluginClass *klass) if (check_range_id == 0) check_range_id = g_quark_from_string ("CheckRangeID"); - - g_type_class_add_private (object_class, sizeof (PlumaSpellPluginPrivate)); } static void |