aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook/gui/widgets')
-rw-r--r--addressbook/gui/widgets/e-addressbook-model.c2
-rw-r--r--addressbook/gui/widgets/e-addressbook-table-adapter.c2
-rw-r--r--addressbook/gui/widgets/e-addressbook-view.c2
-rw-r--r--addressbook/gui/widgets/eab-gui-util.c11
-rw-r--r--addressbook/gui/widgets/eab-gui-util.h1
5 files changed, 12 insertions, 6 deletions
diff --git a/addressbook/gui/widgets/e-addressbook-model.c b/addressbook/gui/widgets/e-addressbook-model.c
index 00c2357b48..683eed3499 100644
--- a/addressbook/gui/widgets/e-addressbook-model.c
+++ b/addressbook/gui/widgets/e-addressbook-model.c
@@ -364,7 +364,7 @@ client_view_ready_cb (GObject *source_object,
client_view = NULL;
if (error) {
- eab_error_dialog (NULL, _("Error getting book view"), error);
+ eab_error_dialog (NULL, NULL, _("Error getting book view"), error);
g_error_free (error);
return;
}
diff --git a/addressbook/gui/widgets/e-addressbook-table-adapter.c b/addressbook/gui/widgets/e-addressbook-table-adapter.c
index ee1ba7c75b..a7f1f6bb5b 100644
--- a/addressbook/gui/widgets/e-addressbook-table-adapter.c
+++ b/addressbook/gui/widgets/e-addressbook-table-adapter.c
@@ -200,7 +200,7 @@ contact_modified_cb (EBookClient *book_client,
gpointer user_data)
{
if (error)
- eab_error_dialog (NULL, _("Error modifying card"), error);
+ eab_error_dialog (NULL, NULL, _("Error modifying card"), error);
}
static void
diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c
index b2dd4c94a3..38d7196217 100644
--- a/addressbook/gui/widgets/e-addressbook-view.c
+++ b/addressbook/gui/widgets/e-addressbook-view.c
@@ -1249,7 +1249,7 @@ report_and_free_error_if_any (GError *error)
e_shell_get_active_window (NULL),
"addressbook:contact-delete-error-perm", NULL);
} else {
- eab_error_dialog (NULL, _("Failed to delete contact"), error);
+ eab_error_dialog (NULL, NULL, _("Failed to delete contact"), error);
}
g_error_free (error);
diff --git a/addressbook/gui/widgets/eab-gui-util.c b/addressbook/gui/widgets/eab-gui-util.c
index 2967ca9e16..5f155ad1b1 100644
--- a/addressbook/gui/widgets/eab-gui-util.c
+++ b/addressbook/gui/widgets/eab-gui-util.c
@@ -77,6 +77,7 @@ typedef enum {
void
eab_error_dialog (EAlertSink *alert_sink,
+ GtkWindow *parent,
const gchar *msg,
const GError *error)
{
@@ -86,11 +87,15 @@ eab_error_dialog (EAlertSink *alert_sink,
alert_sink,
"addressbook:generic-error",
msg, error->message, NULL);
- else
+ else {
+ if (!parent)
+ parent = e_shell_get_active_window (NULL);
+
e_alert_run_dialog_for_args (
- e_shell_get_active_window (NULL),
+ parent,
"addressbook:generic-error",
msg, error->message, NULL);
+ }
}
}
@@ -490,7 +495,7 @@ contact_added_cb (EBookClient *book_client,
if (error && !g_error_matches (error, E_CLIENT_ERROR, E_CLIENT_ERROR_CANCELLED) &&
!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
process->book_status = FALSE;
- eab_error_dialog (process->alert_sink, _("Error adding contact"), error);
+ eab_error_dialog (process->alert_sink, NULL, _("Error adding contact"), error);
} else if (g_error_matches (error, E_CLIENT_ERROR, E_CLIENT_ERROR_CANCELLED) ||
g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
process->book_status = FALSE;
diff --git a/addressbook/gui/widgets/eab-gui-util.h b/addressbook/gui/widgets/eab-gui-util.h
index d6c6cb24da..f169f8b8d3 100644
--- a/addressbook/gui/widgets/eab-gui-util.h
+++ b/addressbook/gui/widgets/eab-gui-util.h
@@ -32,6 +32,7 @@
G_BEGIN_DECLS
void eab_error_dialog (EAlertSink *alert_sink,
+ GtkWindow *parent,
const gchar *msg,
const GError *error);
void eab_load_error_dialog (GtkWidget *parent,