From f8f2a6c3dc4a1a333603f7dbb7d6dce61fea3022 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Fri, 24 Mar 2006 04:32:57 +0000 Subject: [PATCH] Added date/time to calendar bubbles. --- webcit/INSTALL | 27 +++++++++------------ webcit/missing | 23 +++++++----------- webcit/src/calendar_view.c | 49 +++++++++++++++++++++++++++++++++++--- webcit/src/vcard.h | 1 + webcit/src/vcard_edit.c | 1 - 5 files changed, 66 insertions(+), 35 deletions(-) diff --git a/webcit/INSTALL b/webcit/INSTALL index 23e5f25d0..095b1eb40 100644 --- a/webcit/INSTALL +++ b/webcit/INSTALL @@ -1,7 +1,7 @@ Installation Instructions ************************* -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives @@ -102,16 +102,16 @@ for another architecture. Installation Names ================== -By default, `make install' installs the package's commands under -`/usr/local/bin', include files under `/usr/local/include', etc. You -can specify an installation prefix other than `/usr/local' by giving -`configure' the option `--prefix=PREFIX'. +By default, `make install' will install the package's files in +`/usr/local/bin', `/usr/local/man', etc. You can specify an +installation prefix other than `/usr/local' by giving `configure' the +option `--prefix=PREFIX'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you -pass the option `--exec-prefix=PREFIX' to `configure', the package uses -PREFIX as the prefix for installing programs and libraries. -Documentation and other data files still use the regular prefix. +give `configure' the option `--exec-prefix=PREFIX', the package will +use PREFIX as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular @@ -159,7 +159,7 @@ where SYSTEM can have one of these forms: need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should -use the option `--target=TYPE' to select the type of system they will +use the `--target=TYPE' option to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a @@ -189,13 +189,8 @@ them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc -causes the specified `gcc' to be used as the C compiler (unless it is -overridden in the site shell script). Here is a another example: - - /bin/bash ./configure CONFIG_SHELL=/bin/bash - -Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent -configuration-related scripts to be executed by `/bin/bash'. +will cause the specified gcc to be used as the C compiler (unless it is +overridden in the site shell script). `configure' Invocation ====================== diff --git a/webcit/missing b/webcit/missing index 894e786e1..64b5f901d 100755 --- a/webcit/missing +++ b/webcit/missing @@ -1,9 +1,9 @@ #! /bin/sh # Common stub for a few missing GNU programs while installing. -scriptversion=2005-06-08.21 +scriptversion=2004-09-07.08 -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005 +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. @@ -19,8 +19,8 @@ scriptversion=2005-06-08.21 # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -87,12 +87,12 @@ Supported PROGRAM values: yacc create \`y.tab.[ch]', if possible, from existing .[ch] Send bug reports to ." - exit $? + exit 0 ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" - exit $? + exit 0 ;; -*) @@ -288,18 +288,11 @@ WARNING: \`$1' is $msg. You should only need it if call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." - # The file to touch is that specified with -o ... file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then - # ... or it is the one specified with @setfilename ... - infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile` - # ... or it is derived from the source name (dir/f.texi becomes f.info) - test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info + file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` + file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` fi - # If the file does not exist, the user really needs makeinfo; - # let's fail without touching anything. - test -f $file || exit 1 touch $file ;; diff --git a/webcit/src/calendar_view.c b/webcit/src/calendar_view.c index da76ca5d5..98f52f601 100644 --- a/webcit/src/calendar_view.c +++ b/webcit/src/calendar_view.c @@ -43,6 +43,8 @@ void calendar_month_view_display_events(time_t thetime) { struct icaltimetype t; int month, day, year; int all_day_event = 0; + time_t tt; + char buf[256]; if (WC->num_cal == 0) { wprintf("


\n"); @@ -97,7 +99,7 @@ void calendar_month_view_display_events(time_t thetime) { bstr("day") ); - wprintf("%s ", _("Summary:")); + wprintf("%s ", _("Summary:")); escputs((char *)icalproperty_get_comment(p)); wprintf("
"); @@ -105,16 +107,57 @@ void calendar_month_view_display_events(time_t thetime) { WC->disp_cal[i].cal, ICAL_LOCATION_PROPERTY); if (q) { - wprintf("%s ", _("Location:")); + wprintf("%s ", _("Location:")); escputs((char *)icalproperty_get_comment(q)); wprintf("
"); } + /** + * Only show start/end times if we're actually looking at the VEVENT + * component. Otherwise it shows bogus dates for e.g. timezones + */ + if (icalcomponent_isa(WC->disp_cal[i].cal) == ICAL_VEVENT_COMPONENT) { + + q = icalcomponent_get_first_property(WC->disp_cal[i].cal, + ICAL_DTSTART_PROPERTY); + if (q != NULL) { + t = icalproperty_get_dtstart(q); + + if (t.is_date) { + struct tm d_tm; + char d_str[32]; + memset(&d_tm, 0, sizeof d_tm); + d_tm.tm_year = t.year - 1900; + d_tm.tm_mon = t.month - 1; + d_tm.tm_mday = t.day; + wc_strftime(d_str, sizeof d_str, "%x", &d_tm); + wprintf("%s %s
", + _("Date:"), d_str); + } + else { + tt = icaltime_as_timet(t); + fmt_date(buf, tt, 0); + wprintf("%s %s
", + _("Starting date/time:"), buf); + } + } + + q = icalcomponent_get_first_property(WC->disp_cal[i].cal, + ICAL_DTEND_PROPERTY); + if (q != NULL) { + t = icalproperty_get_dtend(q); + tt = icaltime_as_timet(t); + fmt_date(buf, tt, 0); + wprintf("%s %s
", + _("Ending date/time:"), buf); + } + } + q = icalcomponent_get_first_property( WC->disp_cal[i].cal, ICAL_DESCRIPTION_PROPERTY); if (q) { - wprintf("%s ", _("Notes:")); + wprintf("%s ", _("Notes:")); escputs((char *)icalproperty_get_comment(q)); wprintf("
"); } diff --git a/webcit/src/vcard.h b/webcit/src/vcard.h index ac30d4298..33a455905 100644 --- a/webcit/src/vcard.h +++ b/webcit/src/vcard.h @@ -33,6 +33,7 @@ void vcard_set_prop(struct vCard *v, char *name, char *value, int append); char *vcard_get_prop(struct vCard *v, char *propname, int is_partial, int instance, int return_propname); char *vcard_serialize(struct vCard *); +void vcard_add_prop(struct vCard *v, char *propname, char *propvalue); /*@}*/ diff --git a/webcit/src/vcard_edit.c b/webcit/src/vcard_edit.c index bf87f8c58..4377a8007 100644 --- a/webcit/src/vcard_edit.c +++ b/webcit/src/vcard_edit.c @@ -436,7 +436,6 @@ void submit_vcard(void) { return; } - lprintf(9, "%s\n", serialized_vcard); serv_puts("Content-type: text/x-vcard; charset=UTF-8"); serv_puts(""); serv_printf("%s\r\n", serialized_vcard); -- 2.39.2