[gedit] set print to file filename
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] set print to file filename
- Date: Wed, 5 Sep 2012 17:42:20 +0000 (UTC)
commit 41d83509fcf020129d36b505a62bb3fb668db4f6
Author: Timothy Arceri <t_arceri yahoo com au>
Date: Fri May 25 15:29:27 2012 +1000
set print to file filename
Set default print to file filename to short document name
https://bugzilla.gnome.org/show_bug.cgi?id=587053
gedit/gedit-tab.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/gedit/gedit-tab.c b/gedit/gedit-tab.c
index e8dca9d..c1cae23 100644
--- a/gedit/gedit-tab.c
+++ b/gedit/gedit-tab.c
@@ -2442,6 +2442,8 @@ get_print_settings (GeditTab *tab)
{
gpointer data;
GeditDocument *doc;
+ GtkPrintSettings *settings;
+ gchar *name;
doc = gedit_tab_get_document (tab);
@@ -2450,12 +2452,19 @@ 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);
+ gtk_print_settings_set (settings, GTK_PRINT_SETTINGS_OUTPUT_BASENAME, name);
+
+ g_free (name);
+
+ return settings;
}
/* FIXME: show the info bar only if the operation will be "long" */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]