aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/widgets/eab-gui-util.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2013-08-07 15:38:51 +0800
committerMilan Crha <mcrha@redhat.com>2013-08-07 15:38:51 +0800
commitc40b539296a04f877861de4610f5c09a7262a31a (patch)
tree7fb119a873db0c6c5049bb5b842df047d7d069dc /addressbook/gui/widgets/eab-gui-util.c
parent9499cbd238a69a0800ecbee7bf3229d330c1ac9c (diff)
downloadgsoc2013-evolution-c40b539296a04f877861de4610f5c09a7262a31a.tar
gsoc2013-evolution-c40b539296a04f877861de4610f5c09a7262a31a.tar.gz
gsoc2013-evolution-c40b539296a04f877861de4610f5c09a7262a31a.tar.bz2
gsoc2013-evolution-c40b539296a04f877861de4610f5c09a7262a31a.tar.lz
gsoc2013-evolution-c40b539296a04f877861de4610f5c09a7262a31a.tar.xz
gsoc2013-evolution-c40b539296a04f877861de4610f5c09a7262a31a.tar.zst
gsoc2013-evolution-c40b539296a04f877861de4610f5c09a7262a31a.zip
[Addressbook] Show editor errors above editor window
An address book editor error was shown about active EShell's window, which means switching to other application and back made the editor in the background, but, more importantly, the editor could be selected and the error was in the background, thus it seemed like being stuck, it didn't respond to any button click, until the error was dismissed.
Diffstat (limited to 'addressbook/gui/widgets/eab-gui-util.c')
-rw-r--r--addressbook/gui/widgets/eab-gui-util.c11
1 files changed, 8 insertions, 3 deletions
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;