aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs/event-page.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-09-08 00:31:19 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-09-08 07:08:54 +0800
commit3da4948c0fc1f2c21b163f0ec456b2d99c881258 (patch)
tree479d6153d31e03cb7a65990683b5271402e5ec29 /calendar/gui/dialogs/event-page.c
parent2e5031cb4538b4819e5fce5d717668c3445df80a (diff)
downloadgsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.tar
gsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.tar.gz
gsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.tar.bz2
gsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.tar.lz
gsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.tar.xz
gsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.tar.zst
gsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.zip
Miscellaneous cleanups.
Diffstat (limited to 'calendar/gui/dialogs/event-page.c')
-rw-r--r--calendar/gui/dialogs/event-page.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c
index f1f7c05e89..f4d9658ccb 100644
--- a/calendar/gui/dialogs/event-page.c
+++ b/calendar/gui/dialogs/event-page.c
@@ -992,8 +992,10 @@ event_page_load_locations_list (CompEditorPage *page,
error = NULL;
g_file_get_contents (file_name, &contents, NULL, &error);
- if (error) {
- g_warning ("%s: Failed to load locations list: %s", G_STRFUNC, error->message);
+ if (error != NULL) {
+ g_warning (
+ "%s: Failed to load locations list: %s",
+ G_STRFUNC, error->message);
g_error_free (error);
g_free (file_name);
return;
@@ -1081,8 +1083,10 @@ event_page_save_locations_list (CompEditorPage *page,
error = NULL;
g_file_set_contents (file_name, contents->str, -1, &error);
- if (error) {
- g_warning ("%s: Failed to save locations: %s", G_STRFUNC, error->message);
+ if (error != NULL) {
+ g_warning (
+ "%s: Failed to save locations: %s",
+ G_STRFUNC, error->message);
g_error_free (error);
}
@@ -2997,8 +3001,7 @@ epage_get_client_cb (GObject *source_object,
((client != NULL) && (error == NULL)) ||
((client == NULL) && (error != NULL)));
- if (g_error_matches (error, E_CLIENT_ERROR, E_CLIENT_ERROR_CANCELLED) ||
- g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
+ if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
g_clear_error (&error);
return;
}
@@ -3006,7 +3009,7 @@ epage_get_client_cb (GObject *source_object,
editor = comp_editor_page_get_editor (COMP_EDITOR_PAGE (epage));
priv = epage->priv;
- if (error) {
+ if (error != NULL) {
GtkWidget *dialog;
ECalClient *old_client;