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