From e8a8ab8ad49323edb091e05f58e632c565436a3e Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Fri, 1 Oct 2004 16:23:24 +0000 Subject: [PATCH] * Set up framework for "notes" view, and added a skeleton function for the actual display. --- webcit/ChangeLog | 5 ++++- webcit/Makefile.in | 4 ++-- webcit/messages.c | 15 ++++++++++++--- webcit/notes.c | 30 ++++++++++++++++++++++++++++++ webcit/roomops.c | 3 ++- webcit/webcit.h | 2 ++ 6 files changed, 52 insertions(+), 7 deletions(-) create mode 100644 webcit/notes.c diff --git a/webcit/ChangeLog b/webcit/ChangeLog index ef151dfb9..ac896a386 100644 --- a/webcit/ChangeLog +++ b/webcit/ChangeLog @@ -1,4 +1,8 @@ $Log$ +Revision 524.2 2004/10/01 16:23:23 ajc +* Set up framework for "notes" view, and added a skeleton function for + the actual display. + Revision 524.1 2004/09/30 03:44:01 ajc * fix line width break problem in chat @@ -2083,4 +2087,3 @@ Sun Dec 6 19:50:55 EST 1998 Art Cancro 1998-12-03 Nathan Bryant * webserver.c: warning fix - diff --git a/webcit/Makefile.in b/webcit/Makefile.in index 029e3fa6b..b75b1a66a 100644 --- a/webcit/Makefile.in +++ b/webcit/Makefile.in @@ -36,7 +36,7 @@ webserver: webserver.o context_loop.o tools.o ical_dezonify.o \ vcard.o vcard_edit.o preferences.o html2html.o listsub.o \ mime_parser.o graphics.o netconf.o siteconfig.o subst.o \ calendar.o calendar_tools.o calendar_view.o event.o \ - availability.o iconbar.o crypto.o inetconf.o \ + availability.o iconbar.o crypto.o inetconf.o notes.o \ $(LIBOBJS) $(CC) webserver.o context_loop.o tools.o cookie_conversion.o \ webcit.o auth.o tcp_sockets.o mainmenu.o serv_func.o who.o listsub.o \ @@ -44,7 +44,7 @@ webserver: webserver.o context_loop.o tools.o ical_dezonify.o \ locate_host.o siteconfig.o subst.o vcard.o vcard_edit.o floors.o \ mime_parser.o graphics.o netconf.o preferences.o html2html.o \ summary.o calendar.o calendar_tools.o calendar_view.o event.o \ - availability.o ical_dezonify.o iconbar.o crypto.o inetconf.o \ + availability.o ical_dezonify.o iconbar.o crypto.o inetconf.o notes.o \ $(LIBOBJS) $(LIBS) $(LDFLAGS) -o webserver .c.o: diff --git a/webcit/messages.c b/webcit/messages.c index d2a6f1c17..5092c6abc 100644 --- a/webcit/messages.c +++ b/webcit/messages.c @@ -1032,6 +1032,7 @@ void readloop(char *oper) int is_singlecard = 0; int is_calendar = 0; int is_tasks = 0; + int is_notes = 0; int remaining_messages; int lo, hi; int lowest_displayed = (-1); @@ -1103,11 +1104,16 @@ void readloop(char *oper) strcpy(cmd, "MSGS ALL"); maxmsgs = 32767; } + if (WC->wc_view == VIEW_NOTES) { /* notes */ + is_notes = 1; + strcpy(cmd, "MSGS ALL"); + maxmsgs = 32767; + } nummsgs = load_msg_ptrs(cmd); if (nummsgs == 0) { - if ((!is_tasks) && (!is_calendar)) { + if ((!is_tasks) && (!is_calendar) && (!is_notes)) { if (!strcmp(oper, "readnew")) { wprintf("No new messages.\n"); } else if (!strcmp(oper, "readold")) { @@ -1188,6 +1194,9 @@ void readloop(char *oper) else if (is_tasks) { display_task(WC->msgarr[a]); } + else if (is_notes) { + display_note(WC->msgarr[a]); + } else { read_message(WC->msgarr[a]); } @@ -1217,7 +1226,7 @@ void readloop(char *oper) /* If we're only looking at one message, do a prev/next thing */ if (num_displayed == 1) { - if ((!is_tasks) && (!is_calendar) && (!is_addressbook) && (!is_singlecard)) { + if ((!is_tasks) && (!is_calendar) && (!is_addressbook) && (!is_notes) && (!is_singlecard)) { wprintf("
" "
" @@ -1266,7 +1275,7 @@ void readloop(char *oper) * messages, then display the selector bar */ if (num_displayed > 1) { - if ((!is_tasks) && (!is_calendar) && (!is_addressbook) && (!is_singlecard)) { + if ((!is_tasks) && (!is_calendar) && (!is_addressbook) && (!is_notes) && (!is_singlecard)) { wprintf("
" "\n" diff --git a/webcit/notes.c b/webcit/notes.c new file mode 100644 index 000000000..8fccbdcdf --- /dev/null +++ b/webcit/notes.c @@ -0,0 +1,30 @@ +/* + * $Id$ + * + * Functions which handle "sticky notes" + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "webcit.h" +#include "webserver.h" + +void display_note(long msgnum) { + wprintf("
" "Reading #%d-%d of %d messages.
\n"); + wprintf("FIXME note #%ld\n", msgnum); + wprintf("