Resolves: rhbz#1404656 crash on opening second evince window
This commit is contained in:
parent
039fcf39b8
commit
cbceccc160
@ -0,0 +1,77 @@
|
||||
From ca83dd9054abdaae93308f27bdf927e050230027 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
|
||||
Date: Tue, 10 Jan 2017 12:04:58 +0000
|
||||
Subject: [PATCH] Resolves: rhbz#1404656 crash on opening second evince window
|
||||
|
||||
e.g.
|
||||
|
||||
export G_SLICE=always-malloc
|
||||
open https://www.antennahouse.com/XSLsample/pdf/sample-link_1.pdf
|
||||
right click on the first link and open in new window
|
||||
close the new window
|
||||
repeat
|
||||
crash
|
||||
|
||||
This is similar to https://bugzilla.gnome.org/show_bug.cgi?id=726812
|
||||
---
|
||||
shell/ev-window.c | 34 ++++++++++++++++++++++++----------
|
||||
1 file changed, 24 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/shell/ev-window.c b/shell/ev-window.c
|
||||
index 11f2fd5..a648ed7 100644
|
||||
--- a/shell/ev-window.c
|
||||
+++ b/shell/ev-window.c
|
||||
@@ -6666,10 +6666,32 @@ _gtk_css_provider_load_from_resource (GtkCssProvider *provider,
|
||||
}
|
||||
|
||||
static void
|
||||
+ev_window_init_css (void)
|
||||
+{
|
||||
+ static gsize initialization_value = 0;
|
||||
+
|
||||
+ if (g_once_init_enter (&initialization_value)) {
|
||||
+ GtkCssProvider *css_provider;
|
||||
+ GError *error = NULL;
|
||||
+
|
||||
+ css_provider = gtk_css_provider_new ();
|
||||
+ _gtk_css_provider_load_from_resource (css_provider,
|
||||
+ "/org/gnome/evince/ui/evince.css",
|
||||
+ &error);
|
||||
+ g_assert_no_error (error);
|
||||
+ gtk_style_context_add_provider_for_screen (gdk_screen_get_default (),
|
||||
+ GTK_STYLE_PROVIDER (css_provider),
|
||||
+ GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
|
||||
+ g_object_unref (css_provider);
|
||||
+
|
||||
+ g_once_init_leave (&initialization_value, 1);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
ev_window_init (EvWindow *ev_window)
|
||||
{
|
||||
GtkBuilder *builder;
|
||||
- GtkCssProvider *css_provider;
|
||||
GError *error = NULL;
|
||||
GtkWidget *sidebar_widget;
|
||||
GtkWidget *overlay;
|
||||
@@ -6748,15 +6770,7 @@ ev_window_init (EvWindow *ev_window)
|
||||
actions, G_N_ELEMENTS (actions),
|
||||
ev_window);
|
||||
|
||||
- css_provider = gtk_css_provider_new ();
|
||||
- _gtk_css_provider_load_from_resource (css_provider,
|
||||
- "/org/gnome/evince/ui/evince.css",
|
||||
- &error);
|
||||
- g_assert_no_error (error);
|
||||
- gtk_style_context_add_provider_for_screen (gtk_widget_get_screen (GTK_WIDGET (ev_window)),
|
||||
- GTK_STYLE_PROVIDER (css_provider),
|
||||
- GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
|
||||
- g_object_unref (css_provider);
|
||||
+ ev_window_init_css ();
|
||||
|
||||
ev_window->priv->recent_manager = gtk_recent_manager_get_default ();
|
||||
|
||||
--
|
||||
2.9.3
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
Name: evince
|
||||
Version: 3.22.1
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: Document viewer
|
||||
|
||||
License: GPLv2+ and GPLv3+ and LGPLv2+ and MIT and Afmparse
|
||||
@ -14,6 +14,7 @@ Source0: https://download.gnome.org/sources/%{name}/3.22/%{name}-%{versio
|
||||
|
||||
Patch0: evince-3.21.4-NPNVToolKit.patch
|
||||
Patch1: 0001-gnome-692552-don-t-complain-about-inability-to-copy-.patch
|
||||
Patch2: 0001-Resolves-rhbz-1404656-crash-on-opening-second-evince.patch
|
||||
|
||||
BuildRequires: pkgconfig(adwaita-icon-theme)
|
||||
BuildRequires: pkgconfig(gio-unix-2.0) >= %{glib2_version}
|
||||
@ -256,6 +257,9 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas >&/dev/null ||:
|
||||
%{_libdir}/mozilla/plugins/libevbrowserplugin.so
|
||||
|
||||
%changelog
|
||||
* Tue Jan 10 2017 Caolán McNamara <caolanm@redhat.com> - 3.22.1-3
|
||||
- Resolves: rhbz#1404656 crash on opening second evince window
|
||||
|
||||
* Fri Dec 09 2016 Caolán McNamara <caolanm@redhat.com> - 3.22.1-2
|
||||
- Resolves: rhbz#1022649 don't complain about inability to copy metadata
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user