diff options
author | Milan Crha <mcrha@redhat.com> | 2010-11-02 17:16:11 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2010-11-02 17:16:11 +0800 |
commit | 2d9910210e1424bfe3d2863b9564ff8d34ecf92f (patch) | |
tree | 831be710fe800847307aff98e52b06b99ef97669 /e-util | |
parent | 870ab18eb9a040b7b6a188ec48466b41a2ca383b (diff) | |
download | gsoc2013-evolution-2d9910210e1424bfe3d2863b9564ff8d34ecf92f.tar gsoc2013-evolution-2d9910210e1424bfe3d2863b9564ff8d34ecf92f.tar.gz gsoc2013-evolution-2d9910210e1424bfe3d2863b9564ff8d34ecf92f.tar.bz2 gsoc2013-evolution-2d9910210e1424bfe3d2863b9564ff8d34ecf92f.tar.lz gsoc2013-evolution-2d9910210e1424bfe3d2863b9564ff8d34ecf92f.tar.xz gsoc2013-evolution-2d9910210e1424bfe3d2863b9564ff8d34ecf92f.tar.zst gsoc2013-evolution-2d9910210e1424bfe3d2863b9564ff8d34ecf92f.zip |
Bug #629479 - Runtime critical warnings from e-print.c
Diffstat (limited to 'e-util')
-rw-r--r-- | e-util/e-print.c | 16 |
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; } |