[eog] Revert "Remove unneeded static variable"
- From: Felix Riemann <friemann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [eog] Revert "Remove unneeded static variable"
- Date: Fri, 30 Sep 2011 21:28:25 +0000 (UTC)
commit abe2d406d61a40073b6d8f8cfa3ae5cedf451c0f
Author: Felix Riemann <friemann gnome org>
Date: Fri Sep 30 23:26:44 2011 +0200
Revert "Remove unneeded static variable"
This reverts commit d90c385f06fc57837bbfe39e7f8b6084eccaace9.
Let's keep it how it's done in the GObject manual for now.
src/eog-window-activatable.c | 33 +++++++++++++++++++--------------
1 files changed, 19 insertions(+), 14 deletions(-)
---
diff --git a/src/eog-window-activatable.c b/src/eog-window-activatable.c
index a70f56f..3221ab7 100644
--- a/src/eog-window-activatable.c
+++ b/src/eog-window-activatable.c
@@ -38,20 +38,25 @@ G_DEFINE_INTERFACE(EogWindowActivatable, eog_window_activatable, G_TYPE_OBJECT)
void
eog_window_activatable_default_init (EogWindowActivatableInterface *iface)
{
- /**
- * EogWindowActivatable:window:
- *
- * This is the #EogWindow this #EogWindowActivatable instance
- * should be attached to.
- */
- g_object_interface_install_property (iface,
- g_param_spec_object ("window", "Window",
- "The EogWindow this "
- "instance it attached to",
- EOG_TYPE_WINDOW,
- G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT_ONLY |
- G_PARAM_STATIC_STRINGS));
+ static gboolean initialized = FALSE;
+
+ if (!initialized) {
+ /**
+ * EogWindowActivatable:window:
+ *
+ * This is the #EogWindow this #EogWindowActivatable instance
+ * should be attached to.
+ */
+ g_object_interface_install_property (iface,
+ g_param_spec_object ("window", "Window",
+ "The EogWindow this "
+ "instance it attached to",
+ EOG_TYPE_WINDOW,
+ G_PARAM_READWRITE |
+ G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_STATIC_STRINGS));
+ initialized = TRUE;
+ }
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]