aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/addressbook/e-book-shell-view-private.c11
-rw-r--r--modules/calendar/e-cal-shell-sidebar.c13
-rw-r--r--modules/calendar/e-memo-shell-sidebar.c13
-rw-r--r--modules/calendar/e-task-shell-sidebar.c13
4 files changed, 18 insertions, 32 deletions
diff --git a/modules/addressbook/e-book-shell-view-private.c b/modules/addressbook/e-book-shell-view-private.c
index 097e6128d5..9228905323 100644
--- a/modules/addressbook/e-book-shell-view-private.c
+++ b/modules/addressbook/e-book-shell-view-private.c
@@ -197,8 +197,15 @@ book_shell_view_loaded_cb (ESource *source,
e_addressbook_model_set_book (model, book);
e_addressbook_model_force_folder_bar_message (model);
- } else if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
- eab_load_error_dialog (NULL /* XXX */, source, error);
+ } else if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
+ EShellView *shell_view;
+ EAlertSink *alert_sink;
+
+ shell_view = e_addressbook_view_get_shell_view (view);
+ alert_sink = E_ALERT_SINK (e_shell_view_get_shell_content (shell_view));
+
+ eab_load_error_dialog (NULL, alert_sink, source, error);
+ }
if (error != NULL)
g_error_free (error);
diff --git a/modules/calendar/e-cal-shell-sidebar.c b/modules/calendar/e-cal-shell-sidebar.c
index 81ab858186..45bb5a37fb 100644
--- a/modules/calendar/e-cal-shell-sidebar.c
+++ b/modules/calendar/e-cal-shell-sidebar.c
@@ -161,13 +161,11 @@ cal_shell_sidebar_client_opened_cb (ECalShellSidebar *cal_shell_sidebar,
ECal *client)
{
EShellView *shell_view;
- EShellWindow *shell_window;
EShellSidebar *shell_sidebar;
const gchar *message;
shell_sidebar = E_SHELL_SIDEBAR (cal_shell_sidebar);
shell_view = e_shell_sidebar_get_shell_view (shell_sidebar);
- shell_window = e_shell_view_get_shell_window (shell_view);
if (g_error_matches (error, E_CALENDAR_ERROR,
E_CALENDAR_STATUS_AUTHENTICATION_FAILED) ||
@@ -188,16 +186,14 @@ cal_shell_sidebar_client_opened_cb (ECalShellSidebar *cal_shell_sidebar,
return;
case E_CALENDAR_STATUS_REPOSITORY_OFFLINE:
- e_alert_run_dialog_for_args (
- GTK_WINDOW (shell_window),
+ e_alert_submit (E_ALERT_SINK (e_shell_view_get_shell_content (shell_view)),
"calendar:prompt-no-contents-offline-calendar",
NULL);
/* fall through */
default:
if (error->code != E_CALENDAR_STATUS_REPOSITORY_OFFLINE) {
- e_alert_run_dialog_for_args (
- GTK_WINDOW (shell_window),
+ e_alert_submit (E_ALERT_SINK (e_shell_view_get_shell_content (shell_view)),
"calendar:failed-open-calendar",
error->message, NULL);
}
@@ -226,7 +222,6 @@ cal_shell_sidebar_default_loaded_cb (ESource *source,
EShellSidebar *shell_sidebar)
{
ECalShellSidebarPrivate *priv;
- EShellWindow *shell_window;
EShellView *shell_view;
ECal *client;
GError *error = NULL;
@@ -234,7 +229,6 @@ cal_shell_sidebar_default_loaded_cb (ESource *source,
priv = E_CAL_SHELL_SIDEBAR_GET_PRIVATE (shell_sidebar);
shell_view = e_shell_sidebar_get_shell_view (shell_sidebar);
- shell_window = e_shell_view_get_shell_window (shell_view);
client = e_load_cal_source_finish (source, result, &error);
@@ -243,8 +237,7 @@ cal_shell_sidebar_default_loaded_cb (ESource *source,
goto exit;
} else if (error != NULL) {
- e_alert_run_dialog_for_args (
- GTK_WINDOW (shell_window),
+ e_alert_submit (E_ALERT_SINK (e_shell_view_get_shell_content (shell_view)),
"calendar:failed-open-calendar",
error->message, NULL);
g_error_free (error);
diff --git a/modules/calendar/e-memo-shell-sidebar.c b/modules/calendar/e-memo-shell-sidebar.c
index 14d4b36e11..c22cff35dc 100644
--- a/modules/calendar/e-memo-shell-sidebar.c
+++ b/modules/calendar/e-memo-shell-sidebar.c
@@ -169,13 +169,11 @@ memo_shell_sidebar_client_opened_cb (EMemoShellSidebar *memo_shell_sidebar,
ECal *client)
{
EShellView *shell_view;
- EShellWindow *shell_window;
EShellSidebar *shell_sidebar;
const gchar *message;
shell_sidebar = E_SHELL_SIDEBAR (memo_shell_sidebar);
shell_view = e_shell_sidebar_get_shell_view (shell_sidebar);
- shell_window = e_shell_view_get_shell_window (shell_view);
if (g_error_matches (error, E_CALENDAR_ERROR,
E_CALENDAR_STATUS_AUTHENTICATION_FAILED) ||
@@ -196,16 +194,14 @@ memo_shell_sidebar_client_opened_cb (EMemoShellSidebar *memo_shell_sidebar,
return;
case E_CALENDAR_STATUS_REPOSITORY_OFFLINE:
- e_alert_run_dialog_for_args (
- GTK_WINDOW (shell_window),
+ e_alert_submit (get_alert_sink (shell_view),
"calendar:prompt-no-contents-offline-memos",
NULL);
/* fall through */
default:
if (error->code != E_CALENDAR_STATUS_REPOSITORY_OFFLINE) {
- e_alert_run_dialog_for_args (
- GTK_WINDOW (shell_window),
+ e_alert_submit (get_alert_sink (shell_view),
"calendar:failed-open-memos",
error->message, NULL);
}
@@ -234,7 +230,6 @@ memo_shell_sidebar_default_loaded_cb (ESource *source,
EShellSidebar *shell_sidebar)
{
EMemoShellSidebarPrivate *priv;
- EShellWindow *shell_window;
EShellView *shell_view;
ECal *client;
GError *error = NULL;
@@ -242,7 +237,6 @@ memo_shell_sidebar_default_loaded_cb (ESource *source,
priv = E_MEMO_SHELL_SIDEBAR_GET_PRIVATE (shell_sidebar);
shell_view = e_shell_sidebar_get_shell_view (shell_sidebar);
- shell_window = e_shell_view_get_shell_window (shell_view);
client = e_load_cal_source_finish (source, result, &error);
@@ -251,8 +245,7 @@ memo_shell_sidebar_default_loaded_cb (ESource *source,
goto exit;
} else if (error != NULL) {
- e_alert_run_dialog_for_args (
- GTK_WINDOW (shell_window),
+ e_alert_submit (get_alert_sink (shell_view),
"calendar:failed-open-memos",
error->message, NULL);
g_error_free (error);
diff --git a/modules/calendar/e-task-shell-sidebar.c b/modules/calendar/e-task-shell-sidebar.c
index 99bc67f8ad..a688da41cd 100644
--- a/modules/calendar/e-task-shell-sidebar.c
+++ b/modules/calendar/e-task-shell-sidebar.c
@@ -169,13 +169,11 @@ task_shell_sidebar_client_opened_cb (ETaskShellSidebar *task_shell_sidebar,
ECal *client)
{
EShellView *shell_view;
- EShellWindow *shell_window;
EShellSidebar *shell_sidebar;
const gchar *message;
shell_sidebar = E_SHELL_SIDEBAR (task_shell_sidebar);
shell_view = e_shell_sidebar_get_shell_view (shell_sidebar);
- shell_window = e_shell_view_get_shell_window (shell_view);
if (g_error_matches (error, E_CALENDAR_ERROR,
E_CALENDAR_STATUS_AUTHENTICATION_FAILED) ||
@@ -196,16 +194,14 @@ task_shell_sidebar_client_opened_cb (ETaskShellSidebar *task_shell_sidebar,
return;
case E_CALENDAR_STATUS_REPOSITORY_OFFLINE:
- e_alert_run_dialog_for_args (
- GTK_WINDOW (shell_window),
+ e_alert_submit (get_alert_sink (shell_view),
"calendar:prompt-no-contents-offline-tasks",
NULL);
/* fall through */
default:
if (error->code != E_CALENDAR_STATUS_REPOSITORY_OFFLINE) {
- e_alert_run_dialog_for_args (
- GTK_WINDOW (shell_window),
+ e_alert_submit (get_alert_sink (shell_view),
"calendar:failed-open-tasks",
error->message, NULL);
}
@@ -234,7 +230,6 @@ task_shell_sidebar_default_loaded_cb (ESource *source,
EShellSidebar *shell_sidebar)
{
ETaskShellSidebarPrivate *priv;
- EShellWindow *shell_window;
EShellView *shell_view;
ECal *client;
GError *error = NULL;
@@ -242,7 +237,6 @@ task_shell_sidebar_default_loaded_cb (ESource *source,
priv = E_TASK_SHELL_SIDEBAR_GET_PRIVATE (shell_sidebar);
shell_view = e_shell_sidebar_get_shell_view (shell_sidebar);
- shell_window = e_shell_view_get_shell_window (shell_view);
client = e_load_cal_source_finish (source, result, &error);
@@ -251,8 +245,7 @@ task_shell_sidebar_default_loaded_cb (ESource *source,
goto exit;
} else if (error != NULL) {
- e_alert_run_dialog_for_args (
- GTK_WINDOW (shell_window),
+ e_alert_submit (get_alert_sink (shell_view),
"calendar:failed-open-tasks",
error->message, NULL);
g_error_free (error);