diff options
author | Milan Crha <mcrha@redhat.com> | 2010-12-15 00:44:16 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-06-30 00:41:11 +0800 |
commit | 4231716442dc6bca34a563a17c068d126b37ea7c (patch) | |
tree | 53d1367972f62f1f867fcf0f06909af0b31c2484 /addressbook/gui/widgets/e-addressbook-view.c | |
parent | f18f55f251bcf12d7320b2f442daa0dcb1c40908 (diff) | |
download | gsoc2013-evolution-4231716442dc6bca34a563a17c068d126b37ea7c.tar gsoc2013-evolution-4231716442dc6bca34a563a17c068d126b37ea7c.tar.gz gsoc2013-evolution-4231716442dc6bca34a563a17c068d126b37ea7c.tar.bz2 gsoc2013-evolution-4231716442dc6bca34a563a17c068d126b37ea7c.tar.lz gsoc2013-evolution-4231716442dc6bca34a563a17c068d126b37ea7c.tar.xz gsoc2013-evolution-4231716442dc6bca34a563a17c068d126b37ea7c.tar.zst gsoc2013-evolution-4231716442dc6bca34a563a17c068d126b37ea7c.zip |
Show common addressbook and calendar errors in an alert sink
Diffstat (limited to 'addressbook/gui/widgets/e-addressbook-view.c')
-rw-r--r-- | addressbook/gui/widgets/e-addressbook-view.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c index 0f7bacd781..5879d9970d 100644 --- a/addressbook/gui/widgets/e-addressbook-view.c +++ b/addressbook/gui/widgets/e-addressbook-view.c @@ -1099,11 +1099,12 @@ search_result (EAddressbookView *view, const gchar *error_msg) { EShellView *shell_view; - EShellWindow *shell_window; + EAlertSink *alert_sink; shell_view = e_addressbook_view_get_shell_view (view); - shell_window = e_shell_view_get_shell_window (shell_view); - eab_search_result_dialog (GTK_WIDGET (shell_window), status, error_msg); + alert_sink = E_ALERT_SINK (e_shell_view_get_shell_content (shell_view)); + + eab_search_result_dialog (alert_sink, status, error_msg); } static void @@ -1141,18 +1142,17 @@ static void backend_died (EAddressbookView *view) { EShellView *shell_view; - EShellWindow *shell_window; + EAlertSink *alert_sink; EAddressbookModel *model; EBook *book; shell_view = e_addressbook_view_get_shell_view (view); - shell_window = e_shell_view_get_shell_window (shell_view); + alert_sink = E_ALERT_SINK (e_shell_view_get_shell_content (shell_view)); model = e_addressbook_view_get_model (view); book = e_addressbook_model_get_book (model); - e_alert_run_dialog_for_args ( - GTK_WINDOW (shell_window), + e_alert_submit (alert_sink, "addressbook:backend-died", e_book_get_uri (book), NULL); } @@ -1277,7 +1277,7 @@ delete_contacts_cb (EBook *book, const GError *error, gpointer closure) break; default : /* Unknown error */ - eab_error_dialog (_("Failed to delete contact"), error); + eab_error_dialog (NULL, _("Failed to delete contact"), error); break; } } @@ -1520,10 +1520,12 @@ view_transfer_contacts (EAddressbookView *view, { EBook *book; GList *contacts = NULL; - GtkWindow *parent; + EShellView *shell_view; + EAlertSink *alert_sink; book = e_addressbook_model_get_book (view->priv->model); - parent = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (view))); + shell_view = e_addressbook_view_get_shell_view (view); + alert_sink = E_ALERT_SINK (e_shell_view_get_shell_content (shell_view)); if (all) { EBookQuery *query; @@ -1534,8 +1536,8 @@ view_transfer_contacts (EAddressbookView *view, e_book_query_unref (query); if (error) { - e_alert_run_dialog_for_args ( - parent, "addressbook:search-error", + e_alert_submit ( + alert_sink, "addressbook:search-error", error->message, NULL); g_error_free (error); return; @@ -1544,7 +1546,7 @@ view_transfer_contacts (EAddressbookView *view, contacts = e_addressbook_view_get_selected (view); } - eab_transfer_contacts (book, contacts, delete_from_source, parent); + eab_transfer_contacts (book, contacts, delete_from_source, alert_sink); g_object_unref (book); } |