Accepting request 205318 from home:mgorse:branches:GNOME:Factory

- Add gtk2-print-to-file.patch - fix printing to file with no directory
  specified (bnc#839089).

OBS-URL: https://build.opensuse.org/request/show/205318
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gtk2?expand=0&rev=195
This commit is contained in:
Dominique Leuenberger 2013-10-31 08:57:56 +00:00 committed by Git OBS Bridge
parent 1b7eccf642
commit b8becf9e0a
3 changed files with 44 additions and 0 deletions

35
gtk2-print-to-file.patch Normal file
View File

@ -0,0 +1,35 @@
From 2ce26e146b7b8fad6de7d4087479a4b69941aa5e Mon Sep 17 00:00:00 2001
From: Mike Gorse <mgorse@suse.com>
Date: Wed, 30 Oct 2013 15:42:09 -0500
Subject: [PATCH] Print to a file in the current directory by default
When printing to a file, the filename was not being propagated if a
directory was not specified.
https://bugzilla.gnome.org/show_bug.cgi?id=711177
---
gtk/gtkprinteroptionwidget.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/gtk/gtkprinteroptionwidget.c b/gtk/gtkprinteroptionwidget.c
index 2f43edf..12fdd6f 100644
--- a/gtk/gtkprinteroptionwidget.c
+++ b/gtk/gtkprinteroptionwidget.c
@@ -521,7 +521,13 @@ filesave_changed_cb (GtkWidget *button,
if (g_uri_parse_scheme (file) != NULL)
uri = g_strdup (file);
else
- uri = g_build_path ("/", gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (priv->combo)), file, NULL);
+ {
+ const gchar *chooser_uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (priv->combo));
+ if (chooser_uri)
+ uri = g_build_path ("/", chooser_uri, file, NULL);
+ else
+ uri = g_filename_to_uri (file, NULL, NULL);
+ }
}
if (uri)
--
1.8.4

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Oct 30 20:56:50 UTC 2013 - mgorse@suse.com
- Add gtk2-print-to-file.patch - fix printing to file with no directory
specified (bnc#839089).
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Oct 11 15:27:31 UTC 2013 - dimstar@opensuse.org Fri Oct 11 15:27:31 UTC 2013 - dimstar@opensuse.org

View File

@ -51,6 +51,8 @@ Patch24: gtk2-bnc130159-bgo319483-async-selection-in-gtk-font-selection.d
# be here instead. # be here instead.
# PATCH-FIX-OPENSUSE gtk-path-local.patch Search in /usr/local/%{_lib} by default. bnc369696 bgo534474 # PATCH-FIX-OPENSUSE gtk-path-local.patch Search in /usr/local/%{_lib} by default. bnc369696 bgo534474
Patch53: gtk-path-local.patch Patch53: gtk-path-local.patch
# PATCH-FIX-UPSTREAM gtk2-print-to-file.patch Fix printing to file with no directory specified. bnc839089 bgo711177
Patch54: gtk2-print-to-file.patch
BuildRequires: atk-devel BuildRequires: atk-devel
BuildRequires: cairo-devel BuildRequires: cairo-devel
BuildRequires: cups-devel BuildRequires: cups-devel
@ -327,6 +329,7 @@ cp -a %{SOURCE2} .
%patch23 -p1 %patch23 -p1
%patch24 -p1 %patch24 -p1
%patch53 %patch53
%patch54 -p1
gnome-patch-translation-update gnome-patch-translation-update
%build %build