From b8becf9e0adbf5c6b8ec4a3d593a0238fc95c43cf8277e1ffea04bff5c793fcb Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Thu, 31 Oct 2013 08:57:56 +0000 Subject: [PATCH] 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 --- gtk2-print-to-file.patch | 35 +++++++++++++++++++++++++++++++++++ gtk2.changes | 6 ++++++ gtk2.spec | 3 +++ 3 files changed, 44 insertions(+) create mode 100644 gtk2-print-to-file.patch diff --git a/gtk2-print-to-file.patch b/gtk2-print-to-file.patch new file mode 100644 index 0000000..53b24e9 --- /dev/null +++ b/gtk2-print-to-file.patch @@ -0,0 +1,35 @@ +From 2ce26e146b7b8fad6de7d4087479a4b69941aa5e Mon Sep 17 00:00:00 2001 +From: Mike Gorse +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 + diff --git a/gtk2.changes b/gtk2.changes index dc5974b..e0d30fa 100644 --- a/gtk2.changes +++ b/gtk2.changes @@ -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 diff --git a/gtk2.spec b/gtk2.spec index c9b53a8..a1d964c 100644 --- a/gtk2.spec +++ b/gtk2.spec @@ -51,6 +51,8 @@ Patch24: gtk2-bnc130159-bgo319483-async-selection-in-gtk-font-selection.d # be here instead. # PATCH-FIX-OPENSUSE gtk-path-local.patch Search in /usr/local/%{_lib} by default. bnc369696 bgo534474 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: cairo-devel BuildRequires: cups-devel @@ -327,6 +329,7 @@ cp -a %{SOURCE2} . %patch23 -p1 %patch24 -p1 %patch53 +%patch54 -p1 gnome-patch-translation-update %build