From ed6627e626c9fea8e3f16a2a4e9bc68d08f2d747 Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Tue, 13 Aug 2002 10:01:41 +0000 Subject: set status message on ECalendarTable when opening the tasks. 2002-08-13 Rodrigo Moya * gui/gnome-cal.c (gnome_calendar_open): set status message on ECalendarTable when opening the tasks. (client_cal_opened_cb): set ECalendarTable status message to NULL when we open the tasks folder. Also, clear up calendar status message in all cases, not only if the folder was opened successfully. svn path=/trunk/; revision=17768 --- calendar/ChangeLog | 8 ++++++++ calendar/gui/gnome-cal.c | 24 +++++++++++++++++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/calendar/ChangeLog b/calendar/ChangeLog index d020b76afe..2cba686ac0 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,11 @@ +2002-08-13 Rodrigo Moya + + * gui/gnome-cal.c (gnome_calendar_open): set status message on + ECalendarTable when opening the tasks. + (client_cal_opened_cb): set ECalendarTable status message to NULL + when we open the tasks folder. Also, clear up calendar status message + in all cases, not only if the folder was opened successfully. + 2002-08-13 Rodrigo Moya * gui/gnome-cal.c (gnome_calendar_open): set status message to NULL diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index 4e62ea8cdd..d26ad60e56 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -1556,11 +1556,18 @@ client_cal_opened_cb (CalClient *client, CalClientOpenStatus status, gpointer da gcal = GNOME_CALENDAR (data); priv = gcal->priv; + if (client == priv->client) { + e_week_view_set_status_message (E_WEEK_VIEW (priv->week_view), NULL); + } + else if (client == priv->task_pad_client) { + calendar_model_set_status_message ( + e_calendar_table_get_model (E_CALENDAR_TABLE (priv->todo)), NULL); + } + switch (status) { case CAL_CLIENT_OPEN_SUCCESS: /* If this is the main CalClient, update the Date Navigator. */ if (client == priv->client) { - e_week_view_set_status_message (E_WEEK_VIEW (priv->week_view), NULL); update_query (gcal); } @@ -1931,16 +1938,29 @@ gnome_calendar_open (GnomeCalendar *gcal, const char *str_uri) if (!uri) { tasks_uri = g_strdup_printf ("%s/local/Tasks/tasks.ics", evolution_dir); + message = g_strdup_printf (_("Opening tasks at %s"), tasks_uri); + calendar_model_set_status_message ( + e_calendar_table_get_model (E_CALENDAR_TABLE (priv->todo)), message); + g_free (message); + success = cal_client_open_calendar (priv->task_pad_client, tasks_uri, FALSE); g_free (tasks_uri); } else { if (!g_strncasecmp (uri->protocol, "file", 4)) { tasks_uri = g_strdup_printf ("%s/local/Tasks/tasks.ics", evolution_dir); + message = g_strdup_printf (_("Opening tasks at %s"), tasks_uri); + calendar_model_set_status_message ( + e_calendar_table_get_model (E_CALENDAR_TABLE (priv->todo)), message); + g_free (message); + success = cal_client_open_calendar (priv->task_pad_client, tasks_uri, FALSE); g_free (tasks_uri); } else { + calendar_model_set_status_message ( + e_calendar_table_get_model (E_CALENDAR_TABLE (priv->todo)), + _("Opening default tasks folder")); success = cal_client_open_default_tasks (priv->task_pad_client, FALSE); } } @@ -1950,6 +1970,8 @@ gnome_calendar_open (GnomeCalendar *gcal, const char *str_uri) if (!success) { g_message ("gnome_calendar_open(): Could not issue the request"); + calendar_model_set_status_message ( + e_calendar_table_get_model (E_CALENDAR_TABLE (priv->todo)), NULL); return FALSE; } -- cgit v1.2.3