aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-04-18 21:21:36 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-04-18 21:50:13 +0800
commitb0c6583c07d925a1d344170a6142ff12df67d428 (patch)
tree0cd01c31b91b35fc92b98a2aa7d2f3ba731b59d7 /e-util
parentfad9dbd630ae119022bcc2045b334aee72e85ea4 (diff)
downloadgsoc2013-evolution-b0c6583c07d925a1d344170a6142ff12df67d428.tar
gsoc2013-evolution-b0c6583c07d925a1d344170a6142ff12df67d428.tar.gz
gsoc2013-evolution-b0c6583c07d925a1d344170a6142ff12df67d428.tar.bz2
gsoc2013-evolution-b0c6583c07d925a1d344170a6142ff12df67d428.tar.lz
gsoc2013-evolution-b0c6583c07d925a1d344170a6142ff12df67d428.tar.xz
gsoc2013-evolution-b0c6583c07d925a1d344170a6142ff12df67d428.tar.zst
gsoc2013-evolution-b0c6583c07d925a1d344170a6142ff12df67d428.zip
Use newer GTK+ API to manage print settings.
Diffstat (limited to 'e-util')
-rw-r--r--e-util/e-print.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/e-util/e-print.c b/e-util/e-print.c
index 8faeafc0f5..6e5afd05f7 100644
--- a/e-util/e-print.c
+++ b/e-util/e-print.c
@@ -92,17 +92,12 @@ load_settings (GKeyFile *key_file)
GtkPrintSettings *settings;
GError *error = NULL;
- /* XXX Use gtk_print_settings_load_key_file() here once
- * GTK+ 2.14 becomes available. */
+ settings = gtk_print_settings_new ();
- if (!g_key_file_has_group (key_file, PRINT_SETTINGS_GROUP_NAME))
- return gtk_print_settings_new ();
-
- settings = gtk_print_settings_new_from_key_file (
- key_file, NULL, &error);
+ gtk_print_settings_load_key_file (
+ settings, key_file, PRINT_SETTINGS_GROUP_NAME, &error);
if (error != NULL) {
- settings = gtk_print_settings_new ();
g_warning ("%s", error->message);
g_error_free (error);
}
@@ -123,17 +118,12 @@ load_page_setup (GKeyFile *key_file)
GtkPageSetup *page_setup;
GError *error = NULL;
- /* XXX Use gtk_page_setup_load_key_file() here once
- * GTK+ 2.14 becomes available. */
-
- if (!g_key_file_has_group (key_file, PAGE_SETUP_GROUP_NAME))
- return gtk_page_setup_new ();
+ page_setup = gtk_page_setup_new ();
- page_setup = gtk_page_setup_new_from_key_file (
- key_file, NULL, &error);
+ gtk_page_setup_load_key_file (
+ page_setup, key_file, PAGE_SETUP_GROUP_NAME, &error);
if (error != NULL) {
- page_setup = gtk_page_setup_new ();
g_warning ("%s", error->message);
g_error_free (error);
}