aboutsummaryrefslogtreecommitdiffstats
path: root/modules/calendar/e-cal-shell-sidebar.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2010-12-15 00:44:16 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:41:11 +0800
commit4231716442dc6bca34a563a17c068d126b37ea7c (patch)
tree53d1367972f62f1f867fcf0f06909af0b31c2484 /modules/calendar/e-cal-shell-sidebar.c
parentf18f55f251bcf12d7320b2f442daa0dcb1c40908 (diff)
downloadgsoc2013-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 'modules/calendar/e-cal-shell-sidebar.c')
-rw-r--r--modules/calendar/e-cal-shell-sidebar.c13
1 files changed, 3 insertions, 10 deletions
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);