summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorFelix Riemann <friemann@gnome.org>2011-01-02 22:27:10 +0100
committerFelix Riemann <friemann@gnome.org>2011-01-03 00:22:31 +0100
commit8b0acfddc52c220393770a9895b6b56cab7821fd (patch)
tree299c2a430bcc44bec7f706db59a95a0c5fddeaad /plugins
parent40bedbf33812e65f4a8e79691b1fadfaace94035 (diff)
downloadeog-8b0acfddc52c220393770a9895b6b56cab7821fd.tar.gz
Fix broken application shutdown with new plugin system
The PeasExtensionSet was basically keeping a reference to the window preventing it from being destroyed correctly. Then the plugins leaked a reference to the window as well. https://bugzilla.gnome.org/show_bug.cgi?id=626091
Diffstat (limited to 'plugins')
-rw-r--r--plugins/fullscreen/eog-fullscreen-plugin.c15
-rw-r--r--plugins/reload/eog-reload-plugin.c15
-rw-r--r--plugins/statusbar-date/eog-statusbar-date-plugin.c15
3 files changed, 33 insertions, 12 deletions
diff --git a/plugins/fullscreen/eog-fullscreen-plugin.c b/plugins/fullscreen/eog-fullscreen-plugin.c
index c9484bc6..0aee28c7 100644
--- a/plugins/fullscreen/eog-fullscreen-plugin.c
+++ b/plugins/fullscreen/eog-fullscreen-plugin.c
@@ -90,11 +90,18 @@ eog_fullscreen_plugin_init (EogFullscreenPlugin *plugin)
}
static void
-eog_fullscreen_plugin_finalize (GObject *object)
+eog_fullscreen_plugin_dispose (GObject *object)
{
- eog_debug_message (DEBUG_PLUGINS, "EogFullscreenPlugin finalizing");
+ EogFullscreenPlugin *plugin = EOG_FULLSCREEN_PLUGIN (object);
+
+ eog_debug_message (DEBUG_PLUGINS, "EogFullscreenPlugin disposing");
+
+ if (plugin->window != NULL) {
+ g_object_unref (plugin->window);
+ plugin->window = NULL;
+ }
- G_OBJECT_CLASS (eog_fullscreen_plugin_parent_class)->finalize (object);
+ G_OBJECT_CLASS (eog_fullscreen_plugin_parent_class)->dispose (object);
}
static void
@@ -125,7 +132,7 @@ eog_fullscreen_plugin_class_init (EogFullscreenPluginClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->finalize = eog_fullscreen_plugin_finalize;
+ object_class->dispose = eog_fullscreen_plugin_dispose;
object_class->set_property = eog_fullscreen_plugin_set_property;
object_class->get_property = eog_fullscreen_plugin_get_property;
diff --git a/plugins/reload/eog-reload-plugin.c b/plugins/reload/eog-reload-plugin.c
index 4b099f0e..bd9d4d24 100644
--- a/plugins/reload/eog-reload-plugin.c
+++ b/plugins/reload/eog-reload-plugin.c
@@ -101,11 +101,18 @@ eog_reload_plugin_init (EogReloadPlugin *plugin)
}
static void
-eog_reload_plugin_finalize (GObject *object)
+eog_reload_plugin_dispose (GObject *object)
{
- eog_debug_message (DEBUG_PLUGINS, "EogReloadPlugin finalizing");
+ EogReloadPlugin *plugin = EOG_RELOAD_PLUGIN (object);
+
+ eog_debug_message (DEBUG_PLUGINS, "EogReloadPlugin disposing");
+
+ if (plugin->window != NULL) {
+ g_object_unref (plugin->window);
+ plugin->window = NULL;
+ }
- G_OBJECT_CLASS (eog_reload_plugin_parent_class)->finalize (object);
+ G_OBJECT_CLASS (eog_reload_plugin_parent_class)->dispose (object);
}
static void
@@ -161,7 +168,7 @@ eog_reload_plugin_class_init (EogReloadPluginClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->finalize = eog_reload_plugin_finalize;
+ object_class->dispose= eog_reload_plugin_dispose;
object_class->set_property = eog_reload_plugin_set_property;
object_class->get_property = eog_reload_plugin_get_property;
diff --git a/plugins/statusbar-date/eog-statusbar-date-plugin.c b/plugins/statusbar-date/eog-statusbar-date-plugin.c
index de72d07e..ea12e5f4 100644
--- a/plugins/statusbar-date/eog-statusbar-date-plugin.c
+++ b/plugins/statusbar-date/eog-statusbar-date-plugin.c
@@ -140,11 +140,18 @@ eog_statusbar_date_plugin_init (EogStatusbarDatePlugin *plugin)
}
static void
-eog_statusbar_date_plugin_finalize (GObject *object)
+eog_statusbar_date_plugin_dispose (GObject *object)
{
- eog_debug_message (DEBUG_PLUGINS, "EogStatusbarDatePlugin finalizing");
+ EogStatusbarDatePlugin *plugin = EOG_STATUSBAR_DATE_PLUGIN (object);
+
+ eog_debug_message (DEBUG_PLUGINS, "EogStatusbarDatePlugin disposing");
+
+ if (plugin->window != NULL) {
+ g_object_unref (plugin->window);
+ plugin->window = NULL;
+ }
- G_OBJECT_CLASS (eog_statusbar_date_plugin_parent_class)->finalize (object);
+ G_OBJECT_CLASS (eog_statusbar_date_plugin_parent_class)->dispose (object);
}
static void
@@ -190,7 +197,7 @@ eog_statusbar_date_plugin_class_init (EogStatusbarDatePluginClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->finalize = eog_statusbar_date_plugin_finalize;
+ object_class->dispose = eog_statusbar_date_plugin_dispose;
object_class->set_property = eog_statusbar_date_plugin_set_property;
object_class->get_property = eog_statusbar_date_plugin_get_property;