diff options
author | JP Rosevear <jpr@src.gnome.org> | 2003-11-07 13:52:24 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2003-11-07 13:52:24 +0800 |
commit | 200606f92810d3de322e5ee96f8326e1a656f8bb (patch) | |
tree | da0dc27f5311128dcb6e7eb6400931e45743372e /calendar/gui/dialogs | |
parent | e5472b4cc9a4bb80b89437a16f8b77943ea35555 (diff) | |
download | gsoc2013-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/dialogs')
33 files changed, 644 insertions, 646 deletions
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(); |