aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
authorJP Rosevear <jpr@src.gnome.org>2003-11-07 13:52:24 +0800
committerJP Rosevear <jpr@src.gnome.org>2003-11-07 13:52:24 +0800
commit200606f92810d3de322e5ee96f8326e1a656f8bb (patch)
treeda0dc27f5311128dcb6e7eb6400931e45743372e /calendar/gui
parente5472b4cc9a4bb80b89437a16f8b77943ea35555 (diff)
downloadgsoc2013-evolution-200606f92810d3de322e5ee96f8326e1a656f8bb.tar
gsoc2013-evolution-200606f92810d3de322e5ee96f8326e1a656f8bb.tar.gz
gsoc2013-evolution-200606f92810d3de322e5ee96f8326e1a656f8bb.tar.bz2
gsoc2013-evolution-200606f92810d3de322e5ee96f8326e1a656f8bb.tar.lz
gsoc2013-evolution-200606f92810d3de322e5ee96f8326e1a656f8bb.tar.xz
gsoc2013-evolution-200606f92810d3de322e5ee96f8326e1a656f8bb.tar.zst
gsoc2013-evolution-200606f92810d3de322e5ee96f8326e1a656f8bb.zip
Various changes to merge in evolution-data-server reliance.
svn path=/trunk/; revision=23206
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/Makefile.am25
-rw-r--r--calendar/gui/alarm-notify/Makefile.am6
-rw-r--r--calendar/gui/alarm-notify/alarm-notify-dialog.c12
-rw-r--r--calendar/gui/alarm-notify/alarm-notify-dialog.h4
-rw-r--r--calendar/gui/alarm-notify/alarm-notify.c12
-rw-r--r--calendar/gui/alarm-notify/alarm-queue.c147
-rw-r--r--calendar/gui/alarm-notify/alarm-queue.h6
-rw-r--r--calendar/gui/alarm-notify/util.c2
-rw-r--r--calendar/gui/alarm-notify/util.h2
-rw-r--r--calendar/gui/cal-search-bar.c10
-rw-r--r--calendar/gui/calendar-commands.c60
-rw-r--r--calendar/gui/calendar-config.c2
-rw-r--r--calendar/gui/calendar-offline-handler.c38
-rw-r--r--calendar/gui/comp-editor-factory.c66
-rw-r--r--calendar/gui/comp-util.c98
-rw-r--r--calendar/gui/comp-util.h20
-rw-r--r--calendar/gui/control-factory.c4
-rw-r--r--calendar/gui/dialogs/Makefile.am2
-rw-r--r--calendar/gui/dialogs/alarm-options.c128
-rw-r--r--calendar/gui/dialogs/alarm-options.h4
-rw-r--r--calendar/gui/dialogs/alarm-page.c122
-rw-r--r--calendar/gui/dialogs/cancel-comp.c14
-rw-r--r--calendar/gui/dialogs/cancel-comp.h6
-rw-r--r--calendar/gui/dialogs/changed-comp.c18
-rw-r--r--calendar/gui/dialogs/changed-comp.h4
-rw-r--r--calendar/gui/dialogs/comp-editor-page.c12
-rw-r--r--calendar/gui/dialogs/comp-editor-page.h26
-rw-r--r--calendar/gui/dialogs/comp-editor-util.c32
-rw-r--r--calendar/gui/dialogs/comp-editor-util.h2
-rw-r--r--calendar/gui/dialogs/comp-editor.c162
-rw-r--r--calendar/gui/dialogs/comp-editor.h22
-rw-r--r--calendar/gui/dialogs/delete-comp.c26
-rw-r--r--calendar/gui/dialogs/delete-comp.h6
-rw-r--r--calendar/gui/dialogs/delete-error.c20
-rw-r--r--calendar/gui/dialogs/delete-error.h6
-rw-r--r--calendar/gui/dialogs/event-editor.c70
-rw-r--r--calendar/gui/dialogs/event-editor.h4
-rw-r--r--calendar/gui/dialogs/event-page.c118
-rw-r--r--calendar/gui/dialogs/meeting-page.c44
-rw-r--r--calendar/gui/dialogs/meeting-page.h6
-rw-r--r--calendar/gui/dialogs/recur-comp.c20
-rw-r--r--calendar/gui/dialogs/recur-comp.h10
-rw-r--r--calendar/gui/dialogs/recurrence-page.c160
-rw-r--r--calendar/gui/dialogs/schedule-page.c26
-rw-r--r--calendar/gui/dialogs/send-comp.c12
-rw-r--r--calendar/gui/dialogs/send-comp.h6
-rw-r--r--calendar/gui/dialogs/task-details-page.c36
-rw-r--r--calendar/gui/dialogs/task-editor.c72
-rw-r--r--calendar/gui/dialogs/task-editor.h4
-rw-r--r--calendar/gui/dialogs/task-page.c90
-rw-r--r--calendar/gui/e-alarm-list.c56
-rw-r--r--calendar/gui/e-alarm-list.h8
-rw-r--r--calendar/gui/e-cal-list-view-config.c4
-rw-r--r--calendar/gui/e-cal-list-view.c48
-rw-r--r--calendar/gui/e-cal-list-view.h10
-rw-r--r--calendar/gui/e-cal-model-calendar.c4
-rw-r--r--calendar/gui/e-cal-model-tasks.c22
-rw-r--r--calendar/gui/e-cal-model.c114
-rw-r--r--calendar/gui/e-cal-model.h14
-rw-r--r--calendar/gui/e-cal-view.c546
-rw-r--r--calendar/gui/e-cal-view.h138
-rw-r--r--calendar/gui/e-calendar-table.c102
-rw-r--r--calendar/gui/e-calendar-view.c546
-rw-r--r--calendar/gui/e-calendar-view.h138
-rw-r--r--calendar/gui/e-cell-date-edit-text.c6
-rw-r--r--calendar/gui/e-cell-date-edit-text.h2
-rw-r--r--calendar/gui/e-comp-editor-registry.c8
-rw-r--r--calendar/gui/e-date-time-list.c30
-rw-r--r--calendar/gui/e-date-time-list.h8
-rw-r--r--calendar/gui/e-day-view-config.c4
-rw-r--r--calendar/gui/e-day-view-main-item.c56
-rw-r--r--calendar/gui/e-day-view-time-item.c4
-rw-r--r--calendar/gui/e-day-view-top-item.c30
-rw-r--r--calendar/gui/e-day-view.c542
-rw-r--r--calendar/gui/e-day-view.h10
-rw-r--r--calendar/gui/e-itip-control.c350
-rw-r--r--calendar/gui/e-meeting-attendee.c10
-rw-r--r--calendar/gui/e-meeting-attendee.h6
-rw-r--r--calendar/gui/e-meeting-list-view.c12
-rw-r--r--calendar/gui/e-meeting-model.c24
-rw-r--r--calendar/gui/e-meeting-model.h6
-rw-r--r--calendar/gui/e-meeting-store.c24
-rw-r--r--calendar/gui/e-meeting-store.h6
-rw-r--r--calendar/gui/e-select-names-renderer.c4
-rw-r--r--calendar/gui/e-tasks.c102
-rw-r--r--calendar/gui/e-tasks.h2
-rw-r--r--calendar/gui/e-timezone-entry.h2
-rw-r--r--calendar/gui/e-week-view-config.c4
-rw-r--r--calendar/gui/e-week-view-event-item.c40
-rw-r--r--calendar/gui/e-week-view-main-item.c2
-rw-r--r--calendar/gui/e-week-view.c200
-rw-r--r--calendar/gui/e-week-view.h8
-rw-r--r--calendar/gui/gnome-cal.c230
-rw-r--r--calendar/gui/gnome-cal.h6
-rw-r--r--calendar/gui/goto.c2
-rw-r--r--calendar/gui/itip-utils.c286
-rw-r--r--calendar/gui/itip-utils.h30
-rw-r--r--calendar/gui/print.c112
-rw-r--r--calendar/gui/print.h2
-rw-r--r--calendar/gui/tag-calendar.c38
-rw-r--r--calendar/gui/tag-calendar.h8
-rw-r--r--calendar/gui/tasks-component.c12
-rw-r--r--calendar/gui/tasks-control.c4
103 files changed, 2897 insertions, 2889 deletions
diff --git a/calendar/gui/Makefile.am b/calendar/gui/Makefile.am
index ae623b84db..d05ae4dbc7 100644
--- a/calendar/gui/Makefile.am
+++ b/calendar/gui/Makefile.am
@@ -5,6 +5,19 @@ IDLS = \
$(top_srcdir)/calendar/idl/evolution-calendar.idl \
$(top_srcdir)/addressbook/gui/component/select-names/Evolution-Addressbook-SelectNames.idl
+CALENDAR_IDL_GENERATED_H = \
+ evolution-calendar.h
+CALENDAR_IDL_GENERATED_C = \
+ evolution-calendar-common.c \
+ evolution-calendar-skels.c \
+ evolution-calendar-stubs.c
+CALENDAR_IDL_GENERATED = $(CALENDAR_IDL_GENERATED_C) $(CALENDAR_IDL_GENERATED_H)
+
+$(CALENDAR_IDL_GENERATED_H): $(IDLS)
+ $(ORBIT_IDL) -I $(srcdir) $(IDL_INCLUDES) \
+ $(top_srcdir)/calendar/idl/evolution-calendar.idl
+$(CALENDAR_IDL_GENERATED_C): $(CALENDAR_IDL_GENERATED_H)
+
# Message composer IDL files
COMPOSER_IDL_GENERATED_H = \
@@ -20,7 +33,6 @@ $(COMPOSER_IDL_GENERATED_H): $(IDLS)
$(srcdir)/../../composer/Evolution-Composer.idl
$(COMPOSER_IDL_GENERATED_C): $(COMPOSER_IDL_GENERATED_H)
-
# SelectNames IDL files
SELECT_NAMES_IDL_GENERATED_H = \
@@ -37,8 +49,11 @@ $(SELECT_NAMES_IDL_GENERATED_H): $(IDLS)
$(SELECT_NAMES_IDL_GENERATED_C): $(SELECT_NAMES_IDL_GENERATED_H)
-IDL_GENERATED = $(COMPOSER_IDL_GENERATED) $(SELECT_NAMES_IDL_GENERATED)
+IDL_GENERATED = $(CALENDAR_IDL_GENERATED) $(COMPOSER_IDL_GENERATED) $(SELECT_NAMES_IDL_GENERATED)
+# The marshallers
+MARSHAL_GENERATED = e-calendar-marshal.c e-calendar-marshal.h
+@EVO_MARSHAL_RULE@
SUBDIRS = alarm-notify dialogs
@@ -53,8 +68,6 @@ INCLUDES = \
-I$(top_srcdir)/calendar/cal-client \
-I$(top_builddir)/calendar/cal-client \
-I$(top_srcdir)/libical/src \
- -I$(top_srcdir)/addressbook/backend \
- -I$(top_builddir)/addressbook/backend \
-I$(top_srcdir)/widgets \
-I$(top_srcdir)/a11y/calendar \
-DEVOLUTION_DATADIR=\""$(datadir)"\" \
@@ -77,6 +90,7 @@ etspec_DATA = \
libevolution_calendar_la_SOURCES = \
$(IDL_GENERATED) \
+ $(MARSHAL_GENERATED) \
cal-search-bar.c \
cal-search-bar.h \
calendar-config.c \
@@ -203,8 +217,6 @@ libevolution_calendar_la_LIBADD = \
$(DB3_LDADD) \
$(top_builddir)/widgets/menus/libmenus.la \
$(top_builddir)/shell/libeshell.la \
- $(top_builddir)/calendar/cal-client/libcal-client.la \
- $(top_builddir)/addressbook/backend/ebook/libebook.la \
$(top_builddir)/calendar/gui/dialogs/libcal-dialogs.la \
$(top_builddir)/widgets/e-timezone-dialog/libetimezonedialog.la \
$(top_builddir)/widgets/misc/libemiscwidgets.la \
@@ -226,6 +238,7 @@ schemadir = $(GCONF_SCHEMA_FILE_DIR)
schema_DATA = apps_evolution_calendar.schemas
EXTRA_DIST = \
+ e-calendar-marshal.list \
$(glade_DATA) \
$(schema_DATA) \
$(etspec_DATA) \
diff --git a/calendar/gui/alarm-notify/Makefile.am b/calendar/gui/alarm-notify/Makefile.am
index 82ecd516cf..6e1675aaa9 100644
--- a/calendar/gui/alarm-notify/Makefile.am
+++ b/calendar/gui/alarm-notify/Makefile.am
@@ -20,9 +20,6 @@ privlibexec_PROGRAMS = evolution-alarm-notify
INCLUDES = \
-DG_LOG_DOMAIN=\"evolution-alarm-notify\" \
-I$(top_srcdir) \
- -I$(top_srcdir)/calendar \
- -I$(top_builddir)/calendar \
- -I$(top_srcdir)/libical/src \
-I$(top_srcdir)/widgets \
-DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \
-DEVOLUTION_IMAGESDIR=\""$(imagesdir)"\" \
@@ -51,8 +48,7 @@ evolution_alarm_notify_SOURCES = \
util.h
evolution_alarm_notify_LDADD = \
- $(top_builddir)/calendar/cal-client/libcal-client.la \
- $(top_builddir)/calendar/cal-util/libcal-util.la \
+ $(top_builddir)/e-util/libeutil.la \
$(EVOLUTION_CALENDAR_LIBS)
server_in_files = GNOME_Evolution_Calendar_AlarmNotify.server.in.in
diff --git a/calendar/gui/alarm-notify/alarm-notify-dialog.c b/calendar/gui/alarm-notify/alarm-notify-dialog.c
index 3697fc1290..d1db74ae80 100644
--- a/calendar/gui/alarm-notify/alarm-notify-dialog.c
+++ b/calendar/gui/alarm-notify/alarm-notify-dialog.c
@@ -37,7 +37,7 @@
#include <gal/widgets/e-unicode.h>
#include <gtkhtml/gtkhtml.h>
#include <gtkhtml/gtkhtml-stream.h>
-#include "cal-util/timeutil.h"
+#include <libecal/e-cal-time-util.h>
#include "alarm-notify-dialog.h"
#include "config-data.h"
#include "util.h"
@@ -219,7 +219,7 @@ write_times (GtkHTMLStream *stream, char *start, char *end)
/* Creates a heading for the alarm notification dialog */
static void
write_html_heading (GtkHTMLStream *stream, const char *message,
- CalComponentVType vtype, time_t occur_start, time_t occur_end)
+ ECalComponentVType vtype, time_t occur_start, time_t occur_end)
{
char *buf;
char *start, *end;
@@ -258,11 +258,11 @@ write_html_heading (GtkHTMLStream *stream, const char *message,
/* Write the times */
switch (vtype) {
- case CAL_COMPONENT_EVENT:
+ case E_CAL_COMPONENT_EVENT:
write_times (stream, start, end);
break;
- case CAL_COMPONENT_TODO:
+ case E_CAL_COMPONENT_TODO:
write_times (stream, start, end);
break;
@@ -293,7 +293,7 @@ write_html_heading (GtkHTMLStream *stream, const char *message,
**/
gpointer
alarm_notify_dialog (time_t trigger, time_t occur_start, time_t occur_end,
- CalComponentVType vtype, const char *message,
+ ECalComponentVType vtype, const char *message,
AlarmNotifyFunc func, gpointer func_data)
{
AlarmNotify *an;
@@ -304,7 +304,7 @@ alarm_notify_dialog (time_t trigger, time_t occur_start, time_t occur_end,
g_return_val_if_fail (trigger != -1, NULL);
/* Only VEVENTs or VTODOs can have alarms */
- g_return_val_if_fail (vtype == CAL_COMPONENT_EVENT || vtype == CAL_COMPONENT_TODO, NULL);
+ g_return_val_if_fail (vtype == E_CAL_COMPONENT_EVENT || vtype == E_CAL_COMPONENT_TODO, NULL);
g_return_val_if_fail (message != NULL, NULL);
g_return_val_if_fail (func != NULL, NULL);
diff --git a/calendar/gui/alarm-notify/alarm-notify-dialog.h b/calendar/gui/alarm-notify/alarm-notify-dialog.h
index 39cadbca0b..9bebce0a08 100644
--- a/calendar/gui/alarm-notify/alarm-notify-dialog.h
+++ b/calendar/gui/alarm-notify/alarm-notify-dialog.h
@@ -23,7 +23,7 @@
#include <time.h>
#include <glib.h>
-#include <cal-util/cal-component.h>
+#include <libecal/e-cal-component.h>
@@ -36,7 +36,7 @@ typedef enum {
typedef void (* AlarmNotifyFunc) (AlarmNotifyResult result, int snooze_mins, gpointer data);
gpointer alarm_notify_dialog (time_t trigger, time_t occur_start, time_t occur_end,
- CalComponentVType vtype, const char *message,
+ ECalComponentVType vtype, const char *message,
AlarmNotifyFunc func, gpointer func_data);
void alarm_notify_dialog_disable_buttons (gpointer dialog);
diff --git a/calendar/gui/alarm-notify/alarm-notify.c b/calendar/gui/alarm-notify/alarm-notify.c
index ce73223afb..267a1001ca 100644
--- a/calendar/gui/alarm-notify/alarm-notify.c
+++ b/calendar/gui/alarm-notify/alarm-notify.c
@@ -23,7 +23,7 @@
#endif
#include <string.h>
-#include <cal-client/cal-client.h>
+#include <libecal/e-cal.h>
#include "alarm-notify.h"
#include "alarm-queue.h"
#include "save.h"
@@ -92,7 +92,7 @@ static void
free_client_hash (gpointer key, gpointer value, gpointer user_data)
{
char *uri = key;
- CalClient *client = value;
+ ECal *client = value;
g_free (uri);
g_object_unref (client);
@@ -248,7 +248,7 @@ AlarmNotify_removeCalendar (PortableServer_Servant servant,
{
AlarmNotify *an;
AlarmNotifyPrivate *priv;
- CalClient *client;
+ ECal *client;
an = ALARM_NOTIFY (bonobo_object_from_servant (servant));
priv = an->priv;
@@ -299,7 +299,7 @@ alarm_notify_add_calendar (AlarmNotify *an, const char *str_uri, gboolean load_a
CORBA_Environment *ev)
{
AlarmNotifyPrivate *priv;
- CalClient *client;
+ ECal *client;
g_return_if_fail (an != NULL);
g_return_if_fail (IS_ALARM_NOTIFY (an));
@@ -312,10 +312,10 @@ alarm_notify_add_calendar (AlarmNotify *an, const char *str_uri, gboolean load_a
if (g_hash_table_lookup (priv->uri_client_hash, str_uri))
return;
- client = cal_client_new (str_uri, CALOBJ_TYPE_EVENT);
+ client = e_cal_new (str_uri, CALOBJ_TYPE_EVENT);
if (client) {
- if (cal_client_open (client, FALSE, NULL)) {
+ if (e_cal_open (client, FALSE, NULL)) {
add_uri_to_load (str_uri);
g_hash_table_insert (priv->uri_client_hash,
diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c
index 774604c804..be9574d9d8 100644
--- a/calendar/gui/alarm-notify/alarm-queue.c
+++ b/calendar/gui/alarm-notify/alarm-queue.c
@@ -41,7 +41,8 @@
#include <libgnomeui/gnome-dialog-util.h>
#include <libgnomeui/gnome-uidefs.h>
#include <e-util/eggtrayicon.h>
-#include <cal-util/timeutil.h>
+#include <libecal/e-cal-time-util.h>
+#include "evolution-calendar.h"
#include "alarm.h"
#include "alarm-notify-dialog.h"
#include "alarm-queue.h"
@@ -66,7 +67,7 @@ static GHashTable *client_alarms_hash = NULL;
/* Structure that stores a client we are monitoring */
typedef struct {
/* Monitored client */
- CalClient *client;
+ ECal *client;
/* Number of times this client has been registered */
int refcount;
@@ -80,7 +81,7 @@ typedef struct {
GHashTable *uid_alarms_hash;
} ClientAlarms;
-/* Pair of a CalComponentAlarms and the mapping from queued alarm IDs to the
+/* Pair of a ECalComponentAlarms and the mapping from queued alarm IDs to the
* actual alarm instance structures.
*/
typedef struct {
@@ -91,7 +92,7 @@ typedef struct {
char *uid;
/* The actual component and its alarm instances */
- CalComponentAlarms *alarms;
+ ECalComponentAlarms *alarms;
/* List of QueuedAlarm structures */
GSList *queued_alarms;
@@ -106,7 +107,7 @@ typedef struct {
gpointer alarm_id;
/* Instance from our parent CompQueuedAlarms->alarms->alarms list */
- CalAlarmInstance *instance;
+ ECalComponentAlarmInstance *instance;
/* Whether this is a snoozed queued alarm or a normal one */
guint snooze : 1;
@@ -176,7 +177,7 @@ midnight_refresh_cb (gpointer alarm_id, time_t trigger, gpointer data)
/* Looks up a client in the client alarms hash table */
static ClientAlarms *
-lookup_client (CalClient *client)
+lookup_client (ECal *client)
{
return g_hash_table_lookup (client_alarms_hash, client);
}
@@ -226,7 +227,7 @@ remove_queued_alarm (CompQueuedAlarms *cqa, gpointer alarm_id,
if (remove_alarm) {
cqa->expecting_update = TRUE;
- cal_client_discard_alarm (cqa->parent_client->client, cqa->alarms->comp,
+ e_cal_discard_alarm (cqa->parent_client->client, cqa->alarms->comp,
qa->instance->auid, NULL);
cqa->expecting_update = FALSE;
}
@@ -245,10 +246,10 @@ remove_queued_alarm (CompQueuedAlarms *cqa, gpointer alarm_id,
g_free (cqa->uid);
cqa->uid = NULL;
cqa->parent_client = NULL;
- cal_component_alarms_free (cqa->alarms);
+ e_cal_component_alarms_free (cqa->alarms);
g_free (cqa);
} else {
- cal_component_alarms_free (cqa->alarms);
+ e_cal_component_alarms_free (cqa->alarms);
cqa->alarms = NULL;
}
}
@@ -258,10 +259,10 @@ static void
alarm_trigger_cb (gpointer alarm_id, time_t trigger, gpointer data)
{
CompQueuedAlarms *cqa;
- CalComponent *comp;
+ ECalComponent *comp;
QueuedAlarm *qa;
- CalComponentAlarm *alarm;
- CalAlarmAction action;
+ ECalComponentAlarm *alarm;
+ ECalComponentAlarmAction action;
cqa = data;
comp = cqa->alarms->comp;
@@ -279,26 +280,26 @@ alarm_trigger_cb (gpointer alarm_id, time_t trigger, gpointer data)
* occurrence.
*/
- alarm = cal_component_get_alarm (comp, qa->instance->auid);
+ alarm = e_cal_component_get_alarm (comp, qa->instance->auid);
g_assert (alarm != NULL);
- cal_component_alarm_get_action (alarm, &action);
- cal_component_alarm_free (alarm);
+ e_cal_component_alarm_get_action (alarm, &action);
+ e_cal_component_alarm_free (alarm);
switch (action) {
- case CAL_ALARM_AUDIO:
+ case E_CAL_COMPONENT_ALARM_AUDIO:
audio_notification (trigger, cqa, alarm_id);
break;
- case CAL_ALARM_DISPLAY:
+ case E_CAL_COMPONENT_ALARM_DISPLAY:
display_notification (trigger, cqa, alarm_id, TRUE);
break;
- case CAL_ALARM_EMAIL:
+ case E_CAL_COMPONENT_ALARM_EMAIL:
mail_notification (trigger, cqa, alarm_id);
break;
- case CAL_ALARM_PROCEDURE:
+ case E_CAL_COMPONENT_ALARM_PROCEDURE:
procedure_notification (trigger, cqa, alarm_id);
break;
@@ -308,11 +309,11 @@ alarm_trigger_cb (gpointer alarm_id, time_t trigger, gpointer data)
}
}
-/* Adds the alarms in a CalComponentAlarms structure to the alarms queued for a
+/* Adds the alarms in a ECalComponentAlarms structure to the alarms queued for a
* particular client. Also puts the triggers in the alarm timer queue.
*/
static void
-add_component_alarms (ClientAlarms *ca, CalComponentAlarms *alarms)
+add_component_alarms (ClientAlarms *ca, ECalComponentAlarms *alarms)
{
const char *uid;
CompQueuedAlarms *cqa;
@@ -320,7 +321,7 @@ add_component_alarms (ClientAlarms *ca, CalComponentAlarms *alarms)
/* No alarms? */
if (alarms->alarms == NULL) {
- cal_component_alarms_free (alarms);
+ e_cal_component_alarms_free (alarms);
return;
}
@@ -332,7 +333,7 @@ add_component_alarms (ClientAlarms *ca, CalComponentAlarms *alarms)
cqa->queued_alarms = NULL;
for (l = alarms->alarms; l; l = l->next) {
- CalAlarmInstance *instance;
+ ECalComponentAlarmInstance *instance;
gpointer alarm_id;
QueuedAlarm *qa;
@@ -353,14 +354,14 @@ add_component_alarms (ClientAlarms *ca, CalComponentAlarms *alarms)
cqa->queued_alarms = g_slist_prepend (cqa->queued_alarms, qa);
}
- cal_component_get_uid (alarms->comp, &uid);
+ e_cal_component_get_uid (alarms->comp, &uid);
/* If we failed to add all the alarms, then we should get rid of the cqa */
if (cqa->queued_alarms == NULL) {
g_message ("add_component_alarms(): Could not add any of the alarms "
"for the component `%s'; discarding it...", uid);
- cal_component_alarms_free (cqa->alarms);
+ e_cal_component_alarms_free (cqa->alarms);
cqa->alarms = NULL;
g_free (cqa);
@@ -379,10 +380,10 @@ load_alarms (ClientAlarms *ca, time_t start, time_t end)
GSList *comp_alarms;
GSList *l;
- comp_alarms = cal_client_get_alarms_in_range (ca->client, start, end);
+ comp_alarms = e_cal_get_alarms_in_range (ca->client, start, end);
for (l = comp_alarms; l; l = l->next) {
- CalComponentAlarms *alarms;
+ ECalComponentAlarms *alarms;
alarms = l->data;
add_component_alarms (ca, alarms);
@@ -427,13 +428,13 @@ load_missed_alarms (ClientAlarms *ca)
/* Called when a calendar client finished loading; we load its alarms */
static void
-cal_opened_cb (CalClient *client, CalClientOpenStatus status, gpointer data)
+cal_opened_cb (ECal *client, ECalOpenStatus status, gpointer data)
{
ClientAlarms *ca;
ca = data;
- if (status != CAL_CLIENT_OPEN_SUCCESS)
+ if (status != E_CAL_OPEN_SUCCESS)
return;
load_alarms_for_today (ca);
@@ -496,11 +497,11 @@ remove_comp (ClientAlarms *ca, const char *uid)
* alarms.
*/
static void
-obj_updated_cb (CalClient *client, const char *uid, gpointer data)
+obj_updated_cb (ECal *client, const char *uid, gpointer data)
{
ClientAlarms *ca;
time_t now, day_end;
- CalComponentAlarms *alarms;
+ ECalComponentAlarms *alarms;
gboolean found;
icaltimezone *zone;
CompQueuedAlarms *cqa;
@@ -513,7 +514,7 @@ obj_updated_cb (CalClient *client, const char *uid, gpointer data)
day_end = time_day_end_with_zone (now, zone);
- found = cal_client_get_alarms_for_object (ca->client, uid, now, day_end, &alarms);
+ found = e_cal_get_alarms_for_object (ca->client, uid, now, day_end, &alarms);
if (!found) {
remove_comp (ca, uid);
@@ -533,7 +534,7 @@ obj_updated_cb (CalClient *client, const char *uid, gpointer data)
/* add the new alarms */
for (l = cqa->alarms->alarms; l; l = l->next) {
- CalAlarmInstance *instance;
+ ECalComponentAlarmInstance *instance;
gpointer alarm_id;
QueuedAlarm *qa;
@@ -566,7 +567,7 @@ obj_updated_cb (CalClient *client, const char *uid, gpointer data)
* alarms.
*/
static void
-obj_removed_cb (CalClient *client, const char *uid, gpointer data)
+obj_removed_cb (ECal *client, const char *uid, gpointer data)
{
ClientAlarms *ca;
@@ -610,16 +611,16 @@ create_snooze (CompQueuedAlarms *cqa, gpointer alarm_id, int snooze_mins)
/* Launches a component editor for a component */
static void
-edit_component (CalClient *client, CalComponent *comp)
+edit_component (ECal *client, ECalComponent *comp)
{
const char *uid;
const char *uri;
CORBA_Environment ev;
GNOME_Evolution_Calendar_CompEditorFactory factory;
- cal_component_get_uid (comp, &uid);
+ e_cal_component_get_uid (comp, &uid);
- uri = cal_client_get_uri (client);
+ uri = e_cal_get_uri (client);
/* Get the factory */
@@ -695,15 +696,15 @@ typedef struct {
time_t trigger;
CompQueuedAlarms *cqa;
gpointer alarm_id;
- CalComponent *comp;
- CalClient *client;
+ ECalComponent *comp;
+ ECal *client;
GtkWidget *tray_icon;
GtkWidget *image;
GtkWidget *alarm_dialog;
} TrayIconData;
static void
-on_dialog_obj_updated_cb (CalClient *client, const char *uid, gpointer data)
+on_dialog_obj_updated_cb (ECal *client, const char *uid, gpointer data)
{
/* commented out so gcc won't complain about the unused variable
struct notify_dialog_closure *c = data;
@@ -711,12 +712,12 @@ on_dialog_obj_updated_cb (CalClient *client, const char *uid, gpointer data)
}
static void
-on_dialog_obj_removed_cb (CalClient *client, const char *uid, gpointer data)
+on_dialog_obj_removed_cb (ECal *client, const char *uid, gpointer data)
{
const char *our_uid;
TrayIconData *tray_data = data;
- cal_component_get_uid (tray_data->comp, &our_uid);
+ e_cal_component_get_uid (tray_data->comp, &our_uid);
g_return_if_fail (our_uid && *our_uid);
if (!strcmp (uid, our_uid)) {
@@ -798,7 +799,7 @@ tray_icon_clicked_cb (GtkWidget *widget, GdkEventButton *event, gpointer user_da
tray_data->trigger,
qa->instance->occur_start,
qa->instance->occur_end,
- cal_component_get_vtype (tray_data->comp),
+ e_cal_component_get_vtype (tray_data->comp),
tray_data->message,
notify_dialog_cb, tray_data);
if (tray_data->alarm_dialog) {
@@ -838,15 +839,15 @@ display_notification (time_t trigger, CompQueuedAlarms *cqa,
gpointer alarm_id, gboolean use_description)
{
QueuedAlarm *qa;
- CalComponent *comp;
- CalClient *client;
- CalComponentVType vtype;
+ ECalComponent *comp;
+ ECal *client;
+ ECalComponentVType vtype;
const char *message;
- CalComponentAlarm *alarm;
+ ECalComponentAlarm *alarm;
GtkWidget *tray_icon, *image, *ebox;
GtkTooltips *tooltips;
TrayIconData *tray_data;
- CalComponentText text;
+ ECalComponentText text;
char *str, *start_str, *end_str, *alarm_str;
icaltimezone *current_zone;
@@ -855,19 +856,19 @@ display_notification (time_t trigger, CompQueuedAlarms *cqa,
if (!qa)
return;
- vtype = cal_component_get_vtype (comp);
+ vtype = e_cal_component_get_vtype (comp);
/* get a sensible description for the event */
- alarm = cal_component_get_alarm (comp, qa->instance->auid);
+ alarm = e_cal_component_get_alarm (comp, qa->instance->auid);
g_assert (alarm != NULL);
- cal_component_alarm_get_description (alarm, &text);
- cal_component_alarm_free (alarm);
+ e_cal_component_alarm_get_description (alarm, &text);
+ e_cal_component_alarm_free (alarm);
if (text.value)
message = text.value;
else {
- cal_component_get_summary (comp, &text);
+ e_cal_component_get_summary (comp, &text);
if (text.value)
message = text.value;
else
@@ -909,7 +910,7 @@ display_notification (time_t trigger, CompQueuedAlarms *cqa,
tray_data->trigger = trigger;
tray_data->cqa = cqa;
tray_data->alarm_id = alarm_id;
- tray_data->comp = cal_component_clone (comp);
+ tray_data->comp = e_cal_component_clone (comp);
tray_data->client = cqa->parent_client->client;
tray_data->image = image;
tray_data->blink_state = FALSE;
@@ -932,8 +933,8 @@ audio_notification (time_t trigger, CompQueuedAlarms *cqa,
gpointer alarm_id)
{
QueuedAlarm *qa;
- CalComponent *comp;
- CalComponentAlarm *alarm;
+ ECalComponent *comp;
+ ECalComponentAlarm *alarm;
icalattach *attach;
comp = cqa->alarms->comp;
@@ -941,11 +942,11 @@ audio_notification (time_t trigger, CompQueuedAlarms *cqa,
if (!qa)
return;
- alarm = cal_component_get_alarm (comp, qa->instance->auid);
+ alarm = e_cal_component_get_alarm (comp, qa->instance->auid);
g_assert (alarm != NULL);
- cal_component_alarm_get_attach (alarm, &attach);
- cal_component_alarm_free (alarm);
+ e_cal_component_alarm_get_attach (alarm, &attach);
+ e_cal_component_alarm_free (alarm);
if (attach && icalattach_get_is_url (attach)) {
const char *url;
@@ -1038,9 +1039,9 @@ static void
procedure_notification (time_t trigger, CompQueuedAlarms *cqa, gpointer alarm_id)
{
QueuedAlarm *qa;
- CalComponent *comp;
- CalComponentAlarm *alarm;
- CalComponentText description;
+ ECalComponent *comp;
+ ECalComponentAlarm *alarm;
+ ECalComponentText description;
icalattach *attach;
const char *url;
char *cmd;
@@ -1051,12 +1052,12 @@ procedure_notification (time_t trigger, CompQueuedAlarms *cqa, gpointer alarm_id
if (!qa)
return;
- alarm = cal_component_get_alarm (comp, qa->instance->auid);
+ alarm = e_cal_component_get_alarm (comp, qa->instance->auid);
g_assert (alarm != NULL);
- cal_component_alarm_get_attach (alarm, &attach);
- cal_component_alarm_get_description (alarm, &description);
- cal_component_alarm_free (alarm);
+ e_cal_component_alarm_get_attach (alarm, &attach);
+ e_cal_component_alarm_get_description (alarm, &description);
+ e_cal_component_alarm_free (alarm);
/* If the alarm has no attachment, simply display a notification dialog. */
if (!attach)
@@ -1125,7 +1126,7 @@ alarm_queue_init (void)
static void
free_client_alarms_cb (gpointer key, gpointer value, gpointer user_data)
{
- CalClient *client = key;
+ ECal *client = key;
ClientAlarms *ca = value;
if (ca) {
@@ -1175,13 +1176,13 @@ alarm_queue_done (void)
* queueing system when it is no longer wanted.
**/
void
-alarm_queue_add_client (CalClient *client)
+alarm_queue_add_client (ECal *client)
{
ClientAlarms *ca;
g_return_if_fail (alarm_queue_inited);
g_return_if_fail (client != NULL);
- g_return_if_fail (IS_CAL_CLIENT (client));
+ g_return_if_fail (E_IS_CAL (client));
ca = lookup_client (client);
if (ca) {
@@ -1199,7 +1200,7 @@ alarm_queue_add_client (CalClient *client)
ca->uid_alarms_hash = g_hash_table_new (g_str_hash, g_str_equal);
- if (cal_client_get_load_state (client) != CAL_CLIENT_LOAD_LOADED)
+ if (e_cal_get_load_state (client) != E_CAL_LOAD_LOADED)
g_signal_connect (client, "cal_opened",
G_CALLBACK (cal_opened_cb),
ca);
@@ -1211,7 +1212,7 @@ alarm_queue_add_client (CalClient *client)
G_CALLBACK (obj_removed_cb),
ca);
- if (cal_client_get_load_state (client) == CAL_CLIENT_LOAD_LOADED) {
+ if (e_cal_get_load_state (client) == E_CAL_LOAD_LOADED) {
load_alarms_for_today (ca);
load_missed_alarms (ca);
}
@@ -1264,13 +1265,13 @@ remove_client_alarms (ClientAlarms *ca)
* Removes a calendar client from the alarm queueing system.
**/
void
-alarm_queue_remove_client (CalClient *client)
+alarm_queue_remove_client (ECal *client)
{
ClientAlarms *ca;
g_return_if_fail (alarm_queue_inited);
g_return_if_fail (client != NULL);
- g_return_if_fail (IS_CAL_CLIENT (client));
+ g_return_if_fail (E_IS_CAL (client));
ca = lookup_client (client);
g_return_if_fail (ca != NULL);
diff --git a/calendar/gui/alarm-notify/alarm-queue.h b/calendar/gui/alarm-notify/alarm-queue.h
index a37119145f..12802750ec 100644
--- a/calendar/gui/alarm-notify/alarm-queue.h
+++ b/calendar/gui/alarm-notify/alarm-queue.h
@@ -21,14 +21,14 @@
#ifndef ALARM_QUEUE_H
#define ALARM_QUEUE_H
-#include <cal-client/cal-client.h>
+#include <libecal/e-cal.h>
void alarm_queue_init (void);
void alarm_queue_done (void);
-void alarm_queue_add_client (CalClient *client);
-void alarm_queue_remove_client (CalClient *client);
+void alarm_queue_add_client (ECal *client);
+void alarm_queue_remove_client (ECal *client);
#endif
diff --git a/calendar/gui/alarm-notify/util.c b/calendar/gui/alarm-notify/util.c
index f40943d9b0..4bc91810a5 100644
--- a/calendar/gui/alarm-notify/util.c
+++ b/calendar/gui/alarm-notify/util.c
@@ -21,7 +21,7 @@
#include <libgnome/gnome-i18n.h>
#include <e-util/e-time-utils.h>
-#include <cal-util/timeutil.h>
+#include <libecal/e-cal-time-util.h>
#include "config-data.h"
#include "util.h"
diff --git a/calendar/gui/alarm-notify/util.h b/calendar/gui/alarm-notify/util.h
index ab4cc4f995..7dae3dd7fe 100644
--- a/calendar/gui/alarm-notify/util.h
+++ b/calendar/gui/alarm-notify/util.h
@@ -22,7 +22,7 @@
#ifndef UTIL_H
#define UTIL_H
-#include <cal-util/cal-component.h>
+#include <libecal/e-cal-component.h>
char *timet_to_str_with_zone (time_t t, icaltimezone *zone);
diff --git a/calendar/gui/cal-search-bar.c b/calendar/gui/cal-search-bar.c
index d04cbcb492..3bc9143215 100644
--- a/calendar/gui/cal-search-bar.c
+++ b/calendar/gui/cal-search-bar.c
@@ -225,7 +225,7 @@ get_current_category (CalSearchBar *cal_search)
/* Sets the query string to be (contains? "field" "text") */
static void
-notify_query_contains (CalSearchBar *cal_search, const char *field)
+notify_e_cal_view_contains (CalSearchBar *cal_search, const char *field)
{
char *text;
char *sexp;
@@ -294,19 +294,19 @@ regen_query (CalSearchBar *cal_search)
switch (id) {
case SEARCH_ANY_FIELD_CONTAINS:
- notify_query_contains (cal_search, "any");
+ notify_e_cal_view_contains (cal_search, "any");
break;
case SEARCH_SUMMARY_CONTAINS:
- notify_query_contains (cal_search, "summary");
+ notify_e_cal_view_contains (cal_search, "summary");
break;
case SEARCH_DESCRIPTION_CONTAINS:
- notify_query_contains (cal_search, "description");
+ notify_e_cal_view_contains (cal_search, "description");
break;
case SEARCH_COMMENT_CONTAINS:
- notify_query_contains (cal_search, "comment");
+ notify_e_cal_view_contains (cal_search, "comment");
break;
case SEARCH_CATEGORY_IS:
diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c
index 5dbce1ec54..c63075f5ea 100644
--- a/calendar/gui/calendar-commands.c
+++ b/calendar/gui/calendar-commands.c
@@ -49,7 +49,7 @@
#include <bonobo/bonobo-ui-util.h>
#include <bonobo/bonobo-exception.h>
#include <gal/util/e-util.h>
-#include <cal-util/timeutil.h>
+#include <libecal/e-cal-time-util.h>
#include "shell/Evolution.h"
#include "calendar-commands.h"
#include "calendar-config.h"
@@ -86,13 +86,13 @@ file_new_appointment_cb (BonoboUIComponent *uic, gpointer data, const char *path
{
GnomeCalendar *gcal;
time_t dtstart, dtend;
- ECalView *cal_view;
+ ECalendarView *cal_view;
gcal = GNOME_CALENDAR (data);
- cal_view = (ECalView *) gnome_calendar_get_current_view_widget (gcal);
- e_cal_view_get_selected_time_range (cal_view, &dtstart, &dtend);
- e_cal_view_new_appointment_for (cal_view, dtstart, dtend, FALSE, FALSE);
+ cal_view = (ECalendarView *) gnome_calendar_get_current_view_widget (gcal);
+ e_calendar_view_get_selected_time_range (cal_view, &dtstart, &dtend);
+ e_calendar_view_new_appointment_for (cal_view, dtstart, dtend, FALSE, FALSE);
}
static void
@@ -100,13 +100,13 @@ file_new_event_cb (BonoboUIComponent *uic, gpointer data, const char *path)
{
GnomeCalendar *gcal;
time_t dtstart, dtend;
- ECalView *cal_view;
+ ECalendarView *cal_view;
gcal = GNOME_CALENDAR (data);
- cal_view = (ECalView *) gnome_calendar_get_current_view_widget (gcal);
- e_cal_view_get_selected_time_range (cal_view, &dtstart, &dtend);
- e_cal_view_new_appointment_for (cal_view, dtstart, dtend, TRUE, FALSE);
+ cal_view = (ECalendarView *) gnome_calendar_get_current_view_widget (gcal);
+ e_calendar_view_get_selected_time_range (cal_view, &dtstart, &dtend);
+ e_calendar_view_new_appointment_for (cal_view, dtstart, dtend, TRUE, FALSE);
}
static void
@@ -114,13 +114,13 @@ file_new_meeting_cb (BonoboUIComponent *uic, gpointer data, const char *path)
{
GnomeCalendar *gcal;
time_t dtstart, dtend;
- ECalView *cal_view;
+ ECalendarView *cal_view;
gcal = GNOME_CALENDAR (data);
- cal_view = (ECalView *) gnome_calendar_get_current_view_widget (gcal);
- e_cal_view_get_selected_time_range (cal_view, &dtstart, &dtend);
- e_cal_view_new_appointment_for (cal_view, dtstart, dtend, FALSE, TRUE);
+ cal_view = (ECalendarView *) gnome_calendar_get_current_view_widget (gcal);
+ e_calendar_view_get_selected_time_range (cal_view, &dtstart, &dtend);
+ e_calendar_view_new_appointment_for (cal_view, dtstart, dtend, FALSE, TRUE);
}
static void
@@ -386,12 +386,12 @@ publish_freebusy_cmd (BonoboUIComponent *uic, gpointer data, const gchar *path)
/* FIXME Should we aggregate the data? */
client_list = e_cal_model_get_client_list (gnome_calendar_get_calendar_model (gcal));
for (cl = client_list; cl != NULL; cl = cl->next) {
- if (cal_client_get_free_busy ((CalClient *) cl->data, NULL, start, end, &comp_list, NULL)) {
+ if (e_cal_get_free_busy ((ECal *) cl->data, NULL, start, end, &comp_list, NULL)) {
GList *l;
for (l = comp_list; l; l = l->next) {
- CalComponent *comp = CAL_COMPONENT (l->data);
- itip_send_comp (CAL_COMPONENT_METHOD_PUBLISH, comp, (CalClient *) cl->data, NULL);
+ ECalComponent *comp = E_CAL_COMPONENT (l->data);
+ itip_send_comp (E_CAL_COMPONENT_METHOD_PUBLISH, comp, (ECal *) cl->data, NULL);
g_object_unref (comp);
}
@@ -649,28 +649,28 @@ void
calendar_control_sensitize_calendar_commands (BonoboControl *control, GnomeCalendar *gcal, gboolean enable)
{
BonoboUIComponent *uic;
- ECalViewEvent *event;
+ ECalendarViewEvent *event;
GList *list;
int n_selected;
GtkWidget *view;
- CalClient *cal_client;
+ ECal *e_cal;
gboolean read_only = FALSE, has_recurrences;
uic = bonobo_control_get_ui_component (control);
g_assert (uic != NULL);
view = gnome_calendar_get_current_view_widget (gcal);
- list = e_cal_view_get_selected_events (E_CAL_VIEW (view));
+ list = e_calendar_view_get_selected_events (E_CALENDAR_VIEW (view));
n_selected = enable ? g_list_length (list) : 0;
- event = (ECalViewEvent *) list ? list->data : NULL;
+ event = (ECalendarViewEvent *) list ? list->data : NULL;
if (event) {
- cal_client_is_read_only (event->comp_data->client, &read_only, NULL);
+ e_cal_is_read_only (event->comp_data->client, &read_only, NULL);
} else {
- cal_client = e_cal_model_get_default_client (gnome_calendar_get_calendar_model (gcal));
- if (cal_client)
- cal_client_is_read_only (cal_client, &read_only, NULL);
+ e_cal = e_cal_model_get_default_client (gnome_calendar_get_calendar_model (gcal));
+ if (e_cal)
+ e_cal_is_read_only (e_cal, &read_only, NULL);
else
read_only = TRUE;
}
@@ -698,8 +698,8 @@ calendar_control_sensitize_calendar_commands (BonoboControl *control, GnomeCalen
has_recurrences = FALSE;
if (n_selected > 0 && !read_only) {
if (list) {
- event = (ECalViewEvent *) list->data;
- if (cal_util_component_has_recurrences (event->comp_data->icalcomp))
+ event = (ECalendarViewEvent *) list->data;
+ if (e_cal_util_component_has_recurrences (event->comp_data->icalcomp))
has_recurrences = TRUE;
}
}
@@ -725,16 +725,16 @@ sensitize_taskpad_commands (GnomeCalendar *gcal, BonoboControl *control, gboolea
{
BonoboUIComponent *uic;
int n_selected;
- CalClient *cal_client;
+ ECal *e_cal;
gboolean read_only = TRUE;
uic = bonobo_control_get_ui_component (control);
g_assert (uic != NULL);
n_selected = enable ? gnome_calendar_get_num_tasks_selected (gcal) : 0;
- cal_client = gnome_calendar_get_task_pad_cal_client (gcal);
- if (cal_client)
- cal_client_is_read_only (cal_client, &read_only, NULL);
+ e_cal = gnome_calendar_get_task_pad_e_cal (gcal);
+ if (e_cal)
+ e_cal_is_read_only (e_cal, &read_only, NULL);
else
read_only = TRUE;
diff --git a/calendar/gui/calendar-config.c b/calendar/gui/calendar-config.c
index 4282ea7d5c..250328fa10 100644
--- a/calendar/gui/calendar-config.c
+++ b/calendar/gui/calendar-config.c
@@ -38,7 +38,7 @@
#include <libgnomeui/gnome-dialog.h>
#include <gal/util/e-util.h>
#include <widgets/e-timezone-dialog/e-timezone-dialog.h>
-#include <cal-util/timeutil.h>
+#include <libecal/e-cal-time-util.h>
#include "calendar-component.h"
#include "calendar-commands.h"
diff --git a/calendar/gui/calendar-offline-handler.c b/calendar/gui/calendar-offline-handler.c
index ff30299746..bd8949bd00 100644
--- a/calendar/gui/calendar-offline-handler.c
+++ b/calendar/gui/calendar-offline-handler.c
@@ -32,14 +32,14 @@
#include <bonobo/bonobo-i18n.h>
#include <gal/util/e-util.h>
#include "e-util/e-url.h"
-#include <cal-client/cal-client.h>
+#include <libecal/e-cal.h>
#include "calendar-offline-handler.h"
#define PARENT_TYPE bonobo_object_get_type ()
static BonoboObjectClass *parent_class = NULL;
struct _CalendarOfflineHandlerPrivate {
- CalClient *client;
+ ECal *client;
GNOME_Evolution_OfflineProgressListener listener_interface;
@@ -76,7 +76,7 @@ create_connection_list (CalendarOfflineHandler *offline_handler)
priv = offline_handler->priv;
- uris = cal_client_uri_list (priv->client, CAL_MODE_REMOTE);
+ uris = e_cal_uri_list (priv->client, CAL_MODE_REMOTE);
list = GNOME_Evolution_ConnectionList__alloc ();
list->_length = 0;
@@ -139,7 +139,7 @@ update_offline (CalendarOfflineHandler *offline_handler)
}
static void
-backend_cal_set_mode (CalClient *client, CalClientSetModeStatus status, CalMode mode, gpointer data)
+backend_cal_set_mode (ECal *client, ECalSetModeStatus status, CalMode mode, gpointer data)
{
CalendarOfflineHandler *offline_handler = data;
@@ -148,29 +148,29 @@ backend_cal_set_mode (CalClient *client, CalClientSetModeStatus status, CalMode
}
static void
-backend_cal_opened_offline (CalClient *client, CalClientOpenStatus status, gpointer data)
+backend_cal_opened_offline (ECal *client, ECalOpenStatus status, gpointer data)
{
CalendarOfflineHandler *offline_handler = data;
- if (status != CAL_CLIENT_OPEN_SUCCESS) {
+ if (status != E_CAL_OPEN_SUCCESS) {
update_offline (offline_handler);
g_object_unref (client);
return;
}
g_signal_connect (client, "cal_set_mode", G_CALLBACK (backend_cal_set_mode), offline_handler);
- cal_client_set_mode (client, CAL_MODE_LOCAL);
+ e_cal_set_mode (client, CAL_MODE_LOCAL);
}
static void
-backend_cal_opened_online (CalClient *client, CalClientOpenStatus status, gpointer data)
+backend_cal_opened_online (ECal *client, ECalOpenStatus status, gpointer data)
{
- if (status != CAL_CLIENT_OPEN_SUCCESS) {
+ if (status != E_CAL_OPEN_SUCCESS) {
g_object_unref (G_OBJECT (client));
return;
}
- cal_client_set_mode (client, CAL_MODE_REMOTE);
+ e_cal_set_mode (client, CAL_MODE_REMOTE);
g_object_unref (client);
}
@@ -179,13 +179,13 @@ backend_go_offline (gpointer data, gpointer user_data)
{
CalendarOfflineHandler *offline_handler = user_data;
char *uri = data;
- CalClient *client;
+ ECal *client;
gboolean success;
GError *error = NULL;
- client = cal_client_new (uri, CALOBJ_TYPE_ANY);
+ client = e_cal_new (uri, CALOBJ_TYPE_ANY);
g_signal_connect (client, "cal_opened", G_CALLBACK (backend_cal_opened_offline), offline_handler);
- success = cal_client_open (client, TRUE, &error);
+ success = e_cal_open (client, TRUE, &error);
if (!success) {
g_warning (_("backend_go_offline(): %s"), error->message);
update_offline (offline_handler);
@@ -200,14 +200,14 @@ backend_go_online (gpointer data, gpointer user_data)
{
CalendarOfflineHandler *offline_handler = user_data;
char *uri = data;
- CalClient *client;
+ ECal *client;
gboolean success;
GError *error = NULL;
- client = cal_client_new (uri, CALOBJ_TYPE_ANY);
+ client = e_cal_new (uri, CALOBJ_TYPE_ANY);
g_signal_connect (G_OBJECT (client), "cal_opened",
G_CALLBACK (backend_cal_opened_online), offline_handler);
- success = cal_client_open (client, TRUE, &error);
+ success = e_cal_open (client, TRUE, &error);
if (!success) {
g_warning (_("backend_go_online(): %s"), error->message);
g_object_unref (G_OBJECT (client));
@@ -231,7 +231,7 @@ impl_goOffline (PortableServer_Servant servant,
/* To update the status */
priv->listener_interface = CORBA_Object_duplicate (progress_listener, ev);
- uris = cal_client_uri_list (priv->client, CAL_MODE_REMOTE);
+ uris = e_cal_uri_list (priv->client, CAL_MODE_REMOTE);
g_list_foreach (uris, backend_go_offline, offline_handler);
}
@@ -247,7 +247,7 @@ impl_goOnline (PortableServer_Servant servant,
offline_handler = CALENDAR_OFFLINE_HANDLER (bonobo_object_from_servant (servant));
priv = offline_handler->priv;
- uris = cal_client_uri_list (priv->client, CAL_MODE_LOCAL);
+ uris = e_cal_uri_list (priv->client, CAL_MODE_LOCAL);
g_list_foreach (uris, backend_go_online, offline_handler);
}
@@ -327,7 +327,7 @@ calendar_offline_handler_init (CalendarOfflineHandler *offline_handler)
offline_handler->priv = priv;
/* FIXME: what URI to use? */
- priv->client = cal_client_new ("", CALOBJ_TYPE_ANY);
+ priv->client = e_cal_new ("", CALOBJ_TYPE_ANY);
priv->listener_interface = CORBA_OBJECT_NIL;
priv->is_offline = FALSE;
}
diff --git a/calendar/gui/comp-editor-factory.c b/calendar/gui/comp-editor-factory.c
index 7b7dcb4c87..ffb26a831c 100644
--- a/calendar/gui/comp-editor-factory.c
+++ b/calendar/gui/comp-editor-factory.c
@@ -27,7 +27,7 @@
#include <bonobo/bonobo-i18n.h>
#include <evolution-calendar.h>
#include <e-util/e-url.h>
-#include <cal-client/cal-client.h>
+#include <libecal/e-cal.h>
#include "calendar-config.h"
#include "e-comp-editor-registry.h"
#include "comp-editor-factory.h"
@@ -69,7 +69,7 @@ typedef struct {
char *uri;
/* Client of the calendar */
- CalClient *client;
+ ECal *client;
/* Count editors using this client */
int editor_count;
@@ -239,23 +239,23 @@ editor_destroy_cb (GtkObject *object, gpointer data)
static void
edit_existing (OpenClient *oc, const char *uid)
{
- CalComponent *comp;
+ ECalComponent *comp;
icalcomponent *icalcomp;
CompEditor *editor;
- CalComponentVType vtype;
+ ECalComponentVType vtype;
g_assert (oc->open);
/* Get the object */
- if (!cal_client_get_object (oc->client, uid, NULL, &icalcomp, NULL)) {
+ if (!e_cal_get_object (oc->client, uid, NULL, &icalcomp, NULL)) {
/* FIXME Better error handling */
g_warning (G_STRLOC ": Syntax error while getting component `%s'", uid);
return;
}
- comp = cal_component_new ();
- if (!cal_component_set_icalcomponent (comp, icalcomp)) {
+ comp = e_cal_component_new ();
+ if (!e_cal_component_set_icalcomponent (comp, icalcomp)) {
g_object_unref (comp);
icalcomponent_free (icalcomp);
return;
@@ -263,14 +263,14 @@ edit_existing (OpenClient *oc, const char *uid)
/* Create the appropriate type of editor */
- vtype = cal_component_get_vtype (comp);
+ vtype = e_cal_component_get_vtype (comp);
switch (vtype) {
- case CAL_COMPONENT_EVENT:
+ case E_CAL_COMPONENT_EVENT:
editor = COMP_EDITOR (event_editor_new (oc->client));
break;
- case CAL_COMPONENT_TODO:
+ case E_CAL_COMPONENT_TODO:
editor = COMP_EDITOR (task_editor_new (oc->client));
break;
@@ -293,12 +293,12 @@ edit_existing (OpenClient *oc, const char *uid)
/* Creates a component with the appropriate defaults for the specified component
* type.
*/
-static CalComponent *
-get_default_event (CalClient *client, gboolean all_day)
+static ECalComponent *
+get_default_event (ECal *client, gboolean all_day)
{
- CalComponent *comp;
+ ECalComponent *comp;
struct icaltimetype itt;
- CalComponentDateTime dt;
+ ECalComponentDateTime dt;
char *location;
icaltimezone *zone;
@@ -313,8 +313,8 @@ get_default_event (CalClient *client, gboolean all_day)
dt.value = &itt;
dt.tzid = icaltimezone_get_tzid (zone);
- cal_component_set_dtstart (comp, &dt);
- cal_component_set_dtend (comp, &dt);
+ e_cal_component_set_dtstart (comp, &dt);
+ e_cal_component_set_dtend (comp, &dt);
} else {
itt = icaltime_current_time_with_zone (zone);
icaltime_adjust (&itt, 0, 1, -itt.minute, -itt.second);
@@ -322,20 +322,20 @@ get_default_event (CalClient *client, gboolean all_day)
dt.value = &itt;
dt.tzid = icaltimezone_get_tzid (zone);
- cal_component_set_dtstart (comp, &dt);
+ e_cal_component_set_dtstart (comp, &dt);
icaltime_adjust (&itt, 0, 1, 0, 0);
- cal_component_set_dtend (comp, &dt);
+ e_cal_component_set_dtend (comp, &dt);
}
- cal_component_commit_sequence (comp);
+ e_cal_component_commit_sequence (comp);
return comp;
}
-static CalComponent *
-get_default_task (CalClient *client)
+static ECalComponent *
+get_default_task (ECal *client)
{
- CalComponent *comp;
+ ECalComponent *comp;
comp = cal_comp_task_new_with_defaults (client);
@@ -346,7 +346,7 @@ get_default_task (CalClient *client)
static void
edit_new (OpenClient *oc, const GNOME_Evolution_Calendar_CompEditorFactory_CompEditorMode type)
{
- CalComponent *comp;
+ ECalComponent *comp;
CompEditor *editor;
switch (type) {
@@ -400,7 +400,7 @@ resolve_pending_requests (OpenClient *oc)
zone = icaltimezone_get_builtin_timezone (location);
if (zone)
/* FIXME Error handling? */
- cal_client_set_default_timezone (oc->client, zone, NULL);
+ e_cal_set_default_timezone (oc->client, zone, NULL);
for (l = oc->pending; l; l = l->next) {
Request *request;
@@ -428,7 +428,7 @@ resolve_pending_requests (OpenClient *oc)
* requests.
*/
static void
-cal_opened_cb (CalClient *client, CalClientOpenStatus status, gpointer data)
+cal_opened_cb (ECal *client, ECalOpenStatus status, gpointer data)
{
OpenClient *oc;
CompEditorFactory *factory;
@@ -440,29 +440,29 @@ cal_opened_cb (CalClient *client, CalClientOpenStatus status, gpointer data)
priv = factory->priv;
switch (status) {
- case CAL_CLIENT_OPEN_SUCCESS:
+ case E_CAL_OPEN_SUCCESS:
oc->open = TRUE;
resolve_pending_requests (oc);
return;
- case CAL_CLIENT_OPEN_ERROR:
+ case E_CAL_OPEN_ERROR:
dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL,
GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
_("Error while opening the calendar"));
break;
- case CAL_CLIENT_OPEN_NOT_FOUND:
+ case E_CAL_OPEN_NOT_FOUND:
/* bullshit; we specified only_if_exists = FALSE */
g_assert_not_reached ();
return;
- case CAL_CLIENT_OPEN_METHOD_NOT_SUPPORTED:
+ case E_CAL_OPEN_METHOD_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 CAL_CLIENT_OPEN_PERMISSION_DENIED :
+ case E_CAL_OPEN_PERMISSION_DENIED :
dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL,
GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
_("Permission denied to open the calendar"));
@@ -488,13 +488,13 @@ static OpenClient *
open_client (CompEditorFactory *factory, const char *uristr)
{
CompEditorFactoryPrivate *priv;
- CalClient *client;
+ ECal *client;
OpenClient *oc;
GError *error = NULL;
priv = factory->priv;
- client = cal_client_new (uristr, CALOBJ_TYPE_ANY);
+ client = e_cal_new (uristr, CALOBJ_TYPE_ANY);
if (!client)
return NULL;
@@ -512,7 +512,7 @@ open_client (CompEditorFactory *factory, const char *uristr)
g_hash_table_insert (priv->uri_client_hash, oc->uri, oc);
- if (!cal_client_open (oc->client, FALSE, &error)) {
+ if (!e_cal_open (oc->client, FALSE, &error)) {
g_warning (_("open_client(): %s"), error->message);
g_free (oc->uri);
g_object_unref (oc->client);
diff --git a/calendar/gui/comp-util.c b/calendar/gui/comp-util.c
index 45d9dc1f27..170adb0cf5 100644
--- a/calendar/gui/comp-util.c
+++ b/calendar/gui/comp-util.c
@@ -1,4 +1,4 @@
-/* Evolution calendar - Utilities for manipulating CalComponent objects
+/* Evolution calendar - Utilities for manipulating ECalComponent objects
*
* Copyright (C) 2000 Ximian, Inc.
* Copyright (C) 2000 Ximian, Inc.
@@ -39,31 +39,31 @@
* component object.
**/
void
-cal_comp_util_add_exdate (CalComponent *comp, time_t t, icaltimezone *zone)
+cal_comp_util_add_exdate (ECalComponent *comp, time_t t, icaltimezone *zone)
{
GSList *list;
- CalComponentDateTime *cdt;
+ ECalComponentDateTime *cdt;
g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
+ g_return_if_fail (E_IS_CAL_COMPONENT (comp));
- cal_component_get_exdate_list (comp, &list);
+ e_cal_component_get_exdate_list (comp, &list);
- cdt = g_new (CalComponentDateTime, 1);
+ cdt = g_new (ECalComponentDateTime, 1);
cdt->value = g_new (struct icaltimetype, 1);
*cdt->value = icaltime_from_timet_with_zone (t, FALSE, zone);
cdt->tzid = g_strdup (icaltimezone_get_tzid (zone));
list = g_slist_append (list, cdt);
- cal_component_set_exdate_list (comp, list);
- cal_component_free_exdate_list (list);
+ e_cal_component_set_exdate_list (comp, list);
+ e_cal_component_free_exdate_list (list);
}
/* Returns TRUE if the TZIDs are equivalent, i.e. both NULL or the same. */
static gboolean
-cal_component_compare_tzid (const char *tzid1, const char *tzid2)
+e_cal_component_compare_tzid (const char *tzid1, const char *tzid2)
{
gboolean retval = TRUE;
@@ -81,7 +81,7 @@ cal_component_compare_tzid (const char *tzid1, const char *tzid2)
/**
* cal_comp_util_compare_event_timezones:
* @comp: A calendar component object.
- * @client: A #CalClient.
+ * @client: A #ECal.
*
* Checks if the component uses the given timezone for both the start and
* the end time, or if the UTC offsets of the start and end times are the same
@@ -91,11 +91,11 @@ cal_component_compare_tzid (const char *tzid1, const char *tzid2)
* offset in the given timezone.
**/
gboolean
-cal_comp_util_compare_event_timezones (CalComponent *comp,
- CalClient *client,
+cal_comp_util_compare_event_timezones (ECalComponent *comp,
+ ECal *client,
icaltimezone *zone)
{
- CalComponentDateTime start_datetime, end_datetime;
+ ECalComponentDateTime start_datetime, end_datetime;
const char *tzid;
gboolean retval = FALSE;
icaltimezone *start_zone, *end_zone;
@@ -103,8 +103,8 @@ cal_comp_util_compare_event_timezones (CalComponent *comp,
tzid = icaltimezone_get_tzid (zone);
- cal_component_get_dtstart (comp, &start_datetime);
- cal_component_get_dtend (comp, &end_datetime);
+ e_cal_component_get_dtstart (comp, &start_datetime);
+ e_cal_component_get_dtend (comp, &end_datetime);
/* If either the DTSTART or the DTEND is a DATE value, we return TRUE.
Maybe if one was a DATE-TIME we should check that, but that should
@@ -133,8 +133,8 @@ cal_comp_util_compare_event_timezones (CalComponent *comp,
}
/* FIXME: DURATION may be used instead. */
- if (cal_component_compare_tzid (tzid, start_datetime.tzid)
- && cal_component_compare_tzid (tzid, end_datetime.tzid)) {
+ if (e_cal_component_compare_tzid (tzid, start_datetime.tzid)
+ && e_cal_component_compare_tzid (tzid, end_datetime.tzid)) {
/* If both TZIDs are the same as the given zone's TZID, then
we know the timezones are the same so we return TRUE. */
retval = TRUE;
@@ -142,7 +142,7 @@ cal_comp_util_compare_event_timezones (CalComponent *comp,
/* If the TZIDs differ, we have to compare the UTC offsets
of the start and end times, using their own timezones and
the given timezone. */
- if (!cal_client_get_timezone (client, start_datetime.tzid,
+ if (!e_cal_get_timezone (client, start_datetime.tzid,
&start_zone, NULL))
goto out;
@@ -157,7 +157,7 @@ cal_comp_util_compare_event_timezones (CalComponent *comp,
goto out;
}
- if (!cal_client_get_timezone (client, end_datetime.tzid,
+ if (!e_cal_get_timezone (client, end_datetime.tzid,
&end_zone, NULL))
goto out;
@@ -177,8 +177,8 @@ cal_comp_util_compare_event_timezones (CalComponent *comp,
out:
- cal_component_free_datetime (&start_datetime);
- cal_component_free_datetime (&end_datetime);
+ e_cal_component_free_datetime (&start_datetime);
+ e_cal_component_free_datetime (&end_datetime);
return retval;
}
@@ -202,16 +202,16 @@ cal_comp_util_compare_event_timezones (CalComponent *comp,
* user cancelled the deletion.
**/
gboolean
-cal_comp_is_on_server (CalComponent *comp, CalClient *client)
+cal_comp_is_on_server (ECalComponent *comp, ECal *client)
{
const char *uid;
icalcomponent *icalcomp;
GError *error = NULL;
g_return_val_if_fail (comp != NULL, FALSE);
- g_return_val_if_fail (IS_CAL_COMPONENT (comp), FALSE);
+ g_return_val_if_fail (E_IS_CAL_COMPONENT (comp), FALSE);
g_return_val_if_fail (client != NULL, FALSE);
- g_return_val_if_fail (IS_CAL_CLIENT (client), FALSE);
+ g_return_val_if_fail (E_IS_CAL (client), FALSE);
/* See if the component is on the server. If it is not, then it likely
* means that the appointment is new, only in the day view, and we
@@ -219,9 +219,9 @@ cal_comp_is_on_server (CalComponent *comp, CalClient *client)
* confirm and we can just delete the event. Otherwise, we ask
* the user.
*/
- cal_component_get_uid (comp, &uid);
+ e_cal_component_get_uid (comp, &uid);
- if (cal_client_get_object (client, uid, NULL, &icalcomp, &error)) {
+ if (e_cal_get_object (client, uid, NULL, &icalcomp, &error)) {
icalcomponent_free (icalcomp);
return TRUE;
@@ -243,22 +243,22 @@ cal_comp_is_on_server (CalComponent *comp, CalClient *client)
*
* Return value: A newly-created calendar component.
**/
-CalComponent *
-cal_comp_event_new_with_defaults (CalClient *client)
+ECalComponent *
+cal_comp_event_new_with_defaults (ECal *client)
{
icalcomponent *icalcomp;
- CalComponent *comp;
+ ECalComponent *comp;
int interval;
CalUnits units;
- CalComponentAlarm *alarm;
+ ECalComponentAlarm *alarm;
icalproperty *icalprop;
- CalAlarmTrigger trigger;
+ ECalComponentAlarmTrigger trigger;
- if (!cal_client_get_default_object (client, &icalcomp, NULL))
+ if (!e_cal_get_default_object (client, &icalcomp, NULL))
return NULL;
- comp = cal_component_new ();
- if (!cal_component_set_icalcomponent (comp, icalcomp)) {
+ comp = e_cal_component_new ();
+ if (!e_cal_component_set_icalcomponent (comp, icalcomp)) {
g_object_unref (comp);
icalcomponent_free (icalcomp);
return NULL;
@@ -270,20 +270,20 @@ cal_comp_event_new_with_defaults (CalClient *client)
interval = calendar_config_get_default_reminder_interval ();
units = calendar_config_get_default_reminder_units ();
- alarm = cal_component_alarm_new ();
+ alarm = e_cal_component_alarm_new ();
/* We don't set the description of the alarm; we'll copy it from the
* summary when it gets committed to the server. For that, we add a
* X-EVOLUTION-NEEDS-DESCRIPTION property to the alarm's component.
*/
- icalcomp = cal_component_alarm_get_icalcomponent (alarm);
+ icalcomp = e_cal_component_alarm_get_icalcomponent (alarm);
icalprop = icalproperty_new_x ("1");
icalproperty_set_x_name (icalprop, "X-EVOLUTION-NEEDS-DESCRIPTION");
icalcomponent_add_property (icalcomp, icalprop);
- cal_component_alarm_set_action (alarm, CAL_ALARM_DISPLAY);
+ e_cal_component_alarm_set_action (alarm, E_CAL_COMPONENT_ALARM_DISPLAY);
- trigger.type = CAL_ALARM_TRIGGER_RELATIVE_START;
+ trigger.type = E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_START;
memset (&trigger.u.rel_duration, 0, sizeof (trigger.u.rel_duration));
@@ -306,33 +306,33 @@ cal_comp_event_new_with_defaults (CalClient *client)
g_assert_not_reached ();
}
- cal_component_alarm_set_trigger (alarm, trigger);
+ e_cal_component_alarm_set_trigger (alarm, trigger);
- cal_component_add_alarm (comp, alarm);
- cal_component_alarm_free (alarm);
+ e_cal_component_add_alarm (comp, alarm);
+ e_cal_component_alarm_free (alarm);
return comp;
}
-CalComponent *
-cal_comp_task_new_with_defaults (CalClient *client)
+ECalComponent *
+cal_comp_task_new_with_defaults (ECal *client)
{
- CalComponent *comp;
+ ECalComponent *comp;
icalcomponent *icalcomp;
- if (!cal_client_get_default_object (client, &icalcomp, NULL))
+ if (!e_cal_get_default_object (client, &icalcomp, NULL))
return NULL;
- comp = cal_component_new ();
- if (!cal_component_set_icalcomponent (comp, icalcomp)) {
+ comp = e_cal_component_new ();
+ if (!e_cal_component_set_icalcomponent (comp, icalcomp)) {
g_object_unref (comp);
icalcomponent_free (icalcomp);
return NULL;
}
- comp = cal_component_new ();
- if (!cal_component_set_icalcomponent (comp, icalcomp)) {
+ comp = e_cal_component_new ();
+ if (!e_cal_component_set_icalcomponent (comp, icalcomp)) {
g_object_unref (comp);
icalcomponent_free (icalcomp);
return NULL;
diff --git a/calendar/gui/comp-util.h b/calendar/gui/comp-util.h
index c3326fbaa3..0f4542aba1 100644
--- a/calendar/gui/comp-util.h
+++ b/calendar/gui/comp-util.h
@@ -1,4 +1,4 @@
-/* Evolution calendar - Utilities for manipulating CalComponent objects
+/* Evolution calendar - Utilities for manipulating ECalComponent objects
*
* Copyright (C) 2000 Ximian, Inc.
* Copyright (C) 2000 Ximian, Inc.
@@ -23,23 +23,23 @@
#define COMP_UTIL_H
#include <gtk/gtkwidget.h>
-#include <cal-util/cal-component.h>
-#include <cal-client/cal-client.h>
+#include <libecal/e-cal-component.h>
+#include <libecal/e-cal.h>
-void cal_comp_util_add_exdate (CalComponent *comp, time_t t, icaltimezone *zone);
+void cal_comp_util_add_exdate (ECalComponent *comp, time_t t, icaltimezone *zone);
/* Returns TRUE if the component uses the given timezone for both DTSTART
and DTEND, or if the UTC offsets of the start and end times are the same
as in the given zone. */
-gboolean cal_comp_util_compare_event_timezones (CalComponent *comp,
- CalClient *client,
+gboolean cal_comp_util_compare_event_timezones (ECalComponent *comp,
+ ECal *client,
icaltimezone *zone);
-gboolean cal_comp_is_on_server (CalComponent *comp,
- CalClient *client);
+gboolean cal_comp_is_on_server (ECalComponent *comp,
+ ECal *client);
-CalComponent *cal_comp_event_new_with_defaults (CalClient *client);
-CalComponent *cal_comp_task_new_with_defaults (CalClient *client);
+ECalComponent *cal_comp_event_new_with_defaults (ECal *client);
+ECalComponent *cal_comp_task_new_with_defaults (ECal *client);
#endif
diff --git a/calendar/gui/control-factory.c b/calendar/gui/control-factory.c
index 9586d6f62d..58436ec841 100644
--- a/calendar/gui/control-factory.c
+++ b/calendar/gui/control-factory.c
@@ -32,7 +32,7 @@
#include <glade/glade.h>
#include <libgnomeui/gnome-dialog-util.h>
-#include <cal-util/timeutil.h>
+#include <libecal/e-cal-time-util.h>
#include <gui/gnome-cal.h>
#include <gui/calendar-commands.h>
#include <gui/calendar-config.h>
@@ -78,7 +78,7 @@ get_prop (BonoboPropertyBag *bag,
switch (arg_id) {
case PROPERTY_CALENDAR_URI_IDX:
- uri = cal_client_get_uri (e_cal_model_get_default_client (gnome_calendar_get_calendar_model (gcal)));
+ uri = e_cal_get_uri (e_cal_model_get_default_client (gnome_calendar_get_calendar_model (gcal)));
BONOBO_ARG_SET_STRING (arg, uri);
break;
diff --git a/calendar/gui/dialogs/Makefile.am b/calendar/gui/dialogs/Makefile.am
index 84424f8cc0..9181d5d3dd 100644
--- a/calendar/gui/dialogs/Makefile.am
+++ b/calendar/gui/dialogs/Makefile.am
@@ -20,8 +20,6 @@ INCLUDES = \
-I$(top_srcdir)/libical/src \
-I$(top_builddir)/shell \
-I$(top_srcdir)/shell \
- -I$(top_srcdir)/addressbook/backend \
- -I$(top_builddir)/addressbook/backend \
-DEVOLUTION_DATADIR=\""$(datadir)"\" \
-DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \
-DEVOLUTION_IMAGESDIR=\""$(imagesdir)"\" \
diff --git a/calendar/gui/dialogs/alarm-options.c b/calendar/gui/dialogs/alarm-options.c
index b94a75478d..f664d8d31f 100644
--- a/calendar/gui/dialogs/alarm-options.c
+++ b/calendar/gui/dialogs/alarm-options.c
@@ -51,7 +51,7 @@ typedef struct {
GladeXML *xml;
/* The alarm action selected */
- CalAlarmAction action;
+ ECalComponentAlarmAction action;
/* Toplevel */
GtkWidget *toplevel;
@@ -218,7 +218,7 @@ repeat_toggle_toggled_cb (GtkToggleButton *toggle, gpointer data)
gtk_widget_set_sensitive (dialog->repeat_group, active);
/* activate the 'OK' button */
- if (dialog->action == CAL_ALARM_PROCEDURE)
+ if (dialog->action == E_CAL_COMPONENT_ALARM_PROCEDURE)
palarm_options_changed_cb (GTK_EDITABLE (dialog->palarm_program), dialog);
}
@@ -227,7 +227,7 @@ repeat_spin_button_changed_cb (GtkWidget *spin, gpointer user_data)
{
Dialog *dialog = user_data;
- if (dialog->action == CAL_ALARM_PROCEDURE)
+ if (dialog->action == E_CAL_COMPONENT_ALARM_PROCEDURE)
palarm_options_changed_cb (GTK_EDITABLE (dialog->palarm_program), dialog);
}
@@ -237,7 +237,7 @@ repeat_unit_changed_cb (GtkWidget *option_menu, gpointer user_data)
{
Dialog *dialog = user_data;
- if (dialog->action == CAL_ALARM_PROCEDURE)
+ if (dialog->action == E_CAL_COMPONENT_ALARM_PROCEDURE)
palarm_options_changed_cb (GTK_EDITABLE (dialog->palarm_program), dialog);
}
@@ -261,12 +261,12 @@ init_widgets (Dialog *dialog)
/* Fills the audio alarm widgets with the values from the alarm component */
static void
-alarm_to_aalarm_widgets (Dialog *dialog, CalComponentAlarm *alarm)
+alarm_to_aalarm_widgets (Dialog *dialog, ECalComponentAlarm *alarm)
{
icalattach *attach;
const char *url;
- cal_component_alarm_get_attach (alarm, &attach);
+ e_cal_component_alarm_get_attach (alarm, &attach);
if (!attach) {
e_dialog_editable_set (dialog->aalarm_attach, NULL);
@@ -289,12 +289,12 @@ alarm_to_aalarm_widgets (Dialog *dialog, CalComponentAlarm *alarm)
/* Fills the display alarm widgets with the values from the alarm component */
static void
-alarm_to_dalarm_widgets (Dialog *dialog, CalComponentAlarm *alarm)
+alarm_to_dalarm_widgets (Dialog *dialog, ECalComponentAlarm *alarm)
{
- CalComponentText description;
+ ECalComponentText description;
GtkTextBuffer *text_buffer;
- cal_component_alarm_get_description (alarm, &description);
+ e_cal_component_alarm_get_description (alarm, &description);
text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (dialog->dalarm_description));
gtk_text_buffer_set_text (text_buffer, description.value ? description.value : "", -1);
@@ -302,16 +302,16 @@ alarm_to_dalarm_widgets (Dialog *dialog, CalComponentAlarm *alarm)
/* Fills the mail alarm widgets with the values from the alarm component */
static void
-alarm_to_malarm_widgets (Dialog *dialog, CalComponentAlarm *alarm)
+alarm_to_malarm_widgets (Dialog *dialog, ECalComponentAlarm *alarm)
{
- CalComponentText description;
+ ECalComponentText description;
GtkTextBuffer *text_buffer;
GSList *attendee_list, *l;
EABDestination **destv;
int len, i;
/* Recipients */
- cal_component_alarm_get_attendee_list (alarm, &attendee_list);
+ e_cal_component_alarm_get_attendee_list (alarm, &attendee_list);
len = g_slist_length (attendee_list);
if (len <= 0) {
@@ -323,7 +323,7 @@ alarm_to_malarm_widgets (Dialog *dialog, CalComponentAlarm *alarm)
} else {
destv = g_new0 (EABDestination *, len + 1);
for (l = attendee_list, i = 0; l != NULL; l = l->next, i++) {
- CalComponentAttendee *a = l->data;
+ ECalComponentAttendee *a = l->data;
EABDestination *dest;
dest = eab_destination_new ();
@@ -344,10 +344,10 @@ alarm_to_malarm_widgets (Dialog *dialog, CalComponentAlarm *alarm)
g_object_unref (GTK_OBJECT (destv[i]));
g_free (destv);
- cal_component_free_attendee_list (attendee_list);
+ e_cal_component_free_attendee_list (attendee_list);
/* Description */
- cal_component_alarm_get_description (alarm, &description);
+ e_cal_component_alarm_get_description (alarm, &description);
text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (dialog->malarm_description));
gtk_text_buffer_set_text (text_buffer, description.value ? description.value : "", -1);
@@ -355,13 +355,13 @@ alarm_to_malarm_widgets (Dialog *dialog, CalComponentAlarm *alarm)
/* Fills the procedure alarm widgets with the values from the alarm component */
static void
-alarm_to_palarm_widgets (Dialog *dialog, CalComponentAlarm *alarm)
+alarm_to_palarm_widgets (Dialog *dialog, ECalComponentAlarm *alarm)
{
icalattach *attach;
- CalComponentText description;
+ ECalComponentText description;
- cal_component_alarm_get_attach (alarm, &attach);
- cal_component_alarm_get_description (alarm, &description);
+ e_cal_component_alarm_get_attach (alarm, &attach);
+ e_cal_component_alarm_get_description (alarm, &description);
if (attach) {
const char *url;
@@ -416,13 +416,13 @@ normalize_duration (struct icaldurationtype dur, int *value, enum duration_units
/* Fills the repeat widgets with the values from the alarm component */
static void
-alarm_to_repeat_widgets (Dialog *dialog, CalComponentAlarm *alarm)
+alarm_to_repeat_widgets (Dialog *dialog, ECalComponentAlarm *alarm)
{
- CalAlarmRepeat repeat;
+ ECalComponentAlarmRepeat repeat;
int value;
enum duration_units units;
- cal_component_alarm_get_repeat (alarm, &repeat);
+ e_cal_component_alarm_get_repeat (alarm, &repeat);
/* Sensitivity */
@@ -449,20 +449,20 @@ alarm_to_repeat_widgets (Dialog *dialog, CalComponentAlarm *alarm)
/* Fills the widgets with the values from the alarm component */
static void
-alarm_to_dialog (Dialog *dialog, CalComponentAlarm *alarm)
+alarm_to_dialog (Dialog *dialog, ECalComponentAlarm *alarm)
{
- CalAlarmAction action;
+ ECalComponentAlarmAction action;
alarm_to_repeat_widgets (dialog, alarm);
- cal_component_alarm_get_action (alarm, &action);
+ e_cal_component_alarm_get_action (alarm, &action);
switch (action) {
- case CAL_ALARM_NONE:
+ case E_CAL_COMPONENT_ALARM_NONE:
g_assert_not_reached ();
return;
- case CAL_ALARM_AUDIO:
+ case E_CAL_COMPONENT_ALARM_AUDIO:
gtk_window_set_title (GTK_WINDOW (dialog->toplevel), _("Audio Alarm Options"));
gtk_widget_show (dialog->aalarm_group);
gtk_widget_hide (dialog->dalarm_group);
@@ -471,7 +471,7 @@ alarm_to_dialog (Dialog *dialog, CalComponentAlarm *alarm)
alarm_to_aalarm_widgets (dialog, alarm);
break;
- case CAL_ALARM_DISPLAY:
+ case E_CAL_COMPONENT_ALARM_DISPLAY:
gtk_window_set_title (GTK_WINDOW (dialog->toplevel), _("Message Alarm Options"));
gtk_widget_hide (dialog->aalarm_group);
gtk_widget_show (dialog->dalarm_group);
@@ -480,7 +480,7 @@ alarm_to_dialog (Dialog *dialog, CalComponentAlarm *alarm)
alarm_to_dalarm_widgets (dialog, alarm);
break;
- case CAL_ALARM_EMAIL:
+ case E_CAL_COMPONENT_ALARM_EMAIL:
gtk_window_set_title (GTK_WINDOW (dialog->toplevel), _("Email Alarm Options"));
gtk_widget_hide (dialog->aalarm_group);
gtk_widget_hide (dialog->dalarm_group);
@@ -489,7 +489,7 @@ alarm_to_dialog (Dialog *dialog, CalComponentAlarm *alarm)
alarm_to_malarm_widgets (dialog, alarm);
break;
- case CAL_ALARM_PROCEDURE:
+ case E_CAL_COMPONENT_ALARM_PROCEDURE:
gtk_window_set_title (GTK_WINDOW (dialog->toplevel), _("Program Alarm Options"));
gtk_widget_hide (dialog->aalarm_group);
gtk_widget_hide (dialog->dalarm_group);
@@ -505,7 +505,7 @@ alarm_to_dialog (Dialog *dialog, CalComponentAlarm *alarm)
G_CALLBACK (palarm_options_changed_cb), dialog);
break;
- case CAL_ALARM_UNKNOWN:
+ case E_CAL_COMPONENT_ALARM_UNKNOWN:
gtk_window_set_title (GTK_WINDOW (dialog->toplevel), _("Unknown Alarm Options"));
break;
@@ -521,14 +521,14 @@ alarm_to_dialog (Dialog *dialog, CalComponentAlarm *alarm)
/* Fills the alarm data with the values from the repeat/duration widgets */
static void
-repeat_widgets_to_alarm (Dialog *dialog, CalComponentAlarm *alarm)
+repeat_widgets_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm)
{
- CalAlarmRepeat repeat;
+ ECalComponentAlarmRepeat repeat;
if (!e_dialog_toggle_get (dialog->repeat_toggle)) {
repeat.repetitions = 0;
- cal_component_alarm_set_repeat (alarm, repeat);
+ e_cal_component_alarm_set_repeat (alarm, repeat);
return;
}
@@ -552,13 +552,13 @@ repeat_widgets_to_alarm (Dialog *dialog, CalComponentAlarm *alarm)
g_assert_not_reached ();
}
- cal_component_alarm_set_repeat (alarm, repeat);
+ e_cal_component_alarm_set_repeat (alarm, repeat);
}
/* Fills the audio alarm data with the values from the widgets */
static void
-aalarm_widgets_to_alarm (Dialog *dialog, CalComponentAlarm *alarm)
+aalarm_widgets_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm)
{
char *url;
icalattach *attach;
@@ -567,16 +567,16 @@ aalarm_widgets_to_alarm (Dialog *dialog, CalComponentAlarm *alarm)
attach = icalattach_new_from_url (url ? url : "");
g_free (url);
- cal_component_alarm_set_attach (alarm, attach);
+ e_cal_component_alarm_set_attach (alarm, attach);
icalattach_unref (attach);
}
/* Fills the display alarm data with the values from the widgets */
static void
-dalarm_widgets_to_alarm (Dialog *dialog, CalComponentAlarm *alarm)
+dalarm_widgets_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm)
{
char *str;
- CalComponentText description;
+ ECalComponentText description;
GtkTextBuffer *text_buffer;
GtkTextIter text_iter_start, text_iter_end;
icalcomponent *icalcomp;
@@ -590,12 +590,12 @@ dalarm_widgets_to_alarm (Dialog *dialog, CalComponentAlarm *alarm)
description.value = str;
description.altrep = NULL;
- cal_component_alarm_set_description (alarm, &description);
+ e_cal_component_alarm_set_description (alarm, &description);
g_free (str);
/* remove the X-EVOLUTION-NEEDS-DESCRIPTION property, so that
* we don't re-set the alarm's description */
- icalcomp = cal_component_alarm_get_icalcomponent (alarm);
+ icalcomp = e_cal_component_alarm_get_icalcomponent (alarm);
icalprop = icalcomponent_get_first_property (icalcomp, ICAL_X_PROPERTY);
while (icalprop) {
const char *x_name;
@@ -612,10 +612,10 @@ dalarm_widgets_to_alarm (Dialog *dialog, CalComponentAlarm *alarm)
/* Fills the mail alarm data with the values from the widgets */
static void
-malarm_widgets_to_alarm (Dialog *dialog, CalComponentAlarm *alarm)
+malarm_widgets_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm)
{
char *str;
- CalComponentText description;
+ ECalComponentText description;
GSList *attendee_list = NULL;
EABDestination **destv;
GtkTextBuffer *text_buffer;
@@ -632,20 +632,20 @@ malarm_widgets_to_alarm (Dialog *dialog, CalComponentAlarm *alarm)
for (i = 0; destv[i] != NULL; i++) {
EABDestination *dest;
- CalComponentAttendee *a;
+ ECalComponentAttendee *a;
dest = destv[i];
- a = g_new0 (CalComponentAttendee, 1);
+ a = g_new0 (ECalComponentAttendee, 1);
a->value = eab_destination_get_email (dest);
a->cn = eab_destination_get_name (dest);
attendee_list = g_slist_append (attendee_list, a);
}
- cal_component_alarm_set_attendee_list (alarm, attendee_list);
+ e_cal_component_alarm_set_attendee_list (alarm, attendee_list);
- cal_component_free_attendee_list (attendee_list);
+ e_cal_component_free_attendee_list (attendee_list);
eab_destination_freev (destv);
/* Description */
@@ -657,12 +657,12 @@ malarm_widgets_to_alarm (Dialog *dialog, CalComponentAlarm *alarm)
description.value = str;
description.altrep = NULL;
- cal_component_alarm_set_description (alarm, &description);
+ e_cal_component_alarm_set_description (alarm, &description);
g_free (str);
/* remove the X-EVOLUTION-NEEDS-DESCRIPTION property, so that
* we don't re-set the alarm's description */
- icalcomp = cal_component_alarm_get_icalcomponent (alarm);
+ icalcomp = e_cal_component_alarm_get_icalcomponent (alarm);
icalprop = icalcomponent_get_first_property(icalcomp, ICAL_X_PROPERTY);
while (icalprop) {
const char *x_name;
@@ -679,12 +679,12 @@ malarm_widgets_to_alarm (Dialog *dialog, CalComponentAlarm *alarm)
/* Fills the procedure alarm data with the values from the widgets */
static void
-palarm_widgets_to_alarm (Dialog *dialog, CalComponentAlarm *alarm)
+palarm_widgets_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm)
{
char *program;
icalattach *attach;
char *str;
- CalComponentText description;
+ ECalComponentText description;
icalcomponent *icalcomp;
icalproperty *icalprop;
@@ -692,19 +692,19 @@ palarm_widgets_to_alarm (Dialog *dialog, CalComponentAlarm *alarm)
attach = icalattach_new_from_url (program ? program : "");
g_free (program);
- cal_component_alarm_set_attach (alarm, attach);
+ e_cal_component_alarm_set_attach (alarm, attach);
icalattach_unref (attach);
str = e_dialog_editable_get (dialog->palarm_args);
description.value = str;
description.altrep = NULL;
- cal_component_alarm_set_description (alarm, &description);
+ e_cal_component_alarm_set_description (alarm, &description);
g_free (str);
/* remove the X-EVOLUTION-NEEDS-DESCRIPTION property, so that
* we don't re-set the alarm's description */
- icalcomp = cal_component_alarm_get_icalcomponent (alarm);
+ icalcomp = e_cal_component_alarm_get_icalcomponent (alarm);
icalprop = icalcomponent_get_first_property (icalcomp, ICAL_X_PROPERTY);
while (icalprop) {
const char *x_name;
@@ -721,36 +721,36 @@ palarm_widgets_to_alarm (Dialog *dialog, CalComponentAlarm *alarm)
/* Fills the alarm data with the values from the widgets */
static void
-dialog_to_alarm (Dialog *dialog, CalComponentAlarm *alarm)
+dialog_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm)
{
- CalAlarmAction action;
+ ECalComponentAlarmAction action;
repeat_widgets_to_alarm (dialog, alarm);
- cal_component_alarm_get_action (alarm, &action);
+ e_cal_component_alarm_get_action (alarm, &action);
switch (action) {
- case CAL_ALARM_NONE:
+ case E_CAL_COMPONENT_ALARM_NONE:
g_assert_not_reached ();
break;
- case CAL_ALARM_AUDIO:
+ case E_CAL_COMPONENT_ALARM_AUDIO:
aalarm_widgets_to_alarm (dialog, alarm);
break;
- case CAL_ALARM_DISPLAY:
+ case E_CAL_COMPONENT_ALARM_DISPLAY:
dalarm_widgets_to_alarm (dialog, alarm);
break;
- case CAL_ALARM_EMAIL:
+ case E_CAL_COMPONENT_ALARM_EMAIL:
malarm_widgets_to_alarm (dialog, alarm);
break;
- case CAL_ALARM_PROCEDURE:
+ case E_CAL_COMPONENT_ALARM_PROCEDURE:
palarm_widgets_to_alarm (dialog, alarm);
break;
- case CAL_ALARM_UNKNOWN:
+ case E_CAL_COMPONENT_ALARM_UNKNOWN:
break;
default:
@@ -769,7 +769,7 @@ dialog_to_alarm (Dialog *dialog, CalComponentAlarm *alarm)
* Return value: TRUE if the dialog could be created, FALSE otherwise.
**/
gboolean
-alarm_options_dialog_run (CalComponentAlarm *alarm, const char *email, gboolean repeat)
+alarm_options_dialog_run (ECalComponentAlarm *alarm, const char *email, gboolean repeat)
{
Dialog dialog;
int response_id;
diff --git a/calendar/gui/dialogs/alarm-options.h b/calendar/gui/dialogs/alarm-options.h
index 1b4abb56d9..5a07935810 100644
--- a/calendar/gui/dialogs/alarm-options.h
+++ b/calendar/gui/dialogs/alarm-options.h
@@ -21,8 +21,8 @@
#ifndef ALARM_OPTIONS_H
#define ALARM_OPTIONS_H
-#include <cal-util/cal-component.h>
+#include <libecal/e-cal-component.h>
-gboolean alarm_options_dialog_run (CalComponentAlarm *alarm, const char *email, gboolean repeat);
+gboolean alarm_options_dialog_run (ECalComponentAlarm *alarm, const char *email, gboolean repeat);
#endif
diff --git a/calendar/gui/dialogs/alarm-page.c b/calendar/gui/dialogs/alarm-page.c
index 919ed9a2c8..f07df3c28f 100644
--- a/calendar/gui/dialogs/alarm-page.c
+++ b/calendar/gui/dialogs/alarm-page.c
@@ -39,8 +39,8 @@
#include <gal/widgets/e-unicode.h>
#include "e-util/e-dialog-widgets.h"
#include "e-util/e-time-utils.h"
-#include "cal-util/cal-util.h"
-#include "cal-util/timeutil.h"
+#include <libecal/e-cal-util.h>
+#include <libecal/e-cal-time-util.h>
#include "../calendar-config.h"
#include "comp-editor-util.h"
#include "alarm-options.h"
@@ -74,7 +74,7 @@ struct _AlarmPagePrivate {
GtkWidget *button_options;
/* Alarm options dialog and the alarm we maintain */
- CalComponentAlarm *alarm;
+ ECalComponentAlarm *alarm;
/* Alarm store for the GtkTreeView list widget */
EAlarmList *list_store;
@@ -100,10 +100,10 @@ enum {
/* Option menu maps */
static const int action_map[] = {
- CAL_ALARM_DISPLAY,
- CAL_ALARM_AUDIO,
- CAL_ALARM_PROCEDURE,
- CAL_ALARM_EMAIL,
+ E_CAL_COMPONENT_ALARM_DISPLAY,
+ E_CAL_COMPONENT_ALARM_AUDIO,
+ E_CAL_COMPONENT_ALARM_PROCEDURE,
+ E_CAL_COMPONENT_ALARM_EMAIL,
-1
};
@@ -128,8 +128,8 @@ static const int relative_map[] = {
};
static const int time_map[] = {
- CAL_ALARM_TRIGGER_RELATIVE_START,
- CAL_ALARM_TRIGGER_RELATIVE_END,
+ E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_START,
+ E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_END,
-1
};
@@ -141,8 +141,8 @@ static void alarm_page_finalize (GObject *object);
static GtkWidget *alarm_page_get_widget (CompEditorPage *page);
static void alarm_page_focus_main_widget (CompEditorPage *page);
-static void alarm_page_fill_widgets (CompEditorPage *page, CalComponent *comp);
-static gboolean alarm_page_fill_component (CompEditorPage *page, CalComponent *comp);
+static void alarm_page_fill_widgets (CompEditorPage *page, ECalComponent *comp);
+static gboolean alarm_page_fill_component (CompEditorPage *page, ECalComponent *comp);
static void alarm_page_set_summary (CompEditorPage *page, const char *summary);
static void alarm_page_set_dates (CompEditorPage *page, CompEditorPageDates *dates);
@@ -213,9 +213,9 @@ alarm_page_init (AlarmPage *apage)
/* create the default alarm, which will contain the
* X-EVOLUTION-NEEDS-DESCRIPTION property, so that we
* set a correct description if none is set */
- priv->alarm = cal_component_alarm_new ();
+ priv->alarm = e_cal_component_alarm_new ();
- icalcomp = cal_component_alarm_get_icalcomponent (priv->alarm);
+ icalcomp = e_cal_component_alarm_get_icalcomponent (priv->alarm);
icalprop = icalproperty_new_x ("1");
icalproperty_set_x_name (icalprop, "X-EVOLUTION-NEEDS-DESCRIPTION");
icalcomponent_add_property (icalcomp, icalprop);
@@ -246,7 +246,7 @@ alarm_page_finalize (GObject *object)
}
if (priv->alarm) {
- cal_component_alarm_free (priv->alarm);
+ e_cal_component_alarm_free (priv->alarm);
priv->alarm = NULL;
}
@@ -310,11 +310,11 @@ clear_widgets (AlarmPage *apage)
gtk_label_set_text (GTK_LABEL (priv->date_time), "");
/* Sane defaults */
- e_dialog_option_menu_set (priv->action, CAL_ALARM_DISPLAY, action_map);
+ e_dialog_option_menu_set (priv->action, E_CAL_COMPONENT_ALARM_DISPLAY, action_map);
e_dialog_spin_set (priv->interval_value, 15);
e_dialog_option_menu_set (priv->value_units, MINUTES, value_map);
e_dialog_option_menu_set (priv->relative, BEFORE, relative_map);
- e_dialog_option_menu_set (priv->time, CAL_ALARM_TRIGGER_RELATIVE_START, time_map);
+ e_dialog_option_menu_set (priv->time, E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_START, time_map);
/* List data */
e_alarm_list_clear (priv->list_store);
@@ -324,7 +324,7 @@ static void
sensitize_buttons (AlarmPage *apage)
{
AlarmPagePrivate *priv;
- CalClient *client;
+ ECal *client;
GtkTreeSelection *selection;
GtkTreeIter iter;
gboolean have_selected;
@@ -336,13 +336,13 @@ sensitize_buttons (AlarmPage *apage)
have_selected = gtk_tree_selection_get_selected (selection, NULL, &iter);
gtk_widget_set_sensitive (priv->add,
- cal_client_get_one_alarm_only (client) && have_selected ? FALSE : TRUE);
+ e_cal_get_one_alarm_only (client) && have_selected ? FALSE : TRUE);
gtk_widget_set_sensitive (priv->delete, have_selected);
}
/* Appends an alarm to the list */
static void
-append_reminder (AlarmPage *apage, CalComponentAlarm *alarm)
+append_reminder (AlarmPage *apage, ECalComponentAlarm *alarm)
{
AlarmPagePrivate *priv;
GtkTreeView *view;
@@ -359,12 +359,12 @@ append_reminder (AlarmPage *apage, CalComponentAlarm *alarm)
/* fill_widgets handler for the alarm page */
static void
-alarm_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
+alarm_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
{
AlarmPage *apage;
AlarmPagePrivate *priv;
GtkWidget *menu;
- CalComponentText text;
+ ECalComponentText text;
GList *alarms, *l;
CompEditorPageDates dates;
int i;
@@ -379,7 +379,7 @@ alarm_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
clear_widgets (apage);
/* Summary */
- cal_component_get_summary (comp, &text);
+ e_cal_component_get_summary (comp, &text);
alarm_page_set_summary (page, text.value);
/* Dates */
@@ -388,21 +388,21 @@ alarm_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
comp_editor_free_dates (&dates);
/* List */
- if (!cal_component_has_alarms (comp))
+ if (!e_cal_component_has_alarms (comp))
goto out;
- alarms = cal_component_get_alarm_uids (comp);
+ alarms = e_cal_component_get_alarm_uids (comp);
for (l = alarms; l != NULL; l = l->next) {
- CalComponentAlarm *ca, *ca_copy;
+ ECalComponentAlarm *ca, *ca_copy;
const char *auid;
auid = l->data;
- ca = cal_component_get_alarm (comp, auid);
+ ca = e_cal_component_get_alarm (comp, auid);
g_assert (ca != NULL);
- ca_copy = cal_component_alarm_clone (ca);
- cal_component_alarm_free (ca);
+ ca_copy = e_cal_component_alarm_clone (ca);
+ e_cal_component_alarm_free (ca);
append_reminder (apage, ca_copy);
}
@@ -413,7 +413,7 @@ alarm_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
/* Alarm types */
menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (priv->action));
for (i = 0, l = GTK_MENU_SHELL (menu)->children; action_map[i] != -1; i++, l = l->next) {
- if (cal_client_get_static_capability (page->client, action_map_cap[i]))
+ if (e_cal_get_static_capability (page->client, action_map_cap[i]))
gtk_widget_set_sensitive (l->data, FALSE);
else
gtk_widget_set_sensitive (l->data, TRUE);
@@ -426,7 +426,7 @@ alarm_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
/* fill_component handler for the alarm page */
static gboolean
-alarm_page_fill_component (CompEditorPage *page, CalComponent *comp)
+alarm_page_fill_component (CompEditorPage *page, ECalComponent *comp)
{
AlarmPage *apage;
AlarmPagePrivate *priv;
@@ -441,12 +441,12 @@ alarm_page_fill_component (CompEditorPage *page, CalComponent *comp)
/* Remove all the alarms from the component */
- list = cal_component_get_alarm_uids (comp);
+ list = e_cal_component_get_alarm_uids (comp);
for (l = list; l; l = l->next) {
const char *auid;
auid = l->data;
- cal_component_remove_alarm (comp, auid);
+ e_cal_component_remove_alarm (comp, auid);
}
cal_obj_uid_list_free (list);
@@ -457,26 +457,26 @@ alarm_page_fill_component (CompEditorPage *page, CalComponent *comp)
for (valid_iter = gtk_tree_model_get_iter_first (model, &iter); valid_iter;
valid_iter = gtk_tree_model_iter_next (model, &iter)) {
- CalComponentAlarm *alarm, *alarm_copy;
+ ECalComponentAlarm *alarm, *alarm_copy;
icalcomponent *icalcomp;
icalproperty *icalprop;
- alarm = (CalComponentAlarm *) e_alarm_list_get_alarm (priv->list_store, &iter);
+ alarm = (ECalComponentAlarm *) e_alarm_list_get_alarm (priv->list_store, &iter);
g_assert (alarm != NULL);
/* We set the description of the alarm if it's got
* the X-EVOLUTION-NEEDS-DESCRIPTION property.
*/
- icalcomp = cal_component_alarm_get_icalcomponent (alarm);
+ icalcomp = e_cal_component_alarm_get_icalcomponent (alarm);
icalprop = icalcomponent_get_first_property (icalcomp, ICAL_X_PROPERTY);
while (icalprop) {
const char *x_name;
- CalComponentText summary;
+ ECalComponentText summary;
x_name = icalproperty_get_x_name (icalprop);
if (!strcmp (x_name, "X-EVOLUTION-NEEDS-DESCRIPTION")) {
- cal_component_get_summary (comp, &summary);
- cal_component_alarm_set_description (alarm, &summary);
+ e_cal_component_get_summary (comp, &summary);
+ e_cal_component_alarm_set_description (alarm, &summary);
icalcomponent_remove_property (icalcomp, icalprop);
break;
@@ -489,9 +489,9 @@ alarm_page_fill_component (CompEditorPage *page, CalComponent *comp)
* structures in the list did *not* come from the component.
*/
- alarm_copy = cal_component_alarm_clone (alarm);
- cal_component_add_alarm (comp, alarm_copy);
- cal_component_alarm_free (alarm_copy);
+ alarm_copy = e_cal_component_alarm_clone (alarm);
+ e_cal_component_add_alarm (comp, alarm_copy);
+ e_cal_component_alarm_free (alarm_copy);
}
return TRUE;
@@ -521,17 +521,17 @@ alarm_page_set_summary (CompEditorPage *page, const char *summary)
for (valid_iter = gtk_tree_model_get_iter_first (model, &iter); valid_iter;
valid_iter = gtk_tree_model_iter_next (model, &iter)) {
- CalComponentAlarm *alarm;
- CalComponentText desc;
+ ECalComponentAlarm *alarm;
+ ECalComponentText desc;
- alarm = (CalComponentAlarm *) e_alarm_list_get_alarm (priv->list_store, &iter);
+ alarm = (ECalComponentAlarm *) e_alarm_list_get_alarm (priv->list_store, &iter);
g_assert (alarm != NULL);
- cal_component_alarm_get_description (alarm, &desc);
+ e_cal_component_alarm_get_description (alarm, &desc);
if (desc.value && *desc.value) {
if (!strcmp (desc.value, priv->old_summary)) {
desc.value = summary;
- cal_component_alarm_set_description (alarm, &desc);
+ e_cal_component_alarm_set_description (alarm, &desc);
}
}
}
@@ -637,16 +637,16 @@ add_clicked_cb (GtkButton *button, gpointer data)
{
AlarmPage *apage;
AlarmPagePrivate *priv;
- CalComponentAlarm *alarm;
- CalAlarmTrigger trigger;
- CalAlarmAction action;
+ ECalComponentAlarm *alarm;
+ ECalComponentAlarmTrigger trigger;
+ ECalComponentAlarmAction action;
apage = ALARM_PAGE (data);
priv = apage->priv;
- alarm = cal_component_alarm_clone (priv->alarm);
+ alarm = e_cal_component_alarm_clone (priv->alarm);
- memset (&trigger, 0, sizeof (CalAlarmTrigger));
+ memset (&trigger, 0, sizeof (ECalComponentAlarmTrigger));
trigger.type = e_dialog_option_menu_get (priv->time, time_map);
if (e_dialog_option_menu_get (priv->relative, relative_map) == BEFORE)
trigger.u.rel_duration.is_neg = 1;
@@ -672,22 +672,22 @@ add_clicked_cb (GtkButton *button, gpointer data)
default:
g_assert_not_reached ();
}
- cal_component_alarm_set_trigger (alarm, trigger);
+ e_cal_component_alarm_set_trigger (alarm, trigger);
action = e_dialog_option_menu_get (priv->action, action_map);
- cal_component_alarm_set_action (alarm, action);
- if (action == CAL_ALARM_EMAIL && !cal_component_alarm_has_attendees (alarm)) {
+ e_cal_component_alarm_set_action (alarm, action);
+ if (action == E_CAL_COMPONENT_ALARM_EMAIL && !e_cal_component_alarm_has_attendees (alarm)) {
char *email;
- if (!cal_client_get_alarm_email_address (COMP_EDITOR_PAGE (apage)->client, &email, NULL)) {
- CalComponentAttendee *a;
+ if (!e_cal_get_alarm_email_address (COMP_EDITOR_PAGE (apage)->client, &email, NULL)) {
+ ECalComponentAttendee *a;
GSList attendee_list;
- a = g_new0 (CalComponentAttendee, 1);
+ a = g_new0 (ECalComponentAttendee, 1);
a->value = email;
attendee_list.data = a;
attendee_list.next = NULL;
- cal_component_alarm_set_attendee_list (alarm, &attendee_list);
+ e_cal_component_alarm_set_attendee_list (alarm, &attendee_list);
g_free (email);
g_free (a);
}
@@ -746,13 +746,13 @@ button_options_clicked_cb (GtkWidget *widget, gpointer data)
apage = ALARM_PAGE (data);
priv = apage->priv;
- cal_component_alarm_set_action (priv->alarm,
+ e_cal_component_alarm_set_action (priv->alarm,
e_dialog_option_menu_get (priv->action, action_map));
- repeat = !cal_client_get_static_capability (COMP_EDITOR_PAGE (apage)->client,
+ repeat = !e_cal_get_static_capability (COMP_EDITOR_PAGE (apage)->client,
CAL_STATIC_CAPABILITY_NO_ALARM_REPEAT);
- if (cal_client_get_alarm_email_address (COMP_EDITOR_PAGE (apage)->client, &email, NULL)) {
+ if (e_cal_get_alarm_email_address (COMP_EDITOR_PAGE (apage)->client, &email, NULL)) {
if (!alarm_options_dialog_run (priv->alarm, email, repeat))
g_message ("button_options_clicked_cb(): Could not create the alarm options dialog");
}
diff --git a/calendar/gui/dialogs/cancel-comp.c b/calendar/gui/dialogs/cancel-comp.c
index e9efe92d99..3e9d76dead 100644
--- a/calendar/gui/dialogs/cancel-comp.c
+++ b/calendar/gui/dialogs/cancel-comp.c
@@ -40,20 +40,20 @@
* Return value: TRUE if the user clicked Yes, FALSE otherwise.
**/
gboolean
-cancel_component_dialog (GtkWindow *parent, CalClient *client, CalComponent *comp, gboolean deleting)
+cancel_component_dialog (GtkWindow *parent, ECal *client, ECalComponent *comp, gboolean deleting)
{
GtkWidget *dialog;
- CalComponentVType vtype;
+ ECalComponentVType vtype;
char *str;
gint response;
- if (deleting && cal_client_get_save_schedules (client))
+ if (deleting && e_cal_get_save_schedules (client))
return TRUE;
- vtype = cal_component_get_vtype (comp);
+ vtype = e_cal_component_get_vtype (comp);
switch (vtype) {
- case CAL_COMPONENT_EVENT:
+ case E_CAL_COMPONENT_EVENT:
if (deleting)
str = g_strdup_printf (_("The event being deleted is a meeting, "
"would you like to send a cancellation notice?"));
@@ -62,7 +62,7 @@ cancel_component_dialog (GtkWindow *parent, CalClient *client, CalComponent *com
"and delete this meeting?"));
break;
- case CAL_COMPONENT_TODO:
+ case E_CAL_COMPONENT_TODO:
if (deleting)
str = g_strdup_printf (_("The task being deleted is assigned, "
"would you like to send a cancellation notice?"));
@@ -71,7 +71,7 @@ cancel_component_dialog (GtkWindow *parent, CalClient *client, CalComponent *com
"and delete this task?"));
break;
- case CAL_COMPONENT_JOURNAL:
+ case E_CAL_COMPONENT_JOURNAL:
if (deleting)
str = g_strdup_printf (_("The journal entry being deleted is published, "
"would you like to send a cancellation notice?"));
diff --git a/calendar/gui/dialogs/cancel-comp.h b/calendar/gui/dialogs/cancel-comp.h
index 7dfb0fae31..a43f24f2fe 100644
--- a/calendar/gui/dialogs/cancel-comp.h
+++ b/calendar/gui/dialogs/cancel-comp.h
@@ -22,9 +22,9 @@
#define CANCEL_COMP_H
#include <glib.h>
-#include <cal-client/cal-client.h>
-#include <cal-util/cal-component.h>
+#include <libecal/e-cal.h>
+#include <libecal/e-cal-component.h>
-gboolean cancel_component_dialog (GtkWindow *parent, CalClient *client, CalComponent *comp, gboolean deleting);
+gboolean cancel_component_dialog (GtkWindow *parent, ECal *client, ECalComponent *comp, gboolean deleting);
#endif
diff --git a/calendar/gui/dialogs/changed-comp.c b/calendar/gui/dialogs/changed-comp.c
index 6d7ab0fc49..799a22579b 100644
--- a/calendar/gui/dialogs/changed-comp.c
+++ b/calendar/gui/dialogs/changed-comp.c
@@ -44,26 +44,26 @@
* Return value: TRUE if the user clicked Yes, FALSE otherwise.
**/
gboolean
-changed_component_dialog (GtkWindow *parent, CalComponent *comp, gboolean deleted, gboolean changed)
+changed_component_dialog (GtkWindow *parent, ECalComponent *comp, gboolean deleted, gboolean changed)
{
GtkWidget *dialog;
- CalComponentVType vtype;
+ ECalComponentVType vtype;
char *str;
gint response;
- vtype = cal_component_get_vtype (comp);
+ vtype = e_cal_component_get_vtype (comp);
if (deleted) {
switch (vtype) {
- case CAL_COMPONENT_EVENT:
+ case E_CAL_COMPONENT_EVENT:
str = _("This event has been deleted.");
break;
- case CAL_COMPONENT_TODO:
+ case E_CAL_COMPONENT_TODO:
str = _("This task has been deleted.");
break;
- case CAL_COMPONENT_JOURNAL:
+ case E_CAL_COMPONENT_JOURNAL:
str = _("This journal entry has been deleted.");
break;
@@ -79,15 +79,15 @@ changed_component_dialog (GtkWindow *parent, CalComponent *comp, gboolean delete
} else {
switch (vtype) {
- case CAL_COMPONENT_EVENT:
+ case E_CAL_COMPONENT_EVENT:
str = _("This event has been changed.");
break;
- case CAL_COMPONENT_TODO:
+ case E_CAL_COMPONENT_TODO:
str = _("This task has been changed.");
break;
- case CAL_COMPONENT_JOURNAL:
+ case E_CAL_COMPONENT_JOURNAL:
str = _("This journal entry has been changed.");
break;
diff --git a/calendar/gui/dialogs/changed-comp.h b/calendar/gui/dialogs/changed-comp.h
index a29e1a5fc4..f029f3388e 100644
--- a/calendar/gui/dialogs/changed-comp.h
+++ b/calendar/gui/dialogs/changed-comp.h
@@ -23,8 +23,8 @@
#include <glib.h>
#include <gtk/gtkwindow.h>
-#include <cal-util/cal-component.h>
+#include <libecal/e-cal-component.h>
-gboolean changed_component_dialog (GtkWindow *window, CalComponent *comp, gboolean deleted, gboolean changed);
+gboolean changed_component_dialog (GtkWindow *window, ECalComponent *comp, gboolean deleted, gboolean changed);
#endif
diff --git a/calendar/gui/dialogs/comp-editor-page.c b/calendar/gui/dialogs/comp-editor-page.c
index a0fdcca3a8..1a6611b017 100644
--- a/calendar/gui/dialogs/comp-editor-page.c
+++ b/calendar/gui/dialogs/comp-editor-page.c
@@ -225,7 +225,7 @@ comp_editor_page_focus_main_widget (CompEditorPage *page)
* Fills the widgets of an editor page with the data from a calendar component.
**/
void
-comp_editor_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
+comp_editor_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
{
g_return_if_fail (page != NULL);
g_return_if_fail (IS_COMP_EDITOR_PAGE (page));
@@ -247,7 +247,7 @@ comp_editor_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
* Returns: TRUE if the component could be filled, FALSE otherwise
**/
gboolean
-comp_editor_page_fill_component (CompEditorPage *page, CalComponent *comp)
+comp_editor_page_fill_component (CompEditorPage *page, ECalComponent *comp)
{
g_return_val_if_fail (page != NULL, FALSE);
g_return_val_if_fail (IS_COMP_EDITOR_PAGE (page), FALSE);
@@ -260,14 +260,14 @@ comp_editor_page_fill_component (CompEditorPage *page, CalComponent *comp)
}
/**
- * comp_editor_page_set_cal_client:
+ * comp_editor_page_set_e_cal:
* @page: An editor page
- * @client: A #CalClient object
+ * @client: A #ECal object
*
- * Sets the #CalClient for the dialog page to use.
+ * Sets the #ECal for the dialog page to use.
**/
void
-comp_editor_page_set_cal_client (CompEditorPage *page, CalClient *client)
+comp_editor_page_set_e_cal (CompEditorPage *page, ECal *client)
{
g_return_if_fail (page != NULL);
g_return_if_fail (IS_COMP_EDITOR_PAGE (page));
diff --git a/calendar/gui/dialogs/comp-editor-page.h b/calendar/gui/dialogs/comp-editor-page.h
index e3d4535391..6046a7c039 100644
--- a/calendar/gui/dialogs/comp-editor-page.h
+++ b/calendar/gui/dialogs/comp-editor-page.h
@@ -23,8 +23,8 @@
#include <time.h>
#include <gtk/gtkwidget.h>
-#include <cal-util/cal-component.h>
-#include "cal-client.h"
+#include <libecal/e-cal-component.h>
+#include <libecal/e-cal.h>
G_BEGIN_DECLS
@@ -37,17 +37,17 @@ G_BEGIN_DECLS
#define IS_COMP_EDITOR_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), TYPE_COMP_EDITOR_PAGE))
typedef struct {
- CalComponentDateTime *start;
- CalComponentDateTime *end;
- CalComponentDateTime *due;
+ ECalComponentDateTime *start;
+ ECalComponentDateTime *end;
+ ECalComponentDateTime *due;
struct icaltimetype *complete;
} CompEditorPageDates;
typedef struct {
GtkObject object;
- /* Some of the pages need the CalClient to access timezone data. */
- CalClient *client;
+ /* Some of the pages need the ECal to access timezone data. */
+ ECal *client;
/* The GtkAccelGroup for the page. We install this when the page is
mapped, and uninstall when it is unmapped. libglade would do this
@@ -72,8 +72,8 @@ typedef struct {
GtkWidget *(* get_widget) (CompEditorPage *page);
void (* focus_main_widget) (CompEditorPage *page);
- void (* fill_widgets) (CompEditorPage *page, CalComponent *comp);
- gboolean (* fill_component) (CompEditorPage *page, CalComponent *comp);
+ void (* fill_widgets) (CompEditorPage *page, ECalComponent *comp);
+ gboolean (* fill_component) (CompEditorPage *page, ECalComponent *comp);
void (* set_summary) (CompEditorPage *page, const char *summary);
void (* set_dates) (CompEditorPage *page, CompEditorPageDates *dates);
@@ -84,11 +84,11 @@ GtkType comp_editor_page_get_type (void);
GtkWidget *comp_editor_page_get_widget (CompEditorPage *page);
void comp_editor_page_focus_main_widget (CompEditorPage *page);
void comp_editor_page_fill_widgets (CompEditorPage *page,
- CalComponent *comp);
+ ECalComponent *comp);
gboolean comp_editor_page_fill_component (CompEditorPage *page,
- CalComponent *comp);
-void comp_editor_page_set_cal_client (CompEditorPage *page,
- CalClient *client);
+ ECalComponent *comp);
+void comp_editor_page_set_e_cal (CompEditorPage *page,
+ ECal *client);
void comp_editor_page_set_summary (CompEditorPage *page,
const char *summary);
void comp_editor_page_set_dates (CompEditorPage *page,
diff --git a/calendar/gui/dialogs/comp-editor-util.c b/calendar/gui/dialogs/comp-editor-util.c
index 4c3b683ec4..bdb66c6c92 100644
--- a/calendar/gui/dialogs/comp-editor-util.c
+++ b/calendar/gui/dialogs/comp-editor-util.c
@@ -32,7 +32,7 @@
#include <bonobo/bonobo-control.h>
#include <bonobo/bonobo-widget.h>
#include <e-util/e-time-utils.h>
-#include <cal-util/timeutil.h>
+#include <libecal/e-cal-time-util.h>
#include "../calendar-config.h"
#include "../e-date-edit-config.h"
#include "comp-editor-util.h"
@@ -49,37 +49,37 @@
* results.
**/
void
-comp_editor_dates (CompEditorPageDates *dates, CalComponent *comp)
+comp_editor_dates (CompEditorPageDates *dates, ECalComponent *comp)
{
- CalComponentDateTime dt;
+ ECalComponentDateTime dt;
dates->start = NULL;
dates->end = NULL;
dates->due = NULL;
dates->complete = NULL;
- /* Note that the CalComponentDateTime's returned contain allocated
+ /* Note that the ECalComponentDateTime's returned contain allocated
icaltimetype and tzid values, so we just take over ownership of
those. */
- cal_component_get_dtstart (comp, &dt);
+ e_cal_component_get_dtstart (comp, &dt);
if (dt.value) {
- dates->start = g_new (CalComponentDateTime, 1);
+ dates->start = g_new (ECalComponentDateTime, 1);
*dates->start = dt;
}
- cal_component_get_dtend (comp, &dt);
+ e_cal_component_get_dtend (comp, &dt);
if (dt.value) {
- dates->end = g_new (CalComponentDateTime, 1);
+ dates->end = g_new (ECalComponentDateTime, 1);
*dates->end = dt;
}
- cal_component_get_due (comp, &dt);
+ e_cal_component_get_due (comp, &dt);
if (dt.value) {
- dates->due = g_new (CalComponentDateTime, 1);
+ dates->due = g_new (ECalComponentDateTime, 1);
*dates->due = dt;
}
- cal_component_get_completed (comp, &dates->complete);
+ e_cal_component_get_completed (comp, &dates->complete);
}
@@ -89,25 +89,25 @@ comp_editor_dates (CompEditorPageDates *dates, CalComponent *comp)
void
comp_editor_free_dates (CompEditorPageDates *dates)
{
- /* Note that cal_component_free_datetime() only frees the fields in
+ /* Note that e_cal_component_free_datetime() only frees the fields in
the struct. It doesn't free the struct itself, so we do that. */
if (dates->start) {
- cal_component_free_datetime (dates->start);
+ e_cal_component_free_datetime (dates->start);
g_free (dates->start);
}
if (dates->end) {
- cal_component_free_datetime (dates->end);
+ e_cal_component_free_datetime (dates->end);
g_free (dates->end);
}
if (dates->due) {
- cal_component_free_datetime (dates->due);
+ e_cal_component_free_datetime (dates->due);
g_free (dates->due);
}
if (dates->complete)
- cal_component_free_icaltimetype (dates->complete);
+ e_cal_component_free_icaltimetype (dates->complete);
}
diff --git a/calendar/gui/dialogs/comp-editor-util.h b/calendar/gui/dialogs/comp-editor-util.h
index 04bbe23cf4..078cd6508c 100644
--- a/calendar/gui/dialogs/comp-editor-util.h
+++ b/calendar/gui/dialogs/comp-editor-util.h
@@ -24,7 +24,7 @@
#include <gtk/gtkwidget.h>
#include "comp-editor-page.h"
-void comp_editor_dates (CompEditorPageDates *date, CalComponent *comp);
+void comp_editor_dates (CompEditorPageDates *date, ECalComponent *comp);
void comp_editor_free_dates (CompEditorPageDates *dates);
void comp_editor_date_label (CompEditorPageDates *dates, GtkWidget *label);
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index 14dad44b2a..5e88774ae5 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -55,10 +55,10 @@
/* Private part of the CompEditor structure */
struct _CompEditorPrivate {
/* Client to use */
- CalClient *client;
+ ECal *client;
/* Calendar object/uid we are editing; this is an internal copy */
- CalComponent *comp;
+ ECalComponent *comp;
/* The pages we have */
GList *pages;
@@ -91,9 +91,9 @@ static void comp_editor_init (CompEditor *editor);
static gint comp_editor_key_press_event (GtkWidget *d, GdkEventKey *e);
static void comp_editor_finalize (GObject *object);
-static void real_set_cal_client (CompEditor *editor, CalClient *client);
-static void real_edit_comp (CompEditor *editor, CalComponent *comp);
-static gboolean real_send_comp (CompEditor *editor, CalComponentItipMethod method);
+static void real_set_e_cal (CompEditor *editor, ECal *client);
+static void real_edit_comp (CompEditor *editor, ECalComponent *comp);
+static gboolean real_send_comp (CompEditor *editor, ECalComponentItipMethod method);
static gboolean prompt_to_save_changes (CompEditor *editor, gboolean send);
static void delete_comp (CompEditor *editor);
static void close_dialog (CompEditor *editor);
@@ -102,8 +102,8 @@ static void page_changed_cb (GtkObject *obj, gpointer data);
static void page_summary_changed_cb (GtkObject *obj, const char *summary, gpointer data);
static void page_dates_changed_cb (GtkObject *obj, CompEditorPageDates *dates, gpointer data);
-static void obj_updated_cb (CalClient *client, const char *uid, gpointer data);
-static void obj_removed_cb (CalClient *client, const char *uid, gpointer data);
+static void obj_updated_cb (ECal *client, const char *uid, gpointer data);
+static void obj_removed_cb (ECal *client, const char *uid, gpointer data);
static void save_cmd (GtkWidget *widget, gpointer data);
static void save_close_cmd (GtkWidget *widget, gpointer data);
@@ -166,7 +166,7 @@ comp_editor_class_init (CompEditorClass *klass)
parent_class = g_type_class_ref(BONOBO_TYPE_WINDOW);
- klass->set_cal_client = real_set_cal_client;
+ klass->set_e_cal = real_set_e_cal;
klass->edit_comp = real_edit_comp;
klass->send_comp = real_send_comp;
@@ -293,7 +293,7 @@ static gboolean
save_comp (CompEditor *editor)
{
CompEditorPrivate *priv;
- CalComponent *clone;
+ ECalComponent *clone;
GList *l;
gboolean result;
GError *error = NULL;
@@ -303,7 +303,7 @@ save_comp (CompEditor *editor)
if (!priv->changed)
return TRUE;
- clone = cal_component_clone (priv->comp);
+ clone = e_cal_component_clone (priv->comp);
for (l = priv->pages; l != NULL; l = l->next) {
if (!comp_editor_page_fill_component (l->data, clone)) {
g_object_unref((clone));
@@ -313,10 +313,10 @@ save_comp (CompEditor *editor)
}
/* If we are not the organizer, we don't update the sequence number */
- if (!cal_component_has_organizer (clone) || itip_organizer_is_user (clone, priv->client))
- cal_component_commit_sequence (clone);
+ if (!e_cal_component_has_organizer (clone) || itip_organizer_is_user (clone, priv->client))
+ e_cal_component_commit_sequence (clone);
else
- cal_component_abort_sequence (clone);
+ e_cal_component_abort_sequence (clone);
g_object_unref((priv->comp));
priv->comp = clone;
@@ -324,9 +324,9 @@ save_comp (CompEditor *editor)
priv->updating = TRUE;
if (!cal_comp_is_on_server (priv->comp, priv->client)) {
- result = cal_client_create_object (priv->client, cal_component_get_icalcomponent (priv->comp), NULL, &error);
+ result = e_cal_create_object (priv->client, e_cal_component_get_icalcomponent (priv->comp), NULL, &error);
} else {
- result = cal_client_modify_object (priv->client, cal_component_get_icalcomponent (priv->comp), priv->mod, &error);
+ result = e_cal_modify_object (priv->client, e_cal_component_get_icalcomponent (priv->comp), priv->mod, &error);
}
if (!result) {
@@ -367,9 +367,9 @@ save_comp_with_send (CompEditor *editor)
if (send && send_component_dialog ((GtkWindow *) editor, priv->client, priv->comp, !priv->existing_org)) {
if (itip_organizer_is_user (priv->comp, priv->client))
- return comp_editor_send_comp (editor, CAL_COMPONENT_METHOD_REQUEST);
+ return comp_editor_send_comp (editor, E_CAL_COMPONENT_METHOD_REQUEST);
else
- return comp_editor_send_comp (editor, CAL_COMPONENT_METHOD_REPLY);
+ return comp_editor_send_comp (editor, E_CAL_COMPONENT_METHOD_REPLY);
}
return TRUE;
@@ -383,9 +383,9 @@ delete_comp (CompEditor *editor)
priv = editor->priv;
- cal_component_get_uid (priv->comp, &uid);
+ e_cal_component_get_uid (priv->comp, &uid);
priv->updating = TRUE;
- cal_client_remove_object (priv->client, uid, NULL);
+ e_cal_remove_object (priv->client, uid, NULL);
priv->updating = FALSE;
close_dialog (editor);
}
@@ -402,7 +402,7 @@ prompt_to_save_changes (CompEditor *editor, gboolean send)
switch (save_component_dialog (GTK_WINDOW (editor))) {
case GTK_RESPONSE_YES: /* Save */
- if (cal_component_is_instance (priv->comp))
+ if (e_cal_component_is_instance (priv->comp))
if (!recur_component_dialog (priv->client, priv->comp, &priv->mod, GTK_WINDOW (editor)))
return FALSE;
@@ -631,7 +631,7 @@ comp_editor_append_page (CompEditor *editor,
/* If we are editing something, fill the widgets with current info */
if (priv->comp != NULL) {
- CalComponent *comp;
+ ECalComponent *comp;
comp = comp_editor_get_current_comp (editor);
comp_editor_page_fill_widgets (page, comp);
@@ -733,14 +733,14 @@ comp_editor_show_page (CompEditor *editor, CompEditorPage *page)
}
/**
- * comp_editor_set_cal_client:
+ * comp_editor_set_e_cal:
* @editor: A component editor
* @client: The calendar client to use
*
* Sets the calendar client used by the editor to update components
**/
void
-comp_editor_set_cal_client (CompEditor *editor, CalClient *client)
+comp_editor_set_e_cal (CompEditor *editor, ECal *client)
{
CompEditorClass *klass;
@@ -749,20 +749,20 @@ comp_editor_set_cal_client (CompEditor *editor, CalClient *client)
klass = COMP_EDITOR_CLASS (G_OBJECT_GET_CLASS (editor));
- if (klass->set_cal_client)
- klass->set_cal_client (editor, client);
+ if (klass->set_e_cal)
+ klass->set_e_cal (editor, client);
}
/**
- * comp_editor_get_cal_client:
+ * comp_editor_get_e_cal:
* @editor: A component editor
*
* Returns the calendar client of the editor
*
* Return value: The calendar client of the editor
**/
-CalClient *
-comp_editor_get_cal_client (CompEditor *editor)
+ECal *
+comp_editor_get_e_cal (CompEditor *editor)
{
CompEditorPrivate *priv;
@@ -776,25 +776,25 @@ comp_editor_get_cal_client (CompEditor *editor)
/* Creates an appropriate title for the event editor dialog */
static char *
-make_title_from_comp (CalComponent *comp)
+make_title_from_comp (ECalComponent *comp)
{
char *title;
const char *type_string;
- CalComponentVType type;
- CalComponentText text;
+ ECalComponentVType type;
+ ECalComponentText text;
if (!comp)
return g_strdup (_("Edit Appointment"));
- type = cal_component_get_vtype (comp);
+ type = e_cal_component_get_vtype (comp);
switch (type) {
- case CAL_COMPONENT_EVENT:
+ case E_CAL_COMPONENT_EVENT:
type_string = _("Appointment - %s");
break;
- case CAL_COMPONENT_TODO:
+ case E_CAL_COMPONENT_TODO:
type_string = _("Task - %s");
break;
- case CAL_COMPONENT_JOURNAL:
+ case E_CAL_COMPONENT_JOURNAL:
type_string = _("Journal entry - %s");
break;
default:
@@ -802,7 +802,7 @@ make_title_from_comp (CalComponent *comp)
return NULL;
}
- cal_component_get_summary (comp, &text);
+ e_cal_component_get_summary (comp, &text);
if (text.value) {
title = g_strdup_printf (type_string, text.value);
} else {
@@ -814,24 +814,24 @@ make_title_from_comp (CalComponent *comp)
/* Creates an appropriate title for the event editor dialog */
static char *
-make_title_from_string (CalComponent *comp, const char *str)
+make_title_from_string (ECalComponent *comp, const char *str)
{
char *title;
const char *type_string;
- CalComponentVType type;
+ ECalComponentVType type;
if (!comp)
return g_strdup (_("Edit Appointment"));
- type = cal_component_get_vtype (comp);
+ type = e_cal_component_get_vtype (comp);
switch (type) {
- case CAL_COMPONENT_EVENT:
+ case E_CAL_COMPONENT_EVENT:
type_string = _("Appointment - %s");
break;
- case CAL_COMPONENT_TODO:
+ case E_CAL_COMPONENT_TODO:
type_string = _("Task - %s");
break;
- case CAL_COMPONENT_JOURNAL:
+ case E_CAL_COMPONENT_JOURNAL:
type_string = _("Journal entry - %s");
break;
default:
@@ -849,19 +849,19 @@ make_title_from_string (CalComponent *comp, const char *str)
}
static const char *
-make_icon_from_comp (CalComponent *comp)
+make_icon_from_comp (ECalComponent *comp)
{
- CalComponentVType type;
+ ECalComponentVType type;
if (!comp)
return EVOLUTION_IMAGESDIR "/evolution-calendar-mini.png";
- type = cal_component_get_vtype (comp);
+ type = e_cal_component_get_vtype (comp);
switch (type) {
- case CAL_COMPONENT_EVENT:
+ case E_CAL_COMPONENT_EVENT:
return EVOLUTION_IMAGESDIR "/buttons/new_appointment.png";
break;
- case CAL_COMPONENT_TODO:
+ case E_CAL_COMPONENT_TODO:
return EVOLUTION_IMAGESDIR "/buttons/new_task.png";
break;
default:
@@ -918,7 +918,7 @@ fill_widgets (CompEditor *editor)
}
static void
-real_set_cal_client (CompEditor *editor, CalClient *client)
+real_set_e_cal (CompEditor *editor, ECal *client)
{
CompEditorPrivate *priv;
GList *elem;
@@ -932,9 +932,9 @@ real_set_cal_client (CompEditor *editor, CalClient *client)
return;
if (client) {
- g_return_if_fail (IS_CAL_CLIENT (client));
- g_return_if_fail (cal_client_get_load_state (client) ==
- CAL_CLIENT_LOAD_LOADED);
+ g_return_if_fail (E_IS_CAL (client));
+ g_return_if_fail (e_cal_get_load_state (client) ==
+ E_CAL_LOAD_LOADED);
g_object_ref((client));
}
@@ -948,7 +948,7 @@ real_set_cal_client (CompEditor *editor, CalClient *client)
/* Pass the client to any pages that need it. */
for (elem = priv->pages; elem; elem = elem->next)
- comp_editor_page_set_cal_client (elem->data, client);
+ comp_editor_page_set_e_cal (elem->data, client);
g_signal_connect((priv->client), "obj_updated",
G_CALLBACK (obj_updated_cb), editor);
@@ -958,7 +958,7 @@ real_set_cal_client (CompEditor *editor, CalClient *client)
}
static void
-real_edit_comp (CompEditor *editor, CalComponent *comp)
+real_edit_comp (CompEditor *editor, ECalComponent *comp)
{
CompEditorPrivate *priv;
@@ -973,9 +973,9 @@ real_edit_comp (CompEditor *editor, CalComponent *comp)
}
if (comp)
- priv->comp = cal_component_clone (comp);
+ priv->comp = e_cal_component_clone (comp);
- priv->existing_org = cal_component_has_organizer (comp);
+ priv->existing_org = e_cal_component_has_organizer (comp);
priv->user_org = itip_organizer_is_user (comp, priv->client);
priv->warned = FALSE;
@@ -986,10 +986,10 @@ real_edit_comp (CompEditor *editor, CalComponent *comp)
static gboolean
-real_send_comp (CompEditor *editor, CalComponentItipMethod method)
+real_send_comp (CompEditor *editor, ECalComponentItipMethod method)
{
CompEditorPrivate *priv;
- CalComponent *tmp_comp;
+ ECalComponent *tmp_comp;
g_return_val_if_fail (editor != NULL, FALSE);
g_return_val_if_fail (IS_COMP_EDITOR (editor), FALSE);
@@ -1022,14 +1022,14 @@ real_send_comp (CompEditor *editor, CalComponentItipMethod method)
* Starts the editor editing the given component
**/
void
-comp_editor_edit_comp (CompEditor *editor, CalComponent *comp)
+comp_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
{
CompEditorClass *klass;
g_return_if_fail (editor != NULL);
g_return_if_fail (IS_COMP_EDITOR (editor));
g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
+ g_return_if_fail (E_IS_CAL_COMPONENT (comp));
klass = COMP_EDITOR_CLASS (G_OBJECT_GET_CLASS (editor));
@@ -1037,7 +1037,7 @@ comp_editor_edit_comp (CompEditor *editor, CalComponent *comp)
klass->edit_comp (editor, comp);
}
-CalComponent *
+ECalComponent *
comp_editor_get_comp (CompEditor *editor)
{
CompEditorPrivate *priv;
@@ -1050,11 +1050,11 @@ comp_editor_get_comp (CompEditor *editor)
return priv->comp;
}
-CalComponent *
+ECalComponent *
comp_editor_get_current_comp (CompEditor *editor)
{
CompEditorPrivate *priv;
- CalComponent *comp;
+ ECalComponent *comp;
GList *l;
g_return_val_if_fail (editor != NULL, NULL);
@@ -1062,7 +1062,7 @@ comp_editor_get_current_comp (CompEditor *editor)
priv = editor->priv;
- comp = cal_component_clone (priv->comp);
+ comp = e_cal_component_clone (priv->comp);
if (priv->changed) {
for (l = priv->pages; l != NULL; l = l->next)
comp_editor_page_fill_component (l->data, comp);
@@ -1103,7 +1103,7 @@ comp_editor_delete_comp (CompEditor *editor)
*
**/
gboolean
-comp_editor_send_comp (CompEditor *editor, CalComponentItipMethod method)
+comp_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method)
{
CompEditorClass *klass;
@@ -1234,7 +1234,7 @@ save_cmd (GtkWidget *widget, gpointer data)
commit_all_fields (editor);
- if (cal_component_is_instance (priv->comp))
+ if (e_cal_component_is_instance (priv->comp))
if (!recur_component_dialog (priv->client, priv->comp, &priv->mod, GTK_WINDOW (editor)))
return;
@@ -1251,7 +1251,7 @@ save_close_cmd (GtkWidget *widget, gpointer data)
commit_all_fields (editor);
- if (cal_component_is_instance (priv->comp))
+ if (e_cal_component_is_instance (priv->comp))
if (!recur_component_dialog (priv->client, priv->comp, &priv->mod, GTK_WINDOW (editor)))
return;
@@ -1276,8 +1276,8 @@ save_as_cmd (GtkWidget *widget, gpointer data)
if (filename == NULL)
return;
- ical_string = cal_client_get_component_as_string (priv->client,
- cal_component_get_icalcomponent (priv->comp));
+ ical_string = e_cal_get_component_as_string (priv->client,
+ e_cal_component_get_icalcomponent (priv->comp));
if (ical_string == NULL) {
g_warning ("Couldn't convert item to a string");
return;
@@ -1299,17 +1299,17 @@ delete_cmd (GtkWidget *widget, gpointer data)
{
CompEditor *editor = COMP_EDITOR (data);
CompEditorPrivate *priv;
- CalComponentVType vtype;
+ ECalComponentVType vtype;
priv = editor->priv;
- vtype = cal_component_get_vtype (priv->comp);
+ vtype = e_cal_component_get_vtype (priv->comp);
if (delete_component_dialog (priv->comp, FALSE, 1, vtype, GTK_WIDGET (editor))) {
if (itip_organizer_is_user (priv->comp, priv->client)
&& cancel_component_dialog ((GtkWindow *) editor,
priv->client, priv->comp, TRUE))
- itip_send_comp (CAL_COMPONENT_METHOD_CANCEL, priv->comp, priv->client, NULL);
+ itip_send_comp (E_CAL_COMPONENT_METHOD_CANCEL, priv->comp, priv->client, NULL);
delete_comp (editor);
}
@@ -1319,7 +1319,7 @@ static void
print_cmd (GtkWidget *widget, gpointer data)
{
CompEditor *editor = COMP_EDITOR (data);
- CalComponent *comp;
+ ECalComponent *comp;
commit_all_fields (editor);
@@ -1332,7 +1332,7 @@ static void
print_preview_cmd (GtkWidget *widget, gpointer data)
{
CompEditor *editor = COMP_EDITOR (data);
- CalComponent *comp;
+ ECalComponent *comp;
commit_all_fields (editor);
@@ -1431,24 +1431,24 @@ page_dates_changed_cb (GtkObject *obj,
}
static void
-obj_updated_cb (CalClient *client, const char *uid, gpointer data)
+obj_updated_cb (ECal *client, const char *uid, gpointer data)
{
CompEditor *editor = COMP_EDITOR (data);
CompEditorPrivate *priv;
- CalComponent *comp = NULL;
+ ECalComponent *comp = NULL;
const char *edit_uid;
priv = editor->priv;
- cal_component_get_uid (priv->comp, &edit_uid);
+ e_cal_component_get_uid (priv->comp, &edit_uid);
if (!strcmp (uid, edit_uid) && !priv->updating) {
if (changed_component_dialog ((GtkWindow *) editor, priv->comp, FALSE, priv->changed)) {
icalcomponent *icalcomp;
- if (!cal_client_get_object (priv->client, uid, NULL, &icalcomp, NULL)) {
- comp = cal_component_new ();
- if (cal_component_set_icalcomponent (comp, icalcomp))
+ if (!e_cal_get_object (priv->client, uid, NULL, &icalcomp, NULL)) {
+ comp = e_cal_component_new ();
+ if (e_cal_component_set_icalcomponent (comp, icalcomp))
comp_editor_edit_comp (editor, comp);
else {
GtkWidget *dlg;
@@ -1470,7 +1470,7 @@ obj_updated_cb (CalClient *client, const char *uid, gpointer data)
}
static void
-obj_removed_cb (CalClient *client, const char *uid, gpointer data)
+obj_removed_cb (ECal *client, const char *uid, gpointer data)
{
CompEditor *editor = COMP_EDITOR (data);
CompEditorPrivate *priv;
@@ -1478,7 +1478,7 @@ obj_removed_cb (CalClient *client, const char *uid, gpointer data)
priv = editor->priv;
- cal_component_get_uid (priv->comp, &edit_uid);
+ e_cal_component_get_uid (priv->comp, &edit_uid);
if (!strcmp (uid, edit_uid) && !priv->updating) {
if (changed_component_dialog ((GtkWindow *) editor, priv->comp, TRUE, priv->changed))
diff --git a/calendar/gui/dialogs/comp-editor.h b/calendar/gui/dialogs/comp-editor.h
index 8ef14c8edb..67684c0806 100644
--- a/calendar/gui/dialogs/comp-editor.h
+++ b/calendar/gui/dialogs/comp-editor.h
@@ -25,7 +25,7 @@
#include <bonobo/bonobo-window.h>
#include <bonobo/bonobo-ui-engine.h>
#include <bonobo/bonobo-ui-component.h>
-#include "cal-client.h"
+#include <libecal/e-cal.h>
#include "../itip-utils.h"
#include "comp-editor-page.h"
#include "evolution-shell-component-utils.h"
@@ -53,9 +53,9 @@ typedef struct {
BonoboWindowClass parent_class;
/* Virtual functions */
- void (* set_cal_client) (CompEditor *page, CalClient *client);
- void (* edit_comp) (CompEditor *page, CalComponent *comp);
- gboolean (* send_comp) (CompEditor *page, CalComponentItipMethod method);
+ void (* set_e_cal) (CompEditor *page, ECal *client);
+ void (* edit_comp) (CompEditor *page, ECalComponent *comp);
+ gboolean (* send_comp) (CompEditor *page, ECalComponentItipMethod method);
} CompEditorClass;
GtkType comp_editor_get_type (void);
@@ -78,18 +78,18 @@ void comp_editor_remove_page (CompEditor *editor,
CompEditorPage *page);
void comp_editor_show_page (CompEditor *editor,
CompEditorPage *page);
-void comp_editor_set_cal_client (CompEditor *editor,
- CalClient *client);
-CalClient *comp_editor_get_cal_client (CompEditor *editor);
+void comp_editor_set_e_cal (CompEditor *editor,
+ ECal *client);
+ECal *comp_editor_get_e_cal (CompEditor *editor);
void comp_editor_edit_comp (CompEditor *ee,
- CalComponent *comp);
-CalComponent *comp_editor_get_comp (CompEditor *editor);
-CalComponent *comp_editor_get_current_comp (CompEditor *editor);
+ ECalComponent *comp);
+ECalComponent *comp_editor_get_comp (CompEditor *editor);
+ECalComponent *comp_editor_get_current_comp (CompEditor *editor);
gboolean comp_editor_save_comp (CompEditor *editor,
gboolean send);
void comp_editor_delete_comp (CompEditor *editor);
gboolean comp_editor_send_comp (CompEditor *editor,
- CalComponentItipMethod method);
+ ECalComponentItipMethod method);
gboolean comp_editor_close (CompEditor *editor);
void comp_editor_merge_ui (CompEditor *editor,
const char *filename,
diff --git a/calendar/gui/dialogs/delete-comp.c b/calendar/gui/dialogs/delete-comp.c
index b29c6305ce..adaa8895fa 100644
--- a/calendar/gui/dialogs/delete-comp.c
+++ b/calendar/gui/dialogs/delete-comp.c
@@ -55,9 +55,9 @@
* unconditionally return TRUE.
**/
gboolean
-delete_component_dialog (CalComponent *comp,
+delete_component_dialog (ECalComponent *comp,
gboolean consider_as_untitled,
- int n_comps, CalComponentVType vtype,
+ int n_comps, ECalComponentVType vtype,
GtkWidget *widget)
{
char *str;
@@ -65,11 +65,11 @@ delete_component_dialog (CalComponent *comp,
int ret;
if (comp) {
- g_return_val_if_fail (IS_CAL_COMPONENT (comp), FALSE);
+ g_return_val_if_fail (E_IS_CAL_COMPONENT (comp), FALSE);
g_return_val_if_fail (n_comps == 1, FALSE);
} else {
g_return_val_if_fail (n_comps > 1, FALSE);
- g_return_val_if_fail (vtype != CAL_COMPONENT_NO_TYPE, FALSE);
+ g_return_val_if_fail (vtype != E_CAL_COMPONENT_NO_TYPE, FALSE);
}
g_return_val_if_fail (widget != NULL, FALSE);
@@ -79,19 +79,19 @@ delete_component_dialog (CalComponent *comp,
return TRUE;
if (comp) {
- CalComponentText summary;
+ ECalComponentText summary;
char *tmp;
- vtype = cal_component_get_vtype (comp);
+ vtype = e_cal_component_get_vtype (comp);
if (!consider_as_untitled) {
- cal_component_get_summary (comp, &summary);
+ e_cal_component_get_summary (comp, &summary);
tmp = g_strdup (summary.value);
} else
tmp = NULL;
switch (vtype) {
- case CAL_COMPONENT_EVENT:
+ case E_CAL_COMPONENT_EVENT:
if (tmp)
str = g_strdup_printf (_("Are you sure you want to delete "
"the appointment `%s'?"), tmp);
@@ -100,7 +100,7 @@ delete_component_dialog (CalComponent *comp,
"untitled appointment?"));
break;
- case CAL_COMPONENT_TODO:
+ case E_CAL_COMPONENT_TODO:
if (tmp)
str = g_strdup_printf (_("Are you sure you want to delete "
"the task `%s'?"), tmp);
@@ -109,7 +109,7 @@ delete_component_dialog (CalComponent *comp,
"untitled task?"));
break;
- case CAL_COMPONENT_JOURNAL:
+ case E_CAL_COMPONENT_JOURNAL:
if (tmp)
str = g_strdup_printf (_("Are you sure you want to delete "
"the journal entry `%s'?"), tmp);
@@ -128,17 +128,17 @@ delete_component_dialog (CalComponent *comp,
g_free (tmp);
} else {
switch (vtype) {
- case CAL_COMPONENT_EVENT:
+ case E_CAL_COMPONENT_EVENT:
str = g_strdup_printf (_("Are you sure you want to delete "
"%d appointments?"), n_comps);
break;
- case CAL_COMPONENT_TODO:
+ case E_CAL_COMPONENT_TODO:
str = g_strdup_printf (_("Are you sure you want to delete "
"%d tasks?"), n_comps);
break;
- case CAL_COMPONENT_JOURNAL:
+ case E_CAL_COMPONENT_JOURNAL:
str = g_strdup_printf (_("Are you sure you want to delete "
"%d journal entries?"), n_comps);
break;
diff --git a/calendar/gui/dialogs/delete-comp.h b/calendar/gui/dialogs/delete-comp.h
index 64945b5bee..f8773c25d0 100644
--- a/calendar/gui/dialogs/delete-comp.h
+++ b/calendar/gui/dialogs/delete-comp.h
@@ -22,11 +22,11 @@
#define DELETE_COMP_H
#include <gtk/gtkwidget.h>
-#include <cal-util/cal-component.h>
+#include <libecal/e-cal-component.h>
-gboolean delete_component_dialog (CalComponent *comp,
+gboolean delete_component_dialog (ECalComponent *comp,
gboolean consider_as_untitled,
- int n_comps, CalComponentVType vtype,
+ int n_comps, ECalComponentVType vtype,
GtkWidget *widget);
#endif
diff --git a/calendar/gui/dialogs/delete-error.c b/calendar/gui/dialogs/delete-error.c
index edbcaf9880..bc9c958862 100644
--- a/calendar/gui/dialogs/delete-error.c
+++ b/calendar/gui/dialogs/delete-error.c
@@ -38,7 +38,7 @@
*
**/
void
-delete_error_dialog (GError *error, CalComponentVType vtype)
+delete_error_dialog (GError *error, ECalComponentVType vtype)
{
GtkWidget *dialog;
const char *str;
@@ -49,13 +49,13 @@ delete_error_dialog (GError *error, CalComponentVType vtype)
switch (error->code) {
case E_CALENDAR_STATUS_CORBA_EXCEPTION:
switch (vtype) {
- case CAL_COMPONENT_EVENT:
+ case E_CAL_COMPONENT_EVENT:
str = _("The event could not be deleted due to a corba error");
break;
- case CAL_COMPONENT_TODO:
+ case E_CAL_COMPONENT_TODO:
str = _("The task could not be deleted due to a corba error");
break;
- case CAL_COMPONENT_JOURNAL:
+ case E_CAL_COMPONENT_JOURNAL:
str = _("The journal entry could not be deleted due to a corba error");
break;
default:
@@ -65,13 +65,13 @@ delete_error_dialog (GError *error, CalComponentVType vtype)
break;
case E_CALENDAR_STATUS_PERMISSION_DENIED:
switch (vtype) {
- case CAL_COMPONENT_EVENT:
+ case E_CAL_COMPONENT_EVENT:
str = _("The event could not be deleted because permission was denied");
break;
- case CAL_COMPONENT_TODO:
+ case E_CAL_COMPONENT_TODO:
str = _("The task could not be deleted because permission was denied");
break;
- case CAL_COMPONENT_JOURNAL:
+ case E_CAL_COMPONENT_JOURNAL:
str = _("The journal entry could not be deleted because permission was denied");
break;
default:
@@ -81,13 +81,13 @@ delete_error_dialog (GError *error, CalComponentVType vtype)
break;
case E_CALENDAR_STATUS_OTHER_ERROR:
switch (vtype) {
- case CAL_COMPONENT_EVENT:
+ case E_CAL_COMPONENT_EVENT:
str = _("The event could not be deleted due to an error");
break;
- case CAL_COMPONENT_TODO:
+ case E_CAL_COMPONENT_TODO:
str = _("The task could not be deleted due to an error");
break;
- case CAL_COMPONENT_JOURNAL:
+ case E_CAL_COMPONENT_JOURNAL:
str = _("The journal entry could not be deleted due to an error");
break;
default:
diff --git a/calendar/gui/dialogs/delete-error.h b/calendar/gui/dialogs/delete-error.h
index 4ac8cf4515..68c132e479 100644
--- a/calendar/gui/dialogs/delete-error.h
+++ b/calendar/gui/dialogs/delete-error.h
@@ -22,9 +22,9 @@
#define DELETE_ERROR_H
#include <glib.h>
-#include <cal-client/cal-client.h>
-#include <cal-util/cal-component.h>
+#include <libecal/e-cal.h>
+#include <libecal/e-cal-component.h>
-void delete_error_dialog (GError *error, CalComponentVType vtype);
+void delete_error_dialog (GError *error, ECalComponentVType vtype);
#endif
diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c
index 861a52c203..c3ba39aada 100644
--- a/calendar/gui/dialogs/event-editor.c
+++ b/calendar/gui/dialogs/event-editor.c
@@ -56,9 +56,9 @@ struct _EventEditorPrivate {
static void event_editor_class_init (EventEditorClass *class);
static void event_editor_init (EventEditor *ee);
-static void event_editor_set_cal_client (CompEditor *editor, CalClient *client);
-static void event_editor_edit_comp (CompEditor *editor, CalComponent *comp);
-static gboolean event_editor_send_comp (CompEditor *editor, CalComponentItipMethod method);
+static void event_editor_set_e_cal (CompEditor *editor, ECal *client);
+static void event_editor_edit_comp (CompEditor *editor, ECalComponent *comp);
+static gboolean event_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method);
static void event_editor_finalize (GObject *object);
static void schedule_meeting_cmd (GtkWidget *widget, gpointer data);
@@ -111,7 +111,7 @@ event_editor_class_init (EventEditorClass *klass)
parent_class = g_type_class_ref(TYPE_COMP_EDITOR);
- editor_class->set_cal_client = event_editor_set_cal_client;
+ editor_class->set_e_cal = event_editor_set_e_cal;
editor_class->edit_comp = event_editor_edit_comp;
editor_class->send_comp = event_editor_send_comp;
@@ -129,7 +129,7 @@ set_menu_sens (EventEditor *ee)
existing = comp_editor_get_existing_org (COMP_EDITOR (ee));
user = comp_editor_get_user_org (COMP_EDITOR (ee));
- cal_client_is_read_only (comp_editor_get_cal_client (COMP_EDITOR (ee)), &read_only, NULL);
+ e_cal_is_read_only (comp_editor_get_e_cal (COMP_EDITOR (ee)), &read_only, NULL);
sens = priv->meeting_shown;
comp_editor_set_ui_prop (COMP_EDITOR (ee),
@@ -187,7 +187,7 @@ event_editor_init (EventEditor *ee)
}
EventEditor *
-event_editor_construct (EventEditor *ee, CalClient *client)
+event_editor_construct (EventEditor *ee, ECal *client)
{
EventEditorPrivate *priv;
@@ -228,7 +228,7 @@ event_editor_construct (EventEditor *ee, CalClient *client)
COMP_EDITOR_PAGE (priv->meet_page),
_("Meeting"));
- comp_editor_set_cal_client (COMP_EDITOR (ee), client);
+ comp_editor_set_e_cal (COMP_EDITOR (ee), client);
comp_editor_merge_ui (COMP_EDITOR (ee), "evolution-event-editor.xml", verbs, pixmaps);
@@ -240,7 +240,7 @@ event_editor_construct (EventEditor *ee, CalClient *client)
}
static void
-event_editor_set_cal_client (CompEditor *editor, CalClient *client)
+event_editor_set_e_cal (CompEditor *editor, ECal *client)
{
EventEditor *ee;
EventEditorPrivate *priv;
@@ -248,19 +248,19 @@ event_editor_set_cal_client (CompEditor *editor, CalClient *client)
ee = EVENT_EDITOR (editor);
priv = ee->priv;
- e_meeting_store_set_cal_client (priv->model, client);
+ e_meeting_store_set_e_cal (priv->model, client);
- if (parent_class->set_cal_client)
- parent_class->set_cal_client (editor, client);
+ if (parent_class->set_e_cal)
+ parent_class->set_e_cal (editor, client);
}
static void
-event_editor_edit_comp (CompEditor *editor, CalComponent *comp)
+event_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
{
EventEditor *ee;
EventEditorPrivate *priv;
- CalComponentOrganizer organizer;
- CalClient *client;
+ ECalComponentOrganizer organizer;
+ ECal *client;
GSList *attendees = NULL;
ee = EVENT_EDITOR (editor);
@@ -271,11 +271,11 @@ event_editor_edit_comp (CompEditor *editor, CalComponent *comp)
if (parent_class->edit_comp)
parent_class->edit_comp (editor, comp);
- client = comp_editor_get_cal_client (COMP_EDITOR (editor));
+ client = comp_editor_get_e_cal (COMP_EDITOR (editor));
/* Get meeting related stuff */
- cal_component_get_organizer (comp, &organizer);
- cal_component_get_attendee_list (comp, &attendees);
+ e_cal_component_get_organizer (comp, &organizer);
+ e_cal_component_get_attendee_list (comp, &attendees);
/* Clear things up */
e_meeting_store_remove_all_attendees (priv->model);
@@ -299,10 +299,10 @@ event_editor_edit_comp (CompEditor *editor, CalComponent *comp)
}
for (l = attendees; l != NULL; l = l->next) {
- CalComponentAttendee *ca = l->data;
+ ECalComponentAttendee *ca = l->data;
EMeetingAttendee *ia;
- ia = E_MEETING_ATTENDEE (e_meeting_attendee_new_from_cal_component_attendee (ca));
+ ia = E_MEETING_ATTENDEE (e_meeting_attendee_new_from_e_cal_component_attendee (ca));
/* If we aren't the organizer or the attendee is just delegating, don't allow editing */
if (!comp_editor_get_user_org (editor) || e_meeting_attendee_is_set_delto (ia))
@@ -329,7 +329,7 @@ event_editor_edit_comp (CompEditor *editor, CalComponent *comp)
e_meeting_attendee_set_edit_level (ia, E_MEETING_ATTENDEE_EDIT_STATUS);
}
g_object_unref(it);
- } else if (cal_client_get_organizer_must_attend (client)) {
+ } else if (e_cal_get_organizer_must_attend (client)) {
EMeetingAttendee *ia;
ia = e_meeting_store_find_attendee (priv->model, organizer.value, &row);
@@ -339,7 +339,7 @@ event_editor_edit_comp (CompEditor *editor, CalComponent *comp)
priv->meeting_shown = TRUE;
}
- cal_component_free_attendee_list (attendees);
+ e_cal_component_free_attendee_list (attendees);
set_menu_sens (ee);
comp_editor_set_needs_send (COMP_EDITOR (ee), priv->meeting_shown && itip_organizer_is_user (comp, client));
@@ -348,26 +348,26 @@ event_editor_edit_comp (CompEditor *editor, CalComponent *comp)
}
static gboolean
-event_editor_send_comp (CompEditor *editor, CalComponentItipMethod method)
+event_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method)
{
EventEditor *ee = EVENT_EDITOR (editor);
EventEditorPrivate *priv;
- CalComponent *comp = NULL;
+ ECalComponent *comp = NULL;
priv = ee->priv;
/* Don't cancel more than once or when just publishing */
- if (method == CAL_COMPONENT_METHOD_PUBLISH ||
- method == CAL_COMPONENT_METHOD_CANCEL)
+ if (method == E_CAL_COMPONENT_METHOD_PUBLISH ||
+ method == E_CAL_COMPONENT_METHOD_CANCEL)
goto parent;
comp = meeting_page_get_cancel_comp (priv->meet_page);
if (comp != NULL) {
- CalClient *client;
+ ECal *client;
gboolean result;
- client = e_meeting_store_get_cal_client (priv->model);
- result = itip_send_comp (CAL_COMPONENT_METHOD_CANCEL, comp, client, NULL);
+ client = e_meeting_store_get_e_cal (priv->model);
+ result = itip_send_comp (E_CAL_COMPONENT_METHOD_CANCEL, comp, client, NULL);
g_object_unref((comp));
if (!result)
@@ -410,7 +410,7 @@ event_editor_finalize (GObject *object)
/**
* event_editor_new:
- * @client: a CalClient
+ * @client: a ECal
*
* Creates a new event editor dialog.
*
@@ -418,7 +418,7 @@ event_editor_finalize (GObject *object)
* editor could not be created.
**/
EventEditor *
-event_editor_new (CalClient *client)
+event_editor_new (ECal *client)
{
EventEditor *ee;
@@ -474,19 +474,19 @@ refresh_meeting_cmd (GtkWidget *widget, gpointer data)
{
EventEditor *ee = EVENT_EDITOR (data);
- comp_editor_send_comp (COMP_EDITOR (ee), CAL_COMPONENT_METHOD_REFRESH);
+ comp_editor_send_comp (COMP_EDITOR (ee), E_CAL_COMPONENT_METHOD_REFRESH);
}
static void
cancel_meeting_cmd (GtkWidget *widget, gpointer data)
{
EventEditor *ee = EVENT_EDITOR (data);
- CalComponent *comp;
+ ECalComponent *comp;
comp = comp_editor_get_current_comp (COMP_EDITOR (ee));
if (cancel_component_dialog ((GtkWindow *) ee,
- comp_editor_get_cal_client (COMP_EDITOR (ee)), comp, FALSE)) {
- comp_editor_send_comp (COMP_EDITOR (ee), CAL_COMPONENT_METHOD_CANCEL);
+ comp_editor_get_e_cal (COMP_EDITOR (ee)), comp, FALSE)) {
+ comp_editor_send_comp (COMP_EDITOR (ee), E_CAL_COMPONENT_METHOD_CANCEL);
comp_editor_delete_comp (COMP_EDITOR (ee));
}
}
@@ -497,7 +497,7 @@ forward_cmd (GtkWidget *widget, gpointer data)
EventEditor *ee = EVENT_EDITOR (data);
if (comp_editor_save_comp (COMP_EDITOR (ee), TRUE))
- comp_editor_send_comp (COMP_EDITOR (ee), CAL_COMPONENT_METHOD_PUBLISH);
+ comp_editor_send_comp (COMP_EDITOR (ee), E_CAL_COMPONENT_METHOD_PUBLISH);
}
static void
diff --git a/calendar/gui/dialogs/event-editor.h b/calendar/gui/dialogs/event-editor.h
index e0ce5043d8..9234b8310e 100644
--- a/calendar/gui/dialogs/event-editor.h
+++ b/calendar/gui/dialogs/event-editor.h
@@ -52,8 +52,8 @@ struct _EventEditorClass {
GtkType event_editor_get_type (void);
EventEditor *event_editor_construct (EventEditor *ee,
- CalClient *client);
-EventEditor *event_editor_new (CalClient *client);
+ ECal *client);
+EventEditor *event_editor_new (ECal *client);
void event_editor_show_meeting (EventEditor *ee);
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c
index 8813081f4d..c883174c1f 100644
--- a/calendar/gui/dialogs/event-page.c
+++ b/calendar/gui/dialogs/event-page.c
@@ -36,7 +36,7 @@
#include "e-util/e-categories-config.h"
#include "e-util/e-dialog-widgets.h"
#include "widgets/misc/e-dateedit.h"
-#include "cal-util/timeutil.h"
+#include <libecal/e-cal-time-util.h>
#include "../calendar-config.h"
#include "../e-timezone-entry.h"
#include "comp-editor-util.h"
@@ -91,8 +91,8 @@ static void event_page_finalize (GObject *object);
static GtkWidget *event_page_get_widget (CompEditorPage *page);
static void event_page_focus_main_widget (CompEditorPage *page);
-static void event_page_fill_widgets (CompEditorPage *page, CalComponent *comp);
-static gboolean event_page_fill_component (CompEditorPage *page, CalComponent *comp);
+static void event_page_fill_widgets (CompEditorPage *page, ECalComponent *comp);
+static gboolean event_page_fill_component (CompEditorPage *page, ECalComponent *comp);
static void event_page_set_summary (CompEditorPage *page, const char *summary);
static void event_page_set_dates (CompEditorPage *page, CompEditorPageDates *dates);
@@ -198,15 +198,15 @@ event_page_finalize (GObject *object)
static const int classification_map[] = {
- CAL_COMPONENT_CLASS_PUBLIC,
- CAL_COMPONENT_CLASS_PRIVATE,
- CAL_COMPONENT_CLASS_CONFIDENTIAL,
+ E_CAL_COMPONENT_CLASS_PUBLIC,
+ E_CAL_COMPONENT_CLASS_PRIVATE,
+ E_CAL_COMPONENT_CLASS_CONFIDENTIAL,
-1
};
static const int transparency_map[] = {
- CAL_COMPONENT_TRANSP_TRANSPARENT,
- CAL_COMPONENT_TRANSP_OPAQUE,
+ E_CAL_COMPONENT_TRANSP_TRANSPARENT,
+ E_CAL_COMPONENT_TRANSP_OPAQUE,
-1
};
@@ -265,7 +265,7 @@ set_all_day (EventPage *epage, gboolean all_day)
}
static void
-update_time (EventPage *epage, CalComponentDateTime *start_date, CalComponentDateTime *end_date)
+update_time (EventPage *epage, ECalComponentDateTime *start_date, ECalComponentDateTime *end_date)
{
EventPagePrivate *priv;
struct icaltimetype *start_tt, *end_tt, implied_tt;
@@ -280,7 +280,7 @@ update_time (EventPage *epage, CalComponentDateTime *start_date, CalComponentDat
start_zone = icaltimezone_get_builtin_timezone_from_tzid (start_date->tzid);
if (!start_zone) {
/* FIXME: Handle error better. */
- if (!cal_client_get_timezone (COMP_EDITOR_PAGE (epage)->client,
+ if (!e_cal_get_timezone (COMP_EDITOR_PAGE (epage)->client,
start_date->tzid, &start_zone, NULL)) {
g_warning ("Couldn't get timezone from server: %s",
start_date->tzid ? start_date->tzid : "");
@@ -289,7 +289,7 @@ update_time (EventPage *epage, CalComponentDateTime *start_date, CalComponentDat
end_zone = icaltimezone_get_builtin_timezone_from_tzid (end_date->tzid);
if (!end_zone) {
- if (!cal_client_get_timezone (COMP_EDITOR_PAGE (epage)->client,
+ if (!e_cal_get_timezone (COMP_EDITOR_PAGE (epage)->client,
end_date->tzid, &end_zone, NULL)) {
/* FIXME: Handle error better. */
g_warning ("Couldn't get timezone from server: %s",
@@ -395,11 +395,11 @@ clear_widgets (EventPage *epage)
/* Classification */
e_dialog_radio_set (priv->classification_public,
- CAL_COMPONENT_CLASS_PRIVATE, classification_map);
+ E_CAL_COMPONENT_CLASS_PRIVATE, classification_map);
/* Show Time As (Transparency) */
e_dialog_radio_set (priv->show_time_as_free,
- CAL_COMPONENT_TRANSP_OPAQUE, transparency_map);
+ E_CAL_COMPONENT_TRANSP_OPAQUE, transparency_map);
/* Categories */
e_dialog_editable_set (priv->categories, NULL);
@@ -408,14 +408,14 @@ clear_widgets (EventPage *epage)
/* fill_widgets handler for the event page */
static void
-event_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
+event_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
{
EventPage *epage;
EventPagePrivate *priv;
- CalComponentText text;
- CalComponentClassification cl;
- CalComponentTransparency transparency;
- CalComponentDateTime start_date, end_date;
+ ECalComponentText text;
+ ECalComponentClassification cl;
+ ECalComponentTransparency transparency;
+ ECalComponentDateTime start_date, end_date;
const char *location;
const char *categories;
GSList *l;
@@ -433,84 +433,84 @@ event_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
/* Summary, location, description(s) */
- cal_component_get_summary (comp, &text);
+ e_cal_component_get_summary (comp, &text);
e_dialog_editable_set (priv->summary, text.value);
- cal_component_get_location (comp, &location);
+ e_cal_component_get_location (comp, &location);
e_dialog_editable_set (priv->location, location);
- cal_component_get_description_list (comp, &l);
+ e_cal_component_get_description_list (comp, &l);
if (l) {
- text = *(CalComponentText *)l->data;
+ text = *(ECalComponentText *)l->data;
gtk_text_buffer_set_text (gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->description)),
text.value, -1);
}
- cal_component_free_text_list (l);
+ e_cal_component_free_text_list (l);
/* Start and end times */
- cal_component_get_dtstart (comp, &start_date);
- cal_component_get_dtend (comp, &end_date);
+ e_cal_component_get_dtstart (comp, &start_date);
+ e_cal_component_get_dtend (comp, &end_date);
update_time (epage, &start_date, &end_date);
- cal_component_free_datetime (&start_date);
- cal_component_free_datetime (&end_date);
+ e_cal_component_free_datetime (&start_date);
+ e_cal_component_free_datetime (&end_date);
/* Classification */
- cal_component_get_classification (comp, &cl);
+ e_cal_component_get_classification (comp, &cl);
switch (cl) {
- case CAL_COMPONENT_CLASS_PUBLIC:
+ case E_CAL_COMPONENT_CLASS_PUBLIC:
e_dialog_radio_set (priv->classification_public,
- CAL_COMPONENT_CLASS_PUBLIC,
+ E_CAL_COMPONENT_CLASS_PUBLIC,
classification_map);
break;
- case CAL_COMPONENT_CLASS_PRIVATE:
+ case E_CAL_COMPONENT_CLASS_PRIVATE:
e_dialog_radio_set (priv->classification_public,
- CAL_COMPONENT_CLASS_PRIVATE,
+ E_CAL_COMPONENT_CLASS_PRIVATE,
classification_map);
break;
- case CAL_COMPONENT_CLASS_CONFIDENTIAL:
+ case E_CAL_COMPONENT_CLASS_CONFIDENTIAL:
e_dialog_radio_set (priv->classification_public,
- CAL_COMPONENT_CLASS_CONFIDENTIAL,
+ E_CAL_COMPONENT_CLASS_CONFIDENTIAL,
classification_map);
break;
default:
/* default to PUBLIC */
e_dialog_radio_set (priv->classification_public,
- CAL_COMPONENT_CLASS_PUBLIC,
+ E_CAL_COMPONENT_CLASS_PUBLIC,
classification_map);
break;
}
/* Show Time As (Transparency) */
- cal_component_get_transparency (comp, &transparency);
+ e_cal_component_get_transparency (comp, &transparency);
switch (transparency) {
- case CAL_COMPONENT_TRANSP_TRANSPARENT:
+ case E_CAL_COMPONENT_TRANSP_TRANSPARENT:
e_dialog_radio_set (priv->show_time_as_free,
- CAL_COMPONENT_TRANSP_TRANSPARENT,
+ E_CAL_COMPONENT_TRANSP_TRANSPARENT,
transparency_map);
break;
default:
e_dialog_radio_set (priv->show_time_as_free,
- CAL_COMPONENT_TRANSP_OPAQUE,
+ E_CAL_COMPONENT_TRANSP_OPAQUE,
transparency_map);
break;
}
- if (cal_client_get_static_capability (page->client, CAL_STATIC_CAPABILITY_NO_TRANSPARENCY))
+ if (e_cal_get_static_capability (page->client, CAL_STATIC_CAPABILITY_NO_TRANSPARENCY))
gtk_widget_hide (priv->show_time_frame);
else
gtk_widget_show (priv->show_time_frame);
/* Categories */
- cal_component_get_categories (comp, &categories);
+ e_cal_component_get_categories (comp, &categories);
e_dialog_editable_set (priv->categories, categories);
priv->updating = FALSE;
@@ -518,16 +518,16 @@ event_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
/* fill_component handler for the event page */
static gboolean
-event_page_fill_component (CompEditorPage *page, CalComponent *comp)
+event_page_fill_component (CompEditorPage *page, ECalComponent *comp)
{
EventPage *epage;
EventPagePrivate *priv;
- CalComponentDateTime start_date, end_date;
+ ECalComponentDateTime start_date, end_date;
struct icaltimetype start_tt, end_tt;
gboolean all_day_event, start_date_set, end_date_set;
char *cat, *str;
- CalComponentClassification classif;
- CalComponentTransparency transparency;
+ ECalComponentClassification classif;
+ ECalComponentTransparency transparency;
GtkTextBuffer *text_buffer;
GtkTextIter text_iter_start, text_iter_end;
@@ -539,14 +539,14 @@ event_page_fill_component (CompEditorPage *page, CalComponent *comp)
str = e_dialog_editable_get (priv->summary);
if (!str || strlen (str) == 0)
- cal_component_set_summary (comp, NULL);
+ e_cal_component_set_summary (comp, NULL);
else {
- CalComponentText text;
+ ECalComponentText text;
text.value = str;
text.altrep = NULL;
- cal_component_set_summary (comp, &text);
+ e_cal_component_set_summary (comp, &text);
}
if (str)
@@ -556,9 +556,9 @@ event_page_fill_component (CompEditorPage *page, CalComponent *comp)
str = e_dialog_editable_get (priv->location);
if (!str || strlen (str) == 0)
- cal_component_set_location (comp, NULL);
+ e_cal_component_set_location (comp, NULL);
else
- cal_component_set_location (comp, str);
+ e_cal_component_set_location (comp, str);
if (str)
g_free (str);
@@ -570,17 +570,17 @@ event_page_fill_component (CompEditorPage *page, CalComponent *comp)
str = gtk_text_buffer_get_text (text_buffer, &text_iter_start, &text_iter_end, FALSE);
if (!str || strlen (str) == 0)
- cal_component_set_description_list (comp, NULL);
+ e_cal_component_set_description_list (comp, NULL);
else {
GSList l;
- CalComponentText text;
+ ECalComponentText text;
text.value = str;
text.altrep = NULL;
l.data = &text;
l.next = NULL;
- cal_component_set_description_list (comp, &l);
+ e_cal_component_set_description_list (comp, &l);
}
if (str)
@@ -649,8 +649,8 @@ event_page_fill_component (CompEditorPage *page, CalComponent *comp)
end_date.tzid = icaltimezone_get_tzid (end_zone);
}
- cal_component_set_dtstart (comp, &start_date);
- cal_component_set_dtend (comp, &end_date);
+ e_cal_component_set_dtstart (comp, &start_date);
+ e_cal_component_set_dtend (comp, &end_date);
/* Categories */
@@ -660,7 +660,7 @@ event_page_fill_component (CompEditorPage *page, CalComponent *comp)
if (cat)
g_free (cat);
- cal_component_set_categories (comp, str);
+ e_cal_component_set_categories (comp, str);
if (str)
g_free (str);
@@ -669,13 +669,13 @@ event_page_fill_component (CompEditorPage *page, CalComponent *comp)
classif = e_dialog_radio_get (priv->classification_public,
classification_map);
- cal_component_set_classification (comp, classif);
+ e_cal_component_set_classification (comp, classif);
/* Show Time As (Transparency) */
transparency = e_dialog_radio_get (priv->show_time_as_free,
transparency_map);
- cal_component_set_transparency (comp, transparency);
+ e_cal_component_set_transparency (comp, transparency);
return TRUE;
}
@@ -800,7 +800,7 @@ notify_dates_changed (EventPage *epage, struct icaltimetype *start_tt,
{
EventPagePrivate *priv;
CompEditorPageDates dates;
- CalComponentDateTime start_dt, end_dt;
+ ECalComponentDateTime start_dt, end_dt;
gboolean all_day_event;
icaltimezone *start_zone = NULL, *end_zone = NULL;
diff --git a/calendar/gui/dialogs/meeting-page.c b/calendar/gui/dialogs/meeting-page.c
index 546baa8dc3..311ff6c879 100644
--- a/calendar/gui/dialogs/meeting-page.c
+++ b/calendar/gui/dialogs/meeting-page.c
@@ -59,7 +59,7 @@ struct _MeetingPagePrivate {
GPtrArray *deleted_attendees;
/* To use in case of cancellation */
- CalComponent *comp;
+ ECalComponent *comp;
/* List of identities */
EAccountList *accounts;
@@ -97,8 +97,8 @@ static void meeting_page_finalize (GObject *object);
static GtkWidget *meeting_page_get_widget (CompEditorPage *page);
static void meeting_page_focus_main_widget (CompEditorPage *page);
-static void meeting_page_fill_widgets (CompEditorPage *page, CalComponent *comp);
-static gboolean meeting_page_fill_component (CompEditorPage *page, CalComponent *comp);
+static void meeting_page_fill_widgets (CompEditorPage *page, ECalComponent *comp);
+static gboolean meeting_page_fill_component (CompEditorPage *page, ECalComponent *comp);
static CompEditorPageClass *parent_class = NULL;
@@ -197,22 +197,22 @@ get_current_account (MeetingPage *mpage)
}
static void
-set_attendees (CalComponent *comp, const GPtrArray *attendees)
+set_attendees (ECalComponent *comp, const GPtrArray *attendees)
{
GSList *comp_attendees = NULL, *l;
int i;
for (i = 0; i < attendees->len; i++) {
EMeetingAttendee *ia = g_ptr_array_index (attendees, i);
- CalComponentAttendee *ca;
+ ECalComponentAttendee *ca;
- ca = e_meeting_attendee_as_cal_component_attendee (ia);
+ ca = e_meeting_attendee_as_e_cal_component_attendee (ia);
comp_attendees = g_slist_prepend (comp_attendees, ca);
}
comp_attendees = g_slist_reverse (comp_attendees);
- cal_component_set_attendee_list (comp, comp_attendees);
+ e_cal_component_set_attendee_list (comp, comp_attendees);
for (l = comp_attendees; l != NULL; l = l->next)
g_free (l->data);
@@ -319,11 +319,11 @@ clear_widgets (MeetingPage *mpage)
/* fill_widgets handler for the meeting page */
static void
-meeting_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
+meeting_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
{
MeetingPage *mpage;
MeetingPagePrivate *priv;
- CalComponentOrganizer organizer;
+ ECalComponentOrganizer organizer;
mpage = MEETING_PAGE (page);
priv = mpage->priv;
@@ -342,11 +342,11 @@ meeting_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
clear_widgets (mpage);
/* Component for cancellation */
- priv->comp = cal_component_clone (comp);
+ priv->comp = e_cal_component_clone (comp);
/* If there is an existing organizer show it properly */
- if (cal_component_has_organizer (comp)) {
- cal_component_get_organizer (comp, &organizer);
+ if (e_cal_component_has_organizer (comp)) {
+ e_cal_component_get_organizer (comp, &organizer);
if (organizer.value != NULL) {
const gchar *strip = itip_strip_mailto (organizer.value);
gchar *string;
@@ -355,12 +355,12 @@ meeting_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
gtk_widget_show (priv->existing_organizer_table);
if (itip_organizer_is_user (comp, page->client)) {
gtk_widget_show (priv->invite);
- if (cal_client_get_static_capability (
+ if (e_cal_get_static_capability (
page->client,
CAL_STATIC_CAPABILITY_ORGANIZER_NOT_EMAIL_ADDRESS))
gtk_widget_hide (priv->existing_organizer_btn);
} else {
- if (cal_client_get_static_capability (
+ if (e_cal_get_static_capability (
page->client,
CAL_STATIC_CAPABILITY_ORGANIZER_NOT_EMAIL_ADDRESS))
gtk_widget_hide (priv->existing_organizer_btn);
@@ -395,11 +395,11 @@ meeting_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
/* fill_component handler for the meeting page */
static gboolean
-meeting_page_fill_component (CompEditorPage *page, CalComponent *comp)
+meeting_page_fill_component (CompEditorPage *page, ECalComponent *comp)
{
MeetingPage *mpage;
MeetingPagePrivate *priv;
- CalComponentOrganizer organizer = {NULL, NULL, NULL, NULL};
+ ECalComponentOrganizer organizer = {NULL, NULL, NULL, NULL};
mpage = MEETING_PAGE (page);
priv = mpage->priv;
@@ -428,7 +428,7 @@ meeting_page_fill_component (CompEditorPage *page, CalComponent *comp)
organizer.value = addr;
organizer.cn = a->id->name;
- cal_component_set_organizer (comp, &organizer);
+ e_cal_component_set_organizer (comp, &organizer);
g_free (addr);
}
@@ -691,7 +691,7 @@ add_btn_clicked_cb (GtkButton *btn, MeetingPage *mpage)
**/
MeetingPage *
meeting_page_construct (MeetingPage *mpage, EMeetingStore *ems,
- CalClient *client)
+ ECal *client)
{
MeetingPagePrivate *priv;
ETable *real_table;
@@ -719,7 +719,7 @@ meeting_page_construct (MeetingPage *mpage, EMeetingStore *ems,
}
/* Address information */
- if (!cal_client_get_cal_address (client, &backend_address, NULL))
+ if (!e_cal_get_cal_address (client, &backend_address, NULL))
return NULL;
priv->accounts = itip_addresses_get ();
@@ -797,7 +797,7 @@ meeting_page_construct (MeetingPage *mpage, EMeetingStore *ems,
* not be created.
**/
MeetingPage *
-meeting_page_new (EMeetingStore *ems, CalClient *client)
+meeting_page_new (EMeetingStore *ems, ECal *client)
{
MeetingPage *mpage;
@@ -818,7 +818,7 @@ meeting_page_new (EMeetingStore *ems, CalClient *client)
*
* Return value:
**/
-CalComponent *
+ECalComponent *
meeting_page_get_cancel_comp (MeetingPage *mpage)
{
MeetingPagePrivate *priv;
@@ -833,5 +833,5 @@ meeting_page_get_cancel_comp (MeetingPage *mpage)
set_attendees (priv->comp, priv->deleted_attendees);
- return cal_component_clone (priv->comp);
+ return e_cal_component_clone (priv->comp);
}
diff --git a/calendar/gui/dialogs/meeting-page.h b/calendar/gui/dialogs/meeting-page.h
index 5891189810..95533cd771 100644
--- a/calendar/gui/dialogs/meeting-page.h
+++ b/calendar/gui/dialogs/meeting-page.h
@@ -55,10 +55,10 @@ typedef struct {
GtkType meeting_page_get_type (void);
MeetingPage *meeting_page_construct (MeetingPage *mpage,
EMeetingStore *ems,
- CalClient *client);
+ ECal *client);
MeetingPage *meeting_page_new (EMeetingStore *ems,
- CalClient *client);
-CalComponent *meeting_page_get_cancel_comp (MeetingPage *mpage);
+ ECal *client);
+ECalComponent *meeting_page_get_cancel_comp (MeetingPage *mpage);
diff --git a/calendar/gui/dialogs/recur-comp.c b/calendar/gui/dialogs/recur-comp.c
index eafee32102..82648fe84d 100644
--- a/calendar/gui/dialogs/recur-comp.c
+++ b/calendar/gui/dialogs/recur-comp.c
@@ -32,30 +32,30 @@
gboolean
-recur_component_dialog (CalClient *client,
- CalComponent *comp,
+recur_component_dialog (ECal *client,
+ ECalComponent *comp,
CalObjModType *mod,
GtkWindow *parent)
{
char *str;
GtkWidget *dialog, *rb_this, *rb_prior, *rb_future, *rb_all, *hbox;
- CalComponentVType vtype;
+ ECalComponentVType vtype;
gboolean ret;
- g_return_val_if_fail (IS_CAL_COMPONENT (comp), CALOBJ_MOD_THIS);
+ g_return_val_if_fail (E_IS_CAL_COMPONENT (comp), CALOBJ_MOD_THIS);
- vtype = cal_component_get_vtype (comp);
+ vtype = e_cal_component_get_vtype (comp);
switch (vtype) {
- case CAL_COMPONENT_EVENT:
+ case E_CAL_COMPONENT_EVENT:
str = g_strdup_printf (_("You are modifying a recurring event, what would you like to modify?"));
break;
- case CAL_COMPONENT_TODO:
+ case E_CAL_COMPONENT_TODO:
str = g_strdup_printf (_("You are modifying a recurring task, what would you like to modify?"));
break;
- case CAL_COMPONENT_JOURNAL:
+ case E_CAL_COMPONENT_JOURNAL:
str = g_strdup_printf (_("You are modifying a recurring journal entry, what would you like to modify?"));
break;
@@ -73,13 +73,13 @@ recur_component_dialog (CalClient *client,
rb_this = gtk_radio_button_new_with_label (NULL, _("This Instance Only"));
gtk_container_add (GTK_CONTAINER (hbox), rb_this);
- if (!cal_client_get_static_capability (client, CAL_STATIC_CAPABILITY_NO_THISANDPRIOR)) {
+ if (!e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_NO_THISANDPRIOR)) {
rb_prior = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON (rb_this), _("This and Prior Instances"));
gtk_container_add (GTK_CONTAINER (hbox), rb_prior);
} else
rb_prior = NULL;
- if (!cal_client_get_static_capability (client, CAL_STATIC_CAPABILITY_NO_THISANDFUTURE)) {
+ if (!e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_NO_THISANDFUTURE)) {
rb_future = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON (rb_this), _("This and Future Instances"));
gtk_container_add (GTK_CONTAINER (hbox), rb_future);
} else
diff --git a/calendar/gui/dialogs/recur-comp.h b/calendar/gui/dialogs/recur-comp.h
index 76b1a63bef..94ccbdae87 100644
--- a/calendar/gui/dialogs/recur-comp.h
+++ b/calendar/gui/dialogs/recur-comp.h
@@ -22,12 +22,12 @@
#define RECUR_COMP_H
#include <gtk/gtkwindow.h>
-#include <cal-client/cal-client.h>
-#include <cal-util/cal-component.h>
-#include <cal-util/cal-util.h>
+#include <libecal/e-cal.h>
+#include <libecal/e-cal-component.h>
+#include <libecal/e-cal-util.h>
-gboolean recur_component_dialog (CalClient *client,
- CalComponent *comp,
+gboolean recur_component_dialog (ECal *client,
+ ECalComponent *comp,
CalObjModType *mod,
GtkWindow *parent);
diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c
index ece6c115bb..c930e079a2 100644
--- a/calendar/gui/dialogs/recurrence-page.c
+++ b/calendar/gui/dialogs/recurrence-page.c
@@ -42,8 +42,8 @@
#include <e-util/e-dialog-widgets.h>
#include <e-util/e-time-utils.h>
#include <widgets/misc/e-dateedit.h>
-#include <cal-util/cal-recur.h>
-#include <cal-util/timeutil.h>
+#include <libecal/e-cal-recur.h>
+#include <libecal/e-cal-time-util.h>
#include "../calendar-config.h"
#include "../tag-calendar.h"
#include "../weekday-picker.h"
@@ -135,7 +135,7 @@ static const int ending_types_map[] = {
/* Private part of the RecurrencePage structure */
struct _RecurrencePagePrivate {
/* Component we use to expand the recurrence rules for the preview */
- CalComponent *comp;
+ ECalComponent *comp;
/* Glade XML data */
GladeXML *xml;
@@ -207,8 +207,8 @@ static void recurrence_page_finalize (GObject *object);
static GtkWidget *recurrence_page_get_widget (CompEditorPage *page);
static void recurrence_page_focus_main_widget (CompEditorPage *page);
-static void recurrence_page_fill_widgets (CompEditorPage *page, CalComponent *comp);
-static gboolean recurrence_page_fill_component (CompEditorPage *page, CalComponent *comp);
+static void recurrence_page_fill_widgets (CompEditorPage *page, ECalComponent *comp);
+static gboolean recurrence_page_fill_component (CompEditorPage *page, ECalComponent *comp);
static void recurrence_page_set_summary (CompEditorPage *page, const char *summary);
static void recurrence_page_set_dates (CompEditorPage *page, CompEditorPageDates *dates);
@@ -422,7 +422,7 @@ clear_widgets (RecurrencePage *rpage)
/* Appends an exception date to the list */
static void
-append_exception (RecurrencePage *rpage, CalComponentDateTime *datetime)
+append_exception (RecurrencePage *rpage, ECalComponentDateTime *datetime)
{
RecurrencePagePrivate *priv;
GtkTreeView *view;
@@ -437,17 +437,17 @@ append_exception (RecurrencePage *rpage, CalComponentDateTime *datetime)
/* Fills in the exception widgets with the data from the calendar component */
static void
-fill_exception_widgets (RecurrencePage *rpage, CalComponent *comp)
+fill_exception_widgets (RecurrencePage *rpage, ECalComponent *comp)
{
RecurrencePagePrivate *priv;
GSList *list, *l;
gboolean added = FALSE;
priv = rpage->priv;
- cal_component_get_exdate_list (comp, &list);
+ e_cal_component_get_exdate_list (comp, &list);
for (l = list; l; l = l->next) {
- CalComponentDateTime *cdt;
+ ECalComponentDateTime *cdt;
added = TRUE;
@@ -455,19 +455,19 @@ fill_exception_widgets (RecurrencePage *rpage, CalComponent *comp)
append_exception (rpage, cdt);
}
- cal_component_free_exdate_list (list);
+ e_cal_component_free_exdate_list (list);
}
/* Computes a weekday mask for the start day of a calendar component,
* for use in a WeekdayPicker widget.
*/
static guint8
-get_start_weekday_mask (CalComponent *comp)
+get_start_weekday_mask (ECalComponent *comp)
{
- CalComponentDateTime dt;
+ ECalComponentDateTime dt;
guint8 retval;
- cal_component_get_dtstart (comp, &dt);
+ e_cal_component_get_dtstart (comp, &dt);
if (dt.value) {
short weekday;
@@ -477,7 +477,7 @@ get_start_weekday_mask (CalComponent *comp)
} else
retval = 0;
- cal_component_free_datetime (&dt);
+ e_cal_component_free_datetime (&dt);
return retval;
}
@@ -514,7 +514,7 @@ sensitize_recur_widgets (RecurrencePage *rpage)
type = e_dialog_radio_get (priv->none, type_map);
/* We can't preview that well for instances right now */
- if (cal_component_is_instance (priv->comp))
+ if (e_cal_component_is_instance (priv->comp))
gtk_widget_set_sensitive (priv->preview_calendar, FALSE);
else
gtk_widget_set_sensitive (priv->preview_calendar, TRUE);
@@ -569,7 +569,7 @@ nth_weekday (int pos, icalrecurrencetype_weekday weekday)
* the calendar component.
*/
static void
-simple_recur_to_comp (RecurrencePage *rpage, CalComponent *comp)
+simple_recur_to_comp (RecurrencePage *rpage, ECalComponent *comp)
{
RecurrencePagePrivate *priv;
struct icalrecurrencetype r;
@@ -754,14 +754,14 @@ simple_recur_to_comp (RecurrencePage *rpage, CalComponent *comp)
l.data = &r;
l.next = NULL;
- cal_component_set_rrule_list (comp, &l);
+ e_cal_component_set_rrule_list (comp, &l);
}
/* Fills a component with the data from the recurrence page; in the case of a
* custom recurrence, it leaves it intact.
*/
static gboolean
-fill_component (RecurrencePage *rpage, CalComponent *comp)
+fill_component (RecurrencePage *rpage, ECalComponent *comp)
{
RecurrencePagePrivate *priv;
enum recur_type recur_type;
@@ -777,14 +777,14 @@ fill_component (RecurrencePage *rpage, CalComponent *comp)
switch (recur_type) {
case RECUR_NONE:
- cal_component_set_rdate_list (comp, NULL);
- cal_component_set_rrule_list (comp, NULL);
- cal_component_set_exrule_list (comp, NULL);
+ e_cal_component_set_rdate_list (comp, NULL);
+ e_cal_component_set_rrule_list (comp, NULL);
+ e_cal_component_set_exrule_list (comp, NULL);
break;
case RECUR_SIMPLE:
- cal_component_set_rdate_list (comp, NULL);
- cal_component_set_exrule_list (comp, NULL);
+ e_cal_component_set_rdate_list (comp, NULL);
+ e_cal_component_set_exrule_list (comp, NULL);
simple_recur_to_comp (rpage, comp);
break;
@@ -802,10 +802,10 @@ fill_component (RecurrencePage *rpage, CalComponent *comp)
for (valid_iter = gtk_tree_model_get_iter_first (model, &iter); valid_iter;
valid_iter = gtk_tree_model_iter_next (model, &iter)) {
- const CalComponentDateTime *dt;
- CalComponentDateTime *cdt;
+ const ECalComponentDateTime *dt;
+ ECalComponentDateTime *cdt;
- cdt = g_new (CalComponentDateTime, 1);
+ cdt = g_new (ECalComponentDateTime, 1);
cdt->value = g_new (struct icaltimetype, 1);
dt = e_date_time_list_get_date_time (E_DATE_TIME_LIST (model), &iter);
@@ -824,8 +824,8 @@ fill_component (RecurrencePage *rpage, CalComponent *comp)
list = g_slist_prepend (list, cdt);
}
- cal_component_set_exdate_list (comp, list);
- cal_component_free_exdate_list (list);
+ e_cal_component_set_exdate_list (comp, list);
+ e_cal_component_free_exdate_list (list);
return TRUE;
}
@@ -837,8 +837,8 @@ static void
preview_recur (RecurrencePage *rpage)
{
RecurrencePagePrivate *priv;
- CalComponent *comp;
- CalComponentDateTime cdt;
+ ECalComponent *comp;
+ ECalComponentDateTime cdt;
GSList *l;
icaltimezone *zone = NULL;
@@ -847,44 +847,44 @@ preview_recur (RecurrencePage *rpage)
/* If our component has not been set yet through ::fill_widgets(), we
* cannot preview the recurrence.
*/
- if (!priv->comp || cal_component_is_instance (priv->comp))
+ if (!priv->comp || e_cal_component_is_instance (priv->comp))
return;
/* Create a scratch component with the start/end and
* recurrence/exception information from the one we are editing.
*/
- comp = cal_component_new ();
- cal_component_set_new_vtype (comp, CAL_COMPONENT_EVENT);
+ comp = e_cal_component_new ();
+ e_cal_component_set_new_vtype (comp, E_CAL_COMPONENT_EVENT);
- cal_component_get_dtstart (priv->comp, &cdt);
+ e_cal_component_get_dtstart (priv->comp, &cdt);
if (cdt.tzid != NULL) {
- /* FIXME Will cal_client_get_timezone really not return builtin zones? */
- if (!cal_client_get_timezone (COMP_EDITOR_PAGE (rpage)->client, cdt.tzid, &zone, NULL))
+ /* FIXME Will e_cal_get_timezone really not return builtin zones? */
+ if (!e_cal_get_timezone (COMP_EDITOR_PAGE (rpage)->client, cdt.tzid, &zone, NULL))
zone = icaltimezone_get_builtin_timezone_from_tzid (cdt.tzid);
}
- cal_component_set_dtstart (comp, &cdt);
- cal_component_free_datetime (&cdt);
+ e_cal_component_set_dtstart (comp, &cdt);
+ e_cal_component_free_datetime (&cdt);
- cal_component_get_dtend (priv->comp, &cdt);
- cal_component_set_dtend (comp, &cdt);
- cal_component_free_datetime (&cdt);
+ e_cal_component_get_dtend (priv->comp, &cdt);
+ e_cal_component_set_dtend (comp, &cdt);
+ e_cal_component_free_datetime (&cdt);
- cal_component_get_exdate_list (priv->comp, &l);
- cal_component_set_exdate_list (comp, l);
- cal_component_free_exdate_list (l);
+ e_cal_component_get_exdate_list (priv->comp, &l);
+ e_cal_component_set_exdate_list (comp, l);
+ e_cal_component_free_exdate_list (l);
- cal_component_get_exrule_list (priv->comp, &l);
- cal_component_set_exrule_list (comp, l);
- cal_component_free_recur_list (l);
+ e_cal_component_get_exrule_list (priv->comp, &l);
+ e_cal_component_set_exrule_list (comp, l);
+ e_cal_component_free_recur_list (l);
- cal_component_get_rdate_list (priv->comp, &l);
- cal_component_set_rdate_list (comp, l);
- cal_component_free_period_list (l);
+ e_cal_component_get_rdate_list (priv->comp, &l);
+ e_cal_component_set_rdate_list (comp, l);
+ e_cal_component_free_period_list (l);
- cal_component_get_rrule_list (priv->comp, &l);
- cal_component_set_rrule_list (comp, l);
- cal_component_free_recur_list (l);
+ e_cal_component_get_rrule_list (priv->comp, &l);
+ e_cal_component_set_rrule_list (comp, l);
+ e_cal_component_free_recur_list (l);
fill_component (rpage, comp);
@@ -968,7 +968,7 @@ make_recur_month_num_submenu (const char *title, int start, int end)
submenu = gtk_menu_new ();
for (i = start; i < end; i++) {
- item = gtk_menu_item_new_with_label (_(cal_recur_nth[i]));
+ item = gtk_menu_item_new_with_label (_(e_cal_recur_nth[i]));
gtk_menu_shell_append(GTK_MENU_SHELL(submenu), item);
gtk_object_set_user_data (GTK_OBJECT (item), GINT_TO_POINTER (i + 1));
gtk_widget_show (item);
@@ -1006,7 +1006,7 @@ make_recur_month_num_menu (int month_index)
}
/* Current date */
- item = gtk_menu_item_new_with_label (_(cal_recur_nth[month_index - 1]));
+ item = gtk_menu_item_new_with_label (_(e_cal_recur_nth[month_index - 1]));
gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
gtk_widget_show (item);
@@ -1096,7 +1096,7 @@ month_num_menu_selection_done_cb (GtkMenuShell *menu_shell, gpointer data)
e_dialog_option_menu_set (priv->month_num_menu, month_num, month_num_options_map);
label = GTK_BIN (priv->month_num_menu)->child;
- gtk_label_set_text (GTK_LABEL (label), _(cal_recur_nth[priv->month_index - 1]));
+ gtk_label_set_text (GTK_LABEL (label), _(e_cal_recur_nth[priv->month_index - 1]));
e_dialog_option_menu_set (priv->month_num_menu, 0, month_num_options_map);
e_dialog_option_menu_set (priv->month_num_menu, month_num, month_num_options_map);
@@ -1445,11 +1445,11 @@ fill_ending_date (RecurrencePage *rpage, struct icalrecurrencetype *r)
/* Ending date */
if (!r->until.is_date) {
- CalClient *client = COMP_EDITOR_PAGE (rpage)->client;
- CalComponentDateTime dt;
+ ECal *client = COMP_EDITOR_PAGE (rpage)->client;
+ ECalComponentDateTime dt;
icaltimezone *from_zone, *to_zone;
- cal_component_get_dtstart (priv->comp, &dt);
+ e_cal_component_get_dtstart (priv->comp, &dt);
if (dt.value->is_date)
to_zone = icaltimezone_get_builtin_timezone (calendar_config_get_timezone ());
@@ -1457,7 +1457,7 @@ fill_ending_date (RecurrencePage *rpage, struct icalrecurrencetype *r)
to_zone = icaltimezone_get_utc_timezone ();
else
/* FIXME Error checking? */
- cal_client_get_timezone (client, dt.tzid, &to_zone, NULL);
+ e_cal_get_timezone (client, dt.tzid, &to_zone, NULL);
from_zone = icaltimezone_get_utc_timezone ();
icaltimezone_convert_time (&r->until, from_zone, to_zone);
@@ -1494,11 +1494,11 @@ fill_ending_date (RecurrencePage *rpage, struct icalrecurrencetype *r)
* no rdates or exrules (exdates are handled just fine elsewhere).
*/
static void
-recurrence_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
+recurrence_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
{
RecurrencePage *rpage;
RecurrencePagePrivate *priv;
- CalComponentText text;
+ ECalComponentText text;
CompEditorPageDates dates;
GSList *rrule_list;
int len;
@@ -1519,7 +1519,7 @@ recurrence_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
if (priv->comp)
g_object_unref((priv->comp));
- priv->comp = cal_component_clone (comp);
+ priv->comp = e_cal_component_clone (comp);
/* Don't send off changes during this time */
priv->updating = TRUE;
@@ -1528,7 +1528,7 @@ recurrence_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
clear_widgets (rpage);
/* Summary */
- cal_component_get_summary (comp, &text);
+ e_cal_component_get_summary (comp, &text);
recurrence_page_set_summary (page, text.value);
/* Dates */
@@ -1544,9 +1544,9 @@ recurrence_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
/* No recurrences? */
- if (!cal_component_has_rdates (comp)
- && !cal_component_has_rrules (comp)
- && !cal_component_has_exrules (comp)) {
+ if (!e_cal_component_has_rdates (comp)
+ && !e_cal_component_has_rrules (comp)
+ && !e_cal_component_has_exrules (comp)) {
gtk_signal_handler_block_by_data (GTK_OBJECT (priv->none),
rpage);
gtk_signal_handler_block_by_data (GTK_OBJECT (priv->simple),
@@ -1572,11 +1572,11 @@ recurrence_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
/* See if it is a custom set we don't support */
- cal_component_get_rrule_list (comp, &rrule_list);
+ e_cal_component_get_rrule_list (comp, &rrule_list);
len = g_slist_length (rrule_list);
if (len > 1
- || cal_component_has_rdates (comp)
- || cal_component_has_exrules (comp))
+ || e_cal_component_has_rdates (comp)
+ || e_cal_component_has_exrules (comp))
goto custom;
/* Down to one rule, so test that one */
@@ -1718,9 +1718,9 @@ recurrence_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
goto custom;
if (nth == -1) {
- CalComponentDateTime dt;
+ ECalComponentDateTime dt;
- cal_component_get_dtstart (comp, &dt);
+ e_cal_component_get_dtstart (comp, &dt);
priv->month_index = dt.value->day;
priv->month_num = MONTH_NUM_LAST;
} else {
@@ -1858,7 +1858,7 @@ recurrence_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
out:
- cal_component_free_recur_list (rrule_list);
+ e_cal_component_free_recur_list (rrule_list);
preview_recur (rpage);
priv->updating = FALSE;
@@ -1866,7 +1866,7 @@ recurrence_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
/* fill_component handler for the recurrence page */
static gboolean
-recurrence_page_fill_component (CompEditorPage *page, CalComponent *comp)
+recurrence_page_fill_component (CompEditorPage *page, ECalComponent *comp)
{
RecurrencePage *rpage;
@@ -1893,7 +1893,7 @@ recurrence_page_set_dates (CompEditorPage *page, CompEditorPageDates *dates)
{
RecurrencePage *rpage;
RecurrencePagePrivate *priv;
- CalComponentDateTime dt;
+ ECalComponentDateTime dt;
struct icaltimetype icaltime;
guint8 mask;
@@ -1912,13 +1912,13 @@ recurrence_page_set_dates (CompEditorPage *page, CompEditorPageDates *dates)
if (dates->start) {
icaltime = *dates->start->value;
dt.tzid = dates->start->tzid;
- cal_component_set_dtstart (priv->comp, &dt);
+ e_cal_component_set_dtstart (priv->comp, &dt);
}
if (dates->end) {
icaltime = *dates->end->value;
dt.tzid = dates->end->tzid;
- cal_component_set_dtend (priv->comp, &dt);
+ e_cal_component_set_dtend (priv->comp, &dt);
}
/* Update the weekday picker if necessary */
@@ -2094,7 +2094,7 @@ exception_add_cb (GtkWidget *widget, gpointer data)
{
RecurrencePage *rpage;
RecurrencePagePrivate *priv;
- CalComponentDateTime dt;
+ ECalComponentDateTime dt;
struct icaltimetype icaltime = icaltime_null_time ();
gboolean date_set;
@@ -2126,7 +2126,7 @@ exception_modify_cb (GtkWidget *widget, gpointer data)
RecurrencePage *rpage;
RecurrencePagePrivate *priv;
GtkTreeSelection *selection;
- CalComponentDateTime dt;
+ ECalComponentDateTime dt;
struct icaltimetype icaltime = icaltime_null_time ();
struct icaltimetype *tt;
GtkTreeIter iter;
@@ -2205,7 +2205,7 @@ exception_selection_changed_cb (GtkTreeSelection *selection, gpointer data)
{
RecurrencePage *rpage;
RecurrencePagePrivate *priv;
- const CalComponentDateTime *dt;
+ const ECalComponentDateTime *dt;
struct icaltimetype *t;
GtkTreeIter iter;
diff --git a/calendar/gui/dialogs/schedule-page.c b/calendar/gui/dialogs/schedule-page.c
index 06c2d57131..7ed42cb707 100644
--- a/calendar/gui/dialogs/schedule-page.c
+++ b/calendar/gui/dialogs/schedule-page.c
@@ -81,8 +81,8 @@ static void schedule_page_finalize (GObject *object);
static GtkWidget *schedule_page_get_widget (CompEditorPage *page);
static void schedule_page_focus_main_widget (CompEditorPage *page);
-static void schedule_page_fill_widgets (CompEditorPage *page, CalComponent *comp);
-static gboolean schedule_page_fill_component (CompEditorPage *page, CalComponent *comp);
+static void schedule_page_fill_widgets (CompEditorPage *page, ECalComponent *comp);
+static gboolean schedule_page_fill_component (CompEditorPage *page, ECalComponent *comp);
static void schedule_page_set_dates (CompEditorPage *page, CompEditorPageDates *dates);
static void times_changed_cb (GtkWidget *widget, gpointer data);
@@ -203,7 +203,7 @@ schedule_page_focus_main_widget (CompEditorPage *page)
/* Set date/time */
static void
-update_time (SchedulePage *spage, CalComponentDateTime *start_date, CalComponentDateTime *end_date)
+update_time (SchedulePage *spage, ECalComponentDateTime *start_date, ECalComponentDateTime *end_date)
{
SchedulePagePrivate *priv;
struct icaltimetype start_tt, end_tt;
@@ -217,7 +217,7 @@ update_time (SchedulePage *spage, CalComponentDateTime *start_date, CalComponent
first. */
start_zone = icaltimezone_get_builtin_timezone_from_tzid (start_date->tzid);
if (!start_zone) {
- if (!cal_client_get_timezone (COMP_EDITOR_PAGE (spage)->client,
+ if (!e_cal_get_timezone (COMP_EDITOR_PAGE (spage)->client,
start_date->tzid, &start_zone, NULL)) {
/* FIXME: Handle error better. */
g_warning ("Couldn't get timezone from server: %s",
@@ -227,7 +227,7 @@ update_time (SchedulePage *spage, CalComponentDateTime *start_date, CalComponent
end_zone = icaltimezone_get_builtin_timezone_from_tzid (end_date->tzid);
if (!end_zone) {
- if (!cal_client_get_timezone (COMP_EDITOR_PAGE (spage)->client,
+ if (!e_cal_get_timezone (COMP_EDITOR_PAGE (spage)->client,
end_date->tzid, &end_zone, NULL)) {
/* FIXME: Handle error better. */
g_warning ("Couldn't get timezone from server: %s",
@@ -286,11 +286,11 @@ clear_widgets (SchedulePage *spage)
/* fill_widgets handler for the schedule page */
static void
-schedule_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
+schedule_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
{
SchedulePage *spage;
SchedulePagePrivate *priv;
- CalComponentDateTime start_date, end_date;
+ ECalComponentDateTime start_date, end_date;
spage = SCHEDULE_PAGE (page);
priv = spage->priv;
@@ -301,19 +301,19 @@ schedule_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
clear_widgets (spage);
/* Start and end times */
- cal_component_get_dtstart (comp, &start_date);
- cal_component_get_dtend (comp, &end_date);
+ e_cal_component_get_dtstart (comp, &start_date);
+ e_cal_component_get_dtend (comp, &end_date);
update_time (spage, &start_date, &end_date);
- cal_component_free_datetime (&start_date);
- cal_component_free_datetime (&end_date);
+ e_cal_component_free_datetime (&start_date);
+ e_cal_component_free_datetime (&end_date);
priv->updating = FALSE;
}
/* fill_component handler for the schedule page */
static gboolean
-schedule_page_fill_component (CompEditorPage *page, CalComponent *comp)
+schedule_page_fill_component (CompEditorPage *page, ECalComponent *comp)
{
SchedulePage *spage;
SchedulePagePrivate *priv;
@@ -473,7 +473,7 @@ times_changed_cb (GtkWidget *widget, gpointer data)
SchedulePage *spage = data;
SchedulePagePrivate *priv;
CompEditorPageDates dates;
- CalComponentDateTime start_dt, end_dt;
+ ECalComponentDateTime start_dt, end_dt;
struct icaltimetype start_tt = icaltime_null_time ();
struct icaltimetype end_tt = icaltime_null_time ();
diff --git a/calendar/gui/dialogs/send-comp.c b/calendar/gui/dialogs/send-comp.c
index 0ca96ead7b..3075747a92 100644
--- a/calendar/gui/dialogs/send-comp.c
+++ b/calendar/gui/dialogs/send-comp.c
@@ -40,20 +40,20 @@
* Return value: TRUE if the user clicked Yes, FALSE otherwise.
**/
gboolean
-send_component_dialog (GtkWindow *parent, CalClient *client, CalComponent *comp, gboolean new)
+send_component_dialog (GtkWindow *parent, ECal *client, ECalComponent *comp, gboolean new)
{
GtkWidget *dialog;
- CalComponentVType vtype;
+ ECalComponentVType vtype;
char *str;
gint response;
- if (cal_client_get_save_schedules (client))
+ if (e_cal_get_save_schedules (client))
return FALSE;
- vtype = cal_component_get_vtype (comp);
+ vtype = e_cal_component_get_vtype (comp);
switch (vtype) {
- case CAL_COMPONENT_EVENT:
+ case E_CAL_COMPONENT_EVENT:
if (new)
str = g_strdup_printf (_("The meeting information has "
"been created. Send it?"));
@@ -63,7 +63,7 @@ send_component_dialog (GtkWindow *parent, CalClient *client, CalComponent *comp,
"version?"));
break;
- case CAL_COMPONENT_TODO:
+ case E_CAL_COMPONENT_TODO:
if (new)
str = g_strdup_printf (_("The task assignment "
"information has been "
diff --git a/calendar/gui/dialogs/send-comp.h b/calendar/gui/dialogs/send-comp.h
index e02bd74d1e..86be94ccdb 100644
--- a/calendar/gui/dialogs/send-comp.h
+++ b/calendar/gui/dialogs/send-comp.h
@@ -23,9 +23,9 @@
#include <glib.h>
#include <gtk/gtkwindow.h>
-#include <cal-client/cal-client.h>
-#include <cal-util/cal-component.h>
+#include <libecal/e-cal.h>
+#include <libecal/e-cal-component.h>
-gboolean send_component_dialog (GtkWindow *parent, CalClient *client, CalComponent *comp, gboolean new);
+gboolean send_component_dialog (GtkWindow *parent, ECal *client, ECalComponent *comp, gboolean new);
#endif
diff --git a/calendar/gui/dialogs/task-details-page.c b/calendar/gui/dialogs/task-details-page.c
index cdaa8d08a1..938a9ec1fe 100644
--- a/calendar/gui/dialogs/task-details-page.c
+++ b/calendar/gui/dialogs/task-details-page.c
@@ -94,8 +94,8 @@ static void task_details_page_finalize (GObject *object);
static GtkWidget *task_details_page_get_widget (CompEditorPage *page);
static void task_details_page_focus_main_widget (CompEditorPage *page);
-static void task_details_page_fill_widgets (CompEditorPage *page, CalComponent *comp);
-static gboolean task_details_page_fill_component (CompEditorPage *page, CalComponent *comp);
+static void task_details_page_fill_widgets (CompEditorPage *page, ECalComponent *comp);
+static gboolean task_details_page_fill_component (CompEditorPage *page, ECalComponent *comp);
static CompEditorPageClass *parent_class = NULL;
@@ -278,7 +278,7 @@ clear_widgets (TaskDetailsPage *tdpage)
/* fill_widgets handler for the task page */
static void
-task_details_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
+task_details_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
{
TaskDetailsPage *tdpage;
TaskDetailsPagePrivate *priv;
@@ -297,7 +297,7 @@ task_details_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
clear_widgets (tdpage);
/* Percent Complete. */
- cal_component_get_percent (comp, &percent);
+ e_cal_component_get_percent (comp, &percent);
if (percent) {
e_dialog_spin_set (priv->percent_complete, *percent);
} else {
@@ -306,7 +306,7 @@ task_details_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
}
/* Status. */
- cal_component_get_status (comp, &status);
+ e_cal_component_get_status (comp, &status);
if (status == ICAL_STATUS_NONE || status == ICAL_STATUS_NEEDSACTION) {
/* Try to use the percent value. */
if (percent) {
@@ -322,10 +322,10 @@ task_details_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
e_dialog_option_menu_set (priv->status, status, status_map);
if (percent)
- cal_component_free_percent (percent);
+ e_cal_component_free_percent (percent);
/* Completed Date. */
- cal_component_get_completed (comp, &completed);
+ e_cal_component_get_completed (comp, &completed);
if (completed) {
icaltimezone *utc_zone, *zone;
char *location;
@@ -345,21 +345,21 @@ task_details_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
completed->hour,
completed->minute);
- cal_component_free_icaltimetype (completed);
+ e_cal_component_free_icaltimetype (completed);
}
/* Priority. */
- cal_component_get_priority (comp, &priority_value);
+ e_cal_component_get_priority (comp, &priority_value);
if (priority_value) {
priority = priority_value_to_index (*priority_value);
- cal_component_free_priority (priority_value);
+ e_cal_component_free_priority (priority_value);
} else {
priority = PRIORITY_UNDEFINED;
}
e_dialog_option_menu_set (priv->priority, priority, priority_map);
/* URL */
- cal_component_get_url (comp, &url);
+ e_cal_component_get_url (comp, &url);
e_dialog_editable_set (priv->url, url);
priv->updating = FALSE;
@@ -367,7 +367,7 @@ task_details_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
/* fill_component handler for the task page */
static gboolean
-task_details_page_fill_component (CompEditorPage *page, CalComponent *comp)
+task_details_page_fill_component (CompEditorPage *page, ECalComponent *comp)
{
TaskDetailsPage *tdpage;
TaskDetailsPagePrivate *priv;
@@ -383,16 +383,16 @@ task_details_page_fill_component (CompEditorPage *page, CalComponent *comp)
/* Percent Complete. */
percent = e_dialog_spin_get_int (priv->percent_complete);
- cal_component_set_percent (comp, &percent);
+ e_cal_component_set_percent (comp, &percent);
/* Status. */
status = e_dialog_option_menu_get (priv->status, status_map);
- cal_component_set_status (comp, status);
+ e_cal_component_set_status (comp, status);
/* Priority. */
priority = e_dialog_option_menu_get (priv->priority, priority_map);
priority_value = priority_index_to_value (priority);
- cal_component_set_priority (comp, &priority_value);
+ e_cal_component_set_priority (comp, &priority_value);
icaltime = icaltime_null_time ();
@@ -424,14 +424,14 @@ task_details_page_fill_component (CompEditorPage *page, CalComponent *comp)
icaltimezone *zone = icaltimezone_get_builtin_timezone (location);
icaltimezone_convert_time (&icaltime, zone,
icaltimezone_get_utc_timezone ());
- cal_component_set_completed (comp, &icaltime);
+ e_cal_component_set_completed (comp, &icaltime);
} else {
- cal_component_set_completed (comp, NULL);
+ e_cal_component_set_completed (comp, NULL);
}
/* URL. */
url = e_dialog_editable_get (priv->url);
- cal_component_set_url (comp, url);
+ e_cal_component_set_url (comp, url);
if (url)
g_free (url);
diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c
index 339fdca80d..5c796df3a3 100644
--- a/calendar/gui/dialogs/task-editor.c
+++ b/calendar/gui/dialogs/task-editor.c
@@ -51,9 +51,9 @@ struct _TaskEditorPrivate {
static void task_editor_class_init (TaskEditorClass *class);
static void task_editor_init (TaskEditor *te);
-static void task_editor_set_cal_client (CompEditor *editor, CalClient *client);
-static void task_editor_edit_comp (CompEditor *editor, CalComponent *comp);
-static gboolean task_editor_send_comp (CompEditor *editor, CalComponentItipMethod method);
+static void task_editor_set_e_cal (CompEditor *editor, ECal *client);
+static void task_editor_edit_comp (CompEditor *editor, ECalComponent *comp);
+static gboolean task_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method);
static void task_editor_finalize (GObject *object);
static void assign_task_cmd (GtkWidget *widget, gpointer data);
@@ -101,7 +101,7 @@ task_editor_class_init (TaskEditorClass *klass)
parent_class = g_type_class_ref(TYPE_COMP_EDITOR);
- editor_class->set_cal_client = task_editor_set_cal_client;
+ editor_class->set_e_cal = task_editor_set_e_cal;
editor_class->edit_comp = task_editor_edit_comp;
editor_class->send_comp = task_editor_send_comp;
@@ -119,9 +119,9 @@ set_menu_sens (TaskEditor *te)
existing = comp_editor_get_existing_org (COMP_EDITOR (te));
user = comp_editor_get_user_org (COMP_EDITOR (te));
- cal_client_is_read_only (comp_editor_get_cal_client (COMP_EDITOR (te)), &read_only, NULL);
+ e_cal_is_read_only (comp_editor_get_e_cal (COMP_EDITOR (te)), &read_only, NULL);
- sens = cal_client_get_static_capability (comp_editor_get_cal_client (COMP_EDITOR (te)),
+ sens = e_cal_get_static_capability (comp_editor_get_e_cal (COMP_EDITOR (te)),
CAL_STATIC_CAPABILITY_NO_TASK_ASSIGNMENT)
|| priv->assignment_shown || read_only;
comp_editor_set_ui_prop (COMP_EDITOR (te),
@@ -180,7 +180,7 @@ task_editor_init (TaskEditor *te)
}
TaskEditor *
-task_editor_construct (TaskEditor *te, CalClient *client)
+task_editor_construct (TaskEditor *te, ECal *client)
{
TaskEditorPrivate *priv;
@@ -207,7 +207,7 @@ task_editor_construct (TaskEditor *te, CalClient *client)
COMP_EDITOR_PAGE (priv->meet_page),
_("Assignment"));
- comp_editor_set_cal_client (COMP_EDITOR (te), client);
+ comp_editor_set_e_cal (COMP_EDITOR (te), client);
comp_editor_merge_ui (COMP_EDITOR (te), "evolution-task-editor.xml", verbs, NULL);
@@ -218,7 +218,7 @@ task_editor_construct (TaskEditor *te, CalClient *client)
}
static void
-task_editor_set_cal_client (CompEditor *editor, CalClient *client)
+task_editor_set_e_cal (CompEditor *editor, ECal *client)
{
TaskEditor *te;
TaskEditorPrivate *priv;
@@ -226,19 +226,19 @@ task_editor_set_cal_client (CompEditor *editor, CalClient *client)
te = TASK_EDITOR (editor);
priv = te->priv;
- e_meeting_store_set_cal_client (priv->model, client);
+ e_meeting_store_set_e_cal (priv->model, client);
- if (parent_class->set_cal_client)
- parent_class->set_cal_client (editor, client);
+ if (parent_class->set_e_cal)
+ parent_class->set_e_cal (editor, client);
}
static void
-task_editor_edit_comp (CompEditor *editor, CalComponent *comp)
+task_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
{
TaskEditor *te;
TaskEditorPrivate *priv;
- CalComponentOrganizer organizer;
- CalClient *client;
+ ECalComponentOrganizer organizer;
+ ECal *client;
GSList *attendees = NULL;
te = TASK_EDITOR (editor);
@@ -249,11 +249,11 @@ task_editor_edit_comp (CompEditor *editor, CalComponent *comp)
if (parent_class->edit_comp)
parent_class->edit_comp (editor, comp);
- client = comp_editor_get_cal_client (COMP_EDITOR (editor));
+ client = comp_editor_get_e_cal (COMP_EDITOR (editor));
/* Get meeting related stuff */
- cal_component_get_organizer (comp, &organizer);
- cal_component_get_attendee_list (comp, &attendees);
+ e_cal_component_get_organizer (comp, &organizer);
+ e_cal_component_get_attendee_list (comp, &attendees);
/* Clear things up */
e_meeting_store_remove_all_attendees (priv->model);
@@ -271,10 +271,10 @@ task_editor_edit_comp (CompEditor *editor, CalComponent *comp)
_("Assignment"));
for (l = attendees; l != NULL; l = l->next) {
- CalComponentAttendee *ca = l->data;
+ ECalComponentAttendee *ca = l->data;
EMeetingAttendee *ia;
- ia = E_MEETING_ATTENDEE (e_meeting_attendee_new_from_cal_component_attendee (ca));
+ ia = E_MEETING_ATTENDEE (e_meeting_attendee_new_from_e_cal_component_attendee (ca));
/* If we aren't the organizer or the attendee is just delegating, don't allow editing */
if (!comp_editor_get_user_org (editor) || e_meeting_attendee_is_set_delto (ia))
e_meeting_attendee_set_edit_level (ia, E_MEETING_ATTENDEE_EDIT_NONE);
@@ -300,7 +300,7 @@ task_editor_edit_comp (CompEditor *editor, CalComponent *comp)
e_meeting_attendee_set_edit_level (ia, E_MEETING_ATTENDEE_EDIT_STATUS);
}
g_object_unref(it);
- } else if (cal_client_get_organizer_must_attend (client)) {
+ } else if (e_cal_get_organizer_must_attend (client)) {
EMeetingAttendee *ia;
ia = e_meeting_store_find_attendee (priv->model, organizer.value, &row);
@@ -310,7 +310,7 @@ task_editor_edit_comp (CompEditor *editor, CalComponent *comp)
priv->assignment_shown = TRUE;
}
- cal_component_free_attendee_list (attendees);
+ e_cal_component_free_attendee_list (attendees);
set_menu_sens (te);
comp_editor_set_needs_send (COMP_EDITOR (te), priv->assignment_shown && itip_organizer_is_user (comp, client));
@@ -319,26 +319,26 @@ task_editor_edit_comp (CompEditor *editor, CalComponent *comp)
}
static gboolean
-task_editor_send_comp (CompEditor *editor, CalComponentItipMethod method)
+task_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method)
{
TaskEditor *te = TASK_EDITOR (editor);
TaskEditorPrivate *priv;
- CalComponent *comp = NULL;
+ ECalComponent *comp = NULL;
priv = te->priv;
/* Don't cancel more than once or when just publishing */
- if (method == CAL_COMPONENT_METHOD_PUBLISH ||
- method == CAL_COMPONENT_METHOD_CANCEL)
+ if (method == E_CAL_COMPONENT_METHOD_PUBLISH ||
+ method == E_CAL_COMPONENT_METHOD_CANCEL)
goto parent;
comp = meeting_page_get_cancel_comp (priv->meet_page);
if (comp != NULL) {
- CalClient *client;
+ ECal *client;
gboolean result;
- client = e_meeting_store_get_cal_client (priv->model);
- result = itip_send_comp (CAL_COMPONENT_METHOD_CANCEL, comp, client, NULL);
+ client = e_meeting_store_get_e_cal (priv->model);
+ result = itip_send_comp (E_CAL_COMPONENT_METHOD_CANCEL, comp, client, NULL);
g_object_unref((comp));
if (!result)
@@ -379,7 +379,7 @@ task_editor_finalize (GObject *object)
/**
* task_editor_new:
- * @client: a CalClient
+ * @client: a ECal
*
* Creates a new event editor dialog.
*
@@ -387,7 +387,7 @@ task_editor_finalize (GObject *object)
* editor could not be created.
**/
TaskEditor *
-task_editor_new (CalClient *client)
+task_editor_new (ECal *client)
{
TaskEditor *te;
@@ -439,19 +439,19 @@ refresh_task_cmd (GtkWidget *widget, gpointer data)
{
TaskEditor *te = TASK_EDITOR (data);
- comp_editor_send_comp (COMP_EDITOR (te), CAL_COMPONENT_METHOD_REFRESH);
+ comp_editor_send_comp (COMP_EDITOR (te), E_CAL_COMPONENT_METHOD_REFRESH);
}
static void
cancel_task_cmd (GtkWidget *widget, gpointer data)
{
TaskEditor *te = TASK_EDITOR (data);
- CalComponent *comp;
+ ECalComponent *comp;
comp = comp_editor_get_current_comp (COMP_EDITOR (te));
if (cancel_component_dialog ((GtkWindow *) te,
- comp_editor_get_cal_client (COMP_EDITOR (te)), comp, FALSE)) {
- comp_editor_send_comp (COMP_EDITOR (te), CAL_COMPONENT_METHOD_CANCEL);
+ comp_editor_get_e_cal (COMP_EDITOR (te)), comp, FALSE)) {
+ comp_editor_send_comp (COMP_EDITOR (te), E_CAL_COMPONENT_METHOD_CANCEL);
comp_editor_delete_comp (COMP_EDITOR (te));
}
}
@@ -462,7 +462,7 @@ forward_cmd (GtkWidget *widget, gpointer data)
TaskEditor *te = TASK_EDITOR (data);
if (comp_editor_save_comp (COMP_EDITOR (te), TRUE))
- comp_editor_send_comp (COMP_EDITOR (te), CAL_COMPONENT_METHOD_PUBLISH);
+ comp_editor_send_comp (COMP_EDITOR (te), E_CAL_COMPONENT_METHOD_PUBLISH);
}
static void
diff --git a/calendar/gui/dialogs/task-editor.h b/calendar/gui/dialogs/task-editor.h
index aec98b073e..e0e6ac75be 100644
--- a/calendar/gui/dialogs/task-editor.h
+++ b/calendar/gui/dialogs/task-editor.h
@@ -53,8 +53,8 @@ struct _TaskEditorClass {
GtkType task_editor_get_type (void);
TaskEditor *task_editor_construct (TaskEditor *te,
- CalClient *client);
-TaskEditor *task_editor_new (CalClient *client);
+ ECal *client);
+TaskEditor *task_editor_new (ECal *client);
void task_editor_show_assignment(TaskEditor *te);
diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c
index fb7558ce5a..e691c8de92 100644
--- a/calendar/gui/dialogs/task-page.c
+++ b/calendar/gui/dialogs/task-page.c
@@ -73,9 +73,9 @@ struct _TaskPagePrivate {
};
static const int classification_map[] = {
- CAL_COMPONENT_CLASS_PUBLIC,
- CAL_COMPONENT_CLASS_PRIVATE,
- CAL_COMPONENT_CLASS_CONFIDENTIAL,
+ E_CAL_COMPONENT_CLASS_PUBLIC,
+ E_CAL_COMPONENT_CLASS_PRIVATE,
+ E_CAL_COMPONENT_CLASS_CONFIDENTIAL,
-1
};
@@ -87,8 +87,8 @@ static void task_page_finalize (GObject *object);
static GtkWidget *task_page_get_widget (CompEditorPage *page);
static void task_page_focus_main_widget (CompEditorPage *page);
-static void task_page_fill_widgets (CompEditorPage *page, CalComponent *comp);
-static gboolean task_page_fill_component (CompEditorPage *page, CalComponent *comp);
+static void task_page_fill_widgets (CompEditorPage *page, ECalComponent *comp);
+static gboolean task_page_fill_component (CompEditorPage *page, ECalComponent *comp);
static void task_page_set_summary (CompEditorPage *page, const char *summary);
static void task_page_set_dates (CompEditorPage *page, CompEditorPageDates *dates);
@@ -231,14 +231,14 @@ clear_widgets (TaskPage *tpage)
/* Classification */
e_dialog_radio_set (priv->classification_public,
- CAL_COMPONENT_CLASS_PRIVATE, classification_map);
+ E_CAL_COMPONENT_CLASS_PRIVATE, classification_map);
/* Categories */
e_dialog_editable_set (priv->categories, NULL);
}
/* Decode the radio button group for classifications */
-static CalComponentClassification
+static ECalComponentClassification
classification_get (GtkWidget *widget)
{
return e_dialog_radio_get (widget, classification_map);
@@ -246,13 +246,13 @@ classification_get (GtkWidget *widget)
/* fill_widgets handler for the task page */
static void
-task_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
+task_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
{
TaskPage *tpage;
TaskPagePrivate *priv;
- CalComponentText text;
- CalComponentDateTime d;
- CalComponentClassification cl;
+ ECalComponentText text;
+ ECalComponentDateTime d;
+ ECalComponentClassification cl;
GSList *l;
const char *categories;
icaltimezone *zone, *default_zone;
@@ -267,25 +267,25 @@ task_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
clear_widgets (tpage);
/* Summary, description(s) */
- cal_component_get_summary (comp, &text);
+ e_cal_component_get_summary (comp, &text);
e_dialog_editable_set (priv->summary, text.value);
- cal_component_get_description_list (comp, &l);
+ e_cal_component_get_description_list (comp, &l);
if (l) {
- text = *(CalComponentText *)l->data;
+ text = *(ECalComponentText *)l->data;
gtk_text_buffer_set_text (gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->description)),
text.value, -1);
} else {
gtk_text_buffer_set_text (gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->description)),
"", 0);
}
- cal_component_free_text_list (l);
+ e_cal_component_free_text_list (l);
location = calendar_config_get_timezone ();
default_zone = icaltimezone_get_builtin_timezone (location);
/* Due Date. */
- cal_component_get_due (comp, &d);
+ e_cal_component_get_due (comp, &d);
zone = NULL;
if (d.value) {
struct icaltimetype *due_tt = d.value;
@@ -316,7 +316,7 @@ task_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
if (!zone)
zone = icaltimezone_get_builtin_timezone_from_tzid (d.tzid);
if (!zone) {
- if (!cal_client_get_timezone (page->client, d.tzid, &zone, NULL))
+ if (!e_cal_get_timezone (page->client, d.tzid, &zone, NULL))
/* FIXME: Handle error better. */
g_warning ("Couldn't get timezone from server: %s",
d.tzid ? d.tzid : "");
@@ -324,11 +324,11 @@ task_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
e_timezone_entry_set_timezone (E_TIMEZONE_ENTRY (priv->due_timezone),
zone);
- cal_component_free_datetime (&d);
+ e_cal_component_free_datetime (&d);
/* Start Date. */
- cal_component_get_dtstart (comp, &d);
+ e_cal_component_get_dtstart (comp, &d);
zone = NULL;
if (d.value) {
struct icaltimetype *start_tt = d.value;
@@ -356,7 +356,7 @@ task_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
if (!zone)
zone = icaltimezone_get_builtin_timezone_from_tzid (d.tzid);
if (!zone) {
- if (!cal_client_get_timezone (page->client, d.tzid, &zone, NULL))
+ if (!e_cal_get_timezone (page->client, d.tzid, &zone, NULL))
/* FIXME: Handle error better. */
g_warning ("Couldn't get timezone from server: %s",
d.tzid ? d.tzid : "");
@@ -364,40 +364,40 @@ task_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
e_timezone_entry_set_timezone (E_TIMEZONE_ENTRY (priv->start_timezone),
zone);
- cal_component_free_datetime (&d);
+ e_cal_component_free_datetime (&d);
/* Classification. */
- cal_component_get_classification (comp, &cl);
+ e_cal_component_get_classification (comp, &cl);
switch (cl) {
- case CAL_COMPONENT_CLASS_PUBLIC:
+ case E_CAL_COMPONENT_CLASS_PUBLIC:
e_dialog_radio_set (priv->classification_public,
- CAL_COMPONENT_CLASS_PUBLIC,
+ E_CAL_COMPONENT_CLASS_PUBLIC,
classification_map);
break;
- case CAL_COMPONENT_CLASS_PRIVATE:
+ case E_CAL_COMPONENT_CLASS_PRIVATE:
e_dialog_radio_set (priv->classification_public,
- CAL_COMPONENT_CLASS_PRIVATE,
+ E_CAL_COMPONENT_CLASS_PRIVATE,
classification_map);
break;
- case CAL_COMPONENT_CLASS_CONFIDENTIAL:
+ case E_CAL_COMPONENT_CLASS_CONFIDENTIAL:
e_dialog_radio_set (priv->classification_public,
- CAL_COMPONENT_CLASS_CONFIDENTIAL,
+ E_CAL_COMPONENT_CLASS_CONFIDENTIAL,
classification_map);
break;
default:
/* default to PUBLIC */
e_dialog_radio_set (priv->classification_public,
- CAL_COMPONENT_CLASS_PUBLIC,
+ E_CAL_COMPONENT_CLASS_PUBLIC,
classification_map);
break;
}
/* Categories */
- cal_component_get_categories (comp, &categories);
+ e_cal_component_get_categories (comp, &categories);
e_dialog_editable_set (priv->categories, categories);
@@ -406,11 +406,11 @@ task_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
/* fill_component handler for the task page */
static gboolean
-task_page_fill_component (CompEditorPage *page, CalComponent *comp)
+task_page_fill_component (CompEditorPage *page, ECalComponent *comp)
{
TaskPage *tpage;
TaskPagePrivate *priv;
- CalComponentDateTime date;
+ ECalComponentDateTime date;
struct icaltimetype start_tt, due_tt;
char *cat, *str;
gboolean start_date_set, due_date_set, time_set;
@@ -428,14 +428,14 @@ task_page_fill_component (CompEditorPage *page, CalComponent *comp)
str = e_dialog_editable_get (priv->summary);
if (!str || strlen (str) == 0)
- cal_component_set_summary (comp, NULL);
+ e_cal_component_set_summary (comp, NULL);
else {
- CalComponentText text;
+ ECalComponentText text;
text.value = str;
text.altrep = NULL;
- cal_component_set_summary (comp, &text);
+ e_cal_component_set_summary (comp, &text);
}
if (str)
@@ -448,17 +448,17 @@ task_page_fill_component (CompEditorPage *page, CalComponent *comp)
str = gtk_text_buffer_get_text (text_buffer, &text_iter_start, &text_iter_end, FALSE);
if (!str || strlen (str) == 0)
- cal_component_set_description_list (comp, NULL);
+ e_cal_component_set_description_list (comp, NULL);
else {
GSList l;
- CalComponentText text;
+ ECalComponentText text;
text.value = str;
text.altrep = NULL;
l.data = &text;
l.next = NULL;
- cal_component_set_description_list (comp, &l);
+ e_cal_component_set_description_list (comp, &l);
}
if (str)
@@ -493,9 +493,9 @@ task_page_fill_component (CompEditorPage *page, CalComponent *comp)
due_tt.is_date = TRUE;
date.tzid = NULL;
}
- cal_component_set_due (comp, &date);
+ e_cal_component_set_due (comp, &date);
} else {
- cal_component_set_due (comp, NULL);
+ e_cal_component_set_due (comp, NULL);
}
/* Start Date. */
@@ -522,9 +522,9 @@ task_page_fill_component (CompEditorPage *page, CalComponent *comp)
start_tt.is_date = TRUE;
date.tzid = NULL;
}
- cal_component_set_dtstart (comp, &date);
+ e_cal_component_set_dtstart (comp, &date);
} else {
- cal_component_set_dtstart (comp, NULL);
+ e_cal_component_set_dtstart (comp, NULL);
}
/* Check whether due datetime is before start datetime */
@@ -544,7 +544,7 @@ task_page_fill_component (CompEditorPage *page, CalComponent *comp)
/* Classification. */
- cal_component_set_classification (comp, classification_get (priv->classification_public));
+ e_cal_component_set_classification (comp, classification_get (priv->classification_public));
/* Categories */
cat = e_dialog_editable_get (priv->categories);
@@ -552,7 +552,7 @@ task_page_fill_component (CompEditorPage *page, CalComponent *comp)
if (cat)
g_free (cat);
- cal_component_set_categories (comp, str);
+ e_cal_component_set_categories (comp, str);
if (str)
g_free (str);
@@ -680,7 +680,7 @@ date_changed_cb (EDateEdit *dedit, gpointer data)
TaskPagePrivate *priv;
CompEditorPageDates dates;
gboolean date_set, time_set;
- CalComponentDateTime start_dt, due_dt;
+ ECalComponentDateTime start_dt, due_dt;
struct icaltimetype start_tt = icaltime_null_time();
struct icaltimetype due_tt = icaltime_null_time();
diff --git a/calendar/gui/e-alarm-list.c b/calendar/gui/e-alarm-list.c
index 534a8c9449..c1429f8705 100644
--- a/calendar/gui/e-alarm-list.c
+++ b/calendar/gui/e-alarm-list.c
@@ -27,7 +27,7 @@
#include <gtk/gtktreednd.h>
#include <libgnome/gnome-i18n.h>
#include <glib.h>
-#include <cal-util/timeutil.h>
+#include <libecal/e-cal-time-util.h>
#include <e-util/e-time-utils.h>
#include "calendar-config.h"
#include "e-alarm-list.h"
@@ -264,7 +264,7 @@ e_alarm_list_get_column_type (GtkTreeModel *tree_model,
return column_types [index];
}
-const CalComponentAlarm *
+const ECalComponentAlarm *
e_alarm_list_get_alarm (EAlarmList *alarm_list, GtkTreeIter *iter)
{
g_return_val_if_fail (IS_VALID_ITER (alarm_list, iter), NULL);
@@ -273,22 +273,22 @@ e_alarm_list_get_alarm (EAlarmList *alarm_list, GtkTreeIter *iter)
}
static void
-free_alarm (CalComponentAlarm *alarm)
+free_alarm (ECalComponentAlarm *alarm)
{
- cal_component_alarm_free (alarm);
+ e_cal_component_alarm_free (alarm);
}
-static CalComponentAlarm *
-copy_alarm (const CalComponentAlarm *alarm)
+static ECalComponentAlarm *
+copy_alarm (const ECalComponentAlarm *alarm)
{
- return cal_component_alarm_clone ((CalComponentAlarm *) alarm);
+ return e_cal_component_alarm_clone ((ECalComponentAlarm *) alarm);
}
void
e_alarm_list_set_alarm (EAlarmList *alarm_list, GtkTreeIter *iter,
- const CalComponentAlarm *alarm)
+ const ECalComponentAlarm *alarm)
{
- CalComponentAlarm *alarm_old;
+ ECalComponentAlarm *alarm_old;
g_return_if_fail (IS_VALID_ITER (alarm_list, iter));
@@ -300,7 +300,7 @@ e_alarm_list_set_alarm (EAlarmList *alarm_list, GtkTreeIter *iter,
void
e_alarm_list_append (EAlarmList *alarm_list, GtkTreeIter *iter,
- const CalComponentAlarm *alarm)
+ const ECalComponentAlarm *alarm)
{
g_return_if_fail (alarm != NULL);
@@ -321,7 +321,7 @@ e_alarm_list_remove (EAlarmList *alarm_list, GtkTreeIter *iter)
g_return_if_fail (IS_VALID_ITER (alarm_list, iter));
n = g_list_position (alarm_list->list, G_LIST (iter->user_data));
- free_alarm ((CalComponentAlarm *) G_LIST (iter->user_data)->data);
+ free_alarm ((ECalComponentAlarm *) G_LIST (iter->user_data)->data);
alarm_list->list = g_list_delete_link (alarm_list->list, G_LIST (iter->user_data));
row_deleted (alarm_list, n);
}
@@ -334,7 +334,7 @@ e_alarm_list_clear (EAlarmList *alarm_list)
all_rows_deleted (alarm_list);
for (l = alarm_list->list; l; l = g_list_next (l)) {
- free_alarm ((CalComponentAlarm *) l->data);
+ free_alarm ((ECalComponentAlarm *) l->data);
}
g_list_free (alarm_list->list);
@@ -444,37 +444,37 @@ get_alarm_duration_string (struct icaldurationtype *duration)
}
static char *
-get_alarm_string (CalComponentAlarm *alarm)
+get_alarm_string (ECalComponentAlarm *alarm)
{
- CalAlarmAction action;
- CalAlarmTrigger trigger;
+ ECalComponentAlarmAction action;
+ ECalComponentAlarmTrigger trigger;
char string[256];
char *base, *str = NULL, *dur;
string [0] = '\0';
- cal_component_alarm_get_action (alarm, &action);
- cal_component_alarm_get_trigger (alarm, &trigger);
+ e_cal_component_alarm_get_action (alarm, &action);
+ e_cal_component_alarm_get_trigger (alarm, &trigger);
switch (action) {
- case CAL_ALARM_AUDIO:
+ case E_CAL_COMPONENT_ALARM_AUDIO:
base = _("Play a sound");
break;
- case CAL_ALARM_DISPLAY:
+ case E_CAL_COMPONENT_ALARM_DISPLAY:
base = _("Display a message");
break;
- case CAL_ALARM_EMAIL:
+ case E_CAL_COMPONENT_ALARM_EMAIL:
base = _("Send an email");
break;
- case CAL_ALARM_PROCEDURE:
+ case E_CAL_COMPONENT_ALARM_PROCEDURE:
base = _("Run a program");
break;
- case CAL_ALARM_NONE:
- case CAL_ALARM_UNKNOWN:
+ case E_CAL_COMPONENT_ALARM_NONE:
+ case E_CAL_COMPONENT_ALARM_UNKNOWN:
default:
base = _("Unknown action to be performed");
break;
@@ -483,7 +483,7 @@ get_alarm_string (CalComponentAlarm *alarm)
/* FIXME: This does not look like it will localize correctly. */
switch (trigger.type) {
- case CAL_ALARM_TRIGGER_RELATIVE_START:
+ case E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_START:
dur = get_alarm_duration_string (&trigger.u.rel_duration);
if (dur) {
@@ -500,7 +500,7 @@ get_alarm_string (CalComponentAlarm *alarm)
break;
- case CAL_ALARM_TRIGGER_RELATIVE_END:
+ case E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_END:
dur = get_alarm_duration_string (&trigger.u.rel_duration);
if (dur) {
@@ -517,7 +517,7 @@ get_alarm_string (CalComponentAlarm *alarm)
break;
- case CAL_ALARM_TRIGGER_ABSOLUTE: {
+ case E_CAL_COMPONENT_ALARM_TRIGGER_ABSOLUTE: {
struct icaltimetype itt;
icaltimezone *utc_zone, *current_zone;
char *location;
@@ -541,7 +541,7 @@ get_alarm_string (CalComponentAlarm *alarm)
break; }
- case CAL_ALARM_TRIGGER_NONE:
+ case E_CAL_COMPONENT_ALARM_TRIGGER_NONE:
default:
str = g_strdup_printf (_("%s for an unknown trigger type"), base);
break;
@@ -557,7 +557,7 @@ e_alarm_list_get_value (GtkTreeModel *tree_model,
GValue *value)
{
EAlarmList *alarm_list = E_ALARM_LIST (tree_model);
- CalComponentAlarm *alarm;
+ ECalComponentAlarm *alarm;
GList *l;
const gchar *str;
diff --git a/calendar/gui/e-alarm-list.h b/calendar/gui/e-alarm-list.h
index 2a03f9099b..93cc8ac58a 100644
--- a/calendar/gui/e-alarm-list.h
+++ b/calendar/gui/e-alarm-list.h
@@ -24,7 +24,7 @@
#define E_ALARM_LIST_H
#include <gtk/gtktreemodel.h>
-#include <cal-util/cal-component.h>
+#include <libecal/e-cal-component.h>
G_BEGIN_DECLS
@@ -66,11 +66,11 @@ struct _EAlarmListClass
GtkType e_alarm_list_get_type (void);
EAlarmList *e_alarm_list_new (void);
-const CalComponentAlarm *e_alarm_list_get_alarm (EAlarmList *alarm_list, GtkTreeIter *iter);
+const ECalComponentAlarm *e_alarm_list_get_alarm (EAlarmList *alarm_list, GtkTreeIter *iter);
void e_alarm_list_set_alarm (EAlarmList *alarm_list, GtkTreeIter *iter,
- const CalComponentAlarm *datetime);
+ const ECalComponentAlarm *datetime);
void e_alarm_list_append (EAlarmList *alarm_list, GtkTreeIter *iter,
- const CalComponentAlarm *datetime);
+ const ECalComponentAlarm *datetime);
void e_alarm_list_remove (EAlarmList *alarm_list, GtkTreeIter *iter);
void e_alarm_list_clear (EAlarmList *alarm_list);
diff --git a/calendar/gui/e-cal-list-view-config.c b/calendar/gui/e-cal-list-view-config.c
index 5e4bbc31d2..e7d82230df 100644
--- a/calendar/gui/e-cal-list-view-config.c
+++ b/calendar/gui/e-cal-list-view-config.c
@@ -167,7 +167,7 @@ set_timezone (ECalListView *list_view)
if (!zone)
zone = icaltimezone_get_utc_timezone ();
- e_cal_view_set_timezone (E_CAL_VIEW (list_view), zone);
+ e_calendar_view_set_timezone (E_CALENDAR_VIEW (list_view), zone);
g_free (location);
}
@@ -190,7 +190,7 @@ set_twentyfour_hour (ECalListView *list_view)
use_24_hour = calendar_config_get_24_hour_format ();
- e_cal_view_set_use_24_hour_format (E_CAL_VIEW (list_view), use_24_hour);
+ e_calendar_view_set_use_24_hour_format (E_CALENDAR_VIEW (list_view), use_24_hour);
}
static void
diff --git a/calendar/gui/e-cal-list-view.c b/calendar/gui/e-cal-list-view.c
index 359ac4d557..c504695ada 100644
--- a/calendar/gui/e-cal-list-view.c
+++ b/calendar/gui/e-cal-list-view.c
@@ -56,7 +56,7 @@
#include <e-util/e-categories-config.h>
#include <e-util/e-dialog-utils.h>
-#include "cal-util/timeutil.h"
+#include <libecal/e-cal-time-util.h>
#include "e-cal-model-calendar.h"
#include "e-cell-date-edit-text.h"
#include "dialogs/delete-comp.h"
@@ -74,10 +74,10 @@
static void e_cal_list_view_class_init (ECalListViewClass *class);
static void e_cal_list_view_init (ECalListView *cal_list_view);
static void e_cal_list_view_destroy (GtkObject *object);
-static void e_cal_list_view_update_query (ECalView *cal_view);
+static void e_cal_list_view_update_query (ECalendarView *cal_view);
-static GList *e_cal_list_view_get_selected_events (ECalView *cal_view);
-static gboolean e_cal_list_view_get_visible_time_range (ECalView *cal_view, time_t *start_time,
+static GList *e_cal_list_view_get_selected_events (ECalendarView *cal_view);
+static gboolean e_cal_list_view_get_visible_time_range (ECalendarView *cal_view, time_t *start_time,
time_t *end_time);
static gboolean e_cal_list_view_popup_menu (GtkWidget *widget);
@@ -87,22 +87,22 @@ static void e_cal_list_view_show_popup_menu (ECalListView *cal_list_
static gboolean e_cal_list_view_on_table_right_click (GtkWidget *table, gint row, gint col,
GdkEvent *event, gpointer data);
-static GtkTableClass *parent_class; /* Should be ECalViewClass? */
+static GtkTableClass *parent_class; /* Should be ECalendarViewClass? */
E_MAKE_TYPE (e_cal_list_view, "ECalListView", ECalListView, e_cal_list_view_class_init,
- e_cal_list_view_init, e_cal_view_get_type ());
+ e_cal_list_view_init, e_calendar_view_get_type ());
static void
e_cal_list_view_class_init (ECalListViewClass *class)
{
GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
- ECalViewClass *view_class;
+ ECalendarViewClass *view_class;
parent_class = g_type_class_peek_parent (class);
object_class = (GtkObjectClass *) class;
widget_class = (GtkWidgetClass *) class;
- view_class = (ECalViewClass *) class;
+ view_class = (ECalendarViewClass *) class;
/* Method override */
object_class->destroy = e_cal_list_view_destroy;
@@ -161,7 +161,7 @@ get_current_time_cb (ECellDateEdit *ecde, gpointer data)
struct tm tmp_tm = { 0 };
struct icaltimetype tt;
- zone = e_cal_view_get_timezone (E_CAL_VIEW (cal_list_view));
+ zone = e_calendar_view_get_timezone (E_CALENDAR_VIEW (cal_list_view));
tt = icaltime_from_timet_with_zone (time (NULL), FALSE, zone);
/* Now copy it to the struct tm and return it. */
@@ -210,7 +210,7 @@ setup_e_table (ECalListView *cal_list_view)
GnomeCanvas *canvas;
GtkStyle *style;
- model = E_CAL_MODEL_CALENDAR (e_cal_view_get_model (E_CAL_VIEW (cal_list_view)));
+ model = E_CAL_MODEL_CALENDAR (e_calendar_view_get_model (E_CALENDAR_VIEW (cal_list_view)));
if (cal_list_view->table_scrolled) {
save_table_state (cal_list_view);
@@ -392,15 +392,15 @@ setup_e_table_cb (gpointer data)
}
static void
-e_cal_list_view_update_query (ECalView *cal_list_view)
+e_cal_list_view_update_query (ECalendarView *cal_list_view)
{
- e_cal_view_set_status_message (E_CAL_VIEW (cal_list_view), _("Searching"));
+ e_calendar_view_set_status_message (E_CALENDAR_VIEW (cal_list_view), _("Searching"));
if (!E_CAL_LIST_VIEW (cal_list_view)->set_table_id)
E_CAL_LIST_VIEW (cal_list_view)->set_table_id =
g_idle_add (setup_e_table_cb, cal_list_view);
- e_cal_view_set_status_message (E_CAL_VIEW (cal_list_view), NULL);
+ e_calendar_view_set_status_message (E_CALENDAR_VIEW (cal_list_view), NULL);
}
static void
@@ -408,7 +408,7 @@ e_cal_list_view_show_popup_menu (ECalListView *cal_list_view, gint row, GdkEvent
{
GtkMenu *popup;
- popup = e_cal_view_create_popup_menu (E_CAL_VIEW (cal_list_view));
+ popup = e_calendar_view_create_popup_menu (E_CALENDAR_VIEW (cal_list_view));
e_popup_menu (popup, gdk_event);
}
@@ -432,7 +432,7 @@ e_cal_list_view_on_table_right_click (GtkWidget *table, gint row, gint col, GdkE
}
static GList *
-e_cal_list_view_get_selected_events (ECalView *cal_view)
+e_cal_list_view_get_selected_events (ECalendarView *cal_view)
{
GList *event_list = NULL;
gint cursor_row;
@@ -445,11 +445,11 @@ e_cal_list_view_get_selected_events (ECalView *cal_view)
cursor_row = e_table_get_cursor_row (e_table_scrolled_get_table (E_CAL_LIST_VIEW (cal_view)->table_scrolled));
if (cursor_row >= 0) {
- ECalViewEvent *event;
+ ECalendarViewEvent *event;
- event = E_CAL_LIST_VIEW (cal_view)->cursor_event = g_new0 (ECalViewEvent, 1);
+ event = E_CAL_LIST_VIEW (cal_view)->cursor_event = g_new0 (ECalendarViewEvent, 1);
event->comp_data =
- e_cal_model_get_component_at (e_cal_view_get_model (cal_view),
+ e_cal_model_get_component_at (e_calendar_view_get_model (cal_view),
cursor_row);
event_list = g_list_prepend (event_list, event);
}
@@ -476,19 +476,19 @@ adjust_range (icaltimetype icaltime, time_t *earliest, time_t *latest, gboolean
* ideal, since it's used in a couple of places. We could probably be smarter about it,
* and use do it less frequently... */
static gboolean
-e_cal_list_view_get_visible_time_range (ECalView *cal_view, time_t *start_time, time_t *end_time)
+e_cal_list_view_get_visible_time_range (ECalendarView *cal_view, time_t *start_time, time_t *end_time)
{
time_t earliest = G_MAXINT, latest = 0;
gboolean set = FALSE;
gint n_rows, i;
- n_rows = e_table_model_row_count (E_TABLE_MODEL (e_cal_view_get_model (cal_view)));
+ n_rows = e_table_model_row_count (E_TABLE_MODEL (e_calendar_view_get_model (cal_view)));
for (i = 0; i < n_rows; i++) {
ECalModelComponent *comp;
icalcomponent *icalcomp;
- comp = e_cal_model_get_component_at (e_cal_view_get_model (cal_view), i);
+ comp = e_cal_model_get_component_at (e_calendar_view_get_model (cal_view), i);
if (!comp)
continue;
@@ -515,11 +515,11 @@ e_cal_list_view_get_range_shown (ECalListView *cal_list_view, GDate *start_date,
time_t first, last;
GDate end_date;
- if (!e_cal_list_view_get_visible_time_range (E_CAL_VIEW (cal_list_view), &first, &last))
+ if (!e_cal_list_view_get_visible_time_range (E_CALENDAR_VIEW (cal_list_view), &first, &last))
return FALSE;
- time_to_gdate_with_zone (start_date, first, e_cal_view_get_timezone (E_CAL_VIEW (cal_list_view)));
- time_to_gdate_with_zone (&end_date, last, e_cal_view_get_timezone (E_CAL_VIEW (cal_list_view)));
+ time_to_gdate_with_zone (start_date, first, e_calendar_view_get_timezone (E_CALENDAR_VIEW (cal_list_view)));
+ time_to_gdate_with_zone (&end_date, last, e_calendar_view_get_timezone (E_CALENDAR_VIEW (cal_list_view)));
*days_shown = g_date_days_between (start_date, &end_date);
return TRUE;
diff --git a/calendar/gui/e-cal-list-view.h b/calendar/gui/e-cal-list-view.h
index edf2e843e2..37c0e9675b 100644
--- a/calendar/gui/e-cal-list-view.h
+++ b/calendar/gui/e-cal-list-view.h
@@ -50,7 +50,7 @@ typedef struct _ECalListViewClass ECalListViewClass;
struct _ECalListView
{
- ECalView cal_view;
+ ECalendarView cal_view;
/* The main display table */
ETableScrolled *table_scrolled;
@@ -59,7 +59,7 @@ struct _ECalListView
gchar *table_state_path;
/* S-expression for query and the query object */
- CalQuery *query;
+ ECalView *query;
/* The default category for new events */
gchar *default_category;
@@ -67,8 +67,8 @@ struct _ECalListView
/* Date editing cell */
ECellDateEdit *dates_cell;
- /* The last ECalViewEvent we returned from e_cal_list_view_get_selected_events(), to be freed */
- ECalViewEvent *cursor_event;
+ /* The last ECalendarViewEvent we returned from e_cal_list_view_get_selected_events(), to be freed */
+ ECalendarViewEvent *cursor_event;
/* Idle handler ID for setting a new ETableModel */
gint set_table_id;
@@ -76,7 +76,7 @@ struct _ECalListView
struct _ECalListViewClass
{
- ECalViewClass parent_class;
+ ECalendarViewClass parent_class;
};
diff --git a/calendar/gui/e-cal-model-calendar.c b/calendar/gui/e-cal-model-calendar.c
index fc44d29862..76462064a2 100644
--- a/calendar/gui/e-cal-model-calendar.c
+++ b/calendar/gui/e-cal-model-calendar.c
@@ -127,7 +127,7 @@ get_dtend (ECalModelComponent *comp_data)
comp_data->dtend->tt = tt_end;
/* FIXME: handle errors */
- cal_client_get_timezone (comp_data->client,
+ e_cal_get_timezone (comp_data->client,
icaltime_get_tzid (tt_end),
&zone, NULL);
comp_data->dtend->zone = zone;
@@ -309,7 +309,7 @@ ecmc_set_value_at (ETableModel *etm, int col, int row, const void *value)
}
/* FIXME ask about mod type */
- if (!cal_client_modify_object (comp_data->client, comp_data->icalcomp, CALOBJ_MOD_ALL, NULL)) {
+ if (!e_cal_modify_object (comp_data->client, comp_data->icalcomp, CALOBJ_MOD_ALL, NULL)) {
g_warning (G_STRLOC ": Could not modify the object!");
/* FIXME Show error dialog */
diff --git a/calendar/gui/e-cal-model-tasks.c b/calendar/gui/e-cal-model-tasks.c
index 5442c92485..c6da14c7d1 100644
--- a/calendar/gui/e-cal-model-tasks.c
+++ b/calendar/gui/e-cal-model-tasks.c
@@ -221,7 +221,7 @@ get_completed (ECalModelComponent *comp_data)
comp_data->completed->tt = tt_completed;
/* FIXME: handle errors */
- cal_client_get_timezone (comp_data->client,
+ e_cal_get_timezone (comp_data->client,
icaltime_get_tzid (tt_completed),
&zone, NULL);
comp_data->completed->zone = zone;
@@ -251,7 +251,7 @@ get_due (ECalModelComponent *comp_data)
comp_data->due->tt = tt_due;
/* FIXME: handle errors */
- cal_client_get_timezone (comp_data->client,
+ e_cal_get_timezone (comp_data->client,
icaltime_get_tzid (tt_due),
&zone, NULL);
comp_data->due->zone = zone;
@@ -300,7 +300,7 @@ get_priority (ECalModelComponent *comp_data)
prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_PRIORITY_PROPERTY);
if (prop)
- return cal_util_priority_to_string (icalproperty_get_priority (prop));
+ return e_cal_util_priority_to_string (icalproperty_get_priority (prop));
return "";
}
@@ -374,7 +374,7 @@ get_due_status (ECalModelTasks *model, ECalModelComponent *comp_data)
return E_CAL_MODEL_TASKS_DUE_NEVER;
else {
struct icaltimetype now_tt, due_tt;
- CalClientGetStatus status;
+ ECalGetStatus status;
icaltimezone *zone;
/* Second, is it already completed? */
@@ -397,10 +397,10 @@ get_due_status (ECalModelTasks *model, ECalModelComponent *comp_data)
return E_CAL_MODEL_TASKS_DUE_FUTURE;
} else {
/* Get the current time in the same timezone as the DUE date.*/
- status = cal_client_get_timezone (comp_data->client,
+ status = e_cal_get_timezone (comp_data->client,
icaltime_get_tzid (due_tt),
&zone, NULL);
- if (status != CAL_CLIENT_GET_SUCCESS)
+ if (status != E_CAL_GET_SUCCESS)
return E_CAL_MODEL_TASKS_DUE_FUTURE;
now_tt = icaltime_current_time_with_zone (zone);
@@ -617,12 +617,12 @@ set_status (ECalModelComponent *comp_data, const char *value)
/* if (status == ICAL_STATUS_NEEDSACTION) { */
/* percent = 0; */
-/* cal_component_set_percent (comp, &percent); */
-/* cal_component_set_completed (comp, NULL); */
+/* e_cal_component_set_percent (comp, &percent); */
+/* e_cal_component_set_completed (comp, NULL); */
/* } else if (status == ICAL_STATUS_INPROCESS) { */
/* ensure_task_not_complete (comp); */
/* percent = 50; */
-/* cal_component_set_percent (comp, &percent); */
+/* e_cal_component_set_percent (comp, &percent); */
/* } else if (status == ICAL_STATUS_COMPLETED) { */
/* ensure_task_complete (comp, -1); */
/* } */
@@ -673,7 +673,7 @@ set_priority (ECalModelComponent *comp_data, const char *value)
prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_PRIORITY_PROPERTY);
- priority = cal_util_priority_from_string (value);
+ priority = e_cal_util_priority_from_string (value);
if (priority == -1) {
g_warning ("Invalid priority");
priority = 0;
@@ -757,7 +757,7 @@ ecmt_set_value_at (ETableModel *etm, int col, int row, const void *value)
}
/* FIXME ask about mod type */
- if (!cal_client_modify_object (comp_data->client, comp_data->icalcomp, CALOBJ_MOD_ALL, NULL)) {
+ if (!e_cal_modify_object (comp_data->client, comp_data->icalcomp, CALOBJ_MOD_ALL, NULL)) {
g_warning (G_STRLOC ": Could not modify the object!");
/* FIXME Show error dialog */
diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c
index f23b272bdd..9e5dc34b2c 100644
--- a/calendar/gui/e-cal-model.c
+++ b/calendar/gui/e-cal-model.c
@@ -25,7 +25,7 @@
#include <gal/util/e-util.h>
#include <e-util/e-config-listener.h>
#include <e-util/e-time-utils.h>
-#include <cal-util/timeutil.h>
+#include <libecal/e-cal-time-util.h>
#include "calendar-config.h"
#include "comp-util.h"
#include "e-cal-model.h"
@@ -33,8 +33,8 @@
#include "misc.h"
typedef struct {
- CalClient *client;
- CalQuery *query;
+ ECal *client;
+ ECalView *query;
} ECalModelClient;
struct _ECalModelPrivate {
@@ -42,7 +42,7 @@ struct _ECalModelPrivate {
GList *clients;
/* The default client in the list */
- CalClient *default_client;
+ ECal *default_client;
/* Array for storing the objects. Each element is of type ECalModelComponent */
GPtrArray *objects;
@@ -353,7 +353,7 @@ get_dtstart (ECalModel *model, ECalModelComponent *comp_data)
comp_data->dtstart->tt = tt_start;
/* FIXME: handle errors */
- cal_client_get_timezone (comp_data->client,
+ e_cal_get_timezone (comp_data->client,
icaltime_get_tzid (tt_start),
&zone, NULL);
comp_data->dtstart->zone = zone;
@@ -415,23 +415,23 @@ ecm_value_at (ETableModel *etm, int col, int row)
ICAL_VALARM_COMPONENT) != NULL));
case E_CAL_MODEL_FIELD_ICON :
{
- CalComponent *comp;
+ ECalComponent *comp;
icalcomponent *icalcomp;
gint retval = 0;
- comp = cal_component_new ();
+ comp = e_cal_component_new ();
icalcomp = icalcomponent_new_clone (comp_data->icalcomp);
- if (cal_component_set_icalcomponent (comp, icalcomp)) {
- if (cal_component_has_recurrences (comp))
+ if (e_cal_component_set_icalcomponent (comp, icalcomp)) {
+ if (e_cal_component_has_recurrences (comp))
retval = 1;
else if (itip_organizer_is_user (comp, comp_data->client))
retval = 3;
else {
GSList *attendees = NULL, *sl;
- cal_component_get_attendee_list (comp, &attendees);
+ e_cal_component_get_attendee_list (comp, &attendees);
for (sl = attendees; sl != NULL; sl = sl->next) {
- CalComponentAttendee *ca = sl->data;
+ ECalComponentAttendee *ca = sl->data;
const char *text;
text = itip_strip_mailto (ca->value);
@@ -444,7 +444,7 @@ ecm_value_at (ETableModel *etm, int col, int row)
}
}
- cal_component_free_attendee_list (attendees);
+ e_cal_component_free_attendee_list (attendees);
}
} else
icalcomponent_free (icalcomp);
@@ -613,7 +613,7 @@ ecm_set_value_at (ETableModel *etm, int col, int row, const void *value)
}
/* FIXME ask about mod type */
- if (!cal_client_modify_object (comp_data->client, comp_data->icalcomp, CALOBJ_MOD_ALL, NULL)) {
+ if (!e_cal_modify_object (comp_data->client, comp_data->icalcomp, CALOBJ_MOD_ALL, NULL)) {
g_warning (G_STRLOC ": Could not modify the object!");
/* FIXME Show error dialog */
@@ -661,7 +661,7 @@ ecm_append_row (ETableModel *etm, ETableModel *source, int row)
comp_data.client = e_cal_model_get_default_client (model);
/* guard against saving before the calendar is open */
- if (!(comp_data.client && cal_client_get_load_state (comp_data.client) == CAL_CLIENT_LOAD_LOADED))
+ if (!(comp_data.client && e_cal_get_load_state (comp_data.client) == E_CAL_LOAD_LOADED))
return;
comp_data.icalcomp = e_cal_model_create_component_with_defaults (model);
@@ -680,7 +680,7 @@ ecm_append_row (ETableModel *etm, ETableModel *source, int row)
}
- if (!cal_client_create_object (comp_data.client, comp_data.icalcomp, NULL, NULL)) {
+ if (!e_cal_create_object (comp_data.client, comp_data.icalcomp, NULL, NULL)) {
g_warning (G_STRLOC ": Could not create the object!");
/* FIXME: show error dialog */
@@ -886,7 +886,7 @@ ecm_get_color_for_component (ECalModel *model, ECalModelComponent *comp_data)
for (l = assigned_colors[i].uris; l != NULL; l = l->next) {
if (!strcmp ((const char *) l->data,
- cal_client_get_uri (comp_data->client)))
+ e_cal_get_uri (comp_data->client)))
{
return assigned_colors[i].color;
}
@@ -895,7 +895,7 @@ ecm_get_color_for_component (ECalModel *model, ECalModelComponent *comp_data)
/* return the first unused color */
assigned_colors[first_empty].uris = g_list_append (assigned_colors[first_empty].uris,
- g_strdup (cal_client_get_uri (comp_data->client)));
+ g_strdup (e_cal_get_uri (comp_data->client)));
return assigned_colors[first_empty].color;
}
@@ -1003,7 +1003,7 @@ e_cal_model_set_use_24_hour_format (ECalModel *model, gboolean use24)
/**
* e_cal_model_get_default_client
*/
-CalClient *
+ECal *
e_cal_model_get_default_client (ECalModel *model)
{
ECalModelPrivate *priv;
@@ -1014,7 +1014,7 @@ e_cal_model_get_default_client (ECalModel *model)
priv = model->priv;
- /* we always return a valid CalClient, since we rely on it in many places */
+ /* we always return a valid ECal, since we rely on it in many places */
if (priv->default_client)
return priv->default_client;
@@ -1027,7 +1027,7 @@ e_cal_model_get_default_client (ECalModel *model)
}
void
-e_cal_model_set_default_client (ECalModel *model, CalClient *client)
+e_cal_model_set_default_client (ECalModel *model, ECal *client)
{
ECalModelPrivate *priv;
GList *l;
@@ -1036,7 +1036,7 @@ e_cal_model_set_default_client (ECalModel *model, CalClient *client)
g_return_if_fail (model != NULL);
g_return_if_fail (E_IS_CAL_MODEL (model));
g_return_if_fail (client != NULL);
- g_return_if_fail (IS_CAL_CLIENT (client));
+ g_return_if_fail (E_IS_CAL (client));
priv = model->priv;
@@ -1080,7 +1080,7 @@ e_cal_model_get_client_list (ECalModel *model)
* @model: A calendar model.
* @uri: Uri for the client to get.
*/
-CalClient *
+ECal *
e_cal_model_get_client_for_uri (ECalModel *model, const char *uri)
{
GList *l;
@@ -1091,7 +1091,7 @@ e_cal_model_get_client_for_uri (ECalModel *model, const char *uri)
for (l = model->priv->clients; l != NULL; l = l->next) {
ECalModelClient *client_data = (ECalModelClient *) l->data;
- if (!strcmp (uri, cal_client_get_uri (client_data->client)))
+ if (!strcmp (uri, e_cal_get_uri (client_data->client)))
return client_data->client;
}
@@ -1099,7 +1099,7 @@ e_cal_model_get_client_for_uri (ECalModel *model, const char *uri)
}
static ECalModelComponent *
-search_by_uid_and_client (ECalModelPrivate *priv, CalClient *client, const char *uid)
+search_by_uid_and_client (ECalModelPrivate *priv, ECal *client, const char *uid)
{
gint i;
@@ -1134,7 +1134,7 @@ get_position_in_array (GPtrArray *objects, gpointer item)
}
static void
-query_objects_added_cb (CalQuery *query, GList *objects, gpointer user_data)
+e_cal_view_objects_added_cb (ECalView *query, GList *objects, gpointer user_data)
{
ECalModel *model = (ECalModel *) user_data;
ECalModelPrivate *priv;
@@ -1151,7 +1151,7 @@ query_objects_added_cb (CalQuery *query, GList *objects, gpointer user_data)
ECalModelComponent *comp_data;
comp_data = g_new0 (ECalModelComponent, 1);
- comp_data->client = cal_query_get_client (query);
+ comp_data->client = e_cal_view_get_client (query);
comp_data->icalcomp = icalcomponent_new_clone (l->data);
g_ptr_array_add (priv->objects, comp_data);
@@ -1161,7 +1161,7 @@ query_objects_added_cb (CalQuery *query, GList *objects, gpointer user_data)
}
static void
-query_objects_modified_cb (CalQuery *query, GList *objects, gpointer user_data)
+e_cal_view_objects_modified_cb (ECalView *query, GList *objects, gpointer user_data)
{
ECalModelPrivate *priv;
ECalModel *model = (ECalModel *) user_data;
@@ -1174,7 +1174,7 @@ query_objects_modified_cb (CalQuery *query, GList *objects, gpointer user_data)
e_table_model_pre_change (E_TABLE_MODEL (model));
- comp_data = search_by_uid_and_client (priv, cal_query_get_client (query), icalcomponent_get_uid (l->data));
+ comp_data = search_by_uid_and_client (priv, e_cal_view_get_client (query), icalcomponent_get_uid (l->data));
g_assert (comp_data);
if (comp_data->icalcomp)
@@ -1203,7 +1203,7 @@ query_objects_modified_cb (CalQuery *query, GList *objects, gpointer user_data)
}
static void
-query_objects_removed_cb (CalQuery *query, GList *uids, gpointer user_data)
+e_cal_view_objects_removed_cb (ECalView *query, GList *uids, gpointer user_data)
{
ECalModelPrivate *priv;
ECalModel *model = (ECalModel *) user_data;
@@ -1217,7 +1217,7 @@ query_objects_removed_cb (CalQuery *query, GList *uids, gpointer user_data)
e_table_model_pre_change (E_TABLE_MODEL (model));
- comp_data = search_by_uid_and_client (priv, cal_query_get_client (query), l->data);
+ comp_data = search_by_uid_and_client (priv, e_cal_view_get_client (query), l->data);
g_assert (comp_data);
pos = get_position_in_array (priv->objects, comp_data);
@@ -1230,7 +1230,7 @@ query_objects_removed_cb (CalQuery *query, GList *uids, gpointer user_data)
}
static void
-query_progress_cb (CalQuery *query, const char *message, int percent, gpointer user_data)
+e_cal_view_progress_cb (ECalView *query, const char *message, int percent, gpointer user_data)
{
ECalModel *model = (ECalModel *) user_data;
@@ -1240,7 +1240,7 @@ query_progress_cb (CalQuery *query, const char *message, int percent, gpointer u
}
static void
-query_done_cb (CalQuery *query, ECalendarStatus status, gpointer user_data)
+e_cal_view_done_cb (ECalView *query, ECalendarStatus status, gpointer user_data)
{
ECalModel *model = (ECalModel *) user_data;
@@ -1254,7 +1254,7 @@ query_done_cb (CalQuery *query, ECalendarStatus status, gpointer user_data)
* whether we want completed tasks.
*/
static char *
-adjust_query_sexp (ECalModel *model, const char *sexp)
+adjust_e_cal_view_sexp (ECalModel *model, const char *sexp)
{
ECalModelPrivate *priv;
char *type_sexp, *new_sexp;
@@ -1281,7 +1281,7 @@ adjust_query_sexp (ECalModel *model, const char *sexp)
}
static void
-update_query_for_client (ECalModel *model, ECalModelClient *client_data)
+update_e_cal_view_for_client (ECalModel *model, ECalModelClient *client_data)
{
ECalModelPrivate *priv;
gchar *real_sexp;
@@ -1298,9 +1298,9 @@ update_query_for_client (ECalModel *model, ECalModelClient *client_data)
/* prepare the query */
g_assert (priv->sexp != NULL);
- real_sexp = adjust_query_sexp (model, priv->sexp);
+ real_sexp = adjust_e_cal_view_sexp (model, priv->sexp);
- if (!cal_client_get_query (client_data->client, real_sexp, &client_data->query, NULL)) {
+ if (!e_cal_get_query (client_data->client, real_sexp, &client_data->query, NULL)) {
g_warning (G_STRLOC ": Unable to get query");
g_free (real_sexp);
@@ -1308,17 +1308,17 @@ update_query_for_client (ECalModel *model, ECalModelClient *client_data)
}
g_free (real_sexp);
- g_signal_connect (client_data->query, "objects_added", G_CALLBACK (query_objects_added_cb), model);
- g_signal_connect (client_data->query, "objects_modified", G_CALLBACK (query_objects_modified_cb), model);
- g_signal_connect (client_data->query, "objects_removed", G_CALLBACK (query_objects_removed_cb), model);
- g_signal_connect (client_data->query, "query_progress", G_CALLBACK (query_progress_cb), model);
- g_signal_connect (client_data->query, "query_done", G_CALLBACK (query_done_cb), model);
+ g_signal_connect (client_data->query, "objects_added", G_CALLBACK (e_cal_view_objects_added_cb), model);
+ g_signal_connect (client_data->query, "objects_modified", G_CALLBACK (e_cal_view_objects_modified_cb), model);
+ g_signal_connect (client_data->query, "objects_removed", G_CALLBACK (e_cal_view_objects_removed_cb), model);
+ g_signal_connect (client_data->query, "view_progress", G_CALLBACK (e_cal_view_progress_cb), model);
+ g_signal_connect (client_data->query, "view_done", G_CALLBACK (e_cal_view_done_cb), model);
- cal_query_start (client_data->query);
+ e_cal_view_start (client_data->query);
}
static void
-backend_died_cb (CalClient *client, gpointer user_data)
+backend_died_cb (ECal *client, gpointer user_data)
{
ECalModel *model;
@@ -1328,7 +1328,7 @@ backend_died_cb (CalClient *client, gpointer user_data)
}
static void
-add_new_client (ECalModel *model, CalClient *client)
+add_new_client (ECalModel *model, ECal *client)
{
ECalModelPrivate *priv;
ECalModelClient *client_data;
@@ -1345,15 +1345,15 @@ add_new_client (ECalModel *model, CalClient *client)
g_signal_connect (G_OBJECT (client_data->client), "backend_died",
G_CALLBACK (backend_died_cb), model);
- update_query_for_client (model, client_data);
+ update_e_cal_view_for_client (model, client_data);
}
static void
-cal_opened_cb (CalClient *client, CalClientOpenStatus status, gpointer user_data)
+cal_opened_cb (ECal *client, ECalOpenStatus status, gpointer user_data)
{
ECalModel *model = (ECalModel *) user_data;
- if (status != CAL_CLIENT_OPEN_SUCCESS)
+ if (status != E_CAL_OPEN_SUCCESS)
return;
add_new_client (model, client);
@@ -1363,16 +1363,16 @@ cal_opened_cb (CalClient *client, CalClientOpenStatus status, gpointer user_data
* e_cal_model_add_client
*/
void
-e_cal_model_add_client (ECalModel *model, CalClient *client)
+e_cal_model_add_client (ECalModel *model, ECal *client)
{
ECalModelPrivate *priv;
g_return_if_fail (E_IS_CAL_MODEL (model));
- g_return_if_fail (IS_CAL_CLIENT (client));
+ g_return_if_fail (E_IS_CAL (client));
priv = model->priv;
- if (cal_client_get_load_state (client) == CAL_CLIENT_LOAD_LOADED)
+ if (e_cal_get_load_state (client) == E_CAL_LOAD_LOADED)
add_new_client (model, client);
else
g_signal_connect (client, "cal_opened", G_CALLBACK (cal_opened_cb), model);
@@ -1413,13 +1413,13 @@ remove_client (ECalModel *model, ECalModelClient *client_data)
* e_cal_model_remove_client
*/
void
-e_cal_model_remove_client (ECalModel *model, CalClient *client)
+e_cal_model_remove_client (ECalModel *model, ECal *client)
{
GList *l;
ECalModelPrivate *priv;
g_return_if_fail (E_IS_CAL_MODEL (model));
- g_return_if_fail (IS_CAL_CLIENT (client));
+ g_return_if_fail (E_IS_CAL (client));
priv = model->priv;
for (l = priv->clients; l != NULL; l = l->next) {
@@ -1478,7 +1478,7 @@ e_cal_model_set_query (ECalModel *model, const char *sexp)
ECalModelClient *client_data;
client_data = (ECalModelClient *) l->data;
- update_query_for_client (model, client_data);
+ update_e_cal_view_for_client (model, client_data);
}
}
@@ -1489,9 +1489,9 @@ icalcomponent *
e_cal_model_create_component_with_defaults (ECalModel *model)
{
ECalModelPrivate *priv;
- CalComponent *comp;
+ ECalComponent *comp;
icalcomponent *icalcomp;
- CalClient *client;
+ ECal *client;
g_return_val_if_fail (E_IS_CAL_MODEL (model), NULL);
@@ -1517,14 +1517,14 @@ e_cal_model_create_component_with_defaults (ECalModel *model)
if (!comp)
return icalcomponent_new (priv->kind);
- icalcomp = icalcomponent_new_clone (cal_component_get_icalcomponent (comp));
+ icalcomp = icalcomponent_new_clone (e_cal_component_get_icalcomponent (comp));
g_object_unref (comp);
/* make sure the component has an UID */
if (!icalcomponent_get_uid (icalcomp)) {
char *uid;
- uid = cal_component_gen_uid ();
+ uid = e_cal_component_gen_uid ();
icalcomponent_set_uid (icalcomp, uid);
g_free (uid);
diff --git a/calendar/gui/e-cal-model.h b/calendar/gui/e-cal-model.h
index 6adbe0473f..9f193b4f07 100644
--- a/calendar/gui/e-cal-model.h
+++ b/calendar/gui/e-cal-model.h
@@ -23,7 +23,7 @@
#define E_CAL_MODEL_H
#include <gal/e-table/e-table-model.h>
-#include <cal-client/cal-client.h>
+#include <libecal/e-cal.h>
#include "e-cell-date-edit-text.h"
G_BEGIN_DECLS
@@ -53,7 +53,7 @@ typedef enum {
} ECalModelField;
typedef struct {
- CalClient *client;
+ ECal *client;
icalcomponent *icalcomp;
/* private data */
@@ -88,12 +88,12 @@ void e_cal_model_set_default_category (ECalModel *model, const gc
gboolean e_cal_model_get_use_24_hour_format (ECalModel *model);
void e_cal_model_set_use_24_hour_format (ECalModel *model, gboolean use24);
-CalClient *e_cal_model_get_default_client (ECalModel *model);
-void e_cal_model_set_default_client (ECalModel *model, CalClient *client);
+ECal *e_cal_model_get_default_client (ECalModel *model);
+void e_cal_model_set_default_client (ECalModel *model, ECal *client);
GList *e_cal_model_get_client_list (ECalModel *model);
-CalClient *e_cal_model_get_client_for_uri (ECalModel *model, const char *uri);
-void e_cal_model_add_client (ECalModel *model, CalClient *client);
-void e_cal_model_remove_client (ECalModel *model, CalClient *client);
+ECal *e_cal_model_get_client_for_uri (ECalModel *model, const char *uri);
+void e_cal_model_add_client (ECalModel *model, ECal *client);
+void e_cal_model_remove_client (ECalModel *model, ECal *client);
void e_cal_model_remove_all_clients (ECalModel *model);
void e_cal_model_set_query (ECalModel *model, const gchar *sexp);
diff --git a/calendar/gui/e-cal-view.c b/calendar/gui/e-cal-view.c
index 2e392560cd..332019cf2c 100644
--- a/calendar/gui/e-cal-view.c
+++ b/calendar/gui/e-cal-view.c
@@ -29,8 +29,8 @@
#include <libgnome/gnome-i18n.h>
#include <gal/util/e-util.h>
#include "e-util/e-dialog-utils.h"
-#include "cal-util/cal-util-marshal.h"
-#include "cal-util/timeutil.h"
+#include "e-calendar-marshal.h"
+#include <libecal/e-cal-time-util.h>
#include "evolution-activity-client.h"
#include "calendar-commands.h"
#include "calendar-config.h"
@@ -53,7 +53,7 @@
#define EVOLUTION_CALENDAR_PROGRESS_IMAGE "evolution-calendar-mini.png"
static GdkPixbuf *progress_icon[2] = { NULL, NULL };
-struct _ECalViewPrivate {
+struct _ECalendarViewPrivate {
/* The GnomeCalendar we are associated to */
GnomeCalendar *calendar;
@@ -74,11 +74,11 @@ struct _ECalViewPrivate {
char *default_category;
};
-static void e_cal_view_class_init (ECalViewClass *klass);
-static void e_cal_view_init (ECalView *cal_view, ECalViewClass *klass);
-static void e_cal_view_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
-static void e_cal_view_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
-static void e_cal_view_destroy (GtkObject *object);
+static void e_calendar_view_class_init (ECalendarViewClass *klass);
+static void e_calendar_view_init (ECalendarView *cal_view, ECalendarViewClass *klass);
+static void e_calendar_view_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void e_calendar_view_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static void e_calendar_view_destroy (GtkObject *object);
static GObjectClass *parent_class = NULL;
static GdkAtom clipboard_atom = GDK_NONE;
@@ -101,20 +101,20 @@ enum {
LAST_SIGNAL
};
-static guint e_cal_view_signals[LAST_SIGNAL] = { 0 };
+static guint e_calendar_view_signals[LAST_SIGNAL] = { 0 };
static void
-e_cal_view_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+e_calendar_view_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
{
- ECalView *cal_view;
- ECalViewPrivate *priv;
+ ECalendarView *cal_view;
+ ECalendarViewPrivate *priv;
- cal_view = E_CAL_VIEW (object);
+ cal_view = E_CALENDAR_VIEW (object);
priv = cal_view->priv;
switch (property_id) {
case PROP_MODEL:
- e_cal_view_set_model (cal_view, E_CAL_MODEL (g_value_get_object (value)));
+ e_calendar_view_set_model (cal_view, E_CAL_MODEL (g_value_get_object (value)));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
@@ -123,17 +123,17 @@ e_cal_view_set_property (GObject *object, guint property_id, const GValue *value
}
static void
-e_cal_view_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+e_calendar_view_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
{
- ECalView *cal_view;
- ECalViewPrivate *priv;
+ ECalendarView *cal_view;
+ ECalendarViewPrivate *priv;
- cal_view = E_CAL_VIEW (object);
+ cal_view = E_CALENDAR_VIEW (object);
priv = cal_view->priv;
switch (property_id) {
case PROP_MODEL:
- g_value_set_object (value, e_cal_view_get_model (cal_view));
+ g_value_set_object (value, e_calendar_view_get_model (cal_view));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
@@ -142,7 +142,7 @@ e_cal_view_get_property (GObject *object, guint property_id, GValue *value, GPar
}
static void
-e_cal_view_class_init (ECalViewClass *klass)
+e_calendar_view_class_init (ECalendarViewClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GtkObjectClass *object_class = GTK_OBJECT_CLASS (klass);
@@ -150,9 +150,9 @@ e_cal_view_class_init (ECalViewClass *klass)
parent_class = g_type_class_peek_parent (klass);
/* Method override */
- gobject_class->set_property = e_cal_view_set_property;
- gobject_class->get_property = e_cal_view_get_property;
- object_class->destroy = e_cal_view_destroy;
+ gobject_class->set_property = e_calendar_view_set_property;
+ gobject_class->get_property = e_calendar_view_get_property;
+ object_class->destroy = e_calendar_view_destroy;
klass->selection_changed = NULL;
klass->selected_time_changed = NULL;
@@ -171,46 +171,46 @@ e_cal_view_class_init (ECalViewClass *klass)
| G_PARAM_CONSTRUCT));
/* Create class' signals */
- e_cal_view_signals[SELECTION_CHANGED] =
+ e_calendar_view_signals[SELECTION_CHANGED] =
g_signal_new ("selection_changed",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ECalViewClass, selection_changed),
+ G_STRUCT_OFFSET (ECalendarViewClass, selection_changed),
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
- e_cal_view_signals[SELECTED_TIME_CHANGED] =
+ e_calendar_view_signals[SELECTED_TIME_CHANGED] =
g_signal_new ("selected_time_changed",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ECalViewClass, selected_time_changed),
+ G_STRUCT_OFFSET (ECalendarViewClass, selected_time_changed),
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
- e_cal_view_signals[TIMEZONE_CHANGED] =
+ e_calendar_view_signals[TIMEZONE_CHANGED] =
g_signal_new ("timezone_changed",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ECalViewClass, timezone_changed),
+ G_STRUCT_OFFSET (ECalendarViewClass, timezone_changed),
NULL, NULL,
- cal_util_marshal_VOID__POINTER_POINTER,
+ e_calendar_marshal_VOID__POINTER_POINTER,
G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_POINTER);
- e_cal_view_signals[EVENT_CHANGED] =
+ e_calendar_view_signals[EVENT_CHANGED] =
g_signal_new ("event_changed",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
- G_STRUCT_OFFSET (ECalViewClass, event_changed),
+ G_STRUCT_OFFSET (ECalendarViewClass, event_changed),
NULL, NULL,
g_cclosure_marshal_VOID__POINTER,
G_TYPE_NONE, 1,
G_TYPE_POINTER);
- e_cal_view_signals[EVENT_ADDED] =
+ e_calendar_view_signals[EVENT_ADDED] =
g_signal_new ("event_added",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
- G_STRUCT_OFFSET (ECalViewClass, event_added),
+ G_STRUCT_OFFSET (ECalendarViewClass, event_added),
NULL, NULL,
g_cclosure_marshal_VOID__POINTER,
G_TYPE_NONE, 1,
@@ -227,33 +227,33 @@ e_cal_view_class_init (ECalViewClass *klass)
static void
model_changed_cb (ETableModel *etm, gpointer user_data)
{
- ECalView *cal_view = E_CAL_VIEW (user_data);
+ ECalendarView *cal_view = E_CALENDAR_VIEW (user_data);
- e_cal_view_update_query (cal_view);
+ e_calendar_view_update_query (cal_view);
}
static void
model_row_changed_cb (ETableModel *etm, int row, gpointer user_data)
{
- ECalView *cal_view = E_CAL_VIEW (user_data);
+ ECalendarView *cal_view = E_CALENDAR_VIEW (user_data);
- e_cal_view_update_query (cal_view);
+ e_calendar_view_update_query (cal_view);
}
static void
model_cell_changed_cb (ETableModel *etm, int col, int row, gpointer user_data)
{
- ECalView *cal_view = E_CAL_VIEW (user_data);
+ ECalendarView *cal_view = E_CALENDAR_VIEW (user_data);
- e_cal_view_update_query (cal_view);
+ e_calendar_view_update_query (cal_view);
}
static void
model_rows_changed_cb (ETableModel *etm, int row, int count, gpointer user_data)
{
- ECalView *cal_view = E_CAL_VIEW (user_data);
+ ECalendarView *cal_view = E_CALENDAR_VIEW (user_data);
- e_cal_view_update_query (cal_view);
+ e_calendar_view_update_query (cal_view);
}
static void
@@ -261,7 +261,7 @@ selection_get (GtkWidget *invisible,
GtkSelectionData *selection_data,
guint info,
guint time_stamp,
- ECalView *cal_view)
+ ECalendarView *cal_view)
{
if (cal_view->priv->clipboard_selection != NULL) {
gtk_selection_data_set (selection_data,
@@ -275,7 +275,7 @@ selection_get (GtkWidget *invisible,
static void
selection_clear_event (GtkWidget *invisible,
GdkEventSelection *event,
- ECalView *cal_view)
+ ECalendarView *cal_view)
{
if (cal_view->priv->clipboard_selection != NULL) {
g_free (cal_view->priv->clipboard_selection);
@@ -284,10 +284,10 @@ selection_clear_event (GtkWidget *invisible,
}
void
-e_cal_view_add_event (ECalView *cal_view, CalClient *client, time_t dtstart,
+e_calendar_view_add_event (ECalendarView *cal_view, ECal *client, time_t dtstart,
icaltimezone *default_zone, icalcomponent *icalcomp, gboolean in_top_canvas)
{
- CalComponent *comp;
+ ECalComponent *comp;
struct icaltimetype itime, old_dtstart, old_dtend;
time_t tt_start, tt_end, new_dtstart;
struct icaldurationtype ic_dur;
@@ -331,18 +331,18 @@ e_cal_view_add_event (ECalView *cal_view, CalClient *client, time_t dtstart,
icalcomponent_set_dtend (icalcomp, itime);
/* FIXME The new uid stuff can go away once we actually set it in the backend */
- uid = cal_component_gen_uid ();
- comp = cal_component_new ();
- cal_component_set_icalcomponent (
+ uid = e_cal_component_gen_uid ();
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (
comp, icalcomponent_new_clone (icalcomp));
- cal_component_set_uid (comp, uid);
+ e_cal_component_set_uid (comp, uid);
/* FIXME Error handling */
- if (cal_client_create_object (client, cal_component_get_icalcomponent (comp), NULL, NULL)) {
+ if (e_cal_create_object (client, e_cal_component_get_icalcomponent (comp), NULL, NULL)) {
if (itip_organizer_is_user (comp, client) &&
send_component_dialog ((GtkWindow *) gtk_widget_get_toplevel (GTK_WIDGET (cal_view)),
client, comp, TRUE)) {
- itip_send_comp (CAL_COMPONENT_METHOD_REQUEST, comp,
+ itip_send_comp (E_CAL_COMPONENT_METHOD_REQUEST, comp,
client, NULL);
}
} else {
@@ -357,16 +357,16 @@ static void
selection_received (GtkWidget *invisible,
GtkSelectionData *selection_data,
guint time,
- ECalView *cal_view)
+ ECalendarView *cal_view)
{
char *comp_str, *default_tzid;
icalcomponent *icalcomp;
icalcomponent_kind kind;
time_t selected_time_start, selected_time_end;
icaltimezone *default_zone;
- CalClient *client;
+ ECal *client;
- g_return_if_fail (E_IS_CAL_VIEW (cal_view));
+ g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
if (selection_data->length < 0 ||
selection_data->type != GDK_SELECTION_TYPE_STRING) {
@@ -382,7 +382,7 @@ selection_received (GtkWidget *invisible,
client = e_cal_model_get_default_client (cal_view->priv->model);
/* FIXME Error checking */
- cal_client_get_timezone (client, default_tzid, &default_zone, NULL);
+ e_cal_get_timezone (client, default_tzid, &default_zone, NULL);
/* check the type of the component */
/* FIXME An error dialog if we return? */
@@ -390,8 +390,8 @@ selection_received (GtkWidget *invisible,
if (kind != ICAL_VCALENDAR_COMPONENT && kind != ICAL_VEVENT_COMPONENT)
return;
- e_cal_view_set_status_message (cal_view, _("Updating objects"));
- e_cal_view_get_selected_time_range (cal_view, &selected_time_start, &selected_time_end);
+ e_calendar_view_set_status_message (cal_view, _("Updating objects"));
+ e_calendar_view_get_selected_time_range (cal_view, &selected_time_start, &selected_time_end);
/* FIXME Timezone handling */
if (kind == ICAL_VCALENDAR_COMPONENT) {
@@ -402,14 +402,14 @@ selection_received (GtkWidget *invisible,
while (subcomp) {
child_kind = icalcomponent_isa (subcomp);
if (child_kind == ICAL_VEVENT_COMPONENT)
- e_cal_view_add_event (cal_view, client, selected_time_start,
+ e_calendar_view_add_event (cal_view, client, selected_time_start,
default_zone, subcomp, FALSE);
else if (child_kind == ICAL_VTIMEZONE_COMPONENT) {
icaltimezone *zone;
zone = icaltimezone_new ();
icaltimezone_set_component (zone, subcomp);
- cal_client_add_timezone (client, zone, NULL);
+ e_cal_add_timezone (client, zone, NULL);
icaltimezone_free (zone, 1);
}
@@ -421,16 +421,16 @@ selection_received (GtkWidget *invisible,
icalcomponent_free (icalcomp);
} else {
- e_cal_view_add_event (cal_view, client, selected_time_start, default_zone, icalcomp, FALSE);
+ e_calendar_view_add_event (cal_view, client, selected_time_start, default_zone, icalcomp, FALSE);
}
- e_cal_view_set_status_message (cal_view, NULL);
+ e_calendar_view_set_status_message (cal_view, NULL);
}
static void
-e_cal_view_init (ECalView *cal_view, ECalViewClass *klass)
+e_calendar_view_init (ECalendarView *cal_view, ECalendarViewClass *klass)
{
- cal_view->priv = g_new0 (ECalViewPrivate, 1);
+ cal_view->priv = g_new0 (ECalendarViewPrivate, 1);
cal_view->priv->model = (ECalModel *) e_cal_model_calendar_new ();
g_signal_connect (G_OBJECT (cal_view->priv->model), "model_changed",
@@ -461,11 +461,11 @@ e_cal_view_init (ECalView *cal_view, ECalViewClass *klass)
}
static void
-e_cal_view_destroy (GtkObject *object)
+e_calendar_view_destroy (GtkObject *object)
{
- ECalView *cal_view = (ECalView *) object;
+ ECalendarView *cal_view = (ECalendarView *) object;
- g_return_if_fail (E_IS_CAL_VIEW (cal_view));
+ g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
if (cal_view->priv) {
if (cal_view->priv->model) {
@@ -504,37 +504,37 @@ e_cal_view_destroy (GtkObject *object)
GTK_OBJECT_CLASS (parent_class)->destroy (object);
}
-E_MAKE_TYPE (e_cal_view, "ECalView", ECalView, e_cal_view_class_init,
- e_cal_view_init, GTK_TYPE_TABLE);
+E_MAKE_TYPE (e_calendar_view, "ECalendarView", ECalendarView, e_calendar_view_class_init,
+ e_calendar_view_init, GTK_TYPE_TABLE);
GnomeCalendar *
-e_cal_view_get_calendar (ECalView *cal_view)
+e_calendar_view_get_calendar (ECalendarView *cal_view)
{
- g_return_val_if_fail (E_IS_CAL_VIEW (cal_view), NULL);
+ g_return_val_if_fail (E_IS_CALENDAR_VIEW (cal_view), NULL);
return cal_view->priv->calendar;
}
void
-e_cal_view_set_calendar (ECalView *cal_view, GnomeCalendar *calendar)
+e_calendar_view_set_calendar (ECalendarView *cal_view, GnomeCalendar *calendar)
{
- g_return_if_fail (E_IS_CAL_VIEW (cal_view));
+ g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
cal_view->priv->calendar = calendar;
}
ECalModel *
-e_cal_view_get_model (ECalView *cal_view)
+e_calendar_view_get_model (ECalendarView *cal_view)
{
- g_return_val_if_fail (E_IS_CAL_VIEW (cal_view), NULL);
+ g_return_val_if_fail (E_IS_CALENDAR_VIEW (cal_view), NULL);
return cal_view->priv->model;
}
void
-e_cal_view_set_model (ECalView *cal_view, ECalModel *model)
+e_calendar_view_set_model (ECalendarView *cal_view, ECalModel *model)
{
- g_return_if_fail (E_IS_CAL_VIEW (cal_view));
+ g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
g_return_if_fail (E_IS_CAL_MODEL (model));
if (cal_view->priv->model) {
@@ -551,41 +551,41 @@ e_cal_view_set_model (ECalView *cal_view, ECalModel *model)
g_signal_connect (G_OBJECT (cal_view->priv->model), "model_rows_inserted", G_CALLBACK (model_rows_changed_cb), cal_view);
g_signal_connect (G_OBJECT (cal_view->priv->model), "model_rows_deleted", G_CALLBACK (model_rows_changed_cb), cal_view);
- e_cal_view_update_query (cal_view);
+ e_calendar_view_update_query (cal_view);
}
icaltimezone *
-e_cal_view_get_timezone (ECalView *cal_view)
+e_calendar_view_get_timezone (ECalendarView *cal_view)
{
- g_return_val_if_fail (E_IS_CAL_VIEW (cal_view), NULL);
+ g_return_val_if_fail (E_IS_CALENDAR_VIEW (cal_view), NULL);
return e_cal_model_get_timezone (cal_view->priv->model);
}
void
-e_cal_view_set_timezone (ECalView *cal_view, icaltimezone *zone)
+e_calendar_view_set_timezone (ECalendarView *cal_view, icaltimezone *zone)
{
icaltimezone *old_zone;
- g_return_if_fail (E_IS_CAL_VIEW (cal_view));
+ g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
old_zone = e_cal_model_get_timezone (cal_view->priv->model);
if (old_zone == zone)
return;
e_cal_model_set_timezone (cal_view->priv->model, zone);
- g_signal_emit (G_OBJECT (cal_view), e_cal_view_signals[TIMEZONE_CHANGED], 0,
+ g_signal_emit (G_OBJECT (cal_view), e_calendar_view_signals[TIMEZONE_CHANGED], 0,
old_zone, zone);
}
const char *
-e_cal_view_get_default_category (ECalView *cal_view)
+e_calendar_view_get_default_category (ECalendarView *cal_view)
{
- g_return_val_if_fail (E_IS_CAL_VIEW (cal_view), NULL);
+ g_return_val_if_fail (E_IS_CALENDAR_VIEW (cal_view), NULL);
return (const char *) cal_view->priv->default_category;
}
/**
- * e_cal_view_set_default_category
+ * e_calendar_view_set_default_category
* @cal_view: A calendar view.
* @category: Default category name or NULL for no category.
*
@@ -593,9 +593,9 @@ e_cal_view_get_default_category (ECalView *cal_view)
* components from the given calendar view.
*/
void
-e_cal_view_set_default_category (ECalView *cal_view, const char *category)
+e_calendar_view_set_default_category (ECalendarView *cal_view, const char *category)
{
- g_return_if_fail (E_IS_CAL_VIEW (cal_view));
+ g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
if (cal_view->priv->default_category)
g_free (cal_view->priv->default_category);
@@ -604,7 +604,7 @@ e_cal_view_set_default_category (ECalView *cal_view, const char *category)
}
/**
- * e_cal_view_get_use_24_hour_format:
+ * e_calendar_view_get_use_24_hour_format:
* @cal_view: A calendar view.
*
* Gets whether the view is using 24 hour times or not.
@@ -612,32 +612,32 @@ e_cal_view_set_default_category (ECalView *cal_view, const char *category)
* Returns: the 24 hour setting.
*/
gboolean
-e_cal_view_get_use_24_hour_format (ECalView *cal_view)
+e_calendar_view_get_use_24_hour_format (ECalendarView *cal_view)
{
- g_return_val_if_fail (E_IS_CAL_VIEW (cal_view), FALSE);
+ g_return_val_if_fail (E_IS_CALENDAR_VIEW (cal_view), FALSE);
return e_cal_model_get_use_24_hour_format (cal_view->priv->model);
}
/**
- * e_cal_view_set_use_24_hour_format
+ * e_calendar_view_set_use_24_hour_format
* @cal_view: A calendar view.
* @use_24_hour: Whether to use 24 hour times or not.
*
* Sets the 12/24 hour times setting for the given view.
*/
void
-e_cal_view_set_use_24_hour_format (ECalView *cal_view, gboolean use_24_hour)
+e_calendar_view_set_use_24_hour_format (ECalendarView *cal_view, gboolean use_24_hour)
{
- g_return_if_fail (E_IS_CAL_VIEW (cal_view));
+ g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
e_cal_model_set_use_24_hour_format (cal_view->priv->model, use_24_hour);
}
void
-e_cal_view_set_status_message (ECalView *cal_view, const gchar *message)
+e_calendar_view_set_status_message (ECalendarView *cal_view, const gchar *message)
{
- g_return_if_fail (E_IS_CAL_VIEW (cal_view));
+ g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
if (!message || !*message) {
if (cal_view->priv->activity) {
@@ -665,45 +665,45 @@ e_cal_view_set_status_message (ECalView *cal_view, const gchar *message)
}
GList *
-e_cal_view_get_selected_events (ECalView *cal_view)
+e_calendar_view_get_selected_events (ECalendarView *cal_view)
{
- g_return_val_if_fail (E_IS_CAL_VIEW (cal_view), NULL);
+ g_return_val_if_fail (E_IS_CALENDAR_VIEW (cal_view), NULL);
- if (E_CAL_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->get_selected_events)
- return E_CAL_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->get_selected_events (cal_view);
+ if (E_CALENDAR_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->get_selected_events)
+ return E_CALENDAR_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->get_selected_events (cal_view);
return NULL;
}
void
-e_cal_view_get_selected_time_range (ECalView *cal_view, time_t *start_time, time_t *end_time)
+e_calendar_view_get_selected_time_range (ECalendarView *cal_view, time_t *start_time, time_t *end_time)
{
- g_return_if_fail (E_IS_CAL_VIEW (cal_view));
+ g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
- if (E_CAL_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->get_selected_time_range) {
- E_CAL_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->get_selected_time_range (
+ if (E_CALENDAR_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->get_selected_time_range) {
+ E_CALENDAR_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->get_selected_time_range (
cal_view, start_time, end_time);
}
}
void
-e_cal_view_set_selected_time_range (ECalView *cal_view, time_t start_time, time_t end_time)
+e_calendar_view_set_selected_time_range (ECalendarView *cal_view, time_t start_time, time_t end_time)
{
- g_return_if_fail (E_IS_CAL_VIEW (cal_view));
+ g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
- if (E_CAL_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->set_selected_time_range) {
- E_CAL_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->set_selected_time_range (
+ if (E_CALENDAR_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->set_selected_time_range) {
+ E_CALENDAR_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->set_selected_time_range (
cal_view, start_time, end_time);
}
}
gboolean
-e_cal_view_get_visible_time_range (ECalView *cal_view, time_t *start_time, time_t *end_time)
+e_calendar_view_get_visible_time_range (ECalendarView *cal_view, time_t *start_time, time_t *end_time)
{
- g_return_val_if_fail (E_IS_CAL_VIEW (cal_view), FALSE);
+ g_return_val_if_fail (E_IS_CALENDAR_VIEW (cal_view), FALSE);
- if (E_CAL_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->get_visible_time_range) {
- return E_CAL_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->get_visible_time_range (
+ if (E_CALENDAR_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->get_visible_time_range) {
+ return E_CALENDAR_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->get_visible_time_range (
cal_view, start_time, end_time);
}
@@ -711,91 +711,91 @@ e_cal_view_get_visible_time_range (ECalView *cal_view, time_t *start_time, time_
}
void
-e_cal_view_update_query (ECalView *cal_view)
+e_calendar_view_update_query (ECalendarView *cal_view)
{
- g_return_if_fail (E_IS_CAL_VIEW (cal_view));
+ g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
- e_cal_view_set_status_message (cal_view, _("Searching"));
+ e_calendar_view_set_status_message (cal_view, _("Searching"));
- if (E_CAL_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->update_query) {
- E_CAL_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->update_query (cal_view);
+ if (E_CALENDAR_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->update_query) {
+ E_CALENDAR_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->update_query (cal_view);
}
- e_cal_view_set_status_message (cal_view, NULL);
+ e_calendar_view_set_status_message (cal_view, NULL);
}
void
-e_cal_view_cut_clipboard (ECalView *cal_view)
+e_calendar_view_cut_clipboard (ECalendarView *cal_view)
{
GList *selected, *l;
const char *uid;
- g_return_if_fail (E_IS_CAL_VIEW (cal_view));
+ g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
- selected = e_cal_view_get_selected_events (cal_view);
+ selected = e_calendar_view_get_selected_events (cal_view);
if (!selected)
return;
- e_cal_view_set_status_message (cal_view, _("Deleting selected objects"));
+ e_calendar_view_set_status_message (cal_view, _("Deleting selected objects"));
- e_cal_view_copy_clipboard (cal_view);
+ e_calendar_view_copy_clipboard (cal_view);
for (l = selected; l != NULL; l = l->next) {
- CalComponent *comp;
- ECalViewEvent *event = (ECalViewEvent *) l->data;
+ ECalComponent *comp;
+ ECalendarViewEvent *event = (ECalendarViewEvent *) l->data;
GError *error = NULL;
if (!event)
continue;
- comp = cal_component_new ();
- cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
if (itip_organizer_is_user (comp, event->comp_data->client)
&& cancel_component_dialog ((GtkWindow *) gtk_widget_get_toplevel (GTK_WIDGET (cal_view)),
event->comp_data->client, comp, TRUE))
- itip_send_comp (CAL_COMPONENT_METHOD_CANCEL, comp,
+ itip_send_comp (E_CAL_COMPONENT_METHOD_CANCEL, comp,
event->comp_data->client, NULL);
- cal_component_get_uid (comp, &uid);
- cal_client_remove_object (event->comp_data->client, uid, &error);
- delete_error_dialog (error, CAL_COMPONENT_EVENT);
+ e_cal_component_get_uid (comp, &uid);
+ e_cal_remove_object (event->comp_data->client, uid, &error);
+ delete_error_dialog (error, E_CAL_COMPONENT_EVENT);
g_clear_error (&error);
g_object_unref (comp);
}
- e_cal_view_set_status_message (cal_view, NULL);
+ e_calendar_view_set_status_message (cal_view, NULL);
g_list_free (selected);
}
void
-e_cal_view_copy_clipboard (ECalView *cal_view)
+e_calendar_view_copy_clipboard (ECalendarView *cal_view)
{
GList *selected, *l;
gchar *comp_str;
icalcomponent *vcal_comp;
icalcomponent *new_icalcomp;
- ECalViewEvent *event;
+ ECalendarViewEvent *event;
- g_return_if_fail (E_IS_CAL_VIEW (cal_view));
+ g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
- selected = e_cal_view_get_selected_events (cal_view);
+ selected = e_calendar_view_get_selected_events (cal_view);
if (!selected)
return;
/* create top-level VCALENDAR component and add VTIMEZONE's */
- vcal_comp = cal_util_new_top_level ();
+ vcal_comp = e_cal_util_new_top_level ();
for (l = selected; l != NULL; l = l->next) {
- event = (ECalViewEvent *) l->data;
+ event = (ECalendarViewEvent *) l->data;
if (event)
- cal_util_add_timezones_from_component (vcal_comp, event->comp_data->icalcomp);
+ e_cal_util_add_timezones_from_component (vcal_comp, event->comp_data->icalcomp);
}
for (l = selected; l != NULL; l = l->next) {
- event = (ECalViewEvent *) l->data;
+ event = (ECalendarViewEvent *) l->data;
new_icalcomp = icalcomponent_new_clone (event->comp_data->icalcomp);
icalcomponent_add_component (vcal_comp, new_icalcomp);
@@ -814,9 +814,9 @@ e_cal_view_copy_clipboard (ECalView *cal_view)
}
void
-e_cal_view_paste_clipboard (ECalView *cal_view)
+e_calendar_view_paste_clipboard (ECalendarView *cal_view)
{
- g_return_if_fail (E_IS_CAL_VIEW (cal_view));
+ g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
gtk_selection_convert (cal_view->priv->invisible,
clipboard_atom,
@@ -825,14 +825,14 @@ e_cal_view_paste_clipboard (ECalView *cal_view)
}
static void
-delete_event (ECalView *cal_view, ECalViewEvent *event)
+delete_event (ECalendarView *cal_view, ECalendarViewEvent *event)
{
- CalComponent *comp;
- CalComponentVType vtype;
+ ECalComponent *comp;
+ ECalComponentVType vtype;
- comp = cal_component_new ();
- cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
- vtype = cal_component_get_vtype (comp);
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
+ vtype = e_cal_component_get_vtype (comp);
if (delete_component_dialog (comp, FALSE, 1, vtype, GTK_WIDGET (cal_view))) {
const char *uid;
@@ -842,17 +842,17 @@ delete_event (ECalView *cal_view, ECalViewEvent *event)
&& cancel_component_dialog ((GtkWindow *) gtk_widget_get_toplevel (GTK_WIDGET (cal_view)),
event->comp_data->client,
comp, TRUE))
- itip_send_comp (CAL_COMPONENT_METHOD_CANCEL, comp,
+ itip_send_comp (E_CAL_COMPONENT_METHOD_CANCEL, comp,
event->comp_data->client, NULL);
- cal_component_get_uid (comp, &uid);
+ e_cal_component_get_uid (comp, &uid);
if (!uid || !*uid) {
g_object_unref (comp);
return;
}
- cal_client_remove_object (event->comp_data->client, uid, &error);
- delete_error_dialog (error, CAL_COMPONENT_EVENT);
+ e_cal_remove_object (event->comp_data->client, uid, &error);
+ delete_error_dialog (error, E_CAL_COMPONENT_EVENT);
g_clear_error (&error);
}
@@ -860,16 +860,16 @@ delete_event (ECalView *cal_view, ECalViewEvent *event)
}
void
-e_cal_view_delete_selected_event (ECalView *cal_view)
+e_calendar_view_delete_selected_event (ECalendarView *cal_view)
{
GList *selected;
- ECalViewEvent *event;
+ ECalendarViewEvent *event;
- selected = e_cal_view_get_selected_events (cal_view);
+ selected = e_calendar_view_get_selected_events (cal_view);
if (!selected)
return;
- event = (ECalViewEvent *) selected->data;
+ event = (ECalendarViewEvent *) selected->data;
if (event)
delete_event (cal_view, event);
@@ -877,17 +877,17 @@ e_cal_view_delete_selected_event (ECalView *cal_view)
}
void
-e_cal_view_delete_selected_events (ECalView *cal_view)
+e_calendar_view_delete_selected_events (ECalendarView *cal_view)
{
GList *selected, *l;
- ECalViewEvent *event;
+ ECalendarViewEvent *event;
- selected = e_cal_view_get_selected_events (cal_view);
+ selected = e_calendar_view_get_selected_events (cal_view);
if (!selected)
return;
for (l = selected; l != NULL; l = l->next) {
- event = (ECalViewEvent *) l->data;
+ event = (ECalendarViewEvent *) l->data;
if (event)
delete_event (cal_view, event);
}
@@ -896,24 +896,24 @@ e_cal_view_delete_selected_events (ECalView *cal_view)
}
void
-e_cal_view_delete_selected_occurrence (ECalView *cal_view)
+e_calendar_view_delete_selected_occurrence (ECalendarView *cal_view)
{
- ECalViewEvent *event;
+ ECalendarViewEvent *event;
GList *selected;
const char *uid;
GError *error = NULL;
- selected = e_cal_view_get_selected_events (cal_view);
+ selected = e_calendar_view_get_selected_events (cal_view);
if (!selected)
return;
- event = (ECalViewEvent *) selected->data;
+ event = (ECalendarViewEvent *) selected->data;
uid = icalcomponent_get_uid (event->comp_data->icalcomp);
/* FIXME: use 'rid' argument */
- cal_client_remove_object_with_mod (event->comp_data->client, uid, NULL, CALOBJ_MOD_THIS, &error);
+ e_cal_remove_object_with_mod (event->comp_data->client, uid, NULL, CALOBJ_MOD_THIS, &error);
- delete_error_dialog (error, CAL_COMPONENT_EVENT);
+ delete_error_dialog (error, E_CAL_COMPONENT_EVENT);
g_clear_error (&error);
/* free memory */
@@ -923,42 +923,42 @@ e_cal_view_delete_selected_occurrence (ECalView *cal_view)
static void
on_new_appointment (GtkWidget *widget, gpointer user_data)
{
- ECalView *cal_view = (ECalView *) user_data;
+ ECalendarView *cal_view = (ECalendarView *) user_data;
- e_cal_view_new_appointment (cal_view);
+ e_calendar_view_new_appointment (cal_view);
}
static void
on_new_event (GtkWidget *widget, gpointer user_data)
{
time_t dtstart, dtend;
- ECalView *cal_view = (ECalView *) user_data;
+ ECalendarView *cal_view = (ECalendarView *) user_data;
- e_cal_view_get_selected_time_range (cal_view, &dtstart, &dtend);
- e_cal_view_new_appointment_for (cal_view, dtstart, dtend, TRUE, FALSE);
+ e_calendar_view_get_selected_time_range (cal_view, &dtstart, &dtend);
+ e_calendar_view_new_appointment_for (cal_view, dtstart, dtend, TRUE, FALSE);
}
static void
on_new_meeting (GtkWidget *widget, gpointer user_data)
{
time_t dtstart, dtend;
- ECalView *cal_view = (ECalView *) user_data;
+ ECalendarView *cal_view = (ECalendarView *) user_data;
- e_cal_view_get_selected_time_range (cal_view, &dtstart, &dtend);
- e_cal_view_new_appointment_for (cal_view, dtstart, dtend, FALSE, TRUE);
+ e_calendar_view_get_selected_time_range (cal_view, &dtstart, &dtend);
+ e_calendar_view_new_appointment_for (cal_view, dtstart, dtend, FALSE, TRUE);
}
static void
on_new_task (GtkWidget *widget, gpointer user_data)
{
- ECalView *cal_view = (ECalView *) user_data;
+ ECalendarView *cal_view = (ECalendarView *) user_data;
gnome_calendar_new_task (cal_view->priv->calendar);
}
static void
on_goto_date (GtkWidget *widget, gpointer user_data)
{
- ECalView *cal_view = E_CAL_VIEW (user_data);
+ ECalendarView *cal_view = E_CALENDAR_VIEW (user_data);
goto_dialog (cal_view->priv->calendar);
}
@@ -966,7 +966,7 @@ on_goto_date (GtkWidget *widget, gpointer user_data)
static void
on_goto_today (GtkWidget *widget, gpointer user_data)
{
- ECalView *cal_view = E_CAL_VIEW (user_data);
+ ECalendarView *cal_view = E_CALENDAR_VIEW (user_data);
calendar_goto_today (cal_view->priv->calendar);
}
@@ -975,14 +975,14 @@ static void
on_edit_appointment (GtkWidget *widget, gpointer user_data)
{
GList *selected;
- ECalView *cal_view = E_CAL_VIEW (user_data);
+ ECalendarView *cal_view = E_CALENDAR_VIEW (user_data);
- selected = e_cal_view_get_selected_events (cal_view);
+ selected = e_calendar_view_get_selected_events (cal_view);
if (selected) {
- ECalViewEvent *event = (ECalViewEvent *) selected->data;
+ ECalendarViewEvent *event = (ECalendarViewEvent *) selected->data;
if (event)
- e_cal_view_edit_appointment (cal_view, event->comp_data->client,
+ e_calendar_view_edit_appointment (cal_view, event->comp_data->client,
event->comp_data->icalcomp, FALSE);
g_list_free (selected);
@@ -992,14 +992,14 @@ on_edit_appointment (GtkWidget *widget, gpointer user_data)
static void
on_print (GtkWidget *widget, gpointer user_data)
{
- ECalView *cal_view;
+ ECalendarView *cal_view;
time_t start;
GnomeCalendarViewType view_type;
PrintView print_view;
- cal_view = E_CAL_VIEW (user_data);
+ cal_view = E_CALENDAR_VIEW (user_data);
- e_cal_view_get_visible_time_range (cal_view, &start, NULL);
+ e_calendar_view_get_visible_time_range (cal_view, &start, NULL);
view_type = gnome_calendar_get_view (cal_view->priv->calendar);
switch (view_type) {
@@ -1027,16 +1027,16 @@ on_print (GtkWidget *widget, gpointer user_data)
static void
on_save_as (GtkWidget *widget, gpointer user_data)
{
- ECalView *cal_view;
+ ECalendarView *cal_view;
GList *selected;
char *filename;
char *ical_string;
FILE *file;
- ECalViewEvent *event;
+ ECalendarViewEvent *event;
- cal_view = E_CAL_VIEW (user_data);
+ cal_view = E_CALENDAR_VIEW (user_data);
- selected = e_cal_view_get_selected_events (cal_view);
+ selected = e_calendar_view_get_selected_events (cal_view);
if (!selected)
return;
@@ -1044,8 +1044,8 @@ on_save_as (GtkWidget *widget, gpointer user_data)
if (filename == NULL)
return;
- event = (ECalViewEvent *) selected->data;
- ical_string = cal_client_get_component_as_string (event->comp_data->client, event->comp_data->icalcomp);
+ event = (ECalendarViewEvent *) selected->data;
+ ical_string = e_cal_get_component_as_string (event->comp_data->client, event->comp_data->icalcomp);
if (ical_string == NULL) {
g_warning ("Couldn't convert item to a string");
return;
@@ -1067,20 +1067,20 @@ on_save_as (GtkWidget *widget, gpointer user_data)
static void
on_print_event (GtkWidget *widget, gpointer user_data)
{
- ECalView *cal_view;
+ ECalendarView *cal_view;
GList *selected;
- ECalViewEvent *event;
- CalComponent *comp;
+ ECalendarViewEvent *event;
+ ECalComponent *comp;
- cal_view = E_CAL_VIEW (user_data);
- selected = e_cal_view_get_selected_events (cal_view);
+ cal_view = E_CALENDAR_VIEW (user_data);
+ selected = e_calendar_view_get_selected_events (cal_view);
if (!selected)
return;
- event = (ECalViewEvent *) selected->data;
+ event = (ECalendarViewEvent *) selected->data;
- comp = cal_component_new ();
- cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
print_comp (comp, event->comp_data->client, FALSE);
g_object_unref (comp);
@@ -1090,12 +1090,12 @@ static void
on_meeting (GtkWidget *widget, gpointer user_data)
{
GList *selected;
- ECalView *cal_view = E_CAL_VIEW (user_data);
+ ECalendarView *cal_view = E_CALENDAR_VIEW (user_data);
- selected = e_cal_view_get_selected_events (cal_view);
+ selected = e_calendar_view_get_selected_events (cal_view);
if (selected) {
- ECalViewEvent *event = (ECalViewEvent *) selected->data;
- e_cal_view_edit_appointment (cal_view, event->comp_data->client, event->comp_data->icalcomp, TRUE);
+ ECalendarViewEvent *event = (ECalendarViewEvent *) selected->data;
+ e_calendar_view_edit_appointment (cal_view, event->comp_data->client, event->comp_data->icalcomp, TRUE);
g_list_free (selected);
}
@@ -1105,16 +1105,16 @@ static void
on_forward (GtkWidget *widget, gpointer user_data)
{
GList *selected;
- ECalView *cal_view = E_CAL_VIEW (user_data);
+ ECalendarView *cal_view = E_CALENDAR_VIEW (user_data);
- selected = e_cal_view_get_selected_events (cal_view);
+ selected = e_calendar_view_get_selected_events (cal_view);
if (selected) {
- CalComponent *comp;
- ECalViewEvent *event = (ECalViewEvent *) selected->data;
+ ECalComponent *comp;
+ ECalendarViewEvent *event = (ECalendarViewEvent *) selected->data;
- comp = cal_component_new ();
- cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
- itip_send_comp (CAL_COMPONENT_METHOD_PUBLISH, comp, event->comp_data->client, NULL);
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
+ itip_send_comp (E_CAL_COMPONENT_METHOD_PUBLISH, comp, event->comp_data->client, NULL);
g_list_free (selected);
g_object_unref (comp);
@@ -1124,12 +1124,12 @@ on_forward (GtkWidget *widget, gpointer user_data)
static void
on_publish (GtkWidget *widget, gpointer user_data)
{
- ECalView *cal_view;
+ ECalendarView *cal_view;
icaltimezone *utc;
time_t start = time (NULL), end;
GList *comp_list = NULL, *client_list, *cl;
- cal_view = E_CAL_VIEW (user_data);
+ cal_view = E_CALENDAR_VIEW (user_data);
utc = icaltimezone_get_utc_timezone ();
start = time_day_begin_with_zone (start, utc);
@@ -1137,12 +1137,12 @@ on_publish (GtkWidget *widget, gpointer user_data)
client_list = e_cal_model_get_client_list (cal_view->priv->model);
for (cl = client_list; cl != NULL; cl = cl->next) {
- if (cal_client_get_free_busy ((CalClient *) cl->data, NULL, start, end, &comp_list, NULL)) {
+ if (e_cal_get_free_busy ((ECal *) cl->data, NULL, start, end, &comp_list, NULL)) {
GList *l;
for (l = comp_list; l; l = l->next) {
- CalComponent *comp = CAL_COMPONENT (l->data);
- itip_send_comp (CAL_COMPONENT_METHOD_PUBLISH, comp, (CalClient *) cl->data, NULL);
+ ECalComponent *comp = E_CAL_COMPONENT (l->data);
+ itip_send_comp (E_CAL_COMPONENT_METHOD_PUBLISH, comp, (ECal *) cl->data, NULL);
g_object_unref (comp);
}
@@ -1157,52 +1157,52 @@ on_publish (GtkWidget *widget, gpointer user_data)
static void
on_settings (GtkWidget *widget, gpointer user_data)
{
- ECalView *cal_view;
+ ECalendarView *cal_view;
- cal_view = E_CAL_VIEW (user_data);
+ cal_view = E_CALENDAR_VIEW (user_data);
control_util_show_settings (cal_view->priv->calendar);
}
static void
on_delete_appointment (GtkWidget *widget, gpointer user_data)
{
- ECalView *cal_view;
+ ECalendarView *cal_view;
- cal_view = E_CAL_VIEW (user_data);
- e_cal_view_delete_selected_event (cal_view);
+ cal_view = E_CALENDAR_VIEW (user_data);
+ e_calendar_view_delete_selected_event (cal_view);
}
static void
on_delete_occurrence (GtkWidget *widget, gpointer user_data)
{
- ECalView *cal_view;
+ ECalendarView *cal_view;
- cal_view = E_CAL_VIEW (user_data);
- e_cal_view_delete_selected_occurrence (cal_view);
+ cal_view = E_CALENDAR_VIEW (user_data);
+ e_calendar_view_delete_selected_occurrence (cal_view);
}
static void
on_cut (GtkWidget *widget, gpointer user_data)
{
- ECalView *cal_view = E_CAL_VIEW (user_data);
+ ECalendarView *cal_view = E_CALENDAR_VIEW (user_data);
- e_cal_view_cut_clipboard (cal_view);
+ e_calendar_view_cut_clipboard (cal_view);
}
static void
on_copy (GtkWidget *widget, gpointer user_data)
{
- ECalView *cal_view = E_CAL_VIEW (user_data);
+ ECalendarView *cal_view = E_CALENDAR_VIEW (user_data);
- e_cal_view_copy_clipboard (cal_view);
+ e_calendar_view_copy_clipboard (cal_view);
}
static void
on_paste (GtkWidget *widget, gpointer user_data)
{
- ECalView *cal_view = E_CAL_VIEW (user_data);
+ ECalendarView *cal_view = E_CALENDAR_VIEW (user_data);
- e_cal_view_paste_clipboard (cal_view);
+ e_calendar_view_paste_clipboard (cal_view);
}
enum {
@@ -1307,7 +1307,7 @@ static EPopupMenu child_items [] = {
static void
free_view_popup (GtkWidget *widget, gpointer data)
{
- ECalView *cal_view = E_CAL_VIEW (data);
+ ECalendarView *cal_view = E_CALENDAR_VIEW (data);
if (cal_view->priv->view_menu == NULL)
return;
@@ -1362,19 +1362,19 @@ setup_popup_icons (EPopupMenu *context_menu)
}
GtkMenu *
-e_cal_view_create_popup_menu (ECalView *cal_view)
+e_calendar_view_create_popup_menu (ECalendarView *cal_view)
{
GList *selected;
EPopupMenu *context_menu;
guint32 disable_mask = 0, hide_mask = 0;
GtkMenu *popup;
- CalClient *client = NULL;
+ ECal *client = NULL;
gboolean read_only = TRUE;
- g_return_val_if_fail (E_IS_CAL_VIEW (cal_view), NULL);
+ g_return_val_if_fail (E_IS_CALENDAR_VIEW (cal_view), NULL);
/* get the selection */
- selected = e_cal_view_get_selected_events (cal_view);
+ selected = e_calendar_view_get_selected_events (cal_view);
if (selected == NULL) {
cal_view->priv->view_menu = gnome_calendar_setup_view_popup (cal_view->priv->calendar);
@@ -1383,26 +1383,26 @@ e_cal_view_create_popup_menu (ECalView *cal_view)
client = e_cal_model_get_default_client (cal_view->priv->model);
} else {
- ECalViewEvent *event;
+ ECalendarViewEvent *event;
context_menu = child_items;
- event = (ECalViewEvent *) selected->data;
- if (cal_util_component_has_recurrences (event->comp_data->icalcomp))
+ event = (ECalendarViewEvent *) selected->data;
+ if (e_cal_util_component_has_recurrences (event->comp_data->icalcomp))
hide_mask |= MASK_SINGLE;
else
hide_mask |= MASK_RECURRING;
- if (cal_util_component_is_instance (event->comp_data->icalcomp))
+ if (e_cal_util_component_is_instance (event->comp_data->icalcomp))
hide_mask |= MASK_INSTANCE;
- if (cal_util_component_has_organizer (event->comp_data->icalcomp)) {
- CalComponent *comp;
+ if (e_cal_util_component_has_organizer (event->comp_data->icalcomp)) {
+ ECalComponent *comp;
disable_mask |= MASK_MEETING;
- comp = cal_component_new ();
- cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
if (!itip_organizer_is_user (comp, event->comp_data->client))
disable_mask |= MASK_MEETING_ORGANIZER;
@@ -1412,7 +1412,7 @@ e_cal_view_create_popup_menu (ECalView *cal_view)
client = event->comp_data->client;
}
- cal_client_is_read_only (client, &read_only, NULL);
+ e_cal_is_read_only (client, &read_only, NULL);
if (read_only)
disable_mask |= MASK_EDITABLE;
@@ -1424,7 +1424,7 @@ e_cal_view_create_popup_menu (ECalView *cal_view)
}
/**
- * e_cal_view_new_appointment_for
+ * e_calendar_view_new_appointment_for
* @cal_view: A calendar view.
* @dtstart: A Unix time_t that marks the beginning of the appointment.
* @dtend: A Unix time_t that marks the end of the appointment.
@@ -1435,19 +1435,19 @@ e_cal_view_create_popup_menu (ECalView *cal_view)
* Opens an event editor dialog for a new appointment.
*/
void
-e_cal_view_new_appointment_for (ECalView *cal_view,
+e_calendar_view_new_appointment_for (ECalendarView *cal_view,
time_t dtstart, time_t dtend,
gboolean all_day,
gboolean meeting)
{
- ECalViewPrivate *priv;
+ ECalendarViewPrivate *priv;
struct icaltimetype itt;
- CalComponentDateTime dt;
- CalComponent *comp;
+ ECalComponentDateTime dt;
+ ECalComponent *comp;
icalcomponent *icalcomp;
- CalComponentTransparency transparency;
+ ECalComponentTransparency transparency;
- g_return_if_fail (E_IS_CAL_VIEW (cal_view));
+ g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
priv = cal_view->priv;
@@ -1458,8 +1458,8 @@ e_cal_view_new_appointment_for (ECalView *cal_view,
dt.tzid = icaltimezone_get_tzid (e_cal_model_get_timezone (cal_view->priv->model));
icalcomp = e_cal_model_create_component_with_defaults (priv->model);
- comp = cal_component_new ();
- cal_component_set_icalcomponent (comp, icalcomp);
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (comp, icalcomp);
/* DTSTART, DTEND */
itt = icaltime_from_timet_with_zone (dtstart, FALSE, e_cal_model_get_timezone (cal_view->priv->model));
@@ -1467,7 +1467,7 @@ e_cal_view_new_appointment_for (ECalView *cal_view,
itt.hour = itt.minute = itt.second = 0;
itt.is_date = TRUE;
}
- cal_component_set_dtstart (comp, &dt);
+ e_cal_component_set_dtstart (comp, &dt);
itt = icaltime_from_timet_with_zone (dtend, FALSE, e_cal_model_get_timezone (cal_view->priv->model));
if (all_day) {
@@ -1479,20 +1479,20 @@ e_cal_view_new_appointment_for (ECalView *cal_view,
itt.hour = itt.minute = itt.second = 0;
itt.is_date = TRUE;
}
- cal_component_set_dtend (comp, &dt);
+ e_cal_component_set_dtend (comp, &dt);
/* TRANSPARENCY */
- transparency = all_day ? CAL_COMPONENT_TRANSP_TRANSPARENT
- : CAL_COMPONENT_TRANSP_OPAQUE;
- cal_component_set_transparency (comp, transparency);
+ transparency = all_day ? E_CAL_COMPONENT_TRANSP_TRANSPARENT
+ : E_CAL_COMPONENT_TRANSP_OPAQUE;
+ e_cal_component_set_transparency (comp, transparency);
/* CATEGORY */
- cal_component_set_categories (comp, priv->default_category);
+ e_cal_component_set_categories (comp, priv->default_category);
/* edit the object */
- cal_component_commit_sequence (comp);
+ e_cal_component_commit_sequence (comp);
- e_cal_view_edit_appointment (cal_view,
+ e_calendar_view_edit_appointment (cal_view,
e_cal_model_get_default_client (priv->model),
icalcomp, meeting);
@@ -1500,7 +1500,7 @@ e_cal_view_new_appointment_for (ECalView *cal_view,
}
/**
- * e_cal_view_new_appointment
+ * e_calendar_view_new_appointment
* @cal_view: A calendar view.
*
* Opens an event editor dialog for a new appointment. The appointment's
@@ -1508,18 +1508,18 @@ e_cal_view_new_appointment_for (ECalView *cal_view,
* the calendar view.
*/
void
-e_cal_view_new_appointment (ECalView *cal_view)
+e_calendar_view_new_appointment (ECalendarView *cal_view)
{
time_t dtstart, dtend;
- g_return_if_fail (E_IS_CAL_VIEW (cal_view));
+ g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
- e_cal_view_get_selected_time_range (cal_view, &dtstart, &dtend);
- e_cal_view_new_appointment_for (cal_view, dtstart, dtend, FALSE, FALSE);
+ e_calendar_view_get_selected_time_range (cal_view, &dtstart, &dtend);
+ e_calendar_view_new_appointment_for (cal_view, dtstart, dtend, FALSE, FALSE);
}
/**
- * e_cal_view_edit_appointment
+ * e_calendar_view_edit_appointment
* @cal_view: A calendar view.
* @client: Calendar client.
* @icalcomp: The object to be edited.
@@ -1529,18 +1529,18 @@ e_cal_view_new_appointment (ECalView *cal_view)
* object.
*/
void
-e_cal_view_edit_appointment (ECalView *cal_view,
- CalClient *client,
+e_calendar_view_edit_appointment (ECalendarView *cal_view,
+ ECal *client,
icalcomponent *icalcomp,
gboolean meeting)
{
- ECalViewPrivate *priv;
+ ECalendarViewPrivate *priv;
CompEditor *ce;
const char *uid;
- CalComponent *comp;
+ ECalComponent *comp;
- g_return_if_fail (E_IS_CAL_VIEW (cal_view));
- g_return_if_fail (IS_CAL_CLIENT (client));
+ g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
+ g_return_if_fail (E_IS_CAL (client));
g_return_if_fail (icalcomp != NULL);
priv = cal_view->priv;
@@ -1554,8 +1554,8 @@ e_cal_view_edit_appointment (ECalView *cal_view,
ee = event_editor_new (client);
ce = COMP_EDITOR (ee);
- comp = cal_component_new ();
- cal_component_set_icalcomponent (comp, icalcomponent_new_clone (icalcomp));
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (icalcomp));
comp_editor_edit_comp (ce, comp);
if (meeting)
event_editor_show_meeting (ee);
diff --git a/calendar/gui/e-cal-view.h b/calendar/gui/e-cal-view.h
index 292871b709..a1b11023b3 100644
--- a/calendar/gui/e-cal-view.h
+++ b/calendar/gui/e-cal-view.h
@@ -20,10 +20,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*/
-#ifndef _E_CAL_VIEW_H_
-#define _E_CAL_VIEW_H_
+#ifndef _E_CALENDAR_VIEW_H_
+#define _E_CALENDAR_VIEW_H_
-#include <cal-client/cal-client.h>
+#include <libecal/e-cal.h>
#include <gtk/gtktable.h>
#include "e-cal-model.h"
#include "gnome-cal.h"
@@ -34,21 +34,21 @@ G_BEGIN_DECLS
* EView - base widget class for the calendar views.
*/
-#define E_CAL_VIEW(obj) GTK_CHECK_CAST (obj, e_cal_view_get_type (), ECalView)
-#define E_CAL_VIEW_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, e_cal_view_get_type (), ECalViewClass)
-#define E_IS_CAL_VIEW(obj) GTK_CHECK_TYPE (obj, e_cal_view_get_type ())
+#define E_CALENDAR_VIEW(obj) GTK_CHECK_CAST (obj, e_calendar_view_get_type (), ECalendarView)
+#define E_CALENDAR_VIEW_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, e_calendar_view_get_type (), ECalendarViewClass)
+#define E_IS_CALENDAR_VIEW(obj) GTK_CHECK_TYPE (obj, e_calendar_view_get_type ())
typedef enum {
- E_CAL_VIEW_POS_OUTSIDE,
- E_CAL_VIEW_POS_NONE,
- E_CAL_VIEW_POS_EVENT,
- E_CAL_VIEW_POS_LEFT_EDGE,
- E_CAL_VIEW_POS_RIGHT_EDGE,
- E_CAL_VIEW_POS_TOP_EDGE,
- E_CAL_VIEW_POS_BOTTOM_EDGE
-} ECalViewPosition;
-
-#define E_CAL_VIEW_EVENT_FIELDS \
+ E_CALENDAR_VIEW_POS_OUTSIDE,
+ E_CALENDAR_VIEW_POS_NONE,
+ E_CALENDAR_VIEW_POS_EVENT,
+ E_CALENDAR_VIEW_POS_LEFT_EDGE,
+ E_CALENDAR_VIEW_POS_RIGHT_EDGE,
+ E_CALENDAR_VIEW_POS_TOP_EDGE,
+ E_CALENDAR_VIEW_POS_BOTTOM_EDGE
+} ECalendarViewPosition;
+
+#define E_CALENDAR_VIEW_EVENT_FIELDS \
GnomeCanvasItem *canvas_item; \
ECalModelComponent *comp_data; \
gboolean allocated_comp_data; \
@@ -59,76 +59,76 @@ typedef enum {
guint different_timezone : 1;
typedef struct {
- E_CAL_VIEW_EVENT_FIELDS
-} ECalViewEvent;
+ E_CALENDAR_VIEW_EVENT_FIELDS
+} ECalendarViewEvent;
-typedef struct _ECalView ECalView;
-typedef struct _ECalViewClass ECalViewClass;
-typedef struct _ECalViewPrivate ECalViewPrivate;
+typedef struct _ECalendarView ECalendarView;
+typedef struct _ECalendarViewClass ECalendarViewClass;
+typedef struct _ECalendarViewPrivate ECalendarViewPrivate;
-struct _ECalView {
+struct _ECalendarView {
GtkTable table;
- ECalViewPrivate *priv;
+ ECalendarViewPrivate *priv;
};
-struct _ECalViewClass {
+struct _ECalendarViewClass {
GtkTableClass parent_class;
/* Notification signals */
- void (* selection_changed) (ECalView *cal_view);
- void (* selected_time_changed) (ECalView *cal_view);
- void (* timezone_changed) (ECalView *cal_view, icaltimezone *old_zone, icaltimezone *new_zone);
- void (* event_changed) (ECalView *day_view, ECalViewEvent *event);
- void (* event_added) (ECalView *day_view, ECalViewEvent *event);
+ void (* selection_changed) (ECalendarView *cal_view);
+ void (* selected_time_changed) (ECalendarView *cal_view);
+ void (* timezone_changed) (ECalendarView *cal_view, icaltimezone *old_zone, icaltimezone *new_zone);
+ void (* event_changed) (ECalendarView *day_view, ECalendarViewEvent *event);
+ void (* event_added) (ECalendarView *day_view, ECalendarViewEvent *event);
/* Virtual methods */
- GList * (* get_selected_events) (ECalView *cal_view); /* a GList of ECalViewEvent's */
- void (* get_selected_time_range) (ECalView *cal_view, time_t *start_time, time_t *end_time);
- void (* set_selected_time_range) (ECalView *cal_view, time_t start_time, time_t end_time);
- gboolean (* get_visible_time_range) (ECalView *cal_view, time_t *start_time, time_t *end_time);
- void (* update_query) (ECalView *cal_view);
+ GList * (* get_selected_events) (ECalendarView *cal_view); /* a GList of ECalendarViewEvent's */
+ void (* get_selected_time_range) (ECalendarView *cal_view, time_t *start_time, time_t *end_time);
+ void (* set_selected_time_range) (ECalendarView *cal_view, time_t start_time, time_t end_time);
+ gboolean (* get_visible_time_range) (ECalendarView *cal_view, time_t *start_time, time_t *end_time);
+ void (* update_query) (ECalendarView *cal_view);
};
-GType e_cal_view_get_type (void);
-
-GnomeCalendar *e_cal_view_get_calendar (ECalView *cal_view);
-void e_cal_view_set_calendar (ECalView *cal_view, GnomeCalendar *calendar);
-ECalModel *e_cal_view_get_model (ECalView *cal_view);
-void e_cal_view_set_model (ECalView *cal_view, ECalModel *model);
-icaltimezone *e_cal_view_get_timezone (ECalView *cal_view);
-void e_cal_view_set_timezone (ECalView *cal_view, icaltimezone *zone);
-const char *e_cal_view_get_default_category (ECalView *cal_view);
-void e_cal_view_set_default_category (ECalView *cal_view, const char *category);
-gboolean e_cal_view_get_use_24_hour_format (ECalView *view);
-void e_cal_view_set_use_24_hour_format (ECalView *view, gboolean use_24_hour);
-
-void e_cal_view_set_status_message (ECalView *cal_view, const gchar *message);
-
-GList *e_cal_view_get_selected_events (ECalView *cal_view);
-void e_cal_view_get_selected_time_range (ECalView *cal_view, time_t *start_time, time_t *end_time);
-void e_cal_view_set_selected_time_range (ECalView *cal_view, time_t start_time, time_t end_time);
-gboolean e_cal_view_get_visible_time_range (ECalView *cal_view, time_t *start_time, time_t *end_time);
-void e_cal_view_update_query (ECalView *cal_view);
-
-void e_cal_view_cut_clipboard (ECalView *cal_view);
-void e_cal_view_copy_clipboard (ECalView *cal_view);
-void e_cal_view_paste_clipboard (ECalView *cal_view);
-void e_cal_view_delete_selected_event (ECalView *cal_view);
-void e_cal_view_delete_selected_events (ECalView *cal_view);
-void e_cal_view_delete_selected_occurrence (ECalView *cal_view);
-
-GtkMenu *e_cal_view_create_popup_menu (ECalView *cal_view);
-
-void e_cal_view_add_event (ECalView *cal_view, CalClient *client, time_t dtstart,
+GType e_calendar_view_get_type (void);
+
+GnomeCalendar *e_calendar_view_get_calendar (ECalendarView *cal_view);
+void e_calendar_view_set_calendar (ECalendarView *cal_view, GnomeCalendar *calendar);
+ECalModel *e_calendar_view_get_model (ECalendarView *cal_view);
+void e_calendar_view_set_model (ECalendarView *cal_view, ECalModel *model);
+icaltimezone *e_calendar_view_get_timezone (ECalendarView *cal_view);
+void e_calendar_view_set_timezone (ECalendarView *cal_view, icaltimezone *zone);
+const char *e_calendar_view_get_default_category (ECalendarView *cal_view);
+void e_calendar_view_set_default_category (ECalendarView *cal_view, const char *category);
+gboolean e_calendar_view_get_use_24_hour_format (ECalendarView *view);
+void e_calendar_view_set_use_24_hour_format (ECalendarView *view, gboolean use_24_hour);
+
+void e_calendar_view_set_status_message (ECalendarView *cal_view, const gchar *message);
+
+GList *e_calendar_view_get_selected_events (ECalendarView *cal_view);
+void e_calendar_view_get_selected_time_range (ECalendarView *cal_view, time_t *start_time, time_t *end_time);
+void e_calendar_view_set_selected_time_range (ECalendarView *cal_view, time_t start_time, time_t end_time);
+gboolean e_calendar_view_get_visible_time_range (ECalendarView *cal_view, time_t *start_time, time_t *end_time);
+void e_calendar_view_update_query (ECalendarView *cal_view);
+
+void e_calendar_view_cut_clipboard (ECalendarView *cal_view);
+void e_calendar_view_copy_clipboard (ECalendarView *cal_view);
+void e_calendar_view_paste_clipboard (ECalendarView *cal_view);
+void e_calendar_view_delete_selected_event (ECalendarView *cal_view);
+void e_calendar_view_delete_selected_events (ECalendarView *cal_view);
+void e_calendar_view_delete_selected_occurrence (ECalendarView *cal_view);
+
+GtkMenu *e_calendar_view_create_popup_menu (ECalendarView *cal_view);
+
+void e_calendar_view_add_event (ECalendarView *cal_view, ECal *client, time_t dtstart,
icaltimezone *default_zone, icalcomponent *icalcomp, gboolean in_top_canvas);
-void e_cal_view_new_appointment_for (ECalView *cal_view,
+void e_calendar_view_new_appointment_for (ECalendarView *cal_view,
time_t dtstart,
time_t dtend,
gboolean all_day,
gboolean meeting);
-void e_cal_view_new_appointment (ECalView *cal_view);
-void e_cal_view_edit_appointment (ECalView *cal_view,
- CalClient *client,
+void e_calendar_view_new_appointment (ECalendarView *cal_view);
+void e_calendar_view_edit_appointment (ECalendarView *cal_view,
+ ECal *client,
icalcomponent *icalcomp,
gboolean meeting);
diff --git a/calendar/gui/e-calendar-table.c b/calendar/gui/e-calendar-table.c
index fdea4d33bb..173887dab5 100644
--- a/calendar/gui/e-calendar-table.c
+++ b/calendar/gui/e-calendar-table.c
@@ -24,7 +24,7 @@
*/
/*
- * ECalendarTable - displays the CalComponent objects in a table (an ETable).
+ * ECalendarTable - displays the ECalComponent objects in a table (an ETable).
* Used for calendar events and tasks.
*/
@@ -188,30 +188,30 @@ compare_priorities (int *a, int *b)
* FIXME: Does this ever get called?? It doesn't seem to.
* I specified that the table should be sorted by this column, but it still
* never calls this function.
- * Also, this assumes it is passed pointers to CalComponents, but I think it
+ * Also, this assumes it is passed pointers to ECalComponents, but I think it
* may just be passed pointers to the 2 cell values.
*/
static gint
task_compare_cb (gconstpointer a, gconstpointer b)
{
- CalComponent *ca, *cb;
- CalComponentDateTime due_a, due_b;
+ ECalComponent *ca, *cb;
+ ECalComponentDateTime due_a, due_b;
int *prio_a, *prio_b;
int retval;
- ca = CAL_COMPONENT (a);
- cb = CAL_COMPONENT (b);
+ ca = E_CAL_COMPONENT (a);
+ cb = E_CAL_COMPONENT (b);
- cal_component_get_due (ca, &due_a);
- cal_component_get_due (cb, &due_b);
- cal_component_get_priority (ca, &prio_a);
- cal_component_get_priority (cb, &prio_b);
+ e_cal_component_get_due (ca, &due_a);
+ e_cal_component_get_due (cb, &due_b);
+ e_cal_component_get_priority (ca, &prio_a);
+ e_cal_component_get_priority (cb, &prio_b);
if (due_a.value && due_b.value) {
int v;
/* FIXME: TIMEZONES. But currently we have no way to get the
- CalClient, so we can't get the timezone. */
+ ECal, so we can't get the timezone. */
v = icaltime_compare (*due_a.value, *due_b.value);
if (v == 0)
@@ -225,14 +225,14 @@ task_compare_cb (gconstpointer a, gconstpointer b)
else
retval = compare_priorities (prio_a, prio_b);
- cal_component_free_datetime (&due_a);
- cal_component_free_datetime (&due_b);
+ e_cal_component_free_datetime (&due_a);
+ e_cal_component_free_datetime (&due_b);
if (prio_a)
- cal_component_free_priority (prio_a);
+ e_cal_component_free_priority (prio_a);
if (prio_b)
- cal_component_free_priority (prio_b);
+ e_cal_component_free_priority (prio_b);
return retval;
}
@@ -287,8 +287,8 @@ priority_compare_cb (gconstpointer a, gconstpointer b)
{
int priority1, priority2;
- priority1 = cal_util_priority_from_string ((const char*) a);
- priority2 = cal_util_priority_from_string ((const char*) b);
+ priority1 = e_cal_util_priority_from_string ((const char*) a);
+ priority2 = e_cal_util_priority_from_string ((const char*) b);
/* We change undefined priorities so they appear after 'Low'. */
if (priority1 <= 0)
@@ -727,9 +727,9 @@ delete_selected_components (ECalendarTable *cal_table)
ECalModelComponent *comp_data = (ECalModelComponent *) l->data;
GError *error = NULL;
- cal_client_remove_object (comp_data->client,
+ e_cal_remove_object (comp_data->client,
icalcomponent_get_uid (comp_data->icalcomp), &error);
- delete_error_dialog (error, CAL_COMPONENT_TODO);
+ delete_error_dialog (error, E_CAL_COMPONENT_TODO);
g_clear_error (&error);
}
@@ -750,7 +750,7 @@ e_calendar_table_delete_selected (ECalendarTable *cal_table)
ETable *etable;
int n_selected;
ECalModelComponent *comp_data;
- CalComponent *comp;
+ ECalComponent *comp;
g_return_if_fail (cal_table != NULL);
g_return_if_fail (E_IS_CALENDAR_TABLE (cal_table));
@@ -768,11 +768,11 @@ e_calendar_table_delete_selected (ECalendarTable *cal_table)
/* FIXME: this may be something other than a TODO component */
- comp = cal_component_new ();
+ comp = e_cal_component_new ();
if (comp_data)
- cal_component_set_icalcomponent (comp, icalcomponent_new_clone (comp_data->icalcomp));
+ e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (comp_data->icalcomp));
- if (delete_component_dialog (comp, FALSE, n_selected, CAL_COMPONENT_TODO,
+ if (delete_component_dialog (comp, FALSE, n_selected, E_CAL_COMPONENT_TODO,
GTK_WIDGET (cal_table)))
delete_selected_components (cal_table);
@@ -813,7 +813,7 @@ copy_row_cb (int model_row, gpointer data)
return;
/* add timezones to the VCALENDAR component */
- cal_util_add_timezones_from_component (cal_table->tmp_vcal, comp_data->icalcomp);
+ e_cal_util_add_timezones_from_component (cal_table->tmp_vcal, comp_data->icalcomp);
/* add the new component to the VCALENDAR component */
comp_str = icalcomponent_as_ical_string (comp_data->icalcomp);
@@ -845,7 +845,7 @@ e_calendar_table_copy_clipboard (ECalendarTable *cal_table)
}
/* create temporary VCALENDAR object */
- cal_table->tmp_vcal = cal_util_new_top_level ();
+ cal_table->tmp_vcal = e_cal_util_new_top_level ();
etable = e_table_scrolled_get_table (E_TABLE_SCROLLED (cal_table->etable));
e_table_selected_row_foreach (etable, copy_row_cb, cal_table);
@@ -886,12 +886,12 @@ open_task (ECalendarTable *cal_table, ECalModelComponent *comp_data, gboolean as
tedit = e_comp_editor_registry_find (comp_editor_registry, uid);
if (tedit == NULL) {
- CalComponent *comp;
+ ECalComponent *comp;
tedit = COMP_EDITOR (task_editor_new (comp_data->client));
- comp = cal_component_new ();
- cal_component_set_icalcomponent (comp, icalcomponent_new_clone (comp_data->icalcomp));
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (comp_data->icalcomp));
comp_editor_edit_comp (tedit, comp);
if (assign)
task_editor_show_assignment (TASK_EDITOR (tedit));
@@ -1074,11 +1074,11 @@ e_calendar_table_show_popup_menu (ETable *table,
} else
hide_mask = MASK_SINGLE;
- cal_client_is_read_only (comp_data->client, &read_only, NULL);
+ e_cal_is_read_only (comp_data->client, &read_only, NULL);
if (!read_only)
disable_mask |= MASK_EDITABLE;
- if (cal_client_get_static_capability (comp_data->client, CAL_STATIC_CAPABILITY_NO_TASK_ASSIGNMENT))
+ if (e_cal_get_static_capability (comp_data->client, CAL_STATIC_CAPABILITY_NO_TASK_ASSIGNMENT))
disable_mask |= MASK_ASSIGNABLE;
setup_popup_icons (tasks_popup_menu);
@@ -1143,7 +1143,7 @@ e_calendar_table_on_save_as (GtkWidget *widget, gpointer data)
if (filename == NULL)
return;
- ical_string = cal_client_get_component_as_string (comp_data->client, comp_data->icalcomp);
+ ical_string = e_cal_get_component_as_string (comp_data->client, comp_data->icalcomp);
if (ical_string == NULL) {
g_warning ("Couldn't convert item to a string");
return;
@@ -1165,7 +1165,7 @@ e_calendar_table_on_print_task (GtkWidget *widget, gpointer data)
{
ECalendarTable *cal_table;
ECalModelComponent *comp_data;
- CalComponent *comp;
+ ECalComponent *comp;
cal_table = E_CALENDAR_TABLE (data);
@@ -1173,8 +1173,8 @@ e_calendar_table_on_print_task (GtkWidget *widget, gpointer data)
if (comp_data == NULL)
return;
- comp = cal_component_new ();
- cal_component_set_icalcomponent (comp, icalcomponent_new_clone (comp_data->icalcomp));
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (comp_data->icalcomp));
print_comp (comp, comp_data->client, FALSE);
g_object_unref (comp);
@@ -1230,11 +1230,11 @@ e_calendar_table_on_forward (GtkWidget *widget, gpointer data)
comp_data = get_selected_comp (cal_table);
if (comp_data) {
- CalComponent *comp;
+ ECalComponent *comp;
- comp = cal_component_new ();
- cal_component_set_icalcomponent (comp, icalcomponent_new_clone (comp_data->icalcomp));
- itip_send_comp (CAL_COMPONENT_METHOD_PUBLISH, comp, comp_data->client, NULL);
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (comp_data->icalcomp));
+ itip_send_comp (E_CAL_COMPONENT_METHOD_PUBLISH, comp, comp_data->client, NULL);
g_object_unref (comp);
}
@@ -1318,8 +1318,8 @@ selection_received (GtkWidget *invisible,
char *comp_str;
icalcomponent *icalcomp;
char *uid;
- CalComponent *comp;
- CalClient *client;
+ ECalComponent *comp;
+ ECal *client;
icalcomponent_kind kind;
g_return_if_fail (E_IS_CALENDAR_TABLE (cal_table));
@@ -1360,18 +1360,18 @@ selection_received (GtkWidget *invisible,
if (child_kind == ICAL_VEVENT_COMPONENT ||
child_kind == ICAL_VTODO_COMPONENT ||
child_kind == ICAL_VJOURNAL_COMPONENT) {
- CalComponent *tmp_comp;
+ ECalComponent *tmp_comp;
- uid = cal_component_gen_uid ();
- tmp_comp = cal_component_new ();
- cal_component_set_icalcomponent (
+ uid = e_cal_component_gen_uid ();
+ tmp_comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (
tmp_comp, icalcomponent_new_clone (subcomp));
- cal_component_set_uid (tmp_comp, uid);
+ e_cal_component_set_uid (tmp_comp, uid);
free (uid);
/* FIXME should we convert start/due/complete times? */
/* FIXME Error handling */
- cal_client_create_object (client, cal_component_get_icalcomponent (tmp_comp), NULL, NULL);
+ e_cal_create_object (client, e_cal_component_get_icalcomponent (tmp_comp), NULL, NULL);
g_object_unref (tmp_comp);
}
@@ -1380,13 +1380,13 @@ selection_received (GtkWidget *invisible,
}
}
else {
- comp = cal_component_new ();
- cal_component_set_icalcomponent (comp, icalcomp);
- uid = cal_component_gen_uid ();
- cal_component_set_uid (comp, (const char *) uid);
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (comp, icalcomp);
+ uid = e_cal_component_gen_uid ();
+ e_cal_component_set_uid (comp, (const char *) uid);
free (uid);
- cal_client_create_object (client, cal_component_get_icalcomponent (comp), NULL, NULL);
+ e_cal_create_object (client, e_cal_component_get_icalcomponent (comp), NULL, NULL);
g_object_unref (comp);
}
diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c
index 2e392560cd..332019cf2c 100644
--- a/calendar/gui/e-calendar-view.c
+++ b/calendar/gui/e-calendar-view.c
@@ -29,8 +29,8 @@
#include <libgnome/gnome-i18n.h>
#include <gal/util/e-util.h>
#include "e-util/e-dialog-utils.h"
-#include "cal-util/cal-util-marshal.h"
-#include "cal-util/timeutil.h"
+#include "e-calendar-marshal.h"
+#include <libecal/e-cal-time-util.h>
#include "evolution-activity-client.h"
#include "calendar-commands.h"
#include "calendar-config.h"
@@ -53,7 +53,7 @@
#define EVOLUTION_CALENDAR_PROGRESS_IMAGE "evolution-calendar-mini.png"
static GdkPixbuf *progress_icon[2] = { NULL, NULL };
-struct _ECalViewPrivate {
+struct _ECalendarViewPrivate {
/* The GnomeCalendar we are associated to */
GnomeCalendar *calendar;
@@ -74,11 +74,11 @@ struct _ECalViewPrivate {
char *default_category;
};
-static void e_cal_view_class_init (ECalViewClass *klass);
-static void e_cal_view_init (ECalView *cal_view, ECalViewClass *klass);
-static void e_cal_view_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
-static void e_cal_view_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
-static void e_cal_view_destroy (GtkObject *object);
+static void e_calendar_view_class_init (ECalendarViewClass *klass);
+static void e_calendar_view_init (ECalendarView *cal_view, ECalendarViewClass *klass);
+static void e_calendar_view_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void e_calendar_view_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static void e_calendar_view_destroy (GtkObject *object);
static GObjectClass *parent_class = NULL;
static GdkAtom clipboard_atom = GDK_NONE;
@@ -101,20 +101,20 @@ enum {
LAST_SIGNAL
};
-static guint e_cal_view_signals[LAST_SIGNAL] = { 0 };
+static guint e_calendar_view_signals[LAST_SIGNAL] = { 0 };
static void
-e_cal_view_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+e_calendar_view_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
{
- ECalView *cal_view;
- ECalViewPrivate *priv;
+ ECalendarView *cal_view;
+ ECalendarViewPrivate *priv;
- cal_view = E_CAL_VIEW (object);
+ cal_view = E_CALENDAR_VIEW (object);
priv = cal_view->priv;
switch (property_id) {
case PROP_MODEL:
- e_cal_view_set_model (cal_view, E_CAL_MODEL (g_value_get_object (value)));
+ e_calendar_view_set_model (cal_view, E_CAL_MODEL (g_value_get_object (value)));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
@@ -123,17 +123,17 @@ e_cal_view_set_property (GObject *object, guint property_id, const GValue *value
}
static void
-e_cal_view_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+e_calendar_view_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
{
- ECalView *cal_view;
- ECalViewPrivate *priv;
+ ECalendarView *cal_view;
+ ECalendarViewPrivate *priv;
- cal_view = E_CAL_VIEW (object);
+ cal_view = E_CALENDAR_VIEW (object);
priv = cal_view->priv;
switch (property_id) {
case PROP_MODEL:
- g_value_set_object (value, e_cal_view_get_model (cal_view));
+ g_value_set_object (value, e_calendar_view_get_model (cal_view));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
@@ -142,7 +142,7 @@ e_cal_view_get_property (GObject *object, guint property_id, GValue *value, GPar
}
static void
-e_cal_view_class_init (ECalViewClass *klass)
+e_calendar_view_class_init (ECalendarViewClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GtkObjectClass *object_class = GTK_OBJECT_CLASS (klass);
@@ -150,9 +150,9 @@ e_cal_view_class_init (ECalViewClass *klass)
parent_class = g_type_class_peek_parent (klass);
/* Method override */
- gobject_class->set_property = e_cal_view_set_property;
- gobject_class->get_property = e_cal_view_get_property;
- object_class->destroy = e_cal_view_destroy;
+ gobject_class->set_property = e_calendar_view_set_property;
+ gobject_class->get_property = e_calendar_view_get_property;
+ object_class->destroy = e_calendar_view_destroy;
klass->selection_changed = NULL;
klass->selected_time_changed = NULL;
@@ -171,46 +171,46 @@ e_cal_view_class_init (ECalViewClass *klass)
| G_PARAM_CONSTRUCT));
/* Create class' signals */
- e_cal_view_signals[SELECTION_CHANGED] =
+ e_calendar_view_signals[SELECTION_CHANGED] =
g_signal_new ("selection_changed",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ECalViewClass, selection_changed),
+ G_STRUCT_OFFSET (ECalendarViewClass, selection_changed),
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
- e_cal_view_signals[SELECTED_TIME_CHANGED] =
+ e_calendar_view_signals[SELECTED_TIME_CHANGED] =
g_signal_new ("selected_time_changed",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ECalViewClass, selected_time_changed),
+ G_STRUCT_OFFSET (ECalendarViewClass, selected_time_changed),
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
- e_cal_view_signals[TIMEZONE_CHANGED] =
+ e_calendar_view_signals[TIMEZONE_CHANGED] =
g_signal_new ("timezone_changed",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ECalViewClass, timezone_changed),
+ G_STRUCT_OFFSET (ECalendarViewClass, timezone_changed),
NULL, NULL,
- cal_util_marshal_VOID__POINTER_POINTER,
+ e_calendar_marshal_VOID__POINTER_POINTER,
G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_POINTER);
- e_cal_view_signals[EVENT_CHANGED] =
+ e_calendar_view_signals[EVENT_CHANGED] =
g_signal_new ("event_changed",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
- G_STRUCT_OFFSET (ECalViewClass, event_changed),
+ G_STRUCT_OFFSET (ECalendarViewClass, event_changed),
NULL, NULL,
g_cclosure_marshal_VOID__POINTER,
G_TYPE_NONE, 1,
G_TYPE_POINTER);
- e_cal_view_signals[EVENT_ADDED] =
+ e_calendar_view_signals[EVENT_ADDED] =
g_signal_new ("event_added",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
- G_STRUCT_OFFSET (ECalViewClass, event_added),
+ G_STRUCT_OFFSET (ECalendarViewClass, event_added),
NULL, NULL,
g_cclosure_marshal_VOID__POINTER,
G_TYPE_NONE, 1,
@@ -227,33 +227,33 @@ e_cal_view_class_init (ECalViewClass *klass)
static void
model_changed_cb (ETableModel *etm, gpointer user_data)
{
- ECalView *cal_view = E_CAL_VIEW (user_data);
+ ECalendarView *cal_view = E_CALENDAR_VIEW (user_data);
- e_cal_view_update_query (cal_view);
+ e_calendar_view_update_query (cal_view);
}
static void
model_row_changed_cb (ETableModel *etm, int row, gpointer user_data)
{
- ECalView *cal_view = E_CAL_VIEW (user_data);
+ ECalendarView *cal_view = E_CALENDAR_VIEW (user_data);
- e_cal_view_update_query (cal_view);
+ e_calendar_view_update_query (cal_view);
}
static void
model_cell_changed_cb (ETableModel *etm, int col, int row, gpointer user_data)
{
- ECalView *cal_view = E_CAL_VIEW (user_data);
+ ECalendarView *cal_view = E_CALENDAR_VIEW (user_data);
- e_cal_view_update_query (cal_view);
+ e_calendar_view_update_query (cal_view);
}
static void
model_rows_changed_cb (ETableModel *etm, int row, int count, gpointer user_data)
{
- ECalView *cal_view = E_CAL_VIEW (user_data);
+ ECalendarView *cal_view = E_CALENDAR_VIEW (user_data);
- e_cal_view_update_query (cal_view);
+ e_calendar_view_update_query (cal_view);
}
static void
@@ -261,7 +261,7 @@ selection_get (GtkWidget *invisible,
GtkSelectionData *selection_data,
guint info,
guint time_stamp,
- ECalView *cal_view)
+ ECalendarView *cal_view)
{
if (cal_view->priv->clipboard_selection != NULL) {
gtk_selection_data_set (selection_data,
@@ -275,7 +275,7 @@ selection_get (GtkWidget *invisible,
static void
selection_clear_event (GtkWidget *invisible,
GdkEventSelection *event,
- ECalView *cal_view)
+ ECalendarView *cal_view)
{
if (cal_view->priv->clipboard_selection != NULL) {
g_free (cal_view->priv->clipboard_selection);
@@ -284,10 +284,10 @@ selection_clear_event (GtkWidget *invisible,
}
void
-e_cal_view_add_event (ECalView *cal_view, CalClient *client, time_t dtstart,
+e_calendar_view_add_event (ECalendarView *cal_view, ECal *client, time_t dtstart,
icaltimezone *default_zone, icalcomponent *icalcomp, gboolean in_top_canvas)
{
- CalComponent *comp;
+ ECalComponent *comp;
struct icaltimetype itime, old_dtstart, old_dtend;
time_t tt_start, tt_end, new_dtstart;
struct icaldurationtype ic_dur;
@@ -331,18 +331,18 @@ e_cal_view_add_event (ECalView *cal_view, CalClient *client, time_t dtstart,
icalcomponent_set_dtend (icalcomp, itime);
/* FIXME The new uid stuff can go away once we actually set it in the backend */
- uid = cal_component_gen_uid ();
- comp = cal_component_new ();
- cal_component_set_icalcomponent (
+ uid = e_cal_component_gen_uid ();
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (
comp, icalcomponent_new_clone (icalcomp));
- cal_component_set_uid (comp, uid);
+ e_cal_component_set_uid (comp, uid);
/* FIXME Error handling */
- if (cal_client_create_object (client, cal_component_get_icalcomponent (comp), NULL, NULL)) {
+ if (e_cal_create_object (client, e_cal_component_get_icalcomponent (comp), NULL, NULL)) {
if (itip_organizer_is_user (comp, client) &&
send_component_dialog ((GtkWindow *) gtk_widget_get_toplevel (GTK_WIDGET (cal_view)),
client, comp, TRUE)) {
- itip_send_comp (CAL_COMPONENT_METHOD_REQUEST, comp,
+ itip_send_comp (E_CAL_COMPONENT_METHOD_REQUEST, comp,
client, NULL);
}
} else {
@@ -357,16 +357,16 @@ static void
selection_received (GtkWidget *invisible,
GtkSelectionData *selection_data,
guint time,
- ECalView *cal_view)
+ ECalendarView *cal_view)
{
char *comp_str, *default_tzid;
icalcomponent *icalcomp;
icalcomponent_kind kind;
time_t selected_time_start, selected_time_end;
icaltimezone *default_zone;
- CalClient *client;
+ ECal *client;
- g_return_if_fail (E_IS_CAL_VIEW (cal_view));
+ g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
if (selection_data->length < 0 ||
selection_data->type != GDK_SELECTION_TYPE_STRING) {
@@ -382,7 +382,7 @@ selection_received (GtkWidget *invisible,
client = e_cal_model_get_default_client (cal_view->priv->model);
/* FIXME Error checking */
- cal_client_get_timezone (client, default_tzid, &default_zone, NULL);
+ e_cal_get_timezone (client, default_tzid, &default_zone, NULL);
/* check the type of the component */
/* FIXME An error dialog if we return? */
@@ -390,8 +390,8 @@ selection_received (GtkWidget *invisible,
if (kind != ICAL_VCALENDAR_COMPONENT && kind != ICAL_VEVENT_COMPONENT)
return;
- e_cal_view_set_status_message (cal_view, _("Updating objects"));
- e_cal_view_get_selected_time_range (cal_view, &selected_time_start, &selected_time_end);
+ e_calendar_view_set_status_message (cal_view, _("Updating objects"));
+ e_calendar_view_get_selected_time_range (cal_view, &selected_time_start, &selected_time_end);
/* FIXME Timezone handling */
if (kind == ICAL_VCALENDAR_COMPONENT) {
@@ -402,14 +402,14 @@ selection_received (GtkWidget *invisible,
while (subcomp) {
child_kind = icalcomponent_isa (subcomp);
if (child_kind == ICAL_VEVENT_COMPONENT)
- e_cal_view_add_event (cal_view, client, selected_time_start,
+ e_calendar_view_add_event (cal_view, client, selected_time_start,
default_zone, subcomp, FALSE);
else if (child_kind == ICAL_VTIMEZONE_COMPONENT) {
icaltimezone *zone;
zone = icaltimezone_new ();
icaltimezone_set_component (zone, subcomp);
- cal_client_add_timezone (client, zone, NULL);
+ e_cal_add_timezone (client, zone, NULL);
icaltimezone_free (zone, 1);
}
@@ -421,16 +421,16 @@ selection_received (GtkWidget *invisible,
icalcomponent_free (icalcomp);
} else {
- e_cal_view_add_event (cal_view, client, selected_time_start, default_zone, icalcomp, FALSE);
+ e_calendar_view_add_event (cal_view, client, selected_time_start, default_zone, icalcomp, FALSE);
}
- e_cal_view_set_status_message (cal_view, NULL);
+ e_calendar_view_set_status_message (cal_view, NULL);
}
static void
-e_cal_view_init (ECalView *cal_view, ECalViewClass *klass)
+e_calendar_view_init (ECalendarView *cal_view, ECalendarViewClass *klass)
{
- cal_view->priv = g_new0 (ECalViewPrivate, 1);
+ cal_view->priv = g_new0 (ECalendarViewPrivate, 1);
cal_view->priv->model = (ECalModel *) e_cal_model_calendar_new ();
g_signal_connect (G_OBJECT (cal_view->priv->model), "model_changed",
@@ -461,11 +461,11 @@ e_cal_view_init (ECalView *cal_view, ECalViewClass *klass)
}
static void
-e_cal_view_destroy (GtkObject *object)
+e_calendar_view_destroy (GtkObject *object)
{
- ECalView *cal_view = (ECalView *) object;
+ ECalendarView *cal_view = (ECalendarView *) object;
- g_return_if_fail (E_IS_CAL_VIEW (cal_view));
+ g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
if (cal_view->priv) {
if (cal_view->priv->model) {
@@ -504,37 +504,37 @@ e_cal_view_destroy (GtkObject *object)
GTK_OBJECT_CLASS (parent_class)->destroy (object);
}
-E_MAKE_TYPE (e_cal_view, "ECalView", ECalView, e_cal_view_class_init,
- e_cal_view_init, GTK_TYPE_TABLE);
+E_MAKE_TYPE (e_calendar_view, "ECalendarView", ECalendarView, e_calendar_view_class_init,
+ e_calendar_view_init, GTK_TYPE_TABLE);
GnomeCalendar *
-e_cal_view_get_calendar (ECalView *cal_view)
+e_calendar_view_get_calendar (ECalendarView *cal_view)
{
- g_return_val_if_fail (E_IS_CAL_VIEW (cal_view), NULL);
+ g_return_val_if_fail (E_IS_CALENDAR_VIEW (cal_view), NULL);
return cal_view->priv->calendar;
}
void
-e_cal_view_set_calendar (ECalView *cal_view, GnomeCalendar *calendar)
+e_calendar_view_set_calendar (ECalendarView *cal_view, GnomeCalendar *calendar)
{
- g_return_if_fail (E_IS_CAL_VIEW (cal_view));
+ g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
cal_view->priv->calendar = calendar;
}
ECalModel *
-e_cal_view_get_model (ECalView *cal_view)
+e_calendar_view_get_model (ECalendarView *cal_view)
{
- g_return_val_if_fail (E_IS_CAL_VIEW (cal_view), NULL);
+ g_return_val_if_fail (E_IS_CALENDAR_VIEW (cal_view), NULL);
return cal_view->priv->model;
}
void
-e_cal_view_set_model (ECalView *cal_view, ECalModel *model)
+e_calendar_view_set_model (ECalendarView *cal_view, ECalModel *model)
{
- g_return_if_fail (E_IS_CAL_VIEW (cal_view));
+ g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
g_return_if_fail (E_IS_CAL_MODEL (model));
if (cal_view->priv->model) {
@@ -551,41 +551,41 @@ e_cal_view_set_model (ECalView *cal_view, ECalModel *model)
g_signal_connect (G_OBJECT (cal_view->priv->model), "model_rows_inserted", G_CALLBACK (model_rows_changed_cb), cal_view);
g_signal_connect (G_OBJECT (cal_view->priv->model), "model_rows_deleted", G_CALLBACK (model_rows_changed_cb), cal_view);
- e_cal_view_update_query (cal_view);
+ e_calendar_view_update_query (cal_view);
}
icaltimezone *
-e_cal_view_get_timezone (ECalView *cal_view)
+e_calendar_view_get_timezone (ECalendarView *cal_view)
{
- g_return_val_if_fail (E_IS_CAL_VIEW (cal_view), NULL);
+ g_return_val_if_fail (E_IS_CALENDAR_VIEW (cal_view), NULL);
return e_cal_model_get_timezone (cal_view->priv->model);
}
void
-e_cal_view_set_timezone (ECalView *cal_view, icaltimezone *zone)
+e_calendar_view_set_timezone (ECalendarView *cal_view, icaltimezone *zone)
{
icaltimezone *old_zone;
- g_return_if_fail (E_IS_CAL_VIEW (cal_view));
+ g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
old_zone = e_cal_model_get_timezone (cal_view->priv->model);
if (old_zone == zone)
return;
e_cal_model_set_timezone (cal_view->priv->model, zone);
- g_signal_emit (G_OBJECT (cal_view), e_cal_view_signals[TIMEZONE_CHANGED], 0,
+ g_signal_emit (G_OBJECT (cal_view), e_calendar_view_signals[TIMEZONE_CHANGED], 0,
old_zone, zone);
}
const char *
-e_cal_view_get_default_category (ECalView *cal_view)
+e_calendar_view_get_default_category (ECalendarView *cal_view)
{
- g_return_val_if_fail (E_IS_CAL_VIEW (cal_view), NULL);
+ g_return_val_if_fail (E_IS_CALENDAR_VIEW (cal_view), NULL);
return (const char *) cal_view->priv->default_category;
}
/**
- * e_cal_view_set_default_category
+ * e_calendar_view_set_default_category
* @cal_view: A calendar view.
* @category: Default category name or NULL for no category.
*
@@ -593,9 +593,9 @@ e_cal_view_get_default_category (ECalView *cal_view)
* components from the given calendar view.
*/
void
-e_cal_view_set_default_category (ECalView *cal_view, const char *category)
+e_calendar_view_set_default_category (ECalendarView *cal_view, const char *category)
{
- g_return_if_fail (E_IS_CAL_VIEW (cal_view));
+ g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
if (cal_view->priv->default_category)
g_free (cal_view->priv->default_category);
@@ -604,7 +604,7 @@ e_cal_view_set_default_category (ECalView *cal_view, const char *category)
}
/**
- * e_cal_view_get_use_24_hour_format:
+ * e_calendar_view_get_use_24_hour_format:
* @cal_view: A calendar view.
*
* Gets whether the view is using 24 hour times or not.
@@ -612,32 +612,32 @@ e_cal_view_set_default_category (ECalView *cal_view, const char *category)
* Returns: the 24 hour setting.
*/
gboolean
-e_cal_view_get_use_24_hour_format (ECalView *cal_view)
+e_calendar_view_get_use_24_hour_format (ECalendarView *cal_view)
{
- g_return_val_if_fail (E_IS_CAL_VIEW (cal_view), FALSE);
+ g_return_val_if_fail (E_IS_CALENDAR_VIEW (cal_view), FALSE);
return e_cal_model_get_use_24_hour_format (cal_view->priv->model);
}
/**
- * e_cal_view_set_use_24_hour_format
+ * e_calendar_view_set_use_24_hour_format
* @cal_view: A calendar view.
* @use_24_hour: Whether to use 24 hour times or not.
*
* Sets the 12/24 hour times setting for the given view.
*/
void
-e_cal_view_set_use_24_hour_format (ECalView *cal_view, gboolean use_24_hour)
+e_calendar_view_set_use_24_hour_format (ECalendarView *cal_view, gboolean use_24_hour)
{
- g_return_if_fail (E_IS_CAL_VIEW (cal_view));
+ g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
e_cal_model_set_use_24_hour_format (cal_view->priv->model, use_24_hour);
}
void
-e_cal_view_set_status_message (ECalView *cal_view, const gchar *message)
+e_calendar_view_set_status_message (ECalendarView *cal_view, const gchar *message)
{
- g_return_if_fail (E_IS_CAL_VIEW (cal_view));
+ g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
if (!message || !*message) {
if (cal_view->priv->activity) {
@@ -665,45 +665,45 @@ e_cal_view_set_status_message (ECalView *cal_view, const gchar *message)
}
GList *
-e_cal_view_get_selected_events (ECalView *cal_view)
+e_calendar_view_get_selected_events (ECalendarView *cal_view)
{
- g_return_val_if_fail (E_IS_CAL_VIEW (cal_view), NULL);
+ g_return_val_if_fail (E_IS_CALENDAR_VIEW (cal_view), NULL);
- if (E_CAL_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->get_selected_events)
- return E_CAL_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->get_selected_events (cal_view);
+ if (E_CALENDAR_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->get_selected_events)
+ return E_CALENDAR_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->get_selected_events (cal_view);
return NULL;
}
void
-e_cal_view_get_selected_time_range (ECalView *cal_view, time_t *start_time, time_t *end_time)
+e_calendar_view_get_selected_time_range (ECalendarView *cal_view, time_t *start_time, time_t *end_time)
{
- g_return_if_fail (E_IS_CAL_VIEW (cal_view));
+ g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
- if (E_CAL_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->get_selected_time_range) {
- E_CAL_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->get_selected_time_range (
+ if (E_CALENDAR_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->get_selected_time_range) {
+ E_CALENDAR_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->get_selected_time_range (
cal_view, start_time, end_time);
}
}
void
-e_cal_view_set_selected_time_range (ECalView *cal_view, time_t start_time, time_t end_time)
+e_calendar_view_set_selected_time_range (ECalendarView *cal_view, time_t start_time, time_t end_time)
{
- g_return_if_fail (E_IS_CAL_VIEW (cal_view));
+ g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
- if (E_CAL_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->set_selected_time_range) {
- E_CAL_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->set_selected_time_range (
+ if (E_CALENDAR_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->set_selected_time_range) {
+ E_CALENDAR_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->set_selected_time_range (
cal_view, start_time, end_time);
}
}
gboolean
-e_cal_view_get_visible_time_range (ECalView *cal_view, time_t *start_time, time_t *end_time)
+e_calendar_view_get_visible_time_range (ECalendarView *cal_view, time_t *start_time, time_t *end_time)
{
- g_return_val_if_fail (E_IS_CAL_VIEW (cal_view), FALSE);
+ g_return_val_if_fail (E_IS_CALENDAR_VIEW (cal_view), FALSE);
- if (E_CAL_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->get_visible_time_range) {
- return E_CAL_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->get_visible_time_range (
+ if (E_CALENDAR_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->get_visible_time_range) {
+ return E_CALENDAR_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->get_visible_time_range (
cal_view, start_time, end_time);
}
@@ -711,91 +711,91 @@ e_cal_view_get_visible_time_range (ECalView *cal_view, time_t *start_time, time_
}
void
-e_cal_view_update_query (ECalView *cal_view)
+e_calendar_view_update_query (ECalendarView *cal_view)
{
- g_return_if_fail (E_IS_CAL_VIEW (cal_view));
+ g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
- e_cal_view_set_status_message (cal_view, _("Searching"));
+ e_calendar_view_set_status_message (cal_view, _("Searching"));
- if (E_CAL_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->update_query) {
- E_CAL_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->update_query (cal_view);
+ if (E_CALENDAR_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->update_query) {
+ E_CALENDAR_VIEW_CLASS (G_OBJECT_GET_CLASS (cal_view))->update_query (cal_view);
}
- e_cal_view_set_status_message (cal_view, NULL);
+ e_calendar_view_set_status_message (cal_view, NULL);
}
void
-e_cal_view_cut_clipboard (ECalView *cal_view)
+e_calendar_view_cut_clipboard (ECalendarView *cal_view)
{
GList *selected, *l;
const char *uid;
- g_return_if_fail (E_IS_CAL_VIEW (cal_view));
+ g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
- selected = e_cal_view_get_selected_events (cal_view);
+ selected = e_calendar_view_get_selected_events (cal_view);
if (!selected)
return;
- e_cal_view_set_status_message (cal_view, _("Deleting selected objects"));
+ e_calendar_view_set_status_message (cal_view, _("Deleting selected objects"));
- e_cal_view_copy_clipboard (cal_view);
+ e_calendar_view_copy_clipboard (cal_view);
for (l = selected; l != NULL; l = l->next) {
- CalComponent *comp;
- ECalViewEvent *event = (ECalViewEvent *) l->data;
+ ECalComponent *comp;
+ ECalendarViewEvent *event = (ECalendarViewEvent *) l->data;
GError *error = NULL;
if (!event)
continue;
- comp = cal_component_new ();
- cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
if (itip_organizer_is_user (comp, event->comp_data->client)
&& cancel_component_dialog ((GtkWindow *) gtk_widget_get_toplevel (GTK_WIDGET (cal_view)),
event->comp_data->client, comp, TRUE))
- itip_send_comp (CAL_COMPONENT_METHOD_CANCEL, comp,
+ itip_send_comp (E_CAL_COMPONENT_METHOD_CANCEL, comp,
event->comp_data->client, NULL);
- cal_component_get_uid (comp, &uid);
- cal_client_remove_object (event->comp_data->client, uid, &error);
- delete_error_dialog (error, CAL_COMPONENT_EVENT);
+ e_cal_component_get_uid (comp, &uid);
+ e_cal_remove_object (event->comp_data->client, uid, &error);
+ delete_error_dialog (error, E_CAL_COMPONENT_EVENT);
g_clear_error (&error);
g_object_unref (comp);
}
- e_cal_view_set_status_message (cal_view, NULL);
+ e_calendar_view_set_status_message (cal_view, NULL);
g_list_free (selected);
}
void
-e_cal_view_copy_clipboard (ECalView *cal_view)
+e_calendar_view_copy_clipboard (ECalendarView *cal_view)
{
GList *selected, *l;
gchar *comp_str;
icalcomponent *vcal_comp;
icalcomponent *new_icalcomp;
- ECalViewEvent *event;
+ ECalendarViewEvent *event;
- g_return_if_fail (E_IS_CAL_VIEW (cal_view));
+ g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
- selected = e_cal_view_get_selected_events (cal_view);
+ selected = e_calendar_view_get_selected_events (cal_view);
if (!selected)
return;
/* create top-level VCALENDAR component and add VTIMEZONE's */
- vcal_comp = cal_util_new_top_level ();
+ vcal_comp = e_cal_util_new_top_level ();
for (l = selected; l != NULL; l = l->next) {
- event = (ECalViewEvent *) l->data;
+ event = (ECalendarViewEvent *) l->data;
if (event)
- cal_util_add_timezones_from_component (vcal_comp, event->comp_data->icalcomp);
+ e_cal_util_add_timezones_from_component (vcal_comp, event->comp_data->icalcomp);
}
for (l = selected; l != NULL; l = l->next) {
- event = (ECalViewEvent *) l->data;
+ event = (ECalendarViewEvent *) l->data;
new_icalcomp = icalcomponent_new_clone (event->comp_data->icalcomp);
icalcomponent_add_component (vcal_comp, new_icalcomp);
@@ -814,9 +814,9 @@ e_cal_view_copy_clipboard (ECalView *cal_view)
}
void
-e_cal_view_paste_clipboard (ECalView *cal_view)
+e_calendar_view_paste_clipboard (ECalendarView *cal_view)
{
- g_return_if_fail (E_IS_CAL_VIEW (cal_view));
+ g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
gtk_selection_convert (cal_view->priv->invisible,
clipboard_atom,
@@ -825,14 +825,14 @@ e_cal_view_paste_clipboard (ECalView *cal_view)
}
static void
-delete_event (ECalView *cal_view, ECalViewEvent *event)
+delete_event (ECalendarView *cal_view, ECalendarViewEvent *event)
{
- CalComponent *comp;
- CalComponentVType vtype;
+ ECalComponent *comp;
+ ECalComponentVType vtype;
- comp = cal_component_new ();
- cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
- vtype = cal_component_get_vtype (comp);
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
+ vtype = e_cal_component_get_vtype (comp);
if (delete_component_dialog (comp, FALSE, 1, vtype, GTK_WIDGET (cal_view))) {
const char *uid;
@@ -842,17 +842,17 @@ delete_event (ECalView *cal_view, ECalViewEvent *event)
&& cancel_component_dialog ((GtkWindow *) gtk_widget_get_toplevel (GTK_WIDGET (cal_view)),
event->comp_data->client,
comp, TRUE))
- itip_send_comp (CAL_COMPONENT_METHOD_CANCEL, comp,
+ itip_send_comp (E_CAL_COMPONENT_METHOD_CANCEL, comp,
event->comp_data->client, NULL);
- cal_component_get_uid (comp, &uid);
+ e_cal_component_get_uid (comp, &uid);
if (!uid || !*uid) {
g_object_unref (comp);
return;
}
- cal_client_remove_object (event->comp_data->client, uid, &error);
- delete_error_dialog (error, CAL_COMPONENT_EVENT);
+ e_cal_remove_object (event->comp_data->client, uid, &error);
+ delete_error_dialog (error, E_CAL_COMPONENT_EVENT);
g_clear_error (&error);
}
@@ -860,16 +860,16 @@ delete_event (ECalView *cal_view, ECalViewEvent *event)
}
void
-e_cal_view_delete_selected_event (ECalView *cal_view)
+e_calendar_view_delete_selected_event (ECalendarView *cal_view)
{
GList *selected;
- ECalViewEvent *event;
+ ECalendarViewEvent *event;
- selected = e_cal_view_get_selected_events (cal_view);
+ selected = e_calendar_view_get_selected_events (cal_view);
if (!selected)
return;
- event = (ECalViewEvent *) selected->data;
+ event = (ECalendarViewEvent *) selected->data;
if (event)
delete_event (cal_view, event);
@@ -877,17 +877,17 @@ e_cal_view_delete_selected_event (ECalView *cal_view)
}
void
-e_cal_view_delete_selected_events (ECalView *cal_view)
+e_calendar_view_delete_selected_events (ECalendarView *cal_view)
{
GList *selected, *l;
- ECalViewEvent *event;
+ ECalendarViewEvent *event;
- selected = e_cal_view_get_selected_events (cal_view);
+ selected = e_calendar_view_get_selected_events (cal_view);
if (!selected)
return;
for (l = selected; l != NULL; l = l->next) {
- event = (ECalViewEvent *) l->data;
+ event = (ECalendarViewEvent *) l->data;
if (event)
delete_event (cal_view, event);
}
@@ -896,24 +896,24 @@ e_cal_view_delete_selected_events (ECalView *cal_view)
}
void
-e_cal_view_delete_selected_occurrence (ECalView *cal_view)
+e_calendar_view_delete_selected_occurrence (ECalendarView *cal_view)
{
- ECalViewEvent *event;
+ ECalendarViewEvent *event;
GList *selected;
const char *uid;
GError *error = NULL;
- selected = e_cal_view_get_selected_events (cal_view);
+ selected = e_calendar_view_get_selected_events (cal_view);
if (!selected)
return;
- event = (ECalViewEvent *) selected->data;
+ event = (ECalendarViewEvent *) selected->data;
uid = icalcomponent_get_uid (event->comp_data->icalcomp);
/* FIXME: use 'rid' argument */
- cal_client_remove_object_with_mod (event->comp_data->client, uid, NULL, CALOBJ_MOD_THIS, &error);
+ e_cal_remove_object_with_mod (event->comp_data->client, uid, NULL, CALOBJ_MOD_THIS, &error);
- delete_error_dialog (error, CAL_COMPONENT_EVENT);
+ delete_error_dialog (error, E_CAL_COMPONENT_EVENT);
g_clear_error (&error);
/* free memory */
@@ -923,42 +923,42 @@ e_cal_view_delete_selected_occurrence (ECalView *cal_view)
static void
on_new_appointment (GtkWidget *widget, gpointer user_data)
{
- ECalView *cal_view = (ECalView *) user_data;
+ ECalendarView *cal_view = (ECalendarView *) user_data;
- e_cal_view_new_appointment (cal_view);
+ e_calendar_view_new_appointment (cal_view);
}
static void
on_new_event (GtkWidget *widget, gpointer user_data)
{
time_t dtstart, dtend;
- ECalView *cal_view = (ECalView *) user_data;
+ ECalendarView *cal_view = (ECalendarView *) user_data;
- e_cal_view_get_selected_time_range (cal_view, &dtstart, &dtend);
- e_cal_view_new_appointment_for (cal_view, dtstart, dtend, TRUE, FALSE);
+ e_calendar_view_get_selected_time_range (cal_view, &dtstart, &dtend);
+ e_calendar_view_new_appointment_for (cal_view, dtstart, dtend, TRUE, FALSE);
}
static void
on_new_meeting (GtkWidget *widget, gpointer user_data)
{
time_t dtstart, dtend;
- ECalView *cal_view = (ECalView *) user_data;
+ ECalendarView *cal_view = (ECalendarView *) user_data;
- e_cal_view_get_selected_time_range (cal_view, &dtstart, &dtend);
- e_cal_view_new_appointment_for (cal_view, dtstart, dtend, FALSE, TRUE);
+ e_calendar_view_get_selected_time_range (cal_view, &dtstart, &dtend);
+ e_calendar_view_new_appointment_for (cal_view, dtstart, dtend, FALSE, TRUE);
}
static void
on_new_task (GtkWidget *widget, gpointer user_data)
{
- ECalView *cal_view = (ECalView *) user_data;
+ ECalendarView *cal_view = (ECalendarView *) user_data;
gnome_calendar_new_task (cal_view->priv->calendar);
}
static void
on_goto_date (GtkWidget *widget, gpointer user_data)
{
- ECalView *cal_view = E_CAL_VIEW (user_data);
+ ECalendarView *cal_view = E_CALENDAR_VIEW (user_data);
goto_dialog (cal_view->priv->calendar);
}
@@ -966,7 +966,7 @@ on_goto_date (GtkWidget *widget, gpointer user_data)
static void
on_goto_today (GtkWidget *widget, gpointer user_data)
{
- ECalView *cal_view = E_CAL_VIEW (user_data);
+ ECalendarView *cal_view = E_CALENDAR_VIEW (user_data);
calendar_goto_today (cal_view->priv->calendar);
}
@@ -975,14 +975,14 @@ static void
on_edit_appointment (GtkWidget *widget, gpointer user_data)
{
GList *selected;
- ECalView *cal_view = E_CAL_VIEW (user_data);
+ ECalendarView *cal_view = E_CALENDAR_VIEW (user_data);
- selected = e_cal_view_get_selected_events (cal_view);
+ selected = e_calendar_view_get_selected_events (cal_view);
if (selected) {
- ECalViewEvent *event = (ECalViewEvent *) selected->data;
+ ECalendarViewEvent *event = (ECalendarViewEvent *) selected->data;
if (event)
- e_cal_view_edit_appointment (cal_view, event->comp_data->client,
+ e_calendar_view_edit_appointment (cal_view, event->comp_data->client,
event->comp_data->icalcomp, FALSE);
g_list_free (selected);
@@ -992,14 +992,14 @@ on_edit_appointment (GtkWidget *widget, gpointer user_data)
static void
on_print (GtkWidget *widget, gpointer user_data)
{
- ECalView *cal_view;
+ ECalendarView *cal_view;
time_t start;
GnomeCalendarViewType view_type;
PrintView print_view;
- cal_view = E_CAL_VIEW (user_data);
+ cal_view = E_CALENDAR_VIEW (user_data);
- e_cal_view_get_visible_time_range (cal_view, &start, NULL);
+ e_calendar_view_get_visible_time_range (cal_view, &start, NULL);
view_type = gnome_calendar_get_view (cal_view->priv->calendar);
switch (view_type) {
@@ -1027,16 +1027,16 @@ on_print (GtkWidget *widget, gpointer user_data)
static void
on_save_as (GtkWidget *widget, gpointer user_data)
{
- ECalView *cal_view;
+ ECalendarView *cal_view;
GList *selected;
char *filename;
char *ical_string;
FILE *file;
- ECalViewEvent *event;
+ ECalendarViewEvent *event;
- cal_view = E_CAL_VIEW (user_data);
+ cal_view = E_CALENDAR_VIEW (user_data);
- selected = e_cal_view_get_selected_events (cal_view);
+ selected = e_calendar_view_get_selected_events (cal_view);
if (!selected)
return;
@@ -1044,8 +1044,8 @@ on_save_as (GtkWidget *widget, gpointer user_data)
if (filename == NULL)
return;
- event = (ECalViewEvent *) selected->data;
- ical_string = cal_client_get_component_as_string (event->comp_data->client, event->comp_data->icalcomp);
+ event = (ECalendarViewEvent *) selected->data;
+ ical_string = e_cal_get_component_as_string (event->comp_data->client, event->comp_data->icalcomp);
if (ical_string == NULL) {
g_warning ("Couldn't convert item to a string");
return;
@@ -1067,20 +1067,20 @@ on_save_as (GtkWidget *widget, gpointer user_data)
static void
on_print_event (GtkWidget *widget, gpointer user_data)
{
- ECalView *cal_view;
+ ECalendarView *cal_view;
GList *selected;
- ECalViewEvent *event;
- CalComponent *comp;
+ ECalendarViewEvent *event;
+ ECalComponent *comp;
- cal_view = E_CAL_VIEW (user_data);
- selected = e_cal_view_get_selected_events (cal_view);
+ cal_view = E_CALENDAR_VIEW (user_data);
+ selected = e_calendar_view_get_selected_events (cal_view);
if (!selected)
return;
- event = (ECalViewEvent *) selected->data;
+ event = (ECalendarViewEvent *) selected->data;
- comp = cal_component_new ();
- cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
print_comp (comp, event->comp_data->client, FALSE);
g_object_unref (comp);
@@ -1090,12 +1090,12 @@ static void
on_meeting (GtkWidget *widget, gpointer user_data)
{
GList *selected;
- ECalView *cal_view = E_CAL_VIEW (user_data);
+ ECalendarView *cal_view = E_CALENDAR_VIEW (user_data);
- selected = e_cal_view_get_selected_events (cal_view);
+ selected = e_calendar_view_get_selected_events (cal_view);
if (selected) {
- ECalViewEvent *event = (ECalViewEvent *) selected->data;
- e_cal_view_edit_appointment (cal_view, event->comp_data->client, event->comp_data->icalcomp, TRUE);
+ ECalendarViewEvent *event = (ECalendarViewEvent *) selected->data;
+ e_calendar_view_edit_appointment (cal_view, event->comp_data->client, event->comp_data->icalcomp, TRUE);
g_list_free (selected);
}
@@ -1105,16 +1105,16 @@ static void
on_forward (GtkWidget *widget, gpointer user_data)
{
GList *selected;
- ECalView *cal_view = E_CAL_VIEW (user_data);
+ ECalendarView *cal_view = E_CALENDAR_VIEW (user_data);
- selected = e_cal_view_get_selected_events (cal_view);
+ selected = e_calendar_view_get_selected_events (cal_view);
if (selected) {
- CalComponent *comp;
- ECalViewEvent *event = (ECalViewEvent *) selected->data;
+ ECalComponent *comp;
+ ECalendarViewEvent *event = (ECalendarViewEvent *) selected->data;
- comp = cal_component_new ();
- cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
- itip_send_comp (CAL_COMPONENT_METHOD_PUBLISH, comp, event->comp_data->client, NULL);
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
+ itip_send_comp (E_CAL_COMPONENT_METHOD_PUBLISH, comp, event->comp_data->client, NULL);
g_list_free (selected);
g_object_unref (comp);
@@ -1124,12 +1124,12 @@ on_forward (GtkWidget *widget, gpointer user_data)
static void
on_publish (GtkWidget *widget, gpointer user_data)
{
- ECalView *cal_view;
+ ECalendarView *cal_view;
icaltimezone *utc;
time_t start = time (NULL), end;
GList *comp_list = NULL, *client_list, *cl;
- cal_view = E_CAL_VIEW (user_data);
+ cal_view = E_CALENDAR_VIEW (user_data);
utc = icaltimezone_get_utc_timezone ();
start = time_day_begin_with_zone (start, utc);
@@ -1137,12 +1137,12 @@ on_publish (GtkWidget *widget, gpointer user_data)
client_list = e_cal_model_get_client_list (cal_view->priv->model);
for (cl = client_list; cl != NULL; cl = cl->next) {
- if (cal_client_get_free_busy ((CalClient *) cl->data, NULL, start, end, &comp_list, NULL)) {
+ if (e_cal_get_free_busy ((ECal *) cl->data, NULL, start, end, &comp_list, NULL)) {
GList *l;
for (l = comp_list; l; l = l->next) {
- CalComponent *comp = CAL_COMPONENT (l->data);
- itip_send_comp (CAL_COMPONENT_METHOD_PUBLISH, comp, (CalClient *) cl->data, NULL);
+ ECalComponent *comp = E_CAL_COMPONENT (l->data);
+ itip_send_comp (E_CAL_COMPONENT_METHOD_PUBLISH, comp, (ECal *) cl->data, NULL);
g_object_unref (comp);
}
@@ -1157,52 +1157,52 @@ on_publish (GtkWidget *widget, gpointer user_data)
static void
on_settings (GtkWidget *widget, gpointer user_data)
{
- ECalView *cal_view;
+ ECalendarView *cal_view;
- cal_view = E_CAL_VIEW (user_data);
+ cal_view = E_CALENDAR_VIEW (user_data);
control_util_show_settings (cal_view->priv->calendar);
}
static void
on_delete_appointment (GtkWidget *widget, gpointer user_data)
{
- ECalView *cal_view;
+ ECalendarView *cal_view;
- cal_view = E_CAL_VIEW (user_data);
- e_cal_view_delete_selected_event (cal_view);
+ cal_view = E_CALENDAR_VIEW (user_data);
+ e_calendar_view_delete_selected_event (cal_view);
}
static void
on_delete_occurrence (GtkWidget *widget, gpointer user_data)
{
- ECalView *cal_view;
+ ECalendarView *cal_view;
- cal_view = E_CAL_VIEW (user_data);
- e_cal_view_delete_selected_occurrence (cal_view);
+ cal_view = E_CALENDAR_VIEW (user_data);
+ e_calendar_view_delete_selected_occurrence (cal_view);
}
static void
on_cut (GtkWidget *widget, gpointer user_data)
{
- ECalView *cal_view = E_CAL_VIEW (user_data);
+ ECalendarView *cal_view = E_CALENDAR_VIEW (user_data);
- e_cal_view_cut_clipboard (cal_view);
+ e_calendar_view_cut_clipboard (cal_view);
}
static void
on_copy (GtkWidget *widget, gpointer user_data)
{
- ECalView *cal_view = E_CAL_VIEW (user_data);
+ ECalendarView *cal_view = E_CALENDAR_VIEW (user_data);
- e_cal_view_copy_clipboard (cal_view);
+ e_calendar_view_copy_clipboard (cal_view);
}
static void
on_paste (GtkWidget *widget, gpointer user_data)
{
- ECalView *cal_view = E_CAL_VIEW (user_data);
+ ECalendarView *cal_view = E_CALENDAR_VIEW (user_data);
- e_cal_view_paste_clipboard (cal_view);
+ e_calendar_view_paste_clipboard (cal_view);
}
enum {
@@ -1307,7 +1307,7 @@ static EPopupMenu child_items [] = {
static void
free_view_popup (GtkWidget *widget, gpointer data)
{
- ECalView *cal_view = E_CAL_VIEW (data);
+ ECalendarView *cal_view = E_CALENDAR_VIEW (data);
if (cal_view->priv->view_menu == NULL)
return;
@@ -1362,19 +1362,19 @@ setup_popup_icons (EPopupMenu *context_menu)
}
GtkMenu *
-e_cal_view_create_popup_menu (ECalView *cal_view)
+e_calendar_view_create_popup_menu (ECalendarView *cal_view)
{
GList *selected;
EPopupMenu *context_menu;
guint32 disable_mask = 0, hide_mask = 0;
GtkMenu *popup;
- CalClient *client = NULL;
+ ECal *client = NULL;
gboolean read_only = TRUE;
- g_return_val_if_fail (E_IS_CAL_VIEW (cal_view), NULL);
+ g_return_val_if_fail (E_IS_CALENDAR_VIEW (cal_view), NULL);
/* get the selection */
- selected = e_cal_view_get_selected_events (cal_view);
+ selected = e_calendar_view_get_selected_events (cal_view);
if (selected == NULL) {
cal_view->priv->view_menu = gnome_calendar_setup_view_popup (cal_view->priv->calendar);
@@ -1383,26 +1383,26 @@ e_cal_view_create_popup_menu (ECalView *cal_view)
client = e_cal_model_get_default_client (cal_view->priv->model);
} else {
- ECalViewEvent *event;
+ ECalendarViewEvent *event;
context_menu = child_items;
- event = (ECalViewEvent *) selected->data;
- if (cal_util_component_has_recurrences (event->comp_data->icalcomp))
+ event = (ECalendarViewEvent *) selected->data;
+ if (e_cal_util_component_has_recurrences (event->comp_data->icalcomp))
hide_mask |= MASK_SINGLE;
else
hide_mask |= MASK_RECURRING;
- if (cal_util_component_is_instance (event->comp_data->icalcomp))
+ if (e_cal_util_component_is_instance (event->comp_data->icalcomp))
hide_mask |= MASK_INSTANCE;
- if (cal_util_component_has_organizer (event->comp_data->icalcomp)) {
- CalComponent *comp;
+ if (e_cal_util_component_has_organizer (event->comp_data->icalcomp)) {
+ ECalComponent *comp;
disable_mask |= MASK_MEETING;
- comp = cal_component_new ();
- cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
if (!itip_organizer_is_user (comp, event->comp_data->client))
disable_mask |= MASK_MEETING_ORGANIZER;
@@ -1412,7 +1412,7 @@ e_cal_view_create_popup_menu (ECalView *cal_view)
client = event->comp_data->client;
}
- cal_client_is_read_only (client, &read_only, NULL);
+ e_cal_is_read_only (client, &read_only, NULL);
if (read_only)
disable_mask |= MASK_EDITABLE;
@@ -1424,7 +1424,7 @@ e_cal_view_create_popup_menu (ECalView *cal_view)
}
/**
- * e_cal_view_new_appointment_for
+ * e_calendar_view_new_appointment_for
* @cal_view: A calendar view.
* @dtstart: A Unix time_t that marks the beginning of the appointment.
* @dtend: A Unix time_t that marks the end of the appointment.
@@ -1435,19 +1435,19 @@ e_cal_view_create_popup_menu (ECalView *cal_view)
* Opens an event editor dialog for a new appointment.
*/
void
-e_cal_view_new_appointment_for (ECalView *cal_view,
+e_calendar_view_new_appointment_for (ECalendarView *cal_view,
time_t dtstart, time_t dtend,
gboolean all_day,
gboolean meeting)
{
- ECalViewPrivate *priv;
+ ECalendarViewPrivate *priv;
struct icaltimetype itt;
- CalComponentDateTime dt;
- CalComponent *comp;
+ ECalComponentDateTime dt;
+ ECalComponent *comp;
icalcomponent *icalcomp;
- CalComponentTransparency transparency;
+ ECalComponentTransparency transparency;
- g_return_if_fail (E_IS_CAL_VIEW (cal_view));
+ g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
priv = cal_view->priv;
@@ -1458,8 +1458,8 @@ e_cal_view_new_appointment_for (ECalView *cal_view,
dt.tzid = icaltimezone_get_tzid (e_cal_model_get_timezone (cal_view->priv->model));
icalcomp = e_cal_model_create_component_with_defaults (priv->model);
- comp = cal_component_new ();
- cal_component_set_icalcomponent (comp, icalcomp);
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (comp, icalcomp);
/* DTSTART, DTEND */
itt = icaltime_from_timet_with_zone (dtstart, FALSE, e_cal_model_get_timezone (cal_view->priv->model));
@@ -1467,7 +1467,7 @@ e_cal_view_new_appointment_for (ECalView *cal_view,
itt.hour = itt.minute = itt.second = 0;
itt.is_date = TRUE;
}
- cal_component_set_dtstart (comp, &dt);
+ e_cal_component_set_dtstart (comp, &dt);
itt = icaltime_from_timet_with_zone (dtend, FALSE, e_cal_model_get_timezone (cal_view->priv->model));
if (all_day) {
@@ -1479,20 +1479,20 @@ e_cal_view_new_appointment_for (ECalView *cal_view,
itt.hour = itt.minute = itt.second = 0;
itt.is_date = TRUE;
}
- cal_component_set_dtend (comp, &dt);
+ e_cal_component_set_dtend (comp, &dt);
/* TRANSPARENCY */
- transparency = all_day ? CAL_COMPONENT_TRANSP_TRANSPARENT
- : CAL_COMPONENT_TRANSP_OPAQUE;
- cal_component_set_transparency (comp, transparency);
+ transparency = all_day ? E_CAL_COMPONENT_TRANSP_TRANSPARENT
+ : E_CAL_COMPONENT_TRANSP_OPAQUE;
+ e_cal_component_set_transparency (comp, transparency);
/* CATEGORY */
- cal_component_set_categories (comp, priv->default_category);
+ e_cal_component_set_categories (comp, priv->default_category);
/* edit the object */
- cal_component_commit_sequence (comp);
+ e_cal_component_commit_sequence (comp);
- e_cal_view_edit_appointment (cal_view,
+ e_calendar_view_edit_appointment (cal_view,
e_cal_model_get_default_client (priv->model),
icalcomp, meeting);
@@ -1500,7 +1500,7 @@ e_cal_view_new_appointment_for (ECalView *cal_view,
}
/**
- * e_cal_view_new_appointment
+ * e_calendar_view_new_appointment
* @cal_view: A calendar view.
*
* Opens an event editor dialog for a new appointment. The appointment's
@@ -1508,18 +1508,18 @@ e_cal_view_new_appointment_for (ECalView *cal_view,
* the calendar view.
*/
void
-e_cal_view_new_appointment (ECalView *cal_view)
+e_calendar_view_new_appointment (ECalendarView *cal_view)
{
time_t dtstart, dtend;
- g_return_if_fail (E_IS_CAL_VIEW (cal_view));
+ g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
- e_cal_view_get_selected_time_range (cal_view, &dtstart, &dtend);
- e_cal_view_new_appointment_for (cal_view, dtstart, dtend, FALSE, FALSE);
+ e_calendar_view_get_selected_time_range (cal_view, &dtstart, &dtend);
+ e_calendar_view_new_appointment_for (cal_view, dtstart, dtend, FALSE, FALSE);
}
/**
- * e_cal_view_edit_appointment
+ * e_calendar_view_edit_appointment
* @cal_view: A calendar view.
* @client: Calendar client.
* @icalcomp: The object to be edited.
@@ -1529,18 +1529,18 @@ e_cal_view_new_appointment (ECalView *cal_view)
* object.
*/
void
-e_cal_view_edit_appointment (ECalView *cal_view,
- CalClient *client,
+e_calendar_view_edit_appointment (ECalendarView *cal_view,
+ ECal *client,
icalcomponent *icalcomp,
gboolean meeting)
{
- ECalViewPrivate *priv;
+ ECalendarViewPrivate *priv;
CompEditor *ce;
const char *uid;
- CalComponent *comp;
+ ECalComponent *comp;
- g_return_if_fail (E_IS_CAL_VIEW (cal_view));
- g_return_if_fail (IS_CAL_CLIENT (client));
+ g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
+ g_return_if_fail (E_IS_CAL (client));
g_return_if_fail (icalcomp != NULL);
priv = cal_view->priv;
@@ -1554,8 +1554,8 @@ e_cal_view_edit_appointment (ECalView *cal_view,
ee = event_editor_new (client);
ce = COMP_EDITOR (ee);
- comp = cal_component_new ();
- cal_component_set_icalcomponent (comp, icalcomponent_new_clone (icalcomp));
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (icalcomp));
comp_editor_edit_comp (ce, comp);
if (meeting)
event_editor_show_meeting (ee);
diff --git a/calendar/gui/e-calendar-view.h b/calendar/gui/e-calendar-view.h
index 292871b709..a1b11023b3 100644
--- a/calendar/gui/e-calendar-view.h
+++ b/calendar/gui/e-calendar-view.h
@@ -20,10 +20,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*/
-#ifndef _E_CAL_VIEW_H_
-#define _E_CAL_VIEW_H_
+#ifndef _E_CALENDAR_VIEW_H_
+#define _E_CALENDAR_VIEW_H_
-#include <cal-client/cal-client.h>
+#include <libecal/e-cal.h>
#include <gtk/gtktable.h>
#include "e-cal-model.h"
#include "gnome-cal.h"
@@ -34,21 +34,21 @@ G_BEGIN_DECLS
* EView - base widget class for the calendar views.
*/
-#define E_CAL_VIEW(obj) GTK_CHECK_CAST (obj, e_cal_view_get_type (), ECalView)
-#define E_CAL_VIEW_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, e_cal_view_get_type (), ECalViewClass)
-#define E_IS_CAL_VIEW(obj) GTK_CHECK_TYPE (obj, e_cal_view_get_type ())
+#define E_CALENDAR_VIEW(obj) GTK_CHECK_CAST (obj, e_calendar_view_get_type (), ECalendarView)
+#define E_CALENDAR_VIEW_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, e_calendar_view_get_type (), ECalendarViewClass)
+#define E_IS_CALENDAR_VIEW(obj) GTK_CHECK_TYPE (obj, e_calendar_view_get_type ())
typedef enum {
- E_CAL_VIEW_POS_OUTSIDE,
- E_CAL_VIEW_POS_NONE,
- E_CAL_VIEW_POS_EVENT,
- E_CAL_VIEW_POS_LEFT_EDGE,
- E_CAL_VIEW_POS_RIGHT_EDGE,
- E_CAL_VIEW_POS_TOP_EDGE,
- E_CAL_VIEW_POS_BOTTOM_EDGE
-} ECalViewPosition;
-
-#define E_CAL_VIEW_EVENT_FIELDS \
+ E_CALENDAR_VIEW_POS_OUTSIDE,
+ E_CALENDAR_VIEW_POS_NONE,
+ E_CALENDAR_VIEW_POS_EVENT,
+ E_CALENDAR_VIEW_POS_LEFT_EDGE,
+ E_CALENDAR_VIEW_POS_RIGHT_EDGE,
+ E_CALENDAR_VIEW_POS_TOP_EDGE,
+ E_CALENDAR_VIEW_POS_BOTTOM_EDGE
+} ECalendarViewPosition;
+
+#define E_CALENDAR_VIEW_EVENT_FIELDS \
GnomeCanvasItem *canvas_item; \
ECalModelComponent *comp_data; \
gboolean allocated_comp_data; \
@@ -59,76 +59,76 @@ typedef enum {
guint different_timezone : 1;
typedef struct {
- E_CAL_VIEW_EVENT_FIELDS
-} ECalViewEvent;
+ E_CALENDAR_VIEW_EVENT_FIELDS
+} ECalendarViewEvent;
-typedef struct _ECalView ECalView;
-typedef struct _ECalViewClass ECalViewClass;
-typedef struct _ECalViewPrivate ECalViewPrivate;
+typedef struct _ECalendarView ECalendarView;
+typedef struct _ECalendarViewClass ECalendarViewClass;
+typedef struct _ECalendarViewPrivate ECalendarViewPrivate;
-struct _ECalView {
+struct _ECalendarView {
GtkTable table;
- ECalViewPrivate *priv;
+ ECalendarViewPrivate *priv;
};
-struct _ECalViewClass {
+struct _ECalendarViewClass {
GtkTableClass parent_class;
/* Notification signals */
- void (* selection_changed) (ECalView *cal_view);
- void (* selected_time_changed) (ECalView *cal_view);
- void (* timezone_changed) (ECalView *cal_view, icaltimezone *old_zone, icaltimezone *new_zone);
- void (* event_changed) (ECalView *day_view, ECalViewEvent *event);
- void (* event_added) (ECalView *day_view, ECalViewEvent *event);
+ void (* selection_changed) (ECalendarView *cal_view);
+ void (* selected_time_changed) (ECalendarView *cal_view);
+ void (* timezone_changed) (ECalendarView *cal_view, icaltimezone *old_zone, icaltimezone *new_zone);
+ void (* event_changed) (ECalendarView *day_view, ECalendarViewEvent *event);
+ void (* event_added) (ECalendarView *day_view, ECalendarViewEvent *event);
/* Virtual methods */
- GList * (* get_selected_events) (ECalView *cal_view); /* a GList of ECalViewEvent's */
- void (* get_selected_time_range) (ECalView *cal_view, time_t *start_time, time_t *end_time);
- void (* set_selected_time_range) (ECalView *cal_view, time_t start_time, time_t end_time);
- gboolean (* get_visible_time_range) (ECalView *cal_view, time_t *start_time, time_t *end_time);
- void (* update_query) (ECalView *cal_view);
+ GList * (* get_selected_events) (ECalendarView *cal_view); /* a GList of ECalendarViewEvent's */
+ void (* get_selected_time_range) (ECalendarView *cal_view, time_t *start_time, time_t *end_time);
+ void (* set_selected_time_range) (ECalendarView *cal_view, time_t start_time, time_t end_time);
+ gboolean (* get_visible_time_range) (ECalendarView *cal_view, time_t *start_time, time_t *end_time);
+ void (* update_query) (ECalendarView *cal_view);
};
-GType e_cal_view_get_type (void);
-
-GnomeCalendar *e_cal_view_get_calendar (ECalView *cal_view);
-void e_cal_view_set_calendar (ECalView *cal_view, GnomeCalendar *calendar);
-ECalModel *e_cal_view_get_model (ECalView *cal_view);
-void e_cal_view_set_model (ECalView *cal_view, ECalModel *model);
-icaltimezone *e_cal_view_get_timezone (ECalView *cal_view);
-void e_cal_view_set_timezone (ECalView *cal_view, icaltimezone *zone);
-const char *e_cal_view_get_default_category (ECalView *cal_view);
-void e_cal_view_set_default_category (ECalView *cal_view, const char *category);
-gboolean e_cal_view_get_use_24_hour_format (ECalView *view);
-void e_cal_view_set_use_24_hour_format (ECalView *view, gboolean use_24_hour);
-
-void e_cal_view_set_status_message (ECalView *cal_view, const gchar *message);
-
-GList *e_cal_view_get_selected_events (ECalView *cal_view);
-void e_cal_view_get_selected_time_range (ECalView *cal_view, time_t *start_time, time_t *end_time);
-void e_cal_view_set_selected_time_range (ECalView *cal_view, time_t start_time, time_t end_time);
-gboolean e_cal_view_get_visible_time_range (ECalView *cal_view, time_t *start_time, time_t *end_time);
-void e_cal_view_update_query (ECalView *cal_view);
-
-void e_cal_view_cut_clipboard (ECalView *cal_view);
-void e_cal_view_copy_clipboard (ECalView *cal_view);
-void e_cal_view_paste_clipboard (ECalView *cal_view);
-void e_cal_view_delete_selected_event (ECalView *cal_view);
-void e_cal_view_delete_selected_events (ECalView *cal_view);
-void e_cal_view_delete_selected_occurrence (ECalView *cal_view);
-
-GtkMenu *e_cal_view_create_popup_menu (ECalView *cal_view);
-
-void e_cal_view_add_event (ECalView *cal_view, CalClient *client, time_t dtstart,
+GType e_calendar_view_get_type (void);
+
+GnomeCalendar *e_calendar_view_get_calendar (ECalendarView *cal_view);
+void e_calendar_view_set_calendar (ECalendarView *cal_view, GnomeCalendar *calendar);
+ECalModel *e_calendar_view_get_model (ECalendarView *cal_view);
+void e_calendar_view_set_model (ECalendarView *cal_view, ECalModel *model);
+icaltimezone *e_calendar_view_get_timezone (ECalendarView *cal_view);
+void e_calendar_view_set_timezone (ECalendarView *cal_view, icaltimezone *zone);
+const char *e_calendar_view_get_default_category (ECalendarView *cal_view);
+void e_calendar_view_set_default_category (ECalendarView *cal_view, const char *category);
+gboolean e_calendar_view_get_use_24_hour_format (ECalendarView *view);
+void e_calendar_view_set_use_24_hour_format (ECalendarView *view, gboolean use_24_hour);
+
+void e_calendar_view_set_status_message (ECalendarView *cal_view, const gchar *message);
+
+GList *e_calendar_view_get_selected_events (ECalendarView *cal_view);
+void e_calendar_view_get_selected_time_range (ECalendarView *cal_view, time_t *start_time, time_t *end_time);
+void e_calendar_view_set_selected_time_range (ECalendarView *cal_view, time_t start_time, time_t end_time);
+gboolean e_calendar_view_get_visible_time_range (ECalendarView *cal_view, time_t *start_time, time_t *end_time);
+void e_calendar_view_update_query (ECalendarView *cal_view);
+
+void e_calendar_view_cut_clipboard (ECalendarView *cal_view);
+void e_calendar_view_copy_clipboard (ECalendarView *cal_view);
+void e_calendar_view_paste_clipboard (ECalendarView *cal_view);
+void e_calendar_view_delete_selected_event (ECalendarView *cal_view);
+void e_calendar_view_delete_selected_events (ECalendarView *cal_view);
+void e_calendar_view_delete_selected_occurrence (ECalendarView *cal_view);
+
+GtkMenu *e_calendar_view_create_popup_menu (ECalendarView *cal_view);
+
+void e_calendar_view_add_event (ECalendarView *cal_view, ECal *client, time_t dtstart,
icaltimezone *default_zone, icalcomponent *icalcomp, gboolean in_top_canvas);
-void e_cal_view_new_appointment_for (ECalView *cal_view,
+void e_calendar_view_new_appointment_for (ECalendarView *cal_view,
time_t dtstart,
time_t dtend,
gboolean all_day,
gboolean meeting);
-void e_cal_view_new_appointment (ECalView *cal_view);
-void e_cal_view_edit_appointment (ECalView *cal_view,
- CalClient *client,
+void e_calendar_view_new_appointment (ECalendarView *cal_view);
+void e_calendar_view_edit_appointment (ECalendarView *cal_view,
+ ECal *client,
icalcomponent *icalcomp,
gboolean meeting);
diff --git a/calendar/gui/e-cell-date-edit-text.c b/calendar/gui/e-cell-date-edit-text.c
index afd5fc1fb6..3d045fbdd6 100644
--- a/calendar/gui/e-cell-date-edit-text.c
+++ b/calendar/gui/e-cell-date-edit-text.c
@@ -23,7 +23,7 @@
/*
* ECellDateEditText - a subclass of ECellText used to show and edit the text
- * representation of the date, from a CalComponentDateTime* model value.
+ * representation of the date, from a ECalComponentDateTime* model value.
*/
#include <config.h>
@@ -38,7 +38,7 @@
#include <gal/util/e-util.h>
#include <gal/widgets/e-unicode.h>
#include <e-util/e-time-utils.h>
-#include <cal-util/timeutil.h>
+#include <libecal/e-cal-time-util.h>
#include "e-cell-date-edit-text.h"
@@ -214,7 +214,7 @@ e_cell_date_edit_text_init (GtkObject *object)
*
* Creates a new ECell renderer that can be used to render and edit dates that
* that come from the model. The value returned from the model is
- * interpreted as being a CalComponentDateTime*.
+ * interpreted as being a ECalComponentDateTime*.
*
* Returns: an ECell object that can be used to render dates.
*/
diff --git a/calendar/gui/e-cell-date-edit-text.h b/calendar/gui/e-cell-date-edit-text.h
index 53abb7dcff..ab00c0b39c 100644
--- a/calendar/gui/e-cell-date-edit-text.h
+++ b/calendar/gui/e-cell-date-edit-text.h
@@ -23,7 +23,7 @@
/*
* ECellDateEditText - a subclass of ECellText used to show and edit the text
- * representation of the date, from a CalComponentDateTime* model value.
+ * representation of the date, from a ECalComponentDateTime* model value.
*/
#ifndef _E_CELL_DATE_EDIT_TEXT_H_
diff --git a/calendar/gui/e-comp-editor-registry.c b/calendar/gui/e-comp-editor-registry.c
index 68b33d11ff..9e2a63bd48 100644
--- a/calendar/gui/e-comp-editor-registry.c
+++ b/calendar/gui/e-comp-editor-registry.c
@@ -107,7 +107,7 @@ e_comp_editor_registry_add (ECompEditorRegistry *reg, CompEditor *editor, gboole
{
ECompEditorRegistryPrivate *priv;
ECompEditorRegistryData *rdata;
- CalComponent *comp;
+ ECalComponent *comp;
const char *uid;
g_return_if_fail (reg != NULL);
@@ -118,7 +118,7 @@ e_comp_editor_registry_add (ECompEditorRegistry *reg, CompEditor *editor, gboole
priv = reg->priv;
comp = comp_editor_get_comp (editor);
- cal_component_get_uid (comp, &uid);
+ e_cal_component_get_uid (comp, &uid);
rdata = g_new0 (ECompEditorRegistryData, 1);
@@ -193,14 +193,14 @@ editor_destroy_cb (GtkWidget *widget, gpointer data)
ECompEditorRegistry *reg;
ECompEditorRegistryPrivate *priv;
ECompEditorRegistryData *rdata;
- CalComponent *comp;
+ ECalComponent *comp;
const char *uid;
reg = E_COMP_EDITOR_REGISTRY (data);
priv = reg->priv;
comp = comp_editor_get_comp (COMP_EDITOR (widget));
- cal_component_get_uid (comp, &uid);
+ e_cal_component_get_uid (comp, &uid);
rdata = g_hash_table_lookup (priv->editors, uid);
diff --git a/calendar/gui/e-date-time-list.c b/calendar/gui/e-date-time-list.c
index 5aef6f9c51..348ccc86a9 100644
--- a/calendar/gui/e-date-time-list.c
+++ b/calendar/gui/e-date-time-list.c
@@ -27,7 +27,7 @@
#include <glib.h>
#include <e-util/e-time-utils.h>
#include "e-date-time-list.h"
-#include "cal-util/timeutil.h"
+#include <libecal/e-cal-time-util.h>
#include "calendar-config.h"
#define G_LIST(x) ((GList *) x)
@@ -262,7 +262,7 @@ e_date_time_list_get_column_type (GtkTreeModel *tree_model,
return column_types [index];
}
-const CalComponentDateTime *
+const ECalComponentDateTime *
e_date_time_list_get_date_time (EDateTimeList *date_time_list, GtkTreeIter *iter)
{
g_return_val_if_fail (IS_VALID_ITER (date_time_list, iter), NULL);
@@ -271,7 +271,7 @@ e_date_time_list_get_date_time (EDateTimeList *date_time_list, GtkTreeIter *iter
}
static void
-free_datetime (CalComponentDateTime *datetime)
+free_datetime (ECalComponentDateTime *datetime)
{
g_free (datetime->value);
if (datetime->tzid)
@@ -279,12 +279,12 @@ free_datetime (CalComponentDateTime *datetime)
g_free (datetime);
}
-static CalComponentDateTime *
-copy_datetime (const CalComponentDateTime *datetime)
+static ECalComponentDateTime *
+copy_datetime (const ECalComponentDateTime *datetime)
{
- CalComponentDateTime *datetime_copy;
+ ECalComponentDateTime *datetime_copy;
- datetime_copy = g_new0 (CalComponentDateTime, 1);
+ datetime_copy = g_new0 (ECalComponentDateTime, 1);
datetime_copy->value = g_new (struct icaltimetype, 1);
*datetime_copy->value = *datetime->value;
@@ -295,16 +295,16 @@ copy_datetime (const CalComponentDateTime *datetime)
}
static gint
-compare_datetime (const CalComponentDateTime *datetime1, const CalComponentDateTime *datetime2)
+compare_datetime (const ECalComponentDateTime *datetime1, const ECalComponentDateTime *datetime2)
{
return icaltime_compare (*datetime1->value, *datetime2->value);
}
void
e_date_time_list_set_date_time (EDateTimeList *date_time_list, GtkTreeIter *iter,
- const CalComponentDateTime *datetime)
+ const ECalComponentDateTime *datetime)
{
- CalComponentDateTime *datetime_old;
+ ECalComponentDateTime *datetime_old;
g_return_if_fail (IS_VALID_ITER (date_time_list, iter));
@@ -316,7 +316,7 @@ e_date_time_list_set_date_time (EDateTimeList *date_time_list, GtkTreeIter *iter
void
e_date_time_list_append (EDateTimeList *date_time_list, GtkTreeIter *iter,
- const CalComponentDateTime *datetime)
+ const ECalComponentDateTime *datetime)
{
g_return_if_fail (datetime != NULL);
@@ -339,7 +339,7 @@ e_date_time_list_remove (EDateTimeList *date_time_list, GtkTreeIter *iter)
g_return_if_fail (IS_VALID_ITER (date_time_list, iter));
n = g_list_position (date_time_list->list, G_LIST (iter->user_data));
- free_datetime ((CalComponentDateTime *) G_LIST (iter->user_data)->data);
+ free_datetime ((ECalComponentDateTime *) G_LIST (iter->user_data)->data);
date_time_list->list = g_list_delete_link (date_time_list->list, G_LIST (iter->user_data));
row_deleted (date_time_list, n);
}
@@ -352,7 +352,7 @@ e_date_time_list_clear (EDateTimeList *date_time_list)
all_rows_deleted (date_time_list);
for (l = date_time_list->list; l; l = g_list_next (l)) {
- free_datetime ((CalComponentDateTime *) l->data);
+ free_datetime ((ECalComponentDateTime *) l->data);
}
g_list_free (date_time_list->list);
@@ -403,7 +403,7 @@ e_date_time_list_get_path (GtkTreeModel *tree_model,
/* Builds a static string out of an exception date */
static char *
-get_exception_string (CalComponentDateTime *dt)
+get_exception_string (ECalComponentDateTime *dt)
{
static char buf [256];
struct tm tmp_tm;
@@ -433,7 +433,7 @@ e_date_time_list_get_value (GtkTreeModel *tree_model,
GValue *value)
{
EDateTimeList *date_time_list = E_DATE_TIME_LIST (tree_model);
- CalComponentDateTime *datetime;
+ ECalComponentDateTime *datetime;
GList *l;
const gchar *str;
diff --git a/calendar/gui/e-date-time-list.h b/calendar/gui/e-date-time-list.h
index 07a7c77b02..83b145c7c6 100644
--- a/calendar/gui/e-date-time-list.h
+++ b/calendar/gui/e-date-time-list.h
@@ -24,7 +24,7 @@
#define E_DATE_TIME_LIST_H
#include <gtk/gtktreemodel.h>
-#include <cal-util/cal-component.h>
+#include <libecal/e-cal-component.h>
G_BEGIN_DECLS
@@ -66,14 +66,14 @@ struct _EDateTimeListClass
GtkType e_date_time_list_get_type (void);
EDateTimeList *e_date_time_list_new (void);
-const CalComponentDateTime *e_date_time_list_get_date_time (EDateTimeList *date_time_list,
+const ECalComponentDateTime *e_date_time_list_get_date_time (EDateTimeList *date_time_list,
GtkTreeIter *iter);
void e_date_time_list_set_date_time (EDateTimeList *date_time_list,
GtkTreeIter *iter,
- const CalComponentDateTime *datetime);
+ const ECalComponentDateTime *datetime);
void e_date_time_list_append (EDateTimeList *date_time_list,
GtkTreeIter *iter,
- const CalComponentDateTime *datetime);
+ const ECalComponentDateTime *datetime);
void e_date_time_list_remove (EDateTimeList *date_time_list,
GtkTreeIter *iter);
void e_date_time_list_clear (EDateTimeList *date_time_list);
diff --git a/calendar/gui/e-day-view-config.c b/calendar/gui/e-day-view-config.c
index bee97919f1..4c10451f40 100644
--- a/calendar/gui/e-day-view-config.c
+++ b/calendar/gui/e-day-view-config.c
@@ -167,7 +167,7 @@ set_timezone (EDayView *day_view)
if (!zone)
zone = icaltimezone_get_utc_timezone ();
- e_cal_view_set_timezone (E_CAL_VIEW (day_view), zone);
+ e_calendar_view_set_timezone (E_CALENDAR_VIEW (day_view), zone);
g_free (location);
}
@@ -214,7 +214,7 @@ set_twentyfour_hour (EDayView *day_view)
use_24_hour = calendar_config_get_24_hour_format ();
- e_cal_view_set_use_24_hour_format (E_CAL_VIEW (day_view), use_24_hour);
+ e_calendar_view_set_use_24_hour_format (E_CALENDAR_VIEW (day_view), use_24_hour);
}
static void
diff --git a/calendar/gui/e-day-view-main-item.c b/calendar/gui/e-day-view-main-item.c
index 15d6141a5a..2b7787ded4 100644
--- a/calendar/gui/e-day-view-main-item.c
+++ b/calendar/gui/e-day-view-main-item.c
@@ -191,7 +191,7 @@ e_day_view_main_item_draw (GnomeCanvasItem *canvas_item, GdkDrawable *drawable,
for (day = 0; day < day_view->days_shown; day++) {
day_start_tt = icaltime_from_timet_with_zone (day_view->day_starts[day], FALSE,
- e_cal_view_get_timezone (E_CAL_VIEW (day_view)));
+ e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
weekday = icaltime_day_of_week (day_start_tt) - 1;
work_day = day_view->working_days & (1 << weekday);
@@ -318,7 +318,7 @@ e_day_view_main_item_draw_events_in_vbars (EDayViewMainItem *dvmitem,
EDayViewEvent *event;
GdkGC *gc;
gint grid_x, event_num, bar_y, bar_h;
- CalComponentTransparency transparency;
+ ECalComponentTransparency transparency;
day_view = dvmitem->day_view;
@@ -330,17 +330,17 @@ e_day_view_main_item_draw_events_in_vbars (EDayViewMainItem *dvmitem,
/* Draw the busy times corresponding to the events in the day. */
for (event_num = 0; event_num < day_view->events[day]->len;
event_num++) {
- CalComponent *comp;
+ ECalComponent *comp;
event = &g_array_index (day_view->events[day], EDayViewEvent,
event_num);
- comp = cal_component_new ();
- cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
/* If the event is TRANSPARENT, skip it. */
- cal_component_get_transparency (comp, &transparency);
- if (transparency == CAL_COMPONENT_TRANSP_TRANSPARENT)
+ e_cal_component_get_transparency (comp, &transparency);
+ if (transparency == E_CAL_COMPONENT_TRANSP_TRANSPARENT)
continue;
/* We can skip the events in the first column since they will
@@ -375,7 +375,7 @@ e_day_view_main_item_draw_long_events_in_vbars (EDayViewMainItem *dvmitem,
EDayViewEvent *event;
gint event_num, start_day, end_day, day, bar_y1, bar_y2, grid_x;
GdkGC *gc;
- CalComponentTransparency transparency;
+ ECalComponentTransparency transparency;
day_view = dvmitem->day_view;
@@ -384,17 +384,17 @@ e_day_view_main_item_draw_long_events_in_vbars (EDayViewMainItem *dvmitem,
for (event_num = 0; event_num < day_view->long_events->len;
event_num++) {
- CalComponent *comp;
+ ECalComponent *comp;
event = &g_array_index (day_view->long_events, EDayViewEvent,
event_num);
- comp = cal_component_new ();
- cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
/* If the event is TRANSPARENT, skip it. */
- cal_component_get_transparency (comp, &transparency);
- if (transparency == CAL_COMPONENT_TRANSP_TRANSPARENT)
+ e_cal_component_get_transparency (comp, &transparency);
+ if (transparency == E_CAL_COMPONENT_TRANSP_TRANSPARENT)
continue;
if (!e_day_view_find_long_event_days (event,
@@ -469,12 +469,12 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
GtkStyle *style;
GdkGC *gc;
GdkColor bg_color;
- CalComponent *comp;
+ ECalComponent *comp;
gint num_icons, icon_x, icon_y, icon_x_inc, icon_y_inc;
gint max_icon_w, max_icon_h;
gboolean draw_reminder_icon, draw_recurrence_icon, draw_timezone_icon, draw_meeting_icon;
GSList *categories_list, *elem;
- CalComponentTransparency transparency;
+ ECalComponentTransparency transparency;
day_view = dvmitem->day_view;
@@ -505,7 +505,7 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
since that is used for multiple events. But then you can't see
where the event in the first column finishes. */
- if (gdk_color_parse (e_cal_model_get_color_for_component (e_cal_view_get_model (E_CAL_VIEW (day_view)), event->comp_data),
+ if (gdk_color_parse (e_cal_model_get_color_for_component (e_calendar_view_get_model (E_CALENDAR_VIEW (day_view)), event->comp_data),
&bg_color)) {
GdkColormap *colormap;
@@ -541,21 +541,21 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
bar_y2 = event->end_minute * day_view->row_height / day_view->mins_per_row - y;
/* When an item is being resized, we fill the bar up to the new row. */
- if (day_view->resize_drag_pos != E_CAL_VIEW_POS_NONE
+ if (day_view->resize_drag_pos != E_CALENDAR_VIEW_POS_NONE
&& day_view->resize_event_day == day
&& day_view->resize_event_num == event_num) {
- if (day_view->resize_drag_pos == E_CAL_VIEW_POS_TOP_EDGE)
+ if (day_view->resize_drag_pos == E_CALENDAR_VIEW_POS_TOP_EDGE)
bar_y1 = item_y + 1;
- else if (day_view->resize_drag_pos == E_CAL_VIEW_POS_BOTTOM_EDGE)
+ else if (day_view->resize_drag_pos == E_CALENDAR_VIEW_POS_BOTTOM_EDGE)
bar_y2 = item_y + item_h - 1;
}
- comp = cal_component_new ();
- cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
/* Only fill it in if the event isn't TRANSPARENT. */
- cal_component_get_transparency (comp, &transparency);
- if (transparency != CAL_COMPONENT_TRANSP_TRANSPARENT) {
+ e_cal_component_get_transparency (comp, &transparency);
+ if (transparency != E_CAL_COMPONENT_TRANSP_TRANSPARENT) {
gdk_draw_rectangle (drawable, gc, TRUE,
item_x + 1, bar_y1,
E_DAY_VIEW_BAR_WIDTH - 2, bar_y2 - bar_y1);
@@ -593,12 +593,12 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
icon_y = item_y + E_DAY_VIEW_EVENT_BORDER_HEIGHT
+ E_DAY_VIEW_ICON_Y_PAD;
- if (cal_component_has_alarms (comp)) {
+ if (e_cal_component_has_alarms (comp)) {
draw_reminder_icon = TRUE;
num_icons++;
}
- if (cal_component_has_recurrences (comp)) {
+ if (e_cal_component_has_recurrences (comp)) {
draw_recurrence_icon = TRUE;
num_icons++;
}
@@ -610,12 +610,12 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
num_icons++;
}
- if (cal_component_has_organizer (comp)) {
+ if (e_cal_component_has_organizer (comp)) {
draw_meeting_icon = TRUE;
num_icons++;
}
- cal_component_get_categories_list (comp, &categories_list);
+ e_cal_component_get_categories_list (comp, &categories_list);
for (elem = categories_list; elem; elem = elem->next) {
char *category;
GdkPixmap *pixmap = NULL;
@@ -754,7 +754,7 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
}
/* free memory */
- cal_component_free_categories_list (categories_list);
+ e_cal_component_free_categories_list (categories_list);
g_object_unref (comp);
}
diff --git a/calendar/gui/e-day-view-time-item.c b/calendar/gui/e-day-view-time-item.c
index 6a1e1d4279..d70b0fd861 100644
--- a/calendar/gui/e-day-view-time-item.c
+++ b/calendar/gui/e-day-view-time-item.c
@@ -364,7 +364,7 @@ e_day_view_time_item_draw (GnomeCanvasItem *canvas_item,
long_line_x1, row_y,
long_line_x2, row_y);
- if (e_cal_view_get_use_24_hour_format (E_CAL_VIEW (day_view))) {
+ if (e_calendar_view_get_use_24_hour_format (E_CALENDAR_VIEW (day_view))) {
g_snprintf (buffer, sizeof (buffer), "%i:%02i",
display_hour, minute);
} else {
@@ -416,7 +416,7 @@ e_day_view_time_item_draw (GnomeCanvasItem *canvas_item,
/* In 12-hour format we display 'am' or 'pm'
instead of '00'. */
if (minute == 0
- && !e_cal_view_get_use_24_hour_format (E_CAL_VIEW (day_view))) {
+ && !e_calendar_view_get_use_24_hour_format (E_CALENDAR_VIEW (day_view))) {
strcpy (buffer, suffix);
} else {
g_snprintf (buffer, sizeof (buffer),
diff --git a/calendar/gui/e-day-view-top-item.c b/calendar/gui/e-day-view-top-item.c
index 5a49408566..d2f60d7e7d 100644
--- a/calendar/gui/e-day-view-top-item.c
+++ b/calendar/gui/e-day-view-top-item.c
@@ -30,7 +30,7 @@
#include <libgnome/gnome-i18n.h>
#include <gal/util/e-util.h>
#include "e-util/e-categories-config.h"
-#include "cal-util/timeutil.h"
+#include <libecal/e-cal-time-util.h>
#include "e-day-view-top-item.h"
static void e_day_view_top_item_class_init (EDayViewTopItemClass *class);
@@ -316,7 +316,7 @@ e_day_view_top_item_draw_long_event (EDayViewTopItem *dvtitem,
gint start_day, end_day;
gint item_x, item_y, item_w, item_h;
gint text_x, icon_x, icon_y, icon_x_inc;
- CalComponent *comp;
+ ECalComponent *comp;
gchar buffer[16];
gint hour, display_hour, minute, offset, time_width, time_x;
gint min_end_time_x, suffix_width, max_icon_x;
@@ -348,8 +348,8 @@ e_day_view_top_item_draw_long_event (EDayViewTopItem *dvtitem,
gc = day_view->main_gc;
fg_gc = style->fg_gc[GTK_STATE_NORMAL];
bg_gc = style->bg_gc[GTK_STATE_NORMAL];
- comp = cal_component_new ();
- cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
/* Draw the lines across the top & bottom of the entire event. */
gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_LONG_EVENT_BORDER]);
@@ -361,7 +361,7 @@ e_day_view_top_item_draw_long_event (EDayViewTopItem *dvtitem,
item_x + item_w - 1 - x, item_y + item_h - 1 - y);
/* Fill it in. */
- if (gdk_color_parse (e_cal_model_get_color_for_component (e_cal_view_get_model (E_CAL_VIEW (day_view)),
+ if (gdk_color_parse (e_cal_model_get_color_for_component (e_calendar_view_get_model (E_CALENDAR_VIEW (day_view)),
event->comp_data),
&bg_color)) {
GdkColormap *colormap;
@@ -380,13 +380,13 @@ e_day_view_top_item_draw_long_event (EDayViewTopItem *dvtitem,
/* When resizing we don't draw the triangles.*/
draw_start_triangle = TRUE;
draw_end_triangle = TRUE;
- if (day_view->resize_drag_pos != E_CAL_VIEW_POS_NONE
+ if (day_view->resize_drag_pos != E_CALENDAR_VIEW_POS_NONE
&& day_view->resize_event_day == E_DAY_VIEW_LONG_EVENT
&& day_view->resize_event_num == event_num) {
- if (day_view->resize_drag_pos == E_CAL_VIEW_POS_LEFT_EDGE)
+ if (day_view->resize_drag_pos == E_CALENDAR_VIEW_POS_LEFT_EDGE)
draw_start_triangle = FALSE;
- if (day_view->resize_drag_pos == E_CAL_VIEW_POS_RIGHT_EDGE)
+ if (day_view->resize_drag_pos == E_CALENDAR_VIEW_POS_RIGHT_EDGE)
draw_end_triangle = FALSE;
}
@@ -448,7 +448,7 @@ e_day_view_top_item_draw_long_event (EDayViewTopItem *dvtitem,
e_day_view_convert_time_to_display (day_view, hour,
&display_hour,
&suffix, &suffix_width);
- if (e_cal_view_get_use_24_hour_format (E_CAL_VIEW (day_view))) {
+ if (e_calendar_view_get_use_24_hour_format (E_CALENDAR_VIEW (day_view))) {
g_snprintf (buffer, sizeof (buffer), "%i:%02i",
display_hour, minute);
} else {
@@ -497,7 +497,7 @@ e_day_view_top_item_draw_long_event (EDayViewTopItem *dvtitem,
&display_hour,
&suffix,
&suffix_width);
- if (e_cal_view_get_use_24_hour_format (E_CAL_VIEW (day_view))) {
+ if (e_calendar_view_get_use_24_hour_format (E_CALENDAR_VIEW (day_view))) {
g_snprintf (buffer, sizeof (buffer),
"%i:%02i", display_hour, minute);
} else {
@@ -527,7 +527,7 @@ e_day_view_top_item_draw_long_event (EDayViewTopItem *dvtitem,
icon_y = item_y + E_DAY_VIEW_LONG_EVENT_BORDER_HEIGHT
+ E_DAY_VIEW_ICON_Y_PAD - y;
- if (icon_x <= max_icon_x && cal_component_has_recurrences (comp)) {
+ if (icon_x <= max_icon_x && e_cal_component_has_recurrences (comp)) {
gdk_gc_set_clip_origin (gc, icon_x, icon_y);
gdk_gc_set_clip_mask (gc, day_view->recurrence_mask);
gdk_draw_pixmap (drawable, gc,
@@ -538,7 +538,7 @@ e_day_view_top_item_draw_long_event (EDayViewTopItem *dvtitem,
icon_x -= icon_x_inc;
}
- if (icon_x <= max_icon_x && cal_component_has_alarms (comp)) {
+ if (icon_x <= max_icon_x && e_cal_component_has_alarms (comp)) {
gdk_gc_set_clip_origin (gc, icon_x, icon_y);
gdk_gc_set_clip_mask (gc, day_view->reminder_mask);
gdk_draw_pixmap (drawable, gc,
@@ -550,7 +550,7 @@ e_day_view_top_item_draw_long_event (EDayViewTopItem *dvtitem,
}
/* draw categories icons */
- cal_component_get_categories_list (comp, &categories_list);
+ e_cal_component_get_categories_list (comp, &categories_list);
for (elem = categories_list; elem; elem = elem->next) {
char *category;
GdkPixmap *pixmap = NULL;
@@ -578,7 +578,7 @@ e_day_view_top_item_draw_long_event (EDayViewTopItem *dvtitem,
gdk_bitmap_unref (mask);
}
- cal_component_free_categories_list (categories_list);
+ e_cal_component_free_categories_list (categories_list);
g_object_unref (comp);
gdk_gc_set_clip_mask (gc, NULL);
@@ -672,7 +672,7 @@ e_day_view_top_item_get_day_label (EDayView *day_view, gint day,
day_start_tt = icaltime_from_timet_with_zone (day_view->day_starts[day],
FALSE,
- e_cal_view_get_timezone (E_CAL_VIEW (day_view)));
+ e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
day_start.tm_year = day_start_tt.year - 1900;
day_start.tm_mon = day_start_tt.month - 1;
day_start.tm_mday = day_start_tt.day;
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index bfdb788327..74943593aa 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -53,7 +53,7 @@
#include <e-util/e-categories-config.h>
#include <e-util/e-dialog-utils.h>
-#include "cal-util/timeutil.h"
+#include <libecal/e-cal-time-util.h>
#include "dialogs/delete-comp.h"
#include "dialogs/delete-error.h"
#include "dialogs/send-comp.h"
@@ -159,11 +159,11 @@ static gboolean e_day_view_get_extreme_event (EDayView *day_view,
static gboolean e_day_view_do_key_press (GtkWidget *widget,
GdkEventKey *event);
static gboolean e_day_view_popup_menu (GtkWidget *widget);
-static GList *e_day_view_get_selected_events (ECalView *cal_view);
-static void e_day_view_get_selected_time_range (ECalView *cal_view, time_t *start_time, time_t *end_time);
-static void e_day_view_set_selected_time_range (ECalView *cal_view, time_t start_time, time_t end_time);
-static gboolean e_day_view_get_visible_time_range (ECalView *cal_view, time_t *start_time, time_t *end_time);
-static void e_day_view_update_query (ECalView *cal_view);
+static GList *e_day_view_get_selected_events (ECalendarView *cal_view);
+static void e_day_view_get_selected_time_range (ECalendarView *cal_view, time_t *start_time, time_t *end_time);
+static void e_day_view_set_selected_time_range (ECalendarView *cal_view, time_t start_time, time_t end_time);
+static gboolean e_day_view_get_visible_time_range (ECalendarView *cal_view, time_t *start_time, time_t *end_time);
+static void e_day_view_update_query (ECalendarView *cal_view);
static void e_day_view_goto_start_of_work_day (EDayView *day_view);
static void e_day_view_goto_end_of_work_day (EDayView *day_view);
static void e_day_view_change_duration_to_start_of_work_day (EDayView *day_view);
@@ -237,27 +237,27 @@ static void e_day_view_abort_resize (EDayView *day_view,
static gboolean e_day_view_on_long_event_button_press (EDayView *day_view,
gint event_num,
GdkEventButton *event,
- ECalViewPosition pos,
+ ECalendarViewPosition pos,
gint event_x,
gint event_y);
static gboolean e_day_view_on_event_button_press (EDayView *day_view,
gint day,
gint event_num,
GdkEventButton *event,
- ECalViewPosition pos,
+ ECalendarViewPosition pos,
gint event_x,
gint event_y);
static void e_day_view_on_long_event_click (EDayView *day_view,
gint event_num,
GdkEventButton *bevent,
- ECalViewPosition pos,
+ ECalendarViewPosition pos,
gint event_x,
gint event_y);
static void e_day_view_on_event_click (EDayView *day_view,
gint day,
gint event_num,
GdkEventButton *event,
- ECalViewPosition pos,
+ ECalendarViewPosition pos,
gint event_x,
gint event_y);
static void e_day_view_on_event_double_click (EDayView *day_view,
@@ -278,12 +278,12 @@ static void e_day_view_recalc_day_starts (EDayView *day_view,
static void e_day_view_recalc_num_rows (EDayView *day_view);
static void e_day_view_recalc_cell_sizes (EDayView *day_view);
-static ECalViewPosition e_day_view_convert_position_in_top_canvas (EDayView *day_view,
+static ECalendarViewPosition e_day_view_convert_position_in_top_canvas (EDayView *day_view,
gint x,
gint y,
gint *day_return,
gint *event_num_return);
-static ECalViewPosition e_day_view_convert_position_in_main_canvas (EDayView *day_view,
+static ECalendarViewPosition e_day_view_convert_position_in_main_canvas (EDayView *day_view,
gint x,
gint y,
gint *day_return,
@@ -310,7 +310,7 @@ static void e_day_view_foreach_event_with_uid (EDayView *day_view,
static void e_day_view_free_events (EDayView *day_view);
static void e_day_view_free_event_array (EDayView *day_view,
GArray *array);
-static int e_day_view_add_event (CalComponent *comp,
+static int e_day_view_add_event (ECalComponent *comp,
time_t start,
time_t end,
gpointer data);
@@ -444,19 +444,19 @@ static gboolean e_day_view_layout_timeout_cb (gpointer data);
static GtkTableClass *parent_class;
E_MAKE_TYPE (e_day_view, "EDayView", EDayView, e_day_view_class_init,
- e_day_view_init, e_cal_view_get_type ());
+ e_day_view_init, e_calendar_view_get_type ());
static void
e_day_view_class_init (EDayViewClass *class)
{
GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
- ECalViewClass *view_class;
+ ECalendarViewClass *view_class;
parent_class = g_type_class_peek_parent (class);
object_class = (GtkObjectClass *) class;
widget_class = (GtkWidgetClass *) class;
- view_class = (ECalViewClass *) class;
+ view_class = (ECalendarViewClass *) class;
/* Method override */
object_class->destroy = e_day_view_destroy;
@@ -482,7 +482,7 @@ e_day_view_class_init (EDayViewClass *class)
}
static void
-timezone_changed_cb (ECalView *cal_view, icaltimezone *old_zone,
+timezone_changed_cb (ECalendarView *cal_view, icaltimezone *old_zone,
icaltimezone *new_zone, gpointer user_data)
{
struct icaltimetype tt;
@@ -503,7 +503,7 @@ timezone_changed_cb (ECalView *cal_view, icaltimezone *old_zone,
lower = icaltime_as_timet_with_zone (tt, new_zone);
e_day_view_recalc_day_starts (day_view, lower);
- e_day_view_update_query ((ECalView *) day_view);
+ e_day_view_update_query ((ECalendarView *) day_view);
}
static void
@@ -581,7 +581,7 @@ e_day_view_init (EDayView *day_view)
day_view->selection_drag_pos = E_DAY_VIEW_DRAG_END;
day_view->selection_in_top_canvas = FALSE;
- day_view->resize_drag_pos = E_CAL_VIEW_POS_NONE;
+ day_view->resize_drag_pos = E_CALENDAR_VIEW_POS_NONE;
day_view->pressed_event_day = -1;
@@ -819,7 +819,7 @@ e_day_view_init (EDayView *day_view)
target_table, n_targets,
GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_ASK);
- /* connect to ECalView's signals */
+ /* connect to ECalendarView's signals */
g_signal_connect (G_OBJECT (day_view), "timezone_changed",
G_CALLBACK (timezone_changed_cb), NULL);
}
@@ -1644,7 +1644,7 @@ e_day_view_update_event_label (EDayView *day_view,
&end_suffix,
&end_suffix_width);
- if (e_cal_view_get_use_24_hour_format (E_CAL_VIEW (day_view))) {
+ if (e_calendar_view_get_use_24_hour_format (E_CALENDAR_VIEW (day_view))) {
if (day_view->show_event_end_times) {
/* 24 hour format with end time. */
text = g_strdup_printf
@@ -1809,7 +1809,7 @@ e_day_view_find_event_from_uid (EDayView *day_view,
and are both visible in the view, then the selection is set to those times,
otherwise it is set to 1 hour from the start of the working day. */
static void
-e_day_view_set_selected_time_range (ECalView *cal_view,
+e_day_view_set_selected_time_range (ECalendarView *cal_view,
time_t start_time,
time_t end_time)
{
@@ -1825,7 +1825,7 @@ e_day_view_set_selected_time_range (ECalView *cal_view,
start of the day given by start_time, otherwise it is the previous
work-week start day. */
if (!day_view->work_week_view) {
- lower = time_day_begin_with_zone (start_time, e_cal_view_get_timezone (E_CAL_VIEW (day_view)));
+ lower = time_day_begin_with_zone (start_time, e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
} else {
lower = e_day_view_find_work_week_start (day_view, start_time);
}
@@ -1833,7 +1833,7 @@ e_day_view_set_selected_time_range (ECalView *cal_view,
/* See if we need to change the days shown. */
if (lower != day_view->lower) {
e_day_view_recalc_day_starts (day_view, lower);
- e_day_view_update_query ((ECalView *) day_view);
+ e_day_view_update_query ((ECalendarView *) day_view);
}
/* Set the selection. */
@@ -1992,7 +1992,7 @@ e_day_view_find_work_week_start (EDayView *day_view,
guint offset;
struct icaltimetype tt = icaltime_null_time ();
- time_to_gdate_with_zone (&date, start_time, e_cal_view_get_timezone (E_CAL_VIEW (day_view)));
+ time_to_gdate_with_zone (&date, start_time, e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
/* The start of the work-week is the first working day after the
week start day. */
@@ -2023,12 +2023,12 @@ e_day_view_find_work_week_start (EDayView *day_view,
tt.month = g_date_month (&date);
tt.day = g_date_day (&date);
- return icaltime_as_timet_with_zone (tt, e_cal_view_get_timezone (E_CAL_VIEW (day_view)));
+ return icaltime_as_timet_with_zone (tt, e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
}
/* Returns the selected time range. */
static void
-e_day_view_get_selected_time_range (ECalView *cal_view, time_t *start_time, time_t *end_time)
+e_day_view_get_selected_time_range (ECalendarView *cal_view, time_t *start_time, time_t *end_time)
{
gint start_col, start_row, end_col, end_row;
time_t start, end;
@@ -2066,7 +2066,7 @@ e_day_view_get_selected_time_range (ECalView *cal_view, time_t *start_time, time
/* Gets the visible time range. Returns FALSE if no time range has been set. */
static gboolean
-e_day_view_get_visible_time_range (ECalView *cal_view,
+e_day_view_get_visible_time_range (ECalendarView *cal_view,
time_t *start_time,
time_t *end_time)
{
@@ -2090,7 +2090,7 @@ e_day_view_recalc_day_starts (EDayView *day_view,
day_view->day_starts[0] = start_time;
for (day = 1; day <= day_view->days_shown; day++) {
- day_view->day_starts[day] = time_add_day_with_zone (day_view->day_starts[day - 1], 1, e_cal_view_get_timezone (E_CAL_VIEW (day_view)));
+ day_view->day_starts[day] = time_add_day_with_zone (day_view->day_starts[day - 1], 1, e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
}
#if 0
@@ -2161,7 +2161,7 @@ e_day_view_set_days_shown (EDayView *day_view,
e_day_view_recalc_day_starts (day_view, day_view->lower);
e_day_view_recalc_cell_sizes (day_view);
- e_day_view_update_query ((ECalView *) day_view);
+ e_day_view_update_query ((ECalendarView *) day_view);
}
@@ -2404,7 +2404,7 @@ e_day_view_recalc_work_week (EDayView *day_view)
day_view->selection_start_day = -1;
e_day_view_recalc_day_starts (day_view, lower);
- e_day_view_update_query ((ECalView *) day_view);
+ e_day_view_update_query ((ECalendarView *) day_view);
/* This updates the date navigator. */
e_day_view_update_calendar_selection_time (day_view);
@@ -2503,7 +2503,7 @@ e_day_view_on_top_canvas_button_press (GtkWidget *widget,
EDayView *day_view)
{
gint event_x, event_y, day, event_num;
- ECalViewPosition pos;
+ ECalendarViewPosition pos;
/* Convert the coords to the main canvas window, or return if the
window is not found. */
@@ -2516,10 +2516,10 @@ e_day_view_on_top_canvas_button_press (GtkWidget *widget,
event_x, event_y,
&day, &event_num);
- if (pos == E_CAL_VIEW_POS_OUTSIDE)
+ if (pos == E_CALENDAR_VIEW_POS_OUTSIDE)
return FALSE;
- if (pos != E_CAL_VIEW_POS_NONE)
+ if (pos != E_CALENDAR_VIEW_POS_NONE)
return e_day_view_on_long_event_button_press (day_view,
event_num,
event, pos,
@@ -2532,8 +2532,8 @@ e_day_view_on_top_canvas_button_press (GtkWidget *widget,
if (event->type == GDK_2BUTTON_PRESS) {
time_t dtstart, dtend;
- e_day_view_get_selected_time_range ((ECalView *) day_view, &dtstart, &dtend);
- e_cal_view_new_appointment_for (E_CAL_VIEW (day_view),
+ e_day_view_get_selected_time_range ((ECalendarView *) day_view, &dtstart, &dtend);
+ e_calendar_view_new_appointment_for (E_CALENDAR_VIEW (day_view),
dtstart, dtend,
TRUE, FALSE);
return TRUE;
@@ -2619,7 +2619,7 @@ e_day_view_on_main_canvas_button_press (GtkWidget *widget,
EDayView *day_view)
{
gint event_x, event_y, row, day, event_num;
- ECalViewPosition pos;
+ ECalendarViewPosition pos;
#if 0
g_print ("In e_day_view_on_main_canvas_button_press\n");
@@ -2638,10 +2638,10 @@ e_day_view_on_main_canvas_button_press (GtkWidget *widget,
&day, &row,
&event_num);
- if (pos == E_CAL_VIEW_POS_OUTSIDE)
+ if (pos == E_CALENDAR_VIEW_POS_OUTSIDE)
return FALSE;
- if (pos != E_CAL_VIEW_POS_NONE)
+ if (pos != E_CALENDAR_VIEW_POS_NONE)
return e_day_view_on_event_button_press (day_view, day,
event_num, event, pos,
event_x, event_y);
@@ -2653,8 +2653,8 @@ e_day_view_on_main_canvas_button_press (GtkWidget *widget,
if (event->type == GDK_2BUTTON_PRESS) {
time_t dtstart, dtend;
- e_day_view_get_selected_time_range ((ECalView *) day_view, &dtstart, &dtend);
- e_cal_view_new_appointment_for (E_CAL_VIEW (day_view),
+ e_day_view_get_selected_time_range ((ECalendarView *) day_view, &dtstart, &dtend);
+ e_calendar_view_new_appointment_for (E_CALENDAR_VIEW (day_view),
dtstart, dtend,
FALSE, FALSE);
return TRUE;
@@ -2731,7 +2731,7 @@ static gboolean
e_day_view_on_long_event_button_press (EDayView *day_view,
gint event_num,
GdkEventButton *event,
- ECalViewPosition pos,
+ ECalendarViewPosition pos,
gint event_x,
gint event_y)
{
@@ -2773,7 +2773,7 @@ e_day_view_on_event_button_press (EDayView *day_view,
gint day,
gint event_num,
GdkEventButton *event,
- ECalViewPosition pos,
+ ECalendarViewPosition pos,
gint event_x,
gint event_y)
{
@@ -2813,7 +2813,7 @@ static void
e_day_view_on_long_event_click (EDayView *day_view,
gint event_num,
GdkEventButton *bevent,
- ECalViewPosition pos,
+ ECalendarViewPosition pos,
gint event_x,
gint event_y)
{
@@ -2825,14 +2825,14 @@ e_day_view_on_long_event_click (EDayView *day_view,
event_num);
/* Ignore clicks on the EText while editing. */
- if (pos == E_CAL_VIEW_POS_EVENT
+ if (pos == E_CALENDAR_VIEW_POS_EVENT
&& E_TEXT (event->canvas_item)->editing)
return;
- if ((cal_util_component_is_instance (event->comp_data->icalcomp) ||
- !cal_util_component_has_recurrences (event->comp_data->icalcomp))
- && (pos == E_CAL_VIEW_POS_LEFT_EDGE
- || pos == E_CAL_VIEW_POS_RIGHT_EDGE)) {
+ if ((e_cal_util_component_is_instance (event->comp_data->icalcomp) ||
+ !e_cal_util_component_has_recurrences (event->comp_data->icalcomp))
+ && (pos == E_CALENDAR_VIEW_POS_LEFT_EDGE
+ || pos == E_CALENDAR_VIEW_POS_RIGHT_EDGE)) {
if (!e_day_view_find_long_event_days (event,
day_view->days_shown,
day_view->day_starts,
@@ -2889,7 +2889,7 @@ e_day_view_on_event_click (EDayView *day_view,
gint day,
gint event_num,
GdkEventButton *bevent,
- ECalViewPosition pos,
+ ECalendarViewPosition pos,
gint event_x,
gint event_y)
{
@@ -2900,14 +2900,14 @@ e_day_view_on_event_click (EDayView *day_view,
event_num);
/* Ignore clicks on the EText while editing. */
- if (pos == E_CAL_VIEW_POS_EVENT
+ if (pos == E_CALENDAR_VIEW_POS_EVENT
&& E_TEXT (event->canvas_item)->editing)
return;
- if ((cal_util_component_is_instance (event->comp_data->icalcomp) ||
- !cal_util_component_has_recurrences (event->comp_data->icalcomp))
- && (pos == E_CAL_VIEW_POS_TOP_EDGE
- || pos == E_CAL_VIEW_POS_BOTTOM_EDGE)) {
+ if ((e_cal_util_component_is_instance (event->comp_data->icalcomp) ||
+ !e_cal_util_component_has_recurrences (event->comp_data->icalcomp))
+ && (pos == E_CALENDAR_VIEW_POS_TOP_EDGE
+ || pos == E_CALENDAR_VIEW_POS_BOTTOM_EDGE)) {
/* Grab the keyboard focus, so the event being edited is saved
and we can use the Escape key to abort the resize. */
if (!GTK_WIDGET_HAS_FOCUS (day_view))
@@ -2973,7 +2973,7 @@ e_day_view_reshape_resize_long_event_rect_item (EDayView *day_view)
/* If we're not resizing an event, or the event is not shown,
hide the resize bars. */
- if (day_view->resize_drag_pos == E_CAL_VIEW_POS_NONE
+ if (day_view->resize_drag_pos == E_CALENDAR_VIEW_POS_NONE
|| !e_day_view_get_long_event_position (day_view, event_num,
&start_day, &end_day,
&item_x, &item_y,
@@ -3009,7 +3009,7 @@ e_day_view_reshape_resize_rect_item (EDayView *day_view)
/* If we're not resizing an event, or the event is not shown,
hide the resize bars. */
- if (day_view->resize_drag_pos == E_CAL_VIEW_POS_NONE
+ if (day_view->resize_drag_pos == E_CALENDAR_VIEW_POS_NONE
|| !e_day_view_get_event_position (day_view, day, event_num,
&item_x, &item_y,
&item_w, &item_h)) {
@@ -3056,7 +3056,7 @@ e_day_view_on_event_double_click (EDayView *day_view,
e_day_view_stop_editing_event (day_view);
- e_cal_view_edit_appointment (E_CAL_VIEW (day_view),
+ e_calendar_view_edit_appointment (E_CALENDAR_VIEW (day_view),
event->comp_data->client,
event->comp_data->icalcomp, FALSE);
}
@@ -3072,7 +3072,7 @@ e_day_view_show_popup_menu (EDayView *day_view,
day_view->popup_event_day = day;
day_view->popup_event_num = event_num;
- popup = e_cal_view_create_popup_menu (E_CAL_VIEW (day_view));
+ popup = e_calendar_view_create_popup_menu (E_CALENDAR_VIEW (day_view));
e_popup_menu (popup, gdk_event);
}
@@ -3088,7 +3088,7 @@ e_day_view_popup_menu (GtkWidget *widget)
/* Returns the currently-selected event, or NULL if none */
static GList *
-e_day_view_get_selected_events (ECalView *cal_view)
+e_day_view_get_selected_events (ECalendarView *cal_view)
{
EDayViewEvent *event = NULL;
GList *list = NULL;
@@ -3128,7 +3128,7 @@ process_component (EDayView *day_view, ECalModelComponent *comp_data)
EDayViewEvent *event;
gint day, event_num;
const char *uid;
- CalComponent *comp;
+ ECalComponent *comp;
AddEventData add_event_data;
/* If our time hasn't been set yet, just return. */
@@ -3148,8 +3148,8 @@ process_component (EDayView *day_view, ECalModelComponent *comp_data)
event = &g_array_index (day_view->events[day],
EDayViewEvent, event_num);
- if (!cal_util_component_has_recurrences (comp_data->icalcomp)
- && cal_util_event_dates_match (event->comp_data->icalcomp, comp_data->icalcomp)) {
+ if (!e_cal_util_component_has_recurrences (comp_data->icalcomp)
+ && e_cal_util_event_dates_match (event->comp_data->icalcomp, comp_data->icalcomp)) {
#if 0
g_print ("updated object's dates unchanged\n");
#endif
@@ -3170,16 +3170,16 @@ process_component (EDayView *day_view, ECalModelComponent *comp_data)
}
/* Add the occurrences of the event */
- comp = cal_component_new ();
- cal_component_set_icalcomponent (comp, icalcomponent_new_clone (comp_data->icalcomp));
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (comp_data->icalcomp));
add_event_data.day_view = day_view;
add_event_data.comp_data = comp_data;
- cal_recur_generate_instances (comp, day_view->lower,
+ e_cal_recur_generate_instances (comp, day_view->lower,
day_view->upper,
e_day_view_add_event, &add_event_data,
- cal_client_resolve_tzid_cb, comp_data->client,
- e_cal_view_get_timezone (E_CAL_VIEW (day_view)));
+ e_cal_resolve_tzid_cb, comp_data->client,
+ e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
g_object_unref (comp);
@@ -3188,7 +3188,7 @@ process_component (EDayView *day_view, ECalModelComponent *comp_data)
/* Restarts a query for the day view */
static void
-e_day_view_update_query (ECalView *cal_view)
+e_day_view_update_query (ECalendarView *cal_view)
{
gint rows, r;
EDayView *day_view = E_DAY_VIEW (cal_view);
@@ -3200,11 +3200,11 @@ e_day_view_update_query (ECalView *cal_view)
e_day_view_free_events (day_view);
e_day_view_queue_layout (day_view);
- rows = e_table_model_row_count (E_TABLE_MODEL (e_cal_view_get_model (E_CAL_VIEW (day_view))));
+ rows = e_table_model_row_count (E_TABLE_MODEL (e_calendar_view_get_model (E_CALENDAR_VIEW (day_view))));
for (r = 0; r < rows; r++) {
ECalModelComponent *comp_data;
- comp_data = e_cal_model_get_component_at (e_cal_view_get_model (E_CAL_VIEW (day_view)), r);
+ comp_data = e_cal_model_get_component_at (e_calendar_view_get_model (E_CALENDAR_VIEW (day_view)), r);
g_assert (comp_data != NULL);
process_component (day_view, comp_data);
}
@@ -3245,7 +3245,7 @@ e_day_view_on_top_canvas_button_release (GtkWidget *widget,
if (day_view->selection_is_being_dragged) {
gdk_pointer_ungrab (event->time);
e_day_view_finish_selection (day_view);
- } else if (day_view->resize_drag_pos != E_CAL_VIEW_POS_NONE) {
+ } else if (day_view->resize_drag_pos != E_CALENDAR_VIEW_POS_NONE) {
gdk_pointer_ungrab (event->time);
e_day_view_finish_long_event_resize (day_view);
} else if (day_view->pressed_event_day != -1) {
@@ -3274,7 +3274,7 @@ e_day_view_on_main_canvas_button_release (GtkWidget *widget,
gdk_pointer_ungrab (event->time);
e_day_view_finish_selection (day_view);
e_day_view_stop_auto_scroll (day_view);
- } else if (day_view->resize_drag_pos != E_CAL_VIEW_POS_NONE) {
+ } else if (day_view->resize_drag_pos != E_CALENDAR_VIEW_POS_NONE) {
gdk_pointer_ungrab (event->time);
e_day_view_finish_resize (day_view);
e_day_view_stop_auto_scroll (day_view);
@@ -3297,14 +3297,14 @@ e_day_view_update_calendar_selection_time (EDayView *day_view)
time_t start, end;
GnomeCalendar *calendar;
- e_day_view_get_selected_time_range ((ECalView *) day_view, &start, &end);
+ e_day_view_get_selected_time_range ((ECalendarView *) day_view, &start, &end);
#if 0
g_print ("Start: %s", ctime (&start));
g_print ("End : %s", ctime (&end));
#endif
- calendar = e_cal_view_get_calendar (E_CAL_VIEW (day_view));
+ calendar = e_calendar_view_get_calendar (E_CALENDAR_VIEW (day_view));
if (calendar)
gnome_calendar_set_selected_time_range (calendar,
start, end);
@@ -3317,7 +3317,7 @@ e_day_view_on_top_canvas_motion (GtkWidget *widget,
EDayView *day_view)
{
EDayViewEvent *event = NULL;
- ECalViewPosition pos;
+ ECalendarViewPosition pos;
gint event_x, event_y, canvas_x, canvas_y;
gint day, event_num;
GdkCursor *cursor;
@@ -3346,8 +3346,8 @@ e_day_view_on_top_canvas_motion (GtkWidget *widget,
if (day_view->selection_is_being_dragged) {
e_day_view_update_selection (day_view, day, -1);
return TRUE;
- } else if (day_view->resize_drag_pos != E_CAL_VIEW_POS_NONE) {
- if (pos != E_CAL_VIEW_POS_OUTSIDE) {
+ } else if (day_view->resize_drag_pos != E_CALENDAR_VIEW_POS_NONE) {
+ if (pos != E_CALENDAR_VIEW_POS_OUTSIDE) {
e_day_view_update_long_event_resize (day_view, day);
return TRUE;
}
@@ -3357,8 +3357,8 @@ e_day_view_on_top_canvas_motion (GtkWidget *widget,
event = &g_array_index (day_view->long_events, EDayViewEvent,
day_view->pressed_event_num);
- if ((cal_util_component_is_instance (event->comp_data->icalcomp) ||
- !cal_util_component_has_recurrences (event->comp_data->icalcomp))
+ if ((e_cal_util_component_is_instance (event->comp_data->icalcomp) ||
+ !e_cal_util_component_has_recurrences (event->comp_data->icalcomp))
&& (abs (canvas_x - day_view->drag_event_x)
> E_DAY_VIEW_DRAG_START_OFFSET
|| abs (canvas_y - day_view->drag_event_y)
@@ -3386,11 +3386,11 @@ e_day_view_on_top_canvas_motion (GtkWidget *widget,
cursor = day_view->normal_cursor;
/* Recurring events can't be resized. */
- if (event && (cal_util_component_is_instance (event->comp_data->icalcomp) ||
- !cal_util_component_has_recurrences (event->comp_data->icalcomp))) {
+ if (event && (e_cal_util_component_is_instance (event->comp_data->icalcomp) ||
+ !e_cal_util_component_has_recurrences (event->comp_data->icalcomp))) {
switch (pos) {
- case E_CAL_VIEW_POS_LEFT_EDGE:
- case E_CAL_VIEW_POS_RIGHT_EDGE:
+ case E_CALENDAR_VIEW_POS_LEFT_EDGE:
+ case E_CALENDAR_VIEW_POS_RIGHT_EDGE:
cursor = day_view->resize_width_cursor;
break;
default:
@@ -3416,7 +3416,7 @@ e_day_view_on_main_canvas_motion (GtkWidget *widget,
EDayView *day_view)
{
EDayViewEvent *event = NULL;
- ECalViewPosition pos;
+ ECalendarViewPosition pos;
gint event_x, event_y, canvas_x, canvas_y;
gint row, day, event_num;
GdkCursor *cursor;
@@ -3444,14 +3444,14 @@ e_day_view_on_main_canvas_motion (GtkWidget *widget,
event_num);
if (day_view->selection_is_being_dragged) {
- if (pos != E_CAL_VIEW_POS_OUTSIDE) {
+ if (pos != E_CALENDAR_VIEW_POS_OUTSIDE) {
e_day_view_update_selection (day_view, day, row);
e_day_view_check_auto_scroll (day_view,
event_x, event_y);
return TRUE;
}
- } else if (day_view->resize_drag_pos != E_CAL_VIEW_POS_NONE) {
- if (pos != E_CAL_VIEW_POS_OUTSIDE) {
+ } else if (day_view->resize_drag_pos != E_CALENDAR_VIEW_POS_NONE) {
+ if (pos != E_CALENDAR_VIEW_POS_OUTSIDE) {
e_day_view_update_resize (day_view, row);
e_day_view_check_auto_scroll (day_view,
event_x, event_y);
@@ -3463,8 +3463,8 @@ e_day_view_on_main_canvas_motion (GtkWidget *widget,
event = &g_array_index (day_view->events[day_view->pressed_event_day], EDayViewEvent, day_view->pressed_event_num);
- if ((cal_util_component_is_instance (event->comp_data->icalcomp) ||
- !cal_util_component_has_recurrences (event->comp_data->icalcomp))
+ if ((e_cal_util_component_is_instance (event->comp_data->icalcomp) ||
+ !e_cal_util_component_has_recurrences (event->comp_data->icalcomp))
&& (abs (canvas_x - day_view->drag_event_x)
> E_DAY_VIEW_DRAG_START_OFFSET
|| abs (canvas_y - day_view->drag_event_y)
@@ -3492,14 +3492,14 @@ e_day_view_on_main_canvas_motion (GtkWidget *widget,
cursor = day_view->normal_cursor;
/* Recurring events can't be resized. */
- if (event && (cal_util_component_is_instance (event->comp_data->icalcomp) ||
- !cal_util_component_has_recurrences (event->comp_data->icalcomp))) {
+ if (event && (e_cal_util_component_is_instance (event->comp_data->icalcomp) ||
+ !e_cal_util_component_has_recurrences (event->comp_data->icalcomp))) {
switch (pos) {
- case E_CAL_VIEW_POS_LEFT_EDGE:
+ case E_CALENDAR_VIEW_POS_LEFT_EDGE:
cursor = day_view->move_cursor;
break;
- case E_CAL_VIEW_POS_TOP_EDGE:
- case E_CAL_VIEW_POS_BOTTOM_EDGE:
+ case E_CALENDAR_VIEW_POS_TOP_EDGE:
+ case E_CALENDAR_VIEW_POS_BOTTOM_EDGE:
cursor = day_view->resize_height_cursor;
break;
default:
@@ -3640,7 +3640,7 @@ e_day_view_update_long_event_resize (EDayView *day_view,
event = &g_array_index (day_view->long_events, EDayViewEvent,
event_num);
- if (day_view->resize_drag_pos == E_CAL_VIEW_POS_LEFT_EDGE) {
+ if (day_view->resize_drag_pos == E_CALENDAR_VIEW_POS_LEFT_EDGE) {
day = MIN (day, day_view->resize_end_row);
if (day != day_view->resize_start_row) {
need_reshape = TRUE;
@@ -3681,7 +3681,7 @@ e_day_view_update_resize (EDayView *day_view,
event = &g_array_index (day_view->events[day], EDayViewEvent,
event_num);
- if (day_view->resize_drag_pos == E_CAL_VIEW_POS_TOP_EDGE) {
+ if (day_view->resize_drag_pos == E_CALENDAR_VIEW_POS_TOP_EDGE) {
row = MIN (row, day_view->resize_end_row);
if (row != day_view->resize_start_row) {
need_reshape = TRUE;
@@ -3713,11 +3713,11 @@ e_day_view_finish_long_event_resize (EDayView *day_view)
{
EDayViewEvent *event;
gint event_num;
- CalComponent *comp;
- CalComponentDateTime date;
+ ECalComponent *comp;
+ ECalComponentDateTime date;
struct icaltimetype itt;
time_t dt;
- CalClient *client;
+ ECal *client;
CalObjModType mod = CALOBJ_MOD_ALL;
GtkWindow *toplevel;
@@ -3730,27 +3730,27 @@ e_day_view_finish_long_event_resize (EDayView *day_view)
/* We use a temporary copy of the comp since we don't want to
change the original comp here. Otherwise we would not detect that
the event's time had changed in the "update_event" callback. */
- comp = cal_component_new ();
- cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
date.value = &itt;
/* FIXME: Should probably keep the timezone of the original start
and end times. */
- date.tzid = icaltimezone_get_tzid (e_cal_view_get_timezone (E_CAL_VIEW (day_view)));
+ date.tzid = icaltimezone_get_tzid (e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
- if (day_view->resize_drag_pos == E_CAL_VIEW_POS_LEFT_EDGE) {
+ if (day_view->resize_drag_pos == E_CALENDAR_VIEW_POS_LEFT_EDGE) {
dt = day_view->day_starts[day_view->resize_start_row];
*date.value = icaltime_from_timet_with_zone (dt, FALSE,
- e_cal_view_get_timezone (E_CAL_VIEW (day_view)));
- cal_component_set_dtstart (comp, &date);
+ e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
+ e_cal_component_set_dtstart (comp, &date);
} else {
dt = day_view->day_starts[day_view->resize_end_row + 1];
*date.value = icaltime_from_timet_with_zone (dt, FALSE,
- e_cal_view_get_timezone (E_CAL_VIEW (day_view)));
- cal_component_set_dtend (comp, &date);
+ e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
+ e_cal_component_set_dtend (comp, &date);
}
- if (cal_component_has_recurrences (comp)) {
+ if (e_cal_component_has_recurrences (comp)) {
if (!recur_component_dialog (client, comp, &mod, NULL)) {
gtk_widget_queue_draw (day_view->top_canvas);
goto out;
@@ -3759,10 +3759,10 @@ e_day_view_finish_long_event_resize (EDayView *day_view)
toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (day_view)));
- if (cal_client_modify_object (client, cal_component_get_icalcomponent (comp), mod, NULL)) {
+ if (e_cal_modify_object (client, e_cal_component_get_icalcomponent (comp), mod, NULL)) {
if (itip_organizer_is_user (comp, client) &&
send_component_dialog (toplevel, client, comp, TRUE)) {
- itip_send_comp (CAL_COMPONENT_METHOD_REQUEST, comp, client, NULL);
+ itip_send_comp (E_CAL_COMPONENT_METHOD_REQUEST, comp, client, NULL);
} else {
g_message (G_STRLOC ": Could not update the object!");
}
@@ -3771,7 +3771,7 @@ e_day_view_finish_long_event_resize (EDayView *day_view)
out:
gnome_canvas_item_hide (day_view->resize_long_event_rect_item);
- day_view->resize_drag_pos = E_CAL_VIEW_POS_NONE;
+ day_view->resize_drag_pos = E_CALENDAR_VIEW_POS_NONE;
g_object_unref (comp);
}
@@ -3784,11 +3784,11 @@ e_day_view_finish_resize (EDayView *day_view)
{
EDayViewEvent *event;
gint day, event_num;
- CalComponent *comp;
- CalComponentDateTime date;
+ ECalComponent *comp;
+ ECalComponentDateTime date;
struct icaltimetype itt;
time_t dt;
- CalClient *client;
+ ECal *client;
CalObjModType mod = CALOBJ_MOD_ALL;
GtkWindow *toplevel;
@@ -3802,24 +3802,24 @@ e_day_view_finish_resize (EDayView *day_view)
/* We use a temporary shallow copy of the ico since we don't want to
change the original ico here. Otherwise we would not detect that
the event's time had changed in the "update_event" callback. */
- comp = cal_component_new ();
- cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
date.value = &itt;
/* FIXME: Should probably keep the timezone of the original start
and end times. */
- date.tzid = icaltimezone_get_tzid (e_cal_view_get_timezone (E_CAL_VIEW (day_view)));
+ date.tzid = icaltimezone_get_tzid (e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
- if (day_view->resize_drag_pos == E_CAL_VIEW_POS_TOP_EDGE) {
+ if (day_view->resize_drag_pos == E_CALENDAR_VIEW_POS_TOP_EDGE) {
dt = e_day_view_convert_grid_position_to_time (day_view, day, day_view->resize_start_row);
*date.value = icaltime_from_timet_with_zone (dt, FALSE,
- e_cal_view_get_timezone (E_CAL_VIEW (day_view)));
- cal_component_set_dtstart (comp, &date);
+ e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
+ e_cal_component_set_dtstart (comp, &date);
} else {
dt = e_day_view_convert_grid_position_to_time (day_view, day, day_view->resize_end_row + 1);
*date.value = icaltime_from_timet_with_zone (dt, FALSE,
- e_cal_view_get_timezone (E_CAL_VIEW (day_view)));
- cal_component_set_dtend (comp, &date);
+ e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
+ e_cal_component_set_dtend (comp, &date);
}
gnome_canvas_item_hide (day_view->resize_rect_item);
@@ -3831,9 +3831,9 @@ e_day_view_finish_resize (EDayView *day_view)
gnome_canvas_item_hide (day_view->main_canvas_top_resize_bar_item);
gnome_canvas_item_hide (day_view->main_canvas_bottom_resize_bar_item);
- day_view->resize_drag_pos = E_CAL_VIEW_POS_NONE;
+ day_view->resize_drag_pos = E_CALENDAR_VIEW_POS_NONE;
- if (cal_component_has_recurrences (comp)) {
+ if (e_cal_component_has_recurrences (comp)) {
if (!recur_component_dialog (client, comp, &mod, NULL)) {
gtk_widget_queue_draw (day_view->top_canvas);
goto out;
@@ -3842,11 +3842,11 @@ e_day_view_finish_resize (EDayView *day_view)
toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (day_view)));
- cal_component_commit_sequence (comp);
- if (cal_client_modify_object (client, cal_component_get_icalcomponent (comp), mod, NULL)) {
+ e_cal_component_commit_sequence (comp);
+ if (e_cal_modify_object (client, e_cal_component_get_icalcomponent (comp), mod, NULL)) {
if (itip_organizer_is_user (comp, client) &&
send_component_dialog (toplevel, client, comp, TRUE)) {
- itip_send_comp (CAL_COMPONENT_METHOD_REQUEST, comp, client, NULL);
+ itip_send_comp (E_CAL_COMPONENT_METHOD_REQUEST, comp, client, NULL);
} else {
g_message (G_STRLOC ": Could not update the object!");
}
@@ -3863,10 +3863,10 @@ e_day_view_abort_resize (EDayView *day_view,
{
gint day, event_num;
- if (day_view->resize_drag_pos == E_CAL_VIEW_POS_NONE)
+ if (day_view->resize_drag_pos == E_CALENDAR_VIEW_POS_NONE)
return;
- day_view->resize_drag_pos = E_CAL_VIEW_POS_NONE;
+ day_view->resize_drag_pos = E_CALENDAR_VIEW_POS_NONE;
gdk_pointer_ungrab (time);
day = day_view->resize_event_day;
@@ -3938,7 +3938,7 @@ e_day_view_free_event_array (EDayView *day_view,
/* This adds one event to the view, adding it to the appropriate array. */
static gboolean
-e_day_view_add_event (CalComponent *comp,
+e_day_view_add_event (ECalComponent *comp,
time_t start,
time_t end,
gpointer data)
@@ -3964,9 +3964,9 @@ e_day_view_add_event (CalComponent *comp,
g_return_val_if_fail (end > add_event_data->day_view->lower, TRUE);
start_tt = icaltime_from_timet_with_zone (start, FALSE,
- e_cal_view_get_timezone (E_CAL_VIEW (add_event_data->day_view)));
+ e_calendar_view_get_timezone (E_CALENDAR_VIEW (add_event_data->day_view)));
end_tt = icaltime_from_timet_with_zone (end, FALSE,
- e_cal_view_get_timezone (E_CAL_VIEW (add_event_data->day_view)));
+ e_calendar_view_get_timezone (E_CALENDAR_VIEW (add_event_data->day_view)));
if (add_event_data->comp_data) {
event.comp_data = add_event_data->comp_data;
@@ -3975,9 +3975,9 @@ e_day_view_add_event (CalComponent *comp,
event.comp_data = g_new0 (ECalModelComponent, 1);
event.allocated_comp_data = TRUE;
- event.comp_data->client = e_cal_model_get_default_client (e_cal_view_get_model (E_CAL_VIEW (add_event_data->day_view)));
- cal_component_commit_sequence (comp);
- event.comp_data->icalcomp = icalcomponent_new_clone (cal_component_get_icalcomponent (comp));
+ event.comp_data->client = e_cal_model_get_default_client (e_calendar_view_get_model (E_CALENDAR_VIEW (add_event_data->day_view)));
+ e_cal_component_commit_sequence (comp);
+ event.comp_data->icalcomp = icalcomponent_new_clone (e_cal_component_get_icalcomponent (comp));
}
event.start = start;
@@ -3997,7 +3997,7 @@ e_day_view_add_event (CalComponent *comp,
event.different_timezone = FALSE;
if (!cal_comp_util_compare_event_timezones (comp,
event.comp_data->client,
- e_cal_view_get_timezone (E_CAL_VIEW (add_event_data->day_view))))
+ e_calendar_view_get_timezone (E_CALENDAR_VIEW (add_event_data->day_view))))
event.different_timezone = TRUE;
/* Find out which array to add the event to. */
@@ -4126,7 +4126,7 @@ e_day_view_reshape_long_event (EDayView *day_view,
EDayViewEvent *event;
gint start_day, end_day, item_x, item_y, item_w, item_h;
gint text_x, text_w, num_icons, icons_width, width, time_width;
- CalComponent *comp;
+ ECalComponent *comp;
gint min_text_x, max_text_w, text_width, line_len;
gchar *text, *end_of_line;
gboolean show_icons = TRUE, use_max_width = FALSE;
@@ -4157,15 +4157,15 @@ e_day_view_reshape_long_event (EDayView *day_view,
/* We don't show the icons while resizing, since we'd have to
draw them on top of the resize rect. Nor when editing. */
num_icons = 0;
- comp = cal_component_new ();
- cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
/* Set up Pango prerequisites */
font_desc = gtk_widget_get_style (GTK_WIDGET (day_view))->font_desc;
pango_context = gtk_widget_get_pango_context (GTK_WIDGET (day_view));
layout = pango_layout_new (pango_context);
- if (day_view->resize_drag_pos != E_CAL_VIEW_POS_NONE
+ if (day_view->resize_drag_pos != E_CALENDAR_VIEW_POS_NONE
&& day_view->resize_event_day == E_DAY_VIEW_LONG_EVENT
&& day_view->resize_event_num == event_num)
show_icons = FALSE;
@@ -4179,16 +4179,16 @@ e_day_view_reshape_long_event (EDayView *day_view,
if (show_icons) {
GSList *categories_list, *elem;
- if (cal_component_has_alarms (comp))
+ if (e_cal_component_has_alarms (comp))
num_icons++;
- if (cal_component_has_recurrences (comp))
+ if (e_cal_component_has_recurrences (comp))
num_icons++;
if (event->different_timezone)
num_icons++;
- if (cal_component_has_organizer (comp))
+ if (e_cal_component_has_organizer (comp))
num_icons++;
- cal_component_get_categories_list (comp, &categories_list);
+ e_cal_component_get_categories_list (comp, &categories_list);
for (elem = categories_list; elem; elem = elem->next) {
char *category;
GdkPixmap *pixmap = NULL;
@@ -4198,7 +4198,7 @@ e_day_view_reshape_long_event (EDayView *day_view,
if (e_categories_config_get_icon_for (category, &pixmap, &mask))
num_icons++;
}
- cal_component_free_categories_list (categories_list);
+ e_cal_component_free_categories_list (categories_list);
}
if (!event->canvas_item) {
@@ -4330,25 +4330,25 @@ e_day_view_reshape_day_event (EDayView *day_view,
/* We don't show the icons while resizing, since we'd have to
draw them on top of the resize rect. */
num_icons = 0;
- if (day_view->resize_drag_pos == E_CAL_VIEW_POS_NONE
+ if (day_view->resize_drag_pos == E_CALENDAR_VIEW_POS_NONE
|| day_view->resize_event_day != day
|| day_view->resize_event_num != event_num) {
GSList *categories_list, *elem;
- CalComponent *comp;
+ ECalComponent *comp;
- comp = cal_component_new ();
- cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
- if (cal_component_has_alarms (comp))
+ if (e_cal_component_has_alarms (comp))
num_icons++;
- if (cal_component_has_recurrences (comp))
+ if (e_cal_component_has_recurrences (comp))
num_icons++;
if (event->different_timezone)
num_icons++;
- if (cal_component_has_organizer (comp))
+ if (e_cal_component_has_organizer (comp))
num_icons++;
- cal_component_get_categories_list (comp, &categories_list);
+ e_cal_component_get_categories_list (comp, &categories_list);
for (elem = categories_list; elem; elem = elem->next) {
char *category;
GdkPixmap *pixmap = NULL;
@@ -4358,7 +4358,7 @@ e_day_view_reshape_day_event (EDayView *day_view,
if (e_categories_config_get_icon_for (category, &pixmap, &mask))
num_icons++;
}
- cal_component_free_categories_list (categories_list);
+ e_cal_component_free_categories_list (categories_list);
}
if (num_icons > 0) {
@@ -4513,13 +4513,13 @@ e_day_view_do_key_press (GtkWidget *widget, GdkEventKey *event)
{
EDayView *day_view;
icalcomponent *icalcomp;
- CalComponent *comp;
+ ECalComponent *comp;
gint day, event_num;
gchar *initial_text;
guint keyval;
gboolean stop_emission;
time_t dtstart, dtend;
- CalComponentDateTime start_dt, end_dt;
+ ECalComponentDateTime start_dt, end_dt;
struct icaltimetype start_tt, end_tt;
const char *uid;
AddEventData add_event_data;
@@ -4532,7 +4532,7 @@ e_day_view_do_key_press (GtkWidget *widget, GdkEventKey *event)
keyval = event->keyval;
/* The Escape key aborts a resize operation. */
- if (day_view->resize_drag_pos != E_CAL_VIEW_POS_NONE) {
+ if (day_view->resize_drag_pos != E_CALENDAR_VIEW_POS_NONE) {
if (keyval == GDK_Escape) {
e_day_view_abort_resize (day_view, event->time);
}
@@ -4646,38 +4646,38 @@ e_day_view_do_key_press (GtkWidget *widget, GdkEventKey *event)
/* Add a new event covering the selected range */
- icalcomp = e_cal_model_create_component_with_defaults (e_cal_view_get_model (E_CAL_VIEW (day_view)));
+ icalcomp = e_cal_model_create_component_with_defaults (e_calendar_view_get_model (E_CALENDAR_VIEW (day_view)));
if (!icalcomp)
return FALSE;
uid = icalcomponent_get_uid (icalcomp);
- comp = cal_component_new ();
- cal_component_set_icalcomponent (comp, icalcomp);
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (comp, icalcomp);
- e_day_view_get_selected_time_range ((ECalView *) day_view, &dtstart, &dtend);
+ e_day_view_get_selected_time_range ((ECalendarView *) day_view, &dtstart, &dtend);
start_tt = icaltime_from_timet_with_zone (dtstart, FALSE,
- e_cal_view_get_timezone (E_CAL_VIEW (day_view)));
+ e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
end_tt = icaltime_from_timet_with_zone (dtend, FALSE,
- e_cal_view_get_timezone (E_CAL_VIEW (day_view)));
+ e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
if (day_view->selection_in_top_canvas) {
start_dt.tzid = NULL;
start_tt.is_date = 1;
end_tt.is_date = 1;
} else {
- start_dt.tzid = icaltimezone_get_tzid (e_cal_view_get_timezone (E_CAL_VIEW (day_view)));
+ start_dt.tzid = icaltimezone_get_tzid (e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
}
start_dt.value = &start_tt;
end_dt.value = &end_tt;
end_dt.tzid = start_dt.tzid;
- cal_component_set_dtstart (comp, &start_dt);
- cal_component_set_dtend (comp, &end_dt);
+ e_cal_component_set_dtstart (comp, &start_dt);
+ e_cal_component_set_dtend (comp, &end_dt);
- cal_component_set_categories (
- comp, e_cal_view_get_default_category (E_CAL_VIEW (day_view)));
+ e_cal_component_set_categories (
+ comp, e_calendar_view_get_default_category (E_CALENDAR_VIEW (day_view)));
/* We add the event locally and start editing it. We don't send it
to the server until the user finishes editing it. */
@@ -5270,7 +5270,7 @@ static void
e_day_view_cursor_key_left (EDayView *day_view, GdkEventKey *event)
{
if (day_view->selection_start_day == 0) {
- gnome_calendar_previous (e_cal_view_get_calendar (E_CAL_VIEW (day_view)));
+ gnome_calendar_previous (e_calendar_view_get_calendar (E_CALENDAR_VIEW (day_view)));
} else {
day_view->selection_start_day--;
day_view->selection_end_day--;
@@ -5289,7 +5289,7 @@ static void
e_day_view_cursor_key_right (EDayView *day_view, GdkEventKey *event)
{
if (day_view->selection_end_day == day_view->days_shown - 1) {
- gnome_calendar_next (e_cal_view_get_calendar (E_CAL_VIEW (day_view)));
+ gnome_calendar_next (e_calendar_view_get_calendar (E_CALENDAR_VIEW (day_view)));
} else {
day_view->selection_start_day++;
day_view->selection_end_day++;
@@ -5567,7 +5567,7 @@ e_day_view_change_event_end_time_up (EDayView *day_view)
resize_end_row = resize_start_row;
if (resize_end_row == resize_start_row)
return;
- day_view->resize_drag_pos = E_CAL_VIEW_POS_BOTTOM_EDGE;
+ day_view->resize_drag_pos = E_CALENDAR_VIEW_POS_BOTTOM_EDGE;
resize_end_row--;
day_view->resize_start_row = resize_start_row;
day_view->resize_end_row = resize_end_row;
@@ -5598,7 +5598,7 @@ e_day_view_change_event_end_time_down (EDayView *day_view)
resize_end_row = resize_start_row;
if (resize_end_row == day_view->rows -1)
return;
- day_view->resize_drag_pos = E_CAL_VIEW_POS_BOTTOM_EDGE;
+ day_view->resize_drag_pos = E_CALENDAR_VIEW_POS_BOTTOM_EDGE;
resize_end_row++;
day_view->resize_start_row = resize_start_row;
day_view->resize_end_row = resize_end_row;
@@ -5655,9 +5655,9 @@ e_day_view_on_editing_stopped (EDayView *day_view,
gboolean editing_long_event = FALSE;
EDayViewEvent *event;
gchar *text = NULL;
- CalComponentText summary;
- CalComponent *comp;
- CalClient *client;
+ ECalComponentText summary;
+ ECalComponent *comp;
+ ECal *client;
gboolean on_server;
/* Note: the item we are passed here isn't reliable, so we just stop
@@ -5701,8 +5701,8 @@ e_day_view_on_editing_stopped (EDayView *day_view,
NULL);
g_assert (text != NULL);
- comp = cal_component_new ();
- cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
client = event->comp_data->client;
on_server = cal_comp_is_on_server (comp, client);
@@ -5710,7 +5710,7 @@ e_day_view_on_editing_stopped (EDayView *day_view,
if (string_is_empty (text) && !on_server) {
const char *uid;
- cal_component_get_uid (comp, &uid);
+ e_cal_component_get_uid (comp, &uid);
e_day_view_foreach_event_with_uid (day_view, uid,
e_day_view_remove_event_cb, NULL);
@@ -5721,7 +5721,7 @@ e_day_view_on_editing_stopped (EDayView *day_view,
}
/* Only update the summary if necessary. */
- cal_component_get_summary (comp, &summary);
+ e_cal_component_get_summary (comp, &summary);
if (summary.value && !strcmp (text, summary.value)) {
if (day == E_DAY_VIEW_LONG_EVENT)
e_day_view_reshape_long_event (day_view, event_num);
@@ -5729,19 +5729,19 @@ e_day_view_on_editing_stopped (EDayView *day_view,
e_day_view_update_event_label (day_view, day,
event_num);
} else if (summary.value || !string_is_empty (text)) {
- icalcomponent *icalcomp = cal_component_get_icalcomponent (comp);
+ icalcomponent *icalcomp = e_cal_component_get_icalcomponent (comp);
summary.value = text;
summary.altrep = NULL;
- cal_component_set_summary (comp, &summary);
+ e_cal_component_set_summary (comp, &summary);
if (!on_server) {
- if (!cal_client_create_object (client, icalcomp, NULL, NULL))
+ if (!e_cal_create_object (client, icalcomp, NULL, NULL))
g_message (G_STRLOC ": Could not create the object!");
} else {
CalObjModType mod = CALOBJ_MOD_ALL;
GtkWindow *toplevel;
- if (cal_component_has_recurrences (comp)) {
+ if (e_cal_component_has_recurrences (comp)) {
if (!recur_component_dialog (client, comp, &mod, NULL)) {
goto out;
}
@@ -5749,10 +5749,10 @@ e_day_view_on_editing_stopped (EDayView *day_view,
/* FIXME When sending here, what exactly should we send? */
toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (day_view)));
- if (cal_client_modify_object (client, icalcomp, mod, NULL)) {
+ if (e_cal_modify_object (client, icalcomp, mod, NULL)) {
if (itip_organizer_is_user (comp, client)
&& send_component_dialog (toplevel, client, comp, FALSE))
- itip_send_comp (CAL_COMPONENT_METHOD_REQUEST, comp,
+ itip_send_comp (E_CAL_COMPONENT_METHOD_REQUEST, comp,
client, NULL);
}
}
@@ -5792,12 +5792,12 @@ e_day_view_convert_grid_position_to_time (EDayView *day_view,
/* Create an icaltimetype and convert to a time_t. */
tt = icaltime_from_timet_with_zone (day_view->day_starts[col],
- FALSE, e_cal_view_get_timezone (E_CAL_VIEW (day_view)));
+ FALSE, e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
tt.hour = minutes / 60;
tt.minute = minutes % 60;
tt.second = 0;
- val = icaltime_as_timet_with_zone (tt, e_cal_view_get_timezone (E_CAL_VIEW (day_view)));
+ val = icaltime_as_timet_with_zone (tt, e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
return val;
}
@@ -5827,7 +5827,7 @@ e_day_view_convert_time_to_grid_position (EDayView *day_view,
/* To find the row we need to convert the time to an icaltimetype,
calculate the offset in minutes from the top of the display and
divide it by the mins per row setting. */
- tt = icaltime_from_timet_with_zone (time, FALSE, e_cal_view_get_timezone (E_CAL_VIEW (day_view)));
+ tt = icaltime_from_timet_with_zone (time, FALSE, e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
minutes = tt.hour * 60 + tt.minute;
minutes -= day_view->first_hour_shown * 60 + day_view->first_minute_shown;
@@ -5895,7 +5895,7 @@ static gboolean
e_day_view_auto_scroll_handler (gpointer data)
{
EDayView *day_view;
- ECalViewPosition pos;
+ ECalendarViewPosition pos;
gint scroll_x, scroll_y, new_scroll_y, canvas_x, canvas_y, row, day;
GtkAdjustment *adj;
@@ -5957,10 +5957,10 @@ e_day_view_auto_scroll_handler (gpointer data)
if (day_view->last_mouse_x == -1)
day = -1;
- if (pos != E_CAL_VIEW_POS_OUTSIDE) {
+ if (pos != E_CALENDAR_VIEW_POS_OUTSIDE) {
if (day_view->selection_is_being_dragged) {
e_day_view_update_selection (day_view, day, row);
- } else if (day_view->resize_drag_pos != E_CAL_VIEW_POS_NONE) {
+ } else if (day_view->resize_drag_pos != E_CALENDAR_VIEW_POS_NONE) {
e_day_view_update_resize (day_view, row);
} else if (day_view->drag_item->object.flags
& GNOME_CANVAS_ITEM_VISIBLE) {
@@ -6028,12 +6028,12 @@ e_day_view_get_event_position (EDayView *day_view,
return FALSE;
/* If the event is being resize, use the resize position. */
- if (day_view->resize_drag_pos != E_CAL_VIEW_POS_NONE
+ if (day_view->resize_drag_pos != E_CALENDAR_VIEW_POS_NONE
&& day_view->resize_event_day == day
&& day_view->resize_event_num == event_num) {
- if (day_view->resize_drag_pos == E_CAL_VIEW_POS_TOP_EDGE)
+ if (day_view->resize_drag_pos == E_CALENDAR_VIEW_POS_TOP_EDGE)
start_row = day_view->resize_start_row;
- else if (day_view->resize_drag_pos == E_CAL_VIEW_POS_BOTTOM_EDGE)
+ else if (day_view->resize_drag_pos == E_CALENDAR_VIEW_POS_BOTTOM_EDGE)
end_row = day_view->resize_end_row;
}
@@ -6081,12 +6081,12 @@ e_day_view_get_long_event_position (EDayView *day_view,
return FALSE;
/* If the event is being resize, use the resize position. */
- if (day_view->resize_drag_pos != E_CAL_VIEW_POS_NONE
+ if (day_view->resize_drag_pos != E_CALENDAR_VIEW_POS_NONE
&& day_view->resize_event_day == E_DAY_VIEW_LONG_EVENT
&& day_view->resize_event_num == event_num) {
- if (day_view->resize_drag_pos == E_CAL_VIEW_POS_LEFT_EDGE)
+ if (day_view->resize_drag_pos == E_CALENDAR_VIEW_POS_LEFT_EDGE)
*start_day = day_view->resize_start_row;
- else if (day_view->resize_drag_pos == E_CAL_VIEW_POS_RIGHT_EDGE)
+ else if (day_view->resize_drag_pos == E_CALENDAR_VIEW_POS_RIGHT_EDGE)
*end_day = day_view->resize_end_row;
}
@@ -6103,7 +6103,7 @@ e_day_view_get_long_event_position (EDayView *day_view,
/* Converts a position within the entire top canvas to a day & event and
a place within the event if appropriate. If event_num_return is NULL, it
simply returns the grid position without trying to find the event. */
-static ECalViewPosition
+static ECalendarViewPosition
e_day_view_convert_position_in_top_canvas (EDayView *day_view,
gint x,
gint y,
@@ -6119,7 +6119,7 @@ e_day_view_convert_position_in_top_canvas (EDayView *day_view,
*event_num_return = -1;
if (x < 0 || y < 0)
- return E_CAL_VIEW_POS_OUTSIDE;
+ return E_CALENDAR_VIEW_POS_OUTSIDE;
row = y / day_view->top_row_height - 1;
@@ -6131,13 +6131,13 @@ e_day_view_convert_position_in_top_canvas (EDayView *day_view,
}
}
if (day == -1)
- return E_CAL_VIEW_POS_OUTSIDE;
+ return E_CALENDAR_VIEW_POS_OUTSIDE;
*day_return = day;
/* If only the grid position is wanted, return. */
if (event_num_return == NULL)
- return E_CAL_VIEW_POS_NONE;
+ return E_CALENDAR_VIEW_POS_NONE;
for (event_num = 0; event_num < day_view->long_events->len;
event_num++) {
@@ -6163,23 +6163,23 @@ e_day_view_convert_position_in_top_canvas (EDayView *day_view,
if (x < item_x + E_DAY_VIEW_LONG_EVENT_BORDER_WIDTH
+ E_DAY_VIEW_LONG_EVENT_X_PAD)
- return E_CAL_VIEW_POS_LEFT_EDGE;
+ return E_CALENDAR_VIEW_POS_LEFT_EDGE;
if (x >= item_x + item_w - E_DAY_VIEW_LONG_EVENT_BORDER_WIDTH
- E_DAY_VIEW_LONG_EVENT_X_PAD)
- return E_CAL_VIEW_POS_RIGHT_EDGE;
+ return E_CALENDAR_VIEW_POS_RIGHT_EDGE;
- return E_CAL_VIEW_POS_EVENT;
+ return E_CALENDAR_VIEW_POS_EVENT;
}
- return E_CAL_VIEW_POS_NONE;
+ return E_CALENDAR_VIEW_POS_NONE;
}
/* Converts a position within the entire main canvas to a day, row, event and
a place within the event if appropriate. If event_num_return is NULL, it
simply returns the grid position without trying to find the event. */
-static ECalViewPosition
+static ECalendarViewPosition
e_day_view_convert_position_in_main_canvas (EDayView *day_view,
gint x,
gint y,
@@ -6202,11 +6202,11 @@ e_day_view_convert_position_in_main_canvas (EDayView *day_view,
/* Check the position is inside the canvas, and determine the day
and row. */
if (x < 0 || y < 0)
- return E_CAL_VIEW_POS_OUTSIDE;
+ return E_CALENDAR_VIEW_POS_OUTSIDE;
row = y / day_view->row_height;
if (row >= day_view->rows)
- return E_CAL_VIEW_POS_OUTSIDE;
+ return E_CALENDAR_VIEW_POS_OUTSIDE;
day = -1;
for (col = 1; col <= day_view->days_shown; col++) {
@@ -6216,14 +6216,14 @@ e_day_view_convert_position_in_main_canvas (EDayView *day_view,
}
}
if (day == -1)
- return E_CAL_VIEW_POS_OUTSIDE;
+ return E_CALENDAR_VIEW_POS_OUTSIDE;
*day_return = day;
*row_return = row;
/* If only the grid position is wanted, return. */
if (event_num_return == NULL)
- return E_CAL_VIEW_POS_NONE;
+ return E_CALENDAR_VIEW_POS_NONE;
/* Check the selected item first, since the horizontal resizing bars
may be above other events. */
@@ -6236,10 +6236,10 @@ e_day_view_convert_position_in_main_canvas (EDayView *day_view,
*event_num_return = day_view->resize_bars_event_num;
if (y >= item_y - E_DAY_VIEW_BAR_HEIGHT
&& y < item_y + E_DAY_VIEW_EVENT_BORDER_HEIGHT)
- return E_CAL_VIEW_POS_TOP_EDGE;
+ return E_CALENDAR_VIEW_POS_TOP_EDGE;
if (y >= item_y + item_h - E_DAY_VIEW_EVENT_BORDER_HEIGHT
&& y < item_y + item_h + E_DAY_VIEW_BAR_HEIGHT)
- return E_CAL_VIEW_POS_BOTTOM_EDGE;
+ return E_CALENDAR_VIEW_POS_BOTTOM_EDGE;
}
}
}
@@ -6260,20 +6260,20 @@ e_day_view_convert_position_in_main_canvas (EDayView *day_view,
*event_num_return = event_num;
if (x < item_x + E_DAY_VIEW_BAR_WIDTH)
- return E_CAL_VIEW_POS_LEFT_EDGE;
+ return E_CALENDAR_VIEW_POS_LEFT_EDGE;
if (y < item_y + E_DAY_VIEW_EVENT_BORDER_HEIGHT
+ E_DAY_VIEW_EVENT_Y_PAD)
- return E_CAL_VIEW_POS_TOP_EDGE;
+ return E_CALENDAR_VIEW_POS_TOP_EDGE;
if (y >= item_y + item_h - E_DAY_VIEW_EVENT_BORDER_HEIGHT
- E_DAY_VIEW_EVENT_Y_PAD)
- return E_CAL_VIEW_POS_BOTTOM_EDGE;
+ return E_CALENDAR_VIEW_POS_BOTTOM_EDGE;
- return E_CAL_VIEW_POS_EVENT;
+ return E_CALENDAR_VIEW_POS_EVENT;
}
- return E_CAL_VIEW_POS_NONE;
+ return E_CALENDAR_VIEW_POS_NONE;
}
@@ -6301,7 +6301,7 @@ e_day_view_on_top_canvas_drag_motion (GtkWidget *widget,
static void
e_day_view_reshape_top_canvas_drag_item (EDayView *day_view)
{
- ECalViewPosition pos;
+ ECalendarViewPosition pos;
gint x, y, day;
/* Calculate the day & start row of the event being dragged, using
@@ -6311,7 +6311,7 @@ e_day_view_reshape_top_canvas_drag_item (EDayView *day_view)
pos = e_day_view_convert_position_in_top_canvas (day_view, x, y,
&day, NULL);
/* This shouldn't really happen in a drag. */
- if (pos == E_CAL_VIEW_POS_OUTSIDE)
+ if (pos == E_CALENDAR_VIEW_POS_OUTSIDE)
return;
if (day_view->drag_event_day == E_DAY_VIEW_LONG_EVENT)
@@ -6448,7 +6448,7 @@ e_day_view_on_main_canvas_drag_motion (GtkWidget *widget,
static void
e_day_view_reshape_main_canvas_drag_item (EDayView *day_view)
{
- ECalViewPosition pos;
+ ECalendarViewPosition pos;
gint x, y, day, row;
/* Calculate the day & start row of the event being dragged, using
@@ -6458,7 +6458,7 @@ e_day_view_reshape_main_canvas_drag_item (EDayView *day_view)
pos = e_day_view_convert_position_in_main_canvas (day_view, x, y,
&day, &row, NULL);
/* This shouldn't really happen in a drag. */
- if (pos == E_CAL_VIEW_POS_OUTSIDE)
+ if (pos == E_CALENDAR_VIEW_POS_OUTSIDE)
return;
if (day_view->drag_event_day != -1
@@ -6710,8 +6710,8 @@ e_day_view_on_drag_data_get (GtkWidget *widget,
char *comp_str;
icalcomponent *vcal;
- vcal = cal_util_new_top_level ();
- cal_util_add_timezones_from_component (vcal, event->comp_data->icalcomp);
+ vcal = e_cal_util_new_top_level ();
+ e_cal_util_add_timezones_from_component (vcal, event->comp_data->icalcomp);
icalcomponent_add_component (
vcal,
icalcomponent_new_clone (event->comp_data->icalcomp));
@@ -6738,15 +6738,15 @@ e_day_view_on_top_canvas_drag_data_received (GtkWidget *widget,
EDayView *day_view)
{
EDayViewEvent *event=NULL;
- ECalViewPosition pos;
+ ECalendarViewPosition pos;
gint day, start_day, end_day, num_days;
gint start_offset, end_offset;
- CalComponent *comp;
- CalComponentDateTime date;
+ ECalComponent *comp;
+ ECalComponentDateTime date;
struct icaltimetype itt;
time_t dt;
gboolean all_day_event;
- CalClient *client;
+ ECal *client;
gboolean drag_from_same_window;
if (day_view->drag_event_day != -1)
@@ -6754,7 +6754,7 @@ e_day_view_on_top_canvas_drag_data_received (GtkWidget *widget,
else
drag_from_same_window = FALSE;
- client = e_cal_model_get_default_client (e_cal_view_get_model (E_CAL_VIEW (day_view)));
+ client = e_cal_model_get_default_client (e_calendar_view_get_model (E_CALENDAR_VIEW (day_view)));
/* Note that we only support DnD within the EDayView at present. */
if ((data->length >= 0) && (data->format == 8)
@@ -6764,7 +6764,7 @@ e_day_view_on_top_canvas_drag_data_received (GtkWidget *widget,
pos = e_day_view_convert_position_in_top_canvas (day_view,
x, y, &day,
NULL);
- if (pos != E_CAL_VIEW_POS_OUTSIDE) {
+ if (pos != E_CALENDAR_VIEW_POS_OUTSIDE) {
CalObjModType mod = CALOBJ_MOD_ALL;
GtkWindow *toplevel;
@@ -6802,8 +6802,8 @@ e_day_view_on_top_canvas_drag_data_received (GtkWidget *widget,
Otherwise we would not detect that the event's time
had changed in the "update_event" callback. */
- comp = cal_component_new ();
- cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
if (start_offset == 0 && end_offset == 0)
all_day_event = TRUE;
@@ -6814,32 +6814,32 @@ e_day_view_on_top_canvas_drag_data_received (GtkWidget *widget,
dt = day_view->day_starts[day] + start_offset * 60;
itt = icaltime_from_timet_with_zone (dt, FALSE,
- e_cal_view_get_timezone (E_CAL_VIEW (day_view)));
+ e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
if (all_day_event) {
itt.is_date = TRUE;
date.tzid = NULL;
} else {
/* FIXME: Should probably keep the timezone of
the original start and end times. */
- date.tzid = icaltimezone_get_tzid (e_cal_view_get_timezone (E_CAL_VIEW (day_view)));
+ date.tzid = icaltimezone_get_tzid (e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
}
- cal_component_set_dtstart (comp, &date);
+ e_cal_component_set_dtstart (comp, &date);
if (end_offset == 0)
dt = day_view->day_starts[day + num_days];
else
dt = day_view->day_starts[day + num_days - 1] + end_offset * 60;
itt = icaltime_from_timet_with_zone (dt, FALSE,
- e_cal_view_get_timezone (E_CAL_VIEW (day_view)));
+ e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
if (all_day_event) {
itt.is_date = TRUE;
date.tzid = NULL;
} else {
/* FIXME: Should probably keep the timezone of
the original start and end times. */
- date.tzid = icaltimezone_get_tzid (e_cal_view_get_timezone (E_CAL_VIEW (day_view)));
+ date.tzid = icaltimezone_get_tzid (e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
}
- cal_component_set_dtend (comp, &date);
+ e_cal_component_set_dtend (comp, &date);
gtk_drag_finish (context, TRUE, TRUE, time);
@@ -6851,18 +6851,18 @@ e_day_view_on_top_canvas_drag_data_received (GtkWidget *widget,
if (event->canvas_item)
gnome_canvas_item_show (event->canvas_item);
- if (cal_component_has_recurrences (comp)) {
+ if (e_cal_component_has_recurrences (comp)) {
if (!recur_component_dialog (client, comp, &mod, NULL))
return;
}
toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (day_view)));
- cal_component_commit_sequence (comp);
+ e_cal_component_commit_sequence (comp);
- if (cal_client_modify_object (client, cal_component_get_icalcomponent (comp), mod, NULL)) {
+ if (e_cal_modify_object (client, e_cal_component_get_icalcomponent (comp), mod, NULL)) {
if (itip_organizer_is_user (comp, client)
&& send_component_dialog (toplevel, client, comp, FALSE))
- itip_send_comp (CAL_COMPONENT_METHOD_REQUEST, comp,
+ itip_send_comp (E_CAL_COMPONENT_METHOD_REQUEST, comp,
client, NULL);
}
@@ -6885,7 +6885,7 @@ e_day_view_on_top_canvas_drag_data_received (GtkWidget *widget,
pos = e_day_view_convert_position_in_top_canvas (day_view,
x, y, &day,
NULL);
- if (pos == E_CAL_VIEW_POS_OUTSIDE)
+ if (pos == E_CALENDAR_VIEW_POS_OUTSIDE)
goto error;
comp_str = (char *) data->data;
@@ -6894,7 +6894,7 @@ e_day_view_on_top_canvas_drag_data_received (GtkWidget *widget,
goto error;
default_tzid = calendar_config_get_timezone ();
- cal_client_get_timezone (client, default_tzid, &default_zone, NULL);
+ e_cal_get_timezone (client, default_tzid, &default_zone, NULL);
/* check the type of the component */
kind = icalcomponent_isa (icalcomp);
@@ -6911,14 +6911,14 @@ e_day_view_on_top_canvas_drag_data_received (GtkWidget *widget,
while (subcomp) {
child_kind = icalcomponent_isa (subcomp);
if (child_kind == ICAL_VEVENT_COMPONENT)
- e_cal_view_add_event (E_CAL_VIEW (day_view), client, dtstart,
+ e_calendar_view_add_event (E_CALENDAR_VIEW (day_view), client, dtstart,
default_zone, subcomp, TRUE);
else if (child_kind == ICAL_VTIMEZONE_COMPONENT) {
icaltimezone *zone;
zone = icaltimezone_new ();
icaltimezone_set_component (zone, subcomp);
- cal_client_add_timezone (client, zone, NULL);
+ e_cal_add_timezone (client, zone, NULL);
icaltimezone_free (zone, 1);
}
@@ -6930,7 +6930,7 @@ e_day_view_on_top_canvas_drag_data_received (GtkWidget *widget,
icalcomponent_free (icalcomp);
} else {
- e_cal_view_add_event (E_CAL_VIEW (day_view), client, dtstart, default_zone, icalcomp, TRUE);
+ e_calendar_view_add_event (E_CALENDAR_VIEW (day_view), client, dtstart, default_zone, icalcomp, TRUE);
}
gtk_drag_finish (context, TRUE, TRUE, time);
@@ -6953,14 +6953,14 @@ e_day_view_on_main_canvas_drag_data_received (GtkWidget *widget,
EDayView *day_view)
{
EDayViewEvent *event = NULL;
- ECalViewPosition pos;
+ ECalendarViewPosition pos;
gint day, row, start_row, end_row, num_rows, scroll_x, scroll_y;
gint start_offset, end_offset;
- CalComponent *comp;
- CalComponentDateTime date;
+ ECalComponent *comp;
+ ECalComponentDateTime date;
struct icaltimetype itt;
time_t dt;
- CalClient *client;
+ ECal *client;
gboolean drag_from_same_window;
if (day_view->drag_event_day != -1)
@@ -6968,7 +6968,7 @@ e_day_view_on_main_canvas_drag_data_received (GtkWidget *widget,
else
drag_from_same_window = FALSE;
- client = e_cal_model_get_default_client (e_cal_view_get_model (E_CAL_VIEW (day_view)));
+ client = e_cal_model_get_default_client (e_calendar_view_get_model (E_CALENDAR_VIEW (day_view)));
gnome_canvas_get_scroll_offsets (GNOME_CANVAS (widget),
&scroll_x, &scroll_y);
@@ -6983,7 +6983,7 @@ e_day_view_on_main_canvas_drag_data_received (GtkWidget *widget,
pos = e_day_view_convert_position_in_main_canvas (day_view,
x, y, &day,
&row, NULL);
- if (pos != E_CAL_VIEW_POS_OUTSIDE) {
+ if (pos != E_CALENDAR_VIEW_POS_OUTSIDE) {
CalObjModType mod = CALOBJ_MOD_ALL;
GtkWindow *toplevel;
@@ -7020,20 +7020,20 @@ e_day_view_on_main_canvas_drag_data_received (GtkWidget *widget,
don't want to change the original comp here.
Otherwise we would not detect that the event's time
had changed in the "update_event" callback. */
- comp = cal_component_new ();
- cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
date.value = &itt;
- date.tzid = icaltimezone_get_tzid (e_cal_view_get_timezone (E_CAL_VIEW (day_view)));
+ date.tzid = icaltimezone_get_tzid (e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
dt = e_day_view_convert_grid_position_to_time (day_view, day, row) + start_offset * 60;
*date.value = icaltime_from_timet_with_zone (dt, FALSE,
- e_cal_view_get_timezone (E_CAL_VIEW (day_view)));
- cal_component_set_dtstart (comp, &date);
+ e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
+ e_cal_component_set_dtstart (comp, &date);
dt = e_day_view_convert_grid_position_to_time (day_view, day, row + num_rows) - end_offset * 60;
*date.value = icaltime_from_timet_with_zone (dt, FALSE,
- e_cal_view_get_timezone (E_CAL_VIEW (day_view)));
- cal_component_set_dtend (comp, &date);
+ e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
+ e_cal_component_set_dtend (comp, &date);
gtk_drag_finish (context, TRUE, TRUE, time);
@@ -7045,7 +7045,7 @@ e_day_view_on_main_canvas_drag_data_received (GtkWidget *widget,
if (event->canvas_item)
gnome_canvas_item_show (event->canvas_item);
- if (cal_component_has_recurrences (comp)) {
+ if (e_cal_component_has_recurrences (comp)) {
if (!recur_component_dialog (client, comp, &mod, NULL)) {
g_object_unref (comp);
return;
@@ -7053,12 +7053,12 @@ e_day_view_on_main_canvas_drag_data_received (GtkWidget *widget,
}
toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (day_view)));
- cal_component_commit_sequence (comp);
+ e_cal_component_commit_sequence (comp);
- if (cal_client_modify_object (client, cal_component_get_icalcomponent (comp), mod, NULL)) {
+ if (e_cal_modify_object (client, e_cal_component_get_icalcomponent (comp), mod, NULL)) {
if (itip_organizer_is_user (comp, client)
&& send_component_dialog (toplevel, client, comp, FALSE))
- itip_send_comp (CAL_COMPONENT_METHOD_REQUEST, comp,
+ itip_send_comp (E_CAL_COMPONENT_METHOD_REQUEST, comp,
client, NULL);
}
@@ -7081,7 +7081,7 @@ e_day_view_on_main_canvas_drag_data_received (GtkWidget *widget,
pos = e_day_view_convert_position_in_main_canvas (day_view,
x, y, &day,
&row, NULL);
- if (pos == E_CAL_VIEW_POS_OUTSIDE)
+ if (pos == E_CALENDAR_VIEW_POS_OUTSIDE)
goto error;
comp_str = (char *) data->data;
@@ -7090,7 +7090,7 @@ e_day_view_on_main_canvas_drag_data_received (GtkWidget *widget,
goto error;
default_tzid = calendar_config_get_timezone ();
- cal_client_get_timezone (client, default_tzid, &default_zone, NULL);
+ e_cal_get_timezone (client, default_tzid, &default_zone, NULL);
/* check the type of the component */
kind = icalcomponent_isa (icalcomp);
@@ -7107,14 +7107,14 @@ e_day_view_on_main_canvas_drag_data_received (GtkWidget *widget,
while (subcomp) {
child_kind = icalcomponent_isa (subcomp);
if (child_kind == ICAL_VEVENT_COMPONENT)
- e_cal_view_add_event (E_CAL_VIEW (day_view), client, dtstart,
+ e_calendar_view_add_event (E_CALENDAR_VIEW (day_view), client, dtstart,
default_zone, subcomp, FALSE);
else if (child_kind == ICAL_VTIMEZONE_COMPONENT) {
icaltimezone *zone;
zone = icaltimezone_new ();
icaltimezone_set_component (zone, subcomp);
- cal_client_add_timezone (client, zone, NULL);
+ e_cal_add_timezone (client, zone, NULL);
icaltimezone_free (zone, 1);
}
@@ -7126,7 +7126,7 @@ e_day_view_on_main_canvas_drag_data_received (GtkWidget *widget,
icalcomponent_free (icalcomp);
} else {
- e_cal_view_add_event (E_CAL_VIEW (day_view), client, dtstart, default_zone, icalcomp, FALSE);
+ e_calendar_view_add_event (E_CALENDAR_VIEW (day_view), client, dtstart, default_zone, icalcomp, FALSE);
}
gtk_drag_finish (context, TRUE, TRUE, time);
@@ -7150,7 +7150,7 @@ e_day_view_convert_time_to_display (EDayView *day_view,
/* Calculate the actual hour number to display. For 12-hour
format we convert 0-23 to 12-11am/12-11pm. */
*display_hour = hour;
- if (e_cal_view_get_use_24_hour_format (E_CAL_VIEW (day_view))) {
+ if (e_calendar_view_get_use_24_hour_format (E_CALENDAR_VIEW (day_view))) {
*suffix = "";
*suffix_width = 0;
} else {
@@ -7177,7 +7177,7 @@ e_day_view_get_time_string_width (EDayView *day_view)
time_width = day_view->digit_width * 4 + day_view->colon_width;
- if (!e_cal_view_get_use_24_hour_format (E_CAL_VIEW (day_view)))
+ if (!e_calendar_view_get_use_24_hour_format (E_CALENDAR_VIEW (day_view)))
time_width += MAX (day_view->am_string_width,
day_view->pm_string_width);
diff --git a/calendar/gui/e-day-view.h b/calendar/gui/e-day-view.h
index cb691f5762..e31f0946dd 100644
--- a/calendar/gui/e-day-view.h
+++ b/calendar/gui/e-day-view.h
@@ -169,7 +169,7 @@ typedef enum
typedef struct _EDayViewEvent EDayViewEvent;
struct _EDayViewEvent {
- E_CAL_VIEW_EVENT_FIELDS
+ E_CALENDAR_VIEW_EVENT_FIELDS
/* For events in the main canvas, this contains the start column.
For long events in the top canvas, this is its row. */
@@ -194,7 +194,7 @@ typedef struct _EDayViewClass EDayViewClass;
struct _EDayView
{
- ECalView cal_view;
+ ECalendarView cal_view;
/* The top canvas where the dates and long appointments are shown. */
GtkWidget *top_canvas;
@@ -211,7 +211,7 @@ struct _EDayView
GtkWidget *vscrollbar;
/* S-expression for query and the query object */
- CalQuery *query;
+ ECalView *query;
/* The start and end of the days shown. */
time_t lower;
@@ -408,7 +408,7 @@ struct _EDayView
/* These are used when resizing events. */
gint resize_event_day;
gint resize_event_num;
- ECalViewPosition resize_drag_pos;
+ ECalendarViewPosition resize_drag_pos;
gint resize_start_row;
gint resize_end_row;
@@ -456,7 +456,7 @@ struct _EDayView
struct _EDayViewClass
{
- ECalViewClass parent_class;
+ ECalendarViewClass parent_class;
};
diff --git a/calendar/gui/e-itip-control.c b/calendar/gui/e-itip-control.c
index 257d10fd71..e05079dd88 100644
--- a/calendar/gui/e-itip-control.c
+++ b/calendar/gui/e-itip-control.c
@@ -43,9 +43,9 @@
#include <gtkhtml/gtkhtml.h>
#include <gtkhtml/gtkhtml-stream.h>
#include <libical/ical.h>
-#include <cal-util/cal-component.h>
-#include <cal-util/timeutil.h>
-#include <cal-client/cal-client.h>
+#include <libecal/e-cal-component.h>
+#include <libecal/e-cal-time-util.h>
+#include <libecal/e-cal.h>
#include <e-util/e-time-utils.h>
#include <e-util/e-dialog-widgets.h>
#include <evolution-shell-client.h>
@@ -60,12 +60,12 @@ struct _EItipControlPrivate {
GtkWidget *html;
GPtrArray *event_clients;
- CalClient *event_client;
+ ECal *event_client;
GPtrArray *task_clients;
- CalClient *task_client;
+ ECal *task_client;
char *vcalendar;
- CalComponent *comp;
+ ECalComponent *comp;
icalcomponent *main_comp;
icalcomponent *ical_comp;
icalcomponent *top_level;
@@ -130,15 +130,15 @@ class_init (EItipControlClass *klass)
object_class->finalize = finalize;
}
-static CalClient *
+static ECal *
start_calendar_server (EItipControl *itip, char *uri)
{
- CalClient *client;
+ ECal *client;
GError *error = NULL;
- client = cal_client_new (uri, CALOBJ_TYPE_EVENT);
+ client = e_cal_new (uri, CALOBJ_TYPE_EVENT);
- if (!cal_client_open (client, TRUE, &error)) {
+ if (!e_cal_open (client, TRUE, &error)) {
g_warning (_("start_calendar_server(): %s"), error->message);
g_error_free (error);
g_object_unref (client);
@@ -149,13 +149,13 @@ start_calendar_server (EItipControl *itip, char *uri)
}
static gboolean
-start_default_server (EItipControl *itip, CalClient *client, gboolean tasks)
+start_default_server (EItipControl *itip, ECal *client, gboolean tasks)
{
#if 0
if (tasks)
- return cal_client_open_default_tasks (client, FALSE);
+ return e_cal_open_default_tasks (client, FALSE);
else
- return cal_client_open_default_calendar (client, FALSE);
+ return e_cal_open_default_calendar (client, FALSE);
#endif
}
@@ -201,7 +201,7 @@ get_servers (EItipControl *itip, EvolutionShellClient *shell_client, const char
folder = folder_list->_buffer[j];
for (k = 0; possible_types[k] != NULL; k++) {
- CalClient *client;
+ ECal *client;
char *uri;
if (itip->priv->destroyed)
@@ -210,7 +210,7 @@ get_servers (EItipControl *itip, EvolutionShellClient *shell_client, const char
if (strcmp (possible_types[k], folder.type))
continue;
- uri = cal_util_expand_uri (folder.physicalUri, tasks);
+ uri = e_cal_util_expand_uri (folder.physicalUri, tasks);
client = start_calendar_server (itip, uri);
if (client != NULL)
g_ptr_array_add (servers, client);
@@ -229,19 +229,19 @@ get_servers (EItipControl *itip, EvolutionShellClient *shell_client, const char
}
#endif
-static CalClient *
-find_server (GPtrArray *servers, CalComponent *comp)
+static ECal *
+find_server (GPtrArray *servers, ECalComponent *comp)
{
const char *uid;
int i;
- cal_component_get_uid (comp, &uid);
+ e_cal_component_get_uid (comp, &uid);
for (i = 0; i < servers->len; i++) {
- CalClient *client;
+ ECal *client;
icalcomponent *icalcomp;
client = g_ptr_array_index (servers, i);
- if (cal_client_get_object (client, uid, NULL, &icalcomp, NULL)) {
+ if (e_cal_get_object (client, uid, NULL, &icalcomp, NULL)) {
icalcomponent_free (icalcomp);
g_object_ref (client);
@@ -527,7 +527,7 @@ find_attendee (icalcomponent *ical_comp, const char *address)
}
static void
-write_label_piece (EItipControl *itip, CalComponentDateTime *dt,
+write_label_piece (EItipControl *itip, ECalComponentDateTime *dt,
char *buffer, int size,
const char *stext, const char *etext,
gboolean just_date)
@@ -597,7 +597,7 @@ nth (int n)
else if (n < 1 || n > 31)
return "?";
else
- return cal_recur_nth[n];
+ return e_cal_recur_nth[n];
}
static const char *dayname[] = {
@@ -622,7 +622,7 @@ get_dayname (struct icalrecurrencetype *r, int i)
}
static void
-write_recurrence_piece (EItipControl *itip, CalComponent *comp,
+write_recurrence_piece (EItipControl *itip, ECalComponent *comp,
char *buffer, int size)
{
GSList *rrules;
@@ -634,12 +634,12 @@ write_recurrence_piece (EItipControl *itip, CalComponent *comp,
buffer += len;
size -= len;
- if (!cal_component_has_simple_recurrence (comp)) {
+ if (!e_cal_component_has_simple_recurrence (comp)) {
strcpy (buffer, _("Yes. (Complex Recurrence)"));
return;
}
- cal_component_get_rrule_list (comp, &rrules);
+ e_cal_component_get_rrule_list (comp, &rrules);
g_return_if_fail (rrules && !rrules->next);
r = rrules->data;
@@ -722,7 +722,7 @@ write_recurrence_piece (EItipControl *itip, CalComponent *comp,
if (r->count) {
sprintf (buffer, _(" a total of %d times"), r->count);
} else if (!icaltime_is_null_time (r->until)) {
- CalComponentDateTime dt;
+ ECalComponentDateTime dt;
/* FIXME This should get the tzid id, not the whole zone */
dt.value = &r->until;
@@ -737,20 +737,20 @@ write_recurrence_piece (EItipControl *itip, CalComponent *comp,
static void
set_date_label (EItipControl *itip, GtkHTML *html, GtkHTMLStream *html_stream,
- CalComponent *comp)
+ ECalComponent *comp)
{
EItipControlPrivate *priv;
- CalComponentDateTime datetime;
+ ECalComponentDateTime datetime;
static char buffer[1024];
gboolean wrote = FALSE, task_completed = FALSE;
- CalComponentVType type;
+ ECalComponentVType type;
priv = itip->priv;
- type = cal_component_get_vtype (comp);
+ type = e_cal_component_get_vtype (comp);
buffer[0] = '\0';
- cal_component_get_dtstart (comp, &datetime);
+ e_cal_component_get_dtstart (comp, &datetime);
if (datetime.value) {
write_label_piece (itip, &datetime, buffer, 1024,
_("<b>Starts:</b> "),
@@ -758,19 +758,19 @@ set_date_label (EItipControl *itip, GtkHTML *html, GtkHTMLStream *html_stream,
gtk_html_write (html, html_stream, buffer, strlen(buffer));
wrote = TRUE;
}
- cal_component_free_datetime (&datetime);
+ e_cal_component_free_datetime (&datetime);
buffer[0] = '\0';
- cal_component_get_dtend (comp, &datetime);
+ e_cal_component_get_dtend (comp, &datetime);
if (datetime.value){
write_label_piece (itip, &datetime, buffer, 1024, _("<b>Ends:</b> "), "<br>", FALSE);
gtk_html_write (html, html_stream, buffer, strlen (buffer));
wrote = TRUE;
}
- cal_component_free_datetime (&datetime);
+ e_cal_component_free_datetime (&datetime);
buffer[0] = '\0';
- if (cal_component_has_recurrences (comp)) {
+ if (e_cal_component_has_recurrences (comp)) {
write_recurrence_piece (itip, comp, buffer, 1024);
gtk_html_write (html, html_stream, buffer, strlen (buffer));
wrote = TRUE;
@@ -778,8 +778,8 @@ set_date_label (EItipControl *itip, GtkHTML *html, GtkHTMLStream *html_stream,
buffer[0] = '\0';
datetime.tzid = NULL;
- cal_component_get_completed (comp, &datetime.value);
- if (type == CAL_COMPONENT_TODO && datetime.value) {
+ e_cal_component_get_completed (comp, &datetime.value);
+ if (type == E_CAL_COMPONENT_TODO && datetime.value) {
/* Pass TRUE as is_utc, so it gets converted to the current
timezone. */
datetime.value->is_utc = TRUE;
@@ -788,17 +788,17 @@ set_date_label (EItipControl *itip, GtkHTML *html, GtkHTMLStream *html_stream,
wrote = TRUE;
task_completed = TRUE;
}
- cal_component_free_datetime (&datetime);
+ e_cal_component_free_datetime (&datetime);
buffer[0] = '\0';
- cal_component_get_due (comp, &datetime);
- if (type == CAL_COMPONENT_TODO && !task_completed && datetime.value) {
+ e_cal_component_get_due (comp, &datetime);
+ if (type == E_CAL_COMPONENT_TODO && !task_completed && datetime.value) {
write_label_piece (itip, &datetime, buffer, 1024, _("<b>Due:</b> "), "<br>", FALSE);
gtk_html_write (html, html_stream, buffer, strlen (buffer));
wrote = TRUE;
}
- cal_component_free_datetime (&datetime);
+ e_cal_component_free_datetime (&datetime);
if (wrote)
gtk_html_stream_printf (html_stream, "<br>");
@@ -866,9 +866,9 @@ write_html (EItipControl *itip, const gchar *itip_desc, const gchar *itip_title,
{
EItipControlPrivate *priv;
GtkHTMLStream *html_stream;
- CalComponentText text;
- CalComponentOrganizer organizer;
- CalComponentAttendee *attendee;
+ ECalComponentText text;
+ ECalComponentOrganizer organizer;
+ ECalComponentAttendee *attendee;
GSList *attendees, *l = NULL;
const char *string;
gchar *html;
@@ -906,7 +906,7 @@ write_html (EItipControl *itip, const gchar *itip_desc, const gchar *itip_title,
case ICAL_METHOD_REFRESH:
case ICAL_METHOD_REPLY:
/* An attendee sent this */
- cal_component_get_attendee_list (priv->comp, &attendees);
+ e_cal_component_get_attendee_list (priv->comp, &attendees);
if (attendees != NULL) {
attendee = attendees->data;
html = g_strdup_printf (itip_desc,
@@ -919,7 +919,7 @@ write_html (EItipControl *itip, const gchar *itip_desc, const gchar *itip_title,
break;
case ICAL_METHOD_REQUEST:
/* The organizer sent this */
- cal_component_get_organizer (priv->comp, &organizer);
+ e_cal_component_get_organizer (priv->comp, &organizer);
if (priv->delegator_address != NULL) {
if (organizer.value != NULL)
html = g_strdup_printf (itip_desc,
@@ -951,7 +951,7 @@ write_html (EItipControl *itip, const gchar *itip_desc, const gchar *itip_title,
case ICAL_METHOD_CANCEL:
default:
/* The organizer sent this */
- cal_component_get_organizer (priv->comp, &organizer);
+ e_cal_component_get_organizer (priv->comp, &organizer);
if (organizer.value != NULL)
html = g_strdup_printf (itip_desc,
organizer.cn ?
@@ -979,7 +979,7 @@ write_html (EItipControl *itip, const gchar *itip_desc, const gchar *itip_title,
set_date_label (itip, GTK_HTML (priv->html), html_stream, priv->comp);
/* Summary */
- cal_component_get_summary (priv->comp, &text);
+ e_cal_component_get_summary (priv->comp, &text);
html = text.value ? camel_text_to_html (text.value, CAMEL_MIME_FILTER_TOHTML_CONVERT_NL, 0) : _("<i>None</i>");
gtk_html_stream_printf (html_stream, "<b>%s</b><br>%s<br><br>",
_("Summary:"), html);
@@ -987,7 +987,7 @@ write_html (EItipControl *itip, const gchar *itip_desc, const gchar *itip_title,
g_free (html);
/* Location */
- cal_component_get_location (priv->comp, &string);
+ e_cal_component_get_location (priv->comp, &string);
if (string != NULL) {
html = camel_text_to_html (string, CAMEL_MIME_FILTER_TOHTML_CONVERT_NL, 0);
gtk_html_stream_printf (html_stream, "<b>%s</b><br>%s<br><br>",
@@ -999,10 +999,10 @@ write_html (EItipControl *itip, const gchar *itip_desc, const gchar *itip_title,
if (priv->method == ICAL_METHOD_REPLY) {
GSList *alist;
- cal_component_get_attendee_list (priv->comp, &alist);
+ e_cal_component_get_attendee_list (priv->comp, &alist);
if (alist != NULL) {
- CalComponentAttendee *a = alist->data;
+ ECalComponentAttendee *a = alist->data;
gtk_html_stream_printf (html_stream, "<b>%s</b><br>",
_("Status:"));
@@ -1026,13 +1026,13 @@ write_html (EItipControl *itip, const gchar *itip_desc, const gchar *itip_title,
}
}
- cal_component_free_attendee_list (alist);
+ e_cal_component_free_attendee_list (alist);
}
/* Description */
- cal_component_get_description_list (priv->comp, &l);
+ e_cal_component_get_description_list (priv->comp, &l);
if (l)
- text = *((CalComponentText *)l->data);
+ text = *((ECalComponentText *)l->data);
if (l && text.value) {
html = camel_text_to_html (text.value, CAMEL_MIME_FILTER_TOHTML_CONVERT_NL, 0);
@@ -1040,7 +1040,7 @@ write_html (EItipControl *itip, const gchar *itip_desc, const gchar *itip_title,
_("Description:"), html);
g_free (html);
}
- cal_component_free_text_list (l);
+ e_cal_component_free_text_list (l);
/* Separator */
gtk_html_write (GTK_HTML (priv->html), html_stream, HTML_SEP, strlen (HTML_SEP));
@@ -1176,29 +1176,29 @@ get_cancel_options ()
}
-static CalComponent *
+static ECalComponent *
get_real_item (EItipControl *itip)
{
EItipControlPrivate *priv;
- CalComponent *comp;
+ ECalComponent *comp;
icalcomponent *icalcomp;
- CalComponentVType type;
+ ECalComponentVType type;
gboolean found = FALSE;
const char *uid;
priv = itip->priv;
- type = cal_component_get_vtype (priv->comp);
- cal_component_get_uid (priv->comp, &uid);
+ type = e_cal_component_get_vtype (priv->comp);
+ e_cal_component_get_uid (priv->comp, &uid);
switch (type) {
- case CAL_COMPONENT_EVENT:
+ case E_CAL_COMPONENT_EVENT:
if (priv->event_client != NULL)
- found = cal_client_get_object (priv->event_client, uid, NULL, &icalcomp, NULL);
+ found = e_cal_get_object (priv->event_client, uid, NULL, &icalcomp, NULL);
break;
- case CAL_COMPONENT_TODO:
+ case E_CAL_COMPONENT_TODO:
if (priv->task_client != NULL)
- found = cal_client_get_object (priv->task_client, uid, NULL, &icalcomp, NULL);
+ found = e_cal_get_object (priv->task_client, uid, NULL, &icalcomp, NULL);
break;
default:
found = FALSE;
@@ -1207,8 +1207,8 @@ get_real_item (EItipControl *itip)
if (!found)
return NULL;
- comp = cal_component_new ();
- if (!cal_component_set_icalcomponent (comp, icalcomp)) {
+ comp = e_cal_component_new ();
+ if (!e_cal_component_set_icalcomponent (comp, icalcomp)) {
g_object_unref (comp);
icalcomponent_free (icalcomp);
return NULL;
@@ -1218,29 +1218,29 @@ get_real_item (EItipControl *itip)
}
static void
-adjust_item (EItipControl *itip, CalComponent *comp)
+adjust_item (EItipControl *itip, ECalComponent *comp)
{
- CalComponent *real_comp;
+ ECalComponent *real_comp;
real_comp = get_real_item (itip);
if (real_comp != NULL) {
- CalComponentText text;
+ ECalComponentText text;
const char *string;
GSList *l;
- cal_component_get_summary (real_comp, &text);
- cal_component_set_summary (comp, &text);
- cal_component_get_location (real_comp, &string);
- cal_component_set_location (comp, string);
- cal_component_get_description_list (real_comp, &l);
- cal_component_set_description_list (comp, l);
- cal_component_free_text_list (l);
+ e_cal_component_get_summary (real_comp, &text);
+ e_cal_component_set_summary (comp, &text);
+ e_cal_component_get_location (real_comp, &string);
+ e_cal_component_set_location (comp, string);
+ e_cal_component_get_description_list (real_comp, &l);
+ e_cal_component_set_description_list (comp, l);
+ e_cal_component_free_text_list (l);
g_object_unref (real_comp);
} else {
- CalComponentText text = {_("Unknown"), NULL};
+ ECalComponentText text = {_("Unknown"), NULL};
- cal_component_set_summary (comp, &text);
+ e_cal_component_set_summary (comp, &text);
}
}
@@ -1435,7 +1435,7 @@ static void
show_current (EItipControl *itip)
{
EItipControlPrivate *priv;
- CalComponentVType type;
+ ECalComponentVType type;
icalcomponent *alarm_comp;
icalcompiter alarm_iter;
icalproperty *prop;
@@ -1479,8 +1479,8 @@ show_current (EItipControl *itip)
icalcompiter_next (&alarm_iter);
}
- priv->comp = cal_component_new ();
- if (!cal_component_set_icalcomponent (priv->comp, priv->ical_comp)) {
+ priv->comp = e_cal_component_new ();
+ if (!e_cal_component_set_icalcomponent (priv->comp, priv->ical_comp)) {
write_error_html (itip, _("The message does not appear to be properly formed"));
g_object_unref (priv->comp);
priv->comp = NULL;
@@ -1490,19 +1490,19 @@ show_current (EItipControl *itip)
/* Add default reminder if the config says so */
if (calendar_config_get_use_default_reminder ()) {
- CalComponentAlarm *acomp;
+ ECalComponentAlarm *acomp;
int interval;
CalUnits units;
- CalAlarmTrigger trigger;
+ ECalComponentAlarmTrigger trigger;
interval = calendar_config_get_default_reminder_interval ();
units = calendar_config_get_default_reminder_units ();
- acomp = cal_component_alarm_new ();
+ acomp = e_cal_component_alarm_new ();
- cal_component_alarm_set_action (acomp, CAL_ALARM_DISPLAY);
+ e_cal_component_alarm_set_action (acomp, E_CAL_COMPONENT_ALARM_DISPLAY);
- trigger.type = CAL_ALARM_TRIGGER_RELATIVE_START;
+ trigger.type = E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_START;
memset (&trigger.u.rel_duration, 0, sizeof (trigger.u.rel_duration));
trigger.u.rel_duration.is_neg = TRUE;
@@ -1521,16 +1521,16 @@ show_current (EItipControl *itip)
g_assert_not_reached ();
}
- cal_component_alarm_set_trigger (acomp, trigger);
- cal_component_add_alarm (priv->comp, acomp);
+ e_cal_component_alarm_set_trigger (acomp, trigger);
+ e_cal_component_add_alarm (priv->comp, acomp);
- cal_component_alarm_free (acomp);
+ e_cal_component_alarm_free (acomp);
}
- type = cal_component_get_vtype (priv->comp);
+ type = e_cal_component_get_vtype (priv->comp);
switch (type) {
- case CAL_COMPONENT_EVENT:
+ case E_CAL_COMPONENT_EVENT:
if (!priv->event_clients) {
priv->event_clients = g_ptr_array_new ();
/* EPFIXME */
@@ -1538,14 +1538,14 @@ show_current (EItipControl *itip)
}
show_current_event (itip);
break;
- case CAL_COMPONENT_TODO:
+ case E_CAL_COMPONENT_TODO:
if (!priv->task_clients) {
/* EPFIXME */
/* priv->task_clients = get_servers (itip, global_shell_client, tasks_types, TRUE); */
}
show_current_todo (itip);
break;
- case CAL_COMPONENT_FREEBUSY:
+ case E_CAL_COMPONENT_FREEBUSY:
show_current_freebusy (itip);
break;
default:
@@ -1576,7 +1576,7 @@ e_itip_control_set_data (EItipControl *itip, const gchar *text)
}
priv->vcalendar = g_strdup (text);
- priv->top_level = cal_util_new_top_level ();
+ priv->top_level = e_cal_util_new_top_level ();
priv->main_comp = icalparser_parse_string (priv->vcalendar);
if (priv->main_comp == NULL) {
@@ -1818,8 +1818,8 @@ update_item (EItipControl *itip)
struct icaltimetype stamp;
icalproperty *prop;
icalcomponent *clone;
- CalClient *client;
- CalComponentVType type;
+ ECal *client;
+ ECalComponentVType type;
GtkWidget *dialog;
priv = itip->priv;
@@ -1838,8 +1838,8 @@ update_item (EItipControl *itip)
icalproperty_set_x_name (prop, "X-MICROSOFT-CDO-REPLYTIME");
icalcomponent_add_property (priv->ical_comp, prop);
- type = cal_component_get_vtype (priv->comp);
- if (type == CAL_COMPONENT_TODO)
+ type = e_cal_component_get_vtype (priv->comp);
+ if (type == E_CAL_COMPONENT_TODO)
client = priv->task_client;
else
client = priv->event_client;
@@ -1849,7 +1849,7 @@ update_item (EItipControl *itip)
icalcomponent_set_method (priv->top_level, priv->method);
/* FIXME Better error dialog */
- if (!cal_client_receive_objects (client, priv->top_level, NULL)) {
+ if (!e_cal_receive_objects (client, priv->top_level, NULL)) {
dialog = gnome_warning_dialog (_("Calendar file could not be updated!\n"));
} else {
dialog = gnome_ok_dialog (_("Update complete\n"));
@@ -1864,19 +1864,19 @@ static void
update_attendee_status (EItipControl *itip)
{
EItipControlPrivate *priv;
- CalClient *client;
- CalClientGetStatus status;
- CalComponent *comp = NULL;
+ ECal *client;
+ ECalGetStatus status;
+ ECalComponent *comp = NULL;
icalcomponent *icalcomp = NULL;
- CalComponentVType type;
+ ECalComponentVType type;
const char *uid;
GtkWidget *dialog;
- CalClientResult result;
+ ECalResult result;
priv = itip->priv;
- type = cal_component_get_vtype (priv->comp);
- if (type == CAL_COMPONENT_TODO)
+ type = e_cal_component_get_vtype (priv->comp);
+ if (type == E_CAL_COMPONENT_TODO)
client = priv->task_client;
else
client = priv->event_client;
@@ -1888,21 +1888,21 @@ update_attendee_status (EItipControl *itip)
}
/* Obtain our version */
- cal_component_get_uid (priv->comp, &uid);
- status = cal_client_get_object (client, uid, NULL, &icalcomp);
+ e_cal_component_get_uid (priv->comp, &uid);
+ status = e_cal_get_object (client, uid, NULL, &icalcomp);
- if (status == CAL_CLIENT_GET_SUCCESS) {
+ if (status == E_CAL_GET_SUCCESS) {
GSList *attendees;
- comp = cal_component_new ();
- if (!cal_component_set_icalcomponent (comp, icalcomp)) {
+ comp = e_cal_component_new ();
+ if (!e_cal_component_set_icalcomponent (comp, icalcomp)) {
icalcomponent_free (icalcomp);
dialog = gnome_warning_dialog (_("Object is invalid and cannot be updated\n"));
} else {
- cal_component_get_attendee_list (priv->comp, &attendees);
+ e_cal_component_get_attendee_list (priv->comp, &attendees);
if (attendees != NULL) {
- CalComponentAttendee *a = attendees->data;
+ ECalComponentAttendee *a = attendees->data;
icalproperty *prop;
prop = find_attendee (icalcomp, itip_strip_mailto (a->value));
@@ -1915,7 +1915,7 @@ update_attendee_status (EItipControl *itip)
change_status (icalcomp,
itip_strip_mailto (a->value),
a->status);
- cal_component_rescan (comp);
+ e_cal_component_rescan (comp);
} else {
goto cleanup;
}
@@ -1928,26 +1928,26 @@ update_attendee_status (EItipControl *itip)
change_status (icalcomp,
itip_strip_mailto (a->value),
a->status);
- cal_component_rescan (comp);
+ e_cal_component_rescan (comp);
}
}
}
- result = cal_client_update_object (client, comp);
+ result = e_cal_update_object (client, comp);
switch (result) {
- case CAL_CLIENT_RESULT_INVALID_OBJECT :
+ case E_CAL_RESULT_INVALID_OBJECT :
dialog = gnome_warning_dialog (_("Object is invalid and cannot be updated\n"));
break;
- case CAL_CLIENT_RESULT_CORBA_ERROR :
+ case E_CAL_RESULT_CORBA_ERROR :
dialog = gnome_warning_dialog (_("There was an error on the CORBA system\n"));
break;
- case CAL_CLIENT_RESULT_NOT_FOUND :
+ case E_CAL_RESULT_NOT_FOUND :
dialog = gnome_warning_dialog (_("Object could not be found\n"));
break;
- case CAL_CLIENT_RESULT_PERMISSION_DENIED :
+ case E_CAL_RESULT_PERMISSION_DENIED :
dialog = gnome_warning_dialog (_("You don't have the right permissions to update the calendar\n"));
break;
- case CAL_CLIENT_RESULT_SUCCESS :
+ case E_CAL_RESULT_SUCCESS :
dialog = gnome_ok_dialog (_("Attendee status updated\n"));
break;
default :
@@ -1969,16 +1969,16 @@ static void
remove_item (EItipControl *itip)
{
EItipControlPrivate *priv;
- CalClient *client;
- CalComponentVType type;
+ ECal *client;
+ ECalComponentVType type;
const char *uid;
GtkWidget *dialog;
GError *error = NULL;
priv = itip->priv;
- type = cal_component_get_vtype (priv->comp);
- if (type == CAL_COMPONENT_TODO)
+ type = e_cal_component_get_vtype (priv->comp);
+ if (type == E_CAL_COMPONENT_TODO)
client = priv->task_client;
else
client = priv->event_client;
@@ -1986,8 +1986,8 @@ remove_item (EItipControl *itip)
if (client == NULL)
return;
- cal_component_get_uid (priv->comp, &uid);
- cal_client_remove_object (client, uid, &error);
+ e_cal_component_get_uid (priv->comp, &uid);
+ e_cal_remove_object (client, uid, &error);
if (!error || error->code == E_CALENDAR_STATUS_OBJECT_NOT_FOUND) {
dialog = gnome_ok_dialog (_("Removal Complete"));
gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
@@ -2002,25 +2002,25 @@ static void
send_item (EItipControl *itip)
{
EItipControlPrivate *priv;
- CalComponent *comp;
- CalComponentVType vtype;
+ ECalComponent *comp;
+ ECalComponentVType vtype;
GtkWidget *dialog;
priv = itip->priv;
comp = get_real_item (itip);
- vtype = cal_component_get_vtype (comp);
+ vtype = e_cal_component_get_vtype (comp);
if (comp != NULL) {
switch (vtype) {
- case CAL_COMPONENT_EVENT:
- itip_send_comp (CAL_COMPONENT_METHOD_REQUEST, comp, priv->event_client, NULL);
+ case E_CAL_COMPONENT_EVENT:
+ itip_send_comp (E_CAL_COMPONENT_METHOD_REQUEST, comp, priv->event_client, NULL);
break;
- case CAL_COMPONENT_TODO:
- itip_send_comp (CAL_COMPONENT_METHOD_REQUEST, comp, priv->task_client, NULL);
+ case E_CAL_COMPONENT_TODO:
+ itip_send_comp (E_CAL_COMPONENT_METHOD_REQUEST, comp, priv->task_client, NULL);
break;
default:
- itip_send_comp (CAL_COMPONENT_METHOD_REQUEST, comp, NULL, NULL);
+ itip_send_comp (E_CAL_COMPONENT_METHOD_REQUEST, comp, NULL, NULL);
}
g_object_unref (comp);
dialog = gnome_ok_dialog (_("Item sent!\n"));
@@ -2034,7 +2034,7 @@ static void
send_freebusy (EItipControl *itip)
{
EItipControlPrivate *priv;
- CalComponentDateTime datetime;
+ ECalComponentDateTime datetime;
time_t start, end;
GtkWidget *dialog;
GList *comp_list = NULL;
@@ -2042,7 +2042,7 @@ send_freebusy (EItipControl *itip)
priv = itip->priv;
- cal_component_get_dtstart (priv->comp, &datetime);
+ e_cal_component_get_dtstart (priv->comp, &datetime);
if (datetime.tzid) {
zone = icalcomponent_get_timezone (priv->top_level,
datetime.tzid);
@@ -2050,9 +2050,9 @@ send_freebusy (EItipControl *itip)
zone = NULL;
}
start = icaltime_as_timet_with_zone (*datetime.value, zone);
- cal_component_free_datetime (&datetime);
+ e_cal_component_free_datetime (&datetime);
- cal_component_get_dtend (priv->comp, &datetime);
+ e_cal_component_get_dtend (priv->comp, &datetime);
if (datetime.tzid) {
zone = icalcomponent_get_timezone (priv->top_level,
datetime.tzid);
@@ -2060,14 +2060,14 @@ send_freebusy (EItipControl *itip)
zone = NULL;
}
end = icaltime_as_timet_with_zone (*datetime.value, zone);
- cal_component_free_datetime (&datetime);
+ e_cal_component_free_datetime (&datetime);
- if (cal_client_get_free_busy (priv->event_client, NULL, start, end, &comp_list, NULL)) {
+ if (e_cal_get_free_busy (priv->event_client, NULL, start, end, &comp_list, NULL)) {
GList *l;
for (l = comp_list; l; l = l->next) {
- CalComponent *comp = CAL_COMPONENT (l->data);
- itip_send_comp (CAL_COMPONENT_METHOD_REPLY, comp, priv->event_client, NULL);
+ ECalComponent *comp = E_CAL_COMPONENT (l->data);
+ itip_send_comp (E_CAL_COMPONENT_METHOD_REPLY, comp, priv->event_client, NULL);
g_object_unref (comp);
}
@@ -2085,16 +2085,16 @@ button_selected_cb (EvolutionFolderSelectorButton *button, GNOME_Evolution_Folde
{
EItipControl *itip = E_ITIP_CONTROL (data);
EItipControlPrivate *priv;
- CalComponentVType type;
+ ECalComponentVType type;
char *uri;
priv = itip->priv;
- type = cal_component_get_vtype (priv->comp);
- if (type == CAL_COMPONENT_TODO)
- uri = cal_util_expand_uri (folder->physicalUri, TRUE);
+ type = e_cal_component_get_vtype (priv->comp);
+ if (type == E_CAL_COMPONENT_TODO)
+ uri = e_cal_util_expand_uri (folder->physicalUri, TRUE);
else
- uri = cal_util_expand_uri (folder->physicalUri, FALSE);
+ uri = e_cal_util_expand_uri (folder->physicalUri, FALSE);
g_object_unref (priv->event_client);
priv->event_client = start_calendar_server (itip, uri);
@@ -2137,21 +2137,21 @@ typedef struct
{
EItipControl *itip;
GtkHTMLEmbedded *eb;
- CalClient *client;
+ ECal *client;
}
ObjectRequestContext;
static void
-default_server_started_cb (CalClient *client, CalClientOpenStatus status, gpointer data)
+default_server_started_cb (ECal *client, ECalOpenStatus status, gpointer data)
{
ObjectRequestContext *context = data;
EItipControlPrivate *priv;
GtkWidget *button;
- CalComponentVType vtype;
+ ECalComponentVType vtype;
priv = context->itip->priv;
- if (status != CAL_CLIENT_OPEN_SUCCESS ||
+ if (status != E_CAL_OPEN_SUCCESS ||
context->itip->priv->destroyed ||
context->itip->priv->html == NULL) {
g_object_unref (context->client);
@@ -2161,17 +2161,17 @@ default_server_started_cb (CalClient *client, CalClientOpenStatus status, gpoint
}
priv->event_client = client;
- vtype = cal_component_get_vtype (priv->comp);
+ vtype = e_cal_component_get_vtype (priv->comp);
switch (vtype) {
#if 0 /* EPFIXME */
- case CAL_COMPONENT_EVENT:
+ case E_CAL_COMPONENT_EVENT:
button = evolution_folder_selector_button_new (
global_shell_client, _("Select Calendar Folder"),
calendar_config_default_calendar_folder (),
calendar_types);
break;
- case CAL_COMPONENT_TODO:
+ case E_CAL_COMPONENT_TODO:
button = evolution_folder_selector_button_new (
global_shell_client, _("Select Tasks Folder"),
calendar_config_default_tasks_folder (),
@@ -2198,23 +2198,23 @@ object_requested_cb (GtkHTML *html, GtkHTMLEmbedded *eb, gpointer data)
EItipControl *itip = E_ITIP_CONTROL (data);
ObjectRequestContext *context;
EItipControlPrivate *priv;
- CalComponentVType vtype;
+ ECalComponentVType vtype;
gboolean success;
priv = itip->priv;
- vtype = cal_component_get_vtype (priv->comp);
+ vtype = e_cal_component_get_vtype (priv->comp);
context = g_new0 (ObjectRequestContext, 1);
context->itip = itip;
context->eb = eb;
switch (vtype) {
- case CAL_COMPONENT_EVENT:
- context->client = cal_client_new ("", CALOBJ_TYPE_EVENT);
+ case E_CAL_COMPONENT_EVENT:
+ context->client = e_cal_new ("", CALOBJ_TYPE_EVENT);
success = start_default_server (itip, context->client, FALSE);
break;
- case CAL_COMPONENT_TODO:
- context->client = cal_client_new ("", CALOBJ_TYPE_TODO);
+ case E_CAL_COMPONENT_TODO:
+ context->client = e_cal_new ("", CALOBJ_TYPE_TODO);
success = start_default_server (itip, context->client, TRUE);
break;
default:
@@ -2262,7 +2262,7 @@ ok_clicked_cb (GtkHTML *html, const gchar *method, const gchar *url, const gchar
status = change_status (priv->ical_comp, priv->my_address,
ICAL_PARTSTAT_ACCEPTED);
if (status) {
- cal_component_rescan (priv->comp);
+ e_cal_component_rescan (priv->comp);
update_item (itip);
}
break;
@@ -2270,7 +2270,7 @@ ok_clicked_cb (GtkHTML *html, const gchar *method, const gchar *url, const gchar
status = change_status (priv->ical_comp, priv->my_address,
ICAL_PARTSTAT_TENTATIVE);
if (status) {
- cal_component_rescan (priv->comp);
+ e_cal_component_rescan (priv->comp);
update_item (itip);
}
break;
@@ -2278,7 +2278,7 @@ ok_clicked_cb (GtkHTML *html, const gchar *method, const gchar *url, const gchar
status = change_status (priv->ical_comp, priv->my_address,
ICAL_PARTSTAT_DECLINED);
if (status) {
- cal_component_rescan (priv->comp);
+ e_cal_component_rescan (priv->comp);
remove_item (itip);
}
break;
@@ -2308,24 +2308,24 @@ ok_clicked_cb (GtkHTML *html, const gchar *method, const gchar *url, const gchar
g_strfreev (fields);
if (rsvp && status) {
- CalComponent *comp = NULL;
- CalComponentVType vtype;
+ ECalComponent *comp = NULL;
+ ECalComponentVType vtype;
icalcomponent *ical_comp;
icalproperty *prop;
icalvalue *value;
const char *attendee;
GSList *l, *list = NULL;
- comp = cal_component_clone (priv->comp);
+ comp = e_cal_component_clone (priv->comp);
if (comp == NULL)
return;
- vtype = cal_component_get_vtype (comp);
+ vtype = e_cal_component_get_vtype (comp);
if (priv->my_address == NULL)
find_my_address (itip, priv->ical_comp);
g_assert (priv->my_address != NULL);
- ical_comp = cal_component_get_icalcomponent (comp);
+ ical_comp = e_cal_component_get_icalcomponent (comp);
for (prop = icalcomponent_get_first_property (ical_comp, ICAL_ATTENDEE_PROPERTY);
prop != NULL;
@@ -2353,18 +2353,18 @@ ok_clicked_cb (GtkHTML *html, const gchar *method, const gchar *url, const gchar
}
g_slist_free (list);
- cal_component_rescan (comp);
+ e_cal_component_rescan (comp);
switch (vtype) {
- case CAL_COMPONENT_EVENT:
- itip_send_comp (CAL_COMPONENT_METHOD_REPLY, comp,
+ case E_CAL_COMPONENT_EVENT:
+ itip_send_comp (E_CAL_COMPONENT_METHOD_REPLY, comp,
priv->event_client, priv->top_level);
break;
- case CAL_COMPONENT_TODO:
- itip_send_comp (CAL_COMPONENT_METHOD_REPLY, comp,
+ case E_CAL_COMPONENT_TODO:
+ itip_send_comp (E_CAL_COMPONENT_METHOD_REPLY, comp,
priv->task_client, priv->top_level);
break;
default:
- itip_send_comp (CAL_COMPONENT_METHOD_REPLY, comp, NULL, NULL);
+ itip_send_comp (E_CAL_COMPONENT_METHOD_REPLY, comp, NULL, NULL);
}
g_object_unref (comp);
}
diff --git a/calendar/gui/e-meeting-attendee.c b/calendar/gui/e-meeting-attendee.c
index 8b988f085f..474cf7b1a4 100644
--- a/calendar/gui/e-meeting-attendee.c
+++ b/calendar/gui/e-meeting-attendee.c
@@ -199,7 +199,7 @@ e_meeting_attendee_new (void)
}
GObject *
-e_meeting_attendee_new_from_cal_component_attendee (CalComponentAttendee *ca)
+e_meeting_attendee_new_from_e_cal_component_attendee (ECalComponentAttendee *ca)
{
EMeetingAttendee *ia;
@@ -220,15 +220,15 @@ e_meeting_attendee_new_from_cal_component_attendee (CalComponentAttendee *ca)
return G_OBJECT (ia);
}
-CalComponentAttendee *
-e_meeting_attendee_as_cal_component_attendee (EMeetingAttendee *ia)
+ECalComponentAttendee *
+e_meeting_attendee_as_e_cal_component_attendee (EMeetingAttendee *ia)
{
EMeetingAttendeePrivate *priv;
- CalComponentAttendee *ca;
+ ECalComponentAttendee *ca;
priv = ia->priv;
- ca = g_new0 (CalComponentAttendee, 1);
+ ca = g_new0 (ECalComponentAttendee, 1);
ca->value = priv->address;
ca->member = string_is_set (priv->member) ? priv->member : NULL;
diff --git a/calendar/gui/e-meeting-attendee.h b/calendar/gui/e-meeting-attendee.h
index 5ddc9968b2..42c5e13c2e 100644
--- a/calendar/gui/e-meeting-attendee.h
+++ b/calendar/gui/e-meeting-attendee.h
@@ -28,7 +28,7 @@
#endif
#include <gtk/gtk.h>
-#include <cal-util/cal-component.h>
+#include <libecal/e-cal-component.h>
#include "e-meeting-types.h"
#ifdef __cplusplus
@@ -80,9 +80,9 @@ struct _EMeetingAttendeeClass {
GType e_meeting_attendee_get_type (void);
GObject *e_meeting_attendee_new (void);
-GObject *e_meeting_attendee_new_from_cal_component_attendee (CalComponentAttendee *ca);
+GObject *e_meeting_attendee_new_from_e_cal_component_attendee (ECalComponentAttendee *ca);
-CalComponentAttendee *e_meeting_attendee_as_cal_component_attendee (EMeetingAttendee *ia);
+ECalComponentAttendee *e_meeting_attendee_as_e_cal_component_attendee (EMeetingAttendee *ia);
const gchar *e_meeting_attendee_get_address (EMeetingAttendee *ia);
void e_meeting_attendee_set_address (EMeetingAttendee *ia, gchar *address);
diff --git a/calendar/gui/e-meeting-list-view.c b/calendar/gui/e-meeting-list-view.c
index 4de564ff22..903b16f126 100644
--- a/calendar/gui/e-meeting-list-view.c
+++ b/calendar/gui/e-meeting-list-view.c
@@ -34,11 +34,11 @@
#include <libgnome/gnome-i18n.h>
#include <libgnome/gnome-util.h>
#include <libgnomevfs/gnome-vfs.h>
-#include <ebook/e-book.h>
-#include <ebook/e-vcard.h>
-#include <cal-util/cal-component.h>
-#include <cal-util/cal-util.h>
-#include <cal-util/timeutil.h>
+#include <libebook/e-book.h>
+#include <libebook/e-vcard.h>
+#include <libecal/e-cal-component.h>
+#include <libecal/e-cal-util.h>
+#include <libecal/e-cal-time-util.h>
#include "Evolution-Addressbook-SelectNames.h"
#include "calendar-config.h"
#include "e-meeting-list-view.h"
@@ -318,7 +318,7 @@ process_section (EMeetingListView *view, EABDestination **cards, icalparameter_r
name = eab_destination_get_name (cards[i]);
/* Get the field as attendee from the backend */
- if (cal_client_get_ldap_attribute (e_meeting_store_get_cal_client (priv->store),
+ if (e_cal_get_ldap_attribute (e_meeting_store_get_e_cal (priv->store),
&attr, NULL)) {
/* FIXME this should be more general */
if (!g_ascii_strcasecmp (attr, "icscalendar")) {
diff --git a/calendar/gui/e-meeting-model.c b/calendar/gui/e-meeting-model.c
index 964102d512..1a67594eca 100644
--- a/calendar/gui/e-meeting-model.c
+++ b/calendar/gui/e-meeting-model.c
@@ -39,9 +39,9 @@
#include <ebook/e-book.h>
#include <ebook/e-book-async.h>
#include <ebook/e-contact.h>
-#include <cal-util/cal-component.h>
-#include <cal-util/cal-util.h>
-#include <cal-util/timeutil.h>
+#include <libecal/e-cal-component.h>
+#include <libecal/e-cal-util.h>
+#include <libecal/e-cal-time-util.h>
#include "Evolution-Addressbook-SelectNames.h"
#include "calendar-config.h"
#include "itip-utils.h"
@@ -57,7 +57,7 @@ struct _EMeetingModelPrivate
GList *tables;
- CalClient *client;
+ ECal *client;
icaltimezone *zone;
EBook *ebook;
@@ -678,8 +678,8 @@ e_meeting_model_new (void)
}
-CalClient *
-e_meeting_model_get_cal_client (EMeetingModel *im)
+ECal *
+e_meeting_model_get_e_cal (EMeetingModel *im)
{
EMeetingModelPrivate *priv;
@@ -689,7 +689,7 @@ e_meeting_model_get_cal_client (EMeetingModel *im)
}
void
-e_meeting_model_set_cal_client (EMeetingModel *im, CalClient *client)
+e_meeting_model_set_e_cal (EMeetingModel *im, ECal *client)
{
EMeetingModelPrivate *priv;
@@ -1234,7 +1234,7 @@ process_free_busy (EMeetingModelQueueData *qdata, char *text)
icalcompiter iter;
icalcomponent *tz_top_level, *sub_comp;
- tz_top_level = cal_util_new_top_level ();
+ tz_top_level = e_cal_util_new_top_level ();
iter = icalcomponent_begin_component (main_comp, ICAL_VTIMEZONE_COMPONENT);
while ((sub_comp = icalcompiter_deref (&iter)) != NULL) {
@@ -1407,16 +1407,16 @@ refresh_busy_periods (gpointer data)
users = g_list_append (users, g_strdup (user));
/* FIXME Error checking */
- cal_client_get_free_busy (priv->client, users, startt, endt, &fb_data, NULL);
+ e_cal_get_free_busy (priv->client, users, startt, endt, &fb_data, NULL);
g_list_foreach (users, (GFunc)g_free, NULL);
g_list_free (users);
if (fb_data != NULL) {
- CalComponent *comp = fb_data->data;
+ ECalComponent *comp = fb_data->data;
char *comp_str;
- comp_str = cal_component_get_as_string (comp);
+ comp_str = e_cal_component_get_as_string (comp);
process_free_busy (qdata, comp_str);
g_free (comp_str);
return TRUE;
@@ -1660,7 +1660,7 @@ process_section (EMeetingModel *im, EABDestination **destv, icalparameter_role r
name = eab_destination_get_name (dest);
/* Get the field as attendee from the backend */
- if (cal_client_get_ldap_attribute (priv->client, &attr, NULL) && attr) {
+ if (e_cal_get_ldap_attribute (priv->client, &attr, NULL) && attr) {
/* FIXME this should be more general */
if (!strcmp (attr, "icscalendar")) {
EContact *contact = eab_destination_get_contact (dest);
diff --git a/calendar/gui/e-meeting-model.h b/calendar/gui/e-meeting-model.h
index 50fba6c7a6..e709cd3aa4 100644
--- a/calendar/gui/e-meeting-model.h
+++ b/calendar/gui/e-meeting-model.h
@@ -26,7 +26,7 @@
#include <gtk/gtk.h>
#include <gal/e-table/e-table-scrolled.h>
#include <gal/e-table/e-table-model.h>
-#include <cal-client/cal-client.h>
+#include <libecal/e-cal.h>
#include "e-meeting-attendee.h"
G_BEGIN_DECLS
@@ -72,8 +72,8 @@ typedef void (* EMeetingModelRefreshCallback) (gpointer data);
GtkType e_meeting_model_get_type (void);
GtkObject *e_meeting_model_new (void);
-CalClient *e_meeting_model_get_cal_client (EMeetingModel *im);
-void e_meeting_model_set_cal_client (EMeetingModel *im, CalClient *client);
+ECal *e_meeting_model_get_e_cal (EMeetingModel *im);
+void e_meeting_model_set_e_cal (EMeetingModel *im, ECal *client);
icaltimezone *e_meeting_model_get_zone (EMeetingModel *im);
void e_meeting_model_set_zone (EMeetingModel *im, icaltimezone *zone);
diff --git a/calendar/gui/e-meeting-store.c b/calendar/gui/e-meeting-store.c
index 6064971d9f..2bbaff4bec 100644
--- a/calendar/gui/e-meeting-store.c
+++ b/calendar/gui/e-meeting-store.c
@@ -29,10 +29,10 @@
#include <libgnome/gnome-i18n.h>
#include <libgnome/gnome-util.h>
#include <libgnomevfs/gnome-vfs.h>
-#include <ebook/e-book.h>
-#include <cal-util/cal-component.h>
-#include <cal-util/cal-util.h>
-#include <cal-util/timeutil.h>
+#include <libebook/e-book.h>
+#include <libecal/e-cal-component.h>
+#include <libecal/e-cal-util.h>
+#include <libecal/e-cal-time-util.h>
#include "calendar-config.h"
#include "itip-utils.h"
#include "e-meeting-utils.h"
@@ -45,7 +45,7 @@ struct _EMeetingStorePrivate {
GPtrArray *attendees;
gint stamp;
- CalClient *client;
+ ECal *client;
icaltimezone *zone;
EBook *ebook;
@@ -667,14 +667,14 @@ e_meeting_store_new (void)
}
-CalClient *
-e_meeting_store_get_cal_client (EMeetingStore *store)
+ECal *
+e_meeting_store_get_e_cal (EMeetingStore *store)
{
return store->priv->client;
}
void
-e_meeting_store_set_cal_client (EMeetingStore *store, CalClient *client)
+e_meeting_store_set_e_cal (EMeetingStore *store, ECal *client)
{
if (store->priv->client != NULL)
g_object_unref (store->priv->client);
@@ -1057,7 +1057,7 @@ process_free_busy (EMeetingStoreQueueData *qdata, char *text)
icalcompiter iter;
icalcomponent *tz_top_level, *sub_comp;
- tz_top_level = cal_util_new_top_level ();
+ tz_top_level = e_cal_util_new_top_level ();
iter = icalcomponent_begin_component (main_comp, ICAL_VTIMEZONE_COMPONENT);
while ((sub_comp = icalcompiter_deref (&iter)) != NULL) {
@@ -1147,16 +1147,16 @@ refresh_busy_periods (gpointer data)
user = itip_strip_mailto (e_meeting_attendee_get_address (attendee));
users = g_list_append (users, g_strdup (user));
- cal_client_get_free_busy (priv->client, users, startt, endt, &fb_data, NULL);
+ e_cal_get_free_busy (priv->client, users, startt, endt, &fb_data, NULL);
g_list_foreach (users, (GFunc)g_free, NULL);
g_list_free (users);
if (fb_data != NULL) {
- CalComponent *comp = fb_data->data;
+ ECalComponent *comp = fb_data->data;
char *comp_str;
- comp_str = cal_component_get_as_string (comp);
+ comp_str = e_cal_component_get_as_string (comp);
process_free_busy (qdata, comp_str);
g_free (comp_str);
return TRUE;
diff --git a/calendar/gui/e-meeting-store.h b/calendar/gui/e-meeting-store.h
index e5e518289d..8454c380b0 100644
--- a/calendar/gui/e-meeting-store.h
+++ b/calendar/gui/e-meeting-store.h
@@ -24,7 +24,7 @@
#define _E_MEETING_STORE_H_
#include <gtk/gtkliststore.h>
-#include <cal-client/cal-client.h>
+#include <libecal/e-cal.h>
#include "e-meeting-attendee.h"
G_BEGIN_DECLS
@@ -72,8 +72,8 @@ GObject *e_meeting_store_new (void);
void e_meeting_store_set_value (EMeetingStore *im, int row, int col, const gchar *val);
-CalClient *e_meeting_store_get_cal_client (EMeetingStore *im);
-void e_meeting_store_set_cal_client (EMeetingStore *im, CalClient *client);
+ECal *e_meeting_store_get_e_cal (EMeetingStore *im);
+void e_meeting_store_set_e_cal (EMeetingStore *im, ECal *client);
icaltimezone *e_meeting_store_get_zone (EMeetingStore *im);
void e_meeting_store_set_zone (EMeetingStore *im, icaltimezone *zone);
diff --git a/calendar/gui/e-select-names-renderer.c b/calendar/gui/e-select-names-renderer.c
index 9b325d6ac0..fbda387d23 100644
--- a/calendar/gui/e-select-names-renderer.c
+++ b/calendar/gui/e-select-names-renderer.c
@@ -24,7 +24,7 @@
#include <gtk/gtkcellrenderertext.h>
#include <gal/util/e-util.h>
-#include "cal-util/cal-util-marshal.h"
+#include "e-calendar-marshal.h"
#include "e-select-names-editable.h"
#include "e-select-names-renderer.h"
@@ -161,7 +161,7 @@ esnr_class_init (ESelectNamesRendererClass *class)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ESelectNamesRendererClass, cell_edited),
NULL, NULL,
- cal_util_marshal_VOID__STRING_STRING_STRING,
+ e_calendar_marshal_VOID__STRING_STRING_STRING,
G_TYPE_NONE, 3,
G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
}
diff --git a/calendar/gui/e-tasks.c b/calendar/gui/e-tasks.c
index d094b3af56..a5b9eac4e8 100644
--- a/calendar/gui/e-tasks.c
+++ b/calendar/gui/e-tasks.c
@@ -36,7 +36,7 @@
#include "e-util/e-categories-config.h"
#include "e-util/e-time-utils.h"
#include "e-util/e-url.h"
-#include "cal-util/timeutil.h"
+#include <libecal/e-cal-time-util.h>
#include "widgets/menus/gal-view-menus.h"
#include "dialogs/delete-error.h"
#include "dialogs/task-editor.h"
@@ -53,8 +53,8 @@
/* Private part of the GnomeCalendar structure */
struct _ETasksPrivate {
/* The calendar client object we monitor */
- CalClient *client;
- CalQuery *query;
+ ECal *client;
+ ECalView *query;
/* The ECalendarTable showing the tasks. */
GtkWidget *tasks_view;
@@ -80,8 +80,8 @@ 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 (CalClient *client, CalClientOpenStatus status, gpointer data);
-static void backend_error_cb (CalClient *client, const char *message, gpointer data);
+static void cal_opened_cb (ECal *client, ECalOpenStatus status, gpointer data);
+static void backend_error_cb (ECal *client, const char *message, gpointer data);
/* Signal IDs */
enum {
@@ -117,17 +117,17 @@ timet_to_str_with_zone (time_t t, icaltimezone *zone)
}
static void
-write_html (GtkHTMLStream *stream, CalComponent *comp)
+write_html (GtkHTMLStream *stream, ECalComponent *comp)
{
- CalComponentText text;
- CalComponentDateTime dt;
+ ECalComponentText text;
+ ECalComponentDateTime dt;
gchar *buf, *str;
icaltimezone *current_zone;
GSList *l;
icalproperty_status status;
int *priority_value;
- g_return_if_fail (IS_CAL_COMPONENT (comp));
+ g_return_if_fail (E_IS_CAL_COMPONENT (comp));
str = calendar_config_get_timezone ();
if (str && str[0]) {
@@ -136,13 +136,13 @@ write_html (GtkHTMLStream *stream, CalComponent *comp)
current_zone = icaltimezone_get_utc_timezone ();
/* write document header */
- cal_component_get_summary (comp, &text);
+ e_cal_component_get_summary (comp, &text);
gtk_html_stream_printf (stream,
"<HTML><BODY><H1>%s</H1>",
text.value);
/* write icons for the categories */
- cal_component_get_categories_list (comp, &l);
+ e_cal_component_get_categories_list (comp, &l);
if (l) {
GSList *node;
@@ -156,7 +156,7 @@ write_html (GtkHTMLStream *stream, CalComponent *comp)
}
}
- cal_component_free_categories_list (l);
+ e_cal_component_free_categories_list (l);
}
/* write summary */
@@ -166,7 +166,7 @@ write_html (GtkHTMLStream *stream, CalComponent *comp)
_("Summary:"), text.value);
/* write start date */
- cal_component_get_dtstart (comp, &dt);
+ e_cal_component_get_dtstart (comp, &dt);
if (dt.value != NULL) {
buf = timet_to_str_with_zone (icaltime_as_timet (*dt.value), current_zone);
str = g_locale_to_utf8 (buf, -1, NULL, NULL, NULL);
@@ -178,11 +178,11 @@ write_html (GtkHTMLStream *stream, CalComponent *comp)
gtk_html_stream_printf (stream, "<TR><TD VALIGN=\"TOP\" ALIGN=\"RIGHT\"><B>%s</B></TD><TD>%s</TD></TR>",
_("Start Date:"), str);
- cal_component_free_datetime (&dt);
+ e_cal_component_free_datetime (&dt);
g_free (str);
/* write Due Date */
- cal_component_get_due (comp, &dt);
+ e_cal_component_get_due (comp, &dt);
if (dt.value != NULL) {
buf = timet_to_str_with_zone (icaltime_as_timet (*dt.value), current_zone);
str = g_locale_to_utf8 (buf, -1, NULL, NULL, NULL);
@@ -194,12 +194,12 @@ write_html (GtkHTMLStream *stream, CalComponent *comp)
gtk_html_stream_printf (stream, "<TR><TD VALIGN=\"TOP\" ALIGN=\"RIGHT\"><B>%s</B></TD><TD>%s</TD></TR>",
_("Due Date:"), str);
- cal_component_free_datetime (&dt);
+ e_cal_component_free_datetime (&dt);
g_free (str);
/* write status */
gtk_html_stream_printf (stream, "<TR><TD VALIGN=\"TOP\" ALIGN=\"RIGHT\"><B>%s</B></TD>", _("Status:"));
- cal_component_get_status (comp, &status);
+ e_cal_component_get_status (comp, &status);
switch (status) {
case ICAL_STATUS_INPROCESS :
str = g_strdup (_("In Progress"));
@@ -221,7 +221,7 @@ write_html (GtkHTMLStream *stream, CalComponent *comp)
/* write priority */
gtk_html_stream_printf (stream, "<TR><TD VALIGN=\"TOP\" ALIGN=\"RIGHT\"><B>%s</B></TD>", _("Priority:"));
- cal_component_get_priority (comp, &priority_value);
+ e_cal_component_get_priority (comp, &priority_value);
if (priority_value) {
if (*priority_value == 0)
str = g_strdup ("");
@@ -235,7 +235,7 @@ write_html (GtkHTMLStream *stream, CalComponent *comp)
gtk_html_stream_printf (stream, "<TD>%s</TD></TR>", str);
g_free (str);
- cal_component_free_priority (priority_value);
+ e_cal_component_free_priority (priority_value);
} else
gtk_html_stream_printf (stream, "<TD></TD></TR>");
@@ -243,7 +243,7 @@ write_html (GtkHTMLStream *stream, CalComponent *comp)
gtk_html_stream_printf (stream, "<TR><TD COLSPAN=\"2\"><HR></TD></TR>");
gtk_html_stream_printf (stream, "<TR><TD VALIGN=\"TOP\" ALIGN=\"RIGHT\"><B>%s</B></TD>", _("Description:"));
- cal_component_get_description_list (comp, &l);
+ e_cal_component_get_description_list (comp, &l);
if (l) {
GSList *node;
@@ -253,7 +253,7 @@ write_html (GtkHTMLStream *stream, CalComponent *comp)
gint i;
GString *str = g_string_new ("");;
- text = * (CalComponentText *) node->data;
+ text = * (ECalComponentText *) node->data;
for (i = 0; i < strlen (text.value ? text.value : 0); i++) {
if (text.value[i] == '\n')
str = g_string_append (str, "<BR>");
@@ -271,13 +271,13 @@ write_html (GtkHTMLStream *stream, CalComponent *comp)
gtk_html_stream_printf (stream, "</TD></TR>");
- cal_component_free_text_list (l);
+ e_cal_component_free_text_list (l);
} else
gtk_html_stream_printf (stream, "<TD></TD></TR>");
/* URL */
gtk_html_stream_printf (stream, "<TR><TD VALIGN=\"TOP\" ALIGN=\"RIGHT\"><B>%s</B></TD>", _("Web Page:"));
- cal_component_get_url (comp, (const char **) &str);
+ e_cal_component_get_url (comp, (const char **) &str);
if (str)
gtk_html_stream_printf (stream, "<TD><A HREF=\"%s\">%s</A></TD></TR>", str, str);
else
@@ -320,7 +320,7 @@ table_cursor_change_cb (ETable *etable, int row, gpointer data)
GtkHTMLStream *stream;
ECalModel *model;
ECalModelComponent *comp_data;
- CalComponent *comp;
+ ECalComponent *comp;
const char *uid;
model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->tasks_view));
@@ -328,13 +328,13 @@ table_cursor_change_cb (ETable *etable, int row, gpointer data)
stream = gtk_html_begin (GTK_HTML (priv->html));
comp_data = e_cal_model_get_component_at (model, e_table_get_cursor_row (etable));
- comp = cal_component_new ();
- cal_component_set_icalcomponent (comp, icalcomponent_new_clone (comp_data->icalcomp));
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (comp_data->icalcomp));
write_html (stream, comp);
gtk_html_stream_close (stream, GTK_HTML_STREAM_OK);
- cal_component_get_uid (comp, &uid);
+ e_cal_component_get_uid (comp, &uid);
if (priv->current_uid)
g_free (priv->current_uid);
priv->current_uid = g_strdup (uid);
@@ -435,9 +435,9 @@ set_timezone (ETasks *tasks)
if (!zone)
zone = icaltimezone_get_utc_timezone ();
- if (cal_client_get_load_state (priv->client) == CAL_CLIENT_LOAD_LOADED)
+ if (e_cal_get_load_state (priv->client) == E_CAL_LOAD_LOADED)
/* FIXME Error checking */
- cal_client_set_default_timezone (priv->client, zone, NULL);
+ e_cal_set_default_timezone (priv->client, zone, NULL);
}
static void
@@ -581,7 +581,7 @@ e_tasks_init (ETasks *tasks)
/* Callback used when the set of categories changes in the calendar client */
static void
-client_categories_changed_cb (CalClient *client, GPtrArray *categories, gpointer data)
+client_categories_changed_cb (ECal *client, GPtrArray *categories, gpointer data)
{
ETasks *tasks;
ETasksPrivate *priv;
@@ -593,7 +593,7 @@ client_categories_changed_cb (CalClient *client, GPtrArray *categories, gpointer
}
static void
-client_obj_updated_cb (CalClient *client, const char *uid, gpointer data)
+client_obj_updated_cb (ECal *client, const char *uid, gpointer data)
{
ETasks *tasks;
ETasksPrivate *priv;
@@ -717,8 +717,8 @@ e_tasks_open (ETasks *tasks,
g_free (message);
g_free (urinopwd);
- /* create the CalClient */
- priv->client = cal_client_new (real_uri, CALOBJ_TYPE_TODO);
+ /* create the ECal */
+ priv->client = e_cal_new (real_uri, CALOBJ_TYPE_TODO);
if (!priv->client)
return FALSE;
@@ -736,7 +736,7 @@ e_tasks_open (ETasks *tasks,
e_cal_model_add_client (model, priv->client);
- if (cal_client_open (priv->client, FALSE, &error)) {
+ if (e_cal_open (priv->client, FALSE, &error)) {
g_message ("e_tasks_open(): %s", error->message);
g_free (real_uri);
e_uri_free (uri);
@@ -798,8 +798,8 @@ permission_error (ETasks *tasks, const char *uri)
/* Callback from the calendar client when a calendar is opened */
static void
-cal_opened_cb (CalClient *client,
- CalClientOpenStatus status,
+cal_opened_cb (ECal *client,
+ ECalOpenStatus status,
gpointer data)
{
ETasks *tasks;
@@ -811,26 +811,26 @@ cal_opened_cb (CalClient *client,
set_status_message (tasks, NULL);
switch (status) {
- case CAL_CLIENT_OPEN_SUCCESS:
+ case E_CAL_OPEN_SUCCESS:
/* Everything is OK */
set_timezone (tasks);
return;
- case CAL_CLIENT_OPEN_ERROR:
- load_error (tasks, cal_client_get_uri (client));
+ case E_CAL_OPEN_ERROR:
+ load_error (tasks, e_cal_get_uri (client));
break;
- case CAL_CLIENT_OPEN_NOT_FOUND:
+ case E_CAL_OPEN_NOT_FOUND:
/* bullshit; we did not specify only_if_exists */
g_assert_not_reached ();
return;
- case CAL_CLIENT_OPEN_METHOD_NOT_SUPPORTED:
- method_error (tasks, cal_client_get_uri (client));
+ case E_CAL_OPEN_METHOD_NOT_SUPPORTED:
+ method_error (tasks, e_cal_get_uri (client));
break;
- case CAL_CLIENT_OPEN_PERMISSION_DENIED:
- permission_error (tasks, cal_client_get_uri (client));
+ case E_CAL_OPEN_PERMISSION_DENIED:
+ permission_error (tasks, e_cal_get_uri (client));
break;
default:
@@ -840,7 +840,7 @@ cal_opened_cb (CalClient *client,
/* Callback from the calendar client when an error occurs in the backend */
static void
-backend_error_cb (CalClient *client, const char *message, gpointer data)
+backend_error_cb (ECal *client, const char *message, gpointer data)
{
ETasks *tasks;
ETasksPrivate *priv;
@@ -850,7 +850,7 @@ backend_error_cb (CalClient *client, const char *message, gpointer data)
tasks = E_TASKS (data);
priv = tasks->priv;
- urinopwd = get_uri_without_password (cal_client_get_uri (client));
+ urinopwd = get_uri_without_password (e_cal_get_uri (client));
errmsg = g_strdup_printf (_("Error on %s:\n %s"), urinopwd, message);
gnome_error_dialog_parented (errmsg, GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (tasks))));
g_free (errmsg);
@@ -862,7 +862,7 @@ e_tasks_new_task (ETasks *tasks)
{
ETasksPrivate *priv;
TaskEditor *tedit;
- CalComponent *comp;
+ ECalComponent *comp;
const char *category;
g_return_if_fail (E_IS_TASKS (tasks));
@@ -874,7 +874,7 @@ e_tasks_new_task (ETasks *tasks)
comp = cal_comp_task_new_with_defaults (priv->client);
category = cal_search_bar_get_category (CAL_SEARCH_BAR (priv->search_bar));
- cal_component_set_categories (comp, category);
+ e_cal_component_set_categories (comp, category);
comp_editor_edit_comp (COMP_EDITOR (tedit), comp);
g_object_unref (comp);
@@ -966,7 +966,7 @@ e_tasks_delete_completed (ETasks *tasks)
set_status_message (tasks, _("Expunging"));
- if (!cal_client_get_object_list (priv->client, sexp, &objects, NULL)) {
+ if (!e_cal_get_object_list (priv->client, sexp, &objects, NULL)) {
set_status_message (tasks, NULL);
g_warning (G_STRLOC ": Could not get the objects");
@@ -975,7 +975,7 @@ e_tasks_delete_completed (ETasks *tasks)
for (l = objects; l; l = l->next) {
/* FIXME Better error handling */
- cal_client_remove_object (priv->client, icalcomponent_get_uid (l->data), NULL);
+ e_cal_remove_object (priv->client, icalcomponent_get_uid (l->data), NULL);
}
set_status_message (tasks, NULL);
@@ -1053,7 +1053,7 @@ e_tasks_setup_view_menus (ETasks *tasks, BonoboUIComponent *uic)
gal_view_collection_load (collection);
}
- priv->view_instance = gal_view_instance_new (collection, cal_client_get_uri (priv->client));
+ priv->view_instance = gal_view_instance_new (collection, e_cal_get_uri (priv->client));
priv->view_menus = gal_view_menus_new (priv->view_instance);
gal_view_menus_apply (priv->view_menus, uic, NULL);
diff --git a/calendar/gui/e-tasks.h b/calendar/gui/e-tasks.h
index efa2ea2d1e..a1cfc0612b 100644
--- a/calendar/gui/e-tasks.h
+++ b/calendar/gui/e-tasks.h
@@ -27,7 +27,7 @@
#include <bonobo/bonobo-ui-component.h>
#include <gtk/gtktable.h>
-#include <cal-client/cal-client.h>
+#include <libecal/e-cal.h>
#include "e-calendar-table.h"
#define E_TYPE_TASKS (e_tasks_get_type ())
diff --git a/calendar/gui/e-timezone-entry.h b/calendar/gui/e-timezone-entry.h
index 4f94cd88a1..94a7df9efc 100644
--- a/calendar/gui/e-timezone-entry.h
+++ b/calendar/gui/e-timezone-entry.h
@@ -33,7 +33,7 @@
#define __E_TIMEZONE_ENTRY_H_
#include <gtk/gtkhbox.h>
-#include <cal-client/cal-client.h>
+#include <libecal/e-cal.h>
G_BEGIN_DECLS
diff --git a/calendar/gui/e-week-view-config.c b/calendar/gui/e-week-view-config.c
index 097d86dd92..1257813062 100644
--- a/calendar/gui/e-week-view-config.c
+++ b/calendar/gui/e-week-view-config.c
@@ -167,7 +167,7 @@ set_timezone (EWeekView *week_view)
if (!zone)
zone = icaltimezone_get_utc_timezone ();
- e_cal_view_set_timezone (E_CAL_VIEW (week_view), zone);
+ e_calendar_view_set_timezone (E_CALENDAR_VIEW (week_view), zone);
g_free (location);
}
@@ -214,7 +214,7 @@ set_twentyfour_hour (EWeekView *week_view)
use_24_hour = calendar_config_get_24_hour_format ();
- e_cal_view_set_use_24_hour_format (E_CAL_VIEW (week_view), use_24_hour);
+ e_calendar_view_set_use_24_hour_format (E_CALENDAR_VIEW (week_view), use_24_hour);
}
static void
diff --git a/calendar/gui/e-week-view-event-item.c b/calendar/gui/e-week-view-event-item.c
index a534943d75..85e1cf775a 100644
--- a/calendar/gui/e-week-view-event-item.c
+++ b/calendar/gui/e-week-view-event-item.c
@@ -84,7 +84,7 @@ static gboolean e_week_view_event_item_button_release (EWeekViewEventItem *wveit
GdkEvent *event);
static gboolean e_week_view_event_item_double_click (EWeekViewEventItem *wveitem,
GdkEvent *bevent);
-static ECalViewPosition e_week_view_event_item_get_position (EWeekViewEventItem *wveitem,
+static ECalendarViewPosition e_week_view_event_item_get_position (EWeekViewEventItem *wveitem,
gdouble x,
gdouble y);
@@ -287,7 +287,7 @@ e_week_view_event_item_draw (GnomeCanvasItem *canvas_item,
rect_x = x1 + E_WEEK_VIEW_EVENT_L_PAD;
rect_w = x2 - x1 - E_WEEK_VIEW_EVENT_L_PAD - E_WEEK_VIEW_EVENT_R_PAD + 1;
- if (gdk_color_parse (e_cal_model_get_color_for_component (e_cal_view_get_model (E_CAL_VIEW (week_view)),
+ if (gdk_color_parse (e_cal_model_get_color_for_component (e_calendar_view_get_model (E_CALENDAR_VIEW (week_view)),
event->comp_data),
&bg_color)) {
GdkColormap *colormap;
@@ -377,7 +377,7 @@ e_week_view_event_item_draw (GnomeCanvasItem *canvas_item,
rect_w -= 2;
}
- if (gdk_color_parse (e_cal_model_get_color_for_component (e_cal_view_get_model (E_CAL_VIEW (week_view)),
+ if (gdk_color_parse (e_cal_model_get_color_for_component (e_calendar_view_get_model (E_CALENDAR_VIEW (week_view)),
event->comp_data),
&bg_color)) {
GdkColormap *colormap;
@@ -550,7 +550,7 @@ e_week_view_draw_time (EWeekView *week_view,
time_x += week_view->small_digit_width * 2;
/* Draw the 'am'/'pm' suffix, if 12-hour format. */
- if (!e_cal_view_get_use_24_hour_format (E_CAL_VIEW (week_view))) {
+ if (!e_calendar_view_get_use_24_hour_format (E_CALENDAR_VIEW (week_view))) {
pango_layout_set_text (layout, suffix, -1);
gdk_draw_layout (drawable, gc,
time_x,
@@ -592,7 +592,7 @@ e_week_view_event_item_draw_icons (EWeekViewEventItem *wveitem,
EWeekView *week_view;
EWeekViewEvent *event;
EWeekViewEventSpan *span;
- CalComponent *comp;
+ ECalComponent *comp;
GdkGC *gc;
gint num_icons = 0, icon_x_inc;
gboolean draw_reminder_icon = FALSE, draw_recurrence_icon = FALSE;
@@ -605,17 +605,17 @@ e_week_view_event_item_draw_icons (EWeekViewEventItem *wveitem,
wveitem->event_num);
span = &g_array_index (week_view->spans, EWeekViewEventSpan,
event->spans_index + wveitem->span_num);
- comp = cal_component_new ();
- cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
gc = week_view->main_gc;
- if (cal_component_has_alarms (comp)) {
+ if (e_cal_component_has_alarms (comp)) {
draw_reminder_icon = TRUE;
num_icons++;
}
- if (cal_component_has_recurrences (comp)) {
+ if (e_cal_component_has_recurrences (comp)) {
draw_recurrence_icon = TRUE;
num_icons++;
}
@@ -625,7 +625,7 @@ e_week_view_event_item_draw_icons (EWeekViewEventItem *wveitem,
num_icons++;
}
- cal_component_get_categories_list (comp, &categories_list);
+ e_cal_component_get_categories_list (comp, &categories_list);
for (elem = categories_list; elem; elem = elem->next) {
char *category;
GdkPixmap *pixmap = NULL;
@@ -700,7 +700,7 @@ e_week_view_event_item_draw_icons (EWeekViewEventItem *wveitem,
gdk_bitmap_unref (mask);
}
- cal_component_free_categories_list (categories_list);
+ e_cal_component_free_categories_list (categories_list);
gdk_gc_set_clip_mask (gc, NULL);
}
@@ -790,7 +790,7 @@ e_week_view_event_item_button_press (EWeekViewEventItem *wveitem,
GdkEvent *bevent)
{
EWeekView *week_view;
- ECalViewPosition pos;
+ ECalendarViewPosition pos;
EWeekViewEvent *event;
EWeekViewEventSpan *span;
GnomeCanvasItem *item;
@@ -811,7 +811,7 @@ e_week_view_event_item_button_press (EWeekViewEventItem *wveitem,
pos = e_week_view_event_item_get_position (wveitem, bevent->button.x,
bevent->button.y);
- if (pos == E_CAL_VIEW_POS_NONE)
+ if (pos == E_CALENDAR_VIEW_POS_NONE)
return FALSE;
if (bevent->button.button == 1) {
@@ -901,13 +901,13 @@ e_week_view_event_item_double_click (EWeekViewEventItem *wveitem,
e_week_view_stop_editing_event (week_view);
- e_cal_view_edit_appointment (E_CAL_VIEW (week_view), event->comp_data->client, event->comp_data->icalcomp, FALSE);
+ e_calendar_view_edit_appointment (E_CALENDAR_VIEW (week_view), event->comp_data->client, event->comp_data->icalcomp, FALSE);
return TRUE;
}
-static ECalViewPosition
+static ECalendarViewPosition
e_week_view_event_item_get_position (EWeekViewEventItem *wveitem,
gdouble x,
gdouble y)
@@ -918,7 +918,7 @@ e_week_view_event_item_get_position (EWeekViewEventItem *wveitem,
item = GNOME_CANVAS_ITEM (wveitem);
week_view = E_WEEK_VIEW (GTK_WIDGET (item->canvas)->parent);
- g_return_val_if_fail (E_IS_WEEK_VIEW (week_view), E_CAL_VIEW_POS_NONE);
+ g_return_val_if_fail (E_IS_WEEK_VIEW (week_view), E_CALENDAR_VIEW_POS_NONE);
#if 0
g_print ("In e_week_view_event_item_get_position item: %g,%g %g,%g point: %g,%g\n", item->x1, item->y1, item->x2, item->y2, x, y);
@@ -926,20 +926,20 @@ e_week_view_event_item_get_position (EWeekViewEventItem *wveitem,
if (x < item->x1 + E_WEEK_VIEW_EVENT_L_PAD
|| x >= item->x2 - E_WEEK_VIEW_EVENT_R_PAD)
- return E_CAL_VIEW_POS_NONE;
+ return E_CALENDAR_VIEW_POS_NONE;
/* Support left/right edge for long events only. */
if (!e_week_view_is_one_day_event (week_view, wveitem->event_num)) {
if (x < item->x1 + E_WEEK_VIEW_EVENT_L_PAD
+ E_WEEK_VIEW_EVENT_BORDER_WIDTH
+ E_WEEK_VIEW_EVENT_EDGE_X_PAD)
- return E_CAL_VIEW_POS_LEFT_EDGE;
+ return E_CALENDAR_VIEW_POS_LEFT_EDGE;
if (x >= item->x2 + 1 - E_WEEK_VIEW_EVENT_R_PAD
- E_WEEK_VIEW_EVENT_BORDER_WIDTH
- E_WEEK_VIEW_EVENT_EDGE_X_PAD)
- return E_CAL_VIEW_POS_RIGHT_EDGE;
+ return E_CALENDAR_VIEW_POS_RIGHT_EDGE;
}
- return E_CAL_VIEW_POS_EVENT;
+ return E_CALENDAR_VIEW_POS_EVENT;
}
diff --git a/calendar/gui/e-week-view-main-item.c b/calendar/gui/e-week-view-main-item.c
index ca80da28c3..ed823c2dcd 100644
--- a/calendar/gui/e-week-view-main-item.c
+++ b/calendar/gui/e-week-view-main-item.c
@@ -346,7 +346,7 @@ e_week_view_main_item_draw_day (EWeekViewMainItem *wvmitem,
/* Check if we are drawing today */
tt = icaltime_from_timet_with_zone (time (NULL), FALSE,
- e_cal_view_get_timezone (E_CAL_VIEW (week_view)));
+ e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)));
if (g_date_year (date) == tt.year
&& g_date_month (date) == tt.month
&& g_date_day (date) == tt.day)
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index e4d701a0a6..99d0ad27c7 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -57,7 +57,7 @@
#include "dialogs/recur-comp.h"
#include "comp-util.h"
#include "itip-utils.h"
-#include "cal-util/timeutil.h"
+#include <libecal/e-cal-time-util.h>
#include "calendar-commands.h"
#include "calendar-config.h"
#include "print.h"
@@ -119,11 +119,11 @@ static gboolean e_week_view_get_next_tab_event (EWeekView *week_view,
gint *next_span_num);
static gboolean e_week_view_focus (GtkWidget *widget,
GtkDirectionType direction);
-static GList *e_week_view_get_selected_events (ECalView *cal_view);
-static void e_week_view_get_selected_time_range (ECalView *cal_view, time_t *start_time, time_t *end_time);
-static void e_week_view_set_selected_time_range (ECalView *cal_view, time_t start_time, time_t end_time);
-static gboolean e_week_view_get_visible_time_range (ECalView *cal_view, time_t *start_time, time_t *end_time);
-static void e_week_view_update_query (ECalView *cal_view);
+static GList *e_week_view_get_selected_events (ECalendarView *cal_view);
+static void e_week_view_get_selected_time_range (ECalendarView *cal_view, time_t *start_time, time_t *end_time);
+static void e_week_view_set_selected_time_range (ECalendarView *cal_view, time_t start_time, time_t end_time);
+static gboolean e_week_view_get_visible_time_range (ECalendarView *cal_view, time_t *start_time, time_t *end_time);
+static void e_week_view_update_query (ECalendarView *cal_view);
static void e_week_view_draw_shadow (EWeekView *week_view);
static gboolean e_week_view_on_button_press (GtkWidget *widget,
@@ -145,7 +145,7 @@ static void e_week_view_update_selection (EWeekView *week_view,
gint day);
static void e_week_view_free_events (EWeekView *week_view);
-static gboolean e_week_view_add_event (CalComponent *comp,
+static gboolean e_week_view_add_event (ECalComponent *comp,
time_t start,
time_t end,
gpointer data);
@@ -201,22 +201,22 @@ static void e_week_view_queue_layout (EWeekView *week_view);
static void e_week_view_cancel_layout (EWeekView *week_view);
static gboolean e_week_view_layout_timeout_cb (gpointer data);
-static ECalViewClass *parent_class;
+static ECalendarViewClass *parent_class;
E_MAKE_TYPE (e_week_view, "EWeekView", EWeekView, e_week_view_class_init,
- e_week_view_init, e_cal_view_get_type ());
+ e_week_view_init, e_calendar_view_get_type ());
static void
e_week_view_class_init (EWeekViewClass *class)
{
GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
- ECalViewClass *view_class;
+ ECalendarViewClass *view_class;
parent_class = g_type_class_peek_parent (class);
object_class = (GtkObjectClass *) class;
widget_class = (GtkWidgetClass *) class;
- view_class = (ECalViewClass *) class;
+ view_class = (ECalendarViewClass *) class;
/* Method override */
object_class->destroy = e_week_view_destroy;
@@ -243,7 +243,7 @@ e_week_view_class_init (EWeekViewClass *class)
}
static void
-timezone_changed_cb (ECalView *cal_view, icaltimezone *old_zone,
+timezone_changed_cb (ECalendarView *cal_view, icaltimezone *old_zone,
icaltimezone *new_zone, gpointer user_data)
{
struct icaltimetype tt = icaltime_null_time ();
@@ -265,7 +265,7 @@ timezone_changed_cb (ECalView *cal_view, icaltimezone *old_zone,
lower = icaltime_as_timet_with_zone (tt, new_zone);
e_week_view_recalc_day_starts (week_view, lower);
- e_week_view_update_query ((ECalView *) week_view);
+ e_week_view_update_query ((ECalendarView *) week_view);
}
static void
@@ -406,7 +406,7 @@ e_week_view_init (EWeekView *week_view)
week_view->resize_width_cursor = gdk_cursor_new (GDK_SB_H_DOUBLE_ARROW);
week_view->last_cursor_set = NULL;
- /* connect to ECalView's signals */
+ /* connect to ECalendarView's signals */
g_signal_connect (G_OBJECT (week_view), "timezone_changed",
G_CALLBACK (timezone_changed_cb), NULL);
}
@@ -1067,7 +1067,7 @@ e_week_view_focus (GtkWidget *widget, GtkDirectionType direction)
/* Returns the currently-selected event, or NULL if none */
static GList *
-e_week_view_get_selected_events (ECalView *cal_view)
+e_week_view_get_selected_events (ECalendarView *cal_view)
{
EWeekViewEvent *event = NULL;
GList *list = NULL;
@@ -1094,7 +1094,7 @@ process_component (EWeekView *week_view, ECalModelComponent *comp_data)
{
EWeekViewEvent *event;
gint event_num, num_days;
- CalComponent *comp = NULL;
+ ECalComponent *comp = NULL;
AddEventData add_event_data;
const char *uid;
@@ -1102,30 +1102,30 @@ process_component (EWeekView *week_view, ECalModelComponent *comp_data)
if (!g_date_valid (&week_view->first_day_shown))
return;
- comp = cal_component_new ();
- if (!cal_component_set_icalcomponent (comp, icalcomponent_new_clone (comp_data->icalcomp))) {
+ comp = e_cal_component_new ();
+ if (!e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (comp_data->icalcomp))) {
g_object_unref (comp);
- g_message ("process_component(): Could not set icalcomponent on CalComponent");
+ g_message ("process_component(): Could not set icalcomponent on ECalComponent");
return;
}
- cal_component_get_uid (comp, &uid);
+ e_cal_component_get_uid (comp, &uid);
/* If the event already exists and the dates didn't change, we can
update the event fairly easily without changing the events arrays
or computing a new layout. */
if (e_week_view_find_event_from_uid (week_view, uid, &event_num)) {
- CalComponent *tmp_comp;
+ ECalComponent *tmp_comp;
event = &g_array_index (week_view->events, EWeekViewEvent,
event_num);
- tmp_comp = cal_component_new ();
- cal_component_set_icalcomponent (tmp_comp, icalcomponent_new_clone (comp_data->icalcomp));
- if (!cal_component_has_recurrences (comp)
- && !cal_component_has_recurrences (tmp_comp)
- && cal_component_event_dates_match (comp, tmp_comp)) {
+ tmp_comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (tmp_comp, icalcomponent_new_clone (comp_data->icalcomp));
+ if (!e_cal_component_has_recurrences (comp)
+ && !e_cal_component_has_recurrences (tmp_comp)
+ && e_cal_component_event_dates_match (comp, tmp_comp)) {
#if 0
g_print ("updated object's dates unchanged\n");
#endif
@@ -1153,12 +1153,12 @@ process_component (EWeekView *week_view, ECalModelComponent *comp_data)
add_event_data.week_view = week_view;
add_event_data.comp_data = comp_data;
- cal_recur_generate_instances (comp,
+ e_cal_recur_generate_instances (comp,
week_view->day_starts[0],
week_view->day_starts[num_days],
e_week_view_add_event, &add_event_data,
- cal_client_resolve_tzid_cb, comp_data->client,
- e_cal_view_get_timezone (E_CAL_VIEW (week_view)));
+ e_cal_resolve_tzid_cb, comp_data->client,
+ e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)));
g_object_unref (comp);
@@ -1167,7 +1167,7 @@ process_component (EWeekView *week_view, ECalModelComponent *comp_data)
/* Restarts a query for the week view */
static void
-e_week_view_update_query (ECalView *cal_view)
+e_week_view_update_query (ECalendarView *cal_view)
{
gint rows, r;
EWeekView *week_view = E_WEEK_VIEW (cal_view);
@@ -1176,11 +1176,11 @@ e_week_view_update_query (ECalView *cal_view)
e_week_view_free_events (week_view);
e_week_view_queue_layout (week_view);
- rows = e_table_model_row_count (E_TABLE_MODEL (e_cal_view_get_model (E_CAL_VIEW (week_view))));
+ rows = e_table_model_row_count (E_TABLE_MODEL (e_calendar_view_get_model (E_CALENDAR_VIEW (week_view))));
for (r = 0; r < rows; r++) {
ECalModelComponent *comp_data;
- comp_data = e_cal_model_get_component_at (e_cal_view_get_model (E_CAL_VIEW (week_view)), r);
+ comp_data = e_cal_model_get_component_at (e_calendar_view_get_model (E_CALENDAR_VIEW (week_view)), r);
g_assert (comp_data != NULL);
process_component (week_view, comp_data);
}
@@ -1215,7 +1215,7 @@ e_week_view_draw_shadow (EWeekView *week_view)
month and the days between start_time and end_time will be selected.
To select a single day, use the same value for start_time & end_time. */
static void
-e_week_view_set_selected_time_range (ECalView *cal_view,
+e_week_view_set_selected_time_range (ECalendarView *cal_view,
time_t start_time,
time_t end_time)
{
@@ -1226,7 +1226,7 @@ e_week_view_set_selected_time_range (ECalView *cal_view,
g_return_if_fail (E_IS_WEEK_VIEW (week_view));
- time_to_gdate_with_zone (&date, start_time, e_cal_view_get_timezone (E_CAL_VIEW (week_view)));
+ time_to_gdate_with_zone (&date, start_time, e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)));
if (week_view->multi_week_view) {
/* Find the number of days since the start of the month. */
@@ -1275,11 +1275,11 @@ e_week_view_set_selected_time_range (ECalView *cal_view,
|| g_date_compare (&week_view->first_day_shown, &base_date)) {
week_view->first_day_shown = base_date;
start_time = time_add_day_with_zone (start_time, -day_offset,
- e_cal_view_get_timezone (E_CAL_VIEW (week_view)));
+ e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)));
start_time = time_day_begin_with_zone (start_time,
- e_cal_view_get_timezone (E_CAL_VIEW (week_view)));
+ e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)));
e_week_view_recalc_day_starts (week_view, start_time);
- e_week_view_update_query ((ECalView *) week_view);
+ e_week_view_update_query ((ECalendarView *) week_view);
}
/* Set the selection to the given days. */
@@ -1287,10 +1287,10 @@ e_week_view_set_selected_time_range (ECalView *cal_view,
- g_date_julian (&base_date);
if (end_time == start_time
|| end_time <= time_add_day_with_zone (start_time, 1,
- e_cal_view_get_timezone (E_CAL_VIEW (week_view))))
+ e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view))))
week_view->selection_end_day = week_view->selection_start_day;
else {
- time_to_gdate_with_zone (&end_date, end_time - 60, e_cal_view_get_timezone (E_CAL_VIEW (week_view)));
+ time_to_gdate_with_zone (&end_date, end_time - 60, e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)));
week_view->selection_end_day = g_date_julian (&end_date)
- g_date_julian (&base_date);
}
@@ -1323,17 +1323,17 @@ e_week_view_set_selected_time_range_visible (EWeekView *week_view,
g_return_if_fail (E_IS_WEEK_VIEW (week_view));
- time_to_gdate_with_zone (&date, start_time, e_cal_view_get_timezone (E_CAL_VIEW (week_view)));
+ time_to_gdate_with_zone (&date, start_time, e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)));
/* Set the selection to the given days. */
week_view->selection_start_day = g_date_julian (&date)
- g_date_julian (&week_view->first_day_shown);
if (end_time == start_time
|| end_time <= time_add_day_with_zone (start_time, 1,
- e_cal_view_get_timezone (E_CAL_VIEW (week_view))))
+ e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view))))
week_view->selection_end_day = week_view->selection_start_day;
else {
- time_to_gdate_with_zone (&end_date, end_time - 60, e_cal_view_get_timezone (E_CAL_VIEW (week_view)));
+ time_to_gdate_with_zone (&end_date, end_time - 60, e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)));
week_view->selection_end_day = g_date_julian (&end_date)
- g_date_julian (&week_view->first_day_shown);
}
@@ -1353,7 +1353,7 @@ e_week_view_set_selected_time_range_visible (EWeekView *week_view,
/* Returns the selected time range. */
static void
-e_week_view_get_selected_time_range (ECalView *cal_view,
+e_week_view_get_selected_time_range (ECalendarView *cal_view,
time_t *start_time,
time_t *end_time)
{
@@ -1377,7 +1377,7 @@ e_week_view_get_selected_time_range (ECalView *cal_view,
/* Gets the visible time range. Returns FALSE if no time range has been set. */
static gboolean
-e_week_view_get_visible_time_range (ECalView *cal_view,
+e_week_view_get_visible_time_range (ECalendarView *cal_view,
time_t *start_time,
time_t *end_time)
{
@@ -1458,10 +1458,10 @@ e_week_view_set_first_day_shown (EWeekView *week_view,
start_tt.day = g_date_day (&base_date);
start_time = icaltime_as_timet_with_zone (start_tt,
- e_cal_view_get_timezone (E_CAL_VIEW (week_view)));
+ e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)));
e_week_view_recalc_day_starts (week_view, start_time);
- e_week_view_update_query ((ECalView *) week_view);
+ e_week_view_update_query ((ECalendarView *) week_view);
}
/* Try to keep the previous selection, but if it is no longer shown
@@ -1508,7 +1508,7 @@ e_week_view_recalc_day_starts (EWeekView *week_view,
week_view->day_starts[0] = tmp_time;
for (day = 1; day <= num_days; day++) {
tmp_time = time_add_day_with_zone (tmp_time, 1,
- e_cal_view_get_timezone (E_CAL_VIEW (week_view)));
+ e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)));
week_view->day_starts[day] = tmp_time;
}
}
@@ -1598,7 +1598,7 @@ e_week_view_set_weeks_shown (EWeekView *week_view,
if (g_date_valid (&week_view->first_day_shown))
e_week_view_set_first_day_shown (week_view, &week_view->first_day_shown);
- e_week_view_update_query ((ECalView *) week_view);
+ e_week_view_update_query ((ECalendarView *) week_view);
}
}
@@ -1959,7 +1959,7 @@ e_week_view_on_button_press (GtkWidget *widget,
return FALSE;
if (event->button == 1 && event->type == GDK_2BUTTON_PRESS) {
- e_cal_view_new_appointment (E_CAL_VIEW (week_view));
+ e_calendar_view_new_appointment (E_CALENDAR_VIEW (week_view));
return TRUE;
}
@@ -2016,7 +2016,7 @@ e_week_view_on_button_release (GtkWidget *widget,
start = week_view->day_starts[week_view->selection_start_day];
end = week_view->day_starts[week_view->selection_end_day + 1];
- gnome_calendar_set_selected_time_range (e_cal_view_get_calendar (E_CAL_VIEW (week_view)),
+ gnome_calendar_set_selected_time_range (e_calendar_view_get_calendar (E_CALENDAR_VIEW (week_view)),
start, end);
}
@@ -2225,7 +2225,7 @@ e_week_view_free_events (EWeekView *week_view)
/* This adds one event to the view, adding it to the appropriate array. */
static gboolean
-e_week_view_add_event (CalComponent *comp,
+e_week_view_add_event (ECalComponent *comp,
time_t start,
time_t end,
gpointer data)
@@ -2251,9 +2251,9 @@ e_week_view_add_event (CalComponent *comp,
g_return_val_if_fail (end > add_event_data->week_view->day_starts[0], TRUE);
start_tt = icaltime_from_timet_with_zone (start, FALSE,
- e_cal_view_get_timezone (E_CAL_VIEW (add_event_data->week_view)));
+ e_calendar_view_get_timezone (E_CALENDAR_VIEW (add_event_data->week_view)));
end_tt = icaltime_from_timet_with_zone (end, FALSE,
- e_cal_view_get_timezone (E_CAL_VIEW (add_event_data->week_view)));
+ e_calendar_view_get_timezone (E_CALENDAR_VIEW (add_event_data->week_view)));
if (add_event_data->comp_data) {
event.comp_data = add_event_data->comp_data;
@@ -2262,9 +2262,9 @@ e_week_view_add_event (CalComponent *comp,
event.comp_data = g_new0 (ECalModelComponent, 1);
event.allocated_comp_data = TRUE;
- event.comp_data->client = e_cal_model_get_default_client (e_cal_view_get_model (E_CAL_VIEW (add_event_data->week_view)));
- cal_component_commit_sequence (comp);
- event.comp_data->icalcomp = icalcomponent_new_clone (cal_component_get_icalcomponent (comp));
+ event.comp_data->client = e_cal_model_get_default_client (e_calendar_view_get_model (E_CALENDAR_VIEW (add_event_data->week_view)));
+ e_cal_component_commit_sequence (comp);
+ event.comp_data->icalcomp = icalcomponent_new_clone (e_cal_component_get_icalcomponent (comp));
}
event.start = start;
event.end = end;
@@ -2280,7 +2280,7 @@ e_week_view_add_event (CalComponent *comp,
if (!cal_comp_util_compare_event_timezones (
comp,
event.comp_data->client,
- e_cal_view_get_timezone (E_CAL_VIEW (add_event_data->week_view))))
+ e_calendar_view_get_timezone (E_CALENDAR_VIEW (add_event_data->week_view))))
event.different_timezone = TRUE;
g_array_append_val (add_event_data->week_view->events, event);
@@ -2419,7 +2419,7 @@ e_week_view_reshape_event_span (EWeekView *week_view,
gint min_text_x, max_text_w, width;
gboolean show_icons = TRUE, use_max_width = FALSE;
gboolean one_day_event;
- CalComponent *comp;
+ ECalComponent *comp;
gdouble text_x, text_y, text_w, text_h;
gchar *text, *end_of_line;
gint line_len, text_width;
@@ -2431,8 +2431,8 @@ e_week_view_reshape_event_span (EWeekView *week_view,
event = &g_array_index (week_view->events, EWeekViewEvent, event_num);
span = &g_array_index (week_view->spans, EWeekViewEventSpan,
event->spans_index + span_num);
- comp = cal_component_new ();
- cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
one_day_event = e_week_view_is_one_day_event (week_view, event_num);
@@ -2471,14 +2471,14 @@ e_week_view_reshape_event_span (EWeekView *week_view,
if (show_icons) {
GSList *categories_list, *elem;
- if (cal_component_has_alarms (comp))
+ if (e_cal_component_has_alarms (comp))
num_icons++;
- if (cal_component_has_recurrences (comp))
+ if (e_cal_component_has_recurrences (comp))
num_icons++;
if (event->different_timezone)
num_icons++;
- cal_component_get_categories_list (comp, &categories_list);
+ e_cal_component_get_categories_list (comp, &categories_list);
for (elem = categories_list; elem; elem = elem->next) {
char *category;
GdkPixmap *pixmap = NULL;
@@ -2489,7 +2489,7 @@ e_week_view_reshape_event_span (EWeekView *week_view,
num_icons++;
}
- cal_component_free_categories_list (categories_list);
+ e_cal_component_free_categories_list (categories_list);
}
/* Create the background canvas item if necessary. */
@@ -2507,9 +2507,9 @@ e_week_view_reshape_event_span (EWeekView *week_view,
/* Create the text item if necessary. */
if (!span->text_item) {
- CalComponentText text;
+ ECalComponentText text;
- cal_component_get_summary (comp, &text);
+ e_cal_component_get_summary (comp, &text);
span->text_item =
gnome_canvas_item_new (GNOME_CANVAS_GROUP (GNOME_CANVAS (week_view->main_canvas)->root),
e_text_get_type (),
@@ -2707,16 +2707,16 @@ e_week_view_on_adjustment_changed (GtkAdjustment *adjustment,
start_tt.month = g_date_month (&date);
start_tt.day = g_date_day (&date);
- lower = icaltime_as_timet_with_zone (start_tt, e_cal_view_get_timezone (E_CAL_VIEW (week_view)));
+ lower = icaltime_as_timet_with_zone (start_tt, e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)));
e_week_view_recalc_day_starts (week_view, lower);
- e_week_view_update_query ((ECalView *) week_view);
+ e_week_view_update_query ((ECalendarView *) week_view);
/* Update the selection, if needed. */
if (week_view->selection_start_day != -1) {
start = week_view->day_starts[week_view->selection_start_day];
end = week_view->day_starts[week_view->selection_end_day + 1];
- gnome_calendar_set_selected_time_range (e_cal_view_get_calendar (E_CAL_VIEW (week_view)),
+ gnome_calendar_set_selected_time_range (e_calendar_view_get_calendar (E_CALENDAR_VIEW (week_view)),
start, end);
}
}
@@ -2853,7 +2853,7 @@ e_week_view_on_text_item_event (GnomeCanvasItem *item,
event = &g_array_index (week_view->events, EWeekViewEvent,
event_num);
- e_cal_view_edit_appointment (E_CAL_VIEW (week_view),
+ e_calendar_view_edit_appointment (E_CALENDAR_VIEW (week_view),
event->comp_data->client,
event->comp_data->icalcomp, FALSE);
@@ -2986,9 +2986,9 @@ e_week_view_on_editing_stopped (EWeekView *week_view,
EWeekViewEvent *event;
EWeekViewEventSpan *span;
gchar *text = NULL;
- CalComponent *comp;
- CalComponentText summary;
- CalClient *client;
+ ECalComponent *comp;
+ ECalComponentText summary;
+ ECal *client;
const char *uid;
gboolean on_server;
@@ -3018,8 +3018,8 @@ e_week_view_on_editing_stopped (EWeekView *week_view,
g_object_get (G_OBJECT (span->text_item), "text", &text, NULL);
g_assert (text != NULL);
- comp = cal_component_new ();
- cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
client = event->comp_data->client;
on_server = cal_comp_is_on_server (comp, client);
@@ -3027,7 +3027,7 @@ e_week_view_on_editing_stopped (EWeekView *week_view,
if (string_is_empty (text) && !on_server) {
const char *uid;
- cal_component_get_uid (comp, &uid);
+ e_cal_component_get_uid (comp, &uid);
e_week_view_foreach_event_with_uid (week_view, uid,
e_week_view_remove_event_cb, NULL);
@@ -3037,26 +3037,26 @@ e_week_view_on_editing_stopped (EWeekView *week_view,
}
/* Only update the summary if necessary. */
- cal_component_get_summary (comp, &summary);
+ e_cal_component_get_summary (comp, &summary);
if (summary.value && !strcmp (text, summary.value)) {
if (!e_week_view_is_one_day_event (week_view, event_num))
e_week_view_reshape_event_span (week_view, event_num,
span_num);
} else if (summary.value || !string_is_empty (text)) {
- icalcomponent *icalcomp = cal_component_get_icalcomponent (comp);
+ icalcomponent *icalcomp = e_cal_component_get_icalcomponent (comp);
summary.value = text;
summary.altrep = NULL;
- cal_component_set_summary (comp, &summary);
+ e_cal_component_set_summary (comp, &summary);
if (!on_server) {
- if (!cal_client_create_object (client, icalcomp, NULL, NULL))
+ if (!e_cal_create_object (client, icalcomp, NULL, NULL))
g_message (G_STRLOC ": Could not create the object!");
} else {
CalObjModType mod = CALOBJ_MOD_ALL;
GtkWindow *toplevel;
- if (cal_component_has_recurrences (comp)) {
+ if (e_cal_component_has_recurrences (comp)) {
if (!recur_component_dialog (client, comp, &mod, NULL)) {
goto out;
}
@@ -3064,10 +3064,10 @@ e_week_view_on_editing_stopped (EWeekView *week_view,
/* FIXME When sending here, what exactly should we send? */
toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (week_view)));
- if (cal_client_modify_object (client, icalcomp, mod, NULL)) {
+ if (e_cal_modify_object (client, icalcomp, mod, NULL)) {
if (itip_organizer_is_user (comp, client)
&& send_component_dialog (toplevel, client, comp, FALSE))
- itip_send_comp (CAL_COMPONENT_METHOD_REQUEST, comp,
+ itip_send_comp (E_CAL_COMPONENT_METHOD_REQUEST, comp,
client, NULL);
}
}
@@ -3178,11 +3178,11 @@ static gboolean
e_week_view_do_key_press (GtkWidget *widget, GdkEventKey *event)
{
EWeekView *week_view;
- CalComponent *comp;
+ ECalComponent *comp;
icalcomponent *icalcomp;
gint event_num;
gchar *initial_text;
- CalComponentDateTime date;
+ ECalComponentDateTime date;
struct icaltimetype itt;
time_t dtstart, dtend;
const char *uid;
@@ -3196,7 +3196,7 @@ e_week_view_do_key_press (GtkWidget *widget, GdkEventKey *event)
/* The Escape key aborts a resize operation. */
#if 0
- if (week_view->resize_drag_pos != E_CAL_VIEW_POS_NONE) {
+ if (week_view->resize_drag_pos != E_CALENDAR_VIEW_POS_NONE) {
if (event->keyval == GDK_Escape) {
e_week_view_abort_resize (week_view, event->time);
}
@@ -3238,13 +3238,13 @@ e_week_view_do_key_press (GtkWidget *widget, GdkEventKey *event)
initial_text = e_utf8_from_gtk_event_key (widget, event->keyval, event->string);
/* Add a new event covering the selected range. */
- icalcomp = e_cal_model_create_component_with_defaults (e_cal_view_get_model (E_CAL_VIEW (week_view)));
+ icalcomp = e_cal_model_create_component_with_defaults (e_calendar_view_get_model (E_CALENDAR_VIEW (week_view)));
if (!icalcomp)
return FALSE;
uid = icalcomponent_get_uid (icalcomp);
- comp = cal_component_new ();
- cal_component_set_icalcomponent (comp, icalcomp);
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (comp, icalcomp);
dtstart = week_view->day_starts[week_view->selection_start_day];
dtend = week_view->day_starts[week_view->selection_end_day + 1];
@@ -3253,18 +3253,18 @@ e_week_view_do_key_press (GtkWidget *widget, GdkEventKey *event)
date.tzid = NULL;
/* We use DATE values now, so we don't need the timezone. */
- /*date.tzid = icaltimezone_get_tzid (e_cal_view_get_timezone (E_CAL_VIEW (week_view)));*/
+ /*date.tzid = icaltimezone_get_tzid (e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)));*/
*date.value = icaltime_from_timet_with_zone (dtstart, TRUE,
- e_cal_view_get_timezone (E_CAL_VIEW (week_view)));
- cal_component_set_dtstart (comp, &date);
+ e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)));
+ e_cal_component_set_dtstart (comp, &date);
*date.value = icaltime_from_timet_with_zone (dtend, TRUE,
- e_cal_view_get_timezone (E_CAL_VIEW (week_view)));
- cal_component_set_dtend (comp, &date);
+ e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)));
+ e_cal_component_set_dtend (comp, &date);
- cal_component_set_categories (
- comp, e_cal_view_get_default_category (E_CAL_VIEW (week_view)));
+ e_cal_component_set_categories (
+ comp, e_calendar_view_get_default_category (E_CALENDAR_VIEW (week_view)));
/* We add the event locally and start editing it. We don't send it
to the server until the user finishes editing it. */
@@ -3483,7 +3483,7 @@ e_week_view_show_popup_menu (EWeekView *week_view,
week_view->popup_event_num = event_num;
- popup = e_cal_view_create_popup_menu (E_CAL_VIEW (week_view));
+ popup = e_calendar_view_create_popup_menu (E_CALENDAR_VIEW (week_view));
e_popup_menu (popup, (GdkEvent *) bevent);
}
@@ -3504,7 +3504,7 @@ e_week_view_jump_to_button_item (EWeekView *week_view, GnomeCanvasItem *item)
for (day = 0; day < E_WEEK_VIEW_MAX_WEEKS * 7; ++day) {
if (item == week_view->jump_buttons[day]) {
- calendar = e_cal_view_get_calendar (E_CAL_VIEW (week_view));
+ calendar = e_calendar_view_get_calendar (E_CALENDAR_VIEW (week_view));
if (calendar)
gnome_calendar_dayjump
(calendar,
@@ -3585,7 +3585,7 @@ e_week_view_convert_time_to_display (EWeekView *week_view,
/* Calculate the actual hour number to display. For 12-hour
format we convert 0-23 to 12-11am/12-11pm. */
*display_hour = hour;
- if (e_cal_view_get_use_24_hour_format (E_CAL_VIEW (week_view))) {
+ if (e_calendar_view_get_use_24_hour_format (E_CALENDAR_VIEW (week_view))) {
*suffix = "";
*suffix_width = 0;
} else {
@@ -3617,7 +3617,7 @@ e_week_view_get_time_string_width (EWeekView *week_view)
time_width = week_view->digit_width * 4
+ week_view->colon_width;
- if (!e_cal_view_get_use_24_hour_format (E_CAL_VIEW (week_view)))
+ if (!e_calendar_view_get_use_24_hour_format (E_CALENDAR_VIEW (week_view)))
time_width += MAX (week_view->am_string_width,
week_view->pm_string_width);
diff --git a/calendar/gui/e-week-view.h b/calendar/gui/e-week-view.h
index f36760d76a..aca3f2bc2a 100644
--- a/calendar/gui/e-week-view.h
+++ b/calendar/gui/e-week-view.h
@@ -143,7 +143,7 @@ struct _EWeekViewEventSpan {
typedef struct _EWeekViewEvent EWeekViewEvent;
struct _EWeekViewEvent {
- E_CAL_VIEW_EVENT_FIELDS
+ E_CALENDAR_VIEW_EVENT_FIELDS
gint spans_index;
guint8 num_spans;
};
@@ -159,7 +159,7 @@ typedef struct _EWeekViewClass EWeekViewClass;
struct _EWeekView
{
- ECalView cal_view;
+ ECalendarView cal_view;
/* The top canvas where the dates are shown. */
GtkWidget *titles_canvas;
@@ -175,7 +175,7 @@ struct _EWeekView
GtkWidget *vscrollbar;
/* The query object */
- CalQuery *query;
+ ECalView *query;
/* The array of EWeekViewEvent elements. */
GArray *events;
@@ -332,7 +332,7 @@ struct _EWeekView
struct _EWeekViewClass
{
- ECalViewClass parent_class;
+ ECalendarViewClass parent_class;
};
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index 359de9c209..a14678f3e3 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -37,7 +37,7 @@
#include <libgnomeui/gnome-dialog-util.h>
#include <bonobo/bonobo-exception.h>
#include "e-util/e-url.h"
-#include <cal-util/timeutil.h>
+#include <libecal/e-cal-time-util.h>
#include "widgets/menus/gal-view-menus.h"
#include "e-comp-editor-registry.h"
#include "dialogs/delete-error.h"
@@ -85,7 +85,7 @@ struct _GnomeCalendarPrivate {
*/
/* The calendar client object we monitor */
- CalClient *task_pad_client;
+ ECal *task_pad_client;
/* Set of categories from the tasks client */
GPtrArray *tasks_categories;
@@ -123,12 +123,12 @@ struct _GnomeCalendarPrivate {
/* Calendar query for the date navigator */
GList *dn_queries; /* list of CalQueries */
char *sexp;
- guint query_timeout;
+ guint e_cal_view_timeout;
/* This is the view currently shown. We use it to keep track of the
positions of the panes. range_selected is TRUE if a range of dates
was selected in the date navigator to show the view. */
- ECalView *views[GNOME_CAL_LAST_VIEW];
+ ECalendarView *views[GNOME_CAL_LAST_VIEW];
GObject *configs[GNOME_CAL_LAST_VIEW];
GnomeCalendarViewType current_view_type;
GList *notifications;
@@ -370,7 +370,7 @@ gnome_calendar_class_init (GnomeCalendarClass *class)
/* Callback used when the calendar query reports of an updated object */
static void
-dn_query_objects_added_cb (CalQuery *query, GList *objects, gpointer data)
+dn_e_cal_view_objects_added_cb (ECalView *query, GList *objects, gpointer data)
{
GnomeCalendar *gcal;
GnomeCalendarPrivate *priv;
@@ -380,23 +380,23 @@ dn_query_objects_added_cb (CalQuery *query, GList *objects, gpointer data)
priv = gcal->priv;
for (l = objects; l; l = l->next) {
- CalComponent *comp = NULL;
+ ECalComponent *comp = NULL;
- comp = cal_component_new ();
- if (!cal_component_set_icalcomponent (comp, icalcomponent_new_clone (l->data))) {
+ comp = e_cal_component_new ();
+ if (!e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (l->data))) {
g_object_unref (comp);
continue;
}
- tag_calendar_by_comp (priv->date_navigator, comp, cal_query_get_client (query), NULL,
+ tag_calendar_by_comp (priv->date_navigator, comp, e_cal_view_get_client (query), NULL,
FALSE, TRUE);
g_object_unref (comp);
}
}
static void
-dn_query_objects_modified_cb (CalQuery *query, GList *objects, gpointer data)
+dn_e_cal_view_objects_modified_cb (ECalView *query, GList *objects, gpointer data)
{
GnomeCalendar *gcal;
GnomeCalendarPrivate *priv;
@@ -413,7 +413,7 @@ dn_query_objects_modified_cb (CalQuery *query, GList *objects, gpointer data)
/* Callback used when the calendar query reports of a removed object */
static void
-dn_query_objects_removed_cb (CalQuery *query, GList *uids, gpointer data)
+dn_e_cal_view_objects_removed_cb (ECalView *query, GList *uids, gpointer data)
{
GnomeCalendar *gcal;
@@ -425,7 +425,7 @@ dn_query_objects_removed_cb (CalQuery *query, GList *uids, gpointer data)
/* Callback used when the calendar query is done */
static void
-dn_query_done_cb (CalQuery *query, ECalendarStatus status, gpointer data)
+dn_e_cal_view_done_cb (ECalView *query, ECalendarStatus status, gpointer data)
{
GnomeCalendar *gcal;
@@ -544,7 +544,7 @@ get_date_navigator_range (GnomeCalendar *gcal, time_t *start_time, time_t *end_t
/* Adjusts a given query sexp with the time range of the date navigator */
static char *
-adjust_query_sexp (GnomeCalendar *gcal, const char *sexp)
+adjust_e_cal_view_sexp (GnomeCalendar *gcal, const char *sexp)
{
time_t start_time, end_time;
char *start, *end;
@@ -576,7 +576,7 @@ static void
update_query (GnomeCalendar *gcal)
{
GnomeCalendarPrivate *priv;
- CalQuery *old_query;
+ ECalView *old_query;
char *real_sexp;
GList *l;
@@ -584,7 +584,7 @@ update_query (GnomeCalendar *gcal)
e_calendar_item_clear_marks (priv->date_navigator->calitem);
- e_cal_view_set_status_message (E_CAL_VIEW (priv->week_view), _("Searching"));
+ e_calendar_view_set_status_message (E_CALENDAR_VIEW (priv->week_view), _("Searching"));
/* free the previous queries */
for (l = priv->dn_queries; l != NULL; l = l->next) {
@@ -602,46 +602,46 @@ update_query (GnomeCalendar *gcal)
g_assert (priv->sexp != NULL);
- real_sexp = adjust_query_sexp (gcal, priv->sexp);
+ real_sexp = adjust_e_cal_view_sexp (gcal, priv->sexp);
if (!real_sexp) {
- e_cal_view_set_status_message (E_CAL_VIEW (priv->week_view), NULL);
+ e_calendar_view_set_status_message (E_CALENDAR_VIEW (priv->week_view), NULL);
return; /* No time range is set, so don't start a query */
}
/* create queries for each loaded client */
for (l = priv->clients_list; l != NULL; l = l->next) {
- if (!cal_client_get_query ((CalClient *) l->data, real_sexp, &old_query, NULL)) {
+ if (!e_cal_get_query ((ECal *) l->data, real_sexp, &old_query, NULL)) {
g_warning (G_STRLOC ": Could not create the query");
continue;
}
g_signal_connect (old_query, "objects_added",
- G_CALLBACK (dn_query_objects_added_cb), gcal);
+ G_CALLBACK (dn_e_cal_view_objects_added_cb), gcal);
g_signal_connect (old_query, "objects_modified",
- G_CALLBACK (dn_query_objects_modified_cb), gcal);
+ G_CALLBACK (dn_e_cal_view_objects_modified_cb), gcal);
g_signal_connect (old_query, "objects_removed",
- G_CALLBACK (dn_query_objects_removed_cb), gcal);
- g_signal_connect (old_query, "query_done",
- G_CALLBACK (dn_query_done_cb), gcal);
+ G_CALLBACK (dn_e_cal_view_objects_removed_cb), gcal);
+ g_signal_connect (old_query, "view_done",
+ G_CALLBACK (dn_e_cal_view_done_cb), gcal);
priv->dn_queries = g_list_append (priv->dn_queries, old_query);
- cal_query_start (old_query);
+ e_cal_view_start (old_query);
}
g_free (real_sexp);
- e_cal_view_set_status_message (E_CAL_VIEW (priv->week_view), NULL);
+ e_calendar_view_set_status_message (E_CALENDAR_VIEW (priv->week_view), NULL);
}
static void
-adjust_query_for_view (ECalView *cal_view, const char *sexp)
+adjust_e_cal_view_for_view (ECalendarView *cal_view, const char *sexp)
{
char *real_sexp, *start, *end;
time_t ttstart, ttend;
- e_cal_view_get_visible_time_range (cal_view, &ttstart, &ttend);
+ e_calendar_view_get_visible_time_range (cal_view, &ttstart, &ttend);
start = isodate_from_time_t (ttstart);
end = isodate_from_time_t (ttend);
@@ -652,7 +652,7 @@ adjust_query_for_view (ECalView *cal_view, const char *sexp)
" %s)",
start, end, sexp);
- e_cal_model_set_query (e_cal_view_get_model (cal_view), real_sexp);
+ e_cal_model_set_query (e_calendar_view_get_model (cal_view), real_sexp);
g_free (start);
g_free (end);
@@ -690,7 +690,7 @@ gnome_calendar_set_query (GnomeCalendar *gcal, const char *sexp)
/* Set the query on the views */
for (i = 0; i < GNOME_CAL_LAST_VIEW; i++)
- adjust_query_for_view (E_CAL_VIEW (priv->views[i]), sexp);
+ adjust_e_cal_view_for_view (E_CALENDAR_VIEW (priv->views[i]), sexp);
/* Set the query on the task pad */
model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->todo));
@@ -740,7 +740,7 @@ search_bar_category_changed_cb (CalSearchBar *cal_search, const char *category,
priv = gcal->priv;
for (i = 0; i < GNOME_CAL_LAST_VIEW; i++) {
- e_cal_view_set_default_category (E_CAL_VIEW (priv->views[i]),
+ e_calendar_view_set_default_category (E_CALENDAR_VIEW (priv->views[i]),
category);
}
@@ -851,17 +851,17 @@ set_timezone (GnomeCalendar *calendar)
priv->zone = icaltimezone_get_utc_timezone ();
for (l = priv->clients_list; l != NULL; l = l->next) {
- CalClient *client = l->data;
+ ECal *client = l->data;
- if (cal_client_get_load_state (client) == CAL_CLIENT_LOAD_LOADED)
+ if (e_cal_get_load_state (client) == E_CAL_LOAD_LOADED)
/* FIXME Error checking */
- cal_client_set_default_timezone (client, priv->zone, NULL);
+ e_cal_set_default_timezone (client, priv->zone, NULL);
}
if (priv->task_pad_client
- && cal_client_get_load_state (priv->task_pad_client) == CAL_CLIENT_LOAD_LOADED) {
+ && e_cal_get_load_state (priv->task_pad_client) == E_CAL_LOAD_LOADED) {
/* FIXME Error Checking */
- cal_client_set_default_timezone (priv->task_pad_client,
+ e_cal_set_default_timezone (priv->task_pad_client,
priv->zone, NULL);
}
}
@@ -991,13 +991,13 @@ setup_widgets (GnomeCalendar *gcal)
e_day_view_set_work_week_view (E_DAY_VIEW (priv->work_week_view),
TRUE);
e_day_view_set_days_shown (E_DAY_VIEW (priv->work_week_view), 5);
- e_cal_view_set_calendar (E_CAL_VIEW (priv->work_week_view), gcal);
+ e_calendar_view_set_calendar (E_CALENDAR_VIEW (priv->work_week_view), gcal);
connect_day_view_focus (gcal, E_DAY_VIEW (priv->work_week_view));
/* The Week View. */
priv->week_view = e_week_view_new ();
- e_cal_view_set_calendar (E_CAL_VIEW (priv->week_view), gcal);
+ e_calendar_view_set_calendar (E_CALENDAR_VIEW (priv->week_view), gcal);
g_signal_connect (priv->week_view, "selection_changed",
G_CALLBACK (view_selection_changed_cb), gcal);
@@ -1005,7 +1005,7 @@ setup_widgets (GnomeCalendar *gcal)
/* The Month View. */
priv->month_view = e_week_view_new ();
- e_cal_view_set_calendar (E_CAL_VIEW (priv->month_view), gcal);
+ e_calendar_view_set_calendar (E_CALENDAR_VIEW (priv->month_view), gcal);
e_week_view_set_multi_week_view (E_WEEK_VIEW (priv->month_view), TRUE);
g_signal_connect (priv->month_view, "selection_changed",
G_CALLBACK (view_selection_changed_cb), gcal);
@@ -1017,19 +1017,19 @@ setup_widgets (GnomeCalendar *gcal)
priv->list_view = e_cal_list_view_new (filename);
g_free (filename);
- e_cal_view_set_calendar (E_CAL_VIEW (priv->list_view), gcal);
+ e_calendar_view_set_calendar (E_CALENDAR_VIEW (priv->list_view), gcal);
connect_list_view_focus (gcal, E_CAL_LIST_VIEW (priv->list_view));
- priv->views[GNOME_CAL_DAY_VIEW] = E_CAL_VIEW (priv->day_view);
+ priv->views[GNOME_CAL_DAY_VIEW] = E_CALENDAR_VIEW (priv->day_view);
priv->configs[GNOME_CAL_DAY_VIEW] = e_day_view_config_new (E_DAY_VIEW (priv->views[GNOME_CAL_DAY_VIEW]));
- priv->views[GNOME_CAL_WORK_WEEK_VIEW] = E_CAL_VIEW (priv->work_week_view);
+ priv->views[GNOME_CAL_WORK_WEEK_VIEW] = E_CALENDAR_VIEW (priv->work_week_view);
priv->configs[GNOME_CAL_WORK_WEEK_VIEW] = e_day_view_config_new (E_DAY_VIEW (priv->views[GNOME_CAL_WORK_WEEK_VIEW]));
- priv->views[GNOME_CAL_WEEK_VIEW] = E_CAL_VIEW (priv->week_view);
+ priv->views[GNOME_CAL_WEEK_VIEW] = E_CALENDAR_VIEW (priv->week_view);
priv->configs[GNOME_CAL_WEEK_VIEW] = e_week_view_config_new (E_WEEK_VIEW (priv->views[GNOME_CAL_WEEK_VIEW]));
- priv->views[GNOME_CAL_MONTH_VIEW] = E_CAL_VIEW (priv->month_view);
+ priv->views[GNOME_CAL_MONTH_VIEW] = E_CALENDAR_VIEW (priv->month_view);
priv->configs[GNOME_CAL_MONTH_VIEW] = e_week_view_config_new (E_WEEK_VIEW (priv->views[GNOME_CAL_MONTH_VIEW]));
- priv->views[GNOME_CAL_LIST_VIEW] = E_CAL_VIEW (priv->list_view);
+ priv->views[GNOME_CAL_LIST_VIEW] = E_CALENDAR_VIEW (priv->list_view);
priv->configs[GNOME_CAL_MONTH_VIEW] = e_cal_list_view_config_new (E_CAL_LIST_VIEW (priv->views[GNOME_CAL_LIST_VIEW]));
priv->configs[GNOME_CAL_LIST_VIEW] = NULL;
@@ -1142,9 +1142,9 @@ gnome_calendar_destroy (GtkObject *object)
if (priv->dn_queries) {
for (l = priv->dn_queries; l != NULL; l = l->next) {
- g_signal_handlers_disconnect_matched ((CalQuery *) l->data, G_SIGNAL_MATCH_DATA,
+ g_signal_handlers_disconnect_matched ((ECalView *) l->data, G_SIGNAL_MATCH_DATA,
0, 0, NULL, NULL, gcal);
- g_object_unref ((CalQuery *) l->data);
+ g_object_unref ((ECalView *) l->data);
}
g_list_free (priv->dn_queries);
@@ -1156,9 +1156,9 @@ gnome_calendar_destroy (GtkObject *object)
priv->sexp = NULL;
}
- if (priv->query_timeout) {
- g_source_remove (priv->query_timeout);
- priv->query_timeout = 0;
+ if (priv->e_cal_view_timeout) {
+ g_source_remove (priv->e_cal_view_timeout);
+ priv->e_cal_view_timeout = 0;
}
if (priv->task_pad_client) {
@@ -1313,7 +1313,7 @@ gnome_calendar_update_view_times (GnomeCalendar *gcal)
priv = gcal->priv;
- e_cal_view_set_selected_time_range (E_CAL_VIEW (gnome_calendar_get_current_view_widget (gcal)),
+ e_calendar_view_set_selected_time_range (E_CALENDAR_VIEW (gnome_calendar_get_current_view_widget (gcal)),
priv->selection_start_time,
priv->selection_end_time);
}
@@ -1638,7 +1638,7 @@ gnome_calendar_setup_view_menus (GnomeCalendar *gcal, BonoboUIComponent *uic)
}
priv->view_instance = gal_view_instance_new (collection,
- cal_client_get_uri (gnome_calendar_get_default_client (gcal)));
+ e_cal_get_uri (gnome_calendar_get_default_client (gcal)));
priv->view_menus = gal_view_menus_new (priv->view_instance);
gal_view_menus_set_show_define_views (priv->view_menus, FALSE);
@@ -1771,7 +1771,7 @@ permission_error (GnomeCalendar *gcal, const char *uri)
/* Callback from the calendar client when a calendar is loaded */
static gboolean
-update_query_timeout (gpointer data)
+update_e_cal_view_timeout (gpointer data)
{
GnomeCalendar *gcal = data;
GnomeCalendarPrivate *priv;
@@ -1780,13 +1780,13 @@ update_query_timeout (gpointer data)
priv = gcal->priv;
update_query (gcal);
- priv->query_timeout = 0;
+ priv->e_cal_view_timeout = 0;
return FALSE;
}
static void
-client_cal_opened_cb (CalClient *client, CalClientOpenStatus status, gpointer data)
+client_cal_opened_cb (ECal *client, ECalOpenStatus status, gpointer data)
{
GnomeCalendar *gcal;
GnomeCalendarPrivate *priv;
@@ -1797,15 +1797,15 @@ client_cal_opened_cb (CalClient *client, CalClientOpenStatus status, gpointer da
priv = gcal->priv;
switch (status) {
- case CAL_CLIENT_OPEN_SUCCESS:
+ case E_CAL_OPEN_SUCCESS:
/* Set the client's default timezone, if we have one. */
if (priv->zone) {
/* FIXME Error checking */
- cal_client_set_default_timezone (client, priv->zone, NULL);
+ e_cal_set_default_timezone (client, priv->zone, NULL);
}
/* add the alarms for this client */
- uristr = get_uri_without_password (cal_client_get_uri (client));
+ uristr = get_uri_without_password (e_cal_get_uri (client));
msg = g_strdup_printf (_("Adding alarms for %s"), uristr);
g_free (uristr);
if (client == priv->task_pad_client) {
@@ -1814,31 +1814,31 @@ client_cal_opened_cb (CalClient *client, CalClientOpenStatus status, gpointer da
priv->task_pad_client);
}
else {
- e_cal_view_set_status_message (E_CAL_VIEW (priv->week_view), msg);
- e_cal_model_add_client (e_cal_view_get_model (E_CAL_VIEW (priv->week_view)), client);
+ e_calendar_view_set_status_message (E_CALENDAR_VIEW (priv->week_view), msg);
+ e_cal_model_add_client (e_calendar_view_get_model (E_CALENDAR_VIEW (priv->week_view)), client);
- priv->query_timeout = g_timeout_add (100, update_query_timeout, gcal);
+ priv->e_cal_view_timeout = g_timeout_add (100, update_e_cal_view_timeout, gcal);
}
g_free (msg);
- add_alarms (cal_client_get_uri (client));
+ add_alarms (e_cal_get_uri (client));
break;
- case CAL_CLIENT_OPEN_ERROR:
- open_error (gcal, cal_client_get_uri (client));
+ case E_CAL_OPEN_ERROR:
+ open_error (gcal, e_cal_get_uri (client));
break;
- case CAL_CLIENT_OPEN_NOT_FOUND:
+ case E_CAL_OPEN_NOT_FOUND:
/* bullshit; we did not specify only_if_exists */
g_assert_not_reached ();
return;
- case CAL_CLIENT_OPEN_METHOD_NOT_SUPPORTED:
- method_error (gcal, cal_client_get_uri (client));
+ case E_CAL_OPEN_METHOD_NOT_SUPPORTED:
+ method_error (gcal, e_cal_get_uri (client));
break;
- case CAL_CLIENT_OPEN_PERMISSION_DENIED :
- permission_error (gcal, cal_client_get_uri (client));
+ case E_CAL_OPEN_PERMISSION_DENIED :
+ permission_error (gcal, e_cal_get_uri (client));
break;
default:
@@ -1849,7 +1849,7 @@ client_cal_opened_cb (CalClient *client, CalClientOpenStatus status, gpointer da
if (client == priv->task_pad_client)
e_calendar_table_set_status_message (E_CALENDAR_TABLE (priv->todo), NULL);
else
- e_cal_view_set_status_message (E_CAL_VIEW (priv->week_view), NULL);
+ e_calendar_view_set_status_message (E_CALENDAR_VIEW (priv->week_view), NULL);
}
/* Duplicates an array of categories */
@@ -1943,7 +1943,7 @@ merge_categories (GPtrArray *a, GPtrArray *b)
* have to merge the categories of the calendar and tasks clients.
*/
static void
-client_categories_changed_cb (CalClient *client, GPtrArray *categories, gpointer data)
+client_categories_changed_cb (ECal *client, GPtrArray *categories, gpointer data)
{
GnomeCalendar *gcal;
GnomeCalendarPrivate *priv;
@@ -1967,7 +1967,7 @@ client_categories_changed_cb (CalClient *client, GPtrArray *categories, gpointer
/* Callback when we get an error message from the backend */
static void
-backend_error_cb (CalClient *client, const char *message, gpointer data)
+backend_error_cb (ECal *client, const char *message, gpointer data)
{
GnomeCalendar *gcal;
GnomeCalendarPrivate *priv;
@@ -1977,7 +1977,7 @@ backend_error_cb (CalClient *client, const char *message, gpointer data)
gcal = GNOME_CALENDAR (data);
priv = gcal->priv;
- uristr = get_uri_without_password (cal_client_get_uri (client));
+ uristr = get_uri_without_password (e_cal_get_uri (client));
errmsg = g_strdup_printf (_("Error on %s:\n %s"), uristr, message);
gnome_error_dialog_parented (errmsg, GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gcal))));
g_free (errmsg);
@@ -1986,7 +1986,7 @@ backend_error_cb (CalClient *client, const char *message, gpointer data)
/* Callback when the backend dies */
static void
-backend_died_cb (CalClient *client, gpointer data)
+backend_died_cb (ECal *client, gpointer data)
{
GnomeCalendar *gcal;
GnomeCalendarPrivate *priv;
@@ -1997,7 +1997,7 @@ backend_died_cb (CalClient *client, gpointer data)
priv = gcal->priv;
/* FIXME This doesn't remove the calendar from the list or anything */
- uristr = get_uri_without_password (cal_client_get_uri (client));
+ uristr = get_uri_without_password (e_cal_get_uri (client));
if (client == priv->task_pad_client) {
message = g_strdup_printf (_("The task backend for\n%s\n has crashed. "
"You will have to restart Evolution in order "
@@ -2013,7 +2013,7 @@ backend_died_cb (CalClient *client, gpointer data)
uristr);
for (i = 0; i < GNOME_CAL_LAST_VIEW; i++)
- e_cal_view_set_status_message (priv->views[i], NULL);
+ e_calendar_view_set_status_message (priv->views[i], NULL);
}
gnome_error_dialog_parented (message, GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gcal))));
@@ -2035,7 +2035,7 @@ gnome_calendar_construct (GnomeCalendar *gcal)
/*
* TaskPad Folder Client.
*/
- priv->task_pad_client = cal_client_new ("", CALOBJ_TYPE_TODO); /* FIXME: use default tasks */
+ priv->task_pad_client = e_cal_new ("", CALOBJ_TYPE_TODO); /* FIXME: use default tasks */
if (!priv->task_pad_client)
return NULL;
@@ -2102,22 +2102,22 @@ gnome_calendar_get_calendar_model (GnomeCalendar *gcal)
priv = gcal->priv;
- return e_cal_view_get_model (priv->views[priv->current_view_type]);
+ return e_calendar_view_get_model (priv->views[priv->current_view_type]);
}
/**
* gnome_calendar_get_default_client
*/
-CalClient *
+ECal *
gnome_calendar_get_default_client (GnomeCalendar *gcal)
{
g_return_val_if_fail (GNOME_IS_CALENDAR (gcal), NULL);
- return e_cal_model_get_default_client (e_cal_view_get_model (E_CAL_VIEW (gcal->priv->week_view)));
+ return e_cal_model_get_default_client (e_calendar_view_get_model (E_CALENDAR_VIEW (gcal->priv->week_view)));
}
/**
- * gnome_calendar_get_task_pad_cal_client:
+ * gnome_calendar_get_task_pad_e_cal:
* @gcal: A calendar view.
*
* Queries the calendar client interface object that a calendar view is using
@@ -2125,8 +2125,8 @@ gnome_calendar_get_default_client (GnomeCalendar *gcal)
*
* Return value: A calendar client interface object.
**/
-CalClient *
-gnome_calendar_get_task_pad_cal_client (GnomeCalendar *gcal)
+ECal *
+gnome_calendar_get_task_pad_e_cal (GnomeCalendar *gcal)
{
GnomeCalendarPrivate *priv;
@@ -2197,7 +2197,7 @@ gboolean
gnome_calendar_add_event_uri (GnomeCalendar *gcal, const char *str_uri)
{
GnomeCalendarPrivate *priv;
- CalClient *client;
+ ECal *client;
int i;
g_return_val_if_fail (gcal != NULL, FALSE);
@@ -2210,7 +2210,7 @@ gnome_calendar_add_event_uri (GnomeCalendar *gcal, const char *str_uri)
if (client)
return TRUE;
- client = cal_client_new (str_uri, CALOBJ_TYPE_EVENT);
+ client = e_cal_new (str_uri, CALOBJ_TYPE_EVENT);
g_hash_table_insert (priv->clients, g_strdup (str_uri), client);
priv->clients_list = g_list_prepend (priv->clients_list, client);
@@ -2218,7 +2218,7 @@ gnome_calendar_add_event_uri (GnomeCalendar *gcal, const char *str_uri)
g_signal_connect (G_OBJECT (client), "categories_changed", G_CALLBACK (client_categories_changed_cb), gcal);
g_signal_connect (G_OBJECT (client), "backend_died", G_CALLBACK (backend_died_cb), gcal);
- if (!cal_client_open (client, FALSE, NULL)) {
+ if (!e_cal_open (client, FALSE, NULL)) {
g_hash_table_remove (priv->clients, str_uri);
priv->clients_list = g_list_prepend (priv->clients_list, client);
g_signal_handlers_disconnect_matched (client, G_SIGNAL_MATCH_DATA,
@@ -2230,7 +2230,7 @@ gnome_calendar_add_event_uri (GnomeCalendar *gcal, const char *str_uri)
for (i = 0; i < GNOME_CAL_LAST_VIEW; i++) {
ECalModel *model;
- model = e_cal_view_get_model (priv->views[i]);
+ model = e_calendar_view_get_model (priv->views[i]);
e_cal_model_add_client (model, client);
}
@@ -2254,7 +2254,7 @@ gboolean
gnome_calendar_remove_event_uri (GnomeCalendar *gcal, const char *str_uri)
{
GnomeCalendarPrivate *priv;
- CalClient *client;
+ ECal *client;
int i;
g_return_val_if_fail (GNOME_IS_CALENDAR (gcal), FALSE);
@@ -2274,7 +2274,7 @@ gnome_calendar_remove_event_uri (GnomeCalendar *gcal, const char *str_uri)
for (i = 0; i < GNOME_CAL_LAST_VIEW; i++) {
ECalModel *model;
- model = e_cal_view_get_model (priv->views[i]);
+ model = e_calendar_view_get_model (priv->views[i]);
e_cal_model_remove_client (model, client);
}
@@ -2309,7 +2309,7 @@ gboolean
gnome_calendar_set_default_uri (GnomeCalendar *gcal, const char *uri)
{
GnomeCalendarPrivate *priv;
- CalClient *client;
+ ECal *client;
int i;
g_return_val_if_fail (GNOME_IS_CALENDAR (gcal), FALSE);
@@ -2322,7 +2322,7 @@ gnome_calendar_set_default_uri (GnomeCalendar *gcal, const char *uri)
for (i = 0; i < GNOME_CAL_LAST_VIEW; i++) {
e_cal_model_set_default_client (
- e_cal_view_get_model (E_CAL_VIEW (priv->views[i])),
+ e_calendar_view_get_model (E_CALENDAR_VIEW (priv->views[i])),
client);
}
@@ -2383,7 +2383,7 @@ gnome_calendar_new_task (GnomeCalendar *gcal)
{
GnomeCalendarPrivate *priv;
TaskEditor *tedit;
- CalComponent *comp;
+ ECalComponent *comp;
icalcomponent *icalcomp;
const char *category;
@@ -2394,12 +2394,12 @@ gnome_calendar_new_task (GnomeCalendar *gcal)
tedit = task_editor_new (priv->task_pad_client);
- icalcomp = e_cal_model_create_component_with_defaults (e_cal_view_get_model (E_CAL_VIEW (priv->week_view)));
- comp = cal_component_new ();
- cal_component_set_icalcomponent (comp, icalcomp);
+ icalcomp = e_cal_model_create_component_with_defaults (e_calendar_view_get_model (E_CALENDAR_VIEW (priv->week_view)));
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (comp, icalcomp);
category = cal_search_bar_get_category (CAL_SEARCH_BAR (priv->search_bar));
- cal_component_set_categories (comp, category);
+ e_cal_component_set_categories (comp, category);
comp_editor_edit_comp (COMP_EDITOR (tedit), comp);
g_object_unref (comp);
@@ -2420,7 +2420,7 @@ gnome_calendar_get_current_time_range (GnomeCalendar *gcal,
priv = gcal->priv;
- e_cal_view_get_selected_time_range (E_CAL_VIEW (gnome_calendar_get_current_view_widget (gcal)),
+ e_calendar_view_get_selected_time_range (E_CALENDAR_VIEW (gnome_calendar_get_current_view_widget (gcal)),
start_time, end_time);
}
@@ -2439,7 +2439,7 @@ gnome_calendar_get_visible_time_range (GnomeCalendar *gcal,
priv = gcal->priv;
- retval = e_cal_view_get_visible_time_range (E_CAL_VIEW (gnome_calendar_get_current_view_widget (gcal)),
+ retval = e_calendar_view_get_visible_time_range (E_CALENDAR_VIEW (gnome_calendar_get_current_view_widget (gcal)),
start_time, end_time);
return retval;
@@ -2698,7 +2698,7 @@ gnome_calendar_cut_clipboard (GnomeCalendar *gcal)
location = get_focus_location (gcal);
if (location == FOCUS_CALENDAR) {
- e_cal_view_cut_clipboard (E_CAL_VIEW (gnome_calendar_get_current_view_widget (gcal)));
+ e_calendar_view_cut_clipboard (E_CALENDAR_VIEW (gnome_calendar_get_current_view_widget (gcal)));
} else if (location == FOCUS_TASKPAD)
e_calendar_table_cut_clipboard (E_CALENDAR_TABLE (priv->todo));
else
@@ -2716,7 +2716,7 @@ gnome_calendar_copy_clipboard (GnomeCalendar *gcal)
location = get_focus_location (gcal);
if (location == FOCUS_CALENDAR) {
- e_cal_view_copy_clipboard (E_CAL_VIEW (gnome_calendar_get_current_view_widget (gcal)));
+ e_calendar_view_copy_clipboard (E_CALENDAR_VIEW (gnome_calendar_get_current_view_widget (gcal)));
} else if (location == FOCUS_TASKPAD)
e_calendar_table_copy_clipboard (E_CALENDAR_TABLE (priv->todo));
else
@@ -2734,7 +2734,7 @@ gnome_calendar_paste_clipboard (GnomeCalendar *gcal)
location = get_focus_location (gcal);
if (location == FOCUS_CALENDAR) {
- e_cal_view_paste_clipboard (E_CAL_VIEW (gnome_calendar_get_current_view_widget (gcal)));
+ e_calendar_view_paste_clipboard (E_CALENDAR_VIEW (gnome_calendar_get_current_view_widget (gcal)));
} else if (location == FOCUS_TASKPAD)
e_calendar_table_paste_clipboard (E_CALENDAR_TABLE (priv->todo));
else
@@ -2841,7 +2841,7 @@ gnome_calendar_delete_selection (GnomeCalendar *gcal)
if (location == FOCUS_CALENDAR) {
view = gnome_calendar_get_current_view_widget (gcal);
- e_cal_view_delete_selected_events (E_CAL_VIEW (view));
+ e_calendar_view_delete_selected_events (E_CALENDAR_VIEW (view));
} else if (location == FOCUS_TASKPAD)
e_calendar_table_delete_selected (E_CALENDAR_TABLE (priv->todo));
else
@@ -2864,12 +2864,12 @@ gnome_calendar_delete_selected_occurrence (GnomeCalendar *gcal)
if (location == FOCUS_CALENDAR) {
view = gnome_calendar_get_current_view_widget (gcal);
- e_cal_view_delete_selected_occurrence (E_CAL_VIEW (view));
+ e_calendar_view_delete_selected_occurrence (E_CALENDAR_VIEW (view));
}
}
static gboolean
-check_instance_cb (CalComponent *comp,
+check_instance_cb (ECalComponent *comp,
time_t instance_start,
time_t instance_end,
gpointer data)
@@ -2899,46 +2899,46 @@ gnome_calendar_purge (GnomeCalendar *gcal, time_t older_than)
" (make-time \"%s\")))",
start, end);
- e_cal_view_set_status_message (E_CAL_VIEW (priv->week_view), _("Purging"));
+ e_calendar_view_set_status_message (E_CALENDAR_VIEW (priv->week_view), _("Purging"));
/* FIXME Confirm expunge */
for (l = priv->clients_list; l != NULL; l = l->next) {
- CalClient *client = l->data;
+ ECal *client = l->data;
GList *objects, *l;
gboolean read_only = TRUE;
- cal_client_is_read_only (client, &read_only, NULL);
+ e_cal_is_read_only (client, &read_only, NULL);
if (!read_only)
continue;
- if (!cal_client_get_object_list (client, sexp, &objects, NULL)) {
+ if (!e_cal_get_object_list (client, sexp, &objects, NULL)) {
g_warning (G_STRLOC ": Could not get the objects");
continue;
}
for (l = objects; l; l = l->next) {
- CalComponent *comp;
+ ECalComponent *comp;
gboolean remove = TRUE;
- comp = cal_component_new ();
- cal_component_set_icalcomponent (comp, icalcomponent_new_clone (l->data));
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (l->data));
- cal_recur_generate_instances (comp, older_than, -1,
- (CalRecurInstanceFn) check_instance_cb,
+ e_cal_recur_generate_instances (comp, older_than, -1,
+ (ECalRecurInstanceFn) check_instance_cb,
&remove,
- (CalRecurResolveTimezoneFn) cal_client_resolve_tzid_cb,
+ (ECalRecurResolveTimezoneFn) e_cal_resolve_tzid_cb,
client, priv->zone);
/* FIXME Better error handling */
if (remove)
- cal_client_remove_object (client, icalcomponent_get_uid (l->data), NULL);
+ e_cal_remove_object (client, icalcomponent_get_uid (l->data), NULL);
g_object_unref (comp);
}
}
- e_cal_view_set_status_message (E_CAL_VIEW (priv->week_view), NULL);
+ e_calendar_view_set_status_message (E_CALENDAR_VIEW (priv->week_view), NULL);
g_free (sexp);
g_free (start);
diff --git a/calendar/gui/gnome-cal.h b/calendar/gui/gnome-cal.h
index 748be4dc0c..0b1aba9b64 100644
--- a/calendar/gui/gnome-cal.h
+++ b/calendar/gui/gnome-cal.h
@@ -30,7 +30,7 @@
#include <bonobo/bonobo-ui-component.h>
#include <gal/widgets/e-popup-menu.h>
#include <widgets/misc/e-calendar.h>
-#include <cal-client/cal-client.h>
+#include <libecal/e-cal.h>
#include "e-calendar-table.h"
@@ -106,8 +106,8 @@ void gnome_calendar_set_ui_component (GnomeCalendar *cal,
ECalendarTable *gnome_calendar_get_task_pad (GnomeCalendar *gcal);
ECalModel *gnome_calendar_get_calendar_model (GnomeCalendar *gcal);
-CalClient *gnome_calendar_get_default_client (GnomeCalendar *gcal);
-CalClient *gnome_calendar_get_task_pad_cal_client(GnomeCalendar *gcal);
+ECal *gnome_calendar_get_default_client (GnomeCalendar *gcal);
+ECal *gnome_calendar_get_task_pad_e_cal(GnomeCalendar *gcal);
gboolean gnome_calendar_add_event_uri (GnomeCalendar *gcal, const char *str_uri);
gboolean gnome_calendar_remove_event_uri (GnomeCalendar *gcal, const char *str_uri);
diff --git a/calendar/gui/goto.c b/calendar/gui/goto.c
index 770e2e40ac..4bff9addca 100644
--- a/calendar/gui/goto.c
+++ b/calendar/gui/goto.c
@@ -70,7 +70,7 @@ static void
ecal_date_range_changed (ECalendarItem *calitem, gpointer user_data)
{
GoToDialog *dlg = user_data;
- CalClient *client;
+ ECal *client;
client = gnome_calendar_get_default_client (dlg->gcal);
if (client)
diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c
index e2640f01f4..2ea27974fd 100644
--- a/calendar/gui/itip-utils.c
+++ b/calendar/gui/itip-utils.c
@@ -36,8 +36,8 @@
#include <Evolution-Composer.h>
#include <e-util/e-dialog-utils.h>
#include <e-util/e-time-utils.h>
-#include <cal-util/timeutil.h>
-#include <cal-util/cal-util.h>
+#include <libecal/e-cal-time-util.h>
+#include <libecal/e-cal-util.h>
#include "calendar-config.h"
#include "itip-utils.h"
@@ -86,24 +86,24 @@ itip_addresses_get_default (void)
}
gboolean
-itip_organizer_is_user (CalComponent *comp, CalClient *client)
+itip_organizer_is_user (ECalComponent *comp, ECal *client)
{
- CalComponentOrganizer organizer;
+ ECalComponentOrganizer organizer;
const char *strip;
gboolean user_org = FALSE;
- if (!cal_component_has_organizer (comp))
+ if (!e_cal_component_has_organizer (comp))
return FALSE;
- cal_component_get_organizer (comp, &organizer);
+ e_cal_component_get_organizer (comp, &organizer);
if (organizer.value != NULL) {
strip = itip_strip_mailto (organizer.value);
- if (cal_client_get_static_capability (client, CAL_STATIC_CAPABILITY_ORGANIZER_NOT_EMAIL_ADDRESS)) {
+ if (e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_ORGANIZER_NOT_EMAIL_ADDRESS)) {
char *email;
- if (cal_client_get_cal_address (client, &email, NULL) && !g_strcasecmp (email, strip)) {
+ if (e_cal_get_cal_address (client, &email, NULL) && !g_strcasecmp (email, strip)) {
g_free (email);
return TRUE;
@@ -119,16 +119,16 @@ itip_organizer_is_user (CalComponent *comp, CalClient *client)
}
gboolean
-itip_sentby_is_user (CalComponent *comp)
+itip_sentby_is_user (ECalComponent *comp)
{
- CalComponentOrganizer organizer;
+ ECalComponentOrganizer organizer;
const char *strip;
gboolean user_sentby = FALSE;
- if (!cal_component_has_organizer (comp))
+ if (!e_cal_component_has_organizer (comp))
return FALSE;
- cal_component_get_organizer (comp, &organizer);
+ e_cal_component_get_organizer (comp, &organizer);
if (organizer.sentby != NULL) {
strip = itip_strip_mailto (organizer.sentby);
user_sentby = e_account_list_find(itip_addresses_get(), E_ACCOUNT_FIND_ID_ADDRESS, strip) != NULL;
@@ -167,7 +167,7 @@ get_label (struct icaltimetype *tt)
typedef struct {
GHashTable *tzids;
icalcomponent *icomp;
- CalClient *client;
+ ECal *client;
icalcomponent *zones;
} ItipUtilTZData;
@@ -191,7 +191,7 @@ foreach_tzid_callback (icalparameter *param, gpointer data)
if (zone == NULL)
zone = icaltimezone_get_builtin_timezone_from_tzid (tzid);
if (zone == NULL && tz_data->client != NULL)
- cal_client_get_timezone (tz_data->client, tzid, &zone, NULL);
+ e_cal_get_timezone (tz_data->client, tzid, &zone, NULL);
if (zone == NULL)
return;
@@ -205,21 +205,21 @@ foreach_tzid_callback (icalparameter *param, gpointer data)
}
static icalcomponent *
-comp_toplevel_with_zones (CalComponentItipMethod method, CalComponent *comp, CalClient *client, icalcomponent *zones)
+comp_toplevel_with_zones (ECalComponentItipMethod method, ECalComponent *comp, ECal *client, icalcomponent *zones)
{
icalcomponent *top_level, *icomp;
icalproperty *prop;
icalvalue *value;
ItipUtilTZData tz_data;
- top_level = cal_util_new_top_level ();
+ top_level = e_cal_util_new_top_level ();
prop = icalproperty_new (ICAL_METHOD_PROPERTY);
value = icalvalue_new_method (itip_methods_enum[method]);
icalproperty_set_value (prop, value);
icalcomponent_add_property (top_level, prop);
- icomp = cal_component_get_icalcomponent (comp);
+ icomp = e_cal_component_get_icalcomponent (comp);
icomp = icalcomponent_new_clone (icomp);
tz_data.tzids = g_hash_table_new (g_str_hash, g_str_equal);
@@ -248,21 +248,21 @@ users_has_attendee (GList *users, const char *address)
}
static CORBA_char *
-comp_from (CalComponentItipMethod method, CalComponent *comp)
+comp_from (ECalComponentItipMethod method, ECalComponent *comp)
{
- CalComponentOrganizer organizer;
- CalComponentAttendee *attendee;
+ ECalComponentOrganizer organizer;
+ ECalComponentAttendee *attendee;
GSList *attendees;
CORBA_char *str;
switch (method) {
- case CAL_COMPONENT_METHOD_PUBLISH:
+ case E_CAL_COMPONENT_METHOD_PUBLISH:
return CORBA_string_dup ("");
- case CAL_COMPONENT_METHOD_REQUEST:
- case CAL_COMPONENT_METHOD_CANCEL:
- case CAL_COMPONENT_METHOD_ADD:
- cal_component_get_organizer (comp, &organizer);
+ case E_CAL_COMPONENT_METHOD_REQUEST:
+ case E_CAL_COMPONENT_METHOD_CANCEL:
+ case E_CAL_COMPONENT_METHOD_ADD:
+ e_cal_component_get_organizer (comp, &organizer);
if (organizer.value == NULL) {
e_notice (NULL, GTK_MESSAGE_ERROR,
_("An organizer must be set."));
@@ -272,36 +272,36 @@ comp_from (CalComponentItipMethod method, CalComponent *comp)
return CORBA_string_dup (itip_strip_mailto (organizer.value));
default:
- if (!cal_component_has_attendees (comp))
+ if (!e_cal_component_has_attendees (comp))
return CORBA_string_dup ("");
- cal_component_get_attendee_list (comp, &attendees);
+ e_cal_component_get_attendee_list (comp, &attendees);
attendee = attendees->data;
str = CORBA_string_dup (attendee->value ? itip_strip_mailto (attendee->value) : "");
- cal_component_free_attendee_list (attendees);
+ e_cal_component_free_attendee_list (attendees);
return str;
}
}
static GNOME_Evolution_Composer_RecipientList *
-comp_to_list (CalComponentItipMethod method, CalComponent *comp, GList *users)
+comp_to_list (ECalComponentItipMethod method, ECalComponent *comp, GList *users)
{
GNOME_Evolution_Composer_RecipientList *to_list;
GNOME_Evolution_Composer_Recipient *recipient;
- CalComponentOrganizer organizer;
+ ECalComponentOrganizer organizer;
GSList *attendees, *l;
gint len;
switch (method) {
- case CAL_COMPONENT_METHOD_REQUEST:
- case CAL_COMPONENT_METHOD_CANCEL:
- cal_component_get_attendee_list (comp, &attendees);
+ case E_CAL_COMPONENT_METHOD_REQUEST:
+ case E_CAL_COMPONENT_METHOD_CANCEL:
+ e_cal_component_get_attendee_list (comp, &attendees);
len = g_slist_length (attendees);
if (len <= 0) {
e_notice (NULL, GTK_MESSAGE_ERROR,
_("At least one attendee is necessary"));
- cal_component_free_attendee_list (attendees);
+ e_cal_component_free_attendee_list (attendees);
return NULL;
}
@@ -310,7 +310,7 @@ comp_to_list (CalComponentItipMethod method, CalComponent *comp, GList *users)
to_list->_length = 0;
to_list->_buffer = CORBA_sequence_GNOME_Evolution_Composer_Recipient_allocbuf (len);
- cal_component_get_organizer (comp, &organizer);
+ e_cal_component_get_organizer (comp, &organizer);
if (organizer.value == NULL) {
e_notice (NULL, GTK_MESSAGE_ERROR,
_("An organizer must be set."));
@@ -318,7 +318,7 @@ comp_to_list (CalComponentItipMethod method, CalComponent *comp, GList *users)
}
for (l = attendees; l != NULL; l = l->next) {
- CalComponentAttendee *att = l->data;
+ ECalComponentAttendee *att = l->data;
if (users_has_attendee (users, att->value))
continue;
@@ -334,15 +334,15 @@ comp_to_list (CalComponentItipMethod method, CalComponent *comp, GList *users)
to_list->_length++;
}
- cal_component_free_attendee_list (attendees);
+ e_cal_component_free_attendee_list (attendees);
break;
- case CAL_COMPONENT_METHOD_REPLY:
- case CAL_COMPONENT_METHOD_ADD:
- case CAL_COMPONENT_METHOD_REFRESH:
- case CAL_COMPONENT_METHOD_COUNTER:
- case CAL_COMPONENT_METHOD_DECLINECOUNTER:
- cal_component_get_organizer (comp, &organizer);
+ case E_CAL_COMPONENT_METHOD_REPLY:
+ case E_CAL_COMPONENT_METHOD_ADD:
+ case E_CAL_COMPONENT_METHOD_REFRESH:
+ case E_CAL_COMPONENT_METHOD_COUNTER:
+ case E_CAL_COMPONENT_METHOD_DECLINECOUNTER:
+ e_cal_component_get_organizer (comp, &organizer);
if (organizer.value == NULL) {
e_notice (NULL, GTK_MESSAGE_ERROR,
_("An organizer must be set."));
@@ -375,25 +375,25 @@ comp_to_list (CalComponentItipMethod method, CalComponent *comp, GList *users)
}
static CORBA_char *
-comp_subject (CalComponentItipMethod method, CalComponent *comp)
+comp_subject (ECalComponentItipMethod method, ECalComponent *comp)
{
- CalComponentText caltext;
+ ECalComponentText caltext;
const char *description, *prefix = NULL;
GSList *alist;
CORBA_char *subject;
- cal_component_get_summary (comp, &caltext);
+ e_cal_component_get_summary (comp, &caltext);
if (caltext.value != NULL)
description = caltext.value;
else {
- switch (cal_component_get_vtype (comp)) {
- case CAL_COMPONENT_EVENT:
+ switch (e_cal_component_get_vtype (comp)) {
+ case E_CAL_COMPONENT_EVENT:
description = _("Event information");
- case CAL_COMPONENT_TODO:
+ case E_CAL_COMPONENT_TODO:
description = _("Task information");
- case CAL_COMPONENT_JOURNAL:
+ case E_CAL_COMPONENT_JOURNAL:
description = _("Journal information");
- case CAL_COMPONENT_FREEBUSY:
+ case E_CAL_COMPONENT_FREEBUSY:
description = _("Free/Busy information");
default:
description = _("Calendar information");
@@ -401,18 +401,18 @@ comp_subject (CalComponentItipMethod method, CalComponent *comp)
}
switch (method) {
- case CAL_COMPONENT_METHOD_PUBLISH:
- case CAL_COMPONENT_METHOD_REQUEST:
+ case E_CAL_COMPONENT_METHOD_PUBLISH:
+ case E_CAL_COMPONENT_METHOD_REQUEST:
/* FIXME: If this is an update to a previous
* PUBLISH or REQUEST, then
prefix = U_("Updated");
*/
break;
- case CAL_COMPONENT_METHOD_REPLY:
- cal_component_get_attendee_list (comp, &alist);
+ case E_CAL_COMPONENT_METHOD_REPLY:
+ e_cal_component_get_attendee_list (comp, &alist);
if (alist != NULL) {
- CalComponentAttendee *a = alist->data;
+ ECalComponentAttendee *a = alist->data;
switch (a->status) {
case ICAL_PARTSTAT_ACCEPTED:
@@ -427,27 +427,27 @@ comp_subject (CalComponentItipMethod method, CalComponent *comp)
default:
break;
}
- cal_component_free_attendee_list (alist);
+ e_cal_component_free_attendee_list (alist);
}
break;
- case CAL_COMPONENT_METHOD_ADD:
+ case E_CAL_COMPONENT_METHOD_ADD:
prefix = _("Updated");
break;
- case CAL_COMPONENT_METHOD_CANCEL:
+ case E_CAL_COMPONENT_METHOD_CANCEL:
prefix = _("Cancel");
break;
- case CAL_COMPONENT_METHOD_REFRESH:
+ case E_CAL_COMPONENT_METHOD_REFRESH:
prefix = _("Refresh");
break;
- case CAL_COMPONENT_METHOD_COUNTER:
+ case E_CAL_COMPONENT_METHOD_COUNTER:
prefix = _("Counter-proposal");
break;
- case CAL_COMPONENT_METHOD_DECLINECOUNTER:
+ case E_CAL_COMPONENT_METHOD_DECLINECOUNTER:
prefix = _("Declined");
break;
@@ -466,22 +466,22 @@ comp_subject (CalComponentItipMethod method, CalComponent *comp)
}
static CORBA_char *
-comp_content_type (CalComponent *comp, CalComponentItipMethod method)
+comp_content_type (ECalComponent *comp, ECalComponentItipMethod method)
{
char tmp[256];
sprintf (tmp, "text/calendar; name=\"%s\"; charset=utf-8; METHOD=%s",
- cal_component_get_vtype (comp) == CAL_COMPONENT_FREEBUSY ?
+ e_cal_component_get_vtype (comp) == E_CAL_COMPONENT_FREEBUSY ?
"freebusy.ifb" : "calendar.ics", itip_methods[method]);
return CORBA_string_dup (tmp);
}
static CORBA_char *
-comp_filename (CalComponent *comp)
+comp_filename (ECalComponent *comp)
{
- switch (cal_component_get_vtype (comp)) {
- case CAL_COMPONENT_FREEBUSY:
+ switch (e_cal_component_get_vtype (comp)) {
+ case E_CAL_COMPONENT_FREEBUSY:
return CORBA_string_dup ("freebusy.ifb");
default:
return CORBA_string_dup ("calendar.ics");
@@ -489,29 +489,29 @@ comp_filename (CalComponent *comp)
}
static CORBA_char *
-comp_description (CalComponent *comp)
+comp_description (ECalComponent *comp)
{
CORBA_char *description;
- CalComponentDateTime dt;
+ ECalComponentDateTime dt;
char *start = NULL, *end = NULL;
- switch (cal_component_get_vtype (comp)) {
- case CAL_COMPONENT_EVENT:
+ switch (e_cal_component_get_vtype (comp)) {
+ case E_CAL_COMPONENT_EVENT:
return CORBA_string_dup (_("Event information"));
- case CAL_COMPONENT_TODO:
+ case E_CAL_COMPONENT_TODO:
return CORBA_string_dup (_("Task information"));
- case CAL_COMPONENT_JOURNAL:
+ case E_CAL_COMPONENT_JOURNAL:
return CORBA_string_dup (_("Journal information"));
- case CAL_COMPONENT_FREEBUSY:
- cal_component_get_dtstart (comp, &dt);
+ case E_CAL_COMPONENT_FREEBUSY:
+ e_cal_component_get_dtstart (comp, &dt);
if (dt.value)
start = get_label (dt.value);
- cal_component_free_datetime (&dt);
+ e_cal_component_free_datetime (&dt);
- cal_component_get_dtend (comp, &dt);
+ e_cal_component_get_dtend (comp, &dt);
if (dt.value)
end = get_label (dt.value);
- cal_component_free_datetime (&dt);
+ e_cal_component_free_datetime (&dt);
if (start != NULL && end != NULL) {
char *tmp;
@@ -530,7 +530,7 @@ comp_description (CalComponent *comp)
}
static gboolean
-comp_server_send (CalComponentItipMethod method, CalComponent *comp, CalClient *client,
+comp_server_send (ECalComponentItipMethod method, ECalComponent *comp, ECal *client,
icalcomponent *zones, GList **users)
{
icalcomponent *top_level;
@@ -538,7 +538,7 @@ comp_server_send (CalComponentItipMethod method, CalComponent *comp, CalClient *
GError *error = NULL;
top_level = comp_toplevel_with_zones (method, comp, client, zones);
- if (!cal_client_send_objects (client, top_level, &error)) {
+ if (!e_cal_send_objects (client, top_level, &error)) {
/* FIXME Really need a book problem status code */
if (error->code != E_CALENDAR_STATUS_OK) {
/* FIXME Better error message */
@@ -556,14 +556,14 @@ comp_server_send (CalComponentItipMethod method, CalComponent *comp, CalClient *
}
static gboolean
-comp_limit_attendees (CalComponent *comp)
+comp_limit_attendees (ECalComponent *comp)
{
icalcomponent *icomp;
icalproperty *prop;
gboolean found = FALSE, match = FALSE;
GSList *l, *list = NULL;
- icomp = cal_component_get_icalcomponent (comp);
+ icomp = e_cal_component_get_icalcomponent (comp);
for (prop = icalcomponent_get_first_property (icomp, ICAL_ATTENDEE_PROPERTY);
prop != NULL;
@@ -607,11 +607,11 @@ comp_limit_attendees (CalComponent *comp)
}
static void
-comp_sentby (CalComponent *comp, CalClient *client)
+comp_sentby (ECalComponent *comp, ECal *client)
{
- CalComponentOrganizer organizer;
+ ECalComponentOrganizer organizer;
- cal_component_get_organizer (comp, &organizer);
+ e_cal_component_get_organizer (comp, &organizer);
if (!organizer.value) {
EAccount *a = itip_addresses_get_default ();
@@ -620,7 +620,7 @@ comp_sentby (CalComponent *comp, CalClient *client)
organizer.cn = a->id->name;
organizer.language = NULL;
- cal_component_set_organizer (comp, &organizer);
+ e_cal_component_set_organizer (comp, &organizer);
g_free ((char *) organizer.value);
return;
@@ -634,7 +634,7 @@ comp_sentby (CalComponent *comp, CalClient *client)
organizer.cn = g_strdup (organizer.cn);
organizer.language = g_strdup (organizer.language);
- cal_component_set_organizer (comp, &organizer);
+ e_cal_component_set_organizer (comp, &organizer);
g_free ((char *)organizer.value);
g_free ((char *)organizer.sentby);
@@ -642,26 +642,26 @@ comp_sentby (CalComponent *comp, CalClient *client)
g_free ((char *)organizer.language);
}
}
-static CalComponent *
-comp_minimal (CalComponent *comp, gboolean attendee)
+static ECalComponent *
+comp_minimal (ECalComponent *comp, gboolean attendee)
{
- CalComponent *clone;
+ ECalComponent *clone;
icalcomponent *icomp, *icomp_clone;
icalproperty *prop;
- CalComponentOrganizer organizer;
+ ECalComponentOrganizer organizer;
const char *uid;
GSList *comments;
struct icaltimetype itt;
- CalComponentRange recur_id;
+ ECalComponentRange recur_id;
- clone = cal_component_new ();
- cal_component_set_new_vtype (clone, cal_component_get_vtype (comp));
+ clone = e_cal_component_new ();
+ e_cal_component_set_new_vtype (clone, e_cal_component_get_vtype (comp));
if (attendee) {
GSList *attendees;
- cal_component_get_attendee_list (comp, &attendees);
- cal_component_set_attendee_list (clone, attendees);
+ e_cal_component_get_attendee_list (comp, &attendees);
+ e_cal_component_set_attendee_list (clone, attendees);
if (!comp_limit_attendees (clone)) {
e_notice (NULL, GTK_MESSAGE_ERROR,
@@ -672,34 +672,34 @@ comp_minimal (CalComponent *comp, gboolean attendee)
itt = icaltime_from_timet_with_zone (time (NULL), FALSE,
icaltimezone_get_utc_timezone ());
- cal_component_set_dtstamp (clone, &itt);
+ e_cal_component_set_dtstamp (clone, &itt);
- cal_component_get_organizer (comp, &organizer);
+ e_cal_component_get_organizer (comp, &organizer);
if (organizer.value == NULL)
goto error;
- cal_component_set_organizer (clone, &organizer);
+ e_cal_component_set_organizer (clone, &organizer);
- cal_component_get_uid (comp, &uid);
- cal_component_set_uid (clone, uid);
+ e_cal_component_get_uid (comp, &uid);
+ e_cal_component_set_uid (clone, uid);
- cal_component_get_comment_list (comp, &comments);
+ e_cal_component_get_comment_list (comp, &comments);
if (g_slist_length (comments) <= 1) {
- cal_component_set_comment_list (clone, comments);
+ e_cal_component_set_comment_list (clone, comments);
} else {
GSList *l = comments;
comments = g_slist_remove_link (comments, l);
- cal_component_set_comment_list (clone, l);
- cal_component_free_text_list (l);
+ e_cal_component_set_comment_list (clone, l);
+ e_cal_component_free_text_list (l);
}
- cal_component_free_text_list (comments);
+ e_cal_component_free_text_list (comments);
- cal_component_get_recurid (comp, &recur_id);
+ e_cal_component_get_recurid (comp, &recur_id);
if (recur_id.datetime.value != NULL)
- cal_component_set_recurid (clone, &recur_id);
+ e_cal_component_set_recurid (clone, &recur_id);
- icomp = cal_component_get_icalcomponent (comp);
- icomp_clone = cal_component_get_icalcomponent (clone);
+ icomp = e_cal_component_get_icalcomponent (comp);
+ icomp_clone = e_cal_component_get_icalcomponent (clone);
for (prop = icalcomponent_get_first_property (icomp, ICAL_X_PROPERTY);
prop != NULL;
prop = icalcomponent_get_next_property (icomp, ICAL_X_PROPERTY))
@@ -710,7 +710,7 @@ comp_minimal (CalComponent *comp, gboolean attendee)
icalcomponent_add_property (icomp_clone, p);
}
- cal_component_rescan (clone);
+ e_cal_component_rescan (clone);
return clone;
@@ -719,31 +719,31 @@ comp_minimal (CalComponent *comp, gboolean attendee)
return NULL;
}
-static CalComponent *
-comp_compliant (CalComponentItipMethod method, CalComponent *comp, CalClient *client, icalcomponent *zones)
+static ECalComponent *
+comp_compliant (ECalComponentItipMethod method, ECalComponent *comp, ECal *client, icalcomponent *zones)
{
- CalComponent *clone, *temp_clone;
+ ECalComponent *clone, *temp_clone;
struct icaltimetype itt;
- clone = cal_component_clone (comp);
+ clone = e_cal_component_clone (comp);
itt = icaltime_from_timet_with_zone (time (NULL), FALSE,
icaltimezone_get_utc_timezone ());
- cal_component_set_dtstamp (clone, &itt);
+ e_cal_component_set_dtstamp (clone, &itt);
/* Make UNTIL date a datetime in a simple recurrence */
- if (cal_component_has_recurrences (clone)
- && cal_component_has_simple_recurrence (clone)) {
+ if (e_cal_component_has_recurrences (clone)
+ && e_cal_component_has_simple_recurrence (clone)) {
GSList *rrule_list;
struct icalrecurrencetype *r;
- cal_component_get_rrule_list (clone, &rrule_list);
+ e_cal_component_get_rrule_list (clone, &rrule_list);
r = rrule_list->data;
if (!icaltime_is_null_time (r->until) && r->until.is_date) {
- CalComponentDateTime dt;
+ ECalComponentDateTime dt;
icaltimezone *from_zone = NULL, *to_zone;
- cal_component_get_dtstart (clone, &dt);
+ e_cal_component_get_dtstart (clone, &dt);
if (dt.value->is_date) {
from_zone = icaltimezone_get_builtin_timezone (calendar_config_get_timezone ());
@@ -756,7 +756,7 @@ comp_compliant (CalComponentItipMethod method, CalComponent *comp, CalClient *cl
from_zone = icaltimezone_get_builtin_timezone_from_tzid (dt.tzid);
if (from_zone == NULL && client != NULL)
/* FIXME Error checking */
- cal_client_get_timezone (client, dt.tzid, &from_zone, NULL);
+ e_cal_get_timezone (client, dt.tzid, &from_zone, NULL);
}
to_zone = icaltimezone_get_utc_timezone ();
@@ -769,44 +769,44 @@ comp_compliant (CalComponentItipMethod method, CalComponent *comp, CalClient *cl
icaltimezone_convert_time (&r->until, from_zone, to_zone);
r->until.is_utc = TRUE;
- cal_component_set_rrule_list (clone, rrule_list);
- cal_component_abort_sequence (clone);
+ e_cal_component_set_rrule_list (clone, rrule_list);
+ e_cal_component_abort_sequence (clone);
}
- cal_component_free_recur_list (rrule_list);
+ e_cal_component_free_recur_list (rrule_list);
}
/* We delete incoming alarms anyhow, and this helps with outlook */
- cal_component_remove_all_alarms (clone);
+ e_cal_component_remove_all_alarms (clone);
/* Strip X-LIC-ERROR stuff */
- cal_component_strip_errors (clone);
+ e_cal_component_strip_errors (clone);
/* Comply with itip spec */
switch (method) {
- case CAL_COMPONENT_METHOD_PUBLISH:
+ case E_CAL_COMPONENT_METHOD_PUBLISH:
comp_sentby (clone, client);
- cal_component_set_attendee_list (clone, NULL);
+ e_cal_component_set_attendee_list (clone, NULL);
break;
- case CAL_COMPONENT_METHOD_REQUEST:
+ case E_CAL_COMPONENT_METHOD_REQUEST:
comp_sentby (clone, client);
break;
- case CAL_COMPONENT_METHOD_CANCEL:
+ case E_CAL_COMPONENT_METHOD_CANCEL:
comp_sentby (clone, client);
break;
- case CAL_COMPONENT_METHOD_REPLY:
+ case E_CAL_COMPONENT_METHOD_REPLY:
break;
- case CAL_COMPONENT_METHOD_ADD:
+ case E_CAL_COMPONENT_METHOD_ADD:
break;
- case CAL_COMPONENT_METHOD_REFRESH:
+ case E_CAL_COMPONENT_METHOD_REFRESH:
/* Need to remove almost everything */
temp_clone = comp_minimal (clone, TRUE);
g_object_unref (clone);
clone = temp_clone;
break;
- case CAL_COMPONENT_METHOD_COUNTER:
+ case E_CAL_COMPONENT_METHOD_COUNTER:
break;
- case CAL_COMPONENT_METHOD_DECLINECOUNTER:
+ case E_CAL_COMPONENT_METHOD_DECLINECOUNTER:
/* Need to remove almost everything */
temp_clone = comp_minimal (clone, FALSE);
g_object_unref (clone);
@@ -820,11 +820,11 @@ comp_compliant (CalComponentItipMethod method, CalComponent *comp, CalClient *cl
}
gboolean
-itip_send_comp (CalComponentItipMethod method, CalComponent *send_comp,
- CalClient *client, icalcomponent *zones)
+itip_send_comp (ECalComponentItipMethod method, ECalComponent *send_comp,
+ ECal *client, icalcomponent *zones)
{
GNOME_Evolution_Composer composer_server;
- CalComponent *comp = NULL;
+ ECalComponent *comp = NULL;
icalcomponent *top_level = NULL;
GList *users = NULL;
GNOME_Evolution_Composer_RecipientList *to_list = NULL;
@@ -840,7 +840,7 @@ itip_send_comp (CalComponentItipMethod method, CalComponent *send_comp,
CORBA_exception_init (&ev);
/* Give the server a chance to manipulate the comp */
- if (method != CAL_COMPONENT_METHOD_PUBLISH) {
+ if (method != E_CAL_COMPONENT_METHOD_PUBLISH) {
if (!comp_server_send (method, send_comp, client, zones, &users))
goto cleanup;
}
@@ -852,7 +852,7 @@ itip_send_comp (CalComponentItipMethod method, CalComponent *send_comp,
/* Recipients */
to_list = comp_to_list (method, comp, users);
- if (method != CAL_COMPONENT_METHOD_PUBLISH) {
+ if (method != E_CAL_COMPONENT_METHOD_PUBLISH) {
if (to_list == NULL || to_list->_length == 0) {
/* We sent them all via the server */
retval = TRUE;
@@ -894,7 +894,7 @@ itip_send_comp (CalComponentItipMethod method, CalComponent *send_comp,
top_level = comp_toplevel_with_zones (method, comp, client, zones);
ical_string = icalcomponent_as_ical_string (top_level);
- if (cal_component_get_vtype (comp) == CAL_COMPONENT_EVENT) {
+ if (e_cal_component_get_vtype (comp) == E_CAL_COMPONENT_EVENT) {
GNOME_Evolution_Composer_setBody (composer_server, ical_string, content_type, &ev);
} else {
GNOME_Evolution_Composer_setMultipartType (composer_server, GNOME_Evolution_Composer_MIXED, &ev);
@@ -929,7 +929,7 @@ itip_send_comp (CalComponentItipMethod method, CalComponent *send_comp,
goto cleanup;
}
- if (method == CAL_COMPONENT_METHOD_PUBLISH) {
+ if (method == E_CAL_COMPONENT_METHOD_PUBLISH) {
GNOME_Evolution_Composer_show (composer_server, &ev);
if (BONOBO_EX (&ev))
g_warning ("Unable to show the composer while sending iTip message");
diff --git a/calendar/gui/itip-utils.h b/calendar/gui/itip-utils.h
index 981fd2a12d..cf9dd37643 100644
--- a/calendar/gui/itip-utils.h
+++ b/calendar/gui/itip-utils.h
@@ -5,31 +5,31 @@
#include <libical/ical.h>
#include <string.h>
#include <glib.h>
-#include <cal-client/cal-client.h>
-#include <cal-util/cal-component.h>
+#include <libecal/e-cal.h>
+#include <libecal/e-cal-component.h>
#include <e-util/e-account-list.h>
typedef enum {
- CAL_COMPONENT_METHOD_PUBLISH,
- CAL_COMPONENT_METHOD_REQUEST,
- CAL_COMPONENT_METHOD_REPLY,
- CAL_COMPONENT_METHOD_ADD,
- CAL_COMPONENT_METHOD_CANCEL,
- CAL_COMPONENT_METHOD_REFRESH,
- CAL_COMPONENT_METHOD_COUNTER,
- CAL_COMPONENT_METHOD_DECLINECOUNTER
-} CalComponentItipMethod;
+ E_CAL_COMPONENT_METHOD_PUBLISH,
+ E_CAL_COMPONENT_METHOD_REQUEST,
+ E_CAL_COMPONENT_METHOD_REPLY,
+ E_CAL_COMPONENT_METHOD_ADD,
+ E_CAL_COMPONENT_METHOD_CANCEL,
+ E_CAL_COMPONENT_METHOD_REFRESH,
+ E_CAL_COMPONENT_METHOD_COUNTER,
+ E_CAL_COMPONENT_METHOD_DECLINECOUNTER
+} ECalComponentItipMethod;
EAccountList *itip_addresses_get (void);
EAccount *itip_addresses_get_default (void);
-gboolean itip_organizer_is_user (CalComponent *comp, CalClient *client);
-gboolean itip_sentby_is_user (CalComponent *comp);
+gboolean itip_organizer_is_user (ECalComponent *comp, ECal *client);
+gboolean itip_sentby_is_user (ECalComponent *comp);
const gchar *itip_strip_mailto (const gchar *address);
-gboolean itip_send_comp (CalComponentItipMethod method, CalComponent *comp,
- CalClient *client, icalcomponent *zones);
+gboolean itip_send_comp (ECalComponentItipMethod method, ECalComponent *comp,
+ ECal *client, icalcomponent *zones);
#endif
diff --git a/calendar/gui/print.c b/calendar/gui/print.c
index 0c0fa44886..2bea5a915a 100644
--- a/calendar/gui/print.c
+++ b/calendar/gui/print.c
@@ -45,7 +45,7 @@
#include <e-util/e-dialog-widgets.h>
#include <e-util/e-time-utils.h>
#include <gal/widgets/e-unicode.h>
-#include <cal-util/timeutil.h>
+#include <libecal/e-cal-time-util.h>
#include "calendar-commands.h"
#include "calendar-config.h"
#include "e-day-view.h"
@@ -523,7 +523,7 @@ format_date(time_t time, int flags, char *buffer, int bufflen)
}
static gboolean
-instance_cb (CalComponent *comp, time_t instance_start, time_t instance_end, gpointer data)
+instance_cb (ECalComponent *comp, time_t instance_start, time_t instance_end, gpointer data)
{
gboolean *found = data;
@@ -543,7 +543,7 @@ print_month_small (GnomePrintContext *pc, GnomeCalendar *gcal, time_t month,
int bordertitle)
{
icaltimezone *zone = get_timezone ();
- CalClient *client;
+ ECal *client;
GnomeFont *font, *font_bold, *font_normal;
time_t now, next;
int x, y;
@@ -640,7 +640,7 @@ print_month_small (GnomePrintContext *pc, GnomeCalendar *gcal, time_t month,
sprintf (buf, "%d", day);
/* this is a slow messy way to do this ... but easy ... */
- cal_client_generate_instances (client, now, CALOBJ_TYPE_EVENT,
+ e_cal_generate_instances (client, now, CALOBJ_TYPE_EVENT,
time_day_end_with_zone (now, zone),
instance_cb, &found);
@@ -856,7 +856,7 @@ print_day_background (GnomePrintContext *pc, GnomeCalendar *gcal,
/* This adds one event to the view, adding it to the appropriate array. */
static gint
-print_day_add_event (CalComponent *comp,
+print_day_add_event (ECalComponent *comp,
time_t start,
time_t end,
gint days_shown,
@@ -932,7 +932,7 @@ print_day_add_event (CalComponent *comp,
static gboolean
-print_day_details_cb (CalComponent *comp, time_t istart, time_t iend,
+print_day_details_cb (ECalComponent *comp, time_t istart, time_t iend,
gpointer data)
{
struct pdinfo *pdi = (struct pdinfo *)data;
@@ -1124,7 +1124,7 @@ print_day_details (GnomePrintContext *pc, GnomeCalendar *gcal, time_t whence,
double left, double right, double top, double bottom)
{
icaltimezone *zone = get_timezone ();
- CalClient *client;
+ ECal *client;
EDayViewEvent *event;
GnomeFont *font;
time_t start, end;
@@ -1152,7 +1152,7 @@ print_day_details (GnomePrintContext *pc, GnomeCalendar *gcal, time_t whence,
/* Get the events from the server. */
client = gnome_calendar_get_default_client (gcal);
- cal_client_generate_instances (client, CALOBJ_TYPE_EVENT, start, end,
+ e_cal_generate_instances (client, CALOBJ_TYPE_EVENT, start, end,
print_day_details_cb, &pdi);
qsort (pdi.long_events->data, pdi.long_events->len,
sizeof (EDayViewEvent), e_day_view_event_sort_func);
@@ -1242,7 +1242,7 @@ print_day_details (GnomePrintContext *pc, GnomeCalendar *gcal, time_t whence,
/* This adds one event to the view, adding it to the appropriate array. */
static gboolean
-print_week_summary_cb (CalComponent *comp,
+print_week_summary_cb (ECalComponent *comp,
time_t start,
time_t end,
gpointer data)
@@ -1550,7 +1550,7 @@ print_week_summary (GnomePrintContext *pc, GnomeCalendar *gcal,
double left, double right, double top, double bottom)
{
icaltimezone *zone = get_timezone ();
- CalClient *client;
+ ECal *client;
EWeekViewEvent *event;
struct psinfo psi;
time_t day_start;
@@ -1588,7 +1588,7 @@ print_week_summary (GnomePrintContext *pc, GnomeCalendar *gcal,
/* Get the events from the server. */
client = gnome_calendar_get_default_client (gcal);
- cal_client_generate_instances (client, CALOBJ_TYPE_EVENT,
+ e_cal_generate_instances (client, CALOBJ_TYPE_EVENT,
psi.day_starts[0],
psi.day_starts[psi.days_shown],
print_week_summary_cb, &psi);
@@ -1773,7 +1773,7 @@ print_todo_details (GnomePrintContext *pc, GnomeCalendar *gcal,
time_t start, time_t end,
double left, double right, double top, double bottom)
{
- CalClient *client;
+ ECal *client;
GnomeFont *font_summary;
double y, yend, x, xend;
struct icaltimetype *tt;
@@ -1787,7 +1787,7 @@ print_todo_details (GnomePrintContext *pc, GnomeCalendar *gcal,
task_pad = gnome_calendar_get_task_pad (gcal);
table = e_calendar_table_get_table (task_pad);
model = e_calendar_table_get_model (task_pad);
- client = gnome_calendar_get_task_pad_cal_client (gcal);
+ client = gnome_calendar_get_task_pad_e_cal (gcal);
font_summary = get_font_for_size (10, GNOME_FONT_BOOK, FALSE);
@@ -1803,8 +1803,8 @@ print_todo_details (GnomePrintContext *pc, GnomeCalendar *gcal,
rows = e_table_model_row_count (E_TABLE_MODEL (model));
for (row = 0; row < rows; row++) {
ECalModelComponent *comp_data;
- CalComponent *comp;
- CalComponentText summary;
+ ECalComponent *comp;
+ ECalComponentText summary;
int model_row;
model_row = e_table_view_to_model_row (table, row);
@@ -1812,10 +1812,10 @@ print_todo_details (GnomePrintContext *pc, GnomeCalendar *gcal,
if (!comp_data)
continue;
- comp = cal_component_new ();
- cal_component_set_icalcomponent (comp, icalcomponent_new_clone (comp_data->icalcomp));
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (comp_data->icalcomp));
- cal_component_get_summary (comp, &summary);
+ e_cal_component_get_summary (comp, &summary);
if (!summary.value) {
g_object_unref (comp);
continue;
@@ -1831,9 +1831,9 @@ print_todo_details (GnomePrintContext *pc, GnomeCalendar *gcal,
print_border (pc, x + 2, x + 8, y - 3, y - 11, 0.1, -1.0);
/* If the task is complete, print a tick in the box. */
- cal_component_get_completed (comp, &tt);
+ e_cal_component_get_completed (comp, &tt);
if (tt) {
- cal_component_free_icaltimetype (tt);
+ e_cal_component_free_icaltimetype (tt);
gnome_print_setrgbcolor (pc, 0, 0, 0);
gnome_print_setlinewidth (pc, 1.0);
@@ -2163,7 +2163,7 @@ write_label_piece (time_t t, char *buffer, int size, char *stext, char *etext)
}
static icaltimezone*
-get_zone_from_tzid (CalClient *client, const char *tzid)
+get_zone_from_tzid (ECal *client, const char *tzid)
{
icaltimezone *zone;
@@ -2171,7 +2171,7 @@ get_zone_from_tzid (CalClient *client, const char *tzid)
the builtin timezone with the TZID first. */
zone = icaltimezone_get_builtin_timezone_from_tzid (tzid);
if (!zone) {
- if (!cal_client_get_timezone (client, tzid, &zone, NULL))
+ if (!e_cal_get_timezone (client, tzid, &zone, NULL))
/* FIXME: Handle error better. */
g_warning ("Couldn't get timezone from server: %s",
tzid ? tzid : "");
@@ -2181,44 +2181,44 @@ get_zone_from_tzid (CalClient *client, const char *tzid)
}
static void
-print_date_label (GnomePrintContext *pc, CalComponent *comp, CalClient *client,
+print_date_label (GnomePrintContext *pc, ECalComponent *comp, ECal *client,
double left, double right, double top, double bottom)
{
icaltimezone *start_zone, *end_zone, *due_zone, *completed_zone;
- CalComponentDateTime datetime;
+ ECalComponentDateTime datetime;
time_t start = 0, end = 0, complete = 0, due = 0;
static char buffer[1024];
- cal_component_get_dtstart (comp, &datetime);
+ e_cal_component_get_dtstart (comp, &datetime);
if (datetime.value) {
start_zone = get_zone_from_tzid (client, datetime.tzid);
start = icaltime_as_timet_with_zone (*datetime.value,
start_zone);
}
- cal_component_free_datetime (&datetime);
+ e_cal_component_free_datetime (&datetime);
- cal_component_get_dtend (comp, &datetime);
+ e_cal_component_get_dtend (comp, &datetime);
if (datetime.value) {
end_zone = get_zone_from_tzid (client, datetime.tzid);
end = icaltime_as_timet_with_zone (*datetime.value,
end_zone);
}
- cal_component_free_datetime (&datetime);
+ e_cal_component_free_datetime (&datetime);
- cal_component_get_due (comp, &datetime);
+ e_cal_component_get_due (comp, &datetime);
if (datetime.value) {
due_zone = get_zone_from_tzid (client, datetime.tzid);
due = icaltime_as_timet_with_zone (*datetime.value,
due_zone);
}
- cal_component_free_datetime (&datetime);
+ e_cal_component_free_datetime (&datetime);
- cal_component_get_completed (comp, &datetime.value);
+ e_cal_component_get_completed (comp, &datetime.value);
if (datetime.value) {
completed_zone = icaltimezone_get_utc_timezone ();
complete = icaltime_as_timet_with_zone (*datetime.value,
completed_zone);
- cal_component_free_icaltimetype (datetime.value);
+ e_cal_component_free_icaltimetype (datetime.value);
}
buffer[0] = '\0';
@@ -2248,24 +2248,24 @@ print_date_label (GnomePrintContext *pc, CalComponent *comp, CalClient *client,
}
static void
-print_comp_item (GnomePrintContext *pc, CalComponent *comp, CalClient *client,
+print_comp_item (GnomePrintContext *pc, ECalComponent *comp, ECal *client,
double left, double right, double top, double bottom)
{
GnomeFont *font;
- CalComponentVType vtype;
- CalComponentText text;
+ ECalComponentVType vtype;
+ ECalComponentText text;
GSList *desc, *l;
const char *title, *categories;
char *categories_string;
GSList *contact_list, *elem;
gint header_size;
- vtype = cal_component_get_vtype (comp);
+ vtype = e_cal_component_get_vtype (comp);
/* We should only be asked to print VEVENTs or VTODOs. */
- if (vtype == CAL_COMPONENT_EVENT)
+ if (vtype == E_CAL_COMPONENT_EVENT)
title = _("Appointment");
- else if (vtype == CAL_COMPONENT_TODO)
+ else if (vtype == E_CAL_COMPONENT_TODO)
title = _("Task");
else
return;
@@ -2285,7 +2285,7 @@ print_comp_item (GnomePrintContext *pc, CalComponent *comp, CalClient *client,
/* Summary */
font = get_font_for_size (18, GNOME_FONT_BOLD, FALSE);
- cal_component_get_summary (comp, &text);
+ e_cal_component_get_summary (comp, &text);
top = bound_text (pc, font, text.value, left, right,
top - 3, bottom, 0);
g_object_unref (font);
@@ -2297,7 +2297,7 @@ print_comp_item (GnomePrintContext *pc, CalComponent *comp, CalClient *client,
font = get_font_for_size (12, GNOME_FONT_BOOK, FALSE);
/* For a VTODO we print the Status, Priority, % Complete and URL. */
- if (vtype == CAL_COMPONENT_TODO) {
+ if (vtype == E_CAL_COMPONENT_TODO) {
icalproperty_status status;
const char *status_string = NULL;
int *percent;
@@ -2305,7 +2305,7 @@ print_comp_item (GnomePrintContext *pc, CalComponent *comp, CalClient *client,
const char *url;
/* Status */
- cal_component_get_status (comp, &status);
+ e_cal_component_get_status (comp, &status);
if (status != ICAL_STATUS_NONE) {
switch (status) {
case ICAL_STATUS_NEEDSACTION:
@@ -2335,12 +2335,12 @@ print_comp_item (GnomePrintContext *pc, CalComponent *comp, CalClient *client,
}
/* Priority */
- cal_component_get_priority (comp, &priority);
+ e_cal_component_get_priority (comp, &priority);
if (priority && *priority >= 0) {
char *priority_string, *text;
- priority_string = cal_util_priority_to_string (*priority);
- cal_component_free_priority (priority);
+ priority_string = e_cal_util_priority_to_string (*priority);
+ e_cal_component_free_priority (priority);
text = g_strdup_printf (_("Priority: %s"), priority_string);
top = bound_text (pc, font, text,
@@ -2350,12 +2350,12 @@ print_comp_item (GnomePrintContext *pc, CalComponent *comp, CalClient *client,
}
/* Percent Complete */
- cal_component_get_percent (comp, &percent);
+ e_cal_component_get_percent (comp, &percent);
if (percent) {
char *percent_string;
percent_string = g_strdup_printf (_("Percent Complete: %i"), *percent);
- cal_component_free_percent (percent);
+ e_cal_component_free_percent (percent);
top = bound_text (pc, font, percent_string,
left, right, top, bottom, 0);
@@ -2364,7 +2364,7 @@ print_comp_item (GnomePrintContext *pc, CalComponent *comp, CalClient *client,
/* URL */
- cal_component_get_url (comp, &url);
+ e_cal_component_get_url (comp, &url);
if (url && url[0]) {
char *url_string = g_strdup_printf (_("URL: %s"),
url);
@@ -2378,7 +2378,7 @@ print_comp_item (GnomePrintContext *pc, CalComponent *comp, CalClient *client,
}
/* Categories */
- cal_component_get_categories (comp, &categories);
+ e_cal_component_get_categories (comp, &categories);
if (categories && categories[0]) {
categories_string = g_strdup_printf (_("Categories: %s"),
categories);
@@ -2389,17 +2389,17 @@ print_comp_item (GnomePrintContext *pc, CalComponent *comp, CalClient *client,
}
/* Contacts */
- cal_component_get_contact_list (comp, &contact_list);
+ e_cal_component_get_contact_list (comp, &contact_list);
if (contact_list) {
GString *contacts = g_string_new (_("Contacts: "));
for (elem = contact_list; elem; elem = elem->next) {
- CalComponentText *t = elem->data;
+ ECalComponentText *t = elem->data;
/* Put a comma between contacts. */
if (elem != contact_list)
g_string_append (contacts, ", ");
g_string_append (contacts, t->value);
}
- cal_component_free_text_list (contact_list);
+ e_cal_component_free_text_list (contact_list);
top = bound_text (pc, font, contacts->str,
left, right, top, bottom, 0);
@@ -2411,14 +2411,14 @@ print_comp_item (GnomePrintContext *pc, CalComponent *comp, CalClient *client,
top -= 16;
/* Description */
- cal_component_get_description_list (comp, &desc);
+ e_cal_component_get_description_list (comp, &desc);
for (l = desc; l != NULL; l = l->next) {
- CalComponentText *text = l->data;
+ ECalComponentText *text = l->data;
if (text->value != NULL)
top = bound_text (pc, font, text->value, left, right, top-3, bottom, 0);
}
- cal_component_free_text_list (desc);
+ e_cal_component_free_text_list (desc);
g_object_unref (font);
gnome_print_showpage (pc);
@@ -2542,7 +2542,7 @@ print_calendar (GnomeCalendar *gcal, gboolean preview, time_t date,
void
-print_comp (CalComponent *comp, CalClient *client, gboolean preview)
+print_comp (ECalComponent *comp, ECal *client, gboolean preview)
{
GnomePrintJob *gpm;
GnomePrintContext *pc;
@@ -2550,7 +2550,7 @@ print_comp (CalComponent *comp, CalClient *client, gboolean preview)
double l, r, t, b;
g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
+ g_return_if_fail (E_IS_CAL_COMPONENT (comp));
if (!print_config)
print_config = gnome_print_config_default ();
diff --git a/calendar/gui/print.h b/calendar/gui/print.h
index 4571b36976..495007d81d 100644
--- a/calendar/gui/print.h
+++ b/calendar/gui/print.h
@@ -34,7 +34,7 @@ typedef enum {
} PrintView;
void print_calendar (GnomeCalendar *gcal, gboolean preview, time_t at, PrintView default_view);
-void print_comp (CalComponent *comp, CalClient *client, gboolean preview);
+void print_comp (ECalComponent *comp, ECal *client, gboolean preview);
void print_setup (void);
diff --git a/calendar/gui/tag-calendar.c b/calendar/gui/tag-calendar.c
index 147a69f246..8e6937d08a 100644
--- a/calendar/gui/tag-calendar.c
+++ b/calendar/gui/tag-calendar.c
@@ -23,7 +23,7 @@
#include <config.h>
#endif
-#include <cal-util/timeutil.h>
+#include <libecal/e-cal-time-util.h>
#include "calendar-config.h"
#include "tag-calendar.h"
@@ -85,22 +85,22 @@ prepare_tag (ECalendar *ecal, struct calendar_tag_closure *c, icaltimezone *zone
return TRUE;
}
-/* Marks the specified range in an ECalendar; called from cal_client_generate_instances() */
+/* Marks the specified range in an ECalendar; called from e_cal_generate_instances() */
static gboolean
-tag_calendar_cb (CalComponent *comp,
+tag_calendar_cb (ECalComponent *comp,
time_t istart,
time_t iend,
gpointer data)
{
struct calendar_tag_closure *c = data;
struct icaltimetype start_tt, end_tt;
- CalComponentTransparency transparency;
+ ECalComponentTransparency transparency;
/* If we are skipping TRANSPARENT events, return if the event is
transparent. */
if (c->skip_transparent_events) {
- cal_component_get_transparency (comp, &transparency);
- if (transparency == CAL_COMPONENT_TRANSP_TRANSPARENT)
+ e_cal_component_get_transparency (comp, &transparency);
+ if (transparency == E_CAL_COMPONENT_TRANSP_TRANSPARENT)
return TRUE;
}
@@ -125,20 +125,20 @@ tag_calendar_cb (CalComponent *comp,
* range. The occurrences are extracted from the specified calendar @client.
**/
void
-tag_calendar_by_client (ECalendar *ecal, CalClient *client)
+tag_calendar_by_client (ECalendar *ecal, ECal *client)
{
struct calendar_tag_closure c;
g_return_if_fail (ecal != NULL);
g_return_if_fail (E_IS_CALENDAR (ecal));
g_return_if_fail (client != NULL);
- g_return_if_fail (IS_CAL_CLIENT (client));
+ g_return_if_fail (E_IS_CAL (client));
/* If the ECalendar isn't visible, we just return. */
if (!GTK_WIDGET_VISIBLE (ecal))
return;
- if (cal_client_get_load_state (client) != CAL_CLIENT_LOAD_LOADED)
+ if (e_cal_get_load_state (client) != E_CAL_LOAD_LOADED)
return;
if (!prepare_tag (ecal, &c, NULL, TRUE))
@@ -149,7 +149,7 @@ tag_calendar_by_client (ECalendar *ecal, CalClient *client)
#if 0
g_print ("DateNavigator generating instances\n");
#endif
- cal_client_generate_instances (client, CALOBJ_TYPE_EVENT,
+ e_cal_generate_instances (client, CALOBJ_TYPE_EVENT,
c.start_time, c.end_time,
tag_calendar_cb, &c);
}
@@ -160,20 +160,20 @@ tag_calendar_by_client (ECalendar *ecal, CalClient *client)
static icaltimezone*
resolve_tzid_cb (const char *tzid, gpointer data)
{
- CalClient *client;
+ ECal *client;
icaltimezone *zone = NULL;
g_return_val_if_fail (data != NULL, NULL);
- g_return_val_if_fail (IS_CAL_CLIENT (data), NULL);
+ g_return_val_if_fail (E_IS_CAL (data), NULL);
- client = CAL_CLIENT (data);
+ client = E_CAL (data);
/* Try to find the builtin timezone first. */
zone = icaltimezone_get_builtin_timezone_from_tzid (tzid);
if (!zone) {
/* FIXME: Handle errors. */
- cal_client_get_timezone (client, tzid, &zone, NULL);
+ e_cal_get_timezone (client, tzid, &zone, NULL);
}
return zone;
@@ -194,7 +194,7 @@ resolve_tzid_cb (const char *tzid, gpointer data)
* have been added to the calendar on the server yet.
**/
void
-tag_calendar_by_comp (ECalendar *ecal, CalComponent *comp, CalClient *client, icaltimezone *display_zone,
+tag_calendar_by_comp (ECalendar *ecal, ECalComponent *comp, ECal *client, icaltimezone *display_zone,
gboolean clear_first, gboolean comp_is_on_server)
{
struct calendar_tag_closure c;
@@ -202,7 +202,7 @@ tag_calendar_by_comp (ECalendar *ecal, CalComponent *comp, CalClient *client, ic
g_return_if_fail (ecal != NULL);
g_return_if_fail (E_IS_CALENDAR (ecal));
g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
+ g_return_if_fail (E_IS_CAL_COMPONENT (comp));
/* If the ECalendar isn't visible, we just return. */
if (!GTK_WIDGET_VISIBLE (ecal))
@@ -217,12 +217,12 @@ tag_calendar_by_comp (ECalendar *ecal, CalComponent *comp, CalClient *client, ic
g_print ("DateNavigator generating instances\n");
#endif
if (comp_is_on_server) {
- cal_recur_generate_instances (comp, c.start_time, c.end_time,
+ e_cal_recur_generate_instances (comp, c.start_time, c.end_time,
tag_calendar_cb, &c,
- cal_client_resolve_tzid_cb,
+ e_cal_resolve_tzid_cb,
client, c.zone);
} else {
- cal_recur_generate_instances (comp, c.start_time, c.end_time,
+ e_cal_recur_generate_instances (comp, c.start_time, c.end_time,
tag_calendar_cb, &c,
resolve_tzid_cb,
client, c.zone);
diff --git a/calendar/gui/tag-calendar.h b/calendar/gui/tag-calendar.h
index dc146e9c9f..d31d675543 100644
--- a/calendar/gui/tag-calendar.h
+++ b/calendar/gui/tag-calendar.h
@@ -23,11 +23,11 @@
#define TAG_CALENDAR_H
#include <widgets/misc/e-calendar.h>
-#include <cal-client/cal-client.h>
+#include <libecal/e-cal.h>
-void tag_calendar_by_client (ECalendar *ecal, CalClient *client);
-void tag_calendar_by_comp (ECalendar *ecal, CalComponent *comp,
- CalClient *client, icaltimezone *display_zone,
+void tag_calendar_by_client (ECalendar *ecal, ECal *client);
+void tag_calendar_by_comp (ECalendar *ecal, ECalComponent *comp,
+ ECal *client, icaltimezone *display_zone,
gboolean clear_first, gboolean comp_is_on_server);
#endif
diff --git a/calendar/gui/tasks-component.c b/calendar/gui/tasks-component.c
index 4e5de7c692..bdbe34db72 100644
--- a/calendar/gui/tasks-component.c
+++ b/calendar/gui/tasks-component.c
@@ -29,7 +29,7 @@
#include <bonobo/bonobo-control.h>
#include <bonobo/bonobo-i18n.h>
#include <gconf/gconf-client.h>
-#include "cal-client/cal-client.h"
+#include <libecal/e-cal.h>
#include "e-cal-model.h"
#include "e-tasks.h"
#include "tasks-component.h"
@@ -53,7 +53,7 @@ struct _TasksComponentPrivate {
static void
add_uri_for_source (ESource *source, ETasks *tasks)
{
- CalClient *client;
+ ECal *client;
ECalModel *model;
GError *error = NULL;
char *uri = e_source_get_uri (source);
@@ -61,8 +61,8 @@ add_uri_for_source (ESource *source, ETasks *tasks)
model = e_calendar_table_get_model (e_tasks_get_calendar_table (tasks));
client = e_cal_model_get_client_for_uri (model, uri);
if (!client) {
- client = cal_client_new (uri, CALOBJ_TYPE_TODO);
- if (cal_client_open (client, FALSE, &error)) {
+ client = e_cal_new (uri, CALOBJ_TYPE_TODO);
+ if (e_cal_open (client, FALSE, &error)) {
e_cal_model_add_client (model, client);
} else {
g_warning (G_STRLOC ": Could not open tasks at %s: %s", uri, error->message);
@@ -77,7 +77,7 @@ add_uri_for_source (ESource *source, ETasks *tasks)
static void
remove_uri_for_source (ESource *source, ETasks *tasks)
{
- CalClient *client;
+ ECal *client;
ECalModel *model;
char *uri = e_source_get_uri (source);
@@ -143,7 +143,7 @@ primary_source_selection_changed_cb (ESourceSelector *selector, TasksComponent *
{
TasksComponentPrivate *priv;
ESource *source;
- CalClient *client;
+ ECal *client;
char *uri;
ECalModel *model;
diff --git a/calendar/gui/tasks-control.c b/calendar/gui/tasks-control.c
index 2729416ca8..8264393573 100644
--- a/calendar/gui/tasks-control.c
+++ b/calendar/gui/tasks-control.c
@@ -169,7 +169,7 @@ tasks_control_get_property (BonoboPropertyBag *bag,
case TASKS_CONTROL_PROPERTY_URI_IDX:
model = e_calendar_table_get_model (e_tasks_get_calendar_table (tasks));
- uri = cal_client_get_uri (e_cal_model_get_default_client (model));
+ uri = e_cal_get_uri (e_cal_model_get_default_client (model));
BONOBO_ARG_SET_STRING (arg, uri);
break;
@@ -240,7 +240,7 @@ sensitize_commands (ETasks *tasks, BonoboControl *control, int n_selected)
g_assert (uic != NULL);
model = e_calendar_table_get_model (e_tasks_get_calendar_table (tasks));
- cal_client_is_read_only (e_cal_model_get_default_client (model), &read_only, NULL);
+ e_cal_is_read_only (e_cal_model_get_default_client (model), &read_only, NULL);
bonobo_ui_component_set_prop (uic, "/commands/TasksCut", "sensitive",
n_selected == 0 || read_only ? "0" : "1",