aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/contact-list-editor/e-contact-list-editor.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 /addressbook/gui/contact-list-editor/e-contact-list-editor.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 'addressbook/gui/contact-list-editor/e-contact-list-editor.c')
-rw-r--r--addressbook/gui/contact-list-editor/e-contact-list-editor.c39
1 files changed, 27 insertions, 12 deletions
diff --git a/addressbook/gui/contact-list-editor/e-contact-list-editor.c b/addressbook/gui/contact-list-editor/e-contact-list-editor.c
index 2eac787950..4f5e397f88 100644
--- a/addressbook/gui/contact-list-editor/e-contact-list-editor.c
+++ b/addressbook/gui/contact-list-editor/e-contact-list-editor.c
@@ -1584,14 +1584,19 @@ contact_list_editor_contact_added (EABEditor *editor,
const GError *error,
EContact *contact)
{
- if (!error)
+ GtkWindow *window;
+ const gchar *message;
+
+ if (error == NULL)
return;
- 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))
return;
- eab_error_dialog (NULL, eab_editor_get_window (editor), _("Error adding list"), error);
+ window = eab_editor_get_window (editor);
+ message = _("Error adding list");
+
+ eab_error_dialog (NULL, window, message, error);
}
static void
@@ -1599,14 +1604,19 @@ contact_list_editor_contact_modified (EABEditor *editor,
const GError *error,
EContact *contact)
{
- if (!error)
+ GtkWindow *window;
+ const gchar *message;
+
+ if (error == NULL)
return;
- 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))
return;
- eab_error_dialog (NULL, eab_editor_get_window (editor), _("Error modifying list"), error);
+ window = eab_editor_get_window (editor);
+ message = _("Error modifying list");
+
+ eab_error_dialog (NULL, window, message, error);
}
static void
@@ -1614,14 +1624,19 @@ contact_list_editor_contact_deleted (EABEditor *editor,
const GError *error,
EContact *contact)
{
- if (!error)
+ GtkWindow *window;
+ const gchar *message;
+
+ if (error == NULL)
return;
- 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))
return;
- eab_error_dialog (NULL, eab_editor_get_window (editor), _("Error removing list"), error);
+ window = eab_editor_get_window (editor);
+ message = _("Error removing list");
+
+ eab_error_dialog (NULL, window, message, error);
}
static void