aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-plugin-ui.c
diff options
context:
space:
mode:
Diffstat (limited to 'e-util/e-plugin-ui.c')
-rw-r--r--e-util/e-plugin-ui.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/e-util/e-plugin-ui.c b/e-util/e-plugin-ui.c
index 3ac9eb92db..1e66716183 100644
--- a/e-util/e-plugin-ui.c
+++ b/e-util/e-plugin-ui.c
@@ -26,6 +26,10 @@
#include <string.h>
+#define E_PLUGIN_UI_HOOK_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_PLUGIN_UI_HOOK, EPluginUIHookPrivate))
+
#define E_PLUGIN_UI_DEFAULT_FUNC "e_plugin_ui_init"
#define E_PLUGIN_UI_HOOK_CLASS_ID "org.gnome.evolution.ui:1.0"
@@ -399,7 +403,7 @@ plugin_ui_hook_finalize (GObject *object)
GHashTableIter iter;
gpointer ui_manager;
- priv = E_PLUGIN_UI_HOOK (object)->priv;
+ priv = E_PLUGIN_UI_HOOK_GET_PRIVATE (object);
/* Remove weak reference callbacks to GtkUIManagers. */
g_hash_table_iter_init (&iter, priv->registry);
@@ -423,7 +427,7 @@ plugin_ui_hook_construct (EPluginHook *hook,
{
EPluginUIHookPrivate *priv;
- priv = E_PLUGIN_UI_HOOK (hook)->priv;
+ priv = E_PLUGIN_UI_HOOK_GET_PRIVATE (hook);
/* XXX The EPlugin should be a property of EPluginHookClass.
* Then it could be passed directly to g_object_new() and
@@ -525,8 +529,7 @@ e_plugin_ui_hook_init (EPluginUIHook *hook)
registry = g_hash_table_new_full (g_direct_hash, g_direct_equal,
NULL, (GDestroyNotify) g_hash_table_destroy);
- hook->priv = G_TYPE_INSTANCE_GET_PRIVATE (
- hook, E_TYPE_PLUGIN_UI_HOOK, EPluginUIHookPrivate);
+ hook->priv = E_PLUGIN_UI_HOOK_GET_PRIVATE (hook);
hook->priv->ui_definitions = ui_definitions;
hook->priv->callbacks = callbacks;
hook->priv->registry = registry;