[evolution/gnome-2-30] Bug 616097 - Remembers page ranges
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/gnome-2-30] Bug 616097 - Remembers page ranges
- Date: Sun, 18 Apr 2010 13:54:30 +0000 (UTC)
commit d18993476aefeffa86a409d58286a86baef4b8c3
Author: Matthew Barnes <mbarnes redhat com>
Date: Sun Apr 18 09:43:53 2010 -0400
Bug 616097 - Remembers page ranges
Exclude print settings that should not persist. This topic has a lot of
grey areas and GTK+ offers no help, so we'll do this by popular demand.
For starters, I'm excluding settings that have messed -me- up in the past:
GTK_PRINT_SETTINGS_N_COPIES
GTK_PRINT_SETTINGS_PAGE_RANGES
GTK_PRINT_SETTINGS_PAGE_SET
GTK_PRINT_SETTINGS_PRINT_PAGES
e-util/e-print.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/e-util/e-print.c b/e-util/e-print.c
index 6e5afd0..bb5ce90 100644
--- a/e-util/e-print.c
+++ b/e-util/e-print.c
@@ -109,6 +109,17 @@ static void
save_settings (GtkPrintSettings *settings,
GKeyFile *key_file)
{
+ /* XXX GtkPrintSettings does not distinguish between settings
+ * that should persist and one-time-only settings, such as
+ * page range or number of copies. All print settings are
+ * persistent by default and we opt out particular keys by
+ * popular demand. */
+
+ gtk_print_settings_unset (settings, GTK_PRINT_SETTINGS_N_COPIES);
+ gtk_print_settings_unset (settings, GTK_PRINT_SETTINGS_PAGE_RANGES);
+ gtk_print_settings_unset (settings, GTK_PRINT_SETTINGS_PAGE_SET);
+ gtk_print_settings_unset (settings, GTK_PRINT_SETTINGS_PRINT_PAGES);
+
gtk_print_settings_to_key_file (settings, key_file, NULL);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]