diff options
author | Rodrigo Moya <rodrigo@ximian.com> | 2002-08-13 18:01:41 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@src.gnome.org> | 2002-08-13 18:01:41 +0800 |
commit | ed6627e626c9fea8e3f16a2a4e9bc68d08f2d747 (patch) | |
tree | ffad128589a7cb95d361608151d26ae0770cfa94 /calendar/gui/gnome-cal.c | |
parent | 91b1dab521698c031db169f2385d37e05a995229 (diff) | |
download | gsoc2013-evolution-ed6627e626c9fea8e3f16a2a4e9bc68d08f2d747.tar gsoc2013-evolution-ed6627e626c9fea8e3f16a2a4e9bc68d08f2d747.tar.gz gsoc2013-evolution-ed6627e626c9fea8e3f16a2a4e9bc68d08f2d747.tar.bz2 gsoc2013-evolution-ed6627e626c9fea8e3f16a2a4e9bc68d08f2d747.tar.lz gsoc2013-evolution-ed6627e626c9fea8e3f16a2a4e9bc68d08f2d747.tar.xz gsoc2013-evolution-ed6627e626c9fea8e3f16a2a4e9bc68d08f2d747.tar.zst gsoc2013-evolution-ed6627e626c9fea8e3f16a2a4e9bc68d08f2d747.zip |
set status message on ECalendarTable when opening the tasks.
2002-08-13 Rodrigo Moya <rodrigo@ximian.com>
* 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
Diffstat (limited to 'calendar/gui/gnome-cal.c')
-rw-r--r-- | calendar/gui/gnome-cal.c | 24 |
1 files changed, 23 insertions, 1 deletions
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; } |