diff options
author | Rodrigo Moya <rodrigo@ximian.com> | 2001-10-20 01:43:31 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@src.gnome.org> | 2001-10-20 01:43:31 +0800 |
commit | 3e517a00308004b021cb5a02fa8ae17dfc30040f (patch) | |
tree | d98e620bd7c9e9e8131f07fc1cd09bfafc0c3c7a /calendar/gui | |
parent | cc15e1dca6d00f6ec693c70117ed3bd48ec68291 (diff) | |
download | gsoc2013-evolution-3e517a00308004b021cb5a02fa8ae17dfc30040f.tar gsoc2013-evolution-3e517a00308004b021cb5a02fa8ae17dfc30040f.tar.gz gsoc2013-evolution-3e517a00308004b021cb5a02fa8ae17dfc30040f.tar.bz2 gsoc2013-evolution-3e517a00308004b021cb5a02fa8ae17dfc30040f.tar.lz gsoc2013-evolution-3e517a00308004b021cb5a02fa8ae17dfc30040f.tar.xz gsoc2013-evolution-3e517a00308004b021cb5a02fa8ae17dfc30040f.tar.zst gsoc2013-evolution-3e517a00308004b021cb5a02fa8ae17dfc30040f.zip |
make it a public function
2001-10-19 Rodrigo Moya <rodrigo@ximian.com>
* gui/calendar-model.c (calendar_model_set_status_message): make
it a public function
* gui/e-tasks.c (e_tasks_open): display progress messages
(cal_opened_cb): clean up status bar messages
* gui/gnome-cal.c (gnome_calendar_open): display progress messages
(client_cal_opened_cb): clean up status bar messages
svn path=/trunk/; revision=13796
Diffstat (limited to 'calendar/gui')
-rw-r--r-- | calendar/gui/calendar-model.c | 11 | ||||
-rw-r--r-- | calendar/gui/calendar-model.h | 2 | ||||
-rw-r--r-- | calendar/gui/e-tasks.c | 10 | ||||
-rw-r--r-- | calendar/gui/gnome-cal.c | 7 |
4 files changed, 24 insertions, 6 deletions
diff --git a/calendar/gui/calendar-model.c b/calendar/gui/calendar-model.c index cb152a5e6b..6b0dd31540 100644 --- a/calendar/gui/calendar-model.c +++ b/calendar/gui/calendar-model.c @@ -108,7 +108,6 @@ static void *calendar_model_initialize_value (ETableModel *etm, int col); static gboolean calendar_model_value_is_empty (ETableModel *etm, int col, const void *value); static char * calendar_model_value_to_string (ETableModel *etm, int col, const void *value); static int remove_object (CalendarModel *model, const char *uid); -static void set_status_message (CalendarModel *model, const char *message); static void ensure_task_complete (CalComponent *comp, time_t completed_date); static void ensure_task_not_complete (CalComponent *comp); @@ -1869,7 +1868,7 @@ query_query_done_cb (CalQuery *query, CalQueryDoneStatus status, const char *err /* FIXME */ - set_status_message (model, NULL); + calendar_model_set_status_message (model, NULL); if (status != CAL_QUERY_DONE_SUCCESS) fprintf (stderr, "query done: %s\n", error_str); @@ -1885,7 +1884,7 @@ query_eval_error_cb (CalQuery *query, const char *error_str, gpointer data) /* FIXME */ - set_status_message (model, NULL); + calendar_model_set_status_message (model, NULL); fprintf (stderr, "eval error: %s\n", error_str); } @@ -2008,7 +2007,7 @@ update_query (CalendarModel *model) g_assert (priv->sexp != NULL); real_sexp = adjust_query_sexp (model, priv->sexp); - set_status_message (model, _("Searching")); + calendar_model_set_status_message (model, _("Searching")); priv->query = cal_client_get_query (priv->client, real_sexp); g_free (real_sexp); @@ -2102,8 +2101,8 @@ remove_object (CalendarModel *model, const char *uid) #define EVOLUTION_TASKS_PROGRESS_IMAGE "evolution-tasks-mini.png" static GdkPixbuf *progress_icon[2] = { NULL, NULL }; -static void -set_status_message (CalendarModel *model, const char *message) +void +calendar_model_set_status_message (CalendarModel *model, const char *message) { extern EvolutionShellClient *global_shell_client; /* ugly */ CalendarModelPrivate *priv; diff --git a/calendar/gui/calendar-model.h b/calendar/gui/calendar-model.h index 6bda61f49d..b0d2f67bba 100644 --- a/calendar/gui/calendar-model.h +++ b/calendar/gui/calendar-model.h @@ -91,6 +91,8 @@ void calendar_model_set_timezone (CalendarModel *model, void calendar_model_set_default_category (CalendarModel *model, const char *default_category); +void calendar_model_set_status_message (CalendarModel *model, + const char *message); diff --git a/calendar/gui/e-tasks.c b/calendar/gui/e-tasks.c index d79ae1cb90..02cf6b3f47 100644 --- a/calendar/gui/e-tasks.c +++ b/calendar/gui/e-tasks.c @@ -318,6 +318,7 @@ e_tasks_open (ETasks *tasks, { ETasksPrivate *priv; char *config_filename; + char *message; g_return_val_if_fail (tasks != NULL, FALSE); g_return_val_if_fail (E_IS_TASKS (tasks), FALSE); @@ -325,6 +326,12 @@ e_tasks_open (ETasks *tasks, priv = tasks->priv; + message = g_strdup_printf (_("Opening tasks at %s"), file); + calendar_model_set_status_message ( + e_calendar_table_get_model (priv->tasks_view), + message); + g_free (message); + if (!cal_client_open_calendar (priv->client, file, FALSE)) { g_message ("e_tasks_open(): Could not issue the request"); return FALSE; @@ -375,6 +382,9 @@ cal_opened_cb (CalClient *client, tasks = E_TASKS (data); priv = tasks->priv; + calendar_model_set_status_message ( + e_calendar_table_get_model (priv->tasks_view), NULL); + switch (status) { case CAL_CLIENT_OPEN_SUCCESS: /* Everything is OK */ diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index d220db17dd..b1f7c9470c 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -1341,6 +1341,8 @@ client_cal_opened_cb (CalClient *client, CalClientOpenStatus status, gpointer da gcal = GNOME_CALENDAR (data); priv = gcal->priv; + e_week_view_set_status_message (priv->week_view, NULL); + switch (status) { case CAL_CLIENT_OPEN_SUCCESS: if (client == priv->client) @@ -1657,6 +1659,7 @@ gnome_calendar_open (GnomeCalendar *gcal, const char *str_uri) char *tasks_uri; gboolean success; EUri *uri; + char *message; g_return_val_if_fail (gcal != NULL, FALSE); g_return_val_if_fail (GNOME_IS_CALENDAR (gcal), FALSE); @@ -1672,6 +1675,10 @@ gnome_calendar_open (GnomeCalendar *gcal, const char *str_uri) cal_client_get_load_state (priv->task_pad_client) == CAL_CLIENT_LOAD_NOT_LOADED, FALSE); + message = g_strdup_printf (_("Opening calendar at %s"), str_uri); + e_week_view_set_status_message (priv->week_view, message); + g_free (message); + if (!cal_client_open_calendar (priv->client, str_uri, FALSE)) { g_message ("gnome_calendar_open(): Could not issue the request"); return FALSE; |