Fix crash on startup
Remove custom appstream screenshots
This commit is contained in:
parent
82c8411a9e
commit
5e6fcf2935
36
font-view-ensure-window-exists.patch
Normal file
36
font-view-ensure-window-exists.patch
Normal file
@ -0,0 +1,36 @@
|
||||
From 0beb4d974d87eb4d5c6175143e6a6c3534feb38a Mon Sep 17 00:00:00 2001
|
||||
From: Cosimo Cecchi <cosimoc@gnome.org>
|
||||
Date: Wed, 17 May 2017 12:11:56 -0700
|
||||
Subject: font-view: ensure the window exists when opening a file
|
||||
|
||||
We refactored the initialization path, but forgot a case where the
|
||||
window needs to be created during startup.
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=782738
|
||||
---
|
||||
src/font-view.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/font-view.c b/src/font-view.c
|
||||
index 21aebf4..4a216c2 100644
|
||||
--- a/src/font-view.c
|
||||
+++ b/src/font-view.c
|
||||
@@ -88,6 +88,7 @@ static const GOptionEntry goption_options[] =
|
||||
G_DEFINE_TYPE (FontViewApplication, font_view_application, GTK_TYPE_APPLICATION);
|
||||
|
||||
static void font_view_application_do_overview (FontViewApplication *self);
|
||||
+static void ensure_window (FontViewApplication *self);
|
||||
|
||||
#define VIEW_ITEM_WIDTH 140
|
||||
#define VIEW_ITEM_WRAP_WIDTH 128
|
||||
@@ -737,6 +738,7 @@ query_info_ready_cb (GObject *object,
|
||||
GFileInfo *info;
|
||||
GError *error = NULL;
|
||||
|
||||
+ ensure_window (self);
|
||||
g_application_release (G_APPLICATION (self));
|
||||
|
||||
info = g_file_query_info_finish (G_FILE (object), res, &error);
|
||||
--
|
||||
cgit v0.12
|
||||
|
37
font-view-hold-application.patch
Normal file
37
font-view-hold-application.patch
Normal file
@ -0,0 +1,37 @@
|
||||
From 51d9b31c07876857d105fa81d16c162b13aa8c3e Mon Sep 17 00:00:00 2001
|
||||
From: Cosimo Cecchi <cosimoc@gnome.org>
|
||||
Date: Wed, 17 May 2017 12:11:17 -0700
|
||||
Subject: font-view: make sure to hold the GApplication while doing async init
|
||||
|
||||
Otherwise the application will shutdown during the query_info call.
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=782738
|
||||
---
|
||||
src/font-view.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/src/font-view.c b/src/font-view.c
|
||||
index 898e53b..21aebf4 100644
|
||||
--- a/src/font-view.c
|
||||
+++ b/src/font-view.c
|
||||
@@ -737,6 +737,8 @@ query_info_ready_cb (GObject *object,
|
||||
GFileInfo *info;
|
||||
GError *error = NULL;
|
||||
|
||||
+ g_application_release (G_APPLICATION (self));
|
||||
+
|
||||
info = g_file_query_info_finish (G_FILE (object), res, &error);
|
||||
if (error != NULL) {
|
||||
font_view_application_do_overview (self);
|
||||
@@ -756,6 +758,8 @@ font_view_application_open (GApplication *application,
|
||||
const gchar *hint)
|
||||
{
|
||||
FontViewApplication *self = FONT_VIEW_APPLICATION (application);
|
||||
+
|
||||
+ g_application_hold (application);
|
||||
g_file_query_info_async (files[0], G_FILE_ATTRIBUTE_STANDARD_NAME,
|
||||
G_FILE_QUERY_INFO_NONE,
|
||||
G_PRIORITY_DEFAULT, NULL,
|
||||
--
|
||||
cgit v0.12
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
Name: gnome-font-viewer
|
||||
Version: 3.24.0
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Utility for previewing fonts for GNOME
|
||||
|
||||
License: GPLv2+
|
||||
@ -10,6 +10,9 @@ License: GPLv2+
|
||||
URL: http://www.gnome.org/gnome-3/
|
||||
Source0: http://ftp.gnome.org/pub/GNOME/sources/gnome-font-viewer/%{release_version}/%{name}-%{version}.tar.xz
|
||||
|
||||
Patch0: font-view-hold-application.patch
|
||||
Patch1: font-view-ensure-window-exists.patch
|
||||
|
||||
BuildRequires: gnome-desktop3-devel
|
||||
BuildRequires: gtk3-devel
|
||||
BuildRequires: intltool
|
||||
@ -22,7 +25,7 @@ information about a specified font. You can use the Font Viewer to display the
|
||||
name, style, type, size, version and copyright of the font.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%autosetup -p1
|
||||
|
||||
%build
|
||||
%configure --disable-silent-rules
|
||||
@ -32,16 +35,6 @@ make %{?_smp_mflags}
|
||||
%install
|
||||
%make_install
|
||||
|
||||
# Update the screenshot shown in the software center
|
||||
#
|
||||
# NOTE: It would be *awesome* if this file was pushed upstream.
|
||||
#
|
||||
# See http://people.freedesktop.org/~hughsient/appdata/#screenshots for more details.
|
||||
#
|
||||
appstream-util replace-screenshots $RPM_BUILD_ROOT%{_datadir}/appdata/org.gnome.font-viewer.appdata.xml \
|
||||
https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/org.gnome.font-viewer/a.png \
|
||||
https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/org.gnome.font-viewer/b.png
|
||||
|
||||
%find_lang %{name} --with-gnome
|
||||
|
||||
%check
|
||||
@ -66,6 +59,10 @@ update-desktop-database &> /dev/null || :
|
||||
|
||||
|
||||
%changelog
|
||||
* Sun May 21 2017 Michael Catanzaro <mcatanzaro@gnome.org> - 3.24.0-2
|
||||
- Fix crash on startup
|
||||
- Remove custom appstream screenshots
|
||||
|
||||
* Tue May 09 2017 Kalev Lember <klember@redhat.com> - 3.24.0-1
|
||||
- Update to 3.24.0
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user