aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/alarm-notify
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/alarm-notify
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/alarm-notify')
-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
8 files changed, 94 insertions, 97 deletions
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);