From ff30825a03c3efa32dfac81f58b2cb37a8d68697 Mon Sep 17 00:00:00 2001 From: raveit65 Date: Fri, 12 Jun 2015 22:57:49 +0200 Subject: 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 --- src/eom-window.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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) { -- cgit v1.2.1 From 945913214e0ae6b460581ba665dd62f80603750b Mon Sep 17 00:00:00 2001 From: raveit65 Date: Fri, 12 Jun 2015 23:03:06 +0200 Subject: EomThumbView: Don't set deprecated follow-state property Since gtk+-3.16 the property is ignored. Silences the deprecation warning. taken from: https://git.gnome.org/browse/eog/commit/?id=40a9883 --- src/eom-thumb-view.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/eom-thumb-view.c b/src/eom-thumb-view.c index 8394633..e52886c 100644 --- a/src/eom-thumb-view.c +++ b/src/eom-thumb-view.c @@ -102,7 +102,9 @@ eom_thumb_view_constructed (GObject *object) FALSE); g_object_set (thumbview->priv->pixbuf_cell, +#if !GTK_CHECK_VERSION (3, 16, 0) "follow-state", FALSE, +#endif "height", 100, "width", 115, "yalign", 0.5, -- cgit v1.2.1