From 61df36932aad4e1553377a4918b1ea06ec80ee7b Mon Sep 17 00:00:00 2001 From: Marek Kasik Date: Wed, 5 Nov 2014 12:34:12 +0100 Subject: [PATCH] Fix runtime critical warning when starting in fullscreen mode --- ...ical-warning-when-starting-in-fullsc.patch | 36 +++++++++++++++++++ evince.spec | 8 ++++- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 0001-Fix-runtime-critical-warning-when-starting-in-fullsc.patch diff --git a/0001-Fix-runtime-critical-warning-when-starting-in-fullsc.patch b/0001-Fix-runtime-critical-warning-when-starting-in-fullsc.patch new file mode 100644 index 0000000..3c281c2 --- /dev/null +++ b/0001-Fix-runtime-critical-warning-when-starting-in-fullsc.patch @@ -0,0 +1,36 @@ +From 8875003da7f78a6fbba36fcc70d6ed2d372da7a6 Mon Sep 17 00:00:00 2001 +From: Carlos Garcia Campos +Date: Sun, 19 Oct 2014 16:01:38 +0200 +Subject: [PATCH] Fix runtime critical warning when starting in fullscreen mode + +The problem is that when running fullscreen mode we call +ev_window_update_links_model() to update the page action widget of the +fullscreen toolbar, but when running directly in fullscreen mode, this +can happen before the links have been loaded in the sidebar. Since +ev_window_update_links_model() is also called automatically when the +links model property changes, we can simply return early in +ev_window_update_links_model() when the model is NULL and it will be +called again with a valid model when the links job finishes. + +https://bugzilla.gnome.org/show_bug.cgi?id=737864 +--- + shell/ev-window.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/shell/ev-window.c b/shell/ev-window.c +index 4de4732..e7f6a96 100644 +--- a/shell/ev-window.c ++++ b/shell/ev-window.c +@@ -4024,6 +4024,9 @@ ev_window_update_links_model (EvWindow *window) + "model", &model, + NULL); + ++ if (!model) ++ return; ++ + page_selector = ev_toolbar_get_page_selector (EV_TOOLBAR (window->priv->toolbar)); + ev_page_action_widget_update_links_model (EV_PAGE_ACTION_WIDGET (page_selector), model); + if (window->priv->fs_toolbar) { +-- +2.1.0 + diff --git a/evince.spec b/evince.spec index 4f49d51..875d288 100644 --- a/evince.spec +++ b/evince.spec @@ -5,7 +5,7 @@ Name: evince Version: 3.14.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Document viewer License: GPLv2+ and GPLv3+ and LGPLv2+ and MIT and Afmparse @@ -16,6 +16,8 @@ Source0: http://download.gnome.org/sources/%{name}/3.14/%{name}-%{version # https://bugzilla.redhat.com/show_bug.cgi?id=1160376 Patch0: 0001-Disable-toggle-find-action-for-documents-not-support.patch +Patch1: 0001-Fix-runtime-critical-warning-when-starting-in-fullsc.patch + BuildRequires: glib2-devel >= %{glib2_version} BuildRequires: gtk3-devel >= %{gtk3_version} BuildRequires: poppler-glib-devel >= %{poppler_version} @@ -122,6 +124,7 @@ This package contains the evince web browser plugin. %setup -q %patch0 -p1 -b .toggle-find +%patch1 -p1 -b .unref %build ./autogen.sh @@ -250,6 +253,9 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas >&/dev/null ||: %{_libdir}/mozilla/plugins/libevbrowserplugin.so %changelog +* Wed Nov 5 2014 Marek Kasik - 3.14.1-3 +- Fix runtime critical warning when starting in fullscreen mode + * Wed Nov 5 2014 Marek Kasik - 3.14.1-2 - Disable toggle-find action for documents not supporting find - Resolves: #1160376