aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--e-util/e-print.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/e-util/e-print.c b/e-util/e-print.c
index 756381f805..dd5a56aa16 100644
--- a/e-util/e-print.c
+++ b/e-util/e-print.c
@@ -94,8 +94,9 @@ load_settings (GKeyFile *key_file)
settings = gtk_print_settings_new ();
- gtk_print_settings_load_key_file (
- settings, key_file, PRINT_SETTINGS_GROUP_NAME, &error);
+ if (g_key_file_has_group (key_file, PRINT_SETTINGS_GROUP_NAME))
+ gtk_print_settings_load_key_file (
+ settings, key_file, PRINT_SETTINGS_GROUP_NAME, &error);
if (error != NULL) {
g_warning ("%s", error->message);
@@ -127,17 +128,12 @@ static GtkPageSetup *
load_page_setup (GKeyFile *key_file)
{
GtkPageSetup *page_setup;
- GError *error = NULL;
page_setup = gtk_page_setup_new ();
- gtk_page_setup_load_key_file (
- page_setup, key_file, PAGE_SETUP_GROUP_NAME, &error);
-
- if (error != NULL) {
- g_warning ("%s", error->message);
- g_error_free (error);
- }
+ if (g_key_file_has_group (key_file, PAGE_SETUP_GROUP_NAME))
+ gtk_page_setup_load_key_file (
+ page_setup, key_file, PAGE_SETUP_GROUP_NAME, NULL);
return page_setup;
}