aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs/alarm-options.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/dialogs/alarm-options.c')
-rw-r--r--calendar/gui/dialogs/alarm-options.c128
1 files changed, 64 insertions, 64 deletions
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;