diff options
author | Rodrigo Moya <rodrigo@ximian.com> | 2004-02-19 00:24:59 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@src.gnome.org> | 2004-02-19 00:24:59 +0800 |
commit | ccc2ccced0cf302871a580b7964b1006fd1197da (patch) | |
tree | e02c01156378ddd28d9a95087604b235d5f03976 /calendar/gui/gnome-cal.c | |
parent | b85cbb139e63d97b646aca22866aa1e440b386c8 (diff) | |
download | gsoc2013-evolution-ccc2ccced0cf302871a580b7964b1006fd1197da.tar.gz gsoc2013-evolution-ccc2ccced0cf302871a580b7964b1006fd1197da.tar.zst gsoc2013-evolution-ccc2ccced0cf302871a580b7964b1006fd1197da.zip |
set the task pad client to NULL if opening it failed. Show more verbose
2004-02-18 Rodrigo Moya <rodrigo@ximian.com>
* gui/gnome-cal.c (client_cal_opened_cb): set the task pad client to NULL
if opening it failed. Show more verbose status bar messages.
svn path=/trunk/; revision=24780
Diffstat (limited to 'calendar/gui/gnome-cal.c')
-rw-r--r-- | calendar/gui/gnome-cal.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index c994f3980b..491756bf6b 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -1032,6 +1032,9 @@ setup_widgets (GnomeCalendar *gcal) GTK_WIDGET (priv->views[i]), gtk_label_new ("")); gtk_widget_show (GTK_WIDGET (priv->views[i])); + + /* make sure we set the initial queries for the views */ + //adjust_e_cal_view_for_view (E_CALENDAR_VIEW (priv->views[i]), ""); } } @@ -1742,18 +1745,29 @@ copy_categories (GPtrArray *categories) static void client_cal_opened_cb (ECal *ecal, ECalendarStatus status, GnomeCalendar *gcal) { + char *msg; GnomeCalendarPrivate *priv = gcal->priv; e_calendar_view_set_status_message (E_CALENDAR_VIEW (gnome_calendar_get_current_view_widget (gcal)), NULL); if (status == E_CALENDAR_STATUS_OK) { if (ecal == priv->task_pad_client) { + msg = g_strdup_printf (_("Loading tasks at %s"), e_cal_get_uri (ecal)); + e_calendar_view_set_status_message (E_CALENDAR_VIEW (gnome_calendar_get_current_view_widget (gcal)), msg); + g_free (msg); + e_cal_model_add_client (e_calendar_table_get_model (E_CALENDAR_TABLE (priv->todo)), priv->task_pad_client); + e_calendar_view_set_status_message (E_CALENDAR_VIEW (gnome_calendar_get_current_view_widget (gcal)), NULL); + } else { int i; + msg = g_strdup_printf (_("Loading appointments at %s"), e_cal_get_uri (ecal)); + e_calendar_view_set_status_message (E_CALENDAR_VIEW (gnome_calendar_get_current_view_widget (gcal)), msg); + g_free (msg); + /* add client to the views */ for (i = 0; i < GNOME_CAL_LAST_VIEW; i++) { ECalModel *model; @@ -1764,9 +1778,13 @@ client_cal_opened_cb (ECal *ecal, ECalendarStatus status, GnomeCalendar *gcal) /* update date navigator query */ update_query (gcal); + + e_calendar_view_set_status_message (E_CALENDAR_VIEW (gnome_calendar_get_current_view_widget (gcal)), NULL); } } else { - if (ecal != priv->task_pad_client) { + if (ecal == priv->task_pad_client) + priv->task_pad_client = NULL; + else { gpointer orig_uid; gpointer orig_client; |