From d6c9d8bf84fc5d59c4a8e0f6d1693627ef7414e5 Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Sat, 10 Jan 2004 20:19:08 +0000 Subject: added missing headers. 2003-01-10 Rodrigo Moya * gui/alarm-notify/notify-main.c: added missing headers. * gui/alarm-notify/alarm-notify.c (alarm_notify_remove_calendar): use the correct variable when calling alarm_queue_remove_client(). * gui/calendar-component.c (impl_upgradeFromVersion): removed redundant variable declarations. * gui/migration.c (process_old_dir): * gui/e-timezone-entry.c (e_timezone_entry_mnemonic_activate): * gui/e-date-time-list.c (e_date_time_list_finalize): * gui/e-alarm-list.c (e_alarm_list_finalize): fixed warnings. * gui/e-calendar-table.c: added missing prototypes at the top to avoid warnings. * gui/e-week-view.c (e_week_view_scroll_a_step): * gui/e-day-view.c (e_day_view_event_move): directly return in the default: case. * gui/e-tasks.c (setup_widgets): connect to changes on the model. (model_row_changed_cb): callback to update the HTML detailed view when the currently selected task changes. (client_obj_updated_cb): removed unused function. (set_status_message): changed to accept a variable list of arguments. (e_tasks_add_todo_uri): display status messages and get error message from backend and display it in a dialog. (cal_opened_cb, load_error, method_error, permission_error): removed unused functions. * gui/gnome-cal.c (open_ecal): added a GnomeCalendar argument, and display status messages. (gnome_calendar_construct, gnome_calendar_add_event_source): adapted to changes in open_ecal(). svn path=/trunk/; revision=24147 --- calendar/gui/gnome-cal.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'calendar/gui/gnome-cal.c') diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index 9c78aa6641..d03354331e 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -1746,11 +1746,16 @@ copy_categories (GPtrArray *categories) } static gboolean -open_ecal (ECal *cal, gboolean only_if_exists) +open_ecal (GnomeCalendar *gcal, ECal *cal, gboolean only_if_exists) { gboolean retval; + char *msg; GError *error = NULL; + msg = g_strdup_printf (_("Opening %s"), e_cal_get_uri (cal)); + e_calendar_view_set_status_message (E_CAL_VIEW (gnome_calendar_get_current_view_widget (gcal)), msg); + g_free (msg); + retval = e_cal_open (cal, only_if_exists, &error); if (!retval) { GtkWidget *dialog; @@ -1762,8 +1767,13 @@ open_ecal (ECal *cal, gboolean only_if_exists) e_cal_get_uri (cal), error ? error->message : ""); g_error_free (error); + + gtk_dialog_run (GTK_DIALOG (dialog)); + gtk_widget_destroy (dialog); } + e_calendar_view_set_status_message (E_CAL_VIEW (gnome_calendar_get_current_view_widget (gcal)), NULL); + return retval; } @@ -1961,7 +1971,7 @@ gnome_calendar_construct (GnomeCalendar *gcal) g_free (uid); - if (!open_ecal (priv->task_pad_client, TRUE)) + if (!open_ecal (gcal, priv->task_pad_client, TRUE)) return NULL; e_cal_model_add_client (e_calendar_table_get_model (E_CALENDAR_TABLE (priv->todo)), @@ -2100,7 +2110,7 @@ gnome_calendar_add_event_source (GnomeCalendar *gcal, ESource *source) g_signal_connect (G_OBJECT (client), "backend_died", G_CALLBACK (backend_died_cb), gcal); /* FIXME Do this async? */ - if (!open_ecal (client, FALSE)) { + if (!open_ecal (gcal, client, FALSE)) { priv->clients_list = g_list_remove (priv->clients_list, client); g_signal_handlers_disconnect_matched (client, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, gcal); -- cgit