Drop an obsolete patch

This commit is contained in:
Kalev Lember 2013-09-18 10:59:08 +02:00
parent 1783e54e0d
commit 3709172c5a
2 changed files with 0 additions and 45 deletions

View File

@ -40,9 +40,6 @@ Requires(postun): desktop-file-utils >= %{desktop_file_utils_version}
Patch1: gedit-2.13.90-libdir.patch
%endif
# http://bugzilla.gnome.org/show_bug.cgi?id=587053
#Patch3: print-to-file.patch
Patch4: gedit-disable-python3.patch
BuildRequires: gnome-common
@ -124,8 +121,6 @@ access and leave event for documents used with gedit.
%patch1 -p1 -b .libdir
%endif
#%patch3 -p1 -b .print-to-file
%if !%{with_python3}
%patch4 -p1 -b .disable-python
%endif

View File

@ -1,40 +0,0 @@
diff --git a/gedit/gedit-tab.c b/gedit/gedit-tab.c
index 7b81732..2352487 100644
--- a/gedit/gedit-tab.c
+++ b/gedit/gedit-tab.c
@@ -2262,6 +2262,8 @@ get_print_settings (GeditTab *tab)
{
gpointer data;
GeditDocument *doc;
+ GtkPrintSettings *settings;
+ gchar *uri, *name;
doc = gedit_tab_get_document (tab);
@@ -2270,12 +2272,24 @@ get_print_settings (GeditTab *tab)
if (data == NULL)
{
- return _gedit_app_get_default_print_settings (gedit_app_get_default());
+ settings = _gedit_app_get_default_print_settings (gedit_app_get_default());
}
else
{
- return gtk_print_settings_copy (GTK_PRINT_SETTINGS (data));
+ settings = gtk_print_settings_copy (GTK_PRINT_SETTINGS (data));
}
+
+ name = gedit_document_get_short_name_for_display (doc);
+ uri = g_strconcat ("file://",
+ g_get_user_special_dir (G_USER_DIRECTORY_DOCUMENTS),
+ "/", name, ".pdf", NULL);
+
+ gtk_print_settings_set (settings, GTK_PRINT_SETTINGS_OUTPUT_URI, uri);
+
+ g_free (uri);
+ g_free (name);
+
+ return settings;
}
/* FIXME: show the message area only if the operation will be "long" */