aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2010-11-02 17:16:11 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2010-11-10 06:33:21 +0800
commitdd7424d729859eff2c91210ead1f2bf6f8961097 (patch)
tree450390d111535bc0bc75569599e81285d094bd10 /e-util
parent6c94cad36a5142af4792562a2898e6eefcd49ee5 (diff)
downloadgsoc2013-evolution-dd7424d729859eff2c91210ead1f2bf6f8961097.tar.gz
gsoc2013-evolution-dd7424d729859eff2c91210ead1f2bf6f8961097.tar.zst
gsoc2013-evolution-dd7424d729859eff2c91210ead1f2bf6f8961097.zip
Bug #629479 - Runtime critical warnings from e-print.c
Diffstat (limited to 'e-util')
-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;
}