summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarrett Regier <garrettregier@gmail.com>2015-03-29 20:26:39 -0700
committerGarrett Regier <gregier@garrett.regier>2015-04-21 11:39:27 -0400
commit85560b25673ef003e709761142f3c1d9db3e649a (patch)
tree13fdb91b9efc375e01e796895396207bea0fe4e2
parentdb954035292a9603f836ba46a97e05bb3c33fa1d (diff)
downloadlibpeas-85560b25673ef003e709761142f3c1d9db3e649a.tar.gz
Cleanup PeasActivatable's init
The function should be a static function. Also, it will only ever be called once so there is no need for doing the check/set initialized dance.
-rw-r--r--libpeas/peas-activatable.c39
1 files changed, 16 insertions, 23 deletions
diff --git a/libpeas/peas-activatable.c b/libpeas/peas-activatable.c
index 9006195..35f25e5 100644
--- a/libpeas/peas-activatable.c
+++ b/libpeas/peas-activatable.c
@@ -47,31 +47,24 @@
G_DEFINE_INTERFACE(PeasActivatable, peas_activatable, G_TYPE_OBJECT)
-void
+static void
peas_activatable_default_init (PeasActivatableInterface *iface)
{
- static gboolean initialized = FALSE;
-
- if (!initialized)
- {
- /**
- * PeasActivatable:object:
- *
- * The object property contains the targetted object for this
- * #PeasActivatable instance, for example a toplevel window in a typical
- * windowed application. It is set at construction time and won't change.
- */
- g_object_interface_install_property (iface,
- g_param_spec_object ("object",
- "Object",
- "Object",
- G_TYPE_OBJECT,
- G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT_ONLY |
- G_PARAM_STATIC_STRINGS));
-
- initialized = TRUE;
- }
+ /**
+ * PeasActivatable:object:
+ *
+ * The object property contains the targetted object for this
+ * #PeasActivatable instance, for example a toplevel window in a typical
+ * windowed application. It is set at construction time and won't change.
+ */
+ g_object_interface_install_property (iface,
+ g_param_spec_object ("object",
+ "Object",
+ "Object",
+ G_TYPE_OBJECT,
+ G_PARAM_READWRITE |
+ G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_STATIC_STRINGS));
}
/**