diff options
author | raveit65 <[email protected]> | 2015-06-12 22:57:49 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2015-06-12 22:57:49 +0200 |
commit | ff30825a03c3efa32dfac81f58b2cb37a8d68697 (patch) | |
tree | 895807a03f1e13e139889f6f646b60cf59f09b0d | |
parent | 0ebbecec4796084650addb344c1e1a000c7561d8 (diff) | |
download | eom-ff30825a03c3efa32dfac81f58b2cb37a8d68697.tar.bz2 eom-ff30825a03c3efa32dfac81f58b2cb37a8d68697.tar.xz |
EomWindow: Hold a reference on the used ThumbView
The window uses it during runtime so it should keep a reference
to it. Due to the necessary unref this avoids critical warnings
because of EogThumbView's own disposal routine causing an unwanted
signal emission.
taken from:
https://git.gnome.org/browse/eog/commit/?id=3145fce
see:
https://bugzilla.gnome.org/show_bug.cgi?id=691517
https://bugs.launchpad.net/ubuntu/+source/eog/+bug/1114012
-rw-r--r-- | src/eom-window.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/eom-window.c b/src/eom-window.c index fef0b52..210ba40 100644 --- a/src/eom-window.c +++ b/src/eom-window.c @@ -4458,7 +4458,7 @@ eom_window_construct_ui (EomWindow *window) gtk_box_pack_start (GTK_BOX (priv->layout), hpaned, TRUE, TRUE, 0); - priv->thumbview = eom_thumb_view_new (); + priv->thumbview = g_object_ref (eom_thumb_view_new ()); /* giving shape to the view */ gtk_icon_view_set_margin (GTK_ICON_VIEW (priv->thumbview), 4); @@ -4587,6 +4587,16 @@ eom_window_dispose (GObject *object) priv->page_setup = NULL; } + if (priv->thumbview) + { + /* Disconnect so we don't get any unwanted callbacks + * when the thumb view is disposed. */ + g_signal_handlers_disconnect_by_func (priv->thumbview, + G_CALLBACK (handle_image_selection_changed_cb), + window); + g_clear_object (&priv->thumbview); + } + eom_plugin_engine_garbage_collect (); if (priv->store != NULL) { |