X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fevent.c;h=d786998ab8ef818c0d5bebf7e15b291c1b04b7e1;hb=HEAD;hp=c505b10bc7b3ff1b99d1cf3209f6be36a15fce5f;hpb=c6aec42f213ec284e34648f3d69bcf927dccddb1;p=citadel.git diff --git a/webcit/event.c b/webcit/event.c index c505b10bc..ffe0688ab 100644 --- a/webcit/event.c +++ b/webcit/event.c @@ -1,8 +1,7 @@ - /* * Editing calendar events. * - * Copyright (c) 1996-2012 by the citadel.org team + * Copyright (c) 2002-2012 by the citadel.org team * * This program is open source software. You can redistribute it and/or * modify it under the terms of the GNU General Public License, version 3. @@ -14,7 +13,7 @@ */ #include "webcit.h" -#include "webserver.h" + #include "calendar.h" /* @@ -22,7 +21,9 @@ * supplied_vevent the event to edit * msgnum reference on the citserver */ -void display_edit_individual_event(icalcomponent * supplied_vevent, long msgnum, char *from, int unread, calview * calv) { +void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum, char *from, + int unread, calview *calv) +{ wcsession *WCC = WC; icalcomponent *vevent; icalproperty *p; @@ -38,7 +39,6 @@ void display_edit_individual_event(icalcomponent * supplied_vevent, long msgnum, char buf[SIZ]; int organizer_is_me = 0; int i, j = 0; - /************************************************************ * Uncomment this to see the UID in calendar events for debugging int sequence = 0; @@ -91,12 +91,11 @@ void display_edit_individual_event(icalcomponent * supplied_vevent, long msgnum, tabnames[2] = _("Recurrence"); get_pref_long("weekstart", &weekstart, 17); - if (weekstart > 6) - weekstart = 0; + if (weekstart > 6) weekstart = 0; syslog(LOG_DEBUG, "display_edit_individual_event(%ld) calview=%s year=%s month=%s day=%s\n", - msgnum, bstr("calview"), bstr("year"), bstr("month"), bstr("day") - ); + msgnum, bstr("calview"), bstr("year"), bstr("month"), bstr("day") + ); /* populate the weekday names - begin */ now = time(NULL); @@ -105,7 +104,7 @@ void display_edit_individual_event(icalcomponent * supplied_vevent, long msgnum, now -= 86400L; localtime_r(&now, &tm_now); } - for (i = 0; i < 7; ++i) { + for (i=0; i<7; ++i) { localtime_r(&now, &tm_now); wc_strftime(weekday_labels[i], 32, "%A", &tm_now); now += 86400L; @@ -113,9 +112,9 @@ void display_edit_individual_event(icalcomponent * supplied_vevent, long msgnum, /* populate the weekday names - end */ /* populate the month names - begin */ - now = 259200L; /* 1970-jan-04 is the first Sunday ever */ + now = 259200L; /* 1970-jan-04 is the first Sunday ever */ localtime_r(&now, &tm_now); - for (i = 0; i < 12; ++i) { + for (i=0; i<12; ++i) { localtime_r(&now, &tm_now); wc_strftime(month_labels[i], 32, "%B", &tm_now); now += 2678400L; @@ -141,8 +140,11 @@ void display_edit_individual_event(icalcomponent * supplied_vevent, long msgnum, * new one. */ if (icalcomponent_isa(vevent) == ICAL_VCALENDAR_COMPONENT) { - display_edit_individual_event(icalcomponent_get_first_component(vevent, ICAL_VEVENT_COMPONENT), - msgnum, from, unread, NULL); + display_edit_individual_event( + icalcomponent_get_first_component( + vevent, ICAL_VEVENT_COMPONENT), + msgnum, from, unread, NULL + ); return; } } @@ -153,7 +155,6 @@ void display_edit_individual_event(icalcomponent * supplied_vevent, long msgnum, /* Learn the sequence */ p = icalcomponent_get_first_property(vevent, ICAL_SEQUENCE_PROPERTY); - /************************************************************ * Uncomment this to see the UID in calendar events for debugging if (p != NULL) { @@ -188,11 +189,16 @@ void display_edit_individual_event(icalcomponent * supplied_vevent, long msgnum, StrEscAppend(WCC->WBuf, WCC->CurRoom.name, NULL, 0, 0); wc_printf("\">\n"); - wc_printf("\n", msgnum); - wc_printf("\n", bstr("calview")); - wc_printf("\n", bstr("year")); - wc_printf("\n", bstr("month")); - wc_printf("\n", bstr("day")); + wc_printf("\n", + msgnum); + wc_printf("\n", + bstr("calview")); + wc_printf("\n", + bstr("year")); + wc_printf("\n", + bstr("month")); + wc_printf("\n", + bstr("day")); tabbed_dialog(3, tabnames); @@ -203,19 +209,23 @@ void display_edit_individual_event(icalcomponent * supplied_vevent, long msgnum, wc_printf("
");
wc_printf(_("Attendees"));
- wc_printf(" " ""); + wc_printf(" " + ""); wc_printf(_("(One per line)")); wc_printf("\n"); /* Pop open an address book -- begin */ - wc_printf(" " - "" - "", _("Attendees"), _("Contacts") - ); + wc_printf( + " " + "" + "", + _("Attendees"), + _("Contacts") + ); /* Pop open an address book -- end */ wc_printf(" | " - " |