diff options
author | Rodrigo Moya <rodrigo@ximian.com> | 2004-01-25 06:45:53 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@src.gnome.org> | 2004-01-25 06:45:53 +0800 |
commit | e1e8526ea808a8d30251b7c871ffcd820b7c223d (patch) | |
tree | d61ece3425ac551468a7f8490d9f5592a744615a /calendar/gui/gnome-cal.c | |
parent | 419c24ed2a3901b126c461aa91b57a8ee3451d02 (diff) | |
download | gsoc2013-evolution-e1e8526ea808a8d30251b7c871ffcd820b7c223d.tar.gz gsoc2013-evolution-e1e8526ea808a8d30251b7c871ffcd820b7c223d.tar.zst gsoc2013-evolution-e1e8526ea808a8d30251b7c871ffcd820b7c223d.zip |
new function.
2004-01-24 Rodrigo Moya <rodrigo@ximian.com>
* gui/calendar-component.[ch]
(calendar_component_peek_source_selector): new function.
* gui/tasks-component.[ch]
(tasks_component_peek_source_selector): new function.
* gui/e-tasks.c (backend_died_cb):
* gui/gnome-cal.c (backend_died_cb): don't tell the user to restart
Evolution, there is no need now, just unselecting and selecting
back the calendar loads it again. Also, remove the crashed client
from the list of loaded clients. Also, unselect the source on
the source selector.
svn path=/trunk/; revision=24417
Diffstat (limited to 'calendar/gui/gnome-cal.c')
-rw-r--r-- | calendar/gui/gnome-cal.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index 22eab34e2a..c703a188c0 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -1908,24 +1908,28 @@ backend_died_cb (ECal *client, gpointer data) gcal = GNOME_CALENDAR (data); priv = gcal->priv; - /* FIXME This doesn't remove the calendar from the list or anything */ uristr = get_uri_without_password (e_cal_get_uri (client)); if (client == priv->task_pad_client) { - message = g_strdup_printf (_("The task backend for\n%s\n has crashed. " - "You will have to restart Evolution in order " - "to use it again"), - uristr); + message = g_strdup_printf (_("The task backend for\n%s\n has crashed."), uristr); e_calendar_table_set_status_message (E_CALENDAR_TABLE (priv->todo), NULL); + + g_object_unref (priv->task_pad_client); + priv->task_pad_client = NULL; } else { int i; - message = g_strdup_printf (_("The calendar backend for\n%s\n has crashed. " - "You will have to restart Evolution in order " - "to use it again"), - uristr); + message = g_strdup_printf (_("The calendar backend for\n%s\n has crashed."), uristr); for (i = 0; i < GNOME_CAL_LAST_VIEW; i++) e_calendar_view_set_status_message (priv->views[i], NULL); + + e_source_selector_unselect_source ( + calendar_component_peek_source_selector (calendar_component_peek ()), + e_cal_get_source (client)); + + g_hash_table_remove (priv->clients, e_cal_get_uri (client)); + priv->clients_list = g_list_remove (priv->clients_list, client); + g_object_unref (client); } dialog = gtk_message_dialog_new (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gcal))), |