use a standard calendar status (backend_cal_opened_online): ditto

2003-11-11  JP Rosevear <jpr@ximian.com>

	* gui/calendar-offline-handler.c (backend_cal_opened_offline): use
	a standard calendar status
	(backend_cal_opened_online): ditto

	* gui/alarm-notify/alarm-queue.c (cal_opened_cb): ditto

	* gui/gnome-cal.c (client_cal_opened_cb): ditto

	* gui/e-tasks.c (cal_opened_cb): ditto

	* gui/e-itip-control.c (default_server_started_cb): ditto

	* gui/e-cal-model.c (cal_opened_cb): ditto

	* gui/comp-editor-factory.c (cal_opened_cb): ditto

svn path=/trunk/; revision=23286
This commit is contained in:
JP Rosevear
2003-11-11 17:11:09 +00:00
committed by JP Rosevear
parent 4ea4ea5d28
commit 6f57f92231
8 changed files with 48 additions and 30 deletions

View File

@ -1,3 +1,21 @@
2003-11-11 JP Rosevear <jpr@ximian.com>
* gui/calendar-offline-handler.c (backend_cal_opened_offline): use
a standard calendar status
(backend_cal_opened_online): ditto
* gui/alarm-notify/alarm-queue.c (cal_opened_cb): ditto
* gui/gnome-cal.c (client_cal_opened_cb): ditto
* gui/e-tasks.c (cal_opened_cb): ditto
* gui/e-itip-control.c (default_server_started_cb): ditto
* gui/e-cal-model.c (cal_opened_cb): ditto
* gui/comp-editor-factory.c (cal_opened_cb): ditto
2003-11-11 JP Rosevear <jpr@ximian.com>
* conduits/todo/todo-conduit.c (start_calendar_server): load the

View File

@ -428,13 +428,13 @@ load_missed_alarms (ClientAlarms *ca)
/* Called when a calendar client finished loading; we load its alarms */
static void
cal_opened_cb (ECal *client, ECalOpenStatus status, gpointer data)
cal_opened_cb (ECal *client, ECalendarStatus status, gpointer data)
{
ClientAlarms *ca;
ca = data;
if (status != E_CAL_OPEN_SUCCESS)
if (status != E_CALENDAR_STATUS_OK)
return;
load_alarms_for_today (ca);

View File

@ -148,11 +148,11 @@ backend_cal_set_mode (ECal *client, ECalSetModeStatus status, CalMode mode, gpoi
}
static void
backend_cal_opened_offline (ECal *client, ECalOpenStatus status, gpointer data)
backend_cal_opened_offline (ECal *client, ECalendarStatus status, gpointer data)
{
CalendarOfflineHandler *offline_handler = data;
if (status != E_CAL_OPEN_SUCCESS) {
if (status != E_CALENDAR_STATUS_OK) {
update_offline (offline_handler);
g_object_unref (client);
return;
@ -163,9 +163,9 @@ backend_cal_opened_offline (ECal *client, ECalOpenStatus status, gpointer data)
}
static void
backend_cal_opened_online (ECal *client, ECalOpenStatus status, gpointer data)
backend_cal_opened_online (ECal *client, ECalendarStatus status, gpointer data)
{
if (status != E_CAL_OPEN_SUCCESS) {
if (status != E_CALENDAR_STATUS_OK) {
g_object_unref (G_OBJECT (client));
return;
}

View File

@ -428,7 +428,7 @@ resolve_pending_requests (OpenClient *oc)
* requests.
*/
static void
cal_opened_cb (ECal *client, ECalOpenStatus status, gpointer data)
cal_opened_cb (ECal *client, ECalendarStatus status, gpointer data)
{
OpenClient *oc;
CompEditorFactory *factory;
@ -440,29 +440,29 @@ cal_opened_cb (ECal *client, ECalOpenStatus status, gpointer data)
priv = factory->priv;
switch (status) {
case E_CAL_OPEN_SUCCESS:
case E_CALENDAR_STATUS_OK:
oc->open = TRUE;
resolve_pending_requests (oc);
return;
case E_CAL_OPEN_ERROR:
case E_CALENDAR_STATUS_OTHER_ERROR:
dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL,
GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
_("Error while opening the calendar"));
break;
case E_CAL_OPEN_NOT_FOUND:
/* bullshit; we specified only_if_exists = FALSE */
case E_CALENDAR_STATUS_NO_SUCH_CALENDAR:
/* oops - we specified only_if_exists = FALSE */
g_assert_not_reached ();
return;
case E_CAL_OPEN_METHOD_NOT_SUPPORTED:
case E_CALENDAR_STATUS_PROTOCOL_NOT_SUPPORTED:
dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL,
GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
_("Method not supported when opening the calendar"));
break;
case E_CAL_OPEN_PERMISSION_DENIED :
case E_CALENDAR_STATUS_PERMISSION_DENIED :
dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL,
GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
_("Permission denied to open the calendar"));

View File

@ -1314,11 +1314,11 @@ add_new_client (ECalModel *model, ECal *client)
}
static void
cal_opened_cb (ECal *client, ECalOpenStatus status, gpointer user_data)
cal_opened_cb (ECal *client, ECalendarStatus status, gpointer user_data)
{
ECalModel *model = (ECalModel *) user_data;
if (status != E_CAL_OPEN_SUCCESS)
if (status != E_CALENDAR_STATUS_OK)
return;
add_new_client (model, client);

View File

@ -2142,7 +2142,7 @@ typedef struct
ObjectRequestContext;
static void
default_server_started_cb (ECal *client, ECalOpenStatus status, gpointer data)
default_server_started_cb (ECal *client, ECalendarStatus status, gpointer data)
{
ObjectRequestContext *context = data;
EItipControlPrivate *priv;
@ -2151,7 +2151,7 @@ default_server_started_cb (ECal *client, ECalOpenStatus status, gpointer data)
priv = context->itip->priv;
if (status != E_CAL_OPEN_SUCCESS ||
if (status != E_CALENDAR_STATUS_OK ||
context->itip->priv->destroyed ||
context->itip->priv->html == NULL) {
g_object_unref (context->client);

View File

@ -80,7 +80,7 @@ static void e_tasks_init (ETasks *tasks);
static void setup_widgets (ETasks *tasks);
static void e_tasks_destroy (GtkObject *object);
static void cal_opened_cb (ECal *client, ECalOpenStatus status, gpointer data);
static void cal_opened_cb (ECal *client, ECalendarStatus status, gpointer data);
static void backend_error_cb (ECal *client, const char *message, gpointer data);
/* Signal IDs */
@ -799,7 +799,7 @@ permission_error (ETasks *tasks, const char *uri)
/* Callback from the calendar client when a calendar is opened */
static void
cal_opened_cb (ECal *client,
ECalOpenStatus status,
ECalendarStatus status,
gpointer data)
{
ETasks *tasks;
@ -811,25 +811,25 @@ cal_opened_cb (ECal *client,
set_status_message (tasks, NULL);
switch (status) {
case E_CAL_OPEN_SUCCESS:
case E_CALENDAR_STATUS_OK:
/* Everything is OK */
set_timezone (tasks);
return;
case E_CAL_OPEN_ERROR:
case E_CALENDAR_STATUS_OTHER_ERROR:
load_error (tasks, e_cal_get_uri (client));
break;
case E_CAL_OPEN_NOT_FOUND:
case E_CALENDAR_STATUS_NO_SUCH_CALENDAR:
/* bullshit; we did not specify only_if_exists */
g_assert_not_reached ();
return;
case E_CAL_OPEN_METHOD_NOT_SUPPORTED:
case E_CALENDAR_STATUS_PROTOCOL_NOT_SUPPORTED:
method_error (tasks, e_cal_get_uri (client));
break;
case E_CAL_OPEN_PERMISSION_DENIED:
case E_CALENDAR_STATUS_PERMISSION_DENIED:
permission_error (tasks, e_cal_get_uri (client));
break;

View File

@ -1785,7 +1785,7 @@ update_e_cal_view_timeout (gpointer data)
}
static void
client_cal_opened_cb (ECal *client, ECalOpenStatus status, gpointer data)
client_cal_opened_cb (ECal *client, ECalendarStatus status, gpointer data)
{
GnomeCalendar *gcal;
GnomeCalendarPrivate *priv;
@ -1796,7 +1796,7 @@ client_cal_opened_cb (ECal *client, ECalOpenStatus status, gpointer data)
priv = gcal->priv;
switch (status) {
case E_CAL_OPEN_SUCCESS:
case E_CALENDAR_STATUS_OK:
/* Set the client's default timezone, if we have one. */
if (priv->zone) {
/* FIXME Error checking */
@ -1823,20 +1823,20 @@ client_cal_opened_cb (ECal *client, ECalOpenStatus status, gpointer data)
add_alarms (e_cal_get_uri (client));
break;
case E_CAL_OPEN_ERROR:
case E_CALENDAR_STATUS_OTHER_ERROR:
open_error (gcal, e_cal_get_uri (client));
break;
case E_CAL_OPEN_NOT_FOUND:
case E_CALENDAR_STATUS_NO_SUCH_CALENDAR:
/* bullshit; we did not specify only_if_exists */
g_assert_not_reached ();
return;
case E_CAL_OPEN_METHOD_NOT_SUPPORTED:
case E_CALENDAR_STATUS_PROTOCOL_NOT_SUPPORTED:
method_error (gcal, e_cal_get_uri (client));
break;
case E_CAL_OPEN_PERMISSION_DENIED :
case E_CALENDAR_STATUS_PERMISSION_DENIED :
permission_error (gcal, e_cal_get_uri (client));
break;