From 5b2764be1af7b1a4aa2e027c71697883abe3afed Mon Sep 17 00:00:00 2001 From: nobody Date: Mon, 29 May 2000 15:42:50 +0000 Subject: This commit was manufactured by cvs2svn to create tag 'G'. svn path=/tags/G/; revision=3261 --- .cvsignore | 24 - AUTHORS | 33 - COPYING | 340 - ChangeLog | 4741 ----- HACKING | 0 INSTALL | 182 - MAINTAINERS | 1 - Makefile.am | 36 - NEWS | 8 - README | 145 - acconfig.h | 21 - addressbook/.cvsignore | 6 - addressbook/ChangeLog | 929 - addressbook/Makefile.am | 2 - addressbook/backend/.cvsignore | 6 - addressbook/backend/Makefile.am | 1 - addressbook/backend/ebook/.cvsignore | 15 - addressbook/backend/ebook/Makefile.am | 102 - addressbook/backend/ebook/TODO | 2 - addressbook/backend/ebook/e-book-listener.c | 587 - addressbook/backend/ebook/e-book-listener.h | 95 - addressbook/backend/ebook/e-book-types.h | 31 - addressbook/backend/ebook/e-book-view-listener.c | 345 - addressbook/backend/ebook/e-book-view-listener.h | 72 - addressbook/backend/ebook/e-book-view.c | 281 - addressbook/backend/ebook/e-book-view.h | 55 - addressbook/backend/ebook/e-book.c | 1010 -- addressbook/backend/ebook/e-book.h | 123 - addressbook/backend/ebook/e-card-cursor.c | 235 - addressbook/backend/ebook/e-card-cursor.h | 52 - addressbook/backend/ebook/e-card-iterator.c | 169 - addressbook/backend/ebook/e-card-iterator.h | 61 - addressbook/backend/ebook/e-card-list-iterator.c | 199 - addressbook/backend/ebook/e-card-list-iterator.h | 44 - addressbook/backend/ebook/e-card-list.c | 140 - addressbook/backend/ebook/e-card-list.h | 60 - addressbook/backend/ebook/e-card-pairs.h | 118 - addressbook/backend/ebook/e-card-simple.c | 1185 -- addressbook/backend/ebook/e-card-simple.h | 197 - addressbook/backend/ebook/e-card-types.h | 89 - addressbook/backend/ebook/e-card.c | 3248 ---- addressbook/backend/ebook/e-card.h | 137 - addressbook/backend/ebook/load-pine-addressbook.c | 147 - addressbook/backend/ebook/test-card.c | 194 - addressbook/backend/ebook/test-client-list.c | 82 - addressbook/backend/ebook/test-client.c | 190 - addressbook/backend/idl/.cvsignore | 6 - addressbook/backend/idl/Makefile.am | 6 - addressbook/backend/idl/addressbook.idl | 132 - addressbook/backend/pas/.cvsignore | 11 - addressbook/backend/pas/Makefile.am | 46 - addressbook/backend/pas/TODO | 2 - addressbook/backend/pas/pas-backend-file.c | 1238 -- addressbook/backend/pas/pas-backend-file.h | 32 - addressbook/backend/pas/pas-backend-ldap.c | 1096 -- addressbook/backend/pas/pas-backend-ldap.h | 32 - addressbook/backend/pas/pas-backend.c | 162 - addressbook/backend/pas/pas-backend.h | 73 - addressbook/backend/pas/pas-book-factory.c | 639 - addressbook/backend/pas/pas-book-factory.h | 50 - addressbook/backend/pas/pas-book-view.c | 262 - addressbook/backend/pas/pas-book-view.h | 53 - addressbook/backend/pas/pas-book.c | 677 - addressbook/backend/pas/pas-book.h | 98 - addressbook/backend/pas/pas-card-cursor.c | 227 - addressbook/backend/pas/pas-card-cursor.h | 58 - addressbook/contact-editor/.cvsignore | 8 - addressbook/contact-editor/Makefile.am | 55 - addressbook/contact-editor/arrow.png | Bin 174 -> 0 bytes addressbook/contact-editor/briefcase.png | Bin 390 -> 0 bytes addressbook/contact-editor/categories-strings.h | 9 - addressbook/contact-editor/categories.glade | 190 - addressbook/contact-editor/contact-editor.glade | 2416 --- .../contact-editor/e-contact-editor-categories.c | 466 - .../contact-editor/e-contact-editor-categories.h | 83 - .../contact-editor/e-contact-editor-fullname.c | 214 - .../contact-editor/e-contact-editor-fullname.h | 75 - .../contact-editor/e-contact-editor-strings.h | 41 - addressbook/contact-editor/e-contact-editor.c | 1300 -- addressbook/contact-editor/e-contact-editor.h | 96 - addressbook/contact-editor/e-contact-save-as.c | 77 - addressbook/contact-editor/e-contact-save-as.h | 42 - addressbook/contact-editor/email.png | Bin 331 -> 0 bytes addressbook/contact-editor/fullname-strings.h | 25 - addressbook/contact-editor/fullname.glade | 391 - addressbook/contact-editor/head.png | Bin 493 -> 0 bytes addressbook/contact-editor/netfreebusy.png | Bin 755 -> 0 bytes addressbook/contact-editor/netmeeting.png | Bin 803 -> 0 bytes addressbook/contact-editor/phone.png | Bin 506 -> 0 bytes addressbook/contact-editor/snailmail.png | Bin 516 -> 0 bytes addressbook/contact-editor/test-editor.c | 158 - addressbook/contact-editor/web.png | Bin 573 -> 0 bytes addressbook/demo/.cvsignore | 8 - addressbook/demo/Makefile.am | 63 - addressbook/demo/addressbook-factory.c | 47 - addressbook/demo/addressbook-widget.c | 537 - addressbook/demo/addressbook-widget.h | 52 - addressbook/demo/addressbook.c | 199 - addressbook/demo/addressbook.gnorba | 11 - addressbook/demo/addressbook.h | 8 - addressbook/demo/demo.c | 466 - addressbook/demo/e-test-model.c | 385 - addressbook/demo/e-test-model.h | 64 - addressbook/demo/spec | 12 - addressbook/ename/.cvsignore | 8 - addressbook/ename/Makefile.am | 45 - addressbook/ename/TODO | 2 - addressbook/ename/e-name-western-tables.h | 53 - addressbook/ename/e-name-western.c | 868 - addressbook/ename/e-name-western.h | 21 - addressbook/ename/test-ename-western-gtk.c | 148 - addressbook/ename/test-ename-western.c | 70 - addressbook/gui/.cvsignore | 6 - addressbook/gui/Makefile.am | 1 - addressbook/gui/component/.cvsignore | 10 - .../component/GNOME_Evolution_Addressbook.oaf.in | 56 - .../component/GNOME_Evolution_Addressbook.oafinfo | 56 - addressbook/gui/component/Makefile.am | 88 - addressbook/gui/component/addressbook-component.c | 100 - addressbook/gui/component/addressbook-component.h | 29 - addressbook/gui/component/addressbook-factory.c | 82 - addressbook/gui/component/addressbook.c | 946 - addressbook/gui/component/addressbook.gnorba | 23 - addressbook/gui/component/addressbook.h | 9 - addressbook/gui/component/addressbook.oafinfo | 56 - addressbook/gui/component/e-addressbook-model.c | 381 - addressbook/gui/component/e-addressbook-model.h | 52 - addressbook/gui/component/e-ldap-server-dialog.c | 128 - addressbook/gui/component/e-ldap-server-dialog.h | 14 - addressbook/gui/component/ldap-server-dialog.glade | 351 - .../gui/component/ldap-server-dialog.glade.h | 10 - addressbook/gui/contact-editor/.cvsignore | 8 - addressbook/gui/contact-editor/Makefile.am | 55 - addressbook/gui/contact-editor/arrow.png | Bin 174 -> 0 bytes addressbook/gui/contact-editor/briefcase.png | Bin 390 -> 0 bytes .../gui/contact-editor/categories-strings.h | 9 - addressbook/gui/contact-editor/categories.glade | 190 - .../gui/contact-editor/contact-editor.glade | 2416 --- .../contact-editor/e-contact-editor-categories.c | 466 - .../contact-editor/e-contact-editor-categories.h | 83 - .../gui/contact-editor/e-contact-editor-fullname.c | 214 - .../gui/contact-editor/e-contact-editor-fullname.h | 75 - .../gui/contact-editor/e-contact-editor-strings.h | 41 - addressbook/gui/contact-editor/e-contact-editor.c | 1300 -- addressbook/gui/contact-editor/e-contact-editor.h | 96 - addressbook/gui/contact-editor/e-contact-save-as.c | 77 - addressbook/gui/contact-editor/e-contact-save-as.h | 42 - addressbook/gui/contact-editor/email.png | Bin 331 -> 0 bytes addressbook/gui/contact-editor/fullname-strings.h | 25 - addressbook/gui/contact-editor/fullname.glade | 391 - addressbook/gui/contact-editor/head.png | Bin 493 -> 0 bytes addressbook/gui/contact-editor/netfreebusy.png | Bin 755 -> 0 bytes addressbook/gui/contact-editor/netmeeting.png | Bin 803 -> 0 bytes addressbook/gui/contact-editor/phone.png | Bin 506 -> 0 bytes addressbook/gui/contact-editor/snailmail.png | Bin 516 -> 0 bytes addressbook/gui/contact-editor/test-editor.c | 158 - addressbook/gui/contact-editor/web.png | Bin 573 -> 0 bytes addressbook/gui/minicard/.cvsignore | 11 - addressbook/gui/minicard/Makefile.am | 91 - addressbook/gui/minicard/e-minicard-label.c | 421 - addressbook/gui/minicard/e-minicard-label.h | 82 - addressbook/gui/minicard/e-minicard-view.c | 305 - addressbook/gui/minicard/e-minicard-view.h | 93 - addressbook/gui/minicard/e-minicard.c | 686 - addressbook/gui/minicard/e-minicard.h | 98 - addressbook/gui/minicard/e-reflow-sorted.c | 234 - addressbook/gui/minicard/e-reflow-sorted.h | 89 - addressbook/gui/minicard/e-reflow.c | 776 - addressbook/gui/minicard/e-reflow.h | 106 - addressbook/gui/minicard/test-minicard-label.c | 128 - addressbook/gui/minicard/test-minicard-view.c | 206 - addressbook/gui/minicard/test-minicard.c | 117 - addressbook/gui/minicard/test-reflow.c | 193 - addressbook/gui/widgets/Makefile.am | 91 - addressbook/gui/widgets/e-addressbook-model.c | 381 - addressbook/gui/widgets/e-addressbook-model.h | 52 - addressbook/gui/widgets/e-minicard-label.c | 421 - addressbook/gui/widgets/e-minicard-label.h | 82 - addressbook/gui/widgets/e-minicard-view.c | 305 - addressbook/gui/widgets/e-minicard-view.h | 93 - addressbook/gui/widgets/e-minicard.c | 686 - addressbook/gui/widgets/e-minicard.h | 98 - addressbook/gui/widgets/test-minicard-label.c | 128 - addressbook/gui/widgets/test-minicard-view.c | 206 - addressbook/gui/widgets/test-minicard.c | 117 - addressbook/gui/widgets/test-reflow.c | 193 - addressbook/printing/.cvsignore | 9 - addressbook/printing/Makefile.am | 66 - .../printing/e-contact-print-style-editor.c | 150 - .../printing/e-contact-print-style-editor.h | 74 - addressbook/printing/e-contact-print-types.h | 74 - addressbook/printing/e-contact-print.c | 1023 -- addressbook/printing/e-contact-print.glade | 2009 --- addressbook/printing/e-contact-print.glade.h | 56 - addressbook/printing/e-contact-print.h | 32 - addressbook/printing/medbook.ecps | 30 - addressbook/printing/phonelist.ecps | 29 - addressbook/printing/smallbook.ecps | 30 - .../printing/test-contact-print-style-editor.c | 87 - addressbook/printing/test-print.c | 82 - art/.cvsignore | 2 - art/Makefile.am | 31 - art/attachment.xpm | 21 - art/briefcase.png | Bin 2358 -> 0 bytes art/cellphone.png | Bin 3440 -> 0 bytes art/envelope.png | Bin 3168 -> 0 bytes art/evolution-calendar-mini.png | Bin 491 -> 0 bytes art/evolution-calendar.png | Bin 2733 -> 0 bytes art/evolution-contacts-mini.png | Bin 533 -> 0 bytes art/evolution-contacts.png | Bin 3947 -> 0 bytes art/evolution-inbox-mini.png | Bin 478 -> 0 bytes art/evolution-inbox.png | Bin 4281 -> 0 bytes art/evolution-notes-mini.png | Bin 516 -> 0 bytes art/evolution-notes.png | Bin 3400 -> 0 bytes art/evolution-tasks-mini.png | Bin 708 -> 0 bytes art/evolution-tasks.png | Bin 3515 -> 0 bytes art/evolution-today.png | Bin 3713 -> 0 bytes art/globe.png | Bin 3328 -> 0 bytes art/house.png | Bin 4135 -> 0 bytes art/mail-new.xpm | 67 - art/mail-read.xpm | 70 - art/mail-replied.xpm | 52 - art/malehead.png | Bin 4220 -> 0 bytes art/mark.xpm | 21 - art/meeting.xpm | 64 - art/priority-high.xpm | 21 - art/priority-low.xpm | 21 - autogen.sh | 10 - calendar/.cvsignore | 10 - calendar/AUTHORS | 4 - calendar/ChangeLog | 4107 ----- calendar/Makefile.am | 1 - calendar/TODO | 88 - calendar/cal-client/.cvsignore | 16 - calendar/cal-client/Makefile.am | 62 - calendar/cal-client/cal-client.c | 968 - calendar/cal-client/cal-client.h | 97 - calendar/cal-client/cal-listener.c | 402 - calendar/cal-client/cal-listener.h | 79 - calendar/cal-client/client-test.c | 205 - calendar/cal-util/.cvsignore | 6 - calendar/cal-util/Makefile.am | 25 - calendar/cal-util/cal-recur.c | 1131 -- calendar/cal-util/cal-recur.h | 102 - calendar/cal-util/cal-util.c | 100 - calendar/cal-util/cal-util.h | 68 - calendar/cal-util/calobj.c | 1810 -- calendar/cal-util/calobj.h | 287 - calendar/cal-util/icalendar-save.c | 509 - calendar/cal-util/icalendar-save.h | 13 - calendar/cal-util/icalendar-test.c | 146 - calendar/cal-util/icalendar.c | 674 - calendar/cal-util/icalendar.h | 13 - calendar/cal-util/timeutil.c | 557 - calendar/cal-util/timeutil.h | 81 - .../calendar/calendar-conduit-control-applet.c | 360 - .../calendar-conduit-control-applet.desktop | 11 - calendar/conduits/calendar/calendar-conduit.c | 1406 -- calendar/conduits/calendar/calendar-conduit.h | 135 - .../conduits/todo/todo-conduit-control-applet.c | 287 - .../todo/todo-conduit-control-applet.desktop | 10 - calendar/conduits/todo/todo-conduit.c | 256 - calendar/conduits/todo/todo-conduit.h | 59 - calendar/doc/.cvsignore | 2 - calendar/doc/C/.cvsignore | 5 - calendar/doc/C/Makefile.am | 44 - calendar/doc/C/gnomecal.sgml | 465 - calendar/doc/C/images/cal-props.gif | Bin 8929 -> 0 bytes calendar/doc/C/images/calday.gif | Bin 16264 -> 0 bytes calendar/doc/C/images/calmonth.gif | Bin 13299 -> 0 bytes calendar/doc/C/images/calweek.gif | Bin 14650 -> 0 bytes calendar/doc/C/images/calyear.gif | Bin 27058 -> 0 bytes calendar/doc/C/topic.dat | 2 - calendar/doc/Makefile.am | 1 - calendar/gui/.cvsignore | 21 - calendar/gui/GNOME_Evolution_Calendar.oaf.in | 29 - calendar/gui/GNOME_Evolution_Calendar.oafinfo | 29 - .../gui/GNOME_Evolution_Calendar_Control.oaf.in | 28 - .../gui/GNOME_Evolution_Calendar_Control.oafinfo | 28 - .../gui/GNOME_Evolution_Calendar_gnomecal.oaf.in | 29 - .../gui/GNOME_Evolution_Calendar_gnomecal.oafinfo | 29 - calendar/gui/GnomeCal.idl | 104 - calendar/gui/Makefile.am | 142 - calendar/gui/alarm-notify/alarm-notify-dialog.c | 218 - calendar/gui/alarm-notify/alarm-notify-dialog.h | 44 - calendar/gui/alarm-notify/alarm-notify.glade | 230 - calendar/gui/alarm-notify/alarm.c | 305 - calendar/gui/alarm-notify/alarm.h | 40 - calendar/gui/alarm.c | 305 - calendar/gui/alarm.h | 40 - calendar/gui/bell.xpm | 83 - calendar/gui/cal_struct.h | 27 - calendar/gui/calendar-commands.c | 882 - calendar/gui/calendar-commands.h | 129 - calendar/gui/calendar-component.c | 98 - calendar/gui/calendar-component.h | 29 - calendar/gui/calendar-conduit-control-applet.c | 360 - .../gui/calendar-conduit-control-applet.desktop | 11 - calendar/gui/calendar-conduit.c | 1406 -- calendar/gui/calendar-conduit.h | 135 - calendar/gui/calendar-control.gnorba | 11 - calendar/gui/calendar-control.oafinfo | 28 - calendar/gui/calendar-pilot-sync.c | 658 - calendar/gui/component-factory.c | 98 - calendar/gui/component-factory.h | 29 - calendar/gui/control-factory.c | 193 - calendar/gui/control-factory.h | 30 - calendar/gui/dayview.xpm | 42 - calendar/gui/dialogs/.cvsignore | 3 - calendar/gui/dialogs/Makefile.am | 27 - calendar/gui/dialogs/alarm-notify-dialog.c | 218 - calendar/gui/dialogs/alarm-notify-dialog.h | 44 - calendar/gui/dialogs/alarm-notify.glade | 230 - calendar/gui/dialogs/alarm-notify.glade.h | 10 - calendar/gui/e-day-view-main-item.c | 648 - calendar/gui/e-day-view-main-item.h | 65 - calendar/gui/e-day-view-time-item.c | 531 - calendar/gui/e-day-view-time-item.h | 74 - calendar/gui/e-day-view-top-item.c | 583 - calendar/gui/e-day-view-top-item.h | 65 - calendar/gui/e-day-view.c | 5199 ------ calendar/gui/e-day-view.h | 502 - calendar/gui/e-week-view-event-item.c | 748 - calendar/gui/e-week-view-event-item.h | 70 - calendar/gui/e-week-view-main-item.c | 367 - calendar/gui/e-week-view-main-item.h | 66 - calendar/gui/e-week-view-titles-item.c | 300 - calendar/gui/e-week-view-titles-item.h | 66 - calendar/gui/e-week-view.c | 2738 --- calendar/gui/e-week-view.h | 375 - calendar/gui/event-editor-dialog.glade | 1918 -- calendar/gui/event-editor-utils.c | 228 - calendar/gui/event-editor-utils.h | 22 - calendar/gui/event-editor.c | 1208 -- calendar/gui/event-editor.h | 86 - calendar/gui/eventedit.c | 1576 -- calendar/gui/eventedit.h | 83 - calendar/gui/evolution-calendar-control.c | 201 - calendar/gui/evolution-calendar.gnorba | 11 - calendar/gui/evolution-calendar.oafinfo | 29 - calendar/gui/getdate.y | 1001 -- calendar/gui/gncal-todo.c | 904 - calendar/gui/gncal-todo.h | 55 - calendar/gui/gnome-cal.c | 1406 -- calendar/gui/gnome-cal.h | 131 - calendar/gui/gnome-cal.html | 44 - calendar/gui/gnome-calendar-conduit.png | Bin 3000 -> 0 bytes calendar/gui/gnome-month-item.c | 1246 -- calendar/gui/gnome-month-item.h | 165 - calendar/gui/gnomecal.gnorba | 11 - calendar/gui/gnomecal.oafinfo | 27 - calendar/gui/goto.c | 326 - calendar/gui/icalendar-types | 39 - calendar/gui/layout.c | 309 - calendar/gui/layout.h | 56 - calendar/gui/main.c | 95 - calendar/gui/mark.c | 289 - calendar/gui/mark.h | 75 - calendar/gui/monthview.xpm | 46 - calendar/gui/popup-menu.c | 41 - calendar/gui/popup-menu.h | 25 - calendar/gui/print.c | 1338 -- calendar/gui/print.h | 41 - calendar/gui/prop.c | 932 - calendar/gui/recur.xpm | 83 - calendar/gui/test.vcf | 133 - calendar/gui/test2.vcf | 133 - calendar/gui/todo-conduit-control-applet.c | 287 - calendar/gui/todo-conduit-control-applet.desktop | 10 - calendar/gui/todo-conduit.c | 256 - calendar/gui/todo-conduit.h | 59 - calendar/gui/topic.dat | 2 - calendar/gui/weekview.xpm | 41 - calendar/gui/workweekview.xpm | 43 - calendar/gui/yearview.xpm | 45 - calendar/idl/.cvsignore | 2 - calendar/idl/Makefile.am | 7 - calendar/idl/evolution-calendar.idl | 158 - calendar/pcs/.cvsignore | 12 - calendar/pcs/Makefile.am | 64 - calendar/pcs/cal-backend-imc.c | 1293 -- calendar/pcs/cal-backend-imc.h | 61 - calendar/pcs/cal-backend.c | 358 - calendar/pcs/cal-backend.h | 110 - calendar/pcs/cal-common.h | 41 - calendar/pcs/cal-factory.c | 829 - calendar/pcs/cal-factory.h | 75 - calendar/pcs/cal.c | 707 - calendar/pcs/cal.h | 70 - calendar/pcs/icalendar-save.c | 509 - calendar/pcs/icalendar-save.h | 13 - calendar/pcs/icalendar-test.c | 146 - calendar/pcs/icalendar.c | 674 - calendar/pcs/icalendar.h | 13 - calendar/pcs/job.c | 98 - calendar/pcs/job.h | 35 - camel/.cvsignore | 7 - camel/CODING.STYLE | 19 - camel/ChangeLog | 3149 ---- camel/Makefile.am | 131 - camel/README | 57 - camel/README.COPYRIGHT | 47 - camel/README.HACKING | 14 - camel/camel-address.c | 151 - camel/camel-address.h | 57 - camel/camel-arg-collector.c | 186 - camel/camel-data-wrapper.c | 285 - camel/camel-data-wrapper.h | 96 - camel/camel-exception-list.def | 35 - camel/camel-exception.c | 279 - camel/camel-exception.h | 89 - camel/camel-folder-pt-proxy.c | 809 - camel/camel-folder-pt-proxy.h | 92 - camel/camel-folder-search.c | 496 - camel/camel-folder-search.h | 85 - camel/camel-folder-summary.c | 1410 -- camel/camel-folder-summary.h | 191 - camel/camel-folder.c | 1166 -- camel/camel-folder.h | 289 - camel/camel-internet-address.c | 287 - camel/camel-internet-address.h | 51 - camel/camel-marshal-utils.c | 343 - camel/camel-marshal-utils.h | 102 - camel/camel-medium.c | 275 - camel/camel-medium.h | 92 - camel/camel-mime-filter-basic.c | 219 - camel/camel-mime-filter-basic.h | 58 - camel/camel-mime-filter-charset.c | 243 - camel/camel-mime-filter-charset.h | 52 - camel/camel-mime-filter-from.c | 243 - camel/camel-mime-filter-from.h | 50 - camel/camel-mime-filter-index.c | 178 - camel/camel-mime-filter-index.h | 55 - camel/camel-mime-filter-save.c | 160 - camel/camel-mime-filter-save.h | 50 - camel/camel-mime-filter-smtp.c | 286 - camel/camel-mime-filter-smtp.h | 50 - camel/camel-mime-filter.c | 228 - camel/camel-mime-filter.h | 83 - camel/camel-mime-message.c | 704 - camel/camel-mime-message.h | 169 - camel/camel-mime-parser.c | 1774 -- camel/camel-mime-parser.h | 119 - camel/camel-mime-part-utils.c | 219 - camel/camel-mime-part-utils.h | 45 - camel/camel-mime-part.c | 705 - camel/camel-mime-part.h | 131 - camel/camel-mime-utils.c | 2371 --- camel/camel-mime-utils.h | 154 - camel/camel-movemail.c | 500 - camel/camel-movemail.h | 45 - camel/camel-multipart.c | 488 - camel/camel-multipart.h | 103 - camel/camel-news-address.c | 84 - camel/camel-news-address.h | 45 - camel/camel-object.c | 57 - camel/camel-object.h | 65 - camel/camel-op-queue.c | 166 - camel/camel-op-queue.h | 64 - camel/camel-provider.c | 153 - camel/camel-provider.h | 89 - camel/camel-seekable-stream.c | 206 - camel/camel-seekable-stream.h | 88 - camel/camel-seekable-substream.c | 284 - camel/camel-seekable-substream.h | 70 - camel/camel-service.c | 466 - camel/camel-service.h | 130 - camel/camel-session.c | 234 - camel/camel-session.h | 100 - camel/camel-store.c | 274 - camel/camel-store.h | 97 - camel/camel-stream-buffer.c | 475 - camel/camel-stream-buffer.h | 109 - camel/camel-stream-filter.c | 355 - camel/camel-stream-filter.h | 52 - camel/camel-stream-fs.c | 310 - camel/camel-stream-fs.h | 75 - camel/camel-stream-mem.c | 248 - camel/camel-stream-mem.h | 74 - camel/camel-stream.c | 294 - camel/camel-stream.h | 90 - camel/camel-thread-proxy.c | 514 - camel/camel-thread-proxy.h | 90 - camel/camel-transport.c | 110 - camel/camel-transport.h | 85 - camel/camel-types.h | 67 - camel/camel-url.c | 294 - camel/camel-url.h | 65 - camel/camel.c | 46 - camel/camel.h | 77 - camel/devel-docs/camel_stream.dia | Bin 2669 -> 0 bytes camel/gmime-content-field.c | 237 - camel/gmime-content-field.h | 71 - camel/gstring-util.c | 216 - camel/gstring-util.h | 66 - camel/hash-table-utils.c | 80 - camel/hash-table-utils.h | 46 - camel/md5-utils.c | 391 - camel/md5-utils.h | 54 - camel/providers/.cvsignore | 2 - camel/providers/MH/.cvsignore | 6 - camel/providers/MH/Makefile.am | 34 - camel/providers/MH/camel-mh-folder.c | 1022 -- camel/providers/MH/camel-mh-folder.h | 72 - camel/providers/MH/camel-mh-provider.c | 46 - camel/providers/MH/camel-mh-store.c | 153 - camel/providers/MH/camel-mh-store.h | 72 - camel/providers/MH/mh-summary.c | 290 - camel/providers/MH/mh-summary.h | 33 - camel/providers/MH/mh-uid.c | 220 - camel/providers/MH/mh-uid.h | 40 - camel/providers/MH/mh-utils.c | 50 - camel/providers/MH/mh-utils.h | 30 - camel/providers/Makefile.am | 6 - camel/providers/imap/.cvsignore | 7 - camel/providers/imap/Makefile.am | 41 - camel/providers/imap/camel-imap-folder.c | 689 - camel/providers/imap/camel-imap-folder.h | 75 - camel/providers/imap/camel-imap-provider.c | 51 - camel/providers/imap/camel-imap-store.c | 531 - camel/providers/imap/camel-imap-store.h | 84 - camel/providers/imap/camel-imap-summary.h | 81 - camel/providers/imap/imap.c | 835 - camel/providers/imap/imap.h | 86 - camel/providers/imap/libcamelimap.urls | 1 - camel/providers/maildir/.cvsignore | 6 - camel/providers/maildir/Makefile.am | 24 - camel/providers/maildir/camel-maildir-folder.c | 802 - camel/providers/maildir/camel-maildir-folder.h | 66 - camel/providers/maildir/camel-maildir-provider.c | 46 - camel/providers/maildir/camel-maildir-store.c | 124 - camel/providers/maildir/camel-maildir-store.h | 69 - camel/providers/mbox/.cvsignore | 7 - camel/providers/mbox/Makefile.am | 41 - camel/providers/mbox/camel-mbox-folder.c | 855 - camel/providers/mbox/camel-mbox-folder.h | 81 - camel/providers/mbox/camel-mbox-provider.c | 52 - camel/providers/mbox/camel-mbox-store.c | 129 - camel/providers/mbox/camel-mbox-store.h | 69 - camel/providers/mbox/camel-mbox-summary.c | 740 - camel/providers/mbox/camel-mbox-summary.h | 78 - camel/providers/mbox/libcamelmbox.urls | 1 - camel/providers/nntp/.cvsignore | 7 - camel/providers/nntp/Makefile.am | 31 - camel/providers/nntp/camel-nntp-folder.c | 617 - camel/providers/nntp/camel-nntp-folder.h | 73 - camel/providers/nntp/camel-nntp-provider.c | 73 - camel/providers/nntp/camel-nntp-store.c | 486 - camel/providers/nntp/camel-nntp-store.h | 85 - camel/providers/nntp/camel-nntp-utils.c | 211 - camel/providers/nntp/camel-nntp-utils.h | 42 - camel/providers/nntp/libcamelnntp.urls | 2 - camel/providers/pop3/.cvsignore | 6 - camel/providers/pop3/Makefile.am | 35 - camel/providers/pop3/camel-pop3-folder.c | 271 - camel/providers/pop3/camel-pop3-folder.h | 73 - camel/providers/pop3/camel-pop3-provider.c | 53 - camel/providers/pop3/camel-pop3-store.c | 634 - camel/providers/pop3/camel-pop3-store.h | 82 - camel/providers/pop3/libcamelpop3.urls | 1 - camel/providers/sendmail/.cvsignore | 7 - camel/providers/sendmail/Makefile.am | 31 - camel/providers/sendmail/camel-sendmail-provider.c | 55 - .../providers/sendmail/camel-sendmail-transport.c | 212 - .../providers/sendmail/camel-sendmail-transport.h | 64 - camel/providers/sendmail/libcamelsendmail.urls | 1 - camel/providers/smtp/.cvsignore | 6 - camel/providers/smtp/Makefile.am | 32 - camel/providers/smtp/camel-smtp-provider.c | 54 - camel/providers/smtp/camel-smtp-transport.c | 774 - camel/providers/smtp/camel-smtp-transport.h | 81 - camel/providers/smtp/libcamelsmtp.urls | 1 - camel/providers/vee/.cvsignore | 7 - camel/providers/vee/Makefile.am | 39 - camel/providers/vee/camel-vee-folder.c | 493 - camel/providers/vee/camel-vee-folder.h | 58 - camel/providers/vee/camel-vee-provider.c | 47 - camel/providers/vee/camel-vee-store.c | 132 - camel/providers/vee/camel-vee-store.h | 48 - camel/providers/vee/libcamelvee.urls | 1 - camel/string-utils.c | 185 - camel/string-utils.h | 64 - composer/.cvsignore | 7 - composer/ChangeLog | 225 - composer/Makefile.am | 56 - composer/e-msg-composer-address-dialog.c | 660 - composer/e-msg-composer-address-dialog.glade | 576 - composer/e-msg-composer-address-dialog.glade.h | 19 - composer/e-msg-composer-address-dialog.h | 75 - composer/e-msg-composer-address-entry.c | 175 - composer/e-msg-composer-address-entry.h | 63 - composer/e-msg-composer-attachment-bar.c | 691 - composer/e-msg-composer-attachment-bar.h | 74 - composer/e-msg-composer-attachment.c | 480 - composer/e-msg-composer-attachment.glade | 291 - composer/e-msg-composer-attachment.glade.h | 11 - composer/e-msg-composer-attachment.h | 72 - composer/e-msg-composer-hdrs.c | 382 - composer/e-msg-composer-hdrs.h | 83 - composer/e-msg-composer.c | 979 - composer/e-msg-composer.h | 100 - composer/main.c | 76 - configure.in | 486 - data/.cvsignore | 2 - data/Makefile.am | 2 - data/evolution.desktop | 14 - default_user/.cvsignore | 2 - default_user/ChangeLog | 37 - default_user/Makefile.am | 6 - default_user/local/.cvsignore | 2 - default_user/local/Calendar/.cvsignore | 2 - default_user/local/Calendar/Makefile.am | 3 - default_user/local/Calendar/folder-metadata.xml | 5 - default_user/local/Contacts/.cvsignore | 2 - default_user/local/Contacts/Makefile.am | 4 - default_user/local/Contacts/folder-metadata.xml | 5 - default_user/local/Directories/.cvsignore | 2 - default_user/local/Directories/Makefile.am | 9 - default_user/local/Directories/folder-metadata.xml | 5 - .../local/Directories/subfolders/.cvsignore | 2 - .../Directories/subfolders/Bigfoot/.cvsignore | 2 - .../Directories/subfolders/Bigfoot/Makefile.am | 7 - .../subfolders/Bigfoot/folder-metadata.xml | 5 - .../local/Directories/subfolders/Bigfoot/uri | 1 - .../local/Directories/subfolders/Makefile.am | 4 - .../Directories/subfolders/Netcenter/.cvsignore | 2 - .../Directories/subfolders/Netcenter/Makefile.am | 7 - .../subfolders/Netcenter/folder-metadata.xml | 5 - .../local/Directories/subfolders/Netcenter/uri | 1 - default_user/local/Drafts/.cvsignore | 2 - default_user/local/Drafts/Makefile.am | 4 - default_user/local/Drafts/folder-metadata.xml | 5 - default_user/local/Inbox/.cvsignore | 2 - default_user/local/Inbox/Makefile.am | 7 - default_user/local/Inbox/folder-metadata.xml | 5 - default_user/local/Inbox/mbox | 2230 --- default_user/local/Makefile.am | 8 - default_user/local/Outbox/.cvsignore | 2 - default_user/local/Outbox/Makefile.am | 4 - default_user/local/Outbox/folder-metadata.xml | 5 - default_user/local/Trash/.cvsignore | 2 - default_user/local/Trash/Makefile.am | 4 - default_user/local/Trash/folder-metadata.xml | 5 - default_user/shortcuts.xml | 22 - devel-docs/.cvsignore | 3 - devel-docs/Makefile.am | 3 - devel-docs/camel/.cvsignore | 12 - devel-docs/camel/Makefile.am | 101 - devel-docs/camel/README_AND_TODO.txt | 43 - devel-docs/camel/camel-docs.sgml | 28 - devel-docs/camel/camel-sections.txt | 154 - devel-docs/camel/camel.types | 9 - devel-docs/camel/tmpl/.cvsignore | 2 - devel-docs/camel/tmpl/camel-data-wrapper.sgml | 26 - devel-docs/camel/tmpl/camel-folder.sgml | 96 - devel-docs/camel/tmpl/camel-mime-message.sgml | 171 - devel-docs/camel/tmpl/camel-mime-part.sgml | 151 - devel-docs/camel/tmpl/camel-recipient.sgml | 88 - devel-docs/camel/tmpl/camel-service.sgml | 72 - devel-docs/camel/tmpl/camel-store.sgml | 45 - devel-docs/camel/tmpl/camel-stream.sgml | 101 - devel-docs/misc/ref_and_id_proposition.txt | 237 - devel-docs/query/virtual-folder-in-depth.sgml | 407 - devel-docs/query/virtual-folder-in-depth.txt | 309 - doc/.cvsignore | 2 - doc/C/apx-authors.sgml | 70 - doc/C/apx-bugs.sgml | 19 - doc/C/apx-fdl.sgml | 678 - doc/C/apx-gloss.sgml | 242 - doc/C/config-prefs.sgml | 202 - doc/C/config-setupassist.sgml | 126 - doc/C/config-sync.sgml | 67 - doc/C/devel-action.sgml | 18 - doc/C/devel-component.sgml | 24 - doc/C/devel-script.sgml | 17 - doc/C/evolution-guide.sgml | 136 - doc/C/fig/mail-druid-pic.png | Bin 35959 -> 0 bytes doc/C/fig/mainwindow-pic.png | Bin 145792 -> 0 bytes doc/C/preface.sgml | 159 - doc/C/usage-calendar.sgml | 140 - doc/C/usage-contact.sgml | 288 - doc/C/usage-mail.sgml | 776 - doc/C/usage-mainwindow.sgml | 264 - doc/C/usage-sync.sgml | 19 - doc/Camel-Classes | 35 - doc/ChangeLog | 134 - doc/Design | 201 - doc/white-papers/calendar/calendar.sgml | 209 - doc/white-papers/mail/camel.sgml | 339 - doc/white-papers/mail/ibex.sgml | 158 - doc/white-papers/widgets/e-table.sgml | 279 - e-util/.cvsignore | 6 - e-util/ChangeLog | 235 - e-util/Makefile.am | 32 - e-util/e-canvas-utils.c | 36 - e-util/e-canvas-utils.h | 29 - e-util/e-canvas.c | 460 - e-util/e-canvas.h | 84 - e-util/e-cursors.c | 134 - e-util/e-cursors.h | 33 - e-util/e-dialog-widgets.c | 713 - e-util/e-dialog-widgets.h | 60 - e-util/e-gui-utils.c | 138 - e-util/e-gui-utils.h | 16 - e-util/e-html-utils.c | 246 - e-util/e-html-utils.h | 33 - e-util/e-popup-menu.c | 99 - e-util/e-popup-menu.h | 16 - e-util/e-setup.c | 102 - e-util/e-setup.h | 11 - e-util/e-sexp.c | 1121 -- e-util/e-sexp.h | 115 - e-util/e-text-event-processor-emacs-like.c | 372 - e-util/e-text-event-processor-emacs-like.h | 68 - e-util/e-text-event-processor-types.h | 140 - e-util/e-text-event-processor.c | 103 - e-util/e-text-event-processor.h | 74 - e-util/e-util.c | 161 - e-util/e-util.c-8611 | 161 - e-util/e-util.h | 45 - e-util/e-util.h-29002 | 45 - e-util/e-xml-utils.c | 104 - e-util/e-xml-utils.c-56826 | 104 - e-util/e-xml-utils.h | 35 - e-util/e-xml-utils.h-82548 | 35 - e-util/ename/.cvsignore | 8 - e-util/ename/Makefile.am | 45 - e-util/ename/TODO | 2 - e-util/ename/e-name-western-tables.h | 53 - e-util/ename/e-name-western.c | 868 - e-util/ename/e-name-western.h | 21 - e-util/ename/test-ename-western-gtk.c | 148 - e-util/ename/test-ename-western.c | 70 - evolution.spec.in | 124 - filter/.cvsignore | 9 - filter/ChangeLog | 229 - filter/Makefile.am | 37 - filter/blank.xpm | 22 - filter/check.xpm | 22 - filter/filter-arg-types.c | 753 - filter/filter-arg-types.h | 101 - filter/filter-arg.c | 563 - filter/filter-arg.h | 88 - filter/filter-driver.c | 639 - filter/filter-driver.h | 66 - filter/filter-druid.c | 736 - filter/filter-druid.h | 76 - filter/filter-editor.c | 386 - filter/filter-editor.h | 58 - filter/filter-format.c | 237 - filter/filter-format.h | 10 - filter/filter-xml.c | 580 - filter/filter-xml.h | 77 - filter/filtertypes.xml | 94 - filter/vfoldertypes.xml | 60 - help/.cvsignore | 2 - help/C/apx-authors.sgml | 70 - help/C/apx-bugs.sgml | 19 - help/C/apx-fdl.sgml | 678 - help/C/apx-gloss.sgml | 242 - help/C/config-prefs.sgml | 202 - help/C/config-setupassist.sgml | 126 - help/C/config-sync.sgml | 67 - help/C/devel-action.sgml | 18 - help/C/devel-component.sgml | 24 - help/C/devel-script.sgml | 17 - help/C/evolution-guide.sgml | 136 - help/C/fig/mail-druid-pic.png | Bin 35959 -> 0 bytes help/C/fig/mainwindow-pic.png | Bin 145792 -> 0 bytes help/C/preface.sgml | 159 - help/C/usage-calendar.sgml | 140 - help/C/usage-contact.sgml | 288 - help/C/usage-mail.sgml | 776 - help/C/usage-mainwindow.sgml | 264 - help/C/usage-sync.sgml | 19 - help/Camel-Classes | 35 - help/ChangeLog | 134 - help/Design | 201 - help/white-papers/calendar/calendar.sgml | 209 - help/white-papers/mail/camel.sgml | 339 - help/white-papers/mail/ibex.sgml | 158 - help/white-papers/widgets/e-table.sgml | 279 - libibex/.cvsignore | 9 - libibex/COPYING.LIB | 481 - libibex/ChangeLog | 95 - libibex/Makefile.am | 21 - libibex/TODO | 61 - libibex/file.c | 481 - libibex/find.c | 198 - libibex/ibex.h | 106 - libibex/ibex_internal.h | 39 - libibex/index.c | 154 - libibex/lookup.c | 83 - libibex/mkindex.c | 84 - libibex/words.c | 269 - libical/.cvsignore | 19 - libical/AUTHORS | 0 libical/CHANGES | 222 - libical/COPYING | 0 libical/ChangeLog | 62 - libical/INSTALL | 24 - libical/MacOS/errno.h | 185 - libical/MacOS/libical.mcp | Bin 139917 -> 0 bytes libical/MacOS/libical.mcp.exp | 1 - libical/MacOS/libical_prefix.h | 5 - libical/MacOS/restrictions.make | 1 - libical/MacOS/restrictions.script | 1 - libical/MacOS/strdup.c | 17 - libical/MacOS/strdup.h | 3 - libical/Makefile.am | 11 - libical/NEWS | 250 - libical/README | 96 - libical/TEST | 4 - libical/THANKS | 6 - libical/TODO | 28 - libical/acconfig.h | 7 - libical/autogen.sh | 80 - libical/configure.in | 51 - libical/configure.scan | 30 - libical/design-data/.cvsignore | 2 - libical/design-data/Makefile.am | 10 - libical/design-data/components.txt | 21 - libical/design-data/param-c-types.txt | 23 - libical/design-data/params-in-prop.txt | 55 - libical/design-data/prop-to-value.txt | 50 - libical/design-data/property-tokens.txt | 65 - libical/design-data/restrictions.csv | 1348 -- libical/design-data/status-new.txt | 56 - libical/design-data/status.foo | 104 - libical/design-data/status.txt | 56 - libical/design-data/value-c-types.txt | 22 - libical/design-data/value-mem-semantics.txt | 19 - libical/doc/.cvsignore | 2 - libical/doc/Makefile.am | 1 - libical/doc/UsingLibical.lyx | 2256 --- libical/doc/UsingLibical.ps | 1308 -- libical/doc/UsingLibical.sgml | 318 - libical/doc/UsingLibical.txt | 302 - libical/install-sh | 119 - libical/missing | 190 - libical/mkinstalldirs | 40 - libical/scripts/.cvsignore | 2 - libical/scripts/Makefile.am | 8 - libical/scripts/mkderivedcomponents.pl | 170 - libical/scripts/mkderivedparameters.pl | 277 - libical/scripts/mkderivedproperties.pl | 286 - libical/scripts/mkderivedvalues.pl | 303 - libical/scripts/mkparameterrestrictions.pl | 85 - libical/scripts/mkrestrictionrecords.pl | 109 - libical/scripts/mkrestrictiontable.pl | 86 - libical/src/.cvsignore | 2 - libical/src/Makefile.am | 1 - libical/src/libical/.cvsignore | 14 - libical/src/libical/.gdb_history | 457 - libical/src/libical/.gdbinit | 3 - libical/src/libical/Makefile.am | 87 - libical/src/libical/base64.c | 323 - libical/src/libical/filelock.c | 143 - libical/src/libical/filelock.h | 57 - libical/src/libical/foo | 1578 -- libical/src/libical/ical.h | 43 - libical/src/libical/icalcomponent.c | 782 - libical/src/libical/icalcomponent.h | 119 - libical/src/libical/icalenums.c | 615 - libical/src/libical/icalenums.h | 466 - libical/src/libical/icalerror.c | 99 - libical/src/libical/icalerror.h | 141 - libical/src/libical/icalirip.h | 108 - libical/src/libical/icalitip.output | 1698 -- libical/src/libical/icalitip.tab.c | 1663 -- libical/src/libical/icalitip.tab.h | 137 - libical/src/libical/icalitipl.l | 283 - libical/src/libical/icalitipy.y | 434 - libical/src/libical/icallexer.l | 282 - libical/src/libical/icalmemory.c | 244 - libical/src/libical/icalmemory.h | 76 - libical/src/libical/icalparameter.c | 1913 -- libical/src/libical/icalparameter.h | 174 - libical/src/libical/icalparser.c | 990 -- libical/src/libical/icalparser.h | 94 - libical/src/libical/icalproperty.c | 3095 ---- libical/src/libical/icalproperty.h | 368 - libical/src/libical/icalrestriction.c | 1590 -- libical/src/libical/icalrestriction.h | 72 - libical/src/libical/icaltypes.c | 305 - libical/src/libical/icaltypes.h | 182 - libical/src/libical/icalvalue.c | 2039 --- libical/src/libical/icalvalue.h | 169 - libical/src/libical/icalvcal.h | 39 - libical/src/libical/icalversion.h.in | 3 - libical/src/libical/icalyacc.y | 480 - libical/src/libical/locking.c | 143 - libical/src/libical/pvl.c | 768 - libical/src/libical/pvl.h | 104 - libical/src/libical/testlocks.c | 70 - libical/src/libicalss/.cvsignore | 6 - libical/src/libicalss/Makefile.am | 23 - libical/src/libicalss/icalcalendar.c | 268 - libical/src/libicalss/icalcalendar.h | 68 - libical/src/libicalss/icalcluster.c | 423 - libical/src/libicalss/icalcluster.h | 73 - libical/src/libicalss/icalcomponent.h | 115 - libical/src/libicalss/icalstore.c | 858 - libical/src/libicalss/icalstore.h | 78 - libical/src/pvl/Makefile | 0 libical/src/test/.cvsignore | 11 - libical/src/test/Makefile.am | 12 - libical/src/test/Makefile.in | 376 - libical/src/test/alice/booked/199706 | 317 - libical/src/test/alice/booked/199707 | 701 - libical/src/test/alice/booked/199708 | 45 - libical/src/test/alice/booked/199709 | 58 - libical/src/test/alice/booked/199803 | 241 - libical/src/test/alice/incoming.ics | 2164 --- libical/src/test/copycluster.c | 113 - libical/src/test/findobj.c | 71 - libical/src/test/icaltestparser.c | 123 - libical/src/test/regression.c | 1334 -- libical/src/test/storage.c | 460 - libical/src/test/test-component.icd | 23 - libical/src/test/usecases.c | 553 - libical/test-data/.cvsignore | 2 - libical/test-data/0 | 21 - libical/test-data/1 | 36 - libical/test-data/1.1 | 13 - libical/test-data/2 | 22 - libical/test-data/2445.ics | 329 - libical/test-data/2445.vcd | 329 - libical/test-data/2446.ics | 1007 -- libical/test-data/2446.vcd | 1007 -- libical/test-data/3 | 21 - libical/test-data/4 | 23 - libical/test-data/5 | 16 - libical/test-data/6 | 21 - libical/test-data/7 | 14 - libical/test-data/Makefile.am | 13 - libical/test-data/smallcluster.ics | 18 - libical/test-data/smallcluster.vcd | 18 - libversit/.cvsignore | 9 - libversit/Makefile.am | 15 - libversit/README.TXT | 951 - libversit/port.h | 88 - libversit/vcaltest.c | 118 - libversit/vcaltmp.c | 337 - libversit/vcaltmp.h | 128 - libversit/vcc.h | 80 - libversit/vcc.y | 1257 -- libversit/vctest.c | 95 - libversit/vobject.c | 1452 -- libversit/vobject.h | 366 - mail/.cvsignore | 13 - mail/ChangeLog | 1000 -- mail/GNOME_Evolution_Mail.oaf.in | 54 - mail/GNOME_Evolution_Mail.oafinfo | 54 - mail/Mail.idl | 30 - mail/Makefile.am | 111 - mail/component-factory.c | 196 - mail/component-factory.h | 29 - mail/e-attchmt.png | Bin 169 -> 0 bytes mail/evolution-mail.gnorba | 23 - mail/evolution-mail.oafinfo | 54 - mail/folder-browser-factory.c | 196 - mail/folder-browser.c | 425 - mail/folder-browser.h | 62 - mail/mail-config.c | 1088 -- mail/mail-display.c | 365 - mail/mail-display.h | 54 - mail/mail-format.c | 1532 -- mail/mail-identify.c | 80 - mail/mail-ops.c | 607 - mail/mail-sources.c | 771 - mail/mail-types.h | 39 - mail/mail.h | 62 - mail/main.c | 83 - mail/message-list.c | 885 - mail/message-list.h | 87 - mail/pixmaps.h | 14 - mail/pixmaps/attachment-header.xpm | 22 - mail/pixmaps/attachment.xpm | 21 - mail/pixmaps/empty.xpm | 21 - mail/pixmaps/envelope-closed.xpm | 65 - mail/pixmaps/envelope-deleted.xpm | 54 - mail/pixmaps/envelope-opened.xpm | 74 - mail/pixmaps/message-status.xpm | 22 - mail/pixmaps/online-status.xpm | 23 - mail/session.c | 62 - mail/test-mail.c | 103 - po/.cvsignore | 12 - po/ChangeLog | 234 - po/POTFILES.in | 23 - po/da.po | 1029 -- po/el.po | 1173 -- po/es.po | 1036 -- po/flu-danish | 114 - po/fr.po | 1000 -- po/gl.po | 1042 -- po/hu.po | 1028 -- po/ja.po | 1033 -- po/ko.po | 1020 -- po/nl.po | 1159 -- po/no.po | 1027 -- po/ru.po | 1032 -- po/sv.po | 1201 -- po/tr.po | 1011 -- po/uk.po | 1171 -- po/update.sh | 42 - shell/.cvsignore | 11 - shell/ChangeLog | 893 - shell/Evolution-Shell.idl | 18 - shell/Evolution-ShellComponent.idl | 35 - shell/Evolution-Storage.idl | 51 - shell/Evolution.idl | 15 - shell/Makefile.am | 97 - shell/Shell.idl | 45 - shell/e-component-registry.c | 283 - shell/e-component-registry.h | 74 - shell/e-corba-storage-registry.c | 246 - shell/e-corba-storage-registry.h | 73 - shell/e-corba-storage.c | 354 - shell/e-corba-storage.h | 76 - shell/e-folder-type-registry.c | 336 - shell/e-folder-type-registry.h | 86 - shell/e-folder-type-repository.c | 305 - shell/e-folder-type-repository.h | 77 - shell/e-folder.c | 290 - shell/e-folder.h | 93 - shell/e-init.c | 34 - shell/e-init.h | 8 - shell/e-local-folder.c | 219 - shell/e-local-folder.h | 66 - shell/e-local-storage.c | 337 - shell/e-local-storage.h | 67 - shell/e-setup.c | 115 - shell/e-setup.h | 31 - shell/e-shell-constants.h | 36 - shell/e-shell-utils.c | 107 - shell/e-shell-utils.h | 30 - shell/e-shell-view-menu.c | 307 - shell/e-shell-view-menu.h | 33 - shell/e-shell-view.c | 829 - shell/e-shell-view.h | 81 - shell/e-shell.c | 460 - shell/e-shell.h | 84 - shell/e-shortcut.c | 499 - shell/e-shortcut.h | 102 - shell/e-shortcuts-view.c | 294 - shell/e-shortcuts-view.h | 76 - shell/e-shortcuts.c | 477 - shell/e-shortcuts.h | 88 - shell/e-storage-set-view.c | 838 - shell/e-storage-set-view.h | 78 - shell/e-storage-set.c | 424 - shell/e-storage-set.h | 94 - shell/e-storage-watcher.c | 188 - shell/e-storage-watcher.h | 93 - shell/e-storage.c | 405 - shell/e-storage.h | 91 - shell/evolution-directory.idl | 89 - shell/evolution-shell-component.c | 342 - shell/evolution-shell-component.h | 91 - shell/evolution-storage.c | 395 - shell/evolution-storage.h | 96 - shell/idl/folder.idl | 87 - shell/main.c | 203 - stamp.h.in | 1 - tests/.cvsignore | 24 - tests/Makefile.am | 78 - tests/test-movemail.c | 164 - tests/test-url.c | 37 - tests/test1.c | 136 - tests/test10.c | 127 - tests/test11.c | 136 - tests/test12.c | 56 - tests/test13.c | 123 - tests/test14.c | 177 - tests/test2.c | 48 - tests/test3.c | 29 - tests/test4.c | 65 - tests/test5.c | 59 - tests/test6.c | 49 - tests/test8.c | 75 - tests/test9.c | 80 - tests/ui-tests/.cvsignore | 8 - tests/ui-tests/Makefile.am | 39 - tests/ui-tests/filter.c | 30 - tests/ui-tests/filterdescription.xml | 99 - tests/ui-tests/mail-atchmt-image.msg | 67 - tests/ui-tests/mail-atchmt-postscript.msg | 8069 --------- tests/ui-tests/mail-atchmt-svg.msg | 418 - tests/ui-tests/message-browser.c | 819 - tests/ui-tests/saveoptions.xml | 37 - tests/ui-tests/store_listing.c | 424 - tests/ui-tests/store_listing.glade | 489 - tests/ui-tests/test-multipart-alt.msg | 17738 ------------------- tests/ui-tests/test-multipart-mixed.msg | 377 - tools/.cvsignore | 3 - tools/Makefile.am | 3 - tools/killev | 11 - widgets/.cvsignore | 9 - widgets/LICENSE | 1 - widgets/Makefile.am | 8 - widgets/e-minicard/.cvsignore | 7 - widgets/e-paned/.cvsignore | 8 - widgets/e-paned/Makefile.am | 15 - widgets/e-paned/e-hpaned.c | 437 - widgets/e-paned/e-hpaned.h | 72 - widgets/e-paned/e-paned.c | 606 - widgets/e-paned/e-paned.h | 129 - widgets/e-paned/e-vpaned.c | 436 - widgets/e-paned/e-vpaned.h | 72 - widgets/e-reflow/e-reflow-sorted.c | 234 - widgets/e-reflow/e-reflow-sorted.h | 89 - widgets/e-reflow/e-reflow.c | 776 - widgets/e-reflow/e-reflow.h | 106 - widgets/e-table/.cvsignore | 11 - widgets/e-table/ChangeLog | 1561 -- widgets/e-table/LICENSE | 1 - widgets/e-table/Makefile.am | 132 - widgets/e-table/ROADMAP.e-table | 113 - widgets/e-table/TODO | 99 - widgets/e-table/add-col.xpm | 22 - widgets/e-table/arrow-down.xpm | 21 - widgets/e-table/arrow-up.xpm | 21 - widgets/e-table/check-empty.xpm | 21 - widgets/e-table/check-filled.xpm | 21 - widgets/e-table/clip.png | Bin 192 -> 0 bytes widgets/e-table/e-cell-checkbox.c | 44 - widgets/e-table/e-cell-checkbox.h | 24 - widgets/e-table/e-cell-string.c | 9 - widgets/e-table/e-cell-text.c | 1976 --- widgets/e-table/e-cell-text.h | 63 - widgets/e-table/e-cell-toggle.c | 291 - widgets/e-table/e-cell-toggle.h | 35 - widgets/e-table/e-cell.c | 176 - widgets/e-table/e-cell.h | 77 - widgets/e-table/e-table-col-dnd.h | 10 - widgets/e-table/e-table-col.c | 127 - widgets/e-table/e-table-col.h | 65 - widgets/e-table/e-table-column-model.h | 5 - widgets/e-table/e-table-column.c | 293 - widgets/e-table/e-table-config.c | 233 - widgets/e-table/e-table-config.glade | 302 - widgets/e-table/e-table-config.glade.h | 10 - widgets/e-table/e-table-config.h | 11 - widgets/e-table/e-table-defines.h | 3 - widgets/e-table/e-table-example-1.c | 286 - widgets/e-table/e-table-example-2.c | 322 - widgets/e-table/e-table-group-container.c | 704 - widgets/e-table/e-table-group-container.h | 66 - widgets/e-table/e-table-group-leaf.c | 332 - widgets/e-table/e-table-group-leaf.h | 50 - widgets/e-table/e-table-group.c | 299 - widgets/e-table/e-table-group.glade | 208 - widgets/e-table/e-table-group.glade.h | 13 - widgets/e-table/e-table-group.h | 104 - widgets/e-table/e-table-header-item.c | 1358 -- widgets/e-table/e-table-header-item.h | 71 - widgets/e-table/e-table-header.c | 660 - widgets/e-table/e-table-header.h | 79 - widgets/e-table/e-table-item.c | 1583 -- widgets/e-table/e-table-item.h | 120 - widgets/e-table/e-table-model.c | 303 - widgets/e-table/e-table-model.h | 86 - widgets/e-table/e-table-simple.c | 192 - widgets/e-table/e-table-simple.h | 59 - widgets/e-table/e-table-size-test.c | 281 - widgets/e-table/e-table-sort-info.c | 238 - widgets/e-table/e-table-sort-info.h | 60 - widgets/e-table/e-table-sorted-variable.c | 295 - widgets/e-table/e-table-sorted-variable.h | 38 - widgets/e-table/e-table-sorted.c | 89 - widgets/e-table/e-table-sorted.h | 29 - widgets/e-table/e-table-subset-variable.c | 187 - widgets/e-table/e-table-subset-variable.h | 45 - widgets/e-table/e-table-subset.c | 238 - widgets/e-table/e-table-subset.h | 37 - widgets/e-table/e-table-text-model.c | 220 - widgets/e-table/e-table-text-model.h | 61 - widgets/e-table/e-table-tree.h | 19 - widgets/e-table/e-table.c | 744 - widgets/e-table/e-table.h | 87 - widgets/e-table/image1.png | Bin 1858 -> 0 bytes widgets/e-table/image2.png | Bin 1987 -> 0 bytes widgets/e-table/image3.png | Bin 2051 -> 0 bytes widgets/e-table/remove-col.xpm | 22 - widgets/e-table/sample.table | 11 - widgets/e-table/table-test.c | 45 - widgets/e-table/table-test.h | 4 - widgets/e-table/test-check.c | 201 - widgets/e-table/test-cols.c | 244 - widgets/e-table/test-table.c | 392 - widgets/e-text/.cvsignore | 8 - widgets/e-text/Makefile.am | 31 - widgets/e-text/e-text-event-processor-emacs-like.c | 372 - widgets/e-text/e-text-event-processor-emacs-like.h | 68 - widgets/e-text/e-text-event-processor-types.h | 140 - widgets/e-text/e-text-event-processor.c | 103 - widgets/e-text/e-text-event-processor.h | 74 - widgets/e-text/e-text-model.c | 241 - widgets/e-text/e-text-model.h | 72 - widgets/e-text/e-text-test.c | 153 - widgets/e-text/e-text.c | 3136 ---- widgets/e-text/e-text.h | 215 - widgets/meeting-time-sel/.cvsignore | 8 - widgets/meeting-time-sel/LICENSE | 1 - widgets/meeting-time-sel/Makefile.am | 31 - widgets/meeting-time-sel/e-meeting-time-sel-item.c | 924 - widgets/meeting-time-sel/e-meeting-time-sel-item.h | 78 - .../e-meeting-time-sel-list-item.c | 303 - .../e-meeting-time-sel-list-item.h | 74 - .../meeting-time-sel/e-meeting-time-sel-mail.xpm | 135 - .../e-meeting-time-sel-no-mail.xpm | 123 - widgets/meeting-time-sel/e-meeting-time-sel.c | 3065 ---- widgets/meeting-time-sel/e-meeting-time-sel.h | 496 - widgets/meeting-time-sel/test-meeting-time-sel.c | 236 - widgets/misc/.cvsignore | 8 - widgets/misc/Makefile.am | 27 - widgets/misc/e-canvas-utils.c | 36 - widgets/misc/e-canvas-utils.h | 29 - widgets/misc/e-canvas.c | 460 - widgets/misc/e-canvas.h | 84 - widgets/misc/e-clipped-label.c | 361 - widgets/misc/e-clipped-label.h | 90 - widgets/misc/e-colors.c | 74 - widgets/misc/e-colors.h | 14 - widgets/misc/e-cursors.c | 38 - widgets/misc/e-cursors.h | 38 - widgets/misc/e-gui-utils.c | 138 - widgets/misc/e-gui-utils.h | 16 - widgets/misc/e-popup-menu.c | 99 - widgets/misc/e-popup-menu.h | 16 - widgets/misc/e-reflow.c | 776 - widgets/misc/e-reflow.h | 106 - widgets/misc/e-title-bar.c | 268 - widgets/misc/e-title-bar.h | 79 - widgets/misc/pixmaps/cursor_cross.xpm | 38 - widgets/misc/pixmaps/cursor_hand_closed.xpm | 38 - widgets/misc/pixmaps/cursor_hand_open.xpm | 38 - widgets/misc/pixmaps/cursor_zoom_in.xpm | 37 - widgets/misc/pixmaps/cursor_zoom_out.xpm | 37 - widgets/misc/test-title-bar.c | 73 - widgets/shortcut-bar/.cvsignore | 8 - widgets/shortcut-bar/ChangeLog | 222 - widgets/shortcut-bar/LICENSE | 1 - widgets/shortcut-bar/Makefile.am | 36 - widgets/shortcut-bar/e-group-bar.c | 1545 -- widgets/shortcut-bar/e-group-bar.h | 172 - widgets/shortcut-bar/e-icon-bar-bg-item.c | 362 - widgets/shortcut-bar/e-icon-bar-bg-item.h | 72 - widgets/shortcut-bar/e-icon-bar.c | 1570 -- widgets/shortcut-bar/e-icon-bar.h | 240 - widgets/shortcut-bar/e-shortcut-bar.c | 656 - widgets/shortcut-bar/e-shortcut-bar.h | 144 - widgets/shortcut-bar/e-vscrolled-bar.c | 668 - widgets/shortcut-bar/e-vscrolled-bar.h | 97 - widgets/shortcut-bar/test-shortcut-bar.c | 617 - widgets/table/.cvsignore | 11 - widgets/table/add-col.xpm | 22 - widgets/table/arrow-down.xpm | 21 - widgets/table/arrow-up.xpm | 21 - widgets/table/check-empty.xpm | 21 - widgets/table/check-filled.xpm | 21 - widgets/table/clip.png | Bin 192 -> 0 bytes widgets/table/e-cell-checkbox.c | 44 - widgets/table/e-cell-checkbox.h | 24 - widgets/table/e-cell-string.c | 9 - widgets/table/e-cell-text.c | 1976 --- widgets/table/e-cell-text.h | 63 - widgets/table/e-cell-toggle.c | 291 - widgets/table/e-cell-toggle.h | 35 - widgets/table/e-cell.c | 176 - widgets/table/e-cell.h | 77 - widgets/table/e-table-col-dnd.h | 10 - widgets/table/e-table-col.c | 127 - widgets/table/e-table-col.h | 65 - widgets/table/e-table-column-model.h | 5 - widgets/table/e-table-column.c | 293 - widgets/table/e-table-config.c | 233 - widgets/table/e-table-config.glade | 302 - widgets/table/e-table-config.glade.h | 10 - widgets/table/e-table-config.h | 11 - widgets/table/e-table-defines.h | 3 - widgets/table/e-table-example-1.c | 286 - widgets/table/e-table-example-2.c | 322 - widgets/table/e-table-group-container.c | 704 - widgets/table/e-table-group-container.h | 66 - widgets/table/e-table-group-leaf.c | 332 - widgets/table/e-table-group-leaf.h | 50 - widgets/table/e-table-group.c | 299 - widgets/table/e-table-group.glade | 208 - widgets/table/e-table-group.glade.h | 13 - widgets/table/e-table-group.h | 104 - widgets/table/e-table-header-item.c | 1358 -- widgets/table/e-table-header-item.h | 71 - widgets/table/e-table-header.c | 660 - widgets/table/e-table-header.h | 79 - widgets/table/e-table-item.c | 1583 -- widgets/table/e-table-item.h | 120 - widgets/table/e-table-model.c | 303 - widgets/table/e-table-model.h | 86 - widgets/table/e-table-simple.c | 192 - widgets/table/e-table-simple.h | 59 - widgets/table/e-table-size-test.c | 281 - widgets/table/e-table-sort-info.c | 238 - widgets/table/e-table-sort-info.h | 60 - widgets/table/e-table-sorted-variable.c | 295 - widgets/table/e-table-sorted-variable.h | 38 - widgets/table/e-table-sorted.c | 89 - widgets/table/e-table-sorted.h | 29 - widgets/table/e-table-subset-variable.c | 187 - widgets/table/e-table-subset-variable.h | 45 - widgets/table/e-table-subset.c | 238 - widgets/table/e-table-subset.h | 37 - widgets/table/e-table-text-model.c | 220 - widgets/table/e-table-text-model.h | 61 - widgets/table/e-table-tree.h | 19 - widgets/table/e-table.c | 744 - widgets/table/e-table.h | 87 - widgets/table/image1.png | Bin 1858 -> 0 bytes widgets/table/image2.png | Bin 1987 -> 0 bytes widgets/table/image3.png | Bin 2051 -> 0 bytes widgets/table/remove-col.xpm | 22 - widgets/table/sample.table | 11 - widgets/table/table-test.c | 45 - widgets/table/table-test.h | 4 - widgets/table/test-check.c | 201 - widgets/table/test-cols.c | 244 - widgets/table/test-table.c | 392 - widgets/text/.cvsignore | 8 - widgets/text/e-table-text-model.c | 220 - widgets/text/e-table-text-model.h | 61 - widgets/text/e-text-event-processor-emacs-like.c | 372 - widgets/text/e-text-event-processor-emacs-like.h | 68 - widgets/text/e-text-event-processor-types.h | 140 - widgets/text/e-text-event-processor.c | 103 - widgets/text/e-text-event-processor.h | 74 - widgets/text/e-text-model.c | 241 - widgets/text/e-text-model.h | 72 - widgets/text/e-text-test.c | 153 - widgets/text/e-text.c | 3136 ---- widgets/text/e-text.h | 215 - wombat/.cvsignore | 13 - wombat/ChangeLog | 101 - wombat/GNOME_Evolution_Wombat.oaf.in | 30 - wombat/GNOME_Evolution_Wombat.oafinfo | 30 - wombat/Makefile.am | 58 - wombat/wombat.c | 283 - wombat/wombat.gnorba | 11 - wombat/wombat.idl | 12 - wombat/wombat.oafinfo | 30 - 1350 files changed, 345771 deletions(-) delete mode 100644 .cvsignore delete mode 100644 AUTHORS delete mode 100644 COPYING delete mode 100644 ChangeLog delete mode 100644 HACKING delete mode 100644 INSTALL delete mode 100644 MAINTAINERS delete mode 100644 Makefile.am delete mode 100644 NEWS delete mode 100644 README delete mode 100644 acconfig.h delete mode 100644 addressbook/.cvsignore delete mode 100644 addressbook/ChangeLog delete mode 100644 addressbook/Makefile.am delete mode 100644 addressbook/backend/.cvsignore delete mode 100644 addressbook/backend/Makefile.am delete mode 100644 addressbook/backend/ebook/.cvsignore delete mode 100644 addressbook/backend/ebook/Makefile.am delete mode 100644 addressbook/backend/ebook/TODO delete mode 100644 addressbook/backend/ebook/e-book-listener.c delete mode 100644 addressbook/backend/ebook/e-book-listener.h delete mode 100644 addressbook/backend/ebook/e-book-types.h delete mode 100644 addressbook/backend/ebook/e-book-view-listener.c delete mode 100644 addressbook/backend/ebook/e-book-view-listener.h delete mode 100644 addressbook/backend/ebook/e-book-view.c delete mode 100644 addressbook/backend/ebook/e-book-view.h delete mode 100644 addressbook/backend/ebook/e-book.c delete mode 100644 addressbook/backend/ebook/e-book.h delete mode 100644 addressbook/backend/ebook/e-card-cursor.c delete mode 100644 addressbook/backend/ebook/e-card-cursor.h delete mode 100644 addressbook/backend/ebook/e-card-iterator.c delete mode 100644 addressbook/backend/ebook/e-card-iterator.h delete mode 100644 addressbook/backend/ebook/e-card-list-iterator.c delete mode 100644 addressbook/backend/ebook/e-card-list-iterator.h delete mode 100644 addressbook/backend/ebook/e-card-list.c delete mode 100644 addressbook/backend/ebook/e-card-list.h delete mode 100644 addressbook/backend/ebook/e-card-pairs.h delete mode 100644 addressbook/backend/ebook/e-card-simple.c delete mode 100644 addressbook/backend/ebook/e-card-simple.h delete mode 100644 addressbook/backend/ebook/e-card-types.h delete mode 100644 addressbook/backend/ebook/e-card.c delete mode 100644 addressbook/backend/ebook/e-card.h delete mode 100644 addressbook/backend/ebook/load-pine-addressbook.c delete mode 100644 addressbook/backend/ebook/test-card.c delete mode 100644 addressbook/backend/ebook/test-client-list.c delete mode 100644 addressbook/backend/ebook/test-client.c delete mode 100644 addressbook/backend/idl/.cvsignore delete mode 100644 addressbook/backend/idl/Makefile.am delete mode 100644 addressbook/backend/idl/addressbook.idl delete mode 100644 addressbook/backend/pas/.cvsignore delete mode 100644 addressbook/backend/pas/Makefile.am delete mode 100644 addressbook/backend/pas/TODO delete mode 100644 addressbook/backend/pas/pas-backend-file.c delete mode 100644 addressbook/backend/pas/pas-backend-file.h delete mode 100644 addressbook/backend/pas/pas-backend-ldap.c delete mode 100644 addressbook/backend/pas/pas-backend-ldap.h delete mode 100644 addressbook/backend/pas/pas-backend.c delete mode 100644 addressbook/backend/pas/pas-backend.h delete mode 100644 addressbook/backend/pas/pas-book-factory.c delete mode 100644 addressbook/backend/pas/pas-book-factory.h delete mode 100644 addressbook/backend/pas/pas-book-view.c delete mode 100644 addressbook/backend/pas/pas-book-view.h delete mode 100644 addressbook/backend/pas/pas-book.c delete mode 100644 addressbook/backend/pas/pas-book.h delete mode 100644 addressbook/backend/pas/pas-card-cursor.c delete mode 100644 addressbook/backend/pas/pas-card-cursor.h delete mode 100644 addressbook/contact-editor/.cvsignore delete mode 100644 addressbook/contact-editor/Makefile.am delete mode 100644 addressbook/contact-editor/arrow.png delete mode 100644 addressbook/contact-editor/briefcase.png delete mode 100644 addressbook/contact-editor/categories-strings.h delete mode 100644 addressbook/contact-editor/categories.glade delete mode 100644 addressbook/contact-editor/contact-editor.glade delete mode 100644 addressbook/contact-editor/e-contact-editor-categories.c delete mode 100644 addressbook/contact-editor/e-contact-editor-categories.h delete mode 100644 addressbook/contact-editor/e-contact-editor-fullname.c delete mode 100644 addressbook/contact-editor/e-contact-editor-fullname.h delete mode 100644 addressbook/contact-editor/e-contact-editor-strings.h delete mode 100644 addressbook/contact-editor/e-contact-editor.c delete mode 100644 addressbook/contact-editor/e-contact-editor.h delete mode 100644 addressbook/contact-editor/e-contact-save-as.c delete mode 100644 addressbook/contact-editor/e-contact-save-as.h delete mode 100644 addressbook/contact-editor/email.png delete mode 100644 addressbook/contact-editor/fullname-strings.h delete mode 100644 addressbook/contact-editor/fullname.glade delete mode 100644 addressbook/contact-editor/head.png delete mode 100644 addressbook/contact-editor/netfreebusy.png delete mode 100644 addressbook/contact-editor/netmeeting.png delete mode 100644 addressbook/contact-editor/phone.png delete mode 100644 addressbook/contact-editor/snailmail.png delete mode 100644 addressbook/contact-editor/test-editor.c delete mode 100644 addressbook/contact-editor/web.png delete mode 100644 addressbook/demo/.cvsignore delete mode 100644 addressbook/demo/Makefile.am delete mode 100644 addressbook/demo/addressbook-factory.c delete mode 100644 addressbook/demo/addressbook-widget.c delete mode 100644 addressbook/demo/addressbook-widget.h delete mode 100644 addressbook/demo/addressbook.c delete mode 100644 addressbook/demo/addressbook.gnorba delete mode 100644 addressbook/demo/addressbook.h delete mode 100644 addressbook/demo/demo.c delete mode 100644 addressbook/demo/e-test-model.c delete mode 100644 addressbook/demo/e-test-model.h delete mode 100644 addressbook/demo/spec delete mode 100644 addressbook/ename/.cvsignore delete mode 100644 addressbook/ename/Makefile.am delete mode 100644 addressbook/ename/TODO delete mode 100644 addressbook/ename/e-name-western-tables.h delete mode 100644 addressbook/ename/e-name-western.c delete mode 100644 addressbook/ename/e-name-western.h delete mode 100644 addressbook/ename/test-ename-western-gtk.c delete mode 100644 addressbook/ename/test-ename-western.c delete mode 100644 addressbook/gui/.cvsignore delete mode 100644 addressbook/gui/Makefile.am delete mode 100644 addressbook/gui/component/.cvsignore delete mode 100644 addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in delete mode 100644 addressbook/gui/component/GNOME_Evolution_Addressbook.oafinfo delete mode 100644 addressbook/gui/component/Makefile.am delete mode 100644 addressbook/gui/component/addressbook-component.c delete mode 100644 addressbook/gui/component/addressbook-component.h delete mode 100644 addressbook/gui/component/addressbook-factory.c delete mode 100644 addressbook/gui/component/addressbook.c delete mode 100644 addressbook/gui/component/addressbook.gnorba delete mode 100644 addressbook/gui/component/addressbook.h delete mode 100644 addressbook/gui/component/addressbook.oafinfo delete mode 100644 addressbook/gui/component/e-addressbook-model.c delete mode 100644 addressbook/gui/component/e-addressbook-model.h delete mode 100644 addressbook/gui/component/e-ldap-server-dialog.c delete mode 100644 addressbook/gui/component/e-ldap-server-dialog.h delete mode 100644 addressbook/gui/component/ldap-server-dialog.glade delete mode 100644 addressbook/gui/component/ldap-server-dialog.glade.h delete mode 100644 addressbook/gui/contact-editor/.cvsignore delete mode 100644 addressbook/gui/contact-editor/Makefile.am delete mode 100644 addressbook/gui/contact-editor/arrow.png delete mode 100644 addressbook/gui/contact-editor/briefcase.png delete mode 100644 addressbook/gui/contact-editor/categories-strings.h delete mode 100644 addressbook/gui/contact-editor/categories.glade delete mode 100644 addressbook/gui/contact-editor/contact-editor.glade delete mode 100644 addressbook/gui/contact-editor/e-contact-editor-categories.c delete mode 100644 addressbook/gui/contact-editor/e-contact-editor-categories.h delete mode 100644 addressbook/gui/contact-editor/e-contact-editor-fullname.c delete mode 100644 addressbook/gui/contact-editor/e-contact-editor-fullname.h delete mode 100644 addressbook/gui/contact-editor/e-contact-editor-strings.h delete mode 100644 addressbook/gui/contact-editor/e-contact-editor.c delete mode 100644 addressbook/gui/contact-editor/e-contact-editor.h delete mode 100644 addressbook/gui/contact-editor/e-contact-save-as.c delete mode 100644 addressbook/gui/contact-editor/e-contact-save-as.h delete mode 100644 addressbook/gui/contact-editor/email.png delete mode 100644 addressbook/gui/contact-editor/fullname-strings.h delete mode 100644 addressbook/gui/contact-editor/fullname.glade delete mode 100644 addressbook/gui/contact-editor/head.png delete mode 100644 addressbook/gui/contact-editor/netfreebusy.png delete mode 100644 addressbook/gui/contact-editor/netmeeting.png delete mode 100644 addressbook/gui/contact-editor/phone.png delete mode 100644 addressbook/gui/contact-editor/snailmail.png delete mode 100644 addressbook/gui/contact-editor/test-editor.c delete mode 100644 addressbook/gui/contact-editor/web.png delete mode 100644 addressbook/gui/minicard/.cvsignore delete mode 100644 addressbook/gui/minicard/Makefile.am delete mode 100644 addressbook/gui/minicard/e-minicard-label.c delete mode 100644 addressbook/gui/minicard/e-minicard-label.h delete mode 100644 addressbook/gui/minicard/e-minicard-view.c delete mode 100644 addressbook/gui/minicard/e-minicard-view.h delete mode 100644 addressbook/gui/minicard/e-minicard.c delete mode 100644 addressbook/gui/minicard/e-minicard.h delete mode 100644 addressbook/gui/minicard/e-reflow-sorted.c delete mode 100644 addressbook/gui/minicard/e-reflow-sorted.h delete mode 100644 addressbook/gui/minicard/e-reflow.c delete mode 100644 addressbook/gui/minicard/e-reflow.h delete mode 100644 addressbook/gui/minicard/test-minicard-label.c delete mode 100644 addressbook/gui/minicard/test-minicard-view.c delete mode 100644 addressbook/gui/minicard/test-minicard.c delete mode 100644 addressbook/gui/minicard/test-reflow.c delete mode 100644 addressbook/gui/widgets/Makefile.am delete mode 100644 addressbook/gui/widgets/e-addressbook-model.c delete mode 100644 addressbook/gui/widgets/e-addressbook-model.h delete mode 100644 addressbook/gui/widgets/e-minicard-label.c delete mode 100644 addressbook/gui/widgets/e-minicard-label.h delete mode 100644 addressbook/gui/widgets/e-minicard-view.c delete mode 100644 addressbook/gui/widgets/e-minicard-view.h delete mode 100644 addressbook/gui/widgets/e-minicard.c delete mode 100644 addressbook/gui/widgets/e-minicard.h delete mode 100644 addressbook/gui/widgets/test-minicard-label.c delete mode 100644 addressbook/gui/widgets/test-minicard-view.c delete mode 100644 addressbook/gui/widgets/test-minicard.c delete mode 100644 addressbook/gui/widgets/test-reflow.c delete mode 100644 addressbook/printing/.cvsignore delete mode 100644 addressbook/printing/Makefile.am delete mode 100644 addressbook/printing/e-contact-print-style-editor.c delete mode 100644 addressbook/printing/e-contact-print-style-editor.h delete mode 100644 addressbook/printing/e-contact-print-types.h delete mode 100644 addressbook/printing/e-contact-print.c delete mode 100644 addressbook/printing/e-contact-print.glade delete mode 100644 addressbook/printing/e-contact-print.glade.h delete mode 100644 addressbook/printing/e-contact-print.h delete mode 100644 addressbook/printing/medbook.ecps delete mode 100644 addressbook/printing/phonelist.ecps delete mode 100644 addressbook/printing/smallbook.ecps delete mode 100644 addressbook/printing/test-contact-print-style-editor.c delete mode 100644 addressbook/printing/test-print.c delete mode 100644 art/.cvsignore delete mode 100644 art/Makefile.am delete mode 100644 art/attachment.xpm delete mode 100644 art/briefcase.png delete mode 100644 art/cellphone.png delete mode 100644 art/envelope.png delete mode 100644 art/evolution-calendar-mini.png delete mode 100644 art/evolution-calendar.png delete mode 100644 art/evolution-contacts-mini.png delete mode 100644 art/evolution-contacts.png delete mode 100644 art/evolution-inbox-mini.png delete mode 100644 art/evolution-inbox.png delete mode 100644 art/evolution-notes-mini.png delete mode 100644 art/evolution-notes.png delete mode 100644 art/evolution-tasks-mini.png delete mode 100644 art/evolution-tasks.png delete mode 100644 art/evolution-today.png delete mode 100644 art/globe.png delete mode 100644 art/house.png delete mode 100644 art/mail-new.xpm delete mode 100644 art/mail-read.xpm delete mode 100644 art/mail-replied.xpm delete mode 100644 art/malehead.png delete mode 100644 art/mark.xpm delete mode 100644 art/meeting.xpm delete mode 100644 art/priority-high.xpm delete mode 100644 art/priority-low.xpm delete mode 100755 autogen.sh delete mode 100644 calendar/.cvsignore delete mode 100644 calendar/AUTHORS delete mode 100644 calendar/ChangeLog delete mode 100644 calendar/Makefile.am delete mode 100644 calendar/TODO delete mode 100644 calendar/cal-client/.cvsignore delete mode 100644 calendar/cal-client/Makefile.am delete mode 100644 calendar/cal-client/cal-client.c delete mode 100644 calendar/cal-client/cal-client.h delete mode 100644 calendar/cal-client/cal-listener.c delete mode 100644 calendar/cal-client/cal-listener.h delete mode 100644 calendar/cal-client/client-test.c delete mode 100644 calendar/cal-util/.cvsignore delete mode 100644 calendar/cal-util/Makefile.am delete mode 100644 calendar/cal-util/cal-recur.c delete mode 100644 calendar/cal-util/cal-recur.h delete mode 100644 calendar/cal-util/cal-util.c delete mode 100644 calendar/cal-util/cal-util.h delete mode 100644 calendar/cal-util/calobj.c delete mode 100644 calendar/cal-util/calobj.h delete mode 100644 calendar/cal-util/icalendar-save.c delete mode 100644 calendar/cal-util/icalendar-save.h delete mode 100644 calendar/cal-util/icalendar-test.c delete mode 100644 calendar/cal-util/icalendar.c delete mode 100644 calendar/cal-util/icalendar.h delete mode 100644 calendar/cal-util/timeutil.c delete mode 100644 calendar/cal-util/timeutil.h delete mode 100644 calendar/conduits/calendar/calendar-conduit-control-applet.c delete mode 100644 calendar/conduits/calendar/calendar-conduit-control-applet.desktop delete mode 100644 calendar/conduits/calendar/calendar-conduit.c delete mode 100644 calendar/conduits/calendar/calendar-conduit.h delete mode 100644 calendar/conduits/todo/todo-conduit-control-applet.c delete mode 100644 calendar/conduits/todo/todo-conduit-control-applet.desktop delete mode 100644 calendar/conduits/todo/todo-conduit.c delete mode 100644 calendar/conduits/todo/todo-conduit.h delete mode 100644 calendar/doc/.cvsignore delete mode 100644 calendar/doc/C/.cvsignore delete mode 100644 calendar/doc/C/Makefile.am delete mode 100644 calendar/doc/C/gnomecal.sgml delete mode 100644 calendar/doc/C/images/cal-props.gif delete mode 100644 calendar/doc/C/images/calday.gif delete mode 100644 calendar/doc/C/images/calmonth.gif delete mode 100644 calendar/doc/C/images/calweek.gif delete mode 100644 calendar/doc/C/images/calyear.gif delete mode 100644 calendar/doc/C/topic.dat delete mode 100644 calendar/doc/Makefile.am delete mode 100644 calendar/gui/.cvsignore delete mode 100644 calendar/gui/GNOME_Evolution_Calendar.oaf.in delete mode 100644 calendar/gui/GNOME_Evolution_Calendar.oafinfo delete mode 100644 calendar/gui/GNOME_Evolution_Calendar_Control.oaf.in delete mode 100644 calendar/gui/GNOME_Evolution_Calendar_Control.oafinfo delete mode 100644 calendar/gui/GNOME_Evolution_Calendar_gnomecal.oaf.in delete mode 100644 calendar/gui/GNOME_Evolution_Calendar_gnomecal.oafinfo delete mode 100644 calendar/gui/GnomeCal.idl delete mode 100644 calendar/gui/Makefile.am delete mode 100644 calendar/gui/alarm-notify/alarm-notify-dialog.c delete mode 100644 calendar/gui/alarm-notify/alarm-notify-dialog.h delete mode 100644 calendar/gui/alarm-notify/alarm-notify.glade delete mode 100644 calendar/gui/alarm-notify/alarm.c delete mode 100644 calendar/gui/alarm-notify/alarm.h delete mode 100644 calendar/gui/alarm.c delete mode 100644 calendar/gui/alarm.h delete mode 100644 calendar/gui/bell.xpm delete mode 100644 calendar/gui/cal_struct.h delete mode 100644 calendar/gui/calendar-commands.c delete mode 100644 calendar/gui/calendar-commands.h delete mode 100644 calendar/gui/calendar-component.c delete mode 100644 calendar/gui/calendar-component.h delete mode 100644 calendar/gui/calendar-conduit-control-applet.c delete mode 100644 calendar/gui/calendar-conduit-control-applet.desktop delete mode 100644 calendar/gui/calendar-conduit.c delete mode 100644 calendar/gui/calendar-conduit.h delete mode 100644 calendar/gui/calendar-control.gnorba delete mode 100644 calendar/gui/calendar-control.oafinfo delete mode 100644 calendar/gui/calendar-pilot-sync.c delete mode 100644 calendar/gui/component-factory.c delete mode 100644 calendar/gui/component-factory.h delete mode 100644 calendar/gui/control-factory.c delete mode 100644 calendar/gui/control-factory.h delete mode 100644 calendar/gui/dayview.xpm delete mode 100644 calendar/gui/dialogs/.cvsignore delete mode 100644 calendar/gui/dialogs/Makefile.am delete mode 100644 calendar/gui/dialogs/alarm-notify-dialog.c delete mode 100644 calendar/gui/dialogs/alarm-notify-dialog.h delete mode 100644 calendar/gui/dialogs/alarm-notify.glade delete mode 100644 calendar/gui/dialogs/alarm-notify.glade.h delete mode 100644 calendar/gui/e-day-view-main-item.c delete mode 100644 calendar/gui/e-day-view-main-item.h delete mode 100644 calendar/gui/e-day-view-time-item.c delete mode 100644 calendar/gui/e-day-view-time-item.h delete mode 100644 calendar/gui/e-day-view-top-item.c delete mode 100644 calendar/gui/e-day-view-top-item.h delete mode 100644 calendar/gui/e-day-view.c delete mode 100644 calendar/gui/e-day-view.h delete mode 100644 calendar/gui/e-week-view-event-item.c delete mode 100644 calendar/gui/e-week-view-event-item.h delete mode 100644 calendar/gui/e-week-view-main-item.c delete mode 100644 calendar/gui/e-week-view-main-item.h delete mode 100644 calendar/gui/e-week-view-titles-item.c delete mode 100644 calendar/gui/e-week-view-titles-item.h delete mode 100644 calendar/gui/e-week-view.c delete mode 100644 calendar/gui/e-week-view.h delete mode 100644 calendar/gui/event-editor-dialog.glade delete mode 100644 calendar/gui/event-editor-utils.c delete mode 100644 calendar/gui/event-editor-utils.h delete mode 100644 calendar/gui/event-editor.c delete mode 100644 calendar/gui/event-editor.h delete mode 100644 calendar/gui/eventedit.c delete mode 100644 calendar/gui/eventedit.h delete mode 100644 calendar/gui/evolution-calendar-control.c delete mode 100644 calendar/gui/evolution-calendar.gnorba delete mode 100644 calendar/gui/evolution-calendar.oafinfo delete mode 100644 calendar/gui/getdate.y delete mode 100644 calendar/gui/gncal-todo.c delete mode 100644 calendar/gui/gncal-todo.h delete mode 100644 calendar/gui/gnome-cal.c delete mode 100644 calendar/gui/gnome-cal.h delete mode 100644 calendar/gui/gnome-cal.html delete mode 100644 calendar/gui/gnome-calendar-conduit.png delete mode 100644 calendar/gui/gnome-month-item.c delete mode 100644 calendar/gui/gnome-month-item.h delete mode 100644 calendar/gui/gnomecal.gnorba delete mode 100644 calendar/gui/gnomecal.oafinfo delete mode 100644 calendar/gui/goto.c delete mode 100644 calendar/gui/icalendar-types delete mode 100644 calendar/gui/layout.c delete mode 100644 calendar/gui/layout.h delete mode 100644 calendar/gui/main.c delete mode 100644 calendar/gui/mark.c delete mode 100644 calendar/gui/mark.h delete mode 100644 calendar/gui/monthview.xpm delete mode 100644 calendar/gui/popup-menu.c delete mode 100644 calendar/gui/popup-menu.h delete mode 100644 calendar/gui/print.c delete mode 100644 calendar/gui/print.h delete mode 100644 calendar/gui/prop.c delete mode 100644 calendar/gui/recur.xpm delete mode 100644 calendar/gui/test.vcf delete mode 100644 calendar/gui/test2.vcf delete mode 100644 calendar/gui/todo-conduit-control-applet.c delete mode 100644 calendar/gui/todo-conduit-control-applet.desktop delete mode 100644 calendar/gui/todo-conduit.c delete mode 100644 calendar/gui/todo-conduit.h delete mode 100644 calendar/gui/topic.dat delete mode 100644 calendar/gui/weekview.xpm delete mode 100644 calendar/gui/workweekview.xpm delete mode 100644 calendar/gui/yearview.xpm delete mode 100644 calendar/idl/.cvsignore delete mode 100644 calendar/idl/Makefile.am delete mode 100644 calendar/idl/evolution-calendar.idl delete mode 100644 calendar/pcs/.cvsignore delete mode 100644 calendar/pcs/Makefile.am delete mode 100644 calendar/pcs/cal-backend-imc.c delete mode 100644 calendar/pcs/cal-backend-imc.h delete mode 100644 calendar/pcs/cal-backend.c delete mode 100644 calendar/pcs/cal-backend.h delete mode 100644 calendar/pcs/cal-common.h delete mode 100644 calendar/pcs/cal-factory.c delete mode 100644 calendar/pcs/cal-factory.h delete mode 100644 calendar/pcs/cal.c delete mode 100644 calendar/pcs/cal.h delete mode 100644 calendar/pcs/icalendar-save.c delete mode 100644 calendar/pcs/icalendar-save.h delete mode 100644 calendar/pcs/icalendar-test.c delete mode 100644 calendar/pcs/icalendar.c delete mode 100644 calendar/pcs/icalendar.h delete mode 100644 calendar/pcs/job.c delete mode 100644 calendar/pcs/job.h delete mode 100644 camel/.cvsignore delete mode 100644 camel/CODING.STYLE delete mode 100644 camel/ChangeLog delete mode 100644 camel/Makefile.am delete mode 100644 camel/README delete mode 100644 camel/README.COPYRIGHT delete mode 100644 camel/README.HACKING delete mode 100644 camel/camel-address.c delete mode 100644 camel/camel-address.h delete mode 100644 camel/camel-arg-collector.c delete mode 100644 camel/camel-data-wrapper.c delete mode 100644 camel/camel-data-wrapper.h delete mode 100644 camel/camel-exception-list.def delete mode 100644 camel/camel-exception.c delete mode 100644 camel/camel-exception.h delete mode 100644 camel/camel-folder-pt-proxy.c delete mode 100644 camel/camel-folder-pt-proxy.h delete mode 100644 camel/camel-folder-search.c delete mode 100644 camel/camel-folder-search.h delete mode 100644 camel/camel-folder-summary.c delete mode 100644 camel/camel-folder-summary.h delete mode 100644 camel/camel-folder.c delete mode 100644 camel/camel-folder.h delete mode 100644 camel/camel-internet-address.c delete mode 100644 camel/camel-internet-address.h delete mode 100644 camel/camel-marshal-utils.c delete mode 100644 camel/camel-marshal-utils.h delete mode 100644 camel/camel-medium.c delete mode 100644 camel/camel-medium.h delete mode 100644 camel/camel-mime-filter-basic.c delete mode 100644 camel/camel-mime-filter-basic.h delete mode 100644 camel/camel-mime-filter-charset.c delete mode 100644 camel/camel-mime-filter-charset.h delete mode 100644 camel/camel-mime-filter-from.c delete mode 100644 camel/camel-mime-filter-from.h delete mode 100644 camel/camel-mime-filter-index.c delete mode 100644 camel/camel-mime-filter-index.h delete mode 100644 camel/camel-mime-filter-save.c delete mode 100644 camel/camel-mime-filter-save.h delete mode 100644 camel/camel-mime-filter-smtp.c delete mode 100644 camel/camel-mime-filter-smtp.h delete mode 100644 camel/camel-mime-filter.c delete mode 100644 camel/camel-mime-filter.h delete mode 100644 camel/camel-mime-message.c delete mode 100644 camel/camel-mime-message.h delete mode 100644 camel/camel-mime-parser.c delete mode 100644 camel/camel-mime-parser.h delete mode 100644 camel/camel-mime-part-utils.c delete mode 100644 camel/camel-mime-part-utils.h delete mode 100644 camel/camel-mime-part.c delete mode 100644 camel/camel-mime-part.h delete mode 100644 camel/camel-mime-utils.c delete mode 100644 camel/camel-mime-utils.h delete mode 100644 camel/camel-movemail.c delete mode 100644 camel/camel-movemail.h delete mode 100644 camel/camel-multipart.c delete mode 100644 camel/camel-multipart.h delete mode 100644 camel/camel-news-address.c delete mode 100644 camel/camel-news-address.h delete mode 100644 camel/camel-object.c delete mode 100644 camel/camel-object.h delete mode 100644 camel/camel-op-queue.c delete mode 100644 camel/camel-op-queue.h delete mode 100644 camel/camel-provider.c delete mode 100644 camel/camel-provider.h delete mode 100644 camel/camel-seekable-stream.c delete mode 100644 camel/camel-seekable-stream.h delete mode 100644 camel/camel-seekable-substream.c delete mode 100644 camel/camel-seekable-substream.h delete mode 100644 camel/camel-service.c delete mode 100644 camel/camel-service.h delete mode 100644 camel/camel-session.c delete mode 100644 camel/camel-session.h delete mode 100644 camel/camel-store.c delete mode 100644 camel/camel-store.h delete mode 100644 camel/camel-stream-buffer.c delete mode 100644 camel/camel-stream-buffer.h delete mode 100644 camel/camel-stream-filter.c delete mode 100644 camel/camel-stream-filter.h delete mode 100644 camel/camel-stream-fs.c delete mode 100644 camel/camel-stream-fs.h delete mode 100644 camel/camel-stream-mem.c delete mode 100644 camel/camel-stream-mem.h delete mode 100644 camel/camel-stream.c delete mode 100644 camel/camel-stream.h delete mode 100644 camel/camel-thread-proxy.c delete mode 100644 camel/camel-thread-proxy.h delete mode 100644 camel/camel-transport.c delete mode 100644 camel/camel-transport.h delete mode 100644 camel/camel-types.h delete mode 100644 camel/camel-url.c delete mode 100644 camel/camel-url.h delete mode 100644 camel/camel.c delete mode 100644 camel/camel.h delete mode 100644 camel/devel-docs/camel_stream.dia delete mode 100644 camel/gmime-content-field.c delete mode 100644 camel/gmime-content-field.h delete mode 100644 camel/gstring-util.c delete mode 100644 camel/gstring-util.h delete mode 100644 camel/hash-table-utils.c delete mode 100644 camel/hash-table-utils.h delete mode 100644 camel/md5-utils.c delete mode 100644 camel/md5-utils.h delete mode 100644 camel/providers/.cvsignore delete mode 100644 camel/providers/MH/.cvsignore delete mode 100644 camel/providers/MH/Makefile.am delete mode 100644 camel/providers/MH/camel-mh-folder.c delete mode 100644 camel/providers/MH/camel-mh-folder.h delete mode 100644 camel/providers/MH/camel-mh-provider.c delete mode 100644 camel/providers/MH/camel-mh-store.c delete mode 100644 camel/providers/MH/camel-mh-store.h delete mode 100644 camel/providers/MH/mh-summary.c delete mode 100644 camel/providers/MH/mh-summary.h delete mode 100644 camel/providers/MH/mh-uid.c delete mode 100644 camel/providers/MH/mh-uid.h delete mode 100644 camel/providers/MH/mh-utils.c delete mode 100644 camel/providers/MH/mh-utils.h delete mode 100644 camel/providers/Makefile.am delete mode 100644 camel/providers/imap/.cvsignore delete mode 100644 camel/providers/imap/Makefile.am delete mode 100644 camel/providers/imap/camel-imap-folder.c delete mode 100644 camel/providers/imap/camel-imap-folder.h delete mode 100644 camel/providers/imap/camel-imap-provider.c delete mode 100644 camel/providers/imap/camel-imap-store.c delete mode 100644 camel/providers/imap/camel-imap-store.h delete mode 100644 camel/providers/imap/camel-imap-summary.h delete mode 100644 camel/providers/imap/imap.c delete mode 100644 camel/providers/imap/imap.h delete mode 100644 camel/providers/imap/libcamelimap.urls delete mode 100644 camel/providers/maildir/.cvsignore delete mode 100644 camel/providers/maildir/Makefile.am delete mode 100644 camel/providers/maildir/camel-maildir-folder.c delete mode 100644 camel/providers/maildir/camel-maildir-folder.h delete mode 100644 camel/providers/maildir/camel-maildir-provider.c delete mode 100644 camel/providers/maildir/camel-maildir-store.c delete mode 100644 camel/providers/maildir/camel-maildir-store.h delete mode 100644 camel/providers/mbox/.cvsignore delete mode 100644 camel/providers/mbox/Makefile.am delete mode 100644 camel/providers/mbox/camel-mbox-folder.c delete mode 100644 camel/providers/mbox/camel-mbox-folder.h delete mode 100644 camel/providers/mbox/camel-mbox-provider.c delete mode 100644 camel/providers/mbox/camel-mbox-store.c delete mode 100644 camel/providers/mbox/camel-mbox-store.h delete mode 100644 camel/providers/mbox/camel-mbox-summary.c delete mode 100644 camel/providers/mbox/camel-mbox-summary.h delete mode 100644 camel/providers/mbox/libcamelmbox.urls delete mode 100644 camel/providers/nntp/.cvsignore delete mode 100644 camel/providers/nntp/Makefile.am delete mode 100644 camel/providers/nntp/camel-nntp-folder.c delete mode 100644 camel/providers/nntp/camel-nntp-folder.h delete mode 100644 camel/providers/nntp/camel-nntp-provider.c delete mode 100644 camel/providers/nntp/camel-nntp-store.c delete mode 100644 camel/providers/nntp/camel-nntp-store.h delete mode 100644 camel/providers/nntp/camel-nntp-utils.c delete mode 100644 camel/providers/nntp/camel-nntp-utils.h delete mode 100644 camel/providers/nntp/libcamelnntp.urls delete mode 100644 camel/providers/pop3/.cvsignore delete mode 100644 camel/providers/pop3/Makefile.am delete mode 100644 camel/providers/pop3/camel-pop3-folder.c delete mode 100644 camel/providers/pop3/camel-pop3-folder.h delete mode 100644 camel/providers/pop3/camel-pop3-provider.c delete mode 100644 camel/providers/pop3/camel-pop3-store.c delete mode 100644 camel/providers/pop3/camel-pop3-store.h delete mode 100644 camel/providers/pop3/libcamelpop3.urls delete mode 100644 camel/providers/sendmail/.cvsignore delete mode 100644 camel/providers/sendmail/Makefile.am delete mode 100644 camel/providers/sendmail/camel-sendmail-provider.c delete mode 100644 camel/providers/sendmail/camel-sendmail-transport.c delete mode 100644 camel/providers/sendmail/camel-sendmail-transport.h delete mode 100644 camel/providers/sendmail/libcamelsendmail.urls delete mode 100644 camel/providers/smtp/.cvsignore delete mode 100644 camel/providers/smtp/Makefile.am delete mode 100644 camel/providers/smtp/camel-smtp-provider.c delete mode 100644 camel/providers/smtp/camel-smtp-transport.c delete mode 100644 camel/providers/smtp/camel-smtp-transport.h delete mode 100644 camel/providers/smtp/libcamelsmtp.urls delete mode 100644 camel/providers/vee/.cvsignore delete mode 100644 camel/providers/vee/Makefile.am delete mode 100644 camel/providers/vee/camel-vee-folder.c delete mode 100644 camel/providers/vee/camel-vee-folder.h delete mode 100644 camel/providers/vee/camel-vee-provider.c delete mode 100644 camel/providers/vee/camel-vee-store.c delete mode 100644 camel/providers/vee/camel-vee-store.h delete mode 100644 camel/providers/vee/libcamelvee.urls delete mode 100644 camel/string-utils.c delete mode 100644 camel/string-utils.h delete mode 100644 composer/.cvsignore delete mode 100644 composer/ChangeLog delete mode 100644 composer/Makefile.am delete mode 100644 composer/e-msg-composer-address-dialog.c delete mode 100644 composer/e-msg-composer-address-dialog.glade delete mode 100644 composer/e-msg-composer-address-dialog.glade.h delete mode 100644 composer/e-msg-composer-address-dialog.h delete mode 100644 composer/e-msg-composer-address-entry.c delete mode 100644 composer/e-msg-composer-address-entry.h delete mode 100644 composer/e-msg-composer-attachment-bar.c delete mode 100644 composer/e-msg-composer-attachment-bar.h delete mode 100644 composer/e-msg-composer-attachment.c delete mode 100644 composer/e-msg-composer-attachment.glade delete mode 100644 composer/e-msg-composer-attachment.glade.h delete mode 100644 composer/e-msg-composer-attachment.h delete mode 100644 composer/e-msg-composer-hdrs.c delete mode 100644 composer/e-msg-composer-hdrs.h delete mode 100644 composer/e-msg-composer.c delete mode 100644 composer/e-msg-composer.h delete mode 100644 composer/main.c delete mode 100644 configure.in delete mode 100644 data/.cvsignore delete mode 100644 data/Makefile.am delete mode 100644 data/evolution.desktop delete mode 100644 default_user/.cvsignore delete mode 100644 default_user/ChangeLog delete mode 100644 default_user/Makefile.am delete mode 100644 default_user/local/.cvsignore delete mode 100644 default_user/local/Calendar/.cvsignore delete mode 100644 default_user/local/Calendar/Makefile.am delete mode 100644 default_user/local/Calendar/folder-metadata.xml delete mode 100644 default_user/local/Contacts/.cvsignore delete mode 100644 default_user/local/Contacts/Makefile.am delete mode 100644 default_user/local/Contacts/folder-metadata.xml delete mode 100644 default_user/local/Directories/.cvsignore delete mode 100644 default_user/local/Directories/Makefile.am delete mode 100644 default_user/local/Directories/folder-metadata.xml delete mode 100644 default_user/local/Directories/subfolders/.cvsignore delete mode 100644 default_user/local/Directories/subfolders/Bigfoot/.cvsignore delete mode 100644 default_user/local/Directories/subfolders/Bigfoot/Makefile.am delete mode 100644 default_user/local/Directories/subfolders/Bigfoot/folder-metadata.xml delete mode 100644 default_user/local/Directories/subfolders/Bigfoot/uri delete mode 100644 default_user/local/Directories/subfolders/Makefile.am delete mode 100644 default_user/local/Directories/subfolders/Netcenter/.cvsignore delete mode 100644 default_user/local/Directories/subfolders/Netcenter/Makefile.am delete mode 100644 default_user/local/Directories/subfolders/Netcenter/folder-metadata.xml delete mode 100644 default_user/local/Directories/subfolders/Netcenter/uri delete mode 100644 default_user/local/Drafts/.cvsignore delete mode 100644 default_user/local/Drafts/Makefile.am delete mode 100644 default_user/local/Drafts/folder-metadata.xml delete mode 100644 default_user/local/Inbox/.cvsignore delete mode 100644 default_user/local/Inbox/Makefile.am delete mode 100644 default_user/local/Inbox/folder-metadata.xml delete mode 100644 default_user/local/Inbox/mbox delete mode 100644 default_user/local/Makefile.am delete mode 100644 default_user/local/Outbox/.cvsignore delete mode 100644 default_user/local/Outbox/Makefile.am delete mode 100644 default_user/local/Outbox/folder-metadata.xml delete mode 100644 default_user/local/Trash/.cvsignore delete mode 100644 default_user/local/Trash/Makefile.am delete mode 100644 default_user/local/Trash/folder-metadata.xml delete mode 100644 default_user/shortcuts.xml delete mode 100644 devel-docs/.cvsignore delete mode 100644 devel-docs/Makefile.am delete mode 100644 devel-docs/camel/.cvsignore delete mode 100644 devel-docs/camel/Makefile.am delete mode 100644 devel-docs/camel/README_AND_TODO.txt delete mode 100644 devel-docs/camel/camel-docs.sgml delete mode 100644 devel-docs/camel/camel-sections.txt delete mode 100644 devel-docs/camel/camel.types delete mode 100644 devel-docs/camel/tmpl/.cvsignore delete mode 100644 devel-docs/camel/tmpl/camel-data-wrapper.sgml delete mode 100644 devel-docs/camel/tmpl/camel-folder.sgml delete mode 100644 devel-docs/camel/tmpl/camel-mime-message.sgml delete mode 100644 devel-docs/camel/tmpl/camel-mime-part.sgml delete mode 100644 devel-docs/camel/tmpl/camel-recipient.sgml delete mode 100644 devel-docs/camel/tmpl/camel-service.sgml delete mode 100644 devel-docs/camel/tmpl/camel-store.sgml delete mode 100644 devel-docs/camel/tmpl/camel-stream.sgml delete mode 100644 devel-docs/misc/ref_and_id_proposition.txt delete mode 100644 devel-docs/query/virtual-folder-in-depth.sgml delete mode 100644 devel-docs/query/virtual-folder-in-depth.txt delete mode 100644 doc/.cvsignore delete mode 100644 doc/C/apx-authors.sgml delete mode 100644 doc/C/apx-bugs.sgml delete mode 100644 doc/C/apx-fdl.sgml delete mode 100644 doc/C/apx-gloss.sgml delete mode 100644 doc/C/config-prefs.sgml delete mode 100644 doc/C/config-setupassist.sgml delete mode 100644 doc/C/config-sync.sgml delete mode 100644 doc/C/devel-action.sgml delete mode 100644 doc/C/devel-component.sgml delete mode 100644 doc/C/devel-script.sgml delete mode 100644 doc/C/evolution-guide.sgml delete mode 100644 doc/C/fig/mail-druid-pic.png delete mode 100644 doc/C/fig/mainwindow-pic.png delete mode 100644 doc/C/preface.sgml delete mode 100644 doc/C/usage-calendar.sgml delete mode 100644 doc/C/usage-contact.sgml delete mode 100644 doc/C/usage-mail.sgml delete mode 100644 doc/C/usage-mainwindow.sgml delete mode 100644 doc/C/usage-sync.sgml delete mode 100644 doc/Camel-Classes delete mode 100644 doc/ChangeLog delete mode 100644 doc/Design delete mode 100644 doc/white-papers/calendar/calendar.sgml delete mode 100644 doc/white-papers/mail/camel.sgml delete mode 100644 doc/white-papers/mail/ibex.sgml delete mode 100644 doc/white-papers/widgets/e-table.sgml delete mode 100644 e-util/.cvsignore delete mode 100644 e-util/ChangeLog delete mode 100644 e-util/Makefile.am delete mode 100644 e-util/e-canvas-utils.c delete mode 100644 e-util/e-canvas-utils.h delete mode 100644 e-util/e-canvas.c delete mode 100644 e-util/e-canvas.h delete mode 100644 e-util/e-cursors.c delete mode 100644 e-util/e-cursors.h delete mode 100644 e-util/e-dialog-widgets.c delete mode 100644 e-util/e-dialog-widgets.h delete mode 100644 e-util/e-gui-utils.c delete mode 100644 e-util/e-gui-utils.h delete mode 100644 e-util/e-html-utils.c delete mode 100644 e-util/e-html-utils.h delete mode 100644 e-util/e-popup-menu.c delete mode 100644 e-util/e-popup-menu.h delete mode 100644 e-util/e-setup.c delete mode 100644 e-util/e-setup.h delete mode 100644 e-util/e-sexp.c delete mode 100644 e-util/e-sexp.h delete mode 100644 e-util/e-text-event-processor-emacs-like.c delete mode 100644 e-util/e-text-event-processor-emacs-like.h delete mode 100644 e-util/e-text-event-processor-types.h delete mode 100644 e-util/e-text-event-processor.c delete mode 100644 e-util/e-text-event-processor.h delete mode 100644 e-util/e-util.c delete mode 100644 e-util/e-util.c-8611 delete mode 100644 e-util/e-util.h delete mode 100644 e-util/e-util.h-29002 delete mode 100644 e-util/e-xml-utils.c delete mode 100644 e-util/e-xml-utils.c-56826 delete mode 100644 e-util/e-xml-utils.h delete mode 100644 e-util/e-xml-utils.h-82548 delete mode 100644 e-util/ename/.cvsignore delete mode 100644 e-util/ename/Makefile.am delete mode 100644 e-util/ename/TODO delete mode 100644 e-util/ename/e-name-western-tables.h delete mode 100644 e-util/ename/e-name-western.c delete mode 100644 e-util/ename/e-name-western.h delete mode 100644 e-util/ename/test-ename-western-gtk.c delete mode 100644 e-util/ename/test-ename-western.c delete mode 100644 evolution.spec.in delete mode 100644 filter/.cvsignore delete mode 100644 filter/ChangeLog delete mode 100644 filter/Makefile.am delete mode 100755 filter/blank.xpm delete mode 100755 filter/check.xpm delete mode 100644 filter/filter-arg-types.c delete mode 100644 filter/filter-arg-types.h delete mode 100644 filter/filter-arg.c delete mode 100644 filter/filter-arg.h delete mode 100644 filter/filter-driver.c delete mode 100644 filter/filter-driver.h delete mode 100644 filter/filter-druid.c delete mode 100644 filter/filter-druid.h delete mode 100644 filter/filter-editor.c delete mode 100644 filter/filter-editor.h delete mode 100644 filter/filter-format.c delete mode 100644 filter/filter-format.h delete mode 100644 filter/filter-xml.c delete mode 100644 filter/filter-xml.h delete mode 100644 filter/filtertypes.xml delete mode 100644 filter/vfoldertypes.xml delete mode 100644 help/.cvsignore delete mode 100644 help/C/apx-authors.sgml delete mode 100644 help/C/apx-bugs.sgml delete mode 100644 help/C/apx-fdl.sgml delete mode 100644 help/C/apx-gloss.sgml delete mode 100644 help/C/config-prefs.sgml delete mode 100644 help/C/config-setupassist.sgml delete mode 100644 help/C/config-sync.sgml delete mode 100644 help/C/devel-action.sgml delete mode 100644 help/C/devel-component.sgml delete mode 100644 help/C/devel-script.sgml delete mode 100644 help/C/evolution-guide.sgml delete mode 100644 help/C/fig/mail-druid-pic.png delete mode 100644 help/C/fig/mainwindow-pic.png delete mode 100644 help/C/preface.sgml delete mode 100644 help/C/usage-calendar.sgml delete mode 100644 help/C/usage-contact.sgml delete mode 100644 help/C/usage-mail.sgml delete mode 100644 help/C/usage-mainwindow.sgml delete mode 100644 help/C/usage-sync.sgml delete mode 100644 help/Camel-Classes delete mode 100644 help/ChangeLog delete mode 100644 help/Design delete mode 100644 help/white-papers/calendar/calendar.sgml delete mode 100644 help/white-papers/mail/camel.sgml delete mode 100644 help/white-papers/mail/ibex.sgml delete mode 100644 help/white-papers/widgets/e-table.sgml delete mode 100644 libibex/.cvsignore delete mode 100644 libibex/COPYING.LIB delete mode 100644 libibex/ChangeLog delete mode 100644 libibex/Makefile.am delete mode 100644 libibex/TODO delete mode 100644 libibex/file.c delete mode 100644 libibex/find.c delete mode 100644 libibex/ibex.h delete mode 100644 libibex/ibex_internal.h delete mode 100644 libibex/index.c delete mode 100644 libibex/lookup.c delete mode 100644 libibex/mkindex.c delete mode 100644 libibex/words.c delete mode 100644 libical/.cvsignore delete mode 100644 libical/AUTHORS delete mode 100644 libical/CHANGES delete mode 100644 libical/COPYING delete mode 100644 libical/ChangeLog delete mode 100644 libical/INSTALL delete mode 100644 libical/MacOS/errno.h delete mode 100644 libical/MacOS/libical.mcp delete mode 100644 libical/MacOS/libical.mcp.exp delete mode 100644 libical/MacOS/libical_prefix.h delete mode 100644 libical/MacOS/restrictions.make delete mode 100644 libical/MacOS/restrictions.script delete mode 100644 libical/MacOS/strdup.c delete mode 100644 libical/MacOS/strdup.h delete mode 100644 libical/Makefile.am delete mode 100644 libical/NEWS delete mode 100644 libical/README delete mode 100644 libical/TEST delete mode 100644 libical/THANKS delete mode 100644 libical/TODO delete mode 100644 libical/acconfig.h delete mode 100755 libical/autogen.sh delete mode 100644 libical/configure.in delete mode 100644 libical/configure.scan delete mode 100644 libical/design-data/.cvsignore delete mode 100644 libical/design-data/Makefile.am delete mode 100644 libical/design-data/components.txt delete mode 100644 libical/design-data/param-c-types.txt delete mode 100644 libical/design-data/params-in-prop.txt delete mode 100644 libical/design-data/prop-to-value.txt delete mode 100644 libical/design-data/property-tokens.txt delete mode 100644 libical/design-data/restrictions.csv delete mode 100644 libical/design-data/status-new.txt delete mode 100644 libical/design-data/status.foo delete mode 100644 libical/design-data/status.txt delete mode 100644 libical/design-data/value-c-types.txt delete mode 100644 libical/design-data/value-mem-semantics.txt delete mode 100644 libical/doc/.cvsignore delete mode 100644 libical/doc/Makefile.am delete mode 100644 libical/doc/UsingLibical.lyx delete mode 100644 libical/doc/UsingLibical.ps delete mode 100644 libical/doc/UsingLibical.sgml delete mode 100644 libical/doc/UsingLibical.txt delete mode 100755 libical/install-sh delete mode 100755 libical/missing delete mode 100644 libical/mkinstalldirs delete mode 100644 libical/scripts/.cvsignore delete mode 100644 libical/scripts/Makefile.am delete mode 100755 libical/scripts/mkderivedcomponents.pl delete mode 100755 libical/scripts/mkderivedparameters.pl delete mode 100755 libical/scripts/mkderivedproperties.pl delete mode 100755 libical/scripts/mkderivedvalues.pl delete mode 100755 libical/scripts/mkparameterrestrictions.pl delete mode 100755 libical/scripts/mkrestrictionrecords.pl delete mode 100755 libical/scripts/mkrestrictiontable.pl delete mode 100644 libical/src/.cvsignore delete mode 100644 libical/src/Makefile.am delete mode 100644 libical/src/libical/.cvsignore delete mode 100644 libical/src/libical/.gdb_history delete mode 100644 libical/src/libical/.gdbinit delete mode 100644 libical/src/libical/Makefile.am delete mode 100644 libical/src/libical/base64.c delete mode 100644 libical/src/libical/filelock.c delete mode 100644 libical/src/libical/filelock.h delete mode 100644 libical/src/libical/foo delete mode 100644 libical/src/libical/ical.h delete mode 100644 libical/src/libical/icalcomponent.c delete mode 100644 libical/src/libical/icalcomponent.h delete mode 100644 libical/src/libical/icalenums.c delete mode 100644 libical/src/libical/icalenums.h delete mode 100644 libical/src/libical/icalerror.c delete mode 100644 libical/src/libical/icalerror.h delete mode 100644 libical/src/libical/icalirip.h delete mode 100644 libical/src/libical/icalitip.output delete mode 100644 libical/src/libical/icalitip.tab.c delete mode 100644 libical/src/libical/icalitip.tab.h delete mode 100644 libical/src/libical/icalitipl.l delete mode 100644 libical/src/libical/icalitipy.y delete mode 100644 libical/src/libical/icallexer.l delete mode 100644 libical/src/libical/icalmemory.c delete mode 100644 libical/src/libical/icalmemory.h delete mode 100644 libical/src/libical/icalparameter.c delete mode 100644 libical/src/libical/icalparameter.h delete mode 100644 libical/src/libical/icalparser.c delete mode 100644 libical/src/libical/icalparser.h delete mode 100644 libical/src/libical/icalproperty.c delete mode 100644 libical/src/libical/icalproperty.h delete mode 100644 libical/src/libical/icalrestriction.c delete mode 100644 libical/src/libical/icalrestriction.h delete mode 100644 libical/src/libical/icaltypes.c delete mode 100644 libical/src/libical/icaltypes.h delete mode 100644 libical/src/libical/icalvalue.c delete mode 100644 libical/src/libical/icalvalue.h delete mode 100644 libical/src/libical/icalvcal.h delete mode 100644 libical/src/libical/icalversion.h.in delete mode 100644 libical/src/libical/icalyacc.y delete mode 100644 libical/src/libical/locking.c delete mode 100644 libical/src/libical/pvl.c delete mode 100644 libical/src/libical/pvl.h delete mode 100644 libical/src/libical/testlocks.c delete mode 100644 libical/src/libicalss/.cvsignore delete mode 100644 libical/src/libicalss/Makefile.am delete mode 100644 libical/src/libicalss/icalcalendar.c delete mode 100644 libical/src/libicalss/icalcalendar.h delete mode 100644 libical/src/libicalss/icalcluster.c delete mode 100644 libical/src/libicalss/icalcluster.h delete mode 100644 libical/src/libicalss/icalcomponent.h delete mode 100644 libical/src/libicalss/icalstore.c delete mode 100644 libical/src/libicalss/icalstore.h delete mode 100644 libical/src/pvl/Makefile delete mode 100644 libical/src/test/.cvsignore delete mode 100644 libical/src/test/Makefile.am delete mode 100644 libical/src/test/Makefile.in delete mode 100644 libical/src/test/alice/booked/199706 delete mode 100644 libical/src/test/alice/booked/199707 delete mode 100644 libical/src/test/alice/booked/199708 delete mode 100644 libical/src/test/alice/booked/199709 delete mode 100644 libical/src/test/alice/booked/199803 delete mode 100644 libical/src/test/alice/incoming.ics delete mode 100644 libical/src/test/copycluster.c delete mode 100644 libical/src/test/findobj.c delete mode 100644 libical/src/test/icaltestparser.c delete mode 100644 libical/src/test/regression.c delete mode 100644 libical/src/test/storage.c delete mode 100644 libical/src/test/test-component.icd delete mode 100644 libical/src/test/usecases.c delete mode 100644 libical/test-data/.cvsignore delete mode 100644 libical/test-data/0 delete mode 100644 libical/test-data/1 delete mode 100644 libical/test-data/1.1 delete mode 100644 libical/test-data/2 delete mode 100644 libical/test-data/2445.ics delete mode 100644 libical/test-data/2445.vcd delete mode 100644 libical/test-data/2446.ics delete mode 100644 libical/test-data/2446.vcd delete mode 100644 libical/test-data/3 delete mode 100644 libical/test-data/4 delete mode 100644 libical/test-data/5 delete mode 100644 libical/test-data/6 delete mode 100644 libical/test-data/7 delete mode 100644 libical/test-data/Makefile.am delete mode 100644 libical/test-data/smallcluster.ics delete mode 100644 libical/test-data/smallcluster.vcd delete mode 100644 libversit/.cvsignore delete mode 100644 libversit/Makefile.am delete mode 100644 libversit/README.TXT delete mode 100644 libversit/port.h delete mode 100644 libversit/vcaltest.c delete mode 100644 libversit/vcaltmp.c delete mode 100644 libversit/vcaltmp.h delete mode 100644 libversit/vcc.h delete mode 100644 libversit/vcc.y delete mode 100644 libversit/vctest.c delete mode 100644 libversit/vobject.c delete mode 100644 libversit/vobject.h delete mode 100644 mail/.cvsignore delete mode 100644 mail/ChangeLog delete mode 100644 mail/GNOME_Evolution_Mail.oaf.in delete mode 100644 mail/GNOME_Evolution_Mail.oafinfo delete mode 100644 mail/Mail.idl delete mode 100644 mail/Makefile.am delete mode 100644 mail/component-factory.c delete mode 100644 mail/component-factory.h delete mode 100644 mail/e-attchmt.png delete mode 100644 mail/evolution-mail.gnorba delete mode 100644 mail/evolution-mail.oafinfo delete mode 100644 mail/folder-browser-factory.c delete mode 100644 mail/folder-browser.c delete mode 100644 mail/folder-browser.h delete mode 100644 mail/mail-config.c delete mode 100644 mail/mail-display.c delete mode 100644 mail/mail-display.h delete mode 100644 mail/mail-format.c delete mode 100644 mail/mail-identify.c delete mode 100644 mail/mail-ops.c delete mode 100644 mail/mail-sources.c delete mode 100644 mail/mail-types.h delete mode 100644 mail/mail.h delete mode 100644 mail/main.c delete mode 100644 mail/message-list.c delete mode 100644 mail/message-list.h delete mode 100644 mail/pixmaps.h delete mode 100644 mail/pixmaps/attachment-header.xpm delete mode 100644 mail/pixmaps/attachment.xpm delete mode 100644 mail/pixmaps/empty.xpm delete mode 100644 mail/pixmaps/envelope-closed.xpm delete mode 100644 mail/pixmaps/envelope-deleted.xpm delete mode 100644 mail/pixmaps/envelope-opened.xpm delete mode 100644 mail/pixmaps/message-status.xpm delete mode 100644 mail/pixmaps/online-status.xpm delete mode 100644 mail/session.c delete mode 100644 mail/test-mail.c delete mode 100644 po/.cvsignore delete mode 100644 po/ChangeLog delete mode 100644 po/POTFILES.in delete mode 100644 po/da.po delete mode 100644 po/el.po delete mode 100644 po/es.po delete mode 100644 po/flu-danish delete mode 100644 po/fr.po delete mode 100644 po/gl.po delete mode 100644 po/hu.po delete mode 100644 po/ja.po delete mode 100644 po/ko.po delete mode 100644 po/nl.po delete mode 100644 po/no.po delete mode 100644 po/ru.po delete mode 100644 po/sv.po delete mode 100644 po/tr.po delete mode 100644 po/uk.po delete mode 100755 po/update.sh delete mode 100644 shell/.cvsignore delete mode 100644 shell/ChangeLog delete mode 100644 shell/Evolution-Shell.idl delete mode 100644 shell/Evolution-ShellComponent.idl delete mode 100644 shell/Evolution-Storage.idl delete mode 100644 shell/Evolution.idl delete mode 100644 shell/Makefile.am delete mode 100644 shell/Shell.idl delete mode 100644 shell/e-component-registry.c delete mode 100644 shell/e-component-registry.h delete mode 100644 shell/e-corba-storage-registry.c delete mode 100644 shell/e-corba-storage-registry.h delete mode 100644 shell/e-corba-storage.c delete mode 100644 shell/e-corba-storage.h delete mode 100644 shell/e-folder-type-registry.c delete mode 100644 shell/e-folder-type-registry.h delete mode 100644 shell/e-folder-type-repository.c delete mode 100644 shell/e-folder-type-repository.h delete mode 100644 shell/e-folder.c delete mode 100644 shell/e-folder.h delete mode 100644 shell/e-init.c delete mode 100644 shell/e-init.h delete mode 100644 shell/e-local-folder.c delete mode 100644 shell/e-local-folder.h delete mode 100644 shell/e-local-storage.c delete mode 100644 shell/e-local-storage.h delete mode 100644 shell/e-setup.c delete mode 100644 shell/e-setup.h delete mode 100644 shell/e-shell-constants.h delete mode 100644 shell/e-shell-utils.c delete mode 100644 shell/e-shell-utils.h delete mode 100644 shell/e-shell-view-menu.c delete mode 100644 shell/e-shell-view-menu.h delete mode 100644 shell/e-shell-view.c delete mode 100644 shell/e-shell-view.h delete mode 100644 shell/e-shell.c delete mode 100644 shell/e-shell.h delete mode 100644 shell/e-shortcut.c delete mode 100644 shell/e-shortcut.h delete mode 100644 shell/e-shortcuts-view.c delete mode 100644 shell/e-shortcuts-view.h delete mode 100644 shell/e-shortcuts.c delete mode 100644 shell/e-shortcuts.h delete mode 100644 shell/e-storage-set-view.c delete mode 100644 shell/e-storage-set-view.h delete mode 100644 shell/e-storage-set.c delete mode 100644 shell/e-storage-set.h delete mode 100644 shell/e-storage-watcher.c delete mode 100644 shell/e-storage-watcher.h delete mode 100644 shell/e-storage.c delete mode 100644 shell/e-storage.h delete mode 100644 shell/evolution-directory.idl delete mode 100644 shell/evolution-shell-component.c delete mode 100644 shell/evolution-shell-component.h delete mode 100644 shell/evolution-storage.c delete mode 100644 shell/evolution-storage.h delete mode 100644 shell/idl/folder.idl delete mode 100644 shell/main.c delete mode 100644 stamp.h.in delete mode 100644 tests/.cvsignore delete mode 100644 tests/Makefile.am delete mode 100644 tests/test-movemail.c delete mode 100644 tests/test-url.c delete mode 100644 tests/test1.c delete mode 100644 tests/test10.c delete mode 100644 tests/test11.c delete mode 100644 tests/test12.c delete mode 100644 tests/test13.c delete mode 100644 tests/test14.c delete mode 100644 tests/test2.c delete mode 100644 tests/test3.c delete mode 100644 tests/test4.c delete mode 100644 tests/test5.c delete mode 100644 tests/test6.c delete mode 100644 tests/test8.c delete mode 100644 tests/test9.c delete mode 100644 tests/ui-tests/.cvsignore delete mode 100644 tests/ui-tests/Makefile.am delete mode 100644 tests/ui-tests/filter.c delete mode 100644 tests/ui-tests/filterdescription.xml delete mode 100644 tests/ui-tests/mail-atchmt-image.msg delete mode 100644 tests/ui-tests/mail-atchmt-postscript.msg delete mode 100644 tests/ui-tests/mail-atchmt-svg.msg delete mode 100644 tests/ui-tests/message-browser.c delete mode 100644 tests/ui-tests/saveoptions.xml delete mode 100644 tests/ui-tests/store_listing.c delete mode 100644 tests/ui-tests/store_listing.glade delete mode 100644 tests/ui-tests/test-multipart-alt.msg delete mode 100644 tests/ui-tests/test-multipart-mixed.msg delete mode 100644 tools/.cvsignore delete mode 100644 tools/Makefile.am delete mode 100755 tools/killev delete mode 100644 widgets/.cvsignore delete mode 100644 widgets/LICENSE delete mode 100644 widgets/Makefile.am delete mode 100644 widgets/e-minicard/.cvsignore delete mode 100644 widgets/e-paned/.cvsignore delete mode 100644 widgets/e-paned/Makefile.am delete mode 100644 widgets/e-paned/e-hpaned.c delete mode 100644 widgets/e-paned/e-hpaned.h delete mode 100644 widgets/e-paned/e-paned.c delete mode 100644 widgets/e-paned/e-paned.h delete mode 100644 widgets/e-paned/e-vpaned.c delete mode 100644 widgets/e-paned/e-vpaned.h delete mode 100644 widgets/e-reflow/e-reflow-sorted.c delete mode 100644 widgets/e-reflow/e-reflow-sorted.h delete mode 100644 widgets/e-reflow/e-reflow.c delete mode 100644 widgets/e-reflow/e-reflow.h delete mode 100644 widgets/e-table/.cvsignore delete mode 100644 widgets/e-table/ChangeLog delete mode 100644 widgets/e-table/LICENSE delete mode 100644 widgets/e-table/Makefile.am delete mode 100644 widgets/e-table/ROADMAP.e-table delete mode 100644 widgets/e-table/TODO delete mode 100644 widgets/e-table/add-col.xpm delete mode 100644 widgets/e-table/arrow-down.xpm delete mode 100644 widgets/e-table/arrow-up.xpm delete mode 100644 widgets/e-table/check-empty.xpm delete mode 100644 widgets/e-table/check-filled.xpm delete mode 100644 widgets/e-table/clip.png delete mode 100644 widgets/e-table/e-cell-checkbox.c delete mode 100644 widgets/e-table/e-cell-checkbox.h delete mode 100644 widgets/e-table/e-cell-string.c delete mode 100644 widgets/e-table/e-cell-text.c delete mode 100644 widgets/e-table/e-cell-text.h delete mode 100644 widgets/e-table/e-cell-toggle.c delete mode 100644 widgets/e-table/e-cell-toggle.h delete mode 100644 widgets/e-table/e-cell.c delete mode 100644 widgets/e-table/e-cell.h delete mode 100644 widgets/e-table/e-table-col-dnd.h delete mode 100644 widgets/e-table/e-table-col.c delete mode 100644 widgets/e-table/e-table-col.h delete mode 100644 widgets/e-table/e-table-column-model.h delete mode 100644 widgets/e-table/e-table-column.c delete mode 100644 widgets/e-table/e-table-config.c delete mode 100644 widgets/e-table/e-table-config.glade delete mode 100644 widgets/e-table/e-table-config.glade.h delete mode 100644 widgets/e-table/e-table-config.h delete mode 100644 widgets/e-table/e-table-defines.h delete mode 100644 widgets/e-table/e-table-example-1.c delete mode 100644 widgets/e-table/e-table-example-2.c delete mode 100644 widgets/e-table/e-table-group-container.c delete mode 100644 widgets/e-table/e-table-group-container.h delete mode 100644 widgets/e-table/e-table-group-leaf.c delete mode 100644 widgets/e-table/e-table-group-leaf.h delete mode 100644 widgets/e-table/e-table-group.c delete mode 100644 widgets/e-table/e-table-group.glade delete mode 100644 widgets/e-table/e-table-group.glade.h delete mode 100644 widgets/e-table/e-table-group.h delete mode 100644 widgets/e-table/e-table-header-item.c delete mode 100644 widgets/e-table/e-table-header-item.h delete mode 100644 widgets/e-table/e-table-header.c delete mode 100644 widgets/e-table/e-table-header.h delete mode 100644 widgets/e-table/e-table-item.c delete mode 100644 widgets/e-table/e-table-item.h delete mode 100644 widgets/e-table/e-table-model.c delete mode 100644 widgets/e-table/e-table-model.h delete mode 100644 widgets/e-table/e-table-simple.c delete mode 100644 widgets/e-table/e-table-simple.h delete mode 100644 widgets/e-table/e-table-size-test.c delete mode 100644 widgets/e-table/e-table-sort-info.c delete mode 100644 widgets/e-table/e-table-sort-info.h delete mode 100644 widgets/e-table/e-table-sorted-variable.c delete mode 100644 widgets/e-table/e-table-sorted-variable.h delete mode 100644 widgets/e-table/e-table-sorted.c delete mode 100644 widgets/e-table/e-table-sorted.h delete mode 100644 widgets/e-table/e-table-subset-variable.c delete mode 100644 widgets/e-table/e-table-subset-variable.h delete mode 100644 widgets/e-table/e-table-subset.c delete mode 100644 widgets/e-table/e-table-subset.h delete mode 100644 widgets/e-table/e-table-text-model.c delete mode 100644 widgets/e-table/e-table-text-model.h delete mode 100644 widgets/e-table/e-table-tree.h delete mode 100644 widgets/e-table/e-table.c delete mode 100644 widgets/e-table/e-table.h delete mode 100644 widgets/e-table/image1.png delete mode 100644 widgets/e-table/image2.png delete mode 100644 widgets/e-table/image3.png delete mode 100644 widgets/e-table/remove-col.xpm delete mode 100644 widgets/e-table/sample.table delete mode 100644 widgets/e-table/table-test.c delete mode 100644 widgets/e-table/table-test.h delete mode 100644 widgets/e-table/test-check.c delete mode 100644 widgets/e-table/test-cols.c delete mode 100644 widgets/e-table/test-table.c delete mode 100644 widgets/e-text/.cvsignore delete mode 100644 widgets/e-text/Makefile.am delete mode 100644 widgets/e-text/e-text-event-processor-emacs-like.c delete mode 100644 widgets/e-text/e-text-event-processor-emacs-like.h delete mode 100644 widgets/e-text/e-text-event-processor-types.h delete mode 100644 widgets/e-text/e-text-event-processor.c delete mode 100644 widgets/e-text/e-text-event-processor.h delete mode 100644 widgets/e-text/e-text-model.c delete mode 100644 widgets/e-text/e-text-model.h delete mode 100644 widgets/e-text/e-text-test.c delete mode 100644 widgets/e-text/e-text.c delete mode 100644 widgets/e-text/e-text.h delete mode 100644 widgets/meeting-time-sel/.cvsignore delete mode 100644 widgets/meeting-time-sel/LICENSE delete mode 100644 widgets/meeting-time-sel/Makefile.am delete mode 100644 widgets/meeting-time-sel/e-meeting-time-sel-item.c delete mode 100644 widgets/meeting-time-sel/e-meeting-time-sel-item.h delete mode 100644 widgets/meeting-time-sel/e-meeting-time-sel-list-item.c delete mode 100644 widgets/meeting-time-sel/e-meeting-time-sel-list-item.h delete mode 100644 widgets/meeting-time-sel/e-meeting-time-sel-mail.xpm delete mode 100644 widgets/meeting-time-sel/e-meeting-time-sel-no-mail.xpm delete mode 100644 widgets/meeting-time-sel/e-meeting-time-sel.c delete mode 100644 widgets/meeting-time-sel/e-meeting-time-sel.h delete mode 100644 widgets/meeting-time-sel/test-meeting-time-sel.c delete mode 100644 widgets/misc/.cvsignore delete mode 100644 widgets/misc/Makefile.am delete mode 100644 widgets/misc/e-canvas-utils.c delete mode 100644 widgets/misc/e-canvas-utils.h delete mode 100644 widgets/misc/e-canvas.c delete mode 100644 widgets/misc/e-canvas.h delete mode 100644 widgets/misc/e-clipped-label.c delete mode 100644 widgets/misc/e-clipped-label.h delete mode 100644 widgets/misc/e-colors.c delete mode 100644 widgets/misc/e-colors.h delete mode 100644 widgets/misc/e-cursors.c delete mode 100644 widgets/misc/e-cursors.h delete mode 100644 widgets/misc/e-gui-utils.c delete mode 100644 widgets/misc/e-gui-utils.h delete mode 100644 widgets/misc/e-popup-menu.c delete mode 100644 widgets/misc/e-popup-menu.h delete mode 100644 widgets/misc/e-reflow.c delete mode 100644 widgets/misc/e-reflow.h delete mode 100644 widgets/misc/e-title-bar.c delete mode 100644 widgets/misc/e-title-bar.h delete mode 100644 widgets/misc/pixmaps/cursor_cross.xpm delete mode 100644 widgets/misc/pixmaps/cursor_hand_closed.xpm delete mode 100644 widgets/misc/pixmaps/cursor_hand_open.xpm delete mode 100644 widgets/misc/pixmaps/cursor_zoom_in.xpm delete mode 100644 widgets/misc/pixmaps/cursor_zoom_out.xpm delete mode 100644 widgets/misc/test-title-bar.c delete mode 100644 widgets/shortcut-bar/.cvsignore delete mode 100644 widgets/shortcut-bar/ChangeLog delete mode 100644 widgets/shortcut-bar/LICENSE delete mode 100644 widgets/shortcut-bar/Makefile.am delete mode 100644 widgets/shortcut-bar/e-group-bar.c delete mode 100644 widgets/shortcut-bar/e-group-bar.h delete mode 100644 widgets/shortcut-bar/e-icon-bar-bg-item.c delete mode 100644 widgets/shortcut-bar/e-icon-bar-bg-item.h delete mode 100644 widgets/shortcut-bar/e-icon-bar.c delete mode 100644 widgets/shortcut-bar/e-icon-bar.h delete mode 100644 widgets/shortcut-bar/e-shortcut-bar.c delete mode 100644 widgets/shortcut-bar/e-shortcut-bar.h delete mode 100644 widgets/shortcut-bar/e-vscrolled-bar.c delete mode 100644 widgets/shortcut-bar/e-vscrolled-bar.h delete mode 100644 widgets/shortcut-bar/test-shortcut-bar.c delete mode 100644 widgets/table/.cvsignore delete mode 100644 widgets/table/add-col.xpm delete mode 100644 widgets/table/arrow-down.xpm delete mode 100644 widgets/table/arrow-up.xpm delete mode 100644 widgets/table/check-empty.xpm delete mode 100644 widgets/table/check-filled.xpm delete mode 100644 widgets/table/clip.png delete mode 100644 widgets/table/e-cell-checkbox.c delete mode 100644 widgets/table/e-cell-checkbox.h delete mode 100644 widgets/table/e-cell-string.c delete mode 100644 widgets/table/e-cell-text.c delete mode 100644 widgets/table/e-cell-text.h delete mode 100644 widgets/table/e-cell-toggle.c delete mode 100644 widgets/table/e-cell-toggle.h delete mode 100644 widgets/table/e-cell.c delete mode 100644 widgets/table/e-cell.h delete mode 100644 widgets/table/e-table-col-dnd.h delete mode 100644 widgets/table/e-table-col.c delete mode 100644 widgets/table/e-table-col.h delete mode 100644 widgets/table/e-table-column-model.h delete mode 100644 widgets/table/e-table-column.c delete mode 100644 widgets/table/e-table-config.c delete mode 100644 widgets/table/e-table-config.glade delete mode 100644 widgets/table/e-table-config.glade.h delete mode 100644 widgets/table/e-table-config.h delete mode 100644 widgets/table/e-table-defines.h delete mode 100644 widgets/table/e-table-example-1.c delete mode 100644 widgets/table/e-table-example-2.c delete mode 100644 widgets/table/e-table-group-container.c delete mode 100644 widgets/table/e-table-group-container.h delete mode 100644 widgets/table/e-table-group-leaf.c delete mode 100644 widgets/table/e-table-group-leaf.h delete mode 100644 widgets/table/e-table-group.c delete mode 100644 widgets/table/e-table-group.glade delete mode 100644 widgets/table/e-table-group.glade.h delete mode 100644 widgets/table/e-table-group.h delete mode 100644 widgets/table/e-table-header-item.c delete mode 100644 widgets/table/e-table-header-item.h delete mode 100644 widgets/table/e-table-header.c delete mode 100644 widgets/table/e-table-header.h delete mode 100644 widgets/table/e-table-item.c delete mode 100644 widgets/table/e-table-item.h delete mode 100644 widgets/table/e-table-model.c delete mode 100644 widgets/table/e-table-model.h delete mode 100644 widgets/table/e-table-simple.c delete mode 100644 widgets/table/e-table-simple.h delete mode 100644 widgets/table/e-table-size-test.c delete mode 100644 widgets/table/e-table-sort-info.c delete mode 100644 widgets/table/e-table-sort-info.h delete mode 100644 widgets/table/e-table-sorted-variable.c delete mode 100644 widgets/table/e-table-sorted-variable.h delete mode 100644 widgets/table/e-table-sorted.c delete mode 100644 widgets/table/e-table-sorted.h delete mode 100644 widgets/table/e-table-subset-variable.c delete mode 100644 widgets/table/e-table-subset-variable.h delete mode 100644 widgets/table/e-table-subset.c delete mode 100644 widgets/table/e-table-subset.h delete mode 100644 widgets/table/e-table-text-model.c delete mode 100644 widgets/table/e-table-text-model.h delete mode 100644 widgets/table/e-table-tree.h delete mode 100644 widgets/table/e-table.c delete mode 100644 widgets/table/e-table.h delete mode 100644 widgets/table/image1.png delete mode 100644 widgets/table/image2.png delete mode 100644 widgets/table/image3.png delete mode 100644 widgets/table/remove-col.xpm delete mode 100644 widgets/table/sample.table delete mode 100644 widgets/table/table-test.c delete mode 100644 widgets/table/table-test.h delete mode 100644 widgets/table/test-check.c delete mode 100644 widgets/table/test-cols.c delete mode 100644 widgets/table/test-table.c delete mode 100644 widgets/text/.cvsignore delete mode 100644 widgets/text/e-table-text-model.c delete mode 100644 widgets/text/e-table-text-model.h delete mode 100644 widgets/text/e-text-event-processor-emacs-like.c delete mode 100644 widgets/text/e-text-event-processor-emacs-like.h delete mode 100644 widgets/text/e-text-event-processor-types.h delete mode 100644 widgets/text/e-text-event-processor.c delete mode 100644 widgets/text/e-text-event-processor.h delete mode 100644 widgets/text/e-text-model.c delete mode 100644 widgets/text/e-text-model.h delete mode 100644 widgets/text/e-text-test.c delete mode 100644 widgets/text/e-text.c delete mode 100644 widgets/text/e-text.h delete mode 100644 wombat/.cvsignore delete mode 100644 wombat/ChangeLog delete mode 100644 wombat/GNOME_Evolution_Wombat.oaf.in delete mode 100644 wombat/GNOME_Evolution_Wombat.oafinfo delete mode 100644 wombat/Makefile.am delete mode 100644 wombat/wombat.c delete mode 100644 wombat/wombat.gnorba delete mode 100644 wombat/wombat.idl delete mode 100644 wombat/wombat.oafinfo diff --git a/.cvsignore b/.cvsignore deleted file mode 100644 index 94e9b857b3..0000000000 --- a/.cvsignore +++ /dev/null @@ -1,24 +0,0 @@ -ABOUT-NLS -Makefile -Makefile.in -aclocal.m4 -config.cache -config.guess -config.h -config.h.in -config.log -config.status -config.sub -configure -install-sh -intl -libtool -ltconfig -ltmain.sh -missing -mkinstalldirs -stamp-h -stamp-h.in -stamp.h -xlibtool -xltmain.sh diff --git a/AUTHORS b/AUTHORS deleted file mode 100644 index 7bb4918333..0000000000 --- a/AUTHORS +++ /dev/null @@ -1,33 +0,0 @@ -Evolution was written by: - -Bertrand Guiheneuf - Main author of Camel - -Chris Lahey (clahey@helixcode.com) - Mini-card display widget - Contact manager user interface - -Damon Chaplin - Meeting time selector widget - Shortcut Bar widget - -Ettore Perazzoli - Evolution Shell - Message composer - -Federico Mena - Gnome Calendar views, and engine - Gnome Calendar server - -Miguel de Icaza - Gnome Calendar engine - Base64 encoding in Camel - Evolution Shell - ETable widget - Toolbar - -Nat Friedman - EBook and Personal Address Book server. - -Robert Brady - Unicode and RFC2047 support for Camel. diff --git a/COPYING b/COPYING deleted file mode 100644 index d60c31a97a..0000000000 --- a/COPYING +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/ChangeLog b/ChangeLog deleted file mode 100644 index 8e6debefb1..0000000000 --- a/ChangeLog +++ /dev/null @@ -1,4741 +0,0 @@ -2000-05-26 Héctor García Alvarez - - * configure.in: Added Spanish language - -2000-05-25 Christopher James Lahey - - * widgets/e-paned/e-hpaned.c, widgets/e-paned/e-vpaned.c: Fixed a - bug where we were resizing a non-existent window. - -2000-05-25 Christopher James Lahey - - * widgets/e-paned/e-hpaned.c, widgets/e-paned/e-paned.c, - widgets/e-paned/e-paned.h, widgets/e-paned/e-vpaned.c: Made - the handlebar disappear if either side is empty, hidden, or - requests 0 size. - -2000-05-24 Christopher James Lahey - - * configure.in: Added widgets/e-paned/Makefile. - - * tests/ui-tests/message-browser.c: Switched from GtkPaned to - EPaned. - - * widgets/Makefile.am: Added e-paned directory. - - * widgets/e-paned/, widgets/e-paned/.cvsignore, - widgets/e-paned/Makefile.am, widgets/e-paned/e-hpaned.c, - widgets/e-paned/e-hpaned.h, widgets/e-paned/e-paned.c, - widgets/e-paned/e-paned.h, widgets/e-paned/e-vpaned.c, - widgets/e-paned/e-vpaned.h: New widget based completely on - GtkPaned from 1.4. This will be more advanced soon. - -2000-05-22 Jeff Stedfast - - * configure.in: Readded camel/providers/smtp - -2000-05-22 Szabolcs BAN - - * configure.in: Added Hungarian language - -2000-05-18 Dan Winship - - * configure.in (AC_OUTPUT): add camel/providers/vee - -2000-05-16 Ettore Perazzoli - - * art/Makefile.am: Install the mini icons. - -2000-05-16 Chris Toshok - - * configure.in: add --with-purify-options support, and default it - to what we at helix need - -Tue May 16 06:11:40 2000 Tuomas Kuosmanen - - * art/evolution-calendar-mini.png art/evolution-inbox-mini.png - art/evolution-tasks-mini.png art/evolution-contacts-mini.png - art/evolution-notes-mini.png: new mini-icons for the tree view - of folders and stuff. - -2000-05-14 Federico Mena Quintero - - * configure.in (AC_OUTPUT): Added calendar/gui/dialogs/Makefile.am. - -2000-05-10 Matt Loper - - * README: Added version and availability of required libunicode - library. - -2000-05-10 Dan Winship - - * configure.in: Update versions needed for gnome-print, bonobo, - and gtkhtml. - -2000-05-10 Christopher James Lahey - - * HACKING: We need a HACKING file. - -2000-05-10 Christopher James Lahey - - * Makefile.am: Removed dist-hook section. - - * configure.in: Set the version number. Added a check for gnome - window icons. Removed a bunch of unused Makefiles. - - * tools/Makefile.am: Created a proper EXTRA_DIST section. - - * widgets/e-text/Makefile.am: Added - e-text-event-processor-types.h. - -2000-05-09 Christopher James Lahey - - * art/Makefile.am: Added briefcase.png to get installed. - -2000-05-09 Christopher James Lahey - - * widgets/e-text/e-text.c: Remove the tooltip callback when - destroyed. - -2000-05-09 Matt Loper - - * calendar/pcs/cal-backend.c (cal_backend_add_cal): Return nothing - for a 'void' function. - -2000-05-08 Christopher James Lahey - - * widget/e-text/e-text.c, widgets/e-text/e-text.h: Added an - activate signal. - -2000-05-06 Chris Toshok - - * configure.in: Added new Directories section for the default_user. - -2000-05-06 Ettore Perazzoli - - * configure.in: Updated for the new `default_user' directory - setup. - -2000-05-06 Chris Toshok - - * configure.in: check for purify. - -2000-05-06 Christopher James Lahey - - * widgets/e-text/e-text.c, widgets/e-text/e-text.h: Added a - "changed" signal that gets sent whenever the text changes. - -2000-05-05 Ettore Perazzoli - - * Added `--enable-purify' flag. - -2000-05-05 Chris Toshok - - * shell/Makefile.am: add support for building purified evolution. - - * shell/.cvsignore: ignore evolution.pure - -2000-05-05 Chris Toshok - - * addressbook/backend/ebook/.cvsignore, - addressbook/contact-editor/.cvsignore, - addressbook/gui/component/.cvsignore, - addressbook/gui/minicard/.cvsignore, - addressbook/printing/.cvsignore, - calendar/cal-client/.cvsignore, - calendar/gui/.cvsignore, - calendar/pcs/.cvsignore, - filter/.cvsignore, - mail/.cvsignore, - shell/.cvsignore, - tests/.cvsignore, - widgets/e-table/.cvsignore, - widgets/e-text/.cvsignore, - widgets/meeting-time-sel/.cvsignore, - widgets/shortcut-bar/.cvsignore, - wombat/.cvsignore: ignore the .pure directory - -2000-05-04 Dan Winship - - * configure.in: Oops. The Kerberos check was succeeding when it - shouldn't have (and thus breaking the pop3 build for "normal" - people). Fix. - -2000-05-03 Michael Meeks - - * configure.in (xmlversion): Fix to remove older 'libxml' prefix. - -2000-05-02 Ettore Perazzoli - - * configure.in: Do not output `doc/Makefile' because there is - nothing to generate it from. - -2000-05-02 Dan Winship - - * configure.in, acconfig.h: add some minimal Kerberos checking. - This isn't intended to be generically useful at this point, it's - just there to give me a second POP auth mechanism to play with. - - Also remove a bit of cruft, and reorganize configure.in a bit. - -2000-05-02 NotZed - - * tests/test13.c: And here too. - - * tests/test2.c (main): REmoved gmime-utils.h - - * tests/Makefile.am (LDADD): Add libeutil to default link line. - (test_movemail_LDADD): Fixed order for libutil linking. - -2000-05-02 Matt Loper - - * tests/Makefile.am: set G_LOG_DOMAIN. - * tests/ui-tests/Makefile.am: same. - * widgets/e-text/Makefile.am: same. - * widgets/meeting-time-sel/Makefile.am: same. - -2000-05-01 NotZed - - * tests/test11.c (main): *sigh* moved back to sync api. - -2000-05-01 NotZed - - * tests/test11.c (search_cb): Try deleting messages ... - (main): Fix for provider api changes. - -2000-05-01 Anders Carlsson - - * configure.in: Check if bonobo uses oaf, so you don't - need to specify --enable-oaf. - -2000-04-27 Ettore Perazzoli - - * acconfig.h: New configured #define `USING_OAF'. - - * configure.in: Added `--enable-oaf' option and corresponding - `OAF_LIBS' and `OAF_FLAGS' variables. Code friendly provided by - Maciej Stachowiak . - -2000-04-27 NotZed - - * tests/test10.c: Fix for removal of camelmimebodypart, and changes - to recipient stuff. - - * tests/test1.c: Fix for removal of camelmimebodypart, and changes - to recipient stuff. - -2000-04-27 Christopher James Lahey - - * configure.in: Added addressbook/ename/Makefile. - -2000-04-27 Matt Loper - - * configure.in: added tools/Makefile. - - * Makefile.am: Added tools. - - * tools/: New directory for tools relating to evolution. - - * tools/killev: New script for killing all evolution-related - stuff. - - * tools/Makefile.am: New file. - - * tools/.cvsignore: New file. - -2000-04-26 NotZed - - * tests/test13.c (main): And here too. - - * tests/test2.c (main): Same here. - - * tests/test1.c (main): Change for removed simpledatawrapper. - -2000-04-26 Matt Loper - - * tests/.cvsignore: Added test13. - - * default_user/.cvsignore: New file. - - * widgets/e-text/e-text.c (e_text_destroy): Kill text->timer and - text->timeout on destroy. - -2000-04-26 Dan Winship - - * tests: Update for the camel changes. - - * Makefile.am (SUBDIRS): Remove tests. They aren't terribly - useful/interesting any more for the most part, and they frequently - don't compile. - -2000-04-24 Christopher James Lahey - - * widgets/e-text/e-text.c: Made the tooltip show up in the correct - place and configuration when using the "max_lines", "anchor" - (untested), or "justification" arguments. - -From a patch by Iain Holmes - - * widgets/e-text/e-text-event-processor-emacs-like.c, - widget/e-text/e-text-event-processor-types.h, - widgets/e-text/e-text.c, widgets/e-text/e-text.h: Changed C-w and - C-y to control the X clipboard. Added double and triple click - events. - -2000-04-24 Fatih Demir - - * configure.in : Added tr to ALL_LINGUAS . - -2000-04-24 NotZed - - * tests/test13.c (main): Fixed for method movements. - - * tests/test3.c (main): Removed from build, data-wrapper-repository removed. - -2000-04-23 NotZed - - * tests/test2.c (main): Changed to use construct_from_stream. - - * tests/test1.c (main): Chagned to use construct_from_stream. - -2000-04-24 Matt Loper - - * default_user/Makefile.am: new file. - - * default_user/Main_Shortcuts.xml: New file; is used to fill the - shortcut bar's "main shortcuts" pane. - - * default_user/Other_Shortcuts.xml: New file, used to fill the - shortcut bar's "other shortcuts" pane. - - * default_user/Inbox.mbox: New file. This is the first message a - new user will see when they fire up Evolution. Needs work. - - * Makefile.am: added default_user directory. - * configure.in: same. - -2000-04-23 NotZed - - * tests/test10.c: Removed some unecessary includes. From - Ali Abdin - (create_sample_mime_message): Changed for date api change. - - * tests/Makefile.am (noinst_PROGRAMS): Put test10 back. - -2000-04-22 NotZed - - * tests/test1.c (main): Changed for date api change. - -2000-04-20 NotZed - - * tests/test11.c: Fixed some headers. - - * tests/Makefile.am (noinst_PROGRAMS): Removed test9. - (noinst_PROGRAMS): Removed test12, temporarirly (nntp not being - built). - Removed test10. - -2000-04-20 Yukihiro Nakai - - * configure.in: Add Japanese to ALL_LINGUAS - -2000-04-19 Dan Winship - - * README: More detail on exactly what versions of what libraries - are needed. - -2000-04-18 Dan Winship - - * tests/*: remove camel-log references - -2000-04-17 Dan Winship - - * configure.in (xmlpatch): Require gnome-xml 1.8.7 (or later, - but not 2.0). xmlParseMemory's behavior in 1.8.7 is incompatible - with its behavior in 1.8.6 and earlier. - - * tests/test-url.c: New program to test CamelURL - -2000-04-16 Christopher James Lahey - - * addressbook/backend/ebook/e-card.c, - addressbook/backend/ebook/e-card.h, - addressbook/backend/ebook/test-card.c, - addressbook/backend/pas/pas-backend-file.c, - addressbook/contact-editor/e-contact-editor.c: Added - orginizational unit, nickname, and internet free-busy fields. - - * addressbook/contact-editor/contact-editor.glade: Renamed some - incorrectly named fields. - -2000-04-16 Christopher James Lahey - - * addressbook/backend/ebook/e-card.c, - addressbook/backend/ebook/e-card.h, - addressbook/backend/ebook/test-card.c, - addressbook/backend/pas/pas-backend-file.c, - addressbook/gui/minicard/e-minicard.c: Added orginization and role - fields. - - * addressbook/contact-editor/contact-editor.glade, - addressbook/contact-editor/e-contact-editor-strings.h: Renamed - some incorrectly named fields. - - * addressbook/contact-editor/e-contact-editor.c: Added - orginization and role fields as well as hooking up the birth date - field. - - * addressbook/gui/minicard/e-minicard-view.c: Added a missing include. - -2000-04-15 Matt Loper - - * addressbook/gui/component/addressbook.c - (search_entry_activated): New function. Gets called when the quick - search entry is called on to perform a search. - (make_quick_search_widget): New function; returns a "quick search" - widget. - (control_activate): During the construction of the toolbar, a - "quick search" widget is included. - -2000-04-14 Chris Toshok - - * tests/.cvsignore: add test12 - - * tests/test12.c (main): add test for nntp stuff. - - * tests/Makefile.am (noinst_PROGRAMS): same. - - -2000-04-14 Christopher James Lahey - - * addressbook/backend/ebook/e-card.c, - addressbook/backend/ebook/e-card.h, - addressbook/backend/pas/pas-backend-file.c, - addressbook/backend/pas/pas-backend-ldap.c, - addressbook/contact-editor/e-contact-editor.c: Added a note field. - -2000-04-15 Ettore Perazzoli - - * addressbook/backend/ebook/e-card-cursor.h: #include - "addressbook/backend/ebook" to make sure we pick up the right - addressbook.h. Butt ugly, but at least it makes it possible for - me to build Evolution. - - * addressbook/gui/minicard/Makefile.am (INCLUDES): Use - `$(builddir)' so that we pick up the IDL-generated includes - correctly. - * addressbook/backend/pas/Makefile.am: Likewise. Also use - `$(srcdir)'. - - * addressbook/backend/ebook/Makefile.am: Use `$(srcdir)' so that - it works with builddir != srcdir. - * addressbook/backend/pas/Makefile.am: Likewise. - -2000-04-14 Chris Toshok - - * addressbook/backend/pas/pas-backend-ldap.c - (pas_backend_ldap_ensure_connected): don't ldap_simple_bind_s if - the ldap_open failed, and fix warnings. - (pas_backend_ldap_build_all_cards_list): don't do search if the - ensure_connected failed, and fix warnings. - (pas_backend_ldap_search): same. - (poll_ldap): fix warnings. - (pas_backend_ldap_process_get_book_view): same. - (pas_backend_ldap_get_vcard): same. - (pas_backend_ldap_load_uri): same. - - * configure.in: quiet configure in the case where it can't find - ldap libs. - -2000-04-13 Christopher James Lahey - - * addressbook/contact-editor/e-contact-editor.c (extract_info): - Check for 0 length fields when building the outgoing ECard. - -2000-04-13 Christopher James Lahey - - * addressbook/backend/pas/pas-book-view.c: Give correct warnings. - - * addressbook/backend/ebook/e-card.c (e_card_set_arg): g_strdup - url and title. - -2000-04-13 Chris Toshok - - * addressbook/contact-editor/e-contact-editor.c - (fill_in_info): reflect the title attribute in the contact editor. - (extract_info): same. - - * addressbook/backend/pas/pas-backend-ldap.c: add the title attribute. - - * addressbook/gui/minicard/test-reflow.c: add a title. - - * addressbook/gui/minicard/e-minicard.c (remodel): add support for - the title attribute. - - * addressbook/backend/ebook/e-card.c (e_card_get_vcard): save out - the title to the vcard. - - * addressbook/backend/ebook/test-card.c: add title field foo to - the test. - - * addressbook/backend/ebook/e-card.c: reflect the title field. - - * addressbook/backend/ebook/e-card.h: un-#if 0 the title field. - - * addressbook/backend/pas/pas-backend-ldap.c (poll_ldap): new - function that polls ldap for more search responses. - (pas_backend_ldap_search): use the async search interface and - register an idle call to poll for the responses. - (view_destroy): make sure to g_source_remove the idle id. - -2000-04-12 Chris Toshok - - * addressbook/backend/pas/pas-backend-file.c (entry_compare): - rework this function to use a table mapping search field names to - vcard properties and extra information (such as whether or not the - property is a list.) - - * addressbook/backend/pas/pas-backend-ldap.c - (construct_email_list): new function, to build the ECardList for - email addresses. - (construct_phone_list): new function, to build the ECardList for - phone numbers. - (pas_backend_ldap_search): use a table mapping ldap attributes to - ecard properties, and use the special list construction functions - if the property calls for it. general cleanup. added a comment - about not calling ber_free if there was a decoding error. - - -2000-04-12 Matt Loper - - * art/Makefile.am: Add tigert's contact-dlg-related images. - - * addressbook/contact-editor/e-contact-editor.c (_add_images): Add - tigert's images. - - * addressbook/contact-editor/Makefile.am: add EVOLUTION_IMAGES. - -2000-04-12 Tuomas Kuosmanen - - * art/house.png, art/malehead.png, art/cellphone.png, - art/briefcase.png, art/envelope.png, art/globe.png: - New icons for the contact manager.. more to follow once I get - around to do more artist work.. - -2000-04-12 Chris Toshok - - * addressbook/backend/pas/pas-backend-ldap.c - (pas_backend_ldap_build_all_cards_list): delay the setting of the - ldap variable until we've ensured we were connected. Also, set - the search limit to LDAP_MAX_SEARCH_RESPONSES (we'll eventually - want a user setting here i assume.) - (pas_backend_ldap_search): same here, and also send back lists of - CARDS_PER_VIEW_NOTIFICATION length in each - pas_book_view_notify_add call. also, don't call ber_free if there - was a decoding error, since the ldap library frees it for us. - -2000-04-11 Miguel de Icaza - - * configure.in (have_pthread): Properly use AC_ARG_WITH - -2000-04-11 Chris Toshok - - * wombat/Makefile.am (wombat_LDADD): add LDAP_LIBS here. - - * configure.in: check for -lldap and -llber and if both are - present include ldap support in the pas/wombat. - - * addressbook/backend/pas/Makefile.am (libpas_la_SOURCES): include - pas-backend.ldap.c if ENABLE_LDAP. - - * addressbook/backend/pas/pas-backend-ldap.c: get searching - working (converting between the sexp and ldap stuff.) - - * wombat/wombat.c (setup_pas): register the ldap pas backend if - HAVE_LDAP is defined. - -2000-04-11 Christopher James Lahey - - * configure.in: Changed AC_DEFUN to AC_DEFINE. - - * acconfig.h: Added HAVE_TIMEZONE and HAVE_TM_GMTOFF. - -2000-04-11 Chris Toshok - - * configure.in: check for timezone as a variable (as it is in - linux, but not in freebsd or netbsd.) - -2000-04-11 Larry Ewing - - * widgets/e-table/e-cell-toggle.c (etog_draw): update for new - gdk-pixbuf. Added a disabled chuck of code to do alpha blending - on pixmaps. - -2000-04-11 Christopher James Lahey - - * widgets/e-text/e-text.c: Moved some logic a bit. Minor changes. - -00-04-11 Iain Holmes - - * widgets/e-text/e-text.c - (e_text_set_args): Recalculate bounds when width or clip_width changes. - (tooltip_event): Forward clicks on the tooltip onto the text item. - (_do_tooltip): Correct the origin co-ordinates to the items co-ords. - (e_text_point): Return 0 when the mouse is on the item. - (_do_tooltip): Make the tooltip obey the parent items - line_wrap and max_lines. - -00-04-11 Chris Toshok - - * addressbook/backend/pas/pas-backend-file.c - (get_e_card_prop): new function, taking code from func_contains to - get string properties. - (entry_compare): new function generic, taking strstr-like function - as a parameter. - (func_contains): rewrite function to use entry_compare. - (is_helper): new helper function to map strcmp to a strstr-like - function. - (func_is): new function, implementing "is" for searches. - (endswith_helper): new function. - (func_endswith) new function, implementing "endswith" for - searches. - (beginswith_helper): new function. - (func_beginswith): new function, implementing "beginswith" for - searches. - (compare_email): new function for searching all email addresses of - a contact. - (compare_phone): new function for searching all phone numbers of a - contact. - (compare_address): new function for searching all addresses of a - contact (unimplemented as yet). - (entry_compare): add support for searching the list items "email", - "phone" and "address". - (vcard_matches_search): free the esexp_result. - (entry_compare): we want comparison functions to take 2 args. - -2000-04-11 Christopher James Lahey - - * addressbook/gui/minicard/e-minicard-view.c: This was setting - E_REFLOW(view)->items to NULL too soon. Fixed now. - -2000-04-11 Chris Toshok - - * addressbook/backend/pas/pas-backend-file.c - (pas_backend_file_search): remove spew. - (pas_backend_file_process_create_card): move the sync to the - earliest possible point after the db operation. - (pas_backend_file_process_remove_card): same. - (pas_backend_file_process_modify_card): same, and call - pas_book_respond_modify, not pas_book_respond_remove, here. - - * addressbook/gui/component/addressbook.c (card_deleted_cb): new - function. - (delete_contact_cb): wire up button to call - e_minicard_view_remove_selection. - - * addressbook/gui/minicard/e-minicard-view.c - (e_minicard_view_remove_selection): fix warning, and stick "view" - in the name. - -2000-04-10 Christopher James Lahey - - * addressbook/backend/ebook/e-book-view.c, - addressbook/backend/ebook/e-book.c: Changed some incorrect - gtk_object_refs and gtk_object_unrefs into bonobo_object_refs and - bonobo_object_unrefs. - - * addressbook/backend/pas/pas-card-cursor.c: Changed a - gtk_object_destroy to a gtk_object_unref. - - * addressbook/gui/minicard/e-minicard-view.c, - addressbook/gui/minicard/e-minicard-view.h: Set a list pointer to - NULL after freeing its contents. Added - e_minicard_view_remove_selection function. - - * addressbook/gui/minicard/e-reflow.c: Set a list pointer to NULL - after freeing its contents. - -2000-04-11 Chris Toshok - - * addressbook/gui/component/addressbook.c (find_contact_cb): - implement braindead dialog to input the query string for the view. - - also, change all callbacks to get the EMinicardView instead of the - EBook. - - * addressbook/gui/minicard/e-minicard-view.c - (e_minicard_view_get_arg): add missing break. - -2000-04-10 Christopher James Lahey - - * addressbook/gui/minicard/e-minicard-view.c, - addressbook/gui/minicard/e-minicard-view.h: Added a "query" - argument to the e-minicard-view. Documented all the arguments to - the e-minicard-view. - -2000-04-10 Chris Toshok - - * addressbook/gui/minicard/e-minicard-view.c (get_view): change - the empty search string ("") to the valid (contains "full_name" ""). - - * wombat/Makefile.am (wombat_LDADD): reorder so libeutil.la comes - after libpas (since it uses the sexp stuff now.) - - * addressbook/backend/pas/Makefile.am (INCLUDES): add - -I$(top_srcdir)/addressbook/backend/ebook - - * addressbook/backend/pas/pas-backend-file.c - (view_destroy): free the search context and unref the sexp. - (string_to_dbt): save the zero byte of strings, so we don't have - to g_strndup everywhere. - (func_contains): new function, implementing the (contains) search - function. - (vcard_matches_search): generic predicate to tell whether or not a - vcard entry matches the current book view. - (pas_backend_file_search): rip some of this code out of - get_book_view (the portion building the list of cards) and make it - use the e-sexp stuff. - (pas_backend_file_process_create_card): use vcard_matches_search - to only notify if the card will appear in the view. - (pas_backend_file_process_remove_card): use vcard_matches_search - to only notify if the card will be removed from the view. - (pas_backend_file_process_modify_card): use vcard_matches_search - to notify if the modified card was added, removed, or changed in - the view. - -2000-04-10 Miguel de Icaza - - * configure.in (GNOME_PRINT_CFLAGS): Update to support - --disable-threads correctly. - -2000-04-10 Chris Toshok - - * addressbook/backend/pas/pas-backend-file.c - (pas_backend_file_process_get_book_view): use view != NULL instead - of checking db_error when we call pas_book_respond_get_book_view) - -2000-04-10 Dan Winship - - * configure.in: check for mkstemp - -2000-04-10 Damon Chaplin - - * configure.in (AC_OUTPUT): removed libical stuff since it has its - own configure.in. - -2000-04-10 Christopher James Lahey - - * addressbook/backend/ebook/e-book-view.c: Fixed a bug where I was - sending the wrong information to some callbacks. - - * addressbook/backend/ebook/e-card.c, - addressbook/backend/ebook/e-card.h: Added an e_card_duplicate - function. Made ids get stored in vcards. Made sure to delete the - url if it exists. - - * addressbook/backend/pas/Makefile.am: Made pas include - addressbook/backend/ebook/ in the search path. - - * addressbook/backend/pas/pas-backend-file.c: Fixed some bugs and - made the create card function store the generated id in the card - being saved. - - * addressbook/backend/pas/pas-book-view.c: Fixed a double free - bug. - - * addressbook/contact-editor/e-contact-editor.c: Fixed some bugs. - Made the contact editor actually return a valid card when - gtk_object_get(editor, "card", ...) is called. - - * addressbook/contact-editor/e-contact-editor.h: Fixed a copy and - paste error. - - * addressbook/gui/component/addressbook.c: Made this get the card - properly. - - * addressbook/gui/minicard/Makefile.am: Made this include - contact-editor directory in the search path and link against - libecontacteditor so that double clicking can open a dialog. - - * addressbook/gui/minicard/e-minicard.c: Fixed some small bugs. - Made double clicking open a contact editor dialog if this minicard - is contained in a minicard view. (It needs the minicard view to - get the EBook to save to. - - * wombat/Makefile.am: Link wombat against libebook, since - pas-backend-file now uses ECard. - -2000-04-09 Matt Loper - - * addressbook/gui/component/addressbook.c (control_activate): Make - "New Contact" menuitem add a card with new_contact_cb(). - - * addressbook/Makefile.am: Compile contact-editor, _then_ gui, - since the gui now depends on the contact editor (shouldn't the - contact-editor directory be moved into 'gui'?). - - * addressbook/gui/component/addressbook.c (card_added_cb): New - function. Gets called when a card is successfully added via the - contact-editor. - (new_contact_cb): New function. Gets called when a user clicks the - "new contact" button on the toolbar, and creates a contact-editor - to edit a new contact entry. - (control_activate): Call gnome_app_fill_toolbar_with_data() - instead of gnome_app_fill_toolbar(), so that our toolbar can find - the right book to add a new card to. - (addressbook_factory): On an "activate" signal, send the book up - to control_activate_cb. - - * addressbook/gui/component/addressbook-factory.c (init_bonobo): - Call glade_gnome_init(), so that our contact-editor (which - requires glade) doesn't barf. - - * addressbook/gui/component/Makefile.am: added the contact-editor - to our libraries and include files. - - * addressbook/contact-editor/e-contact-editor.c - (e_contact_editor_new): Set "card" gtk property to the passed-in - card property. - - * addressbook/gui/component/addressbook.c (addressbook_factory): - Added gtk_widget_push/pop_colormap/visual, which I assume is - necessary for canvas use. - -2000-04-08 Christopher James Lahey - - * addressbook/contact-editor/Makefile.am, - addressbook/contact-editor/e-contact-editor.c, - addressbook/contact-editor/e-contact-editor.h, - addressbook/contact-editor/test-editor.c: Made the contact editor - load from an ECard. - - * addressbook/backend/ebook/e-card.c, - addressbook/backend/ebook/e-card.h, - addressbook/gui/minicard/e-minicard.c: Added support for the URL - field. - -2000-04-08 Christopher James Lahey - - * addressbook/backend/ebook/e-card.c (e_card_get_vcard): Fixed a - small typo. - -2000-04-08 Dan Winship - - * art/Makefile.am: pixmap_DATA should have been images_DATA (after - pixmapdir was renamed to imagesdir) - -2000-04-08 Christopher James Lahey - - * addressbook/gui/minicard/.cvsignore, - addressbook/gui/minicard/Makefile.am, - addressbook/gui/minicard/e-minicard-view.c, - addressbook/gui/minicard/e-minicard-view.h, - addressbook/gui/minicard/e-minicard.c, - addressbook/gui/minicard/e-minicard.h, - addressbook/gui/minicard/e-reflow-sorted.c, - addressbook/gui/minicard/e-reflow-sorted.h, - addressbook/gui/minicard/e-reflow.c, - addressbook/gui/minicard/e-reflow.h, - addressbook/gui/minicard/test-minicard-view.c, - addressbook/gui/minicard/test-reflow.c, - widgets/e-minicard/.cvsignore, widgets/e-minicard/Makefile.am, - widgets/e-minicard/e-minicard-label.c, - widgets/e-minicard/e-minicard-label.h, - widgets/e-minicard/e-minicard-view.c, - widgets/e-minicard/e-minicard-view.h, - widgets/e-minicard/e-minicard.c, widgets/e-minicard/e-minicard.h, - widgets/e-minicard/e-reflow-sorted.c, - widgets/e-minicard/e-reflow-sorted.h, - widgets/e-minicard/e-reflow.c, widgets/e-minicard/e-reflow.h, - widgets/e-minicard/test-minicard-label.c, - widgets/e-minicard/test-minicard-view.c, - widgets/e-minicard/test-minicard.c, - widgets/e-minicard/test-reflow.c: CVS move mistake. Fixed the - correct changes in the correct places. - -2000-04-08 Christopher James Lahey - - * art/Makefile.am: pixmap_DATA isn't defined so don't use it as a variable. - - * addressbook/gui/component/, - addressbook/gui/component/.cvsignore, addressbook/gui/Makefile.am, - addressbook/gui/component/addressbook-factory.c, - addressbook/gui/component/addressbook.c, - addressbook/gui/component/addressbook.gnorba, - addressbook/gui/component/addressbook.h: New directory to proivde - the component for contact management. Simply uses an e-minicard-view. - - * addressbook/gui/minicard/e-minicard-view.c, - addressbook/gui/minicard/e-minicard-view.h: New subclass of - e-reflow-sorted that takes an EBook and uses it to compute the - card data to display. - - * addressbook/gui/minicard/e-minicard.c, - addressbook/gui/minicard/e-minicard.h: This now backends to a - ECard instead of a ETableModel. - - * addressbook/gui/minicard/e-reflow.c, - addressbook/gui/minicard/e-reflow.h: This now has a virtualized - add method. - - * addressbook/gui/minicard/e-reflow-sorted.c, - addressbook/gui/minicard/e-reflow-sorted.h: New subclass of - e-reflow that allows the data to be sorted on the fly. - - * addressbook/gui/minicard/test-minicard-view.c: New test to test - the new minicard view. - - * addressbook/gui/minicard/test-reflow.c: Uses the new ECard - backend of the e-minicard. - - * addressbook/gui/minicard/.cvsignore, - addressbook/gui/minicard/Makefile.am: Added new test. Fixed - dependencies. Added new files. - - * addressbook/gui/, addressbook/gui/Makefile.am, - addressbook/gui/.cvsignore: New directory for addressbook gui - bits. Added subdirectories. Created an initial .cvsignore. - - * addressbook/Makefile.am (SUBDIRS): Removed demo and added gui. - - * addressbook/backend/pas/pas-backend-file.c: Added code to do - notification on bookviews when changes in the backend are made. - - * addressbook/backend/pas/pas-book-view.c, - addressbook/backend/pas/pas-book-view.h: Added helper functions to - notify the view about the addition or modification of a single - card. Fixed a mistaken extra free. - - * addressbook/backend/ebook/e-card-list-iterator.h: Fixed - incorrect parent class. - - * addressbook/backend/ebook/test-client.c: Made this accept an - optional parameter that specifies the vcard to add. - - * configure.in: Replaced widgets/e-minicard/Makefile and - addressbook/demo/Makefile with addressbook/gui/minicard/Makefile - and addressbook/gui/component/Makefile respectively. - - * widgets/Makefile.am: Removed e-minicard since it's being moved - to addressbook/gui/minicard. - - * widgets/e-text/e-text.c: Fixed the border width around tooltips - and made the main tooltip area yellow. - -2000-04-08 Dan Winship - - * configure.in, acconfig.h: add SYSTEM_MAIL_DIR - -2000-04-08 Jesus Bravo Alvarez - - * configure.in (ALL_LINGUAS): Added Galician (gl). - -2000-04-07 Jeffrey Stedfast - * configure.in: Modified to create camel/providers/smtp/Makefile - -2000-04-07 Christopher James Lahey - - * widgets/e-text/e-text.c: Made text tooltips appear in place. - Iain figured out that to get them to not appear, we hide the - tooltip when the mouse leaves the tooltip window, not the canvas - item (this works because the tooltip window always covers the - canvas item completely.) - -2000-04-07 Matt Loper - - * addressbook/demo/addressbook.c (control_activate_cb): New - function. Called when the control is (de)activated. - (control_activate): New function; called when the control is - activated, and sets up toolbar/menu times. - (control_deactivate): New function; removes those toolbar/menu - items. - (do_nothing_cb): Does nothing :-) - (addressbook_factory): Hook up to control_activate_cb(). - -2000-04-07 Chris Toshok - - * addressbook/backend/pas/pas-backend-file.c - (pas_backend_file_process_get_book_view): correctly (well, - untested) implement. - (view_destroy): new function. - -2000-04-06 Christopher James Lahey - - * addressbook/demo/demo.c, addressbook/demo/addressbook-widget.c: - Changed calls to e_cell_text_new to match new function signature. - -2000-04-06 Miguel de Icaza - - * art/Makefile.am (images_DATA): Renamed from pixmaps to images. - -2000-04-05 Matt Loper - - * README: Added wombat. - -2000-04-04 Christopher James Lahey - - * widgets/e-text/e-text-test.c: Got rid of some runtime errors. - Changed to "fixed" font so that it will work on everyone's - machine. Added a white background rectangle. Made resizing the - window resize the contained text item. Changed to using affines - (e_canvas_item_move_absolute) instead of "x" and "y" attributes. - Set the text in the entries so that they match the original values - of the displayed text object. - -2000-04-04 Christopher James Lahey - - * widgets/e-minicard/e-minicard.c: Fixed some referencing and - lifetime issues. - -2000-04-04 Christopher James Lahey - - * widgets/e-text/e-text.c: Removed an unnecessary get_bounds call. - - (From a patch by Iain Holmes ) - - * widgets/e-text/e-text.c: Made tooltips look more like the - underlying text. Made tooltips show up more consistently. - -2000-04-04 Christopher James Lahey - - * addressbook/demo/Makefile.am, addressbook/demo/e-test-model.c, - addressbook/demo/e-test-model.h: Changed this to backend to an - ebook. - - * addressbook/backend/ebook/e-card-iterator.c, - addressbook/backend/ebook/e-card-iterator.h, - addressbook/backend/ebook/e-card-list-iterator.c, - addressbook/backend/ebook/e-card-list.c, - addressbook/backend/ebook/e-card-list.h, - addressbook/backend/ebook/e-card.c, - addressbook/backend/ebook/e-card.h: Fixed const correctness and - changed a couple of functions to be external. - - * addressbook/Makefile.am: Fixed subdir ordering. - -2000-04-04 Christopher James Lahey - - * addressbook/backend/ebook/e-book-view.c: Fixed an incorrect - function. - - * addressbook/backend/ebook/e-book-view.h, - addressbook/backend/ebook/e-book.h: Fixed some incorrect function - pointer declarations. - - * addressbook/backend/ebook/e-card-iterator.c, - addressbook/backend/ebook/e-card-iterator.h, - addressbook/backend/ebook/e-card-list-iterator.c, - addressbook/backend/ebook/e-card-list-iterator.h, - addressbook/backend/ebook/e-card-list.c, - addressbook/backend/ebook/e-card-list.h, - addressbook/backend/ebook/e-card.c, - addressbook/backend/ebook/e-card.h, - addressbook/backend/ebook/test-card.c: Built new iterator system - for getting fields with multiple entries. - - * addressbook/backend/ebook/Makefile.am: Added new files - addressbook/backend/ebook/e-card-iterator.c, - addressbook/backend/ebook/e-card-iterator.h, - addressbook/backend/ebook/e-card-list-iterator.c, - addressbook/backend/ebook/e-card-list-iterator.h, - addressbook/backend/ebook/e-card-list.c, and - addressbook/backend/ebook/e-card-list.h. - -2000-04-04 Yuri Syrota - - * configure.in: Added uk to ALL_LINGUAS. - -2000-04-04 Andreas Hyden - - * configure.in: Added no and sv to ALL_LINGUAS. - -2000-04-03 Christopher James Lahey - - * addressbook/backend/ebook/e-card-cursor.h, - addressbook/backend/ebook/e-card.c: A bit of clean up. - - * addressbook/backend/ebook/e-book-types.h, - addressbook/backend/ebook/e-book-view-listener.c, - addressbook/backend/ebook/e-book-view-listener.h, - addressbook/backend/ebook/e-book-view.c, - addressbook/backend/ebook/e-book-view.h, - addressbook/backend/pas/pas-book-view.c, - addressbook/backend/pas/pas-book-view.h: New files for live views. - - * addressbook/backend/ebook/Makefile.am, - addressbook/backend/ebook/e-book-listener.c, - addressbook/backend/ebook/e-book-listener.h, - addressbook/backend/ebook/e-book.c, - addressbook/backend/ebook/e-book.h, - addressbook/backend/ebook/test-client-list.c, - addressbook/backend/ebook/test-client.c, - addressbook/backend/pas/pas-backend-file.c, - addressbook/backend/pas/pas-book.c, - addressbook/backend/pas/pas-book.h, - addressbook/backend/idl/addressbook.idl: Added live views and - searching to the interface (neither is working yet.) - -2000-04-01 Matt Loper - - * tests/.cvsignore: Added test-movemail. - - * art/.cvsignore: New file. - -2000-03-31 Christopher James Lahey - - * addressbook/demo/demo.c, addressbook/demo/addressbook-widget.c: - Added some missing gtk_object_refs. - -2000-03-30 Matt Loper - - * addressbook/backend/pas/pas-backend-file.c - (pas_backend_file_build_all_cards_list): Get first card (with - R_FIRST) on first seq(). - -2000-03-30 Chris Toshok - - * addressbook/backend/pas/pas-backend-ldap.h: new-file - * addressbook/backend/pas/pas-backend-ldap.c: new file - -2000-03-30 Dan Winship - - * configure.in: - * Makefile.am: - * art/Makefile.am: install new shortcut bar pixmaps. - -2000-03-30 Tuomas Kuosmanen - - * art/evolution-calendar.png art/evolution-inbox.png - art/evolution-tasks.png art/evolution-contacts.png - art/evolution-notes.png evolution-today.png: - added some artwork for the main shortcutbar.. someone - could stick them in it. - -2000-03-29 Christopher James Lahey - - * addressbook/backend/ebook/e-card-cursor.c: Fixed management of - the corba-cursor object by calling CORBA_Object_duplicate on it on - e-card-cursor creation and calling CORBA_Object_release on - e-card-cursor destruction. Also, properly free string returned - from Evolution_CardCursor_get_nth function. - -2000-03-29 Matt Loper - - * addressbook/backend/ebook/test-client.c (get_cursor_cb): Added - some debugging. - - * addressbook/backend/ebook/e-book-listener.c: Added inline - documentation for exposed functions. - * addressbook/backend/ebook/e-card-cursor.c: same. - * addressbook/backend/ebook/e-card.c: same. - - * Makefile.am: add calendar compilation back in. - - * addressbook/backend/pas/pas-book-factory.c - (PAS_BOOK_FACTORY_GOAD_ID): changed to - "evolution:addressbook-server". - - * addressbook/backend/pas/Makefile.am: no need to install a - .gnorba file from here, as the wombat.gnorba file in - evolution/wombat will do its job. - - * addressbook/backend/ebook/test-client.c (ebook_create): if - ebook_new fails, print a warning and return. - - * addressbook/backend/ebook/e-book.c (CARDSERVER_GOAD_ID): changed - to "evolution:addressbook-server". - - * wombat/wombat.c: Changed headerfile path. - - * wombat/Makefile.am: Use relative paths to libraries in the build - tree, rather than requiring libraries (such as libpcs) to already - be installed. - -2000-03-28 Matt Loper - - * wombat/Makefile.am: new file. - - * wombat/wombat.gnorba: Cleaned up. - - * wombat/wombat.c (setup_pcs): filled in the rest. - - * Makefile.am: added wombat. - - * wombat/wombat.gnorba: new file. - - * wombat/.cvsignore: new file. - - * wombat/wombat.c (setup_pcs): fill out this function some. - - * configure.in: added wombat. - -2000-03-28 Chris Toshok - - * addressbook/backend/pas/pas-card-cursor.c (create_cursor): use - g_new0 to allocate the BonoboObjectServant. - - * addressbook/backend/pas/pas-backend-file.c - (pas_backend_file_build_all_cards_list): remove unnecessary - strdup/free. - -2000-03-28 Christopher James Lahey - - * addressbook/backend/pas/pas-backend-file.c: Removed an infinite - loop. - - * addressbook/backend/ebook/test-client-list.c: New test that - doesn't add an extra database item. - - * addressbook/backend/ebook/Makefile.am, - addressbook/backend/ebook/.cvsignore: Added test-client-list. - -2000-03-28 Christopher James Lahey - - * addressbook/backend/pas/pas-card-cursor.c: Fixed memory - allocation. - - * addressbook/backend/pas/pas-backend-file.c: Fixed memory - allocation. Made database stuff not do an extra entry. - - * addressbook/backend/ebook/test-client.c: Add test for - get_all_cards functionality. Changed database name to test.db. - - * addressbook/backend/ebook/e-card-cursor.c: Changed bonobo_object - to gtk_object in a couple of places. - -2000-03-28 Chris Toshok - - * addressbook/backend/pas/pas-backend-file.c - (pas_backend_file_create_unique_id): create id's for entries using - the following format: ("pas-id-%08lX%08X", time(NULL), c++). - -2000-03-27 Dan Winship - - * tests/test-movemail.c: new test program. Can be used to copy POP - mail into your evolution inbox. - -2000-03-27 Chris Toshok - - * addressbook/backend/pas/pas-backend-file.c - (pas_backend_file_get_vcard): remove unneeded g_strdup; - (get_length): implement function. - (get_nth): implement function. - (cursor_destroy): free up the internal glist of vcards, and fix - warning. - (pas_backend_file_build_all_cards_list): new function, to build up - the list of cards in the db. - (pas_backend_file_process_get_all_cards): call - pas_backend_file_build_+all_cards_list, and fix warning. - -2000-03-27 Christopher James Lahey - - * addressbook/backend/ebook/test-card.c: Fixed some warnings. - - * addressbook/backend/ebook/test-client.c: Added a section to test - cursors and returning an id when adding. - - * addressbook/backend/ebook/e-card-pairs.h: Removed the address - pairs since they were added to e-card.c. - - * addressbook/backend/ebook/e-card.c, - addressbook/backend/ebook/e-card.h: Made the set_id function take - a const char *. - - * addressbook/backend/ebook/e-book-listener.c, - addressbook/backend/ebook/e-book-listener.h, - addressbook/backend/ebook/e-book.c, - addressbook/backend/ebook/e-book.h, - addressbook/backend/idl/addressbook.idl, - addressbook/backend/pas/pas-backend-file.c, - addressbook/backend/pas/pas-book.c, - addressbook/backend/pas/pas-book.h: Added a get_all_cards function - and made the response to the create_card function include the card - id. - - * addressbook/backend/ebook/Makefile.am: Added e-card-cursor.c and - e-card-cursor.h. - - * addressbook/backend/ebook/e-card-cursor.c, - addressbook/backend/ebook/e-card-cursor.h: New class for proxying - to an Evolution_CardCursor. - - * addressbook/backend/pas/Makefile.am: Added pas-card-cursor.c and - pas-card-cursor.h. - - * addressbook/backend/pas/pas-card-cursor.c, - addressbook/backend/pas/pas-card-cursor.h: New bonobo class for - making an Evolution_CardCursor server. - -2000-03-27 NotZed - - * tests/test9.c (main): This test is basically now invalid. - * tests/test11.c (main): Fix for async search api. Probably works. - Removed camel-mbox-*.h headers, should be private. - -2000-03-27 Tuomas Kuosmanen - * art/attachment.xpm art/mail-new.xpm art/mail-read.xpm - art/mail-replied.xpm art/mark.xpm art/meeting.xpm - art/priority-high.xpm art/priority-low.xpm - - Added some new icons for the message-list view.. - -2000-03-26 Chris Toshok - - * configure.in: check for db_185.h (present in newer db - distributions.) - - * addressbook/backend/pas/pas-backend-file.c - (pas_backend_file_create_unique_id): new function. - (pas_backend_file_process_create_card): call - pas_backend_file_create_unique_id and pas_book_notify_add (if the - db->put was successful). also, sync out db. - (pas_backend_file_process_remove_card): call - pas_book_notify_remove if the db->del was successful, and sync out - db. - (pas_backend_file_process_modify_card): call - pas_book_notify_change if db->put was successful, and sync out db. - (string_to_dbt): new function. - (pas_backend_file_process_create_card): use string_to_dbt - (pas_backend_file_process_remove_card): likewise - (pas_backend_file_process_modify_card): likewise - (pas_backend_file_get_vcard): likewise - (pas_backend_file_upgrade_db): new function, to upgrade a db file - if we change the data format. - (pas_backend_file_maybe_upgrade_db): check db version vs. current - code version, and upgrade it necessary. - (pas_backend_file_load_uri): call pas_backend_file_maybe_upgrade. - -2000-03-26 Christopher James Lahey - - * addressbook/backend/ebook/test-client.c: Load an ECard instead - of a VCard and then get the VCard from that ECard. Just tests - ECard and the client stuff at the same time. Also, replaces - carriage returns with newlines. - - * addressbook/backend/ebook/e-book.c: Fixed a small parity error. - -2000-03-25 Chris Toshok - - * addressbook/backend/ebook/test-client.c: create a card and then - look it up. - -2000-03-26 Chris Toshok - - * addressbook/backend/pas/pas-backend-file.c - (pas_backend_file_process_create_card): add db calls to flesh out - the interface. hardcoded id that needs to change, once we decide - how we're going to create it. - (pas_backend_file_process_remove_card): add db calls to flesh out - the interface. - (pas_backend_file_process_modify_card): likewise - (pas_backend_file_process_check_connection): likewise - (pas_backend_file_get_vcard): likewise - (pas_backend_file_load_uri): likewise - -2000-03-26 Christopher James Lahey - - * addressbook/backend/ebook/e-book.c: Set the card id properly - when retrieving a card. - -2000-03-22 NotZed - - * e-util/e-sexp.h: Formatting cleanup. - -2000-03-07 NotZed - - * e-util/Makefile.am (libeutil_la_SOURCES): s-sexp.h -> e-sexp.h. - - * addressbook/backend/ebook/e-card.c, - addressbook/backend/ebook/e-card.h: Added the ability to set the - card's id (and made getting it work correctly also.) - -2000-03-25 Chris Toshok - - * addressbook/backend/ebook/e-book.c (e_book_pop_op): pass GList* - as second parameter to g_list_remove_link, not the data pointer. - -2000-03-26 Christopher James Lahey - - * addressbook/backend/ebook/e-card-types.h: Removed the - address->description field. - - * addressbook/backend/ebook/e-card.c: Added VCard output and - the use of GtkArguments. - - * addressbook/backend/ebook/test-card.c: Updated this to use the - GtkArguments. - - * addressbook/backend/ebook/e-book.c: Fixed a memory leak. - -2000-03-25 Matt Loper - - * ebook/e-book.c, - ebook/e-book.h, - ebook/e-book.h, - ebook/e-card-fields.h, - ebook/e-card.h, - ebook/e-commerce.h: old, removed. Up-to-date EBook stuff is kept - in addressbook/backend/ebook. - -2000-03-23 Christopher James Lahey - - * addressbook/backend/ebook/e-card.c, - addressbook/backend/ebook/e-card.h, - addressbook/backend/ebook/e-card-types.h, - addressbook/backend/ebook/e-card-pairs.h, - addressbook/backend/ebook/test-card.c: Added parsing and testing - for name, full name, birthday, telephone, email, and street - address properties. - -2000-03-22 Christopher James Lahey - - * addressbook/backend/ebook/.cvsignore, - addressbook/backend/pas/.cvsignore, - addressbook/backend/idl/.cvsignore, - addressbook/backend/.cvsignore: Updated .cvsignore files. - -2000-03-22 Christopher James Lahey - - * addressbook/Makefile.am, configure.in: Added the - addressbook/backend directory. - - * addressbook/backend/Makefile.am: Removed the libversit directory - as it's now included in the base evolution directory. - - * addressbook/backend/ebook/e-card-pairs.h, - addressbook/backend/ebook/Makefile.am: Changed the place where - libversit is looked for. - - * addressbook/backend/ebook/e-book-listener.c: Fixed some - indentation. - - * addressbook/backend/ebook/e-card-pairs.h, - addressbook/backend/ebook/e-card-types.h: Commented out some code - to get this to compile. - - * addressbook/backend/ebook/e-card.c, - addressbook/backend/ebook/e-card.h: Turned this into a GTK+ - object. - - * addressbook/backend/pas/pas.c, - addressbook/backend/ebook/test-client.c: Include gnome.h and - gnorba.h. - - * addressbook/backend/idl/addressbook.idl: Include Bonobo.idl - instead of bonobo-unknown.idl. - - * addressbook/backend/pas/pas-backend-file.c, - addressbook/backend/pas/pas-book.c, - addressbook/contact-editor/test-editor.c, - addressbook/contact-editor/e-contact-editor.c, - addressbook/printing/e-contact-print.c, - addressbook/printing/test-contact-print-style-editor.c, - addressbook/printing/test-print.c: Killed some warnings. - -2000-03-21 Christopher James Lahey - - * widgets/e-text/e-text.c: Changed gnome_canvas_item_grab_focus to - e_canvas_item_grab_focus. - -2000-03-21 Christopher James Lahey - - * addressbook/demo/addressbook-widget.c: Make background pixmap - get properly set to NULL. - -2000-03-20 Christopher James Lahey - - * widgets/e-text/e-text.c, widgets/e-text/e-text.h: Added the - ability to access the text event processor. - -2000-03-13 Christopher James Lahey - - * addressbook/demo/addressbook-widget.c: Made the addressbook - component look in the users home directory for the addressbook.xml - file. - -2000-03-20 Matt Loper - - * tests/ui-tests/.cvsignore: added filter. - - * addressbook/demo/.cvsignore: added test-addressbook. - -2000-03-17 Elliot Lee - * calendar/cal-client/Makefile.am, - calendar/cal-util/Makefile.am, calendar/gui/Makefile.am, - calendar/pcs/Makefile.am, mail/Makefile.am, - widgets/e-text/Makefile.am: Fix for srcdir != builddir. - -2000-03-14 Dan Winship - - * Makefile.am (SUBDIRS): build shell before mail, since mail - relies on the shell idl files being compiled. - -2000-03-13 Christopher James Lahey - - * addressbook/demo/Makefile.am: Added files for addressbook bonobo - component. Changed non bonobo version to compile as - test-addressbook. - - * addressbook/demo/addressbook.c, - addressbook/demo/addressbook.gnorba, - addressbook/demo/addressbook.h, - addressbook/demo/addressbook-factory.c, - addressbook/demo/addressbook-widget.c, - addressbook/demo/addressbook-widget.h: New factory to create an - addressbook bonobo component. - -2000-03-12 Christopher James Lahey - - * widgets/e-text/.cvsignore: Added e-text-test. - - * addressbook/demo/e-test-model.c, - addressbook/demo/e-test-model.h: A model storing data in an array - of Address objects. - - * addressbook/demo/demo.c: Changed to use - addressbook/demo/e-test-model.c and - addressbook/demo/e-test-model.h. - - * addressbook/demo/Makefile.am: Added e-test-model.c and - e-test-model.h. - -2000-03-12 Christopher James Lahey - - * widgets/Makefile.am: Rearranged SUBDIRS for dependencies. - - * widgets/e-text/e-text-model.c, widgets/e-text-model.h: New - object which stores a piece of text data. All methods are - virtual. - - * widgets/e-text/e-text.c, widgets/e-text/e-text.h: Modified this - to use an ETextModel for its data. - - * widgets/e-text/Makefile.am: Added e-text-model.c and e-text-model.h. - - * widgets/e-minicard/test-minicard-label.c: Made this work again. - - * widgets/e-minicard/e-minicard.c, - widgets/e-minicard/e-minicard.h: Made this use an ETableModel to - get its data. - - * widgets/e-minicard/e-minicard-label.c, - widgets/e-minicard/e-minicard-label.h: Added the ability to set - the text model used for the contained text widget. - - * widgets/e-minicard/Makefile.am: Added e-table since e-minicard - is now dependent on an e-table-model for its data. - - * addressbook/demo, addressbook/demo/.cvsignore, - addressbook/demo/Makefile.am, addressbook/demo/demo.c, - addressbook/demo/spec: A new program to test ETable and EMinicard - integration. - - * configure.in: Added addressbook/demo/Makefile. - - * addressbook/Makefile.am: Added the demo/ subdirectory. - -2000-03-10 Christopher James Lahey - - * widgets/e-minicard/e-minicard.c, - widgets/e-minicard/e-minicard-label.c, - widgets/e-minicard/e-minicard-label.h, - widgets/e-minicard/e-reflow.c, widgets/e-minicard/test-reflow.c, - widgets/e-text/e-text.c, widgets/e-text/e-text.h: Adapted to use - the new e-canvas reflow system. - -2000-03-07 Christopher James Lahey - - * widgets/e-text/e-text.c, widgets/e-text/e-text.h: Added a - "break_characters" argument. It lets you define a set of - characters which should cause optional linebreaks to occur. Made - setting the "clip_height" argument to -1 mean no height clipping. - Moved calling the "resize" signal into an idle handler to avoid - reentering the canvas update loop. Made EText recalc bounds if - the affine has changed. Fixed up tooltip_count (this counts the - number of ENTER and LEAVE events.) - - * widgets/e-text/e-text-test.c: Got rid of a few warnings. - - * widgets/e-minicard/e-minicard-label.h: Reindent a few lines. - - * widgets/e-minicard/e-minicard.c, - widgets/e-minicard/e-minicard-label.c: Switch from using "x" and - "y" to set the children's position to using - e_canvas_item_move_absolute. - -2000-03-05 Matt Loper - - * tests/ui-tests/message-browser.c: Commenting added. - (on_url_data_requested): renamed from "on_url_requested", to - reflect that a stream of data is what's actually being asked for. - (hydrate_persist_stream_from_gstring): New function. - (camel_stream_to_gstring): New function. - (on_object_requested): Cleaned up. - -2000-03-04 bertrand - - * tests/ui-tests/Makefile.am: add bonobo to the build - process. - - * tests/ui-tests/message-browser.c (main): - initialize Bonobo. Use bonobo_main. - (get_gtk_html_contents_window): set signal handlers - for url requests and objects requests. - (on_object_requested): answer to object requests. - -2000-03-03 bertrand - - * tests/ui-tests/message-browser.c (main): initialize - gdkrgb. Push visual/colormap. - (on_url_requested): in the case where a camel url is requested, - write the camel stream to gtkhtml. - - * tests/ui-tests/Makefile.am (filter_LDADD): add - gnomeprint in the lib list. - -2000-03-01 Ettore Perazzoli - - * configure.in: Build `filter/Makefile'. Added check for GtkHTML. - Set `GTKHTML_CFLAGS' and `GTKHTML_LIBS' to the appropriate values - for linking with GtkHTML. - -2000-03-01 Federico Mena Quintero - - * configure.in (AC_OUTPUT): Added calendar/idl/Makefile, - calendar/cal-client/Makefile, and calendar/pcs/Makefile to the - list of files to generate. - -2000-02-29 Iain Holmes - - * widgets/e-text/e-text.c: Don't show the tooltip if the text is being - editted or isn't clipped. Remove the tooltip when editting starts. - - * widgets/e-text/Makefile.am: Build the test program - -2000-02-29 NotZed - - * tests/ui-tests/Makefile.am (filter_LDADD): Added test program. - - * tests/ui-tests/filterdescription.xml, saveoptions.xml: Data - files for test program. - - * tests/ui-tests/filter.c (main): Test program for filter ui. - -2000-02-28 NotZed - - * widgets/e-minicard/Makefile.am (INCLUDES): Fixed references to - eutil. - - * Makefile.am (SUBDIRS): Build e-util before other stuff. - (SUBDIRS): Build filter after camel. - -2000-02-28 Chris Lahey - - * widgets/e-text/e-text.c: Compilation error. - -2000-02-28 Chris Lahey - - * widgets/e-text/e-text.c, widgets/e-text/e-text.h: Updated these - to use the canvas ::update system properly. - -2000-02-24 Dan Winship - - * acconfig.h: - * configure.in: define SENDMAIL_PATH with the path to sendmail. - -2000-02-24 Christopher James Lahey - - * widgets/e-text.c, widgets/e-text.h, e-text-event-processor.c, - e-text-event-processor.h, e-text-event-processor-emacs-like.c, - e-text-event-processor-emacs-like.h, - e-text-event-processor-types.h: This were moved to widgets/e-text/ - a while ago but never removed. They have now been removed. - - * widgets/e-text/e-text.c, widgets/e-text/e-text.h: Removed some - warnings from this file. Made tooltips disappear when you're - finished with them. - - * widgets/e-minicard/test-reflow.c, - widgets/e-minicard/test-minicard.c, - widgets/e-minicard/test-minicard-label.c: Commented out unused - about_callback functions. - - * widgets/e-minicard/e-reflow.c: Made e-reflow pass an EFocus to - its e-minicard children. - - * widgets/e-minicard/e-minicard.c: Made e-minicard take and return - an EFocus for its "has_focus" argument. This makes shift-tab work properly. - - * widgets/e-minicard/e-minicard-label.c: Made e-minicard-label take and return - an EFocus for its "has_focus" argument. Made the font that - e-minicard-label uses only be allocated once. - -2000-02-21 Matt Loper - - * tests/ui-tests/message-browser.c (on_link_clicked): stop - sscanf() abuse. - - * tests/Makefile.am: changed references to libibex.a to - libibex.la. - - * libical/src/libical/.cvsignore: Added *.lo, *.la, and .libs. - * libical/src/libicalss/.cvsignore: same. - - * tests/.cvsignore: Added test11. - - * libical/Makefile.in: autogenerated file removed from cvs, and - added to .cvsignore. - * libical/src/Makefile.in: same. - * libical/src/libical/Makefile.in: same. - * libical/src/libicalss/Makefile.in: same. - -2000-02-22 bertrand - - * tests/ui-tests/message-browser.c (on_link_clicked): - uggly hack to test part saving and - b64 streams. - -2000-02-21 Dan Winship - - * tests/test10.c: - * tests/test11.c: update for camel changes - -2000-02-20 Matt Loper - - * tests/Makefile.am: Changed dependencies on libibex.la to - libibex.a. In test9_LDADD, placed libcamelmbox.la before - libibex.la, as the former requires the latter. - -2000-02-20 Iain Holmes - - * widgets/e-text/e-text.[ch] (_do_tooltip): Show the text of the item, - in a tooltip style. - (e_text_event): Add a timeout on the Enter and remove it on the Leave - events. - - * e-text-test.c: New file to test e-text items. - -2000-02-20 Matt Loper - - * .cvsignore: added ABOUT-NLS. - * ABOUT-NLS: removed. - -2000-02-19 Matt Loper - - * tests/ui-tests/message-browser.c (on_link_clicked): When a link - is clicked, indicate the link with a dialog. - - * libical/src/test/.cvsignore: Added Makefile. - - * libical/.cvsignore: Added Makefile, configure, config.status. - - * libical/src/.cvsignore: New file. - - * libical/Makefile: autogenerated file removed from cvs. - * libical/configure: same. - * libical/config.status: same. - * libical/src/Makefile: same. - * libical/src/test/Makefile: same. - - * widgets/e-minicard/.cvsignore: Added minicard-label-test, - minicard-test, and reflow-test. - - * shell/.cvsignore: added files autogenerated from Evolution.idl. - - * libversit/.cvsignore: Added .libs, vcc.c, vcc.lo, vobject.lo, - vcaltmp.lo, libversit.la - - * libical/src/test/.cvsignore: New file. - - * libical/src/libical/.cvsignore: New file. - - * libical/src/libicalss/.cvsignore: New file. - - * libical/.cvsignore: New file, with config.log in it. - - * tests/ui-tests/message-browser.c: minor cleanup. - - * tests/ui-tests/.cvsignore: added message-browser. - -2000-02-18 NotZed - - * tests/test11.c (main): Use a relative path to the mbox provider - module. - -2000-02-18 Matt Loper - - * tests/ui-tests/message-browser.c (filename_to_camel_msg): Call - camel_data_wrapper_set_input_stream, rather than - camel_data_wrapper_construct_from_stream. For the whole message, - allow someone to see the header ("to", "from", etc.). Clicking on - tree items to see their elements, now works also. - -2000-02-18 Miguel de Icaza - - * configure.in: Make gnomeui the last library on the command line, - as its path is the one most likely to hold other old libraries - (libxml) and we need newer versions. - - (BONOBO_VFS_GNOME_CFLAGS): Add libical to the - AC_CONFIG_SUBDIRS - - (BONOBO_HTML_GNOME_CFLAGS): VFS checking needs to - go before we rquery them. - - Use the new method for gnome-print - checking instead of the old crufty gtk+ based one that nobody can - debug. ever. - -2000-02-16 Matt Loper - - * tests/ui-tests/message-browser.c (tree_selection_changed): New - callback function, which will later change the main html window to - reflect the newly-selected tree item. - (get_gtk_html_contents_window): New function. Gets the content - part of a message. - (get_gtk_html_header_window): New function. Will get the header - part of a message, when applicable. - - * camel/camel-formatter.c (str_tolower): Now returns a new string, - rather than changing it in place. - (initialize_camel_formatter): New function; gives a root - CamelDataWrapper and a stream to a CamelFormatter. - (camel_formatter_wrapper_to_html): New function. Translates any - CamelDataWrapper into html. - (lookup_unique_id): Allows the root object to be a - CamelDataWrapper, which is more general than the previously - required CamelMimeMessage. - - -2000-02-14 NotZed - - * configure.in (EXTRA_GNOME_CFLAGS): Add libunicode to CFLAGS/LIBS. - -2000-02-13 NotZed - - * configure.in: Added check for libunicode. - - * Makefile.am (SUBDIRS): Added libibex. - - * tests/test11.c (main): New test, tests search api. - -2000-02-13 Matt Loper - - * tests/ui-tests/test-multipart-mixed.msg: New rfc822 file, which - crashes message-browser. - - * tests/ui-tests/message-browser.c (get_gtk_html_window): Takes a - CamelMimeMessage as a param, rather than a filename. - (main): Puts our windows in an hpane rather than a vbox. Also - opens a file dlg box if a filename wasn't given as a first param. - - * camel/camel-stream-fs.c (_init_with_name): Set stream_fs->fd to - -1 if we fail to load the file. - (camel_stream_fs_new_with_name): If stream_fs->fd is -1, return - NULL. These changes make it so that a CamelStreamFs won't be - created if you give it a bogus filename; they may be replaced once - exception handling is in place. - - * tests/ui-tests/message-browser.c (handle_tree_item): Expand tree - items. - (mime_message_to_html): New function; translates a - CamelMimeMessage into two strings (one for the header, and one for - the body). - (get_gtk_html_window): New function; fills out a window with - html. The html is taken from a processed rfc822 file, via a - CamelFormatter. - - * camel/camel-formatter.c: Added assertions. - (handle_text_html): Don't call text_to_html on something that's - already html. - (multipart_foreach): function deleted. - - * tests/ui-tests/message-browser.c: Added preliminary support for - the viewing of messages via gtkhtml. Lots of commenting. - -2000-02-11 Christopher James Lahey - - * addressbook/contact-editor/e-contact-editor.c: Fixed the - location the first time you see the drop down menus for changing - which phone, email, or snail mail address you see. - -2000-02-11 Christopher James Lahey - - * widgets/e-text/e-text.c (e_text_event): Made a click on a text - widget set the cursor properly. - -2000-02-11 Christopher James Lahey - - * widgets/e-text/e-text.h: Removed some arguments from the .h that - will never be implemented. - - -2000-02-10 bertrand - - * camel/data-wrapper-repository.c (data_wrapper_repository_init): - default the text/* mime types to CamelSimpleDataWrapper so - that Michael can use get_stream. - -2000-02-10 NotZed - - * camel/camel-simple-data-wrapper-stream.h: The superclass is - actually a seekable stream, not just a stream. - -2000-02-10 bertrand - - * tests/Makefile.am (THREAD_RELATED_TESTS): don't - build thread related tests if evolution has been - compiled with no thread support. - - * configure.in (have_pthread): allow user to enable/disable - thread support at configure time - (EXTRA_GNOME_CFLAGS): - (EXTRA_GNOME_LIBS): thread support is directly - included in this variable if enabled. No more - EXTRA_GNOME_CFLAGS_THREADS - Other special support should be added in - EXTRA_GNOME_LIBS and EXTRA_GNOME_CFLAGS - instead of redefining a new variable - each time we want to add a new lib. - (bonobo, ....) - - * camel/camel.c (camel_init): only try to initialize threads if - we enabled threads support. - - * tests/ui-tests/Makefile.am (message_browser_LDADD): use - EXTRA_GNOME_LIBS - - * configure.in (have_pthread): remove HAVE_PTHREADS - variable. Define ENABLE_THREADS instead. - - * camel/Makefile.am: use ENABLE_THREADS not HAVE_PTHREADS - to test if we build thread relateed code. - - * tests/Makefile.am: use EXTRA_GNOME_LIBS, - not EXTRA_GNOME_LIBS_THREADS - -2000-02-10 NotZed - - * camel/hash-table-utils.c (g_strcase_hash): Removed a bizarre - comparison construct for converting case. - -2000-02-09 NotZed - - * camel/data-wrapper-repository.c (data_wrapper_repository_init): - Uses case-insensitive compares. - - * camel/gmime-content-field.c (gmime_content_field_new): Uses - case-insensitive compares. - - * camel/data-wrapper-repository.c (data_wrapper_repository_init): - Use case-insensitive mime types. - - * camel/camel-simple-data-wrapper-stream.c (read): Increment the - copy source address to match the data read offset. - (seek): Actually implement the seek. - - * camel/camel-mime-part-utils.c - (camel_mime_part_store_stream_in_buffer): If we get a -1 read, - DONT update the total bytes, and try and truncate the array in - reverse. Eek. - - * camel/camel-mime-part.c (camel_mime_part_encoding_from_string): - This was DEFINETLEY not the right way to do it. strncmp!=strcmp - (camel_mime_part_encoding_to_string): Handle the default case. - : include string.h for strcmp() etc. - -2000-02-09 Matt Loper - - * tests/ui-tests/test-multipart-alt.msg: New test file; run - message-browser on it, and it will crash. - -2000-02-09 bertrand - - * tests/ui-tests/message-browser.c (handle_tree_item): - show the item. - (handle_tree_item): show the containers and the containees - (get_message_tree_ctrl): call handle_tree_item - on the message itself - - * camel/camel-mime-message.c (camel_mime_message_init): - set the mime type to "mime/message". - --- THIS IS NOT THE CONTENT TYPE --- - - * camel/camel-mime-body-part.c (camel_mime_body_part_init): - set the mime type to "body-part". - --- THIS IS NOT THE CONTENT TYPE --- - - * camel/camel-data-wrapper.c (camel_data_wrapper_set_mime_type): - mime_type is const. - (_set_input_stream): really set the input stream - (_set_output_stream): really set the output stream - various other typo fixes. - - * tests/ui-tests/message-browser.c: various typo - fixes in the ctree construction. - - * camel/string-utils.c (string_trim): fix braindead - trailing trim bug. - - * camel/gmime-content-field.c (gmime_content_field_construct_from_string): - strip the leading and trailing quotes when constructing the - content field. This should be done in a more generic - RFC822 approach, but this fixes a bug that prevent - matt from analysing some multipart messages. - - * camel/camel-data-wrapper.h: reorganize the - deprecated and new methods. - - * camel/providers/mbox/camel-mbox-folder.c - (_check_get_or_maybe_generate_summary_file): - Use "From " as the message separating string. - - * camel/providers/mbox/camel-mbox-folder.c (_append_message): - set the mode when creating the mbox file. - - * camel/providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev): - ditto - * camel/providers/mbox/camel-mbox-summary.c (camel_mbox_save_summary): - ditto - -2000-02-09 Matt Loper - - * tests/ui-tests/message-browser.c (print_usage_and_quit): Minor - cleanup. - -2000-02-09 NotZed - - * camel/camel-simple-data-wrapper-stream.c (class_init): Actually - initialise the class. It simple couldn't have worked before. - (camel_simple_data_wrapper_stream_construct): Commented out code - which crashes just to get something working, memory corruption?? - -2000-02-09 Christopher James Lahey - - * configure.in: Add new Makefiles to Makefile list. - - * widgets/e-text/Makefile.am: Build libetext. - - * widgets/e-minicard/Makefile.am: Build libeminicard and test - programs. - - * widgets/Makefile.am: Remove all e-text and e-minicard code and - add them to the SUBDIRS list. - -2000-02-08 Matt Loper - - * tests/ui-tests/message-browser.c: New file; shows a message in - tree format, where multipart's have multiple leaves. - - * camel/camel-formatter.c: Changed references from - 'multipart/alternate' to 'multipart/alternative'. - - * tests/test-formatter.c (convert_to_html_and_print): Use the - buffer length of the stream to create strings which are then - printed, rather than printing the stream (which might not have a - trailing \0) directly. - - * camel/camel-formatter.c (str_tolower): New function; makes a - string lowercase. - - * tests/test-formatter.c (convert_to_html_and_print): Fixed call - to 'camel_formatter_mime_message_to_html' to contain correct - params. - - * camel/camel-formatter.c: New member to 'CamelFormatterPrivate', - 'attachments', will be used to let the caller know which items - should be treated as attachments (as opposed to objects which are - inline to the body). - (text_to_html): name changed from 'encode_entities'. Also now - converts newlines to
tags. - (camel_formatter_mime_message_to_html): Now takes two output - streams -- one for the header, and one for the body. - (get_bonobo_tag_for_object): New function; tries to make a tag out - of (1) the leaf of a mime message and (2) a bonobo object that can - handle its mime type, but can return NULL if it fails to find the - mime type. - (handle_vcard): New function; will write out a vcard as html. - -2000-02-07 Christopher James Lahey - - * widgets/e-text.h, widgets/e-text.c: Added line wrap and a max - number of lines (max number of lines is only obeyed if text is not - being edited). - -2000-02-07 Christopher James Lahey - - * addressbook/printing/e-contact-print.c: Removed an unneccessary - include of libhnj. All uses of libhnj are commented out. - -2000-02-07 Matt Loper - - * camel/camel-formatter.c (mime_part_to_html): function deleted. - - * tests/test-formatter.c (print_usage_and_quit): New function, - which gives usage information. - - * camel/camel-formatter.c: made the 'stream' a member of the - CamelFormatter class, so that streams don't have to be explicitly - sent as a param where a CamelFormatter is also sent.. - (handle_text_plain): Use 'encode_entities' to change '<' to - '>', etc. - -2000-02-03 bertrand - - * camel/camel-formatter.c (find_preferred_displayable_body_part_in_multipart_alternative): - (mime_part_to_html): typo fix : - use find_preferred_displayable_body_part_in_multipart_alternative - instead of the other names. Allows camel to have no undefined symbols. - -2000-02-02 Matt Loper - - * tests/test-formatter.c: New file; intended to test the - CamelFormatter class. - - * camel/camel-formatter.c: Lots of cleanup, commenting, some new - functions, and a really basic skeleton for getting bonobo objects - into the html. - (encode_entities): New function, stolen from Daniel Velliard. - -2000-01-28 Christopher James Lahey - - * addressbook/printing/e-contact-print-style-editor.h, - addressbook/printing/e-contact-print-style-editor.c, - addressbook/printing/test-contact-print-style-editor.c: Files to - load the contact print style editor from the glade file. Doesn't - really do anything yet. - - * addressbook/printing/Makefile.am: Added style editor stuff. - - * addressbook/printing/e-contact-print.glade: Changed a bit. - Fixed an out of place widget. - - * addressbook/printing/.cvsignore: Added - contact-print-style-editor-test. - - * addressbook/printing/smallbook.ecps: Fixed up the values to - match the new types. - - * addressbook/printing/medbook.ecps, - addressbook/printing/phonelist.ecps: Added two new printing - styles. - - * addressbook/printing/e-contact-print.h: Fixed an incorrect - comment. - - * addressbook/printing/e-contact-print.c: Added columns and letter - tabs. Tweaked spacing all over the place. Fixed card height - function so that column wrapping is always done correctly. Added - pulling of style information from a file. Added line wrapping - within each text field. - - * addressbook/printing/e-contact-print-types.h: Added a type field - for different types of print styles. - - -2000-01-28 Christopher James Lahey - - * widgets/e-text.c (e_text_command): Handle the grab and ungrab - command instead of doing focus by hand. This fixes a problem - related to the scroll wheel. - (e_text_command): Reset the blink timer in many more command - situations so that the cursor blinks less when you're interacting - with it. - - * widgets/e-text-event-processor-emacs-like.c: Send the grab focus - command when starting a selection and the ungrab focus command - when ending it. - - * widgets/e-text-event-processor-types.h: Added grab command type - so that the event processor can tell the widget to grab the focus. - - * widgets/e-reflow.c: Redefined all sizes using #defines so that - they can be tweaked later. Added scroll wheel handling and set up - adjustment increments so that the scroll bars will work correctly. - - * widgets/e-minicard.h: Added minicard focus type enum. This - doesn't mean anything yet, but it will later be used to say which - direction the focus is coming from (below for shift-tab, above for - tab.) - -2000-01-28 Christopher James Lahey - - * widgets/e-minicard-label.c, widgets/e-minicard.c: Use - e_canvas_item_grab_focus so that it will work with old versions of - gnome-canvas. - - * widgets/e-canvas.c, widgets/e-canvas.h: Finished working around - focus bugs. - -2000-01-28 Christopher James Lahey - - * widgets/test-reflow.c: Set the minimum_width. - - * widgets/e-reflow.h, widgets/e-reflow.c: Added one more column - line so that the right edge of the reflow will have a line. Also - added a minimum_width so that even if the reflow is thinner than - the window, when you resize it larger all the lines are drawn. - -2000-01-27 Christopher James Lahey - - * widgets/e-reflow.h, widgets/e-reflow.c: Added an arrow cursor - for the draggable columns. Made the clickable column area - larger. - - * widgets/e-text.h, widgets/e-text.c: Added an I beam cursor for - the text item when it is editable. - - * widgets/e-minicard-label.c: Forward enter and leave - notifications to the contained editable text item. - -2000-01-26 Matt Loper - - * camel/camel-formatter.c: By looking up a mimetype in a - hashtable, we can now get a handler function for an arbitrary - mimetype. - -2000-01-25 Mathieu Lacage - - * .cvsignore s: cvs shutup. - -2000-01-25 Christopher James Lahey - - * widgets/e-reflow.c, widgets/e-minicard.c: Handle shift-tab - properly now. - - * widgets/e-minicard-label.c: Reindented some areas. - - * widgets/test-reflow.c: Use e-canvas. Set the back pixmap to - NULL for the canvas so that scrolling won't flash grey. - - * widgets/e-canvas.c, widgets/e-canvas.h: These subclass - GnomeCanvas to work around a few bugs so that evolution will work - well with old versions of gnome-libs. - - * widgets/Makefile.am: Added e-canvas.c and e-canvas.h. - - * addressbook/contact-editor/contact-editor.glade: Not much - change. Mostly internal reorganization by glade itself. - -2000-01-25 Christopher James Lahey - - * addressbook/printing/smallbook.ecps: Example contact printing - style. Not used yet. - - * addressbook/printing/e-contact-print.glade: A glade file for - editing contact printing styles. Not used yet. - - * addressbook/printing/test-print.c: Test file for printing. - - * addressbook/printing/e-contact-print.c, - addressbook/printing/e-contact-print.h, - addressbook/printing/e-contact-print-types.h, - addressbook/printing/Makefile.am, addressbook/printing/.cvsignore: - New files for contact printing support. - - * addressbook/Makefile.am (SUBDIRS): Add printing. - - * configure.in: Check for gnome-print. Build the - addressbook/printing Makefile. - -2000-01-24 bertrand - - * camel/camel-data-wrapper.h: - * camel/camel-data-wrapper.c - (_set_input_stream): - (_get_input_stream): - (_set_output_stream): - (_get_output_stream): - The CamelDataWrapper can now be provided with input and - output streams, so that nothing has to be kept in memory. - - * camel/camel-stream.c (camel_stream_class_init): - added the "data_available" signal. - - -2000-01-24 Federico Mena Quintero - - * configure.in: Added the gnome-pilot and capplet checks; they - will likely be reworked for the Evolution framework, but for now - the calendar/ directory needs them. - - * configure.in: Added checks for gnome-vfs. - -2000-01-24 bertrand - - * camel/camel-seekable-stream.c: - * camel/camel-seekable-stream.h: - new files. - - * camel/camel-simple-data-wrapper-stream.h: parent class is now - CamelSeekableStream - * camel/camel-stream-buffered-fs.h: idem - * camel/camel-stream-buffered-fs.c: idem - * camel/camel-stream-mem.h: idem - * camel/camel-stream-mem.c: idem - (_seek): change declaration - * camel/camel-stream-fs.c: parent class is now - CamelSeekableStream - (_seek): change declaration - - * camel/camel-stream-fs.h: parent class is now - CamelSeekableStream - - * camel/camel-stream-fs.[ch]: converted all - gint64 variables into guint32. - - - * camel/camel-stream-fs.c (_read): fix stupid bug. - (_write): ditto. - - * camel/camel-exception.c (camel_exception_new): don't - forget to clean the exception when creating it. - - * camel/camel-recipient.c (camel_recipient_table_add_list): - add recipient_list to the recipients, not recipients_list. - I don't know what that variable was doing here. - - -2000-01-24 Matt Loper - - * camel/camel-formatter.c (write_header_info_to_stream): new - function, broken out from 'camel_formatter_make_html'. - (write_mimepart_to_stream): same. - (find_text_body_part_in_multipart_related): new function. - (camel_formatter_make_html): Now tries to deal with - multipart/related, multipart/alternate, and text/(plain|html). - - -2000-01-23 bertrand - - * camel/camel-store.c (camel_store_get_session): - added a public get_session method. - - * camel/providers/mbox/camel-mbox-summary.c (camel_mbox_save_summary): - (camel_mbox_load_summary): load/save message sizes in the summary file - - * camel/providers/mbox/camel-mbox-summary.h: - added a size field to the message information - structure. - - * camel/providers/mbox/camel-mbox-utils.c (parsed_information_to_mbox_summary): - copy message size to the mbox summary information too. - - * camel/camel-stream-fs.c (_seek): updated to - work with bounded fs streams. - (_write): ditto. - (_read): ditto. - - * camel/camel-stream-fs.h (struct ): - added the cur_pos, inf_bound and sup_bound - members to allow for bounded fs stream. - - * camel/camel-stream-fs.c (_set_bounds): new func. - (_init_with_fd_and_bounds): idem. - (_init_with_name_and_bounds): idem. - New functions to allow the usage of bounded fs streams. - - The bounded fs stream allow, for example, to make a stream - from a message stored in an mbox file. - - -2000-01-22 bertrand - - * camel/providers/mbox/camel-mbox-folder.c (_check_get_or_maybe_generate_summary_file): - use the real summary file path instead of a - stupid hardcoded one. Fixes yet another bug. - - * camel/providers/mbox/camel-mbox-utils.c (parsed_information_to_mbox_summary): - don't forget to copy the date too. Fix a very annoying bug. - - * camel/providers/mbox/camel-mbox-folder.c (_append_message): - implemented. A lot of fixes too. Works now. - (_get_uid_list): implemented. - -2000-01-21 bertrand - - * tests/test10.c: - test the mbox provider. - - * camel/camel-folder.c (_set_name): - if camel_folder_get_mode returns an - exception, return it instead of - overriding it with a new one. - (camel_folder_is_open): make the is_open - method public. - (_set_name): use the is_open instead of - get_mode. - (_set_name): set the fullname even in the case - where the folder has no parent. - (_set_name): use %c, not %d to add the - separator char into the full path. - - * camel/camel-store.c: add exception handling everywhere in - the store related functions arguments. - * camel/providers/mbox/camel-mbox-folder.c: idem - * camel/providers/mbox/camel-mbox-folder.h: idem - * camel/providers/mbox/camel-mbox-store.h: idem - - * camel/providers/mbox/Makefile.am (libcamelmbox_la_SOURCES): - added camel-mbox-provider.c to the mbox provider - sources. - - * camel/providers/mbox/camel-mbox-provider.c: - provider registration code. - - * camel/providers/mbox/camel-mbox-folder.c (_get_message_count): implemented - (_append_message): implemented - - * camel/providers/mbox/camel-mbox-parser.c (initialize_buffer): - use \0 to mark the end of the buffer. - (read_next_buffer_chunk): ditto. - (read_header): test the presence of a \0 instead of - reading the eof field - (read_message_begining): idem. - (camel_mbox_parse_file): idem. - Remove the eof field from the parser - structure. - (read_next_buffer_chunk): removed some nasty bugs - again. - - -2000-01-21 Federico Mena Quintero - - * libversit/vcc.y: Removed the VFS crap; my mistake, it should not - go here. - - * configure.in: Added yacc requirements for libversit. - -2000-01-21 Matt Loper - - * camel/camel-formatter.c (camel_formatter_make_html): added a - CamelMimeMessage as a param to this function, and removed it as a - member of the object. - -2000-01-21 Federico Mena Quintero - - * configure.in (AC_OUTPUT): Added libversit/Makefile and - calendar/Makefile. - - * Makefile.am (SUBDIRS): Added libversit and calendar. - -2000-01-20 bertrand - - * camel/providers/mbox/camel-mbox-parser.c (camel_mbox_parse_file): - compute and return the file size. - - -2000-01-20 Matt Loper - - * camel/camel-formatter.c, camel/camel-formatter.h: New - files. You'll be able to use a CamelFormatter to get - html-formatted versions of a CamelMimeMessage. - -2000-01-20 Christopher James Lahey - - * widgets/e-text-event-processor-types.h: Changed some line - spacing. - - * widgets/test-reflow.c: Connected to the resize signal of the - reflow. - - * widgets/e-minicard.c: Made width argument set function only - update if width is different. - - * widgets/e-reflow.h, widgets/e-reflow.c: Added draggable column dividers. - - * addressbook/contact-editor/test-editor.c: Open two dialogs for - more interesting testing. - - * addressbook/contact-editor/e-contact-editor.h, - addressbook/contact-editor/e-contact-editor.c: Modified to use - glade. Added menus to change which phone/address/email entries to - view. Added images to the dialog. - - * addressbook/contact-editor/e-contact-editor-strings.h, - addressbook/contact-editor/contact-editor.glade: Glade files for - the contact editor dialog. - - * addressbook/contact-editor/Makefile.am: Added images and added - glade stuff. - - * addressbook/contact-editor/arrow.png, - addressbook/contact-editor/briefcase.png, - addressbook/contact-editor/netfreebusy.png, - addressbook/contact-editor/netmeeting.png: Image files for the - contact editor dialog. - -2000-01-19 bertrand - - * camel/providers/mbox/camel-mbox-folder.c (_get_message_count): - implemented. - - * camel/providers/mbox/camel-mbox-summary.c (camel_mbox_save_summary): - (camel_mbox_load_summary): save/load the next uid. - - * camel/providers/mbox/camel-mbox-parser.c (camel_mbox_parse_file): - Compute the next available uid. - * camel/providers/mbox/camel-mbox-folder.c (_create): - (_check_get_or_maybe_generate_summary_file): - Set and use the next_uid field properly. - * camel/providers/mbox/camel-mbox-summary.h: added - an extra field to store the next available uid. - - * camel/providers/mbox/camel-mbox-folder.c - (_check_get_or_maybe_generate_summary_file): - routine called when the folder is opened. - Reads or creates the summary file. - (_create): initialize the internal summary - structure. - (_close): save the summary file on closing. - (_init_with_store): initialize mbox specific - folder members. - -2000-01-18 bertrand - - * tests/test9.c: - tests for summary and parsing process of mbox files. - - * camel/providers/mbox/camel-mbox-parser.c (camel_mbox_parse_file): do - not use case insensitive comp to detect message separators. Kill - some nasty bugs in netscape file parsing, - - * camel/providers/mbox/camel-mbox-utils.c (parsed_information_to_mbox_summary): - don't use g_array_append but write directly inside the - array data instead. Better performance and bug fix. - - * camel/providers/mbox/camel-mbox-summary.c (camel_mbox_load_summary): - fix the name and bugs. - - * camel/camel-folder-summary.h: update the class - method definition to match the public defs. - - * camel/providers/mbox/camel-mbox-summary.c (camel_mbox_save_summary): - (mbox_load_summary): summary file read/write routines. - - * camel/providers/mbox/camel-mbox-utils.c (parsed_information_to_mbox_summary): - routine to construct the summary after the mbox - file has been parsed and the x-evolution fields - inserted. - -2000-01-17 bertrand - - * camel/providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev): - dont use the x_evolution field but rather the uid to - determine the presence of "X-Evolution" in the mail. - - * camel/providers/mbox/camel-mbox-parser.c (camel_mbox_parse_file): - parse the status and uid values if the x-evolution - has been found. - - * camel/providers/mbox/camel-mbox-utils.c (camel_mbox_xev_parse_header_content): - return the parsed status field correctly. - - * camel/providers/mbox/camel-mbox-utils.h: - fixed bad prototype. - - * camel/providers/mbox/camel-mbox-parser.c (camel_mbox_parse_file): - parse and store the "To:" header. - - * camel/providers/mbox/camel-mbox-parser.h: - added a "to" field - - * camel/camel-folder-summary.c: - create the arrays here. - - * camel/camel-folder-summary.h: the list of - summary information is no longer a GList but - rather a GArray. - -2000-01-17 Chrsitopher James Lahey - - * head.png, phone.png, email.png, web.png, snailmail.png: Images - for e-contact-editor.c. - - * addressbook/contact-editor/text-editor.c: Test program - for contact editor widget. - - * addressbook/contact-editor/e-contact-editor.c, - addressbook/contact-editor/e-contact-editor.h: Contact editor - widget files. - - * addressbook/contact-editor/.cvsignore, - addressbook/contact-editor/Makefile.am: New directory for contact - editor files. - - * addressbook/.cvsignore, addressbook/Makefile.am: New directory - for addressbook files. - - * widgets/.cvsignore: Added reflow-test. - - * Makefile.am (SUBDIRS): Added addressbook subdirectory. - - * configure.in, widgets/Makefile.am: Removed widgets/toolbar from - SUBDIRS since the lack of content was preventing it from - compiling. - - * widgets/e-text.c, widgets/e-text.h: Fixed a crashing bug. - -2000-01-17 bertrand - - * tests/test9.c (main): test for the mbox utils. - -2000-01-17 Federico Mena Quintero - - * configure.in: Add the gnomecanvaspixbuf argument to gnome-config - invocations. - -2000-01-17 bertrand - - * camel/providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev): - (copy_file_chunk): - (camel_mbox_xev_write_header_content): - (string_to_flag): - (flag_to_string): - (string_to_uid): - (uid_to_string): - A bunch of new funcs to handle x-evolution - private header field. - (copy_file_chunk): fixed a nasty bug. - (camel_mbox_write_xev): create the copy file descriptor - with the proper arguments. Exceptions implememnted. - (camel_mbox_write_xev): changed the way bytes are counted. - No more uses the message size cause it did not take into - account the message separators characters. - (camel_mbox_write_xev): hopefully fixed the last bugs. - works ok now. - - -2000-01-15 bertrand - - * camel/providers/mbox/camel-mbox-parser.c - (camel_mbox_parse_file): - store the end of headers position. - - * camel/providers/mbox/camel-mbox-parser.h: - added the end_of_header_position to locate the - begining of the mail body. - - - * camel/providers/mbox/camel-mbox-utils.c (uid_to_string): - (string_to_uid): - (flag_to_string): - (string_to_flag): - new functions to handle uids and - flags in the X-Evolution header. - (camel_mbox_xev_parse_header_content): - new function to parse an X-Evolution - header. - (camel_mbox_xev_write_header_content): - new function to write the X-Evolution - header. - -2000-01-13 bertrand - - * camel/providers/mbox/camel-mbox-parser.c (read_next_buffer_chunk): - eof is true when no more chars are available, not - when we've read the entire file. - (initialize_buffer): ditto. - (read_message_begining): documented. - (read_header): ditto. - (new_message_detected): ditto. - (advance_n_chars): ditto. - (goto_next_char): ditto. - (read_next_buffer_chunk): ditto. - (initialize_buffer): ditto. - (parser_free): ditto. - (new_parser): ditto. - -2000-01-12 - - * widgets/e-text-event-processor-types.h, - widgets/e-text-event-processor-emacs-like.c, widgets/e-text.c, - widgets/e-text.h: Added selection and clipboard support. Added up - and down arrow keys. Fixed choice of font colors for the - selection to be based on the current style. - - * widgets/e-minicard.c: Caused a click to grab the focus. Changed - the fake information added. - - * widgets/e-minicard-label.c: Forward mouse events to the field - EText item. - -2000-01-13 Christopher James Lahey - - * widgets/e-canvas-utils.c, widgets/e-canvas-utils.h: - e_canvas_item_move_absolute is just a helper function not supplied - by the gnome_canvas.[ch] I put it here so that multiple items can - use it. - - * widgets/e-reflow.c, widgets/e-reflow.h: This item contains a - number of other items and places them into multiple columns. The - items contained must support a number of arguments and signals to - allow the reflow to interact with them. - - * widgets/test-reflow.c: This is a test program for e-reflow. - - * widgets/e-text.c, widgets/e-text.h: Added properly drawn - selected text. Added some preliminary code for X selection - handling and cut & paste. - - * widgets/e-minicard.c, widgets/e-minicard.h: Added ARG_HAS_FOCUS - handling. Made label display random for more interesting tests of - multiple cards. Tweaked sizing information for better display. - - * widgets/e-minicard-label.c, widgets/e-minicard-label.h: Added - ARG_HAS_FOCUS handling. - - * widgets/Makefile.am: Added the reflow test and reflow files. - -2000-01-12 bertrand - - * camel/providers/mbox/camel-mbox-parser.h (camel_mbox_parse_file): - Added the prototype of camel_mbox_parse_file. - - * camel/providers/mbox/camel-mbox-parser.c (camel_mbox_parse_file): - updated in-line documentation. - - * tests/Makefile.am (noinst_PROGRAMS): - remove non updated tests from the build - process. - - * corrected a bunch of bugs - - * camel/providers/mbox/camel-mbox-parser.c - (camel_mbox_parse_file): - parser the subject and date. - - - * camel/providers/mbox/camel-mbox-parser.c - (camel_mbox_parse_file): added the ability to - follow the parsing progression. - - * camel/providers/mbox/camel-mbox-parser.h: - parse the x-evolution field. - - * camel/Makefile.am (libcamel_la_SOURCES): - disabled gmime-rfc2047 as it depends on libunicode - and is not used for the moment. - -2000-01-12 Christopher James Lahey - - * widgets/e-minicard.c, widgets/e-minicard.h: Added a resize - signal for when the card changes height. Made it so that when you - press tab inside of a field, it goes to the next field. - - * widgets/e-minicard-label.c, widgets/e-minicard-label.h: Added a - resize signal for when the label changes height. - - * widgets/e-text.c, widgets/e-text.h: Added a resize signal for - multiple lines. Added scrolling based on cursor position. - - * widgets/Makefile.am: Removed an extraneous build target. - -2000-01-11 Christopher James Lahey - - * widgets/e-text-event-processor-emacs-like.c: Blocked the tab key - from getting inserted into the buffer since the renderer doesn't - know what a tab is. - - * widgets/e-text.c, widgets/e-text.h: Fixed a memory leak. Added - a blinking cursor and scrolling for the text item. - -2000-01-11 Christopher James Lahey - - * widgets/test-minicard.c: Removed some code which got in the way - of testing properly. - - * widgets/e-minicard-label.c (e_minicard_label_realize): Made the - field text item editable. - - * widgets/Makefile.am: Added e-text-event-process*.[ch]. - - * widgets/e-text.c, widgets/e-text.h: Changed these to support - editing. - - * widgets/e-text-event-processor.c, - widgets/e-text-event-processor.h, - widgets/e-text-event-processor-types.h, - widgets/e-text-event-processor-emacs-like.c, - widgets/e-text-event-processor-emacs-like.h: These are a new pair - of classes which handle all events from the text item and convert - them into commands. - - -2000-01-10 Christopher James Lahey - - * widgets/Makefile.am: Added minicard and text stuff. - - * widgets/e-minicard.c, widgets/e-minicard.h, - widgets/e-minicard-label.c, widgets/e-minicard-label.h: Added - canvas items for the minicard view in the contact manager. - - * widgets/test-minicard.c, widgets/test-minicard-label.c: Tests - for the minicard items. - - * widgets/e-text.h, widgets/e-text.c: New canvas item. Based on - GnomeCanvasText. Adds ellipsis capabilities. Used in - e-minicard*.[ch]. - - * widgets/.cvsignore: Added minicard-test and minicard-label-test. - -2000-01-06 Miguel de Icaza - - * configure.in: Add Bonobo detection, Bonobo flags for compilation - for the components and the shell. - -2000-01-06 Elliot Lee - * composer/Makefile.am, widgets/e-table/Makefile.am: Work with - builddir != srcdir - -2000-01-05 Miguel de Icaza - - * configure.in (EXTRA_GNOME_CFLAGS_THREADS, - EXTRA_GNOME_LIBS_THREADS): New variables that hold the thread - version of the compile/link lines. - -1999-11-20 Miguel de Icaza - - * configure.in (PACKAGE): Raise warning level. - -2000-01-04 bertrand - - * camel/providers/mbox/camel-mbox-folder.c (_list_subfolders): - in the io_error label does not return before the - list has been freed. - -2000-01-03 bertrand - - * camel/providers/mbox/camel-mbox-folder.c (_list_subfolders): - detects netscape ".sdb" folders as well as simple - non-suffixed folders (as the ones used in pine). - - - * camel/string-utils.c (string_prefix): - finished implementation. - (string_prefix): added a boolean flag to indicate if the - suffix has been found. When the suffix does not match, - return NULL. - -1999-12-26 bertrand - - * camel/camel-exception.c (camel_exception_setv): - new function. Allow printf-like description - string constructions. - - * camel/camel-exception.h: cosmetic changes. - - * camel/providers/mbox/camel-mbox-store.h: - * camel/providers/mbox/camel-mbox-store.c: - * camel/providers/mbox/camel-mbox-folder.h: - * camel/providers/mbox/camel-mbox-folder.c: - More work on the mbox provider. - - -1999-12-22 bertrand - - * camel/providers/mbox/camel-mbox-store.h: - * camel/providers/mbox/camel-mbox-store.c: - * camel/providers/mbox/camel-mbox-folder.h: - * camel/providers/mbox/camel-mbox-folder.c: - part of the mbox provider. - -1999-12-20 bertrand - - * camel/camel-folder.c (_set_name): - check that the folder is closed or raise an exception. - (_set_name): unset the name fields as soon as possible, - even if an exception is raised. - - * configure.in: - build mbox provider Makefile - - * camel/Makefile.am (SUBDIRS): - re-enable providers compilation - -1999-12-19 Damon Chaplin - - * configure.in (AC_OUTPUT): added widgets/meeting-time-sel/Makefile - -1999-12-19 bertrand - - * camel/camel-folder-utils.c: include camel-log.h - to avoid unresolved symbols. - -1999-12-18 bertrand - - * camel/camel-folder.c (camel_folder_get_summary): - documented. - - * camel/camel-folder-pt-proxy.c (_append_message): - updated to take the change on append into account. - - * camel/camel-folder.h: - updated class def concerning append. - * camel/camel-folder.c - (camel_folder_append_message): documented. - (camel_folder_append_message): don't return the - message number. Use specific methods instead. - (_append_message): idem. - - (_delete): use exception mechanism. - (camel_folder_delete): idem. - (_delete_messages): idem. - (camel_folder_delete_messages): idem. - (_get_parent_folder): idem. - (camel_folder_get_parent_folder): idem. - (_get_parent_store): idem. - (_get_mode): idem. - (camel_folder_get_parent_store): idem. - (camel_folder_get_mode): idem. - (_list_subfolders): idem. - (camel_folder_list_subfolders): idem. - (_expunge): idem. - (camel_folder_expunge): idem. - (_has_message_number_capability): idem. - (camel_folder_has_message_number_capability): idem. - (_get_message_by_number): idem. - (camel_folder_get_message_by_number): idem. - (camel_folder_get_message_count): idem. - (_list_permanent_flags): idem. - (camel_folder_list_permanent_flags): idem. - (_copy_message_to): idem. - (camel_folder_copy_message_to): idem. - (camel_folder_has_summary_capability): idem. - (camel_folder_get_summary): idem. - (camel_folder_has_uid_capability): idem. - (camel_folder_get_message_uid): idem. - (_get_message_uid_by_number): idem. - (camel_folder_get_message_uid_by_number): idem. - (camel_folder_get_message_by_uid): idem. - (camel_folder_get_uid_list): idem. - -1999-12-17 bertrand - - * camel/camel-folder.c (_set_name): - use exception mechanism. - (camel_folder_set_name): idem. - (camel_folder_set_full_name): idem. - (_get_name): idem. - (camel_folder_get_name): idem. - (_get_full_name): idem. - (camel_folder_get_full_name): idem. - (_can_hold_folders): idem. - (_can_hold_messages): idem. - (_exists): idem. - (camel_folder_exists): idem. - (_is_open): idem. - (_get_subfolder): idem. - (camel_folder_get_subfolder): idem. - - * camel/camel-exception.c (camel_exception_clear): - New function. Clear an exception. - (camel_exception_get_id): - New function. - (camel_exception_get_description): - New function. - - * camel/camel-folder.c (_set_name): - Use the exception system. When the folder - has no parent, don't set its full name - field. - - -1999-12-16 bertrand - - * camel/camel-folder.c (camel_folder_expunge): - (_expunge): - * camel/camel-folder-pt-proxy.c (_expunge): - changed the return value. Now returns the list - of expunged messages - - * camel/camel-folder.c (_init_with_store): - cleaned up. Use the exception system now. - (_open): ditto. - (camel_folder_open): ditto. - (camel_folder_open_async): ditto. - (_close): ditto. - (camel_folder_close): ditto. - (camel_folder_close_async): ditto. - - * camel/camel-exception.c (camel_exception_set): - When no exception is given, do nothing, just - return. - (camel_exception_set): documented. - (camel_exception_new): idem. - (camel_exception_free): idem. - (camel_exception_xfer): idem. - - - * camel/camel-folder.c: - * camel/camel-folder.h: more clean-ups. - Removed message list related code. - This was braindead design. - - - * camel/camel-folder-utils.c (camel_aml_expunge_messages): - implemented. The routines in this file will be - called by providers to handle the list of - message already standing in memory. - -1999-12-15 bertrand - - * camel/camel-folder-utils.c: - * camel/camel-folder-utils.h: - New files, misc utilities for the - folder providers. Includes active message - list utilities. - - - * camel/camel-folder.c (_has_message_number_capability): - (camel_folder_has_message_number_capability): - Added this to know if a folder provides - number-based message access. - - * camel/camel-folder.c (_get_message_count): - added warning when called directly. - (_append_message): ditto - (_open_async): ditto - (_close_async): ditto - (_delete_messages): ditto - (_expunge): ditto - (_get_message_by_number): ditto - (_get_message_uid): ditto - (_get_message_uid_by_number): ditto - (_get_message_by_uid): ditto - (_get_uid_list): ditto - - - * camel/camel-folder-pt-proxy.c (_open_async): - (_open): - (_close_async): - (_close): - (camel_folder_pt_proxy_class_init): - update - (_get_message_by_number): - Update to reflect changes in CamelFolder - - * camel/camel-folder.h: - * camel/camel-folder.c (_get_subfolder): - (camel_folder_get_subfolder): - The CamelFolder::get_folder is renamed to - get_subfolder as it is more intuitive. - - * camel/camel-folder.c (_get_message_by_number): - (camel_folder_get_message_by_number): - * camel/camel-folder.h - (camel_folder_get_message_by_number): - The get_message method is now named - get_message_by_number for consistency - with the _by_uid methods. - - * camel/camel-folder.[ch]: - clean-ups. - -1999-12-13 Nat Friedman - - * ebook/e-book.h: New file. - * ebook/e-book.c: New file. - * ebook/e-card.h: New file. - * ebook/e-card-fields.h: New file. - * ebook/e-commerce.h: New file. :-) - -1999-12-08 Ettore Perazzoli - - * tests/test1.c (main): Removed the strdup()s, which are not - deeded anymore. - - * camel/camel-mime-message.c (_set_subject): `subject' made const. - (camel_mime_message_set_subject): Likewise. - (_set_from): `from' made const. - (camel_mime_message_set_from): Likewise. - (_set_reply_to): Made `reply_to' const. - (camel_mime_message_set_reply_to): Likewise. - (_set_set_received_date): Made `received_date' const. - (camel_mime_message_set_reply_to): Likewise. - (_set_field): `value' made const. Also, strdup the string before - assigning. - - * camel/camel-mime-message.h: Virtual methods changed to use const - strings when setting header values. - -1999-11-17 Ettore Perazzoli - - * composer/Makefile.am (EXTRA_DIST): Added `$(glade_DATA)'. - - * camel/Makefile.am (EXTRA_DIST): Added - `$(libcamel_extra_sources)'. - (libcamelinclude_HEADERS): Added `gmime-base64.h'. - -1999-11-17 Ettore Perazzoli - - * camel/camel-mime-message.c (_write_to_stream): Removed extra ':' - in the `Mime-Version' header. - - * tests/ui-tests/msg-composer-test.c: Removed. - - * Makefile.am (SUBDIRS): Added `composer'. - - * configure.in: Create `composer/Makefile'. - - * camel/camel-simple-data-wrapper-stream.c - (camel_simple_data_wrapper_stream_construct): Updated accordingly. - (camel_simple_data_wrapper_stream_new): Updated accordingly. - * camel/camel-stream-data-wrapper.c - (camel_stream_data_wrapper_construct): Updated accordingly. - - * camel/camel-data-wrapper.h: Replaced `IS_CAMEL...()' type check - macro name with `CAMEL_IS...()'. - * camel/camel-folder-pt-proxy.h: Likewise. - * camel/camel-folder-summary.h: Likewise. - * camel/camel-folder.h: Likewise. - * camel/camel-medium.h: Likewise. - * camel/camel-mime-body-part.h: Likewise. - * camel/camel-mime-message.h: Likewise. - * camel/camel-mime-part.h: Likewise. - * camel/camel-multipart.h: Likewise. - * camel/camel-service.h: Likewise. - * camel/camel-session.h: Likewise. - * camel/camel-simple-data-wrapper-stream.h: Likewise. - * camel/camel-simple-data-wrapper.h: Likewise. - * camel/camel-store.h: Likewise. - * camel/camel-stream-buffered-fs.h: Likewise. - * camel/camel-stream-data-wrapper.h: Likewise. - * camel/camel-stream-fs.h: Likewise. - * camel/camel-stream-mem.h: Likewise. - * camel/camel-stream.h: Likewise. - - * tests/test1.c (main): Updated to match the `RECIPIENT_TYPE' - changes. - - * camel/camel-mime-message.h: Changed `RECIPIENT_TYPE_TO', - `RECIPIENT_TYPE_CC' and `RECIPIENT_TYPE_BCC' into - `CAMEL_RECIPIENT_TYPE_TO', `CAMEL_RECIPIENT_TYPE_CC' and - `CAMEL_RECIPIENT_TYPE_BCC', respectively. - -1999-11-17 Ettore Perazzoli - - * camel/camel-mime-message.c (_write_to_stream): Write - "Mime-Version: 1.0" to the stream. - - * tests/test1.c: If executed with a file name parameter, attach a - file with with that name to the email without loading it into - core, thus demonstrating usage of my latest changes. - - * camel/camel-mime-part.c (_set_encoding): Updated to use - `CamelMimePartEncodingType'. - (camel_mime_part_set_encoding): Likewise. - (_get_encoding): Likewise. - (camel_mime_part_get_encoding): Likewise. - (_write_content_to_stream): Honour the `encoding' member. - (_construct_from_stream): Made static. - (camel_mime_part_encoding_to_string): New function. - (_write_to_stream): Write the encoding string using it. - (camel_mime_part_init): Set encoding to - `CAMEL_MIME_PART_ENCODING_DEFAULT'. - (_finalize): Don't free `encoding' anymore. - (camel_mime_part_encoding_from_string): New function. - (_parse_header_pair): Use it. - - * camel/camel-mime-part.h: New enum `CamelMimePartEncodingType'. - Member `encoding' of `struct _CamelMimePart' changed from `gchar - *' to `CamelMimePartEncodingType'. All the encoding-related - methods changed to use this type instead of `gchar *'. - - * camel/gmime-base64.c (gmime_encode_base64): Got it to work. - - * camel/Makefile.am (libcamel_la_SOURCES): Compile - `gmime-base64.c'. - - * camel/gmime-base64.h: New, previously missing, header. - - * camel/camel-stream-data-wrapper.c: New file implementing the - `CamelStreamDataWrapper' class. - * camel/camel-stream-data-wrapper.h: Corresponding header. - - * camel/camel-simple-data-wrapper.c: Implemented the `get_stream' - virtual method. - (_get_stream): New function implementing the method. - (camel_simple_data_wrapper_class_init): Install it in the class - struct. - (camel_simple_data_wrapper_init): New function initializing the - `stream' member to NULL, - (camel_simple_data_wrapper_class_init): Set it as the - GtkObjectInitFunc. - - * camel/camel-simple-data-wrapper.h: New member `stream' in - `struct _CamelSimpleDataWrapper'. - - * camel/camel-simple-data-wrapper-stream.c: New file implementing - the `CamelSimpleDataWrapperStream' class. - * camel/camel-simple-data-wrapper-stream.h: Corresponding header. - - * camel/camel-data-wrapper.c (camel_data_wrapper_get_stream): New - function. - (_get_stream): New private function, just returning NULL. - (camel_data_wrapper_class_init): Install it as the default - `get_stream' virtual method. - - * camel/camel-data-wrapper.h: New virtual method `get_stream' in - `CamelDataWrapperClass'. - (camel_data_wrapper_get_stream): New function prototype. - -1999-11-05 Ettore Perazzoli - - * tests/ui-tests/msg-composer-test.c: New file for testing the - `EMsgComposer' widget. - * tests/ui-tests/Makefile.am (noinst_PROGRAMS): Compile it. Do - not compile `store_listing' for now because it's currently broken. - (INCLUDES): Added the `widgets' source directory to the include - path list. - (LDADD): Removed the MH dependency; link with - `libevolutionwidgets.la' from the `widgets' directory. - - * configure.in: Create `widgets/Makefile'. - - * camel/gmime-rfc2047.c (rfc2047_clean): Removed C++-like comment. - * camel/camel-folder.c (camel_folder_get_message_uid_by_number): - Likewise. - * camel/gmime-content-field.c (gmime_content_field_get_parameter): - Likewise. - * camel/camel.c (camel_init): Likewise. - * camel/camel-provider.c (camel_provider_register): Likewise. - * camel/camel-multipart.c (_construct_from_stream): Likewise. - * camel/camel-mime-part.c (_write_content_to_stream): Likewise. - * camel/camel-medium.c (camel_medium_class_init): Likewise. - - * camel/camel-data-wrapper.h (camel_data_wrapper_get_type): Make - prototype non-static. - - * camel/Makefile.am (libcamelinclude_HEADERS): Move - `camel-exception-list.def' from `EXTRA_DIST' to - `libcamelinclude_HEADERS'. - - * camel/camel.h: Do not #include . - * camel/data-wrapper-repository.h: Likewise. - -1999-11-05 Ettore Perazzoli - - * tests/Makefile.am (INCLUDES): Add `-I$(top_srcdir)'. - -1999-10-13 bertrand - - * camel/camel-folder.c (camel_folder_close): the - folder->close method is now asynchronous. - - * camel/camel-folder-pt-proxy.c (_folder_open_cb): - (_open): - (_folder_open_cb): - (_open): - open/close method implemented in the thread proxy - folder. More to come. - - * camel/camel-exception.c (camel_exception_xfer): - new utility func. - - * camel/camel-marshal-utils.c: some new marshallers - - * camel/camel-folder-pt-proxy.c: Some explanations - on the thread proxy system. - -1999-10-11 bertrand - - * camel/camel-marshal-utils.c: - camel/camel-marshal-utils.h: - Handles operation marshalling. - - * camel/camel-thread-proxy.c: - camel/camel-thread-proxy.h: - new files. Generic proxy system. - - * camel/camel-folder-pt-proxy.c - moved all proxy related code in dedicated files. - - (camel_folder_pt_proxy_init): - removed proxy initialisation code - (_finalize): - removed proxy finalization code - - - * camel/camel-exception.c - (camel_exception_new): - (camel_exception_set): - (camel_exception_free): - New funcs. - -1999-09-21 bertrand - - * camel/camel-folder-pt-proxy.c (_async_close): - implemented. - - * configure.in: - Check pthreads. - - * camel/Makefile.am: - camel-folder-pt-proxy.c is only compiled - when pthreads are available. - - * camel/camel-folder-pt-proxy.c: - Signal proxying implemenatation. - (_signal_marshaller_server_side): - (_signal_marshaller_client_side): - (_init_signals_proxy): - Code not is tested and has to be best - explained as it uses threads conditions and - gtk signal system. - (_thread_notification_catch): notify pending signals - as well as thread availability. - -1999-09-20 bertrand - - * camel/camel-folder-pt-proxy.c (_op_exec_or_plan_for_exec): - completed - - Binch of new funcs: - (_maybe_run_next_op): - Called by the watch notification when - a threaded op is completed - (_thread_notification_catch): - notification watch call back - (_init_notify_system): - set up the notification channel - (notify_availability): - called by threads before completion. - -1999-09-18 bertrand - - * camel/camel-folder-pt-proxy.c (_op_exec_or_plan_for_exec): - new func. Try to exec an operation in a thread - or queue it if a thread is already busy. - - * camel/camel-op-queue.c (camel_op_queue_set_service_availability): - (camel_op_queue_get_service_availability): - new funcs. - - * camel/camel-op-queue.c (camel_op_new): - (camel_op_free): - new funcs. Uses glib mem chunks. - - -1999-09-17 bertrand - - * camel/camel-folder-pt-proxy.c (_init_with_store): - added notify io_channel. - - * camel/camel-op-queue.h: - * camel/camel-op-queue.c: - New object. Operation queue. Meant to be used in - non-blocking proxy objects. - (camel_op_queue_run_next_op): new func. - run the next operation. - -1999-09-14 bertrand - - * camel/Makefile.am (libcamel_la_SOURCES): - added camel-folder-pt-proxy.[ch] to the build - process. - - * camel/camel-folder-pt-proxy.c (_init_with_store): - started implementation of the pthread-based - folder proxy. - - -1999-09-08 bertrand - - * camel/providers/MH/mh-summary.c - (mh_load_summary): - (mh_save_summary): - (mh_create_summary): - implemented summary (files) for MH folders. - - * camel/providers/MH/camel-mh-folder.c - (_get_message_by_uid): implemented. - (camel_mh_folder_class_init): - (_get_message_uid): implemented - - * camel/camel-folder.c (camel_folder_has_uid_capability): - (camel_folder_get_message_uid): - (camel_folder_get_message_uid_by_number): - (camel_folder_get_message_by_uid): - (camel_folder_get_uid_list): - Documented UID methods. - (camel_folder_get_message_uid_by_number): - const'ified uid. - (camel_folder_get_message_by_uid): idem - removed stupid camel_folder_get_message_uid_by_number - method. - - * tests/ui-tests/store_listing.c (close_all): - close all open folders and stores. (necessary - for UID list saving ). - - * camel/providers/MH/mh-uid.c (mh_generate_uid_list): - fix: store UID list in CamelMHFolder object. - - * camel/providers/MH/camel-mh-folder.c (_open): - read or create UID list. - (_close): save UID list. - -1999-09-07 bertrand - - * camel/md5-utils.c (md5_get_digest_from_file): - correct parameter decl (const) - - * camel/md5-utils.h: typo. - - * camel/providers/MH/mh-uid.c - More work on UID stuff for MH. - (mh_save_uid_list): - (mh_load_uid_list): - (mh_generate_uid_list): - new funcs. Manage on-disk uid list. - - * camel/providers/MH/mh-utils.c (mh_is_a_message_file): - Util routines live here now. - - * camel/md5-utils.c - Documented all funcs. - - (md5_get_digest_from_stream): - correct typo. - (md5_get_digest_from_file): - same typo corrected. - - - * camel/md5-utils.h : - raw routines are declared public now. - Md5 use has to be versatile. - - * camel/providers/MH/mh-uid.c (mh_uid_get_for_file): - new func. Returns an UID for an MH message. - -1999-09-06 bertrand - - - * camel/md5-utils.h: - * camel/md5-utils.c: - changed names to follow camel style. - (md5_get_digest_from_stream): - new methods. - (md5_get_digest_from_file): - new function : get file md5 signature. - To be used in providers code. - - * camel/md5-utils.c: imported md5 coding - routine from rpm. Compiles. - - -1999-09-05 bertrand - - * camel/camel-folder.c (camel_folder_has_uid_capability): - (camel_folder_get_message_uid): - (camel_folder_get_message_uid_by_number): - (camel_folder_get_message_by_uid): - (camel_folder_get_uid_list): - Basic UID framework. - - * devel-docs/misc/ref_and_id_proposition.txt: - New revision. Some fixes. - - * camel/camel-folder.h (struct _CamelFolder): added - uid_capability field. - - - * camel/camel-folder.c (camel_folder_close): publicized - the close method. - - * tests/ui-tests/store_listing.c (show_folder_messages): - use folder summary instead of opening all messages. - (show_folder_messages): re-enabled old CPU/Mem consumming - method. Useful for pop3 for instance. - - * camel/providers/MH/camel-mh-folder.c (_create_summary): - basic and highly non-efficient summary implementation. - Should be seen as a proof of concept only. - subfolder summary still has to be implemented. - - * camel/providers/maildir/camel-maildir-folder.c (_init_with_store): - hasn't summary for the moment. - * camel/providers/maildir/camel-maildir-folder.c - cosmetic changes. - - -1999-09-04 bertrand - - * camel/providers/MH/camel-mh-folder.c (_create_summary): - started summary implementation. - (_open): correct use of open. - - * camel/camel-folder.c (camel_folder_get_summary): - get folder associated summary object. - - * camel/Makefile.am: - added summary files build - - * camel/camel-folder-summary.[ch]: - basic summary framework - -1999-09-03 bertrand - - * devel-docs/camel/Makefile.am: - sgml doc has camel-recipient now. - - * camel/camel-recipient.c (camel_recipient_foreach_recipient_type): - added in-line documentation. - -1999-09-02 bertrand - - * camel/providers/maildir: Added (experimental) maildir - provider written by Jukka Zitting - - * camel/providers/Makefile.am (SUBDIRS): build maildir - provider. - - * camel/camel-provider.c (camel_provider_get_for_protocol): - bug fix. patch from Jukka Zitting - - * camel/camel-mime-message.c (_write_one_recipient_to_stream): - changed decl to fit CRLFunc. - (_write_recipients_to_stream): - calls camel_recipient_foreach_recipient_type now. - - * camel/camel-recipient.c (camel_recipient_foreach_recipient_type): - new convinience function. Iterate over all recipient types. - - * camel/gmime-utils.c (gmime_write_header_table_to_stream): - s/write_header_table_to_stream/gmime_write_header_table_to_stream/ - (gmime_write_header_with_glist_to_stream): - s/write_header_with_glist_to_stream/gmime_write_header_with_glist_to_stream/ - -1999-09-01 bertrand - - * camel/camel-mime-message.c (_finalize): - (_add_recipient): - (_remove_recipient): - (_get_recipients): now use CamelRecipientTable - - * camel/gmime-content-field.c: - (gmime_content_field_unref): test if object - to free is non void. - - * camel/camel-folder.c (_finalize): - (_set_name): - * camel/camel-mime-part.c (_finalize): - (_set_description): - (_set_disposition): - * camel/camel-service.c (_finalize): - * camel/camel-stream-fs.c (_finalize): - * camel/gmime-content-field.c: - (gmime_content_field_construct_from_string): - - * camel/url-util.c (g_url_free): - - When using g_free (obj) don't test if obj != NULL - g_free () already do that. Thanks to elerium for - the feedback. - -1999-08-30 bertrand - - * camel/camel-recipient.c (camel_recipient_get): - (camel_recipient_remove): - (camel_recipient_add): - new func. More work on new independant recipient code. - -1999-08-29 bertrand - - * MAINTAINERS: updated my e-mail address. - -1999-08-28 bertrand - - * camel/camel-mime-part.c (camel_mime_part_set_text): - text parameter declared const - - * camel/camel-mime-part-utils.c (camel_mime_part_store_stream_in_buffer): - actually test correctly nb_bytes_read_chunk is >0 - - * camel/gstring-util.c: - * camel/gmime-content-field.c: - * camel/providers/MH/camel-mh-folder.c: - * camel/camel-stream-fs.c: - include string.h - - * camel/camel-stream-mem.c (_write): return - the numver of written bytes. - - * camel/camel-stream-buffered-fs.c (_eos): - return sthg - - * camel/camel-stream.c (default_camel_seek): - return something. - -1999-08-26 bertrand - - * camel/camel-mime-part.c (_get_content_object): - contruct the content from the buffer before calling - CamelMedium implementation. - (_construct_from_stream): Do not construct the content - by default, just store the content bytes in - a temporary buffer. Content will be constructed only - at caller request (when calling CamelMedium::get_content_object) - Providers with better access to the messages (mbox/MH ...) - will have to provider lighter implementation, that is - shall not read content at all unless the caller asks - for it (again with get_content). - - * camel/camel-mime-part-utils.c: new file, groups - mime-part related utils. Meant to be used by providers - subclassing MimeMessage. - (camel_mime_part_construct_headers_from_stream): - (camel_mime_part_construct_content_from_stream): - no more useless temporary hash table. - - * camel/camel-mime-part.c (_construct_from_stream): calls - mime-part-utils functions now. - - * camel/gmime-utils.c (_store_header_pair_from_string): - do not use hash table to store header, use an array instead. - -1999-08-25 bertrand - - * camel/camel-mime-part.c: now descend from CamelMedium. - - * tests/test1.c (main): all headers must be strdup'ed - (main): unref created objects - - * camel/camel-medium.c (_set_content_object): - (_get_content_object): these methods are - in CamelMedium now. - -1999-08-24 bertrand - - * camel/camel-medium.c (camel_medium_class_init): - new class. Will handle all sort of information media - (Mime mail messages, Lotus Notes mail messages, - postit notes, faxes, who knows .... :) - CamelMimePart will inherit from it. - - * camel/camel-mime-part.c (_set_disposition): - (_set_description): - description and disposition parameters are now const. - - - * camel/gmime-content-field.c (gmime_content_field_free): added - assertion code. - - * camel/providers/MH/camel-mh-folder.c (_get_message): - uses buffered stream. - - * camel/camel-stream-buffered-fs.c: - new stream to accelerate file ops. - -1999-08-20 bertrand - - * camel/camel-stream-fs.c (camel_stream_fs_new_with_name): - name parameter is const. This fixes a bug in destroy () - -1999-08-18 Robert Brady - - * camel/gmime-rfc2047.c: more work on encoder. - -1999-08-17 bertrand - - * camel/camel-stream.c (camel_stream_read): - return the number of bytes read. - How can this have ever worked ? - (camel_stream_flush): don't return anything. - - * camel/gmime-utils.c (get_header_table_from_stream): - mem leak fixed. - -1999-08-16 bertrand - - * tests/ui-tests/store_listing.c: - Now has a popup menu on mailbox tree to allow - easier tests. Implemented the copy stuff. - Works well for the MH provider :))) - - * camel/providers/MH/camel-mh-folder.c (_copy_message_to): - Test MH provider fast copy implemented. - - -1999-08-15 bertrand - - * camel/camel-folder.c (camel_folder_expunge): - moved the active list readjustment code here. - Much saner, providers won't have to worry about - that. - (_copy_message_to): new method. - - * camel/providers/MH/camel-mh-folder.c (_expunge): - no more active list readjustment stuff. - - * camel/camel-folder.h: the expunge virtual no more - returns a list of expunged messages. Now providers - only have to set the expunge flag on the expunged - messages. - - * camel/camel-folder.c (camel_folder_get_message): - moved the caching code here. Finally, I don't want - providers to crash the libs with a bad message cache - implementation. - (_close): do not call the CamelFolder virtual expunge - method directly, use camel_folder_expunge() instead. - (camel_folder_expunge): added the want_list param. - The client can decide if it wants the expunged message - list or not. If yes, it'll have to unref the messages - itself. - -1999-08-14 bertrand - - * tests/ui-tests/store_listing.c (delete_selected_messages): - (expunge_selected_folders): - Implemented deletion/expunge mechanism. - - * camel/camel-folder.c (_get_message): - Added some debug info. - - * camel/providers/MH/camel-mh-folder.c (_expunge): - implemented and tested. - - * camel/camel-mime-message.c (_set_flag): - changed the old braindead implementation. - boolean are inserted in the flag hash - table casted as gpointers. - - - * camel/camel-mime-message.c: indentation fix - - -1999-08-13 bertrand - - * camel/camel-folder.c (_get_message): default implementation - to be called first by providers methods. It looks in the - folder message list (in memory) to see if the message has - not already been retrieved, and in this case, returns - the same CamelMimeMessage object - - * camel/providers/MH/camel-mh-folder.c (_get_message): set - message->message_number correctly. - - * camel/camel-folder.h (struct _CamelFolder): - New field (message_list) which will hold a - reference on each message obtained by the folder, - which is necessary in order for the caching procedure - to work (Getting the same message from a folder twice - will return the same CamelMimeMessage object). - - * camel/camel-folder.c (camel_folder_get_message): - When the store retreives a message put it in its - message list. - (_finalize): free message list. - - * ChangeLog: fix typo (parmanent) - - * camel/camel-folder.c (_get_permanent_flag_list): - (camel_folder_get_permanent_flag_list): - new method, returns the list of permanent - flags supported by the folder. - - * camel/camel-mime-message.c (_get_flag_list): - (camel_mime_message_get_flag_list): new method, - return the list of flag name used by this message. - - * camel/hash-table-utils.c (g_strcase_equal): - (g_strcase_hash): those two func go here now. - - * camel/hash_table_utils.c (hash_table_generic_free): - free a (gpointer, gpointer) hash table pair. - - * camel/camel-mime-message.c (camel_mime_message_init): use - case insensitive hash table functions. - (_set_flag): - (camel_mime_message_set_flag): - (_get_flag): - (camel_mime_message_get_flag): - Use const for flag name, they are now - duplicated. - -1999-08-12 bertrand - - * tests/ui-tests/store_listing.c (show_folder_messages): - remove stupid debug code. - (add_mail_store): use camel_session_get_store instead - of creating MH store directly. - (main): load MH provider. - - * camel/camel-provider.c (camel_provider_register_as_module): - register new provider. - (camel_provider_get_for_protocol): - Now, implementation is correct. - - * camel/camel-store.c (_finalize): - * camel/camel-store.h (struct _CamelStore): - further disabled url_name field use. - URL will be generated dynamically. - - * camel/camel-session.c (camel_session_get_store_for_protocol): - compilation and runtime fixes. - - * camel/providers/MH/camel-mh-store.c (_init): - synced with CamelStore. - - * camel/camel-store.c (_init): - in CamelStore::init, url_name is now const. - disabled url_name copy. - - * camel/camel-session.c (camel_session_get_store): - new function: returns a store for an URL. - (camel_session_get_store_for_protocol): - new functionc: returns a store for a given - store protocol (as IMAP/POP/MH ...) - * camel/string-utils.c (g_strcase_equal): - (g_strcase_hash): case insensitive hash table - funcs. - - * camel/camel-session.c (camel_session_init): hash table - keys are case insensitive. - - * camel/camel-provider.c (camel_provider_get_for_protocol): - new function, returns the last registered - provider for a protocol. - - * camel/providers/MH/camel-mh-provider.c: - new file. MH provider registration stuff. - - * camel/camel-provider.c (camel_provider_register_as_module): - load a provider from a shared object (plugin). - (camel_provider_register): register a provider - "by hand". Used for statically defined providers. - - * tests/test7.c: new test. - tests providers loading framework. - -1999-08-11 - - * camel/camel-service.c (_finalize): - * camel/camel-stream-fs.c (_finalize): - (_destroy): close file descriptor. - * camel/camel-stream-mem.c (_finalize): - * camel/camel-store.c (_finalize): - * camel/camel-folder.c (_finalize): - * camel/camel-multipart.c (_finalize): - * camel/camel-simple-data-wrapper.c (_finalize): - * camel/camel-mime-part.c (_finalize): - implemented destructors. - - - * camel/gmime-content-field.c (gmime_content_field_ref): - (gmime_content_field_unref): - New reference mechanism for GMimeContentField objects. - - * camel/camel-data-wrapper.c (_finalize): - Started implementing destructors. - - * camel/camel-mime-part.c (_construct_from_stream): - * camel/gmime-content-field.c (gmime_content_field_write_to_stream): - * camel/camel-multipart.c (_construct_from_stream): - removed forgotten anarchic traces. - -1999-08-10 bertrand - - * tests/ui-tests/store_listing.c: - * tests/ui-tests/store_listing.glade: - Quick and (very) dirty hack to test Camel more - easily. - - * camel/camel-folder.c (camel_folder_append_message): - new method. - -1999-08-09 bertrand - - * devel-docs/misc/ref_and_id_proposition.txt: - new file. Document message UID and vfolder - implementation. - -1999-08-08 Robert Brady - - * camel/gmime-rfc2047.c: more advanced RFC2047 encoder started. - -1999-08-08 bertrand - - * camel/providers/MH/camel-mh-folder.c (_get_message): - fix. In MH, message number is not related to - message position in folder. - - * camel/providers/MH/camel-mh-folder.c (_is_a_message_file): - util func. - (_get_message_count): implemented. - -1999-08-06 bertrand - - * devel-docs/camel/: - updated some autogen doc stuff. - Still don't understand warnings :( - - * camel/camel-data-wrapper.c: - * camel/providers/MH/camel-mh-store.c: - * camel/url-util.c: - * camel/gmime-content-field.c: - * camel/camel-store.c: - various inline doc corrections. - - * camel/camel-folder.c (get_message_count): - new method. Returns the number of message - in the folder. - - - -1999-08-06 Robert Brady - - * tests/test6.c: encoder test. - - * camel/gmime-rfc2047.c: Fixed decoder bug : sequence - ?= is not always the terminator for an encoded-string. - - -1999-08-06 bertrand - - * camel/providers/MH/camel-mh-folder.c (_list_subfolders): - stat was not testing the good file. Fixed. - - * tests/test4.c (main): added real test for MH folder - provider. All tested things seem to work OK :) - -1998-08-06 Robert Brady - - * tests/test5.c: test for RFC2047 decoder. - - * camel/gmime-rfc2047.c: Improved RFC2047 decoder. - -1999-08-06 bertrand - - * camel/providers/MH/camel-mh-folder.c (_exists): add debug information - (_list_subfolders): test if first char in folder name is not '.' - before adding it to the folder list. - - * camel/camel-store.c (_init): - disable session check temporarily - (_get_separator): - (_get_folder): new static func. - Fixed several oddities in class definition. - - * camel/providers/MH/camel-mh-store.c (camel_mh_store_get_type): - parent type is CAMEL_STORE_TYPE not CAMEL_FOLDER_TYPE - - * camel/camel-store.c: - prent class is CamelServiceClass not GtkObjectClass - - * camel/url-util.c : - cosmetic changes + use of const when possible. - (find_host): - fix a bug: when there is no host and no port don't skip the '/' - all static find_* func are now named _func_* - (g_url_free): destructor func. - cache field has been disabled. Constructing the url string - won't be too slow and will occur rarely enough that we - do not need to add complexity to this code. - - * camel/providers/MH/camel-mh-store.c: - parent class is CamelStorClass not GtkObjectClass - -1999-08-05 bertrand - - * tests/test4.c: - test mh provider. - - * camel/providers/MH/camel-mh-folder.c (_get_message): - implemented - - * camel/camel-folder.c (_get_message): - new method. - (camel_folder_get_message): - corresponding public call - - * camel/README.HACKING: - Some notes. - - * camel/CODING.STYLE: - short note about coding style. - - * camel/README.COPYRIGHT: - Note about copyright policy. - - * camel/providers/MH/camel-mh-folder.c (_list_subfolders): - minor typo fixes. - - -1999-08-04 bertrand - - * camel/gmime-rfc2047.c: - * camel/gmime-rfc2047.h: - indentation and cosmetic changes. - - * camel/providers/MH/camel-mh-folder.c (_list_subfolders): - implemented. - * camel/providers/MH/camel-mh-folder.c (_delete): - finshed implementation - (_delete_messages): implemented. - - -1999-08-04 Robert Brady - - * camel/gmime-rfc2047.[ch]: added an implemention of RFC2047 - (support for character sets other than US-ASCII in MIME - headers). Not actually called from anywhere yet. - - -1999-08-03 bertrand - - * camel/providers/MH/camel-mh-folder.c (_create): - implemented. - (_delete): started implementation. - - * camel/camel-folder.c (_get_folder): default implementation - calls camel_store_get_folder (). - - * camel/providers/MH/camel-mh-folder.c (_init_with_store): - implemented. - - * camel/camel-folder.h (struct _CamelFolder): - remove useless exist_on_store field. - - * camel/camel-folder.c (_exists): - do not use exist_on_store field. - - * camel/camel-folder.c (camel_folder_set_name): - (camel_folder_get_name): - new public functions - (_set_name): set full_path. - - (_set_full_name): - (camel_folder_set_full_name): - commented out this functions def. - It would make things very difficult to handle, and would not - be very useful. - - * camel/providers/MH/camel-mh-store.h: - * camel/providers/MH/camel-mh-store.c (camel_mh_store_set_toplevel_dir): - (camel_mh_store_get_toplevel_dir): - * camel/providers/MH/camel-mh-folder.c (_set_name): - * camel/providers/MH/camel-mh-folder.h: - use (gchar *) instead of (GString *) everywhere. - use const when necessary. - - * camel/camel-folder.h (struct _CamelFolder): - removed unused message_list field. - - * camel/camel-mime-part.c (_set_content_object): - There is a probleme here. We can not allow mime part - content-type field and content_object mime-type to be - different. I thus chosed to set mime part object - content field to be freed (if necessary) and set - to be a pointer to content_object mime type - field. - (_construct_from_stream): set content_object mime type - to be the same as mime_part's one. This is necessary - because we use _set_content_type. - - This two things are a bit hackish ansd may need - to be redesigned. - - * camel/gmime-utils.c (gmime_write_header_pair_to_stream): - use g_strdup_printf and remove a bug. - - * camel/camel-simple-data-wrapper.c (_construct_from_stream): - more debugging output + nb_bytes_read is now a signed int - to avoid bug when eos is encountered. - - * camel/camel-mime-part.c (_construct_from_stream): - sync to data_wrapper_repository function name changes. - Use default "text/plain" type when conten-type field - is not found. (following RFC 2046 spec). - - * camel/data-wrapper-repository.c (data_wrapper_repository_set_data_wrapper_type): - (data_wrapper_repository_get_data_wrapper_type): - change function name prefix (s/data_wrapper/data_wrapper_repository/) - - * camel/camel-multipart.c (_read_part): - add `\n` at eol but not before boundary. - - * camel/gmime-utils.c (get_header_table_from_stream): - correct implementation of end of stream detection. - -1999-08-01 bertrand - - * camel/camel-multipart.c (_read_part): - use a stream to store the part instead of GString. - - * camel/camel-mime-part.c (camel_mime_part_set_text): - set data wrapper content type to "text/plain". - - * camel/camel-stream-mem.c: - * camel/camel-stream-mem.h: - new memory buffer based stream. - - * camel/camel-stream-fs.c (_seek): - implementation for file system based stream. - - * camel/camel-stream.c (camel_stream_seek): - new method. - - * camel/camel-stream-fs.c (camel_stream_fs_class_init): - pass CamelStreamFsClass instead of CamelStreamClass. - -1999-08-01 bertrand - - * camel/gmime-utils.c (gmime_write_header_pair_to_stream): - corrected a bug with memory not allocated for '\0' in strtmp - - * camel/gmime-utils.c (gmime_read_line_from_stream): - do not return NULL when line is empty. - - * camel/camel-multipart.c (_read_part): return true when end - of multipart is found, not the opposite - -1999-07-31 bertrand - - * camel/gmime-utils.c (gmime_read_line_from_stream): - Don't return crlf at end of line. - -1999-07-30 bertrand - - * camel/gmime-utils.c (gmime_read_line_from_stream): - new function: reads a line from a stream. - should be in streams utils maybe. - -1999-07-29 bertrand - - * camel/camel-mime-part.c (_construct_from_stream): - Uses data wrapper repository to find what data wrapper - to use to construct the content from a stream. When - no object is registered for the mime type found in - content type field a CamelSimpleDataWrapper is - used. - - * camel/camel-mime-part.c (_get_content_type): - (camel_mime_part_get_content_type): returns - a pointer on the content_type field instead - of the gchar * mime "type/subtype". - -1999-07-28 bertrand - - - * camel/data-wrapper-repository.c - * camel/data-wrapper-repository.h - New files. Handles mime type <-> camel object - (for example "multipart" <-> CamelMultipart - * tests/tesst3.c: test data repository thing. - -1999-07-26 bertrand - - * camel/camel-multipart.c (_write_to_stream): - implemented output of multipart. - - * tests/test1.c (main): testing content objects operations. - -1999-07-25 bertrand - - * camel/camel-mime-part.c (camel_mime_part_set_text): - new util function to set a mime part content to be - a text string. - - * camel/camel-simple-data-wrapper.c (camel_simple_data_wrapper_set_buffer_from_text): - new util func. - (camel_simple_data_wrapper_new): new func. - - * camel/camel-multipart.c (_write_to_stream): - implemented output of multiparts. - -1999-07-24 bertrand - - * camel/gmime-content-field.c (gmime_content_field_get_parameter): - New function. Returns the value associated to a - mime parameter. - - -1999-07-22 bertrand - - * camel/camel-multipart.h: - * camel/camel-multipart.c: - New class. Models multipart mime objects. - - * camel/camel-mime-body-part.h: - * camel/camel-mime-body-part.c: - New class. Body part is a mime part contained in - a multipart object. - - -1999-07-21 bertrand - - * camel/camel-log.h: - implemented hard log level stuff. - * came/*.c use "CAMEL_LOG_*" instead of "CAMEL_LOG (*" - in order to allow hard level switch. - - * tests/test1.c: - * tests/test2.c: - updated to use gchar instead of GString. Tests passed. - - -1999-07-19 bertrand - - * camel/camel-stream.c: - * camel/camel-stream.h: - "const"-antified - - - * camel/camel-simple-data-wrapper.c: (_construct_from_stream) - do not use any limit when constructing the object from a stream - - * camel/camel-stream-fs.c: - * camel/camel-stream-fs.h: - * camel/camel-mime-message.c: - * camel/camel-mime-message.h: - * camel/camel-session.c: - * camel/camel-session.h: - * camel/camel-service.c: - * camel/camel-service.h: - * camel/camel-store.c: - * camel/camel-store.h: - * camel/camel-folder.c: - * camel/camel-folder.h: - * camel/gmime-utils.c: - * camel/gmime-utils.h: - GString -> gchar - constantified what had to be. - - * camel/string-utils.c: - * camel/string-utils.h: - New files. Meant to replace gstring-util for gchar * - -1999-07-16 bertrand - - * camel/gmime-content-field.c (gmime_content_field_construct_from_string): - GString -> gchar - use const to indicate copied parameter. - -1999-07-15 bertrand - - * camel/camel-simple-data-wrapper.c: - * camel/camel-simple-data-wrapper.h: - Gstring -> gchar - -1999-07-15 bertrand - - * camel/url-util.c: - * camel/url-util.h: - Do not use GStrings any more. - Added assertion code. - Cosmetic reformating - - * AUTHORS: - * ChangeLog: - Changed my email address. - - -1999-07-13 Miguel de Icaza - - * camel/gmime-base64.c (gmime_encode_base64): Implemented base64 - encoder based on CamelStreams. Should the encoder/decoder be a - Stream itself? - - * camel/gmime-utils.c: include config.h here. - * camel/url-util.c: ditto. - * camel/gstring-util.c: ditto. - * camel/gmime-content-field.c: ditto. - * camel/camel-stream.c: ditto. - * camel/camel-stream-fs.c: ditto. - * camel/camel-store.c: ditto. - * camel/camel-simple-data-wrapper.c: ditto. - * camel/camel-session.c: ditto. - * camel/camel-service.c: ditto. - * camel/camel-mime-part.c: ditto. - * camel/camel-mime-message.c: ditto. - * camel/camel-log.c: ditto. - * camel/camel-data-wrapper.c: ditto - * camel/camel-folder.c: ditto. - - * camel/camel-stream.c (camel_stream_write): Moved api - documentation to the places that they document. - (camel_stream_class_init): Virtual classes do not need to have a - default implementation. So null them all. - (camel_stream_write): Return value from write. - (camel_stream_available): implement. - (camel_stream_write_strings): documented. - - * devel-docs/query/virtual-folder-in-depth.sgml: Small - reformatting - -1999-06-28 bertrand - - * tests/test2.c (main): now use - CamelDataWrapper::contruct_form_stream to test - message parsing - - * camel/camel-data-wrapper.c: - * camel/camel-data-wrapper.h: - construct_from_stream no longer has maximimum size arg. - - * camel/camel-mime-part.c (_construct_from_stream): new. - Construct the mime_part from a stream. - - * camel/camel-mime-part.c: - new field (content_type) and associated methods. - (camel_mime_part_init): initialize content_type field. - (_parse_header_pair): now set content_type MimePart field - instead of using DataWrapper Mime typing facility. - -1999-06-28 bertrand - - * camel/camel-data-wrapper.h: - s/content_type/mime_type/ - -1999-06-24 bertrand - - * camel/camel-simple-data-wrapper.[ch]: - new class. Simple implementation of a data wrapper: - simply keeps the stream result in a byte array. - - * camel/camel-mime-part.c (_parse_header_pair): added a warning. - Have to think about the correct way to store content type stuff. - -1999-06-24 bertrand - - * camel/camel-mime-message.c (_write_one_recipient_to_stream): - includes gmime-utils header. - patch from Ulrich Drepper - set separator string in write_header_with_glist_to_stream() - - * camel/camel-log.c (camel_log): - patch from Ulrich Drepper - Do not use stderr in initialization of logfile descriptor. - - * camel/camel-stream-fs.c (camel_stream_fs_new_with_name): - patch from Ulrich Drepper - initialize mode field in open(). - -1999-06-22 bertrand - - * camel/camel-data-wrapper.c (_get_content_type): - moved all the content-type stuff here. - (camel_data_wrapper_init): initialize the instance - content-type field. - - * camel/camel-mime-part.c (_parse_header_pair): - parse Content-Type stuff in header. - (_write_to_stream): write the content type stuff to - the stream. - - * camel/gmime-content-field.c (gmime_content_field_get_mime_type): - new function, returns "type/subtype" mime type string. - (gmime_content_field_construct_from_string): - new function, construbt a content_field object - form a string. be used to set the mime_type from a - string. - - * camel/camel-mime-part.c (_set_content_type): - (camel_mime_part_set_content_type): - (_get_content_type): - (_get_content_type): - new methods. - -1999-06-21 bertrand - - * camel/gmime-utils.c (get_header_table_from_stream): - replace CR/LF+'\t' with ' ' - - * camel/camel-mime-message.c (_set_recipient_list_from_string): - trim \t when splitting - - * camel/gmime-utils.c (get_header_table_from_file): - corrected bug in scanning tabulations ('t' -> '\t') - - * tests/test2.c (main): read mail.test instead - of mail1.test - - * camel/camel-mime-part.c (_add_header): - added comments - -1999-06-03 bertrand - - * devel-docs/query/virtual-folder-in-depth.sgml: - sgmlized Giao's doc about virtual folders. - -1999-05-31 bertrand - - * tests/test2.c (main): - use new stream code instead of raw file * stuff. - - * camel/gmime-utils.c (get_header_table_from_stream): - new func. Will replace get_header_table_from_file and will - be used to parse headers from files as well as from - memory buffers. - - * camel/camel-stream-fs.c: - CamelStream Subclass. File system based - stream. - - -1999-05-30 bertrand - - * camel/camel-stream.h: new class. Represents an - abstract stream object. - - * camel/camel-mime-message.c (_set_recipient_list_from_string): - remove leading and trailing spaces in recipient addresses. - - * camel/gmime-utils.c (_store_header_pair_from_gstring): - remove leading and trailing spaces from header values. - - * camel/gstring-util.c (g_string_trim): new - func: remove leading or trailng chars from - a specified char set. - (g_string_split): allow trimming of substrings. - - * tests/test1.c (main): remove gtk_main call - -1999-05-28 bertrand - - * camel/camel-mime-part.c - (_parse_header_pair): - (_init_header_name_table): - More header parsing code. - - -1999-05-27 bertrand - - * tests/test2.c (main): rewrite message obtained via - parsing into a file. Actually, it works pretty well :)) - - * camel/camel-mime-message.c (_set_recipient_list_from_string): - create recipient list form a comma separated string. - (_parse_header_pair): added recipient lists parsing. - - * camel/camel-mime-part.c (_parse_header_pair): - new (protected) method. Parse a head pair and - decides what to do with it. - - (_add_header): Call in _parse_header_pair - - * camel/camel-mime-message.c (_parse_header_pair): - overload header parsing MimePart mthod. - - * camel/gstring-util.c (g_string_split): - new func: split a gstring into a GList of - substring. - -1999-05-26 bertrand - - * camel/gmime-utils.c (get_header_lines_from_file): - new func. Parses message header zone and returns - a Glist of all header lines. - - * tests/test2.c: tests message parsing - - * camel/gmime-utils.c (write_header_table_to_file): - new func to write a table of headers. - -1999-05-20 bertrand - - * camel/camel-mime-message.c (_write_to_file): - recipient list printing - - * tests/test1.c (main): more tests. - -1999-05-19 bertrand - - * camel/camel-mime-part.c (_write_to_file): test if content - exists before calling its write_to method. - - * camel/camel-mime-message.c (_write_to_file): bugs fix. - - * camel/camel-mime-message.c (camel_mime_message_new_with_session): - new func. Creates a message with the session field set - up correctly. - -1999-05-18 bertrand - - * tests/test1.c (main): tests - - * camel/camel-mime-message.c (_write_to_file): - started write_to framework for mime_messages - - * camel/camel-mime-message.c (*_message_number): - message number funcs. - -1999-05-15 bertrand - - * camel/camel-mime-message.c (*_flag): - flags handling methods - -1999-05-14 bertrand - - * camel/camel-mime-message.c (camel_mime_message_class_init): - added recipient handling class funcs. - -1999-05-13 bertrand - - * camel/camel-mime-message.c (camel_mime_message_init): - create recipients hash table - (_remove_recipient): - (_add_recipient): - (_get_recipients): new funcs. - Internal Recipients data structure is - a bit complicated though. - - * camel/camel-mime-part.c (camel_mime_part_init): - create headers hash table - - * camel/camel-mime-message.h: - a bunch of get/set header field - method done. Does nothing yet though. - - * camel/camel-mime-message.[ch] : - new file. - -1999-05-12 bertrand - - * camel/camel-mime-part.h (struct ): - disposition is now a full GMimeContentField - object. - - * camel/gmime-content-field.c: new file - handle "type/subtype ;parameter=value ; parameter=value ..." - BNF grammar elements - (gmime_content_field_write_to_file): new func - - * camel/gmime-utils.c (gmime_write_header_pair_to_file): - namespace change - -1999-05-11 bertrand - - * camel/camel-mime-part.c (_write_to_file): - overload wrapper class method. - (_write_to_file): start to write some text in - file. - - * camel/camel-store.c: typo fix. - - * camel/camel-store.c: - * camel/camel-service.c: - * camel/camel-folder.c: - * camel/camel-data-wrapper.c: - * camel/camel-mime-part.c: - static functions naming follows gnome - coding style guide. - - * camel/camel-mime-part.h: implemented public interfaces - - -1999-05-10 Bertrand Guiheneuf - - * camel/camel-mime-part.c (__camel_mime_part_get_header_lines): - (__camel_mime_part_set_header_lines): - (__camel_mime_part_get_content_languages): - (__camel_mime_part_set_content_languages): - (__camel_mime_part_get_encoding): - (__camel_mime_part_set_encoding): - (__camel_mime_part_get_content_MD5): - (__camel_mime_part_set_content_MD5): - (__camel_mime_part_get_content_id): - (__camel_mime_part_set_content_id): - A bunch of new set/get func. - - * camel/gstring-util.c (g_string_list_free): - convenience function for string list - complete deallocation. - -1999-05-09 bertrand - - * camel/camel-mime-part.c (__camel_mime_part_add_header): - new method - - * camel/camel-mime-part.h (struct CamelMimePart): - added core fields. - -1999-05-08 bertrand - - * camel/camel-mime-part.[ch]: - new class. models a mime mail part. - - * camel/camel-data-wrapper.c - (camel_data_wrapper_write_to_buffer): method to - stream data content in a buffer. - (camel_data_wrapper_write_to_file): - (camel_data_wrapper_construct_from_buffer): - (camel_data_wrapper_construct_from_file): - new methods. - -1999-05-07 bertrand - - * camel/camel-data-wrapper.[ch]:new class. - This should not be a class but rather an - interface. The day Gtk support interfaces, - it dataWrapper should become an interface. - -1999-05-04 bertrand - - * camel/camel-service.c (camel_service_get_url): - new method. - - * devel-docs/camel/camel-sections.txt: added - function doc references - - * camel/camel-folder.c (__camel_folder_close): - fixed indentation. - (camel_folder_expunge): new method. - (__camel_folder_close): used expunge flag - -1999-05-03 bertrand - - * camel/camel-folder.c (camel_folder_get_mode): - typo fix - - * camel/camel-folder.c (__camel_folder_list_subfolders): - new func. - - * some doc stuffs - - -1999-05-01 bertrand - - * camel/camel-folder.c - (__camel_folder_get_mode): - (camel_folder_get_mode): - (camel_folder_get_parent_store): - (__camel_folder_get_parent_store): - (camel_folder_get_parent_folder): - (__camel_folder_get_parent_folder): - new methods - - * camel/camel-service.c: put __ prefix before - private virtual funcs. - - * camel/camel-folder.c (camel_folder_delete): - (camel_folder_delete_messages): - new methods. - - * camel/url-util.c (g_url_new): some - more comments - -1999-04-27 bertrand - - * camel/camel-folder.c (camel_folder_create): - new public function. - -1999-04-25 bertrand - - * camel/camel-session.c (camel_session_get_store_from_provider): - initialize folder object. - - * camel/camel-store.c (init): new method. - called by session object at instantiation time. - - * camel/camel-store.h (struct _CamelStore): - new fields : session and url_name - -1999-04-25 bertrand - - * camel/camel-session.c (camel_session_set_provider): - new method to set the default provider for a protocol. - (camel_session_get_store_from_provider): - new method to instantiate a folder from a provider. - - * camel/camel-provider.h: s/GString/gchar/g - + typo fix. - - * camel/camel-provider.[ch]: - basic provider structure. Have to write the - code for dynamic loading. - -1999-04-24 bertrand - - * camel/url-util.[ch]: s/new_g_url/g_url_new - - * camel/url-util.c (new_g_url): URL - rewritten completely. Error handling not - implemented in public functions. - But URL scan works pretty well :))) - -1999-04-24 bertrand - - * camel/url-util.[ch]: I needed the url - functions to use GString, and I wanted a more - general scheme so I finally started rewriting - the whole thing from scratch. - No more code from gzilla :( - -1999-04-23 bertrand - - * camel/url-util.[ch]: - Utility functions to parse URLs. - Stolen shamelessly from gzilla (www.gzilla.com) - written by Raph Levien - - * camel/Makefile.am: added url-util.[ch] - compilation. - - * Makefile.am (SUBDIRS): removed devel-docs - until I come up with a correct Makefile.am - - * camel/camel-store.h: - * camel/camel-folder.h: - correct declarations of structs - - -1999-04-22 bertrand - - * camel/providers/MH/camel-mh-store.c: - more test implementation. - - * camel/camel-store.c (camel_store_get_type): typo fix - - -1999-04-21 bertrand - - * camel/providers/MH/camel-mh-folder.c (camel_mh_folder_get_type): - start test provider. - -1999-04-20 bertrand - - * camel/camel-store.h: now CamelStore inherits from - CamelService. - - * camel/camel-service.c (camel_service_class_init): - basic abstract service class. - -1999-04-19 bertrand - - * camel/README: added some (few) explanations. - -1999-04-18 bertrand - - * camel/camel-store.[ch]: started implementation - * camel/camel-folder.c (camel_folder_get_type): typo - uncommented the store related code. - (camel_folder_create): enable som store relted code. - Not finished. Have to define public methods first. - - * camel/camel-log.h: some explanation about the - log system - -1999-04-18 bertrand - - * camel/camel-folder.c: - (camel_folder_create): implemented (partially) - have to write CamelStore before finishing it. - - * camel/camel-folder.h (CamelFolder): added full_name field - (CamelFolderClass): added set/get_full_name methods - -1999-04-18 bertrand - - * camel/camel-folder.c: some work - * camel/camel-log.c: log system for camel - * camel/gstring-util.c: some utilities for GString objects - - -1999-04-18 bertrand - - * autogen.sh (PKG_NAME): groomf -> gnome-mailer - diff --git a/HACKING b/HACKING deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/INSTALL b/INSTALL deleted file mode 100644 index b42a17ac46..0000000000 --- a/INSTALL +++ /dev/null @@ -1,182 +0,0 @@ -Basic Installation -================== - - These are generic installation instructions. - - The `configure' shell script attempts to guess correct values for -various system-dependent variables used during compilation. It uses -those values to create a `Makefile' in each directory of the package. -It may also create one or more `.h' files containing system-dependent -definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, a file -`config.cache' that saves the results of its tests to speed up -reconfiguring, and a file `config.log' containing compiler output -(useful mainly for debugging `configure'). - - If you need to do unusual things to compile the package, please try -to figure out how `configure' could check whether to do them, and mail -diffs or instructions to the address given in the `README' so they can -be considered for the next release. If at some point `config.cache' -contains results you don't want to keep, you may remove or edit it. - - The file `configure.in' is used to create `configure' by a program -called `autoconf'. You only need `configure.in' if you want to change -it or regenerate `configure' using a newer version of `autoconf'. - -The simplest way to compile this package is: - - 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. If you're - using `csh' on an old version of System V, you might need to type - `sh ./configure' instead to prevent `csh' from trying to execute - `configure' itself. - - Running `configure' takes awhile. While running, it prints some - messages telling which features it is checking for. - - 2. Type `make' to compile the package. - - 3. Optionally, type `make check' to run any self-tests that come with - the package. - - 4. Type `make install' to install the programs and any data files and - documentation. - - 5. You can remove the program binaries and object files from the - source code directory by typing `make clean'. To also remove the - files that `configure' created (so you can compile the package for - a different kind of computer), type `make distclean'. There is - also a `make maintainer-clean' target, but that is intended mainly - for the package's developers. If you use it, you may have to get - all sorts of other programs in order to regenerate files that came - with the distribution. - -Compilers and Options -===================== - - Some systems require unusual options for compilation or linking that -the `configure' script does not know about. You can give `configure' -initial values for variables by setting them in the environment. Using -a Bourne-compatible shell, you can do that on the command line like -this: - CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure - -Or on systems that have the `env' program, you can do it like this: - env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure - -Compiling For Multiple Architectures -==================================== - - You can compile the package for more than one kind of computer at the -same time, by placing the object files for each architecture in their -own directory. To do this, you must use a version of `make' that -supports the `VPATH' variable, such as GNU `make'. `cd' to the -directory where you want the object files and executables to go and run -the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. - - If you have to use a `make' that does not supports the `VPATH' -variable, you have to compile the package for one architecture at a time -in the source code directory. After you have installed the package for -one architecture, use `make distclean' before reconfiguring for another -architecture. - -Installation Names -================== - - 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=PATH'. - - You can specify separate installation prefixes for -architecture-specific files and architecture-independent files. If you -give `configure' the option `--exec-prefix=PATH', the package will use -PATH 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=PATH' to specify different values for particular -kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. - - If the package supports it, you can cause programs to be installed -with an extra prefix or suffix on their names by giving `configure' the -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. - -Optional Features -================= - - Some packages pay attention to `--enable-FEATURE' options to -`configure', where FEATURE indicates an optional part of the package. -They may also pay attention to `--with-PACKAGE' options, where PACKAGE -is something like `gnu-as' or `x' (for the X Window System). The -`README' should mention any `--enable-' and `--with-' options that the -package recognizes. - - For packages that use the X Window System, `configure' can usually -find the X include and library files automatically, but if it doesn't, -you can use the `configure' options `--x-includes=DIR' and -`--x-libraries=DIR' to specify their locations. - -Specifying the System Type -========================== - - There may be some features `configure' can not figure out -automatically, but needs to determine by the type of host the package -will run on. Usually `configure' can figure that out, but if it prints -a message saying it can not guess the host type, give it the -`--host=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name with three fields: - CPU-COMPANY-SYSTEM - -See the file `config.sub' for the possible values of each field. If -`config.sub' isn't included in this package, then this package doesn't -need to know the host type. - - If you are building compiler tools for cross-compiling, you can also -use the `--target=TYPE' option to select the type of system they will -produce code for and the `--build=TYPE' option to select the type of -system on which you are compiling the package. - -Sharing Defaults -================ - - If you want to set default values for `configure' scripts to share, -you can create a site shell script called `config.site' that gives -default values for variables like `CC', `cache_file', and `prefix'. -`configure' looks for `PREFIX/share/config.site' if it exists, then -`PREFIX/etc/config.site' if it exists. Or, you can set the -`CONFIG_SITE' environment variable to the location of the site script. -A warning: not all `configure' scripts look for a site script. - -Operation Controls -================== - - `configure' recognizes the following options to control how it -operates. - -`--cache-file=FILE' - Use and save the results of the tests in FILE instead of - `./config.cache'. Set FILE to `/dev/null' to disable caching, for - debugging `configure'. - -`--help' - Print a summary of the options to `configure', and exit. - -`--quiet' -`--silent' -`-q' - Do not print messages saying which checks are being made. To - suppress all normal output, redirect it to `/dev/null' (any error - messages will still be shown). - -`--srcdir=DIR' - Look for the package's source code in directory DIR. Usually - `configure' can determine that directory automatically. - -`--version' - Print the version of Autoconf used to generate the `configure' - script, and exit. - -`configure' also accepts some other, not widely useful, options. diff --git a/MAINTAINERS b/MAINTAINERS deleted file mode 100644 index 7a42d1eee8..0000000000 --- a/MAINTAINERS +++ /dev/null @@ -1 +0,0 @@ -Email: miguel@kernel.org diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index 96a2b253c9..0000000000 --- a/Makefile.am +++ /dev/null @@ -1,36 +0,0 @@ -changelogs = \ - ChangeLog - -EXTRA_DIST = \ - AUTHORS \ - $(changelogs) \ - README \ - HACKING \ - MAINTAINERS \ - NEWS \ - evolution.spec.in - -SUBDIRS = \ - intl \ - macros \ - data \ - e-util \ - widgets \ - shell \ - libibex \ - camel \ - filter \ - composer \ - mail \ - libical \ - libversit \ - addressbook \ - calendar \ - wombat \ - art \ - default_user \ - tools \ - po - -dist-hook: evolution.spec - cp evolution.spec $(distdir) diff --git a/NEWS b/NEWS deleted file mode 100644 index 5b9f6e1c60..0000000000 --- a/NEWS +++ /dev/null @@ -1,8 +0,0 @@ -01/Jun/1999 ------------ - -New development document from Giao Nguyen : -TITLE: An in-depth look at the virtual folder mechanism -(see devel-docs/query) - - diff --git a/README b/README deleted file mode 100644 index f8894167f4..0000000000 --- a/README +++ /dev/null @@ -1,145 +0,0 @@ -Evolution is the integrated mail, calendar and address book -distributed suite from Helix Code, Inc. - -See http://www.helixcode.com/apps/evolution.php3 for more information. - -Note that Evolution is still pre-alpha. This means even if you manage -to compile and run it, you might not be able to figure out how to tell -it to accidentally delete all of your mail. - -If you are interested in hacking on Evolution, you should subscribe to -the Evolution mailing list. Send mail to -"evolution-request@helixcode.com" with the word "subscribe" in the -body of the message. If you are planning to work on any part of -Evolution, please send mail to the mailing list first, to avoid -duplicated effort (and to make sure that you aren't basing your work -on interfaces that are expected to change). - -There is a mailing list archive available at -http://lists.helixcode.com/archives/public/evolution/ - -There is also an #evolution IRC channel on irc.gnome.org. - - -HOW TO BUILD EVOLUTION ----------------------- - - *** READ THIS BEFORE YOU START BUILDING ANYTHING! *** - -Evolution depends on a large number of unreleased and rapidly-changing -libraries. Some of these libraries in turn depend on other unreleased -and rapidly-changing libraries. - -Building Evolution is HARD, and it's going to stay hard until all of -the libraries it depends on stabilize, and there's nothing we can do -to make it any easier until then. - - -General Principles ------------------- - -There are two things you have to decide earlier on: whether or not to -install Evolution in the same prefix as the rest of your GNOME -install, and whether to use GOAD or OAF. - - - Installing everything into the same prefix as the rest of your - GNOME install will it much easier to run programs, but may make it - harder to uninstall later. - - If you want to install into the same prefix as the rest of GNOME, - type: - - gnome-config --prefix - gnome-config --sysconfdir - - and remember the answers, and pass them to "configure" and - "autogen" when building the other packages you need. Eg: - - ./configure --prefix=/usr --sysconfdir=/etc - - - If you do not do this, you will need to set GNOME_PATH to include - the prefix you install into. Eg: - - GNOME_PATH=/usr/local - - - - There is absolutely no reason to build using OAF unless you are - also building Nautilus, in which case you should already have it - installed. - - -Dependencies ------------- - -All of these libraries are available in GNOME CVS, under the given -names. Most (but not all) of them are also available as tarballs on -ftp.gnome.org. The (*)ed packages are available in Helix GNOME. -(http://www.helixcode.com/desktop/) - - - gnome-xml - currently, only 1.8.7 works. Earlier versions have a - bug in code that Evolution needs, and the 2.0 branch is not source - or binary compatible. If you get this from GNOME CVS, use the tag - "LIB_XML_1_X". (*) - - - gnome-print (whatever version is currently needed by gtkhtml) (*) - - - gdk-pixbuf - 0.7.0 or later (*) - - - ORBit - 0.5.1 (*) - - - bonobo - Evolution always tracks the latest CVS versions of bonobo. - Released versions will virtually always be too old (although as of - May 10, bonobo 0.11 is recent enough). - - *** Note that bonobo must be installed with the same --prefix as - *** either gnome-libs or evolution for the Makefiles to work - *** properly. - - - gnome-vfs (released versions are OK currently, but CVS versions are - better) - - - libunicode = 0.4 or later, available - from http://www.pango.org/download.shtml - - - gtkhtml - 0.2 or later - - - libglade (*) - - - pilot-link - only required if you want Pilot support. The pilot - support does not currently exist, so this is somewhat hypothetical. - (*) - - - gnome-pilot - see pilot-link (*) - - - - -The layout of the source tree is: - -addressbook: the Address Book UI -calendar: the Calendar UI -camel: libcamel, a messaging library used by the mailer. - Camel is inspired by Sun's JavaMail - (http://java.sun.com/products/javamail/) and the - IMAPv4 spec (RFC 2060). -wombat: Has source code that will load in the addressbook - and calendar backend, and will form the server - process we'll be using -composer: the message composer UI -data: the .desktop file for Evolution -devel-docs: entirely inadequate documentation -doc: more inadequate documentation, and some nice white - papers -e-util: utility code used by various parts of Evolution -filter: libfilter, a mail filtering library -libibex: an indexing library used by the mailer -libical: a library for the iCalendar format (RFC 2445-2446) -libversit: a library for the vCard (RFC 2425-2426) and vCalendar - (http://www.imc.org/pdi/vcal-10.txt) formats -mail: the mail display UI -shell: the Evolution shell (the main program that launches - the other components) -tests: some test programs -widgets: widgets used by Evolution, including the shortcut bar, - ETable, and EText diff --git a/acconfig.h b/acconfig.h deleted file mode 100644 index fe6c5e8e49..0000000000 --- a/acconfig.h +++ /dev/null @@ -1,21 +0,0 @@ -#undef ENABLE_NLS -#undef HAVE_CATGETS -#undef HAVE_GETTEXT -#undef HAVE_LC_MESSAGES -#undef HAVE_STPCPY -#undef HAVE_LIBSM -#undef PACKAGE -#undef VERSION -#undef HAVE_BONOBO -#undef ENABLE_THREADS -#undef SENDMAIL_PATH -#undef SYSTEM_MAIL_DIR -#undef HAVE_LDAP -#undef HAVE_TIMEZONE -#undef HAVE_TM_GMTOFF -#undef USING_OAF -#undef HAVE_KRB4 -#undef HAVE_KRB5 - -/* Define this if you want to build against the development gtk */ -#undef HAVE_DEVGTK diff --git a/addressbook/.cvsignore b/addressbook/.cvsignore deleted file mode 100644 index 09980ae6ba..0000000000 --- a/addressbook/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -.deps -.libs -Makefile -Makefile.in -*.lo -*.la diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog deleted file mode 100644 index 3b0e4e5576..0000000000 --- a/addressbook/ChangeLog +++ /dev/null @@ -1,929 +0,0 @@ -2000-05-25 Christopher James Lahey - - * gui/component/addressbook.c, - gui/component/e-addressbook-model.c, - gui/component/e-addressbook-model.h: Added double click to open - contact editor. - -2000-05-25 Christopher James Lahey - - * gui/component/addressbook.c: Removed some columns. - -2000-05-25 Ettore Perazzoli - - * gui/component/addressbook.c (addressbook_factory_new_control): - New function. - (addressbook_factory): Use it. - - * Makefile.am (evolution_addressbook_LDADD): Link with - `evolution-shell-component.o' from the shell directory. - - * gui/component/addressbook-component.c: New. - * gui/component/addressbook-component.h: New. - -2000-05-23 Christopher James Lahey - - * Makefile.am: Switched printing and gui. - - * backend/ebook/e-book-view-listener.h, - backend/ebook/e-book-view.h, backend/ebook/e-book.h, - backend/ebook/e-card-cursor.h, backend/ebook/e-card-list.h, - backend/ebook/e-card-simple.h, backend/ebook/e-card.h: Fixed the - #defines to work elsewhere in evolution. - - * gui/component/Makefile.am: Added linking to libecontactprint. - - * gui/component/addressbook.c: Added a menu item to print the - current query. - - * printing/Makefile.am: Add linking to libebook and requirements. - Add installation of ecps files. - - * printing/e-contact-print.c, printing/e-contact-print.h: Changed - this to use real data from an EBook. - - * printing/test-print.c: Made this pass NULL, NULL to - e_contact_print_dialog_new so that it will compile. - -2000-05-23 Christopher James Lahey - - * contact-editor/e-contact-save-as.c: Fixed some memory leaks. - -2000-05-23 Christopher James Lahey - - * contact-editor/Makefile.am: Added e-contact-editor-save-as.c and - e-contact-editor-save-as.h. - - * contact-editor/e-contact-save-as.c, - contact-editor/e-contact-save-as.h: New files that display a save - as dialog and then save the given card to that file. - - * gui/minicard/e-minicard.c: Call e_contact_save_as in a right - click menu. - -2000-05-19 Christopher James Lahey - - * contact-editor/e-contact-editor-categories.c, - gui/component/e-addressbook-model.c: Added initialize_value and - value_is_empty callbacks. - -2000-05-19 Christopher James Lahey - - * contact-editor/e-contact-editor.c: Fixed a bug that broke - address field support. - -2000-05-19 Christopher James Lahey - - * contact-editor/e-contact-editor.c, - contact-editor/e-contact-editor.h: Added support for arbitrary - fields in the contact editor. - -2000-05-18 Christopher James Lahey - - * backend/ebook/e-card.c: Fixed e_card_name_copy and - e_card_arbitrary_copy to deal correctly with a passed NULL. - - * contact-editor/Makefile.am: Removed imagesdir stuff. - - * contact-editor/arrow.png: Made this transparent. - - * contact-editor/contact-editor.glade, - contact-editor/e-contact-editor-strings.h: Renamed some widgets - and added custom widgets for all of the images. - - * contact-editor/e-contact-editor.c: Worked on making this work - decently well with messed up glade files. Cleaned up a lot of code. - -2000-05-18 Christopher James Lahey - - * backend/ebook/e-card.c: Fixed the code to write out and read in - arbitrary fields. - -2000-05-18 Christopher James Lahey - - * backend/ebook/e-card-simple.c, backend/ebook/e-card-simple.h, - backend/ebook/e-card-types.h, backend/ebook/e-card.c, - backend/ebook/e-card.h: Implemented "MAILER" field. Added - arbitrary field support. - - * contact-editor/e-contact-editor-categories.c: Fixed a warning. - -2000-05-16 Christopher James Lahey - - * backend/ebook/e-card-simple.c, backend/ebook/e-card-simple.h: - Added E_CARD_SIMPLE_FIELD_MAILER. Not implemented yet. - -2000-05-16 Chris Toshok - - * backend/pas/pas-backend-ldap.c (construct_email_list): convert to use ECardSimple. - (poll_ldap): same. - -2000-05-16 Chris Toshok - - * backend/pas/pas-book.h: add typedefs for the can_write - functions, and add parameters to pas_book_new. - - * backend/pas/pas-book.c (pas_book_construct): add can_write/can_write_card params. - (pas_book_new): same. - (impl_Evolution_Book_can_write): new function. - (impl_Evolution_Book_can_write_card): same. - (pas_book_get_epv): assign the can_write/can_write_card slots in the epv. - - * backend/pas/pas-backend-ldap.c (pas_backend_ldap_can_write): new function. - (pas_backend_ldap_can_write_card): same. - (pas_backend_ldap_add_client): add can_write/can_write_card to pas_book_new call. - - * backend/pas/pas-backend-file.c (pas_backend_file_can_write_card): new function, calls can_write. - (pas_backend_file_can_write): same. - (can_write): return TRUE if we can write to the addressbook file. - (pas_backend_file_add_client): add can_write/can_write_card to pas_book_new call. - - * backend/idl/addressbook.idl (Evolution): add can_write and - can_write_card permission requests. - -2000-05-16 Christopher James Lahey - - * backend/ebook/e-card.c (e_card_get_vcard): Fixed a large memory leak. - -2000-05-16 Christopher James Lahey - - * backend/ebook/e-card.c (add_list_unique): Fixed another memory - leak. - -2000-05-16 Christopher James Lahey - - * backend/ebook/e-card-simple.c, backend/pas/pas-backend-file.c, - contact-editor/e-contact-editor.c, ename/e-name-western.c, - gui/component/addressbook.c, gui/minicard/e-minicard-view.c: Fixed - some memory leaks. - - * backend/ebook/e-card.c: Rearranged some code. - -2000-05-16 Christopher James Lahey - - * contact-editor/e-contact-editor-categories.c: Fixed a reference - leak. - -2000-05-16 Christopher James Lahey - - * contact-editor/e-contact-editor-categories.c: Fixed a compile - error. - -2000-05-16 Christopher James Lahey - - * contact-editor/e-contact-editor-categories.c: Got rid of a - memory leak. Rearranged a couple functions. - - * gui/minicard/e-minicard-view.c, gui/minicard/e-minicard-view.h: - Added some code to stop watching the EBook when the canvas is - destroyed (apparently the canvas is destroyed before our widget is - destroyed.) - -2000-05-14 Christopher James Lahey - - * contact-editor/e-contact-editor-categories.c: Use the correct - policy for resize. - -2000-05-14 Christopher James Lahey - - * backend/ebook/Makefile.am: Added libeutil for e-card's support - for categories. - - * backend/ebook/e-card-list.c, backend/ebook/e-card-list.h: Added - a function to get the length. - - * backend/ebook/e-card.c, backend/ebook/e-card.h: Added categories - support (accessible either as "categories" or "category_list".) - - * contact-editor/Makefile.am: Added e-table and all of the - categories files. - - * contact-editor/categories.glade, - contact-editor/categories-strings.h, - contact-editor/e-contact-editor-categories.c, - contact-editor/e-contact-editor-categories.h: - - * contact-editor/contact-editor.glade, - contact-editor/e-contact-editor-strings.h: Rearranged this dialog. - - * contact-editor/e-contact-editor.c: Rearranged dialog a bit. - Added opening of categories dialog. - - * gui/component/Makefile.am: Rearranged libraries so that - libetable would be available for the contact editor categories - dialog. - - * gui/component/addressbook.c: Fix for new ETable resizing. Make - contact editor dialog resizable. - - * gui/minicard/Makefile.am: Added libetable contact editor - categories dialog. - - * gui/minicard/e-minicard.c: Make contact editor dialog resizable. - -2000-05-12 Miguel de Icaza - - * contact-editor/fulname.glade: Use accelerators here. - -2000-05-13 Valek Filippov - - * gui/component/ldap-server-dialog.glade: save translatable strings - * gui/component/ldap-server-dialog.glade.h: file with strings - * printing/e-contact-print.glade: save translatable strings - * printing/e-contact-print.glade.h: file with strings - -2000-05-11 Dan Winship - - * gui/component/addressbook.c (control_activate): Now that we - depend on recent gnome-libs we can make the toolbar detachable - again. - -2000-05-10 Christopher James Lahey - - * gui/component/addressbook.c: Make the table view be sorted by - name initially. - -2000-05-10 Christopher James Lahey - - * backend/pas/pas-book-factory.c: Send a proper response when you - can't find the ldap URI. - - * gui/component/addressbook.c: Cleaned up the open error dialog a - bit. - -2000-05-10 Christopher James Lahey - - * gui/component/addressbook.c: Added a dialog for when you can't - open an addressbook. - -2000-05-10 Christopher James Lahey - - * backend/ebook/Makefile.am: Added e-book-types.h, e-card-pairs.h, - e-card-types.h. - - * backend/pas/Makefile.am: Added pas-backend-ldap.h. - - * contact-editor/Makefile.am: Added a proper EXTRA_DIST section. - Removed some old defines. - - * ename/Makefile.am: Added e-name-western-tables.h. - - * gui/component/Makefile.am: Added e-ldap-server-dialog.h. Added - a proper EXTRA_DIST section. - - * gui/minicard/e-reflow.c: Added a missed cast. - - * printing/Makefile.am: Added a proper EXTRA_DIST section. - -2000-05-09 Christopher James Lahey - - * contact-editor/e-contact-editor.c: Make sure that the canvas - doesn't intercept keyboard focus. - -2000-05-09 Christopher James Lahey - - * contact-editor/e-contact-editor.c: Use new art. - -2000-05-09 Christopher James Lahey - - * contact-editor/contact-editor.glade, - contact-editor/e-contact-editor-strings.h: Replaced the Address - button with a label and rearranged the address area a bit. - -2000-05-09 Christopher James Lahey - - * gui/minicard/e-minicard.c: Reenable editting. - - * gui/minicard/e-reflow-sorted.c: Make reflow flow on deletion. - -2000-05-09 Christopher James Lahey - - * gui/component/addressbook.c: Destroy the view object when - leaving the minicard view. - -2000-05-09 Christopher James Lahey - - * gui/minicard/e-reflow-sorted.c: Fixed reflow sorting to call - reflow_request when sorting on an item changes. - -2000-05-09 Christopher James Lahey - - * backend/ebook/e-card-simple.c: Make File As change if name or - company are changed pretty much anywhere. - - * gui/minicard/e-minicard.c: Turned off having minicard editing - effect anything since it's so crashy. - -2000-05-09 Christopher James Lahey - - * backend/pas/pas-backend-ldap.c: Enabled a couple more fields - -2000-05-09 Christopher James Lahey - - * backend/pas/pas-backend-file.c: Added a default card to all new - file backends. - -2000-05-09 Christopher James Lahey - - * gui/component/e-addressbook-model.c: Rearranged order of things - getting destroyed. - - * gui/minicard/e-minicard-view.c: Rearranged order of things - getting destroyed. Don't set attributes of non-null or destroyed - items. Destroy parent object when destroyed. Maintain ref_count - of items in list. - - * gui/minicard/e-minicard.c: Don't set attributes of non-null - items. - - * gui/minicard/e-reflow-sorted.c: Maintain ref_count of items in - list. - - * gui/minicard/e-reflow.c: Maintain ref_count of items in list. - Destroy parent object when destroyed. - -2000-05-09 Christopher James Lahey - - * backend/ebook/e-card-simple.c: Fixed some indentation. - - * contact-editor/contact-editor.glade, - contact-editor/e-contact-editor-strings.h: Changed Email to - Primary Email. - - * contact-editor/e-contact-editor.c: Added checkmarks to indicate - if data exists in the pull down menus for the phone, address, and - email fields. - -2000-05-09 Christopher James Lahey - - * backend/ebook/e-card-simple.c: Fixed the string duplication - problem. Fixed the business/home address string mix up. - - * gui/component/addressbook.c: Made the minicard view the default - view. - -2000-05-08 Christopher James Lahey - - * backend/ebook/e-card-simple.c: Fixed this up a bit. Syncing - should work better now. - -2000-05-08 Christopher James Lahey - - * gui/minicard/e-minicard-view.c, gui/minicard/e-minicard.c, - gui/minicard/e-minicard.h, gui/minicard/e-reflow-sorted.c, - gui/minicard/e-reflow-sorted.h: Made a minimal number of things be - destroyed and recreated when updating a field. - -2000-05-07 - - * gui/minicard/e-minicard.c (remodel): make sure to free the - return value of e_card_simple_get. - - * gui/component/addressbook.c (teardown_table_view): destroy the - ECardSimple here, plug memory leak. - (create_table_view): use view->simple so we can destroy the - ECardSimple later on. - -2000-05-07 Chris Toshok - - * ename/e-name-western.c (e_name_western_extract_middle): comment - function, and fix an ABR. - -2000-05-07 Chris Toshok - - * ename/e-name-western.c (e_name_western_cleanup_string): comment - function, and fix an ABR. - -2000-05-08 Christopher James Lahey - - * gui/minicard/e-minicard.c: Added saving in minicard view. - -2000-05-07 Christopher James Lahey - - * backend/pas/pas-backend-file.c: Fixed an off by 2 error. - -2000-05-07 Chris Toshok - - * gui/component/addressbook.c (set_prop): don't create a new - ebook. instead, unload the current uri (if there is one) and load - the new one. - (addressbook_factory): create the ebook once. - -2000-05-07 Christopher James Lahey - - * gui/component/e-addressbook-model.c: Replaced some model_changed - calls with row_inserted calls. - -2000-05-07 Christopher James Lahey - - * backend/pas/pas-backend-file.c, backend/pas/pas-backend-ldap.c: - Removed some code that was notifying too many clients at the wrong - times. - - * gui/component/addressbook.c: Set view->book. Unreffed - view->book. Unreffed the model instead of destroying it. Removed - the /tmp/test.db stuff. - -2000-05-07 Christopher James Lahey - - * gui/component/addressbook.c: Make the addressbook create the - correct file uri. Added a default query. Initialize view->model - and view->view to NULL. - - * gui/component/e-addressbook-model.c, - gui/minicard/e-minicard-view.c: Only call get_book_view if both - book and query and non-null. - -2000-05-06 Chris Toshok - - * gui/component/addressbook.c (control_deactivate): remove the - separator and toggle view items as well. - (toggle_view_as_cb): callback for the "/View/Toggle View" menu - item. - (get_query): getter for the query string that takes into account - the two view types. - (set_query): setter for the query string that takes into account - the two view types. - (set_book): setter for the EBook type - not really a setter, since - the book is kept in the AddressbookView, but this method actually - sets the "book" property on the current view. - (find_contact_cb): make use of get/set_query - (search_entry_activated): make use of set_query. - (control_activate): add a menu separator and an item to toggle - between view types. - (book_open_cb): make use of set_book. - (ebook_create): no longer needs to return the EBook, since we set - the book field in our view. - (teardown_minicard_view): destructor function for the minicard - specific ui. - (create_minicard_view): constructor function for the minicard - specific ui. - (teardown_table_view): destructor function for the e-table - specific ui. - (create_table_view): constructor function for the e-table specific - ui. - (change_view_type): destroy the old and create the new view ui, - change the label of the Toggle View menu item, and reset the book - and query on the new view type. - (addressbook_factory): create an all-encompassing vbox that the - view uses to create the bonobo control, which contains 1 widget - per ui specific view (the e-table in the table case, and another - vbox in the minicard case.) use change_view_type to create the - initial view. - -2000-05-07 Christopher James Lahey - - * backend/ebook/e-book.c: Made a NULL callback just mean to not - call back. - - * backend/ebook/e-card-simple.c, backend/ebook/e-card-simple.h: - Reordered fields. Added a get_const function to get a constant - string that persists until the simple is destroyed. - - * gui/component/Makefile.am: Added e-addressbook-model.c and - e-addressbook-model.h and all of the libraries and includes that - they are dependent on. - - * gui/component/addressbook-factory.c: Initialize e cursors. - - * gui/component/addressbook.c: Added inactive code to display an - ETable view of the addressbook. - - * gui/component/e-addressbook-model.c, - gui/component/e-addressbook-model.h: New files to implement an - ETable model with a EBook back end. - -2000-05-06 Christopher James Lahey - - * backend/ebook/e-card-simple.c, backend/ebook/e-card-simple.h: - Mostly finished ECardSimple. - - * contact-editor/e-contact-editor.c: Changed this to match with - some of the changes to ECardSimple. - - * gui/component/addressbook.c: Changed this to look for - "addressbook.db" in the given directory if it doesn't find the - file "uri". - - * gui/minicard/e-minicard.c, gui/minicard/e-minicard.h: Changed - this to use ECardSimple. - -2000-05-06 Chris Toshok - - * gui/component/.cvsignore: ignore evolution-addressbook.pure - - * gui/component/Makefile.am: add support for generating - evolution-addressbook.pure. - -2000-05-06 Chris Toshok - - * backend/pas/pas-backend-ldap.c (pas_backend_ldap_load_uri): if a - port isn't specified in the uri default to 389. - -2000-05-06 Christopher James Lahey - - * gui/component/addressbook.c: Made this take a uri through its - property bag. - -2000-05-05 Christopher James Lahey - - * backend/ebook/Makefile.am: Added e-card-simple.c and - e-card-simple.h. - - * backend/ebook/e-card-simple.c, backend/ebook/e-card-simple.h: - New card wrapper class to simplify things. - - * contact-editor/e-contact-editor.c, - contact-editor/e-contact-editor.h: Changed e-contact-editor to use - ECardSimple a bit. - -2000-05-03 Chris Toshok - - * gui/component/addressbook.c (control_deactivate): #ifdef - HAVE_LDAP the ldap specific stuff. - (null_cb): same. - (control_activate): same. - -2000-05-02 Ettore Perazzoli - - * backend/ebook/Makefile.am (INCLUDES): Add - `-I$(top_srcdir)/addressbook/ename'. - -2000-05-02 Matt Loper - - * demo/Makefile.am: set G_LOG_DOMAIN. - * printing/Makefile.am: same. - -2000-05-01 Christopher James Lahey - - * backend/pas/pas-book-factory.c: Add back in the - CORBA_Object_release. - - * backend/pas/pas-book.c: Properly duplicate and release the - listener passed to us. - -2000-05-01 Christopher James Lahey - - * backend/pas/pas-backend-file.c, backend/pas/pas-backend-ldap.c: - Made uri slightly better managed. - - * backend/pas/pas-book-factory.c - (pas_book_factory_process_request): Remove this - CORBA_Object_release that causes things not to work. This is just - a temporary fix until we figure out what's actually wrong. - - * backend/pas/pas-book.c: Fixed a copy and paste error in a warning. - -2000-05-01 Christopher James Lahey - - * Makefile.am: Switched the subdirs order since backend depends on - ename. - -2000-05-01 Larry Ewing - - * backend/pas/pas-backend-ldap.c (pas_backend_ldap_remove_client): - fix a typo in the for loop. - -2000-05-01 Michael Meeks - - * backend/pas/pas-book-factory.c: include gtk. - -2000-04-30 Federico Mena Quintero - - * backend/ebook/e-book-types.h (EBookStatus): Added new status - values for the IDL stuff. - - * backend/pas/pas-book-factory.h (PASBookFactoryClass): New - "last_book_gone" signal. - - * backend/pas/pas-book-factory.c - (pas_book_factory_launch_backend): Better error handling. - (pas_book_factory_process_queue): Let - pas_book_factory_process_request() free the request. - (pas_book_factory_process_request): Free the request here. - Perform better error handling. - (free_active_server_map_entry): Free an active server map entry; - free the URI key and unref the backend value. This function was - renamed; the old one was trying to CORBA_Object_unref() a GTK+ - object! - (remove_backends_entry): Free a backend table entry; free the URI - key. - (backend_last_client_gone_cb): Remove the backend from the active - server map and emit the "last_book_gone" signal if appropriate. - (pas_book_factory_get_n_backends): New function to query the - number of running backends in an addressbook factory. - - * backend/idl/addressbook.idl (BookListener::CallStatus): Added a - ProtocolNotSupported code. This is for when the addressbook - factory cannot find a provider for the requested URI. - - * backend/pas/pas-backend.h (PASBackendClass): New - "last_client_gone" signal. - (PASBackendClass): New get_uri virtual method. - - * backend/pas/pas-backend.c (pas_backend_load_uri): Return a - gboolean success code. - (pas_backend_add_client): Return a gboolean success code. - (pas_backend_last_client_gone): New function used by backend - implementations to notify upwards when the backend's last client - is destroyed. - (pas_backend_get_uri): New function to get the URI of a backend. - - * backend/pas/pas-backend-file.c (pas_backend_file_add_client): - Pass the backend as the closure data to the "destroy" handler of - the book. We cannot call pas_book_get_backend() in the callback - since the book's private data has already been destroyed when the - callback is invoked. Alternatively, we could move the private - data destruction step to the book's ::finalize() method. - (pas_backend_file_book_destroy_cb): Get the backend from the - callback's data, not from the book. - (pas_backend_file_remove_client): Remove the book from the list of - clients. When all clients go away, call - pas_backend_last_client_gone(). - (PASBackendFilePrivate): Added an uri field. - (pas_backend_file_get_uri): Implement the get_uri method. - (pas_backend_file_load_uri): Return a gboolean success code. - Also, store the URI in the private structure. - (pas_backend_file_add_client): Return a gboolean success code. - Also, call pas_backend_last_client_gone() if appropriate. - (pas_backend_file_destroy): Free the bf->priv->uri. - - * backend/pas/pas-backend-ldap.c (pas_backend_ldap_add_client): - Pass the backend as the closure data to the "destroy" handler of - the book. See above for rationale. - (pas_backend_ldap_book_destroy_cb): Get the backend from the - callback's data. - (pas_backend_ldap_remove_client): Remove the book from the list of - clients. When all clients go away, call - pas_backend_last_client_gone(). - (pas_backend_ldap_load_uri): Return a gboolean success code. - (pas_backend_ldap_add_client): Return a gboolean success code. - Also, call pas_backend_last_client_gone() if appropriate. - (PASBackendLDAPPrivate): New uri field. - (pas_backend_ldap_get_uri): Implement the get_uri method. - (pas_backend_ldap_load_uri): Store the uri in the private - structure. - (pas_backend_ldap_destroy): Free the bl->priv->uri. - -2000-04-30 Chris Toshok - - * gui/component/Makefile.am (evolution_addressbook_SOURCES): added - e-ldap-server-dialog.c - (glade_DATA): added ldap-server-dialog.glade - - * gui/component/ldap-server-dialog.glade: new file. - - * gui/component/e-ldap-server-dialog.h: new file. - - * gui/component/e-ldap-server-dialog.c: new file, contains logic - associated with ldap server dialog. - - * gui/component/addressbook.c (control_deactivate): remove the - directory server menu item. - (null_cb): do nothing callback for e_book_load_uri call. should - change to (at the very least) pop up a dialog if there was an - error. - (new_server_cb): new function - really just switches to a - particular ldap server, since the information isn't saved - anywhere. - (control_activate): add directory server menu item. - -2000-04-30 Chris Toshok - - * backend/ebook/e-book.c (e_book_load_uri): create the book - listener here, since it's destroyed in unload_uri. - (e_book_construct): remove the book listener construction here. - -2000-04-30 Christopher James Lahey - - * backend/ebook/.cvsignore: Added load-pine-addressbook. - -2000-04-30 Christopher James Lahey - - * contact-editor/contact-editor.glade, - contact-editor/e-contact-editor.c, gui/minicard/e-minicard.c: Made - some fields invisible that were visible before. - -2000-04-30 Christopher James Lahey - - * backend/ebook/e-card.c: Make file as not have the : after it if - it's empty. If there's no name, or file_as, fill in these fields - with defaults based on full_name or name respectively. - - * backend/ebook/load-pine-addressbook.c: New file to do import of - pine .addressbook files. - - * backend/pas/pas-backend-file.c: Made empty fields act as the - empty string for searches. - - * contact-editor/e-contact-editor.c, - contact-editor/e-contact-editor.h: Made the File As field update - properly as you edit the name and company fields. Added the pull - down list of File As choices. Made sure that all fields will - be set to NULL if they are deleted to the empty string. - - * gui/minicard/e-minicard.c: Use the File As field instead of the - Full Name field for the header. Make identical compares on the - File As field do a compare on the uid. - -2000-04-30 Christopher James Lahey - - * contact-editor/e-contact-editor-fullname.c, - contact-editor/fullname.glade: Fixed a string mismatch. - -2000-04-30 Christopher James Lahey - - * backend/ebook/Makefile.am: Added ename includes and libs. - - * backend/ebook/e-card.c, backend/ebook/e-card.h: Added - e_card_name_from_string. Added header for - e_card_delivery_address_from_string, even though it's not - implemented yet. - - * contact-editor/Makefile.am: Removed the ename includes since we - no longer use ename directly here. - - * contact-editor/e-contact-editor.c: Fixed this to properly save - the address labels displayed. Updated this to use the function - e_card_name_from_string instead of doing it by hand. - - * contact-editor/fullname-strings.h, - contact-editor/fullname.glade: Deleted an unused field. Changed - the set of prefixes and suffixes. - -2000-04-30 Chris Toshok - - * backend/pas/pas-backend-ldap.c - (pas_backend_ldap_ensure_connected): add support for a rootdn in - the uri. - (pas_backend_ldap_build_all_cards_list): make use of the rootdn in - the call to ldap_search_s. - (pas_backend_ldap_search): same. - (pas_backend_ldap_load_uri): get the rootdn out of the passed in uri. - -2000-04-29 Christopher James Lahey - - * backend/ebook/e-card.c, backend/ebook/e-card.h: Added - e_card_phone_new e_card_delivery_address_new, - e_card_delivery_address_to_string, e_card_name_copy, - e_card_name_new, e_card_name_to_string, and made e_card_name_free - public. Removed some unused code. - - * backend/pas/pas-backend-file.c: Fixed a warning. - - * contact-editor/Makefile.am: Added e-contact-editor-fullname.[ch] - and fullname.glade. Added e-name libs and includes. - - * contact-editor/e-contact-editor-fullname.c, - contact-editor/e-contact-editor-fullname.h, - contact-editor/fullname-strings.h, contact-editor/fullname.glade: - New dialog for editing the fields of a name separately. - - * contact-editor/e-contact-editor.c, - contact-editor/e-contact-editor.h: Create an - EContactEditorFullname when you click on the Full Name button. - Maintain a parsed name at all times. - - * gui/component/Makefile.am, gui/minicard/Makefile.am: Added - e-name libs. - -2000-04-28 Larry Ewing - - * backend/pas/pas-book-factory.c (register_factory): fix the - `USING_OAF' changes so that they work for when we are not using - oaf. - -2000-04-27 Ettore Perazzoli - - * ename/Makefile.am - (gnome_libs): Use `BONOBO_GNOME_LIBS'. - (INCLUDES): Add `-I$(srcdir)/..'. - - * backend/pas/pas-book-factory.c - (register_factory): New function to register the factory. - Implementation different according to `USING_OAF'. - (pas_book_factory_activate): Use `register_factory()'. - - * gui/component/addressbook.c: New #define `CONTROL_FACTORY_ID', - varying depending on whether we are `USING_OAF'. - (addressbook_factory_init): Use `CONTROL_FACTORY_ID'. - - * backend/ebook/test-client.c (init_corba): New function, - implemented differently according to the `USING_OAF' #define. - - * backend/ebook/e-book.c: New #define `CARDSERVER_OAF_ID'. - (e_book_construct): Work with OAF #if `USING_OAF'. - - * backend/ebook/Makefile.am (gnome_libs): Removed. - (corbadir): Removed. - (ebook_libs): Removed. - (test_client_LDADD): Just add `libebook.la'. - (test_card_LDADD): Likewise. - (test_client_list_LDADD): Likewise. - - * gui/component/addressbook-factory.c - (init_corba): New helper function, implemented differently - according to `USING_OAF'. - (main): Call `init_corba()'. - -2000-04-27 Christopher James Lahey - - * backend/ebook/e-card.c, backend/ebook/e-card.h: Added file as, - office, manager, assistant, spouse, and anniversary fields. These - all use "X-EVOLUTION-" fields in the VCards. - - * backend/pas/pas-backend-file.c: Added all the new fields (except - anniversary) to the list of fields. - - * contact-editor/contact-editor.glade, - contact-editor/e-contact-editor-strings.h: Fixed some misnamed - fields and fixed the placement of the comments field. - - * contact-editor/e-contact-editor.c: Made the newly added fields - display properly. - - * Makefile.am: Added ename. - - * ename/e-name-western.h, ename/test-ename-western-gtk.c, - ename/test-ename-western.c: Fixed up some #includes. - - * ename/.cvsignore: Added .cvsignore. - -2000-04-26 Christopher James Lahey - - * backend/ebook/e-card-types.h, backend/ebook/e-card.c, - backend/ebook/e-card.h: Added an address label field. - - * contact-editor/contact-editor.glade, - contact-editor/e-contact-editor-strings.h: Got rid of some unused - fields. - - * contact-editor/e-contact-editor.c, - contact-editor/e-contact-editor.h: Added the address label field. - Load only. Editing these fields seems to mess things up. - -2000-04-26 Christopher James Lahey - - * contact-editor/e-contact-editor.c: Added proper handling of the - email field. - -2000-04-26 Christopher James Lahey - - * backend/ebook/e-card-types.h, backend/ebook/e-card.c, - gui/minicard/e-minicard.c: Prefixed the ADDR_ flags. - - * contact-editor/contact-editor.glade, - contact-editor/e-contact-editor-strings.h: Edited the glade file. - Removed all the fields that we don't use. - - * contact-editor/e-contact-editor.c, - contact-editor/e-contact-editor.h: Made the phone fields work - properly. The address and email fields are temporarily turned off - until they can be made to work as the phone fields do. - -2000-04-25 Ettore Perazzoli - - * gui/minicard/Makefile.am (INCLUDES): Use - `$(BONOBO_GNOME_CFLAGS)'. - - * backend/pas/Makefile.am (idl_flags): Add `-I $(datadir)/idl' to - pick up IDL files in the installation prefix as well. - (INCLUDES): Use `$(BONOBO_GNOME_CFLAGS)'. - - * backend/ebook/Makefile.am (ORBIT_IDL): Use `-I $(datadir)/idl' - to get the IDLs from the installation prefix as well. - (INCLUDES): Add `$(BONOBO_GNOME_CFLAGS)'. - (test_client_LDADD): Use `$(BONOBO_GNOME_LIBS)' instead of - hardcoding `-lbonobo'! Also get rid of some other useless flags, - as `$(BONOBO_GNOME_LIBS)' really has all what we need. - (test_client_list_LDADD): Likewise. - (test_card_LDADD): Likewise. - -2000-04-18 Federico Mena Quintero - - * gui/minicard/Makefile.am (INCLUDES): Use "e-minicard" as the log - domain. - - * gui/component/Makefile.am (INCLUDES): Use - "evolution-addressbook" as the log domain. - - * backend/pas/Makefile.am: Build libpas.a, not a shared library. - Do not install any header files. - (INCLUDES): Remove spurious include paths. - - * backend/pas/*.[ch]: Fix includes. - - * backend/ebook/Makefile.am: Do not install the test programs. - Fixed some include weirdness. - - * backend/ebook/*.[ch]: Fix includes. - - * contact-editor/Makefile.am (INCLUDES): Set the log domain to - "contact-editor". - (INCLUDES): Fix. - - * contact-editor/*.[ch]: Fix includes. - - * gui/minicard/*.[ch]: Fix includes. - - * ChangeLog: Started a ChangeLog here. diff --git a/addressbook/Makefile.am b/addressbook/Makefile.am deleted file mode 100644 index 4ff2b4a114..0000000000 --- a/addressbook/Makefile.am +++ /dev/null @@ -1,2 +0,0 @@ -SUBDIRS = \ - ename backend contact-editor printing gui diff --git a/addressbook/backend/.cvsignore b/addressbook/backend/.cvsignore deleted file mode 100644 index 09980ae6ba..0000000000 --- a/addressbook/backend/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -.deps -.libs -Makefile -Makefile.in -*.lo -*.la diff --git a/addressbook/backend/Makefile.am b/addressbook/backend/Makefile.am deleted file mode 100644 index b2807b2480..0000000000 --- a/addressbook/backend/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS = idl ebook pas diff --git a/addressbook/backend/ebook/.cvsignore b/addressbook/backend/ebook/.cvsignore deleted file mode 100644 index c0341fbdce..0000000000 --- a/addressbook/backend/ebook/.cvsignore +++ /dev/null @@ -1,15 +0,0 @@ -.deps -.libs -.pure -Makefile -Makefile.in -*.lo -*.la -addressbook-stubs.c -addressbook-skels.c -addressbook-common.c -addressbook.h -test-card -test-client -test-client-list -load-pine-addressbook diff --git a/addressbook/backend/ebook/Makefile.am b/addressbook/backend/ebook/Makefile.am deleted file mode 100644 index c0ab395564..0000000000 --- a/addressbook/backend/ebook/Makefile.am +++ /dev/null @@ -1,102 +0,0 @@ -noinst_PROGRAMS = test-card test-client test-client-list load-pine-addressbook - -CORBA_SOURCE = \ - addressbook.h \ - addressbook-common.c \ - addressbook-stubs.c \ - addressbook-skels.c - -idls = \ - $(srcdir)/../idl/addressbook.idl - -idl_flags = `$(GNOME_CONFIG) --cflags idl` -I $(datadir)/idl - -$(CORBA_SOURCE): $(idls) - $(ORBIT_IDL) $(srcdir)/../idl/addressbook.idl $(idl_flags) - -INCLUDES = \ - -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \ - -DG_LOG_DOMAIN=\"EBook\" \ - -I$(top_srcdir) \ - -I$(top_srcdir)/addressbook/backend \ - -I$(top_srcdir)/addressbook/ename \ - -I$(top_builddir)/addressbook/backend \ - -I$(top_builddir)/addressbook/ename \ - $(BONOBO_GNOME_CFLAGS) - -lib_LTLIBRARIES = libebook.la - -libebook_la_SOURCES = \ - $(CORBA_SOURCE) \ - e-book-listener.c \ - e-book-view-listener.c \ - e-book-view.c \ - e-book.c \ - e-card-cursor.c \ - e-card-iterator.c \ - e-card-list-iterator.c \ - e-card-list.c \ - e-card-simple.c \ - e-card.c - -libebookincludedir = $(includedir)/evolution/ebook - -libebookinclude_HEADERS = \ - e-book-listener.h \ - e-book-types.h \ - e-book-view-listener.h \ - e-book-view.h \ - e-book.h \ - e-card-cursor.h \ - e-card-iterator.h \ - e-card-list-iterator.h \ - e-card-list.h \ - e-card-pairs.h \ - e-card-simple.h \ - e-card-types.h \ - e-card.h - -test_client_SOURCES = \ - test-client.c - -test_client_LDADD = \ - libebook.la \ - $(BONOBO_GNOME_LIBS) \ - $(top_builddir)/libversit/libversit.la \ - $(top_builddir)/addressbook/ename/libename.la \ - $(top_builddir)/e-util/libeutil.la - -test_client_list_SOURCES = \ - test-client-list.c - -test_client_list_LDADD = \ - libebook.la \ - $(BONOBO_GNOME_LIBS) \ - $(top_builddir)/addressbook/ename/libename.la \ - $(top_builddir)/libversit/libversit.la \ - $(top_builddir)/e-util/libeutil.la - -test_card_SOURCES = \ - test-card.c - -test_card_LDADD = \ - libebook.la \ - $(BONOBO_GNOME_LIBS) \ - $(top_builddir)/addressbook/ename/libename.la \ - $(top_builddir)/libversit/libversit.la \ - $(top_builddir)/e-util/libeutil.la - - -load_pine_addressbook_SOURCES = \ - load-pine-addressbook.c - -load_pine_addressbook_LDADD = \ - libebook.la \ - $(BONOBO_GNOME_LIBS) \ - $(top_builddir)/addressbook/ename/libename.la \ - $(top_builddir)/libversit/libversit.la \ - $(top_builddir)/e-util/libeutil.la - - -BUILT_SOURCES = $(CORBA_SOURCE) -CLEANFILES += $(BUILT_SOURCES) diff --git a/addressbook/backend/ebook/TODO b/addressbook/backend/ebook/TODO deleted file mode 100644 index a69703cd92..0000000000 --- a/addressbook/backend/ebook/TODO +++ /dev/null @@ -1,2 +0,0 @@ -* Make sure open_book_progress does not use the EBook op queue; make - sure it works. diff --git a/addressbook/backend/ebook/e-book-listener.c b/addressbook/backend/ebook/e-book-listener.c deleted file mode 100644 index 5efdaa37df..0000000000 --- a/addressbook/backend/ebook/e-book-listener.c +++ /dev/null @@ -1,587 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * Exports the BookListener interface. Maintains a queue of messages - * which come in on the interface. - * - * Author: - * Nat Friedman (nat@helixcode.com) - * - * Copyright 2000, Helix Code, Inc. - */ - -#include -#include -#include "e-book-listener.h" - -static EBookStatus e_book_listener_convert_status (Evolution_BookListener_CallStatus status); - -enum { - RESPONSES_QUEUED, - LAST_SIGNAL -}; - -static guint e_book_listener_signals [LAST_SIGNAL]; - -static BonoboObjectClass *e_book_listener_parent_class; -POA_Evolution_BookListener__vepv e_book_listener_vepv; - -struct _EBookListenerPrivate { - GList *response_queue; - gint idle_id; -}; - -static gboolean -e_book_listener_check_queue (EBookListener *listener) -{ - if (listener->priv->response_queue != NULL) { - gtk_signal_emit (GTK_OBJECT (listener), - e_book_listener_signals [RESPONSES_QUEUED]); - } - - if (listener->priv->response_queue == NULL) { - listener->priv->idle_id = 0; - return FALSE; - } - - return TRUE; -} - -static void -e_book_listener_queue_response (EBookListener *listener, - EBookListenerResponse *response) -{ - listener->priv->response_queue = - g_list_append (listener->priv->response_queue, - response); - - if (listener->priv->idle_id == 0) { - listener->priv->idle_id = g_idle_add ( - (GSourceFunc) e_book_listener_check_queue, listener); - } -} - -/* Add, Remove, Modify */ -static void -e_book_listener_queue_generic_response (EBookListener *listener, - EBookListenerOperation op, - EBookStatus status) -{ - EBookListenerResponse *resp; - - resp = g_new0 (EBookListenerResponse, 1); - - resp->op = op; - resp->status = status; - - e_book_listener_queue_response (listener, resp); -} - -static void -e_book_listener_queue_open_response (EBookListener *listener, - EBookStatus status, - Evolution_Book book) -{ - EBookListenerResponse *resp; - - resp = g_new0 (EBookListenerResponse, 1); - - resp->op = OpenBookResponse; - resp->status = status; - resp->book = book; - - e_book_listener_queue_response (listener, resp); -} - -static void -e_book_listener_queue_open_progress (EBookListener *listener, - const char *msg, - short percent) -{ - EBookListenerResponse *resp; - - resp = g_new0 (EBookListenerResponse, 1); - - resp->op = OpenProgressEvent; - resp->msg = g_strdup (msg); - resp->percent = percent; - - e_book_listener_queue_response (listener, resp); -} - - -static void -e_book_listener_queue_create_card_response (EBookListener *listener, - EBookStatus status, - const char *id) -{ - EBookListenerResponse *resp; - - resp = g_new0 (EBookListenerResponse, 1); - - resp->op = CreateCardResponse; - resp->status = status; - resp->id = g_strdup (id); - - e_book_listener_queue_response (listener, resp); -} - -static void -e_book_listener_queue_get_cursor_response (EBookListener *listener, - EBookStatus status, - Evolution_CardCursor cursor) -{ - EBookListenerResponse *resp; - - resp = g_new0 (EBookListenerResponse, 1); - - resp->op = GetCursorResponse; - resp->status = status; - resp->cursor = cursor; - - e_book_listener_queue_response (listener, resp); -} - -static void -e_book_listener_queue_get_view_response (EBookListener *listener, - EBookStatus status, - Evolution_BookView book_view) -{ - EBookListenerResponse *resp; - - resp = g_new0 (EBookListenerResponse, 1); - - resp->op = GetBookViewResponse; - resp->status = status; - resp->book_view = book_view; - - e_book_listener_queue_response (listener, resp); -} - -static void -e_book_listener_queue_link_status (EBookListener *listener, - gboolean connected) -{ - EBookListenerResponse *resp; - - resp = g_new0 (EBookListenerResponse, 1); - - resp->op = LinkStatusEvent; - resp->connected = connected; - - e_book_listener_queue_response (listener, resp); -} - -static void -impl_BookListener_respond_create_card (PortableServer_Servant servant, - const Evolution_BookListener_CallStatus status, - const Evolution_CardId id, - CORBA_Environment *ev) -{ - EBookListener *listener = E_BOOK_LISTENER (bonobo_object_from_servant (servant)); - - e_book_listener_queue_create_card_response ( - listener, - e_book_listener_convert_status (status), - id); -} - -static void -impl_BookListener_respond_remove_card (PortableServer_Servant servant, - const Evolution_BookListener_CallStatus status, - CORBA_Environment *ev) -{ - EBookListener *listener = E_BOOK_LISTENER (bonobo_object_from_servant (servant)); - - e_book_listener_queue_generic_response ( - listener, RemoveCardResponse, - e_book_listener_convert_status (status)); -} - -static void -impl_BookListener_respond_modify_card (PortableServer_Servant servant, - const Evolution_BookListener_CallStatus status, - CORBA_Environment *ev) -{ - EBookListener *listener = E_BOOK_LISTENER (bonobo_object_from_servant (servant)); - - e_book_listener_queue_generic_response ( - listener, ModifyCardResponse, - e_book_listener_convert_status (status)); -} - -static void -impl_BookListener_respond_get_cursor (PortableServer_Servant servant, - const Evolution_BookListener_CallStatus status, - const Evolution_CardCursor cursor, - CORBA_Environment *ev) -{ - EBookListener *listener = E_BOOK_LISTENER (bonobo_object_from_servant (servant)); - Evolution_CardCursor cursor_copy; - - cursor_copy = CORBA_Object_duplicate (cursor, ev); - - if (ev->_major != CORBA_NO_EXCEPTION) { - g_warning ("EBookListener: Exception while duplicating CardCursor!\n"); - return; - } - - e_book_listener_queue_get_cursor_response ( - listener, - e_book_listener_convert_status (status), - cursor_copy); -} - -static void -impl_BookListener_respond_get_view (PortableServer_Servant servant, - const Evolution_BookListener_CallStatus status, - const Evolution_BookView book_view, - CORBA_Environment *ev) -{ - EBookListener *listener = E_BOOK_LISTENER (bonobo_object_from_servant (servant)); - Evolution_BookView book_view_copy; - - book_view_copy = CORBA_Object_duplicate (book_view, ev); - - if (ev->_major != CORBA_NO_EXCEPTION) { - g_warning ("EBookListener: Exception while duplicating BookView.\n"); - return; - } - - e_book_listener_queue_get_view_response ( - listener, - e_book_listener_convert_status (status), - book_view_copy); -} - -static void -impl_BookListener_respond_open_book (PortableServer_Servant servant, - const Evolution_BookListener_CallStatus status, - const Evolution_Book book, - CORBA_Environment *ev) -{ - EBookListener *listener = E_BOOK_LISTENER (bonobo_object_from_servant (servant)); - Evolution_Book book_copy; - - book_copy = CORBA_Object_duplicate (book, ev); - - if (ev->_major != CORBA_NO_EXCEPTION) { - g_warning ("EBookListener: Exception while duplicating Book!\n"); - return; - } - - e_book_listener_queue_open_response ( - listener, - e_book_listener_convert_status (status), - book_copy); -} - -static void -impl_BookListener_report_open_book_progress (PortableServer_Servant servant, - const CORBA_char *status_message, - const CORBA_short percent, - CORBA_Environment *ev) -{ - EBookListener *listener = E_BOOK_LISTENER (bonobo_object_from_servant (servant)); - - e_book_listener_queue_open_progress ( - listener, status_message, percent); -} - -static void -impl_BookListener_report_connection_status (PortableServer_Servant servant, - const CORBA_boolean connected, - CORBA_Environment *ev) -{ - EBookListener *listener = E_BOOK_LISTENER (bonobo_object_from_servant (servant)); - - e_book_listener_queue_link_status ( - listener, connected); -} - -/** - * e_book_listener_check_pending: - * @listener: the #EBookListener - * - * Returns: the number of items on the response queue, - * or -1 if the @listener is isn't an #EBookListener. - */ -int -e_book_listener_check_pending (EBookListener *listener) -{ - g_return_val_if_fail (listener != NULL, -1); - g_return_val_if_fail (E_IS_BOOK_LISTENER (listener), -1); - - return g_list_length (listener->priv->response_queue); -} - -/** - * e_book_listener_pop_response: - * @listener: the #EBookListener for which a request is to be popped - * - * Returns: an #EBookListenerResponse if there are responses on the - * queue to be returned; %NULL if there aren't, or if the @listener - * isn't an EBookListener. - */ -EBookListenerResponse * -e_book_listener_pop_response (EBookListener *listener) -{ - EBookListenerResponse *resp; - GList *popped; - - g_return_val_if_fail (listener != NULL, NULL); - g_return_val_if_fail (E_IS_BOOK_LISTENER (listener), NULL); - - if (listener->priv->response_queue == NULL) - return NULL; - - resp = listener->priv->response_queue->data; - - popped = listener->priv->response_queue; - listener->priv->response_queue = - g_list_remove_link (listener->priv->response_queue, - listener->priv->response_queue); - g_list_free_1 (popped); - - return resp; -} - -static EBookStatus -e_book_listener_convert_status (const Evolution_BookListener_CallStatus status) -{ - switch (status) { - case Evolution_BookListener_Success: - return E_BOOK_STATUS_SUCCESS; - case Evolution_BookListener_RepositoryOffline: - return E_BOOK_STATUS_REPOSITORY_OFFLINE; - case Evolution_BookListener_PermissionDenied: - return E_BOOK_STATUS_PERMISSION_DENIED; - case Evolution_BookListener_CardNotFound: - return E_BOOK_STATUS_CARD_NOT_FOUND; - case Evolution_BookListener_ProtocolNotSupported: - return E_BOOK_STATUS_PROTOCOL_NOT_SUPPORTED; - case Evolution_BookListener_OtherError: - return E_BOOK_STATUS_OTHER_ERROR; - default: - g_warning ("e_book_listener_convert_status: Unknown status " - "from card server: %d\n", (int) status); - return E_BOOK_STATUS_UNKNOWN; - - } -} - -static EBookListener * -e_book_listener_construct (EBookListener *listener) -{ - POA_Evolution_BookListener *servant; - CORBA_Environment ev; - CORBA_Object obj; - - g_assert (listener != NULL); - g_assert (E_IS_BOOK_LISTENER (listener)); - - servant = (POA_Evolution_BookListener *) g_new0 (BonoboObjectServant, 1); - servant->vepv = &e_book_listener_vepv; - - CORBA_exception_init (&ev); - - POA_Evolution_BookListener__init ((PortableServer_Servant) servant, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_free (servant); - CORBA_exception_free (&ev); - - return NULL; - } - - CORBA_exception_free (&ev); - - obj = bonobo_object_activate_servant (BONOBO_OBJECT (listener), servant); - if (obj == CORBA_OBJECT_NIL) { - g_free (servant); - - return NULL; - } - - bonobo_object_construct (BONOBO_OBJECT (listener), obj); - - return listener; -} - -/** - * e_book_listener_new: - * @book: the #EBook for which the listener is to be bound - * - * Creates and returns a new #EBookListener for the book. - * - * Returns: a new #EBookListener - */ -EBookListener * -e_book_listener_new () -{ - EBookListener *listener; - EBookListener *retval; - - listener = gtk_type_new (E_BOOK_LISTENER_TYPE); - - retval = e_book_listener_construct (listener); - - if (retval == NULL) { - g_warning ("e_book_listener_new: Error constructing " - "EBookListener!\n"); - gtk_object_unref (GTK_OBJECT (listener)); - return NULL; - } - - return retval; -} - -static void -e_book_listener_init (EBookListener *listener) -{ - listener->priv = g_new0 (EBookListenerPrivate, 1); -} - -static void -e_book_listener_destroy (GtkObject *object) -{ - EBookListener *listener = E_BOOK_LISTENER (object); - GList *l; - - for (l = listener->priv->response_queue; l != NULL; l = l->next) { - EBookListenerResponse *resp = l->data; - - g_free (resp->msg); - g_free (resp->id); - - if (resp->book != CORBA_OBJECT_NIL) { - CORBA_Environment ev; - - CORBA_exception_init (&ev); - - CORBA_Object_release (resp->book, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("e_book_listener_destroy: " - "Exception destroying book " - "in response queue!\n"); - } - - CORBA_exception_free (&ev); - } - - if (resp->cursor != CORBA_OBJECT_NIL) { - CORBA_Environment ev; - - CORBA_exception_init (&ev); - - CORBA_Object_release (resp->cursor, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("e_book_listener_destroy: " - "Exception destroying cursor " - "in response queue!\n"); - } - - CORBA_exception_free (&ev); - } - - if (resp->book_view != CORBA_OBJECT_NIL) { - CORBA_Environment ev; - - CORBA_exception_init (&ev); - - CORBA_Object_release (resp->book_view, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("e_book_listener_destroy: " - "Exception destroying book_view " - "in response queue!\n"); - } - - CORBA_exception_free (&ev); - } - - g_free (resp); - } - g_list_free (listener->priv->response_queue); - - g_free (listener->priv); - - GTK_OBJECT_CLASS (e_book_listener_parent_class)->destroy (object); -} - -POA_Evolution_BookListener__epv * -e_book_listener_get_epv (void) -{ - POA_Evolution_BookListener__epv *epv; - - epv = g_new0 (POA_Evolution_BookListener__epv, 1); - - epv->report_open_book_progress = impl_BookListener_report_open_book_progress; - epv->respond_open_book = impl_BookListener_respond_open_book; - - epv->respond_create_card = impl_BookListener_respond_create_card; - epv->respond_remove_card = impl_BookListener_respond_remove_card; - epv->respond_modify_card = impl_BookListener_respond_modify_card; - - epv->respond_get_cursor = impl_BookListener_respond_get_cursor; - epv->respond_get_view = impl_BookListener_respond_get_view; - - epv->report_connection_status = impl_BookListener_report_connection_status; - - return epv; -} - -static void -e_book_listener_corba_class_init (void) -{ - e_book_listener_vepv.Bonobo_Unknown_epv = bonobo_object_get_epv (); - e_book_listener_vepv.Evolution_BookListener_epv = e_book_listener_get_epv (); -} - -static void -e_book_listener_class_init (EBookListenerClass *klass) -{ - GtkObjectClass *object_class = (GtkObjectClass *) klass; - - e_book_listener_parent_class = gtk_type_class (bonobo_object_get_type ()); - - e_book_listener_signals [RESPONSES_QUEUED] = - gtk_signal_new ("responses_queued", - GTK_RUN_LAST, - object_class->type, - GTK_SIGNAL_OFFSET (EBookListenerClass, responses_queued), - gtk_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); - - gtk_object_class_add_signals (object_class, e_book_listener_signals, LAST_SIGNAL); - - object_class->destroy = e_book_listener_destroy; - - e_book_listener_corba_class_init (); -} - -/** - * e_book_listener_get_type: - */ -GtkType -e_book_listener_get_type (void) -{ - static GtkType type = 0; - - if (! type) { - GtkTypeInfo info = { - "EBookListener", - sizeof (EBookListener), - sizeof (EBookListenerClass), - (GtkClassInitFunc) e_book_listener_class_init, - (GtkObjectInitFunc) e_book_listener_init, - NULL, /* reserved 1 */ - NULL, /* reserved 2 */ - (GtkClassInitFunc) NULL - }; - - type = gtk_type_unique (bonobo_object_get_type (), &info); - } - - return type; -} diff --git a/addressbook/backend/ebook/e-book-listener.h b/addressbook/backend/ebook/e-book-listener.h deleted file mode 100644 index eb0432e360..0000000000 --- a/addressbook/backend/ebook/e-book-listener.h +++ /dev/null @@ -1,95 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * A client-side GtkObject which exposes the - * Evolution:BookListener interface. - * - * Author: - * Nat Friedman (nat@helixcode.com) - * - * Copyright 2000, Helix Code, Inc. - */ - -#ifndef __E_BOOK_LISTENER_H__ -#define __E_BOOK_LISTENER_H__ - -#include -#include -#include -#include - -BEGIN_GNOME_DECLS - -typedef struct _EBookListener EBookListener; -typedef struct _EBookListenerClass EBookListenerClass; -typedef struct _EBookListenerPrivate EBookListenerPrivate; - -struct _EBookListener { - BonoboObject parent; - EBookListenerPrivate *priv; -}; - -struct _EBookListenerClass { - BonoboObjectClass parent; - - /* - * Signals - */ - void (*responses_queued) (void); -}; - -typedef enum { - /* Async responses */ - OpenBookResponse, - CreateCardResponse, - RemoveCardResponse, - ModifyCardResponse, - GetCursorResponse, - GetBookViewResponse, - - /* Async events */ - LinkStatusEvent, - OpenProgressEvent, -} EBookListenerOperation; - -typedef struct { - EBookListenerOperation op; - - /* For most Response notifications */ - EBookStatus status; - - /* For OpenBookResponse */ - Evolution_Book book; - - /* For GetCursorResponse */ - Evolution_CardCursor cursor; - - /* For GetBookViewReponse */ - Evolution_BookView book_view; - - /* For OpenProgressEvent */ - char *msg; - short percent; - - /* For LinkStatusEvent */ - gboolean connected; - - /* For Card[Added|Removed|Modified]Event */ - char *id; -} EBookListenerResponse; - -EBookListener *e_book_listener_new (void); -int e_book_listener_check_pending (EBookListener *listener); -EBookListenerResponse *e_book_listener_pop_response (EBookListener *listener); -GtkType e_book_listener_get_type (void); - -POA_Evolution_BookListener__epv *e_book_listener_get_epv (void); - -#define E_BOOK_LISTENER_TYPE (e_book_listener_get_type ()) -#define E_BOOK_LISTENER(o) (GTK_CHECK_CAST ((o), E_BOOK_LISTENER_TYPE, EBookListener)) -#define E_BOOK_LISTENER_CLASS(k) (GTK_CHECK_CLASS_CAST((k), E_BOOK_LISTENER_TYPE, EBookListenerClass)) -#define E_IS_BOOK_LISTENER(o) (GTK_CHECK_TYPE ((o), E_BOOK_LISTENER_TYPE)) -#define E_IS_BOOK_LISTENER_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_BOOK_LISTENER_TYPE)) - -END_GNOME_DECLS - -#endif /* ! __E_BOOK_LISTENER_H__ */ diff --git a/addressbook/backend/ebook/e-book-types.h b/addressbook/backend/ebook/e-book-types.h deleted file mode 100644 index a3e8bbc032..0000000000 --- a/addressbook/backend/ebook/e-book-types.h +++ /dev/null @@ -1,31 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * A client-side GtkObject which exposes the - * Evolution:BookListener interface. - * - * Author: - * Nat Friedman (nat@helixcode.com) - * - * Copyright 2000, Helix Code, Inc. - */ - -#ifndef __E_BOOK_TYPES_H__ -#define __E_BOOK_TYPES_H__ - -#include - -BEGIN_GNOME_DECLS - -typedef enum { - E_BOOK_STATUS_SUCCESS, - E_BOOK_STATUS_UNKNOWN, - E_BOOK_STATUS_REPOSITORY_OFFLINE, - E_BOOK_STATUS_PERMISSION_DENIED, - E_BOOK_STATUS_CARD_NOT_FOUND, - E_BOOK_STATUS_PROTOCOL_NOT_SUPPORTED, - E_BOOK_STATUS_OTHER_ERROR -} EBookStatus; - -END_GNOME_DECLS - -#endif /* ! __E_BOOK_TYPES_H__ */ diff --git a/addressbook/backend/ebook/e-book-view-listener.c b/addressbook/backend/ebook/e-book-view-listener.c deleted file mode 100644 index c84bf160c5..0000000000 --- a/addressbook/backend/ebook/e-book-view-listener.c +++ /dev/null @@ -1,345 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * Exports the BookViewListener interface. Maintains a queue of messages - * which come in on the interface. - * - * Author: - * Nat Friedman (nat@helixcode.com) - * - * Copyright 2000, Helix Code, Inc. - */ - -#include -#include -#include "e-book-view-listener.h" -#include "e-book-view.h" -#include "e-card.h" - -enum { - RESPONSES_QUEUED, - LAST_SIGNAL -}; - -static guint e_book_view_listener_signals [LAST_SIGNAL]; - -static BonoboObjectClass *e_book_view_listener_parent_class; -POA_Evolution_BookViewListener__vepv e_book_view_listener_vepv; - -struct _EBookViewListenerPrivate { - GList *response_queue; - gint idle_id; -}; - -static gboolean -e_book_view_listener_check_queue (EBookViewListener *listener) -{ - if (listener->priv->response_queue != NULL) { - gtk_signal_emit (GTK_OBJECT (listener), - e_book_view_listener_signals [RESPONSES_QUEUED]); - } - - if (listener->priv->response_queue == NULL) { - listener->priv->idle_id = 0; - return FALSE; - } - - return TRUE; -} - -static void -e_book_view_listener_queue_response (EBookViewListener *listener, - EBookViewListenerResponse *response) -{ - listener->priv->response_queue = - g_list_append (listener->priv->response_queue, - response); - - if (listener->priv->idle_id == 0) { - listener->priv->idle_id = g_idle_add ( - (GSourceFunc) e_book_view_listener_check_queue, listener); - } -} - -/* Add, Remove, Modify */ -static void -e_book_view_listener_queue_id_event (EBookViewListener *listener, - EBookViewListenerOperation op, - const char *id) -{ - EBookViewListenerResponse *resp; - - resp = g_new0 (EBookViewListenerResponse, 1); - - resp->op = op; - resp->id = g_strdup (id); - resp->cards = NULL; - - e_book_view_listener_queue_response (listener, resp); -} - -/* Add, Remove, Modify */ -static void -e_book_view_listener_queue_sequence_event (EBookViewListener *listener, - EBookViewListenerOperation op, - const Evolution_VCardList *cards) -{ - EBookViewListenerResponse *resp; - int i; - - resp = g_new0 (EBookViewListenerResponse, 1); - - resp->op = op; - resp->id = NULL; - resp->cards = NULL; - - for ( i = 0; i < cards->_length; i++ ) { - resp->cards = g_list_append(resp->cards, e_card_new(cards->_buffer[i])); - } - - e_book_view_listener_queue_response (listener, resp); -} - -static void -impl_BookViewListener_signal_card_added (PortableServer_Servant servant, - const Evolution_VCardList *cards, - CORBA_Environment *ev) -{ - EBookViewListener *listener = E_BOOK_VIEW_LISTENER (bonobo_object_from_servant (servant)); - - e_book_view_listener_queue_sequence_event ( - listener, CardAddedEvent, cards); -} - -static void -impl_BookViewListener_signal_card_removed (PortableServer_Servant servant, - const Evolution_CardId id, - CORBA_Environment *ev) -{ - EBookViewListener *listener = E_BOOK_VIEW_LISTENER (bonobo_object_from_servant (servant)); - - e_book_view_listener_queue_id_event ( - listener, CardRemovedEvent, (const char *) id); -} - -static void -impl_BookViewListener_signal_card_changed (PortableServer_Servant servant, - const Evolution_VCardList *cards, - CORBA_Environment *ev) -{ - EBookViewListener *listener = E_BOOK_VIEW_LISTENER (bonobo_object_from_servant (servant)); - - e_book_view_listener_queue_sequence_event ( - listener, CardModifiedEvent, cards); -} - -/** - * e_book_view_listener_check_pending: - * @listener: the #EBookViewListener - * - * Returns: the number of items on the response queue, - * or -1 if the @listener is isn't an #EBookViewListener. - */ -int -e_book_view_listener_check_pending (EBookViewListener *listener) -{ - g_return_val_if_fail (listener != NULL, -1); - g_return_val_if_fail (E_IS_BOOK_VIEW_LISTENER (listener), -1); - - return g_list_length (listener->priv->response_queue); -} - -/** - * e_book_view_listener_pop_response: - * @listener: the #EBookViewListener for which a request is to be popped - * - * Returns: an #EBookViewListenerResponse if there are responses on the - * queue to be returned; %NULL if there aren't, or if the @listener - * isn't an EBookViewListener. - */ -EBookViewListenerResponse * -e_book_view_listener_pop_response (EBookViewListener *listener) -{ - EBookViewListenerResponse *resp; - GList *popped; - - g_return_val_if_fail (listener != NULL, NULL); - g_return_val_if_fail (E_IS_BOOK_VIEW_LISTENER (listener), NULL); - - if (listener->priv->response_queue == NULL) - return NULL; - - resp = listener->priv->response_queue->data; - - popped = listener->priv->response_queue; - listener->priv->response_queue = - g_list_remove_link (listener->priv->response_queue, - listener->priv->response_queue); - g_list_free_1 (popped); - - return resp; -} - -static EBookViewListener * -e_book_view_listener_construct (EBookViewListener *listener) -{ - POA_Evolution_BookViewListener *servant; - CORBA_Environment ev; - CORBA_Object obj; - - g_assert (listener != NULL); - g_assert (E_IS_BOOK_VIEW_LISTENER (listener)); - - servant = (POA_Evolution_BookViewListener *) g_new0 (BonoboObjectServant, 1); - servant->vepv = &e_book_view_listener_vepv; - - CORBA_exception_init (&ev); - - POA_Evolution_BookViewListener__init ((PortableServer_Servant) servant, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_free (servant); - CORBA_exception_free (&ev); - - return NULL; - } - - CORBA_exception_free (&ev); - - obj = bonobo_object_activate_servant (BONOBO_OBJECT (listener), servant); - if (obj == CORBA_OBJECT_NIL) { - g_free (servant); - - return NULL; - } - - bonobo_object_construct (BONOBO_OBJECT (listener), obj); - - return listener; -} - -/** - * e_book_view_listener_new: - * @book: the #EBookView for which the listener is to be bound - * - * Creates and returns a new #EBookViewListener for the book. - * - * Returns: a new #EBookViewListener - */ -EBookViewListener * -e_book_view_listener_new () -{ - EBookViewListener *listener; - EBookViewListener *retval; - - listener = gtk_type_new (E_BOOK_VIEW_LISTENER_TYPE); - - retval = e_book_view_listener_construct (listener); - - if (retval == NULL) { - g_warning ("e_book_view_listener_new: Error constructing " - "EBookViewListener!\n"); - gtk_object_unref (GTK_OBJECT (listener)); - return NULL; - } - - return retval; -} - -static void -e_book_view_listener_init (EBookViewListener *listener) -{ - listener->priv = g_new0 (EBookViewListenerPrivate, 1); - listener->priv->response_queue = NULL; - listener->priv->idle_id = 0; -} - -static void -e_book_view_listener_destroy (GtkObject *object) -{ - EBookViewListener *listener = E_BOOK_VIEW_LISTENER (object); - GList *l; - - for (l = listener->priv->response_queue; l != NULL; l = l->next) { - EBookViewListenerResponse *resp = l->data; - if (resp->id) - g_free(resp->id); - if (resp->cards) { - g_list_foreach(resp->cards, (GFunc) gtk_object_unref, NULL); - g_list_free(resp->cards); - } - g_free (resp); - } - g_list_free (listener->priv->response_queue); - - g_free (listener->priv); - - GTK_OBJECT_CLASS (e_book_view_listener_parent_class)->destroy (object); -} - -POA_Evolution_BookViewListener__epv * -e_book_view_listener_get_epv (void) -{ - POA_Evolution_BookViewListener__epv *epv; - - epv = g_new0 (POA_Evolution_BookViewListener__epv, 1); - - epv->signal_card_changed = impl_BookViewListener_signal_card_changed; - epv->signal_card_removed = impl_BookViewListener_signal_card_removed; - epv->signal_card_added = impl_BookViewListener_signal_card_added; - - return epv; -} - -static void -e_book_view_listener_corba_class_init (void) -{ - e_book_view_listener_vepv.Bonobo_Unknown_epv = bonobo_object_get_epv (); - e_book_view_listener_vepv.Evolution_BookViewListener_epv = e_book_view_listener_get_epv (); -} - -static void -e_book_view_listener_class_init (EBookViewListenerClass *klass) -{ - GtkObjectClass *object_class = (GtkObjectClass *) klass; - - e_book_view_listener_parent_class = gtk_type_class (bonobo_object_get_type ()); - - e_book_view_listener_signals [RESPONSES_QUEUED] = - gtk_signal_new ("responses_queued", - GTK_RUN_LAST, - object_class->type, - GTK_SIGNAL_OFFSET (EBookViewListenerClass, responses_queued), - gtk_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); - - gtk_object_class_add_signals (object_class, e_book_view_listener_signals, LAST_SIGNAL); - - object_class->destroy = e_book_view_listener_destroy; - - e_book_view_listener_corba_class_init (); -} - -/** - * e_book_view_listener_get_type: - */ -GtkType -e_book_view_listener_get_type (void) -{ - static GtkType type = 0; - - if (! type) { - GtkTypeInfo info = { - "EBookViewListener", - sizeof (EBookViewListener), - sizeof (EBookViewListenerClass), - (GtkClassInitFunc) e_book_view_listener_class_init, - (GtkObjectInitFunc) e_book_view_listener_init, - NULL, /* reserved 1 */ - NULL, /* reserved 2 */ - (GtkClassInitFunc) NULL - }; - - type = gtk_type_unique (bonobo_object_get_type (), &info); - } - - return type; -} diff --git a/addressbook/backend/ebook/e-book-view-listener.h b/addressbook/backend/ebook/e-book-view-listener.h deleted file mode 100644 index e479ffd99b..0000000000 --- a/addressbook/backend/ebook/e-book-view-listener.h +++ /dev/null @@ -1,72 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * A client-side GtkObject which exposes the - * Evolution:BookViewListener interface. - * - * Author: - * Nat Friedman (nat@helixcode.com) - * - * Copyright 2000, Helix Code, Inc. - */ - -#ifndef __E_BOOK_VIEW_LISTENER_H__ -#define __E_BOOK_VIEW_LISTENER_H__ - -#include -#include -#include - -BEGIN_GNOME_DECLS - -typedef struct _EBookViewListener EBookViewListener; -typedef struct _EBookViewListenerClass EBookViewListenerClass; -typedef struct _EBookViewListenerPrivate EBookViewListenerPrivate; - -struct _EBookViewListener { - BonoboObject parent; - EBookViewListenerPrivate *priv; -}; - -struct _EBookViewListenerClass { - BonoboObjectClass parent; - - /* - * Signals - */ - void (*responses_queued) (void); -}; - -typedef enum { - /* Async events */ - CardAddedEvent, - CardRemovedEvent, - CardModifiedEvent -} EBookViewListenerOperation; - -typedef struct { - EBookViewListenerOperation op; - - /* For CardRemovedEvent */ - char *id; - - /* For Card[Added|Modified]Event */ - GList *cards; /* Of type ECard. */ - -} EBookViewListenerResponse; - -EBookViewListener *e_book_view_listener_new (void); -int e_book_view_listener_check_pending (EBookViewListener *listener); -EBookViewListenerResponse *e_book_view_listener_pop_response (EBookViewListener *listener); -GtkType e_book_view_listener_get_type (void); - -POA_Evolution_BookViewListener__epv *e_book_view_listener_get_epv (void); - -#define E_BOOK_VIEW_LISTENER_TYPE (e_book_view_listener_get_type ()) -#define E_BOOK_VIEW_LISTENER(o) (GTK_CHECK_CAST ((o), E_BOOK_VIEW_LISTENER_TYPE, EBookViewListener)) -#define E_BOOK_VIEW_LISTENER_CLASS(k) (GTK_CHECK_CLASS_CAST((k), E_BOOK_VIEW_LISTENER_TYPE, EBookViewListenerClass)) -#define E_IS_BOOK_VIEW_LISTENER(o) (GTK_CHECK_TYPE ((o), E_BOOK_VIEW_LISTENER_TYPE)) -#define E_IS_BOOK_VIEW_LISTENER_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_BOOK_VIEW_LISTENER_TYPE)) - -END_GNOME_DECLS - -#endif /* ! __E_BOOK_VIEW_LISTENER_H__ */ diff --git a/addressbook/backend/ebook/e-book-view.c b/addressbook/backend/ebook/e-book-view.c deleted file mode 100644 index 65a90b8ede..0000000000 --- a/addressbook/backend/ebook/e-book-view.c +++ /dev/null @@ -1,281 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * The Evolution addressbook client object. - * - * Author: - * Nat Friedman (nat@helixcode.com) - * - * Copyright 1999, 2000, Helix Code, Inc. - */ - -#include -#include -#include - -#include "addressbook.h" -#include "e-card-cursor.h" -#include "e-book-view-listener.h" -#include "e-book-view.h" - -GtkObjectClass *e_book_view_parent_class; - -struct _EBookViewPrivate { - Evolution_BookView corba_book_view; - - EBookViewListener *listener; - - int responses_queued_id; -}; - -enum { - CARD_CHANGED, - CARD_REMOVED, - CARD_ADDED, - LAST_SIGNAL -}; - -static guint e_book_view_signals [LAST_SIGNAL]; - -static void -e_book_view_do_added_event (EBookView *book_view, - EBookViewListenerResponse *resp) -{ - gtk_signal_emit (GTK_OBJECT (book_view), e_book_view_signals [CARD_ADDED], - resp->cards); - - g_list_foreach (resp->cards, (GFunc) gtk_object_unref, NULL); - g_list_free (resp->cards); -} - -static void -e_book_view_do_modified_event (EBookView *book_view, - EBookViewListenerResponse *resp) -{ - gtk_signal_emit (GTK_OBJECT (book_view), e_book_view_signals [CARD_CHANGED], - resp->cards); - - g_list_foreach (resp->cards, (GFunc) gtk_object_unref, NULL); - g_list_free (resp->cards); -} - -static void -e_book_view_do_removed_event (EBookView *book_view, - EBookViewListenerResponse *resp) -{ - gtk_signal_emit (GTK_OBJECT (book_view), e_book_view_signals [CARD_REMOVED], - resp->id); - - g_free(resp->id); -} - - -/* - * Reading notices out of the EBookViewListener's queue. - */ -static void -e_book_view_check_listener_queue (EBookViewListener *listener, EBookView *book_view) -{ - EBookViewListenerResponse *resp; - - resp = e_book_view_listener_pop_response (listener); - - if (resp == NULL) - return; - - switch (resp->op) { - case CardAddedEvent: - e_book_view_do_added_event (book_view, resp); - break; - case CardModifiedEvent: - e_book_view_do_modified_event (book_view, resp); - break; - case CardRemovedEvent: - e_book_view_do_removed_event (book_view, resp); - break; - default: - g_error ("EBookView: Unknown operation %d in listener queue!\n", - resp->op); - } - - g_free (resp); -} - -static gboolean -e_book_view_construct (EBookView *book_view, Evolution_BookView corba_book_view, EBookViewListener *listener) -{ - CORBA_Environment ev; - g_return_val_if_fail (book_view != NULL, FALSE); - g_return_val_if_fail (E_IS_BOOK_VIEW (book_view), FALSE); - - /* - * Copy in the corba_book_view. - */ - CORBA_exception_init (&ev); - - book_view->priv->corba_book_view = CORBA_Object_duplicate(corba_book_view, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("e_book_view_construct: Exception duplicating corba_book_view.\n"); - CORBA_exception_free (&ev); - return FALSE; - } - - Evolution_BookView_ref(book_view->priv->corba_book_view, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("e_book_view_construct: Exception reffing corba_book_view.\n"); - CORBA_exception_free (&ev); - CORBA_exception_init (&ev); - CORBA_Object_release (book_view->priv->corba_book_view, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("e_book_view_construct: Exception releasing corba_book_view.\n"); - } - CORBA_exception_free (&ev); - book_view->priv->corba_book_view = NULL; - return FALSE; - } - - CORBA_exception_free (&ev); - - /* - * Create our local BookListener interface. - */ - book_view->priv->listener = listener; - - bonobo_object_ref(BONOBO_OBJECT(book_view->priv->listener)); - book_view->priv->responses_queued_id = gtk_signal_connect (GTK_OBJECT (book_view->priv->listener), "responses_queued", - e_book_view_check_listener_queue, book_view); - - return TRUE; -} - -/** - * e_book_view_new: - */ -EBookView * -e_book_view_new (Evolution_BookView corba_book_view, EBookViewListener *listener) -{ - EBookView *book_view; - - book_view = gtk_type_new (E_BOOK_VIEW_TYPE); - - if (! e_book_view_construct (book_view, corba_book_view, listener)) { - gtk_object_unref (GTK_OBJECT (book_view)); - return NULL; - } - - return book_view; -} - -static void -e_book_view_init (EBookView *book_view) -{ - book_view->priv = g_new0 (EBookViewPrivate, 1); - book_view->priv->corba_book_view = CORBA_OBJECT_NIL; - book_view->priv->listener = NULL; - book_view->priv->responses_queued_id = 0; -} - -static void -e_book_view_destroy (GtkObject *object) -{ - EBookView *book_view = E_BOOK_VIEW (object); - CORBA_Environment ev; - - if (book_view->priv->corba_book_view) { - CORBA_exception_init (&ev); - - Evolution_BookView_unref(book_view->priv->corba_book_view, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("EBookView: Exception while unreffing BookView\n"); - - CORBA_exception_free (&ev); - CORBA_exception_init (&ev); - } - - CORBA_Object_release (book_view->priv->corba_book_view, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("EBookView: Exception while releasing BookView\n"); - } - - CORBA_exception_free (&ev); - } - - if (book_view->priv->listener) { - if (book_view->priv->responses_queued_id) - gtk_signal_disconnect(GTK_OBJECT(book_view->priv->listener), - book_view->priv->responses_queued_id); - bonobo_object_unref (BONOBO_OBJECT(book_view->priv->listener)); - } - - g_free (book_view->priv); - - if (GTK_OBJECT_CLASS (e_book_view_parent_class)->destroy) - GTK_OBJECT_CLASS (e_book_view_parent_class)->destroy (object); -} - -static void -e_book_view_class_init (EBookViewClass *klass) -{ - GtkObjectClass *object_class = (GtkObjectClass *) klass; - - e_book_view_parent_class = gtk_type_class (gtk_object_get_type ()); - - e_book_view_signals [CARD_CHANGED] = - gtk_signal_new ("card_changed", - GTK_RUN_LAST, - object_class->type, - GTK_SIGNAL_OFFSET (EBookViewClass, card_changed), - gtk_marshal_NONE__POINTER, - GTK_TYPE_NONE, 1, - GTK_TYPE_POINTER); - - e_book_view_signals [CARD_ADDED] = - gtk_signal_new ("card_added", - GTK_RUN_LAST, - object_class->type, - GTK_SIGNAL_OFFSET (EBookViewClass, card_added), - gtk_marshal_NONE__STRING, - GTK_TYPE_NONE, 1, - GTK_TYPE_STRING); - - e_book_view_signals [CARD_REMOVED] = - gtk_signal_new ("card_removed", - GTK_RUN_LAST, - object_class->type, - GTK_SIGNAL_OFFSET (EBookViewClass, card_removed), - gtk_marshal_NONE__POINTER, - GTK_TYPE_NONE, 1, - GTK_TYPE_POINTER); - - gtk_object_class_add_signals (object_class, e_book_view_signals, - LAST_SIGNAL); - - object_class->destroy = e_book_view_destroy; -} - -/** - * e_book_view_get_type: - */ -GtkType -e_book_view_get_type (void) -{ - static GtkType type = 0; - - if (! type) { - GtkTypeInfo info = { - "EBookView", - sizeof (EBookView), - sizeof (EBookViewClass), - (GtkClassInitFunc) e_book_view_class_init, - (GtkObjectInitFunc) e_book_view_init, - NULL, /* reserved 1 */ - NULL, /* reserved 2 */ - (GtkClassInitFunc) NULL - }; - - type = gtk_type_unique (gtk_object_get_type (), &info); - } - - return type; -} diff --git a/addressbook/backend/ebook/e-book-view.h b/addressbook/backend/ebook/e-book-view.h deleted file mode 100644 index 92fde1e37f..0000000000 --- a/addressbook/backend/ebook/e-book-view.h +++ /dev/null @@ -1,55 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * The Evolution addressbook client object. - * - * Author: - * Nat Friedman (nat@helixcode.com) - * - * Copyright 1999, 2000, Helix Code, Inc. - */ - -#ifndef __E_BOOK_VIEW_H__ -#define __E_BOOK_VIEW_H__ - -#include - -#include -#include - -BEGIN_GNOME_DECLS - -typedef struct _EBookView EBookView; -typedef struct _EBookViewClass EBookViewClass; -typedef struct _EBookViewPrivate EBookViewPrivate; - -struct _EBookView { - GtkObject parent; - EBookViewPrivate *priv; -}; - -struct _EBookViewClass { - GtkObjectClass parent; - - /* - * Signals. - */ - void (* card_changed) (EBookView *book_view, const GList *cards); - void (* card_removed) (EBookView *book_view, const char *id); - void (* card_added) (EBookView *book_view, const GList *cards); -}; - -/* Creating a new addressbook. */ -EBookView *e_book_view_new (Evolution_BookView corba_book_view, EBookViewListener *listener); - -GtkType e_book_view_get_type (void); -void e_book_view_get_book_view_listener (EBookView *book_view); - -#define E_BOOK_VIEW_TYPE (e_book_view_get_type ()) -#define E_BOOK_VIEW(o) (GTK_CHECK_CAST ((o), E_BOOK_VIEW_TYPE, EBookView)) -#define E_BOOK_VIEW_CLASS(k) (GTK_CHECK_CLASS_CAST((k), E_BOOK_VIEW_TYPE, EBookViewClass)) -#define E_IS_BOOK_VIEW(o) (GTK_CHECK_TYPE ((o), E_BOOK_VIEW_TYPE)) -#define E_IS_BOOK_VIEW_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_BOOK_VIEW_TYPE)) - -END_GNOME_DECLS - -#endif /* ! __E_BOOK_VIEW_H__ */ diff --git a/addressbook/backend/ebook/e-book.c b/addressbook/backend/ebook/e-book.c deleted file mode 100644 index ce1c663073..0000000000 --- a/addressbook/backend/ebook/e-book.c +++ /dev/null @@ -1,1010 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * The Evolution addressbook client object. - * - * Author: - * Nat Friedman (nat@helixcode.com) - * - * Copyright 1999, 2000, Helix Code, Inc. - */ - -#include -#include -#include - -#include "addressbook.h" -#include "e-card-cursor.h" -#include "e-book-listener.h" -#include "e-book.h" - -GtkObjectClass *e_book_parent_class; - -#ifdef USING_OAF -#include -#define CARDSERVER_OAF_ID "OAFIID:evolution:addressbook-server:0fbc844d-c721-4615-98d0-d67eacf42d80" -#else -#include -#define CARDSERVER_GOAD_ID "evolution:addressbook-server" -#endif - -typedef enum { - URINotLoaded, - URILoading, - URILoaded -} EBookLoadState; - -struct _EBookPrivate { - Evolution_BookFactory book_factory; - EBookListener *listener; - - Evolution_Book corba_book; - - EBookLoadState load_state; - - /* - * The operation queue. New operations are appended to the - * end of the queue. When responses come back from the PAS, - * the op structures are popped off the front of the queue. - */ - GList *pending_ops; -}; - -enum { - OPEN_PROGRESS, - LINK_STATUS, - LAST_SIGNAL -}; - -static guint e_book_signals [LAST_SIGNAL]; - -typedef struct { - gpointer cb; - gpointer closure; - EBookViewListener *listener; -} EBookOp; - -/* - * Local response queue management. - */ -static void -e_book_queue_op (EBook *book, - gpointer cb, - gpointer closure, - EBookViewListener *listener) -{ - EBookOp *op; - - op = g_new0 (EBookOp, 1); - op->cb = cb; - op->closure = closure; - op->listener = listener; - - book->priv->pending_ops = - g_list_append (book->priv->pending_ops, op); -} - -static EBookOp * -e_book_pop_op (EBook *book) -{ - GList *popped; - EBookOp *op; - - if (book->priv->pending_ops == NULL) - return NULL; - - op = book->priv->pending_ops->data; - - popped = book->priv->pending_ops; - book->priv->pending_ops = - g_list_remove_link (book->priv->pending_ops, - book->priv->pending_ops); - - g_list_free_1 (popped); - - return op; -} - -static void -e_book_do_response_create_card (EBook *book, - EBookListenerResponse *resp) -{ - EBookOp *op; - - op = e_book_pop_op (book); - - if (op == NULL) { - g_warning ("e_book_do_response_create_card: Cannot find operation " - "in local op queue!\n"); - return; - } - - if (op->cb) - ((EBookIdCallback) op->cb) (book, resp->status, resp->id, op->closure); - g_free (resp->id); - g_free (op); -} - -static void -e_book_do_response_generic (EBook *book, - EBookListenerResponse *resp) -{ - EBookOp *op; - - op = e_book_pop_op (book); - - if (op == NULL) { - g_warning ("e_book_do_response_generic: Cannot find operation " - "in local op queue!\n"); - } - - if (op->cb) - ((EBookCallback) op->cb) (book, resp->status, op->closure); - - g_free (op); -} - -static void -e_book_do_response_get_cursor (EBook *book, - EBookListenerResponse *resp) -{ - CORBA_Environment ev; - EBookOp *op; - ECardCursor *cursor; - - op = e_book_pop_op (book); - - if (op == NULL) { - g_warning ("e_book_do_response_get_cursor: Cannot find operation " - "in local op queue!\n"); - return; - } - - cursor = e_card_cursor_new(resp->cursor); - - if (op->cb) - ((EBookCursorCallback) op->cb) (book, resp->status, cursor, op->closure); - - /* - * Release the remote Evolution_Book in the PAS. - */ - CORBA_exception_init (&ev); - - Bonobo_Unknown_unref (resp->cursor, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("e_book_do_response_get_cursor: Exception unref'ing " - "remote Evolution_CardCursor interface!\n"); - CORBA_exception_free (&ev); - CORBA_exception_init (&ev); - } - - CORBA_Object_release (resp->cursor, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("e_book_do_response_get_cursor: Exception releasing " - "remote Evolution_CardCursor interface!\n"); - } - - CORBA_exception_free (&ev); - - gtk_object_unref(GTK_OBJECT(cursor)); - - g_free (op); -} - -static void -e_book_do_response_get_view (EBook *book, - EBookListenerResponse *resp) -{ - CORBA_Environment ev; - EBookOp *op; - EBookView *book_view; - - op = e_book_pop_op (book); - - if (op == NULL) { - g_warning ("e_book_do_response_get_view: Cannot find operation " - "in local op queue!\n"); - return; - } - - book_view = e_book_view_new(resp->book_view, op->listener); - - if (op->cb) - ((EBookBookViewCallback) op->cb) (book, resp->status, book_view, op->closure); - - /* - * Release the remote Evolution_Book in the PAS. - */ - CORBA_exception_init (&ev); - - Bonobo_Unknown_unref (resp->book_view, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("e_book_do_response_get_view: Exception unref'ing " - "remote Evolution_BookView interface!\n"); - CORBA_exception_free (&ev); - CORBA_exception_init (&ev); - } - - CORBA_Object_release (resp->book_view, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("e_book_do_response_get_view: Exception releasing " - "remote Evolution_BookView interface!\n"); - } - - CORBA_exception_free (&ev); - - gtk_object_unref(GTK_OBJECT(book_view)); - bonobo_object_unref(BONOBO_OBJECT(op->listener)); - - g_free (op); -} - -static void -e_book_do_response_open (EBook *book, - EBookListenerResponse *resp) -{ - EBookOp *op; - - if (resp->status == E_BOOK_STATUS_SUCCESS) { - book->priv->corba_book = resp->book; - book->priv->load_state = URILoaded; - } - - op = e_book_pop_op (book); - - if (op == NULL) { - g_warning ("e_book_do_response_open: Cannot find operation " - "in local op queue!\n"); - return; - } - - if (op->cb) - ((EBookCallback) op->cb) (book, resp->status, op->closure); - g_free (op); -} - -static void -e_book_do_progress_event (EBook *book, - EBookListenerResponse *resp) -{ - gtk_signal_emit (GTK_OBJECT (book), e_book_signals [OPEN_PROGRESS], - resp->msg, resp->percent); - - g_free (resp->msg); -} - -static void -e_book_do_link_event (EBook *book, - EBookListenerResponse *resp) -{ - gtk_signal_emit (GTK_OBJECT (book), e_book_signals [LINK_STATUS], - resp->connected); -} - - -/* - * Reading notices out of the EBookListener's queue. - */ -static void -e_book_check_listener_queue (EBookListener *listener, EBook *book) -{ - EBookListenerResponse *resp; - - resp = e_book_listener_pop_response (listener); - - if (resp == NULL) - return; - - switch (resp->op) { - case CreateCardResponse: - e_book_do_response_create_card (book, resp); - break; - case RemoveCardResponse: - case ModifyCardResponse: - e_book_do_response_generic (book, resp); - break; - case GetCursorResponse: - e_book_do_response_get_cursor (book, resp); - break; - case GetBookViewResponse: - e_book_do_response_get_view(book, resp); - break; - case OpenBookResponse: - e_book_do_response_open (book, resp); - break; - - case OpenProgressEvent: - e_book_do_progress_event (book, resp); - break; - case LinkStatusEvent: - e_book_do_link_event (book, resp); - break; - default: - g_error ("EBook: Unknown operation %d in listener queue!\n", - resp->op); - } - - g_free (resp); -} - -/** - * e_book_load_uri: - */ -gboolean -e_book_load_uri (EBook *book, - const char *uri, - EBookCallback open_response, - gpointer closure) -{ - CORBA_Environment ev; - - g_return_val_if_fail (book != NULL, FALSE); - g_return_val_if_fail (E_IS_BOOK (book), FALSE); - g_return_val_if_fail (uri != NULL, FALSE); - g_return_val_if_fail (open_response != NULL, FALSE); - - if (book->priv->load_state != URINotLoaded) { - g_warning ("e_book_load_uri: Attempted to load a URI " - "on a book which already has a URI loaded!\n"); - return FALSE; - } - - /* - * Create our local BookListener interface. - */ - book->priv->listener = e_book_listener_new (); - if (book->priv->listener == NULL) { - g_warning ("e_book_load_uri: Could not create EBookListener!\n"); - return FALSE; - } - - gtk_signal_connect (GTK_OBJECT (book->priv->listener), "responses_queued", - e_book_check_listener_queue, book); - - /* - * Load the addressbook into the PAS. - */ - CORBA_exception_init (&ev); - - Evolution_BookFactory_open_book ( - book->priv->book_factory, uri, - bonobo_object_corba_objref (BONOBO_OBJECT (book->priv->listener)), - &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("e_book_load_uri: CORBA exception while opening addressbook!\n"); - CORBA_exception_free (&ev); - return FALSE; - } - - CORBA_exception_free (&ev); - - book->priv->load_state = URILoading; - - e_book_queue_op (book, open_response, closure, NULL); - - /* Now we play the waiting game. */ - - return TRUE; -} - -/** - * e_book_unload_uri: - */ -void -e_book_unload_uri (EBook *book) -{ - CORBA_Environment ev; - - g_return_if_fail (book != NULL); - g_return_if_fail (E_IS_BOOK (book)); - - /* - * FIXME: Make sure this works if the URI is still being - * loaded. - */ - if (book->priv->load_state == URINotLoaded) { - g_warning ("e_book_unload_uri: No URI is loaded!\n"); - return; - } - - /* - * Release the remote Evolution_Book in the PAS. - */ - CORBA_exception_init (&ev); - - Bonobo_Unknown_unref (book->priv->corba_book, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("e_book_unload_uri: Exception unref'ing " - "remote Evolution_Book interface!\n"); - CORBA_exception_free (&ev); - CORBA_exception_init (&ev); - } - - CORBA_Object_release (book->priv->corba_book, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("e_book_unload_uri: Exception releasing " - "remote book interface!\n"); - } - - CORBA_exception_free (&ev); - - bonobo_object_unref (BONOBO_OBJECT (book->priv->listener)); - - book->priv->listener = NULL; - book->priv->load_state = URINotLoaded; -} - -static gboolean -e_book_construct (EBook *book) -{ - g_return_val_if_fail (book != NULL, FALSE); - g_return_val_if_fail (E_IS_BOOK (book), FALSE); - - /* - * Connect to the Personal Addressbook Server. - */ - -#ifdef USING_OAF - book->priv->book_factory = (Evolution_BookFactory) - oaf_activate_from_id (CARDSERVER_OAF_ID, 0, NULL, NULL); -#else - book->priv->book_factory = (Evolution_BookFactory) - goad_server_activate_with_id (NULL, CARDSERVER_GOAD_ID, 0, NULL); -#endif - - if (book->priv->book_factory == CORBA_OBJECT_NIL) { - g_warning ("e_book_construct: Could not obtain a handle " - "to the Personal Addressbook Server!\n"); - return FALSE; - } - - return TRUE; -} - -/** - * e_book_new: - */ -EBook * -e_book_new (void) -{ - EBook *book; - - book = gtk_type_new (E_BOOK_TYPE); - - if (! e_book_construct (book)) { - gtk_object_unref (GTK_OBJECT (book)); - return NULL; - } - - return book; -} - -/* Fetching cards */ - -/** - * e_book_get_card: - */ -ECard * -e_book_get_card (EBook *book, - const char *id) -{ - char *vcard; - ECard *card; - - g_return_val_if_fail (book != NULL, NULL); - g_return_val_if_fail (E_IS_BOOK (book), NULL); - - if (book->priv->load_state != URILoaded) { - g_warning ("e_book_get_card: No URI loaded!\n"); - return NULL; - } - - vcard = e_book_get_vcard (book, id); - - if (vcard == NULL) { - g_warning ("e_book_get_card: Got bogus VCard from PAS!\n"); - return NULL; - } - - card = e_card_new (vcard); - g_free(vcard); - - e_card_set_id(card, id); - - return card; -} - -/** - * e_book_get_vcard: - */ -char * -e_book_get_vcard (EBook *book, - const char *id) -{ - CORBA_Environment ev; - char *retval; - char *vcard; - - g_return_val_if_fail (book != NULL, NULL); - g_return_val_if_fail (E_IS_BOOK (book), NULL); - - if (book->priv->load_state != URILoaded) { - g_warning ("e_book_get_vcard: No URI loaded!\n"); - return NULL; - } - - CORBA_exception_init (&ev); - - vcard = Evolution_Book_get_vcard (book->priv->corba_book, - (Evolution_CardId) id, - &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("e_book_get_vcard: Exception getting VCard from PAS!\n"); - CORBA_exception_free (&ev); - return NULL; - } - - CORBA_exception_free (&ev); - - if (vcard == NULL || strlen (vcard) == 0) { - g_warning ("e_book_get_vcard: Got NULL VCard from PAS!\n"); - return NULL; - } - - retval = g_strdup (vcard); - CORBA_free (vcard); - - return retval; -} - -/* Deleting cards. */ - -/** - * e_book_remove_card: - */ -gboolean -e_book_remove_card (EBook *book, - ECard *card, - EBookCallback cb, - gpointer closure) -{ - const char *id; - - g_return_val_if_fail (book != NULL, FALSE); - g_return_val_if_fail (E_IS_BOOK (book), FALSE); - g_return_val_if_fail (card != NULL, FALSE); - g_return_val_if_fail (E_IS_CARD (card), FALSE); - - if (book->priv->load_state != URILoaded) { - g_warning ("e_book_remove_card: No URI loaded!\n"); - return FALSE; - } - - id = e_card_get_id (card); - g_assert (id != NULL); - - return e_book_remove_card_by_id (book, id, cb, closure); -} - -/** - * e_book_remove_card_by_id: - */ -gboolean -e_book_remove_card_by_id (EBook *book, - const char *id, - EBookCallback cb, - gpointer closure) - -{ - CORBA_Environment ev; - - g_return_val_if_fail (book != NULL, FALSE); - g_return_val_if_fail (E_IS_BOOK (book), FALSE); - g_return_val_if_fail (id != NULL, FALSE); - - if (book->priv->load_state != URILoaded) { - g_warning ("e_book_remove_card_by_id: No URI loaded!\n"); - return FALSE; - } - - CORBA_exception_init (&ev); - - Evolution_Book_remove_card ( - book->priv->corba_book, (const Evolution_CardId) id, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("e_book_remove_card_by_id: CORBA exception " - "talking to PAS!\n"); - CORBA_exception_free (&ev); - return FALSE; - } - - CORBA_exception_free (&ev); - - e_book_queue_op (book, cb, closure, NULL); - - return TRUE; -} - -/* Adding cards. */ - -/** - * e_book_add_card: - */ -gboolean -e_book_add_card (EBook *book, - ECard *card, - EBookIdCallback cb, - gpointer closure) - -{ - char *vcard; - gboolean retval; - - g_return_val_if_fail (book != NULL, FALSE); - g_return_val_if_fail (E_IS_BOOK (book), FALSE); - g_return_val_if_fail (card != NULL, FALSE); - g_return_val_if_fail (E_IS_CARD (card), FALSE); - - if (book->priv->load_state != URILoaded) { - g_warning ("e_book_add_card: No URI loaded!\n"); - return FALSE; - } - - vcard = e_card_get_vcard (card); - - if (vcard == NULL) { - g_warning ("e_book_add_card: Cannot convert card to VCard string!\n"); - return FALSE; - } - - retval = e_book_add_vcard (book, vcard, cb, closure); - - g_free (vcard); - - return retval; -} - -/** - * e_book_add_vcard: - */ -gboolean -e_book_add_vcard (EBook *book, - const char *vcard, - EBookIdCallback cb, - gpointer closure) -{ - CORBA_Environment ev; - - g_return_val_if_fail (book != NULL, FALSE); - g_return_val_if_fail (E_IS_BOOK (book), FALSE); - g_return_val_if_fail (vcard != NULL, FALSE); - - if (book->priv->load_state != URILoaded) { - g_warning ("e_book_add_vcard: No URI loaded!\n"); - return FALSE; - } - - CORBA_exception_init (&ev); - - Evolution_Book_create_card ( - book->priv->corba_book, (const Evolution_VCard) vcard, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("e_book_add_vcard: Exception adding card to PAS!\n"); - CORBA_exception_free (&ev); - return FALSE; - } - - CORBA_exception_free (&ev); - - e_book_queue_op (book, (EBookCallback) cb, closure, NULL); - - return TRUE; -} - -/* Modifying cards. */ - -/** - * e_book_commit_card: - */ -gboolean -e_book_commit_card (EBook *book, - ECard *card, - EBookCallback cb, - gpointer closure) -{ - char *vcard; - gboolean retval; - - g_return_val_if_fail (book != NULL, FALSE); - g_return_val_if_fail (E_IS_BOOK (book), FALSE); - g_return_val_if_fail (card != NULL, FALSE); - g_return_val_if_fail (E_IS_CARD (card), FALSE); - - if (book->priv->load_state != URILoaded) { - g_warning ("e_book_commit_card: No URI loaded!\n"); - return FALSE; - } - - vcard = e_card_get_vcard (card); - - if (vcard == NULL) { - g_warning ("e_book_commit_card: Error " - "getting VCard for card!\n"); - return FALSE; - } - - retval = e_book_commit_vcard (book, vcard, cb, closure); - - g_free (vcard); - - return retval; -} - -/** - * e_book_commit_vcard: - */ -gboolean -e_book_commit_vcard (EBook *book, - const char *vcard, - EBookCallback cb, - gpointer closure) -{ - CORBA_Environment ev; - - g_return_val_if_fail (book != NULL, FALSE); - g_return_val_if_fail (E_IS_BOOK (book), FALSE); - g_return_val_if_fail (vcard != NULL, FALSE); - - if (book->priv->load_state != URILoaded) { - g_warning ("e_book_commit_vcard: No URI loaded!\n"); - return FALSE; - } - - CORBA_exception_init (&ev); - - Evolution_Book_modify_card ( - book->priv->corba_book, (const Evolution_VCard) vcard, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("e_book_commit_vcard: Exception " - "modifying card in PAS!\n"); - CORBA_exception_free (&ev); - return FALSE; - } - - CORBA_exception_free (&ev); - - e_book_queue_op (book, cb, closure, NULL); - - return TRUE; -} - -/** - * e_book_check_connection: - */ -gboolean -e_book_check_connection (EBook *book) -{ - CORBA_Environment ev; - - g_return_val_if_fail (book != NULL, FALSE); - g_return_val_if_fail (E_IS_BOOK (book), FALSE); - - if (book->priv->load_state != URILoaded) { - g_warning ("e_book_check_connection: No URI loaded!\n"); - return FALSE; - } - - CORBA_exception_init (&ev); - - Evolution_Book_check_connection (book->priv->corba_book, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("e_book_check_connection: Exception " - "querying the PAS!\n"); - CORBA_exception_free (&ev); - return FALSE; - } - - CORBA_exception_free (&ev); - - return TRUE; -} - -gboolean e_book_get_cursor (EBook *book, - gchar *query, - EBookCursorCallback cb, - gpointer closure) -{ - CORBA_Environment ev; - - g_return_val_if_fail (book != NULL, FALSE); - g_return_val_if_fail (E_IS_BOOK (book), FALSE); - - if (book->priv->load_state != URILoaded) { - g_warning ("e_book_check_connection: No URI loaded!\n"); - return FALSE; - } - - CORBA_exception_init (&ev); - - Evolution_Book_get_cursor (book->priv->corba_book, query, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("e_book_get_all_cards: Exception " - "querying list of cards!\n"); - CORBA_exception_free (&ev); - return FALSE; - } - - CORBA_exception_free (&ev); - - e_book_queue_op (book, cb, closure, NULL); - - return TRUE; -} - -gboolean e_book_get_book_view (EBook *book, - gchar *query, - EBookBookViewCallback cb, - gpointer closure) -{ - CORBA_Environment ev; - EBookViewListener *listener; - - g_return_val_if_fail (book != NULL, FALSE); - g_return_val_if_fail (E_IS_BOOK (book), FALSE); - - if (book->priv->load_state != URILoaded) { - g_warning ("e_book_get_book_view: No URI loaded!\n"); - return FALSE; - } - - listener = e_book_view_listener_new(); - - CORBA_exception_init (&ev); - - Evolution_Book_get_book_view (book->priv->corba_book, bonobo_object_corba_objref(BONOBO_OBJECT(listener)), query, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("e_book_get_book_view: Exception " - "getting book_view!\n"); - CORBA_exception_free (&ev); - return FALSE; - } - - CORBA_exception_free (&ev); - - e_book_queue_op (book, cb, closure, listener); - - return TRUE; -} - -/** - * e_book_get_name: - */ -char * -e_book_get_name (EBook *book) -{ - CORBA_Environment ev; - char *retval; - char *name; - - g_return_val_if_fail (book != NULL, NULL); - g_return_val_if_fail (E_IS_BOOK (book), NULL); - - if (book->priv->load_state != URILoaded) { - g_warning ("e_book_get_name: No URI loaded!\n"); - return NULL; - } - - CORBA_exception_init (&ev); - - name = Evolution_Book_get_name (book->priv->corba_book, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("e_book_get_name: Exception getting name from PAS!\n"); - CORBA_exception_free (&ev); - return NULL; - } - - CORBA_exception_free (&ev); - - if (name == NULL) { - g_warning ("e_book_get_name: Got NULL name from PAS!\n"); - return NULL; - } - - retval = g_strdup (name); - CORBA_free (name); - - return retval; -} - -static void -e_book_init (EBook *book) -{ - book->priv = g_new0 (EBookPrivate, 1); - book->priv->load_state = URINotLoaded; -} - -static void -e_book_destroy (GtkObject *object) -{ - EBook *book = E_BOOK (object); - CORBA_Environment ev; - - if (book->priv->load_state != URINotLoaded) - e_book_unload_uri (book); - - CORBA_exception_init (&ev); - - CORBA_Object_release (book->priv->book_factory, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("EBook: Exception while releasing BookFactory\n"); - - CORBA_exception_free (&ev); - CORBA_exception_init (&ev); - } - - g_free (book->priv); - - GTK_OBJECT_CLASS (e_book_parent_class)->destroy (object); -} - -static void -e_book_class_init (EBookClass *klass) -{ - GtkObjectClass *object_class = (GtkObjectClass *) klass; - - e_book_parent_class = gtk_type_class (gtk_object_get_type ()); - - e_book_signals [LINK_STATUS] = - gtk_signal_new ("link_status", - GTK_RUN_LAST, - object_class->type, - GTK_SIGNAL_OFFSET (EBookClass, link_status), - gtk_marshal_NONE__BOOL, - GTK_TYPE_NONE, 1, - GTK_TYPE_BOOL); - - gtk_object_class_add_signals (object_class, e_book_signals, - LAST_SIGNAL); - - object_class->destroy = e_book_destroy; -} - -/** - * e_book_get_type: - */ -GtkType -e_book_get_type (void) -{ - static GtkType type = 0; - - if (! type) { - GtkTypeInfo info = { - "EBook", - sizeof (EBook), - sizeof (EBookClass), - (GtkClassInitFunc) e_book_class_init, - (GtkObjectInitFunc) e_book_init, - NULL, /* reserved 1 */ - NULL, /* reserved 2 */ - (GtkClassInitFunc) NULL - }; - - type = gtk_type_unique (gtk_object_get_type (), &info); - } - - return type; -} diff --git a/addressbook/backend/ebook/e-book.h b/addressbook/backend/ebook/e-book.h deleted file mode 100644 index a57c7263b3..0000000000 --- a/addressbook/backend/ebook/e-book.h +++ /dev/null @@ -1,123 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * The Evolution addressbook client object. - * - * Author: - * Nat Friedman (nat@helixcode.com) - * - * Copyright 1999, 2000, Helix Code, Inc. - */ - -#ifndef __E_BOOK_H__ -#define __E_BOOK_H__ - -#include - -#include -#include -#include -#include - -BEGIN_GNOME_DECLS - -typedef struct _EBook EBook; -typedef struct _EBookClass EBookClass; -typedef struct _EBookPrivate EBookPrivate; - -struct _EBook { - GtkObject parent; - EBookPrivate *priv; -}; - -struct _EBookClass { - GtkObjectClass parent; - - /* - * Signals. - */ - void (* open_progress) (EBook *book, const char *msg, short percent); - void (* link_status) (EBook *book, gboolean connected); -}; - -/* Callbacks for asynchronous functions. */ -typedef void (*EBookCallback) (EBook *book, EBookStatus status, gpointer closure); -typedef void (*EBookOpenProgressCallback) (EBook *book, - const char *status_message, - short percent, - gpointer closure); -typedef void (*EBookIdCallback) (EBook *book, EBookStatus status, const char *id, gpointer closure); -typedef void (*EBookCursorCallback) (EBook *book, EBookStatus status, ECardCursor *cursor, gpointer closure); -typedef void (*EBookBookViewCallback) (EBook *book, EBookStatus status, EBookView *book_view, gpointer closure); - - -/* Creating a new addressbook. */ -EBook *e_book_new (void); -gboolean e_book_load_uri (EBook *book, - const char *uri, - EBookCallback open_response, - gpointer closure); -void e_book_unload_uri (EBook *book); - -/* Fetching cards. */ -ECard *e_book_get_card (EBook *book, - const char *id); -char *e_book_get_vcard (EBook *book, - const char *id); - -/* Deleting cards. */ -gboolean e_book_remove_card (EBook *book, - ECard *card, - EBookCallback cb, - gpointer closure); -gboolean e_book_remove_card_by_id (EBook *book, - const char *id, - EBookCallback cb, - gpointer closure); - -/* Adding cards. */ -gboolean e_book_add_card (EBook *book, - ECard *card, - EBookIdCallback cb, - gpointer closure); -gboolean e_book_add_vcard (EBook *book, - const char *vcard, - EBookIdCallback cb, - gpointer closure); - -/* Modifying cards. */ -gboolean e_book_commit_card (EBook *book, - ECard *card, - EBookCallback cb, - gpointer closure); -gboolean e_book_commit_vcard (EBook *book, - const char *vcard, - EBookCallback cb, - gpointer closure); - -/* Checking to see if we're connected to the card repository. */ -gboolean e_book_check_connection (EBook *book); - -gboolean e_book_get_cursor (EBook *book, - char *query, - EBookCursorCallback cb, - gpointer closure); - -gboolean e_book_get_book_view (EBook *book, - char *query, - EBookBookViewCallback cb, - gpointer closure); - -/* Getting the name of the repository. */ -char *e_book_get_name (EBook *book); - -GtkType e_book_get_type (void); - -#define E_BOOK_TYPE (e_book_get_type ()) -#define E_BOOK(o) (GTK_CHECK_CAST ((o), E_BOOK_TYPE, EBook)) -#define E_BOOK_CLASS(k) (GTK_CHECK_CLASS_CAST((k), E_BOOK_TYPE, EBookClass)) -#define E_IS_BOOK(o) (GTK_CHECK_TYPE ((o), E_BOOK_TYPE)) -#define E_IS_BOOK_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_BOOK_TYPE)) - -END_GNOME_DECLS - -#endif /* ! __E_BOOK_H__ */ diff --git a/addressbook/backend/ebook/e-card-cursor.c b/addressbook/backend/ebook/e-card-cursor.c deleted file mode 100644 index 1618a6ddee..0000000000 --- a/addressbook/backend/ebook/e-card-cursor.c +++ /dev/null @@ -1,235 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * e-card-cursor.c: Implements card cursors. - * - * Author: - * Christopher James Lahey -#include -#include "addressbook.h" -#include "e-card-cursor.h" - -struct _ECardCursorPrivate { - Evolution_CardCursor corba_cursor; -}; - -/* - * A pointer to our parent object class - */ -static GtkObjectClass *parent_class; - -/* - * Implemented GtkObject::destroy - */ -static void -e_card_cursor_destroy (GtkObject *object) -{ - ECardCursor *cursor = E_CARD_CURSOR (object); - CORBA_Environment ev; - - CORBA_exception_init (&ev); - - Evolution_CardCursor_unref( cursor->priv->corba_cursor, &ev ); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning("e_card_cursor_destroy: Exception unreffing " - "corba cursor.\n"); - CORBA_exception_free (&ev); - CORBA_exception_init (&ev); - } - - CORBA_Object_release (cursor->priv->corba_cursor, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning("e_card_cursor_destroy: Exception releasing " - "corba cursor.\n"); - } - - CORBA_exception_free (&ev); - - if ( cursor->priv ) - g_free ( cursor->priv ); - - GTK_OBJECT_CLASS (parent_class)->destroy (object); -} - -/** - * e_card_cursor_get_length: - * @cursor: the #ECardCursor whose length is being queried - * - * Returns: the number of items the cursor references, or -1 there's - * an error. - */ -long -e_card_cursor_get_length (ECardCursor *cursor) -{ - if ( cursor->priv->corba_cursor != CORBA_OBJECT_NIL ) { - CORBA_Environment ev; - long ret_val; - - CORBA_exception_init (&ev); - - ret_val = Evolution_CardCursor_get_length(cursor->priv->corba_cursor, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning("e_card_cursor_get_length: Exception during " - "get_length corba call.\n"); - ret_val = -1; - } - - CORBA_exception_free (&ev); - - return ret_val; - } - else - return -1; -} - -/** - * e_card_cursor_get_nth: - * @cursor: an #ECardCursor object - * @n: the index of the item requested - * - * Gets an #ECard based on an index. - * - * Returns: a new #ECard on success, or %NULL on failure. - */ -ECard * -e_card_cursor_get_nth (ECardCursor *cursor, - const long n) -{ - if ( cursor->priv->corba_cursor != CORBA_OBJECT_NIL ) { - CORBA_Environment en; - CORBA_char *vcard; - ECard *card; - - CORBA_exception_init (&en); - - vcard = Evolution_CardCursor_get_nth(cursor->priv->corba_cursor, n, &en); - - if (en._major != CORBA_NO_EXCEPTION) { - g_warning("e_card_cursor_get_nth: Exception during " - "get_nth corba call.\n"); - } - - CORBA_exception_free (&en); - - card = e_card_new (vcard); - - CORBA_free(vcard); - - return card; - } - else - return e_card_new(""); -} - -static void -e_card_cursor_class_init (ECardCursorClass *klass) -{ - GtkObjectClass *object_class = (GtkObjectClass *) klass; - - parent_class = gtk_type_class (gtk_object_get_type ()); - - object_class->destroy = e_card_cursor_destroy; -} - -static void -e_card_cursor_init (ECardCursor *cursor) -{ - cursor->priv = g_new(ECardCursorPrivate, 1); - cursor->priv->corba_cursor = CORBA_OBJECT_NIL; -} - -GtkType -e_card_cursor_get_type (void) -{ - static GtkType type = 0; - - if (!type){ - GtkTypeInfo info = { - "ECardCursor", - sizeof (ECardCursor), - sizeof (ECardCursorClass), - (GtkClassInitFunc) e_card_cursor_class_init, - (GtkObjectInitFunc) e_card_cursor_init, - NULL, /* reserved 1 */ - NULL, /* reserved 2 */ - (GtkClassInitFunc) NULL - }; - - type = gtk_type_unique (gtk_object_get_type (), &info); - } - - return type; -} - -/** - * e_card_cursor_construct: - * @cursor: an #ECardCursor object - * @corba_cursor: an #Evolution_CardCursor - * - * Wraps an #Evolution_CardCursor object inside the #ECardCursor - * @cursor object. - * - * Returns: a new #ECardCursor on success, or %NULL on failure. - */ -ECardCursor * -e_card_cursor_construct (ECardCursor *cursor, - Evolution_CardCursor corba_cursor) -{ - CORBA_Environment ev; - g_return_val_if_fail (cursor != NULL, NULL); - g_return_val_if_fail (E_IS_CARD_CURSOR (cursor), NULL); - g_return_val_if_fail (corba_cursor != CORBA_OBJECT_NIL, NULL); - - CORBA_exception_init (&ev); - - /* - * Initialize cursor - */ - cursor->priv->corba_cursor = CORBA_Object_duplicate(corba_cursor, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning("e_card_cursor_construct: Exception duplicating " - "corba cursor.\n"); - CORBA_exception_free (&ev); - CORBA_exception_init (&ev); - } - - Evolution_CardCursor_ref(cursor->priv->corba_cursor, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning("e_card_cursor_construct: Exception reffing " - "corba cursor.\n"); - } - - CORBA_exception_free (&ev); - - /* - * Success: return the GtkType we were given - */ - return cursor; -} - -/** - * e_card_cursor_new: - * @cursor: the #Evolution_CardCursor to be wrapped - * - * Creates a new #ECardCursor, which wraps an #Evolution_CardCursor - * object. - * - * Returns: a new #ECardCursor on success, or %NULL on failure. - */ -ECardCursor * -e_card_cursor_new (Evolution_CardCursor corba_cursor) -{ - ECardCursor *cursor; - - cursor = gtk_type_new (e_card_cursor_get_type ()); - - return e_card_cursor_construct (cursor, - corba_cursor); -} diff --git a/addressbook/backend/ebook/e-card-cursor.h b/addressbook/backend/ebook/e-card-cursor.h deleted file mode 100644 index b318e646c4..0000000000 --- a/addressbook/backend/ebook/e-card-cursor.h +++ /dev/null @@ -1,52 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * - * Author: - * Nat Friedman (nat@helixcode.com) - * - * Copyright 2000, Helix Code, Inc. - */ - -#ifndef __E_CARD_CURSOR_H__ -#define __E_CARD_CURSOR_H__ - -#include -#include -#include -#include - -BEGIN_GNOME_DECLS - -typedef struct _ECardCursor ECardCursor; -typedef struct _ECardCursorPrivate ECardCursorPrivate; -typedef struct _ECardCursorClass ECardCursorClass; - -struct _ECardCursor { - GtkObject parent; - ECardCursorPrivate *priv; -}; - -struct _ECardCursorClass { - GtkObjectClass parent; -}; - -/* Creating a new addressbook. */ -ECardCursor *e_card_cursor_new (Evolution_CardCursor corba_cursor); -ECardCursor *e_card_cursor_construct (ECardCursor *cursor, - Evolution_CardCursor corba_cursor); - -GtkType e_card_cursor_get_type (void); - -/* Fetching cards. */ -long e_card_cursor_get_length (ECardCursor *cursor); -ECard *e_card_cursor_get_nth (ECardCursor *cursor, - const long nth); -#define E_CARD_CURSOR_TYPE (e_card_cursor_get_type ()) -#define E_CARD_CURSOR(o) (GTK_CHECK_CAST ((o), E_CARD_CURSOR_TYPE, ECardCursor)) -#define E_CARD_CURSOR_CLASS(k) (GTK_CHECK_CLASS_CAST((k), E_CARD_CURSOR_TYPE, ECardCursorClass)) -#define E_IS_CARD_CURSOR(o) (GTK_CHECK_TYPE ((o), E_CARD_CURSOR_TYPE)) -#define E_IS_CARD_CURSOR_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_CARD_CURSOR_TYPE)) - -END_GNOME_DECLS - -#endif /* ! __E_CARD_CURSOR_H__ */ diff --git a/addressbook/backend/ebook/e-card-iterator.c b/addressbook/backend/ebook/e-card-iterator.c deleted file mode 100644 index b5a023b5c1..0000000000 --- a/addressbook/backend/ebook/e-card-iterator.c +++ /dev/null @@ -1,169 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * Authors: - * Christopher James Lahey - * - * Copyright (C) 2000 Helix Code, Inc. - * Copyright (C) 1999 The Free Software Foundation - */ - -#include -#include - -#include "e-card-iterator.h" - -#define ECI_CLASS(object) (E_CARD_ITERATOR_CLASS(GTK_OBJECT((object))->klass)) - -static void e_card_iterator_init (ECardIterator *card); -static void e_card_iterator_class_init (ECardIteratorClass *klass); - -#define PARENT_TYPE (gtk_object_get_type ()) - -static GtkObjectClass *parent_class; - -enum { - INVALIDATE, - LAST_SIGNAL -}; - -static guint e_card_iterator_signals [LAST_SIGNAL] = { 0, }; - -/** - * e_card_iterator_get_type: - * @void: - * - * Registers the &ECardIterator class if necessary, and returns the type ID - * associated to it. - * - * Return value: The type ID of the &ECardIterator class. - **/ -GtkType -e_card_iterator_get_type (void) -{ - static GtkType type = 0; - - if (!type) { - GtkTypeInfo info = { - "ECardIterator", - sizeof (ECardIterator), - sizeof (ECardIteratorClass), - (GtkClassInitFunc) e_card_iterator_class_init, - (GtkObjectInitFunc) e_card_iterator_init, - NULL, /* reserved_1 */ - NULL, /* reserved_2 */ - (GtkClassInitFunc) NULL - }; - - type = gtk_type_unique (PARENT_TYPE, &info); - } - - return type; -} - -static void -e_card_iterator_class_init (ECardIteratorClass *klass) -{ - GtkObjectClass *object_class; - - object_class = GTK_OBJECT_CLASS(klass); - - parent_class = gtk_type_class (PARENT_TYPE); - - e_card_iterator_signals [INVALIDATE] = - gtk_signal_new ("invalidate", - GTK_RUN_LAST, - object_class->type, - GTK_SIGNAL_OFFSET (ECardIteratorClass, invalidate), - gtk_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); - - gtk_object_class_add_signals (object_class, e_card_iterator_signals, LAST_SIGNAL); - - klass->invalidate = NULL; - klass->get = NULL; - klass->reset = NULL; - klass->next = NULL; - klass->prev = NULL; - klass->delete = NULL; - klass->set = NULL; - klass->is_valid = NULL; -} - -/** - * e_card_iterator_init: - */ -static void -e_card_iterator_init (ECardIterator *card) -{ -} - -/* - * Virtual functions: - */ -const void * -e_card_iterator_get (ECardIterator *iterator) -{ - if (ECI_CLASS(iterator)->get) - return ECI_CLASS(iterator)->get(iterator); - else - return NULL; -} - -void -e_card_iterator_reset (ECardIterator *iterator) -{ - if (ECI_CLASS(iterator)->reset) - ECI_CLASS(iterator)->reset(iterator); -} - -gboolean -e_card_iterator_next (ECardIterator *iterator) -{ - if (ECI_CLASS(iterator)->next) - return ECI_CLASS(iterator)->next(iterator); - else - return FALSE; -} - -gboolean -e_card_iterator_prev (ECardIterator *iterator) -{ - if (ECI_CLASS(iterator)->prev) - return ECI_CLASS(iterator)->prev(iterator); - else - return FALSE; -} - -void -e_card_iterator_delete (ECardIterator *iterator) -{ - if (ECI_CLASS(iterator)->delete) - ECI_CLASS(iterator)->delete(iterator); -} - -void -e_card_iterator_set (ECardIterator *iterator, - const void *object) -{ - if (ECI_CLASS(iterator)->set) - ECI_CLASS(iterator)->set(iterator, object); -} - -gboolean -e_card_iterator_is_valid (ECardIterator *iterator) -{ - if (ECI_CLASS(iterator)->is_valid) - return ECI_CLASS(iterator)->is_valid(iterator); - else - return FALSE; -} - -void -e_card_iterator_invalidate (ECardIterator *iterator) -{ - g_return_if_fail (iterator != NULL); - g_return_if_fail (E_IS_CARD_ITERATOR (iterator)); - - gtk_signal_emit (GTK_OBJECT (iterator), - e_card_iterator_signals [INVALIDATE]); -} diff --git a/addressbook/backend/ebook/e-card-iterator.h b/addressbook/backend/ebook/e-card-iterator.h deleted file mode 100644 index 9d657e03ef..0000000000 --- a/addressbook/backend/ebook/e-card-iterator.h +++ /dev/null @@ -1,61 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * Authors: - * Chris Lahey - * - * Copyright (C) 2000 Helix Code, Inc. - * Copyright (C) 1999 The Free Software Foundation - */ - -#ifndef __E_CARD_ITERATOR_H__ -#define __E_CARD_ITERATOR_H__ - -#include -#include -#include - -#define E_TYPE_CARD_ITERATOR (e_card_iterator_get_type ()) -#define E_CARD_ITERATOR(obj) (GTK_CHECK_CAST ((obj), E_TYPE_CARD_ITERATOR, ECardIterator)) -#define E_CARD_ITERATOR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_CARD_ITERATOR, ECardIteratorClass)) -#define E_IS_CARD_ITERATOR(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_CARD_ITERATOR)) -#define E_IS_CARD_ITERATOR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), E_TYPE_CARD_ITERATOR)) - -typedef struct _ECardIterator ECardIterator; -typedef struct _ECardIteratorClass ECardIteratorClass; - -struct _ECardIterator { - GtkObject object; -}; - -struct _ECardIteratorClass { - GtkObjectClass parent_class; - - /* Signals */ - void (*invalidate) (ECardIterator *iterator); - - /* Virtual functions */ - const void * (*get) (ECardIterator *iterator); - void (*reset) (ECardIterator *iterator); - gboolean (*next) (ECardIterator *iterator); - gboolean (*prev) (ECardIterator *iterator); - void (*delete) (ECardIterator *iterator); - void (*set) (ECardIterator *iterator, - const void *object); - gboolean (*is_valid) (ECardIterator *iterator); -}; - -const void *e_card_iterator_get (ECardIterator *iterator); -void e_card_iterator_reset (ECardIterator *iterator); -gboolean e_card_iterator_next (ECardIterator *iterator); -gboolean e_card_iterator_prev (ECardIterator *iterator); -void e_card_iterator_delete (ECardIterator *iterator); -void e_card_iterator_set (ECardIterator *iterator, - const void *object); -gboolean e_card_iterator_is_valid (ECardIterator *iterator); - -void e_card_iterator_invalidate (ECardIterator *iterator); - -/* Standard Gtk function */ -GtkType e_card_iterator_get_type (void); - -#endif /* ! __E_CARD_ITERATOR_H__ */ diff --git a/addressbook/backend/ebook/e-card-list-iterator.c b/addressbook/backend/ebook/e-card-list-iterator.c deleted file mode 100644 index d23060fda2..0000000000 --- a/addressbook/backend/ebook/e-card-list-iterator.c +++ /dev/null @@ -1,199 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * Authors: - * Christopher James Lahey - * - * Copyright (C) 2000 Helix Code, Inc. - * Copyright (C) 1999 The Free Software Foundation - */ - -#include -#include - -#include "e-card-list-iterator.h" -#include "e-card-list.h" - -static void e_card_list_iterator_init (ECardListIterator *card); -static void e_card_list_iterator_class_init (ECardListIteratorClass *klass); - -static void e_card_list_iterator_invalidate (ECardIterator *iterator); -static gboolean e_card_list_iterator_is_valid (ECardIterator *iterator); -static void e_card_list_iterator_set (ECardIterator *iterator, - const void *object); -static void e_card_list_iterator_delete (ECardIterator *iterator); -static gboolean e_card_list_iterator_prev (ECardIterator *iterator); -static gboolean e_card_list_iterator_next (ECardIterator *iterator); -static void e_card_list_iterator_reset (ECardIterator *iterator); -static const void *e_card_list_iterator_get (ECardIterator *iterator); -static void e_card_list_iterator_destroy (GtkObject *object); - -#define PARENT_TYPE (e_card_iterator_get_type ()) - -static GtkObjectClass *parent_class; -#define PARENT_CLASS (E_CARD_LIST_ITERATOR_CLASS(parent_class)) - -/** - * e_card_list_iterator_get_type: - * @void: - * - * Registers the &ECardListIterator class if necessary, and returns the type ID - * associated to it. - * - * Return value: The type ID of the &ECardListIterator class. - **/ -GtkType -e_card_list_iterator_get_type (void) -{ - static GtkType type = 0; - - if (!type) { - GtkTypeInfo info = { - "ECardListIterator", - sizeof (ECardListIterator), - sizeof (ECardListIteratorClass), - (GtkClassInitFunc) e_card_list_iterator_class_init, - (GtkObjectInitFunc) e_card_list_iterator_init, - NULL, /* reserved_1 */ - NULL, /* reserved_2 */ - (GtkClassInitFunc) NULL - }; - - type = gtk_type_unique (PARENT_TYPE, &info); - } - - return type; -} - -static void -e_card_list_iterator_class_init (ECardListIteratorClass *klass) -{ - GtkObjectClass *object_class; - ECardIteratorClass *iterator_class; - - object_class = GTK_OBJECT_CLASS(klass); - iterator_class = E_CARD_ITERATOR_CLASS(klass); - - parent_class = gtk_type_class (PARENT_TYPE); - - object_class->destroy = e_card_list_iterator_destroy; - - iterator_class->invalidate = e_card_list_iterator_invalidate; - iterator_class->get = e_card_list_iterator_get; - iterator_class->reset = e_card_list_iterator_reset; - iterator_class->next = e_card_list_iterator_next; - iterator_class->prev = e_card_list_iterator_prev; - iterator_class->delete = e_card_list_iterator_delete; - iterator_class->set = e_card_list_iterator_set; - iterator_class->is_valid = e_card_list_iterator_is_valid; -} - - - -/** - * e_card_list_iterator_init: - */ -static void -e_card_list_iterator_init (ECardListIterator *card) -{ -} - -ECardIterator * -e_card_list_iterator_new (ECardList *list) -{ - ECardListIterator *iterator = gtk_type_new(e_card_list_iterator_get_type()); - - iterator->list = list; - gtk_object_ref(GTK_OBJECT(list)); - iterator->iterator = list->list; - - return E_CARD_ITERATOR(iterator); -} - -/* - * Virtual functions: - */ -static void -e_card_list_iterator_destroy (GtkObject *object) -{ - ECardListIterator *iterator = E_CARD_LIST_ITERATOR(object); - e_card_list_remove_iterator(iterator->list, E_CARD_ITERATOR(iterator)); - gtk_object_unref(GTK_OBJECT(iterator->list)); -} - -static const void * -e_card_list_iterator_get (ECardIterator *_iterator) -{ - ECardListIterator *iterator = E_CARD_LIST_ITERATOR(_iterator); - if (iterator->iterator) - return iterator->iterator->data; - else - return NULL; -} - -static void -e_card_list_iterator_reset (ECardIterator *_iterator) -{ - ECardListIterator *iterator = E_CARD_LIST_ITERATOR(_iterator); - iterator->iterator = iterator->list->list; -} - -static gboolean -e_card_list_iterator_next (ECardIterator *_iterator) -{ - ECardListIterator *iterator = E_CARD_LIST_ITERATOR(_iterator); - if (iterator->iterator) - iterator->iterator = g_list_next(iterator->iterator); - return (iterator->iterator != NULL); -} - -static gboolean -e_card_list_iterator_prev (ECardIterator *_iterator) -{ - ECardListIterator *iterator = E_CARD_LIST_ITERATOR(_iterator); - if (iterator->iterator) - iterator->iterator = g_list_previous(iterator->iterator); - return (iterator->iterator != NULL); -} - -static void -e_card_list_iterator_delete (ECardIterator *_iterator) -{ - ECardListIterator *iterator = E_CARD_LIST_ITERATOR(_iterator); - if (iterator->iterator) { - GList *temp = iterator->iterator->next; - if (iterator->list->free) - iterator->list->free(iterator->iterator->data, iterator->list->closure); - iterator->list->list = g_list_remove_link(iterator->list->list, iterator->iterator); - iterator->iterator = temp; - e_card_list_invalidate_iterators(iterator->list, E_CARD_ITERATOR(iterator)); - } -} - -static void -e_card_list_iterator_set (ECardIterator *_iterator, - const void *object) -{ - ECardListIterator *iterator = E_CARD_LIST_ITERATOR(_iterator); - if (iterator->iterator) { - if (iterator->list->free) - iterator->list->free(iterator->iterator->data, iterator->list->closure); - if (iterator->list->copy) - iterator->iterator->data = iterator->list->copy(object, iterator->list->closure); - else - iterator->iterator->data = (void *) object; - } -} - -static gboolean -e_card_list_iterator_is_valid (ECardIterator *_iterator) -{ - ECardListIterator *iterator = E_CARD_LIST_ITERATOR(_iterator); - return iterator->iterator != NULL; -} - -static void -e_card_list_iterator_invalidate (ECardIterator *_iterator) -{ - ECardListIterator *iterator = E_CARD_LIST_ITERATOR(_iterator); - iterator->iterator = NULL; -} diff --git a/addressbook/backend/ebook/e-card-list-iterator.h b/addressbook/backend/ebook/e-card-list-iterator.h deleted file mode 100644 index 38a7d77f21..0000000000 --- a/addressbook/backend/ebook/e-card-list-iterator.h +++ /dev/null @@ -1,44 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * Authors: - * Chris Lahey - * - * Copyright (C) 2000 Helix Code, Inc. - * Copyright (C) 1999 The Free Software Foundation - */ - -#ifndef __E_CARD_LIST_ITERATOR_H__ -#define __E_CARD_LIST_ITERATOR_H__ - -#include -#include -#include -#include -#include - -#define E_TYPE_CARD_LIST_ITERATOR (e_card_list_iterator_get_type ()) -#define E_CARD_LIST_ITERATOR(obj) (GTK_CHECK_CAST ((obj), E_TYPE_CARD_LIST_ITERATOR, ECardListIterator)) -#define E_CARD_LIST_ITERATOR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_CARD_LIST_ITERATOR, ECardListIteratorClass)) -#define E_IS_CARD_LIST_ITERATOR(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_CARD_LIST_ITERATOR)) -#define E_IS_CARD_LIST_ITERATOR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), E_TYPE_CARD_LIST_ITERATOR)) - -typedef struct _ECardListIterator ECardListIterator; -typedef struct _ECardListIteratorClass ECardListIteratorClass; - -struct _ECardListIterator { - ECardIterator parent; - - ECardList *list; - GList *iterator; -}; - -struct _ECardListIteratorClass { - ECardIteratorClass parent_class; -}; - -ECardIterator *e_card_list_iterator_new (ECardList *list); - -/* Standard Gtk function */ -GtkType e_card_list_iterator_get_type (void); - -#endif /* ! __E_CARD_LIST_ITERATOR_H__ */ diff --git a/addressbook/backend/ebook/e-card-list.c b/addressbook/backend/ebook/e-card-list.c deleted file mode 100644 index e912de7b6e..0000000000 --- a/addressbook/backend/ebook/e-card-list.c +++ /dev/null @@ -1,140 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * Authors: - * Christopher James Lahey - * - * Copyright (C) 2000 Helix Code, Inc. - * Copyright (C) 1999 The Free Software Foundation - */ - -#include -#include - -#include "e-card-list.h" -#include "e-card-list-iterator.h" - -#define ECL_CLASS(object) (E_CARD_LIST_CLASS(GTK_OBJECT((object))->klass)) - -static void e_card_list_init (ECardList *card); -static void e_card_list_class_init (ECardListClass *klass); -static void e_card_list_destroy (GtkObject *object); - -#define PARENT_TYPE (gtk_object_get_type ()) - -static GtkObjectClass *parent_class; - -/** - * e_card_list_get_type: - * @void: - * - * Registers the &ECardList class if necessary, and returns the type ID - * associated to it. - * - * Return value: The type ID of the &ECardList class. - **/ -GtkType -e_card_list_get_type (void) -{ - static GtkType type = 0; - - if (!type) { - GtkTypeInfo info = { - "ECardList", - sizeof (ECardList), - sizeof (ECardListClass), - (GtkClassInitFunc) e_card_list_class_init, - (GtkObjectInitFunc) e_card_list_init, - NULL, /* reserved_1 */ - NULL, /* reserved_2 */ - (GtkClassInitFunc) NULL - }; - - type = gtk_type_unique (PARENT_TYPE, &info); - } - - return type; -} - -static void -e_card_list_class_init (ECardListClass *klass) -{ - GtkObjectClass *object_class; - - object_class = GTK_OBJECT_CLASS(klass); - - parent_class = gtk_type_class (PARENT_TYPE); - - object_class->destroy = e_card_list_destroy; -} - -/** - * e_card_list_init: - */ -static void -e_card_list_init (ECardList *list) -{ - list->list = NULL; - list->iterators = NULL; -} - -ECardList * -e_card_list_new (ECardListCopyFunc copy, ECardListFreeFunc free, void *closure) -{ - ECardList *list = gtk_type_new(e_card_list_get_type()); - list->copy = copy; - list->free = free; - list->closure = closure; - return list; -} - -ECardIterator * -e_card_list_get_iterator (ECardList *list) -{ - ECardIterator *iterator = e_card_list_iterator_new(list); - list->iterators = g_list_append(list->iterators, iterator); - return iterator; -} - -int -e_card_list_length (ECardList *list) -{ - return g_list_length(list->list); -} - -void -e_card_list_append (ECardList *list, const void *data) -{ - e_card_list_invalidate_iterators(list, NULL); - if (list->copy) - list->list = g_list_append(list->list, list->copy(data, list->closure)); - else - list->list = g_list_append(list->list, (void *) data); -} - -void -e_card_list_invalidate_iterators (ECardList *list, ECardIterator *skip) -{ - GList *iterators = list->iterators; - for (; iterators; iterators = iterators->next) { - if (iterators->data != skip) { - e_card_iterator_invalidate(E_CARD_ITERATOR(iterators->data)); - } - } -} - -void -e_card_list_remove_iterator (ECardList *list, ECardIterator *iterator) -{ - list->iterators = g_list_remove(list->iterators, iterator); -} - -/* - * Virtual functions - */ -static void -e_card_list_destroy (GtkObject *object) -{ - ECardList *list = E_CARD_LIST(object); - g_list_foreach(list->list, (GFunc) list->free, list->closure); - g_list_free(list->list); -} diff --git a/addressbook/backend/ebook/e-card-list.h b/addressbook/backend/ebook/e-card-list.h deleted file mode 100644 index af791a81a0..0000000000 --- a/addressbook/backend/ebook/e-card-list.h +++ /dev/null @@ -1,60 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * Authors: - * Chris Lahey - * - * Copyright (C) 2000 Helix Code, Inc. - * Copyright (C) 1999 The Free Software Foundation - */ - -#ifndef __E_CARD_LIST_H__ -#define __E_CARD_LIST_H__ - -#include -#include -#include -#include - -#define E_TYPE_CARD_LIST (e_card_list_get_type ()) -#define E_CARD_LIST(obj) (GTK_CHECK_CAST ((obj), E_TYPE_CARD_LIST, ECardList)) -#define E_CARD_LIST_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_CARD_LIST, ECardListClass)) -#define E_IS_CARD_LIST(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_CARD_LIST)) -#define E_IS_CARD_LIST_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), E_TYPE_CARD_LIST)) - -typedef void *(*ECardListCopyFunc) (const void *data, void *closure); -typedef void (*ECardListFreeFunc) (void *data, void *closure); - -typedef struct _ECardList ECardList; -typedef struct _ECardListClass ECardListClass; - -struct _ECardList { - GtkObject object; - GList *list; - GList *iterators; - ECardListCopyFunc copy; - ECardListFreeFunc free; - void *closure; -}; - -struct _ECardListClass { - GtkObjectClass parent_class; -}; - -ECardList *e_card_list_new (ECardListCopyFunc copy, - ECardListFreeFunc free, - void *closure); -ECardIterator *e_card_list_get_iterator (ECardList *list); -void e_card_list_append (ECardList *list, - const void *data); -int e_card_list_length (ECardList *list); - -/* For iterators to call. */ -void e_card_list_invalidate_iterators (ECardList *list, - ECardIterator *skip); -void e_card_list_remove_iterator (ECardList *list, - ECardIterator *iterator); - -/* Standard Gtk function */ -GtkType e_card_list_get_type (void); - -#endif /* ! __E_CARD_LIST_H__ */ diff --git a/addressbook/backend/ebook/e-card-pairs.h b/addressbook/backend/ebook/e-card-pairs.h deleted file mode 100644 index 0f379d3477..0000000000 --- a/addressbook/backend/ebook/e-card-pairs.h +++ /dev/null @@ -1,118 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* GnomeCard - a graphical contact manager. - * - * pairs.h: This file is part of GnomeCard. - * - * Copyright (C) 1999 The Free Software Foundation - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __E_CARD_PAIRS_H__ -#define __E_CARD_PAIRS_H__ - -#include -#include - - -#if 0 -struct pair -{ - char *str; - ECardPropertyType i ; -}; - -struct pair prop_lookup[] = { - { VCFullNameProp, PROP_FNAME }, - { VCNameProp, PROP_NAME }, - { VCPhotoProp, PROP_PHOTO }, - { VCBirthDateProp, PROP_BDAY }, - { VCAdrProp, PROP_DELADDR }, - { VCDeliveryLabelProp, PROP_DELLABEL }, - { VCTelephoneProp, PROP_PHONE }, - { VCEmailAddressProp, PROP_EMAIL }, - { VCMailerProp, PROP_MAILER }, - { VCTimeZoneProp, PROP_TIMEZN }, - { VCGeoProp, PROP_GEOPOS }, - { VCTitleProp, PROP_TITLE }, - { VCBusinessRoleProp, PROP_ROLE }, - { VCLogoProp, PROP_LOGO }, - { VCAgentProp, PROP_AGENT }, - { VCOrgProp, PROP_ORG }, - { VCCategoriesProp, PROP_CATEGORIES }, - { VCCommentProp, PROP_COMMENT }, - { VCLastRevisedProp, PROP_REV }, - { VCPronunciationProp, PROP_SOUND }, - { VCURLProp, PROP_URL }, - { VCUniqueStringProp, PROP_UID }, - { VCVersionProp, PROP_VERSION }, - { VCPublicKeyProp, PROP_KEY }, - { VCValueProp, PROP_VALUE }, - { VCEncodingProp, PROP_ENCODING }, - { VCQuotedPrintableProp, PROP_QUOTED_PRINTABLE }, - { VC8bitProp, PROP_8BIT }, - { VCBase64Prop, PROP_BASE64 }, - { VCLanguageProp, PROP_LANG }, - { VCCharSetProp, PROP_CHARSET }, - { NULL, PROP_NONE} }; - -struct pair photo_pairs[] = { - { VCGIFProp, PHOTO_GIF }, - { VCCGMProp, PHOTO_CGM }, - { VCWMFProp, PHOTO_WMF }, - { VCBMPProp, PHOTO_BMP }, - { VCMETProp, PHOTO_MET }, - { VCPMBProp, PHOTO_PMB }, - { VCDIBProp, PHOTO_DIB }, - { VCPICTProp, PHOTO_PICT }, - { VCTIFFProp, PHOTO_TIFF }, - { VCPDFProp, PHOTO_PDF }, - { VCPSProp, PHOTO_PS }, - { VCJPEGProp, PHOTO_JPEG }, - { VCMPEGProp, PHOTO_MPEG }, - { VCMPEG2Prop, PHOTO_MPEG2 }, - { VCAVIProp, PHOTO_AVI }, - { VCQuickTimeProp, PHOTO_QTIME }, - { NULL, 0 } }; - -struct pair email_pairs[] = { - { VCAOLProp, EMAIL_AOL }, - { VCAppleLinkProp, EMAIL_APPLE_LINK }, - { VCATTMailProp, EMAIL_ATT }, - { VCCISProp, EMAIL_CIS }, - { VCEWorldProp, EMAIL_EWORLD }, - { VCInternetProp, EMAIL_INET }, - { VCIBMMailProp, EMAIL_IBM }, - { VCMCIMailProp, EMAIL_MCI }, - { VCPowerShareProp, EMAIL_POWERSHARE }, - { VCProdigyProp, EMAIL_PRODIGY }, - { VCTLXProp, EMAIL_TLX }, - { VCX400Prop, EMAIL_X400 }, - { NULL, 0 } }; - -struct pair sound_pairs[] = { - { VCAIFFProp, SOUND_AIFF }, - { VCPCMProp, SOUND_PCM }, - { VCWAVEProp, SOUND_WAVE }, - { NULL, 0 } }; - -struct pair key_pairs[] = { - { VCX509Prop, KEY_X509 }, - { VCPGPProp, KEY_PGP }, - { NULL, 0 } }; - - -#endif -#endif /* ! __E_CARD_PAIRS_H__ */ diff --git a/addressbook/backend/ebook/e-card-simple.c b/addressbook/backend/ebook/e-card-simple.c deleted file mode 100644 index 8d2a0f44b4..0000000000 --- a/addressbook/backend/ebook/e-card-simple.c +++ /dev/null @@ -1,1185 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * Authors: - * Chris Lahey - * Arturo Espinosa (arturo@nuclecu.unam.mx) - * Nat Friedman (nat@helixcode.com) - * - * Copyright (C) 2000 Helix Code, Inc. - * Copyright (C) 1999 The Free Software Foundation - */ - -#include -#include -#include -#include -#include - -#include -#include "e-card-simple.h" - -/* Object argument IDs */ -enum { - ARG_0, - ARG_CARD, -#if 0 - ARG_FILE_AS, - ARG_FULL_NAME, - ARG_NAME, - ARG_ADDRESS, - ARG_ADDRESS_LABEL, - ARG_PHONE, - ARG_EMAIL, - ARG_BIRTH_DATE, - ARG_URL, - ARG_ORG, - ARG_ORG_UNIT, - ARG_OFFICE, - ARG_TITLE, - ARG_ROLE, - ARG_MANAGER, - ARG_ASSISTANT, - ARG_NICKNAME, - ARG_SPOUSE, - ARG_ANNIVERSARY, - ARG_FBURL, - ARG_NOTE, - ARG_ID -#endif -}; - - -typedef enum _ECardSimpleInternalType ECardSimpleInternalType; -typedef struct _ECardSimpleFieldData ECardSimpleFieldData; - -enum _ECardSimpleInternalType { - E_CARD_SIMPLE_INTERNAL_TYPE_STRING, - E_CARD_SIMPLE_INTERNAL_TYPE_DATE, - E_CARD_SIMPLE_INTERNAL_TYPE_ADDRESS, - E_CARD_SIMPLE_INTERNAL_TYPE_PHONE, - E_CARD_SIMPLE_INTERNAL_TYPE_EMAIL, -}; - -struct _ECardSimpleFieldData { - ECardSimpleField field; - char *ecard_field; - char *name; - char *short_name; - int list_type_index; - ECardSimpleInternalType type; -}; - -/* This order must match the order in the .h. */ - -static ECardSimpleFieldData field_data[] = -{ - { E_CARD_SIMPLE_FIELD_FILE_AS, "file_as", "File As", "", 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING }, - { E_CARD_SIMPLE_FIELD_FULL_NAME, "full_name", "Name", "Name", 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING }, - { E_CARD_SIMPLE_FIELD_EMAIL, "", "Email", "Email", E_CARD_SIMPLE_EMAIL_ID_EMAIL, E_CARD_SIMPLE_INTERNAL_TYPE_EMAIL }, - { E_CARD_SIMPLE_FIELD_PHONE_PRIMARY, "", "Primary", "Prim", E_CARD_SIMPLE_PHONE_ID_PRIMARY, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE }, - { E_CARD_SIMPLE_FIELD_PHONE_BUSINESS, "", "Business", "Bus", E_CARD_SIMPLE_PHONE_ID_BUSINESS, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE }, - { E_CARD_SIMPLE_FIELD_PHONE_HOME, "", "Home", "Home", E_CARD_SIMPLE_PHONE_ID_HOME, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE }, - { E_CARD_SIMPLE_FIELD_ORG, "org", "Organization", "Org", 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING }, - { E_CARD_SIMPLE_FIELD_ADDRESS_BUSINESS, "", "Business", "Bus", E_CARD_SIMPLE_ADDRESS_ID_BUSINESS, E_CARD_SIMPLE_INTERNAL_TYPE_ADDRESS }, - { E_CARD_SIMPLE_FIELD_ADDRESS_HOME, "", "Home", "Home", E_CARD_SIMPLE_ADDRESS_ID_HOME, E_CARD_SIMPLE_INTERNAL_TYPE_ADDRESS }, - { E_CARD_SIMPLE_FIELD_PHONE_MOBILE, "", "Mobile", "Mobile", E_CARD_SIMPLE_PHONE_ID_MOBILE, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE }, - { E_CARD_SIMPLE_FIELD_PHONE_CAR, "", "Car", "Car", E_CARD_SIMPLE_PHONE_ID_CAR, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE }, - { E_CARD_SIMPLE_FIELD_PHONE_BUSINESS_FAX, "", "Business Fax", "Bus Fax", E_CARD_SIMPLE_PHONE_ID_BUSINESS_FAX, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE }, - { E_CARD_SIMPLE_FIELD_PHONE_HOME_FAX, "", "Home Fax", "Home Fax", E_CARD_SIMPLE_PHONE_ID_HOME_FAX, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE }, - { E_CARD_SIMPLE_FIELD_PHONE_BUSINESS_2, "", "Business 2", "Bus 2", E_CARD_SIMPLE_PHONE_ID_BUSINESS_2, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE }, - { E_CARD_SIMPLE_FIELD_PHONE_HOME_2, "", "Home 2", "Home 2", E_CARD_SIMPLE_PHONE_ID_HOME_2, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE }, - { E_CARD_SIMPLE_FIELD_PHONE_ISDN, "", "ISDN", "ISDN", E_CARD_SIMPLE_PHONE_ID_ISDN, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE }, - { E_CARD_SIMPLE_FIELD_PHONE_OTHER, "", "Other", "Other", E_CARD_SIMPLE_PHONE_ID_OTHER, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE }, - { E_CARD_SIMPLE_FIELD_PHONE_PAGER, "", "Pager", "Pager", E_CARD_SIMPLE_PHONE_ID_PAGER, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE }, - { E_CARD_SIMPLE_FIELD_ADDRESS_OTHER, "", "Other", "Other", E_CARD_SIMPLE_ADDRESS_ID_OTHER, E_CARD_SIMPLE_INTERNAL_TYPE_ADDRESS }, - { E_CARD_SIMPLE_FIELD_EMAIL_2, "", "Email 2", "Email 2", E_CARD_SIMPLE_EMAIL_ID_EMAIL_2, E_CARD_SIMPLE_INTERNAL_TYPE_EMAIL }, - { E_CARD_SIMPLE_FIELD_EMAIL_3, "", "Email 3", "Email 3", E_CARD_SIMPLE_EMAIL_ID_EMAIL_3, E_CARD_SIMPLE_INTERNAL_TYPE_EMAIL }, - { E_CARD_SIMPLE_FIELD_URL, "url", "Web Site", "Url", 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING }, - { E_CARD_SIMPLE_FIELD_ORG_UNIT, "org_unit", "Department", "Dep", 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING }, - { E_CARD_SIMPLE_FIELD_OFFICE, "office", "Office", "Off", 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING }, - { E_CARD_SIMPLE_FIELD_TITLE, "title", "Title", "Title", 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING }, - { E_CARD_SIMPLE_FIELD_ROLE, "role", "Profession", "Prof", 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING }, - { E_CARD_SIMPLE_FIELD_MANAGER, "manager", "Manager", "Man", 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING }, - { E_CARD_SIMPLE_FIELD_ASSISTANT, "assistant", "Assistant", "Ass", 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING }, - { E_CARD_SIMPLE_FIELD_NICKNAME, "nickname", "Nickname", "Nick", 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING }, - { E_CARD_SIMPLE_FIELD_SPOUSE, "spouse", "Spouse", "Spouse", 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING }, - { E_CARD_SIMPLE_FIELD_NOTE, "note", "Note", "Note", 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING }, - { E_CARD_SIMPLE_FIELD_FBURL, "fburl", "Free-busy URL", "FBUrl", 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING }, - { E_CARD_SIMPLE_FIELD_ANNIVERSARY, "anniversary", "Anniversary", "Anniv", 0, E_CARD_SIMPLE_INTERNAL_TYPE_DATE }, - { E_CARD_SIMPLE_FIELD_BIRTH_DATE, "birth_date", "Birth Date", "", 0, E_CARD_SIMPLE_INTERNAL_TYPE_DATE }, - { E_CARD_SIMPLE_FIELD_MAILER, "mailer", "", "", 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING }, -}; - -static void e_card_simple_init (ECardSimple *simple); -static void e_card_simple_class_init (ECardSimpleClass *klass); - -static void e_card_simple_destroy (GtkObject *object); -static void e_card_simple_set_arg (GtkObject *object, GtkArg *arg, guint arg_id); -static void e_card_simple_get_arg (GtkObject *object, GtkArg *arg, guint arg_id); - -static void fill_in_info(ECardSimple *simple); - -ECardPhoneFlags phone_correspondences[] = { - 0xFF, /* E_CARD_SIMPLE_PHONE_ID_ASSISTANT, */ - E_CARD_PHONE_WORK | E_CARD_PHONE_VOICE, /* E_CARD_SIMPLE_PHONE_ID_BUSINESS, */ - E_CARD_PHONE_WORK | E_CARD_PHONE_VOICE, /* E_CARD_SIMPLE_PHONE_ID_BUSINESS_2, */ - E_CARD_PHONE_WORK | E_CARD_PHONE_FAX, /* E_CARD_SIMPLE_PHONE_ID_BUSINESS_FAX, */ - 0xFF, /* E_CARD_SIMPLE_PHONE_ID_CALLBACK, */ - E_CARD_PHONE_CAR | E_CARD_PHONE_VOICE, /* E_CARD_SIMPLE_PHONE_ID_CAR, */ - 0xFF, /* E_CARD_SIMPLE_PHONE_ID_COMPANY, */ - E_CARD_PHONE_HOME | E_CARD_PHONE_VOICE, /* E_CARD_SIMPLE_PHONE_ID_HOME, */ - E_CARD_PHONE_HOME | E_CARD_PHONE_VOICE, /* E_CARD_SIMPLE_PHONE_ID_HOME_2, */ - E_CARD_PHONE_HOME | E_CARD_PHONE_FAX, /* E_CARD_SIMPLE_PHONE_ID_HOME_FAX, */ - E_CARD_PHONE_ISDN, /* E_CARD_SIMPLE_PHONE_ID_ISDN, */ - E_CARD_PHONE_CELL | E_CARD_PHONE_VOICE, /* E_CARD_SIMPLE_PHONE_ID_MOBILE, */ - E_CARD_PHONE_VOICE, /* E_CARD_SIMPLE_PHONE_ID_OTHER, */ - 0xFF, /* E_CARD_SIMPLE_PHONE_ID_OTHER_FAX, */ - E_CARD_PHONE_PAGER | E_CARD_PHONE_VOICE, /* E_CARD_SIMPLE_PHONE_ID_PAGER, */ - E_CARD_PHONE_PREF, /* E_CARD_SIMPLE_PHONE_ID_PRIMARY, */ - 0xFF, /* E_CARD_SIMPLE_PHONE_ID_RADIO, */ - 0xFF, /* E_CARD_SIMPLE_PHONE_ID_TELEX, */ - 0xFF, /* E_CARD_SIMPLE_PHONE_ID_TTYTTD, */ -}; - -char *phone_names[] = { - NULL, /* E_CARD_SIMPLE_PHONE_ID_ASSISTANT, */ - "Business", - "Business 2", - "Business Fax", - NULL, /* E_CARD_SIMPLE_PHONE_ID_CALLBACK, */ - "Car", - NULL, /* E_CARD_SIMPLE_PHONE_ID_COMPANY, */ - "Home", - "Home 2", - "Home Fax", - "ISDN", - "Mobile", - "Other", - NULL, /* E_CARD_SIMPLE_PHONE_ID_OTHER_FAX, */ - "Pager", - "Primary", - NULL, /* E_CARD_SIMPLE_PHONE_ID_RADIO, */ - NULL, /* E_CARD_SIMPLE_PHONE_ID_TELEX, */ - NULL, /* E_CARD_SIMPLE_PHONE_ID_TTYTTD, */ -}; - -char *phone_short_names[] = { - NULL, /* E_CARD_SIMPLE_PHONE_ID_ASSISTANT, */ - "Bus", - "Bus 2", - "Bus Fax", - NULL, /* E_CARD_SIMPLE_PHONE_ID_CALLBACK, */ - "Car", - NULL, /* E_CARD_SIMPLE_PHONE_ID_COMPANY, */ - "Home", - "Home 2", - "Home Fax", - "ISDN", - "Mob", - "Other", - NULL, /* E_CARD_SIMPLE_PHONE_ID_OTHER_FAX, */ - "Pag", - "Prim", - NULL, /* E_CARD_SIMPLE_PHONE_ID_RADIO, */ - NULL, /* E_CARD_SIMPLE_PHONE_ID_TELEX, */ - NULL, /* E_CARD_SIMPLE_PHONE_ID_TTYTTD, */ -}; - -ECardAddressFlags addr_correspondences[] = { - E_CARD_ADDR_WORK, /* E_CARD_SIMPLE_ADDRESS_ID_BUSINESS, */ - E_CARD_ADDR_HOME, /* E_CARD_SIMPLE_ADDRESS_ID_HOME, */ - E_CARD_ADDR_POSTAL, /* E_CARD_SIMPLE_ADDRESS_ID_OTHER, */ -}; - -char *address_names[] = { - "Business", - "Home", - "Other", -}; - -/** - * e_card_simple_get_type: - * @void: - * - * Registers the &ECardSimple class if necessary, and returns the type ID - * associated to it. - * - * Return value: The type ID of the &ECardSimple class. - **/ -GtkType -e_card_simple_get_type (void) -{ - static GtkType simple_type = 0; - - if (!simple_type) { - GtkTypeInfo simple_info = { - "ECardSimple", - sizeof (ECardSimple), - sizeof (ECardSimpleClass), - (GtkClassInitFunc) e_card_simple_class_init, - (GtkObjectInitFunc) e_card_simple_init, - NULL, /* reserved_1 */ - NULL, /* reserved_2 */ - (GtkClassInitFunc) NULL - }; - - simple_type = gtk_type_unique (gtk_object_get_type (), &simple_info); - } - - return simple_type; -} - -/** - * e_card_simple_new: - * @VCard: a string in vCard format - * - * Returns: a new #ECardSimple that wraps the @VCard. - */ -ECardSimple * -e_card_simple_new (ECard *card) -{ - ECardSimple *simple = E_CARD_SIMPLE(gtk_type_new(e_card_simple_get_type())); - gtk_object_set(GTK_OBJECT(simple), - "card", card, - NULL); - return simple; -} - -ECardSimple *e_card_simple_duplicate(ECardSimple *simple) -{ - char *vcard = e_card_simple_get_vcard(simple); - ECard *card = e_card_new(vcard); - ECardSimple *new_simple = e_card_simple_new(card); - g_free (vcard); - return new_simple; -} - -/** - * e_card_simple_get_id: - * @simple: an #ECardSimple - * - * Returns: a string representing the id of the simple, which is unique - * within its book. - */ -char * -e_card_simple_get_id (ECardSimple *simple) -{ - if (simple->card) - return e_card_get_id(simple->card); - else - return ""; -} - -/** - * e_card_simple_get_id: - * @simple: an #ECardSimple - * @id: a id in string format - * - * Sets the identifier of a simple, which should be unique within its - * book. - */ -void -e_card_simple_set_id (ECardSimple *simple, const char *id) -{ - if ( simple->card ) - e_card_set_id(simple->card, id); -} - -/** - * e_card_simple_get_vcard: - * @simple: an #ECardSimple - * - * Returns: a string in vcard format, which is wrapped by the @simple. - */ -char -*e_card_simple_get_vcard (ECardSimple *simple) -{ - if (simple->card) - return e_card_get_vcard(simple->card); - else - return g_strdup(""); -} - -static void -e_card_simple_class_init (ECardSimpleClass *klass) -{ - GtkObjectClass *object_class; - - object_class = GTK_OBJECT_CLASS(klass); - - gtk_object_add_arg_type ("ECardSimple::card", - GTK_TYPE_OBJECT, GTK_ARG_READWRITE, ARG_CARD); -#if 0 - gtk_object_add_arg_type ("ECardSimple::file_as", - GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_FILE_AS); - gtk_object_add_arg_type ("ECardSimple::full_name", - GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_FULL_NAME); - gtk_object_add_arg_type ("ECardSimple::name", - GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_NAME); - gtk_object_add_arg_type ("ECardSimple::address", - GTK_TYPE_OBJECT, GTK_ARG_READABLE, ARG_ADDRESS); - gtk_object_add_arg_type ("ECardSimple::address_label", - GTK_TYPE_OBJECT, GTK_ARG_READABLE, ARG_ADDRESS_LABEL); - gtk_object_add_arg_type ("ECardSimple::phone", - GTK_TYPE_OBJECT, GTK_ARG_READABLE, ARG_PHONE); - gtk_object_add_arg_type ("ECardSimple::email", - GTK_TYPE_OBJECT, GTK_ARG_READABLE, ARG_EMAIL); - gtk_object_add_arg_type ("ECardSimple::birth_date", - GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_BIRTH_DATE); - gtk_object_add_arg_type ("ECardSimple::url", - GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_URL); - gtk_object_add_arg_type ("ECardSimple::org", - GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_ORG); - gtk_object_add_arg_type ("ECardSimple::org_unit", - GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_ORG_UNIT); - gtk_object_add_arg_type ("ECardSimple::office", - GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_OFFICE); - gtk_object_add_arg_type ("ECardSimple::title", - GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_TITLE); - gtk_object_add_arg_type ("ECardSimple::role", - GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_ROLE); - gtk_object_add_arg_type ("ECardSimple::manager", - GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_MANAGER); - gtk_object_add_arg_type ("ECardSimple::assistant", - GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_ASSISTANT); - gtk_object_add_arg_type ("ECardSimple::nickname", - GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_NICKNAME); - gtk_object_add_arg_type ("ECardSimple::spouse", - GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_SPOUSE); - gtk_object_add_arg_type ("ECardSimple::anniversary", - GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_ANNIVERSARY); - gtk_object_add_arg_type ("ECardSimple::fburl", - GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_FBURL); - gtk_object_add_arg_type ("ECardSimple::note", - GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_NOTE); - gtk_object_add_arg_type ("ECardSimple::id", - GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_ID); -#endif - - object_class->destroy = e_card_simple_destroy; - object_class->get_arg = e_card_simple_get_arg; - object_class->set_arg = e_card_simple_set_arg; -} - -/* - * ECardSimple lifecycle management and vcard loading/saving. - */ - -static void -e_card_simple_destroy (GtkObject *object) -{ - ECardSimple *simple; - int i; - - simple = E_CARD_SIMPLE (object); - - if (simple->card) - gtk_object_unref(GTK_OBJECT(simple->card)); - g_list_foreach(simple->temp_fields, (GFunc) g_free, NULL); - g_list_free(simple->temp_fields); - simple->temp_fields = NULL; - - for(i = 0; i < E_CARD_SIMPLE_PHONE_ID_LAST; i++) - g_free(simple->phone[i]); - for(i = 0; i < E_CARD_SIMPLE_EMAIL_ID_LAST; i++) - g_free(simple->email[i]); - for(i = 0; i < E_CARD_SIMPLE_ADDRESS_ID_LAST; i++) - g_free(simple->address[i]); -} - - -/* Set_arg handler for the simple */ -static void -e_card_simple_set_arg (GtkObject *object, GtkArg *arg, guint arg_id) -{ - ECardSimple *simple; - - simple = E_CARD_SIMPLE (object); - - switch (arg_id) { - case ARG_CARD: - if (simple->card) - gtk_object_unref(GTK_OBJECT(simple->card)); - g_list_foreach(simple->temp_fields, (GFunc) g_free, NULL); - g_list_free(simple->temp_fields); - simple->temp_fields = NULL; - if (GTK_VALUE_OBJECT(*arg)) - simple->card = E_CARD(GTK_VALUE_OBJECT(*arg)); - else - simple->card = NULL; - if(simple->card) - gtk_object_ref(GTK_OBJECT(simple->card)); - fill_in_info(simple); - break; -#if 0 - case ARG_FILE_AS: - if (simple->file_as) - g_free(simple->file_as); - simple->file_as = g_strdup(GTK_VALUE_STRING(*arg)); - break; - case ARG_FULL_NAME: - if ( simple->fname ) - g_free(simple->fname); - simple->fname = g_strdup(GTK_VALUE_STRING(*arg)); - break; - case ARG_NAME: - if ( simple->name ) - e_card_simple_name_free(simple->name); - simple->name = GTK_VALUE_POINTER(*arg); - break; - case ARG_BIRTH_DATE: - if ( simple->bday ) - g_free(simple->bday); - simple->bday = GTK_VALUE_POINTER(*arg); - break; - case ARG_URL: - if ( simple->url ) - g_free(simple->url); - simple->url = g_strdup(GTK_VALUE_STRING(*arg)); - break; - case ARG_ORG: - if (simple->org) - g_free(simple->org); - simple->org = g_strdup(GTK_VALUE_STRING(*arg)); - break; - case ARG_ORG_UNIT: - if (simple->org_unit) - g_free(simple->org_unit); - simple->org_unit = g_strdup(GTK_VALUE_STRING(*arg)); - break; - case ARG_OFFICE: - if (simple->office) - g_free(simple->office); - simple->office = g_strdup(GTK_VALUE_STRING(*arg)); - break; - case ARG_TITLE: - if ( simple->title ) - g_free(simple->title); - simple->title = g_strdup(GTK_VALUE_STRING(*arg)); - break; - case ARG_ROLE: - if (simple->role) - g_free(simple->role); - simple->role = g_strdup(GTK_VALUE_STRING(*arg)); - break; - case ARG_MANAGER: - if (simple->manager) - g_free(simple->manager); - simple->manager = g_strdup(GTK_VALUE_STRING(*arg)); - break; - case ARG_ASSISTANT: - if (simple->assistant) - g_free(simple->assistant); - simple->assistant = g_strdup(GTK_VALUE_STRING(*arg)); - break; - case ARG_NICKNAME: - if (simple->nickname) - g_free(simple->nickname); - simple->nickname = g_strdup(GTK_VALUE_STRING(*arg)); - break; - case ARG_SPOUSE: - if (simple->spouse) - g_free(simple->spouse); - simple->spouse = g_strdup(GTK_VALUE_STRING(*arg)); - break; - case ARG_ANNIVERSARY: - if ( simple->anniversary ) - g_free(simple->anniversary); - simple->anniversary = GTK_VALUE_POINTER(*arg); - break; - case ARG_FBURL: - if (simple->fburl) - g_free(simple->fburl); - simple->fburl = g_strdup(GTK_VALUE_STRING(*arg)); - break; - case ARG_NOTE: - if (simple->note) - g_free (simple->note); - simple->note = g_strdup(GTK_VALUE_STRING(*arg)); - break; - case ARG_ID: - if (simple->id) - g_free(simple->id); - simple->id = g_strdup(GTK_VALUE_STRING(*arg)); - break; -#endif - default: - return; - } -} - -/* Get_arg handler for the simple */ -static void -e_card_simple_get_arg (GtkObject *object, GtkArg *arg, guint arg_id) -{ - ECardSimple *simple; - - simple = E_CARD_SIMPLE (object); - - switch (arg_id) { - case ARG_CARD: - e_card_simple_sync_card(simple); - if (simple->card) - GTK_VALUE_OBJECT (*arg) = GTK_OBJECT(simple->card); - else - GTK_VALUE_OBJECT (*arg) = NULL; - break; -#if 0 - case ARG_FILE_AS: - GTK_VALUE_STRING (*arg); - break; - case ARG_FULL_NAME: - GTK_VALUE_STRING (*arg) = simple->fname; - break; - case ARG_NAME: - GTK_VALUE_POINTER(*arg) = simple->name; - break; - case ARG_ADDRESS: - if (!simple->address) - simple->address = e_card_simple_list_new((ECardSimpleListCopyFunc) e_card_simple_delivery_address_copy, - (ECardSimpleListFreeFunc) e_card_simple_delivery_address_free, - NULL); - GTK_VALUE_OBJECT(*arg) = GTK_OBJECT(simple->address); - break; - case ARG_ADDRESS_LABEL: - if (!simple->address_label) - simple->address_label = e_card_simple_list_new((ECardSimpleListCopyFunc) e_card_simple_address_label_copy, - (ECardSimpleListFreeFunc) e_card_simple_address_label_free, - NULL); - GTK_VALUE_OBJECT(*arg) = GTK_OBJECT(simple->address_label); - break; - case ARG_PHONE: - if (!simple->phone) - simple->phone = e_card_simple_list_new((ECardSimpleListCopyFunc) e_card_simple_phone_copy, - (ECardSimpleListFreeFunc) e_card_simple_phone_free, - NULL); - GTK_VALUE_OBJECT(*arg) = GTK_OBJECT(simple->phone); - break; - case ARG_EMAIL: - if (!simple->email) - simple->email = e_card_simple_list_new((ECardSimpleListCopyFunc) g_strdup, - (ECardSimpleListFreeFunc) g_free, - NULL); - GTK_VALUE_OBJECT(*arg) = GTK_OBJECT(simple->email); - break; - case ARG_BIRTH_DATE: - GTK_VALUE_POINTER(*arg) = simple->bday; - break; - case ARG_URL: - GTK_VALUE_STRING(*arg) = simple->url; - break; - case ARG_ORG: - GTK_VALUE_STRING(*arg) = simple->org; - break; - case ARG_ORG_UNIT: - GTK_VALUE_STRING(*arg) = simple->org_unit; - break; - case ARG_OFFICE: - GTK_VALUE_STRING(*arg) = simple->office; - break; - case ARG_TITLE: - GTK_VALUE_STRING(*arg) = simple->title; - break; - case ARG_ROLE: - GTK_VALUE_STRING(*arg) = simple->role; - break; - case ARG_MANAGER: - GTK_VALUE_STRING(*arg) = simple->manager; - break; - case ARG_ASSISTANT: - GTK_VALUE_STRING(*arg) = simple->assistant; - break; - case ARG_NICKNAME: - GTK_VALUE_STRING(*arg) = simple->nickname; - break; - case ARG_SPOUSE: - GTK_VALUE_STRING(*arg) = simple->spouse; - break; - case ARG_ANNIVERSARY: - GTK_VALUE_POINTER(*arg) = simple->anniversary; - break; - case ARG_FBURL: - GTK_VALUE_STRING(*arg) = simple->fburl; - break; - case ARG_NOTE: - GTK_VALUE_STRING(*arg) = simple->note; - break; - case ARG_ID: - GTK_VALUE_STRING(*arg) = simple->id; - break; -#endif - default: - arg->type = GTK_TYPE_INVALID; - break; - } -} - - -/** - * e_card_simple_init: - */ -static void -e_card_simple_init (ECardSimple *simple) -{ - int i; - simple->card = NULL; - for(i = 0; i < E_CARD_SIMPLE_PHONE_ID_LAST; i++) - simple->phone[i] = NULL; - for(i = 0; i < E_CARD_SIMPLE_EMAIL_ID_LAST; i++) - simple->email[i] = NULL; - for(i = 0; i < E_CARD_SIMPLE_ADDRESS_ID_LAST; i++) - simple->address[i] = NULL; - simple->temp_fields = NULL; -} - -static void -fill_in_info(ECardSimple *simple) -{ - ECard *card = simple->card; - if (card) { - ECardList *address_list; - ECardList *phone_list; - ECardList *email_list; - const ECardPhone *phone; - const char *email; - const ECardAddrLabel *address; - int i; - - ECardIterator *iterator; - - gtk_object_get(GTK_OBJECT(card), - "address_label", &address_list, - "phone", &phone_list, - "email", &email_list, - NULL); - for (i = 0; i < E_CARD_SIMPLE_PHONE_ID_LAST; i++) { - e_card_phone_free(simple->phone[i]); - simple->phone[i] = NULL; - } - for (iterator = e_card_list_get_iterator(phone_list); e_card_iterator_is_valid(iterator); e_card_iterator_next(iterator)) { - phone = e_card_iterator_get(iterator); - for (i = 0; i < E_CARD_SIMPLE_PHONE_ID_LAST; i ++) { - if (((phone->flags & phone_correspondences[i]) == phone_correspondences[i]) && (simple->phone[i] == NULL)) { - simple->phone[i] = e_card_phone_copy(phone); - break; - } - } - } - gtk_object_unref(GTK_OBJECT(iterator)); - - for (i = 0; i < E_CARD_SIMPLE_EMAIL_ID_LAST; i++) { - g_free(simple->email[i]); - simple->email[i] = NULL; - } - for (iterator = e_card_list_get_iterator(email_list); e_card_iterator_is_valid(iterator); e_card_iterator_next(iterator)) { - email = e_card_iterator_get(iterator); - for (i = 0; i < E_CARD_SIMPLE_EMAIL_ID_LAST; i ++) { - if ((simple->email[i] == NULL)) { - simple->email[i] = g_strdup(email); - break; - } - } - } - gtk_object_unref(GTK_OBJECT(iterator)); - - for (i = 0; i < E_CARD_SIMPLE_ADDRESS_ID_LAST; i++) { - e_card_address_label_free(simple->address[i]); - simple->address[i] = NULL; - } - for (iterator = e_card_list_get_iterator(address_list); e_card_iterator_is_valid(iterator); e_card_iterator_next(iterator)) { - address = e_card_iterator_get(iterator); - for (i = 0; i < E_CARD_SIMPLE_ADDRESS_ID_LAST; i ++) { - if (((address->flags & addr_correspondences[i]) == addr_correspondences[i]) && (simple->address[i] == NULL)) { - simple->address[i] = e_card_address_label_copy(address); - break; - } - } - } - gtk_object_unref(GTK_OBJECT(iterator)); - } -} - -void -e_card_simple_sync_card(ECardSimple *simple) -{ - ECard *card = simple->card; - if (card) { - ECardList *address_list; - ECardList *phone_list; - ECardList *email_list; - const ECardPhone *phone; - const ECardAddrLabel *address; - const char *email; - int i; - int iterator_next = 1; - - ECardIterator *iterator; - - gtk_object_get(GTK_OBJECT(card), - "address_label", &address_list, - "phone", &phone_list, - "email", &email_list, - NULL); - - for (iterator = e_card_list_get_iterator(phone_list); e_card_iterator_is_valid(iterator); iterator_next ? e_card_iterator_next(iterator) : FALSE ) { - int i; - phone = e_card_iterator_get(iterator); - iterator_next = 1; - for (i = 0; i < E_CARD_SIMPLE_PHONE_ID_LAST; i ++) { - if ((phone->flags & phone_correspondences[i]) == phone_correspondences[i]) { - if (simple->phone[i]) { - simple->phone[i]->flags = phone_correspondences[i]; - if (simple->phone[i]->number && *simple->phone[i]->number) { - e_card_iterator_set(iterator, simple->phone[i]); - } else { - e_card_iterator_delete(iterator); - iterator_next = 0; - } - e_card_phone_free(simple->phone[i]); - simple->phone[i] = NULL; - break; - } - } - } - } - gtk_object_unref(GTK_OBJECT(iterator)); - for (i = 0; i < E_CARD_SIMPLE_PHONE_ID_LAST; i ++) { - if (simple->phone[i]) { - simple->phone[i]->flags = phone_correspondences[i]; - e_card_list_append(phone_list, simple->phone[i]); - e_card_phone_free(simple->phone[i]); - simple->phone[i] = NULL; - } - } - - for (iterator = e_card_list_get_iterator(email_list); e_card_iterator_is_valid(iterator); iterator_next ? e_card_iterator_next(iterator) : FALSE ) { - int i; - email = e_card_iterator_get(iterator); - iterator_next = 1; - for (i = 0; i < E_CARD_SIMPLE_EMAIL_ID_LAST; i ++) { - if (simple->email[i]) { - if (*simple->email[i]) { - e_card_iterator_set(iterator, simple->email[i]); - } else { - e_card_iterator_delete(iterator); - iterator_next = 0; - } - g_free(simple->email[i]); - simple->email[i] = NULL; - break; - } - } - } - gtk_object_unref(GTK_OBJECT(iterator)); - for (i = 0; i < E_CARD_SIMPLE_EMAIL_ID_LAST; i ++) { - if (simple->email[i]) { - e_card_list_append(email_list, simple->email[i]); - g_free(simple->email[i]); - simple->email[i] = NULL; - } - } - - for (iterator = e_card_list_get_iterator(address_list); e_card_iterator_is_valid(iterator); iterator_next ? e_card_iterator_next(iterator) : FALSE ) { - int i; - address = e_card_iterator_get(iterator); - iterator_next = 1; - for (i = 0; i < E_CARD_SIMPLE_ADDRESS_ID_LAST; i ++) { - if ((address->flags & addr_correspondences[i]) == addr_correspondences[i]) { - if (simple->address[i]) { - simple->address[i]->flags = addr_correspondences[i]; - if (simple->address[i]->data && *simple->address[i]->data) { - e_card_iterator_set(iterator, simple->address[i]); - } else { - e_card_iterator_delete(iterator); - iterator_next = 0; - } - e_card_address_label_free(simple->address[i]); - simple->address[i] = NULL; - break; - } - } - } - } - gtk_object_unref(GTK_OBJECT(iterator)); - for (i = 0; i < E_CARD_SIMPLE_ADDRESS_ID_LAST; i ++) { - if (simple->address[i]) { - simple->address[i]->flags = addr_correspondences[i]; - e_card_list_append(address_list, simple->address[i]); - e_card_address_label_free(simple->address[i]); - simple->address[i] = NULL; - } - } - fill_in_info(simple); - } -} - -const ECardPhone *e_card_simple_get_phone (ECardSimple *simple, - ECardSimplePhoneId id) -{ - return simple->phone[id]; -} - -const char *e_card_simple_get_email (ECardSimple *simple, - ECardSimpleEmailId id) -{ - return simple->email[id]; -} - -const ECardAddrLabel *e_card_simple_get_address (ECardSimple *simple, - ECardSimpleAddressId id) -{ - return simple->address[id]; -} - -void e_card_simple_set_phone (ECardSimple *simple, - ECardSimplePhoneId id, - const ECardPhone *phone) -{ - if (simple->phone[id]) - e_card_phone_free(simple->phone[id]); - simple->phone[id] = e_card_phone_copy(phone); -} - -void e_card_simple_set_email (ECardSimple *simple, - ECardSimpleEmailId id, - const char *email) -{ - if (simple->email[id]) - g_free(simple->email[id]); - simple->email[id] = g_strdup(email); -} - -void e_card_simple_set_address (ECardSimple *simple, - ECardSimpleAddressId id, - const ECardAddrLabel *address) -{ - if (simple->address[id]) - e_card_address_label_free(simple->address[id]); - simple->address[id] = e_card_address_label_copy(address); -} - -const char *e_card_simple_get_const (ECardSimple *simple, - ECardSimpleField field) -{ - char *ret_val = e_card_simple_get(simple, field); - if (ret_val) - simple->temp_fields = g_list_prepend(simple->temp_fields, ret_val); - return ret_val; -} - -char *e_card_simple_get (ECardSimple *simple, - ECardSimpleField field) -{ - ECardSimpleInternalType type = field_data[field].type; - const ECardAddrLabel *addr; - const ECardPhone *phone; - const char *string; - ECardDate *date; - switch(type) { - case E_CARD_SIMPLE_INTERNAL_TYPE_STRING: - gtk_object_get(GTK_OBJECT(simple->card), - field_data[field].ecard_field, &string, - NULL); - return g_strdup(string); - case E_CARD_SIMPLE_INTERNAL_TYPE_DATE: - gtk_object_get(GTK_OBJECT(simple->card), - field_data[field].ecard_field, &date, - NULL); - return NULL; /* FIXME!!!! */ - case E_CARD_SIMPLE_INTERNAL_TYPE_ADDRESS: - addr = e_card_simple_get_address(simple, - field_data[field].list_type_index); - if (addr) - return g_strdup(addr->data); - else - return NULL; - case E_CARD_SIMPLE_INTERNAL_TYPE_PHONE: - phone = e_card_simple_get_phone(simple, - field_data[field].list_type_index); - if (phone) - return g_strdup(phone->number); - else - return NULL; - case E_CARD_SIMPLE_INTERNAL_TYPE_EMAIL: - string = e_card_simple_get_email(simple, - field_data[field].list_type_index); - return g_strdup(string); - default: - return NULL; - } -} - -static char * -name_to_style(const ECardName *name, char *company, int style) -{ - char *string; - char *strings[4], **stringptr; - char *substring; - switch (style) { - case 0: - stringptr = strings; - if (name->family && *name->family) - *(stringptr++) = name->family; - if (name->given && *name->given) - *(stringptr++) = name->given; - *stringptr = NULL; - string = g_strjoinv(", ", strings); - break; - case 1: - stringptr = strings; - if (name->given && *name->given) - *(stringptr++) = name->given; - if (name->family && *name->family) - *(stringptr++) = name->family; - *stringptr = NULL; - string = g_strjoinv(" ", strings); - break; - case 2: - string = g_strdup(company); - break; - case 3: /* Fall Through */ - case 4: - stringptr = strings; - if (name->family && *name->family) - *(stringptr++) = name->family; - if (name->given && *name->given) - *(stringptr++) = name->given; - *stringptr = NULL; - substring = g_strjoinv(", ", strings); - if (!(company && *company)) - company = ""; - if (style == 3) - string = g_strdup_printf("%s (%s)", substring, company); - else - string = g_strdup_printf("%s (%s)", company, substring); - g_free(substring); - break; - default: - string = g_strdup(""); - } - return string; -} - -static int -file_as_get_style (ECardSimple *simple) -{ - char *filestring = e_card_simple_get(simple, E_CARD_SIMPLE_FIELD_FILE_AS); - char *trystring; - char *full_name = e_card_simple_get(simple, E_CARD_SIMPLE_FIELD_FULL_NAME); - char *company = e_card_simple_get(simple, E_CARD_SIMPLE_FIELD_ORG); - ECardName *name = NULL; - int i; - int style; - style = 0; - if (!full_name) - full_name = g_strdup(""); - if (!company) - company = g_strdup(""); - if (filestring) { - - name = e_card_name_from_string(full_name); - - if (!name) { - goto end; - } - - style = -1; - - for (i = 0; i < 5; i++) { - trystring = name_to_style(name, company, i); - if (!strcmp(trystring, filestring)) { - g_free(trystring); - style = i; - goto end; - } - g_free(trystring); - } - } - end: - - g_free(filestring); - g_free(full_name); - g_free(company); - if (name) - e_card_name_free(name); - - return style; -} - -static void -file_as_set_style(ECardSimple *simple, int style) -{ - if (style != -1) { - char *string; - char *full_name = e_card_simple_get(simple, E_CARD_SIMPLE_FIELD_FULL_NAME); - char *company = e_card_simple_get(simple, E_CARD_SIMPLE_FIELD_ORG); - ECardName *name; - - if (!full_name) - full_name = g_strdup(""); - if (!company) - company = g_strdup(""); - name = e_card_name_from_string(full_name); - if (name) { - string = name_to_style(name, company, style); - e_card_simple_set(simple, E_CARD_SIMPLE_FIELD_FILE_AS, string); - g_free(string); - } - g_free(full_name); - g_free(company); - e_card_name_free(name); - } -} - -void e_card_simple_set (ECardSimple *simple, - ECardSimpleField field, - const char *data) -{ - ECardSimpleInternalType type = field_data[field].type; - ECardAddrLabel *address; - ECardPhone *phone; - int style; - switch (field) { - case E_CARD_SIMPLE_FIELD_FULL_NAME: - case E_CARD_SIMPLE_FIELD_ORG: - style = file_as_get_style(simple); - gtk_object_set(GTK_OBJECT(simple->card), - field_data[field].ecard_field, data, - NULL); - file_as_set_style(simple, style); - break; - default: - switch(type) { - case E_CARD_SIMPLE_INTERNAL_TYPE_STRING: - gtk_object_set(GTK_OBJECT(simple->card), - field_data[field].ecard_field, data, - NULL); - break; - case E_CARD_SIMPLE_INTERNAL_TYPE_DATE: - break; /* FIXME!!!! */ - case E_CARD_SIMPLE_INTERNAL_TYPE_ADDRESS: - address = e_card_address_label_new(); - address->data = (char *) data; - e_card_simple_set_address(simple, - field_data[field].list_type_index, - address); - address->data = NULL; - e_card_address_label_free(address); - break; - case E_CARD_SIMPLE_INTERNAL_TYPE_PHONE: - phone = e_card_phone_new(); - phone->number = (char *) data; - e_card_simple_set_phone(simple, - field_data[field].list_type_index, - phone); - phone->number = NULL; - e_card_phone_free(phone); - break; - case E_CARD_SIMPLE_INTERNAL_TYPE_EMAIL: - e_card_simple_set_email(simple, - field_data[field].list_type_index, - data); - break; - } - break; - } -} - -ECardSimpleType e_card_simple_type (ECardSimple *simple, - ECardSimpleField field) -{ - ECardSimpleInternalType type = field_data[field].type; - switch(type) { - case E_CARD_SIMPLE_INTERNAL_TYPE_STRING: - case E_CARD_SIMPLE_INTERNAL_TYPE_ADDRESS: - case E_CARD_SIMPLE_INTERNAL_TYPE_PHONE: - case E_CARD_SIMPLE_INTERNAL_TYPE_EMAIL: - default: - return E_CARD_SIMPLE_TYPE_STRING; - case E_CARD_SIMPLE_INTERNAL_TYPE_DATE: - return E_CARD_SIMPLE_TYPE_DATE; - } -} - -const char *e_card_simple_get_name (ECardSimple *simple, - ECardSimpleField field) -{ - return field_data[field].name; -} - -const char *e_card_simple_get_short_name (ECardSimple *simple, - ECardSimpleField field) -{ - return field_data[field].short_name; -} - -void e_card_simple_arbitrary_foreach (ECardSimple *simple, - ECardSimpleArbitraryCallback *callback, - gpointer closure) -{ - if (simple->card) { - ECardList *list; - ECardIterator *iterator; - gtk_object_get(GTK_OBJECT(simple->card), - "arbitrary", &list, - NULL); - for (iterator = e_card_list_get_iterator(list); e_card_iterator_is_valid(iterator); e_card_iterator_next(iterator)) { - const ECardArbitrary *arbitrary = e_card_iterator_get(iterator); - if (callback) - (*callback) (arbitrary, closure); - } - } -} - -const ECardArbitrary *e_card_simple_get_arbitrary (ECardSimple *simple, - const char *key) -{ - if (simple->card) { - ECardList *list; - ECardIterator *iterator; - gtk_object_get(GTK_OBJECT(simple->card), - "arbitrary", &list, - NULL); - for (iterator = e_card_list_get_iterator(list); e_card_iterator_is_valid(iterator); e_card_iterator_next(iterator)) { - const ECardArbitrary *arbitrary = e_card_iterator_get(iterator); - if (!strcasecmp(arbitrary->key, key)) - return arbitrary; - } - } - return NULL; -} - -/* Any of these except key can be NULL */ -void e_card_simple_set_arbitrary (ECardSimple *simple, - const char *key, - const char *type, - const char *value) -{ - if (simple->card) { - ECardArbitrary *new_arb; - ECardList *list; - ECardIterator *iterator; - gtk_object_get(GTK_OBJECT(simple->card), - "arbitrary", &list, - NULL); - for (iterator = e_card_list_get_iterator(list); e_card_iterator_is_valid(iterator); e_card_iterator_next(iterator)) { - const ECardArbitrary *arbitrary = e_card_iterator_get(iterator); - if (!strcasecmp(arbitrary->key, key)) { - new_arb = e_card_arbitrary_new(); - new_arb->key = g_strdup(key); - new_arb->type = g_strdup(type); - new_arb->value = g_strdup(value); - e_card_iterator_set(iterator, new_arb); - e_card_arbitrary_free(new_arb); - return; - } - } - new_arb = e_card_arbitrary_new(); - new_arb->key = g_strdup(key); - new_arb->type = g_strdup(type); - new_arb->value = g_strdup(value); - e_card_list_append(list, new_arb); - e_card_arbitrary_free(new_arb); - } -} - diff --git a/addressbook/backend/ebook/e-card-simple.h b/addressbook/backend/ebook/e-card-simple.h deleted file mode 100644 index 72351c571a..0000000000 --- a/addressbook/backend/ebook/e-card-simple.h +++ /dev/null @@ -1,197 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * Authors: - * Chris Lahey - * Arturo Espinosa - * Nat Friedman (nat@helixcode.com) - * - * Copyright (C) 2000 Helix Code, Inc. - * Copyright (C) 1999 The Free Software Foundation - */ - -#ifndef __E_CARD_SIMPLE_H__ -#define __E_CARD_SIMPLE_H__ - -#include -#include -#include -#include -#include -#include - -#define E_TYPE_CARD_SIMPLE (e_card_simple_get_type ()) -#define E_CARD_SIMPLE(obj) (GTK_CHECK_CAST ((obj), E_TYPE_CARD_SIMPLE, ECardSimple)) -#define E_CARD_SIMPLE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_CARD_SIMPLE, ECardSimpleClass)) -#define E_IS_CARD_SIMPLE(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_CARD_SIMPLE)) -#define E_IS_CARD_SIMPLE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), E_TYPE_CARD_SIMPLE)) - -typedef enum _ECardSimplePhoneId ECardSimplePhoneId; -typedef enum _ECardSimpleEmailId ECardSimpleEmailId; -typedef enum _ECardSimpleAddressId ECardSimpleAddressId; -typedef enum _ECardSimpleType ECardSimpleType; -typedef enum _ECardSimpleField ECardSimpleField; - -enum _ECardSimplePhoneId { - E_CARD_SIMPLE_PHONE_ID_ASSISTANT, - E_CARD_SIMPLE_PHONE_ID_BUSINESS, - E_CARD_SIMPLE_PHONE_ID_BUSINESS_2, - E_CARD_SIMPLE_PHONE_ID_BUSINESS_FAX, - E_CARD_SIMPLE_PHONE_ID_CALLBACK, - E_CARD_SIMPLE_PHONE_ID_CAR, - E_CARD_SIMPLE_PHONE_ID_COMPANY, - E_CARD_SIMPLE_PHONE_ID_HOME, - E_CARD_SIMPLE_PHONE_ID_HOME_2, - E_CARD_SIMPLE_PHONE_ID_HOME_FAX, - E_CARD_SIMPLE_PHONE_ID_ISDN, - E_CARD_SIMPLE_PHONE_ID_MOBILE, - E_CARD_SIMPLE_PHONE_ID_OTHER, - E_CARD_SIMPLE_PHONE_ID_OTHER_FAX, - E_CARD_SIMPLE_PHONE_ID_PAGER, - E_CARD_SIMPLE_PHONE_ID_PRIMARY, - E_CARD_SIMPLE_PHONE_ID_RADIO, - E_CARD_SIMPLE_PHONE_ID_TELEX, - E_CARD_SIMPLE_PHONE_ID_TTYTTD, - E_CARD_SIMPLE_PHONE_ID_LAST -}; - -/* We need HOME and WORK email addresses here. */ -enum _ECardSimpleEmailId { - E_CARD_SIMPLE_EMAIL_ID_EMAIL, - E_CARD_SIMPLE_EMAIL_ID_EMAIL_2, - E_CARD_SIMPLE_EMAIL_ID_EMAIL_3, - E_CARD_SIMPLE_EMAIL_ID_LAST -}; - -/* Should this include (BILLING/SHIPPING)? */ -enum _ECardSimpleAddressId { - E_CARD_SIMPLE_ADDRESS_ID_BUSINESS, - E_CARD_SIMPLE_ADDRESS_ID_HOME, - E_CARD_SIMPLE_ADDRESS_ID_OTHER, - E_CARD_SIMPLE_ADDRESS_ID_LAST -}; - -enum _ECardSimpleType { - E_CARD_SIMPLE_TYPE_STRING, - E_CARD_SIMPLE_TYPE_DATE, -}; - -enum _ECardSimpleField { - E_CARD_SIMPLE_FIELD_FILE_AS, - E_CARD_SIMPLE_FIELD_FULL_NAME, - E_CARD_SIMPLE_FIELD_EMAIL, - E_CARD_SIMPLE_FIELD_PHONE_PRIMARY, - E_CARD_SIMPLE_FIELD_PHONE_BUSINESS, - E_CARD_SIMPLE_FIELD_PHONE_HOME, - E_CARD_SIMPLE_FIELD_ORG, - E_CARD_SIMPLE_FIELD_ADDRESS_BUSINESS, - E_CARD_SIMPLE_FIELD_ADDRESS_HOME, - E_CARD_SIMPLE_FIELD_PHONE_MOBILE, - E_CARD_SIMPLE_FIELD_PHONE_CAR, - E_CARD_SIMPLE_FIELD_PHONE_BUSINESS_FAX, - E_CARD_SIMPLE_FIELD_PHONE_HOME_FAX, - E_CARD_SIMPLE_FIELD_PHONE_BUSINESS_2, - E_CARD_SIMPLE_FIELD_PHONE_HOME_2, - E_CARD_SIMPLE_FIELD_PHONE_ISDN, - E_CARD_SIMPLE_FIELD_PHONE_OTHER, - E_CARD_SIMPLE_FIELD_PHONE_PAGER, - E_CARD_SIMPLE_FIELD_ADDRESS_OTHER, - E_CARD_SIMPLE_FIELD_EMAIL_2, - E_CARD_SIMPLE_FIELD_EMAIL_3, - E_CARD_SIMPLE_FIELD_URL, - E_CARD_SIMPLE_FIELD_ORG_UNIT, - E_CARD_SIMPLE_FIELD_OFFICE, - E_CARD_SIMPLE_FIELD_TITLE, - E_CARD_SIMPLE_FIELD_ROLE, - E_CARD_SIMPLE_FIELD_MANAGER, - E_CARD_SIMPLE_FIELD_ASSISTANT, - E_CARD_SIMPLE_FIELD_NICKNAME, - E_CARD_SIMPLE_FIELD_SPOUSE, - E_CARD_SIMPLE_FIELD_NOTE, - E_CARD_SIMPLE_FIELD_FBURL, - E_CARD_SIMPLE_FIELD_ANNIVERSARY, - E_CARD_SIMPLE_FIELD_BIRTH_DATE, - E_CARD_SIMPLE_FIELD_MAILER, - E_CARD_SIMPLE_FIELD_LAST -}; - -typedef struct _ECardSimple ECardSimple; -typedef struct _ECardSimpleClass ECardSimpleClass; - -struct _ECardSimple { - GtkObject object; - ECard *card; - - GList *temp_fields; - - ECardPhone *phone[E_CARD_SIMPLE_PHONE_ID_LAST]; - char *email[E_CARD_SIMPLE_EMAIL_ID_LAST]; - ECardAddrLabel *address[E_CARD_SIMPLE_ADDRESS_ID_LAST]; -}; - -struct _ECardSimpleClass { - GtkObjectClass parent_class; -}; - -typedef void (*ECardSimpleArbitraryCallback) (const ECardArbitrary *arbitrary, gpointer closure); - -ECardSimple *e_card_simple_new (ECard *card); -char *e_card_simple_get_id (ECardSimple *simple); -void e_card_simple_set_id (ECardSimple *simple, - const gchar *character); -char *e_card_simple_get_vcard (ECardSimple *simple); - -ECardSimple *e_card_simple_duplicate (ECardSimple *simple); - -char *e_card_simple_get (ECardSimple *simple, - ECardSimpleField field); -const char *e_card_simple_get_const (ECardSimple *simple, - ECardSimpleField field); -void e_card_simple_set (ECardSimple *simple, - ECardSimpleField field, - const char *data); - -ECardSimpleType e_card_simple_type (ECardSimple *simple, - ECardSimpleField field); -const char *e_card_simple_get_name (ECardSimple *simple, - ECardSimpleField field); -const char *e_card_simple_get_short_name (ECardSimple *simple, - ECardSimpleField field); - - -/* Use these only if building lists of specific types. It should be - * easier to use the above if you consider a phone field to be the - * same as any other field. - */ -const ECardPhone *e_card_simple_get_phone (ECardSimple *simple, - ECardSimplePhoneId id); -const char *e_card_simple_get_email (ECardSimple *simple, - ECardSimpleEmailId id); -const ECardAddrLabel *e_card_simple_get_address (ECardSimple *simple, - ECardSimpleAddressId id); -void e_card_simple_set_phone (ECardSimple *simple, - ECardSimplePhoneId id, - const ECardPhone *phone); -void e_card_simple_set_email (ECardSimple *simple, - ECardSimpleEmailId id, - const char *email); -void e_card_simple_set_address (ECardSimple *simple, - ECardSimpleAddressId id, - const ECardAddrLabel *address); - -void e_card_simple_arbitrary_foreach (ECardSimple *simple, - ECardSimpleArbitraryCallback *callback, - gpointer closure); -const ECardArbitrary *e_card_simple_get_arbitrary (ECardSimple *simple, - const char *key); -/* Any of these except key can be NULL */ -void e_card_simple_set_arbitrary (ECardSimple *simple, - const char *key, - const char *type, - const char *value); - -void e_card_simple_sync_card (ECardSimple *simple); - -/* Standard Gtk function */ -GtkType e_card_simple_get_type (void); - -#endif /* ! __E_CARD_SIMPLE_H__ */ diff --git a/addressbook/backend/ebook/e-card-types.h b/addressbook/backend/ebook/e-card-types.h deleted file mode 100644 index 57aed690aa..0000000000 --- a/addressbook/backend/ebook/e-card-types.h +++ /dev/null @@ -1,89 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * Authors: - * Arturo Espinosa - * Nat Friedman (nat@helixcode.com) - * - * Copyright (C) 2000 Helix Code, Inc. - * Copyright (C) 1999 The Free Software Foundation - */ - -#ifndef __E_CARD_TYPES_H__ -#define __E_CARD_TYPES_H__ - -/* IDENTIFICATION PROPERTIES */ - -typedef struct { - char *prefix; /* Mr. */ - char *given; /* John */ - char *additional; /* Quinlan */ - char *family; /* Public */ - char *suffix; /* Esq. */ -} ECardName; - -typedef struct { - int year; - int month; - int day; -} ECardDate; - -/* TELECOMMUNICATIONS ADDRESSING PROPERTIES */ - -typedef enum { - E_CARD_PHONE_PREF = 1 << 0, - E_CARD_PHONE_WORK = 1 << 1, - E_CARD_PHONE_HOME = 1 << 2, - E_CARD_PHONE_VOICE = 1 << 3, - E_CARD_PHONE_FAX = 1 << 4, - E_CARD_PHONE_MSG = 1 << 5, - E_CARD_PHONE_CELL = 1 << 6, - E_CARD_PHONE_PAGER = 1 << 7, - E_CARD_PHONE_BBS = 1 << 8, - E_CARD_PHONE_MODEM = 1 << 9, - E_CARD_PHONE_CAR = 1 << 10, - E_CARD_PHONE_ISDN = 1 << 11, - E_CARD_PHONE_VIDEO = 1 << 12 -} ECardPhoneFlags; - -typedef struct { - ECardPhoneFlags flags; - char *number; -} ECardPhone; - -/* DELIVERY ADDRESSING PROPERTIES */ - -typedef enum { - E_CARD_ADDR_HOME = 1 << 0, - E_CARD_ADDR_WORK = 1 << 1, - E_CARD_ADDR_POSTAL = 1 << 2, - E_CARD_ADDR_PARCEL = 1 << 3, - E_CARD_ADDR_DOM = 1 << 4, - E_CARD_ADDR_INTL = 1 << 5 -} ECardAddressFlags; - -typedef struct { - ECardAddressFlags flags; - - char *po; - char *ext; - char *street; - char *city; - char *region; - char *code; - char *country; -} ECardDeliveryAddress; - -typedef struct { - ECardAddressFlags flags; - char *data; -} ECardAddrLabel; - -/* ARBITRARY PROPERTIES */ - -typedef struct { - char *key; - char *type; - char *value; -} ECardArbitrary; - -#endif /* __E_CARD_TYPES_H__ */ diff --git a/addressbook/backend/ebook/e-card.c b/addressbook/backend/ebook/e-card.c deleted file mode 100644 index b07723073f..0000000000 --- a/addressbook/backend/ebook/e-card.c +++ /dev/null @@ -1,3248 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * Authors: - * Arturo Espinosa (arturo@nuclecu.unam.mx) - * Nat Friedman (nat@helixcode.com) - * - * Copyright (C) 2000 Helix Code, Inc. - * Copyright (C) 1999 The Free Software Foundation - */ - -#include -#include -#include -#include -#include - -#include -#include "e-card.h" -#include "e-card-pairs.h" -#include "e-name-western.h" - -#include - -#define is_a_prop_of(obj,prop) (isAPropertyOf ((obj),(prop))) -#define str_val(obj) (the_str = (vObjectValueType (obj))? fakeCString (vObjectUStringZValue (obj)) : calloc (1, 1)) -#define has(obj,prop) (vo = isAPropertyOf ((obj), (prop))) - -#define XEV_ARBITRARY "X-EVOLUTION-ARBITRARY" - -/* Object argument IDs */ -enum { - ARG_0, - ARG_FILE_AS, - ARG_FULL_NAME, - ARG_NAME, - ARG_ADDRESS, - ARG_ADDRESS_LABEL, - ARG_PHONE, - ARG_EMAIL, - ARG_BIRTH_DATE, - ARG_URL, - ARG_ORG, - ARG_ORG_UNIT, - ARG_OFFICE, - ARG_TITLE, - ARG_ROLE, - ARG_MANAGER, - ARG_ASSISTANT, - ARG_NICKNAME, - ARG_SPOUSE, - ARG_ANNIVERSARY, - ARG_MAILER, - ARG_FBURL, - ARG_NOTE, - ARG_CATEGORIES, - ARG_CATEGORY_LIST, - ARG_ARBITRARY, - ARG_ID -}; - -#if 0 -static VObject *card_convert_to_vobject (ECard *crd); -#endif -static void parse(ECard *card, VObject *vobj); -static void e_card_init (ECard *card); -static void e_card_class_init (ECardClass *klass); - -static void e_card_destroy (GtkObject *object); -static void e_card_set_arg (GtkObject *object, GtkArg *arg, guint arg_id); -static void e_card_get_arg (GtkObject *object, GtkArg *arg, guint arg_id); - -static void assign_string(VObject *vobj, char **string); - -char *e_v_object_get_child_value(VObject *vobj, char *name); -static ECardDate e_card_date_from_string (char *str); - -static void parse_bday(ECard *card, VObject *object); -static void parse_full_name(ECard *card, VObject *object); -static void parse_file_as(ECard *card, VObject *object); -static void parse_name(ECard *card, VObject *object); -static void parse_email(ECard *card, VObject *object); -static void parse_phone(ECard *card, VObject *object); -static void parse_address(ECard *card, VObject *object); -static void parse_address_label(ECard *card, VObject *object); -static void parse_url(ECard *card, VObject *object); -static void parse_org(ECard *card, VObject *object); -static void parse_office(ECard *card, VObject *object); -static void parse_title(ECard *card, VObject *object); -static void parse_role(ECard *card, VObject *object); -static void parse_manager(ECard *card, VObject *object); -static void parse_assistant(ECard *card, VObject *object); -static void parse_nickname(ECard *card, VObject *object); -static void parse_spouse(ECard *card, VObject *object); -static void parse_anniversary(ECard *card, VObject *object); -static void parse_mailer(ECard *card, VObject *object); -static void parse_fburl(ECard *card, VObject *object); -static void parse_note(ECard *card, VObject *object); -static void parse_categories(ECard *card, VObject *object); -static void parse_arbitrary(ECard *card, VObject *object); -static void parse_id(ECard *card, VObject *object); - -static ECardPhoneFlags get_phone_flags (VObject *vobj); -static void set_phone_flags (VObject *vobj, ECardPhoneFlags flags); -static ECardAddressFlags get_address_flags (VObject *vobj); -static void set_address_flags (VObject *vobj, ECardAddressFlags flags); - -typedef void (* ParsePropertyFunc) (ECard *card, VObject *object); - -struct { - char *key; - ParsePropertyFunc function; -} attribute_jump_array[] = -{ - { VCFullNameProp, parse_full_name }, - { "X-EVOLUTION-FILE-AS", parse_file_as }, - { VCNameProp, parse_name }, - { VCBirthDateProp, parse_bday }, - { VCEmailAddressProp, parse_email }, - { VCTelephoneProp, parse_phone }, - { VCAdrProp, parse_address }, - { VCDeliveryLabelProp, parse_address_label }, - { VCURLProp, parse_url }, - { VCOrgProp, parse_org }, - { "X-EVOLUTION-OFFICE", parse_office }, - { VCTitleProp, parse_title }, - { VCBusinessRoleProp, parse_role }, - { "X-EVOLUTION-MANAGER", parse_manager }, - { "X-EVOLUTION-ASSISTANT", parse_assistant }, - { "NICKNAME", parse_nickname }, - { "X-EVOLUTION-SPOUSE", parse_spouse }, - { "X-EVOLUTION-ANNIVERSARY", parse_anniversary }, - { VCMailerProp, parse_mailer }, - { "FBURL", parse_fburl }, - { VCNoteProp, parse_note }, - { "CATEGORIES", parse_categories }, - { XEV_ARBITRARY, parse_arbitrary }, - { VCUniqueStringProp, parse_id } -}; - -/** - * e_card_get_type: - * @void: - * - * Registers the &ECard class if necessary, and returns the type ID - * associated to it. - * - * Return value: The type ID of the &ECard class. - **/ -GtkType -e_card_get_type (void) -{ - static GtkType card_type = 0; - - if (!card_type) { - GtkTypeInfo card_info = { - "ECard", - sizeof (ECard), - sizeof (ECardClass), - (GtkClassInitFunc) e_card_class_init, - (GtkObjectInitFunc) e_card_init, - NULL, /* reserved_1 */ - NULL, /* reserved_2 */ - (GtkClassInitFunc) NULL - }; - - card_type = gtk_type_unique (gtk_object_get_type (), &card_info); - } - - return card_type; -} - -/** - * e_card_new: - * @vcard: a string in vCard format - * - * Returns: a new #ECard that wraps the @vcard. - */ -ECard * -e_card_new (char *vcard) -{ - ECard *card = E_CARD(gtk_type_new(e_card_get_type())); - VObject *vobj = Parse_MIME(vcard, strlen(vcard)); - while(vobj) { - VObject *next; - parse(card, vobj); - next = nextVObjectInList(vobj); - cleanVObject(vobj); - vobj = next; - } - return card; -} - -ECard *e_card_duplicate(ECard *card) -{ - char *vcard = e_card_get_vcard(card); - ECard *new_card = e_card_new(vcard); - g_free (vcard); - return new_card; -} - -/** - * e_card_get_id: - * @card: an #ECard - * - * Returns: a string representing the id of the card, which is unique - * within its book. - */ -char * -e_card_get_id (ECard *card) -{ - return card->id; -} - -/** - * e_card_get_id: - * @card: an #ECard - * @id: a id in string format - * - * Sets the identifier of a card, which should be unique within its - * book. - */ -void -e_card_set_id (ECard *card, const char *id) -{ - if ( card->id ) - g_free(card->id); - card->id = g_strdup(id); -} - -/** - * e_card_get_vcard: - * @card: an #ECard - * - * Returns: a string in vCard format, which is wrapped by the @card. - */ -char -*e_card_get_vcard (ECard *card) -{ - VObject *vobj; /*, *vprop; */ - char *temp, *ret_val; - - vobj = newVObject (VCCardProp); - - if ( card->file_as && *card->file_as ) - addPropValue(vobj, "X-EVOLUTION-FILE-AS", card->file_as); - else if (card->file_as) - addProp(vobj, "X-EVOLUTION-FILE_AS"); - - if ( card->fname ) - addPropValue(vobj, VCFullNameProp, card->fname); - - if ( card->name && (card->name->prefix || card->name->given || card->name->additional || card->name->family || card->name->suffix) ) { - VObject *nameprop; - nameprop = addProp(vobj, VCNameProp); - if ( card->name->prefix ) - addPropValue(nameprop, VCNamePrefixesProp, card->name->prefix); - if ( card->name->given ) - addPropValue(nameprop, VCGivenNameProp, card->name->given); - if ( card->name->additional ) - addPropValue(nameprop, VCAdditionalNamesProp, card->name->additional); - if ( card->name->family ) - addPropValue(nameprop, VCFamilyNameProp, card->name->family); - if ( card->name->suffix ) - addPropValue(nameprop, VCNameSuffixesProp, card->name->suffix); - } - - - if ( card->address ) { - ECardIterator *iterator = e_card_list_get_iterator(card->address); - for ( ; e_card_iterator_is_valid(iterator) ;e_card_iterator_next(iterator) ) { - VObject *addressprop; - ECardDeliveryAddress *address = (ECardDeliveryAddress *) e_card_iterator_get(iterator); - addressprop = addProp(vobj, VCAdrProp); - - set_address_flags (addressprop, address->flags); - if ( address->po ) - addPropValue(addressprop, VCPostalBoxProp, address->po); - if ( address->ext ) - addPropValue(addressprop, VCExtAddressProp, address->ext); - if ( address->street ) - addPropValue(addressprop, VCStreetAddressProp, address->street); - if ( address->city ) - addPropValue(addressprop, VCCityProp, address->city); - if ( address->region ) - addPropValue(addressprop, VCRegionProp, address->region); - if ( address->code ) - addPropValue(addressprop, VCPostalCodeProp, address->code); - if ( address->country ) - addPropValue(addressprop, VCCountryNameProp, address->country); - } - gtk_object_unref(GTK_OBJECT(iterator)); - } - - if ( card->address_label ) { - ECardIterator *iterator = e_card_list_get_iterator(card->address_label); - for ( ; e_card_iterator_is_valid(iterator) ;e_card_iterator_next(iterator) ) { - VObject *labelprop; - ECardAddrLabel *address_label = (ECardAddrLabel *) e_card_iterator_get(iterator); - if (address_label->data) - labelprop = addPropValue(vobj, VCDeliveryLabelProp, address_label->data); - else - labelprop = addProp(vobj, VCDeliveryLabelProp); - - set_address_flags (labelprop, address_label->flags); - addProp(labelprop, VCQuotedPrintableProp); - } - gtk_object_unref(GTK_OBJECT(iterator)); - } - - if ( card->phone ) { - ECardIterator *iterator = e_card_list_get_iterator(card->phone); - for ( ; e_card_iterator_is_valid(iterator) ;e_card_iterator_next(iterator) ) { - VObject *phoneprop; - ECardPhone *phone = (ECardPhone *) e_card_iterator_get(iterator); - phoneprop = addPropValue(vobj, VCTelephoneProp, phone->number); - - set_phone_flags (phoneprop, phone->flags); - } - gtk_object_unref(GTK_OBJECT(iterator)); - } - - if ( card->email ) { - ECardIterator *iterator = e_card_list_get_iterator(card->email); - for ( ; e_card_iterator_is_valid(iterator) ;e_card_iterator_next(iterator) ) { - VObject *emailprop; - emailprop = addPropValue(vobj, VCEmailAddressProp, (char *) e_card_iterator_get(iterator)); - addProp (emailprop, VCInternetProp); - } - gtk_object_unref(GTK_OBJECT(iterator)); - } - - if ( card->bday ) { - ECardDate date; - char *value; - date = *card->bday; - date.year = MIN(date.year, 9999); - date.month = MIN(date.month, 12); - date.day = MIN(date.day, 31); - value = g_strdup_printf("%04d-%02d-%02d", date.year, date.month, date.day); - addPropValue(vobj, VCBirthDateProp, value); - g_free(value); - } - - if (card->url) - addPropValue(vobj, VCURLProp, card->url); - - if (card->org || card->org_unit) { - VObject *orgprop; - orgprop = addProp(vobj, VCOrgProp); - - if (card->org) - addPropValue(orgprop, VCOrgNameProp, card->org); - if (card->org_unit) - addPropValue(orgprop, VCOrgUnitProp, card->org_unit); - } - - if (card->office) - addPropValue(vobj, "X-EVOLUTION-OFFICE", card->office); - - if (card->title) - addPropValue(vobj, VCTitleProp, card->title); - - if (card->role) - addPropValue(vobj, VCBusinessRoleProp, card->role); - - if (card->manager) - addPropValue(vobj, "X-EVOLUTION-MANAGER", card->manager); - - if (card->assistant) - addPropValue(vobj, "X-EVOLUTION-ASSISTANT", card->assistant); - - if (card->nickname) - addPropValue(vobj, "NICKNAME", card->nickname); - - if (card->spouse) - addPropValue(vobj, "X-EVOLUTION-SPOUSE", card->spouse); - - if ( card->anniversary ) { - ECardDate date; - char *value; - date = *card->anniversary; - date.year = MIN(date.year, 9999); - date.month = MIN(date.month, 12); - date.day = MIN(date.day, 31); - value = g_strdup_printf("%04d-%02d-%02d", date.year, date.month, date.day); - addPropValue(vobj, "X-EVOLUTION-ANNIVERSARY", value); - g_free(value); - } - - if (card->mailer) { - addPropValue(vobj, VCMailerProp, card->mailer); - } - - if (card->fburl) - addPropValue(vobj, "FBURL", card->fburl); - - if (card->note) - addPropValue(vobj, VCNoteProp, card->note); - - if (card->categories) { - ECardIterator *iterator; - int length = 0; - char *string; - char *stringptr; - for (iterator = e_card_list_get_iterator(card->categories); e_card_iterator_is_valid(iterator); e_card_iterator_next(iterator)) { - length += strlen(e_card_iterator_get(iterator)) + 1; - } - string = g_new(char, length + 1); - stringptr = string; - *stringptr = 0; - for (e_card_iterator_reset(iterator); e_card_iterator_is_valid(iterator); e_card_iterator_next(iterator)) { - strcpy(stringptr, e_card_iterator_get(iterator)); - stringptr += strlen(stringptr); - *stringptr = ','; - stringptr++; - *stringptr = 0; - } - if (stringptr > string) { - stringptr --; - *stringptr = 0; - } - addPropValue (vobj, "CATEGORIES", string); - g_free(string); - } - - if (card->arbitrary) { - ECardIterator *iterator; - for (iterator = e_card_list_get_iterator(card->arbitrary); e_card_iterator_is_valid(iterator); e_card_iterator_next(iterator)) { - const ECardArbitrary *arbitrary = e_card_iterator_get(iterator); - VObject *arb_object; - if (arbitrary->value) { - arb_object = addPropValue (vobj, XEV_ARBITRARY, arbitrary->value); - } else { - arb_object = addProp (vobj, XEV_ARBITRARY); - } - if (arbitrary->type) { - addPropValue (arb_object, "TYPE", arbitrary->type); - } - if (arbitrary->key) { - addProp (arb_object, arbitrary->key); - } - } - } - - if (card->id) - addPropValue (vobj, VCUniqueStringProp, card->id); - -#if 0 - - - if (crd->photo.prop.used) { - vprop = addPropSizedValue (vobj, VCPhotoProp, - crd->photo.data, crd->photo.size); - add_PhotoType (vprop, crd->photo.type); - add_CardProperty (vprop, &crd->photo.prop); - } - - if (crd->xtension.l) { - GList *node; - - for (node = crd->xtension.l; node; node = node->next) { - CardXProperty *xp = (CardXProperty *) node->data; - addPropValue (vobj, xp->name, xp->data); - add_CardProperty (vobj, &xp->prop); - } - } - - if (crd->timezn.prop.used) { - char *str; - - str = card_timezn_str (crd->timezn); - vprop = addPropValue (vobj, VCTimeZoneProp, str); - free (str); - add_CardProperty (vprop, &crd->timezn.prop); - } - - if (crd->geopos.prop.used) { - char *str; - - str = card_geopos_str (crd->geopos); - vprop = addPropValue (vobj, VCGeoLocationProp, str); - free (str); - add_CardProperty (vprop, &crd->geopos.prop); - } - - if (crd->logo.prop.used) { - vprop = addPropSizedValue (vobj, VCLogoProp, - crd->logo.data, crd->logo.size); - add_PhotoType (vprop, crd->logo.type); - add_CardProperty (vprop, &crd->logo.prop); - } - - if (crd->agent) - addVObjectProp (vobj, card_convert_to_vobject (crd->agent)); - - if (crd->sound.prop.used) { - if (crd->sound.type != SOUND_PHONETIC) - vprop = addPropSizedValue (vobj, VCPronunciationProp, - crd->sound.data, crd->sound.size); - else - vprop = addPropValue (vobj, VCPronunciationProp, - crd->sound.data); - - add_SoundType (vprop, crd->sound.type); - add_CardProperty (vprop, &crd->sound.prop); - } - - if (crd->key.prop.used) { - vprop = addPropValue (vobj, VCPublicKeyProp, crd->key.data); - add_KeyType (vprop, crd->key.type); - add_CardProperty (vprop, &crd->key.prop); - } -#endif - temp = writeMemVObject(NULL, NULL, vobj); - ret_val = g_strdup(temp); - free(temp); - cleanVObject(vobj); - return ret_val; -} - -static void -parse_file_as(ECard *card, VObject *vobj) -{ - if ( card->file_as ) - g_free(card->file_as); - assign_string(vobj, &(card->file_as)); -} - -static void -parse_name(ECard *card, VObject *vobj) -{ - if ( card->name ) { - e_card_name_free(card->name); - } - card->name = g_new(ECardName, 1); - - card->name->family = e_v_object_get_child_value (vobj, VCFamilyNameProp); - card->name->given = e_v_object_get_child_value (vobj, VCGivenNameProp); - card->name->additional = e_v_object_get_child_value (vobj, VCAdditionalNamesProp); - card->name->prefix = e_v_object_get_child_value (vobj, VCNamePrefixesProp); - card->name->suffix = e_v_object_get_child_value (vobj, VCNameSuffixesProp); -} - -static void -parse_full_name(ECard *card, VObject *vobj) -{ - if ( card->fname ) - g_free(card->fname); - assign_string(vobj, &(card->fname)); -} - -static void -parse_email(ECard *card, VObject *vobj) -{ - char *next_email; - ECardList *list; - - assign_string(vobj, &next_email); - gtk_object_get(GTK_OBJECT(card), - "email", &list, - NULL); - e_card_list_append(list, next_email); - g_free (next_email); -} - -static void -parse_bday(ECard *card, VObject *vobj) -{ - if ( vObjectValueType (vobj) ) { - char *str = fakeCString (vObjectUStringZValue (vobj)); - if ( card->bday ) - g_free(card->bday); - card->bday = g_new(ECardDate, 1); - *(card->bday) = e_card_date_from_string(str); - free(str); - } -} - -static void -parse_phone(ECard *card, VObject *vobj) -{ - ECardPhone *next_phone = g_new(ECardPhone, 1); - ECardList *list; - - assign_string(vobj, &(next_phone->number)); - next_phone->flags = get_phone_flags(vobj); - - gtk_object_get(GTK_OBJECT(card), - "phone", &list, - NULL); - e_card_list_append(list, next_phone); - e_card_phone_free (next_phone); -} - -static void -parse_address(ECard *card, VObject *vobj) -{ - ECardDeliveryAddress *next_addr = g_new(ECardDeliveryAddress, 1); - ECardList *list; - - next_addr->flags = get_address_flags (vobj); - next_addr->po = e_v_object_get_child_value (vobj, VCPostalBoxProp); - next_addr->ext = e_v_object_get_child_value (vobj, VCExtAddressProp); - next_addr->street = e_v_object_get_child_value (vobj, VCStreetAddressProp); - next_addr->city = e_v_object_get_child_value (vobj, VCCityProp); - next_addr->region = e_v_object_get_child_value (vobj, VCRegionProp); - next_addr->code = e_v_object_get_child_value (vobj, VCPostalCodeProp); - next_addr->country = e_v_object_get_child_value (vobj, VCCountryNameProp); - - gtk_object_get(GTK_OBJECT(card), - "address", &list, - NULL); - e_card_list_append(list, next_addr); - e_card_delivery_address_free (next_addr); -} - -static void -parse_address_label(ECard *card, VObject *vobj) -{ - ECardAddrLabel *next_addr = g_new(ECardAddrLabel, 1); - ECardList *list; - - next_addr->flags = get_address_flags (vobj); - assign_string(vobj, &next_addr->data); - - gtk_object_get(GTK_OBJECT(card), - "address_label", &list, - NULL); - e_card_list_append(list, next_addr); - e_card_address_label_free (next_addr); -} - -static void -parse_url(ECard *card, VObject *vobj) -{ - if (card->url) - g_free(card->url); - assign_string(vobj, &(card->url)); -} - -static void -parse_org(ECard *card, VObject *vobj) -{ - char *temp; - - temp = e_v_object_get_child_value(vobj, VCOrgNameProp); - if (temp) { - if (card->org) - g_free(card->org); - card->org = temp; - } - temp = e_v_object_get_child_value(vobj, VCOrgUnitProp); - if (temp) { - if (card->org_unit) - g_free(card->org_unit); - card->org_unit = temp; - } -} - -static void -parse_office(ECard *card, VObject *vobj) -{ - if ( card->office ) - g_free(card->office); - assign_string(vobj, &(card->office)); -} - -static void -parse_title(ECard *card, VObject *vobj) -{ - if ( card->title ) - g_free(card->title); - assign_string(vobj, &(card->title)); -} - -static void -parse_role(ECard *card, VObject *vobj) -{ - if (card->role) - g_free(card->role); - assign_string(vobj, &(card->role)); -} - -static void -parse_manager(ECard *card, VObject *vobj) -{ - if ( card->manager ) - g_free(card->manager); - assign_string(vobj, &(card->manager)); -} - -static void -parse_assistant(ECard *card, VObject *vobj) -{ - if ( card->assistant ) - g_free(card->assistant); - assign_string(vobj, &(card->assistant)); -} - -static void -parse_nickname(ECard *card, VObject *vobj) -{ - if (card->nickname) - g_free(card->nickname); - assign_string(vobj, &(card->nickname)); -} - -static void -parse_spouse(ECard *card, VObject *vobj) -{ - if ( card->spouse ) - g_free(card->spouse); - assign_string(vobj, &(card->spouse)); -} - -static void -parse_anniversary(ECard *card, VObject *vobj) -{ - if ( vObjectValueType (vobj) ) { - char *str = fakeCString (vObjectUStringZValue (vobj)); - if (card->anniversary) - g_free(card->anniversary); - card->anniversary = g_new(ECardDate, 1); - *(card->anniversary) = e_card_date_from_string(str); - free(str); - } -} - -static void -parse_mailer(ECard *card, VObject *vobj) -{ - if ( card->mailer ) - g_free(card->mailer); - assign_string(vobj, &(card->mailer)); -} - -static void -parse_fburl(ECard *card, VObject *vobj) -{ - g_free(card->fburl); - assign_string(vobj, &(card->fburl)); -} - -static void -parse_note(ECard *card, VObject *vobj) -{ - g_free(card->note); - assign_string(vobj, &(card->note)); -} - -static void -add_list_unique(ECard *card, ECardList *list, char *string) -{ - char *temp = e_strdup_strip(string); - ECardIterator *iterator; - - if (!*temp) { - g_free(temp); - return; - } - for ( iterator = e_card_list_get_iterator(list); e_card_iterator_is_valid(iterator); e_card_iterator_next(iterator)) { - if (!strcmp(e_card_iterator_get(iterator), temp)) { - break; - } - } - if (!e_card_iterator_is_valid(iterator)) { - e_card_list_append(list, temp); - } - g_free(temp); - gtk_object_unref(GTK_OBJECT(iterator)); -} - -static void -do_parse_categories(ECard *card, char *str) -{ - int length = strlen(str); - char *copy = g_new(char, length + 1); - int i, j; - ECardList *list; - gtk_object_get(GTK_OBJECT(card), - "category_list", &list, - NULL); - for (i = 0, j = 0; str[i]; i++, j++) { - switch (str[i]) { - case '\\': - i++; - if (str[i]) { - copy[j] = str[i]; - } else - i--; - break; - case ',': - copy[j] = 0; - add_list_unique(card, list, copy); - j = -1; - break; - default: - copy[j] = str[i]; - break; - } - } - copy[j] = 0; - add_list_unique(card, list, copy); - g_free(copy); -} - -static void -parse_categories(ECard *card, VObject *vobj) -{ - if ( vObjectValueType (vobj) ) { - char *str = fakeCString (vObjectUStringZValue (vobj)); - do_parse_categories(card, str); - free(str); - } -} - -typedef union ValueItem { - const char *strs; - const wchar_t *ustrs; - unsigned int i; - unsigned long l; - void *any; - VObject *vobj; -} ValueItem; - -struct VObject { - VObject *next; - const char *id; - VObject *prop; - unsigned short valType; - ValueItem val; -}; - -static void -parse_arbitrary(ECard *card, VObject *vobj) -{ - ECardArbitrary *arbitrary = e_card_arbitrary_new(); - VObjectIterator iterator; - ECardList *list; - for ( initPropIterator (&iterator, vobj); moreIteration(&iterator); ) { - VObject *temp = nextVObject(&iterator); - const char *name = vObjectName(temp); - if (name && !strcmp(name, "TYPE")) { - g_free(arbitrary->type); - assign_string(temp, &(arbitrary->type)); - } else { - g_free(arbitrary->key); - arbitrary->key = g_strdup(name); - } - } - - assign_string(vobj, &(arbitrary->value)); - - gtk_object_get(GTK_OBJECT(card), - "arbitrary", &list, - NULL); - e_card_list_append(list, arbitrary); - e_card_arbitrary_free(arbitrary); -} - -static void -parse_id(ECard *card, VObject *vobj) -{ - if ( card->id ) - g_free(card->id); - assign_string(vobj, &(card->id)); -} - -static void -parse_attribute(ECard *card, VObject *vobj) -{ - ParsePropertyFunc function = g_hash_table_lookup(E_CARD_CLASS(GTK_OBJECT(card)->klass)->attribute_jump_table, vObjectName(vobj)); - if ( function ) - function(card, vobj); -} - -static void -parse(ECard *card, VObject *vobj) -{ - VObjectIterator iterator; - initPropIterator(&iterator, vobj); - while(moreIteration (&iterator)) { - parse_attribute(card, nextVObject(&iterator)); - } - if (!card->name) { - if (card->fname) { - card->name = e_card_name_from_string(card->fname); - } - } - if (!card->file_as) { - if (card->name) { - ECardName *name = card->name; - char *strings[3], **stringptr; - char *string; - stringptr = strings; - if (name->family && *name->family) - *(stringptr++) = name->family; - if (name->given && *name->given) - *(stringptr++) = name->given; - *stringptr = NULL; - string = g_strjoinv(", ", strings); - card->file_as = string; - } else - card->file_as = g_strdup(""); - } -} - -static void -e_card_class_init (ECardClass *klass) -{ - int i; - GtkObjectClass *object_class; - - object_class = GTK_OBJECT_CLASS(klass); - - klass->attribute_jump_table = g_hash_table_new(g_str_hash, g_str_equal); - - for ( i = 0; i < sizeof(attribute_jump_array) / sizeof(attribute_jump_array[0]); i++ ) { - g_hash_table_insert(klass->attribute_jump_table, attribute_jump_array[i].key, attribute_jump_array[i].function); - } - - gtk_object_add_arg_type ("ECard::file_as", - GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_FILE_AS); - gtk_object_add_arg_type ("ECard::full_name", - GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_FULL_NAME); - gtk_object_add_arg_type ("ECard::name", - GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_NAME); - gtk_object_add_arg_type ("ECard::address", - GTK_TYPE_OBJECT, GTK_ARG_READABLE, ARG_ADDRESS); - gtk_object_add_arg_type ("ECard::address_label", - GTK_TYPE_OBJECT, GTK_ARG_READABLE, ARG_ADDRESS_LABEL); - gtk_object_add_arg_type ("ECard::phone", - GTK_TYPE_OBJECT, GTK_ARG_READABLE, ARG_PHONE); - gtk_object_add_arg_type ("ECard::email", - GTK_TYPE_OBJECT, GTK_ARG_READABLE, ARG_EMAIL); - gtk_object_add_arg_type ("ECard::birth_date", - GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_BIRTH_DATE); - gtk_object_add_arg_type ("ECard::url", - GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_URL); - gtk_object_add_arg_type ("ECard::org", - GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_ORG); - gtk_object_add_arg_type ("ECard::org_unit", - GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_ORG_UNIT); - gtk_object_add_arg_type ("ECard::office", - GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_OFFICE); - gtk_object_add_arg_type ("ECard::title", - GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_TITLE); - gtk_object_add_arg_type ("ECard::role", - GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_ROLE); - gtk_object_add_arg_type ("ECard::manager", - GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_MANAGER); - gtk_object_add_arg_type ("ECard::assistant", - GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_ASSISTANT); - gtk_object_add_arg_type ("ECard::nickname", - GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_NICKNAME); - gtk_object_add_arg_type ("ECard::spouse", - GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_SPOUSE); - gtk_object_add_arg_type ("ECard::anniversary", - GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_ANNIVERSARY); - gtk_object_add_arg_type ("ECard::mailer", - GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_MAILER); - gtk_object_add_arg_type ("ECard::fburl", - GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_FBURL); - gtk_object_add_arg_type ("ECard::note", - GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_NOTE); - gtk_object_add_arg_type ("ECard::categories", - GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_CATEGORIES); - gtk_object_add_arg_type ("ECard::category_list", - GTK_TYPE_OBJECT, GTK_ARG_READWRITE, ARG_CATEGORY_LIST); - gtk_object_add_arg_type ("ECard::arbitrary", - GTK_TYPE_OBJECT, GTK_ARG_READWRITE, ARG_ARBITRARY); - gtk_object_add_arg_type ("ECard::id", - GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_ID); - - - object_class->destroy = e_card_destroy; - object_class->get_arg = e_card_get_arg; - object_class->set_arg = e_card_set_arg; -} - -ECardPhone * -e_card_phone_new (void) -{ - ECardPhone *newphone = g_new(ECardPhone, 1); - - newphone->number = NULL; - newphone->flags = 0; - - return newphone; -} - -void -e_card_phone_free (ECardPhone *phone) -{ - if ( phone ) { - g_free(phone->number); - - g_free(phone); - } -} - -ECardPhone * -e_card_phone_copy (const ECardPhone *phone) -{ - if ( phone ) { - ECardPhone *phone_copy = g_new(ECardPhone, 1); - phone_copy->number = g_strdup(phone->number); - phone_copy->flags = phone->flags; - return phone_copy; - } else - return NULL; -} - -ECardDeliveryAddress * -e_card_delivery_address_new (void) -{ - ECardDeliveryAddress *newaddr = g_new(ECardDeliveryAddress, 1); - - newaddr->po = NULL; - newaddr->ext = NULL; - newaddr->street = NULL; - newaddr->city = NULL; - newaddr->region = NULL; - newaddr->code = NULL; - newaddr->country = NULL; - newaddr->flags = 0; - - return newaddr; -} - -void -e_card_delivery_address_free (ECardDeliveryAddress *addr) -{ - if ( addr ) { - g_free(addr->po); - g_free(addr->ext); - g_free(addr->street); - g_free(addr->city); - g_free(addr->region); - g_free(addr->code); - g_free(addr->country); - - g_free(addr); - } -} - -ECardDeliveryAddress * -e_card_delivery_address_copy (const ECardDeliveryAddress *addr) -{ - if ( addr ) { - ECardDeliveryAddress *addr_copy = g_new(ECardDeliveryAddress, 1); - addr_copy->po = g_strdup(addr->po ); - addr_copy->ext = g_strdup(addr->ext ); - addr_copy->street = g_strdup(addr->street ); - addr_copy->city = g_strdup(addr->city ); - addr_copy->region = g_strdup(addr->region ); - addr_copy->code = g_strdup(addr->code ); - addr_copy->country = g_strdup(addr->country); - addr_copy->flags = addr->flags; - return addr_copy; - } else - return NULL; -} - -char * -e_card_delivery_address_to_string(const ECardDeliveryAddress *addr) -{ - char *strings[4], **stringptr = strings; - char *line1, *line22, *line2; - char *final; - if (addr->po && *addr->po) - *(stringptr++) = addr->po; - if (addr->street && *addr->street) - *(stringptr++) = addr->street; - if (addr->ext && *addr->ext) - *(stringptr++) = addr->ext; - *stringptr = NULL; - line1 = g_strjoinv(" ", strings); - stringptr = strings; - if (addr->region && *addr->region) - *(stringptr++) = addr->region; - if (addr->code && *addr->code) - *(stringptr++) = addr->code; - *stringptr = NULL; - line22 = g_strjoinv(" ", strings); - stringptr = strings; - if (addr->city && *addr->city) - *(stringptr++) = addr->city; - if (line22 && *line22) - *(stringptr++) = line22; - *stringptr = NULL; - line2 = g_strjoinv(", ", strings); - stringptr = strings; - if (line1 && *line1) - *(stringptr++) = line1; - if (line2 && *line2) - *(stringptr++) = line2; - if (addr->country && *addr->country) - *(stringptr++) = addr->country; - *stringptr = NULL; - final = g_strjoinv("\n", strings); - g_free(line1); - g_free(line22); - g_free(line2); - return final; -} - -ECardAddrLabel * -e_card_address_label_new (void) -{ - ECardAddrLabel *newaddr = g_new(ECardAddrLabel, 1); - - newaddr->data = NULL; - newaddr->flags = 0; - - return newaddr; -} - -void -e_card_address_label_free (ECardAddrLabel *addr) -{ - if ( addr ) { - g_free(addr->data); - - g_free(addr); - } -} - -ECardAddrLabel * -e_card_address_label_copy (const ECardAddrLabel *addr) -{ - if ( addr ) { - ECardAddrLabel *addr_copy = g_new(ECardAddrLabel, 1); - addr_copy->data = g_strdup(addr->data); - addr_copy->flags = addr->flags; - return addr_copy; - } else - return NULL; -} - -ECardName *e_card_name_new(void) -{ - ECardName *newname = g_new(ECardName, 1); - - newname->prefix = NULL; - newname->given = NULL; - newname->additional = NULL; - newname->family = NULL; - newname->suffix = NULL; - - return newname; -} - -void -e_card_name_free(ECardName *name) -{ - if (name) { - if ( name->prefix ) - g_free(name->prefix); - if ( name->given ) - g_free(name->given); - if ( name->additional ) - g_free(name->additional); - if ( name->family ) - g_free(name->family); - if ( name->suffix ) - g_free(name->suffix); - g_free ( name ); - } -} - -ECardName * -e_card_name_copy(const ECardName *name) -{ - if (name) { - ECardName *newname = g_new(ECardName, 1); - - newname->prefix = g_strdup(name->prefix); - newname->given = g_strdup(name->given); - newname->additional = g_strdup(name->additional); - newname->family = g_strdup(name->family); - newname->suffix = g_strdup(name->suffix); - - return newname; - } else - return NULL; -} - -char * -e_card_name_to_string(const ECardName *name) -{ - char *strings[6], **stringptr = strings; - if (name->prefix && *name->prefix) - *(stringptr++) = name->prefix; - if (name->given && *name->given) - *(stringptr++) = name->given; - if (name->additional && *name->additional) - *(stringptr++) = name->additional; - if (name->family && *name->family) - *(stringptr++) = name->family; - if (name->suffix && *name->suffix) - *(stringptr++) = name->suffix; - *stringptr = NULL; - return g_strjoinv(" ", strings); -} - -ECardName * -e_card_name_from_string(const char *full_name) -{ - ECardName *name = g_new(ECardName, 1); - ENameWestern *western = e_name_western_parse (full_name); - - name->prefix = g_strdup (western->prefix); - name->given = g_strdup (western->first ); - name->additional = g_strdup (western->middle); - name->family = g_strdup (western->last ); - name->suffix = g_strdup (western->suffix); - - e_name_western_free(western); - - return name; -} - -ECardArbitrary * -e_card_arbitrary_new(void) -{ - ECardArbitrary *arbitrary = g_new(ECardArbitrary, 1); - arbitrary->key = NULL; - arbitrary->type = NULL; - arbitrary->value = NULL; - return arbitrary; -} - -ECardArbitrary * -e_card_arbitrary_copy(const ECardArbitrary *arbitrary) -{ - if (arbitrary) { - ECardArbitrary *arb_copy = g_new(ECardArbitrary, 1); - arb_copy->key = g_strdup(arbitrary->key); - arb_copy->type = g_strdup(arbitrary->type); - arb_copy->value = g_strdup(arbitrary->value); - return arb_copy; - } else - return NULL; -} - -void -e_card_arbitrary_free(ECardArbitrary *arbitrary) -{ - if (arbitrary) { - g_free(arbitrary->key); - g_free(arbitrary->type); - g_free(arbitrary->value); - } - g_free(arbitrary); -} - -/* - * ECard lifecycle management and vCard loading/saving. - */ - -static void -e_card_destroy (GtkObject *object) -{ - ECard *card = E_CARD(object); - g_free(card->id); - g_free(card->file_as); - g_free(card->fname); - if ( card->name ) - e_card_name_free(card->name); - g_free(card->bday); - - g_free(card->url); - g_free(card->org); - g_free(card->org_unit); - g_free(card->office); - g_free(card->title); - g_free(card->role); - g_free(card->manager); - g_free(card->assistant); - g_free(card->nickname); - g_free(card->spouse); - g_free(card->anniversary); - g_free(card->fburl); - g_free(card->note); - - if (card->categories) - gtk_object_unref(GTK_OBJECT(card->categories)); - if (card->email) - gtk_object_unref(GTK_OBJECT(card->email)); - if (card->phone) - gtk_object_unref(GTK_OBJECT(card->phone)); - if (card->address) - gtk_object_unref(GTK_OBJECT(card->address)); - if (card->address_label) - gtk_object_unref(GTK_OBJECT(card->address_label)); -} - - -/* Set_arg handler for the card */ -static void -e_card_set_arg (GtkObject *object, GtkArg *arg, guint arg_id) -{ - ECard *card; - - card = E_CARD (object); - - switch (arg_id) { - case ARG_FILE_AS: - g_free(card->file_as); - card->file_as = g_strdup(GTK_VALUE_STRING(*arg)); - break; - case ARG_FULL_NAME: - g_free(card->fname); - card->fname = g_strdup(GTK_VALUE_STRING(*arg)); - break; - case ARG_NAME: - if ( card->name ) - e_card_name_free(card->name); - card->name = GTK_VALUE_POINTER(*arg); - break; - case ARG_CATEGORIES: - if (card->categories) - gtk_object_unref(GTK_OBJECT(card->categories)); - card->categories = NULL; - if (GTK_VALUE_STRING(*arg)) - do_parse_categories(card, GTK_VALUE_STRING(*arg)); - break; - case ARG_CATEGORY_LIST: - if (card->categories) - gtk_object_unref(GTK_OBJECT(card->categories)); - card->categories = E_CARD_LIST(GTK_VALUE_OBJECT(*arg)); - if (card->categories) - gtk_object_ref(GTK_OBJECT(card->categories)); - break; - case ARG_BIRTH_DATE: - g_free(card->bday); - card->bday = GTK_VALUE_POINTER(*arg); - break; - case ARG_URL: - g_free(card->url); - card->url = g_strdup(GTK_VALUE_STRING(*arg)); - break; - case ARG_ORG: - g_free(card->org); - card->org = g_strdup(GTK_VALUE_STRING(*arg)); - break; - case ARG_ORG_UNIT: - g_free(card->org_unit); - card->org_unit = g_strdup(GTK_VALUE_STRING(*arg)); - break; - case ARG_OFFICE: - g_free(card->office); - card->office = g_strdup(GTK_VALUE_STRING(*arg)); - break; - case ARG_TITLE: - g_free(card->title); - card->title = g_strdup(GTK_VALUE_STRING(*arg)); - break; - case ARG_ROLE: - g_free(card->role); - card->role = g_strdup(GTK_VALUE_STRING(*arg)); - break; - case ARG_MANAGER: - g_free(card->manager); - card->manager = g_strdup(GTK_VALUE_STRING(*arg)); - break; - case ARG_ASSISTANT: - g_free(card->assistant); - card->assistant = g_strdup(GTK_VALUE_STRING(*arg)); - break; - case ARG_NICKNAME: - g_free(card->nickname); - card->nickname = g_strdup(GTK_VALUE_STRING(*arg)); - break; - case ARG_SPOUSE: - g_free(card->spouse); - card->spouse = g_strdup(GTK_VALUE_STRING(*arg)); - break; - case ARG_ANNIVERSARY: - g_free(card->anniversary); - card->anniversary = GTK_VALUE_POINTER(*arg); - break; - case ARG_MAILER: - g_free(card->mailer); - card->mailer = g_strdup(GTK_VALUE_STRING(*arg)); - break; - case ARG_FBURL: - g_free(card->fburl); - card->fburl = g_strdup(GTK_VALUE_STRING(*arg)); - break; - case ARG_NOTE: - g_free (card->note); - card->note = g_strdup(GTK_VALUE_STRING(*arg)); - break; - case ARG_ARBITRARY: - if (card->arbitrary) - gtk_object_unref(GTK_OBJECT(card->arbitrary)); - card->arbitrary = E_CARD_LIST(GTK_VALUE_OBJECT(*arg)); - if (card->arbitrary) - gtk_object_ref(GTK_OBJECT(card->arbitrary)); - break; - case ARG_ID: - g_free(card->id); - card->id = g_strdup(GTK_VALUE_STRING(*arg)); - break; - default: - return; - } -} - -/* Get_arg handler for the card */ -static void -e_card_get_arg (GtkObject *object, GtkArg *arg, guint arg_id) -{ - ECard *card; - - card = E_CARD (object); - - switch (arg_id) { - case ARG_FILE_AS: - GTK_VALUE_STRING (*arg) = card->file_as; - break; - case ARG_FULL_NAME: - GTK_VALUE_STRING (*arg) = card->fname; - break; - case ARG_NAME: - GTK_VALUE_POINTER(*arg) = card->name; - break; - case ARG_ADDRESS: - if (!card->address) - card->address = e_card_list_new((ECardListCopyFunc) e_card_delivery_address_copy, - (ECardListFreeFunc) e_card_delivery_address_free, - NULL); - GTK_VALUE_OBJECT(*arg) = GTK_OBJECT(card->address); - break; - case ARG_ADDRESS_LABEL: - if (!card->address_label) - card->address_label = e_card_list_new((ECardListCopyFunc) e_card_address_label_copy, - (ECardListFreeFunc) e_card_address_label_free, - NULL); - GTK_VALUE_OBJECT(*arg) = GTK_OBJECT(card->address_label); - break; - case ARG_PHONE: - if (!card->phone) - card->phone = e_card_list_new((ECardListCopyFunc) e_card_phone_copy, - (ECardListFreeFunc) e_card_phone_free, - NULL); - GTK_VALUE_OBJECT(*arg) = GTK_OBJECT(card->phone); - break; - case ARG_EMAIL: - if (!card->email) - card->email = e_card_list_new((ECardListCopyFunc) g_strdup, - (ECardListFreeFunc) g_free, - NULL); - GTK_VALUE_OBJECT(*arg) = GTK_OBJECT(card->email); - break; - case ARG_CATEGORIES: - { - int i; - char ** strs; - int length; - ECardIterator *iterator; - if (!card->categories) - card->categories = e_card_list_new((ECardListCopyFunc) g_strdup, - (ECardListFreeFunc) g_free, - NULL); - length = e_card_list_length(card->categories); - strs = g_new(char *, length + 1); - for (iterator = e_card_list_get_iterator(card->categories), i = 0; e_card_iterator_is_valid(iterator); e_card_iterator_next(iterator), i++) { - strs[i] = (char *)e_card_iterator_get(iterator); - } - strs[i] = 0; - GTK_VALUE_STRING(*arg) = g_strjoinv(", ", strs); - g_free(strs); - } - break; - case ARG_CATEGORY_LIST: - if (!card->categories) - card->categories = e_card_list_new((ECardListCopyFunc) g_strdup, - (ECardListFreeFunc) g_free, - NULL); - GTK_VALUE_OBJECT(*arg) = GTK_OBJECT(card->categories); - break; - case ARG_BIRTH_DATE: - GTK_VALUE_POINTER(*arg) = card->bday; - break; - case ARG_URL: - GTK_VALUE_STRING(*arg) = card->url; - break; - case ARG_ORG: - GTK_VALUE_STRING(*arg) = card->org; - break; - case ARG_ORG_UNIT: - GTK_VALUE_STRING(*arg) = card->org_unit; - break; - case ARG_OFFICE: - GTK_VALUE_STRING(*arg) = card->office; - break; - case ARG_TITLE: - GTK_VALUE_STRING(*arg) = card->title; - break; - case ARG_ROLE: - GTK_VALUE_STRING(*arg) = card->role; - break; - case ARG_MANAGER: - GTK_VALUE_STRING(*arg) = card->manager; - break; - case ARG_ASSISTANT: - GTK_VALUE_STRING(*arg) = card->assistant; - break; - case ARG_NICKNAME: - GTK_VALUE_STRING(*arg) = card->nickname; - break; - case ARG_SPOUSE: - GTK_VALUE_STRING(*arg) = card->spouse; - break; - case ARG_ANNIVERSARY: - GTK_VALUE_POINTER(*arg) = card->anniversary; - break; - case ARG_MAILER: - GTK_VALUE_STRING(*arg) = card->mailer; - break; - case ARG_FBURL: - GTK_VALUE_STRING(*arg) = card->fburl; - break; - case ARG_NOTE: - GTK_VALUE_STRING(*arg) = card->note; - break; - case ARG_ARBITRARY: - if (!card->arbitrary) - card->arbitrary = e_card_list_new((ECardListCopyFunc) e_card_arbitrary_copy, - (ECardListFreeFunc) e_card_arbitrary_free, - NULL); - - GTK_VALUE_OBJECT(*arg) = GTK_OBJECT(card->arbitrary); - break; - case ARG_ID: - GTK_VALUE_STRING(*arg) = card->id; - break; - default: - arg->type = GTK_TYPE_INVALID; - break; - } -} - - -/** - * e_card_init: - */ -static void -e_card_init (ECard *card) -{ - card->id = g_strdup(""); - - card->file_as = NULL; - card->fname = NULL; - card->name = NULL; - card->bday = NULL; - card->email = NULL; - card->phone = NULL; - card->address = NULL; - card->address_label = NULL; - card->url = NULL; - card->org = NULL; - card->org_unit = NULL; - card->office = NULL; - card->title = NULL; - card->role = NULL; - card->manager = NULL; - card->assistant = NULL; - card->nickname = NULL; - card->spouse = NULL; - card->anniversary = NULL; - card->mailer = NULL; - card->fburl = NULL; - card->note = NULL; - card->categories = NULL; - card->arbitrary = NULL; -#if 0 - - c = g_new0 (ECard, 1); - - c->fname = - c->mailer = - c->role = - c->comment = - c->categories = - c->uid = e_card_prop_str_empty (); - - c->photo.type = PHOTO_JPEG; - c->logo.type = PHOTO_JPEG; - c->rev.utc = -1; - c->sound.type = SOUND_PHONETIC; - c->key.type = KEY_PGP; - - c->categories.prop.encod = ENC_QUOTED_PRINTABLE; - c->comment.prop.encod = ENC_QUOTED_PRINTABLE; - - c->name.prop = c->photo.prop = c->bday.prop = c->timezn.prop = - c->geopos.prop = c->logo.prop = c->org.prop = c->rev.prop = - c->sound.prop = c->key.prop = c->deladdr.prop = c->dellabel.prop = - c->phone.prop = c->email.prop = c->xtension.prop = c->prop = e_card_prop_empty (); - - c->prop.type = PROP_CARD; - c->fname.prop.type = PROP_FNAME; - c->name.prop.type = PROP_NAME; - c->photo.prop.type = PROP_PHOTO; - c->bday.prop.type = PROP_BDAY; - - c->deladdr.prop.type = PROP_DELADDR_LIST; - c->dellabel.prop.type = PROP_DELLABEL_LIST; - c->phone.prop.type = PROP_PHONE_LIST; - c->email.prop.type = PROP_EMAIL_LIST; - c->xtension.prop.type = PROP_XTENSION_LIST; - c->mailer.prop.type = PROP_MAILER; - c->timezn.prop.type = PROP_TIMEZN; - c->geopos.prop.type = PROP_GEOPOS; - c->role.prop.type = PROP_ROLE; - c->logo.prop.type = PROP_LOGO; - c->org.prop.type = PROP_ORG; - c->categories.prop.type = PROP_CATEGORIES; - c->comment.prop.type = PROP_COMMENT; - c->rev.prop.type = PROP_REV; - c->sound.prop.type = PROP_SOUND; - c->uid.prop.type = PROP_UID; - c->key.prop.type = PROP_KEY; - - return c; -#endif -} - -static void -assign_string(VObject *vobj, char **string) -{ - int type = vObjectValueType(vobj); - char *str; - - switch(type) { - case VCVT_STRINGZ: - *string = g_strdup (vObjectStringZValue(vobj)); - break; - case VCVT_USTRINGZ: - str = (vObjectValueType (vobj) ? fakeCString (vObjectUStringZValue (vobj)) : calloc(1, 1)); - *string = g_strdup(str); - free(str); - break; - default: - *string = g_strdup(""); - break; - } -} - -#if 0 -static void -e_card_str_free (CardStrProperty *sp) -{ - g_free (sp->str); - - e_card_prop_free (sp->prop); -} - -static void -e_card_photo_free (CardPhoto *photo) -{ - g_free (photo->data); - - e_card_prop_free (photo->prop); -} - -/** - * e_card_free: - */ -void -e_card_free (ECard *card) -{ - GList *l; - - g_return_if_fail (card != NULL); - - e_card_name_free (& card->name); - e_card_str_free (& card->fname); - - e_card_photo_free (card->photo); - - e_card_logo_free (card->logo); - e_card_org_free (card->org); - e_card_key_free (card->key); - e_card_sound_free (card->sound); - - e_card_prop_str_free (& card->mailer); - e_card_prop_str_free (& card->role); - e_card_prop_str_free (& card->categories); - e_card_prop_str_free (& card->comment); - e_card_prop_str_free (& card->uid); - - /* address is a little more complicated */ - card_prop_free (card->deladdr.prop); - while ((l = card->deladdr.l)) { - - e_card_deladdr_free ((CardDelAddr *) l->data); - - card->deladdr.l = g_list_remove_link (card->deladdr.l, l); - g_list_free (l); - } - - g_free (card); -} - -typedef struct -{ - char c; - int id; - - GList *sons; -} tree; - -extern CardProperty -e_card_prop_empty (void) -{ - CardProperty prop; - - prop.used = FALSE; - - prop.type = PROP_NONE; - prop.encod = ENC_7BIT; - prop.value = VAL_INLINE; - prop.charset = NULL; - prop.lang = NULL; - prop.grp = NULL; - prop.xtension = NULL; - - prop.user_data = NULL; - - return prop; -} - -static CardStrProperty -e_card_prop_str_empty (void) -{ - CardStrProperty strprop; - - strprop.prop = card_prop_empty (); - strprop.str = NULL; - - return strprop; -} - -/* Intended to check asserts. */ -extern int card_check_prop (ECardProperty prop) -{ - if (((prop.used == FALSE) || (prop.used == TRUE)) && - ((prop.type >= PROP_NONE) && (prop.type <= PROP_LAST)) && - ((prop.encod >= ENC_NONE) && (prop.encod <= ENC_LAST)) && - ((prop.value >= VAL_NONE) && (prop.value <= VAL_LAST))) - return TRUE; - - return FALSE; -} - -extern void -card_prop_free (CardProperty prop) -{ - GList *l; - - g_free (prop.charset); - g_free (prop.lang); - - for (l = prop.xtension; l; l = l->next) { - CardXAttribute *xa = (CardXAttribute *) l->data; - g_free (xa->name); - g_free (xa->data); - } - - g_list_free (l); - - prop.used = FALSE; -} - -e_card_deladdr_free (ECardDelAddr *c) -{ - card_prop_free (c->prop); - - g_free (p->pobox); - g_free (p->ext); - g_free (p->street); - g_free (p->city); - g_free (p->region); - g_free (p->code); - g_free (p->country); -} - -void -card_free (Card *crd) -{ -} - -static tree * -new_tree (char c, int id) -{ - tree *t; - - t = malloc (sizeof (tree)); - t->c = c; - t->id = id; - t->sons = NULL; - - return t; -} - -static void -add_branch (tree *t, char *str, int id) -{ - tree *tmp; - char *end; - - end = str + strlen (str) + 1; - - while (str != end) { - tmp = new_tree (*str, id); - t->sons = g_list_append (t->sons, (gpointer) tmp); - t = tmp; - - str ++; - } -} - -static tree * -add_to_tree (tree *t, struct pair p) -{ - GList *node; - char *c, *end; - tree *tmp; - - c = p.str; - end = c + strlen (c) + 1; - tmp = t; - - while (c != end) { - for (node = tmp->sons; node; node = node->next) - if (((tree *) node->data)->c == *c) { - break; - } - - if (node) { - tmp = (tree *) node->data; - tmp->id = 0; - c++; - } - else { - add_branch (tmp, c, p.id); - break; - } - } - - return t; -} - -static tree * -create_search_tree (void) -{ - tree *t; - int i; - - t = new_tree (0, 0); - for (i = 0; prop_lookup[i].str; i++) - t = add_to_tree (t, prop_lookup[i]); - - return t; -} - -static int -card_lookup_name (const char *c) -{ - static tree *search_tree = NULL; - GList *node; - tree *tmp; - const char *end; - - if (!search_tree) - search_tree = create_search_tree (); - - tmp = search_tree; - end = c + strlen (c) + 1; - - while (tmp->id == 0 && c != end) { - for (node = tmp->sons; node; node = node->next) - if (((tree *) node->data)->c == *c) { - break; - } - - if (node) { - tmp = (tree *) node->data; - c++; - } - else - return 0; - } - - return tmp->id; -} - -static enum PhotoType -get_photo_type (VObject *o) -{ - VObject *vo; - int i; - - for (i = 0; photo_pairs[i].str; i++) - if (has (o, photo_pairs[i].str)) - return photo_pairs[i].id; - - g_warning ("? < No PhotoType for Photo property. Falling back to JPEG."); - return PHOTO_JPEG; -} - -static CardProperty -get_CardProperty (VObject *o) -{ - VObjectIterator i; - CardProperty prop; - - prop = card_prop_empty (); - prop.used = TRUE; - - initPropIterator (&i, o); - while (moreIteration (&i)) { - VObject *vo = nextVObject (&i); - const char *n = vObjectName (vo); - int propid; - - propid = card_lookup_name (n); - - switch (propid) { - - case PROP_VALUE: - - if (has (vo, VCContentIDProp)) - prop.value = VAL_CID; - break; - - case PROP_ENCODING: - if (has (vo, VCQuotedPrintableProp)) - prop.encod = ENC_QUOTED_PRINTABLE; - else if (has (vo, VC8bitProp)) - prop.encod = ENC_8BIT; - else if (has (vo, VCBase64Prop)) - prop.encod = ENC_BASE64; - break; - - case PROP_QUOTED_PRINTABLE: - prop.encod = ENC_QUOTED_PRINTABLE; - break; - - case PROP_8BIT: - prop.encod = ENC_8BIT; - break; - - case PROP_BASE64: - prop.encod = ENC_BASE64; - break; - - case PROP_LANG: - if (vObjectValueType (vo)) { - prop.lang = - g_strdup (vObjectStringZValue (vo)); - } else - g_warning ("? < No value for LANG attribute."); - break; - - case PROP_CHARSET: - if (vObjectValueType (vo)) { - prop.charset = - g_strdup (vObjectStringZValue (vo)); - g_warning (prop.charset); - } else - g_warning ("? < No value for CHARSET attribute."); - break; - default: - { - CardXAttribute *c; - - c = malloc (sizeof (CardXAttribute)); - c->name = g_strdup (n); - - if (vObjectValueType (vo)) - c->data = - g_strdup (vObjectStringZValue (vo)); - else - c->data = NULL; - - prop.xtension = - g_list_append (prop.xtension, c); - } - } - } - - return prop; -} - -static gboolean -e_card_prop_has (VObject *o, - const char *id) -{ - g_assert (o != NULL); - g_assert (id != NULL); - - if (isAPropertyOf (o, id) == NULL) - return FALSE; - - return TRUE; -} - -static const char * -e_card_prop_get_str (VObject *o, - const char *id) -{ - VObject *strobj; - - g_assert (o != NULL); - g_assert (id != NULL); - - strobj = isAPropertyOf (o, id); - - if (strobj == NULL) - return g_strdup (""); - - if (vObjectValueType (strobj) != NULL) { - char *str; - char *g_str; - - str = fakeCString (vObjectStringZValue (strobj)); - g_str = g_strdup (str); - free (str); - - return g_str; - } - - return g_strdup (""); -} - -static ECardName * -e_card_get_name (VObject *o) -{ - CardName *name; - VObject *vo; - char *the_str; - - name = g_new0 (ECardName, 1); - - name->family = e_card_prop_get_substr (o, VCFamilyNameProp); - name->given = e_card_prop_get_substr (o, VCGivenNameProp); - name->additional = e_card_prop_get_substr (o, VCAdditionalNamesProp); - name->prefix = e_card_prop_get_substr (o, VCNamePrefixesProp); - name->suffix = e_card_prop_get_substr (o, VCNameSuffixesProp); - - return name; -} - -static CardDelLabel * -get_CardDelLabel (VObject *o) -{ - CardDelLabel *dellabel; - char *the_str; - - dellabel = malloc (sizeof (CardDelLabel)); - - dellabel->type = get_addr_type (o); - dellabel->data = g_strdup (str_val (o)); - - free (the_str); - return dellabel; -} - -static CardPhone * -get_CardPhone (VObject *o) -{ - CardPhone *ret; - char *the_str; - - ret = malloc (sizeof (CardPhone)); - ret->type = get_phone_type (o); - ret->data = g_strdup (str_val (o)); - - free (the_str); - - return ret; -} - -static CardEMail * -get_CardEMail (VObject *o) -{ - CardEMail *ret; - char *the_str; - - ret = malloc (sizeof (CardEMail)); - ret->type = get_email_type (o); - ret->data = g_strdup (str_val (o)); - - free (the_str); - - return ret; -} - -static CardTimeZone -strtoCardTimeZone (char *str) -{ - char s[3]; - CardTimeZone tz; - - if (*str == '-') { - tz.sign = -1; - str++; - } else - tz.sign = 1; - - tz.hours = 0; - tz.mins = 0; - - s[2] = 0; - if (strlen (str) > 2) { - s[0] = str[0]; - s[1] = str[1]; - tz.hours = atoi (s); - } else { - g_warning ("? < TimeZone value is too short."); - return tz; - } - - str += 2; - if (*str == ':') - str++; - - if (strlen (str) >= 2) { - s[0] = str[0]; - s[1] = str[1]; - tz.mins = atoi (s); - } else { - g_warning ("? < TimeZone value is too short."); - return tz; - } - - if (strlen (str) > 3) - g_warning ("? < TimeZone value is too long."); - - return tz; -} - -static CardGeoPos -strtoCardGeoPos (char *str) -{ - CardGeoPos gp; - char *s; - - gp.lon = 0; - gp.lat = 0; - - s = strchr (str, ','); - - if (! s) { - g_warning ("? < Bad format for GeoPos property."); - return gp; - } - - *s = 0; - s++; - - gp.lon = atof (str); - gp.lat = atof (s); - - return gp; -} - -static CardOrg * -e_card_vobject_to_org (VObject *o) -{ - VObject *vo; - char *the_str; - CardOrg *org; - - org = g_new0 (CardOrg, 1); - - if (has (o, VCOrgNameProp)) { - org.name = g_strdup (str_val (vo)); - free (the_str); - } - if (has (o, VCOrgUnitProp)) { - org.unit1 = g_strdup (str_val (vo)); - free (the_str); - } - if (has (o, VCOrgUnit2Prop)) { - org.unit2 = g_strdup (str_val (vo)); - free (the_str); - } - if (has (o, VCOrgUnit3Prop)) { - org.unit3 = g_strdup (str_val (vo)); - free (the_str); - } - if (has (o, VCOrgUnit4Prop)) { - org.unit4 = g_strdup (str_val (vo)); - free (the_str); - } - - return org; -} - -static CardXProperty * -get_XProp (VObject *o) -{ - char *the_str; - CardXProperty *ret; - - ret = malloc (sizeof (CardXProperty)); - ret->name = g_strdup (vObjectName (o)); - ret->data = g_strdup (str_val (o)); - free (the_str); - - return ret; -} - -static CardRev -strtoCardRev (char *str) -{ - char s[3], *t, *ss; - int len, i; - CardRev rev; - - rev.utc = 0; - len = strlen (str); - - if (str[len] == 'Z') { /* Is it UTC? */ - rev.utc = 1; - str[len] = 0; - } - - s[2] = 0; - t = strchr (str, 'T'); - if (t) { /* Take the Time */ - *t = 0; - t++; - if (strlen (t) > 2) { - s[0] = t[0]; - s[1] = t[1]; - rev.tm.tm_hour = atoi (s); - } else { - g_warning ("? < Rev value is too short."); - return rev; - } - - t += 2; - if (*t == ':') /* Ignore ':' separator */ - t++; - - if (strlen (t) > 2) { - s[0] = t[0]; - s[1] = t[1]; - rev.tm.tm_min = atoi (s); - } else { - g_warning ("? < Rev value is too short."); - return rev; - } - - t += 2; - if (*t == ':') - t++; - - if (strlen (t) > 2) { - s[0] = t[0]; - s[1] = t[1]; - rev.tm.tm_sec = atoi (s); - } else { - g_warning ("? < Rev value is too short."); - return rev; - } - - if (strlen (str) > 3) - g_warning ("? < Rev value is too long."); - - } else { - g_warning ("? < No time value for Rev property."); - } - - /* Now the date (the part before the T) */ - - if (strchr (str, '-')) { /* extended iso 8601 */ - for (ss = strtok (str, "-"), i = 0; ss; - ss = strtok (NULL, "-"), i++) - switch (i) { - case 0: - rev.tm.tm_year = atoi (ss); - break; - case 1: - rev.tm.tm_mon = atoi (ss); - break; - case 2: - rev.tm.tm_mday = atoi (ss); - break; - default: - g_warning ("? < Too many values for Rev property."); - } - - if (i < 2) - g_warning ("? < Too few values for Rev property."); - } else { - if (strlen (str) >= 8) { /* short representation */ - rev.tm.tm_mday = atoi (str + 6); - str[6] = 0; - rev.tm.tm_mon = atoi (str + 4); - str[4] = 0; - rev.tm.tm_year = atoi (str); - } else - g_warning ("? < Bad format for Rev property."); - } - - return rev; -} - -static enum KeyType -get_key_type (VObject *o) -{ - VObject *vo; - int i; - - for (i = 0; key_pairs[i].str; i++) - if (has (o, key_pairs[i].str)) - return key_pairs[i].id; - - g_warning ("? < No KeyType for Key property. Falling back to PGP."); - return KEY_PGP; -} - -static CardPhoto -get_CardPhoto (VObject *o) -{ - VObject *vo; - char *the_str; - CardPhoto photo; - - photo.type = get_photo_type (o); - - if (has (o, VCDataSizeProp)) { - photo.size = vObjectIntegerValue (vo); - photo.data = malloc (photo.size); - memcpy (photo.data, vObjectAnyValue (o), photo.size); - } else { - photo.size = strlen (str_val (o)) + 1; - photo.data = g_strdup (the_str); - free (the_str); - } - - return photo; -} - -static enum SoundType -get_sound_type (VObject *o) -{ - VObject *vo; - int i; - - for (i = 0; sound_pairs[i].str; i++) - if (has (o, sound_pairs[i].str)) - return sound_pairs[i].id; - - return SOUND_PHONETIC; -} - -static CardSound -get_CardSound (VObject *o) -{ - VObject *vo; - char *the_str; - CardSound sound; - - sound.type = get_sound_type (o); - - if (has (o, VCDataSizeProp)) { - sound.size = vObjectIntegerValue (vo); - sound.data = malloc (sound.size); - memcpy (sound.data, vObjectAnyValue (o), sound.size); - } else { - sound.size = strlen (str_val (o)); - sound.data = g_strdup (the_str); - free (the_str); - } - - return sound; -} - -/* Loads our card contents from a VObject */ -static ECard * -e_card_construct_from_vobject (ECard *card, - VObject *vcrd) -{ - VObjectIterator i; - Card *crd; - char *the_str; - - initPropIterator (&i, vcrd); - crd = card_new (); - - while (moreIteration (&i)) { - VObject *o = nextVObject (&i); - const char *n = vObjectName (o); - int propid; - CardProperty *prop = NULL; - - propid = card_lookup_name (n); - - switch (propid) { - case PROP_FNAME: - prop = &crd->fname.prop; - crd->fname.str = g_strdup (str_val (o)); - free (the_str); - break; - case PROP_NAME: - prop = &crd->name.prop; - crd->name = e_card_get_name (o); - break; - case PROP_PHOTO: - prop = &crd->photo.prop; - crd->photo = get_CardPhoto (o); - break; - case PROP_BDAY: - prop = &crd->bday.prop; - crd->bday = strtoCardBDay (str_val (o)); - free (the_str); - break; - case PROP_DELADDR: - { - CardDelAddr *c; - c = get_CardDelAddr (o); - prop = &c->prop; - crd->deladdr.l = g_list_append (crd->deladdr.l, c); - } - break; - case PROP_DELLABEL: - { - CardDelLabel *c; - c = get_CardDelLabel (o); - prop = &c->prop; - crd->dellabel.l = g_list_append (crd->dellabel.l, c); - } - break; - case PROP_PHONE: - { - CardPhone *c; - - c = get_CardPhone (o); - prop = &c->prop; - crd->phone.l = g_list_append (crd->phone.l, c); - } - break; - case PROP_EMAIL: - { - CardEMail *c; - - c = get_CardEMail (o); - prop = &c->prop; - crd->email.l = g_list_append (crd->email.l, c); - } - break; - case PROP_MAILER: - prop = &crd->mailer.prop; - crd->mailer.str = g_strdup (str_val (o)); - free (the_str); - break; - case PROP_TIMEZN: - prop = &crd->timezn.prop; - crd->timezn = strtoCardTimeZone (str_val (o)); - free (the_str); - break; - case PROP_GEOPOS: - prop = &crd->geopos.prop; - crd->geopos = strtoCardGeoPos (str_val (o)); - break; - case PROP_ROLE: - prop = &crd->role.prop; - crd->role.str = g_strdup (str_val (o)); - free (the_str); - break; - case PROP_LOGO: - prop = &crd->logo.prop; - crd->logo = get_CardPhoto (o); - break; - case PROP_AGENT: - crd->agent = card_create_from_vobject (o); - break; - case PROP_ORG: - prop = &crd->org.prop; - crd->org = get_CardOrg (o); - break; - case PROP_CATEGORIES: - prop = &crd->categories.prop; - crd->categories.str = g_strdup (str_val (o)); - crd->categories.prop.encod = ENC_QUOTED_PRINTABLE; - free (the_str); - break; - case PROP_COMMENT: - prop = &crd->comment.prop; - crd->comment.str = g_strdup (str_val (o)); - crd->comment.prop.encod = ENC_QUOTED_PRINTABLE; - free (the_str); - break; - case PROP_REV: - prop = &crd->rev.prop; - crd->rev = strtoCardRev (str_val (o)); - free (the_str); - break; - case PROP_SOUND: - prop = &crd->sound.prop; - crd->sound = get_CardSound (o); - break; - case PROP_VERSION: - { - char *str; - str = str_val (o); - if (strcmp (str, "2.1")) - g_warning ("? < Version doesn't match."); - free (the_str); - } - break; - case PROP_KEY: - prop = &crd->key.prop; - crd->key.type = get_key_type (o); - crd->key.data = g_strdup (str_val (o)); - free (the_str); - break; - default: - { - CardXProperty *c; - - c = get_XProp (o); - prop = &c->prop; - crd->xtension.l = g_list_append (crd->xtension.l, c); - } - break; - } - - if (prop) { - *prop = get_CardProperty (o); - prop->type = propid; - } - } - - return crd; -} - -/* Loads a card from a file */ -GList * -card_load (GList *crdlist, char *fname) -{ - VObject *vobj, *tmp; - - vobj = Parse_MIME_FromFileName (fname); - if (!vobj) { - g_warning ("Could not load the cardfile"); - return NULL; - } - - while (vobj) { - const char *n = vObjectName (vobj); - - if (strcmp (n, VCCardProp) == 0) { - crdlist = g_list_append (crdlist, (gpointer) - card_create_from_vobject (vobj)); - } - tmp = vobj; - vobj = nextVObjectInList (vobj); - cleanVObject (tmp); - } - - cleanVObject (vobj); - cleanStrTbl (); - return crdlist; -} - -static VObject * -add_strProp (VObject *o, const char *id, char *val) -{ - VObject *vo = NULL; - - if (val) - vo = addPropValue (o, id, val); - - return vo; -} - -static VObject * -add_CardProperty (VObject *o, CardProperty *prop) -{ - GList *node; - - switch (prop->encod) { - case ENC_BASE64: - addProp (o, VCBase64Prop); - break; - case ENC_QUOTED_PRINTABLE: - addProp (o, VCQuotedPrintableProp); - break; - case ENC_8BIT: - addProp (o, VC8bitProp); - break; - case ENC_7BIT: - /* Do nothing: 7BIT is the default. Avoids file clutter. */ - break; - default: - g_warning ("? < Card had invalid encoding type."); - } - - switch (prop->value) { - case VAL_CID: - addProp (o, VCContentIDProp); - break; - case VAL_INLINE: - /* Do nothing: INLINE is the default. Avoids file clutter. */ - break; - default: - g_warning ("? < Card had invalid value type."); - } - - for (node = prop->xtension; node; node = node->next) { - CardXAttribute *xa = (CardXAttribute *) node->data; - if (xa->data) - addPropValue (o, xa->name, xa->data); - else - addProp (o, xa->name); - } - - add_strProp (o, VCCharSetProp, prop->charset); - add_strProp (o, VCLanguageProp, prop->lang); - - return o; -} - -static VObject * -add_CardStrProperty (VObject *vobj, const char *id, CardStrProperty *strprop) -{ - VObject *vprop; - - if (strprop->prop.used) { - vprop = add_strProp (vobj, id, strprop->str); - add_CardProperty (vprop, &strprop->prop); - } - - return vobj; -} - -static VObject * -add_PhotoType (VObject *o, enum PhotoType photo_type) -{ - int i; - - for (i = 0; photo_pairs[i].str; i++) - if (photo_type == photo_pairs[i].id) { - addProp (o, photo_pairs[i].str); - return o; - } - - g_warning ("? > No PhotoType for Photo property. Falling back to JPEG."); - addProp (o, VCJPEGProp); - - return o; -} - -static VObject * -add_AddrType (VObject *o, int addr_type) -{ - int i; - - for (i = 0; addr_pairs[i].str; i++) - if (addr_type & addr_pairs[i].id) - addProp (o, addr_pairs[i].str); - - return o; -} - -static void -add_strAddrType (GString *string, int addr_type) -{ - int i, first = 1; - char *str; - - if (addr_type) { - g_string_append (string, " ("); - - for (i = 0; addr_pairs[i].str; i++) - if (addr_type & addr_pairs[i].id) { - if (!first) - g_string_append (string, ", "); - first = 0; - str = my_cap (addr_pairs[i].str); - g_string_append (string, str); - g_free (str); - } - - g_string_append_c (string, ')'); - } -} - -static VObject * -add_PhoneType (VObject *o, int phone_type) -{ - int i; - - for (i = 0; phone_pairs[i].str; i++) - if (phone_type & phone_pairs[i].id) - addProp (o, phone_pairs[i].str); - - return o; -} - -static void -add_strPhoneType (GString *string, int phone_type) -{ - int i, first = 1; - char *str; - - if (phone_type) { - g_string_append (string, " ("); - - for (i = 0; phone_pairs[i].str; i++) - if (phone_type & phone_pairs[i].id) { - if (!first) - g_string_append (string, ", "); - first = 0; - str = my_cap (phone_pairs[i].str); - g_string_append (string, str); - g_free (str); - } - - g_string_append_c (string, ')'); - } -} - -static VObject * -add_EMailType (VObject *o, enum EMailType email_type) -{ - int i; - - for (i = 0; email_pairs[i].str; i++) - if (email_type == email_pairs[i].id) { - addProp (o, email_pairs[i].str); - return o; - } - - g_warning ("? > No EMailType for EMail property. Falling back to INET."); - addProp (o, VCInternetProp); - - return o; -} - -static void -add_strEMailType (GString *string, int email_type) -{ - int i; - char *str; - - if (email_type) { - g_string_append (string, " ("); - - for (i = 0; email_pairs[i].str; i++) - if (email_type == email_pairs[i].id) { - str = my_cap (email_pairs[i].str); - g_string_append (string, str); - g_free (str); - break; - } - - g_string_append_c (string, ')'); - } -} - -static VObject * -add_KeyType (VObject *o, enum KeyType key_type) -{ - int i; - - for (i = 0; key_pairs[i].str; i++) - if (key_type == key_pairs[i].id) { - addProp (o, key_pairs[i].str); - return o; - } - - g_warning ("? > No KeyType for Key property. Falling back to PGP."); - addProp (o, VCPGPProp); - - return o; -} - -static void -add_strKeyType (GString *string, int key_type) -{ - int i; - char *str; - - if (key_type) { - g_string_append (string, " ("); - - for (i = 0; key_pairs[i].str; i++) - if (key_type == key_pairs[i].id) { - str = my_cap (key_pairs[i].str); - g_string_append (string, str); - g_free (str); - break; - } - - g_string_append_c (string, ')'); - } -} - -static VObject * -add_SoundType (VObject *o, enum SoundType sound_type) -{ - int i; - - for (i = 0; sound_pairs[i].str; i++) - if (sound_type == sound_pairs[i].id) { - addProp (o, sound_pairs[i].str); - return o; - } - - return o; -} - -char *card_timezn_str (CardTimeZone timezn) -{ - char *str; - - str = malloc (7); - snprintf (str, 7, (timezn.sign == -1)? "-%02d:%02d" : "%02d:%02d", - timezn.hours, timezn.mins); - return str; -} - -char *card_geopos_str (CardGeoPos geopos) -{ - char *str; - - str = malloc (15); - snprintf (str, 15, "%03.02f,%03.02f", geopos.lon, geopos.lat); - return str; -} - -static void add_CardStrProperty_to_string (GString *string, char *prop_name, - CardStrProperty *strprop) -{ - if (strprop->prop.used) { - if (prop_name) - g_string_append (string, prop_name); - - g_string_append (string, strprop->str); - } -} - -static void add_strProp_to_string (GString *string, char *prop_name, char *val) -{ - if (val) { - if (prop_name) - g_string_append (string, prop_name); - - g_string_append (string, val); - } -} - -static void addProp_to_string (GString *string, char *prop_name) -{ - if (prop_name) - g_string_append (string, prop_name); -} - -char * -card_to_string (Card *crd) -{ - GString *string; - char *ret; - - string = g_string_new (""); - - add_CardStrProperty_to_string (string, _ ("Card: "), &crd->fname); - if (crd->name.prop.used) { - addProp_to_string (string, _ ("\nName: ")); - add_strProp_to_string (string, _ ("\n Prefix: "), crd->name.prefix); - add_strProp_to_string (string, _ ("\n Given: "), crd->name.given); - add_strProp_to_string (string, _ ("\n Additional: "), crd->name.additional); - add_strProp_to_string (string, _ ("\n Family: "), crd->name.family); - add_strProp_to_string (string, _ ("\n Suffix: "), crd->name.suffix); - g_string_append_c (string, '\n'); - } - -/* if (crd->photo.prop.used) { - addPropSizedValue (string, _ ("\nPhoto: "), - crd->photo.data, crd->photo.size); - add_PhotoType (string, crd->photo.type); - }*/ - - if (crd->bday.prop.used) { - char *date_str; - - date_str = card_bday_str (crd->bday); - add_strProp_to_string (string, _ ("\nBirth Date: "), date_str); - free (date_str); - } - - if (crd->deladdr.l) { - GList *node; - - for (node = crd->deladdr.l; node; node = node->next) { - CardDelAddr *deladdr = (CardDelAddr *) node->data; - - if (deladdr->prop.used) { - addProp_to_string (string, _ ("\nAddress:")); - add_strAddrType (string, deladdr->type); - add_strProp_to_string (string, _ ("\n Postal Box: "), deladdr->po); - add_strProp_to_string (string, _ ("\n Ext: "),deladdr->ext); - add_strProp_to_string (string, _ ("\n Street: "),deladdr->street); - add_strProp_to_string (string, _ ("\n City: "), deladdr->city); - add_strProp_to_string (string, _ ("\n Region: "), deladdr->region); - add_strProp_to_string (string, _ ("\n Postal Code: "), deladdr->code); - add_strProp_to_string (string, _ ("\n Country: "), deladdr->country); - } - } - - g_string_append_c (string, '\n'); - } - - if (crd->dellabel.l) { - GList *node; - - for (node = crd->dellabel.l; node; node = node->next) { - CardDelLabel *dellabel = (CardDelLabel *) node->data; - - add_strProp_to_string (string, _ ("\nDelivery Label: "), - dellabel->data); - add_strAddrType (string, dellabel->type); - } - } - - if (crd->phone.l) { - GList *node; - char *sep; - - if (crd->phone.l->next) { - sep = " "; - g_string_append (string, _ ("\nTelephones:\n")); - } else { - sep = " "; - g_string_append (string, _ ("\nTelephone:")); - } - - for (node = crd->phone.l; node; node = node->next) { - CardPhone *phone = (CardPhone *) node->data; - - if (phone->prop.used) { - g_string_append (string, sep); - g_string_append (string, phone->data); - add_strPhoneType (string, phone->type); - g_string_append_c (string, '\n'); - } - } - - if (crd->phone.l->next) - g_string_append_c (string, '\n'); - } - - if (crd->email.l) { - GList *node; - char *sep; - - if (crd->email.l->next) { - sep = " "; - g_string_append (string, _ ("\nE-mail:\n")); - } else { - sep = " "; - g_string_append (string, _ ("\nE-mail:")); - } - - - for (node = crd->email.l; node; node = node->next) { - CardEMail *email = (CardEMail *) node->data; - - if (email->prop.used) { - g_string_append (string, sep); - g_string_append (string, email->data); - add_strEMailType (string, email->type); - g_string_append_c (string, '\n'); - } - } - - if (crd->email.l->next) - g_string_append_c (string, '\n'); - } - - add_CardStrProperty_to_string (string, _ ("\nMailer: "), &crd->mailer); - - if (crd->timezn.prop.used) { - char *str; - - str = card_timezn_str (crd->timezn); - add_strProp_to_string (string, _ ("\nTime Zone: "), str); - free (str); - } - - if (crd->geopos.prop.used) { - char *str; - - str = card_geopos_str (crd->geopos); - add_strProp_to_string (string, _ ("\nGeo Location: "), str); - free (str); - } - - add_CardStrProperty_to_string (string, _ ("\nBusiness Role: "), &crd->role); - -/* if (crd->logo.prop.used) { - addPropSizedValue (string, _ ("\nLogo: "), - crd->logo.data, crd->logo.size); - add_PhotoType (string, crd->logo.type); - }*/ - -/* if (crd->agent) - addstringectProp (string, card_convert_to_stringect (crd->agent));*/ - - if (crd->org.prop.used) { - addProp_to_string (string, _ ("\nOrg: ")); - add_strProp_to_string (string, _ ("\n Name: "), crd->org.name); - add_strProp_to_string (string, _ ("\n Unit: "), crd->org.unit1); - add_strProp_to_string (string, _ ("\n Unit2: "), crd->org.unit2); - add_strProp_to_string (string, _ ("\n Unit3: "), crd->org.unit3); - add_strProp_to_string (string, _ ("\n Unit4: "), crd->org.unit4); - g_string_append_c (string, '\n'); - } - - add_CardStrProperty_to_string (string, _ ("\nCategories: "), &crd->categories); - add_CardStrProperty_to_string (string, _ ("\nComment: "), &crd->comment); - -/* if (crd->sound.prop.used) { - if (crd->sound.type != SOUND_PHONETIC) - addPropSizedValue (string, _ ("\nPronunciation: "), - crd->sound.data, crd->sound.size); - else - add_strProp_to_string (string, _ ("\nPronunciation: "), - crd->sound.data); - - add_SoundType (string, crd->sound.type); - }*/ - - add_CardStrProperty_to_string (string, _ ("\nUnique String: "), &crd->uid); - - if (crd->key.prop.used) { - add_strProp_to_string (string, _ ("\nPublic Key: "), crd->key.data); - add_strKeyType (string, crd->key.type); - } - - ret = g_strdup (string->str); - g_string_free (string, TRUE); - - return ret; -} - -char * -card_to_vobj_string (Card *crd) -{ - VObject *object; - char *data, *ret_val; - - g_assert (crd != NULL); - - object = card_convert_to_vobject (crd); - data = writeMemVObject (0, 0, object); - ret_val = g_strdup (data); - free (data); - - cleanVObject (object); - - return ret_val; -} - -void -card_save (Card *crd, FILE *fp) -{ - VObject *object; - - g_return_if_fail (crd != NULL); - - object = card_convert_to_vobject (crd); - writeVObject (fp, object); - cleanVObject (object); -} -#endif - -static ECardDate -e_card_date_from_string (char *str) -{ - ECardDate date; - int length; - - date.year = 0; - date.month = 0; - date.day = 0; - - length = strlen(str); - - if (length == 10 ) { - date.year = str[0] * 1000 + str[1] * 100 + str[2] * 10 + str[3] - '0' * 1111; - date.month = str[5] * 10 + str[6] - '0' * 11; - date.day = str[8] * 10 + str[9] - '0' * 11; - } else if ( length == 8 ) { - date.year = str[0] * 1000 + str[1] * 100 + str[2] * 10 + str[3] - '0' * 1111; - date.month = str[4] * 10 + str[5] - '0' * 11; - date.day = str[6] * 10 + str[7] - '0' * 11; - } - - return date; -} - -char * -e_v_object_get_child_value(VObject *vobj, char *name) -{ - char *ret_val; - VObjectIterator iterator; - initPropIterator(&iterator, vobj); - while(moreIteration (&iterator)) { - VObject *attribute = nextVObject(&iterator); - const char *id = vObjectName(attribute); - if ( ! strcmp(id, name) ) { - assign_string(attribute, &ret_val); - return ret_val; - } - } - ret_val = g_new(char, 1); - *ret_val = 0; - return ret_val; -} - -static ECardPhoneFlags -get_phone_flags (VObject *vobj) -{ - ECardPhoneFlags ret = 0; - int i; - - struct { - char *id; - ECardPhoneFlags flag; - } phone_pairs[] = { - { VCPreferredProp, E_CARD_PHONE_PREF }, - { VCWorkProp, E_CARD_PHONE_WORK }, - { VCHomeProp, E_CARD_PHONE_HOME }, - { VCVoiceProp, E_CARD_PHONE_VOICE }, - { VCFaxProp, E_CARD_PHONE_FAX }, - { VCMessageProp, E_CARD_PHONE_MSG }, - { VCCellularProp, E_CARD_PHONE_CELL }, - { VCPagerProp, E_CARD_PHONE_PAGER }, - { VCBBSProp, E_CARD_PHONE_BBS }, - { VCModemProp, E_CARD_PHONE_MODEM }, - { VCCarProp, E_CARD_PHONE_CAR }, - { VCISDNProp, E_CARD_PHONE_ISDN }, - { VCVideoProp, E_CARD_PHONE_VIDEO }, - }; - - for (i = 0; i < sizeof(phone_pairs) / sizeof(phone_pairs[0]); i++) { - if (isAPropertyOf (vobj, phone_pairs[i].id)) { - ret |= phone_pairs[i].flag; - } - } - - return ret; -} - -static void -set_phone_flags (VObject *vobj, ECardPhoneFlags flags) -{ - int i; - - struct { - char *id; - ECardPhoneFlags flag; - } phone_pairs[] = { - { VCPreferredProp, E_CARD_PHONE_PREF }, - { VCWorkProp, E_CARD_PHONE_WORK }, - { VCHomeProp, E_CARD_PHONE_HOME }, - { VCVoiceProp, E_CARD_PHONE_VOICE }, - { VCFaxProp, E_CARD_PHONE_FAX }, - { VCMessageProp, E_CARD_PHONE_MSG }, - { VCCellularProp, E_CARD_PHONE_CELL }, - { VCPagerProp, E_CARD_PHONE_PAGER }, - { VCBBSProp, E_CARD_PHONE_BBS }, - { VCModemProp, E_CARD_PHONE_MODEM }, - { VCCarProp, E_CARD_PHONE_CAR }, - { VCISDNProp, E_CARD_PHONE_ISDN }, - { VCVideoProp, E_CARD_PHONE_VIDEO }, - }; - - for (i = 0; i < sizeof(phone_pairs) / sizeof(phone_pairs[0]); i++) { - if (flags & phone_pairs[i].flag) { - addProp (vobj, phone_pairs[i].id); - } - } -} - -static ECardAddressFlags -get_address_flags (VObject *vobj) -{ - ECardAddressFlags ret = 0; - int i; - - struct { - char *id; - ECardAddressFlags flag; - } addr_pairs[] = { - { VCDomesticProp, E_CARD_ADDR_DOM }, - { VCInternationalProp, E_CARD_ADDR_INTL }, - { VCPostalProp, E_CARD_ADDR_POSTAL }, - { VCParcelProp, E_CARD_ADDR_PARCEL }, - { VCHomeProp, E_CARD_ADDR_HOME }, - { VCWorkProp, E_CARD_ADDR_WORK }, - }; - - for (i = 0; i < sizeof(addr_pairs) / sizeof(addr_pairs[0]); i++) { - if (isAPropertyOf (vobj, addr_pairs[i].id)) { - ret |= addr_pairs[i].flag; - } - } - - return ret; -} - -static void -set_address_flags (VObject *vobj, ECardAddressFlags flags) -{ - int i; - - struct { - char *id; - ECardAddressFlags flag; - } addr_pairs[] = { - { VCDomesticProp, E_CARD_ADDR_DOM }, - { VCInternationalProp, E_CARD_ADDR_INTL }, - { VCPostalProp, E_CARD_ADDR_POSTAL }, - { VCParcelProp, E_CARD_ADDR_PARCEL }, - { VCHomeProp, E_CARD_ADDR_HOME }, - { VCWorkProp, E_CARD_ADDR_WORK }, - }; - - for (i = 0; i < sizeof(addr_pairs) / sizeof(addr_pairs[0]); i++) { - if (flags & addr_pairs[i].flag) { - addProp (vobj, addr_pairs[i].id); - } - } -} diff --git a/addressbook/backend/ebook/e-card.h b/addressbook/backend/ebook/e-card.h deleted file mode 100644 index 3def0654cd..0000000000 --- a/addressbook/backend/ebook/e-card.h +++ /dev/null @@ -1,137 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * Authors: - * Chris Lahey - * Arturo Espinosa - * Nat Friedman (nat@helixcode.com) - * - * Copyright (C) 2000 Helix Code, Inc. - * Copyright (C) 1999 The Free Software Foundation - */ - -#ifndef __E_CARD_H__ -#define __E_CARD_H__ - -#include -#include -#include -#include -#include - -#define E_TYPE_CARD (e_card_get_type ()) -#define E_CARD(obj) (GTK_CHECK_CAST ((obj), E_TYPE_CARD, ECard)) -#define E_CARD_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_CARD, ECardClass)) -#define E_IS_CARD(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_CARD)) -#define E_IS_CARD_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), E_TYPE_CARD)) - -typedef struct _ECard ECard; -typedef struct _ECardClass ECardClass; - -struct _ECard { - GtkObject object; - char *id; - - char *file_as; /* The File As field. */ - char *fname; /* The full name. */ - ECardName *name; /* The structured name. */ - ECardList *address; /* Delivery addresses (ECardDeliveryAddress *) */ - ECardList *address_label; /* Delivery address labels - * (ECardAddrLabel *) */ - - ECardList *phone; /* Phone numbers (ECardPhone *) */ - ECardList *email; /* Email addresses (char *) */ - char *url; /* The person's web page. */ - - ECardDate *bday; /* The person's birthday. */ - - char *note; - - - char *org; /* The person's organization. */ - char *org_unit; /* The person's organization unit. */ - char *office; /* The person's office. */ - char *role; /* The person's role w/in his org */ - char *title; /* The person's title w/in his org */ - - char *manager; - char *assistant; - - char *nickname; /* The person's nickname */ - - char *spouse; /* The person's spouse. */ - ECardDate *anniversary; /* The person's anniversary. */ - - char *mailer; /* Mailer */ - - char *fburl; /* Free Busy URL */ - - ECardList *categories; /* Categories. */ - - ECardList *arbitrary; /* Arbitrary fields. */ - -#if 0 - ECardPhoto *logo; /* This person's org's logo. */ - - ECardPhoto *photo; /* A photo of the person. */ - - ECard *agent; /* A person who sereves as this - guy's agent/secretary/etc. */ - - - char *categories; /* A list of the categories to which - this card belongs. */ - - ECardSound *sound; - - ECardKey *key; /* The person's public key. */ - ECardTimeZone *timezn; /* The person's time zone. */ - ECardGeoPos *geopos; /* The person's long/lat. */ - - ECardRev *rev; /* The time this card was last - modified. */ - - ECardList xtension; -#endif -}; - -struct _ECardClass { - GtkObjectClass parent_class; - GHashTable *attribute_jump_table; -}; - - -ECard *e_card_new ( char *vcard); -char *e_card_get_id ( ECard *card); -void e_card_set_id ( ECard *card, - const char *character); -char *e_card_get_vcard ( ECard *card); -ECard *e_card_duplicate ( ECard *card); - -ECardPhone *e_card_phone_new (void); -ECardPhone *e_card_phone_copy (const ECardPhone *phone); -void e_card_phone_free ( ECardPhone *phone); - -ECardDeliveryAddress *e_card_delivery_address_new (void); -ECardDeliveryAddress *e_card_delivery_address_copy (const ECardDeliveryAddress *addr); -void e_card_delivery_address_free ( ECardDeliveryAddress *addr); -char *e_card_delivery_address_to_string (const ECardDeliveryAddress *addr); -ECardDeliveryAddress *e_card_delivery_address_from_string (const char *full_addr); - -ECardAddrLabel *e_card_address_label_new (void); -ECardAddrLabel *e_card_address_label_copy (const ECardAddrLabel *addr); -void e_card_address_label_free ( ECardAddrLabel *addr); - -ECardName *e_card_name_new (void); -ECardName *e_card_name_copy (const ECardName *name); -void e_card_name_free ( ECardName *name); -char *e_card_name_to_string (const ECardName *name); -ECardName *e_card_name_from_string (const char *full_name); - -ECardArbitrary *e_card_arbitrary_new (void); -ECardArbitrary *e_card_arbitrary_copy (const ECardArbitrary *arbitrary); -void e_card_arbitrary_free ( ECardArbitrary *arbitrary); - -/* Standard Gtk function */ -GtkType e_card_get_type (void); - -#endif /* ! __E_CARD_H__ */ diff --git a/addressbook/backend/ebook/load-pine-addressbook.c b/addressbook/backend/ebook/load-pine-addressbook.c deleted file mode 100644 index 8837a11a9a..0000000000 --- a/addressbook/backend/ebook/load-pine-addressbook.c +++ /dev/null @@ -1,147 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -#include -#include -#include -#include - -#include - -static CORBA_Environment ev; - -#ifdef USING_OAF - -#include - -static void -init_corba (int *argc, char **argv) -{ - gnome_init_with_popt_table("blah", "0.0", *argc, argv, NULL, 0, NULL); - - oaf_init (*argc, argv); -} - -#else - -#include - -static void -init_corba (int *argc, char **argv) -{ - gnome_CORBA_init_with_popt_table ( - "blah", "0.0", - argc, argv, NULL, 0, NULL, GNORBA_INIT_SERVER_FUNC, &ev); -} - -#endif - -static void -init_bonobo (int argc, char **argv) -{ - if (bonobo_init (CORBA_OBJECT_NIL, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL) == FALSE) - g_error (_("Could not initialize Bonobo")); -} - -static void -add_card_cb (EBook *book, EBookStatus status, const gchar *id, gpointer closure) -{ - ECard *card = E_CARD(closure); - char *vcard = e_card_get_vcard(card); - g_print ("Saved card: %s\n", vcard); - g_free(vcard); - gtk_object_unref(GTK_OBJECT(card)); -} - -static void -book_open_cb (EBook *book, EBookStatus status, gpointer closure) -{ - FILE *fp = fopen (".addressbook", "r"); - char line[1024]; - while(fgets(line, 1024, fp)) { - int length = strlen(line); - char **strings; - ECardName *name; - ECard *card; - ECardList *list; - if (line[length - 1] == '\n') - line[--length] = 0; - - card = e_card_new(""); - strings = g_strsplit(line, "\t", 3); - name = e_card_name_from_string(strings[1]); - gtk_object_set(GTK_OBJECT(card), - "nickname", strings[0], - "full_name", strings[1], - "name", name, - NULL); - gtk_object_get(GTK_OBJECT(card), - "email", &list, - NULL); - e_card_list_append(list, strings[2]); - g_strfreev(strings); - e_book_add_card(book, card, add_card_cb, card); - } -} - -static guint -ebook_create (void) -{ - EBook *book; - - book = e_book_new (); - - if (!book) { - printf ("%s: %s(): Couldn't create EBook, bailing.\n", - __FILE__, - __FUNCTION__); - return FALSE; - } - - - if (! e_book_load_uri (book, "file:/tmp/test.db", book_open_cb, NULL)) { - printf ("error calling load_uri!\n"); - } - - - return FALSE; -} - -#if 0 -static char * -read_file (char *name) -{ - int len; - char buff[65536]; - char line[1024]; - FILE *f; - - f = fopen (name, "r"); - if (f == NULL) - g_error ("Unable to open %s!\n", name); - - len = 0; - while (fgets (line, sizeof (line), f) != NULL) { - strcpy (buff + len, line); - len += strlen (line); - } - - fclose (f); - - return g_strdup (buff); -} -#endif - -int -main (int argc, char **argv) -{ - - CORBA_exception_init (&ev); - - init_corba (&argc, argv); - init_bonobo (argc, argv); - - gtk_idle_add ((GtkFunction) ebook_create, NULL); - - bonobo_main (); - - return 0; -} diff --git a/addressbook/backend/ebook/test-card.c b/addressbook/backend/ebook/test-card.c deleted file mode 100644 index c6ee6e9ff1..0000000000 --- a/addressbook/backend/ebook/test-card.c +++ /dev/null @@ -1,194 +0,0 @@ -#include -#include "e-card.h" - -#define TEST_VCARD \ -"BEGIN:VCARD -" \ -"FN:Nat -" \ -"N:Friedman;Nat;D;Mr. -" \ -"ORG:Helix Code, Inc. -" \ -"TITLE:Head Geek -" \ -"ROLE:Programmer/Executive -" \ -"BDAY:1977-08-06 -" \ -"TEL;WORK:617 679 1984 -" \ -"TEL;CELL:123 456 7890 -" \ -"EMAIL;INTERNET:nat@nat.org -" \ -"EMAIL;INTERNET:nat@helixcode.com -" \ -"ADR;WORK;POSTAL:P.O. Box 101;;;Any Town;CA;91921-1234; -" \ -"ADR;HOME;POSTAL;INTL:P.O. Box 202;;;Any Town 2;MI;12344-4321;USA -" \ -"END:VCARD -" \ -" -" - -static char * -read_file (char *name) -{ - int len; - char buff[65536]; - char line[1024]; - FILE *f; - - f = fopen (name, "r"); - if (f == NULL) - g_error ("Unable to open %s!\n", name); - - len = 0; - while (fgets (line, sizeof (line), f) != NULL) { - strcpy (buff + len, line); - len += strlen (line); - } - - fclose (f); - - return g_strdup (buff); -} - - - -int -main (int argc, char **argv) -{ - char *cardstr; - ECard *card; - - /* Fields */ - char *fname; - char *org; - char *org_unit; - char *title; - char *role; - char *nickname; - char *fburl; - ECardName *name; - ECardList *address; - ECardList *phone; - ECardList *email; - ECardIterator *iterator; - ECardDate *bday; - - gnome_init ("TestCard", "0.0", argc, argv); - - cardstr = NULL; - if (argc == 2) - cardstr = read_file (argv [1]); - - if (cardstr == NULL) - cardstr = TEST_VCARD; -#if 0 - { - int i; - for ( i = 0; i < 100000; i++ ) { - card = e_card_new (cardstr); - - gtk_object_unref (GTK_OBJECT (card)); - } - } -#endif - card = e_card_new (cardstr); - gtk_object_get(GTK_OBJECT(card), - "full_name", &fname, - "name", &name, - "address", &address, - "phone", &phone, - "email", &email, - "org", &org, - "org_unit", &org_unit, - "title", &title, - "role", &role, - "nickname", &nickname, - "fburl", &fburl, - "birth_date", &bday, - NULL); - if ( fname ) { - printf("Name : %s\n", fname); - g_free(fname); - } - if ( name ) { - printf("Full Name:\n"); - if ( name->prefix ) - printf(" prefix : %s\n", name->prefix); - if ( name->given ) - printf(" given : %s\n", name->given); - if ( name->additional ) - printf(" additional : %s\n", name->additional); - if ( name->family ) - printf(" family : %s\n", name->family); - if ( name->suffix ) - printf(" suffix : %s\n", name->suffix); - } - if ( org ) { - printf("Company : %s\n", org); - } - if ( org_unit ) { - printf("Department : %s\n", org_unit); - } - if ( title ) { - printf("Title : %s\n", title); - } - if ( role ) { - printf("Profession : %s\n", role); - } - if ( nickname ) { - printf("Nickname : %s\n", nickname); - } - if ( fburl ) { - printf("Free Busy URL : %s\n", fburl); - } - if ( bday ) { - printf("BDay : %4d-%02d-%02d\n", bday->year, bday->month, bday->day); - } - if ( email ) { - iterator = e_card_list_get_iterator(address); - for (; e_card_iterator_is_valid(iterator); e_card_iterator_next(iterator)) { - printf("Email : %s\n", (char *) e_card_iterator_get(iterator)); - } - gtk_object_unref(GTK_OBJECT(iterator)); - } - if ( phone ) { - iterator = e_card_list_get_iterator(address); - for (; e_card_iterator_is_valid(iterator); e_card_iterator_next(iterator)) { - ECardPhone *e_card_phone = (ECardPhone *) e_card_iterator_get(iterator); - printf("Phone ; %d : %s\n", e_card_phone->flags, e_card_phone->number); - } - gtk_object_unref(GTK_OBJECT(iterator)); - } - if ( address ) { - iterator = e_card_list_get_iterator(address); - for (; e_card_iterator_is_valid(iterator); e_card_iterator_next(iterator)) { - ECardDeliveryAddress *del_address = (ECardDeliveryAddress *) e_card_iterator_get(iterator); - printf("Address ; %d:\n", del_address->flags); - if ( del_address->po ) - printf(" Po : %s\n", del_address->po); - if ( del_address->ext ) - printf(" Ext : %s\n", del_address->ext); - if ( del_address->street ) - printf(" Street : %s\n", del_address->street); - if ( del_address->city ) - printf(" City : %s\n", del_address->city); - if ( del_address->region ) - printf(" Region : %s\n", del_address->region); - if ( del_address->code ) - printf(" Code : %s\n", del_address->code); - if ( del_address->country ) - printf(" Country : %s\n", del_address->country); - } - gtk_object_unref(GTK_OBJECT(iterator)); - } - printf("%s", e_card_get_vcard(card)); - gtk_object_unref (GTK_OBJECT (card)); - - return 0; -} diff --git a/addressbook/backend/ebook/test-client-list.c b/addressbook/backend/ebook/test-client-list.c deleted file mode 100644 index e492323310..0000000000 --- a/addressbook/backend/ebook/test-client-list.c +++ /dev/null @@ -1,82 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -#include -#include -#include - -#ifdef USING_OAF -#include -#else -#include -#endif - -#include "e-book.h" - -CORBA_Environment ev; - -static void -init_bonobo (int argc, char **argv) -{ -#ifdef USING_OAF - gnome_init ("blah", "0.0", argc, argv); - oaf_init (argc, argv); -#else - gnome_CORBA_init_with_popt_table ( - "blah", "0.0", - &argc, argv, NULL, 0, NULL, GNORBA_INIT_SERVER_FUNC, &ev); -#endif - - if (bonobo_init (CORBA_OBJECT_NIL, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL) == FALSE) - g_error (_("Could not initialize Bonobo")); -} - -static void -get_cursor_cb (EBook *book, EBookStatus status, ECardCursor *cursor, gpointer closure) -{ - long length = e_card_cursor_get_length(cursor); - long i; - - printf ("Length: %d\n", (int) length); - for ( i = 0; i < length; i++ ) { - ECard *card = e_card_cursor_get_nth(cursor, i); - char *vcard = e_card_get_vcard(card); - printf("[%s]\n", vcard); - g_free(vcard); - gtk_object_unref(GTK_OBJECT(card)); - } -} - -static void -book_open_cb (EBook *book, EBookStatus status, gpointer closure) -{ - printf ("Book opened.\n"); - e_book_get_cursor(book, "", get_cursor_cb, NULL); -} - -static guint -ebook_create (void) -{ - EBook *book; - - book = e_book_new (); - - if (! e_book_load_uri (book, "file:/tmp/test.db", book_open_cb, NULL)) { - printf ("error calling load_uri!\n"); - } - - - return FALSE; -} - -int -main (int argc, char **argv) -{ - - CORBA_exception_init (&ev); - init_bonobo (argc, argv); - - gtk_idle_add ((GtkFunction) ebook_create, NULL); - - bonobo_main (); - - return 0; -} diff --git a/addressbook/backend/ebook/test-client.c b/addressbook/backend/ebook/test-client.c deleted file mode 100644 index ef13c1ab96..0000000000 --- a/addressbook/backend/ebook/test-client.c +++ /dev/null @@ -1,190 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -#include -#include -#include - -#include - -#define TEST_VCARD \ -"BEGIN:VCARD -" \ -"FN:Nat -" \ -"N:Friedman;Nat;D;Mr. -" \ -"BDAY:1977-08-06 -" \ -"TEL;WORK:617 679 1984 -" \ -"TEL;CELL:123 456 7890 -" \ -"EMAIL;INTERNET:nat@nat.org -" \ -"EMAIL;INTERNET:nat@helixcode.com -" \ -"ADR;WORK;POSTAL:P.O. Box 101;;;Any Town;CA;91921-1234; -" \ -"END:VCARD -" \ -" -" - -static CORBA_Environment ev; -static char *cardstr; - -#ifdef USING_OAF - -#include - -static void -init_corba (int *argc, char **argv) -{ - gnome_init_with_popt_table("blah", "0.0", *argc, argv, NULL, 0, NULL); - - oaf_init (*argc, argv); -} - -#else - -#include - -static void -init_corba (int *argc, char **argv) -{ - gnome_CORBA_init_with_popt_table ( - "blah", "0.0", - argc, argv, NULL, 0, NULL, GNORBA_INIT_SERVER_FUNC, &ev); -} - -#endif - -static void -init_bonobo (int argc, char **argv) -{ - if (bonobo_init (CORBA_OBJECT_NIL, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL) == FALSE) - g_error (_("Could not initialize Bonobo")); -} - -static void -get_cursor_cb (EBook *book, EBookStatus status, ECardCursor *cursor, gpointer closure) -{ - long length = e_card_cursor_get_length(cursor); - long i; - - /* we just added a card, so the length should be >1 */ - printf ("\n%s: %s(): Number of cards is %ld\n", - __FILE__, __FUNCTION__, length); - if (length < 1) - printf ("*** Why isn't this above zero?? ***\n\n"); - - for ( i = 0; i < length; i++ ) { - ECard *card = e_card_cursor_get_nth(cursor, i); - char *vcard = e_card_get_vcard(card); - printf("Get all cards callback: [%s]\n", vcard); - g_free(vcard); - gtk_object_unref(GTK_OBJECT(card)); - } -} - -static void -add_card_cb (EBook *book, EBookStatus status, const gchar *id, gpointer closure) -{ - char *vcard; - ECard *card; - GTimer *timer; - - printf ("Status: %d\n", status); - - printf ("Id: %s\n", id); - - timer = g_timer_new (); - g_timer_start (timer); - card = e_book_get_card (book, id); - g_timer_stop (timer); - - vcard = e_card_get_vcard(card); - printf ("%g\n", g_timer_elapsed (timer, NULL)); - printf ("Card added: [%s]\n", vcard); - g_free(vcard); - gtk_object_unref(GTK_OBJECT(card)); - - printf ("Getting cards..\n"); - e_book_get_cursor(book, "", get_cursor_cb, NULL); - printf ("Done getting all cards.\n"); -} - -static void -book_open_cb (EBook *book, EBookStatus status, gpointer closure) -{ - e_book_add_vcard(book, cardstr, add_card_cb, NULL); -} - -static guint -ebook_create (void) -{ - EBook *book; - - book = e_book_new (); - - if (!book) { - printf ("%s: %s(): Couldn't create EBook, bailing.\n", - __FILE__, - __FUNCTION__); - return FALSE; - } - - - if (! e_book_load_uri (book, "file:/tmp/test.db", book_open_cb, NULL)) { - printf ("error calling load_uri!\n"); - } - - - return FALSE; -} - -static char * -read_file (char *name) -{ - int len; - char buff[65536]; - char line[1024]; - FILE *f; - - f = fopen (name, "r"); - if (f == NULL) - g_error ("Unable to open %s!\n", name); - - len = 0; - while (fgets (line, sizeof (line), f) != NULL) { - strcpy (buff + len, line); - len += strlen (line); - } - - fclose (f); - - return g_strdup (buff); -} - - -int -main (int argc, char **argv) -{ - - CORBA_exception_init (&ev); - - init_corba (&argc, argv); - init_bonobo (argc, argv); - - cardstr = NULL; - if (argc == 2) - cardstr = read_file (argv [1]); - - if (cardstr == NULL) - cardstr = TEST_VCARD; - - gtk_idle_add ((GtkFunction) ebook_create, NULL); - - bonobo_main (); - - return 0; -} diff --git a/addressbook/backend/idl/.cvsignore b/addressbook/backend/idl/.cvsignore deleted file mode 100644 index 09980ae6ba..0000000000 --- a/addressbook/backend/idl/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -.deps -.libs -Makefile -Makefile.in -*.lo -*.la diff --git a/addressbook/backend/idl/Makefile.am b/addressbook/backend/idl/Makefile.am deleted file mode 100644 index db61d2c30c..0000000000 --- a/addressbook/backend/idl/Makefile.am +++ /dev/null @@ -1,6 +0,0 @@ -idldir = $(datadir)/idl - -idl_DATA = \ - addressbook.idl - -EXTRA_DIST = $(idl_DATA) diff --git a/addressbook/backend/idl/addressbook.idl b/addressbook/backend/idl/addressbook.idl deleted file mode 100644 index 9a7743f974..0000000000 --- a/addressbook/backend/idl/addressbook.idl +++ /dev/null @@ -1,132 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * - * Author: - * Nat Friedman (nat@helixcode.com) - * - * Copyright 2000, Helix Code, Inc. - */ - -#include - -module Evolution { - - typedef string CardId; - typedef string VCard; - typedef sequence VCardList; - - interface CardCursor : Bonobo::Unknown { - long get_length (); - string get_nth (in long n); - }; - - /* - * A book view is a live view of a book. It's either a view - * of all the cards in the book or a view of a query. When - * created, it will get a series of signal_card_added calls - * for all objects in the initial set. After that, it will - * get added, removed, or changed signals whenever the book - * changes (if it affects the set of viewed cards.) - */ - interface BookViewListener : Bonobo::Unknown { - void signal_card_added (in VCardList cards); - void signal_card_removed (in CardId id); - void signal_card_changed (in VCardList cards); - }; - - interface BookView : Bonobo::Unknown { - }; - - interface Book : Bonobo::Unknown { - /* - * Fetching cards in the addresbook. - */ - VCard get_vcard (in CardId id); - - /* - * Permissions. the first form is general write - * permission (whether or not the user can add or - * remove or modify any entry in the addressbook.) - * - * if can_write returns TRUE, can_write_card can still - * return FALSE if the user doesn't have permission to - * modify/remove that specific card. - */ - boolean can_write (); - boolean can_write_card (in CardId Id); - - /* - * Adding and deleting cards in the book. - */ - void create_card (in VCard vcard); - void remove_card (in CardId Id); - - /* - * Modifying cards in the addressbook. - */ - void modify_card (in VCard vcard); - - /* - * These two functions return a cursor to the book - * listener. This is for people who want a snapshot - * of the addressbook. The syntax for the query - * string is not yet defined. - */ - void get_cursor (in string query); - - /* - * These two functions return a book view to the book - * listener. This is for people who want a live view - * of the addressbook. - */ - void get_book_view(in BookViewListener listener, in string query); - - void check_connection (); - - string get_name (); - }; - - interface BookListener : Bonobo::Unknown { - - enum CallStatus { - Success, - RepositoryOffline, - PermissionDenied, - CardNotFound, - ProtocolNotSupported, - OtherError - }; - - void respond_create_card (in CallStatus status, in CardId Id); - - void respond_remove_card (in CallStatus status); - - void respond_modify_card (in CallStatus status); - - void report_open_book_progress (in string status_message, in short percent); - - void respond_open_book (in CallStatus status, in Book book); - - void respond_get_cursor (in CallStatus status, in CardCursor cursor); - - void respond_get_view (in CallStatus status, in BookView view); - - /** - * report_connection_status: - * - * Used to report changes in the connection to the - * contact repository. This is often a response to a - * call to check_connection() on the Book, but wombat - * is free to report the connection status without - * being asked. - */ - void report_connection_status (in boolean connected); - }; - - interface BookFactory : Bonobo::Unknown { - exception ProtocolNotSupported {}; - - void open_book (in string uri, in BookListener listener) - raises (ProtocolNotSupported); - }; -}; diff --git a/addressbook/backend/pas/.cvsignore b/addressbook/backend/pas/.cvsignore deleted file mode 100644 index 071cef99ae..0000000000 --- a/addressbook/backend/pas/.cvsignore +++ /dev/null @@ -1,11 +0,0 @@ -.deps -.libs -.pure -Makefile -Makefile.in -addressbook-stubs.c -addressbook-skels.c -addressbook-common.c -addressbook.h -*.lo -*.la diff --git a/addressbook/backend/pas/Makefile.am b/addressbook/backend/pas/Makefile.am deleted file mode 100644 index 69fdeb41a7..0000000000 --- a/addressbook/backend/pas/Makefile.am +++ /dev/null @@ -1,46 +0,0 @@ -CORBA_SOURCE = \ - addressbook.h \ - addressbook-common.c \ - addressbook-stubs.c \ - addressbook-skels.c - -idls = \ - $(srcdir)/../idl/addressbook.idl - -idl_flags = `$(GNOME_CONFIG) --cflags idl` -I $(datadir)/idl - -$(CORBA_SOURCE): $(idls) - $(ORBIT_IDL) $(srcdir)/../idl/addressbook.idl $(idl_flags) - -INCLUDES = \ - -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \ - -DG_LOG_DOMAIN=\"wombat-pas\" \ - -I$(top_srcdir) \ - -I$(top_srcdir)/addressbook/backend \ - -I$(top_builddir)/addressbook/backend \ - $(BONOBO_GNOME_CFLAGS) - -if ENABLE_LDAP -LDAP_BACKEND = pas-backend-ldap.c pas-backend-ldap.h -endif - -noinst_LIBRARIES = libpas.a - -libpas_a_SOURCES = \ - $(CORBA_SOURCE) \ - pas-book-factory.c \ - pas-book-factory.h \ - pas-book-view.c \ - pas-book-view.h \ - pas-book.c \ - pas-book.h \ - pas-backend-file.c \ - pas-backend-file.h \ - $(LDAP_BACKEND) \ - pas-backend.c \ - pas-backend.h \ - pas-card-cursor.c \ - pas-card-cursor.h - -BUILT_SOURCES = $(CORBA_SOURCE) -CLEANFILES += $(BUILT_SOURCES) diff --git a/addressbook/backend/pas/TODO b/addressbook/backend/pas/TODO deleted file mode 100644 index 0c77c1b200..0000000000 --- a/addressbook/backend/pas/TODO +++ /dev/null @@ -1,2 +0,0 @@ -* Implement pas_book_factory_activate -* Authentication \ No newline at end of file diff --git a/addressbook/backend/pas/pas-backend-file.c b/addressbook/backend/pas/pas-backend-file.c deleted file mode 100644 index 56a0fd4652..0000000000 --- a/addressbook/backend/pas/pas-backend-file.c +++ /dev/null @@ -1,1238 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * Author: - * Nat Friedman (nat@helixcode.com) - * - * Copyright 2000, Helix Code, Inc. - */ - -#include "config.h" -#include -#include -#include -#include -#ifdef HAVE_DB_185_H -#include -#else -#include -#endif - -#include "pas-backend-file.h" -#include "pas-book.h" -#include "pas-card-cursor.h" -#include -#include - -#define PAS_BACKEND_FILE_VERSION_NAME "PAS-DB-VERSION" -#define PAS_BACKEND_FILE_VERSION "0.1" - -static PASBackendClass *pas_backend_file_parent_class; -typedef struct _PASBackendFileCursorPrivate PASBackendFileCursorPrivate; -typedef struct _PASBackendFileBookView PASBackendFileBookView; -typedef struct _PASBackendFileSearchContext PASBackendFileSearchContext; - -struct _PASBackendFilePrivate { - GList *clients; - gboolean loaded; - char *uri; - DB *file_db; - GList *book_views; -}; - -struct _PASBackendFileCursorPrivate { - PASBackend *backend; - PASBook *book; - - GList *elements; - guint32 num_elements; -}; - -struct _PASBackendFileBookView { - PASBookView *book_view; - gchar *search; - ESExp *search_sexp; - PASBackendFileSearchContext *search_context; -}; - -struct _PASBackendFileSearchContext { - ECard *ecard; -}; - -static long -get_length(PASCardCursor *cursor, gpointer data) -{ - PASBackendFileCursorPrivate *cursor_data = (PASBackendFileCursorPrivate *) data; - - return cursor_data->num_elements; -} - -static char * -get_nth(PASCardCursor *cursor, long n, gpointer data) -{ - PASBackendFileCursorPrivate *cursor_data = (PASBackendFileCursorPrivate *) data; - GList *nth_item = g_list_nth(cursor_data->elements, n); - - return g_strdup((char*)nth_item->data); -} - -static void -cursor_destroy(GtkObject *object, gpointer data) -{ - CORBA_Environment ev; - Evolution_Book corba_book; - PASBackendFileCursorPrivate *cursor_data = (PASBackendFileCursorPrivate *) data; - - corba_book = bonobo_object_corba_objref(BONOBO_OBJECT(cursor_data->book)); - - CORBA_exception_init(&ev); - - Evolution_Book_unref(corba_book, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning("cursor_destroy: Exception unreffing " - "corba book.\n"); - } - - CORBA_exception_free(&ev); - - g_list_foreach(cursor_data->elements, (GFunc)g_free, NULL); - g_list_free (cursor_data->elements); - - g_free(cursor_data); -} - -static void -view_destroy(GtkObject *object, gpointer data) -{ - CORBA_Environment ev; - Evolution_Book corba_book; - PASBook *book = (PASBook *)data; - PASBackendFile *bf; - GList *list; - - bf = PAS_BACKEND_FILE(pas_book_get_backend(book)); - for (list = bf->priv->book_views; list; list = g_list_next(list)) { - PASBackendFileBookView *view = list->data; - if (view->book_view == PAS_BOOK_VIEW(object)) { - gtk_object_unref((GtkObject *)view->search_sexp); - g_free (view->search_context); - g_free (view->search); - g_free (view); - bf->priv->book_views = g_list_remove_link(bf->priv->book_views, list); - g_list_free_1(list); - break; - } - } - - corba_book = bonobo_object_corba_objref(BONOBO_OBJECT(book)); - - CORBA_exception_init(&ev); - - Evolution_Book_unref(corba_book, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning("view_destroy: Exception unreffing " - "corba book.\n"); - } - - CORBA_exception_free(&ev); -} - -static void -string_to_dbt(const char *str, DBT *dbt) -{ - dbt->data = (void*)str; - dbt->size = strlen (str) + 1; -} - -static char * -pas_backend_file_create_unique_id (char *vcard) -{ - /* use a 32 counter and the 32 bit timestamp to make an id. - it's doubtful 2^32 id's will be created in a second, so we - should be okay. */ - static guint c = 0; - return g_strdup_printf ("pas-id-%08lX%08X", time(NULL), c++); -} - -static gboolean -compare_email (ECard *ecard, const char *str, - char *(*compare)(const char*, const char*)) -{ - ECardList *prop_list; - ECardIterator *iter; - gboolean truth = FALSE; - - gtk_object_get(GTK_OBJECT(ecard), - "email", &prop_list, NULL); - - iter = e_card_list_get_iterator(prop_list); - - while (e_card_iterator_is_valid(iter)) { - - if (compare((char*)e_card_iterator_get(iter), str)) { - truth = TRUE; - break; - } - else { - e_card_iterator_next(iter); - } - } - - gtk_object_unref (GTK_OBJECT(iter)); - - return truth; -} - -static gboolean -compare_phone (ECard *ecard, const char *str, - char *(*compare)(const char*, const char*)) -{ - ECardList *prop_list; - ECardIterator *iter; - gboolean truth = FALSE; - - gtk_object_get(GTK_OBJECT(ecard), - "phone", &prop_list, NULL); - - iter = e_card_list_get_iterator(prop_list); - - while (e_card_iterator_is_valid(iter)) { - ECardPhone *phone = (ECardPhone*)e_card_iterator_get(iter); - if (compare(phone->number, str)) { - truth = TRUE; - break; - } - else { - e_card_iterator_next(iter); - } - } - - gtk_object_unref (GTK_OBJECT(iter)); - - return truth; -} - -static gboolean -compare_address (ECard *ecard, const char *str, - char *(*compare)(const char*, const char*)) -{ - g_warning("address searching not implemented\n"); - return FALSE; -} - -static struct prop_info { - const char *query_prop; - const char *ecard_prop; -#define PROP_TYPE_NORMAL 0x01 -#define PROP_TYPE_LIST 0x02 -#define PROP_TYPE_LISTITEM 0x03 - int prop_type; - gboolean (*list_compare)(ECard *ecard, const char *str, - char *(*compare)(const char*, const char*)); - -} prop_info_table[] = { - /* query prop, ecard prop, type, list compare function */ - { "file_as", "file_as", PROP_TYPE_NORMAL, NULL }, - { "full_name", "full_name", PROP_TYPE_NORMAL, NULL }, - { "url", "url", PROP_TYPE_NORMAL, NULL }, - { "mailer", "mailer", PROP_TYPE_NORMAL, NULL }, - { "org", "org", PROP_TYPE_NORMAL, NULL }, - { "org_unit", "org_unit", PROP_TYPE_NORMAL, NULL }, - { "office", "office", PROP_TYPE_NORMAL, NULL }, - { "title", "title", PROP_TYPE_NORMAL, NULL }, - { "role", "role", PROP_TYPE_NORMAL, NULL }, - { "manager", "manager", PROP_TYPE_NORMAL, NULL }, - { "assistant", "assistant", PROP_TYPE_NORMAL, NULL }, - { "nickname", "nickname", PROP_TYPE_NORMAL, NULL }, - { "spouse", "spouse", PROP_TYPE_NORMAL, NULL }, - { "email", "email", PROP_TYPE_LIST, compare_email }, - { "phone", "phone", PROP_TYPE_LIST, compare_phone }, - { "address", "address", PROP_TYPE_LIST, compare_address }, - { "note", "note", PROP_TYPE_NORMAL, NULL }, -}; -static int num_prop_infos = sizeof(prop_info_table) / sizeof(prop_info_table[0]); - -static ESExpResult * -entry_compare(PASBackendFileSearchContext *ctx, struct _ESExp *f, - int argc, struct _ESExpResult **argv, - char *(*compare)(const char*, const char*)) -{ - ESExpResult *r; - int truth = FALSE; - - if (argc == 2 - && argv[0]->type == ESEXP_RES_STRING - && argv[1]->type == ESEXP_RES_STRING) { - char *propname; - struct prop_info *info = NULL; - int i; - - propname = argv[0]->value.string; - - for (i = 0; i < num_prop_infos; i ++) { - if (!strcmp (prop_info_table[i].query_prop, propname)) { - info = &prop_info_table[i]; - break; - } - } - - if (info) { - if (info->prop_type == PROP_TYPE_NORMAL) { - char *prop = NULL; - /* searches where the query's property - maps directly to an ecard property */ - - gtk_object_get(GTK_OBJECT(ctx->ecard), - info->ecard_prop, &prop, NULL); - - if (prop && compare(prop, argv[1]->value.string)) { - truth = TRUE; - } - if ((!prop) && compare("", argv[1]->value.string)) { - truth = TRUE; - } - } - else if (info->prop_type == PROP_TYPE_LIST) { - /* the special searches that match any of the list elements */ - truth = info->list_compare (ctx->ecard, argv[1]->value.string, compare); - } - } - - } - r = e_sexp_result_new(ESEXP_RES_BOOL); - r->value.bool = truth; - - return r; -} - -static ESExpResult * -func_contains(struct _ESExp *f, int argc, struct _ESExpResult **argv, void *data) -{ - PASBackendFileSearchContext *ctx = data; - - return entry_compare (ctx, f, argc, argv, strstr); -} - -static char * -is_helper (const char *s1, const char *s2) -{ - if (!strcmp(s1, s2)) - return (char*)s1; - else - return NULL; -} - -static ESExpResult * -func_is(struct _ESExp *f, int argc, struct _ESExpResult **argv, void *data) -{ - PASBackendFileSearchContext *ctx = data; - - return entry_compare (ctx, f, argc, argv, is_helper); -} - -static char * -endswith_helper (const char *s1, const char *s2) -{ - char *p; - if ((p = strstr(s1, s2)) - && (strlen(p) == strlen(s2))) - return p; - else - return NULL; -} - -static ESExpResult * -func_endswith(struct _ESExp *f, int argc, struct _ESExpResult **argv, void *data) -{ - PASBackendFileSearchContext *ctx = data; - - return entry_compare (ctx, f, argc, argv, endswith_helper); -} - -static char * -beginswith_helper (const char *s1, const char *s2) -{ - char *p; - if ((p = strstr(s1, s2)) - && (p == s1)) - return p; - else - return NULL; -} - -static ESExpResult * -func_beginswith(struct _ESExp *f, int argc, struct _ESExpResult **argv, void *data) -{ - PASBackendFileSearchContext *ctx = data; - - return entry_compare (ctx, f, argc, argv, beginswith_helper); -} - -/* 'builtin' functions */ -static struct { - char *name; - ESExpFunc *func; - int type; /* set to 1 if a function can perform shortcut evaluation, or - doesn't execute everything, 0 otherwise */ -} symbols[] = { - { "contains", func_contains, 0 }, - { "is", func_is, 0 }, - { "beginswith", func_beginswith, 0 }, - { "endswith", func_endswith, 0 }, -}; - -static gboolean -vcard_matches_search (PASBackendFileBookView *view, char *vcard_string) -{ - ESExpResult *r; - gboolean retval; - - view->search_context->ecard = e_card_new (vcard_string); - - /* if it's not a valid vcard why is it in our db? :) */ - if (!view->search_context->ecard) - return FALSE; - - r = e_sexp_eval(view->search_sexp); - - retval = (r && r->type == ESEXP_RES_BOOL && r->value.bool); - - gtk_object_unref(GTK_OBJECT(view->search_context->ecard)); - - e_sexp_result_free(r); - - return retval; -} - -static void -pas_backend_file_search (PASBackendFile *bf, - PASBook *book, - PASBackendFileBookView *view) -{ - int db_error = 0; - GList *cards = NULL; - DB *db = bf->priv->file_db; - DBT id_dbt, vcard_dbt; - int i; - - if (!bf->priv->loaded) - return; - - view->search_sexp = e_sexp_new(); - view->search_context = g_new0(PASBackendFileSearchContext, 1); - - for(i=0;isearch_sexp, 0, symbols[i].name, - (ESExpIFunc *)symbols[i].func, view->search_context); - } else { - e_sexp_add_function(view->search_sexp, 0, symbols[i].name, - symbols[i].func, view->search_context); - } - } - - e_sexp_input_text(view->search_sexp, view->search, strlen(view->search)); - e_sexp_parse(view->search_sexp); - - db_error = db->seq(db, &id_dbt, &vcard_dbt, R_FIRST); - - while (db_error == 0) { - - /* don't include the version in the list of cards */ - if (id_dbt.size != strlen(PAS_BACKEND_FILE_VERSION_NAME) + 1 - || strcmp (id_dbt.data, PAS_BACKEND_FILE_VERSION_NAME)) { - char *vcard_string = vcard_dbt.data; - - /* check if the vcard matches the search sexp */ - if (vcard_matches_search (view, vcard_string)) { - cards = g_list_append (cards, strdup(vcard_string)); - } - } - - db_error = db->seq(db, &id_dbt, &vcard_dbt, R_NEXT); - } - - if (db_error == -1) { - g_warning ("pas_backend_file_search: error building list\n"); - } - else { - pas_book_view_notify_add (view->book_view, cards); - } - - /* - ** It's fine to do this now since the data has been handed off. - */ - g_list_foreach (cards, (GFunc)g_free, NULL); - g_list_free (cards); -} - -static char * -do_create(PASBackend *backend, - char *vcard_req, - char **vcard_ptr) -{ - PASBackendFile *bf = PAS_BACKEND_FILE (backend); - DB *db = bf->priv->file_db; - DBT id_dbt, vcard_dbt; - int db_error; - char *id; - ECard *card; - char *vcard; - char *ret_val; - - id = pas_backend_file_create_unique_id (vcard_req); - - string_to_dbt (id, &id_dbt); - - card = e_card_new(vcard_req); - e_card_set_id(card, id); - vcard = e_card_get_vcard(card); - - string_to_dbt (vcard, &vcard_dbt); - - db_error = db->put (db, &id_dbt, &vcard_dbt, 0); - - if (0 == db_error) { - db_error = db->sync (db, 0); - if (db_error != 0) - g_warning ("db->sync failed.\n"); - ret_val = id; - - } - else { - ret_val = NULL; - } - - gtk_object_unref(GTK_OBJECT(card)); - card = NULL; - - if (vcard_ptr && ret_val) - *vcard_ptr = vcard; - else - g_free (vcard); - - return ret_val; -} - -static void -pas_backend_file_process_create_card (PASBackend *backend, - PASBook *book, - PASRequest *req) -{ - char *id; - char *vcard; - GList *list; - PASBackendFile *bf = PAS_BACKEND_FILE (backend); - - id = do_create(backend, req->vcard, &vcard); - if (id) { - for (list = bf->priv->book_views; list; list = g_list_next(list)) { - PASBackendFileBookView *view = list->data; - if (vcard_matches_search (view, vcard)) - pas_book_view_notify_add_1 (view->book_view, vcard); - } - - pas_book_respond_create ( - book, - Evolution_BookListener_Success, - id); - g_free(vcard); - g_free(id); - } - else { - /* XXX need a different call status for this case, i - think */ - pas_book_respond_create ( - book, - Evolution_BookListener_CardNotFound, - ""); - } - - g_free(req->vcard); -} - -static void -pas_backend_file_process_remove_card (PASBackend *backend, - PASBook *book, - PASRequest *req) -{ - PASBackendFile *bf = PAS_BACKEND_FILE (backend); - DB *db = bf->priv->file_db; - DBT id_dbt, vcard_dbt; - int db_error; - GList *list; - char *vcard_string; - - string_to_dbt (req->id, &id_dbt); - - db_error = db->get (db, &id_dbt, &vcard_dbt, 0); - if (0 != db_error) { - pas_book_respond_remove ( - book, - Evolution_BookListener_CardNotFound); - g_free (req->id); - return; - } - - db_error = db->del (db, &id_dbt, 0); - if (0 != db_error) { - pas_book_respond_remove ( - book, - Evolution_BookListener_CardNotFound); - g_free (req->id); - return; - } - - db_error = db->sync (db, 0); - if (db_error != 0) - g_warning ("db->sync failed.\n"); - - - vcard_string = vcard_dbt.data; - for (list = bf->priv->book_views; list; list = g_list_next(list)) { - PASBackendFileBookView *view = list->data; - if (vcard_matches_search (view, vcard_string)) - pas_book_view_notify_remove (view->book_view, req->id); - } - - pas_book_respond_remove ( - book, - Evolution_BookListener_Success); - - g_free (req->id); -} - -static void -pas_backend_file_process_modify_card (PASBackend *backend, - PASBook *book, - PASRequest *req) -{ - PASBackendFile *bf = PAS_BACKEND_FILE (backend); - DB *db = bf->priv->file_db; - DBT id_dbt, vcard_dbt; - int db_error; - GList *list; - ECard *card; - char *id; - char *old_vcard_string; - - /* create a new ecard from the request data */ - card = e_card_new(req->vcard); - id = e_card_get_id(card); - - string_to_dbt (id, &id_dbt); - - /* get the old ecard - the one that's presently in the db */ - db_error = db->get (db, &id_dbt, &vcard_dbt, 0); - if (0 != db_error) { - pas_book_respond_modify ( - book, - Evolution_BookListener_CardNotFound); - g_free (req->id); - return; - } - old_vcard_string = g_strdup(vcard_dbt.data); - - string_to_dbt (req->vcard, &vcard_dbt); - - db_error = db->put (db, &id_dbt, &vcard_dbt, 0); - - if (0 == db_error) { - db_error = db->sync (db, 0); - if (db_error != 0) - g_warning ("db->sync failed.\n"); - - for (list = bf->priv->book_views; list; list = g_list_next(list)) { - PASBackendFileBookView *view = list->data; - gboolean old_match, new_match; - - old_match = vcard_matches_search (view, old_vcard_string); - new_match = vcard_matches_search (view, req->vcard); - if (old_match && new_match) - pas_book_view_notify_change_1 (view->book_view, req->vcard); - else if (new_match) - pas_book_view_notify_add_1 (view->book_view, req->vcard); - else /* if (old_match) */ - pas_book_view_notify_remove (view->book_view, id); - } - - pas_book_respond_modify ( - book, - Evolution_BookListener_Success); - } - else { - pas_book_respond_modify ( - book, - Evolution_BookListener_CardNotFound); - } - - g_free(old_vcard_string); - - gtk_object_unref(GTK_OBJECT(card)); - g_free (req->vcard); -} - -static void -pas_backend_file_build_all_cards_list(PASBackend *backend, - PASBackendFileCursorPrivate *cursor_data) -{ - PASBackendFile *bf = PAS_BACKEND_FILE (backend); - DB *db = bf->priv->file_db; - int db_error; - DBT id_dbt, vcard_dbt; - - cursor_data->elements = NULL; - - db_error = db->seq(db, &id_dbt, &vcard_dbt, R_FIRST); - - while (db_error == 0) { - - /* don't include the version in the list of cards */ - if (id_dbt.size != strlen(PAS_BACKEND_FILE_VERSION_NAME + 1) - || strcmp (id_dbt.data, PAS_BACKEND_FILE_VERSION_NAME)) { - - cursor_data->elements = g_list_append(cursor_data->elements, - g_strdup(vcard_dbt.data)); - - } - - db_error = db->seq(db, &id_dbt, &vcard_dbt, R_NEXT); - - } - - if (db_error == -1) { - g_warning ("pas_backend_file_build_all_cards_list: error building list\n"); - } - else { - cursor_data->num_elements = g_list_length (cursor_data->elements); - } -} - -static void -pas_backend_file_process_get_cursor (PASBackend *backend, - PASBook *book, - PASRequest *req) -{ - /* - PASBackendFile *bf = PAS_BACKEND_FILE (backend); - DB *db = bf->priv->file_db; - DBT id_dbt, vcard_dbt; - */ - CORBA_Environment ev; - int db_error = 0; - PASBackendFileCursorPrivate *cursor_data; - PASCardCursor *cursor; - Evolution_Book corba_book; - - cursor_data = g_new(PASBackendFileCursorPrivate, 1); - cursor_data->backend = backend; - cursor_data->book = book; - - pas_backend_file_build_all_cards_list(backend, cursor_data); - - corba_book = bonobo_object_corba_objref(BONOBO_OBJECT(book)); - - CORBA_exception_init(&ev); - - Evolution_Book_ref(corba_book, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning("pas_backend_file_process_get_cursor: Exception reffing " - "corba book.\n"); - } - - CORBA_exception_free(&ev); - - cursor = pas_card_cursor_new(get_length, - get_nth, - cursor_data); - - gtk_signal_connect(GTK_OBJECT(cursor), "destroy", - GTK_SIGNAL_FUNC(cursor_destroy), cursor_data); - - pas_book_respond_get_cursor ( - book, - (db_error == 0 - ? Evolution_BookListener_Success - : Evolution_BookListener_CardNotFound), - cursor); -} - -static void -pas_backend_file_process_get_book_view (PASBackend *backend, - PASBook *book, - PASRequest *req) -{ - PASBackendFile *bf = PAS_BACKEND_FILE (backend); - CORBA_Environment ev; - PASBookView *book_view; - Evolution_Book corba_book; - PASBackendFileBookView *view; - - g_return_if_fail (req->listener != NULL); - - corba_book = bonobo_object_corba_objref(BONOBO_OBJECT(book)); - - CORBA_exception_init(&ev); - - Evolution_Book_ref(corba_book, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning("pas_backend_file_process_get_book_view: Exception reffing " - "corba book.\n"); - } - - CORBA_exception_free(&ev); - - book_view = pas_book_view_new (req->listener); - - gtk_signal_connect(GTK_OBJECT(book_view), "destroy", - GTK_SIGNAL_FUNC(view_destroy), book); - - pas_book_respond_get_book_view (book, - (book_view != NULL - ? Evolution_BookListener_Success - : Evolution_BookListener_CardNotFound /* XXX */), - book_view); - - view = g_new(PASBackendFileBookView, 1); - view->book_view = book_view; - view->search = g_strdup(req->search); - - bf->priv->book_views = g_list_prepend(bf->priv->book_views, view); - - pas_backend_file_search (bf, book, view); - - g_free(req->search); -} - -static void -pas_backend_file_process_check_connection (PASBackend *backend, - PASBook *book, - PASRequest *req) -{ - PASBackendFile *bf = PAS_BACKEND_FILE (backend); - - pas_book_report_connection (book, bf->priv->file_db != NULL); -} - -static char * -pas_backend_file_extract_path_from_uri (const char *uri) -{ - g_assert (strncasecmp (uri, "file:", 5) == 0); - - return g_strdup (uri + 5); -} - -static gboolean -can_write (PASBackend *backend) -{ - PASBackendFile *bf = PAS_BACKEND_FILE (backend); - char *path = pas_backend_file_extract_path_from_uri (bf->priv->uri); - gboolean retval; - - retval = (access (path, W_OK) != -1); - - g_free (path); - - return retval; -} - -static gboolean -pas_backend_file_can_write (PASBook *book) -{ - PASBackend* backend = pas_book_get_backend (book); - - return can_write(backend); -} - -static gboolean -pas_backend_file_can_write_card (PASBook *book, - const char *id) -{ - PASBackend* backend = pas_book_get_backend (book); - - return can_write(backend); -} - -static void -pas_backend_file_process_client_requests (PASBook *book) -{ - PASBackend *backend; - PASRequest *req; - - backend = pas_book_get_backend (book); - - req = pas_book_pop_request (book); - if (req == NULL) - return; - - switch (req->op) { - case CreateCard: - pas_backend_file_process_create_card (backend, book, req); - break; - - case RemoveCard: - pas_backend_file_process_remove_card (backend, book, req); - break; - - case ModifyCard: - pas_backend_file_process_modify_card (backend, book, req); - break; - - case CheckConnection: - pas_backend_file_process_check_connection (backend, book, req); - break; - - case GetCursor: - pas_backend_file_process_get_cursor (backend, book, req); - break; - - case GetBookView: - pas_backend_file_process_get_book_view (backend, book, req); - break; - } - - g_free (req); -} - -static void -pas_backend_file_book_destroy_cb (PASBook *book, gpointer data) -{ - PASBackendFile *backend; - - backend = PAS_BACKEND_FILE (data); - - pas_backend_remove_client (PAS_BACKEND (backend), book); -} - -static char * -pas_backend_file_get_vcard (PASBook *book, const char *id) -{ - PASBackendFile *bf; - DBT id_dbt, vcard_dbt; - DB *db; - int db_error; - - bf = PAS_BACKEND_FILE (pas_book_get_backend (book)); - db = bf->priv->file_db; - - string_to_dbt (id, &id_dbt); - - db_error = db->get (db, &id_dbt, &vcard_dbt, 0); - if (db_error == 0) { - /* success */ - return g_strdup (vcard_dbt.data); - } - else if (db_error == 1) { - /* key was not in file */ - return g_strdup (""); /* XXX */ - } - else /* if (db_error < 0)*/ { - /* error */ - return g_strdup (""); /* XXX */ - } -} - -static gboolean -pas_backend_file_upgrade_db (PASBackendFile *bf, char *old_version) -{ - if (!strcmp (old_version, "0.0")) { - /* 0.0 is the same as 0.1, we just need to add the version */ - DB *db = bf->priv->file_db; - DBT version_name_dbt, version_dbt; - int db_error; - - string_to_dbt (PAS_BACKEND_FILE_VERSION_NAME, &version_name_dbt); - string_to_dbt (PAS_BACKEND_FILE_VERSION, &version_dbt); - - db_error = db->put (db, &version_name_dbt, &version_dbt, 0); - if (db_error == 0) - return TRUE; - else - return FALSE; - } - else { - g_warning ("unsupported version '%s' found in PAS backend file\n", - old_version); - return FALSE; - } -} - -static gboolean -pas_backend_file_maybe_upgrade_db (PASBackendFile *bf) -{ - DB *db = bf->priv->file_db; - DBT version_name_dbt, version_dbt; - int db_error; - char *version; - gboolean ret_val = TRUE; - - string_to_dbt (PAS_BACKEND_FILE_VERSION_NAME, &version_name_dbt); - - db_error = db->get (db, &version_name_dbt, &version_dbt, 0); - if (db_error == 0) { - /* success */ - version = g_strdup (version_dbt.data); - } - else { - /* key was not in file */ - version = g_strdup ("0.0"); - } - - if (strcmp (version, PAS_BACKEND_FILE_VERSION)) - ret_val = pas_backend_file_upgrade_db (bf, version); - - g_free (version); - - return ret_val; -} - -#define INITIAL_VCARD "BEGIN:VCARD\n\ -X-EVOLUTION-FILE-AS:Helix Code, Inc.\n\ -LABEL;WORK;QUOTED-PRINTABLE:101 Rogers St. Ste. 214=0ACambridge, MA 02142=0AUSA\n\ -TEL;WORK;VOICE:(617) 679-1984\n\ -TEL;WORK;FAX:(617) 679-1949\n\ -EMAIL;INTERNET:hello@helixcode.com\n\ -URL:http://www.helixcode.com/\n\ -ORG:Helix Code, Inc.;\n\ -NOTE:Welcome to the Helix Code Addressbook.\n\ -END:VCARD" - -static gboolean -pas_backend_file_load_uri (PASBackend *backend, - const char *uri) -{ - PASBackendFile *bf = PAS_BACKEND_FILE (backend); - char *filename; - - g_assert (bf->priv->loaded == FALSE); - - filename = pas_backend_file_extract_path_from_uri (uri); - - bf->priv->file_db = dbopen (filename, O_RDWR, 0666, DB_HASH, NULL); - if (bf->priv->file_db == NULL) { - bf->priv->file_db = dbopen (filename, O_RDWR | O_CREAT, 0666, DB_HASH, NULL); - - if (bf->priv->file_db) { - char *id; - id = do_create(backend, INITIAL_VCARD, NULL); - g_free (id); - } - } - - g_free (filename); - - if (bf->priv->file_db != NULL) { - if (pas_backend_file_maybe_upgrade_db (bf)) - bf->priv->loaded = TRUE; - /* XXX what if we fail to upgrade it? */ - - g_free(bf->priv->uri); - bf->priv->uri = g_strdup (uri); - } else - return FALSE; - - return TRUE; -} - -/* Get_uri handler for the addressbook file backend */ -static const char * -pas_backend_file_get_uri (PASBackend *backend) -{ - PASBackendFile *bf; - - bf = PAS_BACKEND_FILE (backend); - - g_return_val_if_fail (bf->priv->loaded, NULL); - g_assert (bf->priv->uri != NULL); - - return bf->priv->uri; -} - -static gboolean -pas_backend_file_add_client (PASBackend *backend, - Evolution_BookListener listener) -{ - PASBackendFile *bf; - PASBook *book; - - g_assert (backend != NULL); - g_assert (PAS_IS_BACKEND_FILE (backend)); - - bf = PAS_BACKEND_FILE (backend); - - book = pas_book_new ( - backend, listener, - pas_backend_file_get_vcard, - pas_backend_file_can_write, - pas_backend_file_can_write_card); - - if (!book) { - if (!bf->priv->clients) - pas_backend_last_client_gone (backend); - - return FALSE; - } - - gtk_signal_connect (GTK_OBJECT (book), "destroy", - pas_backend_file_book_destroy_cb, backend); - - gtk_signal_connect (GTK_OBJECT (book), "requests_queued", - pas_backend_file_process_client_requests, NULL); - - bf->priv->clients = g_list_prepend ( - bf->priv->clients, book); - - if (bf->priv->loaded) { - pas_book_respond_open ( - book, Evolution_BookListener_Success); - } else { - /* Open the book. */ - pas_book_respond_open ( - book, Evolution_BookListener_Success); - } - - return TRUE; -} - -static void -pas_backend_file_remove_client (PASBackend *backend, - PASBook *book) -{ - PASBackendFile *bf; - GList *l; - PASBook *lbook; - - g_return_if_fail (backend != NULL); - g_return_if_fail (PAS_IS_BACKEND_FILE (backend)); - g_return_if_fail (book != NULL); - g_return_if_fail (PAS_IS_BOOK (book)); - - bf = PAS_BACKEND_FILE (backend); - - /* Find the book in the list of clients */ - - for (l = bf->priv->clients; l; l = l->next) { - lbook = PAS_BOOK (l->data); - - if (lbook == book) - break; - } - - g_assert (l != NULL); - - /* Disconnect */ - - bf->priv->clients = g_list_remove_link (bf->priv->clients, l); - g_list_free_1 (l); - - /* When all clients go away, notify the parent factory about it so that - * it may decide whether to kill the backend or not. - */ - if (!bf->priv->clients) - pas_backend_last_client_gone (backend); -} - -static gboolean -pas_backend_file_construct (PASBackendFile *backend) -{ - g_assert (backend != NULL); - g_assert (PAS_IS_BACKEND_FILE (backend)); - - if (! pas_backend_construct (PAS_BACKEND (backend))) - return FALSE; - - return TRUE; -} - -/** - * pas_backend_file_new: - */ -PASBackend * -pas_backend_file_new (void) -{ - PASBackendFile *backend; - - backend = gtk_type_new (pas_backend_file_get_type ()); - - if (! pas_backend_file_construct (backend)) { - gtk_object_unref (GTK_OBJECT (backend)); - - return NULL; - } - - return PAS_BACKEND (backend); -} - -static void -pas_backend_file_destroy (GtkObject *object) -{ - PASBackendFile *bf; - - bf = PAS_BACKEND_FILE (object); - - g_free (bf->priv->uri); - - GTK_OBJECT_CLASS (pas_backend_file_parent_class)->destroy (object); -} - -static void -pas_backend_file_class_init (PASBackendFileClass *klass) -{ - GtkObjectClass *object_class = (GtkObjectClass *) klass; - PASBackendClass *parent_class; - - pas_backend_file_parent_class = gtk_type_class (pas_backend_get_type ()); - - parent_class = PAS_BACKEND_CLASS (klass); - - /* Set the virtual methods. */ - parent_class->load_uri = pas_backend_file_load_uri; - parent_class->get_uri = pas_backend_file_get_uri; - parent_class->add_client = pas_backend_file_add_client; - parent_class->remove_client = pas_backend_file_remove_client; - - object_class->destroy = pas_backend_file_destroy; -} - -static void -pas_backend_file_init (PASBackendFile *backend) -{ - PASBackendFilePrivate *priv; - - priv = g_new0 (PASBackendFilePrivate, 1); - priv->loaded = FALSE; - priv->clients = NULL; - priv->book_views = NULL; - priv->uri = NULL; - - backend->priv = priv; -} - -/** - * pas_backend_file_get_type: - */ -GtkType -pas_backend_file_get_type (void) -{ - static GtkType type = 0; - - if (! type) { - GtkTypeInfo info = { - "PASBackendFile", - sizeof (PASBackendFile), - sizeof (PASBackendFileClass), - (GtkClassInitFunc) pas_backend_file_class_init, - (GtkObjectInitFunc) pas_backend_file_init, - NULL, /* reserved 1 */ - NULL, /* reserved 2 */ - (GtkClassInitFunc) NULL - }; - - type = gtk_type_unique (pas_backend_get_type (), &info); - } - - return type; -} diff --git a/addressbook/backend/pas/pas-backend-file.h b/addressbook/backend/pas/pas-backend-file.h deleted file mode 100644 index 4da9a29cc5..0000000000 --- a/addressbook/backend/pas/pas-backend-file.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2000, Helix Code, Inc. - */ - -#ifndef __PAS_BACKEND_FILE_H__ -#define __PAS_BACKEND_FILE_H__ - -#include -#include "pas-backend.h" - -typedef struct _PASBackendFilePrivate PASBackendFilePrivate; - -typedef struct { - PASBackend parent_object; - PASBackendFilePrivate *priv; -} PASBackendFile; - -typedef struct { - PASBackendClass parent_class; -} PASBackendFileClass; - -PASBackend *pas_backend_file_new (void); -GtkType pas_backend_file_get_type (void); - -#define PAS_BACKEND_FILE_TYPE (pas_backend_file_get_type ()) -#define PAS_BACKEND_FILE(o) (GTK_CHECK_CAST ((o), PAS_BACKEND_FILE_TYPE, PASBackendFile)) -#define PAS_BACKEND_FILE_CLASS(k) (GTK_CHECK_CLASS_CAST((k), PAS_BACKEND_TYPE, PASBackendFileClass)) -#define PAS_IS_BACKEND_FILE(o) (GTK_CHECK_TYPE ((o), PAS_BACKEND_FILE_TYPE)) -#define PAS_IS_BACKEND_FILE_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), PAS_BACKEND_FILE_TYPE)) - -#endif /* ! __PAS_BACKEND_FILE_H__ */ - diff --git a/addressbook/backend/pas/pas-backend-ldap.c b/addressbook/backend/pas/pas-backend-ldap.c deleted file mode 100644 index 2298693f94..0000000000 --- a/addressbook/backend/pas/pas-backend-ldap.c +++ /dev/null @@ -1,1096 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * Author: - * Nat Friedman (nat@helixcode.com) - * - * Copyright 2000, Helix Code, Inc. - */ - -#include "config.h" -#include -#include -#include -#include -#include - -#include "pas-backend-ldap.h" -#include "pas-book.h" -#include "pas-card-cursor.h" - -#include -#include - -#define LDAP_MAX_SEARCH_RESPONSES 500 - -static gchar *map_e_card_prop_to_ldap(gchar *e_card_prop); - -static PASBackendClass *pas_backend_ldap_parent_class; -typedef struct _PASBackendLDAPCursorPrivate PASBackendLDAPCursorPrivate; -typedef struct _PASBackendLDAPBookView PASBackendLDAPBookView; - -struct _PASBackendLDAPPrivate { - char *uri; - gboolean connected; - GList *clients; - LDAP *ldap; - gchar *ldap_host; - gchar *ldap_rootdn; - int ldap_port; - GList *book_views; -}; - -struct _PASBackendLDAPCursorPrivate { - PASBackend *backend; - PASBook *book; - - GList *elements; - long num_elements; -}; - -struct _PASBackendLDAPBookView { - PASBookView *book_view; - PASBackendLDAPPrivate *blpriv; - gchar *search; - int search_idle; - int search_msgid; -}; - -static long -get_length(PASCardCursor *cursor, gpointer data) -{ - PASBackendLDAPCursorPrivate *cursor_data = (PASBackendLDAPCursorPrivate *) data; - - return cursor_data->num_elements; -} - -static char * -get_nth(PASCardCursor *cursor, long n, gpointer data) -{ - return g_strdup(""); -} - -static void -cursor_destroy(GtkObject *object, gpointer data) -{ - CORBA_Environment ev; - Evolution_Book corba_book; - PASBackendLDAPCursorPrivate *cursor_data = (PASBackendLDAPCursorPrivate *) data; - - corba_book = bonobo_object_corba_objref(BONOBO_OBJECT(cursor_data->book)); - - CORBA_exception_init(&ev); - - Evolution_Book_unref(corba_book, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning("cursor_destroy: Exception unreffing " - "corba book.\n"); - } - - CORBA_exception_free(&ev); - - /* free the ldap specific cursor information */ - - - g_free(cursor_data); -} - -static void -view_destroy(GtkObject *object, gpointer data) -{ - CORBA_Environment ev; - Evolution_Book corba_book; - PASBook *book = (PASBook *)data; - PASBackendLDAP *bl; - GList *list; - - bl = PAS_BACKEND_LDAP(pas_book_get_backend(book)); - for (list = bl->priv->book_views; list; list = g_list_next(list)) { - PASBackendLDAPBookView *view = list->data; - if (view->book_view == PAS_BOOK_VIEW(object)) { - g_free (view->search); - g_free (view); - if (view->search_idle != 0) - g_source_remove(view->search_idle); - bl->priv->book_views = g_list_remove_link(bl->priv->book_views, list); - g_list_free_1(list); - break; - } - } - - corba_book = bonobo_object_corba_objref(BONOBO_OBJECT(book)); - - CORBA_exception_init(&ev); - - Evolution_Book_unref(corba_book, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning("view_destroy: Exception unreffing " - "corba book.\n"); - } - - CORBA_exception_free(&ev); -} - -static void -pas_backend_ldap_ensure_connected (PASBackendLDAP *bl) -{ - LDAP *ldap = bl->priv->ldap; - - /* the connection has gone down, or wasn't ever opened */ - if (ldap == NULL || - (ldap_simple_bind_s(ldap, NULL /*binddn*/, NULL /*passwd*/) != LDAP_SUCCESS)) { - - /* close connection first if it's open first */ - if (ldap) - ldap_unbind (ldap); - - bl->priv->ldap = ldap_open (bl->priv->ldap_host, bl->priv->ldap_port); - if (NULL != bl->priv->ldap) { - ldap_simple_bind_s(bl->priv->ldap, - NULL /*binddn*/, NULL /*passwd*/); - bl->priv->connected = TRUE; - } - else - g_warning ("pas_backend_ldap_ensure_connected failed for " - "'ldap://%s:%d/%s' (error %s)\n", - bl->priv->ldap_host, - bl->priv->ldap_port, - bl->priv->ldap_rootdn ? bl->priv->ldap_rootdn : "", - - ldap_err2string(ldap->ld_errno)); - - } -} - -static void -pas_backend_ldap_process_create_card (PASBackend *backend, - PASBook *book, - PASRequest *req) -{ - g_warning ("pas_backend_ldap_process_create_card not implemented\n"); - - pas_book_respond_create ( - book, - Evolution_BookListener_CardNotFound, - ""); - - g_free (req->vcard); -} - -static void -pas_backend_ldap_process_remove_card (PASBackend *backend, - PASBook *book, - PASRequest *req) -{ - g_warning ("pas_backend_ldap_process_remove_card not implemented\n"); - - pas_book_respond_remove ( - book, - Evolution_BookListener_CardNotFound); - - g_free (req->id); -} - -static void -pas_backend_ldap_build_all_cards_list(PASBackend *backend, - PASBackendLDAPCursorPrivate *cursor_data) -{ - PASBackendLDAP *bl = PAS_BACKEND_LDAP (backend); - LDAP *ldap; - int ldap_error; - LDAPMessage *res, *e; - - pas_backend_ldap_ensure_connected(bl); - - ldap = bl->priv->ldap; - - if (ldap) { - ldap->ld_sizelimit = LDAP_MAX_SEARCH_RESPONSES; - ldap->ld_deref = LDAP_DEREF_ALWAYS; - - if ((ldap_error = ldap_search_s (ldap, - bl->priv->ldap_rootdn, - LDAP_SCOPE_ONELEVEL, - "(objectclass=*)", - NULL, 0, &res)) == -1) { - g_warning ("ldap error '%s' in " - "pas_backend_ldap_build_all_cards_list\n", - ldap_err2string(ldap_error)); - } - - cursor_data->elements = NULL; - - cursor_data->num_elements = ldap_count_entries (ldap, res); - - e = ldap_first_entry(ldap, res); - - while (NULL != e) { - - /* for now just make a list of the dn's */ -#if 0 - for ( a = ldap_first_attribute( ldap, e, &ber ); a != NULL; - a = ldap_next_attribute( ldap, e, ber ) ) { - } -#else - cursor_data->elements = g_list_prepend(cursor_data->elements, - g_strdup(ldap_get_dn(ldap, e))); -#endif - - e = ldap_next_entry(ldap, e); - } - - ldap_msgfree(res); - } -} - -static void -pas_backend_ldap_process_modify_card (PASBackend *backend, - PASBook *book, - PASRequest *req) -{ - g_warning ("pas_backend_ldap_process_modify_card not implemented\n"); - - pas_book_respond_modify ( - book, - Evolution_BookListener_CardNotFound); - g_free (req->vcard); -} - -static void -pas_backend_ldap_process_get_cursor (PASBackend *backend, - PASBook *book, - PASRequest *req) -{ - CORBA_Environment ev; - PASBackendLDAPCursorPrivate *cursor_data; - int ldap_error = 0; - PASCardCursor *cursor; - Evolution_Book corba_book; - - cursor_data = g_new(PASBackendLDAPCursorPrivate, 1); - cursor_data->backend = backend; - cursor_data->book = book; - - pas_backend_ldap_build_all_cards_list(backend, cursor_data); - - corba_book = bonobo_object_corba_objref(BONOBO_OBJECT(book)); - - CORBA_exception_init(&ev); - - Evolution_Book_ref(corba_book, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning("pas_backend_file_process_get_cursor: Exception reffing " - "corba book.\n"); - } - - CORBA_exception_free(&ev); - - cursor = pas_card_cursor_new(get_length, - get_nth, - cursor_data); - - gtk_signal_connect(GTK_OBJECT(cursor), "destroy", - GTK_SIGNAL_FUNC(cursor_destroy), cursor_data); - - pas_book_respond_get_cursor ( - book, - (ldap_error == 0 - ? Evolution_BookListener_Success - : Evolution_BookListener_CardNotFound), - cursor); -} - -static ESExpResult * -func_and(struct _ESExp *f, int argc, struct _ESExpResult **argv, void *data) -{ - GList **list = data; - ESExpResult *r; - char ** strings; - - if (argc > 0) { - int i; - - strings = g_new(char*, argc+3); - strings[0] = g_strdup ("(&"); - strings[argc+3 - 2] = g_strdup (")"); - strings[argc+3 - 1] = NULL; - - for (i = 0; i < argc; i ++) { - GList *list_head = *list; - strings[argc - i] = (*list)->data; - *list = g_list_remove_link(*list, *list); - g_list_free_1(list_head); - } - - *list = g_list_prepend(*list, g_strjoinv(" ", strings)); - - for (i = 0 ; i < argc + 2; i ++) - g_free (strings[i]); - - g_free (strings); - } - - r = e_sexp_result_new(ESEXP_RES_BOOL); - r->value.bool = FALSE; - - return r; -} - -static ESExpResult * -func_or(struct _ESExp *f, int argc, struct _ESExpResult **argv, void *data) -{ - GList **list = data; - ESExpResult *r; - char ** strings; - - if (argc > 0) { - int i; - - strings = g_new(char*, argc+3); - strings[0] = g_strdup ("(|"); - strings[argc+3 - 2] = g_strdup (")"); - strings[argc+3 - 1] = NULL; - for (i = 0; i < argc; i ++) { - GList *list_head = *list; - strings[argc - i] = (*list)->data; - *list = g_list_remove_link(*list, *list); - g_list_free_1(list_head); - } - - *list = g_list_prepend(*list, g_strjoinv(" ", strings)); - - for (i = 0 ; i < argc + 2; i ++) - g_free (strings[i]); - - g_free (strings); - } - - r = e_sexp_result_new(ESEXP_RES_BOOL); - r->value.bool = FALSE; - - return r; -} - -static ESExpResult * -func_not(struct _ESExp *f, int argc, struct _ESExpResult **argv, void *data) -{ - GList **list = data; - ESExpResult *r; - - /* just replace the head of the list with the NOT of it. */ - if (argc > 0) { - char *term = (*list)->data; - (*list)->data = g_strdup_printf("(!%s)", term); - g_free (term); - } - - r = e_sexp_result_new(ESEXP_RES_BOOL); - r->value.bool = FALSE; - - return r; -} - -static ESExpResult * -func_contains(struct _ESExp *f, int argc, struct _ESExpResult **argv, void *data) -{ - GList **list = data; - ESExpResult *r; - - if (argc == 2 - && argv[0]->type == ESEXP_RES_STRING - && argv[1]->type == ESEXP_RES_STRING) { - char *propname = argv[0]->value.string; - char *str = argv[1]->value.string; - char *ldap_attr = map_e_card_prop_to_ldap(propname); - gboolean one_star = FALSE; - - if (strlen(str) == 0) - one_star = TRUE; - - if (ldap_attr) - *list = g_list_prepend(*list, - g_strdup_printf("(%s=*%s%s)", - ldap_attr, - str, - one_star ? "" : "*")); - } - - r = e_sexp_result_new(ESEXP_RES_BOOL); - r->value.bool = FALSE; - - return r; -} - -static ESExpResult * -func_is(struct _ESExp *f, int argc, struct _ESExpResult **argv, void *data) -{ - GList **list = data; - ESExpResult *r; - - if (argc == 2 - && argv[0]->type == ESEXP_RES_STRING - && argv[1]->type == ESEXP_RES_STRING) { - char *propname = argv[0]->value.string; - char *str = argv[1]->value.string; - char *ldap_attr = map_e_card_prop_to_ldap(propname); - - if (ldap_attr) - *list = g_list_prepend(*list, - g_strdup_printf("(%s=%s)", - ldap_attr, str)); - } - - r = e_sexp_result_new(ESEXP_RES_BOOL); - r->value.bool = FALSE; - - return r; -} - -static ESExpResult * -func_beginswith(struct _ESExp *f, int argc, struct _ESExpResult **argv, void *data) -{ - GList **list = data; - ESExpResult *r; - - if (argc == 2 - && argv[0]->type == ESEXP_RES_STRING - && argv[1]->type == ESEXP_RES_STRING) { - char *propname = argv[0]->value.string; - char *str = argv[1]->value.string; - char *ldap_attr = map_e_card_prop_to_ldap(propname); - gboolean one_star = FALSE; - - if (strlen(str) == 0) - one_star = TRUE; - - if (ldap_attr) - *list = g_list_prepend(*list, - g_strdup_printf("(%s=%s*)", - ldap_attr, - str)); - } - - r = e_sexp_result_new(ESEXP_RES_BOOL); - r->value.bool = FALSE; - - return r; -} - -static ESExpResult * -func_endswith(struct _ESExp *f, int argc, struct _ESExpResult **argv, void *data) -{ - GList **list = data; - ESExpResult *r; - - if (argc == 2 - && argv[0]->type == ESEXP_RES_STRING - && argv[1]->type == ESEXP_RES_STRING) { - char *propname = argv[0]->value.string; - char *str = argv[1]->value.string; - char *ldap_attr = map_e_card_prop_to_ldap(propname); - gboolean one_star = FALSE; - - if (strlen(str) == 0) - one_star = TRUE; - - if (ldap_attr) - *list = g_list_prepend(*list, - g_strdup_printf("(%s=*%s)", - ldap_attr, - str)); - } - - r = e_sexp_result_new(ESEXP_RES_BOOL); - r->value.bool = FALSE; - - return r; -} - -/* 'builtin' functions */ -static struct { - char *name; - ESExpFunc *func; - int type; /* set to 1 if a function can perform shortcut evaluation, or - doesn't execute everything, 0 otherwise */ -} symbols[] = { - { "and", func_and, 0 }, - { "or", func_or, 0 }, - { "not", func_not, 0 }, - { "contains", func_contains, 0 }, - { "is", func_is, 0 }, - { "beginswith", func_beginswith, 0 }, - { "endswith", func_endswith, 0 }, -}; - -static gchar * -pas_backend_ldap_build_query (gchar *query) -{ - ESExp *sexp; - ESExpResult *r; - gchar *retval; - GList *list = NULL; - int i; - - sexp = e_sexp_new(); - - for(i=0;inext) { - g_warning ("conversion to ldap query string failed"); - retval = NULL; - g_list_foreach (list, (GFunc)g_free, NULL); - } - else { - retval = list->data; - } - - g_list_free (list); - return retval; -} - -static void -construct_email_list(ECardSimple *card, const char *prop, char **values) -{ - int i; - - for (i = 0; values[i] && i < 3; i ++) { - e_card_simple_set_email (card, i, values[i]); - } -} - -struct prop_info { - ECardSimpleField field_id; - char *query_prop; - char *ldap_attr; -#define PROP_TYPE_NORMAL 0x01 -#define PROP_TYPE_LIST 0x02 -#define PROP_TYPE_LISTITEM 0x03 - int prop_type; - void (*construct_list_func)(ECardSimple *card, const char *prop, char **values); -} prop_info_table[] = { - /* field_id, query prop, ldap attr, type, list construct function */ - { E_CARD_SIMPLE_FIELD_FULL_NAME, "full_name", "cn", PROP_TYPE_NORMAL, NULL }, - { E_CARD_SIMPLE_FIELD_TITLE, "title", "title", PROP_TYPE_NORMAL, NULL }, - { E_CARD_SIMPLE_FIELD_ORG_UNIT, "org", "o", PROP_TYPE_NORMAL, NULL }, - { E_CARD_SIMPLE_FIELD_PHONE_PRIMARY, "phone", "telephonenumber", PROP_TYPE_NORMAL, NULL }, - { 0 /* unused */, "email", "mail", PROP_TYPE_LIST, construct_email_list }, -}; - -static int num_prop_infos = sizeof(prop_info_table) / sizeof(prop_info_table[0]); - -static gchar * -map_e_card_prop_to_ldap(gchar *e_card_prop) -{ - int i; - - for (i = 0; i < num_prop_infos; i ++) - if (!strcmp (e_card_prop, prop_info_table[i].query_prop)) - return prop_info_table[i].ldap_attr; - - return NULL; -} - -static gboolean -poll_ldap (PASBackendLDAPBookView *view) -{ - LDAP *ldap; - int rc; - LDAPMessage *res, *e; - GList *cards = NULL; - - printf ("polling ldap server\n"); - - ldap = view->blpriv->ldap; - - if ((rc = ldap_result (ldap, view->search_msgid, 0, NULL, &res)) - != LDAP_RES_SEARCH_ENTRY) { - view->search_idle = 0; - return FALSE; - } - - e = ldap_first_entry(ldap, res); - - while (NULL != e) { - ECard *ecard = E_CARD(gtk_type_new(e_card_get_type())); - ECardSimple *card = e_card_simple_new (ecard); - char *dn = ldap_get_dn(ldap, e); - char *attr; - BerElement *ber = NULL; - - e_card_simple_set_id (card, dn); - - for (attr = ldap_first_attribute (ldap, e, &ber); attr; - attr = ldap_next_attribute (ldap, e, ber)) { - int i; - struct prop_info *info = NULL; - - for (i = 0; i < num_prop_infos; i ++) - if (!strcmp (attr, prop_info_table[i].ldap_attr)) - info = &prop_info_table[i]; - - if (info) { - char **values; - values = ldap_get_values (ldap, e, attr); - - if (info->prop_type == PROP_TYPE_NORMAL) { - /* if it's a normal property just set the string */ - e_card_simple_set (card, info->field_id, values[0]); - - } - else if (info->prop_type == PROP_TYPE_LIST) { - /* if it's a list call the construction function, - which calls gtk_object_set to set the property */ - info->construct_list_func(card, - info->query_prop, - values); - } - - ldap_value_free (values); - } - } - - /* if ldap->ld_errno == LDAP_DECODING_ERROR there was an - error decoding an attribute, and we shouldn't free ber, - since the ldap library already did it. */ - if (ldap->ld_errno != LDAP_DECODING_ERROR && ber) - ber_free (ber, 0); - - e_card_simple_sync_card (card); - cards = g_list_append (cards, e_card_simple_get_vcard (card)); - - gtk_object_unref (GTK_OBJECT(card)); - - e = ldap_next_entry(ldap, e); - } - - if (cards) { - pas_book_view_notify_add (view->book_view, cards); - - g_list_foreach (cards, (GFunc)g_free, NULL); - g_list_free (cards); - cards = NULL; - } - - ldap_msgfree(res); - - return TRUE; -} - -static void -pas_backend_ldap_search (PASBackendLDAP *bl, - PASBook *book, - PASBackendLDAPBookView *view) -{ - char *ldap_query = pas_backend_ldap_build_query(view->search); - - if (ldap_query != NULL) { - LDAP *ldap; - - pas_backend_ldap_ensure_connected(bl); - - ldap = bl->priv->ldap; - - if (ldap) { - ldap->ld_sizelimit = LDAP_MAX_SEARCH_RESPONSES; - ldap->ld_deref = LDAP_DEREF_ALWAYS; - - if ((view->search_msgid = ldap_search (ldap, - bl->priv->ldap_rootdn, - LDAP_SCOPE_ONELEVEL, - ldap_query, - NULL, 0)) == -1) { - g_warning ("ldap error '%s' in pas_backend_ldap_search\n", ldap_err2string(ldap->ld_errno)); - } - else { - view->search_idle = g_idle_add((GSourceFunc)poll_ldap, view); - } - } - } -} - -static void -pas_backend_ldap_process_get_book_view (PASBackend *backend, - PASBook *book, - PASRequest *req) -{ - PASBackendLDAP *bl = PAS_BACKEND_LDAP (backend); - CORBA_Environment ev; - Evolution_Book corba_book; - PASBookView *book_view; - PASBackendLDAPBookView *view; - - g_return_if_fail (req->listener != NULL); - - corba_book = bonobo_object_corba_objref(BONOBO_OBJECT(book)); - - CORBA_exception_init(&ev); - - Evolution_Book_ref(corba_book, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning("pas_backend_file_process_get_book_view: Exception reffing " - "corba book.\n"); - } - - CORBA_exception_free(&ev); - - book_view = pas_book_view_new (req->listener); - - gtk_signal_connect(GTK_OBJECT(book_view), "destroy", - GTK_SIGNAL_FUNC(view_destroy), book); - - pas_book_respond_get_book_view (book, - (book_view != NULL - ? Evolution_BookListener_Success - : Evolution_BookListener_CardNotFound /* XXX */), - book_view); - - view = g_new(PASBackendLDAPBookView, 1); - view->book_view = book_view; - view->search = g_strdup(req->search); - view->blpriv = bl->priv; - - bl->priv->book_views = g_list_prepend(bl->priv->book_views, view); - - pas_backend_ldap_search (bl, book, view); - -} - -static void -pas_backend_ldap_process_check_connection (PASBackend *backend, - PASBook *book, - PASRequest *req) -{ - PASBackendLDAP *bl = PAS_BACKEND_LDAP (backend); - - pas_book_report_connection (book, bl->priv->connected); -} - -static gboolean -pas_backend_ldap_can_write (PASBook *book) -{ - return FALSE; /* XXX */ -} - -static gboolean -pas_backend_ldap_can_write_card (PASBook *book, - const char *id) -{ - return FALSE; /* XXX */ -} - -static void -pas_backend_ldap_process_client_requests (PASBook *book) -{ - PASBackend *backend; - PASRequest *req; - - backend = pas_book_get_backend (book); - - req = pas_book_pop_request (book); - if (req == NULL) - return; - - switch (req->op) { - case CreateCard: - pas_backend_ldap_process_create_card (backend, book, req); - break; - - case RemoveCard: - pas_backend_ldap_process_remove_card (backend, book, req); - break; - - case ModifyCard: - pas_backend_ldap_process_modify_card (backend, book, req); - break; - - case CheckConnection: - pas_backend_ldap_process_check_connection (backend, book, req); - break; - - case GetCursor: - pas_backend_ldap_process_get_cursor (backend, book, req); - break; - - case GetBookView: - pas_backend_ldap_process_get_book_view (backend, book, req); - break; - } - - g_free (req); -} - -static void -pas_backend_ldap_book_destroy_cb (PASBook *book, gpointer data) -{ - PASBackendLDAP *backend; - - backend = PAS_BACKEND_LDAP (data); - - pas_backend_remove_client (PAS_BACKEND (backend), book); -} - -static char * -pas_backend_ldap_get_vcard (PASBook *book, const char *id) -{ - PASBackendLDAP *bl; - LDAP *ldap; - int ldap_error = LDAP_SUCCESS; /* XXX */ - - bl = PAS_BACKEND_LDAP (pas_book_get_backend (book)); - ldap = bl->priv->ldap; - - /* XXX use ldap_search */ - - if (ldap_error == LDAP_SUCCESS) { - /* success */ - return g_strdup (""); - } - else { - return g_strdup (""); - } -} - -static gboolean -pas_backend_ldap_load_uri (PASBackend *backend, - const char *uri) -{ - PASBackendLDAP *bl = PAS_BACKEND_LDAP (backend); - LDAPURLDesc *lud; - int ldap_error; - - g_assert (bl->priv->connected == FALSE); - - ldap_error = ldap_url_parse ((char*)uri, &lud); - if (ldap_error == LDAP_SUCCESS) { - g_free(bl->priv->uri); - bl->priv->uri = g_strdup (uri); - bl->priv->ldap_host = g_strdup(lud->lud_host); - bl->priv->ldap_port = lud->lud_port; - /* if a port wasn't specified, default to 389 */ - if (bl->priv->ldap_port == 0) - bl->priv->ldap_port = 389; - bl->priv->ldap_rootdn = g_strdup(lud->lud_dn); - - ldap_free_urldesc(lud); - - pas_backend_ldap_ensure_connected(bl); - return TRUE; - } else - return FALSE; -} - -/* Get_uri handler for the addressbook LDAP backend */ -static const char * -pas_backend_ldap_get_uri (PASBackend *backend) -{ - PASBackendLDAP *bl; - - bl = PAS_BACKEND_LDAP (backend); - return bl->priv->uri; -} - -static gboolean -pas_backend_ldap_add_client (PASBackend *backend, - Evolution_BookListener listener) -{ - PASBackendLDAP *bl; - PASBook *book; - - g_assert (backend != NULL); - g_assert (PAS_IS_BACKEND_LDAP (backend)); - - bl = PAS_BACKEND_LDAP (backend); - - book = pas_book_new ( - backend, listener, - pas_backend_ldap_get_vcard, - pas_backend_ldap_can_write, - pas_backend_ldap_can_write_card); - - if (!book) { - if (!bl->priv->clients) - pas_backend_last_client_gone (backend); - - return FALSE; - } - - gtk_signal_connect (GTK_OBJECT (book), "destroy", - pas_backend_ldap_book_destroy_cb, backend); - - gtk_signal_connect (GTK_OBJECT (book), "requests_queued", - pas_backend_ldap_process_client_requests, NULL); - - bl->priv->clients = g_list_prepend ( - bl->priv->clients, book); - - if (bl->priv->connected) { - pas_book_respond_open ( - book, Evolution_BookListener_Success); - } else { - /* Open the book. */ - pas_book_respond_open ( - book, Evolution_BookListener_Success); - } - - return TRUE; -} - -static void -pas_backend_ldap_remove_client (PASBackend *backend, - PASBook *book) -{ - PASBackendLDAP *bl; - GList *l; - PASBook *lbook; - - g_return_if_fail (backend != NULL); - g_return_if_fail (PAS_IS_BACKEND_LDAP (backend)); - g_return_if_fail (book != NULL); - g_return_if_fail (PAS_IS_BOOK (book)); - - bl = PAS_BACKEND_LDAP (backend); - - /* Find the book in the list of clients */ - - for (l = bl->priv->clients; l; l = l->next) { - lbook = PAS_BOOK (l->data); - - if (lbook == book) - break; - } - - g_assert (l != NULL); - - /* Disconnect */ - - bl->priv->clients = g_list_remove_link (bl->priv->clients, l); - g_list_free_1 (l); - - /* When all clients go away, notify the parent factory about it so that - * it may decide whether to kill the backend or not. - */ - if (!bl->priv->clients) - pas_backend_last_client_gone (backend); -} - -static gboolean -pas_backend_ldap_construct (PASBackendLDAP *backend) -{ - g_assert (backend != NULL); - g_assert (PAS_IS_BACKEND_LDAP (backend)); - - if (! pas_backend_construct (PAS_BACKEND (backend))) - return FALSE; - - return TRUE; -} - -/** - * pas_backend_ldap_new: - */ -PASBackend * -pas_backend_ldap_new (void) -{ - PASBackendLDAP *backend; - - backend = gtk_type_new (pas_backend_ldap_get_type ()); - - if (! pas_backend_ldap_construct (backend)) { - gtk_object_unref (GTK_OBJECT (backend)); - - return NULL; - } - - backend->priv->ldap = NULL; - - return PAS_BACKEND (backend); -} - -static void -pas_backend_ldap_destroy (GtkObject *object) -{ - PASBackendLDAP *bl; - - bl = PAS_BACKEND_LDAP (object); - - g_free (bl->priv->uri); - - GTK_OBJECT_CLASS (pas_backend_ldap_parent_class)->destroy (object); -} - -static void -pas_backend_ldap_class_init (PASBackendLDAPClass *klass) -{ - GtkObjectClass *object_class = (GtkObjectClass *) klass; - PASBackendClass *parent_class; - - pas_backend_ldap_parent_class = gtk_type_class (pas_backend_get_type ()); - - parent_class = PAS_BACKEND_CLASS (klass); - - /* Set the virtual methods. */ - parent_class->load_uri = pas_backend_ldap_load_uri; - parent_class->get_uri = pas_backend_ldap_get_uri; - parent_class->add_client = pas_backend_ldap_add_client; - parent_class->remove_client = pas_backend_ldap_remove_client; - - object_class->destroy = pas_backend_ldap_destroy; -} - -static void -pas_backend_ldap_init (PASBackendLDAP *backend) -{ - PASBackendLDAPPrivate *priv; - - priv = g_new0 (PASBackendLDAPPrivate, 1); - priv->connected = FALSE; - priv->clients = NULL; - priv->uri = NULL; - - backend->priv = priv; -} - -/** - * pas_backend_ldap_get_type: - */ -GtkType -pas_backend_ldap_get_type (void) -{ - static GtkType type = 0; - - if (! type) { - GtkTypeInfo info = { - "PASBackendLDAP", - sizeof (PASBackendLDAP), - sizeof (PASBackendLDAPClass), - (GtkClassInitFunc) pas_backend_ldap_class_init, - (GtkObjectInitFunc) pas_backend_ldap_init, - NULL, /* reserved 1 */ - NULL, /* reserved 2 */ - (GtkClassInitFunc) NULL - }; - - type = gtk_type_unique (pas_backend_get_type (), &info); - } - - return type; -} diff --git a/addressbook/backend/pas/pas-backend-ldap.h b/addressbook/backend/pas/pas-backend-ldap.h deleted file mode 100644 index a59cdf3857..0000000000 --- a/addressbook/backend/pas/pas-backend-ldap.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2000, Helix Code, Inc. - */ - -#ifndef __PAS_BACKEND_LDAP_H__ -#define __PAS_BACKEND_LDAP_H__ - -#include -#include "pas-backend.h" - -typedef struct _PASBackendLDAPPrivate PASBackendLDAPPrivate; - -typedef struct { - PASBackend parent_object; - PASBackendLDAPPrivate *priv; -} PASBackendLDAP; - -typedef struct { - PASBackendClass parent_class; -} PASBackendLDAPClass; - -PASBackend *pas_backend_ldap_new (void); -GtkType pas_backend_ldap_get_type (void); - -#define PAS_BACKEND_LDAP_TYPE (pas_backend_ldap_get_type ()) -#define PAS_BACKEND_LDAP(o) (GTK_CHECK_CAST ((o), PAS_BACKEND_LDAP_TYPE, PASBackendLDAP)) -#define PAS_BACKEND_LDAP_CLASS(k) (GTK_CHECK_CLASS_CAST((k), PAS_BACKEND_TYPE, PASBackendLDAPClass)) -#define PAS_IS_BACKEND_LDAP(o) (GTK_CHECK_TYPE ((o), PAS_BACKEND_LDAP_TYPE)) -#define PAS_IS_BACKEND_LDAP_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), PAS_BACKEND_LDAP_TYPE)) - -#endif /* ! __PAS_BACKEND_LDAP_H__ */ - diff --git a/addressbook/backend/pas/pas-backend.c b/addressbook/backend/pas/pas-backend.c deleted file mode 100644 index 3d315c2faf..0000000000 --- a/addressbook/backend/pas/pas-backend.c +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Author: - * Nat Friedman (nat@helixcode.com) - * - * Copyright 2000, Helix Code, Inc. - */ - -#include -#include -#include -#include "pas-backend.h" - -#define CLASS(o) PAS_BACKEND_CLASS (GTK_OBJECT (o)->klass) - -/* Signal IDs */ -enum { - LAST_CLIENT_GONE, - LAST_SIGNAL -}; - -static guint pas_backend_signals[LAST_SIGNAL]; - - -gboolean -pas_backend_construct (PASBackend *backend) -{ - return TRUE; -} - -gboolean -pas_backend_load_uri (PASBackend *backend, - const char *uri) -{ - g_return_val_if_fail (backend != NULL, FALSE); - g_return_val_if_fail (PAS_IS_BACKEND (backend), FALSE); - g_return_val_if_fail (uri != NULL, FALSE); - - g_assert (CLASS (backend)->load_uri != NULL); - - return (* CLASS (backend)->load_uri) (backend, uri); -} - -/** - * pas_backend_get_uri: - * @backend: An addressbook backend. - * - * Queries the URI that an addressbook backend is serving. - * - * Return value: URI for the backend. - **/ -const char * -pas_backend_get_uri (PASBackend *backend) -{ - g_return_val_if_fail (backend != NULL, NULL); - g_return_val_if_fail (PAS_IS_BACKEND (backend), NULL); - - g_assert (CLASS (backend)->get_uri != NULL); - - return (* CLASS (backend)->get_uri) (backend); -} - -/** - * pas_backend_add_client: - * @backend: An addressbook backend. - * @listener: Listener for notification to the client. - * - * Adds a client to an addressbook backend. - * - * Return value: TRUE on success, FALSE on failure to add the client. - */ -gboolean -pas_backend_add_client (PASBackend *backend, - Evolution_BookListener listener) -{ - g_return_val_if_fail (backend != NULL, FALSE); - g_return_val_if_fail (PAS_IS_BACKEND (backend), FALSE); - g_return_val_if_fail (listener != CORBA_OBJECT_NIL, FALSE); - - g_assert (CLASS (backend)->add_client != NULL); - - return CLASS (backend)->add_client (backend, listener); -} - -void -pas_backend_remove_client (PASBackend *backend, - PASBook *book) -{ - g_return_if_fail (backend != NULL); - g_return_if_fail (PAS_IS_BACKEND (backend)); - g_return_if_fail (book != NULL); - g_return_if_fail (PAS_IS_BOOK (book)); - - g_assert (CLASS (backend)->remove_client != NULL); - - CLASS (backend)->remove_client (backend, book); -} - -/** - * pas_backend_last_client_gone: - * @backend: An addressbook backend. - * - * Emits the "last_client_gone" signal for the specified backend. Should - * only be called from backend implementations if the backend really does - * not have any more clients. - **/ -void -pas_backend_last_client_gone (PASBackend *backend) -{ - g_return_if_fail (backend != NULL); - g_return_if_fail (PAS_IS_BACKEND (backend)); - - gtk_signal_emit (GTK_OBJECT (backend), pas_backend_signals[LAST_CLIENT_GONE]); -} - -static void -pas_backend_init (PASBackend *backend) -{ -} - -static void -pas_backend_class_init (PASBackendClass *klass) -{ - GtkObjectClass *object_class; - - object_class = (GtkObjectClass *) klass; - - pas_backend_signals[LAST_CLIENT_GONE] = - gtk_signal_new ("last_client_gone", - GTK_RUN_FIRST, - object_class->type, - GTK_SIGNAL_OFFSET (PASBackendClass, last_client_gone), - gtk_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); - - gtk_object_class_add_signals (object_class, pas_backend_signals, LAST_SIGNAL); -} - -/** - * pas_backend_get_type: - */ -GtkType -pas_backend_get_type (void) -{ - static GtkType type = 0; - - if (! type) { - GtkTypeInfo info = { - "PASBackend", - sizeof (PASBackend), - sizeof (PASBackendClass), - (GtkClassInitFunc) pas_backend_class_init, - (GtkObjectInitFunc) pas_backend_init, - NULL, /* reserved 1 */ - NULL, /* reserved 2 */ - (GtkClassInitFunc) NULL - }; - - type = gtk_type_unique (gtk_object_get_type (), &info); - } - - return type; -} diff --git a/addressbook/backend/pas/pas-backend.h b/addressbook/backend/pas/pas-backend.h deleted file mode 100644 index a1d1a291fd..0000000000 --- a/addressbook/backend/pas/pas-backend.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * An abstract class which defines the API to a given backend. - * There will be one PASBackend object for every URI which is loaded. - * - * Two people will call into the PASBackend API: - * - * 1. The PASBookFactory, when it has been asked to load a book. - * It will create a new PASBackend if one is not already running - * for the requested URI. It will call pas_backend_add_client to - * add a new client to an existing PASBackend server. - * - * 2. A PASBook, when a client has requested an operation on the - * Evolution_Book interface. - * - * Author: - * Nat Friedman (nat@helixcode.com) - * - * Copyright 2000, Helix Code, Inc. - */ - -#ifndef __PAS_BACKEND_H__ -#define __PAS_BACKEND_H__ - -#include -#include -#include - -typedef struct _PASBackend PASBackend; -typedef struct _PASBackendPrivate PASBackendPrivate; - -#include - -struct _PASBackend { - GtkObject parent_object; - PASBackendPrivate *priv; -}; - -typedef struct { - GtkObjectClass parent_class; - - /* Virtual methods */ - gboolean (*load_uri) (PASBackend *backend, const char *uri); - const char *(* get_uri) (PASBackend *backend); - gboolean (*add_client) (PASBackend *backend, Evolution_BookListener listener); - void (*remove_client) (PASBackend *backend, PASBook *book); - - /* Notification signals */ - void (* last_client_gone) (PASBackend *backend); -} PASBackendClass; - -typedef PASBackend * (*PASBackendFactoryFn) (void); - -gboolean pas_backend_construct (PASBackend *backend); -gboolean pas_backend_load_uri (PASBackend *backend, - const char *uri); -const char *pas_backend_get_uri (PASBackend *backend); -gboolean pas_backend_add_client (PASBackend *backend, - Evolution_BookListener listener); -void pas_backend_remove_client (PASBackend *backend, - PASBook *book); - -void pas_backend_last_client_gone (PASBackend *backend); - -GtkType pas_backend_get_type (void); - -#define PAS_BACKEND_TYPE (pas_backend_get_type ()) -#define PAS_BACKEND(o) (GTK_CHECK_CAST ((o), PAS_BACKEND_TYPE, PASBackend)) -#define PAS_BACKEND_CLASS(k) (GTK_CHECK_CLASS_CAST((k), PAS_BACKEND_TYPE, PASBackendClass)) -#define PAS_IS_BACKEND(o) (GTK_CHECK_TYPE ((o), PAS_BACKEND_TYPE)) -#define PAS_IS_BACKEND_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), PAS_BACKEND_TYPE)) - -#endif /* ! __PAS_BACKEND_H__ */ - diff --git a/addressbook/backend/pas/pas-book-factory.c b/addressbook/backend/pas/pas-book-factory.c deleted file mode 100644 index f4012b2adf..0000000000 --- a/addressbook/backend/pas/pas-book-factory.c +++ /dev/null @@ -1,639 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * - * Author: - * Nat Friedman (nat@helixcode.com) - * - * Copyright 2000, Helix Code, Inc. - */ - -#include -#include -#include - -#include "addressbook.h" -#include "pas-book-factory.h" - -#ifdef USING_OAF -#include -#define PAS_BOOK_FACTORY_OAF_ID "OAFIID:evolution:addressbook-server:0fbc844d-c721-4615-98d0-d67eacf42d80" -#else -#include -#define PAS_BOOK_FACTORY_GOAD_ID "evolution:addressbook-server" -#endif - -static BonoboObjectClass *pas_book_factory_parent_class; -POA_Evolution_BookFactory__vepv pas_book_factory_vepv; - -typedef struct { - char *uri; - Evolution_BookListener listener; -} PASBookFactoryQueuedRequest; - -struct _PASBookFactoryPrivate { - gint idle_id; - GHashTable *backends; - GHashTable *active_server_map; - GList *queued_requests; -}; - -/* Signal IDs */ -enum { - LAST_BOOK_GONE, - LAST_SIGNAL -}; - -static guint factory_signals[LAST_SIGNAL]; - -static char * -pas_book_factory_canonicalize_uri (const char *uri) -{ - /* FIXME: What do I do here? */ - - return g_strdup (uri); -} - -static char * -pas_book_factory_extract_proto_from_uri (const char *uri) -{ - char *proto; - char *p; - - p = strchr (uri, ':'); - - if (p == NULL) - return NULL; - - proto = g_malloc0 (p - uri + 1); - - strncpy (proto, uri, p - uri); - - return proto; -} - -/** - * pas_book_factory_register_backend: - * @factory: - * @proto: - * @backend: - */ -void -pas_book_factory_register_backend (PASBookFactory *factory, - const char *proto, - PASBackendFactoryFn backend) -{ - g_return_if_fail (factory != NULL); - g_return_if_fail (PAS_IS_BOOK_FACTORY (factory)); - g_return_if_fail (proto != NULL); - g_return_if_fail (backend != NULL); - - if (g_hash_table_lookup (factory->priv->backends, proto) != NULL) { - g_warning ("pas_book_factory_register_backend: " - "Proto \"%s\" already registered!\n", proto); - } - - g_hash_table_insert (factory->priv->backends, - g_strdup (proto), backend); -} - -/** - * pas_book_factory_get_n_backends: - * @factory: An addressbook factory. - * - * Queries the number of running addressbook backends in an addressbook factory. - * - * Return value: Number of running backends. - **/ -int -pas_book_factory_get_n_backends (PASBookFactory *factory) -{ - g_return_val_if_fail (factory != NULL, -1); - g_return_val_if_fail (PAS_IS_BOOK_FACTORY (factory), -1); - - return g_hash_table_size (factory->priv->active_server_map); -} - -/* Callback used when a backend loses its last connected client */ -static void -backend_last_client_gone_cb (PASBackend *backend, gpointer data) -{ - PASBookFactory *factory; - const char *uri; - gpointer orig_key; - gboolean result; - char *orig_uri; - - factory = PAS_BOOK_FACTORY (data); - - /* Remove the backend from the active server map */ - - uri = pas_backend_get_uri (backend); - g_assert (uri != NULL); - - result = g_hash_table_lookup_extended (factory->priv->active_server_map, uri, - &orig_key, NULL); - g_assert (result != FALSE); - - orig_uri = orig_key; - - g_hash_table_remove (factory->priv->active_server_map, orig_uri); - g_free (orig_uri); - - gtk_object_unref (GTK_OBJECT (backend)); - - /* Notify upstream if there are no more backends */ - - if (g_hash_table_size (factory->priv->active_server_map) == 0) - gtk_signal_emit (GTK_OBJECT (factory), factory_signals[LAST_BOOK_GONE]); -} - -static PASBackendFactoryFn -pas_book_factory_lookup_backend_factory (PASBookFactory *factory, - const char *uri) -{ - PASBackendFactoryFn backend_fn; - char *proto; - char *canonical_uri; - - g_assert (factory != NULL); - g_assert (PAS_IS_BOOK_FACTORY (factory)); - g_assert (uri != NULL); - - canonical_uri = pas_book_factory_canonicalize_uri (uri); - if (canonical_uri == NULL) - return NULL; - - proto = pas_book_factory_extract_proto_from_uri (canonical_uri); - if (proto == NULL) { - g_free (canonical_uri); - return NULL; - } - - backend_fn = g_hash_table_lookup (factory->priv->backends, proto); - - g_free (proto); - g_free (canonical_uri); - - return backend_fn; -} - -static PASBackend * -pas_book_factory_launch_backend (PASBookFactory *factory, - Evolution_BookListener listener, - const char *uri) -{ - PASBackendFactoryFn backend_factory; - PASBackend *backend; - - backend_factory = pas_book_factory_lookup_backend_factory ( - factory, uri); - - if (!backend_factory) { - CORBA_Environment ev; - - CORBA_exception_init (&ev); - Evolution_BookListener_respond_open_book ( - listener, - Evolution_BookListener_ProtocolNotSupported, - CORBA_OBJECT_NIL, - &ev); - - if (ev._major != CORBA_NO_EXCEPTION) - g_message ("pas_book_factory_launch_backend(): could not notify " - "the listener"); - - CORBA_exception_free (&ev); - return NULL; - } - - backend = (* backend_factory) (); - if (!backend) { - CORBA_Environment ev; - - CORBA_exception_init (&ev); - Evolution_BookListener_respond_open_book ( - listener, - Evolution_BookListener_OtherError, - CORBA_OBJECT_NIL, - &ev); - - if (ev._major != CORBA_NO_EXCEPTION) - g_message ("pas_book_factory_launch_backend(): could not notify " - "the listener"); - - CORBA_exception_free (&ev); - return NULL; - } - - g_hash_table_insert (factory->priv->active_server_map, - g_strdup (uri), - backend); - - gtk_signal_connect (GTK_OBJECT (backend), "last_client_gone", - backend_last_client_gone_cb, - factory); - - return backend; -} - -static void -pas_book_factory_process_request (PASBookFactory *factory, - PASBookFactoryQueuedRequest *request) -{ - PASBackend *backend; - char *uri; - Evolution_BookListener listener; - CORBA_Environment ev; - - uri = request->uri; - listener = request->listener; - g_free (request); - - /* Look up the backend and create one if needed */ - - backend = g_hash_table_lookup (factory->priv->active_server_map, uri); - - if (!backend) { - backend = pas_book_factory_launch_backend (factory, listener, uri); - if (!backend) - goto out; - - if (!pas_backend_add_client (backend, listener)) - goto out; - - pas_backend_load_uri (backend, uri); - - goto out; - } - - pas_backend_add_client (backend, listener); - - out: - g_free (uri); - - CORBA_exception_init (&ev); - CORBA_Object_release (listener, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) - g_message ("pas_book_factory_process_request(): could not release the listener"); - - CORBA_exception_free (&ev); -} - -static gboolean -pas_book_factory_process_queue (PASBookFactory *factory) -{ - /* Process pending Book-creation requests. */ - if (factory->priv->queued_requests != NULL) { - PASBookFactoryQueuedRequest *request; - GList *l; - - l = factory->priv->queued_requests; - request = l->data; - - pas_book_factory_process_request (factory, request); - - factory->priv->queued_requests = g_list_remove_link ( - factory->priv->queued_requests, l); - g_list_free_1 (l); - } - - if (factory->priv->queued_requests == NULL) { - - factory->priv->idle_id = 0; - return FALSE; - } - - return TRUE; -} - -static void -pas_book_factory_queue_request (PASBookFactory *factory, - const char *uri, - const Evolution_BookListener listener) -{ - PASBookFactoryQueuedRequest *request; - Evolution_BookListener listener_copy; - CORBA_Environment ev; - - CORBA_exception_init (&ev); - - listener_copy = CORBA_Object_duplicate (listener, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("PASBookFactory: Could not duplicate BookListener!\n"); - CORBA_exception_free (&ev); - return; - } - - CORBA_exception_free (&ev); - - request = g_new0 (PASBookFactoryQueuedRequest, 1); - request->listener = listener_copy; - request->uri = g_strdup (uri); - - factory->priv->queued_requests = - g_list_prepend (factory->priv->queued_requests, request); - - if (! factory->priv->idle_id) { - factory->priv->idle_id = - g_idle_add ((GSourceFunc) pas_book_factory_process_queue, factory); - } -} - - -static void -impl_Evolution_BookFactory_open_book (PortableServer_Servant servant, - const CORBA_char *uri, - const Evolution_BookListener listener, - CORBA_Environment *ev) -{ - PASBookFactory *factory = - PAS_BOOK_FACTORY (bonobo_object_from_servant (servant)); - PASBackendFactoryFn backend_factory; - - backend_factory = pas_book_factory_lookup_backend_factory (factory, uri); - - if (backend_factory == NULL) { - Evolution_BookListener_respond_open_book ( - listener, - Evolution_BookListener_ProtocolNotSupported, - CORBA_OBJECT_NIL, - &ev); - - return; - } - - pas_book_factory_queue_request (factory, uri, listener); -} - -static gboolean -pas_book_factory_construct (PASBookFactory *factory) -{ - POA_Evolution_BookFactory *servant; - CORBA_Environment ev; - CORBA_Object obj; - - g_assert (factory != NULL); - g_assert (PAS_IS_BOOK_FACTORY (factory)); - - servant = (POA_Evolution_BookFactory *) g_new0 (BonoboObjectServant, 1); - servant->vepv = &pas_book_factory_vepv; - - CORBA_exception_init (&ev); - - POA_Evolution_BookFactory__init ((PortableServer_Servant) servant, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_free (servant); - CORBA_exception_free (&ev); - - return FALSE; - } - - CORBA_exception_free (&ev); - - obj = bonobo_object_activate_servant (BONOBO_OBJECT (factory), servant); - if (obj == CORBA_OBJECT_NIL) { - g_free (servant); - - return FALSE; - } - - bonobo_object_construct (BONOBO_OBJECT (factory), obj); - - return TRUE; -} - -/** - * pas_book_factory_new: - */ -PASBookFactory * -pas_book_factory_new (void) -{ - PASBookFactory *factory; - - factory = gtk_type_new (pas_book_factory_get_type ()); - - if (! pas_book_factory_construct (factory)) { - g_warning ("pas_book_factory_new: Could not construct PASBookFactory!\n"); - gtk_object_unref (GTK_OBJECT (factory)); - - return NULL; - } - - return factory; -} - -#ifdef USING_OAF - -static gboolean -register_factory (CORBA_Object obj) -{ - OAF_RegistrationResult result; - - puts ("about to register addressbook"); - - result = oaf_active_server_register (PAS_BOOK_FACTORY_OAF_ID, obj); - - switch (result) { - case OAF_REG_SUCCESS: - return TRUE; - case OAF_REG_NOT_LISTED: - g_message ("Error registering the PAS factory: not listed"); - return FALSE; - case OAF_REG_ALREADY_ACTIVE: - g_message ("Error registering the PAS factory: already active"); - return FALSE; - case OAF_REG_ERROR: - default: - g_message ("Error registering the PAS factory: generic error"); - return FALSE; - } -} - -#else - -static gboolean -register_factory (CORBA_Object obj) -{ - CORBA_Environment ev; - int ret; - - CORBA_exception_init (&ev); - ret = goad_server_register (NULL, obj, PAS_BOOK_FACTORY_GOAD_ID, "server", &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_message ("pas_book_factory_activate: Exception " - "registering PASBookFactory!\n"); - CORBA_exception_free (&ev); - return FALSE; - } - - CORBA_exception_free (&ev); - - switch (ret) { - case 0: - return TRUE; - case -2: - g_message ("pas_book_factory_activate: Another " - "PASBookFactory is already running.\n"); - return FALSE; - case -1: - default: - g_message ("pas_book_factory_activate: Error " - "registering PASBookFactory!\n"); - return FALSE; - } -} - -#endif - -/** - * pas_book_factory_activate: - */ -void -pas_book_factory_activate (PASBookFactory *factory) -{ - g_return_if_fail (factory != NULL); - g_return_if_fail (PAS_IS_BOOK_FACTORY (factory)); - - register_factory (bonobo_object_corba_objref (BONOBO_OBJECT (factory))); -} - -static void -pas_book_factory_init (PASBookFactory *factory) -{ - factory->priv = g_new0 (PASBookFactoryPrivate, 1); - - factory->priv->active_server_map = g_hash_table_new (g_str_hash, g_str_equal); - factory->priv->backends = g_hash_table_new (g_str_hash, g_str_equal); - factory->priv->queued_requests = NULL; -} - -static void -free_active_server_map_entry (gpointer key, gpointer value, gpointer data) -{ - char *uri; - PASBackend *backend; - - uri = key; - g_free (uri); - - backend = PAS_BACKEND (value); - gtk_object_unref (GTK_OBJECT (backend)); -} - -static void -remove_backends_entry (gpointer key, gpointer value, gpointer data) -{ - char *uri; - - uri = key; - g_free (uri); -} - -static void -pas_book_factory_destroy (GtkObject *object) -{ - PASBookFactory *factory = PAS_BOOK_FACTORY (object); - GList *l; - - for (l = factory->priv->queued_requests; l != NULL; l = l->next) { - PASBookFactoryQueuedRequest *request = l->data; - CORBA_Environment ev; - - g_free (request->uri); - - CORBA_exception_init (&ev); - CORBA_Object_release (request->listener, &ev); - CORBA_exception_free (&ev); - - g_free (request); - } - g_list_free (factory->priv->queued_requests); - factory->priv->queued_requests = NULL; - - g_hash_table_foreach (factory->priv->active_server_map, - free_active_server_map_entry, - NULL); - g_hash_table_destroy (factory->priv->active_server_map); - factory->priv->active_server_map = NULL; - - g_hash_table_foreach (factory->priv->backends, - remove_backends_entry, - NULL); - g_hash_table_destroy (factory->priv->backends); - factory->priv->backends = NULL; - - g_free (factory->priv); - - GTK_OBJECT_CLASS (pas_book_factory_parent_class)->destroy (object); -} - -static POA_Evolution_BookFactory__epv * -pas_book_factory_get_epv (void) -{ - POA_Evolution_BookFactory__epv *epv; - - epv = g_new0 (POA_Evolution_BookFactory__epv, 1); - - epv->open_book = impl_Evolution_BookFactory_open_book; - - return epv; - -} - -static void -pas_book_factory_corba_class_init (void) -{ - pas_book_factory_vepv.Bonobo_Unknown_epv = bonobo_object_get_epv (); - pas_book_factory_vepv.Evolution_BookFactory_epv = pas_book_factory_get_epv (); -} - -static void -pas_book_factory_class_init (PASBookFactoryClass *klass) -{ - GtkObjectClass *object_class = (GtkObjectClass *) klass; - - pas_book_factory_parent_class = gtk_type_class (bonobo_object_get_type ()); - - factory_signals[LAST_BOOK_GONE] = - gtk_signal_new ("last_book_gone", - GTK_RUN_FIRST, - object_class->type, - GTK_SIGNAL_OFFSET (PASBookFactoryClass, last_book_gone), - gtk_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); - - gtk_object_class_add_signals (object_class, factory_signals, LAST_SIGNAL); - - object_class->destroy = pas_book_factory_destroy; - - pas_book_factory_corba_class_init (); -} - -/** - * pas_book_factory_get_type: - */ -GtkType -pas_book_factory_get_type (void) -{ - static GtkType type = 0; - - if (! type) { - GtkTypeInfo info = { - "PASBookFactory", - sizeof (PASBookFactory), - sizeof (PASBookFactoryClass), - (GtkClassInitFunc) pas_book_factory_class_init, - (GtkObjectInitFunc) pas_book_factory_init, - NULL, /* reserved 1 */ - NULL, /* reserved 2 */ - (GtkClassInitFunc) NULL - }; - - type = gtk_type_unique (bonobo_object_get_type (), &info); - } - - return type; -} diff --git a/addressbook/backend/pas/pas-book-factory.h b/addressbook/backend/pas/pas-book-factory.h deleted file mode 100644 index 7e4690adf1..0000000000 --- a/addressbook/backend/pas/pas-book-factory.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2000, Helix Code, Inc. - */ - -#include -#include - -#include - -#ifndef __PAS_BOOK_FACTORY_H__ -#define __PAS_BOOK_FACTORY_H__ - -BEGIN_GNOME_DECLS - -typedef struct _PASBookFactoryPrivate PASBookFactoryPrivate; - -typedef struct { - BonoboObject parent_object; - PASBookFactoryPrivate *priv; -} PASBookFactory; - -typedef struct { - BonoboObjectClass parent_class; - - /* Notification signals */ - - void (* last_book_gone) (PASBookFactory *factory); -} PASBookFactoryClass; - -PASBookFactory *pas_book_factory_new (void); - -void pas_book_factory_register_backend (PASBookFactory *factory, - const char *proto, - PASBackendFactoryFn backend_factory); - -int pas_book_factory_get_n_backends (PASBookFactory *factory); - -void pas_book_factory_activate (PASBookFactory *factory); - -GtkType pas_book_factory_get_type (void); - -#define PAS_BOOK_FACTORY_TYPE (pas_book_factory_get_type ()) -#define PAS_BOOK_FACTORY(o) (GTK_CHECK_CAST ((o), PAS_BOOK_FACTORY_TYPE, PASBookFactory)) -#define PAS_BOOK_FACTORY_CLASS(k) (GTK_CHECK_CLASS_CAST((k), PAS_BOOK_FACTORY_TYPE, PASBookFactoryClass)) -#define PAS_IS_BOOK_FACTORY(o) (GTK_CHECK_TYPE ((o), PAS_BOOK_FACTORY_TYPE)) -#define PAS_IS_BOOK_FACTORY_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), PAS_BOOK_FACTORY_TYPE)) - -END_GNOME_DECLS - -#endif /* ! __PAS_BOOK_FACTORY_H__ */ diff --git a/addressbook/backend/pas/pas-book-view.c b/addressbook/backend/pas/pas-book-view.c deleted file mode 100644 index d218112555..0000000000 --- a/addressbook/backend/pas/pas-book-view.c +++ /dev/null @@ -1,262 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * pas-book-view.c - * - * Copyright 2000, Helix Code, Inc. - */ - -#include -#include -#include "pas-book-view.h" - -static BonoboObjectClass *pas_book_view_parent_class; -POA_Evolution_BookView__vepv pas_book_view_vepv; - -struct _PASBookViewPrivate { - Evolution_BookViewListener listener; -}; - -/** - * pas_book_view_notify_change: - */ -void -pas_book_view_notify_change (PASBookView *book_view, - const GList *cards) -{ - CORBA_Environment ev; - gint i, length; - CORBA_sequence_Evolution_VCard card_sequence; - - length = g_list_length((GList *) cards); - - card_sequence._buffer = CORBA_sequence_Evolution_VCard_allocbuf(length); - card_sequence._maximum = length; - card_sequence._length = length; - - for ( i = 0; cards; cards = g_list_next(cards), i++ ) { - card_sequence._buffer[i] = CORBA_string_dup((char *) cards->data); - } - - CORBA_exception_init (&ev); - - Evolution_BookViewListener_signal_card_changed ( - book_view->priv->listener, &card_sequence, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("pas_book_view_notify_change: Exception signaling BookViewListener!\n"); - } - - CORBA_exception_free (&ev); - - CORBA_free(card_sequence._buffer); -} - -void -pas_book_view_notify_change_1 (PASBookView *book_view, - const char *card) -{ - GList *list = g_list_append(NULL, (char *) card); - pas_book_view_notify_change(book_view, list); - g_list_free(list); -} - -/** - * pas_book_view_notify_remove: - */ -void -pas_book_view_notify_remove (PASBookView *book_view, - const char *id) -{ - CORBA_Environment ev; - - CORBA_exception_init (&ev); - - Evolution_BookViewListener_signal_card_removed ( - book_view->priv->listener, (Evolution_CardId) id, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("pas_book_view_notify_remove: Exception signaling BookViewListener!\n"); - } - - CORBA_exception_free (&ev); -} - -/** - * pas_book_view_notify_add: - */ -void -pas_book_view_notify_add (PASBookView *book_view, - const GList *cards) -{ - CORBA_Environment ev; - gint i, length; - CORBA_sequence_Evolution_VCard card_sequence; - - length = g_list_length((GList *)cards); - - card_sequence._buffer = CORBA_sequence_Evolution_VCard_allocbuf(length); - card_sequence._maximum = length; - card_sequence._length = length; - - for ( i = 0; cards; cards = g_list_next(cards), i++ ) { - card_sequence._buffer[i] = CORBA_string_dup((char *) cards->data); - } - - CORBA_exception_init (&ev); - - Evolution_BookViewListener_signal_card_added ( - book_view->priv->listener, &card_sequence, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("pas_book_view_notify_add: Exception signaling BookViewListener!\n"); - } - - CORBA_exception_free (&ev); - - CORBA_free(card_sequence._buffer); -} - -void -pas_book_view_notify_add_1 (PASBookView *book_view, - const char *card) -{ - GList *list = g_list_append(NULL, (char *) card); - pas_book_view_notify_add(book_view, list); - g_list_free(list); -} - -static gboolean -pas_book_view_construct (PASBookView *book_view, - Evolution_BookViewListener listener) -{ - POA_Evolution_BookView *servant; - CORBA_Environment ev; - CORBA_Object obj; - - g_assert (book_view != NULL); - g_assert (PAS_IS_BOOK_VIEW (book_view)); - g_assert (listener != CORBA_OBJECT_NIL); - - servant = (POA_Evolution_BookView *) g_new0 (BonoboObjectServant, 1); - servant->vepv = &pas_book_view_vepv; - - CORBA_exception_init (&ev); - - POA_Evolution_BookView__init ((PortableServer_Servant) servant, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_free (servant); - CORBA_exception_free (&ev); - - return FALSE; - } - - CORBA_exception_free (&ev); - - obj = bonobo_object_activate_servant (BONOBO_OBJECT (book_view), servant); - if (obj == CORBA_OBJECT_NIL) { - g_free (servant); - - return FALSE; - } - - bonobo_object_construct (BONOBO_OBJECT (book_view), obj); - - book_view->priv->listener = listener; - - return TRUE; -} - -/** - * pas_book_view_new: - */ -PASBookView * -pas_book_view_new (Evolution_BookViewListener listener) -{ - PASBookView *book_view; - - g_return_val_if_fail (listener != CORBA_OBJECT_NIL, NULL); - - book_view = gtk_type_new (pas_book_view_get_type ()); - - if (! pas_book_view_construct (book_view, listener)) { - gtk_object_unref (GTK_OBJECT (book_view)); - - return NULL; - } - - return book_view; -} - -static void -pas_book_view_destroy (GtkObject *object) -{ - PASBookView *book_view = PAS_BOOK_VIEW (object); - - g_free (book_view->priv); - - GTK_OBJECT_CLASS (pas_book_view_parent_class)->destroy (object); -} - -static POA_Evolution_BookView__epv * -pas_book_view_get_epv (void) -{ - POA_Evolution_BookView__epv *epv; - - epv = g_new0 (POA_Evolution_BookView__epv, 1); - - return epv; - -} - -static void -pas_book_view_corba_class_init (void) -{ - pas_book_view_vepv.Bonobo_Unknown_epv = bonobo_object_get_epv (); - pas_book_view_vepv.Evolution_BookView_epv = pas_book_view_get_epv (); -} - -static void -pas_book_view_class_init (PASBookViewClass *klass) -{ - GtkObjectClass *object_class = (GtkObjectClass *) klass; - - pas_book_view_parent_class = gtk_type_class (bonobo_object_get_type ()); - - object_class->destroy = pas_book_view_destroy; - - pas_book_view_corba_class_init (); -} - -static void -pas_book_view_init (PASBookView *book_view) -{ - book_view->priv = g_new0 (PASBookViewPrivate, 1); - book_view->priv->listener = CORBA_OBJECT_NIL; -} - -/** - * pas_book_view_get_type: - */ -GtkType -pas_book_view_get_type (void) -{ - static GtkType type = 0; - - if (! type) { - GtkTypeInfo info = { - "PASBookView", - sizeof (PASBookView), - sizeof (PASBookViewClass), - (GtkClassInitFunc) pas_book_view_class_init, - (GtkObjectInitFunc) pas_book_view_init, - NULL, /* reserved 1 */ - NULL, /* reserved 2 */ - (GtkClassInitFunc) NULL - }; - - type = gtk_type_unique (bonobo_object_get_type (), &info); - } - - return type; -} - diff --git a/addressbook/backend/pas/pas-book-view.h b/addressbook/backend/pas/pas-book-view.h deleted file mode 100644 index 55023b48ed..0000000000 --- a/addressbook/backend/pas/pas-book-view.h +++ /dev/null @@ -1,53 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * A wrapper object which exports the Evolution_Book CORBA interface - * and which maintains a request queue. - * - * Author: - * Nat Friedman (nat@helixcode.com) - * - * Copyright 2000, Helix Code, Inc. - */ - -#ifndef __PAS_BOOK_VIEW_H__ -#define __PAS_BOOK_VIEW_H__ - -#include -#include -#include - -typedef struct _PASBookView PASBookView; -typedef struct _PASBookViewClass PASBookViewClass; -typedef struct _PASBookViewPrivate PASBookViewPrivate; - -struct _PASBookView { - BonoboObject parent_object; - PASBookViewPrivate *priv; -}; - -struct _PASBookViewClass { - BonoboObjectClass parent_class; -}; - -PASBookView *pas_book_view_new (Evolution_BookViewListener listener); - -void pas_book_view_notify_change (PASBookView *book_view, - const GList *cards); -void pas_book_view_notify_change_1 (PASBookView *book_view, - const char *card); -void pas_book_view_notify_remove (PASBookView *book_view, - const char *id); -void pas_book_view_notify_add (PASBookView *book_view, - const GList *cards); -void pas_book_view_notify_add_1 (PASBookView *book_view, - const char *card); - -GtkType pas_book_view_get_type (void); - -#define PAS_BOOK_VIEW_TYPE (pas_book_view_get_type ()) -#define PAS_BOOK_VIEW(o) (GTK_CHECK_CAST ((o), PAS_BOOK_VIEW_TYPE, PASBookView)) -#define PAS_BOOK_VIEW_CLASS(k) (GTK_CHECK_CLASS_CAST((k), PAS_BOOK_VIEW_FACTORY_TYPE, PASBookViewClass)) -#define PAS_IS_BOOK_VIEW(o) (GTK_CHECK_TYPE ((o), PAS_BOOK_VIEW_TYPE)) -#define PAS_IS_BOOK_VIEW_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), PAS_BOOK_VIEW_TYPE)) - -#endif /* ! __PAS_BOOK_VIEW_H__ */ diff --git a/addressbook/backend/pas/pas-book.c b/addressbook/backend/pas/pas-book.c deleted file mode 100644 index 55caf1dce7..0000000000 --- a/addressbook/backend/pas/pas-book.c +++ /dev/null @@ -1,677 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * pas-book.c - * - * Copyright 2000, Helix Code, Inc. - */ - -#include -#include -#include "pas-book.h" - -static BonoboObjectClass *pas_book_parent_class; -POA_Evolution_Book__vepv pas_book_vepv; - -enum { - REQUESTS_QUEUED, - LAST_SIGNAL -}; - -static guint pas_book_signals [LAST_SIGNAL]; - -struct _PASBookPrivate { - PASBackend *backend; - Evolution_BookListener listener; - PASBookGetVCardFn get_vcard; - PASBookCanWriteFn can_write; - PASBookCanWriteCardFn can_write_card; - - GList *request_queue; - gint idle_id; -}; - -static gboolean -pas_book_check_queue (PASBook *book) -{ - if (book->priv->request_queue != NULL) { - gtk_signal_emit (GTK_OBJECT (book), - pas_book_signals [REQUESTS_QUEUED]); - } - - if (book->priv->request_queue == NULL) { - book->priv->idle_id = 0; - return FALSE; - } - - return TRUE; -} - -static void -pas_book_queue_request (PASBook *book, PASRequest *req) -{ - book->priv->request_queue = - g_list_append (book->priv->request_queue, req); - - if (book->priv->idle_id == 0) { - book->priv->idle_id = g_idle_add ((GSourceFunc) pas_book_check_queue, book); - } -} - -static void -pas_book_queue_create_card (PASBook *book, const char *vcard) -{ - PASRequest *req; - - req = g_new0 (PASRequest, 1); - req->op = CreateCard; - req->vcard = g_strdup (vcard); - - pas_book_queue_request (book, req); -} - -static void -pas_book_queue_remove_card (PASBook *book, const char *id) -{ - PASRequest *req; - - req = g_new0 (PASRequest, 1); - req->op = RemoveCard; - req->id = g_strdup (id); - - pas_book_queue_request (book, req); -} - -static void -pas_book_queue_modify_card (PASBook *book, const char *vcard) -{ - PASRequest *req; - - req = g_new0 (PASRequest, 1); - req->op = ModifyCard; - req->vcard = g_strdup (vcard); - - pas_book_queue_request (book, req); -} - -static void -pas_book_queue_get_cursor (PASBook *book, const char *search) -{ - PASRequest *req; - - req = g_new0 (PASRequest, 1); - req->op = GetCursor; - req->search = g_strdup(search); - - pas_book_queue_request (book, req); -} - -static void -pas_book_queue_get_book_view (PASBook *book, const Evolution_BookViewListener listener, const char *search) -{ - PASRequest *req; - CORBA_Environment ev; - - req = g_new0 (PASRequest, 1); - req->op = GetBookView; - req->search = g_strdup(search); - - CORBA_exception_init (&ev); - - req->listener = CORBA_Object_duplicate(listener, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("pas_book_queue_get_book_view: Exception " - "duplicating BookViewListener!\n"); - } - - CORBA_exception_free (&ev); - - pas_book_queue_request (book, req); -} - -static void -pas_book_queue_check_connection (PASBook *book) -{ - PASRequest *req; - - req = g_new0 (PASRequest, 1); - req->op = CheckConnection; - - pas_book_queue_request (book, req); -} - -static CORBA_char * -impl_Evolution_Book_get_vcard (PortableServer_Servant servant, - const Evolution_CardId id, - CORBA_Environment *ev) -{ - PASBook *book = PAS_BOOK (bonobo_object_from_servant (servant)); - char *vcard; - CORBA_char *retval; - - vcard = (book->priv->get_vcard) (book, (const char *) id); - retval = CORBA_string_dup (vcard); - g_free (vcard); - - return retval; -} - -static CORBA_boolean -impl_Evolution_Book_can_write (PortableServer_Servant servant, - CORBA_Environment *ev) -{ - PASBook *book = PAS_BOOK (bonobo_object_from_servant (servant)); - CORBA_boolean retval; - - retval = (book->priv->can_write) (book); - - return retval; -} - -static CORBA_boolean -impl_Evolution_Book_can_write_card (PortableServer_Servant servant, - const Evolution_CardId id, - CORBA_Environment *ev) -{ - PASBook *book = PAS_BOOK (bonobo_object_from_servant (servant)); - CORBA_boolean retval; - - retval = (book->priv->can_write_card) (book, (const char *) id); - - return retval; -} - -static void -impl_Evolution_Book_create_card (PortableServer_Servant servant, - const Evolution_VCard vcard, - CORBA_Environment *ev) -{ - PASBook *book = PAS_BOOK (bonobo_object_from_servant (servant)); - - pas_book_queue_create_card (book, (const char *) vcard); -} - -static void -impl_Evolution_Book_remove_card (PortableServer_Servant servant, - const Evolution_CardId id, - CORBA_Environment *ev) -{ - PASBook *book = PAS_BOOK (bonobo_object_from_servant (servant)); - - pas_book_queue_remove_card (book, (const char *) id); -} - -static void -impl_Evolution_Book_modify_card (PortableServer_Servant servant, - const Evolution_VCard vcard, - CORBA_Environment *ev) -{ - PASBook *book = PAS_BOOK (bonobo_object_from_servant (servant)); - - pas_book_queue_modify_card (book, (const char *) vcard); -} - -static void -impl_Evolution_Book_get_cursor (PortableServer_Servant servant, - const CORBA_char *search, - CORBA_Environment *ev) -{ - PASBook *book = PAS_BOOK (bonobo_object_from_servant (servant)); - - pas_book_queue_get_cursor (book, search); -} - -static void -impl_Evolution_Book_get_book_view (PortableServer_Servant servant, - const Evolution_BookViewListener listener, - const CORBA_char *search, - CORBA_Environment *ev) -{ - PASBook *book = PAS_BOOK (bonobo_object_from_servant (servant)); - - pas_book_queue_get_book_view (book, listener, search); -} - -static void -impl_Evolution_Book_check_connection (PortableServer_Servant servant, - CORBA_Environment *ev) -{ - PASBook *book = PAS_BOOK (bonobo_object_from_servant (servant)); - - pas_book_queue_check_connection (book); -} - -/** - * pas_book_get_backend: - */ -PASBackend * -pas_book_get_backend (PASBook *book) -{ - g_return_val_if_fail (book != NULL, NULL); - g_return_val_if_fail (PAS_IS_BOOK (book), NULL); - - return book->priv->backend; -} - -/** - * pas_book_get_listener: - */ -Evolution_BookListener -pas_book_get_listener (PASBook *book) -{ - g_return_val_if_fail (book != NULL, CORBA_OBJECT_NIL); - g_return_val_if_fail (PAS_IS_BOOK (book), CORBA_OBJECT_NIL); - - return book->priv->listener; -} - -/** - * pas_book_check_pending - */ -gint -pas_book_check_pending (PASBook *book) -{ - g_return_val_if_fail (book != NULL, -1); - g_return_val_if_fail (PAS_IS_BOOK (book), -1); - - return g_list_length (book->priv->request_queue); -} - -/** - * pas_book_pop_request: - */ -PASRequest * -pas_book_pop_request (PASBook *book) -{ - GList *popped; - PASRequest *req; - - g_return_val_if_fail (book != NULL, NULL); - g_return_val_if_fail (PAS_IS_BOOK (book), NULL); - - if (book->priv->request_queue == NULL) - return NULL; - - req = book->priv->request_queue->data; - - popped = book->priv->request_queue; - book->priv->request_queue = - g_list_remove_link (book->priv->request_queue, popped); - - g_list_free_1 (popped); - - return req; -} - -/** - * pas_book_respond_open: - */ -void -pas_book_respond_open (PASBook *book, - Evolution_BookListener_CallStatus status) -{ - CORBA_Environment ev; - - CORBA_exception_init (&ev); - - if (status == Evolution_BookListener_Success) { - Evolution_BookListener_respond_open_book ( - book->priv->listener, status, - bonobo_object_corba_objref (BONOBO_OBJECT (book)), - &ev); - } else { - Evolution_BookListener_respond_open_book ( - book->priv->listener, status, - CORBA_OBJECT_NIL, &ev); - } - - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("pas_book_respond_open: Exception " - "responding to BookListener!\n"); - } - - CORBA_exception_free (&ev); -} - -/** - * pas_book_respond_create: - */ -void -pas_book_respond_create (PASBook *book, - Evolution_BookListener_CallStatus status, - const char *id) -{ - CORBA_Environment ev; - - CORBA_exception_init (&ev); - - Evolution_BookListener_respond_create_card ( - book->priv->listener, status, (char *)id, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("pas_book_respond_create: Exception " - "responding to BookListener!\n"); - } - - CORBA_exception_free (&ev); -} - -/** - * pas_book_respond_remove: - */ -void -pas_book_respond_remove (PASBook *book, - Evolution_BookListener_CallStatus status) -{ - CORBA_Environment ev; - - CORBA_exception_init (&ev); - - Evolution_BookListener_respond_remove_card ( - book->priv->listener, status, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("pas_book_respond_remove: Exception " - "responding to BookListener!\n"); - } - - CORBA_exception_free (&ev); -} - -/** - * pas_book_respond_modify: - */ -void -pas_book_respond_modify (PASBook *book, - Evolution_BookListener_CallStatus status) -{ - CORBA_Environment ev; - - CORBA_exception_init (&ev); - - Evolution_BookListener_respond_modify_card ( - book->priv->listener, status, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("pas_book_respond_modify: Exception " - "responding to BookListener!\n"); - } - - CORBA_exception_free (&ev); -} - -/** - * pas_book_respond_get_cursor: - */ -void -pas_book_respond_get_cursor (PASBook *book, - Evolution_BookListener_CallStatus status, - PASCardCursor *cursor) -{ - CORBA_Environment ev; - CORBA_Object object; - - CORBA_exception_init (&ev); - - object = bonobo_object_corba_objref(BONOBO_OBJECT(cursor)); - - Evolution_BookListener_respond_get_cursor ( - book->priv->listener, status, object, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("pas_book_respond_get_cursor: Exception " - "responding to BookListener!\n"); - } - - CORBA_exception_free (&ev); -} - -/** - * pas_book_respond_get_cursor: - */ -void -pas_book_respond_get_book_view (PASBook *book, - Evolution_BookListener_CallStatus status, - PASBookView *book_view) -{ - CORBA_Environment ev; - CORBA_Object object; - - CORBA_exception_init (&ev); - - object = bonobo_object_corba_objref(BONOBO_OBJECT(book_view)); - - Evolution_BookListener_respond_get_view ( - book->priv->listener, status, object, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("pas_book_respond_get_book_view: Exception " - "responding to BookListener!\n"); - } - - CORBA_exception_free (&ev); -} - -/** - * pas_book_report_connection: - */ -void -pas_book_report_connection (PASBook *book, - gboolean connected) -{ - CORBA_Environment ev; - - CORBA_exception_init (&ev); - - Evolution_BookListener_report_connection_status ( - book->priv->listener, (CORBA_boolean) connected, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("pas_book_report_connection: Exception " - "responding to BookListener!\n"); - } - - CORBA_exception_free (&ev); -} - -static gboolean -pas_book_construct (PASBook *book, - PASBackend *backend, - Evolution_BookListener listener, - PASBookGetVCardFn get_vcard, - PASBookCanWriteFn can_write, - PASBookCanWriteCardFn can_write_card) -{ - POA_Evolution_Book *servant; - CORBA_Environment ev; - CORBA_Object obj; - - g_assert (book != NULL); - g_assert (PAS_IS_BOOK (book)); - g_assert (listener != CORBA_OBJECT_NIL); - g_assert (get_vcard != NULL); - g_assert (can_write != NULL); - g_assert (can_write_card != NULL); - - servant = (POA_Evolution_Book *) g_new0 (BonoboObjectServant, 1); - servant->vepv = &pas_book_vepv; - - CORBA_exception_init (&ev); - - POA_Evolution_Book__init ((PortableServer_Servant) servant, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_free (servant); - CORBA_exception_free (&ev); - - return FALSE; - } - - CORBA_exception_free (&ev); - - obj = bonobo_object_activate_servant (BONOBO_OBJECT (book), servant); - if (obj == CORBA_OBJECT_NIL) { - g_free (servant); - - return FALSE; - } - - bonobo_object_construct (BONOBO_OBJECT (book), obj); - - CORBA_exception_init (&ev); - book->priv->listener = CORBA_Object_duplicate (listener, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) - g_message ("pas_book_construct(): could not duplicate the listener"); - - CORBA_exception_free (&ev); - - book->priv->listener = listener; - book->priv->get_vcard = get_vcard; - book->priv->can_write = can_write; - book->priv->can_write_card = can_write_card; - book->priv->backend = backend; - - return TRUE; -} - -/** - * pas_book_new: - */ -PASBook * -pas_book_new (PASBackend *backend, - Evolution_BookListener listener, - PASBookGetVCardFn get_vcard, - PASBookCanWriteFn can_write, - PASBookCanWriteCardFn can_write_card) -{ - PASBook *book; - - g_return_val_if_fail (listener != CORBA_OBJECT_NIL, NULL); - g_return_val_if_fail (get_vcard != NULL, NULL); - - book = gtk_type_new (pas_book_get_type ()); - - if (! pas_book_construct (book, backend, listener, - get_vcard, can_write, can_write_card)) { - gtk_object_unref (GTK_OBJECT (book)); - - return NULL; - } - - return book; -} - -static void -pas_book_destroy (GtkObject *object) -{ - PASBook *book = PAS_BOOK (object); - GList *l; - CORBA_Environment ev; - - for (l = book->priv->request_queue; l != NULL; l = l->next) { - PASRequest *req = l->data; - - g_free (req->id); - g_free (req->vcard); - g_free (req); - } - g_list_free (book->priv->request_queue); - - CORBA_exception_init (&ev); - CORBA_Object_release (book->priv->listener, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) - g_message ("pas_book_construct(): could not release the listener"); - - CORBA_exception_free (&ev); - - g_free (book->priv); - - GTK_OBJECT_CLASS (pas_book_parent_class)->destroy (object); -} - -static POA_Evolution_Book__epv * -pas_book_get_epv (void) -{ - POA_Evolution_Book__epv *epv; - - epv = g_new0 (POA_Evolution_Book__epv, 1); - - epv->get_vcard = impl_Evolution_Book_get_vcard; - epv->can_write = impl_Evolution_Book_can_write; - epv->can_write_card = impl_Evolution_Book_can_write_card; - epv->create_card = impl_Evolution_Book_create_card; - epv->remove_card = impl_Evolution_Book_remove_card; - epv->modify_card = impl_Evolution_Book_modify_card; - epv->check_connection = impl_Evolution_Book_check_connection; - epv->get_cursor = impl_Evolution_Book_get_cursor; - epv->get_book_view = impl_Evolution_Book_get_book_view; - - return epv; - -} - -static void -pas_book_corba_class_init (void) -{ - pas_book_vepv.Bonobo_Unknown_epv = bonobo_object_get_epv (); - pas_book_vepv.Evolution_Book_epv = pas_book_get_epv (); -} - -static void -pas_book_class_init (PASBookClass *klass) -{ - GtkObjectClass *object_class = (GtkObjectClass *) klass; - - pas_book_parent_class = gtk_type_class (bonobo_object_get_type ()); - - pas_book_signals [REQUESTS_QUEUED] = - gtk_signal_new ("requests_queued", - GTK_RUN_LAST, - object_class->type, - GTK_SIGNAL_OFFSET (PASBookClass, requests_queued), - gtk_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); - - gtk_object_class_add_signals (object_class, pas_book_signals, LAST_SIGNAL); - - object_class->destroy = pas_book_destroy; - - pas_book_corba_class_init (); -} - -static void -pas_book_init (PASBook *book) -{ - book->priv = g_new0 (PASBookPrivate, 1); - book->priv->idle_id = 0; - book->priv->request_queue = NULL; -} - -/** - * pas_book_get_type: - */ -GtkType -pas_book_get_type (void) -{ - static GtkType type = 0; - - if (! type) { - GtkTypeInfo info = { - "PASBook", - sizeof (PASBook), - sizeof (PASBookClass), - (GtkClassInitFunc) pas_book_class_init, - (GtkObjectInitFunc) pas_book_init, - NULL, /* reserved 1 */ - NULL, /* reserved 2 */ - (GtkClassInitFunc) NULL - }; - - type = gtk_type_unique (bonobo_object_get_type (), &info); - } - - return type; -} - diff --git a/addressbook/backend/pas/pas-book.h b/addressbook/backend/pas/pas-book.h deleted file mode 100644 index 43a94b6600..0000000000 --- a/addressbook/backend/pas/pas-book.h +++ /dev/null @@ -1,98 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * A wrapper object which exports the Evolution_Book CORBA interface - * and which maintains a request queue. - * - * Author: - * Nat Friedman (nat@helixcode.com) - * - * Copyright 2000, Helix Code, Inc. - */ - -#ifndef __PAS_BOOK_H__ -#define __PAS_BOOK_H__ - -#include -#include -#include -#include - -typedef struct _PASBook PASBook; -typedef struct _PASBookPrivate PASBookPrivate; - -#include -#include - -typedef enum { - CreateCard, - RemoveCard, - ModifyCard, - GetCursor, - GetBookView, - CheckConnection -} PASOperation; - -typedef struct { - PASOperation op; - char *id; - char *vcard; - char *search; - Evolution_BookViewListener listener; -} PASRequest; - -struct _PASBook { - BonoboObject parent_object; - PASBookPrivate *priv; -}; - -typedef struct { - BonoboObjectClass parent_class; - - /* Signals */ - void (*requests_queued) (void); -} PASBookClass; - -typedef char * (*PASBookGetVCardFn) (PASBook *book, const char *id); -typedef gboolean (*PASBookCanWriteFn) (PASBook *book); -typedef gboolean (*PASBookCanWriteCardFn) (PASBook *book, const char *id); - -PASBook *pas_book_new (PASBackend *backend, - Evolution_BookListener listener, - PASBookGetVCardFn get_vcard, - PASBookCanWriteFn can_write, - PASBookCanWriteCardFn can_write_card); -PASBackend *pas_book_get_backend (PASBook *book); -Evolution_BookListener pas_book_get_listener (PASBook *book); -int pas_book_check_pending (PASBook *book); -PASRequest *pas_book_pop_request (PASBook *book); - -void pas_book_respond_open (PASBook *book, - Evolution_BookListener_CallStatus status); -void pas_book_respond_create (PASBook *book, - Evolution_BookListener_CallStatus status, - const char *id); -void pas_book_respond_remove (PASBook *book, - Evolution_BookListener_CallStatus status); -void pas_book_respond_modify (PASBook *book, - Evolution_BookListener_CallStatus status); -void pas_book_respond_get_cursor (PASBook *book, - Evolution_BookListener_CallStatus status, - PASCardCursor *cursor); -void pas_book_respond_get_book_view (PASBook *book, - Evolution_BookListener_CallStatus status, - PASBookView *book_view); -void pas_book_report_connection (PASBook *book, - gboolean connected); - -gboolean pas_book_can_write (PASBook *book); -gboolean pas_book_can_write_card (PASBook *book, - const char *id); -GtkType pas_book_get_type (void); - -#define PAS_BOOK_TYPE (pas_book_get_type ()) -#define PAS_BOOK(o) (GTK_CHECK_CAST ((o), PAS_BOOK_TYPE, PASBook)) -#define PAS_BOOK_CLASS(k) (GTK_CHECK_CLASS_CAST((k), PAS_BOOK_FACTORY_TYPE, PASBookClass)) -#define PAS_IS_BOOK(o) (GTK_CHECK_TYPE ((o), PAS_BOOK_TYPE)) -#define PAS_IS_BOOK_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), PAS_BOOK_TYPE)) - -#endif /* ! __PAS_BOOK_H__ */ diff --git a/addressbook/backend/pas/pas-card-cursor.c b/addressbook/backend/pas/pas-card-cursor.c deleted file mode 100644 index c2bbe1c9b0..0000000000 --- a/addressbook/backend/pas/pas-card-cursor.c +++ /dev/null @@ -1,227 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * pas-card-cursor.c: Implements card cursors. - * - * Author: - * Christopher James Lahey -#include -#include "addressbook.h" -#include "pas-card-cursor.h" - -struct _PASCardCursorPrivate { - long (*get_length) (PASCardCursor *cursor, gpointer data); - char * (*get_nth) (PASCardCursor *cursor, long n, gpointer data); - gpointer data; -}; - -/* - * A pointer to our parent object class - */ -static BonoboObjectClass *parent_class; - -/* - * The VEPV for the CardCursor object - */ -static POA_Evolution_CardCursor__vepv cursor_vepv; - -/* - * Implemented GtkObject::destroy - */ -static void -pas_card_cursor_destroy (GtkObject *object) -{ - PASCardCursor *cursor = PAS_CARD_CURSOR (object); - - if ( cursor->priv ) - g_free ( cursor->priv ); - - GTK_OBJECT_CLASS (parent_class)->destroy (object); -} - -/* - * CORBA Demo::Echo::echo method implementation - */ -static CORBA_long -impl_pas_card_cursor_get_length (PortableServer_Servant servant, - CORBA_Environment *ev) -{ - PASCardCursor *cursor = PAS_CARD_CURSOR (bonobo_object_from_servant (servant)); - if ( cursor->priv->get_length ) - return cursor->priv->get_length( cursor, cursor->priv->data ); - else - return 0; -} - -/* - * CORBA Demo::Echo::echo method implementation - */ -static char * -impl_pas_card_cursor_get_nth (PortableServer_Servant servant, - const CORBA_long n, - CORBA_Environment *ev) -{ - PASCardCursor *cursor = PAS_CARD_CURSOR (bonobo_object_from_servant (servant)); - if ( cursor->priv->get_nth ) { - char *vcard = cursor->priv->get_nth( cursor, n, cursor->priv->data ); - char *retval = CORBA_string_dup (vcard); - g_free (vcard); - return retval; - } else - return CORBA_string_dup (""); -} - -/* - * If you want users to derive classes from your implementation - * you need to support this method. - */ -POA_Evolution_CardCursor__epv * -pas_card_cursor_get_epv (void) -{ - POA_Evolution_CardCursor__epv *epv; - - epv = g_new0 (POA_Evolution_CardCursor__epv, 1); - - /* - * This is the method invoked by CORBA - */ - epv->get_length = impl_pas_card_cursor_get_length; - epv->get_nth = impl_pas_card_cursor_get_nth; - - return epv; -} - -static void -init_pas_card_cursor_corba_class (void) -{ - cursor_vepv.Bonobo_Unknown_epv = bonobo_object_get_epv (); - cursor_vepv.Evolution_CardCursor_epv = pas_card_cursor_get_epv (); -} - -static void -pas_card_cursor_class_init (PASCardCursorClass *klass) -{ - GtkObjectClass *object_class = (GtkObjectClass *) klass; - - parent_class = gtk_type_class (bonobo_object_get_type ()); - - object_class->destroy = pas_card_cursor_destroy; - - init_pas_card_cursor_corba_class (); -} - -static void -pas_card_cursor_init (PASCardCursor *cursor) -{ - cursor->priv = g_new(PASCardCursorPrivate, 1); - cursor->priv->get_length = NULL; - cursor->priv->get_nth = NULL; - cursor->priv->data = NULL; -} - -GtkType -pas_card_cursor_get_type (void) -{ - static GtkType type = 0; - - if (!type){ - GtkTypeInfo info = { - "PASCardCursor", - sizeof (PASCardCursor), - sizeof (PASCardCursorClass), - (GtkClassInitFunc) pas_card_cursor_class_init, - (GtkObjectInitFunc) pas_card_cursor_init, - NULL, /* reserved 1 */ - NULL, /* reserved 2 */ - (GtkClassInitFunc) NULL - }; - - type = gtk_type_unique (bonobo_object_get_type (), &info); - } - - return type; -} - -PASCardCursor * -pas_card_cursor_construct (PASCardCursor *cursor, - Evolution_CardCursor corba_cursor, - PASCardCursorLengthFunc get_length, - PASCardCursorNthFunc get_nth, - gpointer data) -{ - g_return_val_if_fail (cursor != NULL, NULL); - g_return_val_if_fail (PAS_IS_CARD_CURSOR (cursor), NULL); - g_return_val_if_fail (corba_cursor != CORBA_OBJECT_NIL, NULL); - - /* - * Call parent constructor - */ - if (!bonobo_object_construct (BONOBO_OBJECT (cursor), (CORBA_Object) corba_cursor)) - return NULL; - - /* - * Initialize cursor - */ - cursor->priv->get_length = get_length; - cursor->priv->get_nth = get_nth; - cursor->priv->data = data; - - /* - * Success: return the GtkType we were given - */ - return cursor; -} - -/* - * This routine creates the ORBit CORBA server and initializes the - * CORBA side of things - */ -static Evolution_CardCursor -create_cursor (BonoboObject *cursor) -{ - POA_Evolution_CardCursor *servant; - CORBA_Environment ev; - - servant = (POA_Evolution_CardCursor *) g_new0 (BonoboObjectServant, 1); - servant->vepv = &cursor_vepv; - - CORBA_exception_init (&ev); - POA_Evolution_CardCursor__init ((PortableServer_Servant) servant, &ev); - if (ev._major != CORBA_NO_EXCEPTION){ - g_free (servant); - CORBA_exception_free (&ev); - return CORBA_OBJECT_NIL; - } - - CORBA_exception_free (&ev); - - /* - * Activates the CORBA object. - */ - return (Evolution_CardCursor) bonobo_object_activate_servant (cursor, servant); -} - -PASCardCursor * -pas_card_cursor_new (PASCardCursorLengthFunc get_length, - PASCardCursorNthFunc get_nth, - gpointer data) -{ - PASCardCursor *cursor; - Evolution_CardCursor corba_cursor; - - cursor = gtk_type_new (pas_card_cursor_get_type ()); - corba_cursor = create_cursor (BONOBO_OBJECT (cursor)); - - if (corba_cursor == CORBA_OBJECT_NIL){ - gtk_object_unref (GTK_OBJECT (cursor)); - return NULL; - } - - return pas_card_cursor_construct (cursor, - corba_cursor, - get_length, - get_nth, - data); -} diff --git a/addressbook/backend/pas/pas-card-cursor.h b/addressbook/backend/pas/pas-card-cursor.h deleted file mode 100644 index 300e3e3ce1..0000000000 --- a/addressbook/backend/pas/pas-card-cursor.h +++ /dev/null @@ -1,58 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * - * Author: - * Nat Friedman (nat@helixcode.com) - * - * Copyright 2000, Helix Code, Inc. - */ - -#ifndef __PAS_CARD_CURSOR_H__ -#define __PAS_CARD_CURSOR_H__ - -#include -#include -#include - -BEGIN_GNOME_DECLS - -typedef struct _PASCardCursor PASCardCursor; -typedef struct _PASCardCursorPrivate PASCardCursorPrivate; -typedef struct _PASCardCursorClass PASCardCursorClass; - -typedef long (*PASCardCursorLengthFunc) (PASCardCursor *cursor, gpointer data); -typedef char * (*PASCardCursorNthFunc) (PASCardCursor *cursor, long n, gpointer data); - -struct _PASCardCursor { - BonoboObject parent; - PASCardCursorPrivate *priv; -}; - -struct _PASCardCursorClass { - BonoboObjectClass parent; -}; - -/* Creating a new addressbook. */ -PASCardCursor *pas_card_cursor_new (PASCardCursorLengthFunc get_length, - PASCardCursorNthFunc get_nth, - gpointer data); -PASCardCursor *pas_card_cursor_construct (PASCardCursor *cursor, - Evolution_CardCursor corba_cursor, - PASCardCursorLengthFunc get_length, - PASCardCursorNthFunc get_nth, - gpointer data); - -GtkType pas_card_cursor_get_type (void); -POA_Evolution_CardCursor__epv * - pas_card_cursor_get_epv (void); - -/* Fetching cards. */ -#define PAS_CARD_CURSOR_TYPE (pas_card_cursor_get_type ()) -#define PAS_CARD_CURSOR(o) (GTK_CHECK_CAST ((o), PAS_CARD_CURSOR_TYPE, PASCardCursor)) -#define PAS_CARD_CURSOR_CLASS(k) (GTK_CHECK_CLASS_CAST((k), PAS_CARD_CURSOR_TYPE, PASCardCursorClass)) -#define PAS_IS_CARD_CURSOR(o) (GTK_CHECK_TYPE ((o), PAS_CARD_CURSOR_TYPE)) -#define PAS_IS_CARD_CURSOR_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), PAS_CARD_CURSOR_TYPE)) - -END_GNOME_DECLS - -#endif /* ! __PAS_CARD_CURSOR_H__ */ diff --git a/addressbook/contact-editor/.cvsignore b/addressbook/contact-editor/.cvsignore deleted file mode 100644 index 6fd0b5075c..0000000000 --- a/addressbook/contact-editor/.cvsignore +++ /dev/null @@ -1,8 +0,0 @@ -.deps -.libs -.pure -Makefile -Makefile.in -*.lo -*.la -contact-editor-test diff --git a/addressbook/contact-editor/Makefile.am b/addressbook/contact-editor/Makefile.am deleted file mode 100644 index c723ead970..0000000000 --- a/addressbook/contact-editor/Makefile.am +++ /dev/null @@ -1,55 +0,0 @@ -CPPFLAGS = \ - -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \ - -DDATADIR=\""$(datadir)"\" - -INCLUDES = \ - $(GNOME_INCLUDEDIR) \ - -I$(top_srcdir) \ - -I$(top_srcdir)/addressbook/ \ - -I$(top_srcdir)/addressbook/backend \ - -I$(top_srcdir)/widgets/e-table \ - -DG_LOG_DOMAIN=\"contact-editor\" - -noinst_LIBRARIES = \ - libecontacteditor.a - -libecontacteditor_a_SOURCES = \ - e-contact-editor-categories.c \ - e-contact-editor-categories.h \ - e-contact-editor-fullname.c \ - e-contact-editor-fullname.h \ - e-contact-editor.c \ - e-contact-editor.h \ - e-contact-save-as.c \ - e-contact-save-as.h - -noinst_PROGRAMS = \ - contact-editor-test - -contact_editor_test_SOURCES = \ - test-editor.c - -contact_editor_test_LDADD = \ - $(top_builddir)/addressbook/backend/ebook/libebook.la \ - $(top_builddir)/addressbook/ename/libename.la \ - $(top_builddir)/libversit/libversit.la \ - $(GNOMEGNORBA_LIBS) \ - -lbonobo \ - $(top_builddir)/e-util/libeutil.la \ - libecontacteditor.a \ - $(top_builddir)/widgets/e-table/libetable.a \ - $(top_builddir)/e-util/libeutil.la \ - $(top_builddir)/widgets/e-text/libetext.a \ - $(EXTRA_GNOME_LIBS) - -gladedir = $(datadir)/evolution/glade - -glade_DATA = \ - contact-editor.glade \ - fullname.glade \ - categories.glade - -EXTRA_DIST = $(glade_DATA) \ - e-contact-editor-strings.h \ - fullname-strings.h \ - categories-strings.h diff --git a/addressbook/contact-editor/arrow.png b/addressbook/contact-editor/arrow.png deleted file mode 100644 index b102356c78..0000000000 Binary files a/addressbook/contact-editor/arrow.png and /dev/null differ diff --git a/addressbook/contact-editor/briefcase.png b/addressbook/contact-editor/briefcase.png deleted file mode 100644 index dd59b8fd39..0000000000 Binary files a/addressbook/contact-editor/briefcase.png and /dev/null differ diff --git a/addressbook/contact-editor/categories-strings.h b/addressbook/contact-editor/categories-strings.h deleted file mode 100644 index 813018a00e..0000000000 --- a/addressbook/contact-editor/categories-strings.h +++ /dev/null @@ -1,9 +0,0 @@ -/* - * Translatable strings file generated by Glade. - * Add this file to your project's POTFILES.in. - * DO NOT compile it as part of your application. - */ - -gchar *s = N_("categories"); -gchar *s = N_("Item(s) belong to these categories:"); -gchar *s = N_("Available Categories:"); diff --git a/addressbook/contact-editor/categories.glade b/addressbook/contact-editor/categories.glade deleted file mode 100644 index bf78008940..0000000000 --- a/addressbook/contact-editor/categories.glade +++ /dev/null @@ -1,190 +0,0 @@ - - - - - categories - categories - - src - pixmaps - C - True - False - False - False - False - False - False - interface.c - interface.h - callbacks.c - callbacks.h - support.c - support.h - True - categories-strings.h - - - - GnomeDialog - categories - True - False - categories - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - False - True - False - False - False - - - GtkVBox - GnomeDialog:vbox - dialog-vbox1 - True - False - 8 - - 4 - True - True - - - - GtkTable - table-categories - True - 4 - 1 - False - 0 - 0 - - 0 - True - True - - - - GtkAccelLabel - accellabel1 - True - - GTK_JUSTIFY_LEFT - False - 0 - 0.5 - 0 - 0 - - 0 - 1 - 0 - 1 - 0 - 0 - False - False - False - False - True - True - - - - - GtkAccelLabel - accellabel2 - True - - GTK_JUSTIFY_LEFT - False - 0 - 0.5 - 0 - 0 - - 0 - 1 - 2 - 3 - 0 - 0 - False - False - False - False - True - True - - - - - GtkEntry - entry-categories - True - True - True - True - 0 - - - 0 - 1 - 1 - 2 - 0 - 0 - True - False - False - False - True - False - - - - - - GtkHButtonBox - GnomeDialog:action_area - dialog-action_area1 - True - GTK_BUTTONBOX_END - 8 - 85 - 27 - 7 - 0 - - 0 - False - True - GTK_PACK_END - - - - GtkButton - button1 - True - True - True - GNOME_STOCK_BUTTON_OK - - - - GtkButton - button3 - True - True - True - GNOME_STOCK_BUTTON_CANCEL - - - - - - diff --git a/addressbook/contact-editor/contact-editor.glade b/addressbook/contact-editor/contact-editor.glade deleted file mode 100644 index af77945c56..0000000000 --- a/addressbook/contact-editor/contact-editor.glade +++ /dev/null @@ -1,2416 +0,0 @@ - - - - - Contact-editor - contact-editor - - src - pixmaps - C - True - True - True - False - False - False - False - interface.c - interface.h - callbacks.c - callbacks.h - support.c - support.h - True - e-contact-editor-strings.h - - - - GtkWindow - contact editor - True - False - Contact Editor - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - False - True - False - - - GtkNotebook - notebook-contact-editor - True - True - True - True - GTK_POS_TOP - False - 2 - 2 - False - - - GtkTable - table-contact-editor-general - 7 - True - 14 - 8 - False - 4 - 4 - - - GtkEntry - entry-phone1 - True - True - True - True - 0 - - - 7 - 8 - 0 - 1 - 0 - 0 - True - False - False - False - True - False - - - - - GtkEntry - entry-phone2 - True - True - True - True - 0 - - - 7 - 8 - 1 - 2 - 0 - 0 - True - False - False - False - True - False - - - - - GtkEntry - entry-phone3 - True - True - True - True - 0 - - - 7 - 8 - 2 - 3 - 0 - 0 - True - False - False - False - True - False - - - - - GtkEntry - entry-phone4 - True - True - True - True - 0 - - - 7 - 8 - 3 - 4 - 0 - 0 - True - False - False - False - True - False - - - - - GtkText - text-address - 1 - 1 - True - True - True - - - 7 - 8 - 5 - 9 - 0 - 0 - True - False - False - False - True - True - - - - - GtkButton - button-fullname - True - True - - - 1 - 3 - 0 - 1 - 0 - 0 - False - False - False - False - True - True - - - - - GtkAccelLabel - accellabel-company - True - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 1 - 3 - 2 - 3 - 0 - 0 - False - False - False - False - True - True - - - - - GtkAccelLabel - accellabel-fileas - True - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 1 - 3 - 3 - 4 - 0 - 0 - False - False - False - False - True - True - - - - - GtkAccelLabel - accellabel-web - True - - GTK_JUSTIFY_LEFT - False - 0 - 0.5 - 0 - 0 - - 1 - 3 - 8 - 9 - 0 - 0 - False - False - False - False - True - True - - - - - GtkAlignment - alignment3 - True - 1 - 0.5 - 0 - 1 - - 2 - 3 - 5 - 6 - 0 - 0 - False - False - False - False - True - True - - - - GtkButton - button-email1 - True - - - Placeholder - - - - - - GtkAlignment - alignment5 - True - 1 - 0.5 - 0 - 0 - - 6 - 7 - 3 - 4 - 0 - 0 - False - False - False - False - True - True - - - - GtkButton - button-phone4 - True - - - Placeholder - - - - - - GtkAlignment - alignment7 - True - 1 - 0.5 - 0 - 0 - - 6 - 7 - 1 - 2 - 0 - 0 - False - False - False - False - True - True - - - - GtkButton - button-phone2 - True - - - Placeholder - - - - - - GtkAlignment - alignment8 - True - 1 - 0.5 - 0 - 0 - - 6 - 7 - 0 - 1 - 0 - 0 - False - False - False - False - True - True - - - - GtkButton - button-phone1 - True - - - Placeholder - - - - - - GtkHSeparator - hseparator4 - True - - 4 - 8 - 4 - 5 - 0 - 2 - True - False - False - False - True - False - - - - - GtkAlignment - alignment6 - True - 1 - 0.5 - 0 - 0 - - 6 - 7 - 2 - 3 - 0 - 0 - False - False - False - False - True - True - - - - GtkButton - button-phone3 - True - - - Placeholder - - - - - - GtkEntry - entry-fullname - True - True - True - True - 0 - - - 3 - 4 - 0 - 1 - 0 - 0 - True - False - False - False - True - False - - - - - GtkEntry - entry-jobtitle - True - True - True - True - 0 - - - 3 - 4 - 1 - 2 - 0 - 0 - True - False - False - False - True - False - - - - - GtkEntry - entry-company - True - True - True - True - 0 - - - 3 - 4 - 2 - 3 - 0 - 0 - True - False - False - False - True - False - - - - - GtkEntry - entry-email1 - True - True - True - True - 0 - - - 3 - 4 - 5 - 6 - 0 - 0 - True - False - False - False - True - False - - - - - GtkEntry - entry-web - True - True - True - True - 0 - - - 3 - 4 - 8 - 9 - 0 - 0 - True - False - False - False - True - False - - - - - GtkHSeparator - hseparator5 - True - - 0 - 4 - 4 - 5 - 0 - 2 - True - False - False - False - True - False - - - - - GtkCombo - combo-file-as - True - False - True - True - True - False - - - 3 - 4 - 3 - 4 - 0 - 0 - True - False - False - False - True - False - - - - GtkEntry - GtkCombo:entry - entry-file-as - True - True - True - True - 0 - - - - - - GtkHSeparator - hseparator6 - True - - 0 - 4 - 7 - 8 - 0 - 2 - True - False - False - False - True - True - - - - - GtkAlignment - alignment10 - True - 0.5 - 0 - 1 - 1 - - 3 - 4 - 6 - 7 - 0 - 0 - True - False - True - True - True - True - - - - GtkCheckButton - checkbutton-htmlmail - True - - False - True - - - - - GtkAlignment - alignment4 - True - 1 - 0.5 - 0 - 0 - - 6 - 7 - 5 - 6 - 0 - 0 - False - False - False - False - True - True - - - - GtkButton - button-address - True - - - Placeholder - - - - - - GtkLabel - address-label - True - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - text-address - - 5 - 7 - 6 - 7 - 0 - 0 - False - False - False - False - True - True - - - - - GtkEventBox - eventbox1 - True - - 5 - 6 - 0 - 1 - 0 - 0 - False - False - False - False - True - True - - - - GtkLabel - label-phone1 - True - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - entry-phone1 - - - - - GtkEventBox - eventbox2 - True - - 5 - 6 - 1 - 2 - 0 - 0 - False - False - False - False - True - True - - - - GtkLabel - label-phone2 - True - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - entry-phone2 - - - - - GtkEventBox - eventbox3 - True - - 5 - 6 - 2 - 3 - 0 - 0 - False - False - False - False - True - True - - - - GtkLabel - label-phone3 - True - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - entry-phone3 - - - - - GtkEventBox - eventbox4 - True - - 5 - 6 - 3 - 4 - 0 - 0 - False - False - False - False - True - True - - - - GtkLabel - label-phone4 - True - - GTK_JUSTIFY_LEFT - False - 0 - 0.5 - 0 - 0 - entry-phone4 - - - - - GtkEventBox - eventbox5 - True - - 1 - 2 - 5 - 6 - 0 - 0 - False - False - False - False - True - True - - - - GtkLabel - label-email1 - True - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - entry-email1 - - - - - GtkEventBox - eventbox-business - True - - 5 - 6 - 5 - 6 - 0 - 0 - False - False - False - False - True - True - - - - GtkLabel - label-address - True - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - text-address - - - - - GtkAlignment - alignment2 - True - 0 - 0 - 0 - 0 - - 7 - 8 - 9 - 10 - 0 - 0 - True - False - False - False - True - True - - - - GtkCheckButton - checkbutton-mailingaddress - True - - False - True - - - - - GtkHSeparator - hseparator9 - True - - 0 - 4 - 11 - 12 - 0 - 2 - True - False - False - False - True - True - - - - - GtkHSeparator - hseparator10 - True - - 4 - 8 - 11 - 12 - 0 - 0 - True - False - False - False - True - True - - - - - GtkAlignment - alignment12 - True - 0.5 - 0.5 - 1 - 0 - - 1 - 3 - 12 - 13 - 0 - 0 - False - False - False - False - True - True - - - - GtkButton - button-contacts - True - True - - - - - - GtkAlignment - alignment15 - True - 0.5 - 0.5 - 1 - 0 - - 7 - 8 - 12 - 13 - 0 - 0 - True - False - False - False - True - True - - - - GtkEntry - entry-categories - True - True - True - True - 0 - - - - - - GtkAlignment - alignment14 - True - 0.5 - 0.5 - 1 - 0 - - 3 - 4 - 12 - 13 - 0 - 0 - True - False - False - False - True - True - - - - GtkEntry - entry-contacts - True - True - True - True - 0 - - - - - - GtkAlignment - alignment16 - True - 0.5 - 0.5 - 1 - 0 - - 5 - 7 - 12 - 13 - 0 - 0 - False - False - False - False - True - True - - - - GtkButton - button-categories - True - True - - - - - - GtkEventBox - eventbox7 - True - - 1 - 3 - 1 - 2 - 0 - 0 - False - False - False - False - True - True - - - - GtkAccelLabel - accellabel-jobtitle - True - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - - - - Custom - custom1 - True - e_create_image_widget - malehead.png - - 0 - 0 - Thu, 18 May 2000 12:19:47 GMT - - 0 - 1 - 0 - 4 - 0 - 0 - False - False - False - False - True - True - - - - - Custom - custom2 - True - e_create_image_widget - cellphone.png - - 0 - 0 - Thu, 18 May 2000 12:20:02 GMT - - 4 - 5 - 0 - 4 - 0 - 0 - False - False - False - False - True - True - - - - - Custom - custom3 - True - e_create_image_widget - envelope.png - - 0 - 0 - Thu, 18 May 2000 12:19:51 GMT - - 0 - 1 - 5 - 7 - 0 - 0 - False - False - False - False - True - True - - - - - Custom - custom4 - True - e_create_image_widget - house.png - - 0 - 0 - Thu, 18 May 2000 12:20:06 GMT - - 4 - 5 - 5 - 10 - 0 - 0 - False - False - False - False - True - True - - - - - Custom - custom5 - True - e_create_image_widget - evolution-contacts.png - - 0 - 0 - Thu, 18 May 2000 12:19:59 GMT - - 0 - 1 - 12 - 14 - 0 - 0 - False - False - False - False - True - True - - - - - Custom - custom6 - True - e_create_image_widget - briefcase.png - - 0 - 0 - Thu, 18 May 2000 12:20:09 GMT - - 4 - 5 - 12 - 14 - 0 - 0 - False - False - False - False - True - True - - - - - Custom - custom10 - True - e_create_image_widget - globe.png - - 0 - 0 - Thu, 18 May 2000 12:19:56 GMT - - 0 - 1 - 8 - 10 - 0 - 0 - False - False - False - False - True - True - - - - - - GtkLabel - Notebook:tab - label15 - True - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkTable - table-contact-editor-details - 7 - True - 9 - 6 - False - 4 - 4 - - - GtkLabel - label21 - True - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 1 - 2 - 0 - 1 - 0 - 0 - False - False - False - False - True - True - - - - - GtkLabel - label22 - True - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 1 - 2 - 1 - 2 - 0 - 0 - False - False - False - False - True - True - - - - - GtkLabel - label23 - True - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 1 - 2 - 2 - 3 - 0 - 0 - False - False - False - False - True - True - - - - - GtkLabel - label24 - True - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 1 - 2 - 4 - 5 - 0 - 0 - False - False - False - False - True - True - - - - - GtkLabel - label25 - True - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 1 - 2 - 5 - 6 - 0 - 0 - False - False - False - False - True - True - - - - - GtkLabel - label31 - True - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 3 - 4 - 4 - 5 - 0 - 0 - False - False - False - False - True - True - - - - - GtkLabel - label30 - True - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 3 - 4 - 1 - 2 - 0 - 0 - False - False - False - False - True - True - - - - - GtkLabel - label29 - True - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 3 - 4 - 0 - 1 - 0 - 0 - False - False - False - False - True - True - - - - - GtkLabel - label32 - True - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 3 - 4 - 5 - 6 - 0 - 0 - False - False - False - False - True - True - - - - - GtkEntry - entry-spouse - True - True - True - True - 0 - - - 2 - 3 - 5 - 6 - 0 - 0 - True - False - False - False - True - False - - - - - GtkEntry - entry-department - True - True - True - True - 0 - - - 2 - 3 - 0 - 1 - 0 - 0 - True - False - False - False - True - False - - - - - GtkEntry - entry-office - True - True - True - True - 0 - - - 2 - 3 - 1 - 2 - 0 - 0 - True - False - False - False - True - False - - - - - GtkEntry - entry-profession - True - True - True - True - 0 - - - 2 - 3 - 2 - 3 - 0 - 0 - True - False - False - False - True - False - - - - - GtkEntry - entry-nickname - True - True - True - True - 0 - - - 2 - 3 - 4 - 5 - 0 - 0 - True - False - False - False - True - False - - - - - GnomeDateEdit - dateedit-anniversary - True - False - False - False - 7 - 19 - - 4 - 6 - 5 - 6 - 0 - 0 - True - False - False - False - True - False - - - - - GnomeDateEdit - dateedit-birthday - True - False - False - False - 7 - 19 - - 4 - 6 - 4 - 5 - 0 - 0 - True - False - False - False - True - False - - - - - GtkEntry - entry-assistant - True - True - True - True - 0 - - - 4 - 6 - 1 - 2 - 0 - 0 - True - False - False - False - True - False - - - - - GtkEntry - entry-manager - True - True - True - True - 0 - - - 4 - 6 - 0 - 1 - 0 - 0 - True - False - False - False - True - False - - - - - GtkHSeparator - hseparator7 - True - - 0 - 6 - 3 - 4 - 0 - 2 - False - False - False - False - True - True - - - - - GtkLabel - label33 - True - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 1 - 2 - 7 - 8 - 0 - 0 - False - False - False - False - True - True - - - - - GtkHSeparator - hseparator8 - True - - 0 - 6 - 6 - 7 - 0 - 0 - True - False - False - False - True - True - - - - - Custom - custom7 - True - e_create_image_widget - briefcase.png - - 0 - 0 - Thu, 18 May 2000 12:20:13 GMT - - 0 - 1 - 0 - 2 - 0 - 0 - False - False - False - False - True - True - - - - - Custom - custom8 - True - e_create_image_widget - malehead.png - - 0 - 0 - Thu, 18 May 2000 12:20:16 GMT - - 0 - 1 - 4 - 6 - 0 - 0 - False - False - False - False - True - True - - - - - GtkScrolledWindow - scrolledwindow2 - True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - GTK_UPDATE_CONTINUOUS - GTK_UPDATE_CONTINUOUS - - 1 - 6 - 8 - 9 - 0 - 0 - True - True - False - False - True - True - - - - GtkText - text-comments - True - True - True - - - - - - Custom - custom9 - True - e_create_image_widget - globe.png - - 0 - 0 - Thu, 18 May 2000 12:20:19 GMT - - 0 - 1 - 7 - 9 - 0 - 0 - False - False - False - False - True - True - - - - - - GtkLabel - Notebook:tab - label16 - True - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - - - GnomeDialog - dialog2 - True - False - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - False - False - False - False - False - - - GtkVBox - GnomeDialog:vbox - dialog-vbox2 - True - False - 8 - - 4 - True - True - - - - GtkTable - table2 - True - 2 - 2 - False - 0 - 0 - - 0 - True - True - - - - GtkEntry - entry2 - True - True - True - True - 0 - - - 0 - 2 - 1 - 2 - 0 - 0 - True - False - False - False - True - False - - - - - GtkVBox - vbox1 - True - False - 0 - - 1 - 2 - 0 - 1 - 0 - 0 - False - True - False - False - True - True - - - - GtkButton - button31 - True - True - - - 0 - False - False - - - - - GtkButton - button32 - True - True - - - 0 - False - False - - - - - - GtkScrolledWindow - scrolledwindow1 - 200 - True - GTK_POLICY_ALWAYS - GTK_POLICY_ALWAYS - GTK_UPDATE_CONTINUOUS - GTK_UPDATE_CONTINUOUS - - 0 - 1 - 0 - 1 - 0 - 0 - True - True - False - False - True - True - - - - GtkCList - clist1 - True - True - 1 - 80 - GTK_SELECTION_SINGLE - True - GTK_SHADOW_NONE - - - GtkLabel - CList:title - label20 - True - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - - - - GtkHButtonBox - GnomeDialog:action_area - dialog-action_area2 - True - GTK_BUTTONBOX_END - 8 - 85 - 27 - 7 - 0 - - 0 - False - True - GTK_PACK_END - - - - GtkButton - button28 - True - True - True - GNOME_STOCK_BUTTON_OK - - - - GtkButton - button29 - True - True - True - GNOME_STOCK_BUTTON_APPLY - - - - GtkButton - button30 - True - True - True - GNOME_STOCK_BUTTON_CANCEL - - - - - - - GnomeDialog - dialog-add-phone - True - False - New phone type - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - False - False - False - False - False - - - GtkVBox - GnomeDialog:vbox - vbox2 - True - False - 8 - - 4 - True - True - - - - GtkFrame - frame-add-phone - 4 - True - - 0 - GTK_SHADOW_ETCHED_IN - - 0 - True - True - - - - GtkAlignment - alignment9 - 9 - True - 0.5 - 0.5 - 1 - 1 - - - GtkEntry - entry-add-phone - True - True - True - True - 0 - - - - - - - GtkHButtonBox - GnomeDialog:action_area - hbuttonbox1 - True - GTK_BUTTONBOX_END - 8 - 85 - 27 - 7 - 0 - - 0 - False - True - GTK_PACK_END - - - - GtkButton - button43 - True - True - True - - GNOME_STOCK_PIXMAP_ADD - - - - GtkButton - button44 - True - True - True - GNOME_STOCK_BUTTON_CANCEL - - - - - - diff --git a/addressbook/contact-editor/e-contact-editor-categories.c b/addressbook/contact-editor/e-contact-editor-categories.c deleted file mode 100644 index 831fbce2b9..0000000000 --- a/addressbook/contact-editor/e-contact-editor-categories.c +++ /dev/null @@ -1,466 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * e-contact-editor-categories.c - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include -#include -#include -#include -#include -#include -#include - -static void e_contact_editor_categories_init (EContactEditorCategories *card); -static void e_contact_editor_categories_class_init (EContactEditorCategoriesClass *klass); -static void e_contact_editor_categories_set_arg (GtkObject *o, GtkArg *arg, guint arg_id); -static void e_contact_editor_categories_get_arg (GtkObject *object, GtkArg *arg, guint arg_id); -static void e_contact_editor_categories_destroy (GtkObject *object); -static int e_contact_editor_categories_col_count (ETableModel *etc, gpointer data); -static int e_contact_editor_categories_row_count (ETableModel *etc, gpointer data); -static void *e_contact_editor_categories_value_at (ETableModel *etc, int col, int row, gpointer data); -static void e_contact_editor_categories_set_value_at (ETableModel *etc, int col, int row, const void *val, gpointer data); -static gboolean e_contact_editor_categories_is_cell_editable (ETableModel *etc, int col, int row, gpointer data); -static void *e_contact_editor_categories_duplicate_value (ETableModel *etc, int col, const void *value, gpointer data); -static void e_contact_editor_categories_free_value (ETableModel *etc, int col, void *value, gpointer data); -static void *e_contact_editor_categories_initialize_value (ETableModel *etc, int col, gpointer data); -static gboolean e_contact_editor_categories_value_is_empty (ETableModel *etc, int col, const void *value, gpointer data); -static void e_contact_editor_categories_thaw (ETableModel *etc, gpointer data); - -static GnomeDialogClass *parent_class = NULL; - -/* The arguments we take */ -enum { - ARG_0, - ARG_CATEGORIES -}; - -GtkType -e_contact_editor_categories_get_type (void) -{ - static GtkType contact_editor_categories_type = 0; - - if (!contact_editor_categories_type) - { - static const GtkTypeInfo contact_editor_categories_info = - { - "EContactEditorCategories", - sizeof (EContactEditorCategories), - sizeof (EContactEditorCategoriesClass), - (GtkClassInitFunc) e_contact_editor_categories_class_init, - (GtkObjectInitFunc) e_contact_editor_categories_init, - /* reserved_1 */ NULL, - /* reserved_2 */ NULL, - (GtkClassInitFunc) NULL, - }; - - contact_editor_categories_type = gtk_type_unique (gnome_dialog_get_type (), &contact_editor_categories_info); - } - - return contact_editor_categories_type; -} - -static void -e_contact_editor_categories_class_init (EContactEditorCategoriesClass *klass) -{ - GtkObjectClass *object_class; - GnomeDialogClass *dialog_class; - - object_class = (GtkObjectClass*) klass; - dialog_class = (GnomeDialogClass *) klass; - - parent_class = gtk_type_class (gnome_dialog_get_type ()); - - gtk_object_add_arg_type ("EContactEditorCategories::categories", GTK_TYPE_STRING, - GTK_ARG_READWRITE, ARG_CATEGORIES); - - object_class->set_arg = e_contact_editor_categories_set_arg; - object_class->get_arg = e_contact_editor_categories_get_arg; - object_class->destroy = e_contact_editor_categories_destroy; -} - -gchar *builtin_categories[] = { - "Business", - "Competition", - "Favorites", - "Gifts", - "Goals/Objectives", - "Holiday", - "Holiday Cards", - "Hot Contacts", - "Ideas", - "International", - "Key Customer", - "Miscellaneous", - "Personal", - "Phone Calls", - "Status", - "Strategies", - "Suppliers", - "Time & Expenses", - "VIP", - "Waiting", -}; - -#define BUILTIN_CATEGORY_COUNT (sizeof(builtin_categories) / sizeof(builtin_categories[0])) - -static void -add_list_unique(EContactEditorCategories *categories, char *string) -{ - int k; - char *temp = e_strdup_strip(string); - char **list = categories->category_list; - - if (!*temp) { - g_free(temp); - return; - } - for (k = 0; k < categories->list_length; k++) { - if (!strcmp(list[k], temp)) { - categories->selected_list[k] = TRUE; - break; - } - } - if (k == categories->list_length) { - categories->selected_list[categories->list_length] = TRUE; - list[categories->list_length++] = temp; - } else { - g_free(temp); - } -} - -static void -do_parse_categories(EContactEditorCategories *categories) -{ - char *str = categories->categories; - int length = strlen(str); - char *copy = g_new(char, length + 1); - int i, j; - char **list; - int count = 1; - - for (i = 0; i < categories->list_length; i++) - g_free(categories->category_list[i]); - g_free(categories->category_list); - g_free(categories->selected_list); - - for (i = 0; str[i]; i++) { - switch (str[i]) { - case '\\': - i++; - if (!str[i]) - i--; - break; - case ',': - count ++; - break; - } - } - list = g_new(char *, count + 1 + BUILTIN_CATEGORY_COUNT); - categories->category_list = list; - - categories->selected_list = g_new(gboolean, count + 1 + BUILTIN_CATEGORY_COUNT); - - for (count = 0; count < BUILTIN_CATEGORY_COUNT; count++) { - list[count] = g_strdup(builtin_categories[count]); - categories->selected_list[count] = 0; - } - - categories->list_length = count; - - for (i = 0, j = 0; str[i]; i++, j++) { - switch (str[i]) { - case '\\': - i++; - if (str[i]) { - copy[j] = str[i]; - } else - i--; - break; - case ',': - copy[j] = 0; - add_list_unique(categories, copy); - j = -1; - break; - default: - copy[j] = str[i]; - break; - } - } - copy[j] = 0; - add_list_unique(categories, copy); - g_free(copy); - e_table_model_changed(categories->model); -} - -static void -e_contact_editor_categories_entry_change (GtkWidget *entry, - EContactEditorCategories *categories) -{ - g_free(categories->categories); - categories->categories = g_strdup(gtk_entry_get_text(GTK_ENTRY(entry))); - do_parse_categories(categories); -} - - -#define INITIAL_SPEC " \ - \ - 0 \ - 1 \ - \ - \ -" - -static void -e_contact_editor_categories_init (EContactEditorCategories *categories) -{ - GladeXML *gui; - GtkWidget *table; - ECell *cell_left_just; - ECell *cell_checkbox; - ETableHeader *header; - ETableCol *col; - GtkWidget *e_table; - - categories->list_length = 0; - categories->category_list = NULL; - categories->selected_list = NULL; - categories->categories = NULL; - - gnome_dialog_append_button ( GNOME_DIALOG(categories), - GNOME_STOCK_BUTTON_OK); - - gnome_dialog_append_button ( GNOME_DIALOG(categories), - GNOME_STOCK_BUTTON_CANCEL); - - gtk_window_set_policy(GTK_WINDOW(categories), FALSE, TRUE, FALSE); - - gui = glade_xml_new (EVOLUTION_GLADEDIR "/categories.glade", NULL); - categories->gui = gui; - - table = glade_xml_get_widget(gui, "table-categories"); - gtk_widget_ref(table); - gtk_container_remove(GTK_CONTAINER(table->parent), table); - gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (categories)->vbox), table, TRUE, TRUE, 0); - gtk_widget_unref(table); - - categories->entry = glade_xml_get_widget(gui, "entry-categories"); - - gtk_signal_connect(GTK_OBJECT(categories->entry), "changed", - GTK_SIGNAL_FUNC(e_contact_editor_categories_entry_change), categories); - - categories->model = e_table_simple_new(e_contact_editor_categories_col_count, - e_contact_editor_categories_row_count, - e_contact_editor_categories_value_at, - e_contact_editor_categories_set_value_at, - e_contact_editor_categories_is_cell_editable, - e_contact_editor_categories_duplicate_value, - e_contact_editor_categories_free_value, - e_contact_editor_categories_initialize_value, - e_contact_editor_categories_value_is_empty, - e_contact_editor_categories_thaw, - categories); - - header = e_table_header_new(); - - cell_checkbox = e_cell_checkbox_new(); - col = e_table_col_new (0, "", - 0, 20, cell_checkbox, - g_int_compare, TRUE); - e_table_header_add_column (header, col, 0); - - cell_left_just = e_cell_text_new (categories->model, NULL, GTK_JUSTIFY_LEFT); - col = e_table_col_new (1, "Category", - 1.0, 20, cell_left_just, - g_str_compare, TRUE); - e_table_header_add_column (header, col, 1); - - e_table = e_table_new (header, categories->model, INITIAL_SPEC); - - gtk_object_sink(GTK_OBJECT(categories->model)); - - gtk_widget_show(e_table); - - gtk_table_attach_defaults(GTK_TABLE(table), - e_table, - 0, 1, - 3, 4); -} - -void -e_contact_editor_categories_destroy (GtkObject *object) -{ - EContactEditorCategories *categories = E_CONTACT_EDITOR_CATEGORIES(object); - int i; - - if (categories->gui) - gtk_object_unref(GTK_OBJECT(categories->gui)); - - g_free(categories->categories); - for (i = 0; i < categories->list_length; i++) - g_free(categories->category_list[i]); - g_free(categories->category_list); - g_free(categories->selected_list); -} - -GtkWidget* -e_contact_editor_categories_new (char *categories) -{ - GtkWidget *widget = GTK_WIDGET (gtk_type_new (e_contact_editor_categories_get_type ())); - gtk_object_set (GTK_OBJECT(widget), - "categories", categories, - NULL); - return widget; -} - -static void -e_contact_editor_categories_set_arg (GtkObject *o, GtkArg *arg, guint arg_id) -{ - EContactEditorCategories *e_contact_editor_categories; - - e_contact_editor_categories = E_CONTACT_EDITOR_CATEGORIES (o); - - switch (arg_id){ - case ARG_CATEGORIES: - gtk_entry_set_text(GTK_ENTRY(e_contact_editor_categories->entry), GTK_VALUE_STRING (*arg)); - break; - } -} - -static void -e_contact_editor_categories_get_arg (GtkObject *object, GtkArg *arg, guint arg_id) -{ - EContactEditorCategories *e_contact_editor_categories; - - e_contact_editor_categories = E_CONTACT_EDITOR_CATEGORIES (object); - - switch (arg_id) { - case ARG_CATEGORIES: - GTK_VALUE_STRING (*arg) = g_strdup(e_contact_editor_categories->categories); - break; - default: - arg->type = GTK_TYPE_INVALID; - break; - } -} - -/* This function returns the number of columns in our ETableModel. */ -static int -e_contact_editor_categories_col_count (ETableModel *etc, gpointer data) -{ - return 2; -} - -/* This function returns the number of rows in our ETableModel. */ -static int -e_contact_editor_categories_row_count (ETableModel *etc, gpointer data) -{ - EContactEditorCategories *categories = E_CONTACT_EDITOR_CATEGORIES(data); - return categories->list_length; -} - -/* This function returns the value at a particular point in our ETableModel. */ -static void * -e_contact_editor_categories_value_at (ETableModel *etc, int col, int row, gpointer data) -{ - EContactEditorCategories *categories = E_CONTACT_EDITOR_CATEGORIES(data); - if (col == 0) - return (void *) categories->selected_list[row]; - else - return categories->category_list[row]; -} - -/* This function sets the value at a particular point in our ETableModel. */ -static void -e_contact_editor_categories_set_value_at (ETableModel *etc, int col, int row, const void *val, gpointer data) -{ - EContactEditorCategories *categories = E_CONTACT_EDITOR_CATEGORIES(data); - if ( col == 0 ) { - char **strs; - int i, j; - char *string; - categories->selected_list[row] = (gboolean) val; - strs = g_new(char *, categories->list_length + 1); - for (i = 0, j = 0; i < categories->list_length; i++) { - if (categories->selected_list[i]) - strs[j++] = categories->category_list[i]; - } - strs[j] = 0; - string = g_strjoinv(", ", strs); - gtk_entry_set_text(GTK_ENTRY(categories->entry), string); - g_free(string); - g_free(strs); - } - if ( col == 1 ) - return; -} - -/* This function returns whether a particular cell is editable. */ -static gboolean -e_contact_editor_categories_is_cell_editable (ETableModel *etc, int col, int row, gpointer data) -{ - return col == 0; -} - -/* This function duplicates the value passed to it. */ -static void * -e_contact_editor_categories_duplicate_value (ETableModel *etc, int col, const void *value, gpointer data) -{ - if (col == 0) - return (void *)value; - else - return g_strdup(value); -} - -/* This function frees the value passed to it. */ -static void -e_contact_editor_categories_free_value (ETableModel *etc, int col, void *value, gpointer data) -{ - if (col == 0) - return; - else - g_free(value); -} - -static void * -e_contact_editor_categories_initialize_value (ETableModel *etc, int col, gpointer data) -{ - if (col == 0) - return NULL; - else - return g_strdup(""); -} - -static gboolean -e_contact_editor_categories_value_is_empty (ETableModel *etc, int col, const void *value, gpointer data) -{ - if (col == 0) - return value == NULL; - else - return !(value && *(char *)value); -} - -/* This function is for when the model is unfrozen. This can mostly - be ignored for simple models. */ -static void -e_contact_editor_categories_thaw (ETableModel *etc, gpointer data) -{ - e_table_model_changed(etc); -} diff --git a/addressbook/contact-editor/e-contact-editor-categories.h b/addressbook/contact-editor/e-contact-editor-categories.h deleted file mode 100644 index 529ef71b68..0000000000 --- a/addressbook/contact-editor/e-contact-editor-categories.h +++ /dev/null @@ -1,83 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* e-contact-editor-categories.h - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -#ifndef __E_CONTACT_EDITOR_CATEGORIES_H__ -#define __E_CONTACT_EDITOR_CATEGORIES_H__ - -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus */ - -/* EContactEditorCategories - A dialog displaying information about a contact. - * - * The following arguments are available: - * - * name type read/write description - * -------------------------------------------------------------------------------- - * name ECardName * RW The card currently being edited. Returns a copy. - */ - -#define E_CONTACT_EDITOR_CATEGORIES_TYPE (e_contact_editor_categories_get_type ()) -#define E_CONTACT_EDITOR_CATEGORIES(obj) (GTK_CHECK_CAST ((obj), E_CONTACT_EDITOR_CATEGORIES_TYPE, EContactEditorCategories)) -#define E_CONTACT_EDITOR_CATEGORIES_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_CONTACT_EDITOR_CATEGORIES_TYPE, EContactEditorCategoriesClass)) -#define E_IS_CONTACT_EDITOR_CATEGORIES(obj) (GTK_CHECK_TYPE ((obj), E_CONTACT_EDITOR_CATEGORIES_TYPE)) -#define E_IS_CONTACT_EDITOR_CATEGORIES_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_CONTACT_EDITOR_CATEGORIES_TYPE)) - - -typedef struct _EContactEditorCategories EContactEditorCategories; -typedef struct _EContactEditorCategoriesClass EContactEditorCategoriesClass; - -struct _EContactEditorCategories -{ - GnomeDialog parent; - - /* item specific fields */ - char *categories; - GtkWidget *entry; - ETableModel *model; - - int list_length; - char **category_list; - gboolean *selected_list; - - GladeXML *gui; -}; - -struct _EContactEditorCategoriesClass -{ - GnomeDialogClass parent_class; -}; - - -GtkWidget *e_contact_editor_categories_new(char *categories); -GtkType e_contact_editor_categories_get_type (void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -#endif /* __E_CONTACT_EDITOR_CATEGORIES_H__ */ diff --git a/addressbook/contact-editor/e-contact-editor-fullname.c b/addressbook/contact-editor/e-contact-editor-fullname.c deleted file mode 100644 index b2e598fdde..0000000000 --- a/addressbook/contact-editor/e-contact-editor-fullname.c +++ /dev/null @@ -1,214 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * e-contact-editor-fullname.c - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include -#include -#include - -static void e_contact_editor_fullname_init (EContactEditorFullname *card); -static void e_contact_editor_fullname_class_init (EContactEditorFullnameClass *klass); -static void e_contact_editor_fullname_set_arg (GtkObject *o, GtkArg *arg, guint arg_id); -static void e_contact_editor_fullname_get_arg (GtkObject *object, GtkArg *arg, guint arg_id); -static void e_contact_editor_fullname_destroy (GtkObject *object); - -static void fill_in_info(EContactEditorFullname *editor); -static void extract_info(EContactEditorFullname *editor); - -static GnomeDialogClass *parent_class = NULL; - -/* The arguments we take */ -enum { - ARG_0, - ARG_NAME -}; - -GtkType -e_contact_editor_fullname_get_type (void) -{ - static GtkType contact_editor_fullname_type = 0; - - if (!contact_editor_fullname_type) - { - static const GtkTypeInfo contact_editor_fullname_info = - { - "EContactEditorFullname", - sizeof (EContactEditorFullname), - sizeof (EContactEditorFullnameClass), - (GtkClassInitFunc) e_contact_editor_fullname_class_init, - (GtkObjectInitFunc) e_contact_editor_fullname_init, - /* reserved_1 */ NULL, - /* reserved_2 */ NULL, - (GtkClassInitFunc) NULL, - }; - - contact_editor_fullname_type = gtk_type_unique (gnome_dialog_get_type (), &contact_editor_fullname_info); - } - - return contact_editor_fullname_type; -} - -static void -e_contact_editor_fullname_class_init (EContactEditorFullnameClass *klass) -{ - GtkObjectClass *object_class; - GnomeDialogClass *dialog_class; - - object_class = (GtkObjectClass*) klass; - dialog_class = (GnomeDialogClass *) klass; - - parent_class = gtk_type_class (gnome_dialog_get_type ()); - - gtk_object_add_arg_type ("EContactEditorFullname::name", GTK_TYPE_POINTER, - GTK_ARG_READWRITE, ARG_NAME); - - object_class->set_arg = e_contact_editor_fullname_set_arg; - object_class->get_arg = e_contact_editor_fullname_get_arg; - object_class->destroy = e_contact_editor_fullname_destroy; -} - -static void -e_contact_editor_fullname_init (EContactEditorFullname *e_contact_editor_fullname) -{ - GladeXML *gui; - GtkWidget *widget; - - gnome_dialog_append_button ( GNOME_DIALOG(e_contact_editor_fullname), - GNOME_STOCK_BUTTON_OK); - - gnome_dialog_append_button ( GNOME_DIALOG(e_contact_editor_fullname), - GNOME_STOCK_BUTTON_CANCEL); - - gtk_window_set_policy(GTK_WINDOW(e_contact_editor_fullname), TRUE, TRUE, FALSE); - - e_contact_editor_fullname->name = NULL; - gui = glade_xml_new (EVOLUTION_GLADEDIR "/fullname.glade", NULL); - e_contact_editor_fullname->gui = gui; - - widget = glade_xml_get_widget(gui, "table-checkfullname"); - gtk_widget_ref(widget); - gtk_container_remove(GTK_CONTAINER(widget->parent), widget); - gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (e_contact_editor_fullname)->vbox), widget, TRUE, TRUE, 0); - gtk_widget_unref(widget); -} - -void -e_contact_editor_fullname_destroy (GtkObject *object) -{ - EContactEditorFullname *e_contact_editor_fullname = E_CONTACT_EDITOR_FULLNAME(object); - - if (e_contact_editor_fullname->gui) - gtk_object_unref(GTK_OBJECT(e_contact_editor_fullname->gui)); - e_card_name_free(e_contact_editor_fullname->name); -} - -GtkWidget* -e_contact_editor_fullname_new (ECardName *name) -{ - GtkWidget *widget = GTK_WIDGET (gtk_type_new (e_contact_editor_fullname_get_type ())); - gtk_object_set (GTK_OBJECT(widget), - "name", name, - NULL); - return widget; -} - -static void -e_contact_editor_fullname_set_arg (GtkObject *o, GtkArg *arg, guint arg_id) -{ - EContactEditorFullname *e_contact_editor_fullname; - - e_contact_editor_fullname = E_CONTACT_EDITOR_FULLNAME (o); - - switch (arg_id){ - case ARG_NAME: - if (e_contact_editor_fullname->name) - e_card_name_free(e_contact_editor_fullname->name); - e_contact_editor_fullname->name = e_card_name_copy(GTK_VALUE_POINTER (*arg)); - fill_in_info(e_contact_editor_fullname); - break; - } -} - -static void -e_contact_editor_fullname_get_arg (GtkObject *object, GtkArg *arg, guint arg_id) -{ - EContactEditorFullname *e_contact_editor_fullname; - - e_contact_editor_fullname = E_CONTACT_EDITOR_FULLNAME (object); - - switch (arg_id) { - case ARG_NAME: - extract_info(e_contact_editor_fullname); - GTK_VALUE_POINTER (*arg) = e_card_name_copy(e_contact_editor_fullname->name); - break; - default: - arg->type = GTK_TYPE_INVALID; - break; - } -} - -static void -fill_in_field(EContactEditorFullname *editor, char *field, char *string) -{ - GtkEntry *entry = GTK_ENTRY(glade_xml_get_widget(editor->gui, field)); - if (entry) { - if (string) - gtk_entry_set_text(entry, string); - else - gtk_entry_set_text(entry, ""); - } -} - -static void -fill_in_info(EContactEditorFullname *editor) -{ - ECardName *name = editor->name; - if (name) { - fill_in_field(editor, "entry-title", name->prefix); - fill_in_field(editor, "entry-first", name->given); - fill_in_field(editor, "entry-middle", name->additional); - fill_in_field(editor, "entry-last", name->family); - fill_in_field(editor, "entry-suffix", name->suffix); - } -} - -static char * -extract_field(EContactEditorFullname *editor, char *field) -{ - GtkEntry *entry = GTK_ENTRY(glade_xml_get_widget(editor->gui, field)); - if (entry) - return g_strdup(gtk_entry_get_text(entry)); - else - return NULL; -} - -static void -extract_info(EContactEditorFullname *editor) -{ - ECardName *name = editor->name; - if (!name) - name = e_card_name_new(); - name->prefix = extract_field(editor, "entry-title" ); - name->given = extract_field(editor, "entry-first" ); - name->additional = extract_field(editor, "entry-middle"); - name->family = extract_field(editor, "entry-last" ); - name->suffix = extract_field(editor, "entry-suffix"); -} diff --git a/addressbook/contact-editor/e-contact-editor-fullname.h b/addressbook/contact-editor/e-contact-editor-fullname.h deleted file mode 100644 index 409ffc72d0..0000000000 --- a/addressbook/contact-editor/e-contact-editor-fullname.h +++ /dev/null @@ -1,75 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* e-contact-editor-fullname.h - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -#ifndef __E_CONTACT_EDITOR_FULLNAME_H__ -#define __E_CONTACT_EDITOR_FULLNAME_H__ - -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus */ - -/* EContactEditorFullname - A dialog displaying information about a contact. - * - * The following arguments are available: - * - * name type read/write description - * -------------------------------------------------------------------------------- - * name ECardName * RW The card currently being edited. Returns a copy. - */ - -#define E_CONTACT_EDITOR_FULLNAME_TYPE (e_contact_editor_fullname_get_type ()) -#define E_CONTACT_EDITOR_FULLNAME(obj) (GTK_CHECK_CAST ((obj), E_CONTACT_EDITOR_FULLNAME_TYPE, EContactEditorFullname)) -#define E_CONTACT_EDITOR_FULLNAME_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_CONTACT_EDITOR_FULLNAME_TYPE, EContactEditorFullnameClass)) -#define E_IS_CONTACT_EDITOR_FULLNAME(obj) (GTK_CHECK_TYPE ((obj), E_CONTACT_EDITOR_FULLNAME_TYPE)) -#define E_IS_CONTACT_EDITOR_FULLNAME_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_CONTACT_EDITOR_FULLNAME_TYPE)) - - -typedef struct _EContactEditorFullname EContactEditorFullname; -typedef struct _EContactEditorFullnameClass EContactEditorFullnameClass; - -struct _EContactEditorFullname -{ - GnomeDialog parent; - - /* item specific fields */ - ECardName *name; - GladeXML *gui; -}; - -struct _EContactEditorFullnameClass -{ - GnomeDialogClass parent_class; -}; - - -GtkWidget *e_contact_editor_fullname_new(ECardName *name); -GtkType e_contact_editor_fullname_get_type (void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -#endif /* __E_CONTACT_EDITOR_FULLNAME_H__ */ diff --git a/addressbook/contact-editor/e-contact-editor-strings.h b/addressbook/contact-editor/e-contact-editor-strings.h deleted file mode 100644 index 40c2ee85a5..0000000000 --- a/addressbook/contact-editor/e-contact-editor-strings.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Translatable strings file generated by Glade. - * Add this file to your project's POTFILES.in. - * DO NOT compile it as part of your application. - */ - -gchar *s = N_("Contact Editor"); -gchar *s = N_("_Full Name..."); -gchar *s = N_("Company:"); -gchar *s = N_("File As:"); -gchar *s = N_("Web page address:"); -gchar *s = N_("Wants to receive _HTML mail"); -gchar *s = N_("Address:"); -gchar *s = N_("_Business"); -gchar *s = N_("_Home"); -gchar *s = N_("Business _Fax"); -gchar *s = N_("_Mobile"); -gchar *s = N_("Primary Email"); -gchar *s = N_("Business"); -gchar *s = N_("This is the _mailing address"); -gchar *s = N_("_Contacts..."); -gchar *s = N_("Ca_tegories..."); -gchar *s = N_("Job Title"); -gchar *s = N_("General"); -gchar *s = N_("Department:"); -gchar *s = N_("Office:"); -gchar *s = N_("Profession:"); -gchar *s = N_("Nickname:"); -gchar *s = N_("Spouse:"); -gchar *s = N_("Birthday:"); -gchar *s = N_("Assistant's name:"); -gchar *s = N_("Manager's Name:"); -gchar *s = N_("Anniversary:"); -gchar *s = N_("Notes:"); -gchar *s = N_("Details"); -gchar *s = N_("Add"); -gchar *s = N_("Delete"); -gchar *s = N_("Phone Types"); -gchar *s = N_("New phone type"); -gchar *s = N_("New phone type"); -gchar *s = N_("Add"); diff --git a/addressbook/contact-editor/e-contact-editor.c b/addressbook/contact-editor/e-contact-editor.c deleted file mode 100644 index 5d7485561c..0000000000 --- a/addressbook/contact-editor/e-contact-editor.c +++ /dev/null @@ -1,1300 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * e-contact-editor.c - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include -#include -#include "e-contact-editor.h" -#include -#include -#include -#include -#include - -static void e_contact_editor_init (EContactEditor *card); -static void e_contact_editor_class_init (EContactEditorClass *klass); -static void e_contact_editor_set_arg (GtkObject *o, GtkArg *arg, guint arg_id); -static void e_contact_editor_get_arg (GtkObject *object, GtkArg *arg, guint arg_id); -static void e_contact_editor_destroy (GtkObject *object); - -#if 0 -static GtkWidget *e_contact_editor_build_dialog(EContactEditor *editor, gchar *entry_id, gchar *label_id, gchar *title, GList **list, GnomeUIInfo **info); -#endif -static void _email_arrow_pressed (GtkWidget *widget, GdkEventButton *button, EContactEditor *editor); -static void _phone_arrow_pressed (GtkWidget *widget, GdkEventButton *button, EContactEditor *editor); -static void _address_arrow_pressed (GtkWidget *widget, GdkEventButton *button, EContactEditor *editor); -static void fill_in_info(EContactEditor *editor); -static void extract_info(EContactEditor *editor); -static void set_fields(EContactEditor *editor); -static void set_address_field(EContactEditor *editor, int result); -static void add_field_callback(GtkWidget *widget, EContactEditor *editor); - -static GtkVBoxClass *parent_class = NULL; - -/* The arguments we take */ -enum { - ARG_0, - ARG_CARD -}; - -enum { - DYNAMIC_LIST_EMAIL, - DYNAMIC_LIST_PHONE, - DYNAMIC_LIST_ADDRESS -}; - -GtkType -e_contact_editor_get_type (void) -{ - static GtkType contact_editor_type = 0; - - if (!contact_editor_type) - { - static const GtkTypeInfo contact_editor_info = - { - "EContactEditor", - sizeof (EContactEditor), - sizeof (EContactEditorClass), - (GtkClassInitFunc) e_contact_editor_class_init, - (GtkObjectInitFunc) e_contact_editor_init, - /* reserved_1 */ NULL, - /* reserved_2 */ NULL, - (GtkClassInitFunc) NULL, - }; - - contact_editor_type = gtk_type_unique (gtk_vbox_get_type (), &contact_editor_info); - } - - return contact_editor_type; -} - -static void -e_contact_editor_class_init (EContactEditorClass *klass) -{ - GtkObjectClass *object_class; - GtkVBoxClass *vbox_class; - - object_class = (GtkObjectClass*) klass; - vbox_class = (GtkVBoxClass *) klass; - - parent_class = gtk_type_class (gtk_vbox_get_type ()); - - gtk_object_add_arg_type ("EContactEditor::card", GTK_TYPE_OBJECT, - GTK_ARG_READWRITE, ARG_CARD); - - object_class->set_arg = e_contact_editor_set_arg; - object_class->get_arg = e_contact_editor_get_arg; - object_class->destroy = e_contact_editor_destroy; -} - -static void -_replace_button(EContactEditor *editor, gchar *button_xml, gchar *image, GtkSignalFunc func) -{ - GladeXML *gui = editor->gui; - GtkWidget *button = glade_xml_get_widget(gui, button_xml); - GtkWidget *pixmap; - gchar *image_temp; - if (button && GTK_IS_BUTTON(button)) { - image_temp = g_strdup_printf("%s%s", DATADIR "/evolution/", image); - pixmap = e_create_image_widget(NULL, image_temp, NULL, 0, 0); - gtk_container_add(GTK_CONTAINER(button), - pixmap); - g_free(image_temp); - gtk_widget_show(pixmap); - gtk_signal_connect(GTK_OBJECT(button), "button_press_event", func, editor); - } -} - -static void -_replace_buttons(EContactEditor *editor) -{ - _replace_button(editor, "button-phone1", "arrow.png", _phone_arrow_pressed); - _replace_button(editor, "button-phone2", "arrow.png", _phone_arrow_pressed); - _replace_button(editor, "button-phone3", "arrow.png", _phone_arrow_pressed); - _replace_button(editor, "button-phone4", "arrow.png", _phone_arrow_pressed); - _replace_button(editor, "button-address", "arrow.png", _address_arrow_pressed); - _replace_button(editor, "button-email1", "arrow.png", _email_arrow_pressed); -} - -static void -phone_entry_changed (GtkWidget *widget, EContactEditor *editor) -{ - int which; - gchar *string; - GtkEntry *entry = GTK_ENTRY(widget); - ECardPhone *phone; - - if ( widget == glade_xml_get_widget(editor->gui, "entry-phone1") ) { - which = 1; - } else if ( widget == glade_xml_get_widget(editor->gui, "entry-phone2") ) { - which = 2; - } else if ( widget == glade_xml_get_widget(editor->gui, "entry-phone3") ) { - which = 3; - } else if ( widget == glade_xml_get_widget(editor->gui, "entry-phone4") ) { - which = 4; - } else - return; - string = gtk_entry_get_text(entry); - phone = e_card_phone_new(); - phone->number = string; - e_card_simple_set_phone(editor->simple, editor->phone_choice[which - 1], phone); - phone->number = NULL; - e_card_phone_free(phone); - set_fields(editor); -} - -static void -email_entry_changed (GtkWidget *widget, EContactEditor *editor) -{ - gchar *string; - GtkEntry *entry = GTK_ENTRY(widget); - - string = gtk_entry_get_text(entry); - - e_card_simple_set_email(editor->simple, editor->email_choice, string); -} - -static void -address_text_changed (GtkWidget *widget, EContactEditor *editor) -{ - GtkEditable *editable = GTK_EDITABLE(widget); - ECardAddrLabel *address; - - if (editor->address_choice == -1) - return; - - address = e_card_address_label_new(); - address->data = gtk_editable_get_chars(editable, 0, -1); - e_card_simple_set_address(editor->simple, editor->address_choice, address); - e_card_address_label_free(address); -} - -/* This function tells you whether name_to_style will make sense. */ -static gboolean -style_makes_sense(const ECardName *name, char *company, int style) -{ - switch (style) { - case 0: /* Fall Through */ - case 1: - return TRUE; - case 2: - if (company && *company) - return TRUE; - else - return FALSE; - case 3: /* Fall Through */ - case 4: - if (company && *company && ((name->given && *name->given) || (name->family && *name->family))) - return TRUE; - else - return FALSE; - default: - return FALSE; - } -} - -static char * -name_to_style(const ECardName *name, char *company, int style) -{ - char *string; - char *strings[4], **stringptr; - char *substring; - switch (style) { - case 0: - stringptr = strings; - if (name->family && *name->family) - *(stringptr++) = name->family; - if (name->given && *name->given) - *(stringptr++) = name->given; - *stringptr = NULL; - string = g_strjoinv(", ", strings); - break; - case 1: - stringptr = strings; - if (name->given && *name->given) - *(stringptr++) = name->given; - if (name->family && *name->family) - *(stringptr++) = name->family; - *stringptr = NULL; - string = g_strjoinv(" ", strings); - break; - case 2: - string = g_strdup(company); - break; - case 3: /* Fall Through */ - case 4: - stringptr = strings; - if (name->family && *name->family) - *(stringptr++) = name->family; - if (name->given && *name->given) - *(stringptr++) = name->given; - *stringptr = NULL; - substring = g_strjoinv(", ", strings); - if (!(company && *company)) - company = ""; - if (style == 3) - string = g_strdup_printf("%s (%s)", substring, company); - else - string = g_strdup_printf("%s (%s)", company, substring); - g_free(substring); - break; - default: - string = g_strdup(""); - } - return string; -} - -static int -file_as_get_style (EContactEditor *editor) -{ - GtkEntry *file_as = GTK_ENTRY(glade_xml_get_widget(editor->gui, "entry-file-as")); - char *filestring = gtk_entry_get_text(file_as); - char *trystring; - ECardName *name = editor->name; - int i; - int style; - - if (!name) return 0; - - style = -1; - for (i = 0; i < 5; i++) { - trystring = name_to_style(name, editor->company, i); - if (!strcmp(trystring, filestring)) { - g_free(trystring); - return i; - } - g_free(trystring); - } - return -1; -} - -static void -file_as_set_style(EContactEditor *editor, int style) -{ - char *string; - int i; - GList *strings = NULL; - GtkEntry *file_as = GTK_ENTRY(glade_xml_get_widget(editor->gui, "entry-file-as")); - GtkWidget *widget; - - - if (style == -1) { - string = g_strdup(gtk_entry_get_text(file_as)); - strings = g_list_append(strings, string); - } - - for (i = 0; i < 5; i++) { - if (style_makes_sense(editor->name, editor->company, i)) { - string = name_to_style(editor->name, editor->company, i); - strings = g_list_append(strings, string); - } - } - - widget = glade_xml_get_widget(editor->gui, "combo-file-as"); - if (widget && GTK_IS_COMBO(widget)) { - GtkCombo *combo = GTK_COMBO(widget); - gtk_combo_set_popdown_strings(combo, strings); - g_list_foreach(strings, (GFunc) g_free, NULL); - g_list_free(strings); - } - - if (style != -1) { - string = name_to_style(editor->name, editor->company, style); - gtk_entry_set_text(file_as, string); - g_free(string); - } -} - -static void -name_entry_changed (GtkWidget *widget, EContactEditor *editor) -{ - GtkWidget *file_as; - int style = 0; - - file_as = glade_xml_get_widget(editor->gui, "entry-file-as"); - - if (file_as && GTK_IS_ENTRY(file_as)) { - style = file_as_get_style(editor); - } - - e_card_name_free(editor->name); - editor->name = e_card_name_from_string(gtk_entry_get_text(GTK_ENTRY(widget))); - - if (file_as && GTK_IS_ENTRY(file_as)) { - file_as_set_style(editor, style); - } -} - -static void -company_entry_changed (GtkWidget *widget, EContactEditor *editor) -{ - int style = 0; - GtkWidget *file_as; - - file_as = glade_xml_get_widget(editor->gui, "entry-file-as"); - - if (file_as && GTK_IS_ENTRY(file_as)) { - style = file_as_get_style(editor); - } - - g_free(editor->company); - - editor->company = g_strdup(gtk_entry_get_text(GTK_ENTRY(widget))); - - if (file_as && GTK_IS_ENTRY(file_as)) { - file_as_set_style(editor, style); - } -} - -static void -set_entry_changed_signal_phone(EContactEditor *editor, char *id) -{ - GtkWidget *widget = glade_xml_get_widget(editor->gui, id); - if (widget && GTK_IS_ENTRY(widget)) - gtk_signal_connect(GTK_OBJECT(widget), "changed", - phone_entry_changed, editor); -} - -static void -set_entry_changed_signals(EContactEditor *editor) -{ - GtkWidget *widget; - set_entry_changed_signal_phone(editor, "entry-phone1"); - set_entry_changed_signal_phone(editor, "entry-phone2"); - set_entry_changed_signal_phone(editor, "entry-phone3"); - set_entry_changed_signal_phone(editor, "entry-phone4"); - widget = glade_xml_get_widget(editor->gui, "entry-email1"); - if (widget && GTK_IS_ENTRY(widget)) { - gtk_signal_connect(GTK_OBJECT(widget), "changed", - email_entry_changed, editor); - } - widget = glade_xml_get_widget(editor->gui, "text-address"); - if (widget && GTK_IS_TEXT(widget)) { - gtk_signal_connect(GTK_OBJECT(widget), "changed", - address_text_changed, editor); - } - widget = glade_xml_get_widget(editor->gui, "entry-fullname"); - if (widget && GTK_IS_ENTRY(widget)) { - gtk_signal_connect(GTK_OBJECT(widget), "changed", - name_entry_changed, editor); - } - widget = glade_xml_get_widget(editor->gui, "entry-company"); - if (widget && GTK_IS_ENTRY(widget)) { - gtk_signal_connect(GTK_OBJECT(widget), "changed", - company_entry_changed, editor); - } -} - -static void -full_name_clicked(GtkWidget *button, EContactEditor *editor) -{ - GnomeDialog *dialog = GNOME_DIALOG(e_contact_editor_fullname_new(editor->name)); - int result; - gtk_widget_show(GTK_WIDGET(dialog)); - result = gnome_dialog_run_and_close (dialog); - if (result == 0) { - ECardName *name; - GtkWidget *fname_widget; - - gtk_object_get(GTK_OBJECT(dialog), - "name", &name, - NULL); - e_card_name_free(editor->name); - editor->name = e_card_name_copy(name); - - fname_widget = glade_xml_get_widget(editor->gui, "entry-fullname"); - if (fname_widget && GTK_IS_ENTRY(fname_widget)) { - char *full_name = e_card_name_to_string(name); - gtk_entry_set_text(GTK_ENTRY(fname_widget), full_name); - g_free(full_name); - } - } - gtk_object_unref(GTK_OBJECT(dialog)); -} - -static void -categories_clicked(GtkWidget *button, EContactEditor *editor) -{ - char *categories; - GnomeDialog *dialog; - int result; - GtkWidget *entry = glade_xml_get_widget(editor->gui, "entry-categories"); - if (entry && GTK_IS_ENTRY(entry)) - categories = gtk_entry_get_text(GTK_ENTRY(entry)); - else if (editor->card) - gtk_object_get(GTK_OBJECT(editor->card), - "categories", &categories, - NULL); - dialog = GNOME_DIALOG(e_contact_editor_categories_new(categories)); - gtk_widget_show(GTK_WIDGET(dialog)); - result = gnome_dialog_run (dialog); - if (result == 0) { - gtk_object_get(GTK_OBJECT(dialog), - "categories", &categories, - NULL); - if (entry && GTK_IS_ENTRY(entry)) - gtk_entry_set_text(GTK_ENTRY(entry), categories); - else - gtk_object_set(GTK_OBJECT(editor->card), - "categories", categories, - NULL); - g_free(categories); - } - gtk_object_destroy(GTK_OBJECT(dialog)); - if (!entry) - g_free(categories); -} - -static void -e_contact_editor_init (EContactEditor *e_contact_editor) -{ - GladeXML *gui; - GtkWidget *widget; - - - e_contact_editor->email_info = NULL; - e_contact_editor->phone_info = NULL; - e_contact_editor->address_info = NULL; - e_contact_editor->email_popup = NULL; - e_contact_editor->phone_popup = NULL; - e_contact_editor->address_popup = NULL; - e_contact_editor->email_list = NULL; - e_contact_editor->phone_list = NULL; - e_contact_editor->address_list = NULL; - e_contact_editor->name = NULL; - e_contact_editor->company = g_strdup(""); - - e_contact_editor->email_choice = 0; - e_contact_editor->phone_choice[0] = E_CARD_SIMPLE_PHONE_ID_BUSINESS; - e_contact_editor->phone_choice[1] = E_CARD_SIMPLE_PHONE_ID_HOME; - e_contact_editor->phone_choice[2] = E_CARD_SIMPLE_PHONE_ID_BUSINESS_FAX; - e_contact_editor->phone_choice[3] = E_CARD_SIMPLE_PHONE_ID_MOBILE; - e_contact_editor->address_choice = 0; - - e_contact_editor->arbitrary_fields = NULL; - - e_contact_editor->simple = e_card_simple_new(NULL); - - e_contact_editor->card = NULL; - - gui = glade_xml_new (EVOLUTION_GLADEDIR "/contact-editor.glade", NULL); - e_contact_editor->gui = gui; - - widget = glade_xml_get_widget(gui, "notebook-contact-editor"); - if (!widget) { - return; - } - gtk_widget_reparent(widget, - GTK_WIDGET(e_contact_editor)); - - if (GTK_IS_CONTAINER(widget)) - e_container_foreach_leaf(GTK_CONTAINER(widget), (GtkCallback) add_field_callback, e_contact_editor); - - _replace_buttons(e_contact_editor); - set_entry_changed_signals(e_contact_editor); - - widget = glade_xml_get_widget(e_contact_editor->gui, "button-fullname"); - if (widget && GTK_IS_BUTTON(widget)) - gtk_signal_connect(GTK_OBJECT(widget), "clicked", - full_name_clicked, e_contact_editor); - - widget = glade_xml_get_widget(e_contact_editor->gui, "button-categories"); - if (widget && GTK_IS_BUTTON(widget)) - gtk_signal_connect(GTK_OBJECT(widget), "clicked", - categories_clicked, e_contact_editor); -} - -void -e_contact_editor_destroy (GtkObject *object) { - EContactEditor *e_contact_editor = E_CONTACT_EDITOR(object); - - if (e_contact_editor->email_list) { - g_list_foreach(e_contact_editor->email_list, (GFunc) g_free, NULL); - g_list_free(e_contact_editor->email_list); - } - if (e_contact_editor->email_info) { - g_free(e_contact_editor->email_info); - } - if (e_contact_editor->email_popup) { - gtk_widget_unref(e_contact_editor->email_popup); - } - - if (e_contact_editor->phone_list) { - g_list_foreach(e_contact_editor->phone_list, (GFunc) g_free, NULL); - g_list_free(e_contact_editor->phone_list); - } - if (e_contact_editor->phone_info) { - g_free(e_contact_editor->phone_info); - } - if (e_contact_editor->phone_popup) { - gtk_widget_unref(e_contact_editor->phone_popup); - } - - if (e_contact_editor->address_list) { - g_list_foreach(e_contact_editor->address_list, (GFunc) g_free, NULL); - g_list_free(e_contact_editor->address_list); - } - if (e_contact_editor->address_info) { - g_free(e_contact_editor->address_info); - } - if (e_contact_editor->address_popup) { - gtk_widget_unref(e_contact_editor->address_popup); - } - - if (e_contact_editor->simple) - gtk_object_unref(GTK_OBJECT(e_contact_editor->simple)); - - g_free (e_contact_editor->company); - - gtk_object_unref(GTK_OBJECT(e_contact_editor->gui)); -} - -GtkWidget* -e_contact_editor_new (ECard *card) -{ - GtkWidget *widget = GTK_WIDGET (gtk_type_new (e_contact_editor_get_type ())); - gtk_object_set (GTK_OBJECT(widget), - "card", card, - NULL); - return widget; -} - -static void -e_contact_editor_set_arg (GtkObject *o, GtkArg *arg, guint arg_id) -{ - EContactEditor *editor; - - editor = E_CONTACT_EDITOR (o); - - switch (arg_id){ - case ARG_CARD: - if (editor->card) - gtk_object_unref(GTK_OBJECT(editor->card)); - editor->card = e_card_duplicate(E_CARD(GTK_VALUE_OBJECT (*arg))); - gtk_object_set(GTK_OBJECT(editor->simple), - "card", editor->card, - NULL); - fill_in_info(editor); - break; - } -} - -static void -e_contact_editor_get_arg (GtkObject *object, GtkArg *arg, guint arg_id) -{ - EContactEditor *e_contact_editor; - - e_contact_editor = E_CONTACT_EDITOR (object); - - switch (arg_id) { - case ARG_CARD: - e_card_simple_sync_card(e_contact_editor->simple); - extract_info(e_contact_editor); - GTK_VALUE_OBJECT (*arg) = GTK_OBJECT(e_contact_editor->card); - break; - default: - arg->type = GTK_TYPE_INVALID; - break; - } -} - -static void -_popup_position(GtkMenu *menu, - gint *x, - gint *y, - gpointer data) -{ - GtkWidget *button = GTK_WIDGET(data); - GtkRequisition request; - int mh, mw; - gdk_window_get_origin (button->window, x, y); - *x += button->allocation.width; - *y += button->allocation.height; - - gtk_widget_size_request(GTK_WIDGET(menu), &request); - - mh = request.height; - mw = request.width; - - *x -= mw; - if (*x < 0) - *x = 0; - - if (*y < 0) - *y = 0; - - if ((*x + mw) > gdk_screen_width ()) - *x = gdk_screen_width () - mw; - - if ((*y + mh) > gdk_screen_height ()) - *y = gdk_screen_height () - mh; -} - -static gint -_arrow_pressed (GtkWidget *widget, GdkEventButton *button, EContactEditor *editor, GtkWidget *popup, GList **list, GnomeUIInfo **info, gchar *label, gchar *entry, gchar *dialog_title) -{ - gint menu_item; - gtk_signal_emit_stop_by_name(GTK_OBJECT(widget), "button_press_event"); - gtk_widget_realize(popup); - menu_item = gnome_popup_menu_do_popup_modal(popup, _popup_position, widget, button, editor); - if ( menu_item != -1 ) { -#if 0 - if (menu_item == g_list_length (*list)) { - e_contact_editor_build_dialog(editor, entry, label, dialog_title, list, info); - } else { -#endif - GtkWidget *entry_widget = glade_xml_get_widget(editor->gui, label); - if (entry_widget && GTK_IS_ENTRY(entry_widget)) { - gtk_object_set(GTK_OBJECT(entry_widget), - "label", g_list_nth_data(*list, menu_item), - NULL); - } -#if 0 - } -#endif - } - return menu_item; -} - -static void -e_contact_editor_build_ui_info(GList *list, GnomeUIInfo **infop) -{ - GnomeUIInfo *info; - GnomeUIInfo singleton = { GNOME_APP_UI_TOGGLEITEM, NULL, NULL, NULL, NULL, NULL, GNOME_APP_PIXMAP_NONE, 0, 0, 0, NULL }; - GnomeUIInfo end = GNOMEUIINFO_END; - int length; - int i; - - info = *infop; - - if ( info ) - g_free(info); - length = g_list_length( list ); - info = g_new(GnomeUIInfo, length + 2); - for (i = 0; i < length; i++) { - info[i] = singleton; - info[i].label = _(list->data); - list = list->next; - } - info[i] = end; - - *infop = info; -} - -#if 0 -static void -_dialog_clicked(GtkWidget *dialog, gint button, EContactEditor *editor) -{ - GtkWidget *label = gtk_object_get_data(GTK_OBJECT(dialog), - "e_contact_editor_label"); - - GtkWidget *dialog_entry = gtk_object_get_data(GTK_OBJECT(dialog), - "e_contact_editor_dialog_entry"); - - GList **list = gtk_object_get_data(GTK_OBJECT(dialog), - "e_contact_editor_list"); - GList **info = gtk_object_get_data(GTK_OBJECT(dialog), - "e_contact_editor_info"); - switch (button) { - case 0: - if (label && GTK_IS_LABEL(label)) { - gtk_object_set(GTK_OBJECT(label), - "label", gtk_entry_get_text(GTK_ENTRY(dialog_entry)), - NULL); - *list = g_list_append(*list, g_strdup(gtk_entry_get_text(GTK_ENTRY(dialog_entry)))); - g_free(*info); - *info = NULL; - } - break; - } - gnome_dialog_close(GNOME_DIALOG(dialog)); -} - -static void -_dialog_destroy(EContactEditor *editor, GtkWidget *dialog) -{ - gnome_dialog_close(GNOME_DIALOG(dialog)); -} - -static GtkWidget * -e_contact_editor_build_dialog(EContactEditor *editor, gchar *entry_id, gchar *label_id, gchar *title, GList **list, GnomeUIInfo **info) -{ - GtkWidget *dialog_entry = gtk_entry_new(); - GtkWidget *entry = glade_xml_get_widget(editor->gui, entry_id); - GtkWidget *label = glade_xml_get_widget(editor->gui, label_id); - - GtkWidget *dialog = gnome_dialog_new(title, - NULL); - - gtk_container_add(GTK_CONTAINER(GNOME_DIALOG(dialog)->vbox), - gtk_widget_new (gtk_frame_get_type(), - "border_width", 4, - "label", title, - "child", gtk_widget_new(gtk_alignment_get_type(), - "child", dialog_entry, - "xalign", .5, - "yalign", .5, - "xscale", 1.0, - "yscale", 1.0, - "border_width", 9, - NULL), - NULL)); - - gnome_dialog_append_button_with_pixmap(GNOME_DIALOG(dialog), - "Add", - GNOME_STOCK_PIXMAP_ADD); - gnome_dialog_append_button(GNOME_DIALOG(dialog), GNOME_STOCK_BUTTON_CANCEL); - gnome_dialog_set_default(GNOME_DIALOG(dialog), 0); - - gtk_signal_connect(GTK_OBJECT(dialog), "clicked", - _dialog_clicked, editor); - gtk_signal_connect_while_alive(GTK_OBJECT(editor), "destroy", - _dialog_destroy, GTK_OBJECT(dialog), GTK_OBJECT(dialog)); - - gtk_object_set_data(GTK_OBJECT(dialog), - "e_contact_editor_entry", entry); - gtk_object_set_data(GTK_OBJECT(dialog), - "e_contact_editor_label", label); - gtk_object_set_data(GTK_OBJECT(dialog), - "e_contact_editor_dialog_entry", dialog_entry); - gtk_object_set_data(GTK_OBJECT(dialog), - "e_contact_editor_list", list); - gtk_object_set_data(GTK_OBJECT(dialog), - "e_contact_editor_info", info); - - gtk_widget_show_all(dialog); - return dialog; -} -#endif - -static void -_phone_arrow_pressed (GtkWidget *widget, GdkEventButton *button, EContactEditor *editor) -{ - int which; - int i; - gchar *label; - gchar *entry; - int result; - if ( widget == glade_xml_get_widget(editor->gui, "button-phone1") ) { - which = 1; - } else if ( widget == glade_xml_get_widget(editor->gui, "button-phone2") ) { - which = 2; - } else if ( widget == glade_xml_get_widget(editor->gui, "button-phone3") ) { - which = 3; - } else if ( widget == glade_xml_get_widget(editor->gui, "button-phone4") ) { - which = 4; - } else - return; - - label = g_strdup_printf("label-phone%d", which); - entry = g_strdup_printf("entry-phone%d", which); - - if (editor->phone_list == NULL) { - static char *info[] = { - N_("Assistant"), - N_("Business"), - N_("Business 2"), - N_("Business Fax"), - N_("Callback"), - N_("Car"), - N_("Company"), - N_("Home"), - N_("Home 2"), - N_("Home Fax"), - N_("ISDN"), - N_("Mobile"), - N_("Other"), - N_("Other Fax"), - N_("Pager"), - N_("Primary"), - N_("Radio"), - N_("Telex"), - N_("TTY/TDD") - }; - - for (i = 0; i < sizeof(info) / sizeof(info[0]); i++) { - editor->phone_list = g_list_append(editor->phone_list, g_strdup(info[i])); - } - } - if (editor->phone_info == NULL) { - e_contact_editor_build_ui_info(editor->phone_list, &editor->phone_info); - - if ( editor->phone_popup ) - gtk_widget_unref(editor->phone_popup); - - editor->phone_popup = gnome_popup_menu_new(editor->phone_info); - } - - for(i = 0; i < E_CARD_SIMPLE_PHONE_ID_LAST; i++) { - const ECardPhone *phone = e_card_simple_get_phone(editor->simple, i); - gboolean checked; - checked = phone && phone->number && *phone->number; - gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(editor->phone_info[i].widget), - checked); - gtk_check_menu_item_set_show_toggle(GTK_CHECK_MENU_ITEM(editor->phone_info[i].widget), - TRUE); - } - - result = _arrow_pressed (widget, button, editor, editor->phone_popup, &editor->phone_list, &editor->phone_info, label, entry, "Add new phone number type"); - - if (result != -1) { - editor->phone_choice[which - 1] = result; - set_fields(editor); - } - - g_free(label); - g_free(entry); -} - -static void -_email_arrow_pressed (GtkWidget *widget, GdkEventButton *button, EContactEditor *editor) -{ - int i; - int result; - if (editor->email_list == NULL) { - static char *info[] = { - N_("Primary Email"), - N_("Email 2"), - N_("Email 3") - }; - - for (i = 0; i < sizeof(info) / sizeof(info[0]); i++) { - editor->email_list = g_list_append(editor->email_list, g_strdup(info[i])); - } - } - if (editor->email_info == NULL) { - e_contact_editor_build_ui_info(editor->email_list, &editor->email_info); - - if ( editor->email_popup ) - gtk_widget_unref(editor->email_popup); - - editor->email_popup = gnome_popup_menu_new(editor->email_info); - } - - for(i = 0; i < E_CARD_SIMPLE_EMAIL_ID_LAST; i++) { - const char *string = e_card_simple_get_email(editor->simple, i); - gboolean checked; - checked = string && *string; - gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(editor->email_info[i].widget), - checked); - gtk_check_menu_item_set_show_toggle(GTK_CHECK_MENU_ITEM(editor->email_info[i].widget), - TRUE); - } - - result = _arrow_pressed (widget, button, editor, editor->email_popup, &editor->email_list, &editor->email_info, "label-email1", "entry-email1", "Add new Email type"); - - if (result != -1) { - editor->email_choice = result; - set_fields(editor); - } -} - -static void -_address_arrow_pressed (GtkWidget *widget, GdkEventButton *button, EContactEditor *editor) -{ - int i; - int result; - if (editor->address_list == NULL) { - static char *info[] = { - N_("Business"), - N_("Home"), - N_("Other") - }; - - for (i = 0; i < sizeof(info) / sizeof(info[0]); i++) { - editor->address_list = g_list_append(editor->address_list, g_strdup(info[i])); - } - } - if (editor->address_info == NULL) { - e_contact_editor_build_ui_info(editor->address_list, &editor->address_info); - - if ( editor->address_popup ) - gtk_widget_unref(editor->address_popup); - - editor->address_popup = gnome_popup_menu_new(editor->address_info); - } - - for(i = 0; i < E_CARD_SIMPLE_ADDRESS_ID_LAST; i++) { - const ECardAddrLabel *address = e_card_simple_get_address(editor->simple, i); - gboolean checked; - checked = address && address->data && *address->data; - gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(editor->address_info[i].widget), - checked); - gtk_check_menu_item_set_show_toggle(GTK_CHECK_MENU_ITEM(editor->address_info[i].widget), - TRUE); - } - - result = _arrow_pressed (widget, button, editor, editor->address_popup, &editor->address_list, &editor->address_info, "label-address", "text-address", "Add new Address type"); - - if (result != -1) { - set_address_field(editor, result); - } -} - -static void -set_field(GtkEntry *entry, const char *string) -{ - char *oldstring = gtk_entry_get_text(entry); - if (!string) - string = ""; - if (strcmp(string, oldstring)) - gtk_entry_set_text(entry, string); -} - -static void -set_phone_field(GtkWidget *entry, const ECardPhone *phone) -{ - set_field(GTK_ENTRY(entry), phone ? phone->number : ""); -} - -static void -set_fields(EContactEditor *editor) -{ - GtkWidget *entry; - - entry = glade_xml_get_widget(editor->gui, "entry-phone1"); - if (entry && GTK_IS_ENTRY(entry)) - set_phone_field(entry, e_card_simple_get_phone(editor->simple, editor->phone_choice[0])); - - entry = glade_xml_get_widget(editor->gui, "entry-phone2"); - if (entry && GTK_IS_ENTRY(entry)) - set_phone_field(entry, e_card_simple_get_phone(editor->simple, editor->phone_choice[1])); - - entry = glade_xml_get_widget(editor->gui, "entry-phone3"); - if (entry && GTK_IS_ENTRY(entry)) - set_phone_field(entry, e_card_simple_get_phone(editor->simple, editor->phone_choice[2])); - - entry = glade_xml_get_widget(editor->gui, "entry-phone4"); - if (entry && GTK_IS_ENTRY(entry)) - set_phone_field(entry, e_card_simple_get_phone(editor->simple, editor->phone_choice[3])); - - entry = glade_xml_get_widget(editor->gui, "entry-email1"); - if (entry && GTK_IS_ENTRY(entry)) - set_field(GTK_ENTRY(entry), e_card_simple_get_email(editor->simple, editor->email_choice)); - - set_address_field(editor, -1); -} - -static void -set_address_field(EContactEditor *editor, int result) -{ - GtkWidget *widget; - - widget = glade_xml_get_widget(editor->gui, "text-address"); - - if (widget && GTK_IS_TEXT(widget)) { - int position; - GtkEditable *editable; - const ECardAddrLabel *address; - - if (result == -1) - result = editor->address_choice; - editor->address_choice = -1; - - position = 0; - editable = GTK_EDITABLE(widget); - gtk_editable_delete_text(editable, 0, -1); - address = e_card_simple_get_address(editor->simple, result); - if (address && address->data) - gtk_editable_insert_text(editable, address->data, strlen(address->data), &position); - - editor->address_choice = result; - } -} - -static void -add_field_callback(GtkWidget *widget, EContactEditor *editor) -{ - const char *name; - int i; - static const char *builtins[] = { - "entry-fullname", - "entry-web", - "entry-company", - "entry-department", - "entry-office", - "entry-jobtitle", - "entry-profession", - "entry-manager", - "entry-assistant", - "entry-nickname", - "entry-spouse", - "text-comments", - "entry-categories", - "entry-contacts", - "entry-file-as", - "dateedit-anniversary", - "dateedit-birthday", - "entry-phone1", - "entry-phone2", - "entry-phone3", - "entry-phone4", - "entry-email1", - "text-address", - "checkbutton-mailingaddress", - "checkbutton-htmlmail", - NULL - }; - name = glade_get_widget_name(widget); - if (name) { - for (i = 0; builtins[i]; i++) { - if (!strcmp(name, builtins[i])) - return; - } - if (GTK_IS_ENTRY(widget) || GTK_IS_TEXT(widget)) { - editor->arbitrary_fields = g_list_prepend(editor->arbitrary_fields, g_strdup(name)); - } - } -} - -struct { - char *id; - char *key; -} field_mapping [] = { - { "entry-fullname", "full_name" }, - { "entry-web", "url" }, - { "entry-company", "org" }, - { "entry-department", "org_unit" }, - { "entry-office", "office" }, - { "entry-jobtitle", "title" }, - { "entry-profession", "role" }, - { "entry-manager", "manager" }, - { "entry-assistant", "assistant" }, - { "entry-nickname", "nickname" }, - { "entry-spouse", "spouse" }, - { "text-comments", "note" }, - { "entry-categories", "categories" }, -}; - -static void -fill_in_field(EContactEditor *editor, char *id, char *value) -{ - GtkWidget *widget = glade_xml_get_widget(editor->gui, id); - if (widget && GTK_IS_EDITABLE(widget)) { - int position = 0; - GtkEditable *editable = GTK_EDITABLE(widget); - gtk_editable_delete_text(editable, 0, -1); - if (value) - gtk_editable_insert_text(editable, value, strlen(value), &position); - } -} - -static void -fill_in_card_field(EContactEditor *editor, ECard *card, char *id, char *key) -{ - char *string; - gtk_object_get(GTK_OBJECT(card), - key, &string, - NULL); - fill_in_field(editor, id, string); -} - -static void -fill_in_single_field(EContactEditor *editor, char *name) -{ - ECardSimple *simple = editor->simple; - GtkWidget *widget = glade_xml_get_widget(editor->gui, name); - if (widget && GTK_IS_EDITABLE(widget)) { - int position = 0; - GtkEditable *editable = GTK_EDITABLE(widget); - const ECardArbitrary *arbitrary; - - gtk_editable_delete_text(editable, 0, -1); - arbitrary = e_card_simple_get_arbitrary(simple, - name); - if (arbitrary && arbitrary->value) - gtk_editable_insert_text(editable, arbitrary->value, strlen(arbitrary->value), &position); - } -} - -static void -fill_in_info(EContactEditor *editor) -{ - ECard *card = editor->card; - if (card) { - char *file_as; - ECardName *name; - const ECardDate *anniversary; - const ECardDate *bday; - int i; - GtkWidget *widget; - GList *list; - - gtk_object_get(GTK_OBJECT(card), - "file_as", &file_as, - "name", &name, - "anniversary", &anniversary, - "birth_date", &bday, - NULL); - - for (i = 0; i < sizeof(field_mapping) / sizeof(field_mapping[0]); i++) { - fill_in_card_field(editor, card, field_mapping[i].id, field_mapping[i].key); - } - - for (list = editor->arbitrary_fields; list; list = list->next) { - fill_in_single_field(editor, list->data); - } - - /* File as has to come after company and name or else it'll get messed up when setting them. */ - fill_in_field(editor, "entry-file-as", file_as); - - e_card_name_free(editor->name); - editor->name = e_card_name_copy(name); - - widget = glade_xml_get_widget(editor->gui, "dateedit-anniversary"); - if (anniversary && widget && GNOME_IS_DATE_EDIT(widget)) { - struct tm time_struct = {0,0,0,0,0,0,0,0,0}; - time_t time_val; - GnomeDateEdit *dateedit; - - time_struct.tm_mday = anniversary->day; - time_struct.tm_mon = anniversary->month - 1; - time_struct.tm_year = anniversary->year - 1900; - time_val = mktime(&time_struct); - dateedit = GNOME_DATE_EDIT(widget); - gnome_date_edit_set_time(dateedit, time_val); - } - - widget = glade_xml_get_widget(editor->gui, "dateedit-birthday"); - if (bday && widget && GNOME_IS_DATE_EDIT(widget)) { - struct tm time_struct = {0,0,0,0,0,0,0,0,0}; - time_t time_val; - GnomeDateEdit *dateedit; - time_struct.tm_mday = bday->day; - time_struct.tm_mon = bday->month - 1; - time_struct.tm_year = bday->year - 1900; - time_val = mktime(&time_struct); - dateedit = GNOME_DATE_EDIT(widget); - gnome_date_edit_set_time(dateedit, time_val); - } - - set_fields(editor); - } -} - -static void -extract_field(EContactEditor *editor, ECard *card, char *editable_id, char *key) -{ - GtkWidget *widget = glade_xml_get_widget(editor->gui, editable_id); - if (widget && GTK_IS_EDITABLE(widget)) { - GtkEditable *editable = GTK_EDITABLE(widget); - char *string = gtk_editable_get_chars(editable, 0, -1); - if (string && *string) - gtk_object_set(GTK_OBJECT(card), - key, string, - NULL); - else - gtk_object_set(GTK_OBJECT(card), - key, NULL, - NULL); - g_free(string); - } -} - -static void -extract_single_field(EContactEditor *editor, char *name) -{ - GtkWidget *widget = glade_xml_get_widget(editor->gui, name); - ECardSimple *simple = editor->simple; - if (widget && GTK_IS_EDITABLE(widget)) { - GtkEditable *editable = GTK_EDITABLE(widget); - char *string = gtk_editable_get_chars(editable, 0, -1); - - if (string && *string) - e_card_simple_set_arbitrary(simple, - name, - NULL, - string); - else - e_card_simple_set_arbitrary(simple, - name, - NULL, - NULL); - g_free(string); - } -} - -static void -extract_info(EContactEditor *editor) -{ - ECard *card = editor->card; - if (card) { - ECardDate *anniversary; - ECardDate *bday; - struct tm time_struct; - time_t time_val; - int i; - GtkWidget *widget; - GList *list; - - widget = glade_xml_get_widget(editor->gui, "entry-file-as"); - if (widget && GTK_IS_EDITABLE(widget)) { - GtkEditable *editable = GTK_EDITABLE(widget); - char *string = gtk_editable_get_chars(editable, 0, -1); - if (string && *string) - gtk_object_set(GTK_OBJECT(card), - "file_as", string, - NULL); - g_free(string); - } - - for (i = 0; i < sizeof(field_mapping) / sizeof(field_mapping[0]); i++) { - extract_field(editor, card, field_mapping[i].id, field_mapping[i].key); - } - - for (list = editor->arbitrary_fields; list; list = list->next) { - extract_single_field(editor, list->data); - } - - if (editor->name) - gtk_object_set(GTK_OBJECT(card), - "name", editor->name, - NULL); - - widget = glade_xml_get_widget(editor->gui, "dateedit-anniversary"); - if (widget && GNOME_IS_DATE_EDIT(widget)) { - time_val = gnome_date_edit_get_date(GNOME_DATE_EDIT(widget)); - gmtime_r(&time_val, - &time_struct); - anniversary = g_new(ECardDate, 1); - anniversary->day = time_struct.tm_mday; - anniversary->month = time_struct.tm_mon + 1; - anniversary->year = time_struct.tm_year + 1900; - gtk_object_set(GTK_OBJECT(card), - "anniversary", anniversary, - NULL); - } - - widget = glade_xml_get_widget(editor->gui, "dateedit-birthday"); - if (widget && GNOME_IS_DATE_EDIT(widget)) { - time_val = gnome_date_edit_get_date(GNOME_DATE_EDIT(widget)); - gmtime_r(&time_val, - &time_struct); - bday = g_new(ECardDate, 1); - bday->day = time_struct.tm_mday; - bday->month = time_struct.tm_mon + 1; - bday->year = time_struct.tm_year + 1900; - gtk_object_set(GTK_OBJECT(card), - "birth_date", bday, - NULL); - } - } -} diff --git a/addressbook/contact-editor/e-contact-editor.h b/addressbook/contact-editor/e-contact-editor.h deleted file mode 100644 index 288cec1db0..0000000000 --- a/addressbook/contact-editor/e-contact-editor.h +++ /dev/null @@ -1,96 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* e-contact-editor.h - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -#ifndef __E_CONTACT_EDITOR_H__ -#define __E_CONTACT_EDITOR_H__ - -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus */ - -/* EContactEditor - A dialog displaying information about a contact. - * - * The following arguments are available: - * - * name type read/write description - * -------------------------------------------------------------------------------- - * card ECard * RW The card currently being edited - */ - -#define E_CONTACT_EDITOR_TYPE (e_contact_editor_get_type ()) -#define E_CONTACT_EDITOR(obj) (GTK_CHECK_CAST ((obj), E_CONTACT_EDITOR_TYPE, EContactEditor)) -#define E_CONTACT_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_CONTACT_EDITOR_TYPE, EContactEditorClass)) -#define E_IS_CONTACT_EDITOR(obj) (GTK_CHECK_TYPE ((obj), E_CONTACT_EDITOR_TYPE)) -#define E_IS_CONTACT_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_CONTACT_EDITOR_TYPE)) - - -typedef struct _EContactEditor EContactEditor; -typedef struct _EContactEditorClass EContactEditorClass; - -struct _EContactEditor -{ - GtkVBox parent; - - /* item specific fields */ - ECard *card; - ECardSimple *simple; - - GladeXML *gui; - GnomeUIInfo *email_info; - GnomeUIInfo *phone_info; - GnomeUIInfo *address_info; - GtkWidget *email_popup; - GtkWidget *phone_popup; - GtkWidget *address_popup; - GList *email_list; - GList *phone_list; - GList *address_list; - - ECardName *name; - char *company; - - ECardSimpleEmailId email_choice; - ECardSimplePhoneId phone_choice[4]; - ECardSimpleAddressId address_choice; - - GList *arbitrary_fields; -}; - -struct _EContactEditorClass -{ - GtkVBoxClass parent_class; -}; - - -GtkWidget *e_contact_editor_new(ECard *card); -GtkType e_contact_editor_get_type (void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -#endif /* __E_CONTACT_EDITOR_H__ */ diff --git a/addressbook/contact-editor/e-contact-save-as.c b/addressbook/contact-editor/e-contact-save-as.c deleted file mode 100644 index 51cb2619e7..0000000000 --- a/addressbook/contact-editor/e-contact-save-as.c +++ /dev/null @@ -1,77 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* e-contact-editor.h - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include -#include -#include -#include - -typedef struct { - GtkFileSelection *filesel; - ECard *card; -} SaveAsInfo; - -static void -save_it(GtkWidget *widget, SaveAsInfo *info) -{ - char *vcard = e_card_get_vcard(info->card); - const char *filename = gtk_file_selection_get_filename(info->filesel); - e_write_file(filename, vcard, O_WRONLY | O_CREAT | O_EXCL | O_TRUNC); - g_free(vcard); - gtk_object_unref(GTK_OBJECT(info->card)); - gtk_widget_destroy(GTK_WIDGET(info->filesel)); - g_free(info); -} - -static void -close_it(GtkWidget *widget, SaveAsInfo *info) -{ - gtk_object_unref(GTK_OBJECT(info->card)); - gtk_widget_destroy(GTK_WIDGET(info->filesel)); - g_free(info); -} - -static void -delete_it(GtkWidget *widget, SaveAsInfo *info) -{ - gtk_object_unref(GTK_OBJECT(info->card)); - g_free(info); -} - -void -e_contact_save_as(char *title, ECard *card) -{ - GtkFileSelection *filesel; - SaveAsInfo *info = g_new(SaveAsInfo, 1); - - filesel = GTK_FILE_SELECTION(gtk_file_selection_new(title)); - - info->filesel = filesel; - info->card = e_card_duplicate(card); - - gtk_signal_connect(GTK_OBJECT(filesel->ok_button), "clicked", - save_it, info); - gtk_signal_connect(GTK_OBJECT(filesel->cancel_button), "clicked", - close_it, info); - gtk_signal_connect(GTK_OBJECT(filesel), "delete_event", - delete_it, info); - gtk_widget_show(GTK_WIDGET(filesel)); -} diff --git a/addressbook/contact-editor/e-contact-save-as.h b/addressbook/contact-editor/e-contact-save-as.h deleted file mode 100644 index e6af13e8fd..0000000000 --- a/addressbook/contact-editor/e-contact-save-as.h +++ /dev/null @@ -1,42 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* e-contact-save-as.h - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -#ifndef __E_CONTACT_SAVE_AS_H__ -#define __E_CONTACT_SAVE_AS_H__ - -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus */ - -void -e_contact_save_as(gchar *title, ECard *card); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -#endif /* __E_CONTACT_EDITOR_H__ */ diff --git a/addressbook/contact-editor/email.png b/addressbook/contact-editor/email.png deleted file mode 100644 index f3ff02e343..0000000000 Binary files a/addressbook/contact-editor/email.png and /dev/null differ diff --git a/addressbook/contact-editor/fullname-strings.h b/addressbook/contact-editor/fullname-strings.h deleted file mode 100644 index 0c84dfdc8f..0000000000 --- a/addressbook/contact-editor/fullname-strings.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Translatable strings file generated by Glade. - * Add this file to your project's POTFILES.in. - * DO NOT compile it as part of your application. - */ - -gchar *s = N_("Check Full Name"); -gchar *s = N_("_Title:"); -gchar *s = N_("_First:"); -gchar *s = N_("_Middle:"); -gchar *s = N_("_Last:"); -gchar *s = N_("_Suffix:"); -gchar *s = N_("\n" - "Mr.\n" - "Mrs.\n" - "Dr.\n" - ""); -gchar *s = N_("\n" - "Sr.\n" - "Jr.\n" - "I\n" - "II\n" - "III\n" - "Esq.\n" - ""); diff --git a/addressbook/contact-editor/fullname.glade b/addressbook/contact-editor/fullname.glade deleted file mode 100644 index 8f811c5616..0000000000 --- a/addressbook/contact-editor/fullname.glade +++ /dev/null @@ -1,391 +0,0 @@ - - - - - fullname - fullname - - src - pixmaps - C - True - True - True - False - False - False - True - interface.c - interface.h - callbacks.c - callbacks.h - support.c - support.h - True - fullname-strings.h - - - - GnomeDialog - dialog-checkfullname - False - Check Full Name - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - True - True - True - False - False - False - - - GtkVBox - GnomeDialog:vbox - vbox-container - False - 8 - - 4 - True - True - - - - GtkTable - table-checkfullname - 8 - 5 - 3 - False - 6 - 21 - - 0 - True - True - - - - GtkAccelLabel - accellabel1 - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 0 - 1 - 0 - 1 - 0 - 0 - False - False - False - False - True - True - - - - - GtkAccelLabel - accellabel2 - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 0 - 1 - 1 - 2 - 0 - 0 - False - False - False - False - True - True - - - - - GtkAccelLabel - accellabel3 - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 0 - 1 - 2 - 3 - 0 - 0 - False - False - False - False - True - True - - - - - GtkAccelLabel - accellabel4 - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 0 - 1 - 3 - 4 - 0 - 0 - False - False - False - False - True - True - - - - - GtkAccelLabel - accellabel5 - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 0 - 1 - 4 - 5 - 0 - 0 - False - False - False - False - True - True - - - - - GtkCombo - combo-title - False - True - False - True - False - -Mr. -Mrs. -Dr. - - - 1 - 2 - 0 - 1 - 0 - 0 - True - False - False - False - True - False - - - - GtkEntry - GtkCombo:entry - entry-title - True - True - True - 0 - - - - - - GtkCombo - combo-suffix - False - True - False - True - False - -Sr. -Jr. -I -II -III -Esq. - - - 1 - 2 - 4 - 5 - 0 - 0 - True - False - False - False - True - False - - - - GtkEntry - GtkCombo:entry - entry-suffix - True - True - True - 0 - - - - - - GtkEntry - entry-first - True - True - True - 0 - - - 1 - 3 - 1 - 2 - 0 - 0 - True - False - False - False - True - False - - - - - GtkEntry - entry-middle - True - True - True - 0 - - - 1 - 3 - 2 - 3 - 0 - 0 - True - False - False - False - True - False - - - - - GtkEntry - entry-last - True - True - True - 0 - - - 1 - 3 - 3 - 4 - 0 - 0 - True - False - False - False - True - False - - - - - - GtkHButtonBox - GnomeDialog:action_area - hbuttonbox1 - GTK_BUTTONBOX_END - 8 - 85 - 27 - 7 - 0 - - 0 - False - True - GTK_PACK_END - - - - GtkButton - button1 - True - True - GNOME_STOCK_BUTTON_OK - - - - GtkButton - button2 - True - True - GNOME_STOCK_BUTTON_CANCEL - - - - - - diff --git a/addressbook/contact-editor/head.png b/addressbook/contact-editor/head.png deleted file mode 100644 index ca00b75f92..0000000000 Binary files a/addressbook/contact-editor/head.png and /dev/null differ diff --git a/addressbook/contact-editor/netfreebusy.png b/addressbook/contact-editor/netfreebusy.png deleted file mode 100644 index 09ec8a2a5c..0000000000 Binary files a/addressbook/contact-editor/netfreebusy.png and /dev/null differ diff --git a/addressbook/contact-editor/netmeeting.png b/addressbook/contact-editor/netmeeting.png deleted file mode 100644 index 4cb90c121e..0000000000 Binary files a/addressbook/contact-editor/netmeeting.png and /dev/null differ diff --git a/addressbook/contact-editor/phone.png b/addressbook/contact-editor/phone.png deleted file mode 100644 index ebec84ba0b..0000000000 Binary files a/addressbook/contact-editor/phone.png and /dev/null differ diff --git a/addressbook/contact-editor/snailmail.png b/addressbook/contact-editor/snailmail.png deleted file mode 100644 index 647ae8f68c..0000000000 Binary files a/addressbook/contact-editor/snailmail.png and /dev/null differ diff --git a/addressbook/contact-editor/test-editor.c b/addressbook/contact-editor/test-editor.c deleted file mode 100644 index 5b48c1a92f..0000000000 --- a/addressbook/contact-editor/test-editor.c +++ /dev/null @@ -1,158 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * test-editor.c - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include "config.h" - -#include -#include -#include "e-contact-editor.h" - -#define TEST_VCARD \ -"BEGIN:VCARD -" \ -"FN:Nat -" \ -"N:Friedman;Nat;D;Mr. -" \ -"BDAY:1977-08-06 -" \ -"TEL;WORK:617 679 1984 -" \ -"TEL;CELL:123 456 7890 -" \ -"EMAIL;INTERNET:nat@nat.org -" \ -"EMAIL;INTERNET:nat@helixcode.com -" \ -"ADR;WORK;POSTAL:P.O. Box 101;;;Any Town;CA;91921-1234; -" \ -"ADR;HOME;POSTAL;INTL:P.O. Box 202;;;Any Town 2;MI;12344-4321;USA -" \ -"END:VCARD -" \ -" -" - -static char * -read_file (char *name) -{ - int len; - char buff[65536]; - char line[1024]; - FILE *f; - - f = fopen (name, "r"); - if (f == NULL) - g_error ("Unable to open %s!\n", name); - - len = 0; - while (fgets (line, sizeof (line), f) != NULL) { - strcpy (buff + len, line); - len += strlen (line); - } - - fclose (f); - - return g_strdup (buff); -} - -/* This is a horrible thing to do, but it is just a test. */ -GtkWidget *editor; - -static void destroy_callback(GtkWidget *app, gpointer data) -{ - static int count = 2; - count --; - if ( count <= 0 ) - exit(0); -} - -#if 0 -static void about_callback( GtkWidget *widget, gpointer data ) -{ - - const gchar *authors[] = - { - "Christopher James Lahey ", - NULL - }; - - GtkWidget *about = - gnome_about_new ( _( "Contact Editor Test" ), VERSION, - _( "Copyright (C) 2000, Helix Code, Inc." ), - authors, - _( "This should test the contact editor canvas item" ), - NULL); - gtk_widget_show (about); -} -#endif - -int main( int argc, char *argv[] ) -{ - char *cardstr; - GtkWidget *app; - - /* bindtextdomain (PACKAGE, GNOMELOCALEDIR); - textdomain (PACKAGE);*/ - - gnome_init( "Contact Editor Test", VERSION, argc, argv); - - glade_gnome_init (); - - app = gnome_app_new("Contact Editor Test", NULL); - - cardstr = NULL; - if (argc == 2) - cardstr = read_file (argv [1]); - - if (cardstr == NULL) - cardstr = TEST_VCARD; - - editor = e_contact_editor_new(e_card_new(cardstr)); - - gnome_app_set_contents( GNOME_APP( app ), editor ); - - /* Connect the signals */ - gtk_signal_connect( GTK_OBJECT( app ), "destroy", - GTK_SIGNAL_FUNC( destroy_callback ), - ( gpointer ) app ); - - gtk_widget_show_all( app ); - - app = gnome_app_new("Contact Editor Test", NULL); - - editor = e_contact_editor_new(e_card_new(cardstr)); - - gnome_app_set_contents( GNOME_APP( app ), editor ); - - /* Connect the signals */ - gtk_signal_connect( GTK_OBJECT( app ), "destroy", - GTK_SIGNAL_FUNC( destroy_callback ), - ( gpointer ) app ); - - gtk_widget_show_all( app ); - - gtk_main(); - - /* Not reached. */ - return 0; -} diff --git a/addressbook/contact-editor/web.png b/addressbook/contact-editor/web.png deleted file mode 100644 index 3211a11b19..0000000000 Binary files a/addressbook/contact-editor/web.png and /dev/null differ diff --git a/addressbook/demo/.cvsignore b/addressbook/demo/.cvsignore deleted file mode 100644 index a0427f184f..0000000000 --- a/addressbook/demo/.cvsignore +++ /dev/null @@ -1,8 +0,0 @@ -.deps -.libs -Makefile -Makefile.in -*.lo -*.la -evolution-addressbook -test-addressbook \ No newline at end of file diff --git a/addressbook/demo/Makefile.am b/addressbook/demo/Makefile.am deleted file mode 100644 index 1a7e4e6d01..0000000000 --- a/addressbook/demo/Makefile.am +++ /dev/null @@ -1,63 +0,0 @@ -INCLUDES = \ - $(EXTRA_GNOME_CFLAGS) \ - $(GNOME_INCLUDEDIR) \ - -I$(top_srcdir)/widgets/e-text \ - -I$(top_srcdir)/e-util \ - -I$(top_srcdir)/widgets/e-table \ - -I$(top_srcdir) \ - -I$(top_srcdir)/widgets/e-minicard \ - -I$(top_srcdir)/addressbook/backend/ebook \ - $(BONOBO_HTML_GNOME_CFLAGS) \ - -DEVOLUTION_VERSION=\""$(VERSION)"\" \ - -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \ - -DEVOLUTION_ICONSDIR=\""$(iconsdir)"\" \ - -DEVOLUTION_LOCALEDIR=\""$(datadir)/locale"\" \ - -DCAMEL_PROVIDERDIR=\""$(providerdir)"\" \ - -DG_LOG_DOMAIN=\"addressbook-demo\" - -noinst_PROGRAMS = \ - test-addressbook - -test_addressbook_SOURCES = \ - demo.c \ - e-test-model.c \ - e-test-model.h - -test_addressbook_LDADD = \ - $(EXTRA_GNOME_LIBS) \ - $(BONOBO_HTML_GNOME_LIBS) \ - $(top_builddir)/widgets/e-minicard/libeminicard.a \ - $(top_builddir)/widgets/e-table/libetable.a \ - $(top_builddir)/widgets/e-text/libetext.a \ - $(top_builddir)/e-util/libeutil.la \ - $(top_builddir)/addressbook/backend/ebook/libebook.la \ - $(top_builddir)/libversit/libversit.la - -test_addressbook_LDFLAGS = `gnome-config --libs gdk_pixbuf` - -bin_PROGRAMS = \ - evolution-addressbook - -evolution_addressbook_SOURCES = \ - addressbook-factory.c \ - addressbook-widget.c \ - addressbook-widget.h \ - addressbook.c \ - addressbook.h \ - e-test-model.c \ - e-test-model.h - -evolution_addressbook_LDADD = \ - $(EXTRA_GNOME_LIBS) \ - $(BONOBO_HTML_GNOME_LIBS) \ - $(top_builddir)/widgets/e-minicard/libeminicard.a \ - $(top_builddir)/widgets/e-table/libetable.a \ - $(top_builddir)/widgets/e-text/libetext.a \ - $(top_builddir)/e-util/libeutil.la \ - $(top_builddir)/addressbook/backend/ebook/libebook.la \ - $(top_builddir)/libversit/libversit.la - -evolution_addressbook_LDFLAGS = `gnome-config --libs gdk_pixbuf` - -gnorbadir = $(sysconfdir)/CORBA/servers -gnorba_DATA = addressbook.gnorba diff --git a/addressbook/demo/addressbook-factory.c b/addressbook/demo/addressbook-factory.c deleted file mode 100644 index cf59177f84..0000000000 --- a/addressbook/demo/addressbook-factory.c +++ /dev/null @@ -1,47 +0,0 @@ -/** - * sample-control-factory.c - * - * Copyright 1999, Helix Code, Inc. - * - * Author: - * Nat Friedman (nat@nat.org) - * - */ - -#include -#include -#include -#include - -#include "addressbook.h" - -CORBA_Environment ev; -CORBA_ORB orb; - -static void -init_bonobo (int argc, char **argv) -{ - - gnome_CORBA_init_with_popt_table ( - "evolution-addressbook", "0.0", - &argc, argv, NULL, 0, NULL, GNORBA_INIT_SERVER_FUNC, &ev); - - orb = gnome_CORBA_ORB (); - - if (bonobo_init (orb, NULL, NULL) == FALSE) - g_error (_("Could not initialize Bonobo")); -} - -int -main (int argc, char **argv) -{ - CORBA_exception_init (&ev); - - init_bonobo (argc, argv); - - addressbook_factory_init (); - - bonobo_main (); - - return 0; -} diff --git a/addressbook/demo/addressbook-widget.c b/addressbook/demo/addressbook-widget.c deleted file mode 100644 index dfe531c787..0000000000 --- a/addressbook/demo/addressbook-widget.c +++ /dev/null @@ -1,537 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * demo.c - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */ - -#include -#include -#include -#include -#include -#include -#include "e-util/e-cursors.h" -#include "e-canvas.h" -#include "e-table-simple.h" -#include "e-table-header.h" -#include "e-table-header-item.h" -#include "e-table-item.h" -#include "e-cell-text.h" -#include "e-cell-checkbox.h" -#include "e-table.h" -#include "e-reflow.h" -#include "e-minicard.h" -#include - -#include "e-test-model.h" - -#include "addressbook-widget.h" - -#define COLS 4 - -/* Here we define the initial layout of the table. This is an xml - format that allows you to change the initial ordering of the - columns or to do sorting or grouping initially. This specification - shows all 5 columns, but moves the importance column nearer to the - front. It also sorts by the "Full Name" column (ascending.) - Sorting and grouping take the model column as their arguments - (sorting is specified by the "column" argument to the leaf elemnt. */ -#define INITIAL_SPEC " \ - \ - 0 \ - 1 \ - 2 \ - 3 \ - \ - \ -" - -char *headers[COLS] = { - "Email", - "Full Name", - "Address", - "Phone" -}; - -static int window_count = 0; -static GHashTable *models = NULL; - -static void -remove_model(ETableModel *model, gchar *filename) -{ - g_hash_table_remove(models, filename); - g_free(filename); -} - -static ETestModel * -get_model(char *filename) -{ - ETestModel *model; - gboolean free_filename = FALSE; - - if ( filename == NULL ) { - filename = gnome_util_prepend_user_home("addressbook.xml"); - free_filename = TRUE; - } - - if ( models == NULL ) { - models = g_hash_table_new(g_str_hash, g_str_equal); - } - - model = g_hash_table_lookup(models, filename); - if ( model ) { - if (free_filename) - g_free(filename); - return model; - } - - if ( !free_filename ) - filename = g_strdup(filename); - - model = E_TEST_MODEL(e_test_model_new(filename)); - g_hash_table_insert(models, - filename, model); - gtk_signal_connect(GTK_OBJECT(model), "destroy", - GTK_SIGNAL_FUNC(remove_model), filename); - - return model; -} - -static void -add_address_cb(GtkWidget *button, gpointer data) -{ - View *view = (View *) data; - Address *newadd = g_new(Address, 1); - newadd->email = g_strdup(""); - newadd->phone = g_strdup(""); - newadd->full_name = g_strdup(""); - newadd->street = g_strdup(""); - e_test_model_add_column (view->model, newadd); -} - -static void -rebuild_reflow(ETableModel *model, gpointer data) -{ - int i; - View *view = (View *) data; - Reflow *reflow = view->reflow; - if (!reflow) - return; - gtk_object_destroy(GTK_OBJECT(reflow->reflow)); - reflow->reflow = gnome_canvas_item_new( gnome_canvas_root( GNOME_CANVAS( reflow->canvas ) ), - e_reflow_get_type(), - "x", (double) 0, - "y", (double) 0, - "height", (double) reflow->last_alloc.height, - "minimum_width", (double) reflow->last_alloc.width, - NULL ); - - for ( i = 0; i < view->model->data_count; i++ ) - { - GnomeCanvasItem *item; - item = gnome_canvas_item_new( GNOME_CANVAS_GROUP(reflow->reflow), - e_minicard_get_type(), - "model", view->model, - "row", i, - NULL); - e_reflow_add_item(E_REFLOW(reflow->reflow), item); - } - e_canvas_item_request_reflow(reflow->reflow); -} - -static void -destroy_reflow(View *view) -{ - Reflow *reflow = view->reflow; - if ( !reflow ) - return; - - gtk_signal_disconnect(GTK_OBJECT(view->model), - reflow->model_changed_id); - g_free(reflow); - gtk_object_unref(GTK_OBJECT(view->model)); - view->reflow = NULL; -} - -static void -destroy_callback(GtkWidget *app, gpointer data) -{ - View *view = (View *)data; - if ( view->reflow ) { - destroy_reflow(view); - } - gtk_object_unref(GTK_OBJECT(view->model)); - g_free(view); - window_count --; - if ( window_count <= 0 ) - gtk_main_quit(); -} - -static void allocate_callback(GtkWidget *canvas, GtkAllocation *allocation, gpointer data) -{ - double width; - View *view = (View *)data; - Reflow *reflow = view->reflow; - if ( !reflow ) - return; - reflow->last_alloc = *allocation; - gnome_canvas_item_set( reflow->reflow, - "height", (double) allocation->height, - NULL ); - gnome_canvas_item_set( reflow->reflow, - "minimum_width", (double) allocation->width, - NULL ); - gtk_object_get(GTK_OBJECT(reflow->reflow), - "width", &width, - NULL); - width = MAX(width, allocation->width); - gnome_canvas_set_scroll_region(GNOME_CANVAS( reflow->canvas ), 0, 0, width, allocation->height ); - gnome_canvas_item_set( reflow->rect, - "x2", (double) width, - "y2", (double) allocation->height, - NULL ); -} - -static void resize(ECanvas *canvas, gpointer data) -{ - double width; - View *view = (View *)data; - Reflow *reflow = view->reflow; - if ( !reflow ) - return; - gtk_object_get(GTK_OBJECT(reflow->reflow), - "width", &width, - NULL); - width = MAX(width, reflow->last_alloc.width); - gnome_canvas_set_scroll_region(GNOME_CANVAS(reflow->canvas), 0, 0, width, reflow->last_alloc.height ); - gnome_canvas_item_set( reflow->rect, - "x2", (double) width, - "y2", (double) reflow->last_alloc.height, - NULL ); -} - -static void -canvas_realized(GtkLayout *layout, View *view) -{ - gdk_window_set_back_pixmap( layout->bin_window, NULL, FALSE); -} - -static GtkWidget * -create_reflow(View *view) -{ - GtkWidget *inner_vbox; - GtkWidget *scrollbar; - int i; - Reflow *reflow = g_new(Reflow, 1); - view->reflow = reflow; - - view->type = VIEW_TYPE_REFLOW; - - /* Next we create our model. This uses the functions we defined - earlier. */ - - inner_vbox = gtk_vbox_new(FALSE, 0); - reflow->canvas = e_canvas_new(); - reflow->rect = gnome_canvas_item_new( gnome_canvas_root( GNOME_CANVAS( reflow->canvas ) ), - gnome_canvas_rect_get_type(), - "x1", (double) 0, - "y1", (double) 0, - "x2", (double) 100, - "y2", (double) 100, - "fill_color", "white", - NULL ); - reflow->reflow = gnome_canvas_item_new( gnome_canvas_root( GNOME_CANVAS( reflow->canvas ) ), - e_reflow_get_type(), - "x", (double) 0, - "y", (double) 0, - "height", (double) 100, - "minimum_width", (double) 100, - NULL ); - /* Connect the signals */ - gtk_signal_connect( GTK_OBJECT( reflow->canvas ), "reflow", - GTK_SIGNAL_FUNC( resize ), - ( gpointer ) view); - - for ( i = 0; i < view->model->data_count; i++ ) - { - GnomeCanvasItem *item; - item = gnome_canvas_item_new( GNOME_CANVAS_GROUP(reflow->reflow), - e_minicard_get_type(), - "model", view->model, - "row", i, - NULL); - e_reflow_add_item(E_REFLOW(reflow->reflow), item); - } - gnome_canvas_set_scroll_region ( GNOME_CANVAS( reflow->canvas ), - 0, 0, - 100, 100 ); - - scrollbar = gtk_hscrollbar_new(gtk_layout_get_hadjustment(GTK_LAYOUT(reflow->canvas))); - - gtk_signal_connect( GTK_OBJECT( reflow->canvas ), "size_allocate", - GTK_SIGNAL_FUNC( allocate_callback ), - ( gpointer ) view ); - - gtk_signal_connect( GTK_OBJECT(reflow->canvas), "realize", - GTK_SIGNAL_FUNC(canvas_realized), view); - - reflow->model_changed_id = gtk_signal_connect(GTK_OBJECT( view->model ), "model_changed", - GTK_SIGNAL_FUNC(rebuild_reflow), view); - - gtk_object_ref(GTK_OBJECT(view->model)); - - /* Build the gtk widget hierarchy. */ - gtk_box_pack_start(GTK_BOX(inner_vbox), reflow->canvas, TRUE, TRUE, 0); - gtk_box_pack_start(GTK_BOX(inner_vbox), scrollbar, FALSE, FALSE, 0); - - return inner_vbox; -} - -/* We create a window containing our new table. */ -static GtkWidget * -create_table(View *view) -{ - ECell *cell_left_just; - ETableHeader *e_table_header; - GtkWidget *e_table; - int i; - - view->type = VIEW_TYPE_TABLE; - - /* - Next we create a header. The ETableHeader is used in two - different way. The first is the full_header. This is the - list of possible columns in the view. The second use is - completely internal. Many of the ETableHeader functions are - for that purpose. The only functions we really need are - e_table_header_new and e_table_header_add_col. - - First we create the header. */ - e_table_header = e_table_header_new (); - - /* Next we have to build renderers for all of the columns. - Since all our columns are text columns, we can simply use - the same renderer over and over again. If we had different - types of columns, we could use a different renderer for - each column. */ - cell_left_just = e_cell_text_new (E_TABLE_MODEL(view->model), NULL, GTK_JUSTIFY_LEFT); - - /* Next we create a column object for each view column and add - them to the header. We don't create a column object for - the importance column since it will not be shown. */ - for (i = 0; i < LAST_COL; i++){ - /* Create the column. */ - ETableCol *ecol = e_table_col_new ( - i, headers [i], - 80, 20, cell_left_just, - g_str_compare, TRUE); - /* Add it to the header. */ - e_table_header_add_column (e_table_header, ecol, i); - } - - /* Here we create the table. We give it the three pieces of - the table we've created, the header, the model, and the - initial layout. It does the rest. */ - e_table = e_table_new_from_spec_file (e_table_header, E_TABLE_MODEL(view->model), "spec"); - -#if 0 - gtk_signal_connect(GTK_OBJECT(E_TABLE(e_table)->sort_info), "sort_info_changed", - GTK_SIGNAL_FUNC(queue_header_save), e_table->sort_info); - - gtk_signal_connect(GTK_OBJECT(E_TABLE(e_table)->header), "structure_change", - GTK_SIGNAL_FUNC(queue_header_save), e_table->sort_info); - gtk_signal_connect(GTK_OBJECT(E_TABLE(e_table)->header), "dimension_change", - GTK_SIGNAL_FUNC(queue_header_save), e_table->sort_info); -#endif - - return e_table; -} - -void -change_type(View *view, ViewType type) -{ - gtk_object_ref(GTK_OBJECT(view->model)); - if (view->reflow) - destroy_reflow(view); - gtk_widget_destroy(view->child); - switch(type) { - case VIEW_TYPE_REFLOW: - view->child = create_reflow(view); - break; - case VIEW_TYPE_TABLE: - view->child = create_table(view); - break; - } - gtk_container_add(GTK_CONTAINER(view->frame), view->child); - gtk_widget_show_all(view->child); - gtk_object_unref(GTK_OBJECT(view->model)); -} - -View * -create_view(void) -{ - View *view = g_new(View, 1); - ViewType type = VIEW_TYPE_REFLOW; - GtkWidget *button; - - view->reflow = NULL; - - view->model = get_model(NULL); - - /* This frame is simply to get a bevel around our table. */ - view->frame = gtk_frame_new (NULL); - - switch(type) { - case VIEW_TYPE_REFLOW: - view->child = create_reflow(view); - break; - case VIEW_TYPE_TABLE: - view->child = create_table(view); - break; - } - - - gtk_signal_connect( GTK_OBJECT( view->child ), "destroy", - GTK_SIGNAL_FUNC( destroy_callback ), - view ); - - /* - vbox = gtk_vbox_new(FALSE, 0); - button = gtk_button_new_with_label("Add address"); - gtk_signal_connect(GTK_OBJECT(button), "clicked", - GTK_SIGNAL_FUNC(add_address_cb), view); - - change_button = gtk_button_new_with_label("Change View"); - gtk_signal_connect(GTK_OBJECT(change_button), "clicked", - GTK_SIGNAL_FUNC(change_callback), view); - */ - /* Build the gtk widget hierarchy. */ - - view->widget = gtk_vbox_new(FALSE, 0); - - button = gtk_button_new_with_label("Add address"); - gtk_signal_connect(GTK_OBJECT(button), "clicked", - GTK_SIGNAL_FUNC(add_address_cb), view); - - gtk_container_add (GTK_CONTAINER (view->frame), view->child); - gtk_box_pack_start (GTK_BOX (view->widget), view->frame, TRUE, TRUE, 0); - gtk_box_pack_start (GTK_BOX (view->widget), button, FALSE, FALSE, 0); - /* - gtk_box_pack_start (GTK_BOX (vbox), change_button, FALSE, FALSE, 0); - */ - /* Show it all. */ - gtk_widget_show_all (view->widget); - gtk_object_ref(GTK_OBJECT(view->model)); - gtk_object_sink(GTK_OBJECT(view->model)); - window_count ++; - return view; - -} - -#if 0 -static void -change_callback(GtkWidget *button, View *view) -{ - if (view->type == VIEW_TYPE_REFLOW) - change_type(view, VIEW_TYPE_TABLE); - else - change_type(view, VIEW_TYPE_REFLOW); -} - -static GtkWidget * -create_window(char *filename, ViewType type) -{ - GtkWidget *button; - GtkWidget *change_button; - GtkWidget *vbox; - View *view = g_new(View, 1); - - view->reflow = NULL; - - view->model = get_model(filename); - - /* Here we create a window for our new table. This window - will get shown and the person will be able to test their - item. */ - view->window = gtk_window_new (GTK_WINDOW_TOPLEVEL); - - gtk_signal_connect( GTK_OBJECT( view->window ), "destroy", - GTK_SIGNAL_FUNC( destroy_callback ), - view ); - - /* This frame is simply to get a bevel around our table. */ - view->frame = gtk_frame_new (NULL); - - switch(type) { - case VIEW_TYPE_REFLOW: - view->child = create_reflow(view); - break; - case VIEW_TYPE_TABLE: - view->child = create_table(view); - break; - } - - - vbox = gtk_vbox_new(FALSE, 0); - - button = gtk_button_new_with_label("Add address"); - gtk_signal_connect(GTK_OBJECT(button), "clicked", - GTK_SIGNAL_FUNC(add_address_cb), view); - - change_button = gtk_button_new_with_label("Change View"); - gtk_signal_connect(GTK_OBJECT(change_button), "clicked", - GTK_SIGNAL_FUNC(change_callback), view); - - /* Build the gtk widget hierarchy. */ - - gtk_container_add (GTK_CONTAINER (view->frame), view->child); - gtk_box_pack_start (GTK_BOX (vbox), view->frame, TRUE, TRUE, 0); - gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (vbox), change_button, FALSE, FALSE, 0); - gtk_container_add (GTK_CONTAINER (view->window), vbox); - - /* Size the initial window. */ - gtk_widget_set_usize (view->window, 200, 200); - /* Show it all. */ - gtk_widget_show_all (view->window); - gtk_object_sink(GTK_OBJECT(view->model)); - window_count ++; - return view->window; -} - -/* This is the main function which just initializes gnome and call our create_table function */ - -int -main (int argc, char *argv []) -{ - gnome_init ("TableExample", "TableExample", argc, argv); - e_cursors_init (); - - gtk_widget_push_visual (gdk_rgb_get_visual ()); - gtk_widget_push_colormap (gdk_rgb_get_cmap ()); - - create_window("addressbook.xml", VIEW_TYPE_TABLE); - create_window("addressbook.xml", VIEW_TYPE_TABLE); - create_window("addressbook.xml", VIEW_TYPE_TABLE); - create_window("addressbook.xml", VIEW_TYPE_REFLOW); - create_window("addressbook2.xml", VIEW_TYPE_TABLE); - create_window("addressbook2.xml", VIEW_TYPE_REFLOW); - - gtk_main (); - - e_cursors_shutdown (); - return 0; -} -#endif diff --git a/addressbook/demo/addressbook-widget.h b/addressbook/demo/addressbook-widget.h deleted file mode 100644 index 9111713da5..0000000000 --- a/addressbook/demo/addressbook-widget.h +++ /dev/null @@ -1,52 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * demo.h - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */ - -#ifndef __DEMO_H__ -#define __DEMO_H__ - -#include "e-test-model.h" - -typedef struct _View View; - -typedef enum { - VIEW_TYPE_REFLOW, - VIEW_TYPE_TABLE -} ViewType; - -typedef struct { - GtkAllocation last_alloc; - GnomeCanvasItem *reflow; - GtkWidget *canvas; - GnomeCanvasItem *rect; - int model_changed_id; -} Reflow; - -struct _View { - ViewType type; - ETestModel *model; - GtkWidget *child; - GtkWidget *frame; - Reflow *reflow; - - GtkWidget *widget; -}; - -void change_type(View *view, ViewType type); -View *create_view(void); - -#endif /* __DEMO_H__ */ diff --git a/addressbook/demo/addressbook.c b/addressbook/demo/addressbook.c deleted file mode 100644 index 38cb6c7121..0000000000 --- a/addressbook/demo/addressbook.c +++ /dev/null @@ -1,199 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * folder-browser-factory.c: A Bonobo Control factory for Folder Browsers - * - * Author: - * Miguel de Icaza (miguel@helixcode.com) - * - * (C) 2000 Helix Code, Inc. - */ -/* - * bonobo-clock-control.c - * - * Copyright 1999, Helix Code, Inc. - * - * Author: - * Nat Friedman (nat@nat.org) - */ - -#include -#include -#include -#include - -#include - -#include "addressbook-widget.h" -#include "addressbook.h" - - - -#if 0 -static void -bonobo_clock_control_prop_value_changed_cb (BonoboPropertyBag *pb, char *name, char *type, - gpointer old_value, gpointer new_value, - gpointer user_data) -{ - GtkClock *clock = user_data; - - if (! strcmp (name, "running")) { - gboolean *b = new_value; - - if (*b) - gtk_clock_start (clock); - else - gtk_clock_stop (clock); - } -} - -/* - * Callback routine used to release any values we associated with the control - * dynamically. - */ -static void -release_data (GtkObject *object, void *data) -{ - g_free (data); -} -#endif - - -static void -control_deactivate (BonoboControl *control, BonoboUIHandler *uih) -{ - /* how to remove a menu item */ - bonobo_ui_handler_menu_remove (uih, "/Actions/New Contact"); - - /* remove our toolbar */ - bonobo_ui_handler_dock_remove (uih, "/Toolbar"); -} - -static void -do_nothing_cb (BonoboUIHandler *uih, void *user_data, const char *path) -{ - printf ("Yow! I am called back!\n"); -} - -static GnomeUIInfo gnome_toolbar [] = { - GNOMEUIINFO_ITEM_STOCK (N_("New"), N_("Create a new contact"), do_nothing_cb, GNOME_STOCK_PIXMAP_NEW), - - GNOMEUIINFO_SEPARATOR, - - GNOMEUIINFO_ITEM_STOCK (N_("Find"), N_("Find a contact"), do_nothing_cb, GNOME_STOCK_PIXMAP_SEARCH), - GNOMEUIINFO_ITEM_STOCK (N_("Print"), N_("Print contacts"), do_nothing_cb, GNOME_STOCK_PIXMAP_PRINT), - GNOMEUIINFO_ITEM_STOCK (N_("Delete"), N_("Delete a contact"), do_nothing_cb, GNOME_STOCK_PIXMAP_TRASH), - - GNOMEUIINFO_END -}; - - - - -static void -control_activate (BonoboControl *control, BonoboUIHandler *uih) -{ - Bonobo_UIHandler remote_uih; - GtkWidget *toolbar; - BonoboControl *toolbar_control; - - remote_uih = bonobo_control_get_remote_ui_handler (control); - bonobo_ui_handler_set_container (uih, remote_uih); - - bonobo_ui_handler_menu_new_item (uih, "/Actions/New Contact", N_("_New Contact"), - NULL, -1, - BONOBO_UI_HANDLER_PIXMAP_NONE, NULL, - 0, 0, do_nothing_cb, NULL); - - toolbar = gtk_toolbar_new (GTK_ORIENTATION_HORIZONTAL, - GTK_TOOLBAR_BOTH); - - gnome_app_fill_toolbar (GTK_TOOLBAR (toolbar), - gnome_toolbar, - NULL); - - gtk_widget_show_all (toolbar); - - toolbar_control = bonobo_control_new (toolbar); - bonobo_ui_handler_dock_add ( - uih, "/Toolbar", - bonobo_object_corba_objref (BONOBO_OBJECT (toolbar_control)), - GNOME_DOCK_ITEM_BEH_LOCKED | - GNOME_DOCK_ITEM_BEH_EXCLUSIVE, - GNOME_DOCK_TOP, - 1, 1, 0); -} - -static void -control_activate_cb (BonoboControl *control, - gboolean activate, - gpointer user_data) -{ - BonoboUIHandler *uih; - - uih = bonobo_control_get_ui_handler (control); - g_assert (uih); - - if (activate) - control_activate (control, uih); - else - control_deactivate (control, uih); -} - - -static BonoboObject * -addressbook_factory (BonoboGenericFactory *Factory, void *closure) -{ -#if 0 - BonoboPropertyBag *pb; - CORBA_boolean *running; -#endif - BonoboControl *control; - View *view; - - /* Create the control. */ - view = create_view(); - control = bonobo_control_new (view->widget); - - gtk_signal_connect (GTK_OBJECT (control), "activate", - control_activate_cb, NULL); -#if 0 - /* Create the properties. */ - pb = bonobo_property_bag_new (); - bonobo_control_set_property_bag (control, pb); - - gtk_signal_connect (GTK_OBJECT (pb), "value_changed", - bonobo_clock_control_prop_value_changed_cb, - clock); - - running = g_new0 (CORBA_boolean, 1); - *running = TRUE; - bonobo_property_bag_add (pb, "running", "boolean", - (gpointer) running, - NULL, "Whether or not the clock is running", 0); - - /* - * Release "running" when the object is destroyed - */ - gtk_signal_connect (GTK_OBJECT (pb), "destroy", GTK_SIGNAL_FUNC (release_data), running); -#endif - - return BONOBO_OBJECT (control); -} - -void -addressbook_factory_init (void) -{ - static BonoboGenericFactory *addressbook_control_factory = NULL; - - if (addressbook_control_factory != NULL) - return; - - addressbook_control_factory = - bonobo_generic_factory_new ( - "control-factory:addressbook", - addressbook_factory, NULL); - - if (addressbook_control_factory == NULL) { - g_error ("I could not register a Addressbook factory."); - } -} diff --git a/addressbook/demo/addressbook.gnorba b/addressbook/demo/addressbook.gnorba deleted file mode 100644 index 7114b1c332..0000000000 --- a/addressbook/demo/addressbook.gnorba +++ /dev/null @@ -1,11 +0,0 @@ -[control-factory:addressbook] -type=exe -repo_id=IDL:GNOME/GenericFactory:1.0 -description=Factory for the sample Addressbook control -location_info=evolution-addressbook - -[control:addressbook] -type=factory -repo_id=IDL:BonoboControl/addressbook-control:1.0 IDL:GNOME/Control:1.0 -description=A sample Bonobo control which displays an addressbook. -location_info=control-factory:addressbook diff --git a/addressbook/demo/addressbook.h b/addressbook/demo/addressbook.h deleted file mode 100644 index e9289128a6..0000000000 --- a/addressbook/demo/addressbook.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef __ADDRESSBOOK_H__ -#define __ADDRESSBOOK_H__ - -#include - -void addressbook_factory_init (void); - -#endif /* __ADDRESSBOOK_H__ */ diff --git a/addressbook/demo/demo.c b/addressbook/demo/demo.c deleted file mode 100644 index e6f7246b2f..0000000000 --- a/addressbook/demo/demo.c +++ /dev/null @@ -1,466 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -#include -#include -#include -#include -#include -#include -#include "e-util/e-cursors.h" -#include "e-canvas.h" -#include "e-table-simple.h" -#include "e-table-header.h" -#include "e-table-header-item.h" -#include "e-table-item.h" -#include "e-cell-text.h" -#include "e-cell-checkbox.h" -#include "e-table.h" -#include "e-reflow.h" -#include "e-minicard.h" - -#include - -#include "table-test.h" - -#include "e-test-model.h" - -#define COLS 4 - -/* Here we define the initial layout of the table. This is an xml - format that allows you to change the initial ordering of the - columns or to do sorting or grouping initially. This specification - shows all 5 columns, but moves the importance column nearer to the - front. It also sorts by the "Full Name" column (ascending.) - Sorting and grouping take the model column as their arguments - (sorting is specified by the "column" argument to the leaf elemnt. */ -#define INITIAL_SPEC " \ - \ - 0 \ - 1 \ - 2 \ - 3 \ - \ - \ -" - -char *headers[COLS] = { - "Email", - "Full Name", - "Address", - "Phone" -}; - -typedef struct _View View; - -typedef enum { - VIEW_TYPE_REFLOW, - VIEW_TYPE_TABLE -} ViewType; - -typedef struct { - GtkAllocation last_alloc; - GnomeCanvasItem *reflow; - GtkWidget *canvas; - GnomeCanvasItem *rect; - int model_changed_id; -} Reflow; - -struct _View { - ETestModel *model; - GtkWidget *window; - GtkWidget *frame; - GtkWidget *child; - - ViewType type; - - Reflow *reflow; -}; - -static int window_count = 0; -static GHashTable *models = NULL; - -static void -remove_model(ETableModel *model, gchar *filename) -{ - g_hash_table_remove(models, filename); - g_free(filename); -} - -static ETestModel * -get_model(char *filename) -{ - ETestModel *model; - if ( models == NULL ) { - models = g_hash_table_new(g_str_hash, g_str_equal); - } - - model = g_hash_table_lookup(models, filename); - if ( model ) - return model; - - filename = g_strdup(filename); - - model = E_TEST_MODEL(e_test_model_new(filename)); - g_hash_table_insert(models, - filename, model); - gtk_signal_connect(GTK_OBJECT(model), "destroy", - GTK_SIGNAL_FUNC(remove_model), filename); - return model; -} - -static void -add_address_cb(GtkWidget *button, gpointer data) -{ - View *view = (View *) data; - Address *newadd = g_new(Address, 1); - newadd->email = g_strdup(""); - newadd->phone = g_strdup(""); - newadd->full_name = g_strdup(""); - newadd->street = g_strdup(""); - e_test_model_add_column (view->model, newadd); -} - -static void -rebuild_reflow(ETableModel *model, gpointer data) -{ - int i; - View *view = (View *) data; - Reflow *reflow = view->reflow; - if (!reflow) - return; - gtk_object_destroy(GTK_OBJECT(reflow->reflow)); - reflow->reflow = gnome_canvas_item_new( gnome_canvas_root( GNOME_CANVAS( reflow->canvas ) ), - e_reflow_get_type(), - "x", (double) 0, - "y", (double) 0, - "height", (double) reflow->last_alloc.height, - "minimum_width", (double) reflow->last_alloc.width, - NULL ); - - for ( i = 0; i < view->model->data_count; i++ ) - { - GnomeCanvasItem *item; - item = gnome_canvas_item_new( GNOME_CANVAS_GROUP(reflow->reflow), - e_minicard_get_type(), - "model", view->model, - "row", i, - NULL); - e_reflow_add_item(E_REFLOW(reflow->reflow), item); - } - e_canvas_item_request_reflow(reflow->reflow); -} - -static void -destroy_reflow(View *view) -{ - Reflow *reflow = view->reflow; - if ( !reflow ) - return; - - gtk_signal_disconnect(GTK_OBJECT(view->model), - reflow->model_changed_id); - g_free(reflow); - gtk_object_unref(GTK_OBJECT(view->model)); - view->reflow = NULL; -} - -static void destroy_callback(GtkWidget *app, gpointer data) -{ - View *view = (View *)data; - if ( view->reflow ) { - destroy_reflow(view); - } - gtk_object_unref(GTK_OBJECT(view->model)); - g_free(view); - window_count --; - if ( window_count <= 0 ) - exit(0); -} - -static void allocate_callback(GtkWidget *canvas, GtkAllocation *allocation, gpointer data) -{ - double width; - View *view = (View *)data; - Reflow *reflow = view->reflow; - if ( !reflow ) - return; - reflow->last_alloc = *allocation; - gnome_canvas_item_set( reflow->reflow, - "height", (double) allocation->height, - NULL ); - gnome_canvas_item_set( reflow->reflow, - "minimum_width", (double) allocation->width, - NULL ); - gtk_object_get(GTK_OBJECT(reflow->reflow), - "width", &width, - NULL); - width = MAX(width, allocation->width); - gnome_canvas_set_scroll_region(GNOME_CANVAS( reflow->canvas ), 0, 0, width, allocation->height ); - gnome_canvas_item_set( reflow->rect, - "x2", (double) width, - "y2", (double) allocation->height, - NULL ); -} - -static void resize(ECanvas *canvas, gpointer data) -{ - double width; - View *view = (View *)data; - Reflow *reflow = view->reflow; - if ( !reflow ) - return; - gtk_object_get(GTK_OBJECT(reflow->reflow), - "width", &width, - NULL); - width = MAX(width, reflow->last_alloc.width); - gnome_canvas_set_scroll_region(GNOME_CANVAS(reflow->canvas), 0, 0, width, reflow->last_alloc.height ); - gnome_canvas_item_set( reflow->rect, - "x2", (double) width, - "y2", (double) reflow->last_alloc.height, - NULL ); -} - -static GtkWidget * -create_reflow(View *view) -{ - GtkWidget *inner_vbox; - GtkWidget *scrollbar; - int i; - Reflow *reflow = g_new(Reflow, 1); - view->reflow = reflow; - - view->type = VIEW_TYPE_REFLOW; - - /* Next we create our model. This uses the functions we defined - earlier. */ - - inner_vbox = gtk_vbox_new(FALSE, 0); - reflow->canvas = e_canvas_new(); - reflow->rect = gnome_canvas_item_new( gnome_canvas_root( GNOME_CANVAS( reflow->canvas ) ), - gnome_canvas_rect_get_type(), - "x1", (double) 0, - "y1", (double) 0, - "x2", (double) 100, - "y2", (double) 100, - "fill_color", "white", - NULL ); - reflow->reflow = gnome_canvas_item_new( gnome_canvas_root( GNOME_CANVAS( reflow->canvas ) ), - e_reflow_get_type(), - "x", (double) 0, - "y", (double) 0, - "height", (double) 100, - "minimum_width", (double) 100, - NULL ); - /* Connect the signals */ - gtk_signal_connect( GTK_OBJECT( reflow->canvas ), "reflow", - GTK_SIGNAL_FUNC( resize ), - ( gpointer ) view); - - for ( i = 0; i < view->model->data_count; i++ ) - { - GnomeCanvasItem *item; - item = gnome_canvas_item_new( GNOME_CANVAS_GROUP(reflow->reflow), - e_minicard_get_type(), - "model", view->model, - "row", i, - NULL); - e_reflow_add_item(E_REFLOW(reflow->reflow), item); - } - gnome_canvas_set_scroll_region ( GNOME_CANVAS( reflow->canvas ), - 0, 0, - 100, 100 ); - - scrollbar = gtk_hscrollbar_new(gtk_layout_get_hadjustment(GTK_LAYOUT(reflow->canvas))); - - gtk_signal_connect( GTK_OBJECT( reflow->canvas ), "size_allocate", - GTK_SIGNAL_FUNC( allocate_callback ), - ( gpointer ) view ); - - gdk_window_set_back_pixmap( GTK_LAYOUT(reflow->canvas)->bin_window, NULL, FALSE); - - reflow->model_changed_id = gtk_signal_connect(GTK_OBJECT( view->model ), "model_changed", - GTK_SIGNAL_FUNC(rebuild_reflow), view); - - gtk_object_ref(GTK_OBJECT(view->model)); - - /* Build the gtk widget hierarchy. */ - gtk_box_pack_start(GTK_BOX(inner_vbox), reflow->canvas, TRUE, TRUE, 0); - gtk_box_pack_start(GTK_BOX(inner_vbox), scrollbar, FALSE, FALSE, 0); - - return inner_vbox; -} - -/* We create a window containing our new table. */ -static GtkWidget * -create_table(View *view) -{ - ECell *cell_left_just; - ETableHeader *e_table_header; - GtkWidget *e_table; - int i; - - view->type = VIEW_TYPE_TABLE; - - /* - Next we create a header. The ETableHeader is used in two - different way. The first is the full_header. This is the - list of possible columns in the view. The second use is - completely internal. Many of the ETableHeader functions are - for that purpose. The only functions we really need are - e_table_header_new and e_table_header_add_col. - - First we create the header. */ - e_table_header = e_table_header_new (); - - /* Next we have to build renderers for all of the columns. - Since all our columns are text columns, we can simply use - the same renderer over and over again. If we had different - types of columns, we could use a different renderer for - each column. */ - cell_left_just = e_cell_text_new (E_TABLE_MODEL(view->model), NULL, GTK_JUSTIFY_LEFT); - - /* Next we create a column object for each view column and add - them to the header. We don't create a column object for - the importance column since it will not be shown. */ - for (i = 0; i < LAST_COL; i++){ - /* Create the column. */ - ETableCol *ecol = e_table_col_new ( - i, headers [i], - 80, 20, cell_left_just, - g_str_compare, TRUE); - /* Add it to the header. */ - e_table_header_add_column (e_table_header, ecol, i); - } - - /* Here we create the table. We give it the three pieces of - the table we've created, the header, the model, and the - initial layout. It does the rest. */ - e_table = e_table_new_from_spec_file (e_table_header, E_TABLE_MODEL(view->model), "spec"); - -#if 0 - gtk_signal_connect(GTK_OBJECT(E_TABLE(e_table)->sort_info), "sort_info_changed", - GTK_SIGNAL_FUNC(queue_header_save), e_table->sort_info); - - gtk_signal_connect(GTK_OBJECT(E_TABLE(e_table)->header), "structure_change", - GTK_SIGNAL_FUNC(queue_header_save), e_table->sort_info); - gtk_signal_connect(GTK_OBJECT(E_TABLE(e_table)->header), "dimension_change", - GTK_SIGNAL_FUNC(queue_header_save), e_table->sort_info); -#endif - - return e_table; -} - -static void -change_type(View *view, ViewType type) -{ - gtk_object_ref(GTK_OBJECT(view->model)); - if (view->reflow) - destroy_reflow(view); - gtk_widget_destroy(view->child); - switch(type) { - case VIEW_TYPE_REFLOW: - view->child = create_reflow(view); - break; - case VIEW_TYPE_TABLE: - view->child = create_table(view); - break; - } - gtk_container_add(GTK_CONTAINER(view->frame), view->child); - gtk_widget_show_all(view->child); - gtk_object_unref(GTK_OBJECT(view->model)); -} - -static void -change_callback(GtkWidget *button, View *view) -{ - if (view->type == VIEW_TYPE_REFLOW) - change_type(view, VIEW_TYPE_TABLE); - else - change_type(view, VIEW_TYPE_REFLOW); -} - -static GtkWidget * -create_window(char *filename, ViewType type) -{ - GtkWidget *button; - GtkWidget *change_button; - GtkWidget *vbox; - View *view = g_new(View, 1); - - view->reflow = NULL; - - view->model = get_model(filename); - - /* Here we create a window for our new table. This window - will get shown and the person will be able to test their - item. */ - view->window = gtk_window_new (GTK_WINDOW_TOPLEVEL); - - gtk_signal_connect( GTK_OBJECT( view->window ), "destroy", - GTK_SIGNAL_FUNC( destroy_callback ), - view ); - - /* This frame is simply to get a bevel around our table. */ - view->frame = gtk_frame_new (NULL); - - switch(type) { - case VIEW_TYPE_REFLOW: - view->child = create_reflow(view); - break; - case VIEW_TYPE_TABLE: - view->child = create_table(view); - break; - } - - - vbox = gtk_vbox_new(FALSE, 0); - - button = gtk_button_new_with_label("Add address"); - gtk_signal_connect(GTK_OBJECT(button), "clicked", - GTK_SIGNAL_FUNC(add_address_cb), view); - - change_button = gtk_button_new_with_label("Change View"); - gtk_signal_connect(GTK_OBJECT(change_button), "clicked", - GTK_SIGNAL_FUNC(change_callback), view); - - /* Build the gtk widget hierarchy. */ - - gtk_container_add (GTK_CONTAINER (view->frame), view->child); - gtk_box_pack_start (GTK_BOX (vbox), view->frame, TRUE, TRUE, 0); - gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (vbox), change_button, FALSE, FALSE, 0); - gtk_container_add (GTK_CONTAINER (view->window), vbox); - - /* Size the initial window. */ - gtk_widget_set_usize (view->window, 200, 200); - /* Show it all. */ - gtk_widget_show_all (view->window); - gtk_object_ref(GTK_OBJECT(view->model)); - gtk_object_sink(GTK_OBJECT(view->model)); - window_count ++; - return view->window; -} - -/* This is the main function which just initializes gnome and call our create_table function */ - -int -main (int argc, char *argv []) -{ - gnome_init ("TableExample", "TableExample", argc, argv); - e_cursors_init (); - - gtk_widget_push_visual (gdk_rgb_get_visual ()); - gtk_widget_push_colormap (gdk_rgb_get_cmap ()); - - create_window("addressbook.xml", VIEW_TYPE_TABLE); - create_window("addressbook.xml", VIEW_TYPE_TABLE); - create_window("addressbook.xml", VIEW_TYPE_TABLE); - create_window("addressbook.xml", VIEW_TYPE_REFLOW); - create_window("addressbook.xml", VIEW_TYPE_REFLOW); - create_window("addressbook2.xml", VIEW_TYPE_TABLE); - create_window("addressbook2.xml", VIEW_TYPE_REFLOW); - - gtk_main (); - - e_cursors_shutdown (); - return 0; -} diff --git a/addressbook/demo/e-test-model.c b/addressbook/demo/e-test-model.c deleted file mode 100644 index 941e1c006f..0000000000 --- a/addressbook/demo/e-test-model.c +++ /dev/null @@ -1,385 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * - * Author: - * Miguel de Icaza (miguel@gnu.org) - * - * (C) 1999 Helix Code, Inc. - */ - -#include -#include "e-test-model.h" -#include -#include -#include -#include - -#define PARENT_TYPE e_table_model_get_type() -/* - * ETestModel callbacks -n * These are the callbacks that define the behavior of our custom model. - */ - -static void -test_destroy(GtkObject *object) -{ - ETestModel *model = E_TEST_MODEL(object); - int i; - if (model->book) - gtk_object_unref(GTK_OBJECT(model->book)); - if (model->book_view) - gtk_object_unref(GTK_OBJECT(model->book_view)); - for ( i = 0; i < model->data_count; i++ ) { - gtk_object_unref(GTK_OBJECT(model->data[i])); - } - g_free(model->data); - g_free(model->uri); -} - -/* This function returns the number of columns in our ETableModel. */ -static int -test_col_count (ETableModel *etc) -{ - return LAST_COL; -} - -/* This function returns the number of rows in our ETableModel. */ -static int -test_row_count (ETableModel *etc) -{ - ETestModel *test = E_TEST_MODEL(etc); - return test->data_count; -} - -/* This function returns the value at a particular point in our ETableModel. */ -static void * -test_value_at (ETableModel *etc, int col, int row) -{ - ETestModel *test = E_TEST_MODEL(etc); - ECardList *list; - ECardIterator *iterator; - gchar *string; - if ( col >= LAST_COL || row >= test->data_count ) - return NULL; - switch (col) { - case EMAIL: - gtk_object_get(GTK_OBJECT(test->data[row]), - "email", &list, - NULL); - iterator = e_card_list_get_iterator(list); - if (e_card_iterator_get(iterator)) - return (void *) e_card_iterator_get(iterator); - else - return ""; - gtk_object_unref(GTK_OBJECT(iterator)); - break; - case FULL_NAME: - gtk_object_get(GTK_OBJECT(test->data[row]), - "full_name", &string, - NULL); - if (string) - return string; - else - return ""; - break; - case STREET: - gtk_object_get(GTK_OBJECT(test->data[row]), - "street", &list, - NULL); - iterator = e_card_list_get_iterator(list); - if (e_card_iterator_get(iterator)) - return ((ECardDeliveryAddress *)e_card_iterator_get(iterator))->street; - else - return ""; - gtk_object_unref(GTK_OBJECT(iterator)); - break; - case PHONE: - gtk_object_get(GTK_OBJECT(test->data[row]), - "phone", &list, - NULL); - iterator = e_card_list_get_iterator(list); - if (e_card_iterator_get(iterator)) - return ((ECardPhone *)e_card_iterator_get(iterator))->number; - else - return ""; - gtk_object_unref(GTK_OBJECT(iterator)); - break; - default: - return NULL; - } -} - -/* This function sets the value at a particular point in our ETableModel. */ -static void -test_set_value_at (ETableModel *etc, int col, int row, const void *val) -{ - ETestModel *test = E_TEST_MODEL(etc); - ECardList *list; - ECardIterator *iterator; - if ( col >= LAST_COL || row >= test->data_count ) - return; - switch (col) { - case EMAIL: - gtk_object_get(GTK_OBJECT(test->data[row]), - "email", &list, - NULL); - iterator = e_card_list_get_iterator(list); - if (e_card_iterator_is_valid(iterator)) { - e_card_iterator_set(iterator, val); - } else { - e_card_list_append(list, val); - } - gtk_object_unref(GTK_OBJECT(iterator)); - break; - case FULL_NAME: - gtk_object_set(GTK_OBJECT(test->data[row]), - "full_name", val, - NULL); - break; - case STREET: - gtk_object_get(GTK_OBJECT(test->data[row]), - "address", &list, - NULL); - iterator = e_card_list_get_iterator(list); - if (e_card_iterator_is_valid(iterator)) { - const ECardDeliveryAddress *address = e_card_iterator_get(iterator); - ECardDeliveryAddress *address_copy = e_card_delivery_address_copy(address); - g_free(address_copy->street); - address_copy->street = g_strdup(val); - e_card_iterator_set(iterator, address_copy); - e_card_delivery_address_free(address_copy); - } else { - ECardDeliveryAddress *address = g_new(ECardDeliveryAddress, 1); - address->po = NULL; - address->ext = NULL; - address->street = g_strdup(val); - address->city = NULL; - address->region = NULL; - address->code = NULL; - address->country = NULL; - address->flags = 0; - e_card_list_append(list, address); - e_card_delivery_address_free(address); - } - gtk_object_unref(GTK_OBJECT(iterator)); - break; - case PHONE: - gtk_object_get(GTK_OBJECT(test->data[row]), - "phone", &list, - NULL); - iterator = e_card_list_get_iterator(list); - if (e_card_iterator_is_valid(iterator)) { - const ECardPhone *phone = e_card_iterator_get(iterator); - ECardPhone *phone_copy = e_card_phone_copy(phone); - g_free(phone_copy->number); - phone_copy->number = g_strdup(val); - e_card_iterator_set(iterator, phone_copy); - e_card_phone_free(phone_copy); - } else { - ECardPhone *phone = g_new(ECardPhone, 1); - phone->number = g_strdup(val); - phone->flags = 0; - e_card_list_append(list, phone); - e_card_phone_free(phone); - } - gtk_object_unref(GTK_OBJECT(iterator)); - break; - default: - return; - } - e_book_commit_card(test->book, test->data[row], NULL, NULL); - if ( !etc->frozen ) - e_table_model_cell_changed(etc, col, row); -} - -/* This function returns whether a particular cell is editable. */ -static gboolean -test_is_cell_editable (ETableModel *etc, int col, int row) -{ - return TRUE; -} - -/* This function duplicates the value passed to it. */ -static void * -test_duplicate_value (ETableModel *etc, int col, const void *value) -{ - return g_strdup(value); -} - -/* This function frees the value passed to it. */ -static void -test_free_value (ETableModel *etc, int col, void *value) -{ - g_free(value); -} - -/* This function is for when the model is unfrozen. This can mostly - be ignored for simple models. */ -static void -test_thaw (ETableModel *etc) -{ - e_table_model_changed(etc); -} - -static void -e_test_model_class_init (GtkObjectClass *object_class) -{ - ETableModelClass *model_class = (ETableModelClass *) object_class; - - object_class->destroy = test_destroy; - - model_class->column_count = test_col_count; - model_class->row_count = test_row_count; - model_class->value_at = test_value_at; - model_class->set_value_at = test_set_value_at; - model_class->is_cell_editable = test_is_cell_editable; - model_class->duplicate_value = test_duplicate_value; - model_class->free_value = test_free_value; - model_class->thaw = test_thaw; -} - -static void -e_test_model_init (GtkObject *object) -{ - ETestModel *model = E_TEST_MODEL(object); - model->data = NULL; - model->data_count = 0; - model->book = NULL; - model->book_view = NULL; -} - -GtkType -e_test_model_get_type (void) -{ - static GtkType type = 0; - - if (!type){ - GtkTypeInfo info = { - "ETestModel", - sizeof (ETestModel), - sizeof (ETestModelClass), - (GtkClassInitFunc) e_test_model_class_init, - (GtkObjectInitFunc) e_test_model_init, - NULL, /* reserved 1 */ - NULL, /* reserved 2 */ - (GtkClassInitFunc) NULL - }; - - type = gtk_type_unique (PARENT_TYPE, &info); - } - - return type; -} - -void -e_test_model_add_column (ETestModel *model, Address *newadd) -{ -#if 0 - model->data = g_realloc(model->data, (++model->data_count) * sizeof(Address *)); - model->data[model->data_count - 1] = newadd; - e_test_model_queue_save(model); - if ( model && !E_TABLE_MODEL(model)->frozen ) - e_table_model_changed(E_TABLE_MODEL(model)); -#endif -} - -static void -e_test_model_card_added(EBookView *book_view, - const GList *cards, - ETestModel *model) -{ - model->data = g_realloc(model->data, (model->data_count + g_list_length((GList *)cards)) * sizeof(ECard *)); - for ( ; cards; cards = cards->next) { - gtk_object_ref(GTK_OBJECT(cards->data)); - model->data[model->data_count++] = E_CARD (cards->data); - } - e_table_model_changed(E_TABLE_MODEL(model)); -} - -static void -e_test_model_card_removed(EBookView *book_view, - const char *id, - ETestModel *model) -{ - int i; - for ( i = 0; i < model->data_count; i++) { - if ( !strcmp(e_card_get_id(model->data[i]), id) ) { - gtk_object_unref(GTK_OBJECT(model->data[i])); - memmove(model->data + i, model->data + i + 1, (model->data_count - i - 1) * sizeof (ECard *)); - } - } - e_table_model_changed(E_TABLE_MODEL(model)); -} - -static void -e_test_model_card_changed(EBookView *book_view, - const GList *cards, - ETestModel *model) -{ - for ( ; cards; cards = cards->next) { - int i; - for ( i = 0; i < model->data_count; i++) { - if ( !strcmp(e_card_get_id(model->data[i]), e_card_get_id(E_CARD(cards->data))) ) { - gtk_object_unref(GTK_OBJECT(model->data[i])); - model->data[i] = E_CARD(cards->data); - gtk_object_ref(GTK_OBJECT(model->data[i])); - e_table_model_row_changed(E_TABLE_MODEL(model), i); - break; - } - } - } -} - -static void -e_test_model_book_respond_get_view(EBook *book, - EBookStatus status, - EBookView *book_view, - ETestModel *model) -{ - if (status == E_BOOK_STATUS_SUCCESS) { - model->book_view = book_view; - gtk_object_ref(GTK_OBJECT(book_view)); - gtk_signal_connect(GTK_OBJECT(book_view), - "card_changed", - GTK_SIGNAL_FUNC(e_test_model_card_changed), - model); - gtk_signal_connect(GTK_OBJECT(book_view), - "card_removed", - GTK_SIGNAL_FUNC(e_test_model_card_removed), - model); - gtk_signal_connect(GTK_OBJECT(book_view), - "card_added", - GTK_SIGNAL_FUNC(e_test_model_card_added), - model); - } -} - -static void -e_test_model_uri_loaded(EBook *book, - EBookStatus status, - ETestModel *model) -{ - if (status == E_BOOK_STATUS_SUCCESS) { - e_book_get_book_view (book, - "", - (EBookBookViewCallback) e_test_model_book_respond_get_view, - model); - } -} - -ETableModel * -e_test_model_new (gchar *uri) -{ - ETestModel *et; - - et = gtk_type_new (e_test_model_get_type ()); - - et->uri = g_strdup(uri); - et->book = e_book_new(); - e_book_load_uri(et->book, - et->uri, - (EBookCallback) e_test_model_uri_loaded, - et); - - return E_TABLE_MODEL(et); -} diff --git a/addressbook/demo/e-test-model.h b/addressbook/demo/e-test-model.h deleted file mode 100644 index 871ea11de8..0000000000 --- a/addressbook/demo/e-test-model.h +++ /dev/null @@ -1,64 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -#ifndef _E_TEST_MODEL_H_ -#define _E_TEST_MODEL_H_ - -#include "e-table-model.h" -#include -#include -#include - -#define E_TEST_MODEL_TYPE (e_test_model_get_type ()) -#define E_TEST_MODEL(o) (GTK_CHECK_CAST ((o), E_TEST_MODEL_TYPE, ETestModel)) -#define E_TEST_MODEL_CLASS(k) (GTK_CHECK_CLASS_CAST((k), E_TEST_MODEL_TYPE, ETestModelClass)) -#define E_IS_TEST_MODEL(o) (GTK_CHECK_TYPE ((o), E_TEST_MODEL_TYPE)) -#define E_IS_TEST_MODEL_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_TEST_MODEL_TYPE)) - -/* Virtual Column list: - 0 Email - 1 Full Name - 2 Street - 3 Phone -*/ -typedef struct _Address Address; -typedef enum _Rows Rows; - -struct _Address { - gchar *email; - gchar *full_name; - gchar *street; - gchar *phone; -}; - -enum _Rows { - EMAIL, - FULL_NAME, - STREET, - PHONE, - LAST_COL -}; - -typedef struct { - ETableModel parent; - - EBook *book; - - EBookView *book_view; - - ECard **data; - int data_count; - - char *uri; -} ETestModel; - - -typedef struct { - ETableModelClass parent_class; -} ETestModelClass; - - -GtkType e_test_model_get_type (void); -ETableModel *e_test_model_new (char *uri); - -void e_test_model_add_column (ETestModel *model, Address *newadd); - -#endif /* _E_TEST_MODEL_H_ */ diff --git a/addressbook/demo/spec b/addressbook/demo/spec deleted file mode 100644 index 2d366ed75f..0000000000 --- a/addressbook/demo/spec +++ /dev/null @@ -1,12 +0,0 @@ - - - - 1 - 0 - 2 - 3 - - - - - diff --git a/addressbook/ename/.cvsignore b/addressbook/ename/.cvsignore deleted file mode 100644 index 4f8c173841..0000000000 --- a/addressbook/ename/.cvsignore +++ /dev/null @@ -1,8 +0,0 @@ -.deps -.libs -Makefile -Makefile.in -*.lo -*.la -test-ename-western -test-ename-western-gtk diff --git a/addressbook/ename/Makefile.am b/addressbook/ename/Makefile.am deleted file mode 100644 index e30796574a..0000000000 --- a/addressbook/ename/Makefile.am +++ /dev/null @@ -1,45 +0,0 @@ -INCLUDES = \ - -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \ - -DG_LOG_DOMAIN=\"EName\" \ - -I$(srcdir) \ - -I$(srcdir)/.. \ - -I$(top_srcdir) \ - -I. \ - -I.. \ - -I$(top_builddir) \ - -I$(includedir) \ - $(GNOME_INCLUDEDIR) - -gnome_libs = \ - $(BONOBO_GNOME_LIBS) \ - $(INTLLIBS) - -ename_libs = \ - libename.la \ - $(gnome_libs) - -lib_LTLIBRARIES = libename.la - -libename_la_SOURCES = \ - e-name-western.c - -libenameincludedir = $(includedir)/ename - -libenameinclude_HEADERS = \ - e-name-western-tables.h \ - e-name-western.h - - -noinst_PROGRAMS = \ - test-ename-western \ - test-ename-western-gtk - -test_ename_western_SOURCES = \ - test-ename-western.c - -test_ename_western_LDADD = $(ename_libs) - -test_ename_western_gtk_SOURCES = \ - test-ename-western-gtk.c - -test_ename_western_gtk_LDADD = $(ename_libs) $(gnome_libs) diff --git a/addressbook/ename/TODO b/addressbook/ename/TODO deleted file mode 100644 index 669661eea7..0000000000 --- a/addressbook/ename/TODO +++ /dev/null @@ -1,2 +0,0 @@ -* Support other naming systems. -* Handle misspelled suffixes better. diff --git a/addressbook/ename/e-name-western-tables.h b/addressbook/ename/e-name-western-tables.h deleted file mode 100644 index 369d530edc..0000000000 --- a/addressbook/ename/e-name-western-tables.h +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef __E_NAME_WESTERN_TABLES_H__ -#define __E_NAME_WESTERN_TABLES_H__ - -char *e_name_western_pfx_table[] = { - - /* - * English. - */ - "mister", "miss.", "mr.", "mrs.", "ms.", - "miss", "mr", "mrs", "ms", "sir", - "professor", "prof.", "dr", "dr.", "doctor", - "reverend", "president", "judge", "senator", - "congressman", "congresswoman", - - "the honorable", "the reverend", "his holiness", - "his eminence", - - - /* - * French. - */ - "monsieur", "mr.", "mademoiselle", "melle.", - "madame", "mme.", "professeur", - - /* - * Spanish. - */ - "senor", "senora", "senorita", - - NULL}; - -char *e_name_western_sfx_table[] = { - - /* - * English. - */ - "junior", "senior", "jr", "sr", "I", "II", "III", "IV", "V", - "phd", "ms", "md", "esq", "esq.", "esquire", - - NULL}; - -char *e_name_western_twopart_sfx_table[] = { - - /* - * English. - */ - "the first", "the second", "the third", - - NULL}; - -char *e_name_western_complex_last_table[] = {"van", "von", "de", NULL}; - -#endif /* ! __E_NAME_WESTERN_TABLES_H__ */ diff --git a/addressbook/ename/e-name-western.c b/addressbook/ename/e-name-western.c deleted file mode 100644 index 698cceec0b..0000000000 --- a/addressbook/ename/e-name-western.c +++ /dev/null @@ -1,868 +0,0 @@ -/* - * A simple Western name parser. - * - * Jamie, do you know anything about name parsing? - * Are you going down that rat hole? Bring a flashlight. - * - * Author: - * Nat Friedman (nat@helixcode.com) - * - * Copyright 1999, Helix Code, Inc. - */ - -#include -#include -#include - -#include -#include - -typedef struct { - int prefix_idx; - int first_idx; - int middle_idx; - int nick_idx; - int last_idx; - int suffix_idx; -} ENameWesternIdxs; - -static int -e_name_western_str_count_words (char *str) -{ - int word_count; - char *p; - - word_count = 0; - - for (p = str; p != NULL; p = strchr (p, ' ')) { - word_count ++; - p ++; - } - - return word_count; -} - -static void -e_name_western_cleanup_string (char **str) -{ - char *newstr; - char *p; - - if (*str == NULL) - return; - - /* skip any spaces and commas at the start of the string */ - p = *str; - while (isspace (*p) || *p == ',') - p ++; - - /* make the copy we're going to return */ - newstr = g_strdup (p); - - if ( strlen(newstr) > 0) { - /* now search from the back, skipping over any spaces and commas */ - p = newstr + strlen (newstr) - 1; - while (isspace (*p) || *p == ',') - p --; - /* advance p to after the character that caused us to exit the - previous loop, and end the string. */ - if ((! isspace (*p)) && *p != ',') - p ++; - *p = '\0'; - } - - g_free (*str); - *str = newstr; -} - -static char * -e_name_western_get_words_at_idx (char *str, int idx, int num_words) -{ - char *words; - char *p; - int word_count; - int words_len; - - /* - * Walk to the end of the words. - */ - word_count = 0; - p = str + idx; - while (word_count < num_words && *p != '\0') { - while (! isspace (*p) && *p != '\0') - p ++; - - while (isspace (*p) && *p != '\0') - p ++; - - word_count ++; - } - - words_len = p - str - idx - 1; - - if (*p == '\0') - words_len ++; - - words = g_malloc0 (1 + words_len); - strncpy (words, str + idx, words_len); - - return words; -} - -/* - * What the fuck is wrong with glib's MAX macro. - */ -static int -e_name_western_max (const int a, const int b) -{ - if (a > b) - return a; - - return b; -} - -static gboolean -e_name_western_word_is_suffix (char *word) -{ - int i; - - for (i = 0; e_name_western_sfx_table [i] != NULL; i ++) { - if (g_strcasecmp (word, e_name_western_sfx_table [i])) - continue; - - return TRUE; - } - - return FALSE; -} - -static char * -e_name_western_get_one_prefix_at_str (char *str) -{ - char *word; - int i; - - /* - * Check for prefixes from our table. - */ - for (i = 0; e_name_western_pfx_table [i] != NULL; i ++) { - int pfx_words; - char *words; - - pfx_words = e_name_western_str_count_words (e_name_western_pfx_table [i]); - words = e_name_western_get_words_at_idx (str, 0, pfx_words); - - if (! g_strcasecmp (words, e_name_western_pfx_table [i])) - return words; - - g_free (words); - } - - /* - * Check for prefixes we don't know about. These are always a - * sequence of more than one letters followed by a period. - */ - word = e_name_western_get_words_at_idx (str, 0, 1); - - if (strlen (word) > 2 && isalpha (word [0]) && isalpha (word [1]) && - word [strlen (word) - 1] == '.') - return word; - - g_free (word); - - return NULL; -} - -static char * -e_name_western_get_prefix_at_str (char *str) -{ - char *pfx; - char *pfx1; - char *pfx2; - char *p; - - /* Get the first prefix. */ - pfx1 = e_name_western_get_one_prefix_at_str (str); - - if (pfx1 == NULL) - return NULL; - - /* Check for a second prefix. */ - p = str + strlen (pfx1); - while (isspace (*p) && *p != '\0') - p ++; - - pfx2 = e_name_western_get_one_prefix_at_str (p); - - if (pfx2 != NULL) { - int pfx_len; - - pfx_len = (p + strlen (pfx2)) - str; - pfx = g_malloc0 (pfx_len + 1); - strncpy (pfx, str, pfx_len); - } else { - pfx = g_strdup (pfx1); - } - - g_free (pfx1); - g_free (pfx2); - - return pfx; -} - -static void -e_name_western_extract_prefix (ENameWestern *name, ENameWesternIdxs *idxs) -{ - char *pfx; - - pfx = e_name_western_get_prefix_at_str (name->full); - - if (pfx == NULL) - return; - - idxs->prefix_idx = 0; - name->prefix = pfx; -} - -static gboolean -e_name_western_is_complex_last_beginning (char *word) -{ - int i; - - for (i = 0; e_name_western_complex_last_table [i] != NULL; i ++) { - - if (! g_strcasecmp ( - word, e_name_western_complex_last_table [i])) - return TRUE; - } - - return FALSE; -} - -static void -e_name_western_extract_first (ENameWestern *name, ENameWesternIdxs *idxs) -{ - /* - * If there's a prefix, then the first name is right after it. - */ - if (idxs->prefix_idx != -1) { - int first_idx; - char *p; - - first_idx = idxs->prefix_idx + strlen (name->prefix); - - /* Skip past white space. */ - p = name->full + first_idx; - while (isspace (*p) && *p != '\0') - p++; - - if (*p == '\0') - return; - - idxs->first_idx = p - name->full; - name->first = e_name_western_get_words_at_idx ( - name->full, idxs->first_idx, 1); - - } else { - - /* - * Otherwise, the first name is probably the first string. - */ - idxs->first_idx = 0; - name->first = e_name_western_get_words_at_idx ( - name->full, idxs->first_idx, 1); - } - - /* - * Check that we didn't just assign the beginning of a - * compound last name to the first name. - */ - if (name->first != NULL) { - if (e_name_western_is_complex_last_beginning (name->first)) { - g_free (name->first); - name->first = NULL; - idxs->first_idx = -1; - } - } -} - -static void -e_name_western_extract_middle (ENameWestern *name, ENameWesternIdxs *idxs) -{ - char *word; - int middle_idx; - - /* - * Middle names can only exist if you have a first name. - */ - if (idxs->first_idx == -1) - return; - - middle_idx = idxs->first_idx + strlen (name->first) + 1; - - if (middle_idx > strlen (name->full)) - return; - - /* - * Search for the first space (or the terminating \0) - */ - while (isspace (name->full [middle_idx]) && - name->full [middle_idx] != '\0') - middle_idx ++; - - if (name->full [middle_idx] == '\0') - return; - - /* - * Skip past the nickname, if it's there. - */ - if (name->full [middle_idx] == '\"') { - if (idxs->nick_idx == -1) - return; - - middle_idx = idxs->nick_idx + strlen (name->nick) + 1; - - while (isspace (name->full [middle_idx]) && - name->full [middle_idx] != '\0') - middle_idx ++; - - if (name->full [middle_idx] == '\0') - return; - } - - /* - * Make sure this isn't the beginning of a complex last name. - */ - word = e_name_western_get_words_at_idx (name->full, middle_idx, 1); - if (e_name_western_is_complex_last_beginning (word)) { - g_free (word); - return; - } - - /* - * Make sure this isn't a suffix. - */ - e_name_western_cleanup_string (& word); - if (e_name_western_word_is_suffix (word)) { - g_free (word); - return; - } - - /* - * Make sure we didn't just grab a cute nickname. - */ - if (word [0] == '\"') { - g_free (word); - return; - } - - idxs->middle_idx = middle_idx; - name->middle = word; -} - -static void -e_name_western_extract_nickname (ENameWestern *name, ENameWesternIdxs *idxs) -{ - int idx; - int start_idx; - char *str; - - if (idxs->first_idx == -1) - return; - - if (idxs->middle_idx > idxs->first_idx) - idx = idxs->middle_idx + strlen (name->middle); - else - idx = idxs->first_idx + strlen (name->first); - - while (name->full [idx] != '\"' && name->full [idx] != '\0') - idx ++; - - if (name->full [idx] != '\"') - return; - - start_idx = idx; - - /* - * Advance to the next double quote. - */ - idx ++; - - while (name->full [idx] != '\"' && name->full [idx] != '\0') - idx ++; - - if (name->full [idx] == '\0') - return; - - str = g_malloc0 (idx - start_idx + 2); - strncpy (str, name->full + start_idx, idx - start_idx + 1); - - name->nick = str; - idxs->nick_idx = start_idx; -} - -static int -e_name_western_last_get_max_idx (ENameWestern *name, ENameWesternIdxs *idxs) -{ - int max_idx = -1; - - if (name->prefix != NULL) - max_idx = e_name_western_max ( - max_idx, idxs->prefix_idx + strlen (name->prefix)); - - if (name->first != NULL) - max_idx = e_name_western_max ( - max_idx, idxs->first_idx + strlen (name->first)); - - if (name->middle != NULL) - max_idx = e_name_western_max ( - max_idx, idxs->middle_idx + strlen (name->middle)); - - if (name->nick != NULL) - max_idx = e_name_western_max ( - max_idx, idxs->nick_idx + strlen (name->nick)); - - return max_idx; -} - -static void -e_name_western_extract_last (ENameWestern *name, ENameWesternIdxs *idxs) -{ - char *word; - int idx = -1; - - idx = e_name_western_last_get_max_idx (name, idxs); - - /* - * In the case where there is no preceding name element, the - * name is either just a first name ("Nat", "John"), is a - * single-element name ("Cher", which we treat as a first - * name), or is just a last name. The only time we can - * differentiate a last name alone from a single-element name - * or a first name alone is if it's a complex last name ("de - * Icaza", "van Josephsen"). So if there is no preceding name - * element, we check to see whether or not the first part of - * the name is the beginning of a complex name. If it is, - * we subsume the entire string. If we accidentally subsume - * the suffix, this will get fixed in the fixup routine. - */ - if (idx == -1) { - word = e_name_western_get_words_at_idx (name->full, 0, 1); - if (! e_name_western_is_complex_last_beginning (word)) { - g_free (word); - return; - } - - name->last = g_strdup (name->full); - idxs->last_idx = 0; - return; - } - - /* Skip past the white space. */ - while (isspace (name->full [idx]) && name->full [idx] != '\0') - idx ++; - - if (name->full [idx] == '\0') - return; - - word = e_name_western_get_words_at_idx (name->full, idx, 1); - e_name_western_cleanup_string (& word); - if (e_name_western_word_is_suffix (word)) { - g_free (word); - return; - } - g_free (word); - - /* - * Subsume the rest of the string into the last name. If we - * accidentally include the prefix, it will get fixed later. - * This is the only way to handle things like "Miguel de Icaza - * Amozorrutia" without dropping data and forcing the user - * to retype it. - */ - name->last = g_strdup (name->full + idx); - idxs->last_idx = idx; -} - -static char * -e_name_western_get_preceding_word (char *str, int idx) -{ - int word_len; - char *word; - char *p; - - p = str + idx; - - while (isspace (*p) && p > str) - p --; - - while (! isspace (*p) && p > str) - p --; - - if (isspace (*p)) - p ++; - - word_len = (str + idx) - p; - word = g_malloc0 (word_len + 1); - if (word_len > 0) - strncpy (word, p, word_len); - - return word; -} - -static char * -e_name_western_get_suffix_at_str_end (char *str) -{ - char *suffix; - char *p; - - /* - * Walk backwards till we reach the beginning of the - * (potentially-comma-separated) list of suffixes. - */ - p = str + strlen (str); - while (1) { - char *nextp; - char *word; - - word = e_name_western_get_preceding_word (str, p - str); - nextp = p - strlen (word) - 1; - - e_name_western_cleanup_string (& word); - - if (e_name_western_word_is_suffix (word)) { - p = nextp; - g_free (word); - } else { - g_free (word); - break; - } - } - - if (p == (str + strlen (str))) - return NULL; - - suffix = g_strdup (p); - e_name_western_cleanup_string (& suffix); - - if (strlen (suffix) == 0) { - g_free (suffix); - return NULL; - } - - return suffix; -} - -static void -e_name_western_extract_suffix (ENameWestern *name, ENameWesternIdxs *idxs) -{ - - name->suffix = e_name_western_get_suffix_at_str_end (name->full); - - if (name->suffix == NULL) - return; - - idxs->suffix_idx = strlen (name->full) - strlen (name->suffix); -} - -static gboolean -e_name_western_detect_backwards (ENameWestern *name, ENameWesternIdxs *idxs) -{ - char *comma; - char *word; - - comma = strchr (name->full, ','); - - if (comma == NULL) - return FALSE; - - /* - * If there's a comma, we need to detect whether it's - * separating the last name from the first or just separating - * suffixes. So we grab the word which comes before the - * comma and check if it's a suffix. - */ - word = e_name_western_get_preceding_word (name->full, comma - name->full); - - if (e_name_western_word_is_suffix (word)) { - g_free (word); - return FALSE; - } - - g_free (word); - return TRUE; -} - -static void -e_name_western_reorder_asshole (ENameWestern *name, ENameWesternIdxs *idxs) -{ - char *prefix; - char *last; - char *suffix; - char *firstmidnick; - char *newfull; - - char *comma; - char *p; - - if (! e_name_western_detect_backwards (name, idxs)) - return; - - /* - * Convert - * , - * to - * - */ - - /* - * Grab the prefix from the beginning. - */ - prefix = e_name_western_get_prefix_at_str (name->full); - - /* - * Everything from the end of the prefix to the comma is the - * last name. - */ - comma = strchr (name->full, ','); - if (comma == NULL) - return; - - p = name->full + (prefix == NULL ? 0 : strlen (prefix)); - - while (isspace (*p) && *p != '\0') - p ++; - - last = g_malloc0 (comma - p + 1); - strncpy (last, p, comma - p); - - /* - * Get the suffix off the end. - */ - suffix = e_name_western_get_suffix_at_str_end (name->full); - - /* - * Firstmidnick is everything from the comma to the beginning - * of the suffix. - */ - p = comma + 1; - - while (isspace (*p) && *p != '\0') - p ++; - - if (suffix != NULL) { - char *q; - - /* - * Point q at the beginning of the suffix. - */ - q = name->full + strlen (name->full) - strlen (suffix) - 1; - - /* - * Walk backwards until we hit the space which - * separates the suffix from firstmidnick. - */ - while (! isspace (*q) && q > comma) - q --; - - if ((q - p + 1) > 0) { - firstmidnick = g_malloc0 (q - p + 1); - strncpy (firstmidnick, p, q - p); - } else - firstmidnick = NULL; - } else { - firstmidnick = g_strdup (p); - } - - /* - * Create our new reordered version of the name. - */ -#define NULLSTR(a) ((a) == NULL ? "" : (a)) - newfull = g_strdup_printf ("%s %s %s %s", NULLSTR (prefix), NULLSTR (firstmidnick), - NULLSTR (last), NULLSTR (suffix)); - g_strstrip (newfull); - g_free (name->full); - name->full = newfull; - - - g_free (prefix); - g_free (firstmidnick); - g_free (last); - g_free (suffix); -} - -static void -e_name_western_zap_nil (char **str, int *idx) -{ - if (*str == NULL) - return; - - if (strlen (*str) != 0) - return; - - *idx = -1; - g_free (*str); - *str = NULL; -} - -static void -e_name_western_fixup (ENameWestern *name, ENameWesternIdxs *idxs) -{ - /* - * The middle and last names cannot be the same. - */ - if (idxs->middle_idx != -1 && idxs->middle_idx == idxs->last_idx) { - idxs->middle_idx = -1; - g_free (name->middle); - name->middle = NULL; - } - - /* - * If we have a middle name and no last name, then we mistook - * the last name for the middle name. - */ - if (idxs->last_idx == -1 && idxs->middle_idx != -1) { - idxs->last_idx = idxs->middle_idx; - name->last = name->middle; - name->middle = NULL; - idxs->middle_idx = -1; - } - - /* - * Check to see if we accidentally included the suffix in the - * last name. - */ - if (idxs->suffix_idx != -1 && idxs->last_idx != -1 && - idxs->suffix_idx < (idxs->last_idx + strlen (name->last))) { - char *sfx; - - sfx = name->last + (idxs->suffix_idx - idxs->last_idx); - if (sfx != NULL) { - char *newlast; - char *p; - - p = sfx - 1; - while (isspace (*p) && p > name->last) - p --; - p ++; - - newlast = g_malloc0 (p - name->last + 1); - strncpy (newlast, name->last, p - name->last); - g_free (name->last); - name->last = newlast; - } - } - - /* - * If we have a prefix and a first name, but no last name, - * then we need to assign the first name to the last name. - * This way we get things like "Mr Friedman" correctly. - */ - if (idxs->first_idx != -1 && idxs->prefix_idx != -1 && - idxs->last_idx == -1) { - name->last = name->first; - idxs->last_idx = idxs->first_idx; - idxs->first_idx = -1; - name->first = NULL; - } - - /* - * Remove stray spaces and commas (although there don't seem - * to be any in the test cases, they might show up later). - */ - e_name_western_cleanup_string (& name->prefix); - e_name_western_cleanup_string (& name->first); - e_name_western_cleanup_string (& name->middle); - e_name_western_cleanup_string (& name->nick); - e_name_western_cleanup_string (& name->last); - e_name_western_cleanup_string (& name->suffix); - - /* - * Make zero-length strings just NULL. - */ - e_name_western_zap_nil (& name->prefix, & idxs->prefix_idx); - e_name_western_zap_nil (& name->first, & idxs->first_idx); - e_name_western_zap_nil (& name->middle, & idxs->middle_idx); - e_name_western_zap_nil (& name->nick, & idxs->nick_idx); - e_name_western_zap_nil (& name->last, & idxs->last_idx); - e_name_western_zap_nil (& name->suffix, & idxs->suffix_idx); -} - -/** - * e_name_western_western_parse_fullname: - * @full_name: A string containing a Western name. - * - * Parses @full_name and returns an #ENameWestern object filled with - * the component parts of the name. - */ -ENameWestern * -e_name_western_parse (const char *full_name) -{ - ENameWesternIdxs *idxs; - ENameWestern *wname; - - wname = g_new0 (ENameWestern, 1); - - wname->full = g_strdup (full_name); - - idxs = g_new0 (ENameWesternIdxs, 1); - - idxs->prefix_idx = -1; - idxs->first_idx = -1; - idxs->middle_idx = -1; - idxs->nick_idx = -1; - idxs->last_idx = -1; - idxs->suffix_idx = -1; - - /* - * An extremely simple algorithm. - * - * The goal here is to get it right 95% of the time for - * Western names. - * - * First we check to see if this is an ass-backwards name - * ("Prefix Last, First Middle Suffix"). These names really - * suck (imagine "Dr von Johnson, Albert Roderick Jr"), so - * we reorder them first and then parse them. - * - * Next, we grab the most obvious assignments for the various - * parts of the name. Once this is done, we check for stupid - * errors and fix them up. - */ - e_name_western_reorder_asshole (wname, idxs); - - e_name_western_extract_prefix (wname, idxs); - e_name_western_extract_first (wname, idxs); - e_name_western_extract_nickname (wname, idxs); - e_name_western_extract_middle (wname, idxs); - e_name_western_extract_last (wname, idxs); - e_name_western_extract_suffix (wname, idxs); - - e_name_western_fixup (wname, idxs); - - g_free (idxs); - - return wname; -} - -/** - * e_name_western_free: - * @name: An ENameWestern object which needs to be freed. - * - * Deep-frees @name - */ -void -e_name_western_free (ENameWestern *w) -{ - - g_free (w->prefix); - g_free (w->first); - g_free (w->middle); - g_free (w->nick); - g_free (w->last); - g_free (w->suffix); - - g_free (w->full); - - g_free (w); -} diff --git a/addressbook/ename/e-name-western.h b/addressbook/ename/e-name-western.h deleted file mode 100644 index fa5bac494c..0000000000 --- a/addressbook/ename/e-name-western.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef __E_NAME_WESTERN_H__ -#define __E_NAME_WESTERN_H__ - -typedef struct { - - /* Public */ - char *prefix; - char *first; - char *middle; - char *nick; - char *last; - char *suffix; - - /* Private */ - char *full; -} ENameWestern; - -ENameWestern *e_name_western_parse (const char *full_name); -void e_name_western_free (ENameWestern *w); - -#endif /* ! __E_NAME_WESTERN_H__ */ diff --git a/addressbook/ename/test-ename-western-gtk.c b/addressbook/ename/test-ename-western-gtk.c deleted file mode 100644 index 17daf42b30..0000000000 --- a/addressbook/ename/test-ename-western-gtk.c +++ /dev/null @@ -1,148 +0,0 @@ -#include -#include - -ENameWestern *name; -GtkWidget *full; -GtkWidget *prefix; -GtkWidget *first; -GtkWidget *middle; -GtkWidget *nick; -GtkWidget *last; -GtkWidget *suffix; - -static void -fill_entries (void) -{ - -#define SET(a,b) (gtk_entry_set_text (GTK_ENTRY (a), (b) == NULL ? "" : (b))) - SET(prefix, name->prefix); - SET(first, name->first); - SET(middle, name->middle); - SET(nick, name->nick); - SET(last, name->last); - SET(suffix, name->suffix); -} - -static void -full_changed_cb (GtkEntry *fulle) -{ - e_name_western_free (name); - name = e_name_western_parse (gtk_entry_get_text (fulle)); - fill_entries (); -} - -static void -create_window (void) -{ - GtkWidget *app; - GtkTable *table; - - GtkWidget *prefix_label; - GtkWidget *first_label; - GtkWidget *middle_label; - GtkWidget *nick_label; - GtkWidget *last_label; - GtkWidget *suffix_label; - - app = gnome_app_new ("test", "Evolution Western Name Parser"); - - table = GTK_TABLE (gtk_table_new (3, 6, FALSE)); - - full = gtk_entry_new (); - prefix = gtk_entry_new (); - first = gtk_entry_new (); - middle = gtk_entry_new (); - nick = gtk_entry_new (); - last = gtk_entry_new (); - suffix = gtk_entry_new (); - - gtk_widget_set_usize (prefix, 100, 0); - gtk_widget_set_usize (first, 100, 0); - gtk_widget_set_usize (middle, 100, 0); - gtk_widget_set_usize (nick, 100, 0); - gtk_widget_set_usize (last, 100, 0); - gtk_widget_set_usize (suffix, 100, 0); - - gtk_table_attach (table, full, 0, 6, 0, 1, - GTK_EXPAND | GTK_FILL, 0, - 0, 0); - - gtk_table_attach (table, prefix, 0, 1, 1, 2, - GTK_EXPAND | GTK_FILL | GTK_SHRINK, 0, - 0, 0); - - gtk_table_attach (table, first, 1, 2, 1, 2, - GTK_EXPAND | GTK_FILL | GTK_SHRINK, 0, - 0, 0); - - gtk_table_attach (table, middle, 2, 3, 1, 2, - GTK_EXPAND | GTK_FILL | GTK_SHRINK, 0, - 0, 0); - - gtk_table_attach (table, nick, 3, 4, 1, 2, - GTK_EXPAND | GTK_FILL | GTK_SHRINK, 0, - 0, 0); - - gtk_table_attach (table, last, 4, 5, 1, 2, - GTK_EXPAND | GTK_FILL | GTK_SHRINK, 0, - 0, 0); - - gtk_table_attach (table, suffix, 5, 6, 1, 2, - GTK_EXPAND | GTK_FILL | GTK_SHRINK, 0, - 0, 0); - - prefix_label = gtk_label_new ("Prefix"); - first_label = gtk_label_new ("First"); - middle_label = gtk_label_new ("Middle"); - nick_label = gtk_label_new ("Nick"); - last_label = gtk_label_new ("Last"); - suffix_label = gtk_label_new ("Suffix"); - - gtk_table_attach (table, prefix_label, 0, 1, 2, 3, - GTK_SHRINK, 0, - 0, 0); - - gtk_table_attach (table, first_label, 1, 2, 2, 3, - GTK_SHRINK, 0, - 0, 0); - - gtk_table_attach (table, middle_label, 2, 3, 2, 3, - GTK_SHRINK, 0, - 0, 0); - - gtk_table_attach (table, nick_label, 3, 4, 2, 3, - GTK_SHRINK, 0, - 0, 0); - - gtk_table_attach (table, last_label, 4, 5, 2, 3, - GTK_SHRINK, 0, - 0, 0); - - gtk_table_attach (table, suffix_label, 5, 6, 2, 3, - GTK_SHRINK, 0, - 0, 0); - - gnome_app_set_contents (GNOME_APP (app), GTK_WIDGET (table)); - - gtk_widget_show_all (app); - - gtk_entry_set_text (GTK_ENTRY (full), - "The Honorable Doctor van Jacobsen, Albert Roderick \"The Clenched Fist\" Jr, MD, PhD, Esquire"); - - name = e_name_western_parse ("The Honorable Doctor van Jacobsen, Albert Roderick \"The Clenched Fist\" Jr, MD, PhD, Esquire"); - fill_entries (); - - gtk_signal_connect (GTK_OBJECT (full), "changed", full_changed_cb, NULL); -} - -int -main (int argc, char **argv) -{ - gnome_init ("Test EName", "Test EName", argc, argv); - - create_window (); - - gtk_main (); - - return 0; -} diff --git a/addressbook/ename/test-ename-western.c b/addressbook/ename/test-ename-western.c deleted file mode 100644 index 6d3beaf16f..0000000000 --- a/addressbook/ename/test-ename-western.c +++ /dev/null @@ -1,70 +0,0 @@ -#include -#include - -#include - -static void -do_name (char *n) -{ - ENameWestern *wname; - - wname = e_name_western_parse (n); - - printf ("Full Name: [%s]\n", n); - - printf ("Prefix: [%s]\n", wname->prefix); - printf ("First: [%s]\n", wname->first); - printf ("Middle: [%s]\n", wname->middle); - printf ("Nick: [%s]\n", wname->nick); - printf ("Last: [%s]\n", wname->last); - printf ("Suffix: [%s]\n", wname->suffix); - - printf ("\n"); - - e_name_western_free (wname); -} - -int -main (int argc, char **argv) -{ - if (argc == 2) { - while (! feof (stdin)) { - char s[256]; - - if (fgets (s, sizeof (s), stdin) == NULL) - return 0; - - g_strstrip (s); - - do_name (s); - } - - return 0; - } - - do_name ("Nat"); - do_name ("Karl Anders Carlsson"); - do_name ("Miguel de Icaza Amozorrutia"); - do_name ("The Honorable Doctor de Icaza, Miguel \"Sparky\" Junior, PhD, MD"); - do_name ("Nat Friedman MD, Phd"); - do_name ("Nat Friedman PhD"); - do_name ("Friedman, Nat"); - do_name ("Miguel de Icaza Esquire"); - do_name ("Dr Miguel \"Sparky\" de Icaza"); - do_name ("Robert H.B. Netzer"); - do_name ("W. Richard Stevens"); - do_name ("Nat Friedman"); - do_name ("N. Friedman"); - do_name ("Miguel de Icaza"); - do_name ("Drew Johnson"); - do_name ("President Bill \"Slick Willy\" Clinton"); - do_name ("The Honorable Mark J. Einstein Jr"); - do_name ("Friedman, Nat"); - do_name ("de Icaza, Miguel"); - do_name ("Mr de Icaza, Miguel"); - do_name ("Smith, John Jr"); - do_name ("Nick Glennie-Smith"); - do_name ("Dr von Johnson, Albert Roderick Jr"); - - return 0; -} diff --git a/addressbook/gui/.cvsignore b/addressbook/gui/.cvsignore deleted file mode 100644 index 09980ae6ba..0000000000 --- a/addressbook/gui/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -.deps -.libs -Makefile -Makefile.in -*.lo -*.la diff --git a/addressbook/gui/Makefile.am b/addressbook/gui/Makefile.am deleted file mode 100644 index 50c258b544..0000000000 --- a/addressbook/gui/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS = minicard component \ No newline at end of file diff --git a/addressbook/gui/component/.cvsignore b/addressbook/gui/component/.cvsignore deleted file mode 100644 index a8ecb5d170..0000000000 --- a/addressbook/gui/component/.cvsignore +++ /dev/null @@ -1,10 +0,0 @@ -.deps -.libs -.pure -Makefile -Makefile.in -*.lo -*.la -evolution-addressbook -evolution-addressbook.pure -test-addressbook diff --git a/addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in b/addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in deleted file mode 100644 index 15820b2e03..0000000000 --- a/addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/addressbook/gui/component/GNOME_Evolution_Addressbook.oafinfo b/addressbook/gui/component/GNOME_Evolution_Addressbook.oafinfo deleted file mode 100644 index 15820b2e03..0000000000 --- a/addressbook/gui/component/GNOME_Evolution_Addressbook.oafinfo +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/addressbook/gui/component/Makefile.am b/addressbook/gui/component/Makefile.am deleted file mode 100644 index 0958528daf..0000000000 --- a/addressbook/gui/component/Makefile.am +++ /dev/null @@ -1,88 +0,0 @@ -CPPFLAGS = \ - -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" - -INCLUDES = \ - -DG_LOG_DOMAIN=\"evolution-addressbook\" \ - $(EXTRA_GNOME_CFLAGS) \ - $(GNOME_INCLUDEDIR) \ - -I$(top_srcdir) \ - -I$(top_builddir) \ - -I$(top_srcdir)/shell \ - -I$(top_builddir)/shell \ - -I$(top_srcdir)/widgets/e-text \ - -I$(top_srcdir)/widgets/e-table \ - -I$(top_srcdir)/addressbook/gui/minicard \ - -I$(top_srcdir)/addressbook/contact-editor \ - -I$(top_srcdir)/addressbook/backend \ - -I$(top_builddir)/addressbook/backend \ - $(BONOBO_HTML_GNOME_CFLAGS) \ - -DEVOLUTION_VERSION=\""$(VERSION)"\" \ - -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \ - -DEVOLUTION_ICONSDIR=\""$(iconsdir)"\" \ - -DEVOLUTION_LOCALEDIR=\""$(datadir)/locale"\" \ - -DCAMEL_PROVIDERDIR=\""$(providerdir)"\" - -bin_PROGRAMS = \ - evolution-addressbook - -evolution_addressbook_SOURCES = \ - e-ldap-server-dialog.c \ - e-ldap-server-dialog.h \ - e-addressbook-model.c \ - e-addressbook-model.h \ - addressbook-component.c \ - addressbook-component.h \ - addressbook-factory.c \ - addressbook.c \ - addressbook.h - -# FIXME We should make a libeshell library instead of this gross hack. -SHELL_OBJS = \ - $(top_builddir)/shell/Evolution-common.o \ - $(top_builddir)/shell/Evolution-stubs.o \ - $(top_builddir)/shell/Evolution-skels.o \ - $(top_builddir)/shell/evolution-shell-component.o \ - $(top_builddir)/shell/evolution-storage.o - -evolution_addressbook_LDADD = \ - $(SHELL_OBJS) \ - $(EXTRA_GNOME_LIBS) \ - $(BONOBO_HTML_GNOME_LIBS) \ - $(top_builddir)/addressbook/gui/minicard/libeminicard.a \ - $(top_builddir)/addressbook/backend/ebook/libebook.la \ - $(top_builddir)/addressbook/ename/libename.la \ - $(top_builddir)/addressbook/contact-editor/libecontacteditor.a \ - $(top_builddir)/libversit/libversit.la \ - $(top_builddir)/widgets/e-text/libetext.a \ - $(top_builddir)/widgets/e-table/libetable.a \ - $(top_builddir)/e-util/libeutil.la \ - $(top_builddir)/addressbook/printing/libecontactprint.a - -evolution_addressbook_LDFLAGS = `gnome-config --libs gdk_pixbuf` - -if USING_OAF -oafdir = $(datadir)/oaf -oaf_DATA = addressbook.oafinfo -else -gnorbadir = $(sysconfdir)/CORBA/servers -gnorba_DATA = addressbook.gnorba -endif - -gladedir = $(datadir)/evolution/glade -glade_DATA = ldap-server-dialog.glade ldap-server-dialog.glade.h - -EXTRA_DIST = \ - $(glade_DATA) \ - addressbook.gnorba \ - addressbook.oafinfo - -if ENABLE_PURIFY -PLINK = $(LIBTOOL) --mode=link $(PURIFY) $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ - -all-local: evolution-addressbook.pure - -evolution-addressbook.pure: evolution-addressbook - @rm -f evolution-addressbook.pure - $(PLINK) $(evolution_addressbook_LDFLAGS) $(evolution_addressbook_OBJECTS) $(evolution_addressbook_LDADD) $(LIBS) - -endif diff --git a/addressbook/gui/component/addressbook-component.c b/addressbook/gui/component/addressbook-component.c deleted file mode 100644 index 459a77d510..0000000000 --- a/addressbook/gui/component/addressbook-component.c +++ /dev/null @@ -1,100 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* addressbook-component.c - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include - -#include "evolution-shell-component.h" -#include "evolution-storage.h" - -#include "addressbook-component.h" - - -#ifdef USING_OAF -#define COMPONENT_FACTORY_ID "OAFIID:evolution-shell-component-factory:addressbook:dbf3bba0-4b0a-4f07-899b-1ec56fdf38a0" -#else -#define COMPONENT_FACTORY_ID "evolution-shell-component-factory:addressbook" -#endif - -static BonoboGenericFactory *factory = NULL; - -static const EvolutionShellComponentFolderType folder_types[] = { - { "contacts", "evolution-contacts.png" }, - { NULL, NULL } -}; - - -/* EvolutionShellComponent methods and signals. */ - -static BonoboControl * -create_view (EvolutionShellComponent *shell_component, - const char *physical_uri, - void *closure) -{ - BonoboControl *control; - - control = addressbook_factory_new_control (); - bonobo_control_set_property (control, "folder_uri", physical_uri, NULL); - - return control; -} - -static void -owner_set_cb (EvolutionShellComponent *shell_component, - Evolution_Shell shell_interface) -{ - g_print ("addressbook: Yeeeh! We have an owner!\n"); /* FIXME */ -} - - -/* The factory function. */ - -static BonoboObject * -factory_fn (BonoboGenericFactory *factory, - void *closure) -{ - EvolutionShellComponent *shell_component; - - shell_component = evolution_shell_component_new (folder_types, create_view, NULL); - - gtk_signal_connect (GTK_OBJECT (shell_component), "owner_set", - GTK_SIGNAL_FUNC (owner_set_cb), NULL); - - return BONOBO_OBJECT (shell_component); -} - - -void -addressbook_component_factory_init (void) -{ - if (factory != NULL) - return; - - factory = bonobo_generic_factory_new (COMPONENT_FACTORY_ID, factory_fn, NULL); - - if (factory == NULL) - g_error ("Cannot initialize the Evolution addressbook factory."); -} diff --git a/addressbook/gui/component/addressbook-component.h b/addressbook/gui/component/addressbook-component.h deleted file mode 100644 index ec37da694a..0000000000 --- a/addressbook/gui/component/addressbook-component.h +++ /dev/null @@ -1,29 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* addressbook-component.h - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -#ifndef _ADDRESSBOOK_COMPONENT_H -#define _ADDRESSBOOK_COMPONENT_H - -void addressbook_component_factory_init (void); - -#endif /* _ADDRESSBOOK_COMPONENT_H */ diff --git a/addressbook/gui/component/addressbook-factory.c b/addressbook/gui/component/addressbook-factory.c deleted file mode 100644 index f16c321b68..0000000000 --- a/addressbook/gui/component/addressbook-factory.c +++ /dev/null @@ -1,82 +0,0 @@ -/** - * sample-control-factory.c - * - * Copyright 1999, Helix Code, Inc. - * - * Author: - * Nat Friedman (nat@nat.org) - * - */ - -#include -#include -#include -#include -#include - -#include "addressbook.h" -#include "addressbook-component.h" - -#ifdef USING_OAF - -#include - -static void -init_corba (int *argc, char **argv) -{ - gnome_init_with_popt_table ("evolution-addressbook", "0.0", - *argc, argv, oaf_popt_options, 0, NULL); - - oaf_init (*argc, argv); -} - -#else - -#include - -static void -init_corba (int *argc, char **argv) -{ - CORBA_Environment ev; - - CORBA_exception_init (&ev); - - gnome_CORBA_init_with_popt_table ( - "evolution-addressbook", "0.0", - argc, argv, NULL, 0, NULL, GNORBA_INIT_SERVER_FUNC, &ev); - - CORBA_exception_free (&ev); -} - -#endif - -static void -init_bonobo (int argc, char **argv) -{ - if (bonobo_init (CORBA_OBJECT_NIL, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL) == FALSE) - g_error (_("Could not initialize Bonobo")); - - glade_gnome_init (); -} - -int -main (int argc, char **argv) -{ - init_corba (&argc, argv); - - init_bonobo (argc, argv); - - /* FIXME: Messy names here. This file should be `main.c'. `addressbook.c' should - be `addressbook-control-factory.c' and the functions should be called - `addressbook_control_factory_something()'. And `addressbook-component.c' - should be `addressbook-component-factory.c'. */ - - addressbook_factory_init (); - addressbook_component_factory_init (); - - e_cursors_init(); - - bonobo_main (); - - return 0; -} diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c deleted file mode 100644 index dab940d088..0000000000 --- a/addressbook/gui/component/addressbook.c +++ /dev/null @@ -1,946 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * addressbook.c: - * - * Author: - * Chris Lahey (clahey@helixcode.com) - * - * (C) 2000 Helix Code, Inc. - */ - -#include - -#include -#include -#include - -#include "addressbook.h" - -#include -#include -#include -#include "e-minicard-view.h" - -#include -#include - -#include -#include "e-contact-editor.h" -#include "e-ldap-server-dialog.h" - -#include - -#ifdef USING_OAF -#define CONTROL_FACTORY_ID "OAFIID:control-factory:addressbook:3e10597b-0591-4d45-b082-d781b7aa6e17" -#else -#define CONTROL_FACTORY_ID "control-factory:addressbook" -#endif - -#define PROPERTY_FOLDER_URI "folder_uri" - -#define PROPERTY_FOLDER_URI_IDX 1 - -typedef enum { - ADDRESSBOOK_VIEW_NONE, /* initialized to this */ - ADDRESSBOOK_VIEW_TABLE, - ADDRESSBOOK_VIEW_MINICARD -} AddressbookViewType; - -typedef struct { - AddressbookViewType view_type; - EBook *book; - GtkWidget *vbox; - GtkWidget *minicard_vbox; - GtkWidget *canvas; - GnomeCanvasItem *view; - GnomeCanvasItem *rect; - GtkWidget *table; - ETableModel *model; - ECardSimple *simple; - GtkAllocation last_alloc; - BonoboControl *control; - BonoboPropertyBag *properties; - char *uri; -} AddressbookView; - -static void change_view_type (AddressbookView *view, AddressbookViewType view_type); - -static void -control_deactivate (BonoboControl *control, BonoboUIHandler *uih) -{ - /* how to remove a menu item */ - bonobo_ui_handler_menu_remove (uih, "/File/Print"); - bonobo_ui_handler_menu_remove (uih, "/View/"); - bonobo_ui_handler_menu_remove (uih, "/View/Toggle View"); - bonobo_ui_handler_menu_remove (uih, "/Actions/New Contact"); -#ifdef HAVE_LDAP - bonobo_ui_handler_menu_remove (uih, "/Actions/New Directory Server"); -#endif - /* remove our toolbar */ - bonobo_ui_handler_dock_remove (uih, "/Toolbar"); -} - -static void -do_nothing_cb (BonoboUIHandler *uih, void *user_data, const char *path) -{ - printf ("Yow! I am called back!\n"); -} - -static void -card_added_cb (EBook* book, EBookStatus status, const char *id, - gpointer user_data) -{ - g_print ("%s: %s(): a card was added\n", __FILE__, __FUNCTION__); -} - -static void -card_modified_cb (EBook* book, EBookStatus status, - gpointer user_data) -{ - g_print ("%s: %s(): a card was modified\n", __FILE__, __FUNCTION__); -} - -static void -new_contact_cb (BonoboUIHandler *uih, void *user_data, const char *path) -{ - gint result; - ECard *card; - GtkWidget* contact_editor; - EBook *book; - AddressbookView *view = (AddressbookView *) user_data; - GtkObject *object; - GtkWidget* dlg = gnome_dialog_new ("Contact Editor", "Save", "Cancel", NULL); - - card = e_card_new(""); - contact_editor = e_contact_editor_new(card); - gtk_object_sink(GTK_OBJECT(card)); - - gtk_window_set_policy(GTK_WINDOW(dlg), FALSE, TRUE, FALSE); - - if (view->view) - object = GTK_OBJECT(view->view); - else - object = GTK_OBJECT(view->model); - gtk_object_get(object, "book", &book, NULL); - - - g_assert (E_IS_BOOK (book)); - - gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dlg)->vbox), - contact_editor, TRUE, TRUE, 0); - - gtk_widget_show (contact_editor); - gtk_widget_show (dlg); - - gnome_dialog_close_hides (GNOME_DIALOG (dlg), TRUE); - result = gnome_dialog_run_and_close (GNOME_DIALOG (dlg)); - - - /* If the user clicks "okay"...*/ - if (result == 0) { - ECard *card; - g_assert (contact_editor); - g_assert (GTK_IS_OBJECT (contact_editor)); - gtk_object_get(GTK_OBJECT(contact_editor), - "card", &card, - NULL); - - /* Add the card in the contact editor to our ebook */ - e_book_add_card ( - book, - card, - card_added_cb, - NULL); - } - -} - -static void -toggle_view_as_cb (BonoboUIHandler *uih, void *user_data, const char *path) -{ - AddressbookView *view = user_data; - - if (view->view_type == ADDRESSBOOK_VIEW_TABLE) - change_view_type (view, ADDRESSBOOK_VIEW_MINICARD); - else - change_view_type (view, ADDRESSBOOK_VIEW_TABLE); -} - -#ifdef HAVE_LDAP -static void -null_cb (EBook *book, EBookStatus status, gpointer closure) -{ -} - -static void -new_server_cb (BonoboUIHandler *uih, void *user_data, const char *path) -{ - ELDAPServer server; - char *uri; - EBook *book; - AddressbookView *view = (AddressbookView *) user_data; - GtkObject *object; - - /* fill in the defaults */ - server.host = g_strdup(""); - server.port = 389; - server.description = g_strdup(""); - server.rootdn = g_strdup(""); - - e_ldap_server_editor_show (&server); - - if (view->view) - object = GTK_OBJECT(view->view); - else - object = GTK_OBJECT(view->model); - gtk_object_get(object, "book", &book, NULL); - g_assert (E_IS_BOOK (book)); - - /* XXX write out the new server info */ - - /* now update the view */ - uri = g_strdup_printf ("ldap://%s:%d/%s", server.host, server.port, server.rootdn); - - e_book_unload_uri (book); - - if (! e_book_load_uri (book, uri, null_cb, NULL)) { - g_warning ("error calling load_uri!\n"); - } -} -#endif - -static char * -get_query (AddressbookView *view) -{ - GtkObject *object; - char *query = NULL; - - if (view->view) - object = GTK_OBJECT(view->view); - else - object = GTK_OBJECT(view->model); - - if (object) - gtk_object_get (object, "query", &query, NULL); - - return query; -} - -static void -set_query (AddressbookView *view, char *query) -{ - GtkObject *object; - - if (view->view) - object = GTK_OBJECT(view->view); - else - object = GTK_OBJECT(view->model); - - gtk_object_set (object, - "query", query, - NULL); -} - -static void -set_book(AddressbookView *view) -{ - if (view->book) - gtk_object_set(view->view ? GTK_OBJECT(view->view) : GTK_OBJECT(view->model), - "book", view->book, - NULL); -} - -static void -find_contact_cb (BonoboUIHandler *uih, void *user_data, const char *path) -{ - gint result; - GtkWidget* search_entry = gtk_entry_new(); - gchar* search_text; - AddressbookView *view = (AddressbookView *) user_data; - GtkWidget* dlg = gnome_dialog_new ("Search Contacts", "Find", "Cancel", NULL); - - search_text = get_query (view); - gtk_entry_set_text(GTK_ENTRY(search_entry), search_text); - g_free (search_text); - - gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dlg)->vbox), - search_entry, TRUE, TRUE, 0); - - gtk_widget_show_all (dlg); - - gnome_dialog_close_hides (GNOME_DIALOG (dlg), TRUE); - result = gnome_dialog_run_and_close (GNOME_DIALOG (dlg)); - - /* If the user clicks "okay"...*/ - if (result == 0) { - search_text = gtk_entry_get_text(GTK_ENTRY(search_entry)); - set_query (view, search_text); - } - -} - -static void -card_deleted_cb (EBook* book, EBookStatus status, gpointer user_data) -{ - g_print ("%s: %s(): a card was deleted\n", __FILE__, __FUNCTION__); -} - -static void -delete_contact_cb (BonoboUIHandler *uih, void *user_data, const char *path) -{ - AddressbookView *view = (AddressbookView *) user_data; - if (view->view) - e_minicard_view_remove_selection (E_MINICARD_VIEW(view->view), card_deleted_cb, NULL); -} - -static void -print_cb (BonoboUIHandler *uih, void *user_data, const char *path) -{ - AddressbookView *view = (AddressbookView *) user_data; - char *query = get_query(view); - GtkWidget *print = e_contact_print_dialog_new(view->book, query); - g_free(query); - gtk_widget_show_all(print); -} - -static GnomeUIInfo gnome_toolbar [] = { - GNOMEUIINFO_ITEM_STOCK (N_("New"), N_("Create a new contact"), new_contact_cb, GNOME_STOCK_PIXMAP_NEW), - - GNOMEUIINFO_SEPARATOR, - - GNOMEUIINFO_ITEM_STOCK (N_("Find"), N_("Find a contact"), find_contact_cb, GNOME_STOCK_PIXMAP_SEARCH), - GNOMEUIINFO_ITEM_STOCK (N_("Print"), N_("Print contacts"), do_nothing_cb, GNOME_STOCK_PIXMAP_PRINT), - GNOMEUIINFO_ITEM_STOCK (N_("Delete"), N_("Delete a contact"), delete_contact_cb, GNOME_STOCK_PIXMAP_TRASH), - GNOMEUIINFO_SEPARATOR, - GNOMEUIINFO_END -}; - - -static void -search_entry_activated (GtkWidget* widget, gpointer user_data) -{ - char* search_word = gtk_entry_get_text(GTK_ENTRY(widget)); - char* search_query; - AddressbookView *view = (AddressbookView *) user_data; - - if (search_word && strlen (search_word)) - search_query = g_strdup_printf ( - "(contains \"full_name\" \"%s\")", - search_word); - else - search_query = g_strdup ( - "(contains \"full_name\" \"\")"); - - set_query(view, search_query); - - g_free (search_query); -} - -static GtkWidget* -make_quick_search_widget (GtkSignalFunc start_search_func, - gpointer user_data_for_search) -{ - GtkWidget *search_vbox = gtk_vbox_new (FALSE, 0); - GtkWidget *search_entry = gtk_entry_new (); - - if (start_search_func) - { - gtk_signal_connect (GTK_OBJECT (search_entry), "activate", - (GtkSignalFunc) search_entry_activated, - user_data_for_search); - } - - /* add the search entry to the our search_vbox */ - gtk_box_pack_start (GTK_BOX (search_vbox), search_entry, - FALSE, TRUE, 3); - gtk_box_pack_start (GTK_BOX (search_vbox), - gtk_label_new("Quick Search"), - FALSE, TRUE, 0); - - return search_vbox; -} - -static void -control_activate (BonoboControl *control, BonoboUIHandler *uih, - AddressbookView *view) -{ - Bonobo_UIHandler remote_uih; - GtkWidget *toolbar; - BonoboControl *toolbar_control; - GtkWidget *hbox = gtk_hbox_new (FALSE, 0); - GtkWidget *quick_search_widget; - - remote_uih = bonobo_control_get_remote_ui_handler (control); - bonobo_ui_handler_set_container (uih, remote_uih); - - bonobo_ui_handler_menu_new_separator (uih, "/View/", -1); - - bonobo_ui_handler_menu_new_item (uih, "/File/Print", - N_("Print"), - NULL, -1, - BONOBO_UI_HANDLER_PIXMAP_NONE, NULL, - 0, 0, print_cb, - (gpointer) view); - - bonobo_ui_handler_menu_new_item (uih, "/View/Toggle View", - N_("As _Table"), - NULL, -1, - BONOBO_UI_HANDLER_PIXMAP_NONE, NULL, - 0, 0, toggle_view_as_cb, - (gpointer)view); - - bonobo_ui_handler_menu_new_item (uih, "/Actions/New Contact", - N_("_New Contact"), - NULL, -1, - BONOBO_UI_HANDLER_PIXMAP_NONE, NULL, - 0, 0, new_contact_cb, - (gpointer)view); - -#ifdef HAVE_LDAP - bonobo_ui_handler_menu_new_item (uih, "/Actions/New Directory Server", - N_("N_ew Directory Server"), - NULL, -1, - BONOBO_UI_HANDLER_PIXMAP_NONE, NULL, - 0, 0, new_server_cb, - (gpointer)view); -#endif - - toolbar = gtk_toolbar_new (GTK_ORIENTATION_HORIZONTAL, - GTK_TOOLBAR_BOTH); - - gnome_app_fill_toolbar_with_data (GTK_TOOLBAR (toolbar), - gnome_toolbar, - NULL, view); - - gtk_box_pack_start (GTK_BOX (hbox), toolbar, FALSE, TRUE, 0); - - - /* add the search_vbox to the hbox which will be our toolbar */ - quick_search_widget = make_quick_search_widget ( - search_entry_activated, view); - - gtk_box_pack_start (GTK_BOX (hbox), - quick_search_widget, - FALSE, TRUE, 0); - - gtk_widget_show_all (hbox); - - toolbar_control = bonobo_control_new (hbox); - bonobo_ui_handler_dock_add ( - uih, "/Toolbar", - bonobo_object_corba_objref (BONOBO_OBJECT (toolbar_control)), - GNOME_DOCK_ITEM_BEH_EXCLUSIVE, - GNOME_DOCK_TOP, - 1, 1, 0); -} - -static void -control_activate_cb (BonoboControl *control, - gboolean activate, - AddressbookView *view) -{ - BonoboUIHandler *uih; - - uih = bonobo_control_get_ui_handler (control); - g_assert (uih); - - if (activate) - control_activate (control, uih, view); - else - control_deactivate (control, uih); -} - -static void -addressbook_view_free(AddressbookView *view) -{ - if (view->properties) - bonobo_object_unref(BONOBO_OBJECT(view->properties)); - if (view->book) - gtk_object_unref(GTK_OBJECT(view->book)); - g_free(view->uri); - g_free(view); -} - -static void -book_open_cb (EBook *book, EBookStatus status, gpointer closure) -{ - AddressbookView *view = closure; - if (status == E_BOOK_STATUS_SUCCESS) { - set_book (view); - } else { - GtkWidget *warning_dialog, *label, *href; - warning_dialog = gnome_dialog_new ( - _("Unable to open addressbook"), - GNOME_STOCK_BUTTON_CLOSE, - NULL); - - label = gtk_label_new ( - _("We were unable to open this addressbook. This either\n" - "means you have entered an incorrect URI, or have tried\n" - "to access an LDAP server and don't have LDAP support\n" - "compiled in. If you've entered a URI, check the URI for\n" - "correctness and reenter. If not, you probably have\n" - "attempted to access an LDAP server. If you wish to be\n" - "able to use LDAP, you'll need to download and install\n" - "OpenLDAP and recompile and install evolution.\n")); - gtk_misc_set_alignment(GTK_MISC(label), - 0, .5); - gtk_label_set_justify(GTK_LABEL(label), - GTK_JUSTIFY_LEFT); - gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (warning_dialog)->vbox), - label, TRUE, TRUE, 0); - gtk_widget_show (label); - - href = gnome_href_new ("http://www.openldap.org/", "OpenLDAP at http://www.openldap.org/"); - gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (warning_dialog)->vbox), - href, FALSE, FALSE, 0); - gtk_widget_show (href); - - gnome_dialog_run (GNOME_DIALOG (warning_dialog)); - - gtk_object_destroy (GTK_OBJECT (warning_dialog)); - } -} - -static void destroy_callback(GtkWidget *widget, gpointer data) -{ - AddressbookView *view = data; - addressbook_view_free(view); -} - -static void allocate_callback(GtkWidget *canvas, GtkAllocation *allocation, gpointer data) -{ - double width; - AddressbookView *view = data; - view->last_alloc = *allocation; - gnome_canvas_item_set( view->view, - "height", (double) allocation->height, - NULL ); - gnome_canvas_item_set( view->view, - "minimum_width", (double) allocation->width, - NULL ); - gtk_object_get(GTK_OBJECT(view->view), - "width", &width, - NULL); - width = MAX(width, allocation->width); - gnome_canvas_set_scroll_region(GNOME_CANVAS( view->canvas ), 0, 0, width, allocation->height ); - gnome_canvas_item_set( view->rect, - "x2", (double) width, - "y2", (double) allocation->height, - NULL ); -} - -static void resize(GnomeCanvas *canvas, gpointer data) -{ - double width; - AddressbookView *view = data; - gtk_object_get(GTK_OBJECT(view->view), - "width", &width, - NULL); - width = MAX(width, view->last_alloc.width); - gnome_canvas_set_scroll_region(GNOME_CANVAS(view->canvas), 0, 0, width, view->last_alloc.height ); - gnome_canvas_item_set( view->rect, - "x2", (double) width, - "y2", (double) view->last_alloc.height, - NULL ); -} - -static void -get_prop (BonoboPropertyBag *bag, - BonoboArg *arg, - guint arg_id, - gpointer user_data) -{ - AddressbookView *view = user_data; - - switch (arg_id) { - - case PROPERTY_FOLDER_URI_IDX: - if (view && view->uri) - BONOBO_ARG_SET_STRING (arg, view->uri); - else - BONOBO_ARG_SET_STRING (arg, ""); - break; - - default: - g_warning ("Unhandled arg %d\n", arg_id); - } -} - -static void -set_prop (BonoboPropertyBag *bag, - const BonoboArg *arg, - guint arg_id, - gpointer user_data) -{ - AddressbookView *view = user_data; - - char *uri_file; - char *uri_data; - - switch (arg_id) { - - case PROPERTY_FOLDER_URI_IDX: - if (view->uri) { - /* we've already had a uri set on this view, so unload it */ - e_book_unload_uri (view->book); - g_free (view->uri); - } - - view->uri = g_strdup(BONOBO_ARG_GET_STRING (arg)); - - uri_file = g_concat_dir_and_file(view->uri + 7, "uri"); - - uri_data = e_read_file(uri_file); - - if (!uri_data) { - char *file_name = g_concat_dir_and_file(view->uri + 7, "addressbook.db"); - uri_data = g_strdup_printf("file://%s", file_name); - g_free(file_name); - } - if (! e_book_load_uri (view->book, uri_data, book_open_cb, view)) - printf ("error calling load_uri!\n"); - - - g_free(uri_data); - g_free(uri_file); - - break; - - default: - g_warning ("Unhandled arg %d\n", arg_id); - break; - } -} - -#define SPEC " \ - \ - \ - 0 \ - 1 \ - 2 \ - 3 \ - 4 \ - 5 \ - 6 \ - 7 \ - 8 \ - 10 \ - \ - \ - \ - \ -" - -static void -teardown_minicard_view (AddressbookView *view) -{ - if (view->view) { - gtk_object_destroy(GTK_OBJECT(view->view)); - view->view = NULL; - } - if (view->minicard_vbox) { - gtk_widget_destroy(view->minicard_vbox); - view->minicard_vbox = NULL; - } - - view->canvas = NULL; -} - -static void -create_minicard_view (AddressbookView *view, char *initial_query) -{ - GtkWidget *scrollbar; - - gtk_widget_push_visual (gdk_rgb_get_visual ()); - gtk_widget_push_colormap (gdk_rgb_get_cmap ()); - - view->minicard_vbox = gtk_vbox_new(FALSE, 0); - - view->canvas = e_canvas_new(); - view->rect = gnome_canvas_item_new( - gnome_canvas_root( GNOME_CANVAS( view->canvas ) ), - gnome_canvas_rect_get_type(), - "x1", (double) 0, - "y1", (double) 0, - "x2", (double) 100, - "y2", (double) 100, - "fill_color", "white", - NULL ); - - view->view = gnome_canvas_item_new( - gnome_canvas_root( GNOME_CANVAS( view->canvas ) ), - e_minicard_view_get_type(), - "height", (double) 100, - "minimum_width", (double) 100, - NULL ); - - gtk_signal_connect( GTK_OBJECT( view->canvas ), "reflow", - GTK_SIGNAL_FUNC( resize ), - view); - - gnome_canvas_set_scroll_region ( GNOME_CANVAS( view->canvas ), - 0, 0, - 100, 100 ); - - gtk_box_pack_start(GTK_BOX(view->minicard_vbox), view->canvas, TRUE, TRUE, 0); - - scrollbar = gtk_hscrollbar_new( - gtk_layout_get_hadjustment(GTK_LAYOUT(view->canvas))); - - gtk_box_pack_start(GTK_BOX(view->minicard_vbox), scrollbar, FALSE, FALSE, 0); - - gtk_box_pack_start(GTK_BOX(view->vbox), view->minicard_vbox, TRUE, TRUE, 0); - - gtk_widget_show_all( GTK_WIDGET(view->minicard_vbox) ); - - /* Connect the signals */ - gtk_signal_connect( GTK_OBJECT( view->canvas ), "size_allocate", - GTK_SIGNAL_FUNC( allocate_callback ), - ( gpointer ) view ); - -#if 0 - gdk_window_set_back_pixmap( - GTK_LAYOUT(view->canvas)->bin_window, NULL, FALSE); -#endif - - gtk_widget_pop_visual (); - gtk_widget_pop_colormap (); -} - -static void -teardown_table_view (AddressbookView *view) -{ - if (view->table) { - gtk_widget_destroy (GTK_WIDGET (view->table)); - view->table = NULL; - } - if (view->model) { - gtk_object_unref (GTK_OBJECT (view->model)); - view->model = NULL; - } - if (view->simple) { - gtk_object_destroy (GTK_OBJECT (view->simple)); - view->simple = NULL; - } -} - -static void -table_double_click(ETable *table, gint row, AddressbookView *view) -{ - ECard *card = e_addressbook_model_get_card(E_ADDRESSBOOK_MODEL(view->model), row); - gint result; - GtkWidget* contact_editor; - EBook *book; - GtkWidget* dlg = gnome_dialog_new ("Contact Editor", "Save", "Cancel", NULL); - - contact_editor = e_contact_editor_new(card); - gtk_object_unref(GTK_OBJECT(card)); - - gtk_window_set_policy(GTK_WINDOW(dlg), FALSE, TRUE, FALSE); - - gtk_object_get(GTK_OBJECT(view->model), - "book", &book, - NULL); - - g_assert (E_IS_BOOK (book)); - - gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dlg)->vbox), - contact_editor, TRUE, TRUE, 0); - - gtk_widget_show (contact_editor); - gtk_widget_show (dlg); - - gnome_dialog_close_hides (GNOME_DIALOG (dlg), TRUE); - result = gnome_dialog_run_and_close (GNOME_DIALOG (dlg)); - - - /* If the user clicks "okay"...*/ - if (result == 0) { - ECard *card; - g_assert (contact_editor); - g_assert (GTK_IS_OBJECT (contact_editor)); - gtk_object_get(GTK_OBJECT(contact_editor), - "card", &card, - NULL); - - /* Add the card in the contact editor to our ebook */ - e_book_commit_card ( - book, - card, - card_modified_cb, - NULL); - } - - gnome_dialog_close(GNOME_DIALOG (dlg)); -} - -static void -create_table_view (AddressbookView *view, char *initial_query) -{ - ECell *cell_left_just; - ETableHeader *e_table_header; - int i; - - view->simple = e_card_simple_new(NULL); - - view->model = e_addressbook_model_new(); - - /* - Next we create a header. The ETableHeader is used in two - different way. The first is the full_header. This is the - list of possible columns in the view. The second use is - completely internal. Many of the ETableHeader functions are - for that purpose. The only functions we really need are - e_table_header_new and e_table_header_add_col. - - First we create the header. */ - e_table_header = e_table_header_new (); - - /* Next we have to build renderers for all of the columns. - Since all our columns are text columns, we can simply use - the same renderer over and over again. If we had different - types of columns, we could use a different renderer for - each column. */ - cell_left_just = e_cell_text_new (view->model, NULL, GTK_JUSTIFY_LEFT); - - /* Next we create a column object for each view column and add - them to the header. We don't create a column object for - the importance column since it will not be shown. */ - for (i = 0; i < E_CARD_SIMPLE_FIELD_LAST - 1; i++){ - /* Create the column. */ - ETableCol *ecol = e_table_col_new ( - i, e_card_simple_get_name(view->simple, i+1), - 1.0, 20, cell_left_just, - g_str_compare, TRUE); - /* Add it to the header. */ - e_table_header_add_column (e_table_header, ecol, i); - } - - /* Here we create the table. We give it the three pieces of - the table we've created, the header, the model, and the - initial layout. It does the rest. */ - view->table = e_table_new (e_table_header, E_TABLE_MODEL(view->model), SPEC); - - gtk_signal_connect(GTK_OBJECT(view->table), "double_click", - GTK_SIGNAL_FUNC(table_double_click), view); - - gtk_box_pack_start(GTK_BOX(view->vbox), view->table, TRUE, TRUE, 0); - - gtk_widget_show_all( GTK_WIDGET(view->table) ); -} - -static void -change_view_type (AddressbookView *view, AddressbookViewType view_type) -{ - char *query = NULL; - BonoboUIHandler *uih = bonobo_control_get_ui_handler (view->control); - - if (view_type == view->view_type) - return; - - if (view->view_type != ADDRESSBOOK_VIEW_NONE) - query = get_query(view); - else - query = g_strdup("(contains \"full_name\" \"\")"); - - - switch (view_type) { - case ADDRESSBOOK_VIEW_MINICARD: - teardown_table_view (view); - create_minicard_view (view, query); - if (uih) - bonobo_ui_handler_menu_set_label (uih, "/View/Toggle View", - N_("As _Table")); - break; - case ADDRESSBOOK_VIEW_TABLE: - teardown_minicard_view (view); - create_table_view (view, query); - if (uih) - bonobo_ui_handler_menu_set_label (uih, "/View/Toggle View", - N_("As _Minicards")); - break; - default: - g_warning ("view_type must be either TABLE or MINICARD\n"); - g_free (query); - return; - } - - view->view_type = view_type; - - /* set the book */ - set_book (view); - - /* and reset the query */ - if (query) - set_query (view, query); - g_free (query); -} - - -BonoboControl * -addressbook_factory_new_control (void) -{ - AddressbookView *view; - - view = g_new0 (AddressbookView, 1); - - view->vbox = gtk_vbox_new(FALSE, 0); - - gtk_signal_connect( GTK_OBJECT( view->vbox ), "destroy", - GTK_SIGNAL_FUNC( destroy_callback ), - ( gpointer ) view ); - - /* Create the control. */ - view->control = bonobo_control_new(view->vbox); - - view->model = NULL; - view->view = NULL; - - /* create the initial view */ - change_view_type (view, ADDRESSBOOK_VIEW_MINICARD); - - gtk_widget_show_all( view->vbox ); - - /* create the view's ebook */ - view->book = e_book_new (); - - view->properties = bonobo_property_bag_new (get_prop, set_prop, view); - - bonobo_property_bag_add ( - view->properties, PROPERTY_FOLDER_URI, PROPERTY_FOLDER_URI_IDX, - BONOBO_ARG_STRING, NULL, _("The URI that the Folder Browser will display"), 0); - - bonobo_control_set_property_bag (view->control, - view->properties); - - view->uri = NULL; - - gtk_signal_connect (GTK_OBJECT (view->control), "activate", - control_activate_cb, view); - - return view->control; -} - -static BonoboObject * -addressbook_factory (BonoboGenericFactory *Factory, void *closure) -{ - return BONOBO_OBJECT (addressbook_factory_new_control ()); -} - -void -addressbook_factory_init (void) -{ - static BonoboGenericFactory *addressbook_control_factory = NULL; - - if (addressbook_control_factory != NULL) - return; - - addressbook_control_factory = bonobo_generic_factory_new (CONTROL_FACTORY_ID, - addressbook_factory, - NULL); - - if (addressbook_control_factory == NULL) { - g_error ("I could not register a Addressbook factory."); - } -} diff --git a/addressbook/gui/component/addressbook.gnorba b/addressbook/gui/component/addressbook.gnorba deleted file mode 100644 index bc3830686d..0000000000 --- a/addressbook/gui/component/addressbook.gnorba +++ /dev/null @@ -1,23 +0,0 @@ -[control-factory:addressbook] -type=exe -repo_id=IDL:GNOME/GenericFactory:1.0 -description=Factory for the sample Addressbook control -location_info=evolution-addressbook - -[control:addressbook] -type=factory -repo_id=IDL:BonoboControl/addressbook-control:1.0 IDL:GNOME/Control:1.0 -description=A sample Bonobo control which displays an addressbook. -location_info=control-factory:addressbook - -[evolution-shell-component-factory:addressbook] -type=exe -repo_id=IDL:GNOME/GenericFactory:1.0 -description=Factory for the Evolution addressbook component. -location_info=evolution-addressbook - -[evolution-shell-component:addressbook] -type=factory -repo_id=IDL:Evolution/ShellComponent:1.0 -description=Evolution component for handling contacts. -location_info=evolution-shell-component-factory:addressbook diff --git a/addressbook/gui/component/addressbook.h b/addressbook/gui/component/addressbook.h deleted file mode 100644 index 66c5a7e4e6..0000000000 --- a/addressbook/gui/component/addressbook.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef __ADDRESSBOOK_H__ -#define __ADDRESSBOOK_H__ - -#include - -BonoboControl *addressbook_factory_new_control (void); -void addressbook_factory_init (void); - -#endif /* __ADDRESSBOOK_H__ */ diff --git a/addressbook/gui/component/addressbook.oafinfo b/addressbook/gui/component/addressbook.oafinfo deleted file mode 100644 index 15820b2e03..0000000000 --- a/addressbook/gui/component/addressbook.oafinfo +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/addressbook/gui/component/e-addressbook-model.c b/addressbook/gui/component/e-addressbook-model.c deleted file mode 100644 index 5d71757b60..0000000000 --- a/addressbook/gui/component/e-addressbook-model.c +++ /dev/null @@ -1,381 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * - * Author: - * Christopher James Lahey - * - * (C) 1999 Helix Code, Inc. - */ - -#include -#include "e-addressbook-model.h" -#include -#include -#include -#include - -#define PARENT_TYPE e_table_model_get_type() -/* - * EAddressbookModel callbacks - * These are the callbacks that define the behavior of our custom model. - */ -static void e_addressbook_model_set_arg (GtkObject *o, GtkArg *arg, guint arg_id); -static void e_addressbook_model_get_arg (GtkObject *object, GtkArg *arg, guint arg_id); - - -enum { - ARG_0, - ARG_BOOK, - ARG_QUERY, -}; - -static void -addressbook_destroy(GtkObject *object) -{ - EAddressbookModel *model = E_ADDRESSBOOK_MODEL(object); - int i; - - if (model->get_view_idle) - g_source_remove(model->get_view_idle); - if (model->book_view && model->create_card_id) - gtk_signal_disconnect(GTK_OBJECT (model->book_view), - model->create_card_id); - if (model->book_view && model->remove_card_id) - gtk_signal_disconnect(GTK_OBJECT (model->book_view), - model->remove_card_id); - if (model->book_view && model->modify_card_id) - gtk_signal_disconnect(GTK_OBJECT (model->book_view), - model->modify_card_id); - if (model->book) - gtk_object_unref(GTK_OBJECT(model->book)); - if (model->book_view) - gtk_object_unref(GTK_OBJECT(model->book_view)); - - for ( i = 0; i < model->data_count; i++ ) { - gtk_object_unref(GTK_OBJECT(model->data[i])); - } - g_free(model->data); -} - -/* This function returns the number of columns in our ETableModel. */ -static int -addressbook_col_count (ETableModel *etc) -{ - return E_CARD_SIMPLE_FIELD_LAST; -} - -/* This function returns the number of rows in our ETableModel. */ -static int -addressbook_row_count (ETableModel *etc) -{ - EAddressbookModel *addressbook = E_ADDRESSBOOK_MODEL(etc); - return addressbook->data_count; -} - -/* This function returns the value at a particular point in our ETableModel. */ -static void * -addressbook_value_at (ETableModel *etc, int col, int row) -{ - EAddressbookModel *addressbook = E_ADDRESSBOOK_MODEL(etc); - const char *value; - if ( col >= E_CARD_SIMPLE_FIELD_LAST - 1|| row >= addressbook->data_count ) - return NULL; - value = e_card_simple_get_const(addressbook->data[row], - col + 1); - return (void *)(value ? value : ""); -} - -/* This function sets the value at a particular point in our ETableModel. */ -static void -addressbook_set_value_at (ETableModel *etc, int col, int row, const void *val) -{ - EAddressbookModel *addressbook = E_ADDRESSBOOK_MODEL(etc); - ECard *card; - if ( col >= E_CARD_SIMPLE_FIELD_LAST - 1|| row >= addressbook->data_count ) - return; - e_card_simple_set(addressbook->data[row], - col + 1, - val); - gtk_object_get(GTK_OBJECT(addressbook->data[row]), - "card", &card, - NULL); - e_book_commit_card(addressbook->book, card, NULL, NULL); - if ( !etc->frozen ) - e_table_model_cell_changed(etc, col, row); -} - -/* This function returns whether a particular cell is editable. */ -static gboolean -addressbook_is_cell_editable (ETableModel *etc, int col, int row) -{ - return TRUE; -} - -/* This function duplicates the value passed to it. */ -static void * -addressbook_duplicate_value (ETableModel *etc, int col, const void *value) -{ - return g_strdup(value); -} - -/* This function frees the value passed to it. */ -static void -addressbook_free_value (ETableModel *etc, int col, void *value) -{ - g_free(value); -} - -static void * -addressbook_initialize_value (ETableModel *etc, int col) -{ - return g_strdup(""); -} - -static gboolean -addressbook_value_is_empty (ETableModel *etc, int col, const void *value) -{ - return !(value && *(char *)value); -} - -/* This function is for when the model is unfrozen. This can mostly - be ignored for simple models. */ -static void -addressbook_thaw (ETableModel *etc) -{ - e_table_model_changed(etc); -} - -static void -create_card(EBookView *book_view, - const GList *cards, - EAddressbookModel *model) -{ - model->data = g_realloc(model->data, (model->data_count + g_list_length((GList *)cards)) * sizeof(ECard *)); - for ( ; cards; cards = cards->next) { - gtk_object_ref(GTK_OBJECT(cards->data)); - model->data[model->data_count++] = e_card_simple_new (E_CARD(cards->data)); - e_table_model_row_inserted(E_TABLE_MODEL(model), model->data_count - 1); - } -} - -static void -remove_card(EBookView *book_view, - const char *id, - EAddressbookModel *model) -{ - int i; - for ( i = 0; i < model->data_count; i++) { - if ( !strcmp(e_card_simple_get_id(model->data[i]), id) ) { - gtk_object_unref(GTK_OBJECT(model->data[i])); - memmove(model->data + i, model->data + i + 1, (model->data_count - i - 1) * sizeof (ECard *)); - e_table_model_row_deleted(E_TABLE_MODEL(model), i); - } - } -} - -static void -modify_card(EBookView *book_view, - const GList *cards, - EAddressbookModel *model) -{ - for ( ; cards; cards = cards->next) { - int i; - for ( i = 0; i < model->data_count; i++) { - if ( !strcmp(e_card_simple_get_id(model->data[i]), e_card_get_id(E_CARD(cards->data))) ) { - gtk_object_unref(GTK_OBJECT(model->data[i])); - model->data[i] = e_card_simple_new(E_CARD(cards->data)); - gtk_object_ref(GTK_OBJECT(model->data[i])); - e_table_model_row_changed(E_TABLE_MODEL(model), i); - break; - } - } - } -} - -static void -e_addressbook_model_class_init (GtkObjectClass *object_class) -{ - ETableModelClass *model_class = (ETableModelClass *) object_class; - - gtk_object_add_arg_type ("EAddressbookModel::book", GTK_TYPE_OBJECT, - GTK_ARG_READWRITE, ARG_BOOK); - gtk_object_add_arg_type ("EAddressbookModel::query", GTK_TYPE_STRING, - GTK_ARG_READWRITE, ARG_QUERY); - - object_class->destroy = addressbook_destroy; - object_class->set_arg = e_addressbook_model_set_arg; - object_class->get_arg = e_addressbook_model_get_arg; - - model_class->column_count = addressbook_col_count; - model_class->row_count = addressbook_row_count; - model_class->value_at = addressbook_value_at; - model_class->set_value_at = addressbook_set_value_at; - model_class->is_cell_editable = addressbook_is_cell_editable; - model_class->duplicate_value = addressbook_duplicate_value; - model_class->free_value = addressbook_free_value; - model_class->initialize_value = addressbook_initialize_value; - model_class->value_is_empty = addressbook_value_is_empty; - model_class->thaw = addressbook_thaw; -} - -static void -e_addressbook_model_init (GtkObject *object) -{ - EAddressbookModel *model = E_ADDRESSBOOK_MODEL(object); - model->book = NULL; - model->query = g_strdup("(contains \"full_name\" \"\")"); - model->book_view = NULL; - model->get_view_idle = 0; - model->create_card_id = 0; - model->remove_card_id = 0; - model->modify_card_id = 0; - model->data = NULL; - model->data_count = 0; -} - -static void -book_view_loaded (EBook *book, EBookStatus status, EBookView *book_view, gpointer closure) -{ - EAddressbookModel *model = closure; - int i; - if (model->book_view && model->create_card_id) - gtk_signal_disconnect(GTK_OBJECT (model->book_view), - model->create_card_id); - if (model->book_view && model->remove_card_id) - gtk_signal_disconnect(GTK_OBJECT (model->book_view), - model->remove_card_id); - if (model->book_view && model->modify_card_id) - gtk_signal_disconnect(GTK_OBJECT (model->book_view), - model->modify_card_id); - if (model->book_view) - gtk_object_unref(GTK_OBJECT(model->book_view)); - model->book_view = book_view; - if (model->book_view) - gtk_object_ref(GTK_OBJECT(model->book_view)); - model->create_card_id = gtk_signal_connect(GTK_OBJECT(model->book_view), - "card_added", - GTK_SIGNAL_FUNC(create_card), - model); - model->remove_card_id = gtk_signal_connect(GTK_OBJECT(model->book_view), - "card_removed", - GTK_SIGNAL_FUNC(remove_card), - model); - model->modify_card_id = gtk_signal_connect(GTK_OBJECT(model->book_view), - "card_changed", - GTK_SIGNAL_FUNC(modify_card), - model); - - for ( i = 0; i < model->data_count; i++ ) { - gtk_object_unref(GTK_OBJECT(model->data[i])); - } - g_free(model->data); - model->data = NULL; - model->data_count = 0; - e_table_model_changed(E_TABLE_MODEL(model)); -} - -static gboolean -get_view(EAddressbookModel *model) -{ - if (model->book && model->query) - e_book_get_book_view(model->book, model->query, book_view_loaded, model); - - model->get_view_idle = 0; - return FALSE; -} - -ECard * -e_addressbook_model_get_card(EAddressbookModel *model, - int row) -{ - if (model->data && row < model->data_count) { - ECard *card; - gtk_object_get(GTK_OBJECT(model->data[row]), - "card", &card, - NULL); - gtk_object_ref(GTK_OBJECT(card)); - return card; - } - return NULL; -} - -static void -e_addressbook_model_set_arg (GtkObject *o, GtkArg *arg, guint arg_id) -{ - EAddressbookModel *model; - - model = E_ADDRESSBOOK_MODEL (o); - - switch (arg_id){ - case ARG_BOOK: - if (model->book) - gtk_object_unref(GTK_OBJECT(model->book)); - model->book = E_BOOK(GTK_VALUE_OBJECT (*arg)); - if (model->book) { - gtk_object_ref(GTK_OBJECT(model->book)); - if (model->get_view_idle == 0) - model->get_view_idle = g_idle_add((GSourceFunc)get_view, model); - } - break; - case ARG_QUERY: - if (model->query) - g_free(model->query); - model->query = g_strdup(GTK_VALUE_STRING (*arg)); - if (model->get_view_idle == 0) - model->get_view_idle = g_idle_add((GSourceFunc)get_view, model); - break; - } -} - -static void -e_addressbook_model_get_arg (GtkObject *object, GtkArg *arg, guint arg_id) -{ - EAddressbookModel *e_addressbook_model; - - e_addressbook_model = E_ADDRESSBOOK_MODEL (object); - - switch (arg_id) { - case ARG_BOOK: - GTK_VALUE_OBJECT (*arg) = GTK_OBJECT(e_addressbook_model->book); - break; - case ARG_QUERY: - GTK_VALUE_STRING (*arg) = g_strdup(e_addressbook_model->query); - break; - default: - arg->type = GTK_TYPE_INVALID; - break; - } -} - -GtkType -e_addressbook_model_get_type (void) -{ - static GtkType type = 0; - - if (!type){ - GtkTypeInfo info = { - "EAddressbookModel", - sizeof (EAddressbookModel), - sizeof (EAddressbookModelClass), - (GtkClassInitFunc) e_addressbook_model_class_init, - (GtkObjectInitFunc) e_addressbook_model_init, - NULL, /* reserved 1 */ - NULL, /* reserved 2 */ - (GtkClassInitFunc) NULL - }; - - type = gtk_type_unique (PARENT_TYPE, &info); - } - - return type; -} - -ETableModel * -e_addressbook_model_new (void) -{ - EAddressbookModel *et; - - et = gtk_type_new (e_addressbook_model_get_type ()); - - return E_TABLE_MODEL(et); -} diff --git a/addressbook/gui/component/e-addressbook-model.h b/addressbook/gui/component/e-addressbook-model.h deleted file mode 100644 index bff9a21d00..0000000000 --- a/addressbook/gui/component/e-addressbook-model.h +++ /dev/null @@ -1,52 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -#ifndef _E_ADDRESSBOOK_MODEL_H_ -#define _E_ADDRESSBOOK_MODEL_H_ - -#include "e-table-model.h" -#include -#include -#include - -#define E_ADDRESSBOOK_MODEL_TYPE (e_addressbook_model_get_type ()) -#define E_ADDRESSBOOK_MODEL(o) (GTK_CHECK_CAST ((o), E_ADDRESSBOOK_MODEL_TYPE, EAddressbookModel)) -#define E_ADDRESSBOOK_MODEL_CLASS(k) (GTK_CHECK_CLASS_CAST((k), E_ADDRESSBOOK_MODEL_TYPE, EAddressbookModelClass)) -#define E_IS_ADDRESSBOOK_MODEL(o) (GTK_CHECK_TYPE ((o), E_ADDRESSBOOK_MODEL_TYPE)) -#define E_IS_ADDRESSBOOK_MODEL_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_ADDRESSBOOK_MODEL_TYPE)) - -/* Virtual Column list: - 0 Email - 1 Full Name - 2 Street - 3 Phone -*/ - -typedef struct { - ETableModel parent; - - /* item specific fields */ - EBook *book; - char *query; - EBookView *book_view; - - int get_view_idle; - - ECardSimple **data; - int data_count; - - int create_card_id, remove_card_id, modify_card_id; -} EAddressbookModel; - - -typedef struct { - ETableModelClass parent_class; -} EAddressbookModelClass; - - -GtkType e_addressbook_model_get_type (void); -ETableModel *e_addressbook_model_new (void); - -/* Returns object with ref count of 1. */ -ECard *e_addressbook_model_get_card(EAddressbookModel *model, - int row); - -#endif /* _E_ADDRESSBOOK_MODEL_H_ */ diff --git a/addressbook/gui/component/e-ldap-server-dialog.c b/addressbook/gui/component/e-ldap-server-dialog.c deleted file mode 100644 index d64549cc2d..0000000000 --- a/addressbook/gui/component/e-ldap-server-dialog.c +++ /dev/null @@ -1,128 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * e-ldap-server-dialog.c - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Toshok - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - - -#include -#include -#include "e-ldap-server-dialog.h" - -typedef struct { - GladeXML *gui; - GtkWidget *dialog; - ELDAPServer *server; -} ELDAPServerDialog; - -static void -fill_in_server_info (ELDAPServerDialog *dialog) -{ - ELDAPServer *ldap_server = dialog->server; - GtkEditable *editable; - int position; - char buf[128]; - - /* the server description */ - position = 0; - editable = GTK_EDITABLE(glade_xml_get_widget(dialog->gui, "description-entry")); - gtk_editable_delete_text (editable, 0, -1); - gtk_editable_insert_text (editable, ldap_server->description, strlen (ldap_server->description), &position); - - /* the server hostname */ - position = 0; - editable = GTK_EDITABLE(glade_xml_get_widget(dialog->gui, "server-entry")); - gtk_editable_delete_text (editable, 0, -1); - gtk_editable_insert_text (editable, ldap_server->host, strlen (ldap_server->host), &position); - - /* the server port */ - position = 0; - g_snprintf (buf, sizeof(buf), "%d", ldap_server->port); - editable = GTK_EDITABLE(glade_xml_get_widget(dialog->gui, "port-entry")); - gtk_editable_delete_text (editable, 0, -1); - gtk_editable_insert_text (editable, buf, strlen (buf), &position); - - /* the root dn */ - position = 0; - editable = GTK_EDITABLE(glade_xml_get_widget(dialog->gui, "root-dn-entry")); - gtk_editable_delete_text (editable, 0, -1); - gtk_editable_insert_text (editable, ldap_server->rootdn, strlen (ldap_server->rootdn), &position); -} - -static void -extract_server_info (ELDAPServerDialog *dialog) -{ - ELDAPServer *ldap_server = dialog->server; - GtkEditable *editable; - char *description, *server, *port, *rootdn; - - /* the server description */ - editable = GTK_EDITABLE(glade_xml_get_widget(dialog->gui, "description-entry")); - description = gtk_editable_get_chars(editable, 0, -1); - if (description && *description) { - if (ldap_server->description) - g_free(ldap_server->description); - ldap_server->description = description; - } - - /* the server hostname */ - editable = GTK_EDITABLE(glade_xml_get_widget(dialog->gui, "server-entry")); - server = gtk_editable_get_chars(editable, 0, -1); - if (server && *server) { - if (ldap_server->host) - g_free(ldap_server->host); - ldap_server->host = server; - } - - /* the server port */ - editable = GTK_EDITABLE(glade_xml_get_widget(dialog->gui, "port-entry")); - port = gtk_editable_get_chars(editable, 0, -1); - if (port && *port) { - ldap_server->port = atoi(port); - } - g_free(port); - - /* the root dn */ - editable = GTK_EDITABLE(glade_xml_get_widget(dialog->gui, "root-dn-entry")); - rootdn = gtk_editable_get_chars(editable, 0, -1); - if (rootdn && *rootdn) { - if (ldap_server->rootdn) - g_free (ldap_server->rootdn); - ldap_server->rootdn = rootdn; - } -} - -void -e_ldap_server_editor_show(ELDAPServer *server) -{ - ELDAPServerDialog *dialog = g_new0(ELDAPServerDialog, 1); - - dialog->server = server; - dialog->gui = glade_xml_new (EVOLUTION_GLADEDIR "/ldap-server-dialog.glade", NULL); - - dialog->dialog = glade_xml_get_widget(dialog->gui, "ldap-server-dialog"); - - fill_in_server_info (dialog); - - gnome_dialog_run (GNOME_DIALOG(dialog->dialog)); - - extract_server_info (dialog); - - gnome_dialog_close (GNOME_DIALOG(dialog->dialog)); -} diff --git a/addressbook/gui/component/e-ldap-server-dialog.h b/addressbook/gui/component/e-ldap-server-dialog.h deleted file mode 100644 index f0e73d1ebc..0000000000 --- a/addressbook/gui/component/e-ldap-server-dialog.h +++ /dev/null @@ -1,14 +0,0 @@ - -#ifndef __E_LDAP_SERVER_DIALOG_H__ -#define __E_LDAP_SERVER_DIALOG_H__ - -typedef struct { - char *description; - char *host; - int port; - char *rootdn; -} ELDAPServer; - -void e_ldap_server_editor_show(ELDAPServer *server); - -#endif /* __E_LDAP_SERVER_DIALOG_H__ */ diff --git a/addressbook/gui/component/ldap-server-dialog.glade b/addressbook/gui/component/ldap-server-dialog.glade deleted file mode 100644 index 71090f53dd..0000000000 --- a/addressbook/gui/component/ldap-server-dialog.glade +++ /dev/null @@ -1,351 +0,0 @@ - - - - - newserver - newserver - - src - pixmaps - C - True - True - False - False - True - True - True - interface.c - interface.h - callbacks.c - callbacks.h - support.c - support.h - True - ldap-server-dialog.glade.h - - - - GnomeDialog - ldap-server-dialog - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - False - False - False - False - False - - - GtkVBox - GnomeDialog:vbox - dialog-vbox1 - False - 8 - - 4 - True - True - - - - GtkVBox - vbox1 - False - 0 - - 0 - True - True - - - - GtkTable - table2 - 4 - 2 - False - 0 - 0 - - 0 - True - True - - - - GtkEntry - description-entry - True - True - True - 0 - - - 1 - 2 - 0 - 1 - 0 - 0 - True - False - False - False - True - False - - - - - GtkEntry - server-entry - True - True - True - 0 - - - 1 - 2 - 1 - 2 - 0 - 0 - True - False - False - False - True - False - - - - - GtkEntry - port-entry - True - True - True - 0 - - - 1 - 2 - 2 - 3 - 0 - 0 - True - False - False - False - True - False - - - - - GtkEntry - root-dn-entry - True - True - True - 0 - - - 1 - 2 - 3 - 4 - 0 - 0 - True - False - False - False - True - False - - - - - GtkAlignment - alignment1 - 0.5 - 0.5 - 1 - 1 - - 0 - 1 - 0 - 1 - 0 - 0 - True - False - False - False - True - True - - - - GtkLabel - label1 - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - - - - GtkAlignment - alignment2 - 0.5 - 0.5 - 1 - 1 - - 0 - 1 - 1 - 2 - 0 - 0 - False - False - False - False - True - True - - - - GtkLabel - label2 - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - - - - GtkAlignment - alignment3 - 0.5 - 0.5 - 1 - 1 - - 0 - 1 - 2 - 3 - 0 - 0 - False - False - False - False - True - True - - - - GtkLabel - label3 - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - - - - GtkAlignment - alignment4 - 0.5 - 0.5 - 1 - 1 - - 0 - 1 - 3 - 4 - 0 - 0 - False - False - False - False - True - True - - - - GtkLabel - label4 - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - - - - - - GtkHButtonBox - GnomeDialog:action_area - dialog-action_area1 - GTK_BUTTONBOX_END - 8 - 85 - 27 - 7 - 0 - - 0 - False - True - GTK_PACK_END - - - - GtkButton - button1 - True - True - GNOME_STOCK_BUTTON_OK - - - - GtkButton - button3 - True - True - GNOME_STOCK_BUTTON_CANCEL - - - - - - diff --git a/addressbook/gui/component/ldap-server-dialog.glade.h b/addressbook/gui/component/ldap-server-dialog.glade.h deleted file mode 100644 index 68b45bdb34..0000000000 --- a/addressbook/gui/component/ldap-server-dialog.glade.h +++ /dev/null @@ -1,10 +0,0 @@ -/* - * Translatable strings file generated by Glade. - * Add this file to your project's POTFILES.in. - * DO NOT compile it as part of your application. - */ - -gchar *s = N_("Description:"); -gchar *s = N_("LDAP Server:"); -gchar *s = N_("Port Number:"); -gchar *s = N_("Root DN:"); diff --git a/addressbook/gui/contact-editor/.cvsignore b/addressbook/gui/contact-editor/.cvsignore deleted file mode 100644 index 6fd0b5075c..0000000000 --- a/addressbook/gui/contact-editor/.cvsignore +++ /dev/null @@ -1,8 +0,0 @@ -.deps -.libs -.pure -Makefile -Makefile.in -*.lo -*.la -contact-editor-test diff --git a/addressbook/gui/contact-editor/Makefile.am b/addressbook/gui/contact-editor/Makefile.am deleted file mode 100644 index c723ead970..0000000000 --- a/addressbook/gui/contact-editor/Makefile.am +++ /dev/null @@ -1,55 +0,0 @@ -CPPFLAGS = \ - -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \ - -DDATADIR=\""$(datadir)"\" - -INCLUDES = \ - $(GNOME_INCLUDEDIR) \ - -I$(top_srcdir) \ - -I$(top_srcdir)/addressbook/ \ - -I$(top_srcdir)/addressbook/backend \ - -I$(top_srcdir)/widgets/e-table \ - -DG_LOG_DOMAIN=\"contact-editor\" - -noinst_LIBRARIES = \ - libecontacteditor.a - -libecontacteditor_a_SOURCES = \ - e-contact-editor-categories.c \ - e-contact-editor-categories.h \ - e-contact-editor-fullname.c \ - e-contact-editor-fullname.h \ - e-contact-editor.c \ - e-contact-editor.h \ - e-contact-save-as.c \ - e-contact-save-as.h - -noinst_PROGRAMS = \ - contact-editor-test - -contact_editor_test_SOURCES = \ - test-editor.c - -contact_editor_test_LDADD = \ - $(top_builddir)/addressbook/backend/ebook/libebook.la \ - $(top_builddir)/addressbook/ename/libename.la \ - $(top_builddir)/libversit/libversit.la \ - $(GNOMEGNORBA_LIBS) \ - -lbonobo \ - $(top_builddir)/e-util/libeutil.la \ - libecontacteditor.a \ - $(top_builddir)/widgets/e-table/libetable.a \ - $(top_builddir)/e-util/libeutil.la \ - $(top_builddir)/widgets/e-text/libetext.a \ - $(EXTRA_GNOME_LIBS) - -gladedir = $(datadir)/evolution/glade - -glade_DATA = \ - contact-editor.glade \ - fullname.glade \ - categories.glade - -EXTRA_DIST = $(glade_DATA) \ - e-contact-editor-strings.h \ - fullname-strings.h \ - categories-strings.h diff --git a/addressbook/gui/contact-editor/arrow.png b/addressbook/gui/contact-editor/arrow.png deleted file mode 100644 index b102356c78..0000000000 Binary files a/addressbook/gui/contact-editor/arrow.png and /dev/null differ diff --git a/addressbook/gui/contact-editor/briefcase.png b/addressbook/gui/contact-editor/briefcase.png deleted file mode 100644 index dd59b8fd39..0000000000 Binary files a/addressbook/gui/contact-editor/briefcase.png and /dev/null differ diff --git a/addressbook/gui/contact-editor/categories-strings.h b/addressbook/gui/contact-editor/categories-strings.h deleted file mode 100644 index 813018a00e..0000000000 --- a/addressbook/gui/contact-editor/categories-strings.h +++ /dev/null @@ -1,9 +0,0 @@ -/* - * Translatable strings file generated by Glade. - * Add this file to your project's POTFILES.in. - * DO NOT compile it as part of your application. - */ - -gchar *s = N_("categories"); -gchar *s = N_("Item(s) belong to these categories:"); -gchar *s = N_("Available Categories:"); diff --git a/addressbook/gui/contact-editor/categories.glade b/addressbook/gui/contact-editor/categories.glade deleted file mode 100644 index bf78008940..0000000000 --- a/addressbook/gui/contact-editor/categories.glade +++ /dev/null @@ -1,190 +0,0 @@ - - - - - categories - categories - - src - pixmaps - C - True - False - False - False - False - False - False - interface.c - interface.h - callbacks.c - callbacks.h - support.c - support.h - True - categories-strings.h - - - - GnomeDialog - categories - True - False - categories - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - False - True - False - False - False - - - GtkVBox - GnomeDialog:vbox - dialog-vbox1 - True - False - 8 - - 4 - True - True - - - - GtkTable - table-categories - True - 4 - 1 - False - 0 - 0 - - 0 - True - True - - - - GtkAccelLabel - accellabel1 - True - - GTK_JUSTIFY_LEFT - False - 0 - 0.5 - 0 - 0 - - 0 - 1 - 0 - 1 - 0 - 0 - False - False - False - False - True - True - - - - - GtkAccelLabel - accellabel2 - True - - GTK_JUSTIFY_LEFT - False - 0 - 0.5 - 0 - 0 - - 0 - 1 - 2 - 3 - 0 - 0 - False - False - False - False - True - True - - - - - GtkEntry - entry-categories - True - True - True - True - 0 - - - 0 - 1 - 1 - 2 - 0 - 0 - True - False - False - False - True - False - - - - - - GtkHButtonBox - GnomeDialog:action_area - dialog-action_area1 - True - GTK_BUTTONBOX_END - 8 - 85 - 27 - 7 - 0 - - 0 - False - True - GTK_PACK_END - - - - GtkButton - button1 - True - True - True - GNOME_STOCK_BUTTON_OK - - - - GtkButton - button3 - True - True - True - GNOME_STOCK_BUTTON_CANCEL - - - - - - diff --git a/addressbook/gui/contact-editor/contact-editor.glade b/addressbook/gui/contact-editor/contact-editor.glade deleted file mode 100644 index af77945c56..0000000000 --- a/addressbook/gui/contact-editor/contact-editor.glade +++ /dev/null @@ -1,2416 +0,0 @@ - - - - - Contact-editor - contact-editor - - src - pixmaps - C - True - True - True - False - False - False - False - interface.c - interface.h - callbacks.c - callbacks.h - support.c - support.h - True - e-contact-editor-strings.h - - - - GtkWindow - contact editor - True - False - Contact Editor - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - False - True - False - - - GtkNotebook - notebook-contact-editor - True - True - True - True - GTK_POS_TOP - False - 2 - 2 - False - - - GtkTable - table-contact-editor-general - 7 - True - 14 - 8 - False - 4 - 4 - - - GtkEntry - entry-phone1 - True - True - True - True - 0 - - - 7 - 8 - 0 - 1 - 0 - 0 - True - False - False - False - True - False - - - - - GtkEntry - entry-phone2 - True - True - True - True - 0 - - - 7 - 8 - 1 - 2 - 0 - 0 - True - False - False - False - True - False - - - - - GtkEntry - entry-phone3 - True - True - True - True - 0 - - - 7 - 8 - 2 - 3 - 0 - 0 - True - False - False - False - True - False - - - - - GtkEntry - entry-phone4 - True - True - True - True - 0 - - - 7 - 8 - 3 - 4 - 0 - 0 - True - False - False - False - True - False - - - - - GtkText - text-address - 1 - 1 - True - True - True - - - 7 - 8 - 5 - 9 - 0 - 0 - True - False - False - False - True - True - - - - - GtkButton - button-fullname - True - True - - - 1 - 3 - 0 - 1 - 0 - 0 - False - False - False - False - True - True - - - - - GtkAccelLabel - accellabel-company - True - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 1 - 3 - 2 - 3 - 0 - 0 - False - False - False - False - True - True - - - - - GtkAccelLabel - accellabel-fileas - True - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 1 - 3 - 3 - 4 - 0 - 0 - False - False - False - False - True - True - - - - - GtkAccelLabel - accellabel-web - True - - GTK_JUSTIFY_LEFT - False - 0 - 0.5 - 0 - 0 - - 1 - 3 - 8 - 9 - 0 - 0 - False - False - False - False - True - True - - - - - GtkAlignment - alignment3 - True - 1 - 0.5 - 0 - 1 - - 2 - 3 - 5 - 6 - 0 - 0 - False - False - False - False - True - True - - - - GtkButton - button-email1 - True - - - Placeholder - - - - - - GtkAlignment - alignment5 - True - 1 - 0.5 - 0 - 0 - - 6 - 7 - 3 - 4 - 0 - 0 - False - False - False - False - True - True - - - - GtkButton - button-phone4 - True - - - Placeholder - - - - - - GtkAlignment - alignment7 - True - 1 - 0.5 - 0 - 0 - - 6 - 7 - 1 - 2 - 0 - 0 - False - False - False - False - True - True - - - - GtkButton - button-phone2 - True - - - Placeholder - - - - - - GtkAlignment - alignment8 - True - 1 - 0.5 - 0 - 0 - - 6 - 7 - 0 - 1 - 0 - 0 - False - False - False - False - True - True - - - - GtkButton - button-phone1 - True - - - Placeholder - - - - - - GtkHSeparator - hseparator4 - True - - 4 - 8 - 4 - 5 - 0 - 2 - True - False - False - False - True - False - - - - - GtkAlignment - alignment6 - True - 1 - 0.5 - 0 - 0 - - 6 - 7 - 2 - 3 - 0 - 0 - False - False - False - False - True - True - - - - GtkButton - button-phone3 - True - - - Placeholder - - - - - - GtkEntry - entry-fullname - True - True - True - True - 0 - - - 3 - 4 - 0 - 1 - 0 - 0 - True - False - False - False - True - False - - - - - GtkEntry - entry-jobtitle - True - True - True - True - 0 - - - 3 - 4 - 1 - 2 - 0 - 0 - True - False - False - False - True - False - - - - - GtkEntry - entry-company - True - True - True - True - 0 - - - 3 - 4 - 2 - 3 - 0 - 0 - True - False - False - False - True - False - - - - - GtkEntry - entry-email1 - True - True - True - True - 0 - - - 3 - 4 - 5 - 6 - 0 - 0 - True - False - False - False - True - False - - - - - GtkEntry - entry-web - True - True - True - True - 0 - - - 3 - 4 - 8 - 9 - 0 - 0 - True - False - False - False - True - False - - - - - GtkHSeparator - hseparator5 - True - - 0 - 4 - 4 - 5 - 0 - 2 - True - False - False - False - True - False - - - - - GtkCombo - combo-file-as - True - False - True - True - True - False - - - 3 - 4 - 3 - 4 - 0 - 0 - True - False - False - False - True - False - - - - GtkEntry - GtkCombo:entry - entry-file-as - True - True - True - True - 0 - - - - - - GtkHSeparator - hseparator6 - True - - 0 - 4 - 7 - 8 - 0 - 2 - True - False - False - False - True - True - - - - - GtkAlignment - alignment10 - True - 0.5 - 0 - 1 - 1 - - 3 - 4 - 6 - 7 - 0 - 0 - True - False - True - True - True - True - - - - GtkCheckButton - checkbutton-htmlmail - True - - False - True - - - - - GtkAlignment - alignment4 - True - 1 - 0.5 - 0 - 0 - - 6 - 7 - 5 - 6 - 0 - 0 - False - False - False - False - True - True - - - - GtkButton - button-address - True - - - Placeholder - - - - - - GtkLabel - address-label - True - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - text-address - - 5 - 7 - 6 - 7 - 0 - 0 - False - False - False - False - True - True - - - - - GtkEventBox - eventbox1 - True - - 5 - 6 - 0 - 1 - 0 - 0 - False - False - False - False - True - True - - - - GtkLabel - label-phone1 - True - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - entry-phone1 - - - - - GtkEventBox - eventbox2 - True - - 5 - 6 - 1 - 2 - 0 - 0 - False - False - False - False - True - True - - - - GtkLabel - label-phone2 - True - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - entry-phone2 - - - - - GtkEventBox - eventbox3 - True - - 5 - 6 - 2 - 3 - 0 - 0 - False - False - False - False - True - True - - - - GtkLabel - label-phone3 - True - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - entry-phone3 - - - - - GtkEventBox - eventbox4 - True - - 5 - 6 - 3 - 4 - 0 - 0 - False - False - False - False - True - True - - - - GtkLabel - label-phone4 - True - - GTK_JUSTIFY_LEFT - False - 0 - 0.5 - 0 - 0 - entry-phone4 - - - - - GtkEventBox - eventbox5 - True - - 1 - 2 - 5 - 6 - 0 - 0 - False - False - False - False - True - True - - - - GtkLabel - label-email1 - True - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - entry-email1 - - - - - GtkEventBox - eventbox-business - True - - 5 - 6 - 5 - 6 - 0 - 0 - False - False - False - False - True - True - - - - GtkLabel - label-address - True - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - text-address - - - - - GtkAlignment - alignment2 - True - 0 - 0 - 0 - 0 - - 7 - 8 - 9 - 10 - 0 - 0 - True - False - False - False - True - True - - - - GtkCheckButton - checkbutton-mailingaddress - True - - False - True - - - - - GtkHSeparator - hseparator9 - True - - 0 - 4 - 11 - 12 - 0 - 2 - True - False - False - False - True - True - - - - - GtkHSeparator - hseparator10 - True - - 4 - 8 - 11 - 12 - 0 - 0 - True - False - False - False - True - True - - - - - GtkAlignment - alignment12 - True - 0.5 - 0.5 - 1 - 0 - - 1 - 3 - 12 - 13 - 0 - 0 - False - False - False - False - True - True - - - - GtkButton - button-contacts - True - True - - - - - - GtkAlignment - alignment15 - True - 0.5 - 0.5 - 1 - 0 - - 7 - 8 - 12 - 13 - 0 - 0 - True - False - False - False - True - True - - - - GtkEntry - entry-categories - True - True - True - True - 0 - - - - - - GtkAlignment - alignment14 - True - 0.5 - 0.5 - 1 - 0 - - 3 - 4 - 12 - 13 - 0 - 0 - True - False - False - False - True - True - - - - GtkEntry - entry-contacts - True - True - True - True - 0 - - - - - - GtkAlignment - alignment16 - True - 0.5 - 0.5 - 1 - 0 - - 5 - 7 - 12 - 13 - 0 - 0 - False - False - False - False - True - True - - - - GtkButton - button-categories - True - True - - - - - - GtkEventBox - eventbox7 - True - - 1 - 3 - 1 - 2 - 0 - 0 - False - False - False - False - True - True - - - - GtkAccelLabel - accellabel-jobtitle - True - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - - - - Custom - custom1 - True - e_create_image_widget - malehead.png - - 0 - 0 - Thu, 18 May 2000 12:19:47 GMT - - 0 - 1 - 0 - 4 - 0 - 0 - False - False - False - False - True - True - - - - - Custom - custom2 - True - e_create_image_widget - cellphone.png - - 0 - 0 - Thu, 18 May 2000 12:20:02 GMT - - 4 - 5 - 0 - 4 - 0 - 0 - False - False - False - False - True - True - - - - - Custom - custom3 - True - e_create_image_widget - envelope.png - - 0 - 0 - Thu, 18 May 2000 12:19:51 GMT - - 0 - 1 - 5 - 7 - 0 - 0 - False - False - False - False - True - True - - - - - Custom - custom4 - True - e_create_image_widget - house.png - - 0 - 0 - Thu, 18 May 2000 12:20:06 GMT - - 4 - 5 - 5 - 10 - 0 - 0 - False - False - False - False - True - True - - - - - Custom - custom5 - True - e_create_image_widget - evolution-contacts.png - - 0 - 0 - Thu, 18 May 2000 12:19:59 GMT - - 0 - 1 - 12 - 14 - 0 - 0 - False - False - False - False - True - True - - - - - Custom - custom6 - True - e_create_image_widget - briefcase.png - - 0 - 0 - Thu, 18 May 2000 12:20:09 GMT - - 4 - 5 - 12 - 14 - 0 - 0 - False - False - False - False - True - True - - - - - Custom - custom10 - True - e_create_image_widget - globe.png - - 0 - 0 - Thu, 18 May 2000 12:19:56 GMT - - 0 - 1 - 8 - 10 - 0 - 0 - False - False - False - False - True - True - - - - - - GtkLabel - Notebook:tab - label15 - True - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkTable - table-contact-editor-details - 7 - True - 9 - 6 - False - 4 - 4 - - - GtkLabel - label21 - True - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 1 - 2 - 0 - 1 - 0 - 0 - False - False - False - False - True - True - - - - - GtkLabel - label22 - True - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 1 - 2 - 1 - 2 - 0 - 0 - False - False - False - False - True - True - - - - - GtkLabel - label23 - True - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 1 - 2 - 2 - 3 - 0 - 0 - False - False - False - False - True - True - - - - - GtkLabel - label24 - True - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 1 - 2 - 4 - 5 - 0 - 0 - False - False - False - False - True - True - - - - - GtkLabel - label25 - True - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 1 - 2 - 5 - 6 - 0 - 0 - False - False - False - False - True - True - - - - - GtkLabel - label31 - True - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 3 - 4 - 4 - 5 - 0 - 0 - False - False - False - False - True - True - - - - - GtkLabel - label30 - True - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 3 - 4 - 1 - 2 - 0 - 0 - False - False - False - False - True - True - - - - - GtkLabel - label29 - True - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 3 - 4 - 0 - 1 - 0 - 0 - False - False - False - False - True - True - - - - - GtkLabel - label32 - True - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 3 - 4 - 5 - 6 - 0 - 0 - False - False - False - False - True - True - - - - - GtkEntry - entry-spouse - True - True - True - True - 0 - - - 2 - 3 - 5 - 6 - 0 - 0 - True - False - False - False - True - False - - - - - GtkEntry - entry-department - True - True - True - True - 0 - - - 2 - 3 - 0 - 1 - 0 - 0 - True - False - False - False - True - False - - - - - GtkEntry - entry-office - True - True - True - True - 0 - - - 2 - 3 - 1 - 2 - 0 - 0 - True - False - False - False - True - False - - - - - GtkEntry - entry-profession - True - True - True - True - 0 - - - 2 - 3 - 2 - 3 - 0 - 0 - True - False - False - False - True - False - - - - - GtkEntry - entry-nickname - True - True - True - True - 0 - - - 2 - 3 - 4 - 5 - 0 - 0 - True - False - False - False - True - False - - - - - GnomeDateEdit - dateedit-anniversary - True - False - False - False - 7 - 19 - - 4 - 6 - 5 - 6 - 0 - 0 - True - False - False - False - True - False - - - - - GnomeDateEdit - dateedit-birthday - True - False - False - False - 7 - 19 - - 4 - 6 - 4 - 5 - 0 - 0 - True - False - False - False - True - False - - - - - GtkEntry - entry-assistant - True - True - True - True - 0 - - - 4 - 6 - 1 - 2 - 0 - 0 - True - False - False - False - True - False - - - - - GtkEntry - entry-manager - True - True - True - True - 0 - - - 4 - 6 - 0 - 1 - 0 - 0 - True - False - False - False - True - False - - - - - GtkHSeparator - hseparator7 - True - - 0 - 6 - 3 - 4 - 0 - 2 - False - False - False - False - True - True - - - - - GtkLabel - label33 - True - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 1 - 2 - 7 - 8 - 0 - 0 - False - False - False - False - True - True - - - - - GtkHSeparator - hseparator8 - True - - 0 - 6 - 6 - 7 - 0 - 0 - True - False - False - False - True - True - - - - - Custom - custom7 - True - e_create_image_widget - briefcase.png - - 0 - 0 - Thu, 18 May 2000 12:20:13 GMT - - 0 - 1 - 0 - 2 - 0 - 0 - False - False - False - False - True - True - - - - - Custom - custom8 - True - e_create_image_widget - malehead.png - - 0 - 0 - Thu, 18 May 2000 12:20:16 GMT - - 0 - 1 - 4 - 6 - 0 - 0 - False - False - False - False - True - True - - - - - GtkScrolledWindow - scrolledwindow2 - True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - GTK_UPDATE_CONTINUOUS - GTK_UPDATE_CONTINUOUS - - 1 - 6 - 8 - 9 - 0 - 0 - True - True - False - False - True - True - - - - GtkText - text-comments - True - True - True - - - - - - Custom - custom9 - True - e_create_image_widget - globe.png - - 0 - 0 - Thu, 18 May 2000 12:20:19 GMT - - 0 - 1 - 7 - 9 - 0 - 0 - False - False - False - False - True - True - - - - - - GtkLabel - Notebook:tab - label16 - True - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - - - GnomeDialog - dialog2 - True - False - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - False - False - False - False - False - - - GtkVBox - GnomeDialog:vbox - dialog-vbox2 - True - False - 8 - - 4 - True - True - - - - GtkTable - table2 - True - 2 - 2 - False - 0 - 0 - - 0 - True - True - - - - GtkEntry - entry2 - True - True - True - True - 0 - - - 0 - 2 - 1 - 2 - 0 - 0 - True - False - False - False - True - False - - - - - GtkVBox - vbox1 - True - False - 0 - - 1 - 2 - 0 - 1 - 0 - 0 - False - True - False - False - True - True - - - - GtkButton - button31 - True - True - - - 0 - False - False - - - - - GtkButton - button32 - True - True - - - 0 - False - False - - - - - - GtkScrolledWindow - scrolledwindow1 - 200 - True - GTK_POLICY_ALWAYS - GTK_POLICY_ALWAYS - GTK_UPDATE_CONTINUOUS - GTK_UPDATE_CONTINUOUS - - 0 - 1 - 0 - 1 - 0 - 0 - True - True - False - False - True - True - - - - GtkCList - clist1 - True - True - 1 - 80 - GTK_SELECTION_SINGLE - True - GTK_SHADOW_NONE - - - GtkLabel - CList:title - label20 - True - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - - - - GtkHButtonBox - GnomeDialog:action_area - dialog-action_area2 - True - GTK_BUTTONBOX_END - 8 - 85 - 27 - 7 - 0 - - 0 - False - True - GTK_PACK_END - - - - GtkButton - button28 - True - True - True - GNOME_STOCK_BUTTON_OK - - - - GtkButton - button29 - True - True - True - GNOME_STOCK_BUTTON_APPLY - - - - GtkButton - button30 - True - True - True - GNOME_STOCK_BUTTON_CANCEL - - - - - - - GnomeDialog - dialog-add-phone - True - False - New phone type - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - False - False - False - False - False - - - GtkVBox - GnomeDialog:vbox - vbox2 - True - False - 8 - - 4 - True - True - - - - GtkFrame - frame-add-phone - 4 - True - - 0 - GTK_SHADOW_ETCHED_IN - - 0 - True - True - - - - GtkAlignment - alignment9 - 9 - True - 0.5 - 0.5 - 1 - 1 - - - GtkEntry - entry-add-phone - True - True - True - True - 0 - - - - - - - GtkHButtonBox - GnomeDialog:action_area - hbuttonbox1 - True - GTK_BUTTONBOX_END - 8 - 85 - 27 - 7 - 0 - - 0 - False - True - GTK_PACK_END - - - - GtkButton - button43 - True - True - True - - GNOME_STOCK_PIXMAP_ADD - - - - GtkButton - button44 - True - True - True - GNOME_STOCK_BUTTON_CANCEL - - - - - - diff --git a/addressbook/gui/contact-editor/e-contact-editor-categories.c b/addressbook/gui/contact-editor/e-contact-editor-categories.c deleted file mode 100644 index 831fbce2b9..0000000000 --- a/addressbook/gui/contact-editor/e-contact-editor-categories.c +++ /dev/null @@ -1,466 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * e-contact-editor-categories.c - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include -#include -#include -#include -#include -#include -#include - -static void e_contact_editor_categories_init (EContactEditorCategories *card); -static void e_contact_editor_categories_class_init (EContactEditorCategoriesClass *klass); -static void e_contact_editor_categories_set_arg (GtkObject *o, GtkArg *arg, guint arg_id); -static void e_contact_editor_categories_get_arg (GtkObject *object, GtkArg *arg, guint arg_id); -static void e_contact_editor_categories_destroy (GtkObject *object); -static int e_contact_editor_categories_col_count (ETableModel *etc, gpointer data); -static int e_contact_editor_categories_row_count (ETableModel *etc, gpointer data); -static void *e_contact_editor_categories_value_at (ETableModel *etc, int col, int row, gpointer data); -static void e_contact_editor_categories_set_value_at (ETableModel *etc, int col, int row, const void *val, gpointer data); -static gboolean e_contact_editor_categories_is_cell_editable (ETableModel *etc, int col, int row, gpointer data); -static void *e_contact_editor_categories_duplicate_value (ETableModel *etc, int col, const void *value, gpointer data); -static void e_contact_editor_categories_free_value (ETableModel *etc, int col, void *value, gpointer data); -static void *e_contact_editor_categories_initialize_value (ETableModel *etc, int col, gpointer data); -static gboolean e_contact_editor_categories_value_is_empty (ETableModel *etc, int col, const void *value, gpointer data); -static void e_contact_editor_categories_thaw (ETableModel *etc, gpointer data); - -static GnomeDialogClass *parent_class = NULL; - -/* The arguments we take */ -enum { - ARG_0, - ARG_CATEGORIES -}; - -GtkType -e_contact_editor_categories_get_type (void) -{ - static GtkType contact_editor_categories_type = 0; - - if (!contact_editor_categories_type) - { - static const GtkTypeInfo contact_editor_categories_info = - { - "EContactEditorCategories", - sizeof (EContactEditorCategories), - sizeof (EContactEditorCategoriesClass), - (GtkClassInitFunc) e_contact_editor_categories_class_init, - (GtkObjectInitFunc) e_contact_editor_categories_init, - /* reserved_1 */ NULL, - /* reserved_2 */ NULL, - (GtkClassInitFunc) NULL, - }; - - contact_editor_categories_type = gtk_type_unique (gnome_dialog_get_type (), &contact_editor_categories_info); - } - - return contact_editor_categories_type; -} - -static void -e_contact_editor_categories_class_init (EContactEditorCategoriesClass *klass) -{ - GtkObjectClass *object_class; - GnomeDialogClass *dialog_class; - - object_class = (GtkObjectClass*) klass; - dialog_class = (GnomeDialogClass *) klass; - - parent_class = gtk_type_class (gnome_dialog_get_type ()); - - gtk_object_add_arg_type ("EContactEditorCategories::categories", GTK_TYPE_STRING, - GTK_ARG_READWRITE, ARG_CATEGORIES); - - object_class->set_arg = e_contact_editor_categories_set_arg; - object_class->get_arg = e_contact_editor_categories_get_arg; - object_class->destroy = e_contact_editor_categories_destroy; -} - -gchar *builtin_categories[] = { - "Business", - "Competition", - "Favorites", - "Gifts", - "Goals/Objectives", - "Holiday", - "Holiday Cards", - "Hot Contacts", - "Ideas", - "International", - "Key Customer", - "Miscellaneous", - "Personal", - "Phone Calls", - "Status", - "Strategies", - "Suppliers", - "Time & Expenses", - "VIP", - "Waiting", -}; - -#define BUILTIN_CATEGORY_COUNT (sizeof(builtin_categories) / sizeof(builtin_categories[0])) - -static void -add_list_unique(EContactEditorCategories *categories, char *string) -{ - int k; - char *temp = e_strdup_strip(string); - char **list = categories->category_list; - - if (!*temp) { - g_free(temp); - return; - } - for (k = 0; k < categories->list_length; k++) { - if (!strcmp(list[k], temp)) { - categories->selected_list[k] = TRUE; - break; - } - } - if (k == categories->list_length) { - categories->selected_list[categories->list_length] = TRUE; - list[categories->list_length++] = temp; - } else { - g_free(temp); - } -} - -static void -do_parse_categories(EContactEditorCategories *categories) -{ - char *str = categories->categories; - int length = strlen(str); - char *copy = g_new(char, length + 1); - int i, j; - char **list; - int count = 1; - - for (i = 0; i < categories->list_length; i++) - g_free(categories->category_list[i]); - g_free(categories->category_list); - g_free(categories->selected_list); - - for (i = 0; str[i]; i++) { - switch (str[i]) { - case '\\': - i++; - if (!str[i]) - i--; - break; - case ',': - count ++; - break; - } - } - list = g_new(char *, count + 1 + BUILTIN_CATEGORY_COUNT); - categories->category_list = list; - - categories->selected_list = g_new(gboolean, count + 1 + BUILTIN_CATEGORY_COUNT); - - for (count = 0; count < BUILTIN_CATEGORY_COUNT; count++) { - list[count] = g_strdup(builtin_categories[count]); - categories->selected_list[count] = 0; - } - - categories->list_length = count; - - for (i = 0, j = 0; str[i]; i++, j++) { - switch (str[i]) { - case '\\': - i++; - if (str[i]) { - copy[j] = str[i]; - } else - i--; - break; - case ',': - copy[j] = 0; - add_list_unique(categories, copy); - j = -1; - break; - default: - copy[j] = str[i]; - break; - } - } - copy[j] = 0; - add_list_unique(categories, copy); - g_free(copy); - e_table_model_changed(categories->model); -} - -static void -e_contact_editor_categories_entry_change (GtkWidget *entry, - EContactEditorCategories *categories) -{ - g_free(categories->categories); - categories->categories = g_strdup(gtk_entry_get_text(GTK_ENTRY(entry))); - do_parse_categories(categories); -} - - -#define INITIAL_SPEC " \ - \ - 0 \ - 1 \ - \ - \ -" - -static void -e_contact_editor_categories_init (EContactEditorCategories *categories) -{ - GladeXML *gui; - GtkWidget *table; - ECell *cell_left_just; - ECell *cell_checkbox; - ETableHeader *header; - ETableCol *col; - GtkWidget *e_table; - - categories->list_length = 0; - categories->category_list = NULL; - categories->selected_list = NULL; - categories->categories = NULL; - - gnome_dialog_append_button ( GNOME_DIALOG(categories), - GNOME_STOCK_BUTTON_OK); - - gnome_dialog_append_button ( GNOME_DIALOG(categories), - GNOME_STOCK_BUTTON_CANCEL); - - gtk_window_set_policy(GTK_WINDOW(categories), FALSE, TRUE, FALSE); - - gui = glade_xml_new (EVOLUTION_GLADEDIR "/categories.glade", NULL); - categories->gui = gui; - - table = glade_xml_get_widget(gui, "table-categories"); - gtk_widget_ref(table); - gtk_container_remove(GTK_CONTAINER(table->parent), table); - gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (categories)->vbox), table, TRUE, TRUE, 0); - gtk_widget_unref(table); - - categories->entry = glade_xml_get_widget(gui, "entry-categories"); - - gtk_signal_connect(GTK_OBJECT(categories->entry), "changed", - GTK_SIGNAL_FUNC(e_contact_editor_categories_entry_change), categories); - - categories->model = e_table_simple_new(e_contact_editor_categories_col_count, - e_contact_editor_categories_row_count, - e_contact_editor_categories_value_at, - e_contact_editor_categories_set_value_at, - e_contact_editor_categories_is_cell_editable, - e_contact_editor_categories_duplicate_value, - e_contact_editor_categories_free_value, - e_contact_editor_categories_initialize_value, - e_contact_editor_categories_value_is_empty, - e_contact_editor_categories_thaw, - categories); - - header = e_table_header_new(); - - cell_checkbox = e_cell_checkbox_new(); - col = e_table_col_new (0, "", - 0, 20, cell_checkbox, - g_int_compare, TRUE); - e_table_header_add_column (header, col, 0); - - cell_left_just = e_cell_text_new (categories->model, NULL, GTK_JUSTIFY_LEFT); - col = e_table_col_new (1, "Category", - 1.0, 20, cell_left_just, - g_str_compare, TRUE); - e_table_header_add_column (header, col, 1); - - e_table = e_table_new (header, categories->model, INITIAL_SPEC); - - gtk_object_sink(GTK_OBJECT(categories->model)); - - gtk_widget_show(e_table); - - gtk_table_attach_defaults(GTK_TABLE(table), - e_table, - 0, 1, - 3, 4); -} - -void -e_contact_editor_categories_destroy (GtkObject *object) -{ - EContactEditorCategories *categories = E_CONTACT_EDITOR_CATEGORIES(object); - int i; - - if (categories->gui) - gtk_object_unref(GTK_OBJECT(categories->gui)); - - g_free(categories->categories); - for (i = 0; i < categories->list_length; i++) - g_free(categories->category_list[i]); - g_free(categories->category_list); - g_free(categories->selected_list); -} - -GtkWidget* -e_contact_editor_categories_new (char *categories) -{ - GtkWidget *widget = GTK_WIDGET (gtk_type_new (e_contact_editor_categories_get_type ())); - gtk_object_set (GTK_OBJECT(widget), - "categories", categories, - NULL); - return widget; -} - -static void -e_contact_editor_categories_set_arg (GtkObject *o, GtkArg *arg, guint arg_id) -{ - EContactEditorCategories *e_contact_editor_categories; - - e_contact_editor_categories = E_CONTACT_EDITOR_CATEGORIES (o); - - switch (arg_id){ - case ARG_CATEGORIES: - gtk_entry_set_text(GTK_ENTRY(e_contact_editor_categories->entry), GTK_VALUE_STRING (*arg)); - break; - } -} - -static void -e_contact_editor_categories_get_arg (GtkObject *object, GtkArg *arg, guint arg_id) -{ - EContactEditorCategories *e_contact_editor_categories; - - e_contact_editor_categories = E_CONTACT_EDITOR_CATEGORIES (object); - - switch (arg_id) { - case ARG_CATEGORIES: - GTK_VALUE_STRING (*arg) = g_strdup(e_contact_editor_categories->categories); - break; - default: - arg->type = GTK_TYPE_INVALID; - break; - } -} - -/* This function returns the number of columns in our ETableModel. */ -static int -e_contact_editor_categories_col_count (ETableModel *etc, gpointer data) -{ - return 2; -} - -/* This function returns the number of rows in our ETableModel. */ -static int -e_contact_editor_categories_row_count (ETableModel *etc, gpointer data) -{ - EContactEditorCategories *categories = E_CONTACT_EDITOR_CATEGORIES(data); - return categories->list_length; -} - -/* This function returns the value at a particular point in our ETableModel. */ -static void * -e_contact_editor_categories_value_at (ETableModel *etc, int col, int row, gpointer data) -{ - EContactEditorCategories *categories = E_CONTACT_EDITOR_CATEGORIES(data); - if (col == 0) - return (void *) categories->selected_list[row]; - else - return categories->category_list[row]; -} - -/* This function sets the value at a particular point in our ETableModel. */ -static void -e_contact_editor_categories_set_value_at (ETableModel *etc, int col, int row, const void *val, gpointer data) -{ - EContactEditorCategories *categories = E_CONTACT_EDITOR_CATEGORIES(data); - if ( col == 0 ) { - char **strs; - int i, j; - char *string; - categories->selected_list[row] = (gboolean) val; - strs = g_new(char *, categories->list_length + 1); - for (i = 0, j = 0; i < categories->list_length; i++) { - if (categories->selected_list[i]) - strs[j++] = categories->category_list[i]; - } - strs[j] = 0; - string = g_strjoinv(", ", strs); - gtk_entry_set_text(GTK_ENTRY(categories->entry), string); - g_free(string); - g_free(strs); - } - if ( col == 1 ) - return; -} - -/* This function returns whether a particular cell is editable. */ -static gboolean -e_contact_editor_categories_is_cell_editable (ETableModel *etc, int col, int row, gpointer data) -{ - return col == 0; -} - -/* This function duplicates the value passed to it. */ -static void * -e_contact_editor_categories_duplicate_value (ETableModel *etc, int col, const void *value, gpointer data) -{ - if (col == 0) - return (void *)value; - else - return g_strdup(value); -} - -/* This function frees the value passed to it. */ -static void -e_contact_editor_categories_free_value (ETableModel *etc, int col, void *value, gpointer data) -{ - if (col == 0) - return; - else - g_free(value); -} - -static void * -e_contact_editor_categories_initialize_value (ETableModel *etc, int col, gpointer data) -{ - if (col == 0) - return NULL; - else - return g_strdup(""); -} - -static gboolean -e_contact_editor_categories_value_is_empty (ETableModel *etc, int col, const void *value, gpointer data) -{ - if (col == 0) - return value == NULL; - else - return !(value && *(char *)value); -} - -/* This function is for when the model is unfrozen. This can mostly - be ignored for simple models. */ -static void -e_contact_editor_categories_thaw (ETableModel *etc, gpointer data) -{ - e_table_model_changed(etc); -} diff --git a/addressbook/gui/contact-editor/e-contact-editor-categories.h b/addressbook/gui/contact-editor/e-contact-editor-categories.h deleted file mode 100644 index 529ef71b68..0000000000 --- a/addressbook/gui/contact-editor/e-contact-editor-categories.h +++ /dev/null @@ -1,83 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* e-contact-editor-categories.h - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -#ifndef __E_CONTACT_EDITOR_CATEGORIES_H__ -#define __E_CONTACT_EDITOR_CATEGORIES_H__ - -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus */ - -/* EContactEditorCategories - A dialog displaying information about a contact. - * - * The following arguments are available: - * - * name type read/write description - * -------------------------------------------------------------------------------- - * name ECardName * RW The card currently being edited. Returns a copy. - */ - -#define E_CONTACT_EDITOR_CATEGORIES_TYPE (e_contact_editor_categories_get_type ()) -#define E_CONTACT_EDITOR_CATEGORIES(obj) (GTK_CHECK_CAST ((obj), E_CONTACT_EDITOR_CATEGORIES_TYPE, EContactEditorCategories)) -#define E_CONTACT_EDITOR_CATEGORIES_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_CONTACT_EDITOR_CATEGORIES_TYPE, EContactEditorCategoriesClass)) -#define E_IS_CONTACT_EDITOR_CATEGORIES(obj) (GTK_CHECK_TYPE ((obj), E_CONTACT_EDITOR_CATEGORIES_TYPE)) -#define E_IS_CONTACT_EDITOR_CATEGORIES_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_CONTACT_EDITOR_CATEGORIES_TYPE)) - - -typedef struct _EContactEditorCategories EContactEditorCategories; -typedef struct _EContactEditorCategoriesClass EContactEditorCategoriesClass; - -struct _EContactEditorCategories -{ - GnomeDialog parent; - - /* item specific fields */ - char *categories; - GtkWidget *entry; - ETableModel *model; - - int list_length; - char **category_list; - gboolean *selected_list; - - GladeXML *gui; -}; - -struct _EContactEditorCategoriesClass -{ - GnomeDialogClass parent_class; -}; - - -GtkWidget *e_contact_editor_categories_new(char *categories); -GtkType e_contact_editor_categories_get_type (void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -#endif /* __E_CONTACT_EDITOR_CATEGORIES_H__ */ diff --git a/addressbook/gui/contact-editor/e-contact-editor-fullname.c b/addressbook/gui/contact-editor/e-contact-editor-fullname.c deleted file mode 100644 index b2e598fdde..0000000000 --- a/addressbook/gui/contact-editor/e-contact-editor-fullname.c +++ /dev/null @@ -1,214 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * e-contact-editor-fullname.c - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include -#include -#include - -static void e_contact_editor_fullname_init (EContactEditorFullname *card); -static void e_contact_editor_fullname_class_init (EContactEditorFullnameClass *klass); -static void e_contact_editor_fullname_set_arg (GtkObject *o, GtkArg *arg, guint arg_id); -static void e_contact_editor_fullname_get_arg (GtkObject *object, GtkArg *arg, guint arg_id); -static void e_contact_editor_fullname_destroy (GtkObject *object); - -static void fill_in_info(EContactEditorFullname *editor); -static void extract_info(EContactEditorFullname *editor); - -static GnomeDialogClass *parent_class = NULL; - -/* The arguments we take */ -enum { - ARG_0, - ARG_NAME -}; - -GtkType -e_contact_editor_fullname_get_type (void) -{ - static GtkType contact_editor_fullname_type = 0; - - if (!contact_editor_fullname_type) - { - static const GtkTypeInfo contact_editor_fullname_info = - { - "EContactEditorFullname", - sizeof (EContactEditorFullname), - sizeof (EContactEditorFullnameClass), - (GtkClassInitFunc) e_contact_editor_fullname_class_init, - (GtkObjectInitFunc) e_contact_editor_fullname_init, - /* reserved_1 */ NULL, - /* reserved_2 */ NULL, - (GtkClassInitFunc) NULL, - }; - - contact_editor_fullname_type = gtk_type_unique (gnome_dialog_get_type (), &contact_editor_fullname_info); - } - - return contact_editor_fullname_type; -} - -static void -e_contact_editor_fullname_class_init (EContactEditorFullnameClass *klass) -{ - GtkObjectClass *object_class; - GnomeDialogClass *dialog_class; - - object_class = (GtkObjectClass*) klass; - dialog_class = (GnomeDialogClass *) klass; - - parent_class = gtk_type_class (gnome_dialog_get_type ()); - - gtk_object_add_arg_type ("EContactEditorFullname::name", GTK_TYPE_POINTER, - GTK_ARG_READWRITE, ARG_NAME); - - object_class->set_arg = e_contact_editor_fullname_set_arg; - object_class->get_arg = e_contact_editor_fullname_get_arg; - object_class->destroy = e_contact_editor_fullname_destroy; -} - -static void -e_contact_editor_fullname_init (EContactEditorFullname *e_contact_editor_fullname) -{ - GladeXML *gui; - GtkWidget *widget; - - gnome_dialog_append_button ( GNOME_DIALOG(e_contact_editor_fullname), - GNOME_STOCK_BUTTON_OK); - - gnome_dialog_append_button ( GNOME_DIALOG(e_contact_editor_fullname), - GNOME_STOCK_BUTTON_CANCEL); - - gtk_window_set_policy(GTK_WINDOW(e_contact_editor_fullname), TRUE, TRUE, FALSE); - - e_contact_editor_fullname->name = NULL; - gui = glade_xml_new (EVOLUTION_GLADEDIR "/fullname.glade", NULL); - e_contact_editor_fullname->gui = gui; - - widget = glade_xml_get_widget(gui, "table-checkfullname"); - gtk_widget_ref(widget); - gtk_container_remove(GTK_CONTAINER(widget->parent), widget); - gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (e_contact_editor_fullname)->vbox), widget, TRUE, TRUE, 0); - gtk_widget_unref(widget); -} - -void -e_contact_editor_fullname_destroy (GtkObject *object) -{ - EContactEditorFullname *e_contact_editor_fullname = E_CONTACT_EDITOR_FULLNAME(object); - - if (e_contact_editor_fullname->gui) - gtk_object_unref(GTK_OBJECT(e_contact_editor_fullname->gui)); - e_card_name_free(e_contact_editor_fullname->name); -} - -GtkWidget* -e_contact_editor_fullname_new (ECardName *name) -{ - GtkWidget *widget = GTK_WIDGET (gtk_type_new (e_contact_editor_fullname_get_type ())); - gtk_object_set (GTK_OBJECT(widget), - "name", name, - NULL); - return widget; -} - -static void -e_contact_editor_fullname_set_arg (GtkObject *o, GtkArg *arg, guint arg_id) -{ - EContactEditorFullname *e_contact_editor_fullname; - - e_contact_editor_fullname = E_CONTACT_EDITOR_FULLNAME (o); - - switch (arg_id){ - case ARG_NAME: - if (e_contact_editor_fullname->name) - e_card_name_free(e_contact_editor_fullname->name); - e_contact_editor_fullname->name = e_card_name_copy(GTK_VALUE_POINTER (*arg)); - fill_in_info(e_contact_editor_fullname); - break; - } -} - -static void -e_contact_editor_fullname_get_arg (GtkObject *object, GtkArg *arg, guint arg_id) -{ - EContactEditorFullname *e_contact_editor_fullname; - - e_contact_editor_fullname = E_CONTACT_EDITOR_FULLNAME (object); - - switch (arg_id) { - case ARG_NAME: - extract_info(e_contact_editor_fullname); - GTK_VALUE_POINTER (*arg) = e_card_name_copy(e_contact_editor_fullname->name); - break; - default: - arg->type = GTK_TYPE_INVALID; - break; - } -} - -static void -fill_in_field(EContactEditorFullname *editor, char *field, char *string) -{ - GtkEntry *entry = GTK_ENTRY(glade_xml_get_widget(editor->gui, field)); - if (entry) { - if (string) - gtk_entry_set_text(entry, string); - else - gtk_entry_set_text(entry, ""); - } -} - -static void -fill_in_info(EContactEditorFullname *editor) -{ - ECardName *name = editor->name; - if (name) { - fill_in_field(editor, "entry-title", name->prefix); - fill_in_field(editor, "entry-first", name->given); - fill_in_field(editor, "entry-middle", name->additional); - fill_in_field(editor, "entry-last", name->family); - fill_in_field(editor, "entry-suffix", name->suffix); - } -} - -static char * -extract_field(EContactEditorFullname *editor, char *field) -{ - GtkEntry *entry = GTK_ENTRY(glade_xml_get_widget(editor->gui, field)); - if (entry) - return g_strdup(gtk_entry_get_text(entry)); - else - return NULL; -} - -static void -extract_info(EContactEditorFullname *editor) -{ - ECardName *name = editor->name; - if (!name) - name = e_card_name_new(); - name->prefix = extract_field(editor, "entry-title" ); - name->given = extract_field(editor, "entry-first" ); - name->additional = extract_field(editor, "entry-middle"); - name->family = extract_field(editor, "entry-last" ); - name->suffix = extract_field(editor, "entry-suffix"); -} diff --git a/addressbook/gui/contact-editor/e-contact-editor-fullname.h b/addressbook/gui/contact-editor/e-contact-editor-fullname.h deleted file mode 100644 index 409ffc72d0..0000000000 --- a/addressbook/gui/contact-editor/e-contact-editor-fullname.h +++ /dev/null @@ -1,75 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* e-contact-editor-fullname.h - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -#ifndef __E_CONTACT_EDITOR_FULLNAME_H__ -#define __E_CONTACT_EDITOR_FULLNAME_H__ - -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus */ - -/* EContactEditorFullname - A dialog displaying information about a contact. - * - * The following arguments are available: - * - * name type read/write description - * -------------------------------------------------------------------------------- - * name ECardName * RW The card currently being edited. Returns a copy. - */ - -#define E_CONTACT_EDITOR_FULLNAME_TYPE (e_contact_editor_fullname_get_type ()) -#define E_CONTACT_EDITOR_FULLNAME(obj) (GTK_CHECK_CAST ((obj), E_CONTACT_EDITOR_FULLNAME_TYPE, EContactEditorFullname)) -#define E_CONTACT_EDITOR_FULLNAME_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_CONTACT_EDITOR_FULLNAME_TYPE, EContactEditorFullnameClass)) -#define E_IS_CONTACT_EDITOR_FULLNAME(obj) (GTK_CHECK_TYPE ((obj), E_CONTACT_EDITOR_FULLNAME_TYPE)) -#define E_IS_CONTACT_EDITOR_FULLNAME_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_CONTACT_EDITOR_FULLNAME_TYPE)) - - -typedef struct _EContactEditorFullname EContactEditorFullname; -typedef struct _EContactEditorFullnameClass EContactEditorFullnameClass; - -struct _EContactEditorFullname -{ - GnomeDialog parent; - - /* item specific fields */ - ECardName *name; - GladeXML *gui; -}; - -struct _EContactEditorFullnameClass -{ - GnomeDialogClass parent_class; -}; - - -GtkWidget *e_contact_editor_fullname_new(ECardName *name); -GtkType e_contact_editor_fullname_get_type (void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -#endif /* __E_CONTACT_EDITOR_FULLNAME_H__ */ diff --git a/addressbook/gui/contact-editor/e-contact-editor-strings.h b/addressbook/gui/contact-editor/e-contact-editor-strings.h deleted file mode 100644 index 40c2ee85a5..0000000000 --- a/addressbook/gui/contact-editor/e-contact-editor-strings.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Translatable strings file generated by Glade. - * Add this file to your project's POTFILES.in. - * DO NOT compile it as part of your application. - */ - -gchar *s = N_("Contact Editor"); -gchar *s = N_("_Full Name..."); -gchar *s = N_("Company:"); -gchar *s = N_("File As:"); -gchar *s = N_("Web page address:"); -gchar *s = N_("Wants to receive _HTML mail"); -gchar *s = N_("Address:"); -gchar *s = N_("_Business"); -gchar *s = N_("_Home"); -gchar *s = N_("Business _Fax"); -gchar *s = N_("_Mobile"); -gchar *s = N_("Primary Email"); -gchar *s = N_("Business"); -gchar *s = N_("This is the _mailing address"); -gchar *s = N_("_Contacts..."); -gchar *s = N_("Ca_tegories..."); -gchar *s = N_("Job Title"); -gchar *s = N_("General"); -gchar *s = N_("Department:"); -gchar *s = N_("Office:"); -gchar *s = N_("Profession:"); -gchar *s = N_("Nickname:"); -gchar *s = N_("Spouse:"); -gchar *s = N_("Birthday:"); -gchar *s = N_("Assistant's name:"); -gchar *s = N_("Manager's Name:"); -gchar *s = N_("Anniversary:"); -gchar *s = N_("Notes:"); -gchar *s = N_("Details"); -gchar *s = N_("Add"); -gchar *s = N_("Delete"); -gchar *s = N_("Phone Types"); -gchar *s = N_("New phone type"); -gchar *s = N_("New phone type"); -gchar *s = N_("Add"); diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c deleted file mode 100644 index 5d7485561c..0000000000 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ /dev/null @@ -1,1300 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * e-contact-editor.c - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include -#include -#include "e-contact-editor.h" -#include -#include -#include -#include -#include - -static void e_contact_editor_init (EContactEditor *card); -static void e_contact_editor_class_init (EContactEditorClass *klass); -static void e_contact_editor_set_arg (GtkObject *o, GtkArg *arg, guint arg_id); -static void e_contact_editor_get_arg (GtkObject *object, GtkArg *arg, guint arg_id); -static void e_contact_editor_destroy (GtkObject *object); - -#if 0 -static GtkWidget *e_contact_editor_build_dialog(EContactEditor *editor, gchar *entry_id, gchar *label_id, gchar *title, GList **list, GnomeUIInfo **info); -#endif -static void _email_arrow_pressed (GtkWidget *widget, GdkEventButton *button, EContactEditor *editor); -static void _phone_arrow_pressed (GtkWidget *widget, GdkEventButton *button, EContactEditor *editor); -static void _address_arrow_pressed (GtkWidget *widget, GdkEventButton *button, EContactEditor *editor); -static void fill_in_info(EContactEditor *editor); -static void extract_info(EContactEditor *editor); -static void set_fields(EContactEditor *editor); -static void set_address_field(EContactEditor *editor, int result); -static void add_field_callback(GtkWidget *widget, EContactEditor *editor); - -static GtkVBoxClass *parent_class = NULL; - -/* The arguments we take */ -enum { - ARG_0, - ARG_CARD -}; - -enum { - DYNAMIC_LIST_EMAIL, - DYNAMIC_LIST_PHONE, - DYNAMIC_LIST_ADDRESS -}; - -GtkType -e_contact_editor_get_type (void) -{ - static GtkType contact_editor_type = 0; - - if (!contact_editor_type) - { - static const GtkTypeInfo contact_editor_info = - { - "EContactEditor", - sizeof (EContactEditor), - sizeof (EContactEditorClass), - (GtkClassInitFunc) e_contact_editor_class_init, - (GtkObjectInitFunc) e_contact_editor_init, - /* reserved_1 */ NULL, - /* reserved_2 */ NULL, - (GtkClassInitFunc) NULL, - }; - - contact_editor_type = gtk_type_unique (gtk_vbox_get_type (), &contact_editor_info); - } - - return contact_editor_type; -} - -static void -e_contact_editor_class_init (EContactEditorClass *klass) -{ - GtkObjectClass *object_class; - GtkVBoxClass *vbox_class; - - object_class = (GtkObjectClass*) klass; - vbox_class = (GtkVBoxClass *) klass; - - parent_class = gtk_type_class (gtk_vbox_get_type ()); - - gtk_object_add_arg_type ("EContactEditor::card", GTK_TYPE_OBJECT, - GTK_ARG_READWRITE, ARG_CARD); - - object_class->set_arg = e_contact_editor_set_arg; - object_class->get_arg = e_contact_editor_get_arg; - object_class->destroy = e_contact_editor_destroy; -} - -static void -_replace_button(EContactEditor *editor, gchar *button_xml, gchar *image, GtkSignalFunc func) -{ - GladeXML *gui = editor->gui; - GtkWidget *button = glade_xml_get_widget(gui, button_xml); - GtkWidget *pixmap; - gchar *image_temp; - if (button && GTK_IS_BUTTON(button)) { - image_temp = g_strdup_printf("%s%s", DATADIR "/evolution/", image); - pixmap = e_create_image_widget(NULL, image_temp, NULL, 0, 0); - gtk_container_add(GTK_CONTAINER(button), - pixmap); - g_free(image_temp); - gtk_widget_show(pixmap); - gtk_signal_connect(GTK_OBJECT(button), "button_press_event", func, editor); - } -} - -static void -_replace_buttons(EContactEditor *editor) -{ - _replace_button(editor, "button-phone1", "arrow.png", _phone_arrow_pressed); - _replace_button(editor, "button-phone2", "arrow.png", _phone_arrow_pressed); - _replace_button(editor, "button-phone3", "arrow.png", _phone_arrow_pressed); - _replace_button(editor, "button-phone4", "arrow.png", _phone_arrow_pressed); - _replace_button(editor, "button-address", "arrow.png", _address_arrow_pressed); - _replace_button(editor, "button-email1", "arrow.png", _email_arrow_pressed); -} - -static void -phone_entry_changed (GtkWidget *widget, EContactEditor *editor) -{ - int which; - gchar *string; - GtkEntry *entry = GTK_ENTRY(widget); - ECardPhone *phone; - - if ( widget == glade_xml_get_widget(editor->gui, "entry-phone1") ) { - which = 1; - } else if ( widget == glade_xml_get_widget(editor->gui, "entry-phone2") ) { - which = 2; - } else if ( widget == glade_xml_get_widget(editor->gui, "entry-phone3") ) { - which = 3; - } else if ( widget == glade_xml_get_widget(editor->gui, "entry-phone4") ) { - which = 4; - } else - return; - string = gtk_entry_get_text(entry); - phone = e_card_phone_new(); - phone->number = string; - e_card_simple_set_phone(editor->simple, editor->phone_choice[which - 1], phone); - phone->number = NULL; - e_card_phone_free(phone); - set_fields(editor); -} - -static void -email_entry_changed (GtkWidget *widget, EContactEditor *editor) -{ - gchar *string; - GtkEntry *entry = GTK_ENTRY(widget); - - string = gtk_entry_get_text(entry); - - e_card_simple_set_email(editor->simple, editor->email_choice, string); -} - -static void -address_text_changed (GtkWidget *widget, EContactEditor *editor) -{ - GtkEditable *editable = GTK_EDITABLE(widget); - ECardAddrLabel *address; - - if (editor->address_choice == -1) - return; - - address = e_card_address_label_new(); - address->data = gtk_editable_get_chars(editable, 0, -1); - e_card_simple_set_address(editor->simple, editor->address_choice, address); - e_card_address_label_free(address); -} - -/* This function tells you whether name_to_style will make sense. */ -static gboolean -style_makes_sense(const ECardName *name, char *company, int style) -{ - switch (style) { - case 0: /* Fall Through */ - case 1: - return TRUE; - case 2: - if (company && *company) - return TRUE; - else - return FALSE; - case 3: /* Fall Through */ - case 4: - if (company && *company && ((name->given && *name->given) || (name->family && *name->family))) - return TRUE; - else - return FALSE; - default: - return FALSE; - } -} - -static char * -name_to_style(const ECardName *name, char *company, int style) -{ - char *string; - char *strings[4], **stringptr; - char *substring; - switch (style) { - case 0: - stringptr = strings; - if (name->family && *name->family) - *(stringptr++) = name->family; - if (name->given && *name->given) - *(stringptr++) = name->given; - *stringptr = NULL; - string = g_strjoinv(", ", strings); - break; - case 1: - stringptr = strings; - if (name->given && *name->given) - *(stringptr++) = name->given; - if (name->family && *name->family) - *(stringptr++) = name->family; - *stringptr = NULL; - string = g_strjoinv(" ", strings); - break; - case 2: - string = g_strdup(company); - break; - case 3: /* Fall Through */ - case 4: - stringptr = strings; - if (name->family && *name->family) - *(stringptr++) = name->family; - if (name->given && *name->given) - *(stringptr++) = name->given; - *stringptr = NULL; - substring = g_strjoinv(", ", strings); - if (!(company && *company)) - company = ""; - if (style == 3) - string = g_strdup_printf("%s (%s)", substring, company); - else - string = g_strdup_printf("%s (%s)", company, substring); - g_free(substring); - break; - default: - string = g_strdup(""); - } - return string; -} - -static int -file_as_get_style (EContactEditor *editor) -{ - GtkEntry *file_as = GTK_ENTRY(glade_xml_get_widget(editor->gui, "entry-file-as")); - char *filestring = gtk_entry_get_text(file_as); - char *trystring; - ECardName *name = editor->name; - int i; - int style; - - if (!name) return 0; - - style = -1; - for (i = 0; i < 5; i++) { - trystring = name_to_style(name, editor->company, i); - if (!strcmp(trystring, filestring)) { - g_free(trystring); - return i; - } - g_free(trystring); - } - return -1; -} - -static void -file_as_set_style(EContactEditor *editor, int style) -{ - char *string; - int i; - GList *strings = NULL; - GtkEntry *file_as = GTK_ENTRY(glade_xml_get_widget(editor->gui, "entry-file-as")); - GtkWidget *widget; - - - if (style == -1) { - string = g_strdup(gtk_entry_get_text(file_as)); - strings = g_list_append(strings, string); - } - - for (i = 0; i < 5; i++) { - if (style_makes_sense(editor->name, editor->company, i)) { - string = name_to_style(editor->name, editor->company, i); - strings = g_list_append(strings, string); - } - } - - widget = glade_xml_get_widget(editor->gui, "combo-file-as"); - if (widget && GTK_IS_COMBO(widget)) { - GtkCombo *combo = GTK_COMBO(widget); - gtk_combo_set_popdown_strings(combo, strings); - g_list_foreach(strings, (GFunc) g_free, NULL); - g_list_free(strings); - } - - if (style != -1) { - string = name_to_style(editor->name, editor->company, style); - gtk_entry_set_text(file_as, string); - g_free(string); - } -} - -static void -name_entry_changed (GtkWidget *widget, EContactEditor *editor) -{ - GtkWidget *file_as; - int style = 0; - - file_as = glade_xml_get_widget(editor->gui, "entry-file-as"); - - if (file_as && GTK_IS_ENTRY(file_as)) { - style = file_as_get_style(editor); - } - - e_card_name_free(editor->name); - editor->name = e_card_name_from_string(gtk_entry_get_text(GTK_ENTRY(widget))); - - if (file_as && GTK_IS_ENTRY(file_as)) { - file_as_set_style(editor, style); - } -} - -static void -company_entry_changed (GtkWidget *widget, EContactEditor *editor) -{ - int style = 0; - GtkWidget *file_as; - - file_as = glade_xml_get_widget(editor->gui, "entry-file-as"); - - if (file_as && GTK_IS_ENTRY(file_as)) { - style = file_as_get_style(editor); - } - - g_free(editor->company); - - editor->company = g_strdup(gtk_entry_get_text(GTK_ENTRY(widget))); - - if (file_as && GTK_IS_ENTRY(file_as)) { - file_as_set_style(editor, style); - } -} - -static void -set_entry_changed_signal_phone(EContactEditor *editor, char *id) -{ - GtkWidget *widget = glade_xml_get_widget(editor->gui, id); - if (widget && GTK_IS_ENTRY(widget)) - gtk_signal_connect(GTK_OBJECT(widget), "changed", - phone_entry_changed, editor); -} - -static void -set_entry_changed_signals(EContactEditor *editor) -{ - GtkWidget *widget; - set_entry_changed_signal_phone(editor, "entry-phone1"); - set_entry_changed_signal_phone(editor, "entry-phone2"); - set_entry_changed_signal_phone(editor, "entry-phone3"); - set_entry_changed_signal_phone(editor, "entry-phone4"); - widget = glade_xml_get_widget(editor->gui, "entry-email1"); - if (widget && GTK_IS_ENTRY(widget)) { - gtk_signal_connect(GTK_OBJECT(widget), "changed", - email_entry_changed, editor); - } - widget = glade_xml_get_widget(editor->gui, "text-address"); - if (widget && GTK_IS_TEXT(widget)) { - gtk_signal_connect(GTK_OBJECT(widget), "changed", - address_text_changed, editor); - } - widget = glade_xml_get_widget(editor->gui, "entry-fullname"); - if (widget && GTK_IS_ENTRY(widget)) { - gtk_signal_connect(GTK_OBJECT(widget), "changed", - name_entry_changed, editor); - } - widget = glade_xml_get_widget(editor->gui, "entry-company"); - if (widget && GTK_IS_ENTRY(widget)) { - gtk_signal_connect(GTK_OBJECT(widget), "changed", - company_entry_changed, editor); - } -} - -static void -full_name_clicked(GtkWidget *button, EContactEditor *editor) -{ - GnomeDialog *dialog = GNOME_DIALOG(e_contact_editor_fullname_new(editor->name)); - int result; - gtk_widget_show(GTK_WIDGET(dialog)); - result = gnome_dialog_run_and_close (dialog); - if (result == 0) { - ECardName *name; - GtkWidget *fname_widget; - - gtk_object_get(GTK_OBJECT(dialog), - "name", &name, - NULL); - e_card_name_free(editor->name); - editor->name = e_card_name_copy(name); - - fname_widget = glade_xml_get_widget(editor->gui, "entry-fullname"); - if (fname_widget && GTK_IS_ENTRY(fname_widget)) { - char *full_name = e_card_name_to_string(name); - gtk_entry_set_text(GTK_ENTRY(fname_widget), full_name); - g_free(full_name); - } - } - gtk_object_unref(GTK_OBJECT(dialog)); -} - -static void -categories_clicked(GtkWidget *button, EContactEditor *editor) -{ - char *categories; - GnomeDialog *dialog; - int result; - GtkWidget *entry = glade_xml_get_widget(editor->gui, "entry-categories"); - if (entry && GTK_IS_ENTRY(entry)) - categories = gtk_entry_get_text(GTK_ENTRY(entry)); - else if (editor->card) - gtk_object_get(GTK_OBJECT(editor->card), - "categories", &categories, - NULL); - dialog = GNOME_DIALOG(e_contact_editor_categories_new(categories)); - gtk_widget_show(GTK_WIDGET(dialog)); - result = gnome_dialog_run (dialog); - if (result == 0) { - gtk_object_get(GTK_OBJECT(dialog), - "categories", &categories, - NULL); - if (entry && GTK_IS_ENTRY(entry)) - gtk_entry_set_text(GTK_ENTRY(entry), categories); - else - gtk_object_set(GTK_OBJECT(editor->card), - "categories", categories, - NULL); - g_free(categories); - } - gtk_object_destroy(GTK_OBJECT(dialog)); - if (!entry) - g_free(categories); -} - -static void -e_contact_editor_init (EContactEditor *e_contact_editor) -{ - GladeXML *gui; - GtkWidget *widget; - - - e_contact_editor->email_info = NULL; - e_contact_editor->phone_info = NULL; - e_contact_editor->address_info = NULL; - e_contact_editor->email_popup = NULL; - e_contact_editor->phone_popup = NULL; - e_contact_editor->address_popup = NULL; - e_contact_editor->email_list = NULL; - e_contact_editor->phone_list = NULL; - e_contact_editor->address_list = NULL; - e_contact_editor->name = NULL; - e_contact_editor->company = g_strdup(""); - - e_contact_editor->email_choice = 0; - e_contact_editor->phone_choice[0] = E_CARD_SIMPLE_PHONE_ID_BUSINESS; - e_contact_editor->phone_choice[1] = E_CARD_SIMPLE_PHONE_ID_HOME; - e_contact_editor->phone_choice[2] = E_CARD_SIMPLE_PHONE_ID_BUSINESS_FAX; - e_contact_editor->phone_choice[3] = E_CARD_SIMPLE_PHONE_ID_MOBILE; - e_contact_editor->address_choice = 0; - - e_contact_editor->arbitrary_fields = NULL; - - e_contact_editor->simple = e_card_simple_new(NULL); - - e_contact_editor->card = NULL; - - gui = glade_xml_new (EVOLUTION_GLADEDIR "/contact-editor.glade", NULL); - e_contact_editor->gui = gui; - - widget = glade_xml_get_widget(gui, "notebook-contact-editor"); - if (!widget) { - return; - } - gtk_widget_reparent(widget, - GTK_WIDGET(e_contact_editor)); - - if (GTK_IS_CONTAINER(widget)) - e_container_foreach_leaf(GTK_CONTAINER(widget), (GtkCallback) add_field_callback, e_contact_editor); - - _replace_buttons(e_contact_editor); - set_entry_changed_signals(e_contact_editor); - - widget = glade_xml_get_widget(e_contact_editor->gui, "button-fullname"); - if (widget && GTK_IS_BUTTON(widget)) - gtk_signal_connect(GTK_OBJECT(widget), "clicked", - full_name_clicked, e_contact_editor); - - widget = glade_xml_get_widget(e_contact_editor->gui, "button-categories"); - if (widget && GTK_IS_BUTTON(widget)) - gtk_signal_connect(GTK_OBJECT(widget), "clicked", - categories_clicked, e_contact_editor); -} - -void -e_contact_editor_destroy (GtkObject *object) { - EContactEditor *e_contact_editor = E_CONTACT_EDITOR(object); - - if (e_contact_editor->email_list) { - g_list_foreach(e_contact_editor->email_list, (GFunc) g_free, NULL); - g_list_free(e_contact_editor->email_list); - } - if (e_contact_editor->email_info) { - g_free(e_contact_editor->email_info); - } - if (e_contact_editor->email_popup) { - gtk_widget_unref(e_contact_editor->email_popup); - } - - if (e_contact_editor->phone_list) { - g_list_foreach(e_contact_editor->phone_list, (GFunc) g_free, NULL); - g_list_free(e_contact_editor->phone_list); - } - if (e_contact_editor->phone_info) { - g_free(e_contact_editor->phone_info); - } - if (e_contact_editor->phone_popup) { - gtk_widget_unref(e_contact_editor->phone_popup); - } - - if (e_contact_editor->address_list) { - g_list_foreach(e_contact_editor->address_list, (GFunc) g_free, NULL); - g_list_free(e_contact_editor->address_list); - } - if (e_contact_editor->address_info) { - g_free(e_contact_editor->address_info); - } - if (e_contact_editor->address_popup) { - gtk_widget_unref(e_contact_editor->address_popup); - } - - if (e_contact_editor->simple) - gtk_object_unref(GTK_OBJECT(e_contact_editor->simple)); - - g_free (e_contact_editor->company); - - gtk_object_unref(GTK_OBJECT(e_contact_editor->gui)); -} - -GtkWidget* -e_contact_editor_new (ECard *card) -{ - GtkWidget *widget = GTK_WIDGET (gtk_type_new (e_contact_editor_get_type ())); - gtk_object_set (GTK_OBJECT(widget), - "card", card, - NULL); - return widget; -} - -static void -e_contact_editor_set_arg (GtkObject *o, GtkArg *arg, guint arg_id) -{ - EContactEditor *editor; - - editor = E_CONTACT_EDITOR (o); - - switch (arg_id){ - case ARG_CARD: - if (editor->card) - gtk_object_unref(GTK_OBJECT(editor->card)); - editor->card = e_card_duplicate(E_CARD(GTK_VALUE_OBJECT (*arg))); - gtk_object_set(GTK_OBJECT(editor->simple), - "card", editor->card, - NULL); - fill_in_info(editor); - break; - } -} - -static void -e_contact_editor_get_arg (GtkObject *object, GtkArg *arg, guint arg_id) -{ - EContactEditor *e_contact_editor; - - e_contact_editor = E_CONTACT_EDITOR (object); - - switch (arg_id) { - case ARG_CARD: - e_card_simple_sync_card(e_contact_editor->simple); - extract_info(e_contact_editor); - GTK_VALUE_OBJECT (*arg) = GTK_OBJECT(e_contact_editor->card); - break; - default: - arg->type = GTK_TYPE_INVALID; - break; - } -} - -static void -_popup_position(GtkMenu *menu, - gint *x, - gint *y, - gpointer data) -{ - GtkWidget *button = GTK_WIDGET(data); - GtkRequisition request; - int mh, mw; - gdk_window_get_origin (button->window, x, y); - *x += button->allocation.width; - *y += button->allocation.height; - - gtk_widget_size_request(GTK_WIDGET(menu), &request); - - mh = request.height; - mw = request.width; - - *x -= mw; - if (*x < 0) - *x = 0; - - if (*y < 0) - *y = 0; - - if ((*x + mw) > gdk_screen_width ()) - *x = gdk_screen_width () - mw; - - if ((*y + mh) > gdk_screen_height ()) - *y = gdk_screen_height () - mh; -} - -static gint -_arrow_pressed (GtkWidget *widget, GdkEventButton *button, EContactEditor *editor, GtkWidget *popup, GList **list, GnomeUIInfo **info, gchar *label, gchar *entry, gchar *dialog_title) -{ - gint menu_item; - gtk_signal_emit_stop_by_name(GTK_OBJECT(widget), "button_press_event"); - gtk_widget_realize(popup); - menu_item = gnome_popup_menu_do_popup_modal(popup, _popup_position, widget, button, editor); - if ( menu_item != -1 ) { -#if 0 - if (menu_item == g_list_length (*list)) { - e_contact_editor_build_dialog(editor, entry, label, dialog_title, list, info); - } else { -#endif - GtkWidget *entry_widget = glade_xml_get_widget(editor->gui, label); - if (entry_widget && GTK_IS_ENTRY(entry_widget)) { - gtk_object_set(GTK_OBJECT(entry_widget), - "label", g_list_nth_data(*list, menu_item), - NULL); - } -#if 0 - } -#endif - } - return menu_item; -} - -static void -e_contact_editor_build_ui_info(GList *list, GnomeUIInfo **infop) -{ - GnomeUIInfo *info; - GnomeUIInfo singleton = { GNOME_APP_UI_TOGGLEITEM, NULL, NULL, NULL, NULL, NULL, GNOME_APP_PIXMAP_NONE, 0, 0, 0, NULL }; - GnomeUIInfo end = GNOMEUIINFO_END; - int length; - int i; - - info = *infop; - - if ( info ) - g_free(info); - length = g_list_length( list ); - info = g_new(GnomeUIInfo, length + 2); - for (i = 0; i < length; i++) { - info[i] = singleton; - info[i].label = _(list->data); - list = list->next; - } - info[i] = end; - - *infop = info; -} - -#if 0 -static void -_dialog_clicked(GtkWidget *dialog, gint button, EContactEditor *editor) -{ - GtkWidget *label = gtk_object_get_data(GTK_OBJECT(dialog), - "e_contact_editor_label"); - - GtkWidget *dialog_entry = gtk_object_get_data(GTK_OBJECT(dialog), - "e_contact_editor_dialog_entry"); - - GList **list = gtk_object_get_data(GTK_OBJECT(dialog), - "e_contact_editor_list"); - GList **info = gtk_object_get_data(GTK_OBJECT(dialog), - "e_contact_editor_info"); - switch (button) { - case 0: - if (label && GTK_IS_LABEL(label)) { - gtk_object_set(GTK_OBJECT(label), - "label", gtk_entry_get_text(GTK_ENTRY(dialog_entry)), - NULL); - *list = g_list_append(*list, g_strdup(gtk_entry_get_text(GTK_ENTRY(dialog_entry)))); - g_free(*info); - *info = NULL; - } - break; - } - gnome_dialog_close(GNOME_DIALOG(dialog)); -} - -static void -_dialog_destroy(EContactEditor *editor, GtkWidget *dialog) -{ - gnome_dialog_close(GNOME_DIALOG(dialog)); -} - -static GtkWidget * -e_contact_editor_build_dialog(EContactEditor *editor, gchar *entry_id, gchar *label_id, gchar *title, GList **list, GnomeUIInfo **info) -{ - GtkWidget *dialog_entry = gtk_entry_new(); - GtkWidget *entry = glade_xml_get_widget(editor->gui, entry_id); - GtkWidget *label = glade_xml_get_widget(editor->gui, label_id); - - GtkWidget *dialog = gnome_dialog_new(title, - NULL); - - gtk_container_add(GTK_CONTAINER(GNOME_DIALOG(dialog)->vbox), - gtk_widget_new (gtk_frame_get_type(), - "border_width", 4, - "label", title, - "child", gtk_widget_new(gtk_alignment_get_type(), - "child", dialog_entry, - "xalign", .5, - "yalign", .5, - "xscale", 1.0, - "yscale", 1.0, - "border_width", 9, - NULL), - NULL)); - - gnome_dialog_append_button_with_pixmap(GNOME_DIALOG(dialog), - "Add", - GNOME_STOCK_PIXMAP_ADD); - gnome_dialog_append_button(GNOME_DIALOG(dialog), GNOME_STOCK_BUTTON_CANCEL); - gnome_dialog_set_default(GNOME_DIALOG(dialog), 0); - - gtk_signal_connect(GTK_OBJECT(dialog), "clicked", - _dialog_clicked, editor); - gtk_signal_connect_while_alive(GTK_OBJECT(editor), "destroy", - _dialog_destroy, GTK_OBJECT(dialog), GTK_OBJECT(dialog)); - - gtk_object_set_data(GTK_OBJECT(dialog), - "e_contact_editor_entry", entry); - gtk_object_set_data(GTK_OBJECT(dialog), - "e_contact_editor_label", label); - gtk_object_set_data(GTK_OBJECT(dialog), - "e_contact_editor_dialog_entry", dialog_entry); - gtk_object_set_data(GTK_OBJECT(dialog), - "e_contact_editor_list", list); - gtk_object_set_data(GTK_OBJECT(dialog), - "e_contact_editor_info", info); - - gtk_widget_show_all(dialog); - return dialog; -} -#endif - -static void -_phone_arrow_pressed (GtkWidget *widget, GdkEventButton *button, EContactEditor *editor) -{ - int which; - int i; - gchar *label; - gchar *entry; - int result; - if ( widget == glade_xml_get_widget(editor->gui, "button-phone1") ) { - which = 1; - } else if ( widget == glade_xml_get_widget(editor->gui, "button-phone2") ) { - which = 2; - } else if ( widget == glade_xml_get_widget(editor->gui, "button-phone3") ) { - which = 3; - } else if ( widget == glade_xml_get_widget(editor->gui, "button-phone4") ) { - which = 4; - } else - return; - - label = g_strdup_printf("label-phone%d", which); - entry = g_strdup_printf("entry-phone%d", which); - - if (editor->phone_list == NULL) { - static char *info[] = { - N_("Assistant"), - N_("Business"), - N_("Business 2"), - N_("Business Fax"), - N_("Callback"), - N_("Car"), - N_("Company"), - N_("Home"), - N_("Home 2"), - N_("Home Fax"), - N_("ISDN"), - N_("Mobile"), - N_("Other"), - N_("Other Fax"), - N_("Pager"), - N_("Primary"), - N_("Radio"), - N_("Telex"), - N_("TTY/TDD") - }; - - for (i = 0; i < sizeof(info) / sizeof(info[0]); i++) { - editor->phone_list = g_list_append(editor->phone_list, g_strdup(info[i])); - } - } - if (editor->phone_info == NULL) { - e_contact_editor_build_ui_info(editor->phone_list, &editor->phone_info); - - if ( editor->phone_popup ) - gtk_widget_unref(editor->phone_popup); - - editor->phone_popup = gnome_popup_menu_new(editor->phone_info); - } - - for(i = 0; i < E_CARD_SIMPLE_PHONE_ID_LAST; i++) { - const ECardPhone *phone = e_card_simple_get_phone(editor->simple, i); - gboolean checked; - checked = phone && phone->number && *phone->number; - gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(editor->phone_info[i].widget), - checked); - gtk_check_menu_item_set_show_toggle(GTK_CHECK_MENU_ITEM(editor->phone_info[i].widget), - TRUE); - } - - result = _arrow_pressed (widget, button, editor, editor->phone_popup, &editor->phone_list, &editor->phone_info, label, entry, "Add new phone number type"); - - if (result != -1) { - editor->phone_choice[which - 1] = result; - set_fields(editor); - } - - g_free(label); - g_free(entry); -} - -static void -_email_arrow_pressed (GtkWidget *widget, GdkEventButton *button, EContactEditor *editor) -{ - int i; - int result; - if (editor->email_list == NULL) { - static char *info[] = { - N_("Primary Email"), - N_("Email 2"), - N_("Email 3") - }; - - for (i = 0; i < sizeof(info) / sizeof(info[0]); i++) { - editor->email_list = g_list_append(editor->email_list, g_strdup(info[i])); - } - } - if (editor->email_info == NULL) { - e_contact_editor_build_ui_info(editor->email_list, &editor->email_info); - - if ( editor->email_popup ) - gtk_widget_unref(editor->email_popup); - - editor->email_popup = gnome_popup_menu_new(editor->email_info); - } - - for(i = 0; i < E_CARD_SIMPLE_EMAIL_ID_LAST; i++) { - const char *string = e_card_simple_get_email(editor->simple, i); - gboolean checked; - checked = string && *string; - gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(editor->email_info[i].widget), - checked); - gtk_check_menu_item_set_show_toggle(GTK_CHECK_MENU_ITEM(editor->email_info[i].widget), - TRUE); - } - - result = _arrow_pressed (widget, button, editor, editor->email_popup, &editor->email_list, &editor->email_info, "label-email1", "entry-email1", "Add new Email type"); - - if (result != -1) { - editor->email_choice = result; - set_fields(editor); - } -} - -static void -_address_arrow_pressed (GtkWidget *widget, GdkEventButton *button, EContactEditor *editor) -{ - int i; - int result; - if (editor->address_list == NULL) { - static char *info[] = { - N_("Business"), - N_("Home"), - N_("Other") - }; - - for (i = 0; i < sizeof(info) / sizeof(info[0]); i++) { - editor->address_list = g_list_append(editor->address_list, g_strdup(info[i])); - } - } - if (editor->address_info == NULL) { - e_contact_editor_build_ui_info(editor->address_list, &editor->address_info); - - if ( editor->address_popup ) - gtk_widget_unref(editor->address_popup); - - editor->address_popup = gnome_popup_menu_new(editor->address_info); - } - - for(i = 0; i < E_CARD_SIMPLE_ADDRESS_ID_LAST; i++) { - const ECardAddrLabel *address = e_card_simple_get_address(editor->simple, i); - gboolean checked; - checked = address && address->data && *address->data; - gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(editor->address_info[i].widget), - checked); - gtk_check_menu_item_set_show_toggle(GTK_CHECK_MENU_ITEM(editor->address_info[i].widget), - TRUE); - } - - result = _arrow_pressed (widget, button, editor, editor->address_popup, &editor->address_list, &editor->address_info, "label-address", "text-address", "Add new Address type"); - - if (result != -1) { - set_address_field(editor, result); - } -} - -static void -set_field(GtkEntry *entry, const char *string) -{ - char *oldstring = gtk_entry_get_text(entry); - if (!string) - string = ""; - if (strcmp(string, oldstring)) - gtk_entry_set_text(entry, string); -} - -static void -set_phone_field(GtkWidget *entry, const ECardPhone *phone) -{ - set_field(GTK_ENTRY(entry), phone ? phone->number : ""); -} - -static void -set_fields(EContactEditor *editor) -{ - GtkWidget *entry; - - entry = glade_xml_get_widget(editor->gui, "entry-phone1"); - if (entry && GTK_IS_ENTRY(entry)) - set_phone_field(entry, e_card_simple_get_phone(editor->simple, editor->phone_choice[0])); - - entry = glade_xml_get_widget(editor->gui, "entry-phone2"); - if (entry && GTK_IS_ENTRY(entry)) - set_phone_field(entry, e_card_simple_get_phone(editor->simple, editor->phone_choice[1])); - - entry = glade_xml_get_widget(editor->gui, "entry-phone3"); - if (entry && GTK_IS_ENTRY(entry)) - set_phone_field(entry, e_card_simple_get_phone(editor->simple, editor->phone_choice[2])); - - entry = glade_xml_get_widget(editor->gui, "entry-phone4"); - if (entry && GTK_IS_ENTRY(entry)) - set_phone_field(entry, e_card_simple_get_phone(editor->simple, editor->phone_choice[3])); - - entry = glade_xml_get_widget(editor->gui, "entry-email1"); - if (entry && GTK_IS_ENTRY(entry)) - set_field(GTK_ENTRY(entry), e_card_simple_get_email(editor->simple, editor->email_choice)); - - set_address_field(editor, -1); -} - -static void -set_address_field(EContactEditor *editor, int result) -{ - GtkWidget *widget; - - widget = glade_xml_get_widget(editor->gui, "text-address"); - - if (widget && GTK_IS_TEXT(widget)) { - int position; - GtkEditable *editable; - const ECardAddrLabel *address; - - if (result == -1) - result = editor->address_choice; - editor->address_choice = -1; - - position = 0; - editable = GTK_EDITABLE(widget); - gtk_editable_delete_text(editable, 0, -1); - address = e_card_simple_get_address(editor->simple, result); - if (address && address->data) - gtk_editable_insert_text(editable, address->data, strlen(address->data), &position); - - editor->address_choice = result; - } -} - -static void -add_field_callback(GtkWidget *widget, EContactEditor *editor) -{ - const char *name; - int i; - static const char *builtins[] = { - "entry-fullname", - "entry-web", - "entry-company", - "entry-department", - "entry-office", - "entry-jobtitle", - "entry-profession", - "entry-manager", - "entry-assistant", - "entry-nickname", - "entry-spouse", - "text-comments", - "entry-categories", - "entry-contacts", - "entry-file-as", - "dateedit-anniversary", - "dateedit-birthday", - "entry-phone1", - "entry-phone2", - "entry-phone3", - "entry-phone4", - "entry-email1", - "text-address", - "checkbutton-mailingaddress", - "checkbutton-htmlmail", - NULL - }; - name = glade_get_widget_name(widget); - if (name) { - for (i = 0; builtins[i]; i++) { - if (!strcmp(name, builtins[i])) - return; - } - if (GTK_IS_ENTRY(widget) || GTK_IS_TEXT(widget)) { - editor->arbitrary_fields = g_list_prepend(editor->arbitrary_fields, g_strdup(name)); - } - } -} - -struct { - char *id; - char *key; -} field_mapping [] = { - { "entry-fullname", "full_name" }, - { "entry-web", "url" }, - { "entry-company", "org" }, - { "entry-department", "org_unit" }, - { "entry-office", "office" }, - { "entry-jobtitle", "title" }, - { "entry-profession", "role" }, - { "entry-manager", "manager" }, - { "entry-assistant", "assistant" }, - { "entry-nickname", "nickname" }, - { "entry-spouse", "spouse" }, - { "text-comments", "note" }, - { "entry-categories", "categories" }, -}; - -static void -fill_in_field(EContactEditor *editor, char *id, char *value) -{ - GtkWidget *widget = glade_xml_get_widget(editor->gui, id); - if (widget && GTK_IS_EDITABLE(widget)) { - int position = 0; - GtkEditable *editable = GTK_EDITABLE(widget); - gtk_editable_delete_text(editable, 0, -1); - if (value) - gtk_editable_insert_text(editable, value, strlen(value), &position); - } -} - -static void -fill_in_card_field(EContactEditor *editor, ECard *card, char *id, char *key) -{ - char *string; - gtk_object_get(GTK_OBJECT(card), - key, &string, - NULL); - fill_in_field(editor, id, string); -} - -static void -fill_in_single_field(EContactEditor *editor, char *name) -{ - ECardSimple *simple = editor->simple; - GtkWidget *widget = glade_xml_get_widget(editor->gui, name); - if (widget && GTK_IS_EDITABLE(widget)) { - int position = 0; - GtkEditable *editable = GTK_EDITABLE(widget); - const ECardArbitrary *arbitrary; - - gtk_editable_delete_text(editable, 0, -1); - arbitrary = e_card_simple_get_arbitrary(simple, - name); - if (arbitrary && arbitrary->value) - gtk_editable_insert_text(editable, arbitrary->value, strlen(arbitrary->value), &position); - } -} - -static void -fill_in_info(EContactEditor *editor) -{ - ECard *card = editor->card; - if (card) { - char *file_as; - ECardName *name; - const ECardDate *anniversary; - const ECardDate *bday; - int i; - GtkWidget *widget; - GList *list; - - gtk_object_get(GTK_OBJECT(card), - "file_as", &file_as, - "name", &name, - "anniversary", &anniversary, - "birth_date", &bday, - NULL); - - for (i = 0; i < sizeof(field_mapping) / sizeof(field_mapping[0]); i++) { - fill_in_card_field(editor, card, field_mapping[i].id, field_mapping[i].key); - } - - for (list = editor->arbitrary_fields; list; list = list->next) { - fill_in_single_field(editor, list->data); - } - - /* File as has to come after company and name or else it'll get messed up when setting them. */ - fill_in_field(editor, "entry-file-as", file_as); - - e_card_name_free(editor->name); - editor->name = e_card_name_copy(name); - - widget = glade_xml_get_widget(editor->gui, "dateedit-anniversary"); - if (anniversary && widget && GNOME_IS_DATE_EDIT(widget)) { - struct tm time_struct = {0,0,0,0,0,0,0,0,0}; - time_t time_val; - GnomeDateEdit *dateedit; - - time_struct.tm_mday = anniversary->day; - time_struct.tm_mon = anniversary->month - 1; - time_struct.tm_year = anniversary->year - 1900; - time_val = mktime(&time_struct); - dateedit = GNOME_DATE_EDIT(widget); - gnome_date_edit_set_time(dateedit, time_val); - } - - widget = glade_xml_get_widget(editor->gui, "dateedit-birthday"); - if (bday && widget && GNOME_IS_DATE_EDIT(widget)) { - struct tm time_struct = {0,0,0,0,0,0,0,0,0}; - time_t time_val; - GnomeDateEdit *dateedit; - time_struct.tm_mday = bday->day; - time_struct.tm_mon = bday->month - 1; - time_struct.tm_year = bday->year - 1900; - time_val = mktime(&time_struct); - dateedit = GNOME_DATE_EDIT(widget); - gnome_date_edit_set_time(dateedit, time_val); - } - - set_fields(editor); - } -} - -static void -extract_field(EContactEditor *editor, ECard *card, char *editable_id, char *key) -{ - GtkWidget *widget = glade_xml_get_widget(editor->gui, editable_id); - if (widget && GTK_IS_EDITABLE(widget)) { - GtkEditable *editable = GTK_EDITABLE(widget); - char *string = gtk_editable_get_chars(editable, 0, -1); - if (string && *string) - gtk_object_set(GTK_OBJECT(card), - key, string, - NULL); - else - gtk_object_set(GTK_OBJECT(card), - key, NULL, - NULL); - g_free(string); - } -} - -static void -extract_single_field(EContactEditor *editor, char *name) -{ - GtkWidget *widget = glade_xml_get_widget(editor->gui, name); - ECardSimple *simple = editor->simple; - if (widget && GTK_IS_EDITABLE(widget)) { - GtkEditable *editable = GTK_EDITABLE(widget); - char *string = gtk_editable_get_chars(editable, 0, -1); - - if (string && *string) - e_card_simple_set_arbitrary(simple, - name, - NULL, - string); - else - e_card_simple_set_arbitrary(simple, - name, - NULL, - NULL); - g_free(string); - } -} - -static void -extract_info(EContactEditor *editor) -{ - ECard *card = editor->card; - if (card) { - ECardDate *anniversary; - ECardDate *bday; - struct tm time_struct; - time_t time_val; - int i; - GtkWidget *widget; - GList *list; - - widget = glade_xml_get_widget(editor->gui, "entry-file-as"); - if (widget && GTK_IS_EDITABLE(widget)) { - GtkEditable *editable = GTK_EDITABLE(widget); - char *string = gtk_editable_get_chars(editable, 0, -1); - if (string && *string) - gtk_object_set(GTK_OBJECT(card), - "file_as", string, - NULL); - g_free(string); - } - - for (i = 0; i < sizeof(field_mapping) / sizeof(field_mapping[0]); i++) { - extract_field(editor, card, field_mapping[i].id, field_mapping[i].key); - } - - for (list = editor->arbitrary_fields; list; list = list->next) { - extract_single_field(editor, list->data); - } - - if (editor->name) - gtk_object_set(GTK_OBJECT(card), - "name", editor->name, - NULL); - - widget = glade_xml_get_widget(editor->gui, "dateedit-anniversary"); - if (widget && GNOME_IS_DATE_EDIT(widget)) { - time_val = gnome_date_edit_get_date(GNOME_DATE_EDIT(widget)); - gmtime_r(&time_val, - &time_struct); - anniversary = g_new(ECardDate, 1); - anniversary->day = time_struct.tm_mday; - anniversary->month = time_struct.tm_mon + 1; - anniversary->year = time_struct.tm_year + 1900; - gtk_object_set(GTK_OBJECT(card), - "anniversary", anniversary, - NULL); - } - - widget = glade_xml_get_widget(editor->gui, "dateedit-birthday"); - if (widget && GNOME_IS_DATE_EDIT(widget)) { - time_val = gnome_date_edit_get_date(GNOME_DATE_EDIT(widget)); - gmtime_r(&time_val, - &time_struct); - bday = g_new(ECardDate, 1); - bday->day = time_struct.tm_mday; - bday->month = time_struct.tm_mon + 1; - bday->year = time_struct.tm_year + 1900; - gtk_object_set(GTK_OBJECT(card), - "birth_date", bday, - NULL); - } - } -} diff --git a/addressbook/gui/contact-editor/e-contact-editor.h b/addressbook/gui/contact-editor/e-contact-editor.h deleted file mode 100644 index 288cec1db0..0000000000 --- a/addressbook/gui/contact-editor/e-contact-editor.h +++ /dev/null @@ -1,96 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* e-contact-editor.h - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -#ifndef __E_CONTACT_EDITOR_H__ -#define __E_CONTACT_EDITOR_H__ - -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus */ - -/* EContactEditor - A dialog displaying information about a contact. - * - * The following arguments are available: - * - * name type read/write description - * -------------------------------------------------------------------------------- - * card ECard * RW The card currently being edited - */ - -#define E_CONTACT_EDITOR_TYPE (e_contact_editor_get_type ()) -#define E_CONTACT_EDITOR(obj) (GTK_CHECK_CAST ((obj), E_CONTACT_EDITOR_TYPE, EContactEditor)) -#define E_CONTACT_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_CONTACT_EDITOR_TYPE, EContactEditorClass)) -#define E_IS_CONTACT_EDITOR(obj) (GTK_CHECK_TYPE ((obj), E_CONTACT_EDITOR_TYPE)) -#define E_IS_CONTACT_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_CONTACT_EDITOR_TYPE)) - - -typedef struct _EContactEditor EContactEditor; -typedef struct _EContactEditorClass EContactEditorClass; - -struct _EContactEditor -{ - GtkVBox parent; - - /* item specific fields */ - ECard *card; - ECardSimple *simple; - - GladeXML *gui; - GnomeUIInfo *email_info; - GnomeUIInfo *phone_info; - GnomeUIInfo *address_info; - GtkWidget *email_popup; - GtkWidget *phone_popup; - GtkWidget *address_popup; - GList *email_list; - GList *phone_list; - GList *address_list; - - ECardName *name; - char *company; - - ECardSimpleEmailId email_choice; - ECardSimplePhoneId phone_choice[4]; - ECardSimpleAddressId address_choice; - - GList *arbitrary_fields; -}; - -struct _EContactEditorClass -{ - GtkVBoxClass parent_class; -}; - - -GtkWidget *e_contact_editor_new(ECard *card); -GtkType e_contact_editor_get_type (void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -#endif /* __E_CONTACT_EDITOR_H__ */ diff --git a/addressbook/gui/contact-editor/e-contact-save-as.c b/addressbook/gui/contact-editor/e-contact-save-as.c deleted file mode 100644 index 51cb2619e7..0000000000 --- a/addressbook/gui/contact-editor/e-contact-save-as.c +++ /dev/null @@ -1,77 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* e-contact-editor.h - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include -#include -#include -#include - -typedef struct { - GtkFileSelection *filesel; - ECard *card; -} SaveAsInfo; - -static void -save_it(GtkWidget *widget, SaveAsInfo *info) -{ - char *vcard = e_card_get_vcard(info->card); - const char *filename = gtk_file_selection_get_filename(info->filesel); - e_write_file(filename, vcard, O_WRONLY | O_CREAT | O_EXCL | O_TRUNC); - g_free(vcard); - gtk_object_unref(GTK_OBJECT(info->card)); - gtk_widget_destroy(GTK_WIDGET(info->filesel)); - g_free(info); -} - -static void -close_it(GtkWidget *widget, SaveAsInfo *info) -{ - gtk_object_unref(GTK_OBJECT(info->card)); - gtk_widget_destroy(GTK_WIDGET(info->filesel)); - g_free(info); -} - -static void -delete_it(GtkWidget *widget, SaveAsInfo *info) -{ - gtk_object_unref(GTK_OBJECT(info->card)); - g_free(info); -} - -void -e_contact_save_as(char *title, ECard *card) -{ - GtkFileSelection *filesel; - SaveAsInfo *info = g_new(SaveAsInfo, 1); - - filesel = GTK_FILE_SELECTION(gtk_file_selection_new(title)); - - info->filesel = filesel; - info->card = e_card_duplicate(card); - - gtk_signal_connect(GTK_OBJECT(filesel->ok_button), "clicked", - save_it, info); - gtk_signal_connect(GTK_OBJECT(filesel->cancel_button), "clicked", - close_it, info); - gtk_signal_connect(GTK_OBJECT(filesel), "delete_event", - delete_it, info); - gtk_widget_show(GTK_WIDGET(filesel)); -} diff --git a/addressbook/gui/contact-editor/e-contact-save-as.h b/addressbook/gui/contact-editor/e-contact-save-as.h deleted file mode 100644 index e6af13e8fd..0000000000 --- a/addressbook/gui/contact-editor/e-contact-save-as.h +++ /dev/null @@ -1,42 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* e-contact-save-as.h - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -#ifndef __E_CONTACT_SAVE_AS_H__ -#define __E_CONTACT_SAVE_AS_H__ - -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus */ - -void -e_contact_save_as(gchar *title, ECard *card); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -#endif /* __E_CONTACT_EDITOR_H__ */ diff --git a/addressbook/gui/contact-editor/email.png b/addressbook/gui/contact-editor/email.png deleted file mode 100644 index f3ff02e343..0000000000 Binary files a/addressbook/gui/contact-editor/email.png and /dev/null differ diff --git a/addressbook/gui/contact-editor/fullname-strings.h b/addressbook/gui/contact-editor/fullname-strings.h deleted file mode 100644 index 0c84dfdc8f..0000000000 --- a/addressbook/gui/contact-editor/fullname-strings.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Translatable strings file generated by Glade. - * Add this file to your project's POTFILES.in. - * DO NOT compile it as part of your application. - */ - -gchar *s = N_("Check Full Name"); -gchar *s = N_("_Title:"); -gchar *s = N_("_First:"); -gchar *s = N_("_Middle:"); -gchar *s = N_("_Last:"); -gchar *s = N_("_Suffix:"); -gchar *s = N_("\n" - "Mr.\n" - "Mrs.\n" - "Dr.\n" - ""); -gchar *s = N_("\n" - "Sr.\n" - "Jr.\n" - "I\n" - "II\n" - "III\n" - "Esq.\n" - ""); diff --git a/addressbook/gui/contact-editor/fullname.glade b/addressbook/gui/contact-editor/fullname.glade deleted file mode 100644 index 8f811c5616..0000000000 --- a/addressbook/gui/contact-editor/fullname.glade +++ /dev/null @@ -1,391 +0,0 @@ - - - - - fullname - fullname - - src - pixmaps - C - True - True - True - False - False - False - True - interface.c - interface.h - callbacks.c - callbacks.h - support.c - support.h - True - fullname-strings.h - - - - GnomeDialog - dialog-checkfullname - False - Check Full Name - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - True - True - True - False - False - False - - - GtkVBox - GnomeDialog:vbox - vbox-container - False - 8 - - 4 - True - True - - - - GtkTable - table-checkfullname - 8 - 5 - 3 - False - 6 - 21 - - 0 - True - True - - - - GtkAccelLabel - accellabel1 - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 0 - 1 - 0 - 1 - 0 - 0 - False - False - False - False - True - True - - - - - GtkAccelLabel - accellabel2 - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 0 - 1 - 1 - 2 - 0 - 0 - False - False - False - False - True - True - - - - - GtkAccelLabel - accellabel3 - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 0 - 1 - 2 - 3 - 0 - 0 - False - False - False - False - True - True - - - - - GtkAccelLabel - accellabel4 - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 0 - 1 - 3 - 4 - 0 - 0 - False - False - False - False - True - True - - - - - GtkAccelLabel - accellabel5 - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 0 - 1 - 4 - 5 - 0 - 0 - False - False - False - False - True - True - - - - - GtkCombo - combo-title - False - True - False - True - False - -Mr. -Mrs. -Dr. - - - 1 - 2 - 0 - 1 - 0 - 0 - True - False - False - False - True - False - - - - GtkEntry - GtkCombo:entry - entry-title - True - True - True - 0 - - - - - - GtkCombo - combo-suffix - False - True - False - True - False - -Sr. -Jr. -I -II -III -Esq. - - - 1 - 2 - 4 - 5 - 0 - 0 - True - False - False - False - True - False - - - - GtkEntry - GtkCombo:entry - entry-suffix - True - True - True - 0 - - - - - - GtkEntry - entry-first - True - True - True - 0 - - - 1 - 3 - 1 - 2 - 0 - 0 - True - False - False - False - True - False - - - - - GtkEntry - entry-middle - True - True - True - 0 - - - 1 - 3 - 2 - 3 - 0 - 0 - True - False - False - False - True - False - - - - - GtkEntry - entry-last - True - True - True - 0 - - - 1 - 3 - 3 - 4 - 0 - 0 - True - False - False - False - True - False - - - - - - GtkHButtonBox - GnomeDialog:action_area - hbuttonbox1 - GTK_BUTTONBOX_END - 8 - 85 - 27 - 7 - 0 - - 0 - False - True - GTK_PACK_END - - - - GtkButton - button1 - True - True - GNOME_STOCK_BUTTON_OK - - - - GtkButton - button2 - True - True - GNOME_STOCK_BUTTON_CANCEL - - - - - - diff --git a/addressbook/gui/contact-editor/head.png b/addressbook/gui/contact-editor/head.png deleted file mode 100644 index ca00b75f92..0000000000 Binary files a/addressbook/gui/contact-editor/head.png and /dev/null differ diff --git a/addressbook/gui/contact-editor/netfreebusy.png b/addressbook/gui/contact-editor/netfreebusy.png deleted file mode 100644 index 09ec8a2a5c..0000000000 Binary files a/addressbook/gui/contact-editor/netfreebusy.png and /dev/null differ diff --git a/addressbook/gui/contact-editor/netmeeting.png b/addressbook/gui/contact-editor/netmeeting.png deleted file mode 100644 index 4cb90c121e..0000000000 Binary files a/addressbook/gui/contact-editor/netmeeting.png and /dev/null differ diff --git a/addressbook/gui/contact-editor/phone.png b/addressbook/gui/contact-editor/phone.png deleted file mode 100644 index ebec84ba0b..0000000000 Binary files a/addressbook/gui/contact-editor/phone.png and /dev/null differ diff --git a/addressbook/gui/contact-editor/snailmail.png b/addressbook/gui/contact-editor/snailmail.png deleted file mode 100644 index 647ae8f68c..0000000000 Binary files a/addressbook/gui/contact-editor/snailmail.png and /dev/null differ diff --git a/addressbook/gui/contact-editor/test-editor.c b/addressbook/gui/contact-editor/test-editor.c deleted file mode 100644 index 5b48c1a92f..0000000000 --- a/addressbook/gui/contact-editor/test-editor.c +++ /dev/null @@ -1,158 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * test-editor.c - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include "config.h" - -#include -#include -#include "e-contact-editor.h" - -#define TEST_VCARD \ -"BEGIN:VCARD -" \ -"FN:Nat -" \ -"N:Friedman;Nat;D;Mr. -" \ -"BDAY:1977-08-06 -" \ -"TEL;WORK:617 679 1984 -" \ -"TEL;CELL:123 456 7890 -" \ -"EMAIL;INTERNET:nat@nat.org -" \ -"EMAIL;INTERNET:nat@helixcode.com -" \ -"ADR;WORK;POSTAL:P.O. Box 101;;;Any Town;CA;91921-1234; -" \ -"ADR;HOME;POSTAL;INTL:P.O. Box 202;;;Any Town 2;MI;12344-4321;USA -" \ -"END:VCARD -" \ -" -" - -static char * -read_file (char *name) -{ - int len; - char buff[65536]; - char line[1024]; - FILE *f; - - f = fopen (name, "r"); - if (f == NULL) - g_error ("Unable to open %s!\n", name); - - len = 0; - while (fgets (line, sizeof (line), f) != NULL) { - strcpy (buff + len, line); - len += strlen (line); - } - - fclose (f); - - return g_strdup (buff); -} - -/* This is a horrible thing to do, but it is just a test. */ -GtkWidget *editor; - -static void destroy_callback(GtkWidget *app, gpointer data) -{ - static int count = 2; - count --; - if ( count <= 0 ) - exit(0); -} - -#if 0 -static void about_callback( GtkWidget *widget, gpointer data ) -{ - - const gchar *authors[] = - { - "Christopher James Lahey ", - NULL - }; - - GtkWidget *about = - gnome_about_new ( _( "Contact Editor Test" ), VERSION, - _( "Copyright (C) 2000, Helix Code, Inc." ), - authors, - _( "This should test the contact editor canvas item" ), - NULL); - gtk_widget_show (about); -} -#endif - -int main( int argc, char *argv[] ) -{ - char *cardstr; - GtkWidget *app; - - /* bindtextdomain (PACKAGE, GNOMELOCALEDIR); - textdomain (PACKAGE);*/ - - gnome_init( "Contact Editor Test", VERSION, argc, argv); - - glade_gnome_init (); - - app = gnome_app_new("Contact Editor Test", NULL); - - cardstr = NULL; - if (argc == 2) - cardstr = read_file (argv [1]); - - if (cardstr == NULL) - cardstr = TEST_VCARD; - - editor = e_contact_editor_new(e_card_new(cardstr)); - - gnome_app_set_contents( GNOME_APP( app ), editor ); - - /* Connect the signals */ - gtk_signal_connect( GTK_OBJECT( app ), "destroy", - GTK_SIGNAL_FUNC( destroy_callback ), - ( gpointer ) app ); - - gtk_widget_show_all( app ); - - app = gnome_app_new("Contact Editor Test", NULL); - - editor = e_contact_editor_new(e_card_new(cardstr)); - - gnome_app_set_contents( GNOME_APP( app ), editor ); - - /* Connect the signals */ - gtk_signal_connect( GTK_OBJECT( app ), "destroy", - GTK_SIGNAL_FUNC( destroy_callback ), - ( gpointer ) app ); - - gtk_widget_show_all( app ); - - gtk_main(); - - /* Not reached. */ - return 0; -} diff --git a/addressbook/gui/contact-editor/web.png b/addressbook/gui/contact-editor/web.png deleted file mode 100644 index 3211a11b19..0000000000 Binary files a/addressbook/gui/contact-editor/web.png and /dev/null differ diff --git a/addressbook/gui/minicard/.cvsignore b/addressbook/gui/minicard/.cvsignore deleted file mode 100644 index 800a11cc3e..0000000000 --- a/addressbook/gui/minicard/.cvsignore +++ /dev/null @@ -1,11 +0,0 @@ -.deps -.libs -.pure -Makefile -Makefile.in -*.lo -*.la -minicard-label-test -minicard-test -minicard-view-test -reflow-test diff --git a/addressbook/gui/minicard/Makefile.am b/addressbook/gui/minicard/Makefile.am deleted file mode 100644 index cc96918a77..0000000000 --- a/addressbook/gui/minicard/Makefile.am +++ /dev/null @@ -1,91 +0,0 @@ -INCLUDES = \ - -DG_LOG_DOMAIN=\"e-minicard\" \ - -I$(top_srcdir) \ - -I$(top_srcdir)/addressbook/backend \ - -I$(top_builddir)/addressbook/backend \ - -I$(top_srcdir)/addressbook/contact-editor \ - -I$(top_srcdir)/widgets/e-text \ - $(BONOBO_GNOME_CFLAGS) - -noinst_LIBRARIES = \ - libeminicard.a - -libeminicard_a_SOURCES = \ - e-minicard.c \ - e-minicard.h \ - e-minicard-label.c \ - e-minicard-label.h \ - e-minicard-view.c \ - e-minicard-view.h \ - e-reflow-sorted.c \ - e-reflow-sorted.h \ - e-reflow.c \ - e-reflow.h - -noinst_PROGRAMS = \ - minicard-label-test \ - minicard-test \ - reflow-test \ - minicard-view-test - -minicard_label_test_SOURCES = \ - test-minicard-label.c - -minicard_label_test_LDADD = \ - $(EXTRA_GNOME_LIBS) \ - $(GNOMEGNORBA_LIBS) \ - libeminicard.a \ - -lbonobo \ - $(top_builddir)/e-util/libeutil.la \ - $(top_builddir)/widgets/e-text/libetext.a - -minicard_test_SOURCES = \ - test-minicard.c - -minicard_test_LDADD = \ - $(EXTRA_GNOME_LIBS) \ - $(GNOMEGNORBA_LIBS) \ - libeminicard.a \ - -lbonobo \ - $(top_builddir)/addressbook/backend/ebook/libebook.la \ - $(top_builddir)/e-util/libeutil.la \ - $(top_builddir)/libversit/libversit.la \ - $(top_builddir)/addressbook/ename/libename.la \ - $(top_builddir)/addressbook/contact-editor/libecontacteditor.a \ - $(top_builddir)/widgets/e-table/libetable.a \ - $(top_builddir)/e-util/libeutil.la \ - $(top_builddir)/widgets/e-text/libetext.a - -reflow_test_SOURCES = \ - test-reflow.c - -reflow_test_LDADD = \ - $(EXTRA_GNOME_LIBS) \ - $(GNOMEGNORBA_LIBS) \ - libeminicard.a \ - -lbonobo \ - $(top_builddir)/addressbook/backend/ebook/libebook.la \ - $(top_builddir)/e-util/libeutil.la \ - $(top_builddir)/libversit/libversit.la \ - $(top_builddir)/addressbook/ename/libename.la \ - $(top_builddir)/addressbook/contact-editor/libecontacteditor.a \ - $(top_builddir)/widgets/e-table/libetable.a \ - $(top_builddir)/e-util/libeutil.la \ - $(top_builddir)/widgets/e-text/libetext.a - -minicard_view_test_SOURCES = \ - test-minicard-view.c - -minicard_view_test_LDADD = \ - $(EXTRA_GNOME_LIBS) \ - $(GNOMEGNORBA_LIBS) \ - libeminicard.a \ - -lbonobo \ - $(top_builddir)/addressbook/backend/ebook/libebook.la \ - $(top_builddir)/e-util/libeutil.la \ - $(top_builddir)/libversit/libversit.la \ - $(top_builddir)/addressbook/ename/libename.la \ - $(top_builddir)/addressbook/contact-editor/libecontacteditor.a \ - $(top_builddir)/widgets/e-table/libetable.a \ - $(top_builddir)/e-util/libeutil.la \ - $(top_builddir)/widgets/e-text/libetext.a diff --git a/addressbook/gui/minicard/e-minicard-label.c b/addressbook/gui/minicard/e-minicard-label.c deleted file mode 100644 index e0e5c98118..0000000000 --- a/addressbook/gui/minicard/e-minicard-label.c +++ /dev/null @@ -1,421 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * e-minicard-label.c - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include -#include -#include "e-minicard-label.h" -#include "e-text.h" -#include -#include -#include - -static void e_minicard_label_init (EMinicardLabel *card); -static void e_minicard_label_class_init (EMinicardLabelClass *klass); -static void e_minicard_label_set_arg (GtkObject *o, GtkArg *arg, guint arg_id); -static void e_minicard_label_get_arg (GtkObject *object, GtkArg *arg, guint arg_id); -static gboolean e_minicard_label_event (GnomeCanvasItem *item, GdkEvent *event); -static void e_minicard_label_realize (GnomeCanvasItem *item); -static void e_minicard_label_unrealize (GnomeCanvasItem *item); -static void e_minicard_label_reflow(GnomeCanvasItem *item, int flags); - -static void e_minicard_label_resize_children( EMinicardLabel *e_minicard_label ); - -static GnomeCanvasGroupClass *parent_class = NULL; - -/* The arguments we take */ -enum { - ARG_0, - ARG_WIDTH, - ARG_HEIGHT, - ARG_HAS_FOCUS, - ARG_FIELD, - ARG_FIELDNAME, - ARG_TEXT_MODEL -}; - -GtkType -e_minicard_label_get_type (void) -{ - static GtkType minicard_label_type = 0; - - if (!minicard_label_type) - { - static const GtkTypeInfo minicard_label_info = - { - "EMinicardLabel", - sizeof (EMinicardLabel), - sizeof (EMinicardLabelClass), - (GtkClassInitFunc) e_minicard_label_class_init, - (GtkObjectInitFunc) e_minicard_label_init, - /* reserved_1 */ NULL, - /* reserved_2 */ NULL, - (GtkClassInitFunc) NULL, - }; - - minicard_label_type = gtk_type_unique (gnome_canvas_group_get_type (), &minicard_label_info); - } - - return minicard_label_type; -} - -static void -e_minicard_label_class_init (EMinicardLabelClass *klass) -{ - GtkObjectClass *object_class; - GnomeCanvasItemClass *item_class; - - object_class = (GtkObjectClass*) klass; - item_class = (GnomeCanvasItemClass *) klass; - - parent_class = gtk_type_class (gnome_canvas_group_get_type ()); - - gtk_object_add_arg_type ("EMinicardLabel::width", GTK_TYPE_DOUBLE, - GTK_ARG_READWRITE, ARG_WIDTH); - gtk_object_add_arg_type ("EMinicardLabel::height", GTK_TYPE_DOUBLE, - GTK_ARG_READABLE, ARG_HEIGHT); - gtk_object_add_arg_type ("EMinicardLabel::has_focus", GTK_TYPE_BOOL, - GTK_ARG_READWRITE, ARG_HAS_FOCUS); - gtk_object_add_arg_type ("EMinicardLabel::field", GTK_TYPE_STRING, - GTK_ARG_READWRITE, ARG_FIELD); - gtk_object_add_arg_type ("EMinicardLabel::fieldname", GTK_TYPE_STRING, - GTK_ARG_READWRITE, ARG_FIELDNAME); - gtk_object_add_arg_type ("EMinicardLabel::text_model", GTK_TYPE_OBJECT, - GTK_ARG_READWRITE, ARG_TEXT_MODEL); - - object_class->set_arg = e_minicard_label_set_arg; - object_class->get_arg = e_minicard_label_get_arg; - /* object_class->destroy = e_minicard_label_destroy; */ - - /* GnomeCanvasItem method overrides */ - item_class->realize = e_minicard_label_realize; - item_class->unrealize = e_minicard_label_unrealize; - item_class->event = e_minicard_label_event; -} - -static void -e_minicard_label_init (EMinicardLabel *minicard_label) -{ - minicard_label->width = 10; - minicard_label->height = 10; - minicard_label->rect = NULL; - minicard_label->fieldname = NULL; - minicard_label->field = NULL; - - e_canvas_item_set_reflow_callback(GNOME_CANVAS_ITEM(minicard_label), e_minicard_label_reflow); -} - -static void -e_minicard_label_set_arg (GtkObject *o, GtkArg *arg, guint arg_id) -{ - GnomeCanvasItem *item; - EMinicardLabel *e_minicard_label; - - item = GNOME_CANVAS_ITEM (o); - e_minicard_label = E_MINICARD_LABEL (o); - - switch (arg_id){ - case ARG_WIDTH: - e_minicard_label->width = GTK_VALUE_DOUBLE (*arg); - e_minicard_label_resize_children(e_minicard_label); - e_canvas_item_request_reflow (item); - break; - case ARG_HAS_FOCUS: - if (e_minicard_label->field && (GTK_VALUE_ENUM(*arg) != E_FOCUS_NONE)) - e_canvas_item_grab_focus(e_minicard_label->field); - break; - case ARG_FIELD: - gnome_canvas_item_set( e_minicard_label->field, "text", GTK_VALUE_STRING (*arg), NULL ); - break; - case ARG_FIELDNAME: - gnome_canvas_item_set( e_minicard_label->fieldname, "text", GTK_VALUE_STRING (*arg), NULL ); - break; - case ARG_TEXT_MODEL: - gnome_canvas_item_set( e_minicard_label->field, "model", GTK_VALUE_OBJECT (*arg), NULL); - break; - } -} - -static void -e_minicard_label_get_arg (GtkObject *object, GtkArg *arg, guint arg_id) -{ - EMinicardLabel *e_minicard_label; - char *temp; - ETextModel *tempmodel; - - e_minicard_label = E_MINICARD_LABEL (object); - - switch (arg_id) { - case ARG_WIDTH: - GTK_VALUE_DOUBLE (*arg) = e_minicard_label->width; - break; - case ARG_HEIGHT: - GTK_VALUE_DOUBLE (*arg) = e_minicard_label->height; - break; - case ARG_HAS_FOCUS: - GTK_VALUE_ENUM (*arg) = e_minicard_label->has_focus ? E_FOCUS_CURRENT : E_FOCUS_NONE; - break; - case ARG_FIELD: - gtk_object_get( GTK_OBJECT( e_minicard_label->field ), "text", &temp, NULL ); - GTK_VALUE_STRING (*arg) = temp; - break; - case ARG_FIELDNAME: - gtk_object_get( GTK_OBJECT( e_minicard_label->fieldname ), "text", &temp, NULL ); - GTK_VALUE_STRING (*arg) = temp; - break; - case ARG_TEXT_MODEL: - gtk_object_get( GTK_OBJECT( e_minicard_label->field ), "model", &tempmodel, NULL ); - GTK_VALUE_OBJECT (*arg) = GTK_OBJECT(tempmodel); - break; - default: - arg->type = GTK_TYPE_INVALID; - break; - } -} - -static void -e_minicard_label_realize (GnomeCanvasItem *item) -{ - if (GNOME_CANVAS_ITEM_CLASS( parent_class )->realize) - (* GNOME_CANVAS_ITEM_CLASS( parent_class )->realize) (item); - - e_canvas_item_request_reflow(item); - - if (!item->canvas->aa) - { - } -} - -void -e_minicard_label_construct (GnomeCanvasItem *item) -{ - EMinicardLabel *e_minicard_label; - GnomeCanvasGroup *group; - static GdkFont *font = NULL; - - if ( font == NULL ) { - font = gdk_font_load("lucidasans-10"); - } - - e_minicard_label = E_MINICARD_LABEL (item); - group = GNOME_CANVAS_GROUP( item ); - - e_minicard_label->rect = - gnome_canvas_item_new( group, - gnome_canvas_rect_get_type(), - "x1", (double) 0, - "y1", (double) 0, - "x2", (double) e_minicard_label->width - 1, - "y2", (double) e_minicard_label->height - 1, - "outline_color", NULL, - NULL ); - e_minicard_label->fieldname = - gnome_canvas_item_new( group, - e_text_get_type(), - "anchor", GTK_ANCHOR_NW, - "clip_width", (double) ( e_minicard_label->width / 2 - 4 ), - "clip", TRUE, - "use_ellipsis", TRUE, - "font_gdk", font, - "fill_color", "black", - NULL ); - e_canvas_item_move_absolute(e_minicard_label->fieldname, 2, 1); - - e_minicard_label->field = - gnome_canvas_item_new( group, - e_text_get_type(), - "anchor", GTK_ANCHOR_NW, - "clip_width", (double) ( ( e_minicard_label->width + 1 ) / 2 - 4 ), - "clip", TRUE, - "use_ellipsis", TRUE, - "font_gdk", font, - "fill_color", "black", - "editable", TRUE, - NULL ); - e_canvas_item_move_absolute(e_minicard_label->field, ( e_minicard_label->width / 2 + 2), 1); - - e_canvas_item_request_reflow(item); -} - -static void -e_minicard_label_unrealize (GnomeCanvasItem *item) -{ - EMinicardLabel *e_minicard_label; - - e_minicard_label = E_MINICARD_LABEL (item); - - if (!item->canvas->aa) - { - } - - if (GNOME_CANVAS_ITEM_CLASS( parent_class )->unrealize) - (* GNOME_CANVAS_ITEM_CLASS( parent_class )->unrealize) (item); -} - -static gboolean -e_minicard_label_event (GnomeCanvasItem *item, GdkEvent *event) -{ - EMinicardLabel *e_minicard_label; - - e_minicard_label = E_MINICARD_LABEL (item); - - switch( event->type ) - { - case GDK_FOCUS_CHANGE: - { - GdkEventFocus *focus_event = (GdkEventFocus *) event; - if ( focus_event->in ) - { - gnome_canvas_item_set( e_minicard_label->rect, - "outline_color", "grey50", - "fill_color", "grey90", - NULL ); - e_minicard_label->has_focus = TRUE; - } - else - { - gnome_canvas_item_set( e_minicard_label->rect, - "outline_color", NULL, - "fill_color", NULL, - NULL ); - e_minicard_label->has_focus = FALSE; - } - } - break; - case GDK_BUTTON_PRESS: - case GDK_BUTTON_RELEASE: - case GDK_MOTION_NOTIFY: - case GDK_ENTER_NOTIFY: - case GDK_LEAVE_NOTIFY: { - gboolean return_val; -#if 0 - GnomeCanvasItem *field; - ArtPoint p; - double inv[6], affine[6]; - - field = e_minicard_label->field; - art_affine_identity (affine); - - if (field->xform != NULL) { - if (field->object.flags & GNOME_CANVAS_ITEM_AFFINE_FULL) { - art_affine_multiply (affine, affine, field->xform); - } else { - affine[4] += field->xform[0]; - affine[5] += field->xform[1]; - } - } - - art_affine_invert (inv, affine); - switch(event->type) { - case GDK_MOTION_NOTIFY: - p.x = event->motion.x; - p.y = event->motion.y; - art_affine_point (&p, &p, inv); - event->motion.x = p.x; - event->motion.y = p.y; - break; - case GDK_BUTTON_PRESS: - case GDK_BUTTON_RELEASE: - p.x = event->button.x; - p.y = event->button.y; - art_affine_point (&p, &p, inv); - event->button.x = p.x; - event->button.y = p.y; - break; - case GDK_ENTER_NOTIFY: - case GDK_LEAVE_NOTIFY: - p.x = event->crossing.x; - p.y = event->crossing.y; - art_affine_point (&p, &p, inv); - event->crossing.x = p.x; - event->crossing.y = p.y; - break; - default: - break; - } -#endif - gtk_signal_emit_by_name(GTK_OBJECT(e_minicard_label->field), "event", event, &return_val); - return return_val; - break; - } - default: - break; - } - - if (GNOME_CANVAS_ITEM_CLASS( parent_class )->event) - return (* GNOME_CANVAS_ITEM_CLASS( parent_class )->event) (item, event); - else - return 0; -} - -static void -e_minicard_label_resize_children(EMinicardLabel *e_minicard_label) -{ - gnome_canvas_item_set( e_minicard_label->fieldname, - "clip_width", (double) ( e_minicard_label->width / 2 - 4 ), - NULL ); - gnome_canvas_item_set( e_minicard_label->field, - "clip_width", (double) ( ( e_minicard_label->width + 1 ) / 2 - 4 ), - NULL ); -} - -static void -e_minicard_label_reflow(GnomeCanvasItem *item, int flags) -{ - EMinicardLabel *e_minicard_label = E_MINICARD_LABEL(item); - - gint old_height; - gdouble text_height; - old_height = e_minicard_label->height; - - gtk_object_get(GTK_OBJECT(e_minicard_label->fieldname), - "text_height", &text_height, - NULL); - - e_minicard_label->height = text_height; - - - gtk_object_get(GTK_OBJECT(e_minicard_label->field), - "text_height", &text_height, - NULL); - - if (e_minicard_label->height < text_height) - e_minicard_label->height = text_height; - e_minicard_label->height += 3; - - gnome_canvas_item_set( e_minicard_label->rect, - "x2", (double) e_minicard_label->width - 1, - "y2", (double) e_minicard_label->height - 1, - NULL ); - e_canvas_item_move_absolute(e_minicard_label->field, ( e_minicard_label->width / 2 + 2), 1); - - if (old_height != e_minicard_label->height) - e_canvas_item_request_parent_reflow(item); -} - -GnomeCanvasItem * -e_minicard_label_new(GnomeCanvasGroup *parent) -{ - GnomeCanvasItem *item = gnome_canvas_item_new(parent, e_minicard_label_get_type(), NULL); - e_minicard_label_construct(item); - return item; -} - diff --git a/addressbook/gui/minicard/e-minicard-label.h b/addressbook/gui/minicard/e-minicard-label.h deleted file mode 100644 index 1790414a54..0000000000 --- a/addressbook/gui/minicard/e-minicard-label.h +++ /dev/null @@ -1,82 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* e-minicard-label.h - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -#ifndef __E_MINICARD_LABEL_H__ -#define __E_MINICARD_LABEL_H__ - -#include - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus */ - -/* EMinicardLabel - A label doing focus with non-marching ants. - * - * The following arguments are available: - * - * name type read/write description - * -------------------------------------------------------------------------------- - * width double RW width of the label - * height double R height of the label - * field string RW text in the field label - * fieldname string RW text in the fieldname label - */ - -#define E_MINICARD_LABEL_TYPE (e_minicard_label_get_type ()) -#define E_MINICARD_LABEL(obj) (GTK_CHECK_CAST ((obj), E_MINICARD_LABEL_TYPE, EMinicardLabel)) -#define E_MINICARD_LABEL_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_MINICARD_LABEL_TYPE, EMiniCardLabelClass)) -#define E_IS_MINICARD_LABEL(obj) (GTK_CHECK_TYPE ((obj), E_MINICARD_LABEL_TYPE)) -#define E_IS_MINICARD_LABEL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_MINICARD_LABEL_TYPE)) - - -typedef struct _EMinicardLabel EMinicardLabel; -typedef struct _EMinicardLabelClass EMinicardLabelClass; - -struct _EMinicardLabel -{ - GnomeCanvasGroup parent; - - /* item specific fields */ - double width; - double height; - GnomeCanvasItem *fieldname; - GnomeCanvasItem *field; - GnomeCanvasItem *rect; - - gboolean has_focus; -}; - -struct _EMinicardLabelClass -{ - GnomeCanvasGroupClass parent_class; -}; - - -GtkType e_minicard_label_get_type (void); -GnomeCanvasItem *e_minicard_label_new(GnomeCanvasGroup *parent); -void e_minicard_label_construct (GnomeCanvasItem *item); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -#endif /* __E_MINICARD_LABEL_H__ */ diff --git a/addressbook/gui/minicard/e-minicard-view.c b/addressbook/gui/minicard/e-minicard-view.c deleted file mode 100644 index 566b798987..0000000000 --- a/addressbook/gui/minicard/e-minicard-view.c +++ /dev/null @@ -1,305 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * e-minicard-view.c - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include -#include -#include -#include "e-minicard-view.h" -#include "e-minicard.h" -static void e_minicard_view_init (EMinicardView *reflow); -static void e_minicard_view_class_init (EMinicardViewClass *klass); -static void e_minicard_view_set_arg (GtkObject *o, GtkArg *arg, guint arg_id); -static void e_minicard_view_get_arg (GtkObject *object, GtkArg *arg, guint arg_id); -static void e_minicard_view_destroy (GtkObject *object); -static void canvas_destroy (GtkObject *object, EMinicardView *view); -static void disconnect_signals (EMinicardView *view); - -static EReflowSortedClass *parent_class = NULL; - -/* The arguments we take */ -enum { - ARG_0, - ARG_BOOK, - ARG_QUERY -}; - -GtkType -e_minicard_view_get_type (void) -{ - static GtkType reflow_type = 0; - - if (!reflow_type) - { - static const GtkTypeInfo reflow_info = - { - "EMinicardView", - sizeof (EMinicardView), - sizeof (EMinicardViewClass), - (GtkClassInitFunc) e_minicard_view_class_init, - (GtkObjectInitFunc) e_minicard_view_init, - /* reserved_1 */ NULL, - /* reserved_2 */ NULL, - (GtkClassInitFunc) NULL, - }; - - reflow_type = gtk_type_unique (e_reflow_sorted_get_type (), &reflow_info); - } - - return reflow_type; -} - -static void -e_minicard_view_class_init (EMinicardViewClass *klass) -{ - GtkObjectClass *object_class; - GnomeCanvasItemClass *item_class; - - object_class = (GtkObjectClass*) klass; - item_class = (GnomeCanvasItemClass *) klass; - - parent_class = gtk_type_class (e_reflow_sorted_get_type ()); - - gtk_object_add_arg_type ("EMinicardView::book", GTK_TYPE_OBJECT, - GTK_ARG_READWRITE, ARG_BOOK); - gtk_object_add_arg_type ("EMinicardView::query", GTK_TYPE_STRING, - GTK_ARG_READWRITE, ARG_QUERY); - - object_class->set_arg = e_minicard_view_set_arg; - object_class->get_arg = e_minicard_view_get_arg; - object_class->destroy = e_minicard_view_destroy; - - /* GnomeCanvasItem method overrides */ -} - -static void -e_minicard_view_init (EMinicardView *view) -{ - view->book = NULL; - view->query = g_strdup("(contains \"full_name\" \"\")"); - view->book_view = NULL; - view->get_view_idle = 0; - view->create_card_id = 0; - view->remove_card_id = 0; - view->modify_card_id = 0; - view->canvas_destroy_id = 0; - - E_REFLOW_SORTED(view)->compare_func = (GCompareFunc) e_minicard_compare; - E_REFLOW_SORTED(view)->string_func = (EReflowStringFunc) e_minicard_get_card_id; -} - -static void -create_card(EBookView *book_view, const GList *cards, EMinicardView *view) -{ - for (; cards; cards = g_list_next(cards)) { - GnomeCanvasItem *item = gnome_canvas_item_new(GNOME_CANVAS_GROUP(view), - e_minicard_get_type(), - "card", cards->data, - NULL); - e_reflow_add_item(E_REFLOW(view), item); - } -} - -static void -modify_card(EBookView *book_view, const GList *cards, EMinicardView *view) -{ - for (; cards; cards = g_list_next(cards)) { - ECard *card = cards->data; - gchar *id = e_card_get_id(card); - GnomeCanvasItem *item = e_reflow_sorted_get_item(E_REFLOW_SORTED(view), id); - if (item && !GTK_OBJECT_DESTROYED(item)) { - gnome_canvas_item_set(item, - "card", card, - NULL); - e_reflow_sorted_reorder_item(E_REFLOW_SORTED(view), id); - } - } -} - -static void -remove_card(EBookView *book_view, const char *id, EMinicardView *view) -{ - e_reflow_sorted_remove_item(E_REFLOW_SORTED(view), id); -} - -static void -book_view_loaded (EBook *book, EBookStatus status, EBookView *book_view, gpointer closure) -{ - EMinicardView *view = closure; - disconnect_signals(view); - if (view->book_view) - gtk_object_unref(GTK_OBJECT(view->book_view)); - - if (!view->canvas_destroy_id) - view->canvas_destroy_id = - gtk_signal_connect(GTK_OBJECT(GNOME_CANVAS_ITEM(view)->canvas), - "destroy", GTK_SIGNAL_FUNC(canvas_destroy), - view); - - view->book_view = book_view; - if (view->book_view) - gtk_object_ref(GTK_OBJECT(view->book_view)); - - - view->create_card_id = gtk_signal_connect(GTK_OBJECT(view->book_view), - "card_added", - GTK_SIGNAL_FUNC(create_card), - view); - view->remove_card_id = gtk_signal_connect(GTK_OBJECT(view->book_view), - "card_removed", - GTK_SIGNAL_FUNC(remove_card), - view); - view->modify_card_id = gtk_signal_connect(GTK_OBJECT(view->book_view), - "card_changed", - GTK_SIGNAL_FUNC(modify_card), - view); - - g_list_foreach(E_REFLOW(view)->items, (GFunc) gtk_object_unref, NULL); - g_list_foreach(E_REFLOW(view)->items, (GFunc) gtk_object_destroy, NULL); - g_list_free(E_REFLOW(view)->items); - E_REFLOW(view)->items = NULL; - e_canvas_item_request_reflow(GNOME_CANVAS_ITEM(view)); -} - -static gboolean -get_view(EMinicardView *view) -{ - if (view->book && view->query) - e_book_get_book_view(view->book, view->query, book_view_loaded, view); - - view->get_view_idle = 0; - return FALSE; -} - -static void -e_minicard_view_set_arg (GtkObject *o, GtkArg *arg, guint arg_id) -{ - GnomeCanvasItem *item; - EMinicardView *view; - - item = GNOME_CANVAS_ITEM (o); - view = E_MINICARD_VIEW (o); - - switch (arg_id){ - case ARG_BOOK: - if (view->book) - gtk_object_unref(GTK_OBJECT(view->book)); - view->book = E_BOOK(GTK_VALUE_OBJECT (*arg)); - if (view->book) { - gtk_object_ref(GTK_OBJECT(view->book)); - if (view->get_view_idle == 0) - view->get_view_idle = g_idle_add((GSourceFunc)get_view, view); - } - break; - case ARG_QUERY: - g_free(view->query); - view->query = g_strdup(GTK_VALUE_STRING (*arg)); - if (view->get_view_idle == 0) - view->get_view_idle = g_idle_add((GSourceFunc)get_view, view); - break; - } -} - -static void -e_minicard_view_get_arg (GtkObject *object, GtkArg *arg, guint arg_id) -{ - EMinicardView *e_minicard_view; - - e_minicard_view = E_MINICARD_VIEW (object); - - switch (arg_id) { - case ARG_BOOK: - GTK_VALUE_OBJECT (*arg) = GTK_OBJECT(e_minicard_view->book); - break; - case ARG_QUERY: - GTK_VALUE_STRING (*arg) = g_strdup(e_minicard_view->query); - break; - default: - arg->type = GTK_TYPE_INVALID; - break; - } -} - -static void -e_minicard_view_destroy (GtkObject *object) -{ - EMinicardView *view = E_MINICARD_VIEW(object); - - if (view->get_view_idle) - g_source_remove(view->get_view_idle); - if (view->canvas_destroy_id) - gtk_signal_disconnect(GTK_OBJECT (GNOME_CANVAS_ITEM(view)->canvas), - view->canvas_destroy_id); - disconnect_signals(view); - g_free(view->query); - if (view->book) - gtk_object_unref(GTK_OBJECT(view->book)); - if (view->book_view) - gtk_object_unref(GTK_OBJECT(view->book_view)); - - GTK_OBJECT_CLASS(parent_class)->destroy (object); -} - -static void -disconnect_signals(EMinicardView *view) -{ - if (view->book_view && view->create_card_id) - gtk_signal_disconnect(GTK_OBJECT (view->book_view), - view->create_card_id); - if (view->book_view && view->remove_card_id) - gtk_signal_disconnect(GTK_OBJECT (view->book_view), - view->remove_card_id); - if (view->book_view && view->modify_card_id) - gtk_signal_disconnect(GTK_OBJECT (view->book_view), - view->modify_card_id); -} - -static void -canvas_destroy(GtkObject *object, EMinicardView *view) -{ - disconnect_signals(view); -} - -void -e_minicard_view_remove_selection(EMinicardView *view, - EBookCallback cb, - gpointer closure) -{ - if (view->book) { - EReflow *reflow = E_REFLOW(view); - GList *list; - for (list = reflow->items; list; list = g_list_next(list)) { - GnomeCanvasItem *item = list->data; - gboolean has_focus; - gtk_object_get(GTK_OBJECT(item), - "has_focus", &has_focus, - NULL); - if (has_focus) { - ECard *card; - gtk_object_get(GTK_OBJECT(item), - "card", &card, - NULL); - e_book_remove_card(view->book, card, cb, closure); - return; - } - } - } -} diff --git a/addressbook/gui/minicard/e-minicard-view.h b/addressbook/gui/minicard/e-minicard-view.h deleted file mode 100644 index 780b0dde33..0000000000 --- a/addressbook/gui/minicard/e-minicard-view.h +++ /dev/null @@ -1,93 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* e-minicard-view.h - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -#ifndef __E_MINICARD_VIEW_H__ -#define __E_MINICARD_VIEW_H__ - -#include -#include "e-reflow-sorted.h" -#include - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus */ - -/* EMinicardView - A canvas item container. - * - * The following arguments are available: - * - * name type read/write description - * -------------------------------------------------------------------------------- - * book EBook RW book to query - * query string RW query string - * - * From EReflowSorted: (you should really know what you're doing if you set these.) - * compare_func GCompareFunc RW compare function - * string_func EReflowStringFunc RW string function - * - * From EReflow: - * minimum_width double RW minimum width of the reflow. width >= minimum_width - * width double R width of the reflow - * height double RW height of the reflow - */ - -#define E_MINICARD_VIEW_TYPE (e_minicard_view_get_type ()) -#define E_MINICARD_VIEW(obj) (GTK_CHECK_CAST ((obj), E_MINICARD_VIEW_TYPE, EMinicardView)) -#define E_MINICARD_VIEW_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_MINICARD_VIEW_TYPE, EMinicardViewClass)) -#define E_IS_MINICARD_VIEW(obj) (GTK_CHECK_TYPE ((obj), E_MINICARD_VIEW_TYPE)) -#define E_IS_MINICARD_VIEW_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_MINICARD_VIEW_TYPE)) - - -typedef struct _EMinicardView EMinicardView; -typedef struct _EMinicardViewClass EMinicardViewClass; - -struct _EMinicardView -{ - EReflowSorted parent; - - /* item specific fields */ - EBook *book; - char *query; - EBookView *book_view; - - int get_view_idle; - - int canvas_destroy_id; - - int create_card_id, remove_card_id, modify_card_id; -}; - -struct _EMinicardViewClass -{ - EReflowSortedClass parent_class; -}; - -GtkType e_minicard_view_get_type (void); -void e_minicard_view_remove_selection (EMinicardView *view, - EBookCallback cb, - gpointer closure); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -#endif /* __E_MINICARD_VIEW_H__ */ diff --git a/addressbook/gui/minicard/e-minicard.c b/addressbook/gui/minicard/e-minicard.c deleted file mode 100644 index 7831b3152d..0000000000 --- a/addressbook/gui/minicard/e-minicard.c +++ /dev/null @@ -1,686 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * e-minicard.c - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include -#include -#include "e-minicard.h" -#include "e-minicard-label.h" -#include "e-text.h" -#include -#include -#include -#include -#include -#include "e-contact-editor.h" -#include "e-contact-save-as.h" -#include "e-minicard-view.h" - -static void e_minicard_init (EMinicard *card); -static void e_minicard_class_init (EMinicardClass *klass); -static void e_minicard_set_arg (GtkObject *o, GtkArg *arg, guint arg_id); -static void e_minicard_get_arg (GtkObject *object, GtkArg *arg, guint arg_id); -static void e_minicard_destroy (GtkObject *object); -static gboolean e_minicard_event (GnomeCanvasItem *item, GdkEvent *event); -static void e_minicard_realize (GnomeCanvasItem *item); -static void e_minicard_unrealize (GnomeCanvasItem *item); -static void e_minicard_reflow ( GnomeCanvasItem *item, int flags ); - -static void e_minicard_resize_children( EMinicard *e_minicard ); -static void remodel( EMinicard *e_minicard ); - -static GnomeCanvasGroupClass *parent_class = NULL; - -typedef struct _EMinicardField EMinicardField; - -struct _EMinicardField { - ECardSimpleField field; - GnomeCanvasItem *label; -}; - -#define E_MINICARD_FIELD(field) ((EMinicardField *)(field)) - -static void -e_minicard_field_destroy(EMinicardField *field) -{ - gtk_object_destroy(GTK_OBJECT(field->label)); - g_free(field); -} - -/* The arguments we take */ -enum { - ARG_0, - ARG_WIDTH, - ARG_HEIGHT, - ARG_HAS_FOCUS, - ARG_CARD -}; - -GtkType -e_minicard_get_type (void) -{ - static GtkType minicard_type = 0; - - if (!minicard_type) - { - static const GtkTypeInfo minicard_info = - { - "EMinicard", - sizeof (EMinicard), - sizeof (EMinicardClass), - (GtkClassInitFunc) e_minicard_class_init, - (GtkObjectInitFunc) e_minicard_init, - /* reserved_1 */ NULL, - /* reserved_2 */ NULL, - (GtkClassInitFunc) NULL, - }; - - minicard_type = gtk_type_unique (gnome_canvas_group_get_type (), &minicard_info); - } - - return minicard_type; -} - -static void -e_minicard_class_init (EMinicardClass *klass) -{ - GtkObjectClass *object_class; - GnomeCanvasItemClass *item_class; - - object_class = (GtkObjectClass*) klass; - item_class = (GnomeCanvasItemClass *) klass; - - parent_class = gtk_type_class (gnome_canvas_group_get_type ()); - - gtk_object_add_arg_type ("EMinicard::width", GTK_TYPE_DOUBLE, - GTK_ARG_READWRITE, ARG_WIDTH); - gtk_object_add_arg_type ("EMinicard::height", GTK_TYPE_DOUBLE, - GTK_ARG_READABLE, ARG_HEIGHT); - gtk_object_add_arg_type ("EMinicard::has_focus", GTK_TYPE_ENUM, - GTK_ARG_READWRITE, ARG_HAS_FOCUS); - gtk_object_add_arg_type ("EMinicard::card", GTK_TYPE_OBJECT, - GTK_ARG_READWRITE, ARG_CARD); - - object_class->set_arg = e_minicard_set_arg; - object_class->get_arg = e_minicard_get_arg; - object_class->destroy = e_minicard_destroy; - - /* GnomeCanvasItem method overrides */ - item_class->realize = e_minicard_realize; - item_class->unrealize = e_minicard_unrealize; - item_class->event = e_minicard_event; -} - -static void -e_minicard_init (EMinicard *minicard) -{ - /* minicard->card = NULL;*/ - minicard->rect = NULL; - minicard->fields = NULL; - minicard->width = 10; - minicard->height = 10; - minicard->has_focus = FALSE; - - minicard->card = NULL; - minicard->simple = e_card_simple_new(NULL); - - e_canvas_item_set_reflow_callback(GNOME_CANVAS_ITEM(minicard), e_minicard_reflow); -} - -static void -e_minicard_set_arg (GtkObject *o, GtkArg *arg, guint arg_id) -{ - GnomeCanvasItem *item; - EMinicard *e_minicard; - - item = GNOME_CANVAS_ITEM (o); - e_minicard = E_MINICARD (o); - - switch (arg_id){ - case ARG_WIDTH: - if (e_minicard->width != GTK_VALUE_DOUBLE (*arg)) { - e_minicard->width = GTK_VALUE_DOUBLE (*arg); - e_minicard_resize_children(e_minicard); - if ( GTK_OBJECT_FLAGS( e_minicard ) & GNOME_CANVAS_ITEM_REALIZED ) - e_canvas_item_request_reflow(item); - } - break; - case ARG_HAS_FOCUS: - if (e_minicard->fields) { - if ( GTK_VALUE_ENUM(*arg) == E_FOCUS_START || - GTK_VALUE_ENUM(*arg) == E_FOCUS_CURRENT) { - gnome_canvas_item_set(E_MINICARD_FIELD(e_minicard->fields->data)->label, - "has_focus", GTK_VALUE_ENUM(*arg), - NULL); - } else if ( GTK_VALUE_ENUM(*arg) == E_FOCUS_END ) { - gnome_canvas_item_set(E_MINICARD_FIELD(g_list_last(e_minicard->fields)->data)->label, - "has_focus", GTK_VALUE_ENUM(*arg), - NULL); - } - } - else - e_canvas_item_grab_focus(item); - break; - case ARG_CARD: - if (e_minicard->card) - gtk_object_unref (GTK_OBJECT(e_minicard->card)); - e_minicard->card = E_CARD(GTK_VALUE_OBJECT (*arg)); - if (e_minicard->card) - gtk_object_ref (GTK_OBJECT(e_minicard->card)); - gtk_object_set(GTK_OBJECT(e_minicard->simple), - "card", e_minicard->card, - NULL); - remodel(e_minicard); - e_canvas_item_request_reflow(item); - break; - } -} - -static void -e_minicard_get_arg (GtkObject *object, GtkArg *arg, guint arg_id) -{ - EMinicard *e_minicard; - - e_minicard = E_MINICARD (object); - - switch (arg_id) { - case ARG_WIDTH: - GTK_VALUE_DOUBLE (*arg) = e_minicard->width; - break; - case ARG_HEIGHT: - GTK_VALUE_DOUBLE (*arg) = e_minicard->height; - break; - case ARG_HAS_FOCUS: - GTK_VALUE_ENUM (*arg) = e_minicard->has_focus ? E_FOCUS_CURRENT : E_FOCUS_NONE; - break; - case ARG_CARD: - e_card_simple_sync_card(e_minicard->simple); - GTK_VALUE_OBJECT (*arg) = GTK_OBJECT(e_minicard->card); - break; - default: - arg->type = GTK_TYPE_INVALID; - break; - } -} - -static void -e_minicard_destroy (GtkObject *object) -{ - EMinicard *e_minicard; - - g_return_if_fail (object != NULL); - g_return_if_fail (E_IS_MINICARD (object)); - - e_minicard = E_MINICARD (object); - - g_list_foreach(e_minicard->fields, (GFunc) e_minicard_field_destroy, NULL); - g_list_free(e_minicard->fields); - - if (e_minicard->card) - gtk_object_unref (GTK_OBJECT(e_minicard->card)); - if (e_minicard->simple) - gtk_object_unref (GTK_OBJECT(e_minicard->simple)); - - if (GTK_OBJECT_CLASS (parent_class)->destroy) - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); -} - -static void -e_minicard_realize (GnomeCanvasItem *item) -{ - EMinicard *e_minicard; - GnomeCanvasGroup *group; - - e_minicard = E_MINICARD (item); - group = GNOME_CANVAS_GROUP( item ); - - if (GNOME_CANVAS_ITEM_CLASS(parent_class)->realize) - (* GNOME_CANVAS_ITEM_CLASS(parent_class)->realize) (item); - - e_minicard->rect = - gnome_canvas_item_new( group, - gnome_canvas_rect_get_type(), - "x1", (double) 0, - "y1", (double) 0, - "x2", (double) e_minicard->width - 1, - "y2", (double) e_minicard->height - 1, - "outline_color", NULL, - NULL ); - - e_minicard->header_rect = - gnome_canvas_item_new( group, - gnome_canvas_rect_get_type(), - "x1", (double) 2, - "y1", (double) 2, - "x2", (double) e_minicard->width - 3, - "y2", (double) e_minicard->height - 3, - "fill_color", "grey70", - NULL ); - - e_minicard->header_text = - gnome_canvas_item_new( group, - e_text_get_type(), - "anchor", GTK_ANCHOR_NW, - "width", (double) ( e_minicard->width - 12 ), - "clip", TRUE, - "use_ellipsis", TRUE, - "font", "lucidasans-bold-10", - "fill_color", "black", - "text", "", - NULL ); - e_canvas_item_move_absolute(e_minicard->header_text, 6, 6); - - remodel(e_minicard); - e_canvas_item_request_reflow(item); - - if (!item->canvas->aa) { - } -} - -static void -e_minicard_unrealize (GnomeCanvasItem *item) -{ - EMinicard *e_minicard; - - e_minicard = E_MINICARD (item); - - if (!item->canvas->aa) - { - } - - if (GNOME_CANVAS_ITEM_CLASS(parent_class)->unrealize) - (* GNOME_CANVAS_ITEM_CLASS(parent_class)->unrealize) (item); -} - -static void -card_changed_cb (EBook* book, EBookStatus status, gpointer user_data) -{ - g_print ("%s: %s(): a card was changed with status %d\n", __FILE__, __FUNCTION__, status); -} - -static void -save_as (GtkWidget *widget, EMinicard *minicard) -{ - e_card_simple_sync_card(minicard->simple); - e_contact_save_as(_("Save as VCard"), minicard->card); -} - -static gboolean -e_minicard_event (GnomeCanvasItem *item, GdkEvent *event) -{ - EMinicard *e_minicard; - - e_minicard = E_MINICARD (item); - - switch( event->type ) { - case GDK_FOCUS_CHANGE: - { - GdkEventFocus *focus_event = (GdkEventFocus *) event; - if ( focus_event->in ) { - gnome_canvas_item_set( e_minicard->rect, - "outline_color", "grey50", - NULL ); - gnome_canvas_item_set( e_minicard->header_rect, - "fill_color", "darkblue", - NULL ); - gnome_canvas_item_set( e_minicard->header_text, - "fill_color", "white", - NULL ); - e_minicard->has_focus = TRUE; - } else { - EBook *book; - - e_card_simple_sync_card(e_minicard->simple); - - gtk_object_get(GTK_OBJECT(GNOME_CANVAS_ITEM(e_minicard)->parent), - "book", &book, - NULL); - - /* Add the card in the contact editor to our ebook */ - e_book_commit_card (book, - e_minicard->card, - card_changed_cb, - NULL); - - gnome_canvas_item_set( e_minicard->rect, - "outline_color", NULL, - NULL ); - gnome_canvas_item_set( e_minicard->header_rect, - "fill_color", "grey70", - NULL ); - gnome_canvas_item_set( e_minicard->header_text, - "fill_color", "black", - NULL ); - e_minicard->has_focus = FALSE; - } - } - break; - case GDK_BUTTON_PRESS: - if (event->button.button == 1) { - e_canvas_item_grab_focus(item); - } else if (event->button.button == 3) { - EPopupMenu menu[] = { {"Save as VCard", NULL, GTK_SIGNAL_FUNC(save_as), 0}, {NULL, NULL, NULL, 0} }; - e_popup_menu_run (menu, (GdkEventButton *)event, 0, e_minicard); - } - break; - case GDK_2BUTTON_PRESS: - if (E_IS_MINICARD_VIEW(item->parent)) { - gint result; - GtkWidget* contact_editor = - e_contact_editor_new(e_minicard->card); - EBook *book; - GtkWidget *dlg; - gtk_object_get(GTK_OBJECT(item->parent), - "book", &book, - NULL); - - dlg = gnome_dialog_new ("Contact Editor", "Save", "Cancel", NULL); - - gtk_window_set_policy(GTK_WINDOW(dlg), FALSE, TRUE, FALSE); - - g_assert (E_IS_BOOK (book)); - - gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dlg)->vbox), - contact_editor, TRUE, TRUE, 0); - - gtk_widget_show(contact_editor); - gtk_widget_show (dlg); - - gnome_dialog_close_hides (GNOME_DIALOG (dlg), TRUE); - result = gnome_dialog_run_and_close (GNOME_DIALOG (dlg)); - - - /* If the user clicks "okay"...*/ - if (result == 0) { - ECard *card; - g_assert (contact_editor); - g_assert (GTK_IS_OBJECT (contact_editor)); - gtk_object_get(GTK_OBJECT(contact_editor), - "card", &card, - NULL); - - /* Add the card in the contact editor to our ebook */ - e_book_commit_card (book, - card, - card_changed_cb, - NULL); - } - } - break; - case GDK_KEY_PRESS: - if (event->key.keyval == GDK_Tab || - event->key.keyval == GDK_KP_Tab || - event->key.keyval == GDK_ISO_Left_Tab) { - GList *list; - for (list = e_minicard->fields; list; list = list->next) { - EMinicardField *field = E_MINICARD_FIELD(list->data); - GnomeCanvasItem *item = field->label; - EFocus has_focus; - gtk_object_get(GTK_OBJECT(item), - "has_focus", &has_focus, - NULL); - if (has_focus != E_FOCUS_NONE) { - if (event->key.state & GDK_SHIFT_MASK) - list = list->prev; - else - list = list->next; - if (list) { - EMinicardField *field = E_MINICARD_FIELD(list->data); - GnomeCanvasItem *item = field->label; - gnome_canvas_item_set(item, - "has_focus", (event->key.state & GDK_SHIFT_MASK) ? E_FOCUS_END : E_FOCUS_START, - NULL); - return 1; - } else { - return 0; - } - } - } - } - default: - break; - } - - if (GNOME_CANVAS_ITEM_CLASS( parent_class )->event) - return (* GNOME_CANVAS_ITEM_CLASS( parent_class )->event) (item, event); - else - return 0; -} - -static void -e_minicard_resize_children( EMinicard *e_minicard ) -{ - if ( GTK_OBJECT_FLAGS( e_minicard ) & GNOME_CANVAS_ITEM_REALIZED ) { - GList *list; - - gnome_canvas_item_set( e_minicard->header_text, - "width", (double) e_minicard->width - 12, - NULL ); - for ( list = e_minicard->fields; list; list = g_list_next( list ) ) { - gnome_canvas_item_set( E_MINICARD_FIELD( list->data )->label, - "width", (double) e_minicard->width - 4.0, - NULL ); - } - } -} - -static void -field_changed (EText *text, EMinicard *e_minicard) -{ - ECardSimpleType type; - char *string; - - type = GPOINTER_TO_INT - (gtk_object_get_data(GTK_OBJECT(text), - "EMinicard:field")); - gtk_object_get(GTK_OBJECT(text), - "text", &string, - NULL); - e_card_simple_set(e_minicard->simple, - type, - string); - g_free(string); -} - -static void -add_field (EMinicard *e_minicard, ECardSimpleField field) -{ - GnomeCanvasItem *new_item; - GnomeCanvasGroup *group; - ECardSimpleType type; - EMinicardField *minicard_field; - char *name; - char *string; - - group = GNOME_CANVAS_GROUP( e_minicard ); - - type = e_card_simple_type(e_minicard->simple, field); - name = g_strdup_printf("%s:", e_card_simple_get_name(e_minicard->simple, field)); - string = e_card_simple_get(e_minicard->simple, field); - - new_item = e_minicard_label_new(group); - gnome_canvas_item_set( new_item, - "width", e_minicard->width - 4.0, - "fieldname", name, - "field", string, - NULL ); - gtk_signal_connect(GTK_OBJECT(E_MINICARD_LABEL(new_item)->field), - "changed", GTK_SIGNAL_FUNC(field_changed), e_minicard); - gtk_object_set_data(GTK_OBJECT(E_MINICARD_LABEL(new_item)->field), - "EMinicard:field", - GINT_TO_POINTER(field)); - - minicard_field = g_new(EMinicardField, 1); - minicard_field->field = field; - minicard_field->label = new_item; - - e_minicard->fields = g_list_append( e_minicard->fields, minicard_field); - e_canvas_item_move_absolute(new_item, 2, e_minicard->height); - g_free(name); - g_free(string); -} - -static void -remodel( EMinicard *e_minicard ) -{ - int count = 0; - if (e_minicard->simple) { - ECardSimpleField field; - GList *list; - char *file_as; - - if (e_minicard->header_text) { - file_as = e_card_simple_get(e_minicard->simple, E_CARD_SIMPLE_FIELD_FILE_AS); - gnome_canvas_item_set( e_minicard->header_text, - "text", file_as ? file_as : "", - NULL ); - g_free(file_as); - } - - list = e_minicard->fields; - e_minicard->fields = NULL; - - for(field = E_CARD_SIMPLE_FIELD_FULL_NAME; field != E_CARD_SIMPLE_FIELD_LAST && count < 5; field++) { - EMinicardField *minicard_field = NULL; - if (list) - minicard_field = list->data; - if (minicard_field && minicard_field->field == field) { - GList *this_list = list; - char *string; - - string = e_card_simple_get(e_minicard->simple, field); - if (string && *string) { - e_minicard->fields = g_list_append(e_minicard->fields, minicard_field); - gtk_object_set(GTK_OBJECT(minicard_field->label), - "field", string, - NULL); - count ++; - } else { - e_minicard_field_destroy(minicard_field); - } - list = g_list_remove_link(list, this_list); - g_list_free_1(this_list); - g_free(string); - } else { - char *string; - string = e_card_simple_get(e_minicard->simple, field); - if (string && *string) { - add_field(e_minicard, field); - count++; - } - g_free(string); - } - } - - g_list_foreach(list, (GFunc) e_minicard_field_destroy, NULL); - g_list_free(list); - } -} - -static void -e_minicard_reflow( GnomeCanvasItem *item, int flags ) -{ - EMinicard *e_minicard = E_MINICARD(item); - if ( GTK_OBJECT_FLAGS( e_minicard ) & GNOME_CANVAS_ITEM_REALIZED ) { - GList *list; - gdouble text_height; - gint old_height; - - old_height = e_minicard->height; - - gtk_object_get( GTK_OBJECT( e_minicard->header_text ), - "text_height", &text_height, - NULL ); - - e_minicard->height = text_height + 10.0; - - gnome_canvas_item_set( e_minicard->header_rect, - "y2", text_height + 9.0, - NULL ); - - for(list = e_minicard->fields; list; list = g_list_next(list)) { - EMinicardField *field = E_MINICARD_FIELD(list->data); - GnomeCanvasItem *item = field->label; - gtk_object_get (GTK_OBJECT(item), - "height", &text_height, - NULL); - e_canvas_item_move_absolute(item, 2, e_minicard->height); - e_minicard->height += text_height; - } - e_minicard->height += 2; - - gnome_canvas_item_set( e_minicard->rect, - "y2", (double) e_minicard->height - 1, - NULL ); - - gnome_canvas_item_set( e_minicard->rect, - "x2", (double) e_minicard->width - 1.0, - "y2", (double) e_minicard->height - 1.0, - NULL ); - gnome_canvas_item_set( e_minicard->header_rect, - "x2", (double) e_minicard->width - 3.0, - NULL ); - - if (old_height != e_minicard->height) - e_canvas_item_request_parent_reflow(item); - } -} - -char * -e_minicard_get_card_id (EMinicard *minicard) -{ - g_return_val_if_fail(minicard != NULL, NULL); - g_return_val_if_fail(E_IS_MINICARD(minicard), NULL); - - if (minicard->card) { - return e_card_get_id(minicard->card); - } else { - return ""; - } -} - -int -e_minicard_compare (EMinicard *minicard1, EMinicard *minicard2) -{ - g_return_val_if_fail(minicard1 != NULL, 0); - g_return_val_if_fail(E_IS_MINICARD(minicard1), 0); - g_return_val_if_fail(minicard2 != NULL, 0); - g_return_val_if_fail(E_IS_MINICARD(minicard2), 0); - - if (minicard1->card && minicard2->card) { - char *file_as1, *file_as2; - gtk_object_get(GTK_OBJECT(minicard1->card), - "file_as", &file_as1, - NULL); - gtk_object_get(GTK_OBJECT(minicard2->card), - "file_as", &file_as2, - NULL); - if (file_as1 && file_as2) - return strcmp(file_as1, file_as2); - if (file_as1) - return -1; - if (file_as2) - return 1; - return strcmp(e_minicard_get_card_id(minicard1), e_minicard_get_card_id(minicard2)); - } else { - return 0; - } -} diff --git a/addressbook/gui/minicard/e-minicard.h b/addressbook/gui/minicard/e-minicard.h deleted file mode 100644 index 47da8110c2..0000000000 --- a/addressbook/gui/minicard/e-minicard.h +++ /dev/null @@ -1,98 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* e-minicard.h - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -#ifndef __E_MINICARD_H__ -#define __E_MINICARD_H__ - -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus */ - -/* EMinicard - A small card displaying information about a contact. - * - * The following arguments are available: - * - * name type read/write description - * -------------------------------------------------------------------------------- - * width double RW width of the card - * height double R height of the card - * card ECard* RW Pointer to the ECard - */ - -#define E_MINICARD_TYPE (e_minicard_get_type ()) -#define E_MINICARD(obj) (GTK_CHECK_CAST ((obj), E_MINICARD_TYPE, EMinicard)) -#define E_MINICARD_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_MINICARD_TYPE, EMinicardClass)) -#define E_IS_MINICARD(obj) (GTK_CHECK_TYPE ((obj), E_MINICARD_TYPE)) -#define E_IS_MINICARD_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_MINICARD_TYPE)) - - -typedef struct _EMinicard EMinicard; -typedef struct _EMinicardClass EMinicardClass; -typedef enum _EMinicardFocusType EMinicardFocusType; - -enum _EMinicardFocusType { - E_MINICARD_FOCUS_TYPE_START, - E_MINICARD_FOCUS_TYPE_END -}; - -struct _EMinicard -{ - GnomeCanvasGroup parent; - - /* item specific fields */ - ECard *card; - ECardSimple *simple; - - GnomeCanvasItem *rect; - GnomeCanvasItem *header_rect; - GnomeCanvasItem *header_text; - - GList *fields; /* Of type EMinicardField */ - guint needs_remodeling : 1; - - gboolean has_focus; - - double width; - double height; -}; - -struct _EMinicardClass -{ - GnomeCanvasGroupClass parent_class; - - void (* resize) (EMinicard *minicard); -}; - - -GtkType e_minicard_get_type (void); -char *e_minicard_get_card_id (EMinicard *minicard); -int e_minicard_compare (EMinicard *minicard1, EMinicard *minicard2); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -#endif /* __E_MINICARD_H__ */ diff --git a/addressbook/gui/minicard/e-reflow-sorted.c b/addressbook/gui/minicard/e-reflow-sorted.c deleted file mode 100644 index 415537825b..0000000000 --- a/addressbook/gui/minicard/e-reflow-sorted.c +++ /dev/null @@ -1,234 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * e-reflow-sorted.c - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include -#include -#include -#include "e-reflow-sorted.h" -#include -#include -#include - -static void e_reflow_sorted_init (EReflowSorted *card); -static void e_reflow_sorted_class_init (EReflowSortedClass *klass); -static void e_reflow_sorted_set_arg (GtkObject *o, GtkArg *arg, guint arg_id); -static void e_reflow_sorted_get_arg (GtkObject *object, GtkArg *arg, guint arg_id); -static void e_reflow_sorted_add_item(EReflow *e_reflow, GnomeCanvasItem *item); - -static EReflowClass *parent_class = NULL; - -/* The arguments we take */ -enum { - ARG_0, - ARG_COMPARE_FUNC, - ARG_STRING_FUNC -}; - -GtkType -e_reflow_sorted_get_type (void) -{ - static GtkType reflow_type = 0; - - if (!reflow_type) - { - static const GtkTypeInfo reflow_info = - { - "EReflowSorted", - sizeof (EReflowSorted), - sizeof (EReflowSortedClass), - (GtkClassInitFunc) e_reflow_sorted_class_init, - (GtkObjectInitFunc) e_reflow_sorted_init, - /* reserved_1 */ NULL, - /* reserved_2 */ NULL, - (GtkClassInitFunc) NULL, - }; - - reflow_type = gtk_type_unique (e_reflow_get_type (), &reflow_info); - } - - return reflow_type; -} - -static void -e_reflow_sorted_class_init (EReflowSortedClass *klass) -{ - GtkObjectClass *object_class; - EReflowClass *reflow_class; - - object_class = (GtkObjectClass*) klass; - reflow_class = E_REFLOW_CLASS (klass); - - parent_class = gtk_type_class (e_reflow_get_type ()); - - gtk_object_add_arg_type ("EReflowSorted::compare_func", GTK_TYPE_POINTER, - GTK_ARG_READWRITE, ARG_COMPARE_FUNC); - gtk_object_add_arg_type ("EReflowSorted::string_func", GTK_TYPE_POINTER, - GTK_ARG_READWRITE, ARG_STRING_FUNC); - - reflow_class->add_item = e_reflow_sorted_add_item; - - object_class->set_arg = e_reflow_sorted_set_arg; - object_class->get_arg = e_reflow_sorted_get_arg; -} - -static void -e_reflow_sorted_init (EReflowSorted *reflow) -{ - reflow->compare_func = NULL; - reflow->string_func = NULL; -} - -static void -e_reflow_sorted_set_arg (GtkObject *o, GtkArg *arg, guint arg_id) -{ - GnomeCanvasItem *item; - EReflowSorted *e_reflow_sorted; - - item = GNOME_CANVAS_ITEM (o); - e_reflow_sorted = E_REFLOW_SORTED (o); - - switch (arg_id){ - case ARG_COMPARE_FUNC: - e_reflow_sorted->compare_func = GTK_VALUE_POINTER (*arg); - break; - case ARG_STRING_FUNC: - e_reflow_sorted->string_func = GTK_VALUE_POINTER (*arg); - break; - } -} - -static void -e_reflow_sorted_get_arg (GtkObject *object, GtkArg *arg, guint arg_id) -{ - EReflowSorted *e_reflow_sorted; - - e_reflow_sorted = E_REFLOW_SORTED (object); - - switch (arg_id) { - case ARG_COMPARE_FUNC: - GTK_VALUE_POINTER (*arg) = e_reflow_sorted->compare_func; - break; - case ARG_STRING_FUNC: - GTK_VALUE_POINTER (*arg) = e_reflow_sorted->string_func; - break; - default: - arg->type = GTK_TYPE_INVALID; - break; - } -} - -static GList * -e_reflow_sorted_get_list(EReflowSorted *e_reflow_sorted, const gchar *id) -{ - if (e_reflow_sorted->string_func) { - EReflow *reflow = E_REFLOW(e_reflow_sorted); - GList *list; - for (list = reflow->items; list; list = g_list_next(list)) { - GnomeCanvasItem *item = list->data; - char *string = e_reflow_sorted->string_func (item); - if (string && !strcmp(string, id)) { - return list; - } - } - } - return NULL; -} - -void -e_reflow_sorted_remove_item(EReflowSorted *e_reflow_sorted, const gchar *id) -{ - GList *list; - GnomeCanvasItem *item = NULL; - - list = e_reflow_sorted_get_list(e_reflow_sorted, id); - if (list) - item = list->data; - - if (item) { - EReflow *reflow = E_REFLOW(e_reflow_sorted); - reflow->items = g_list_remove_link(reflow->items, list); - g_list_free_1(list); - gtk_object_unref(GTK_OBJECT(item)); - gtk_object_destroy(GTK_OBJECT(item)); - if ( GTK_OBJECT_FLAGS( e_reflow_sorted ) & GNOME_CANVAS_ITEM_REALIZED ) { - e_canvas_item_request_reflow(GNOME_CANVAS_ITEM(e_reflow_sorted)); - } - } -} - -void -e_reflow_sorted_replace_item(EReflowSorted *e_reflow_sorted, GnomeCanvasItem *item) -{ - if (e_reflow_sorted->string_func) { - char *string = e_reflow_sorted->string_func (item); - e_reflow_sorted_remove_item(e_reflow_sorted, string); - e_reflow_sorted_add_item(E_REFLOW(e_reflow_sorted), item); - } -} - -GnomeCanvasItem * -e_reflow_sorted_get_item(EReflowSorted *e_reflow_sorted, const gchar *id) -{ - GList *list; - list = e_reflow_sorted_get_list(e_reflow_sorted, id); - if (list) - return list->data; - else - return NULL; -} - -void -e_reflow_sorted_reorder_item(EReflowSorted *e_reflow_sorted, const gchar *id) -{ - GList *list; - GnomeCanvasItem *item = NULL; - - list = e_reflow_sorted_get_list(e_reflow_sorted, id); - if (list) - item = list->data; - if (item) { - EReflow *reflow = E_REFLOW(e_reflow_sorted); - reflow->items = g_list_remove_link(reflow->items, list); - gtk_object_unref(GTK_OBJECT(item)); - g_list_free_1(list); - e_reflow_sorted_add_item(reflow, item); - e_canvas_item_request_reflow(GNOME_CANVAS_ITEM(e_reflow_sorted)); - } -} - -static void -e_reflow_sorted_add_item(EReflow *reflow, GnomeCanvasItem *item) -{ - EReflowSorted *e_reflow_sorted = E_REFLOW_SORTED(reflow); - if ( e_reflow_sorted->compare_func ) { - reflow->items = g_list_insert_sorted(reflow->items, item, e_reflow_sorted->compare_func); - gtk_object_ref(GTK_OBJECT(item)); - - if ( GTK_OBJECT_FLAGS( e_reflow_sorted ) & GNOME_CANVAS_ITEM_REALIZED ) { - gnome_canvas_item_set(item, - "width", (double) reflow->column_width, - NULL); - - e_canvas_item_request_reflow(GNOME_CANVAS_ITEM(e_reflow_sorted)); - } - } -} diff --git a/addressbook/gui/minicard/e-reflow-sorted.h b/addressbook/gui/minicard/e-reflow-sorted.h deleted file mode 100644 index d9b4acc747..0000000000 --- a/addressbook/gui/minicard/e-reflow-sorted.h +++ /dev/null @@ -1,89 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* e-reflow-sorted.h - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -#ifndef __E_REFLOW_SORTED_H__ -#define __E_REFLOW_SORTED_H__ - -#include - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus */ - -/* EReflowSorted - A canvas item container. - * - * The following arguments are available: - * - * name type read/write description - * -------------------------------------------------------------------------------- - * compare_func GCompareFunc RW compare function - * string_func EReflowStringFunc RW string function - * - * From EReflow: - * minimum_width double RW minimum width of the reflow. width >= minimum_width - * width double R width of the reflow - * height double RW height of the reflow - */ - -#define E_REFLOW_SORTED_TYPE (e_reflow_sorted_get_type ()) -#define E_REFLOW_SORTED(obj) (GTK_CHECK_CAST ((obj), E_REFLOW_SORTED_TYPE, EReflowSorted)) -#define E_REFLOW_SORTED_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_REFLOW_SORTED_TYPE, EReflowSortedClass)) -#define E_IS_REFLOW_SORTED(obj) (GTK_CHECK_TYPE ((obj), E_REFLOW_SORTED_TYPE)) -#define E_IS_REFLOW_SORTED_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_REFLOW_SORTED_TYPE)) - -typedef char * (* EReflowStringFunc) (GnomeCanvasItem *); - -typedef struct _EReflowSorted EReflowSorted; -typedef struct _EReflowSortedClass EReflowSortedClass; - -/* FIXME: Try reimplementing this as a hash table with key as string - and change EReflow to use a GTree. */ -struct _EReflowSorted -{ - EReflow parent; - - /* item specific fields */ - GCompareFunc compare_func; - EReflowStringFunc string_func; -}; - -struct _EReflowSortedClass -{ - EReflowClass parent_class; -}; - -/* - * To be added to a reflow, an item must have the argument "width" as - * a Read/Write argument and "height" as a Read Only argument. It - * should also do an ECanvas parent reflow request if its size - * changes. - */ -void e_reflow_sorted_remove_item (EReflowSorted *sorted, const char *id); -void e_reflow_sorted_replace_item (EReflowSorted *sorted, GnomeCanvasItem *item); -void e_reflow_sorted_reorder_item (EReflowSorted *e_reflow_sorted, const gchar *id); -GnomeCanvasItem *e_reflow_sorted_get_item (EReflowSorted *e_reflow_sorted, const gchar *id); -GtkType e_reflow_sorted_get_type (void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* __E_REFLOW_SORTED_H__ */ diff --git a/addressbook/gui/minicard/e-reflow.c b/addressbook/gui/minicard/e-reflow.c deleted file mode 100644 index eee8e695c7..0000000000 --- a/addressbook/gui/minicard/e-reflow.c +++ /dev/null @@ -1,776 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * e-reflow.c - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include -#include -#include -#include "e-reflow.h" -#include -#include -#include - -static void e_reflow_init (EReflow *reflow); -static void e_reflow_class_init (EReflowClass *klass); -static void e_reflow_set_arg (GtkObject *o, GtkArg *arg, guint arg_id); -static void e_reflow_get_arg (GtkObject *object, GtkArg *arg, guint arg_id); -static void e_reflow_destroy (GtkObject *object); -static gboolean e_reflow_event (GnomeCanvasItem *item, GdkEvent *event); -static void e_reflow_realize (GnomeCanvasItem *item); -static void e_reflow_unrealize (GnomeCanvasItem *item); -static void e_reflow_draw (GnomeCanvasItem *item, GdkDrawable *drawable, - int x, int y, int width, int height); -static void e_reflow_update (GnomeCanvasItem *item, double affine[6], ArtSVP *clip_path, gint flags); -static double e_reflow_point (GnomeCanvasItem *item, double x, double y, int cx, int cy, GnomeCanvasItem **actual_item); -static void e_reflow_reflow (GnomeCanvasItem *item, int flags); -static void e_reflow_real_add_item(EReflow *e_reflow, GnomeCanvasItem *item); - -static void e_reflow_resize_children (GnomeCanvasItem *item); - -#define E_REFLOW_DIVIDER_WIDTH 2 -#define E_REFLOW_BORDER_WIDTH 7 -#define E_REFLOW_FULL_GUTTER (E_REFLOW_DIVIDER_WIDTH + E_REFLOW_BORDER_WIDTH * 2) - -static GnomeCanvasGroupClass *parent_class = NULL; - -/* The arguments we take */ -enum { - ARG_0, - ARG_MINIMUM_WIDTH, - ARG_WIDTH, - ARG_HEIGHT -}; - -GtkType -e_reflow_get_type (void) -{ - static GtkType reflow_type = 0; - - if (!reflow_type) - { - static const GtkTypeInfo reflow_info = - { - "EReflow", - sizeof (EReflow), - sizeof (EReflowClass), - (GtkClassInitFunc) e_reflow_class_init, - (GtkObjectInitFunc) e_reflow_init, - /* reserved_1 */ NULL, - /* reserved_2 */ NULL, - (GtkClassInitFunc) NULL, - }; - - reflow_type = gtk_type_unique (gnome_canvas_group_get_type (), &reflow_info); - } - - return reflow_type; -} - -static void -e_reflow_class_init (EReflowClass *klass) -{ - GtkObjectClass *object_class; - GnomeCanvasItemClass *item_class; - - object_class = (GtkObjectClass*) klass; - item_class = (GnomeCanvasItemClass *) klass; - - parent_class = gtk_type_class (gnome_canvas_group_get_type ()); - - gtk_object_add_arg_type ("EReflow::minimum_width", GTK_TYPE_DOUBLE, - GTK_ARG_READWRITE, ARG_MINIMUM_WIDTH); - gtk_object_add_arg_type ("EReflow::width", GTK_TYPE_DOUBLE, - GTK_ARG_READABLE, ARG_WIDTH); - gtk_object_add_arg_type ("EReflow::height", GTK_TYPE_DOUBLE, - GTK_ARG_READWRITE, ARG_HEIGHT); - - klass->add_item = e_reflow_real_add_item; - - object_class->set_arg = e_reflow_set_arg; - object_class->get_arg = e_reflow_get_arg; - object_class->destroy = e_reflow_destroy; - - /* GnomeCanvasItem method overrides */ - item_class->event = e_reflow_event; - item_class->realize = e_reflow_realize; - item_class->unrealize = e_reflow_unrealize; - item_class->draw = e_reflow_draw; - item_class->update = e_reflow_update; - item_class->point = e_reflow_point; -} - -static void -e_reflow_init (EReflow *reflow) -{ - reflow->items = NULL; - reflow->columns = NULL; - reflow->column_width = 150; - - reflow->minimum_width = 10; - reflow->width = 10; - reflow->height = 10; - reflow->idle = 0; - - reflow->column_drag = FALSE; - - reflow->need_height_update = FALSE; - reflow->need_column_resize = FALSE; - - reflow->default_cursor_shown = TRUE; - reflow->arrow_cursor = NULL; - reflow->default_cursor = NULL; - - e_canvas_item_set_reflow_callback(GNOME_CANVAS_ITEM(reflow), e_reflow_reflow); -} - -static void -e_reflow_set_arg (GtkObject *o, GtkArg *arg, guint arg_id) -{ - GnomeCanvasItem *item; - EReflow *e_reflow; - - item = GNOME_CANVAS_ITEM (o); - e_reflow = E_REFLOW (o); - - switch (arg_id){ - case ARG_HEIGHT: - e_reflow->height = GTK_VALUE_DOUBLE (*arg); - e_canvas_item_request_reflow(item); - break; - case ARG_MINIMUM_WIDTH: - e_reflow->minimum_width = GTK_VALUE_DOUBLE (*arg); - e_canvas_item_request_reflow(item); - break; - } -} - -static void -e_reflow_get_arg (GtkObject *object, GtkArg *arg, guint arg_id) -{ - EReflow *e_reflow; - - e_reflow = E_REFLOW (object); - - switch (arg_id) { - case ARG_MINIMUM_WIDTH: - GTK_VALUE_DOUBLE (*arg) = e_reflow->minimum_width; - break; - case ARG_WIDTH: - GTK_VALUE_DOUBLE (*arg) = e_reflow->width; - break; - case ARG_HEIGHT: - GTK_VALUE_DOUBLE (*arg) = e_reflow->height; - break; - default: - arg->type = GTK_TYPE_INVALID; - break; - } -} - -static void -e_reflow_destroy (GtkObject *object) -{ - EReflow *reflow = E_REFLOW(object); - - g_list_foreach(reflow->items, (GFunc) gtk_object_unref, NULL); - g_list_free(reflow->items); - reflow->items = NULL; - - GTK_OBJECT_CLASS(parent_class)->destroy (object); -} - -static void -e_reflow_realize (GnomeCanvasItem *item) -{ - EReflow *e_reflow; - GnomeCanvasGroup *group; - GList *list; - GtkAdjustment *adjustment; - - e_reflow = E_REFLOW (item); - group = GNOME_CANVAS_GROUP( item ); - - if (GNOME_CANVAS_ITEM_CLASS(parent_class)->realize) - (* GNOME_CANVAS_ITEM_CLASS(parent_class)->realize) (item); - - e_reflow->arrow_cursor = gdk_cursor_new (GDK_SB_H_DOUBLE_ARROW); - e_reflow->default_cursor = gdk_cursor_new (GDK_LEFT_PTR); - - for(list = e_reflow->items; list; list = g_list_next(list)) { - GnomeCanvasItem *item = GNOME_CANVAS_ITEM(list->data); - gnome_canvas_item_set(item, - "width", (double) e_reflow->column_width, - NULL); - } - - e_canvas_item_request_reflow(item); - - adjustment = gtk_layout_get_hadjustment(GTK_LAYOUT(item->canvas)); - adjustment->step_increment = (e_reflow->column_width + E_REFLOW_FULL_GUTTER) / 2; - adjustment->page_increment = adjustment->page_size - adjustment->step_increment; - gtk_adjustment_changed(adjustment); - - if (!item->canvas->aa) { - } -} - -static void -e_reflow_unrealize (GnomeCanvasItem *item) -{ - EReflow *e_reflow; - - e_reflow = E_REFLOW (item); - - if (!item->canvas->aa) - { - } - - gdk_cursor_destroy (e_reflow->arrow_cursor); - gdk_cursor_destroy (e_reflow->default_cursor); - e_reflow->arrow_cursor = NULL; - e_reflow->default_cursor = NULL; - - g_list_free (e_reflow->columns); - e_reflow->columns = NULL; - - if (GNOME_CANVAS_ITEM_CLASS(parent_class)->unrealize) - (* GNOME_CANVAS_ITEM_CLASS(parent_class)->unrealize) (item); -} - -static gint -e_reflow_pick_line (EReflow *e_reflow, double x) -{ - x += E_REFLOW_BORDER_WIDTH + E_REFLOW_DIVIDER_WIDTH; - x /= e_reflow->column_width + E_REFLOW_FULL_GUTTER; - return x; -} - -static gboolean -e_reflow_event (GnomeCanvasItem *item, GdkEvent *event) -{ - EReflow *e_reflow; - - e_reflow = E_REFLOW (item); - - switch( event->type ) - { - case GDK_KEY_PRESS: - if (event->key.keyval == GDK_Tab || - event->key.keyval == GDK_KP_Tab || - event->key.keyval == GDK_ISO_Left_Tab) { - GList *list; - for (list = e_reflow->items; list; list = list->next) { - GnomeCanvasItem *item = GNOME_CANVAS_ITEM (list->data); - EFocus has_focus; - gtk_object_get(GTK_OBJECT(item), - "has_focus", &has_focus, - NULL); - if (has_focus) { - if (event->key.state & GDK_SHIFT_MASK) - list = list->prev; - else - list = list->next; - if (list) { - item = GNOME_CANVAS_ITEM(list->data); - gnome_canvas_item_set(item, - "has_focus", (event->key.state & GDK_SHIFT_MASK) ? E_FOCUS_END : E_FOCUS_START, - NULL); - return 1; - } else { - return 0; - } - } - } - } - break; - case GDK_BUTTON_PRESS: - switch(event->button.button) - { - case 1: - { - GdkEventButton *button = (GdkEventButton *) event; - double n_x; - n_x = button->x; - n_x += E_REFLOW_BORDER_WIDTH + E_REFLOW_DIVIDER_WIDTH; - n_x = fmod(n_x,(e_reflow->column_width + E_REFLOW_FULL_GUTTER)); - if ( button->y >= E_REFLOW_BORDER_WIDTH && button->y <= e_reflow->height - E_REFLOW_BORDER_WIDTH && n_x < E_REFLOW_FULL_GUTTER ) { - e_reflow->which_column_dragged = e_reflow_pick_line(e_reflow, button->x); - e_reflow->start_x = e_reflow->which_column_dragged * (e_reflow->column_width + E_REFLOW_FULL_GUTTER) - E_REFLOW_DIVIDER_WIDTH / 2; - e_reflow->temp_column_width = e_reflow->column_width; - e_reflow->column_drag = TRUE; - - gnome_canvas_item_grab (item, - GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK, - e_reflow->arrow_cursor, - button->time); - - e_reflow->previous_temp_column_width = -1; - e_reflow->need_column_resize = TRUE; - gnome_canvas_item_request_update(item); - return TRUE; - } - } - break; - case 4: - { - GtkAdjustment *adjustment = gtk_layout_get_hadjustment(GTK_LAYOUT(item->canvas)); - gdouble new_value = adjustment->value; - new_value -= adjustment->step_increment; - gtk_adjustment_set_value(adjustment, new_value); - } - break; - case 5: - { - GtkAdjustment *adjustment = gtk_layout_get_hadjustment(GTK_LAYOUT(item->canvas)); - gdouble new_value = adjustment->value; - new_value += adjustment->step_increment; - if ( new_value > adjustment->upper - adjustment->page_size ) - new_value = adjustment->upper - adjustment->page_size; - gtk_adjustment_set_value(adjustment, new_value); - } - break; - } - break; - case GDK_BUTTON_RELEASE: - if (e_reflow->column_drag) { - gdouble old_width = e_reflow->column_width; - GdkEventButton *button = (GdkEventButton *) event; - GtkAdjustment *adjustment = gtk_layout_get_hadjustment(GTK_LAYOUT(item->canvas)); - e_reflow->temp_column_width = e_reflow->column_width + - (button->x - e_reflow->start_x)/(e_reflow->which_column_dragged - e_reflow_pick_line(e_reflow, adjustment->value)); - if ( e_reflow->temp_column_width < 50 ) - e_reflow->temp_column_width = 50; - e_reflow->column_drag = FALSE; - if ( old_width != e_reflow->temp_column_width ) { - gtk_adjustment_set_value(adjustment, adjustment->value + e_reflow_pick_line(e_reflow, adjustment->value) * (e_reflow->temp_column_width - e_reflow->column_width)); - e_reflow->column_width = e_reflow->temp_column_width; - adjustment->step_increment = (e_reflow->column_width + E_REFLOW_FULL_GUTTER) / 2; - adjustment->page_increment = adjustment->page_size - adjustment->step_increment; - gtk_adjustment_changed(adjustment); - e_reflow_resize_children(item); - e_canvas_item_request_reflow(item); - } - e_reflow->need_column_resize = TRUE; - gnome_canvas_item_request_update(item); - gnome_canvas_item_ungrab (item, button->time); - return TRUE; - } - break; - case GDK_MOTION_NOTIFY: - if (e_reflow->column_drag) { - double old_width = e_reflow->temp_column_width; - GdkEventMotion *motion = (GdkEventMotion *) event; - GtkAdjustment *adjustment = gtk_layout_get_hadjustment(GTK_LAYOUT(item->canvas)); - e_reflow->temp_column_width = e_reflow->column_width + - (motion->x - e_reflow->start_x)/(e_reflow->which_column_dragged - e_reflow_pick_line(e_reflow, adjustment->value)); - if (e_reflow->temp_column_width < 50) - e_reflow->temp_column_width = 50; - if (old_width != e_reflow->temp_column_width) { - e_reflow->need_column_resize = TRUE; - gnome_canvas_item_request_update(item); - } - return TRUE; - } else { - GdkEventMotion *motion = (GdkEventMotion *) event; - double n_x; - n_x = motion->x; - n_x += E_REFLOW_BORDER_WIDTH + E_REFLOW_DIVIDER_WIDTH; - n_x = fmod(n_x,(e_reflow->column_width + E_REFLOW_FULL_GUTTER)); - if ( motion->y >= E_REFLOW_BORDER_WIDTH && motion->y <= e_reflow->height - E_REFLOW_BORDER_WIDTH && n_x < E_REFLOW_FULL_GUTTER ) { - if ( e_reflow->default_cursor_shown ) { - gdk_window_set_cursor(GTK_WIDGET(item->canvas)->window, e_reflow->arrow_cursor); - e_reflow->default_cursor_shown = FALSE; - } - } else - if ( ! e_reflow->default_cursor_shown ) { - gdk_window_set_cursor(GTK_WIDGET(item->canvas)->window, e_reflow->default_cursor); - e_reflow->default_cursor_shown = TRUE; - } - - } - break; - case GDK_ENTER_NOTIFY: - if (!e_reflow->column_drag) { - GdkEventCrossing *crossing = (GdkEventCrossing *) event; - double n_x; - n_x = crossing->x; - n_x += E_REFLOW_BORDER_WIDTH + E_REFLOW_DIVIDER_WIDTH; - n_x = fmod(n_x,(e_reflow->column_width + E_REFLOW_FULL_GUTTER)); - if ( crossing->y >= E_REFLOW_BORDER_WIDTH && crossing->y <= e_reflow->height - E_REFLOW_BORDER_WIDTH && n_x < E_REFLOW_FULL_GUTTER ) { - if ( e_reflow->default_cursor_shown ) { - gdk_window_set_cursor(GTK_WIDGET(item->canvas)->window, e_reflow->arrow_cursor); - e_reflow->default_cursor_shown = FALSE; - } - } - } - break; - case GDK_LEAVE_NOTIFY: - if (!e_reflow->column_drag) { - GdkEventCrossing *crossing = (GdkEventCrossing *) event; - double n_x; - n_x = crossing->x; - n_x += E_REFLOW_BORDER_WIDTH + E_REFLOW_DIVIDER_WIDTH; - n_x = fmod(n_x,(e_reflow->column_width + E_REFLOW_FULL_GUTTER)); - if ( !( crossing->y >= E_REFLOW_BORDER_WIDTH && crossing->y <= e_reflow->height - E_REFLOW_BORDER_WIDTH && n_x < E_REFLOW_FULL_GUTTER ) ) { - if ( ! e_reflow->default_cursor_shown ) { - gdk_window_set_cursor(GTK_WIDGET(item->canvas)->window, e_reflow->default_cursor); - e_reflow->default_cursor_shown = TRUE; - } - } - } - break; - default: - break; - } - - if (GNOME_CANVAS_ITEM_CLASS( parent_class )->event) - return (* GNOME_CANVAS_ITEM_CLASS( parent_class )->event) (item, event); - else - return 0; -} - -static void -e_reflow_real_add_item(EReflow *e_reflow, GnomeCanvasItem *item) -{ - e_reflow->items = g_list_append(e_reflow->items, item); - gtk_object_ref(GTK_OBJECT(item)); - if ( GTK_OBJECT_FLAGS( e_reflow ) & GNOME_CANVAS_ITEM_REALIZED ) { - gnome_canvas_item_set(item, - "width", (double) e_reflow->column_width, - NULL); - e_canvas_item_request_reflow(item); - } - -} - -static void e_reflow_draw (GnomeCanvasItem *item, GdkDrawable *drawable, - int x, int y, int width, int height) -{ - int x_rect, y_rect, width_rect, height_rect; - gdouble running_width; - EReflow *e_reflow = E_REFLOW(item); - int i; - double column_width; - - if (GNOME_CANVAS_ITEM_CLASS(parent_class)->draw) - GNOME_CANVAS_ITEM_CLASS(parent_class)->draw (item, drawable, x, y, width, height); - column_width = e_reflow->column_width; - running_width = E_REFLOW_BORDER_WIDTH + column_width + E_REFLOW_BORDER_WIDTH; - x_rect = running_width; - y_rect = E_REFLOW_BORDER_WIDTH; - width_rect = E_REFLOW_DIVIDER_WIDTH; - height_rect = e_reflow->height - (E_REFLOW_BORDER_WIDTH * 2); - - /* Compute first column to draw. */ - i = x; - i /= column_width + E_REFLOW_FULL_GUTTER; - running_width += i * (column_width + E_REFLOW_FULL_GUTTER); - - for ( ; i < e_reflow->column_count; i++) { - if ( running_width > x + width ) - break; - x_rect = running_width; - gtk_paint_flat_box(GTK_WIDGET(item->canvas)->style, - drawable, - GTK_STATE_ACTIVE, - GTK_SHADOW_NONE, - NULL, - GTK_WIDGET(item->canvas), - "reflow", - x_rect - x, - y_rect - y, - width_rect, - height_rect); - running_width += E_REFLOW_DIVIDER_WIDTH + E_REFLOW_BORDER_WIDTH + column_width + E_REFLOW_BORDER_WIDTH; - } - if (e_reflow->column_drag) { - int start_line = e_reflow_pick_line(e_reflow, - gtk_layout_get_hadjustment(GTK_LAYOUT(item->canvas))->value); - i = x - start_line * (column_width + E_REFLOW_FULL_GUTTER); - running_width = start_line * (column_width + E_REFLOW_FULL_GUTTER); - column_width = e_reflow->temp_column_width; - running_width -= start_line * (column_width + E_REFLOW_FULL_GUTTER); - i += start_line * (column_width + E_REFLOW_FULL_GUTTER); - running_width += E_REFLOW_BORDER_WIDTH + column_width + E_REFLOW_BORDER_WIDTH; - x_rect = running_width; - y_rect = E_REFLOW_BORDER_WIDTH; - width_rect = E_REFLOW_DIVIDER_WIDTH; - height_rect = e_reflow->height - (E_REFLOW_BORDER_WIDTH * 2); - - /* Compute first column to draw. */ - i /= column_width + E_REFLOW_FULL_GUTTER; - running_width += i * (column_width + E_REFLOW_FULL_GUTTER); - - for ( ; i < e_reflow->column_count; i++) { - if ( running_width > x + width ) - break; - x_rect = running_width; - gdk_draw_rectangle(drawable, - GTK_WIDGET(item->canvas)->style->fg_gc[GTK_STATE_NORMAL], - TRUE, - x_rect - x, - y_rect - y, - width_rect - 1, - height_rect - 1); - running_width += E_REFLOW_DIVIDER_WIDTH + E_REFLOW_BORDER_WIDTH + column_width + E_REFLOW_BORDER_WIDTH; - } - } -} - -static void -e_reflow_update (GnomeCanvasItem *item, double affine[6], ArtSVP *clip_path, gint flags) -{ - EReflow *e_reflow; - double x0, x1, y0, y1; - - e_reflow = E_REFLOW (item); - - if (GNOME_CANVAS_ITEM_CLASS(parent_class)->update) - GNOME_CANVAS_ITEM_CLASS(parent_class)->update (item, affine, clip_path, flags); - - x0 = item->x1; - y0 = item->y1; - x1 = item->x2; - y1 = item->y2; - if ( x1 < x0 + e_reflow->width ) - x1 = x0 + e_reflow->width; - if ( y1 < y0 + e_reflow->height ) - y1 = y0 + e_reflow->height; - item->x2 = x1; - item->y2 = y1; - - if (e_reflow->need_height_update) { - x0 = item->x1; - y0 = item->y1; - x1 = item->x2; - y1 = item->y2; - if ( x0 > 0 ) - x0 = 0; - if ( y0 > 0 ) - y0 = 0; - if ( x1 < E_REFLOW(item)->width ) - x1 = E_REFLOW(item)->width; - if ( x1 < E_REFLOW(item)->height ) - x1 = E_REFLOW(item)->height; - - gnome_canvas_request_redraw(item->canvas, x0, y0, x1, y1); - e_reflow->need_height_update = FALSE; - } else if (e_reflow->need_column_resize) { - int x_rect, y_rect, width_rect, height_rect; - int start_line = e_reflow_pick_line(e_reflow, - gtk_layout_get_hadjustment(GTK_LAYOUT(item->canvas))->value); - gdouble running_width; - int i; - double column_width; - - if ( e_reflow->previous_temp_column_width != -1 ) { - running_width = start_line * (e_reflow->column_width + E_REFLOW_FULL_GUTTER); - column_width = e_reflow->previous_temp_column_width; - running_width -= start_line * (column_width + E_REFLOW_FULL_GUTTER); - running_width += E_REFLOW_BORDER_WIDTH + column_width + E_REFLOW_BORDER_WIDTH; - y_rect = E_REFLOW_BORDER_WIDTH; - width_rect = E_REFLOW_DIVIDER_WIDTH; - height_rect = e_reflow->height - (E_REFLOW_BORDER_WIDTH * 2); - - for ( i = 0; i < e_reflow->column_count; i++) { - x_rect = running_width; - gnome_canvas_request_redraw(item->canvas, x_rect, y_rect, x_rect + width_rect, y_rect + height_rect); - running_width += E_REFLOW_DIVIDER_WIDTH + E_REFLOW_BORDER_WIDTH + column_width + E_REFLOW_BORDER_WIDTH; - } - } - - if ( e_reflow->temp_column_width != -1 ) { - running_width = start_line * (e_reflow->column_width + E_REFLOW_FULL_GUTTER); - column_width = e_reflow->temp_column_width; - running_width -= start_line * (column_width + E_REFLOW_FULL_GUTTER); - running_width += E_REFLOW_BORDER_WIDTH + column_width + E_REFLOW_BORDER_WIDTH; - y_rect = E_REFLOW_BORDER_WIDTH; - width_rect = E_REFLOW_DIVIDER_WIDTH; - height_rect = e_reflow->height - (E_REFLOW_BORDER_WIDTH * 2); - - for ( i = 0; i < e_reflow->column_count; i++) { - x_rect = running_width; - gnome_canvas_request_redraw(item->canvas, x_rect, y_rect, x_rect + width_rect, y_rect + height_rect); - running_width += E_REFLOW_DIVIDER_WIDTH + E_REFLOW_BORDER_WIDTH + column_width + E_REFLOW_BORDER_WIDTH; - } - } - - e_reflow->previous_temp_column_width = e_reflow->temp_column_width; - e_reflow->need_column_resize = FALSE; - } -} - -static void -e_reflow_resize_children (GnomeCanvasItem *item) -{ - GList *list; - EReflow *e_reflow; - - e_reflow = E_REFLOW (item); - for ( list = e_reflow->items; list; list = list->next ) { - GnomeCanvasItem *child = GNOME_CANVAS_ITEM(list->data); - gnome_canvas_item_set(child, - "width", (double) e_reflow->column_width, - NULL); - } -} - -static double -e_reflow_point (GnomeCanvasItem *item, - double x, double y, int cx, int cy, - GnomeCanvasItem **actual_item) -{ - double distance = 1; - - if (GNOME_CANVAS_ITEM_CLASS(parent_class)->point) - distance = GNOME_CANVAS_ITEM_CLASS(parent_class)->point (item, x, y, cx, cy, actual_item); - if (*actual_item) - return 0; - - *actual_item = item; - return 0; -#if 0 - if (y >= E_REFLOW_BORDER_WIDTH && y <= e_reflow->height - E_REFLOW_BORDER_WIDTH) { - float n_x; - n_x = x; - n_x += E_REFLOW_BORDER_WIDTH + E_REFLOW_DIVIDER_WIDTH; - n_x = fmod(n_x, (e_reflow->column_width + E_REFLOW_FULL_GUTTER)); - if (n_x < E_REFLOW_FULL_GUTTER) { - *actual_item = item; - return 0; - } - } - return distance; -#endif -} - -static void -_reflow( EReflow *e_reflow ) -{ - gdouble running_height; - GList *list; - double item_height; - - if (e_reflow->columns) { - g_list_free (e_reflow->columns); - e_reflow->columns = NULL; - } - - e_reflow->column_count = 0; - - if (e_reflow->items == NULL) { - e_reflow->columns = NULL; - e_reflow->column_count = 1; - return; - } - - list = e_reflow->items; - - gtk_object_get (GTK_OBJECT(list->data), - "height", &item_height, - NULL); - running_height = E_REFLOW_BORDER_WIDTH + item_height + E_REFLOW_BORDER_WIDTH; - e_reflow->columns = g_list_append (e_reflow->columns, list); - e_reflow->column_count = 1; - - list = g_list_next(list); - - for ( ; list; list = g_list_next(list)) { - gtk_object_get (GTK_OBJECT(list->data), - "height", &item_height, - NULL); - if (running_height + item_height + E_REFLOW_BORDER_WIDTH > e_reflow->height) { - running_height = E_REFLOW_BORDER_WIDTH + item_height + E_REFLOW_BORDER_WIDTH; - e_reflow->columns = g_list_append (e_reflow->columns, list); - e_reflow->column_count ++; - } else { - running_height += item_height + E_REFLOW_BORDER_WIDTH; - } - } -} - -static void -e_reflow_reflow( GnomeCanvasItem *item, int flags ) -{ - EReflow *e_reflow = E_REFLOW(item); - if ( GTK_OBJECT_FLAGS( e_reflow ) & GNOME_CANVAS_ITEM_REALIZED ) { - - gdouble old_width; - gdouble running_width; - - _reflow (e_reflow); - - old_width = e_reflow->width; - - running_width = E_REFLOW_BORDER_WIDTH; - - if (e_reflow->items == NULL) { - } else { - GList *list; - GList *next_column; - gdouble item_height; - gdouble running_height; - - running_height = E_REFLOW_BORDER_WIDTH; - - list = e_reflow->items; - gtk_object_get (GTK_OBJECT(list->data), - "height", &item_height, - NULL); - e_canvas_item_move_absolute(GNOME_CANVAS_ITEM(list->data), - (double) running_width, - (double) running_height); - running_height += item_height + E_REFLOW_BORDER_WIDTH; - next_column = g_list_next(e_reflow->columns); - list = g_list_next(list); - - for( ; list; list = g_list_next(list)) { - gtk_object_get (GTK_OBJECT(list->data), - "height", &item_height, - NULL); - - if (next_column && (next_column->data == list)) { - next_column = g_list_next (next_column); - running_height = E_REFLOW_BORDER_WIDTH; - running_width += e_reflow->column_width + E_REFLOW_BORDER_WIDTH + E_REFLOW_DIVIDER_WIDTH + E_REFLOW_BORDER_WIDTH; - } - e_canvas_item_move_absolute(GNOME_CANVAS_ITEM(list->data), - (double) running_width, - (double) running_height); - - running_height += item_height + E_REFLOW_BORDER_WIDTH; - } - - } - e_reflow->width = running_width + e_reflow->column_width + E_REFLOW_BORDER_WIDTH; - if ( e_reflow->width < e_reflow->minimum_width ) - e_reflow->width = e_reflow->minimum_width; - if (old_width != e_reflow->width) - e_canvas_item_request_parent_reflow(item); - } -} - -void -e_reflow_add_item(EReflow *e_reflow, GnomeCanvasItem *item) -{ - if (E_REFLOW_CLASS(GTK_OBJECT(e_reflow)->klass)->add_item) - (E_REFLOW_CLASS(GTK_OBJECT(e_reflow)->klass)->add_item) (e_reflow, item); -} diff --git a/addressbook/gui/minicard/e-reflow.h b/addressbook/gui/minicard/e-reflow.h deleted file mode 100644 index 54de59ba55..0000000000 --- a/addressbook/gui/minicard/e-reflow.h +++ /dev/null @@ -1,106 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* e-reflow.h - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -#ifndef __E_REFLOW_H__ -#define __E_REFLOW_H__ - -#include - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus */ - -/* EReflow - A canvas item container. - * - * The following arguments are available: - * - * name type read/write description - * -------------------------------------------------------------------------------- - * minimum_width double RW minimum width of the reflow. width >= minimum_width - * width double R width of the reflow - * height double RW height of the reflow - */ - -#define E_REFLOW_TYPE (e_reflow_get_type ()) -#define E_REFLOW(obj) (GTK_CHECK_CAST ((obj), E_REFLOW_TYPE, EReflow)) -#define E_REFLOW_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_REFLOW_TYPE, EReflowClass)) -#define E_IS_REFLOW(obj) (GTK_CHECK_TYPE ((obj), E_REFLOW_TYPE)) -#define E_IS_REFLOW_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_REFLOW_TYPE)) - - -typedef struct _EReflow EReflow; -typedef struct _EReflowClass EReflowClass; - -struct _EReflow -{ - GnomeCanvasGroup parent; - - /* item specific fields */ - GList *items; /* Of type GnomeCanvasItem */ - GList *columns; /* Of type GList of type GnomeCanvasItem (points into items) */ - gint column_count; /* Number of columnns */ - - double minimum_width; - double width; - double height; - - double column_width; - - int idle; - - /* These are all for when the column is being dragged. */ - gboolean column_drag; - gdouble start_x; - gint which_column_dragged; - double temp_column_width; - double previous_temp_column_width; - - guint need_height_update : 1; - guint need_column_resize : 1; - - guint default_cursor_shown : 1; - GdkCursor *arrow_cursor; - GdkCursor *default_cursor; -}; - -struct _EReflowClass -{ - GnomeCanvasGroupClass parent_class; - - /* Virtual methods. */ - void (* add_item) (EReflow *reflow, GnomeCanvasItem *item); -}; - -/* - * To be added to a reflow, an item must have the argument "width" as - * a Read/Write argument and "height" as a Read Only argument. It - * should also do an ECanvas parent reflow request if its size - * changes. - */ -void e_reflow_add_item(EReflow *e_reflow, GnomeCanvasItem *item); -GtkType e_reflow_get_type (void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -#endif /* __E_REFLOW_H__ */ diff --git a/addressbook/gui/minicard/test-minicard-label.c b/addressbook/gui/minicard/test-minicard-label.c deleted file mode 100644 index adf092206c..0000000000 --- a/addressbook/gui/minicard/test-minicard-label.c +++ /dev/null @@ -1,128 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* test-minicard-label.c - * - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */ - - - -#include "config.h" - -#include -#include "e-minicard-label.h" -#include - -/* This is a horrible thing to do, but it is just a test. */ -GnomeCanvasItem *label; -GnomeCanvasItem *rect; - -static void destroy_callback(GtkWidget *app, gpointer data) -{ - exit(0); -} - -static void allocate_callback(GtkWidget *canvas, GtkAllocation *allocation, gpointer data) -{ - gnome_canvas_set_scroll_region(GNOME_CANVAS( canvas ), 0, 0, allocation->width, allocation->height ); - gnome_canvas_item_set( label, - "width", (double) allocation->width, - "height", (double) allocation->height, - NULL ); - gnome_canvas_item_set( rect, - "x2", (double) allocation->width, - "y2", (double) allocation->height, - NULL ); -} - -#if 0 -static void about_callback( GtkWidget *widget, gpointer data ) -{ - - const gchar *authors[] = - { - "Christopher James Lahey ", - NULL - }; - - GtkWidget *about = - gnome_about_new ( _( "Minicard Label Test" ), VERSION, - _( "Copyright (C) 2000, Helix Code, Inc." ), - authors, - _( "This should test the minicard label canvas item" ), - NULL); - gtk_widget_show (about); -} -#endif - -static void button_press_callback( GtkWidget *widget, gpointer data ) -{ - gnome_canvas_item_grab_focus( label ); -} - -int main( int argc, char *argv[] ) -{ - GtkWidget *app; - GtkWidget *canvas; - - /* bindtextdomain (PACKAGE, GNOMELOCALEDIR); - textdomain (PACKAGE);*/ - - gnome_init( "Minicard Label Test", VERSION, argc, argv); - app = gnome_app_new("Minicard Label Test", NULL); - - canvas = e_canvas_new(); - rect = gnome_canvas_item_new( gnome_canvas_root( GNOME_CANVAS( canvas ) ), - gnome_canvas_rect_get_type(), - "x1", (double) 0, - "y1", (double) 0, - "x2", (double) 100, - "y2", (double) 100, - "fill_color", "white", - NULL ); - label = e_minicard_label_new(gnome_canvas_root( GNOME_CANVAS( canvas ) )); - gnome_canvas_item_set( label, - "x", (double) 0, - "y", (double) 0, - "width", (double) 100, - "height", (double) 100, - "fieldname", "Full Name:", - "field", "Christopher James Lahey", - NULL ); - gnome_canvas_set_scroll_region ( GNOME_CANVAS( canvas ), - 0, 0, - 100, 100 ); - - gnome_app_set_contents( GNOME_APP( app ), canvas ); - - - /* Connect the signals */ - gtk_signal_connect( GTK_OBJECT( app ), "destroy", - GTK_SIGNAL_FUNC( destroy_callback ), - ( gpointer ) app ); - - gtk_signal_connect( GTK_OBJECT( canvas ), "size_allocate", - GTK_SIGNAL_FUNC( allocate_callback ), - ( gpointer ) app ); - - gtk_signal_connect( GTK_OBJECT( canvas ), "button_press_event", - GTK_SIGNAL_FUNC( button_press_callback ), - ( gpointer ) app ); - - gtk_widget_show_all( app ); - - gtk_main(); - - /* Not reached. */ - return 0; -} diff --git a/addressbook/gui/minicard/test-minicard-view.c b/addressbook/gui/minicard/test-minicard-view.c deleted file mode 100644 index c03d11d07e..0000000000 --- a/addressbook/gui/minicard/test-minicard-view.c +++ /dev/null @@ -1,206 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* test-reflow.c - * - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */ - -#include "config.h" - -#include -#include -#include -#include -#include "e-minicard-view.h" - -/* This is a horrible thing to do, but it is just a test. */ -GnomeCanvasItem *reflow; -GnomeCanvasItem *rect; -GtkAllocation last_alloc; - -CORBA_Environment ev; -CORBA_ORB orb; - -static void -init_bonobo (int argc, char **argv) -{ - - gnome_CORBA_init_with_popt_table ( - "Reflow Test", VERSION, - &argc, argv, NULL, 0, NULL, GNORBA_INIT_SERVER_FUNC, &ev); - - orb = gnome_CORBA_ORB (); - - if (bonobo_init (orb, NULL, NULL) == FALSE) - g_error (_("Could not initialize Bonobo")); - -} - -static void destroy_callback(GtkWidget *app, gpointer data) -{ - exit(0); -} - -static void allocate_callback(GtkWidget *canvas, GtkAllocation *allocation, gpointer data) -{ - double width; - last_alloc = *allocation; - gnome_canvas_item_set( reflow, - "height", (double) allocation->height, - NULL ); - gnome_canvas_item_set( reflow, - "minimum_width", (double) allocation->width, - NULL ); - gtk_object_get(GTK_OBJECT(reflow), - "width", &width, - NULL); - width = MAX(width, allocation->width); - gnome_canvas_set_scroll_region(GNOME_CANVAS( canvas ), 0, 0, width, allocation->height ); - gnome_canvas_item_set( rect, - "x2", (double) width, - "y2", (double) allocation->height, - NULL ); -} - -static void resize(GnomeCanvas *canvas, gpointer data) -{ - double width; - gtk_object_get(GTK_OBJECT(reflow), - "width", &width, - NULL); - width = MAX(width, last_alloc.width); - gnome_canvas_set_scroll_region(canvas , 0, 0, width, last_alloc.height ); - gnome_canvas_item_set( rect, - "x2", (double) width, - "y2", (double) last_alloc.height, - NULL ); -} - -#if 0 -static void about_callback( GtkWidget *widget, gpointer data ) -{ - - const gchar *authors[] = - { - "Christopher James Lahey ", - NULL - }; - - GtkWidget *about = - gnome_about_new ( _( "Reflow Test" ), VERSION, - _( "Copyright (C) 2000, Helix Code, Inc." ), - authors, - _( "This should test the reflow canvas item" ), - NULL); - gtk_widget_show (about); -} -#endif - -static void -book_open_cb (EBook *book, EBookStatus status, gpointer closure) -{ - if (status == E_BOOK_STATUS_SUCCESS) - gnome_canvas_item_set(reflow, - "book", book, - NULL); -} - -static guint -ebook_create (void) -{ - EBook *book; - - book = e_book_new (); - - if (!book) { - printf ("%s: %s(): Couldn't create EBook, bailing.\n", - __FILE__, - __FUNCTION__); - return FALSE; - } - - - if (! e_book_load_uri (book, "file:/tmp/test.db", book_open_cb, NULL)) { - printf ("error calling load_uri!\n"); - } - - - return FALSE; -} - -int main( int argc, char *argv[] ) -{ - GtkWidget *app; - GtkWidget *canvas; - GtkWidget *vbox; - GtkWidget *scrollbar; - - /* bindtextdomain (PACKAGE, GNOMELOCALEDIR); - textdomain (PACKAGE);*/ - - CORBA_exception_init (&ev); - init_bonobo (argc, argv); - - app = gnome_app_new("Reflow Test", NULL); - - vbox = gtk_vbox_new(FALSE, 0); - - canvas = e_canvas_new(); - rect = gnome_canvas_item_new( gnome_canvas_root( GNOME_CANVAS( canvas ) ), - gnome_canvas_rect_get_type(), - "x1", (double) 0, - "y1", (double) 0, - "x2", (double) 100, - "y2", (double) 100, - "fill_color", "white", - NULL ); - reflow = gnome_canvas_item_new( gnome_canvas_root( GNOME_CANVAS( canvas ) ), - e_minicard_view_get_type(), - "height", (double) 100, - "minimum_width", (double) 100, - NULL ); - gtk_signal_connect( GTK_OBJECT( canvas ), "reflow", - GTK_SIGNAL_FUNC( resize ), - ( gpointer ) app); - - gnome_canvas_set_scroll_region ( GNOME_CANVAS( canvas ), - 0, 0, - 100, 100 ); - - gtk_box_pack_start(GTK_BOX(vbox), canvas, TRUE, TRUE, 0); - - scrollbar = gtk_hscrollbar_new(gtk_layout_get_hadjustment(GTK_LAYOUT(canvas))); - - gtk_box_pack_start(GTK_BOX(vbox), scrollbar, FALSE, FALSE, 0); - - gnome_app_set_contents( GNOME_APP( app ), vbox ); - - /* Connect the signals */ - gtk_signal_connect( GTK_OBJECT( app ), "destroy", - GTK_SIGNAL_FUNC( destroy_callback ), - ( gpointer ) app ); - - gtk_signal_connect( GTK_OBJECT( canvas ), "size_allocate", - GTK_SIGNAL_FUNC( allocate_callback ), - ( gpointer ) app ); - - gtk_widget_show_all( app ); - gdk_window_set_back_pixmap( GTK_LAYOUT(canvas)->bin_window, NULL, FALSE); - - gtk_idle_add ((GtkFunction) ebook_create, NULL); - - bonobo_main (); - - /* Not reached. */ - return 0; -} diff --git a/addressbook/gui/minicard/test-minicard.c b/addressbook/gui/minicard/test-minicard.c deleted file mode 100644 index 1ad066b3fe..0000000000 --- a/addressbook/gui/minicard/test-minicard.c +++ /dev/null @@ -1,117 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* test-minicard.c - * - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */ - - - -#include "config.h" - -#include -#include "e-minicard.h" - -/* This is a horrible thing to do, but it is just a test. */ -GnomeCanvasItem *card; -GnomeCanvasItem *rect; - -static void destroy_callback(GtkWidget *app, gpointer data) -{ - exit(0); -} - -static void allocate_callback(GtkWidget *canvas, GtkAllocation *allocation, gpointer data) -{ - gnome_canvas_set_scroll_region(GNOME_CANVAS( canvas ), 0, 0, allocation->width, allocation->height ); - gnome_canvas_item_set( card, - "width", (double) allocation->width, - NULL ); - gnome_canvas_item_set( rect, - "x2", (double) allocation->width, - "y2", (double) allocation->height, - NULL ); -} - -#if 0 -static void about_callback( GtkWidget *widget, gpointer data ) -{ - - const gchar *authors[] = - { - "Christopher James Lahey ", - NULL - }; - - GtkWidget *about = - gnome_about_new ( _( "Minicard Test" ), VERSION, - _( "Copyright (C) 2000, Helix Code, Inc." ), - authors, - _( "This should test the minicard canvas item" ), - NULL); - gtk_widget_show (about); -} -#endif - -int main( int argc, char *argv[] ) -{ - GtkWidget *app; - GtkWidget *canvas; - int i; - - /* bindtextdomain (PACKAGE, GNOMELOCALEDIR); - textdomain (PACKAGE);*/ - - gnome_init( "Minicard Test", VERSION, argc, argv); - app = gnome_app_new("Minicard Test", NULL); - - canvas = gnome_canvas_new(); - rect = gnome_canvas_item_new( gnome_canvas_root( GNOME_CANVAS( canvas ) ), - gnome_canvas_rect_get_type(), - "x1", (double) 0, - "y1", (double) 0, - "x2", (double) 100, - "y2", (double) 100, - "fill_color", "white", - NULL ); - for ( i = 0; i < 1; i++ ) - { - card = gnome_canvas_item_new( gnome_canvas_root( GNOME_CANVAS( canvas ) ), - e_minicard_get_type(), - "x", (double) 0, - "y", (double) 0, - "width", (double) 100, - NULL ); - } - gnome_canvas_set_scroll_region ( GNOME_CANVAS( canvas ), - 0, 0, - 100, 100 ); - - gnome_app_set_contents( GNOME_APP( app ), canvas ); - - /* Connect the signals */ - gtk_signal_connect( GTK_OBJECT( app ), "destroy", - GTK_SIGNAL_FUNC( destroy_callback ), - ( gpointer ) app ); - - gtk_signal_connect( GTK_OBJECT( canvas ), "size_allocate", - GTK_SIGNAL_FUNC( allocate_callback ), - ( gpointer ) app ); - - gtk_widget_show_all( app ); - - gtk_main(); - - /* Not reached. */ - return 0; -} diff --git a/addressbook/gui/minicard/test-reflow.c b/addressbook/gui/minicard/test-reflow.c deleted file mode 100644 index 4817d13120..0000000000 --- a/addressbook/gui/minicard/test-reflow.c +++ /dev/null @@ -1,193 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* test-reflow.c - * - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */ - - -#define TEST_VCARD \ -"BEGIN:VCARD -" \ -"FN:Nat -" \ -"N:Friedman;Nat;D;Mr. -" \ -"TITLE:Head Geek -" \ -"BDAY:1977-08-06 -" \ -"TEL;WORK:617 679 1984 -" \ -"TEL;CELL:123 456 7890 -" \ -"EMAIL;INTERNET:nat@nat.org -" \ -"EMAIL;INTERNET:nat@helixcode.com -" \ -"ADR;WORK;POSTAL:P.O. Box 101;;;Any Town;CA;91921-1234; -" \ -"ADR;HOME;POSTAL;INTL:P.O. Box 202;;;Any Town 2;MI;12344-4321;USA -" \ -"END:VCARD -" \ -" -" - - -#include "config.h" - -#include -#include -#include "e-reflow.h" -#include "e-minicard.h" - -/* This is a horrible thing to do, but it is just a test. */ -GnomeCanvasItem *reflow; -GnomeCanvasItem *rect; -GtkAllocation last_alloc; - -static void destroy_callback(GtkWidget *app, gpointer data) -{ - exit(0); -} - -static void allocate_callback(GtkWidget *canvas, GtkAllocation *allocation, gpointer data) -{ - double width; - last_alloc = *allocation; - gnome_canvas_item_set( reflow, - "height", (double) allocation->height, - NULL ); - gnome_canvas_item_set( reflow, - "minimum_width", (double) allocation->width, - NULL ); - gtk_object_get(GTK_OBJECT(reflow), - "width", &width, - NULL); - width = MAX(width, allocation->width); - gnome_canvas_set_scroll_region(GNOME_CANVAS( canvas ), 0, 0, width, allocation->height ); - gnome_canvas_item_set( rect, - "x2", (double) width, - "y2", (double) allocation->height, - NULL ); -} - -static void resize(GnomeCanvas *canvas, gpointer data) -{ - double width; - gtk_object_get(GTK_OBJECT(reflow), - "width", &width, - NULL); - width = MAX(width, last_alloc.width); - gnome_canvas_set_scroll_region(canvas , 0, 0, width, last_alloc.height ); - gnome_canvas_item_set( rect, - "x2", (double) width, - "y2", (double) last_alloc.height, - NULL ); -} - -#if 0 -static void about_callback( GtkWidget *widget, gpointer data ) -{ - - const gchar *authors[] = - { - "Christopher James Lahey ", - NULL - }; - - GtkWidget *about = - gnome_about_new ( _( "Reflow Test" ), VERSION, - _( "Copyright (C) 2000, Helix Code, Inc." ), - authors, - _( "This should test the reflow canvas item" ), - NULL); - gtk_widget_show (about); -} -#endif - -int main( int argc, char *argv[] ) -{ - GtkWidget *app; - GtkWidget *canvas; - GtkWidget *vbox; - GtkWidget *scrollbar; - int i; - - /* bindtextdomain (PACKAGE, GNOMELOCALEDIR); - textdomain (PACKAGE);*/ - - gnome_init( "Reflow Test", VERSION, argc, argv); - app = gnome_app_new("Reflow Test", NULL); - - vbox = gtk_vbox_new(FALSE, 0); - - canvas = e_canvas_new(); - rect = gnome_canvas_item_new( gnome_canvas_root( GNOME_CANVAS( canvas ) ), - gnome_canvas_rect_get_type(), - "x1", (double) 0, - "y1", (double) 0, - "x2", (double) 100, - "y2", (double) 100, - "fill_color", "white", - NULL ); - reflow = gnome_canvas_item_new( gnome_canvas_root( GNOME_CANVAS( canvas ) ), - e_reflow_get_type(), - "x", (double) 0, - "y", (double) 0, - "height", (double) 100, - "minimum_width", (double) 100, - NULL ); - gtk_signal_connect( GTK_OBJECT( canvas ), "reflow", - GTK_SIGNAL_FUNC( resize ), - ( gpointer ) app); - for ( i = 0; i < 200; i++ ) - { - GnomeCanvasItem *item; - ECard *card = e_card_new (TEST_VCARD); - item = gnome_canvas_item_new( GNOME_CANVAS_GROUP(reflow), - e_minicard_get_type(), - "card", card, - NULL); - e_reflow_add_item(E_REFLOW(reflow), item); - } - gnome_canvas_set_scroll_region ( GNOME_CANVAS( canvas ), - 0, 0, - 100, 100 ); - - gtk_box_pack_start(GTK_BOX(vbox), canvas, TRUE, TRUE, 0); - - scrollbar = gtk_hscrollbar_new(gtk_layout_get_hadjustment(GTK_LAYOUT(canvas))); - - gtk_box_pack_start(GTK_BOX(vbox), scrollbar, FALSE, FALSE, 0); - - gnome_app_set_contents( GNOME_APP( app ), vbox ); - - /* Connect the signals */ - gtk_signal_connect( GTK_OBJECT( app ), "destroy", - GTK_SIGNAL_FUNC( destroy_callback ), - ( gpointer ) app ); - - gtk_signal_connect( GTK_OBJECT( canvas ), "size_allocate", - GTK_SIGNAL_FUNC( allocate_callback ), - ( gpointer ) app ); - - gtk_widget_show_all( app ); - gdk_window_set_back_pixmap( GTK_LAYOUT(canvas)->bin_window, NULL, FALSE); - - gtk_main(); - - /* Not reached. */ - return 0; -} diff --git a/addressbook/gui/widgets/Makefile.am b/addressbook/gui/widgets/Makefile.am deleted file mode 100644 index cc96918a77..0000000000 --- a/addressbook/gui/widgets/Makefile.am +++ /dev/null @@ -1,91 +0,0 @@ -INCLUDES = \ - -DG_LOG_DOMAIN=\"e-minicard\" \ - -I$(top_srcdir) \ - -I$(top_srcdir)/addressbook/backend \ - -I$(top_builddir)/addressbook/backend \ - -I$(top_srcdir)/addressbook/contact-editor \ - -I$(top_srcdir)/widgets/e-text \ - $(BONOBO_GNOME_CFLAGS) - -noinst_LIBRARIES = \ - libeminicard.a - -libeminicard_a_SOURCES = \ - e-minicard.c \ - e-minicard.h \ - e-minicard-label.c \ - e-minicard-label.h \ - e-minicard-view.c \ - e-minicard-view.h \ - e-reflow-sorted.c \ - e-reflow-sorted.h \ - e-reflow.c \ - e-reflow.h - -noinst_PROGRAMS = \ - minicard-label-test \ - minicard-test \ - reflow-test \ - minicard-view-test - -minicard_label_test_SOURCES = \ - test-minicard-label.c - -minicard_label_test_LDADD = \ - $(EXTRA_GNOME_LIBS) \ - $(GNOMEGNORBA_LIBS) \ - libeminicard.a \ - -lbonobo \ - $(top_builddir)/e-util/libeutil.la \ - $(top_builddir)/widgets/e-text/libetext.a - -minicard_test_SOURCES = \ - test-minicard.c - -minicard_test_LDADD = \ - $(EXTRA_GNOME_LIBS) \ - $(GNOMEGNORBA_LIBS) \ - libeminicard.a \ - -lbonobo \ - $(top_builddir)/addressbook/backend/ebook/libebook.la \ - $(top_builddir)/e-util/libeutil.la \ - $(top_builddir)/libversit/libversit.la \ - $(top_builddir)/addressbook/ename/libename.la \ - $(top_builddir)/addressbook/contact-editor/libecontacteditor.a \ - $(top_builddir)/widgets/e-table/libetable.a \ - $(top_builddir)/e-util/libeutil.la \ - $(top_builddir)/widgets/e-text/libetext.a - -reflow_test_SOURCES = \ - test-reflow.c - -reflow_test_LDADD = \ - $(EXTRA_GNOME_LIBS) \ - $(GNOMEGNORBA_LIBS) \ - libeminicard.a \ - -lbonobo \ - $(top_builddir)/addressbook/backend/ebook/libebook.la \ - $(top_builddir)/e-util/libeutil.la \ - $(top_builddir)/libversit/libversit.la \ - $(top_builddir)/addressbook/ename/libename.la \ - $(top_builddir)/addressbook/contact-editor/libecontacteditor.a \ - $(top_builddir)/widgets/e-table/libetable.a \ - $(top_builddir)/e-util/libeutil.la \ - $(top_builddir)/widgets/e-text/libetext.a - -minicard_view_test_SOURCES = \ - test-minicard-view.c - -minicard_view_test_LDADD = \ - $(EXTRA_GNOME_LIBS) \ - $(GNOMEGNORBA_LIBS) \ - libeminicard.a \ - -lbonobo \ - $(top_builddir)/addressbook/backend/ebook/libebook.la \ - $(top_builddir)/e-util/libeutil.la \ - $(top_builddir)/libversit/libversit.la \ - $(top_builddir)/addressbook/ename/libename.la \ - $(top_builddir)/addressbook/contact-editor/libecontacteditor.a \ - $(top_builddir)/widgets/e-table/libetable.a \ - $(top_builddir)/e-util/libeutil.la \ - $(top_builddir)/widgets/e-text/libetext.a diff --git a/addressbook/gui/widgets/e-addressbook-model.c b/addressbook/gui/widgets/e-addressbook-model.c deleted file mode 100644 index 5d71757b60..0000000000 --- a/addressbook/gui/widgets/e-addressbook-model.c +++ /dev/null @@ -1,381 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * - * Author: - * Christopher James Lahey - * - * (C) 1999 Helix Code, Inc. - */ - -#include -#include "e-addressbook-model.h" -#include -#include -#include -#include - -#define PARENT_TYPE e_table_model_get_type() -/* - * EAddressbookModel callbacks - * These are the callbacks that define the behavior of our custom model. - */ -static void e_addressbook_model_set_arg (GtkObject *o, GtkArg *arg, guint arg_id); -static void e_addressbook_model_get_arg (GtkObject *object, GtkArg *arg, guint arg_id); - - -enum { - ARG_0, - ARG_BOOK, - ARG_QUERY, -}; - -static void -addressbook_destroy(GtkObject *object) -{ - EAddressbookModel *model = E_ADDRESSBOOK_MODEL(object); - int i; - - if (model->get_view_idle) - g_source_remove(model->get_view_idle); - if (model->book_view && model->create_card_id) - gtk_signal_disconnect(GTK_OBJECT (model->book_view), - model->create_card_id); - if (model->book_view && model->remove_card_id) - gtk_signal_disconnect(GTK_OBJECT (model->book_view), - model->remove_card_id); - if (model->book_view && model->modify_card_id) - gtk_signal_disconnect(GTK_OBJECT (model->book_view), - model->modify_card_id); - if (model->book) - gtk_object_unref(GTK_OBJECT(model->book)); - if (model->book_view) - gtk_object_unref(GTK_OBJECT(model->book_view)); - - for ( i = 0; i < model->data_count; i++ ) { - gtk_object_unref(GTK_OBJECT(model->data[i])); - } - g_free(model->data); -} - -/* This function returns the number of columns in our ETableModel. */ -static int -addressbook_col_count (ETableModel *etc) -{ - return E_CARD_SIMPLE_FIELD_LAST; -} - -/* This function returns the number of rows in our ETableModel. */ -static int -addressbook_row_count (ETableModel *etc) -{ - EAddressbookModel *addressbook = E_ADDRESSBOOK_MODEL(etc); - return addressbook->data_count; -} - -/* This function returns the value at a particular point in our ETableModel. */ -static void * -addressbook_value_at (ETableModel *etc, int col, int row) -{ - EAddressbookModel *addressbook = E_ADDRESSBOOK_MODEL(etc); - const char *value; - if ( col >= E_CARD_SIMPLE_FIELD_LAST - 1|| row >= addressbook->data_count ) - return NULL; - value = e_card_simple_get_const(addressbook->data[row], - col + 1); - return (void *)(value ? value : ""); -} - -/* This function sets the value at a particular point in our ETableModel. */ -static void -addressbook_set_value_at (ETableModel *etc, int col, int row, const void *val) -{ - EAddressbookModel *addressbook = E_ADDRESSBOOK_MODEL(etc); - ECard *card; - if ( col >= E_CARD_SIMPLE_FIELD_LAST - 1|| row >= addressbook->data_count ) - return; - e_card_simple_set(addressbook->data[row], - col + 1, - val); - gtk_object_get(GTK_OBJECT(addressbook->data[row]), - "card", &card, - NULL); - e_book_commit_card(addressbook->book, card, NULL, NULL); - if ( !etc->frozen ) - e_table_model_cell_changed(etc, col, row); -} - -/* This function returns whether a particular cell is editable. */ -static gboolean -addressbook_is_cell_editable (ETableModel *etc, int col, int row) -{ - return TRUE; -} - -/* This function duplicates the value passed to it. */ -static void * -addressbook_duplicate_value (ETableModel *etc, int col, const void *value) -{ - return g_strdup(value); -} - -/* This function frees the value passed to it. */ -static void -addressbook_free_value (ETableModel *etc, int col, void *value) -{ - g_free(value); -} - -static void * -addressbook_initialize_value (ETableModel *etc, int col) -{ - return g_strdup(""); -} - -static gboolean -addressbook_value_is_empty (ETableModel *etc, int col, const void *value) -{ - return !(value && *(char *)value); -} - -/* This function is for when the model is unfrozen. This can mostly - be ignored for simple models. */ -static void -addressbook_thaw (ETableModel *etc) -{ - e_table_model_changed(etc); -} - -static void -create_card(EBookView *book_view, - const GList *cards, - EAddressbookModel *model) -{ - model->data = g_realloc(model->data, (model->data_count + g_list_length((GList *)cards)) * sizeof(ECard *)); - for ( ; cards; cards = cards->next) { - gtk_object_ref(GTK_OBJECT(cards->data)); - model->data[model->data_count++] = e_card_simple_new (E_CARD(cards->data)); - e_table_model_row_inserted(E_TABLE_MODEL(model), model->data_count - 1); - } -} - -static void -remove_card(EBookView *book_view, - const char *id, - EAddressbookModel *model) -{ - int i; - for ( i = 0; i < model->data_count; i++) { - if ( !strcmp(e_card_simple_get_id(model->data[i]), id) ) { - gtk_object_unref(GTK_OBJECT(model->data[i])); - memmove(model->data + i, model->data + i + 1, (model->data_count - i - 1) * sizeof (ECard *)); - e_table_model_row_deleted(E_TABLE_MODEL(model), i); - } - } -} - -static void -modify_card(EBookView *book_view, - const GList *cards, - EAddressbookModel *model) -{ - for ( ; cards; cards = cards->next) { - int i; - for ( i = 0; i < model->data_count; i++) { - if ( !strcmp(e_card_simple_get_id(model->data[i]), e_card_get_id(E_CARD(cards->data))) ) { - gtk_object_unref(GTK_OBJECT(model->data[i])); - model->data[i] = e_card_simple_new(E_CARD(cards->data)); - gtk_object_ref(GTK_OBJECT(model->data[i])); - e_table_model_row_changed(E_TABLE_MODEL(model), i); - break; - } - } - } -} - -static void -e_addressbook_model_class_init (GtkObjectClass *object_class) -{ - ETableModelClass *model_class = (ETableModelClass *) object_class; - - gtk_object_add_arg_type ("EAddressbookModel::book", GTK_TYPE_OBJECT, - GTK_ARG_READWRITE, ARG_BOOK); - gtk_object_add_arg_type ("EAddressbookModel::query", GTK_TYPE_STRING, - GTK_ARG_READWRITE, ARG_QUERY); - - object_class->destroy = addressbook_destroy; - object_class->set_arg = e_addressbook_model_set_arg; - object_class->get_arg = e_addressbook_model_get_arg; - - model_class->column_count = addressbook_col_count; - model_class->row_count = addressbook_row_count; - model_class->value_at = addressbook_value_at; - model_class->set_value_at = addressbook_set_value_at; - model_class->is_cell_editable = addressbook_is_cell_editable; - model_class->duplicate_value = addressbook_duplicate_value; - model_class->free_value = addressbook_free_value; - model_class->initialize_value = addressbook_initialize_value; - model_class->value_is_empty = addressbook_value_is_empty; - model_class->thaw = addressbook_thaw; -} - -static void -e_addressbook_model_init (GtkObject *object) -{ - EAddressbookModel *model = E_ADDRESSBOOK_MODEL(object); - model->book = NULL; - model->query = g_strdup("(contains \"full_name\" \"\")"); - model->book_view = NULL; - model->get_view_idle = 0; - model->create_card_id = 0; - model->remove_card_id = 0; - model->modify_card_id = 0; - model->data = NULL; - model->data_count = 0; -} - -static void -book_view_loaded (EBook *book, EBookStatus status, EBookView *book_view, gpointer closure) -{ - EAddressbookModel *model = closure; - int i; - if (model->book_view && model->create_card_id) - gtk_signal_disconnect(GTK_OBJECT (model->book_view), - model->create_card_id); - if (model->book_view && model->remove_card_id) - gtk_signal_disconnect(GTK_OBJECT (model->book_view), - model->remove_card_id); - if (model->book_view && model->modify_card_id) - gtk_signal_disconnect(GTK_OBJECT (model->book_view), - model->modify_card_id); - if (model->book_view) - gtk_object_unref(GTK_OBJECT(model->book_view)); - model->book_view = book_view; - if (model->book_view) - gtk_object_ref(GTK_OBJECT(model->book_view)); - model->create_card_id = gtk_signal_connect(GTK_OBJECT(model->book_view), - "card_added", - GTK_SIGNAL_FUNC(create_card), - model); - model->remove_card_id = gtk_signal_connect(GTK_OBJECT(model->book_view), - "card_removed", - GTK_SIGNAL_FUNC(remove_card), - model); - model->modify_card_id = gtk_signal_connect(GTK_OBJECT(model->book_view), - "card_changed", - GTK_SIGNAL_FUNC(modify_card), - model); - - for ( i = 0; i < model->data_count; i++ ) { - gtk_object_unref(GTK_OBJECT(model->data[i])); - } - g_free(model->data); - model->data = NULL; - model->data_count = 0; - e_table_model_changed(E_TABLE_MODEL(model)); -} - -static gboolean -get_view(EAddressbookModel *model) -{ - if (model->book && model->query) - e_book_get_book_view(model->book, model->query, book_view_loaded, model); - - model->get_view_idle = 0; - return FALSE; -} - -ECard * -e_addressbook_model_get_card(EAddressbookModel *model, - int row) -{ - if (model->data && row < model->data_count) { - ECard *card; - gtk_object_get(GTK_OBJECT(model->data[row]), - "card", &card, - NULL); - gtk_object_ref(GTK_OBJECT(card)); - return card; - } - return NULL; -} - -static void -e_addressbook_model_set_arg (GtkObject *o, GtkArg *arg, guint arg_id) -{ - EAddressbookModel *model; - - model = E_ADDRESSBOOK_MODEL (o); - - switch (arg_id){ - case ARG_BOOK: - if (model->book) - gtk_object_unref(GTK_OBJECT(model->book)); - model->book = E_BOOK(GTK_VALUE_OBJECT (*arg)); - if (model->book) { - gtk_object_ref(GTK_OBJECT(model->book)); - if (model->get_view_idle == 0) - model->get_view_idle = g_idle_add((GSourceFunc)get_view, model); - } - break; - case ARG_QUERY: - if (model->query) - g_free(model->query); - model->query = g_strdup(GTK_VALUE_STRING (*arg)); - if (model->get_view_idle == 0) - model->get_view_idle = g_idle_add((GSourceFunc)get_view, model); - break; - } -} - -static void -e_addressbook_model_get_arg (GtkObject *object, GtkArg *arg, guint arg_id) -{ - EAddressbookModel *e_addressbook_model; - - e_addressbook_model = E_ADDRESSBOOK_MODEL (object); - - switch (arg_id) { - case ARG_BOOK: - GTK_VALUE_OBJECT (*arg) = GTK_OBJECT(e_addressbook_model->book); - break; - case ARG_QUERY: - GTK_VALUE_STRING (*arg) = g_strdup(e_addressbook_model->query); - break; - default: - arg->type = GTK_TYPE_INVALID; - break; - } -} - -GtkType -e_addressbook_model_get_type (void) -{ - static GtkType type = 0; - - if (!type){ - GtkTypeInfo info = { - "EAddressbookModel", - sizeof (EAddressbookModel), - sizeof (EAddressbookModelClass), - (GtkClassInitFunc) e_addressbook_model_class_init, - (GtkObjectInitFunc) e_addressbook_model_init, - NULL, /* reserved 1 */ - NULL, /* reserved 2 */ - (GtkClassInitFunc) NULL - }; - - type = gtk_type_unique (PARENT_TYPE, &info); - } - - return type; -} - -ETableModel * -e_addressbook_model_new (void) -{ - EAddressbookModel *et; - - et = gtk_type_new (e_addressbook_model_get_type ()); - - return E_TABLE_MODEL(et); -} diff --git a/addressbook/gui/widgets/e-addressbook-model.h b/addressbook/gui/widgets/e-addressbook-model.h deleted file mode 100644 index bff9a21d00..0000000000 --- a/addressbook/gui/widgets/e-addressbook-model.h +++ /dev/null @@ -1,52 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -#ifndef _E_ADDRESSBOOK_MODEL_H_ -#define _E_ADDRESSBOOK_MODEL_H_ - -#include "e-table-model.h" -#include -#include -#include - -#define E_ADDRESSBOOK_MODEL_TYPE (e_addressbook_model_get_type ()) -#define E_ADDRESSBOOK_MODEL(o) (GTK_CHECK_CAST ((o), E_ADDRESSBOOK_MODEL_TYPE, EAddressbookModel)) -#define E_ADDRESSBOOK_MODEL_CLASS(k) (GTK_CHECK_CLASS_CAST((k), E_ADDRESSBOOK_MODEL_TYPE, EAddressbookModelClass)) -#define E_IS_ADDRESSBOOK_MODEL(o) (GTK_CHECK_TYPE ((o), E_ADDRESSBOOK_MODEL_TYPE)) -#define E_IS_ADDRESSBOOK_MODEL_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_ADDRESSBOOK_MODEL_TYPE)) - -/* Virtual Column list: - 0 Email - 1 Full Name - 2 Street - 3 Phone -*/ - -typedef struct { - ETableModel parent; - - /* item specific fields */ - EBook *book; - char *query; - EBookView *book_view; - - int get_view_idle; - - ECardSimple **data; - int data_count; - - int create_card_id, remove_card_id, modify_card_id; -} EAddressbookModel; - - -typedef struct { - ETableModelClass parent_class; -} EAddressbookModelClass; - - -GtkType e_addressbook_model_get_type (void); -ETableModel *e_addressbook_model_new (void); - -/* Returns object with ref count of 1. */ -ECard *e_addressbook_model_get_card(EAddressbookModel *model, - int row); - -#endif /* _E_ADDRESSBOOK_MODEL_H_ */ diff --git a/addressbook/gui/widgets/e-minicard-label.c b/addressbook/gui/widgets/e-minicard-label.c deleted file mode 100644 index e0e5c98118..0000000000 --- a/addressbook/gui/widgets/e-minicard-label.c +++ /dev/null @@ -1,421 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * e-minicard-label.c - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include -#include -#include "e-minicard-label.h" -#include "e-text.h" -#include -#include -#include - -static void e_minicard_label_init (EMinicardLabel *card); -static void e_minicard_label_class_init (EMinicardLabelClass *klass); -static void e_minicard_label_set_arg (GtkObject *o, GtkArg *arg, guint arg_id); -static void e_minicard_label_get_arg (GtkObject *object, GtkArg *arg, guint arg_id); -static gboolean e_minicard_label_event (GnomeCanvasItem *item, GdkEvent *event); -static void e_minicard_label_realize (GnomeCanvasItem *item); -static void e_minicard_label_unrealize (GnomeCanvasItem *item); -static void e_minicard_label_reflow(GnomeCanvasItem *item, int flags); - -static void e_minicard_label_resize_children( EMinicardLabel *e_minicard_label ); - -static GnomeCanvasGroupClass *parent_class = NULL; - -/* The arguments we take */ -enum { - ARG_0, - ARG_WIDTH, - ARG_HEIGHT, - ARG_HAS_FOCUS, - ARG_FIELD, - ARG_FIELDNAME, - ARG_TEXT_MODEL -}; - -GtkType -e_minicard_label_get_type (void) -{ - static GtkType minicard_label_type = 0; - - if (!minicard_label_type) - { - static const GtkTypeInfo minicard_label_info = - { - "EMinicardLabel", - sizeof (EMinicardLabel), - sizeof (EMinicardLabelClass), - (GtkClassInitFunc) e_minicard_label_class_init, - (GtkObjectInitFunc) e_minicard_label_init, - /* reserved_1 */ NULL, - /* reserved_2 */ NULL, - (GtkClassInitFunc) NULL, - }; - - minicard_label_type = gtk_type_unique (gnome_canvas_group_get_type (), &minicard_label_info); - } - - return minicard_label_type; -} - -static void -e_minicard_label_class_init (EMinicardLabelClass *klass) -{ - GtkObjectClass *object_class; - GnomeCanvasItemClass *item_class; - - object_class = (GtkObjectClass*) klass; - item_class = (GnomeCanvasItemClass *) klass; - - parent_class = gtk_type_class (gnome_canvas_group_get_type ()); - - gtk_object_add_arg_type ("EMinicardLabel::width", GTK_TYPE_DOUBLE, - GTK_ARG_READWRITE, ARG_WIDTH); - gtk_object_add_arg_type ("EMinicardLabel::height", GTK_TYPE_DOUBLE, - GTK_ARG_READABLE, ARG_HEIGHT); - gtk_object_add_arg_type ("EMinicardLabel::has_focus", GTK_TYPE_BOOL, - GTK_ARG_READWRITE, ARG_HAS_FOCUS); - gtk_object_add_arg_type ("EMinicardLabel::field", GTK_TYPE_STRING, - GTK_ARG_READWRITE, ARG_FIELD); - gtk_object_add_arg_type ("EMinicardLabel::fieldname", GTK_TYPE_STRING, - GTK_ARG_READWRITE, ARG_FIELDNAME); - gtk_object_add_arg_type ("EMinicardLabel::text_model", GTK_TYPE_OBJECT, - GTK_ARG_READWRITE, ARG_TEXT_MODEL); - - object_class->set_arg = e_minicard_label_set_arg; - object_class->get_arg = e_minicard_label_get_arg; - /* object_class->destroy = e_minicard_label_destroy; */ - - /* GnomeCanvasItem method overrides */ - item_class->realize = e_minicard_label_realize; - item_class->unrealize = e_minicard_label_unrealize; - item_class->event = e_minicard_label_event; -} - -static void -e_minicard_label_init (EMinicardLabel *minicard_label) -{ - minicard_label->width = 10; - minicard_label->height = 10; - minicard_label->rect = NULL; - minicard_label->fieldname = NULL; - minicard_label->field = NULL; - - e_canvas_item_set_reflow_callback(GNOME_CANVAS_ITEM(minicard_label), e_minicard_label_reflow); -} - -static void -e_minicard_label_set_arg (GtkObject *o, GtkArg *arg, guint arg_id) -{ - GnomeCanvasItem *item; - EMinicardLabel *e_minicard_label; - - item = GNOME_CANVAS_ITEM (o); - e_minicard_label = E_MINICARD_LABEL (o); - - switch (arg_id){ - case ARG_WIDTH: - e_minicard_label->width = GTK_VALUE_DOUBLE (*arg); - e_minicard_label_resize_children(e_minicard_label); - e_canvas_item_request_reflow (item); - break; - case ARG_HAS_FOCUS: - if (e_minicard_label->field && (GTK_VALUE_ENUM(*arg) != E_FOCUS_NONE)) - e_canvas_item_grab_focus(e_minicard_label->field); - break; - case ARG_FIELD: - gnome_canvas_item_set( e_minicard_label->field, "text", GTK_VALUE_STRING (*arg), NULL ); - break; - case ARG_FIELDNAME: - gnome_canvas_item_set( e_minicard_label->fieldname, "text", GTK_VALUE_STRING (*arg), NULL ); - break; - case ARG_TEXT_MODEL: - gnome_canvas_item_set( e_minicard_label->field, "model", GTK_VALUE_OBJECT (*arg), NULL); - break; - } -} - -static void -e_minicard_label_get_arg (GtkObject *object, GtkArg *arg, guint arg_id) -{ - EMinicardLabel *e_minicard_label; - char *temp; - ETextModel *tempmodel; - - e_minicard_label = E_MINICARD_LABEL (object); - - switch (arg_id) { - case ARG_WIDTH: - GTK_VALUE_DOUBLE (*arg) = e_minicard_label->width; - break; - case ARG_HEIGHT: - GTK_VALUE_DOUBLE (*arg) = e_minicard_label->height; - break; - case ARG_HAS_FOCUS: - GTK_VALUE_ENUM (*arg) = e_minicard_label->has_focus ? E_FOCUS_CURRENT : E_FOCUS_NONE; - break; - case ARG_FIELD: - gtk_object_get( GTK_OBJECT( e_minicard_label->field ), "text", &temp, NULL ); - GTK_VALUE_STRING (*arg) = temp; - break; - case ARG_FIELDNAME: - gtk_object_get( GTK_OBJECT( e_minicard_label->fieldname ), "text", &temp, NULL ); - GTK_VALUE_STRING (*arg) = temp; - break; - case ARG_TEXT_MODEL: - gtk_object_get( GTK_OBJECT( e_minicard_label->field ), "model", &tempmodel, NULL ); - GTK_VALUE_OBJECT (*arg) = GTK_OBJECT(tempmodel); - break; - default: - arg->type = GTK_TYPE_INVALID; - break; - } -} - -static void -e_minicard_label_realize (GnomeCanvasItem *item) -{ - if (GNOME_CANVAS_ITEM_CLASS( parent_class )->realize) - (* GNOME_CANVAS_ITEM_CLASS( parent_class )->realize) (item); - - e_canvas_item_request_reflow(item); - - if (!item->canvas->aa) - { - } -} - -void -e_minicard_label_construct (GnomeCanvasItem *item) -{ - EMinicardLabel *e_minicard_label; - GnomeCanvasGroup *group; - static GdkFont *font = NULL; - - if ( font == NULL ) { - font = gdk_font_load("lucidasans-10"); - } - - e_minicard_label = E_MINICARD_LABEL (item); - group = GNOME_CANVAS_GROUP( item ); - - e_minicard_label->rect = - gnome_canvas_item_new( group, - gnome_canvas_rect_get_type(), - "x1", (double) 0, - "y1", (double) 0, - "x2", (double) e_minicard_label->width - 1, - "y2", (double) e_minicard_label->height - 1, - "outline_color", NULL, - NULL ); - e_minicard_label->fieldname = - gnome_canvas_item_new( group, - e_text_get_type(), - "anchor", GTK_ANCHOR_NW, - "clip_width", (double) ( e_minicard_label->width / 2 - 4 ), - "clip", TRUE, - "use_ellipsis", TRUE, - "font_gdk", font, - "fill_color", "black", - NULL ); - e_canvas_item_move_absolute(e_minicard_label->fieldname, 2, 1); - - e_minicard_label->field = - gnome_canvas_item_new( group, - e_text_get_type(), - "anchor", GTK_ANCHOR_NW, - "clip_width", (double) ( ( e_minicard_label->width + 1 ) / 2 - 4 ), - "clip", TRUE, - "use_ellipsis", TRUE, - "font_gdk", font, - "fill_color", "black", - "editable", TRUE, - NULL ); - e_canvas_item_move_absolute(e_minicard_label->field, ( e_minicard_label->width / 2 + 2), 1); - - e_canvas_item_request_reflow(item); -} - -static void -e_minicard_label_unrealize (GnomeCanvasItem *item) -{ - EMinicardLabel *e_minicard_label; - - e_minicard_label = E_MINICARD_LABEL (item); - - if (!item->canvas->aa) - { - } - - if (GNOME_CANVAS_ITEM_CLASS( parent_class )->unrealize) - (* GNOME_CANVAS_ITEM_CLASS( parent_class )->unrealize) (item); -} - -static gboolean -e_minicard_label_event (GnomeCanvasItem *item, GdkEvent *event) -{ - EMinicardLabel *e_minicard_label; - - e_minicard_label = E_MINICARD_LABEL (item); - - switch( event->type ) - { - case GDK_FOCUS_CHANGE: - { - GdkEventFocus *focus_event = (GdkEventFocus *) event; - if ( focus_event->in ) - { - gnome_canvas_item_set( e_minicard_label->rect, - "outline_color", "grey50", - "fill_color", "grey90", - NULL ); - e_minicard_label->has_focus = TRUE; - } - else - { - gnome_canvas_item_set( e_minicard_label->rect, - "outline_color", NULL, - "fill_color", NULL, - NULL ); - e_minicard_label->has_focus = FALSE; - } - } - break; - case GDK_BUTTON_PRESS: - case GDK_BUTTON_RELEASE: - case GDK_MOTION_NOTIFY: - case GDK_ENTER_NOTIFY: - case GDK_LEAVE_NOTIFY: { - gboolean return_val; -#if 0 - GnomeCanvasItem *field; - ArtPoint p; - double inv[6], affine[6]; - - field = e_minicard_label->field; - art_affine_identity (affine); - - if (field->xform != NULL) { - if (field->object.flags & GNOME_CANVAS_ITEM_AFFINE_FULL) { - art_affine_multiply (affine, affine, field->xform); - } else { - affine[4] += field->xform[0]; - affine[5] += field->xform[1]; - } - } - - art_affine_invert (inv, affine); - switch(event->type) { - case GDK_MOTION_NOTIFY: - p.x = event->motion.x; - p.y = event->motion.y; - art_affine_point (&p, &p, inv); - event->motion.x = p.x; - event->motion.y = p.y; - break; - case GDK_BUTTON_PRESS: - case GDK_BUTTON_RELEASE: - p.x = event->button.x; - p.y = event->button.y; - art_affine_point (&p, &p, inv); - event->button.x = p.x; - event->button.y = p.y; - break; - case GDK_ENTER_NOTIFY: - case GDK_LEAVE_NOTIFY: - p.x = event->crossing.x; - p.y = event->crossing.y; - art_affine_point (&p, &p, inv); - event->crossing.x = p.x; - event->crossing.y = p.y; - break; - default: - break; - } -#endif - gtk_signal_emit_by_name(GTK_OBJECT(e_minicard_label->field), "event", event, &return_val); - return return_val; - break; - } - default: - break; - } - - if (GNOME_CANVAS_ITEM_CLASS( parent_class )->event) - return (* GNOME_CANVAS_ITEM_CLASS( parent_class )->event) (item, event); - else - return 0; -} - -static void -e_minicard_label_resize_children(EMinicardLabel *e_minicard_label) -{ - gnome_canvas_item_set( e_minicard_label->fieldname, - "clip_width", (double) ( e_minicard_label->width / 2 - 4 ), - NULL ); - gnome_canvas_item_set( e_minicard_label->field, - "clip_width", (double) ( ( e_minicard_label->width + 1 ) / 2 - 4 ), - NULL ); -} - -static void -e_minicard_label_reflow(GnomeCanvasItem *item, int flags) -{ - EMinicardLabel *e_minicard_label = E_MINICARD_LABEL(item); - - gint old_height; - gdouble text_height; - old_height = e_minicard_label->height; - - gtk_object_get(GTK_OBJECT(e_minicard_label->fieldname), - "text_height", &text_height, - NULL); - - e_minicard_label->height = text_height; - - - gtk_object_get(GTK_OBJECT(e_minicard_label->field), - "text_height", &text_height, - NULL); - - if (e_minicard_label->height < text_height) - e_minicard_label->height = text_height; - e_minicard_label->height += 3; - - gnome_canvas_item_set( e_minicard_label->rect, - "x2", (double) e_minicard_label->width - 1, - "y2", (double) e_minicard_label->height - 1, - NULL ); - e_canvas_item_move_absolute(e_minicard_label->field, ( e_minicard_label->width / 2 + 2), 1); - - if (old_height != e_minicard_label->height) - e_canvas_item_request_parent_reflow(item); -} - -GnomeCanvasItem * -e_minicard_label_new(GnomeCanvasGroup *parent) -{ - GnomeCanvasItem *item = gnome_canvas_item_new(parent, e_minicard_label_get_type(), NULL); - e_minicard_label_construct(item); - return item; -} - diff --git a/addressbook/gui/widgets/e-minicard-label.h b/addressbook/gui/widgets/e-minicard-label.h deleted file mode 100644 index 1790414a54..0000000000 --- a/addressbook/gui/widgets/e-minicard-label.h +++ /dev/null @@ -1,82 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* e-minicard-label.h - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -#ifndef __E_MINICARD_LABEL_H__ -#define __E_MINICARD_LABEL_H__ - -#include - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus */ - -/* EMinicardLabel - A label doing focus with non-marching ants. - * - * The following arguments are available: - * - * name type read/write description - * -------------------------------------------------------------------------------- - * width double RW width of the label - * height double R height of the label - * field string RW text in the field label - * fieldname string RW text in the fieldname label - */ - -#define E_MINICARD_LABEL_TYPE (e_minicard_label_get_type ()) -#define E_MINICARD_LABEL(obj) (GTK_CHECK_CAST ((obj), E_MINICARD_LABEL_TYPE, EMinicardLabel)) -#define E_MINICARD_LABEL_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_MINICARD_LABEL_TYPE, EMiniCardLabelClass)) -#define E_IS_MINICARD_LABEL(obj) (GTK_CHECK_TYPE ((obj), E_MINICARD_LABEL_TYPE)) -#define E_IS_MINICARD_LABEL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_MINICARD_LABEL_TYPE)) - - -typedef struct _EMinicardLabel EMinicardLabel; -typedef struct _EMinicardLabelClass EMinicardLabelClass; - -struct _EMinicardLabel -{ - GnomeCanvasGroup parent; - - /* item specific fields */ - double width; - double height; - GnomeCanvasItem *fieldname; - GnomeCanvasItem *field; - GnomeCanvasItem *rect; - - gboolean has_focus; -}; - -struct _EMinicardLabelClass -{ - GnomeCanvasGroupClass parent_class; -}; - - -GtkType e_minicard_label_get_type (void); -GnomeCanvasItem *e_minicard_label_new(GnomeCanvasGroup *parent); -void e_minicard_label_construct (GnomeCanvasItem *item); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -#endif /* __E_MINICARD_LABEL_H__ */ diff --git a/addressbook/gui/widgets/e-minicard-view.c b/addressbook/gui/widgets/e-minicard-view.c deleted file mode 100644 index 566b798987..0000000000 --- a/addressbook/gui/widgets/e-minicard-view.c +++ /dev/null @@ -1,305 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * e-minicard-view.c - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include -#include -#include -#include "e-minicard-view.h" -#include "e-minicard.h" -static void e_minicard_view_init (EMinicardView *reflow); -static void e_minicard_view_class_init (EMinicardViewClass *klass); -static void e_minicard_view_set_arg (GtkObject *o, GtkArg *arg, guint arg_id); -static void e_minicard_view_get_arg (GtkObject *object, GtkArg *arg, guint arg_id); -static void e_minicard_view_destroy (GtkObject *object); -static void canvas_destroy (GtkObject *object, EMinicardView *view); -static void disconnect_signals (EMinicardView *view); - -static EReflowSortedClass *parent_class = NULL; - -/* The arguments we take */ -enum { - ARG_0, - ARG_BOOK, - ARG_QUERY -}; - -GtkType -e_minicard_view_get_type (void) -{ - static GtkType reflow_type = 0; - - if (!reflow_type) - { - static const GtkTypeInfo reflow_info = - { - "EMinicardView", - sizeof (EMinicardView), - sizeof (EMinicardViewClass), - (GtkClassInitFunc) e_minicard_view_class_init, - (GtkObjectInitFunc) e_minicard_view_init, - /* reserved_1 */ NULL, - /* reserved_2 */ NULL, - (GtkClassInitFunc) NULL, - }; - - reflow_type = gtk_type_unique (e_reflow_sorted_get_type (), &reflow_info); - } - - return reflow_type; -} - -static void -e_minicard_view_class_init (EMinicardViewClass *klass) -{ - GtkObjectClass *object_class; - GnomeCanvasItemClass *item_class; - - object_class = (GtkObjectClass*) klass; - item_class = (GnomeCanvasItemClass *) klass; - - parent_class = gtk_type_class (e_reflow_sorted_get_type ()); - - gtk_object_add_arg_type ("EMinicardView::book", GTK_TYPE_OBJECT, - GTK_ARG_READWRITE, ARG_BOOK); - gtk_object_add_arg_type ("EMinicardView::query", GTK_TYPE_STRING, - GTK_ARG_READWRITE, ARG_QUERY); - - object_class->set_arg = e_minicard_view_set_arg; - object_class->get_arg = e_minicard_view_get_arg; - object_class->destroy = e_minicard_view_destroy; - - /* GnomeCanvasItem method overrides */ -} - -static void -e_minicard_view_init (EMinicardView *view) -{ - view->book = NULL; - view->query = g_strdup("(contains \"full_name\" \"\")"); - view->book_view = NULL; - view->get_view_idle = 0; - view->create_card_id = 0; - view->remove_card_id = 0; - view->modify_card_id = 0; - view->canvas_destroy_id = 0; - - E_REFLOW_SORTED(view)->compare_func = (GCompareFunc) e_minicard_compare; - E_REFLOW_SORTED(view)->string_func = (EReflowStringFunc) e_minicard_get_card_id; -} - -static void -create_card(EBookView *book_view, const GList *cards, EMinicardView *view) -{ - for (; cards; cards = g_list_next(cards)) { - GnomeCanvasItem *item = gnome_canvas_item_new(GNOME_CANVAS_GROUP(view), - e_minicard_get_type(), - "card", cards->data, - NULL); - e_reflow_add_item(E_REFLOW(view), item); - } -} - -static void -modify_card(EBookView *book_view, const GList *cards, EMinicardView *view) -{ - for (; cards; cards = g_list_next(cards)) { - ECard *card = cards->data; - gchar *id = e_card_get_id(card); - GnomeCanvasItem *item = e_reflow_sorted_get_item(E_REFLOW_SORTED(view), id); - if (item && !GTK_OBJECT_DESTROYED(item)) { - gnome_canvas_item_set(item, - "card", card, - NULL); - e_reflow_sorted_reorder_item(E_REFLOW_SORTED(view), id); - } - } -} - -static void -remove_card(EBookView *book_view, const char *id, EMinicardView *view) -{ - e_reflow_sorted_remove_item(E_REFLOW_SORTED(view), id); -} - -static void -book_view_loaded (EBook *book, EBookStatus status, EBookView *book_view, gpointer closure) -{ - EMinicardView *view = closure; - disconnect_signals(view); - if (view->book_view) - gtk_object_unref(GTK_OBJECT(view->book_view)); - - if (!view->canvas_destroy_id) - view->canvas_destroy_id = - gtk_signal_connect(GTK_OBJECT(GNOME_CANVAS_ITEM(view)->canvas), - "destroy", GTK_SIGNAL_FUNC(canvas_destroy), - view); - - view->book_view = book_view; - if (view->book_view) - gtk_object_ref(GTK_OBJECT(view->book_view)); - - - view->create_card_id = gtk_signal_connect(GTK_OBJECT(view->book_view), - "card_added", - GTK_SIGNAL_FUNC(create_card), - view); - view->remove_card_id = gtk_signal_connect(GTK_OBJECT(view->book_view), - "card_removed", - GTK_SIGNAL_FUNC(remove_card), - view); - view->modify_card_id = gtk_signal_connect(GTK_OBJECT(view->book_view), - "card_changed", - GTK_SIGNAL_FUNC(modify_card), - view); - - g_list_foreach(E_REFLOW(view)->items, (GFunc) gtk_object_unref, NULL); - g_list_foreach(E_REFLOW(view)->items, (GFunc) gtk_object_destroy, NULL); - g_list_free(E_REFLOW(view)->items); - E_REFLOW(view)->items = NULL; - e_canvas_item_request_reflow(GNOME_CANVAS_ITEM(view)); -} - -static gboolean -get_view(EMinicardView *view) -{ - if (view->book && view->query) - e_book_get_book_view(view->book, view->query, book_view_loaded, view); - - view->get_view_idle = 0; - return FALSE; -} - -static void -e_minicard_view_set_arg (GtkObject *o, GtkArg *arg, guint arg_id) -{ - GnomeCanvasItem *item; - EMinicardView *view; - - item = GNOME_CANVAS_ITEM (o); - view = E_MINICARD_VIEW (o); - - switch (arg_id){ - case ARG_BOOK: - if (view->book) - gtk_object_unref(GTK_OBJECT(view->book)); - view->book = E_BOOK(GTK_VALUE_OBJECT (*arg)); - if (view->book) { - gtk_object_ref(GTK_OBJECT(view->book)); - if (view->get_view_idle == 0) - view->get_view_idle = g_idle_add((GSourceFunc)get_view, view); - } - break; - case ARG_QUERY: - g_free(view->query); - view->query = g_strdup(GTK_VALUE_STRING (*arg)); - if (view->get_view_idle == 0) - view->get_view_idle = g_idle_add((GSourceFunc)get_view, view); - break; - } -} - -static void -e_minicard_view_get_arg (GtkObject *object, GtkArg *arg, guint arg_id) -{ - EMinicardView *e_minicard_view; - - e_minicard_view = E_MINICARD_VIEW (object); - - switch (arg_id) { - case ARG_BOOK: - GTK_VALUE_OBJECT (*arg) = GTK_OBJECT(e_minicard_view->book); - break; - case ARG_QUERY: - GTK_VALUE_STRING (*arg) = g_strdup(e_minicard_view->query); - break; - default: - arg->type = GTK_TYPE_INVALID; - break; - } -} - -static void -e_minicard_view_destroy (GtkObject *object) -{ - EMinicardView *view = E_MINICARD_VIEW(object); - - if (view->get_view_idle) - g_source_remove(view->get_view_idle); - if (view->canvas_destroy_id) - gtk_signal_disconnect(GTK_OBJECT (GNOME_CANVAS_ITEM(view)->canvas), - view->canvas_destroy_id); - disconnect_signals(view); - g_free(view->query); - if (view->book) - gtk_object_unref(GTK_OBJECT(view->book)); - if (view->book_view) - gtk_object_unref(GTK_OBJECT(view->book_view)); - - GTK_OBJECT_CLASS(parent_class)->destroy (object); -} - -static void -disconnect_signals(EMinicardView *view) -{ - if (view->book_view && view->create_card_id) - gtk_signal_disconnect(GTK_OBJECT (view->book_view), - view->create_card_id); - if (view->book_view && view->remove_card_id) - gtk_signal_disconnect(GTK_OBJECT (view->book_view), - view->remove_card_id); - if (view->book_view && view->modify_card_id) - gtk_signal_disconnect(GTK_OBJECT (view->book_view), - view->modify_card_id); -} - -static void -canvas_destroy(GtkObject *object, EMinicardView *view) -{ - disconnect_signals(view); -} - -void -e_minicard_view_remove_selection(EMinicardView *view, - EBookCallback cb, - gpointer closure) -{ - if (view->book) { - EReflow *reflow = E_REFLOW(view); - GList *list; - for (list = reflow->items; list; list = g_list_next(list)) { - GnomeCanvasItem *item = list->data; - gboolean has_focus; - gtk_object_get(GTK_OBJECT(item), - "has_focus", &has_focus, - NULL); - if (has_focus) { - ECard *card; - gtk_object_get(GTK_OBJECT(item), - "card", &card, - NULL); - e_book_remove_card(view->book, card, cb, closure); - return; - } - } - } -} diff --git a/addressbook/gui/widgets/e-minicard-view.h b/addressbook/gui/widgets/e-minicard-view.h deleted file mode 100644 index 780b0dde33..0000000000 --- a/addressbook/gui/widgets/e-minicard-view.h +++ /dev/null @@ -1,93 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* e-minicard-view.h - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -#ifndef __E_MINICARD_VIEW_H__ -#define __E_MINICARD_VIEW_H__ - -#include -#include "e-reflow-sorted.h" -#include - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus */ - -/* EMinicardView - A canvas item container. - * - * The following arguments are available: - * - * name type read/write description - * -------------------------------------------------------------------------------- - * book EBook RW book to query - * query string RW query string - * - * From EReflowSorted: (you should really know what you're doing if you set these.) - * compare_func GCompareFunc RW compare function - * string_func EReflowStringFunc RW string function - * - * From EReflow: - * minimum_width double RW minimum width of the reflow. width >= minimum_width - * width double R width of the reflow - * height double RW height of the reflow - */ - -#define E_MINICARD_VIEW_TYPE (e_minicard_view_get_type ()) -#define E_MINICARD_VIEW(obj) (GTK_CHECK_CAST ((obj), E_MINICARD_VIEW_TYPE, EMinicardView)) -#define E_MINICARD_VIEW_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_MINICARD_VIEW_TYPE, EMinicardViewClass)) -#define E_IS_MINICARD_VIEW(obj) (GTK_CHECK_TYPE ((obj), E_MINICARD_VIEW_TYPE)) -#define E_IS_MINICARD_VIEW_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_MINICARD_VIEW_TYPE)) - - -typedef struct _EMinicardView EMinicardView; -typedef struct _EMinicardViewClass EMinicardViewClass; - -struct _EMinicardView -{ - EReflowSorted parent; - - /* item specific fields */ - EBook *book; - char *query; - EBookView *book_view; - - int get_view_idle; - - int canvas_destroy_id; - - int create_card_id, remove_card_id, modify_card_id; -}; - -struct _EMinicardViewClass -{ - EReflowSortedClass parent_class; -}; - -GtkType e_minicard_view_get_type (void); -void e_minicard_view_remove_selection (EMinicardView *view, - EBookCallback cb, - gpointer closure); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -#endif /* __E_MINICARD_VIEW_H__ */ diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c deleted file mode 100644 index 7831b3152d..0000000000 --- a/addressbook/gui/widgets/e-minicard.c +++ /dev/null @@ -1,686 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * e-minicard.c - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include -#include -#include "e-minicard.h" -#include "e-minicard-label.h" -#include "e-text.h" -#include -#include -#include -#include -#include -#include "e-contact-editor.h" -#include "e-contact-save-as.h" -#include "e-minicard-view.h" - -static void e_minicard_init (EMinicard *card); -static void e_minicard_class_init (EMinicardClass *klass); -static void e_minicard_set_arg (GtkObject *o, GtkArg *arg, guint arg_id); -static void e_minicard_get_arg (GtkObject *object, GtkArg *arg, guint arg_id); -static void e_minicard_destroy (GtkObject *object); -static gboolean e_minicard_event (GnomeCanvasItem *item, GdkEvent *event); -static void e_minicard_realize (GnomeCanvasItem *item); -static void e_minicard_unrealize (GnomeCanvasItem *item); -static void e_minicard_reflow ( GnomeCanvasItem *item, int flags ); - -static void e_minicard_resize_children( EMinicard *e_minicard ); -static void remodel( EMinicard *e_minicard ); - -static GnomeCanvasGroupClass *parent_class = NULL; - -typedef struct _EMinicardField EMinicardField; - -struct _EMinicardField { - ECardSimpleField field; - GnomeCanvasItem *label; -}; - -#define E_MINICARD_FIELD(field) ((EMinicardField *)(field)) - -static void -e_minicard_field_destroy(EMinicardField *field) -{ - gtk_object_destroy(GTK_OBJECT(field->label)); - g_free(field); -} - -/* The arguments we take */ -enum { - ARG_0, - ARG_WIDTH, - ARG_HEIGHT, - ARG_HAS_FOCUS, - ARG_CARD -}; - -GtkType -e_minicard_get_type (void) -{ - static GtkType minicard_type = 0; - - if (!minicard_type) - { - static const GtkTypeInfo minicard_info = - { - "EMinicard", - sizeof (EMinicard), - sizeof (EMinicardClass), - (GtkClassInitFunc) e_minicard_class_init, - (GtkObjectInitFunc) e_minicard_init, - /* reserved_1 */ NULL, - /* reserved_2 */ NULL, - (GtkClassInitFunc) NULL, - }; - - minicard_type = gtk_type_unique (gnome_canvas_group_get_type (), &minicard_info); - } - - return minicard_type; -} - -static void -e_minicard_class_init (EMinicardClass *klass) -{ - GtkObjectClass *object_class; - GnomeCanvasItemClass *item_class; - - object_class = (GtkObjectClass*) klass; - item_class = (GnomeCanvasItemClass *) klass; - - parent_class = gtk_type_class (gnome_canvas_group_get_type ()); - - gtk_object_add_arg_type ("EMinicard::width", GTK_TYPE_DOUBLE, - GTK_ARG_READWRITE, ARG_WIDTH); - gtk_object_add_arg_type ("EMinicard::height", GTK_TYPE_DOUBLE, - GTK_ARG_READABLE, ARG_HEIGHT); - gtk_object_add_arg_type ("EMinicard::has_focus", GTK_TYPE_ENUM, - GTK_ARG_READWRITE, ARG_HAS_FOCUS); - gtk_object_add_arg_type ("EMinicard::card", GTK_TYPE_OBJECT, - GTK_ARG_READWRITE, ARG_CARD); - - object_class->set_arg = e_minicard_set_arg; - object_class->get_arg = e_minicard_get_arg; - object_class->destroy = e_minicard_destroy; - - /* GnomeCanvasItem method overrides */ - item_class->realize = e_minicard_realize; - item_class->unrealize = e_minicard_unrealize; - item_class->event = e_minicard_event; -} - -static void -e_minicard_init (EMinicard *minicard) -{ - /* minicard->card = NULL;*/ - minicard->rect = NULL; - minicard->fields = NULL; - minicard->width = 10; - minicard->height = 10; - minicard->has_focus = FALSE; - - minicard->card = NULL; - minicard->simple = e_card_simple_new(NULL); - - e_canvas_item_set_reflow_callback(GNOME_CANVAS_ITEM(minicard), e_minicard_reflow); -} - -static void -e_minicard_set_arg (GtkObject *o, GtkArg *arg, guint arg_id) -{ - GnomeCanvasItem *item; - EMinicard *e_minicard; - - item = GNOME_CANVAS_ITEM (o); - e_minicard = E_MINICARD (o); - - switch (arg_id){ - case ARG_WIDTH: - if (e_minicard->width != GTK_VALUE_DOUBLE (*arg)) { - e_minicard->width = GTK_VALUE_DOUBLE (*arg); - e_minicard_resize_children(e_minicard); - if ( GTK_OBJECT_FLAGS( e_minicard ) & GNOME_CANVAS_ITEM_REALIZED ) - e_canvas_item_request_reflow(item); - } - break; - case ARG_HAS_FOCUS: - if (e_minicard->fields) { - if ( GTK_VALUE_ENUM(*arg) == E_FOCUS_START || - GTK_VALUE_ENUM(*arg) == E_FOCUS_CURRENT) { - gnome_canvas_item_set(E_MINICARD_FIELD(e_minicard->fields->data)->label, - "has_focus", GTK_VALUE_ENUM(*arg), - NULL); - } else if ( GTK_VALUE_ENUM(*arg) == E_FOCUS_END ) { - gnome_canvas_item_set(E_MINICARD_FIELD(g_list_last(e_minicard->fields)->data)->label, - "has_focus", GTK_VALUE_ENUM(*arg), - NULL); - } - } - else - e_canvas_item_grab_focus(item); - break; - case ARG_CARD: - if (e_minicard->card) - gtk_object_unref (GTK_OBJECT(e_minicard->card)); - e_minicard->card = E_CARD(GTK_VALUE_OBJECT (*arg)); - if (e_minicard->card) - gtk_object_ref (GTK_OBJECT(e_minicard->card)); - gtk_object_set(GTK_OBJECT(e_minicard->simple), - "card", e_minicard->card, - NULL); - remodel(e_minicard); - e_canvas_item_request_reflow(item); - break; - } -} - -static void -e_minicard_get_arg (GtkObject *object, GtkArg *arg, guint arg_id) -{ - EMinicard *e_minicard; - - e_minicard = E_MINICARD (object); - - switch (arg_id) { - case ARG_WIDTH: - GTK_VALUE_DOUBLE (*arg) = e_minicard->width; - break; - case ARG_HEIGHT: - GTK_VALUE_DOUBLE (*arg) = e_minicard->height; - break; - case ARG_HAS_FOCUS: - GTK_VALUE_ENUM (*arg) = e_minicard->has_focus ? E_FOCUS_CURRENT : E_FOCUS_NONE; - break; - case ARG_CARD: - e_card_simple_sync_card(e_minicard->simple); - GTK_VALUE_OBJECT (*arg) = GTK_OBJECT(e_minicard->card); - break; - default: - arg->type = GTK_TYPE_INVALID; - break; - } -} - -static void -e_minicard_destroy (GtkObject *object) -{ - EMinicard *e_minicard; - - g_return_if_fail (object != NULL); - g_return_if_fail (E_IS_MINICARD (object)); - - e_minicard = E_MINICARD (object); - - g_list_foreach(e_minicard->fields, (GFunc) e_minicard_field_destroy, NULL); - g_list_free(e_minicard->fields); - - if (e_minicard->card) - gtk_object_unref (GTK_OBJECT(e_minicard->card)); - if (e_minicard->simple) - gtk_object_unref (GTK_OBJECT(e_minicard->simple)); - - if (GTK_OBJECT_CLASS (parent_class)->destroy) - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); -} - -static void -e_minicard_realize (GnomeCanvasItem *item) -{ - EMinicard *e_minicard; - GnomeCanvasGroup *group; - - e_minicard = E_MINICARD (item); - group = GNOME_CANVAS_GROUP( item ); - - if (GNOME_CANVAS_ITEM_CLASS(parent_class)->realize) - (* GNOME_CANVAS_ITEM_CLASS(parent_class)->realize) (item); - - e_minicard->rect = - gnome_canvas_item_new( group, - gnome_canvas_rect_get_type(), - "x1", (double) 0, - "y1", (double) 0, - "x2", (double) e_minicard->width - 1, - "y2", (double) e_minicard->height - 1, - "outline_color", NULL, - NULL ); - - e_minicard->header_rect = - gnome_canvas_item_new( group, - gnome_canvas_rect_get_type(), - "x1", (double) 2, - "y1", (double) 2, - "x2", (double) e_minicard->width - 3, - "y2", (double) e_minicard->height - 3, - "fill_color", "grey70", - NULL ); - - e_minicard->header_text = - gnome_canvas_item_new( group, - e_text_get_type(), - "anchor", GTK_ANCHOR_NW, - "width", (double) ( e_minicard->width - 12 ), - "clip", TRUE, - "use_ellipsis", TRUE, - "font", "lucidasans-bold-10", - "fill_color", "black", - "text", "", - NULL ); - e_canvas_item_move_absolute(e_minicard->header_text, 6, 6); - - remodel(e_minicard); - e_canvas_item_request_reflow(item); - - if (!item->canvas->aa) { - } -} - -static void -e_minicard_unrealize (GnomeCanvasItem *item) -{ - EMinicard *e_minicard; - - e_minicard = E_MINICARD (item); - - if (!item->canvas->aa) - { - } - - if (GNOME_CANVAS_ITEM_CLASS(parent_class)->unrealize) - (* GNOME_CANVAS_ITEM_CLASS(parent_class)->unrealize) (item); -} - -static void -card_changed_cb (EBook* book, EBookStatus status, gpointer user_data) -{ - g_print ("%s: %s(): a card was changed with status %d\n", __FILE__, __FUNCTION__, status); -} - -static void -save_as (GtkWidget *widget, EMinicard *minicard) -{ - e_card_simple_sync_card(minicard->simple); - e_contact_save_as(_("Save as VCard"), minicard->card); -} - -static gboolean -e_minicard_event (GnomeCanvasItem *item, GdkEvent *event) -{ - EMinicard *e_minicard; - - e_minicard = E_MINICARD (item); - - switch( event->type ) { - case GDK_FOCUS_CHANGE: - { - GdkEventFocus *focus_event = (GdkEventFocus *) event; - if ( focus_event->in ) { - gnome_canvas_item_set( e_minicard->rect, - "outline_color", "grey50", - NULL ); - gnome_canvas_item_set( e_minicard->header_rect, - "fill_color", "darkblue", - NULL ); - gnome_canvas_item_set( e_minicard->header_text, - "fill_color", "white", - NULL ); - e_minicard->has_focus = TRUE; - } else { - EBook *book; - - e_card_simple_sync_card(e_minicard->simple); - - gtk_object_get(GTK_OBJECT(GNOME_CANVAS_ITEM(e_minicard)->parent), - "book", &book, - NULL); - - /* Add the card in the contact editor to our ebook */ - e_book_commit_card (book, - e_minicard->card, - card_changed_cb, - NULL); - - gnome_canvas_item_set( e_minicard->rect, - "outline_color", NULL, - NULL ); - gnome_canvas_item_set( e_minicard->header_rect, - "fill_color", "grey70", - NULL ); - gnome_canvas_item_set( e_minicard->header_text, - "fill_color", "black", - NULL ); - e_minicard->has_focus = FALSE; - } - } - break; - case GDK_BUTTON_PRESS: - if (event->button.button == 1) { - e_canvas_item_grab_focus(item); - } else if (event->button.button == 3) { - EPopupMenu menu[] = { {"Save as VCard", NULL, GTK_SIGNAL_FUNC(save_as), 0}, {NULL, NULL, NULL, 0} }; - e_popup_menu_run (menu, (GdkEventButton *)event, 0, e_minicard); - } - break; - case GDK_2BUTTON_PRESS: - if (E_IS_MINICARD_VIEW(item->parent)) { - gint result; - GtkWidget* contact_editor = - e_contact_editor_new(e_minicard->card); - EBook *book; - GtkWidget *dlg; - gtk_object_get(GTK_OBJECT(item->parent), - "book", &book, - NULL); - - dlg = gnome_dialog_new ("Contact Editor", "Save", "Cancel", NULL); - - gtk_window_set_policy(GTK_WINDOW(dlg), FALSE, TRUE, FALSE); - - g_assert (E_IS_BOOK (book)); - - gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dlg)->vbox), - contact_editor, TRUE, TRUE, 0); - - gtk_widget_show(contact_editor); - gtk_widget_show (dlg); - - gnome_dialog_close_hides (GNOME_DIALOG (dlg), TRUE); - result = gnome_dialog_run_and_close (GNOME_DIALOG (dlg)); - - - /* If the user clicks "okay"...*/ - if (result == 0) { - ECard *card; - g_assert (contact_editor); - g_assert (GTK_IS_OBJECT (contact_editor)); - gtk_object_get(GTK_OBJECT(contact_editor), - "card", &card, - NULL); - - /* Add the card in the contact editor to our ebook */ - e_book_commit_card (book, - card, - card_changed_cb, - NULL); - } - } - break; - case GDK_KEY_PRESS: - if (event->key.keyval == GDK_Tab || - event->key.keyval == GDK_KP_Tab || - event->key.keyval == GDK_ISO_Left_Tab) { - GList *list; - for (list = e_minicard->fields; list; list = list->next) { - EMinicardField *field = E_MINICARD_FIELD(list->data); - GnomeCanvasItem *item = field->label; - EFocus has_focus; - gtk_object_get(GTK_OBJECT(item), - "has_focus", &has_focus, - NULL); - if (has_focus != E_FOCUS_NONE) { - if (event->key.state & GDK_SHIFT_MASK) - list = list->prev; - else - list = list->next; - if (list) { - EMinicardField *field = E_MINICARD_FIELD(list->data); - GnomeCanvasItem *item = field->label; - gnome_canvas_item_set(item, - "has_focus", (event->key.state & GDK_SHIFT_MASK) ? E_FOCUS_END : E_FOCUS_START, - NULL); - return 1; - } else { - return 0; - } - } - } - } - default: - break; - } - - if (GNOME_CANVAS_ITEM_CLASS( parent_class )->event) - return (* GNOME_CANVAS_ITEM_CLASS( parent_class )->event) (item, event); - else - return 0; -} - -static void -e_minicard_resize_children( EMinicard *e_minicard ) -{ - if ( GTK_OBJECT_FLAGS( e_minicard ) & GNOME_CANVAS_ITEM_REALIZED ) { - GList *list; - - gnome_canvas_item_set( e_minicard->header_text, - "width", (double) e_minicard->width - 12, - NULL ); - for ( list = e_minicard->fields; list; list = g_list_next( list ) ) { - gnome_canvas_item_set( E_MINICARD_FIELD( list->data )->label, - "width", (double) e_minicard->width - 4.0, - NULL ); - } - } -} - -static void -field_changed (EText *text, EMinicard *e_minicard) -{ - ECardSimpleType type; - char *string; - - type = GPOINTER_TO_INT - (gtk_object_get_data(GTK_OBJECT(text), - "EMinicard:field")); - gtk_object_get(GTK_OBJECT(text), - "text", &string, - NULL); - e_card_simple_set(e_minicard->simple, - type, - string); - g_free(string); -} - -static void -add_field (EMinicard *e_minicard, ECardSimpleField field) -{ - GnomeCanvasItem *new_item; - GnomeCanvasGroup *group; - ECardSimpleType type; - EMinicardField *minicard_field; - char *name; - char *string; - - group = GNOME_CANVAS_GROUP( e_minicard ); - - type = e_card_simple_type(e_minicard->simple, field); - name = g_strdup_printf("%s:", e_card_simple_get_name(e_minicard->simple, field)); - string = e_card_simple_get(e_minicard->simple, field); - - new_item = e_minicard_label_new(group); - gnome_canvas_item_set( new_item, - "width", e_minicard->width - 4.0, - "fieldname", name, - "field", string, - NULL ); - gtk_signal_connect(GTK_OBJECT(E_MINICARD_LABEL(new_item)->field), - "changed", GTK_SIGNAL_FUNC(field_changed), e_minicard); - gtk_object_set_data(GTK_OBJECT(E_MINICARD_LABEL(new_item)->field), - "EMinicard:field", - GINT_TO_POINTER(field)); - - minicard_field = g_new(EMinicardField, 1); - minicard_field->field = field; - minicard_field->label = new_item; - - e_minicard->fields = g_list_append( e_minicard->fields, minicard_field); - e_canvas_item_move_absolute(new_item, 2, e_minicard->height); - g_free(name); - g_free(string); -} - -static void -remodel( EMinicard *e_minicard ) -{ - int count = 0; - if (e_minicard->simple) { - ECardSimpleField field; - GList *list; - char *file_as; - - if (e_minicard->header_text) { - file_as = e_card_simple_get(e_minicard->simple, E_CARD_SIMPLE_FIELD_FILE_AS); - gnome_canvas_item_set( e_minicard->header_text, - "text", file_as ? file_as : "", - NULL ); - g_free(file_as); - } - - list = e_minicard->fields; - e_minicard->fields = NULL; - - for(field = E_CARD_SIMPLE_FIELD_FULL_NAME; field != E_CARD_SIMPLE_FIELD_LAST && count < 5; field++) { - EMinicardField *minicard_field = NULL; - if (list) - minicard_field = list->data; - if (minicard_field && minicard_field->field == field) { - GList *this_list = list; - char *string; - - string = e_card_simple_get(e_minicard->simple, field); - if (string && *string) { - e_minicard->fields = g_list_append(e_minicard->fields, minicard_field); - gtk_object_set(GTK_OBJECT(minicard_field->label), - "field", string, - NULL); - count ++; - } else { - e_minicard_field_destroy(minicard_field); - } - list = g_list_remove_link(list, this_list); - g_list_free_1(this_list); - g_free(string); - } else { - char *string; - string = e_card_simple_get(e_minicard->simple, field); - if (string && *string) { - add_field(e_minicard, field); - count++; - } - g_free(string); - } - } - - g_list_foreach(list, (GFunc) e_minicard_field_destroy, NULL); - g_list_free(list); - } -} - -static void -e_minicard_reflow( GnomeCanvasItem *item, int flags ) -{ - EMinicard *e_minicard = E_MINICARD(item); - if ( GTK_OBJECT_FLAGS( e_minicard ) & GNOME_CANVAS_ITEM_REALIZED ) { - GList *list; - gdouble text_height; - gint old_height; - - old_height = e_minicard->height; - - gtk_object_get( GTK_OBJECT( e_minicard->header_text ), - "text_height", &text_height, - NULL ); - - e_minicard->height = text_height + 10.0; - - gnome_canvas_item_set( e_minicard->header_rect, - "y2", text_height + 9.0, - NULL ); - - for(list = e_minicard->fields; list; list = g_list_next(list)) { - EMinicardField *field = E_MINICARD_FIELD(list->data); - GnomeCanvasItem *item = field->label; - gtk_object_get (GTK_OBJECT(item), - "height", &text_height, - NULL); - e_canvas_item_move_absolute(item, 2, e_minicard->height); - e_minicard->height += text_height; - } - e_minicard->height += 2; - - gnome_canvas_item_set( e_minicard->rect, - "y2", (double) e_minicard->height - 1, - NULL ); - - gnome_canvas_item_set( e_minicard->rect, - "x2", (double) e_minicard->width - 1.0, - "y2", (double) e_minicard->height - 1.0, - NULL ); - gnome_canvas_item_set( e_minicard->header_rect, - "x2", (double) e_minicard->width - 3.0, - NULL ); - - if (old_height != e_minicard->height) - e_canvas_item_request_parent_reflow(item); - } -} - -char * -e_minicard_get_card_id (EMinicard *minicard) -{ - g_return_val_if_fail(minicard != NULL, NULL); - g_return_val_if_fail(E_IS_MINICARD(minicard), NULL); - - if (minicard->card) { - return e_card_get_id(minicard->card); - } else { - return ""; - } -} - -int -e_minicard_compare (EMinicard *minicard1, EMinicard *minicard2) -{ - g_return_val_if_fail(minicard1 != NULL, 0); - g_return_val_if_fail(E_IS_MINICARD(minicard1), 0); - g_return_val_if_fail(minicard2 != NULL, 0); - g_return_val_if_fail(E_IS_MINICARD(minicard2), 0); - - if (minicard1->card && minicard2->card) { - char *file_as1, *file_as2; - gtk_object_get(GTK_OBJECT(minicard1->card), - "file_as", &file_as1, - NULL); - gtk_object_get(GTK_OBJECT(minicard2->card), - "file_as", &file_as2, - NULL); - if (file_as1 && file_as2) - return strcmp(file_as1, file_as2); - if (file_as1) - return -1; - if (file_as2) - return 1; - return strcmp(e_minicard_get_card_id(minicard1), e_minicard_get_card_id(minicard2)); - } else { - return 0; - } -} diff --git a/addressbook/gui/widgets/e-minicard.h b/addressbook/gui/widgets/e-minicard.h deleted file mode 100644 index 47da8110c2..0000000000 --- a/addressbook/gui/widgets/e-minicard.h +++ /dev/null @@ -1,98 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* e-minicard.h - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -#ifndef __E_MINICARD_H__ -#define __E_MINICARD_H__ - -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus */ - -/* EMinicard - A small card displaying information about a contact. - * - * The following arguments are available: - * - * name type read/write description - * -------------------------------------------------------------------------------- - * width double RW width of the card - * height double R height of the card - * card ECard* RW Pointer to the ECard - */ - -#define E_MINICARD_TYPE (e_minicard_get_type ()) -#define E_MINICARD(obj) (GTK_CHECK_CAST ((obj), E_MINICARD_TYPE, EMinicard)) -#define E_MINICARD_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_MINICARD_TYPE, EMinicardClass)) -#define E_IS_MINICARD(obj) (GTK_CHECK_TYPE ((obj), E_MINICARD_TYPE)) -#define E_IS_MINICARD_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_MINICARD_TYPE)) - - -typedef struct _EMinicard EMinicard; -typedef struct _EMinicardClass EMinicardClass; -typedef enum _EMinicardFocusType EMinicardFocusType; - -enum _EMinicardFocusType { - E_MINICARD_FOCUS_TYPE_START, - E_MINICARD_FOCUS_TYPE_END -}; - -struct _EMinicard -{ - GnomeCanvasGroup parent; - - /* item specific fields */ - ECard *card; - ECardSimple *simple; - - GnomeCanvasItem *rect; - GnomeCanvasItem *header_rect; - GnomeCanvasItem *header_text; - - GList *fields; /* Of type EMinicardField */ - guint needs_remodeling : 1; - - gboolean has_focus; - - double width; - double height; -}; - -struct _EMinicardClass -{ - GnomeCanvasGroupClass parent_class; - - void (* resize) (EMinicard *minicard); -}; - - -GtkType e_minicard_get_type (void); -char *e_minicard_get_card_id (EMinicard *minicard); -int e_minicard_compare (EMinicard *minicard1, EMinicard *minicard2); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -#endif /* __E_MINICARD_H__ */ diff --git a/addressbook/gui/widgets/test-minicard-label.c b/addressbook/gui/widgets/test-minicard-label.c deleted file mode 100644 index adf092206c..0000000000 --- a/addressbook/gui/widgets/test-minicard-label.c +++ /dev/null @@ -1,128 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* test-minicard-label.c - * - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */ - - - -#include "config.h" - -#include -#include "e-minicard-label.h" -#include - -/* This is a horrible thing to do, but it is just a test. */ -GnomeCanvasItem *label; -GnomeCanvasItem *rect; - -static void destroy_callback(GtkWidget *app, gpointer data) -{ - exit(0); -} - -static void allocate_callback(GtkWidget *canvas, GtkAllocation *allocation, gpointer data) -{ - gnome_canvas_set_scroll_region(GNOME_CANVAS( canvas ), 0, 0, allocation->width, allocation->height ); - gnome_canvas_item_set( label, - "width", (double) allocation->width, - "height", (double) allocation->height, - NULL ); - gnome_canvas_item_set( rect, - "x2", (double) allocation->width, - "y2", (double) allocation->height, - NULL ); -} - -#if 0 -static void about_callback( GtkWidget *widget, gpointer data ) -{ - - const gchar *authors[] = - { - "Christopher James Lahey ", - NULL - }; - - GtkWidget *about = - gnome_about_new ( _( "Minicard Label Test" ), VERSION, - _( "Copyright (C) 2000, Helix Code, Inc." ), - authors, - _( "This should test the minicard label canvas item" ), - NULL); - gtk_widget_show (about); -} -#endif - -static void button_press_callback( GtkWidget *widget, gpointer data ) -{ - gnome_canvas_item_grab_focus( label ); -} - -int main( int argc, char *argv[] ) -{ - GtkWidget *app; - GtkWidget *canvas; - - /* bindtextdomain (PACKAGE, GNOMELOCALEDIR); - textdomain (PACKAGE);*/ - - gnome_init( "Minicard Label Test", VERSION, argc, argv); - app = gnome_app_new("Minicard Label Test", NULL); - - canvas = e_canvas_new(); - rect = gnome_canvas_item_new( gnome_canvas_root( GNOME_CANVAS( canvas ) ), - gnome_canvas_rect_get_type(), - "x1", (double) 0, - "y1", (double) 0, - "x2", (double) 100, - "y2", (double) 100, - "fill_color", "white", - NULL ); - label = e_minicard_label_new(gnome_canvas_root( GNOME_CANVAS( canvas ) )); - gnome_canvas_item_set( label, - "x", (double) 0, - "y", (double) 0, - "width", (double) 100, - "height", (double) 100, - "fieldname", "Full Name:", - "field", "Christopher James Lahey", - NULL ); - gnome_canvas_set_scroll_region ( GNOME_CANVAS( canvas ), - 0, 0, - 100, 100 ); - - gnome_app_set_contents( GNOME_APP( app ), canvas ); - - - /* Connect the signals */ - gtk_signal_connect( GTK_OBJECT( app ), "destroy", - GTK_SIGNAL_FUNC( destroy_callback ), - ( gpointer ) app ); - - gtk_signal_connect( GTK_OBJECT( canvas ), "size_allocate", - GTK_SIGNAL_FUNC( allocate_callback ), - ( gpointer ) app ); - - gtk_signal_connect( GTK_OBJECT( canvas ), "button_press_event", - GTK_SIGNAL_FUNC( button_press_callback ), - ( gpointer ) app ); - - gtk_widget_show_all( app ); - - gtk_main(); - - /* Not reached. */ - return 0; -} diff --git a/addressbook/gui/widgets/test-minicard-view.c b/addressbook/gui/widgets/test-minicard-view.c deleted file mode 100644 index c03d11d07e..0000000000 --- a/addressbook/gui/widgets/test-minicard-view.c +++ /dev/null @@ -1,206 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* test-reflow.c - * - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */ - -#include "config.h" - -#include -#include -#include -#include -#include "e-minicard-view.h" - -/* This is a horrible thing to do, but it is just a test. */ -GnomeCanvasItem *reflow; -GnomeCanvasItem *rect; -GtkAllocation last_alloc; - -CORBA_Environment ev; -CORBA_ORB orb; - -static void -init_bonobo (int argc, char **argv) -{ - - gnome_CORBA_init_with_popt_table ( - "Reflow Test", VERSION, - &argc, argv, NULL, 0, NULL, GNORBA_INIT_SERVER_FUNC, &ev); - - orb = gnome_CORBA_ORB (); - - if (bonobo_init (orb, NULL, NULL) == FALSE) - g_error (_("Could not initialize Bonobo")); - -} - -static void destroy_callback(GtkWidget *app, gpointer data) -{ - exit(0); -} - -static void allocate_callback(GtkWidget *canvas, GtkAllocation *allocation, gpointer data) -{ - double width; - last_alloc = *allocation; - gnome_canvas_item_set( reflow, - "height", (double) allocation->height, - NULL ); - gnome_canvas_item_set( reflow, - "minimum_width", (double) allocation->width, - NULL ); - gtk_object_get(GTK_OBJECT(reflow), - "width", &width, - NULL); - width = MAX(width, allocation->width); - gnome_canvas_set_scroll_region(GNOME_CANVAS( canvas ), 0, 0, width, allocation->height ); - gnome_canvas_item_set( rect, - "x2", (double) width, - "y2", (double) allocation->height, - NULL ); -} - -static void resize(GnomeCanvas *canvas, gpointer data) -{ - double width; - gtk_object_get(GTK_OBJECT(reflow), - "width", &width, - NULL); - width = MAX(width, last_alloc.width); - gnome_canvas_set_scroll_region(canvas , 0, 0, width, last_alloc.height ); - gnome_canvas_item_set( rect, - "x2", (double) width, - "y2", (double) last_alloc.height, - NULL ); -} - -#if 0 -static void about_callback( GtkWidget *widget, gpointer data ) -{ - - const gchar *authors[] = - { - "Christopher James Lahey ", - NULL - }; - - GtkWidget *about = - gnome_about_new ( _( "Reflow Test" ), VERSION, - _( "Copyright (C) 2000, Helix Code, Inc." ), - authors, - _( "This should test the reflow canvas item" ), - NULL); - gtk_widget_show (about); -} -#endif - -static void -book_open_cb (EBook *book, EBookStatus status, gpointer closure) -{ - if (status == E_BOOK_STATUS_SUCCESS) - gnome_canvas_item_set(reflow, - "book", book, - NULL); -} - -static guint -ebook_create (void) -{ - EBook *book; - - book = e_book_new (); - - if (!book) { - printf ("%s: %s(): Couldn't create EBook, bailing.\n", - __FILE__, - __FUNCTION__); - return FALSE; - } - - - if (! e_book_load_uri (book, "file:/tmp/test.db", book_open_cb, NULL)) { - printf ("error calling load_uri!\n"); - } - - - return FALSE; -} - -int main( int argc, char *argv[] ) -{ - GtkWidget *app; - GtkWidget *canvas; - GtkWidget *vbox; - GtkWidget *scrollbar; - - /* bindtextdomain (PACKAGE, GNOMELOCALEDIR); - textdomain (PACKAGE);*/ - - CORBA_exception_init (&ev); - init_bonobo (argc, argv); - - app = gnome_app_new("Reflow Test", NULL); - - vbox = gtk_vbox_new(FALSE, 0); - - canvas = e_canvas_new(); - rect = gnome_canvas_item_new( gnome_canvas_root( GNOME_CANVAS( canvas ) ), - gnome_canvas_rect_get_type(), - "x1", (double) 0, - "y1", (double) 0, - "x2", (double) 100, - "y2", (double) 100, - "fill_color", "white", - NULL ); - reflow = gnome_canvas_item_new( gnome_canvas_root( GNOME_CANVAS( canvas ) ), - e_minicard_view_get_type(), - "height", (double) 100, - "minimum_width", (double) 100, - NULL ); - gtk_signal_connect( GTK_OBJECT( canvas ), "reflow", - GTK_SIGNAL_FUNC( resize ), - ( gpointer ) app); - - gnome_canvas_set_scroll_region ( GNOME_CANVAS( canvas ), - 0, 0, - 100, 100 ); - - gtk_box_pack_start(GTK_BOX(vbox), canvas, TRUE, TRUE, 0); - - scrollbar = gtk_hscrollbar_new(gtk_layout_get_hadjustment(GTK_LAYOUT(canvas))); - - gtk_box_pack_start(GTK_BOX(vbox), scrollbar, FALSE, FALSE, 0); - - gnome_app_set_contents( GNOME_APP( app ), vbox ); - - /* Connect the signals */ - gtk_signal_connect( GTK_OBJECT( app ), "destroy", - GTK_SIGNAL_FUNC( destroy_callback ), - ( gpointer ) app ); - - gtk_signal_connect( GTK_OBJECT( canvas ), "size_allocate", - GTK_SIGNAL_FUNC( allocate_callback ), - ( gpointer ) app ); - - gtk_widget_show_all( app ); - gdk_window_set_back_pixmap( GTK_LAYOUT(canvas)->bin_window, NULL, FALSE); - - gtk_idle_add ((GtkFunction) ebook_create, NULL); - - bonobo_main (); - - /* Not reached. */ - return 0; -} diff --git a/addressbook/gui/widgets/test-minicard.c b/addressbook/gui/widgets/test-minicard.c deleted file mode 100644 index 1ad066b3fe..0000000000 --- a/addressbook/gui/widgets/test-minicard.c +++ /dev/null @@ -1,117 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* test-minicard.c - * - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */ - - - -#include "config.h" - -#include -#include "e-minicard.h" - -/* This is a horrible thing to do, but it is just a test. */ -GnomeCanvasItem *card; -GnomeCanvasItem *rect; - -static void destroy_callback(GtkWidget *app, gpointer data) -{ - exit(0); -} - -static void allocate_callback(GtkWidget *canvas, GtkAllocation *allocation, gpointer data) -{ - gnome_canvas_set_scroll_region(GNOME_CANVAS( canvas ), 0, 0, allocation->width, allocation->height ); - gnome_canvas_item_set( card, - "width", (double) allocation->width, - NULL ); - gnome_canvas_item_set( rect, - "x2", (double) allocation->width, - "y2", (double) allocation->height, - NULL ); -} - -#if 0 -static void about_callback( GtkWidget *widget, gpointer data ) -{ - - const gchar *authors[] = - { - "Christopher James Lahey ", - NULL - }; - - GtkWidget *about = - gnome_about_new ( _( "Minicard Test" ), VERSION, - _( "Copyright (C) 2000, Helix Code, Inc." ), - authors, - _( "This should test the minicard canvas item" ), - NULL); - gtk_widget_show (about); -} -#endif - -int main( int argc, char *argv[] ) -{ - GtkWidget *app; - GtkWidget *canvas; - int i; - - /* bindtextdomain (PACKAGE, GNOMELOCALEDIR); - textdomain (PACKAGE);*/ - - gnome_init( "Minicard Test", VERSION, argc, argv); - app = gnome_app_new("Minicard Test", NULL); - - canvas = gnome_canvas_new(); - rect = gnome_canvas_item_new( gnome_canvas_root( GNOME_CANVAS( canvas ) ), - gnome_canvas_rect_get_type(), - "x1", (double) 0, - "y1", (double) 0, - "x2", (double) 100, - "y2", (double) 100, - "fill_color", "white", - NULL ); - for ( i = 0; i < 1; i++ ) - { - card = gnome_canvas_item_new( gnome_canvas_root( GNOME_CANVAS( canvas ) ), - e_minicard_get_type(), - "x", (double) 0, - "y", (double) 0, - "width", (double) 100, - NULL ); - } - gnome_canvas_set_scroll_region ( GNOME_CANVAS( canvas ), - 0, 0, - 100, 100 ); - - gnome_app_set_contents( GNOME_APP( app ), canvas ); - - /* Connect the signals */ - gtk_signal_connect( GTK_OBJECT( app ), "destroy", - GTK_SIGNAL_FUNC( destroy_callback ), - ( gpointer ) app ); - - gtk_signal_connect( GTK_OBJECT( canvas ), "size_allocate", - GTK_SIGNAL_FUNC( allocate_callback ), - ( gpointer ) app ); - - gtk_widget_show_all( app ); - - gtk_main(); - - /* Not reached. */ - return 0; -} diff --git a/addressbook/gui/widgets/test-reflow.c b/addressbook/gui/widgets/test-reflow.c deleted file mode 100644 index 4817d13120..0000000000 --- a/addressbook/gui/widgets/test-reflow.c +++ /dev/null @@ -1,193 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* test-reflow.c - * - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */ - - -#define TEST_VCARD \ -"BEGIN:VCARD -" \ -"FN:Nat -" \ -"N:Friedman;Nat;D;Mr. -" \ -"TITLE:Head Geek -" \ -"BDAY:1977-08-06 -" \ -"TEL;WORK:617 679 1984 -" \ -"TEL;CELL:123 456 7890 -" \ -"EMAIL;INTERNET:nat@nat.org -" \ -"EMAIL;INTERNET:nat@helixcode.com -" \ -"ADR;WORK;POSTAL:P.O. Box 101;;;Any Town;CA;91921-1234; -" \ -"ADR;HOME;POSTAL;INTL:P.O. Box 202;;;Any Town 2;MI;12344-4321;USA -" \ -"END:VCARD -" \ -" -" - - -#include "config.h" - -#include -#include -#include "e-reflow.h" -#include "e-minicard.h" - -/* This is a horrible thing to do, but it is just a test. */ -GnomeCanvasItem *reflow; -GnomeCanvasItem *rect; -GtkAllocation last_alloc; - -static void destroy_callback(GtkWidget *app, gpointer data) -{ - exit(0); -} - -static void allocate_callback(GtkWidget *canvas, GtkAllocation *allocation, gpointer data) -{ - double width; - last_alloc = *allocation; - gnome_canvas_item_set( reflow, - "height", (double) allocation->height, - NULL ); - gnome_canvas_item_set( reflow, - "minimum_width", (double) allocation->width, - NULL ); - gtk_object_get(GTK_OBJECT(reflow), - "width", &width, - NULL); - width = MAX(width, allocation->width); - gnome_canvas_set_scroll_region(GNOME_CANVAS( canvas ), 0, 0, width, allocation->height ); - gnome_canvas_item_set( rect, - "x2", (double) width, - "y2", (double) allocation->height, - NULL ); -} - -static void resize(GnomeCanvas *canvas, gpointer data) -{ - double width; - gtk_object_get(GTK_OBJECT(reflow), - "width", &width, - NULL); - width = MAX(width, last_alloc.width); - gnome_canvas_set_scroll_region(canvas , 0, 0, width, last_alloc.height ); - gnome_canvas_item_set( rect, - "x2", (double) width, - "y2", (double) last_alloc.height, - NULL ); -} - -#if 0 -static void about_callback( GtkWidget *widget, gpointer data ) -{ - - const gchar *authors[] = - { - "Christopher James Lahey ", - NULL - }; - - GtkWidget *about = - gnome_about_new ( _( "Reflow Test" ), VERSION, - _( "Copyright (C) 2000, Helix Code, Inc." ), - authors, - _( "This should test the reflow canvas item" ), - NULL); - gtk_widget_show (about); -} -#endif - -int main( int argc, char *argv[] ) -{ - GtkWidget *app; - GtkWidget *canvas; - GtkWidget *vbox; - GtkWidget *scrollbar; - int i; - - /* bindtextdomain (PACKAGE, GNOMELOCALEDIR); - textdomain (PACKAGE);*/ - - gnome_init( "Reflow Test", VERSION, argc, argv); - app = gnome_app_new("Reflow Test", NULL); - - vbox = gtk_vbox_new(FALSE, 0); - - canvas = e_canvas_new(); - rect = gnome_canvas_item_new( gnome_canvas_root( GNOME_CANVAS( canvas ) ), - gnome_canvas_rect_get_type(), - "x1", (double) 0, - "y1", (double) 0, - "x2", (double) 100, - "y2", (double) 100, - "fill_color", "white", - NULL ); - reflow = gnome_canvas_item_new( gnome_canvas_root( GNOME_CANVAS( canvas ) ), - e_reflow_get_type(), - "x", (double) 0, - "y", (double) 0, - "height", (double) 100, - "minimum_width", (double) 100, - NULL ); - gtk_signal_connect( GTK_OBJECT( canvas ), "reflow", - GTK_SIGNAL_FUNC( resize ), - ( gpointer ) app); - for ( i = 0; i < 200; i++ ) - { - GnomeCanvasItem *item; - ECard *card = e_card_new (TEST_VCARD); - item = gnome_canvas_item_new( GNOME_CANVAS_GROUP(reflow), - e_minicard_get_type(), - "card", card, - NULL); - e_reflow_add_item(E_REFLOW(reflow), item); - } - gnome_canvas_set_scroll_region ( GNOME_CANVAS( canvas ), - 0, 0, - 100, 100 ); - - gtk_box_pack_start(GTK_BOX(vbox), canvas, TRUE, TRUE, 0); - - scrollbar = gtk_hscrollbar_new(gtk_layout_get_hadjustment(GTK_LAYOUT(canvas))); - - gtk_box_pack_start(GTK_BOX(vbox), scrollbar, FALSE, FALSE, 0); - - gnome_app_set_contents( GNOME_APP( app ), vbox ); - - /* Connect the signals */ - gtk_signal_connect( GTK_OBJECT( app ), "destroy", - GTK_SIGNAL_FUNC( destroy_callback ), - ( gpointer ) app ); - - gtk_signal_connect( GTK_OBJECT( canvas ), "size_allocate", - GTK_SIGNAL_FUNC( allocate_callback ), - ( gpointer ) app ); - - gtk_widget_show_all( app ); - gdk_window_set_back_pixmap( GTK_LAYOUT(canvas)->bin_window, NULL, FALSE); - - gtk_main(); - - /* Not reached. */ - return 0; -} diff --git a/addressbook/printing/.cvsignore b/addressbook/printing/.cvsignore deleted file mode 100644 index 96194f7fd7..0000000000 --- a/addressbook/printing/.cvsignore +++ /dev/null @@ -1,9 +0,0 @@ -.deps -.libs -.pure -Makefile -Makefile.in -*.lo -*.la -contact-print-test -contact-print-style-editor-test diff --git a/addressbook/printing/Makefile.am b/addressbook/printing/Makefile.am deleted file mode 100644 index 5e02826bec..0000000000 --- a/addressbook/printing/Makefile.am +++ /dev/null @@ -1,66 +0,0 @@ -ecpsdir = $(datadir)/evolution/ecps - -ecps_DATA = \ - smallbook.ecps \ - medbook.ecps \ - phonelist.ecps - -gladedir = $(datadir)/evolution/glade - -glade_DATA = \ - e-contact-print.glade \ - e-contact-print.glade.h - -CPPFLAGS = \ - -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \ - -DEVOLUTION_ECPSDIR=\""$(ecpsdir)"\" \ - -DDATADIR=\""$(datadir)"\" \ - $(GNOME_PRINT_CFLAGS) - -INCLUDES = \ - $(GNOME_INCLUDEDIR) \ - -DG_LOG_DOMAIN=\"addressbook-printing\" \ - -I$(top_srcdir)/addressbook \ - -I$(top_srcdir) - -noinst_LIBRARIES = \ - libecontactprint.a - -libecontactprint_a_SOURCES = \ - e-contact-print.c \ - e-contact-print.h \ - e-contact-print-style-editor.c \ - e-contact-print-style-editor.h \ - e-contact-print-types.h - -noinst_PROGRAMS = \ - contact-print-test \ - contact-print-style-editor-test - -contact_print_test_SOURCES = \ - test-print.c - -contact_print_test_LDADD = \ - $(EXTRA_GNOME_LIBS) \ - -lbonobo \ - $(top_builddir)/addressbook/backend/ebook/libebook.la \ - $(top_builddir)/e-util/libeutil.la \ - $(top_builddir)/libversit/libversit.la \ - $(top_builddir)/addressbook/ename/libename.la \ - libecontactprint.a \ - $(GNOME_PRINT_LIBS) - -contact_print_style_editor_test_SOURCES = \ - test-contact-print-style-editor.c - -contact_print_style_editor_test_LDADD = \ - $(EXTRA_GNOME_LIBS) \ - -lbonobo \ - $(top_builddir)/addressbook/backend/ebook/libebook.la \ - $(top_builddir)/e-util/libeutil.la \ - $(top_builddir)/libversit/libversit.la \ - $(top_builddir)/addressbook/ename/libename.la \ - libecontactprint.a \ - $(GNOME_PRINT_LIBS) - -EXTRA_DIST = $(glade_DATA) $(ecps_DATA) diff --git a/addressbook/printing/e-contact-print-style-editor.c b/addressbook/printing/e-contact-print-style-editor.c deleted file mode 100644 index 5eb5cadacf..0000000000 --- a/addressbook/printing/e-contact-print-style-editor.c +++ /dev/null @@ -1,150 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * e-contact-print-style-editor.c - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include -#include "e-contact-print-style-editor.h" -static void e_contact_print_style_editor_init (EContactPrintStyleEditor *card); -static void e_contact_print_style_editor_class_init (EContactPrintStyleEditorClass *klass); -static void e_contact_print_style_editor_set_arg (GtkObject *o, GtkArg *arg, guint arg_id); -static void e_contact_print_style_editor_get_arg (GtkObject *object, GtkArg *arg, guint arg_id); -static void e_contact_print_style_editor_destroy (GtkObject *object); - -static GtkVBoxClass *parent_class = NULL; - - -/* The arguments we take */ -enum { - ARG_0, - ARG_CARD -}; - -GtkType -e_contact_print_style_editor_get_type (void) -{ - static GtkType contact_print_style_editor_type = 0; - - if (!contact_print_style_editor_type) - { - static const GtkTypeInfo contact_print_style_editor_info = - { - "EContactPrintStyleEditor", - sizeof (EContactPrintStyleEditor), - sizeof (EContactPrintStyleEditorClass), - (GtkClassInitFunc) e_contact_print_style_editor_class_init, - (GtkObjectInitFunc) e_contact_print_style_editor_init, - /* reserved_1 */ NULL, - /* reserved_2 */ NULL, - (GtkClassInitFunc) NULL, - }; - - contact_print_style_editor_type = gtk_type_unique (gtk_vbox_get_type (), &contact_print_style_editor_info); - } - - return contact_print_style_editor_type; -} - -static void -e_contact_print_style_editor_class_init (EContactPrintStyleEditorClass *klass) -{ - GtkObjectClass *object_class; - GtkVBoxClass *vbox_class; - - object_class = (GtkObjectClass*) klass; - vbox_class = (GtkVBoxClass *) klass; - - parent_class = gtk_type_class (gtk_vbox_get_type ()); - - object_class->set_arg = e_contact_print_style_editor_set_arg; - object_class->get_arg = e_contact_print_style_editor_get_arg; - object_class->destroy = e_contact_print_style_editor_destroy; -} - -#if 0 -static void -_add_image(GtkTable *table, gchar *image, int left, int right, int top, int bottom) -{ - gtk_table_attach(table, - gtk_widget_new(gtk_alignment_get_type(), - "child", gnome_pixmap_new_from_file(image), - "xalign", (double) 0, - "yalign", (double) 0, - "xscale", (double) 0, - "yscale", (double) 0, - NULL), - left, right, top, bottom, - GTK_FILL, GTK_FILL, - 0, 0); -} -#endif - -static void -e_contact_print_style_editor_init (EContactPrintStyleEditor *e_contact_print_style_editor) -{ - GladeXML *gui; - - /* e_contact_print_style_editor->card = NULL;*/ - gui = glade_xml_new (EVOLUTION_GLADEDIR "/e-contact-print.glade", NULL); - e_contact_print_style_editor->gui = gui; - gtk_widget_reparent(glade_xml_get_widget(gui, "vbox-contact-print-style-editor"), - GTK_WIDGET(e_contact_print_style_editor)); -} - -void -e_contact_print_style_editor_destroy (GtkObject *object) -{ - EContactPrintStyleEditor *e_contact_print_style_editor = E_CONTACT_PRINT_STYLE_EDITOR(object); - gtk_object_unref(GTK_OBJECT(e_contact_print_style_editor->gui)); -} - -GtkWidget* -e_contact_print_style_editor_new (char *filename) -{ - GtkWidget *widget = GTK_WIDGET (gtk_type_new (e_contact_print_style_editor_get_type ())); - return widget; -} - -static void -e_contact_print_style_editor_set_arg (GtkObject *o, GtkArg *arg, guint arg_id) -{ - EContactPrintStyleEditor *e_contact_print_style_editor; - - e_contact_print_style_editor = E_CONTACT_PRINT_STYLE_EDITOR (o); - - switch (arg_id){ - default: - break; - } -} - -static void -e_contact_print_style_editor_get_arg (GtkObject *object, GtkArg *arg, guint arg_id) -{ - EContactPrintStyleEditor *e_contact_print_style_editor; - - e_contact_print_style_editor = E_CONTACT_PRINT_STYLE_EDITOR (object); - - switch (arg_id) { - default: - arg->type = GTK_TYPE_INVALID; - break; - } -} diff --git a/addressbook/printing/e-contact-print-style-editor.h b/addressbook/printing/e-contact-print-style-editor.h deleted file mode 100644 index cf0f17f889..0000000000 --- a/addressbook/printing/e-contact-print-style-editor.h +++ /dev/null @@ -1,74 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* e-contact-print-style-editor.h - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef __E_CONTACT_PRINT_STYLE_EDITOR_H__ -#define __E_CONTACT_PRINT_STYLE_EDITOR_H__ - -#include -#include - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus */ - -/* EContactPrintStyleEditor - A dialog displaying information about a contact. - * - * The following arguments are available: - * - * name type read/write description - * -------------------------------------------------------------------------------- - * card ECard * R The card currently being edited - */ - -#define E_CONTACT_PRINT_STYLE_EDITOR_TYPE (e_contact_print_style_editor_get_type ()) -#define E_CONTACT_PRINT_STYLE_EDITOR(obj) (GTK_CHECK_CAST ((obj), E_CONTACT_PRINT_STYLE_EDITOR_TYPE, EContactPrintStyleEditor)) -#define E_CONTACT_PRINT_STYLE_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_CONTACT_PRINT_STYLE_EDITOR_TYPE, EContactPrintStyleEditorClass)) -#define E_IS_MINICARD(obj) (GTK_CHECK_TYPE ((obj), E_CONTACT_PRINT_STYLE_EDITOR_TYPE)) -#define E_IS_MINICARD_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_CONTACT_PRINT_STYLE_EDITOR_TYPE)) - - -typedef struct _EContactPrintStyleEditor EContactPrintStyleEditor; -typedef struct _EContactPrintStyleEditorClass EContactPrintStyleEditorClass; - -struct _EContactPrintStyleEditor -{ - GtkVBox parent; - - /* item specific fields */ - GladeXML *gui; -}; - -struct _EContactPrintStyleEditorClass -{ - GtkVBoxClass parent_class; -}; - - -GtkWidget *e_contact_print_style_editor_new(char *filename); -GtkType e_contact_print_style_editor_get_type (void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -#endif /* __E_CONTACT_PRINT_STYLE_EDITOR_H__ */ diff --git a/addressbook/printing/e-contact-print-types.h b/addressbook/printing/e-contact-print-types.h deleted file mode 100644 index e99cfe6d39..0000000000 --- a/addressbook/printing/e-contact-print-types.h +++ /dev/null @@ -1,74 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * e-contact-print-types.h - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef E_CONTACT_PRINT_TYPES_H -#define E_CONTACT_PRINT_TYPES_H - -#include -#include - -typedef struct _EContactPrintStyle EContactPrintStyle; -typedef enum _EContactPrintType EContactPrintType; - -enum _EContactPrintType { - E_CONTACT_PRINT_TYPE_CARDS, - E_CONTACT_PRINT_TYPE_MEMO_STYLE, - E_CONTACT_PRINT_TYPE_PHONE_LIST -}; - -struct _EContactPrintStyle -{ - gchar *title; - EContactPrintType type; - gboolean sections_start_new_page; - guint num_columns; - guint blank_forms; - gboolean letter_tabs; - gboolean letter_headings; - GnomeFont *headings_font; - GnomeFont *body_font; - gboolean print_using_grey; - gint paper_type; - gdouble paper_width; - gdouble paper_height; - gint paper_source; - gdouble top_margin; - gdouble left_margin; - gdouble bottom_margin; - gdouble right_margin; - gint page_size; - gdouble page_width; - gdouble page_height; - gboolean orientation_portrait; - GnomeFont *header_font; - gchar *left_header; - gchar *center_header; - gchar *right_header; - GnomeFont *footer_font; - gchar *left_footer; - gchar *center_footer; - gchar *right_footer; - gboolean reverse_on_even_pages; -}; - -#endif /* E_CONTACT_PRINT_TYPES_H */ - diff --git a/addressbook/printing/e-contact-print.c b/addressbook/printing/e-contact-print.c deleted file mode 100644 index 98c4d96a47..0000000000 --- a/addressbook/printing/e-contact-print.c +++ /dev/null @@ -1,1023 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * e-contact-print.c - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - - -#include "e-contact-print.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define SCALE 5 -#define HYPHEN_PIXELS 20 -#define HYPHEN_PENALTY ( (SCALE) * (SCALE) * (HYPHEN_PIXELS) * (HYPHEN_PIXELS) ) - -typedef struct _EContactPrintContext EContactPrintContext; - -struct _EContactPrintContext -{ - GnomePrintContext *pc; - GnomePrintMaster *master; - gdouble x; - gdouble y; - gint column; - EContactPrintStyle *style; - gboolean first_section; - gchar first_char_on_page; - gchar last_char_on_page; - GnomeFont *letter_heading_font; - GnomeFont *letter_tab_font; - char *character; - gboolean first_contact; - - int type; - EBook *book; - gchar *query; -}; - -static gint -e_contact_divide_text(GnomePrintContext *pc, GnomeFont *font, double width, const gchar *text, GList **return_val /* Of type char[] */) -{ - if ( width == -1 || gnome_font_get_width_string(font, text) <= width ) { - if ( return_val ) { - *return_val = g_list_append(*return_val, g_strdup(text)); - } - return 1; - } else { -#if 1 - int i, l; - double x = 0; - int lastend = 0; - int linestart = 0; - int firstword = 1; - int linecount = 0; - l = strlen(text); - for ( i = 0; i < l; i++ ) { - if ( text[i] == ' ' ) { - if ( (!firstword) && x + gnome_font_get_width_string_n(font, text + lastend, i - lastend) > width ) { - if (return_val) { - *return_val = g_list_append(*return_val, g_strndup(text + linestart, lastend - linestart)); - } - x = gnome_font_get_width_string(font, " "); - linestart = lastend + 1; - x += gnome_font_get_width_string_n(font, text + linestart, i - linestart); - lastend = i; - linecount ++; - } else { - x += gnome_font_get_width_string_n(font, text + lastend, i - lastend); - lastend = i; - } - firstword = 0; - } else if ( text[i] == '\n' ) { - if ( (!firstword) && x + gnome_font_get_width_string_n(font, text + lastend, i - lastend) > width ) { - if (return_val) { - *return_val = g_list_append(*return_val, g_strndup(text + linestart, lastend - linestart)); - } - linestart = lastend + 1; - lastend = i; - linecount ++; - } - if (return_val) { - *return_val = g_list_append(*return_val, g_strndup(text + linestart, i - linestart)); - } - linestart = i + 1; - lastend = i + 1; - linecount ++; - x = gnome_font_get_width_string(font, " "); - - firstword = 1; - } - } - if ( (!firstword) && x + gnome_font_get_width_string_n(font, text + lastend, i - lastend) > width ) { - if (return_val) { - *return_val = g_list_append(*return_val, g_strndup(text + linestart, lastend - linestart)); - } - linestart = lastend + 1; - lastend = i; - linecount ++; - } - if (return_val) { - *return_val = g_list_append(*return_val, g_strndup(text + linestart, i - linestart)); - } - linecount ++; - return(linecount); -#else - HnjBreak *breaks; - gint *result; - gint *is; - gint n_breaks = 0, n_actual_breaks = 0; - gint i; - gint l; - gchar *hyphenation; - double x = - gnome_font_get_width_string(font, " ") * SCALE; - HnjParams hnjparams; - - hnjparams.set_width = width * SCALE + x; - hnjparams.max_neg_space = 0; - hnjparams.tab_width = 0; - - l = strlen(text); - - /* find possible line breaks. */ - for (i = 0; i < l; i++) { - if (text[i] == '-') - n_breaks++; - else if (text[i] == ' ') - n_breaks++; -#if 0 - else if (hyphenation[i] & 1) - n_breaks++; -#endif - } - - breaks = g_new( HnjBreak, n_breaks + 1 ); - result = g_new( gint, n_breaks + 1 ); - is = g_new( gint, n_breaks + 1 ); - n_breaks = 0; - /* find possible line breaks. */ - - for (i = 0; i < l; i++) { - if ( text[i] == '-' ) { - x += gnome_font_get_width(font, text[i]) * SCALE; - breaks[n_breaks].x0 = x; - breaks[n_breaks].x1 = x; - breaks[n_breaks].penalty = HYPHEN_PENALTY; - breaks[n_breaks].flags = HNJ_JUST_FLAG_ISHYPHEN; - is[n_breaks] = i + 1; - n_breaks++; - } else if ( text[i] == ' ' ) { - breaks[ n_breaks ].x0 = x; - x += gnome_font_get_width(font, text[i]) * SCALE; - breaks[ n_breaks ].x1 = x; - breaks[ n_breaks ].penalty = 0; - breaks[ n_breaks ].flags = HNJ_JUST_FLAG_ISSPACE; - is[ n_breaks ] = i + 1; - n_breaks++; -#if 0 - } else if (word->hyphenation[i] & 1) { - breaks[n_breaks].x0 = x + gnome_font_get_width(font, '-') * SCALE; - breaks[n_breaks].x1 = x; - breaks[n_breaks].penalty = HYPHEN_PENALTY; - breaks[n_breaks].flags = HNJ_JUST_FLAG_ISHYPHEN; - is[n_breaks] = i + 1; - n_breaks++; -#endif - } else - x += gnome_font_get_width(font, text[i]) * SCALE; - - } - is[n_breaks] = i; - breaks[n_breaks].flags = 0; - n_breaks++; - - /* Calculate optimal line breaks. */ - n_actual_breaks = hnj_hs_just (breaks, n_breaks, - &hnjparams, result); - - if ( return_val ) { - gchar *next_val; - if ( breaks[result[0]].flags == HNJ_JUST_FLAG_ISHYPHEN && text[is[result[0]]] != '-' ) { - next_val = g_new(gchar, is[result[0]] + 2); - strncpy(next_val, text, is[result[0]]); - next_val[is[result[0]]] = 0; - strcat(next_val, "-"); - } else { - next_val = g_new(gchar, is[result[0]] + 1); - strncpy(next_val, text, is[result[0]]); - next_val[is[result[0]]] = 0; - } - *return_val = g_list_append(*return_val, next_val); - - for ( i = 1; i < n_actual_breaks; i++ ) { - if ( (breaks[result[i]].flags & HNJ_JUST_FLAG_ISHYPHEN) && (text[is[result[i]]] != '-') ) { - next_val = g_new(gchar, is[result[i]] - is[result[i - 1]] + 2); - strncpy(next_val, text + is[result[i - 1]], is[result[i]] - is[result[i - 1]]); - next_val[is[result[i]] - is[result[i - 1]]] = 0; - strcat(next_val, "-"); - } else { - next_val = g_new(gchar, is[result[i]] - is[result[i - 1]] + 1); - strncpy(next_val, text + is[result[i - 1]], is[result[i]] - is[result[i - 1]]); - next_val[is[result[i]] - is[result[i - 1]]] = 0; - } - *return_val = g_list_append(*return_val, next_val); - } - } - - g_free (breaks); - g_free (result); - g_free (is); - return n_actual_breaks; -#endif - } -} - -static void -e_contact_output(GnomePrintContext *pc, GnomeFont *font, double x, double y, double width, const gchar *text) -{ - GList *list = NULL, *list_start; - int first_line = 1; - gnome_print_gsave(pc); - gnome_print_setfont(pc, font); - e_contact_divide_text(pc, font, width, text, &list); - for ( list_start = list; list; list = g_list_next(list)) { - y -= gnome_font_get_ascender(font); - gnome_print_moveto(pc, x, y); - gnome_print_show(pc, (char *)list->data); - y -= gnome_font_get_descender(font); - y -= .2 * font->size; - if ( first_line ) { - x += gnome_font_get_width_string(font, " "); - first_line = 0; - } - } - g_list_foreach( list_start, (GFunc) g_free, NULL ); - g_list_free( list_start ); - gnome_print_grestore(pc); -} - -static gdouble -e_contact_text_height(GnomePrintContext *pc, GnomeFont *font, double width, gchar *text) -{ - int line_count = e_contact_divide_text(pc, font, width, text, NULL); - return line_count * (gnome_font_get_ascender(font) + gnome_font_get_descender(font)) + - line_count * .2 * font->size; -} - -#if 0 -static void -e_contact_output_and_advance(EContactPrintContext *ctxt, GnomeFont *font, double x, double width, gchar *text) -{ - ctxt->y -= .1 * font->size; - e_contact_output(ctxt->pc, font, x, ctxt->y, width, text); - ctxt->y -= e_contact_text_height(ctxt->pc, font, width, text); - ctxt->y -= .1 * font->size; -} -#endif - -static void -e_contact_rectangle(GnomePrintContext *pc, - gdouble x0, - gdouble y0, - gdouble x1, - gdouble y1, - gdouble r, - gdouble g, - gdouble b) -{ - gnome_print_gsave(pc); - gnome_print_setrgbcolor(pc, r, g, b); - gnome_print_moveto(pc, x0, y0); - gnome_print_lineto(pc, x1, y0); - gnome_print_lineto(pc, x1, y1); - gnome_print_lineto(pc, x0, y1); - gnome_print_lineto(pc, x0, y0); - gnome_print_fill(pc); - gnome_print_grestore(pc); -} - -static double -e_contact_get_letter_tab_width (EContactPrintContext *ctxt) -{ - return gnome_font_get_width_string(ctxt->letter_tab_font, "123") + 4 + 18; -} - -static double -e_contact_print_letter_tab (EContactPrintContext *ctxt) -{ - char character; - gdouble x, y; - gdouble page_width = 72 * (ctxt->style->page_width - ctxt->style->left_margin - ctxt->style->right_margin); - gdouble tab_height, tab_width; - gdouble font_size; - tab_height = 72 * (ctxt->style->page_height - ctxt->style->top_margin - ctxt->style->bottom_margin) / 27.0; - font_size = tab_height / 2; - tab_width = e_contact_get_letter_tab_width(ctxt) - 18; - x = page_width + 72 * (ctxt->style->left_margin) - tab_width; - y = 72 * (ctxt->style->page_height - ctxt->style->top_margin); - - - gnome_print_gsave( ctxt->pc ); - if ( ctxt->style->print_using_grey ) - e_contact_rectangle( ctxt->pc, x, 72 * (ctxt->style->page_height - ctxt->style->top_margin), x + tab_width, ctxt->style->bottom_margin * 72, .85, .85, .85 ); - for ( character = 'A' - 1; character <= 'Z'; character ++ ) { - char string[] = "123"; - if ( character >= 'A' ) { - string[0] = tolower(character); - string[1] = 0; - } - if ( character >= ctxt->first_char_on_page && character <= ctxt->last_char_on_page ) { - e_contact_rectangle( ctxt->pc, x + 1, y - 1, x + tab_width - 1, y - (tab_height - 1), 0, 0, 0 ); - gnome_print_setrgbcolor( ctxt->pc, 1, 1, 1 ); - e_contact_output( ctxt->pc, ctxt->letter_tab_font, x + tab_width / 2 - gnome_font_get_width_string(ctxt->letter_tab_font, string) / 2, y - (tab_height - font_size) / 2, -1, string ); - } else { - gnome_print_setrgbcolor( ctxt->pc, 0, 0, 0 ); - e_contact_output( ctxt->pc, ctxt->letter_tab_font, x + tab_width / 2 - gnome_font_get_width_string(ctxt->letter_tab_font, string) / 2, y - (tab_height - font_size) / 2, -1, string ); - } - y -= tab_height; - } - gnome_print_grestore( ctxt->pc ); - return gnome_font_get_width_string(ctxt->style->body_font, "123") + ctxt->style->body_font->size / 5; -} - -static double -e_contact_get_letter_heading_height (EContactPrintContext *ctxt) -{ - gdouble ascender, descender; - ascender = gnome_font_get_ascender(ctxt->letter_heading_font); - descender = gnome_font_get_descender(ctxt->letter_heading_font); - return ascender + descender + 9; -} - -static void -e_contact_print_letter_heading (EContactPrintContext *ctxt, gchar *character) -{ - gdouble ascender, descender; - gdouble width; - - width = gnome_font_get_width_string(ctxt->letter_heading_font, "m") * 1.7; - ascender = gnome_font_get_ascender(ctxt->letter_heading_font); - descender = gnome_font_get_descender(ctxt->letter_heading_font); - gnome_print_gsave( ctxt->pc ); - e_contact_rectangle( ctxt->pc, ctxt->x, ctxt->y, ctxt->x + width, ctxt->y - (ascender + descender + 6), 0, 0, 0); - gnome_print_setrgbcolor(ctxt->pc, 1, 1, 1); - ctxt->y -= 4; - e_contact_output(ctxt->pc, ctxt->letter_heading_font, ctxt->x + (width - gnome_font_get_width_string(ctxt->letter_heading_font, character))/ 2, ctxt->y, -1, character); - ctxt->y -= ascender + descender; - ctxt->y -= 2; - ctxt->y -= 3; - gnome_print_grestore( ctxt->pc ); -} - -static void -e_contact_start_new_page(EContactPrintContext *ctxt) -{ - ctxt->x = ctxt->style->left_margin * 72; - ctxt->y = (ctxt->style->page_height - ctxt->style->top_margin) * 72; - ctxt->column = 0; - if ( ctxt->style->letter_tabs ) - e_contact_print_letter_tab(ctxt); - gnome_print_showpage(ctxt->pc); - - ctxt->first_char_on_page = ctxt->last_char_on_page + 1; -} - -static double -e_contact_get_card_size(ECardSimple *simple, EContactPrintContext *ctxt) -{ - gdouble height = 0; - gdouble page_width = 72 * (ctxt->style->page_width - ctxt->style->left_margin - ctxt->style->right_margin); - gdouble column_width; - char *file_as; - gint field; - if ( ctxt->style->letter_tabs ) - page_width -= e_contact_get_letter_tab_width(ctxt); - column_width = (page_width + 18) / ctxt->style->num_columns - 18; - - height += ctxt->style->headings_font->size * .2; - - height += ctxt->style->headings_font->size * .2; - - gtk_object_get(GTK_OBJECT(simple->card), - "file_as", &file_as, - NULL); - height += e_contact_text_height(ctxt->pc, ctxt->style->headings_font, column_width - 4, file_as); - height += ctxt->style->headings_font->size * .2; - - height += ctxt->style->headings_font->size * .2; - - for(field = E_CARD_SIMPLE_FIELD_FULL_NAME; field != E_CARD_SIMPLE_FIELD_LAST; field++) { - char *string; - string = e_card_simple_get(simple, field); - if (string && *string) { - double xoff = 0; - xoff += gnome_font_get_width_string(ctxt->style->body_font, e_card_simple_get_name(simple, field)); - xoff += gnome_font_get_width_string(ctxt->style->body_font, ": "); - height += e_contact_text_height(ctxt->pc, ctxt->style->body_font, column_width - xoff, string); - height += .2 * ctxt->style->body_font->size; - } - g_free(string); - } - height += ctxt->style->headings_font->size * .4; - return height; -} - - -static void -e_contact_print_card (ECardSimple *simple, EContactPrintContext *ctxt) -{ - gdouble page_width = 72 * (ctxt->style->page_width - ctxt->style->left_margin - ctxt->style->right_margin); - gdouble column_width; - char *file_as; - int field; - - if ( ctxt->style->letter_tabs ) - page_width -= e_contact_get_letter_tab_width(ctxt); - column_width = (page_width + 18) / ctxt->style->num_columns - 18; - - gnome_print_gsave(ctxt->pc); - - ctxt->y -= ctxt->style->headings_font->size * .2; - - ctxt->y -= ctxt->style->headings_font->size * .2; - - gtk_object_get(GTK_OBJECT(simple->card), - "file_as", &file_as, - NULL); - if (ctxt->style->print_using_grey) - e_contact_rectangle(ctxt->pc, ctxt->x, ctxt->y + ctxt->style->headings_font->size * .2, ctxt->x + column_width, ctxt->y - e_contact_text_height(ctxt->pc, ctxt->style->headings_font, column_width - 4, file_as) - ctxt->style->headings_font->size * .2, .85, .85, .85); - e_contact_output(ctxt->pc, ctxt->style->headings_font, ctxt->x + 2, ctxt->y, column_width - 4, file_as); - ctxt->y -= e_contact_text_height(ctxt->pc, ctxt->style->headings_font, column_width - 4, file_as); - ctxt->y -= ctxt->style->headings_font->size * .2; - - ctxt->y -= ctxt->style->headings_font->size * .2; - - for(field = E_CARD_SIMPLE_FIELD_FULL_NAME; field != E_CARD_SIMPLE_FIELD_LAST; field++) { - char *string; - string = e_card_simple_get(simple, field); - if (string && *string) { - double xoff = 0; - e_contact_output(ctxt->pc, ctxt->style->body_font, ctxt->x + xoff, ctxt->y, -1, e_card_simple_get_name(simple, field)); - xoff += gnome_font_get_width_string(ctxt->style->body_font, e_card_simple_get_name(simple, field)); - e_contact_output(ctxt->pc, ctxt->style->body_font, ctxt->x + xoff, ctxt->y, -1, ": "); - xoff += gnome_font_get_width_string(ctxt->style->body_font, ": "); - e_contact_output(ctxt->pc, ctxt->style->body_font, ctxt->x + xoff, ctxt->y, column_width - xoff, string); - ctxt->y -= e_contact_text_height(ctxt->pc, ctxt->style->body_font, column_width - xoff, string); - ctxt->y -= .2 * ctxt->style->body_font->size; - } - g_free(string); - } - - ctxt->y -= ctxt->style->headings_font->size * .4; - gnome_print_grestore(ctxt->pc); -} - -static void -e_contact_start_new_column (EContactPrintContext *ctxt) -{ - gdouble page_width = 72 * (ctxt->style->page_width - ctxt->style->left_margin - ctxt->style->right_margin); - gdouble column_offset; - if ( ctxt->style->letter_tabs ) - page_width -= e_contact_get_letter_tab_width(ctxt); - column_offset = (page_width + 18) / ctxt->style->num_columns; - ctxt->column ++; - if (ctxt->column >= ctxt->style->num_columns) { - e_contact_start_new_page(ctxt); - ctxt->column = 0; - } - ctxt->x = (72 * ctxt->style->left_margin) + column_offset * ctxt->column; - ctxt->y = 72 * (ctxt->style->page_height - ctxt->style->top_margin); -} - -static void -create_card(EBookView *book_view, const GList *cards, EContactPrintContext *ctxt) -{ - for(; cards; cards = cards->next) { - ECard *card = cards->data; - ECardSimple *simple = e_card_simple_new(card); - gchar *file_as; - - gtk_object_get(GTK_OBJECT(card), - "file_as", &file_as, - NULL); - if ( file_as && (!ctxt->character || *ctxt->character != tolower(*file_as)) ) { - if (ctxt->style->sections_start_new_page && ! ctxt->first_contact) { - e_contact_start_new_page(ctxt); - } - else if ((!ctxt->first_contact) && (ctxt->y - e_contact_get_letter_heading_height(ctxt) - e_contact_get_card_size(simple, ctxt) < ctxt->style->bottom_margin * 72)) - e_contact_start_new_column(ctxt); - if (!ctxt->character) - ctxt->character = g_strdup(" "); - *ctxt->character = tolower(*file_as); - if ( ctxt->style->letter_headings ) - e_contact_print_letter_heading(ctxt, ctxt->character); - ctxt->first_section = FALSE; - } - else if ( (!ctxt->first_contact) && (ctxt->y - e_contact_get_card_size(simple, ctxt) < ctxt->style->bottom_margin * 72)) { - e_contact_start_new_column(ctxt); - if ( ctxt->style->letter_headings ) - e_contact_print_letter_heading(ctxt, ctxt->character); - } - ctxt->last_char_on_page = toupper(*file_as); - if ( ctxt->last_char_on_page < ctxt->first_char_on_page ) - ctxt->first_char_on_page = ctxt->last_char_on_page; - e_contact_print_card(simple, ctxt); - ctxt->first_contact = FALSE; - gtk_object_unref(GTK_OBJECT(simple)); - } - ctxt->last_char_on_page = 'Z'; - if ( ctxt->style->letter_tabs ) - e_contact_print_letter_tab(ctxt); - gnome_print_showpage(ctxt->pc); - gnome_print_context_close(ctxt->pc); - g_free(ctxt->character); - gtk_object_unref(GTK_OBJECT(book_view)); - if (ctxt->type == GNOME_PRINT_PREVIEW) { - GtkWidget *preview; - preview = GTK_WIDGET(gnome_print_master_preview_new(ctxt->master, "Print Preview")); - gtk_widget_show_all(preview); - } else { - gnome_print_master_print(ctxt->master); - } - gtk_object_unref(GTK_OBJECT(ctxt->pc)); - gtk_object_unref(GTK_OBJECT(ctxt->master)); - gtk_object_unref(GTK_OBJECT(ctxt->book)); - g_free(ctxt->query); - gtk_object_unref(GTK_OBJECT(ctxt->style->headings_font)); - gtk_object_unref(GTK_OBJECT(ctxt->style->body_font)); - gtk_object_unref(GTK_OBJECT(ctxt->style->header_font)); - gtk_object_unref(GTK_OBJECT(ctxt->style->footer_font)); - gtk_object_unref(GTK_OBJECT(ctxt->letter_heading_font)); - gtk_object_unref(GTK_OBJECT(ctxt->letter_tab_font)); - g_free(ctxt->style); - g_free(ctxt); -} - -static void -book_view_loaded (EBook *book, EBookStatus status, EBookView *book_view, EContactPrintContext *ctxt) -{ - gtk_object_ref(GTK_OBJECT(book_view)); - - gtk_signal_connect(GTK_OBJECT(book_view), - "card_added", - GTK_SIGNAL_FUNC(create_card), - ctxt); -} - -static void -e_contact_do_print_cards (EBook *book, char *query, EContactPrintContext *ctxt) -{ - gdouble page_width = 72 * (ctxt->style->page_width - ctxt->style->left_margin - ctxt->style->right_margin); - ctxt->first_contact = TRUE; - ctxt->character = NULL; - ctxt->y = (ctxt->style->page_height - ctxt->style->top_margin) * 72; - ctxt->x = (ctxt->style->left_margin) * 72; - if ( ctxt->style->letter_tabs ) - page_width -= e_contact_get_letter_tab_width(ctxt); - - ctxt->first_char_on_page = 'A' - 1; - - e_book_get_book_view(book, query, (EBookBookViewCallback) book_view_loaded, ctxt); -} - -#if 0 -static double -e_contact_get_phone_list_size(ECardSimple *simple, EContactPrintContext *ctxt) -{ - double height = 0; - int field; - - height += ctxt->style->headings_font->size * .2; - - height += ctxt->style->headings_font->size * .2; - - for(field = E_CARD_SIMPLE_FIELD_FULL_NAME; field != E_CARD_SIMPLE_FIELD_LAST; field++) { - char *string; - string = e_card_simple_get(simple, field); - if (string && *string) { - if ( 1 ) /* field is a phone field. */ { - gchar *field = string; - height += e_contact_text_height(ctxt->pc, ctxt->style->body_font, 100, field); - height += .2 * ctxt->style->body_font->size; - } - } - g_free(string); - } - height += ctxt->style->headings_font->size * .4; - return height; -} - - -static void -e_contact_print_phone_list (ECard *card, EContactPrintContext *ctxt) -{ - gdouble page_width = 72 * (ctxt->style->page_width - ctxt->style->left_margin - ctxt->style->right_margin); - gdouble column_width; - double xoff, dotwidth; - int dotcount; - char *dots; - int i; - char *file_as; - if ( ctxt->style->letter_tabs ) - page_width -= e_contact_get_letter_tab_width(ctxt); - column_width = (page_width + 18) / ctxt->style->num_columns - 18; - - gnome_print_gsave(ctxt->pc); - - ctxt->y -= ctxt->style->headings_font->size * .2; - - ctxt->y -= ctxt->style->headings_font->size * .2; - - e_contact_output(ctxt->pc, ctxt->style->body_font, ctxt->x, ctxt->y, -1, e_card_get_string_fileas(card)); - - xoff = column_width - 9 * ctxt->style->body_font->size; - dotwidth = xoff - - gnome_font_get_width_string(ctxt->style->body_font, e_card_get_string_fileas(card)) - - gnome_font_get_width_string(ctxt->style->body_font, " "); - dotcount = dotwidth / gnome_font_get_width(ctxt->style->body_font, '.'); - dots = g_new(gchar, dotcount + 1); - for (i = 0; i < dotcount; i++) - dots[i] = '.'; - dots[dotcount] = 0; - e_contact_output(ctxt->pc, ctxt->style->body_font, ctxt->x + xoff - dotcount * gnome_font_get_width(ctxt->style->body_font, '.'), ctxt->y, -1, dots); - g_free(dots); - - for(; shown_fields; shown_fields = g_list_next(shown_fields)) { - if ( 1 ) /* field is a phone field. */ { - gchar *field = e_card_get_string(card, shown_fields->data); - e_contact_output(ctxt->pc, ctxt->style->body_font, ctxt->x + xoff, ctxt->y, -1, shown_fields->data); - e_contact_output(ctxt->pc, ctxt->style->body_font, - ctxt->x + column_width - gnome_font_get_width_string(ctxt->style->body_font, - field), - ctxt->y, - -1, - field); - ctxt->y -= e_contact_text_height(ctxt->pc, ctxt->style->body_font, 100, field); - ctxt->y -= .2 * ctxt->style->body_font->size; - } - } - ctxt->y -= ctxt->style->headings_font->size * .4; - gnome_print_grestore(ctxt->pc); -} - -static void -e_contact_do_print_phone_list (EBook *book, char *query, EContactPrintContext *ctxt) -{ - ECard *card = NULL; - int i; - gdouble page_width = 72 * (ctxt->style->page_width - ctxt->style->left_margin - ctxt->style->right_margin); - gdouble column_width; - ctxt->first_contact = TRUE; - ctxt->character = NULL; - ctxt->y = (ctxt->style->page_height - ctxt->style->top_margin) * 72; - ctxt->x = (ctxt->style->left_margin) * 72; - if ( ctxt->style->letter_tabs ) - page_width -= e_contact_get_letter_tab_width(ctxt); - - ctxt->first_char_on_page = 'A' - 1; - - column_width = (page_width + 18) / ctxt->style->num_columns - 18; - /* - for(card = e_book_get_first(book); card; card = e_book_get_next(book)) { - */ - for (i=0; i < 30; i++) { - gchar *file_as = e_card_get_string_fileas(card); - if ( file_as && (!character || *character != tolower(*file_as)) ) { - if (ctxt->style->sections_start_new_page && ! first_contact) { - e_contact_start_new_page(ctxt); - } - else if ((!first_contact) && (ctxt->y - e_contact_get_letter_heading_height(ctxt) - e_contact_get_phone_list_size(card, ctxt, shown_fields) < ctxt->style->bottom_margin * 72)) - e_contact_start_new_column(ctxt); - if (!character) - character = g_strdup(" "); - *character = tolower(*file_as); - if ( ctxt->style->letter_headings ) - e_contact_print_letter_heading(ctxt, character); - ctxt->first_section = FALSE; - } - else if ( (!first_contact) && (ctxt->y - e_contact_get_card_size(card, ctxt, shown_fields) < ctxt->style->bottom_margin * 72)) { - e_contact_start_new_column(ctxt); - if ( ctxt->style->letter_headings ) - e_contact_print_letter_heading(ctxt, character); - } - ctxt->last_char_on_page = toupper(*file_as); - if ( ctxt->last_char_on_page < ctxt->first_char_on_page ) - ctxt->first_char_on_page = ctxt->last_char_on_page; - e_contact_print_phone_list(card, ctxt, shown_fields); - first_contact = FALSE; - } - ctxt->last_char_on_page = 'Z'; - if ( ctxt->style->letter_tabs ) - e_contact_print_letter_tab(ctxt); - gnome_print_showpage(ctxt->pc); - gnome_print_context_close(ctxt->pc); - g_free(character); -} -#endif - -static void -e_contact_do_print (EBook *book, char *query, EContactPrintContext *ctxt) -{ - switch ( ctxt->style->type ) { - case E_CONTACT_PRINT_TYPE_CARDS: - e_contact_do_print_cards( book, query, ctxt); - break; -#if 0 - case E_CONTACT_PRINT_TYPE_PHONE_LIST: - e_contact_do_print_phone_list( book, query, ctxt ); - break; -#endif - default: - break; - } -} - -static void lowify( char *data ) -{ - for ( ; *data; data++ ) - *data = tolower(*data); -} - -static gboolean get_bool( char *data ) -{ - if ( data ) { - lowify ( data ); - return ! strcmp(data, "true"); - } else - return FALSE; -} - -static void get_string( char *data, char **variable ) -{ - g_free ( *variable ); - if ( data ) - *variable = g_strdup( data ); - else - *variable = g_strdup( "" ); -} - -static int get_integer( char *data ) -{ - if ( data ) - return atoi(data); - else - return 0; -} - -static double get_float( char *data ) -{ - if ( data ) - return atof(data); - else - return 0; -} - -static void get_font( char *data, GnomeFont **variable ) -{ - if ( data ) { - GnomeFont *font = gnome_font_new_from_full_name( data ); - if ( font ) { - gtk_object_unref( GTK_OBJECT(*variable) ); - *variable = font; - } - } -} - - -static void -e_contact_build_style(EContactPrintStyle *style) -{ - xmlDocPtr styledoc; - gchar *filename; - style->title = g_strdup(""); - style->type = E_CONTACT_PRINT_TYPE_CARDS; - style->sections_start_new_page = TRUE; - style->num_columns = 2; - style->blank_forms = 2; - style->letter_tabs = TRUE; - style->letter_headings = FALSE; - style->headings_font = gnome_font_new("Helvetica-Bold", 8); - style->body_font = gnome_font_new("Helvetica", 6); - style->print_using_grey = TRUE; - style->paper_type = 0; - style->paper_width = 8.5; - style->paper_height = 11; - style->paper_source = 0; - style->top_margin = .5; - style->left_margin = .5; - style->bottom_margin = .5; - style->right_margin = .5; - style->page_size = 0; - style->page_width = 2.75; - style->page_height = 4.25; -#if 0 - style->page_width = 4.25; - style->page_height = 5.5; -#endif -#if 0 - style->page_width = 5.5; - style->page_height = 8.5; -#endif - style->orientation_portrait = FALSE; - style->header_font = gnome_font_new("Helvetica", 6); - style->left_header = g_strdup(""); - style->center_header = g_strdup(""); - style->right_header = g_strdup(""); - style->footer_font = gnome_font_new("Helvetica", 6); - style->left_footer = g_strdup(""); - style->center_footer = g_strdup(""); - style->right_footer = g_strdup(""); - style->reverse_on_even_pages = FALSE; - filename = g_concat_dir_and_file(EVOLUTION_ECPSDIR, "smallbook.ecps"); - styledoc = xmlParseFile(filename); - g_free(filename); - if (styledoc) { - xmlNodePtr stylenode = xmlDocGetRootElement(styledoc); - xmlNodePtr node; - for (node = stylenode->childs; node; node = node->next) { - char *data = xmlNodeGetContent ( node ); - if ( !strcmp( node->name, "title" ) ) { - get_string(data, &(style->title)); - } else if ( !strcmp( node->name, "type" ) ) { - lowify( data ); - if ( !strcmp( data, "cards" ) ) - style->type = E_CONTACT_PRINT_TYPE_CARDS; - else if ( !strcmp( data, "memo_style" ) ) - style->type = E_CONTACT_PRINT_TYPE_MEMO_STYLE; - else if ( !strcmp( data, "phone_list" ) ) - style->type = E_CONTACT_PRINT_TYPE_PHONE_LIST; - } else if ( !strcmp( node->name, "sections_start_new_page" ) ) { - style->sections_start_new_page = get_bool(data); - } else if ( !strcmp( node->name, "num_columns" ) ) { - style->num_columns = get_integer(data); - } else if ( !strcmp( node->name, "blank_forms" ) ) { - style->blank_forms = get_integer(data); - } else if ( !strcmp( node->name, "letter_tabs" ) ) { - style->letter_tabs = get_bool(data); - } else if ( !strcmp( node->name, "letter_headings" ) ) { - style->letter_headings = get_bool(data); - } else if ( !strcmp( node->name, "headings_font" ) ) { - get_font( data, &(style->headings_font) ); - } else if ( !strcmp( node->name, "body_font" ) ) { - get_font( data, &(style->body_font) ); - } else if ( !strcmp( node->name, "print_using_grey" ) ) { - style->print_using_grey = get_bool(data); - } else if ( !strcmp( node->name, "paper_width" ) ) { - style->paper_width = get_float(data); - } else if ( !strcmp( node->name, "paper_height" ) ) { - style->paper_height = get_float(data); - } else if ( !strcmp( node->name, "top_margin" ) ) { - style->top_margin = get_float(data); - } else if ( !strcmp( node->name, "left_margin" ) ) { - style->left_margin = get_float(data); - } else if ( !strcmp( node->name, "bottom_margin" ) ) { - style->bottom_margin = get_float(data); - } else if ( !strcmp( node->name, "right_margin" ) ) { - style->right_margin = get_float(data); - } else if ( !strcmp( node->name, "page_width" ) ) { - style->page_width = get_float(data); - } else if ( !strcmp( node->name, "page_height" ) ) { - style->page_height = get_float(data); - } else if ( !strcmp( node->name, "orientation" ) ) { - if ( data ) { - lowify(data); - style->orientation_portrait = strcmp(data, "landscape"); - } else { - style->orientation_portrait = TRUE; - } - } else if ( !strcmp( node->name, "header_font" ) ) { - get_font( data, &(style->header_font) ); - } else if ( !strcmp( node->name, "left_header" ) ) { - get_string(data, &(style->left_header)); - } else if ( !strcmp( node->name, "center_header" ) ) { - get_string(data, &(style->center_header)); - } else if ( !strcmp( node->name, "right_header" ) ) { - get_string(data, &(style->right_header)); - } else if ( !strcmp( node->name, "footer_font" ) ) { - get_font( data, &(style->footer_font) ); - } else if ( !strcmp( node->name, "left_footer" ) ) { - get_string(data, &(style->left_footer)); - } else if ( !strcmp( node->name, "center_footer" ) ) { - get_string(data, &(style->center_footer)); - } else if ( !strcmp( node->name, "right_footer" ) ) { - get_string(data, &(style->right_footer)); - } else if ( !strcmp( node->name, "reverse_on_even_pages" ) ) { - style->reverse_on_even_pages = get_bool(data); - } - if ( data ) - xmlFree (data); - } - xmlFreeDoc(styledoc); - } -} - -static gint -e_contact_print_close(GnomeDialog *dialog, gpointer data) -{ - return FALSE; -} - -static void -e_contact_print_button(GnomeDialog *dialog, gint button, gpointer data) -{ - EContactPrintContext *ctxt = g_new(EContactPrintContext, 1); - EContactPrintStyle *style = g_new(EContactPrintStyle, 1); - GnomePrintMaster *master; - GnomePrintContext *pc; - EBook *book = gtk_object_get_data(GTK_OBJECT(dialog), "book"); - char *query = gtk_object_get_data(GTK_OBJECT(dialog), "query"); - gdouble font_size; - switch( button ) { - case GNOME_PRINT_PRINT: - master = gnome_print_master_new_from_dialog( GNOME_PRINT_DIALOG(dialog) ); - pc = gnome_print_master_get_context( master ); - e_contact_build_style(style); - - ctxt->x = 0; - ctxt->y = 0; - ctxt->column = 0; - ctxt->style = style; - ctxt->master = master; - ctxt->first_section = TRUE; - ctxt->first_char_on_page = 'A' - 1; - ctxt->type = GNOME_PRINT_PRINT; - - font_size = 72 * ctxt->style->page_height / 27.0 / 2.0; - ctxt->letter_heading_font = gnome_font_new(gnome_font_get_name(ctxt->style->headings_font), ctxt->style->headings_font->size * 1.5); - ctxt->letter_tab_font = gnome_font_new(gnome_font_get_name(ctxt->style->headings_font), font_size); - - ctxt->pc = GNOME_PRINT_CONTEXT(gnome_print_multipage_new_from_sizes(pc, - 72 * style->paper_width, - 72 * style->paper_height, - 72 * style->page_width, - 72 * style->page_height)); - - ctxt->book = book; - ctxt->query = query; - e_contact_do_print(book, ctxt->query, ctxt); - gnome_dialog_close(dialog); - break; - case GNOME_PRINT_PREVIEW: - master = gnome_print_master_new_from_dialog( GNOME_PRINT_DIALOG(dialog) ); - pc = gnome_print_master_get_context( master ); - e_contact_build_style(style); - - ctxt->x = 0; - ctxt->y = 0; - ctxt->column = 0; - ctxt->style = style; - ctxt->master = master; - ctxt->first_section = TRUE; - ctxt->first_char_on_page = 'A' - 1; - ctxt->type = GNOME_PRINT_PREVIEW; - - font_size = 72 * ctxt->style->page_height / 27.0 / 2.0; - ctxt->letter_heading_font = gnome_font_new(gnome_font_get_name(ctxt->style->headings_font), ctxt->style->headings_font->size * 1.5); - ctxt->letter_tab_font = gnome_font_new(gnome_font_get_name(ctxt->style->headings_font), font_size); - - ctxt->pc = GNOME_PRINT_CONTEXT(gnome_print_multipage_new_from_sizes(pc, - 72 * style->paper_width, - 72 * style->paper_height, - 72 * style->page_width, - 72 * style->page_height)); - - gtk_object_ref(GTK_OBJECT(book)); - ctxt->book = book; - ctxt->query = g_strdup(query); - e_contact_do_print(book, ctxt->query, ctxt); - break; - case GNOME_PRINT_CANCEL: - gtk_object_unref(GTK_OBJECT(book)); - g_free(query); - gnome_dialog_close(dialog); - g_free(style); - g_free(ctxt); - break; - } -} - -GtkWidget * -e_contact_print_dialog_new(EBook *book, char *query) -{ - GtkWidget *dialog; - - - dialog = gnome_print_dialog_new("Print cards", GNOME_PRINT_DIALOG_RANGE | GNOME_PRINT_DIALOG_COPIES); - gnome_print_dialog_construct_range_any(GNOME_PRINT_DIALOG(dialog), GNOME_PRINT_RANGE_ALL | GNOME_PRINT_RANGE_SELECTION, - NULL, NULL, NULL); - - gtk_object_ref(GTK_OBJECT(book)); - gtk_object_set_data(GTK_OBJECT(dialog), "book", book); - gtk_object_set_data(GTK_OBJECT(dialog), "query", g_strdup(query)); - gtk_signal_connect(GTK_OBJECT(dialog), - "clicked", GTK_SIGNAL_FUNC(e_contact_print_button), NULL); - gtk_signal_connect(GTK_OBJECT(dialog), - "close", GTK_SIGNAL_FUNC(e_contact_print_close), NULL); - return dialog; -} diff --git a/addressbook/printing/e-contact-print.glade b/addressbook/printing/e-contact-print.glade deleted file mode 100644 index be24c9fc60..0000000000 --- a/addressbook/printing/e-contact-print.glade +++ /dev/null @@ -1,2009 +0,0 @@ - - - - - Printing - printing - - - pixmaps - C - False - False - False - False - False - False - True - interface.c - interface.h - callbacks.c - callbacks.h - support.c - support.h - True - e-contact-print.glade.h - - - - GnomeDialog - print-edit-style - False - Page Setup: - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - False - False - False - False - False - - - GtkVBox - GnomeDialog:vbox - dialog-vbox1 - False - 8 - - 4 - True - True - - - - GtkVBox - vbox-contact-print-style-editor - False - 5 - - 0 - True - True - - - - GtkHBox - hbox2 - 5 - False - 16 - - 0 - True - True - - - - GtkLabel - label8 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - 0 - False - False - - - - - GtkEntry - label-style-name - True - False - True - 0 - - - 0 - False - False - - - - - - GtkNotebook - notebook1 - True - True - True - GTK_POS_TOP - False - 2 - 2 - False - - 0 - True - True - - - - GtkVBox - vbox2 - 5 - False - 5 - - - GtkAlignment - alignment1 - 0.5 - 0.5 - 0 - 0 - - 0 - True - True - - - - GtkFrame - frame5 - - 0 - GTK_SHADOW_ETCHED_IN - - - Placeholder - - - - - - GtkHBox - hbox1 - True - 7 - - 0 - True - True - - - - GtkFrame - frame6 - - 0 - GTK_SHADOW_ETCHED_IN - - 0 - True - True - - - - GtkAlignment - alignment4 - 0 - 0 - 0 - 0 - - - GtkTable - table1 - 8 - 6 - 5 - False - 0 - 0 - - - GtkLabel - label5 - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 0 - 1 - 4 - 5 - 0 - 0 - False - False - False - False - True - True - - - - - GtkLabel - label4 - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 0 - 1 - 0 - 1 - 0 - 0 - False - False - False - False - True - True - - - - - GtkAlignment - alignment2 - 0 - 0.5 - 0 - 0 - - 1 - 5 - 0 - 1 - 0 - 0 - False - False - False - False - True - True - - - - GtkRadioButton - radiobutton1 - True - - True - True - - - - - GtkCheckButton - checkbutton1 - True - - False - True - - 1 - 5 - 4 - 5 - 0 - 0 - False - False - False - False - True - True - - - - - GtkCheckButton - checkbutton2 - True - - False - True - - 1 - 5 - 5 - 6 - 0 - 0 - False - False - False - False - True - True - - - - - GtkAlignment - alignment3 - 0 - 0.5 - 0 - 0 - - 1 - 5 - 1 - 2 - 0 - 0 - False - False - False - False - True - True - - - - GtkRadioButton - radiobutton2 - True - - False - True - - - - - GtkLabel - label6 - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 0 - 3 - 2 - 3 - 0 - 2 - False - False - False - False - True - True - - - - - GtkLabel - label7 - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 0 - 3 - 3 - 4 - 0 - 2 - False - False - False - False - True - True - - - - - GtkAlignment - alignment6 - 0 - 0.5 - 0 - 0 - - 3 - 4 - 3 - 4 - 0 - 2 - False - False - False - False - True - True - - - - GtkSpinButton - spinbutton2 - True - 1 - 0 - False - GTK_UPDATE_ALWAYS - False - False - 2 - 0 - 100 - 1 - 10 - 10 - - - - - GtkAlignment - alignment5 - 0 - 0.5 - 0 - 0 - - 3 - 4 - 2 - 3 - 0 - 2 - False - False - False - False - True - True - - - - GtkSpinButton - spinbutton1 - 45 - True - 1 - 0 - False - GTK_UPDATE_ALWAYS - False - False - 1 - 0 - 100 - 1 - 10 - 10 - - - - - - - - GtkVBox - vbox3 - False - 8 - - 0 - True - True - - - - GtkFrame - frame7 - - 0 - GTK_SHADOW_ETCHED_IN - - 0 - True - True - - - - GtkTable - table2 - 8 - 2 - 2 - False - 13 - 8 - - - GtkAlignment - alignment7 - 0.5 - 1 - 1 - 0 - - 1 - 2 - 1 - 2 - 0 - 0 - False - False - False - False - True - True - - - - GtkButton - button6 - True - - - - - - GtkAlignment - alignment8 - 0.5 - 1 - 1 - 0 - - 1 - 2 - 0 - 1 - 0 - 0 - False - False - False - False - True - True - - - - GtkButton - button5 - 90 - True - - - - - - GtkVBox - vbox4 - False - 0 - - 0 - 1 - 0 - 1 - 0 - 0 - True - False - False - False - True - True - - - - GtkLabel - label10 - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 0 - False - False - - - - - GtkEntry - entry3 - 100 - True - True - True - 0 - 10 pt. Tahoma - - 0 - False - False - - - - - - GtkVBox - vbox5 - False - 0 - - 0 - 1 - 1 - 2 - 0 - 0 - True - False - False - False - True - True - - - - GtkLabel - label9 - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 0 - False - False - - - - - GtkEntry - entry2 - 100 - True - True - True - 0 - 8 pt. Tahoma - - 0 - False - False - - - - - - - - GtkFrame - frame8 - - 0 - GTK_SHADOW_ETCHED_IN - - 0 - True - True - - - - GtkCheckButton - checkbutton3 - True - - False - True - - - - - - - - GtkLabel - Notebook:tab - label1 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkHBox - hbox3 - True - 0 - - - GtkVBox - vbox6 - False - 0 - - 0 - True - True - - - - GtkFrame - frame9 - - 0 - GTK_SHADOW_ETCHED_IN - - 0 - True - True - - - - GtkVBox - vbox16 - 10 - False - 0 - - - GtkVBox - vbox17 - False - 0 - - 0 - True - True - - - - GtkLabel - label21 - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 0 - False - False - - - - - GtkScrolledWindow - scrolledwindow1 - GTK_POLICY_ALWAYS - GTK_POLICY_ALWAYS - GTK_UPDATE_CONTINUOUS - GTK_UPDATE_CONTINUOUS - - 0 - True - True - - - - GtkCList - clist1 - True - 1 - 80 - GTK_SELECTION_SINGLE - False - GTK_SHADOW_IN - - - GtkLabel - CList:title - label26 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - - - - GtkVBox - vbox18 - False - 0 - - 0 - True - True - - - - GtkLabel - label24 - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 0 - False - False - - - - - GtkHBox - hbox5 - True - 0 - - 0 - True - True - - - - GtkLabel - label27 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - 0 - False - False - - - - - GtkEntry - entry9 - 1 - True - True - True - 0 - - - 0 - True - True - - - - - GtkLabel - label28 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - 0 - False - False - - - - - GtkEntry - entry10 - 1 - True - True - True - 0 - - - 0 - True - True - - - - - - - GtkVBox - vbox19 - False - 0 - - 0 - True - True - - - - GtkLabel - label25 - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 0 - False - False - - - - - GtkCombo - combo1 - False - True - False - True - False - - - 0 - False - False - - - - GtkEntry - GtkCombo:entry - combo-entry1 - True - True - True - 0 - - - - - - - - - GtkFrame - frame10 - - 0 - GTK_SHADOW_ETCHED_IN - - 0 - True - True - - - - GtkTable - table4 - 15 - 2 - 4 - True - 6 - 9 - - - GtkLabel - label29 - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 0 - 1 - 0 - 1 - 0 - 0 - False - True - False - False - True - True - - - - - GtkLabel - label30 - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 0 - 1 - 1 - 2 - 0 - 0 - False - True - False - False - True - True - - - - - GtkLabel - label31 - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 2 - 3 - 0 - 1 - 0 - 0 - False - True - False - False - True - True - - - - - GtkEntry - entry11 - 1 - True - True - True - 0 - - - 1 - 2 - 0 - 1 - 0 - 0 - True - False - False - False - True - False - - - - - GtkEntry - entry12 - 1 - True - True - True - 0 - - - 3 - 4 - 0 - 1 - 0 - 0 - True - False - False - False - True - False - - - - - GtkEntry - entry13 - 1 - True - True - True - 0 - - - 3 - 4 - 1 - 2 - 0 - 0 - True - False - False - False - True - False - - - - - GtkEntry - entry14 - 1 - True - True - True - 0 - - - 1 - 2 - 1 - 2 - 0 - 0 - True - False - False - False - True - False - - - - - GtkLabel - label32 - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 2 - 3 - 1 - 2 - 0 - 0 - False - True - False - False - True - True - - - - - - - - GtkVBox - vbox7 - False - 0 - - 0 - True - True - - - - GtkFrame - frame11 - - 0 - GTK_SHADOW_ETCHED_IN - - 0 - True - True - - - - GtkVBox - vbox8 - 10 - False - 0 - - - GtkVBox - vbox20 - False - 0 - - 0 - True - True - - - - GtkLabel - label33 - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 0 - False - False - - - - - GtkScrolledWindow - scrolledwindow2 - GTK_POLICY_ALWAYS - GTK_POLICY_ALWAYS - GTK_UPDATE_CONTINUOUS - GTK_UPDATE_CONTINUOUS - - 0 - True - True - - - - GtkCList - clist2 - True - 1 - 80 - GTK_SELECTION_SINGLE - False - GTK_SHADOW_IN - - - GtkLabel - CList:title - label35 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - - - - GtkVBox - vbox21 - False - 0 - - 0 - True - True - - - - GtkLabel - label34 - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 0 - False - False - - - - - GtkHBox - hbox6 - True - 0 - - 0 - True - True - - - - GtkLabel - label36 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - 0 - False - False - - - - - GtkEntry - entry15 - 1 - True - True - True - 0 - - - 0 - True - True - - - - - GtkLabel - label37 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - 0 - False - False - - - - - GtkEntry - entry16 - 1 - True - True - True - 0 - - - 0 - True - True - - - - - - - - - GtkFrame - frame12 - - 0 - GTK_SHADOW_ETCHED_IN - - 0 - True - True - - - - GtkHBox - hbox4 - False - 10 - - - Placeholder - - - - GtkVBox - vbox9 - False - 5 - - 0 - True - True - - - - GtkAlignment - alignment9 - 0 - 1 - 0 - 0 - - 0 - True - True - - - - GtkRadioButton - radiobutton3 - True - - False - True - - - - - GtkAlignment - alignment10 - 0 - 0 - 0 - 0 - - 0 - True - True - - - - GtkRadioButton - radiobutton4 - True - - False - True - - - - - - - - - - GtkLabel - Notebook:tab - label2 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkVBox - vbox10 - 8 - False - 0 - - - GtkTable - table5 - 4 - 3 - True - 4 - 4 - - 0 - True - True - - - - GtkAlignment - alignment15 - 0 - 1 - 0 - 0 - - 1 - 2 - 2 - 3 - 0 - 0 - False - False - False - False - True - True - - - - GtkButton - button11 - True - - - - - - GtkText - text10 - 50 - True - False - - - 0 - 1 - 1 - 2 - 0 - 0 - False - True - False - False - True - True - - - - - GtkText - text11 - 50 - True - False - - - 2 - 3 - 1 - 2 - 0 - 0 - True - False - False - False - True - True - - - - - GtkText - text12 - 50 - True - False - - - 1 - 2 - 1 - 2 - 0 - 0 - False - False - False - False - True - True - - - - - GtkText - text13 - 50 - True - False - - - 0 - 1 - 3 - 4 - 0 - 0 - False - True - False - False - True - True - - - - - GtkText - text14 - 5 - True - False - - - 1 - 2 - 3 - 4 - 0 - 0 - False - False - False - False - True - True - - - - - GtkText - text15 - 50 - True - False - - - 2 - 3 - 3 - 4 - 0 - 0 - False - False - False - False - True - True - - - - - GtkAlignment - alignment16 - 0.5 - 1 - 1 - 0 - - 0 - 1 - 0 - 1 - 0 - 0 - True - False - False - False - True - True - - - - GtkVBox - vbox14 - False - 0 - - - GtkLabel - label14 - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 0 - False - False - - - - - GtkEntry - entry7 - True - True - True - 0 - - - 0 - False - False - - - - - - - GtkAlignment - alignment17 - 0.5 - 1 - 1 - 0 - - 0 - 1 - 2 - 3 - 0 - 0 - True - False - False - False - True - True - - - - GtkVBox - vbox15 - False - 0 - - - GtkLabel - label15 - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 0 - False - False - - - - - GtkEntry - entry8 - True - True - True - 0 - - - 0 - False - False - - - - - - - GtkAlignment - alignment14 - 0 - 1 - 0 - 0 - - 1 - 2 - 0 - 1 - 0 - 0 - False - False - False - False - True - True - - - - GtkButton - button10 - True - - - - - - - GtkHBox - hbox7 - False - 0 - - 0 - False - True - - - - GtkToolbar - toolbar1 - GTK_ORIENTATION_HORIZONTAL - GTK_TOOLBAR_ICONS - 5 - GTK_TOOLBAR_SPACE_EMPTY - GTK_RELIEF_NORMAL - True - - 0 - True - False - - - - Placeholder - - - - Placeholder - - - - Placeholder - - - - Placeholder - - - - Placeholder - - - - - - GtkCheckButton - checkbutton4 - True - - False - True - - 0 - False - False - - - - - - GtkLabel - Notebook:tab - label3 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - - - GtkHButtonBox - GnomeDialog:action_area - dialog-action_area1 - GTK_BUTTONBOX_END - 8 - 85 - 27 - 7 - 0 - - 0 - False - True - GTK_PACK_END - - - - GtkButton - button1 - True - True - GNOME_STOCK_BUTTON_OK - - - - GtkButton - button2 - True - True - GNOME_STOCK_BUTTON_APPLY - - - - GtkButton - button3 - True - True - GNOME_STOCK_BUTTON_CANCEL - - - - - - diff --git a/addressbook/printing/e-contact-print.glade.h b/addressbook/printing/e-contact-print.glade.h deleted file mode 100644 index b3b03d6d68..0000000000 --- a/addressbook/printing/e-contact-print.glade.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Translatable strings file generated by Glade. - * Add this file to your project's POTFILES.in. - * DO NOT compile it as part of your application. - */ - -gchar *s = N_("Page Setup:"); -gchar *s = N_("Style name:"); -gchar *s = N_("Preview:"); -gchar *s = N_("Options"); -gchar *s = N_("Include:"); -gchar *s = N_("Sections:"); -gchar *s = N_("Immediately follow each other"); -gchar *s = N_("Letter tabs on side"); -gchar *s = N_("Headings for each letter"); -gchar *s = N_("Start on a new page"); -gchar *s = N_("Number of columns:"); -gchar *s = N_("Blank forms at end:"); -gchar *s = N_("Fonts"); -gchar *s = N_("Font..."); -gchar *s = N_("Font..."); -gchar *s = N_("Headings"); -gchar *s = N_("10 pt. Tahoma"); -gchar *s = N_("Body"); -gchar *s = N_("8 pt. Tahoma"); -gchar *s = N_("Shading"); -gchar *s = N_("Print using gray shading"); -gchar *s = N_("Format"); -gchar *s = N_("Paper"); -gchar *s = N_("Type:"); -gchar *s = N_("label26"); -gchar *s = N_("Dimensions:"); -gchar *s = N_("Width:"); -gchar *s = N_("Height:"); -gchar *s = N_("Paper source:"); -gchar *s = N_("Margins"); -gchar *s = N_("Top:"); -gchar *s = N_("Bottom:"); -gchar *s = N_("Left:"); -gchar *s = N_("Right:"); -gchar *s = N_("Page"); -gchar *s = N_("Size:"); -gchar *s = N_("label26"); -gchar *s = N_("Dimensions:"); -gchar *s = N_("Width:"); -gchar *s = N_("Height:"); -gchar *s = N_("Orientation"); -gchar *s = N_("Portrait"); -gchar *s = N_("Landscape"); -gchar *s = N_("Paper"); -gchar *s = N_("Font..."); -gchar *s = N_("Header"); -gchar *s = N_("Footer:"); -gchar *s = N_("Font..."); -gchar *s = N_("Reverse on even pages"); -gchar *s = N_("Header/Footer"); diff --git a/addressbook/printing/e-contact-print.h b/addressbook/printing/e-contact-print.h deleted file mode 100644 index 8649a2ff6a..0000000000 --- a/addressbook/printing/e-contact-print.h +++ /dev/null @@ -1,32 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * e-contact-print.h - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef E_CONTACT_PRINT_H -#define E_CONTACT_PRINT_H - -#include -#include -#include "e-contact-print-types.h" - -GtkWidget *e_contact_print_dialog_new(EBook *book, char *query); - -#endif /* E_CONTACT_PRINT_H */ diff --git a/addressbook/printing/medbook.ecps b/addressbook/printing/medbook.ecps deleted file mode 100644 index 2031f39b92..0000000000 --- a/addressbook/printing/medbook.ecps +++ /dev/null @@ -1,30 +0,0 @@ - diff --git a/addressbook/printing/phonelist.ecps b/addressbook/printing/phonelist.ecps deleted file mode 100644 index 53ca294d36..0000000000 --- a/addressbook/printing/phonelist.ecps +++ /dev/null @@ -1,29 +0,0 @@ - diff --git a/addressbook/printing/smallbook.ecps b/addressbook/printing/smallbook.ecps deleted file mode 100644 index 5844851bfb..0000000000 --- a/addressbook/printing/smallbook.ecps +++ /dev/null @@ -1,30 +0,0 @@ - diff --git a/addressbook/printing/test-contact-print-style-editor.c b/addressbook/printing/test-contact-print-style-editor.c deleted file mode 100644 index d4dccc0b87..0000000000 --- a/addressbook/printing/test-contact-print-style-editor.c +++ /dev/null @@ -1,87 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * test-contact-print-style-editor.c - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include "config.h" - -#include -#include "e-contact-print-style-editor.h" - -/* This is a horrible thing to do, but it is just a test. */ -GtkWidget *editor; - -static void destroy_callback(GtkWidget *app, gpointer data) -{ - static int count = 2; - count --; - if ( count <= 0 ) - exit(0); -} - -#if 0 -static void about_callback( GtkWidget *widget, gpointer data ) -{ - - const gchar *authors[] = - { - "Christopher James Lahey ", - NULL - }; - - GtkWidget *about = - gnome_about_new ( _( "Contact Print Style Editor Test" ), VERSION, - _( "Copyright (C) 2000, Helix Code, Inc." ), - authors, - _( "This should test the contact print style editor widget" ), - NULL); - gtk_widget_show (about); -} -#endif - -int main( int argc, char *argv[] ) -{ - GtkWidget *app; - - /* bindtextdomain (PACKAGE, GNOMELOCALEDIR); - textdomain (PACKAGE);*/ - - gnome_init( "Contact Print Style Editor Test", VERSION, argc, argv); - - glade_gnome_init (); - - app = gnome_app_new("Contact Print Style Editor Test", NULL); - - editor = e_contact_print_style_editor_new(""); - - gnome_app_set_contents( GNOME_APP( app ), editor ); - - /* Connect the signals */ - gtk_signal_connect( GTK_OBJECT( app ), "destroy", - GTK_SIGNAL_FUNC( destroy_callback ), - ( gpointer ) app ); - - gtk_widget_show_all( app ); - - gtk_main(); - - /* Not reached. */ - return 0; -} diff --git a/addressbook/printing/test-print.c b/addressbook/printing/test-print.c deleted file mode 100644 index 1b73fda3da..0000000000 --- a/addressbook/printing/test-print.c +++ /dev/null @@ -1,82 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * test-print.c - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include "config.h" - -#include -#include -#include "e-contact-print.h" - -/* This is a horrible thing to do, but it is just a test. */ -GtkWidget *print; - -static gint test_close(GnomeDialog *dialog, gpointer data) -{ - exit(0); - return 1; -} - -#if 0 -static void about_callback( GtkWidget *widget, gpointer data ) -{ - - const gchar *authors[] = - { - "Christopher James Lahey ", - NULL - }; - - GtkWidget *about = - gnome_about_new ( _( "Contact Print Test" ), VERSION, - _( "Copyright (C) 2000, Helix Code, Inc." ), - authors, - _( "This should test the contact print code" ), - NULL); - gtk_widget_show (about); -} -#endif - -int main( int argc, char *argv[] ) -{ - GList *shown_fields = NULL; - - /* bindtextdomain (PACKAGE, GNOMELOCALEDIR); - textdomain (PACKAGE);*/ - - gnome_init( "Contact Print Test", VERSION, argc, argv); - - glade_gnome_init (); - - shown_fields = g_list_append(shown_fields, "First field"); - shown_fields = g_list_append(shown_fields, "Second field"); - shown_fields = g_list_append(shown_fields, "Third field"); - shown_fields = g_list_append(shown_fields, "Fourth field"); - - print = e_contact_print_dialog_new(NULL, NULL); - gtk_widget_show_all(print); - gtk_signal_connect(GTK_OBJECT(print), "close", GTK_SIGNAL_FUNC(test_close), NULL); - - gtk_main(); - - /* Not reached. */ - return 0; -} diff --git a/art/.cvsignore b/art/.cvsignore deleted file mode 100644 index c038ed7864..0000000000 --- a/art/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in \ No newline at end of file diff --git a/art/Makefile.am b/art/Makefile.am deleted file mode 100644 index 25eaf379e8..0000000000 --- a/art/Makefile.am +++ /dev/null @@ -1,31 +0,0 @@ -imagesdir = $(datadir)/images/evolution - -images_DATA = \ - evolution-calendar.png \ - evolution-contacts.png \ - evolution-inbox.png \ - evolution-notes.png \ - evolution-tasks.png \ - evolution-calendar-mini.png \ - evolution-contacts-mini.png \ - evolution-inbox-mini.png \ - evolution-notes-mini.png \ - evolution-tasks-mini.png \ - evolution-today.png \ - briefcase.png \ - cellphone.png \ - globe.png \ - house.png \ - envelope.png \ - malehead.png - -EXTRA_DIST = \ - attachment.xpm \ - mail-new.xpm \ - mail-read.xpm \ - mail-replied.xpm \ - mark.xpm \ - meeting.xpm \ - priority-high.xpm \ - priority-low.xpm \ - $(images_DATA) diff --git a/art/attachment.xpm b/art/attachment.xpm deleted file mode 100644 index 1bcc0386d2..0000000000 --- a/art/attachment.xpm +++ /dev/null @@ -1,21 +0,0 @@ -/* XPM */ -static char * attachment_xpm[] = { -"16 16 2 1", -" c None", -". c #000000", -" ", -" ", -" ... ", -" . . . ", -" . . . . ", -" . . . . ", -" . . . . ", -" . . . . ", -" . . . . ", -" . . . . ", -" . . . . ", -" . . . ", -" . . ", -" . . ", -" ... ", -" "}; diff --git a/art/briefcase.png b/art/briefcase.png deleted file mode 100644 index 424ad09632..0000000000 Binary files a/art/briefcase.png and /dev/null differ diff --git a/art/cellphone.png b/art/cellphone.png deleted file mode 100644 index c8d70ae663..0000000000 Binary files a/art/cellphone.png and /dev/null differ diff --git a/art/envelope.png b/art/envelope.png deleted file mode 100644 index 77acd63100..0000000000 Binary files a/art/envelope.png and /dev/null differ diff --git a/art/evolution-calendar-mini.png b/art/evolution-calendar-mini.png deleted file mode 100644 index 5386190d96..0000000000 Binary files a/art/evolution-calendar-mini.png and /dev/null differ diff --git a/art/evolution-calendar.png b/art/evolution-calendar.png deleted file mode 100644 index 76afca6b6f..0000000000 Binary files a/art/evolution-calendar.png and /dev/null differ diff --git a/art/evolution-contacts-mini.png b/art/evolution-contacts-mini.png deleted file mode 100644 index 04ae1a1ad8..0000000000 Binary files a/art/evolution-contacts-mini.png and /dev/null differ diff --git a/art/evolution-contacts.png b/art/evolution-contacts.png deleted file mode 100644 index 320ace418f..0000000000 Binary files a/art/evolution-contacts.png and /dev/null differ diff --git a/art/evolution-inbox-mini.png b/art/evolution-inbox-mini.png deleted file mode 100644 index dbc20fcef1..0000000000 Binary files a/art/evolution-inbox-mini.png and /dev/null differ diff --git a/art/evolution-inbox.png b/art/evolution-inbox.png deleted file mode 100644 index 3b0f90b292..0000000000 Binary files a/art/evolution-inbox.png and /dev/null differ diff --git a/art/evolution-notes-mini.png b/art/evolution-notes-mini.png deleted file mode 100644 index f5b5d776d0..0000000000 Binary files a/art/evolution-notes-mini.png and /dev/null differ diff --git a/art/evolution-notes.png b/art/evolution-notes.png deleted file mode 100644 index f82006b894..0000000000 Binary files a/art/evolution-notes.png and /dev/null differ diff --git a/art/evolution-tasks-mini.png b/art/evolution-tasks-mini.png deleted file mode 100644 index d23b5a0be7..0000000000 Binary files a/art/evolution-tasks-mini.png and /dev/null differ diff --git a/art/evolution-tasks.png b/art/evolution-tasks.png deleted file mode 100644 index 0878645f9f..0000000000 Binary files a/art/evolution-tasks.png and /dev/null differ diff --git a/art/evolution-today.png b/art/evolution-today.png deleted file mode 100644 index 010bcb8cc7..0000000000 Binary files a/art/evolution-today.png and /dev/null differ diff --git a/art/globe.png b/art/globe.png deleted file mode 100644 index 84bebd7e9a..0000000000 Binary files a/art/globe.png and /dev/null differ diff --git a/art/house.png b/art/house.png deleted file mode 100644 index df43ec6181..0000000000 Binary files a/art/house.png and /dev/null differ diff --git a/art/mail-new.xpm b/art/mail-new.xpm deleted file mode 100644 index dee13fb6b3..0000000000 --- a/art/mail-new.xpm +++ /dev/null @@ -1,67 +0,0 @@ -/* XPM */ -static char * mail_new_xpm[] = { -"16 16 48 1", -" c None", -". c #000000", -"+ c #202020", -"@ c #817968", -"# c #F5F5F5", -"$ c #4D493C", -"% c #736C5C", -"& c #F5EEEE", -"* c #FFEDC7", -"= c #FAF3EC", -"- c #FCE6B5", -"; c #60594D", -"> c #D3C29E", -", c #746D5D", -"' c #F5F1F1", -") c #FDEECD", -"! c #F8F4ED", -"~ c #FAE3B3", -"{ c #645F4F", -"] c #C9BA98", -"^ c #71685A", -"/ c #FCF5EA", -"( c #FFE8B7", -"_ c #F5DEB2", -": c #FFEABD", -"< c #90856F", -"[ c #7C7361", -"} c #E4D1A9", -"| c #C9B996", -"1 c #FFEBC2", -"2 c #887F6B", -"3 c #726B59", -"4 c #D1BF9C", -"5 c #8B816C", -"6 c #FFE9BA", -"7 c #F9E2B2", -"8 c #FFE8B8", -"9 c #F6DFB3", -"0 c #D4C19D", -"a c #534D42", -"b c #CFBF9C", -"c c #645F51", -"d c #C2B293", -"e c #C4B393", -"f c #C4B495", -"g c #C5B596", -"h c #CCBC99", -"i c #4C483D", -" ", -" ", -" ", -" ", -" .+......... ", -" .@#########$. ", -" .#%&*#*=*-;>. ", -" .#*,')!*~{~]. ", -" .#**^/*({*_]. ", -" .#*:<{#{[-}|. ", -" .#12**{((34|. ", -" .#5*_67890ab. ", -" .cdeeedffghi. ", -" ........... ", -" ", -" "}; diff --git a/art/mail-read.xpm b/art/mail-read.xpm deleted file mode 100644 index 81bcdf8fd3..0000000000 --- a/art/mail-read.xpm +++ /dev/null @@ -1,70 +0,0 @@ -/* XPM */ -static char * mail_read_xpm[] = { -"16 16 51 1", -" c None", -". c #010101", -"+ c #D9D6D0", -"@ c #C3C0B9", -"# c #EFEDE8", -"$ c #F7F7F6", -"% c #FAFAFA", -"& c #B6B4AE", -"* c #737373", -"= c #C2BFB8", -"- c #F5F4F2", -"; c #FAFAF9", -"> c #FFFFFF", -", c #D2CFC9", -"' c #707070", -") c #5D5B57", -"! c #868580", -"~ c #E5E2DB", -"{ c #FBFBF8", -"] c #716E6B", -"^ c #62605C", -"/ c #F8F7F2", -"( c #DDDAD4", -"_ c #929191", -": c #969390", -"< c #92908A", -"[ c #A1A0A0", -"} c #F7F5F1", -"| c #FBFAF7", -"1 c #A5A29D", -"2 c #908D87", -"3 c #F9F7F3", -"4 c #F0EEE8", -"5 c #DDD9D2", -"6 c #797873", -"7 c #F9F8F4", -"8 c #74726E", -"9 c #E3E0D9", -"0 c #7D7A77", -"a c #FAF9F6", -"b c #F8F6F2", -"c c #FAF8F5", -"d c #F7F5F2", -"e c #E2DFD8", -"f c #090808", -"g c #D7D4CE", -"h c #D8D5CF", -"i c #D6D3CD", -"j c #DAD7D1", -"k c #E0DCD5", -"l c #222221", -" ", -" ..... ", -" .+++++. ", -" .++++++@. ", -" .+++++#$%&. ", -" .*==-;>>>>,'. ", -" .>)>>>>>>>!~. ", -" .>{]>>>>>^/(. ", -" .>{{_::<[{}(. ", -" .>{|1{{{2345. ", -" .>|6{{{77895. ", -" .>0{}abcd~8e. ", -" .fghhhi++jkl. ", -" ........... ", -" ", -" "}; diff --git a/art/mail-replied.xpm b/art/mail-replied.xpm deleted file mode 100644 index 9b398da7e0..0000000000 --- a/art/mail-replied.xpm +++ /dev/null @@ -1,52 +0,0 @@ -/* XPM */ -static char * mail_replied_xpm[] = { -"16 16 33 1", -" c None", -". c #010101", -"+ c #2F2F2F", -"@ c #A7A4A0", -"# c #FCFCFC", -"$ c #64625F", -"% c #95938E", -"& c #FBFBFB", -"* c #F9F8F6", -"= c #FBFAFA", -"- c #F6F5F1", -"; c #7D7B78", -"> c #EAE8E3", -", c #969491", -"' c #000000", -") c #928F8B", -"! c #FFFFFF", -"~ c #F7F6F4", -"{ c #B5B2AC", -"] c #003366", -"^ c #EFEFEF", -"/ c #CCCCCC", -"( c #AEABA6", -"_ c #B0ADA7", -": c #F5F3F0", -"< c #83817E", -"[ c #E1DFDA", -"} c #E2DFD9", -"| c #002C59", -"1 c #002850", -"2 c #00254A", -"3 c #181818", -"4 c #090909", -" ", -" ", -" ", -" ", -" .+......... ", -" .@#########$. ", -" .#%&*#*=*-;>. ", -" .#*,=''''''''' ", -" .#**)'!!!!!!!' ", -" .#*~{'!]]]]^/' ", -" .#~(*'!]]]^^/' ", -" .#_*:'!]]]]^/' ", -" .<[}}'!]^]]|/' ", -" ....'!^^^12/' ", -" '!//////3 ", -" ''4'''''' "}; diff --git a/art/malehead.png b/art/malehead.png deleted file mode 100644 index ada9545c85..0000000000 Binary files a/art/malehead.png and /dev/null differ diff --git a/art/mark.xpm b/art/mark.xpm deleted file mode 100644 index 710cd0e872..0000000000 --- a/art/mark.xpm +++ /dev/null @@ -1,21 +0,0 @@ -/* XPM */ -static char * mark_xpm[] = { -"16 16 2 1", -" c None", -". c #36592A", -" ", -" ", -" ", -" ", -" . ", -" .. ", -" .. ", -" . .. ", -" .. ... ", -" .... ", -" ... ", -" .. ", -" . ", -" ", -" ", -" "}; diff --git a/art/meeting.xpm b/art/meeting.xpm deleted file mode 100644 index bf182fbd8f..0000000000 --- a/art/meeting.xpm +++ /dev/null @@ -1,64 +0,0 @@ -/* XPM */ -static char * meeting_xpm[] = { -"16 16 45 1", -" c None", -". c #000000", -"+ c #161616", -"@ c #A7A7A7", -"# c #8A8A8A", -"$ c #757575", -"% c #686868", -"& c #555555", -"* c #434343", -"= c #2F2F2F", -"- c #2B2B2B", -"; c #FFFFFF", -"> c #CACACA", -", c #C0C0C0", -"' c #B6B6B6", -") c #D8D5CD", -"! c #CFCFCF", -"~ c #AEADA5", -"{ c #7F7D78", -"] c #85847F", -"^ c #92908A", -"/ c #E0DFD7", -"( c #A09E98", -"_ c #E6E5E0", -": c #E5E3DF", -"< c #A5A49D", -"[ c #9D9B95", -"} c #D5D5D5", -"| c #B4B1AB", -"1 c #83817C", -"2 c #D44D41", -"3 c #A7453E", -"4 c #919089", -"5 c #E2E1DB", -"6 c #9C9A94", -"7 c #DEDBD5", -"8 c #D9D6CE", -"9 c #E79E3C", -"0 c #934238", -"a c #B4B1AA", -"b c #807F79", -"c c #82817C", -"d c #7E7D78", -"e c #ACA9A3", -"f c #A3A09A", -" ", -" ", -" ", -" ", -" ............. ", -" +@#$%&&***=-. ", -" .;;>;;,;;';). ", -" .!~{~~]~~{~^. ", -" .;/(_:<))[)~. ", -" .}|1||2333|4. ", -" .;56783990)~. ", -" .}|1||3000|4. ", -" .)ab~~c~~def. ", -" ............. ", -" ", -" "}; diff --git a/art/priority-high.xpm b/art/priority-high.xpm deleted file mode 100644 index 8858f5bf94..0000000000 --- a/art/priority-high.xpm +++ /dev/null @@ -1,21 +0,0 @@ -/* XPM */ -static char * priority_high_xpm[] = { -"16 16 2 1", -" c None", -". c #A7453E", -" ", -" ", -" ", -" . ", -" ... ", -" ... ", -" ... ", -" .. ", -" .. ", -" . ", -" ", -" .. ", -" .. ", -" ", -" ", -" "}; diff --git a/art/priority-low.xpm b/art/priority-low.xpm deleted file mode 100644 index ad53e9e0cc..0000000000 --- a/art/priority-low.xpm +++ /dev/null @@ -1,21 +0,0 @@ -/* XPM */ -static char * priority_low_xpm[] = { -"16 16 2 1", -" c None", -". c #21405A", -" ", -" ", -" ", -" .. ", -" .. ", -" .. ", -" .. ", -" .. ", -" ...... ", -" .... ", -" .... ", -" .. ", -" .. ", -" ", -" ", -" "}; diff --git a/autogen.sh b/autogen.sh deleted file mode 100755 index eec4b5f56d..0000000000 --- a/autogen.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -# Run this to generate all the initial makefiles, etc. - -srcdir=`dirname $0` -test -z "$srcdir" && srcdir=. - -PKG_NAME="evolution" - - -. $srcdir/macros/autogen.sh diff --git a/calendar/.cvsignore b/calendar/.cvsignore deleted file mode 100644 index 2497bd97d5..0000000000 --- a/calendar/.cvsignore +++ /dev/null @@ -1,10 +0,0 @@ -Makefile.in -Makefile -.deps -_libs -.libs -*.lo -GnomeCal-stubs.c -GnomeCal-skels.c -GnomeCal-common.c -GnomeCal.h diff --git a/calendar/AUTHORS b/calendar/AUTHORS deleted file mode 100644 index 7e482aef97..0000000000 --- a/calendar/AUTHORS +++ /dev/null @@ -1,4 +0,0 @@ -Miguel de Icaza -Federico Mena -Arturo Esponosa -Russell Steinthal diff --git a/calendar/ChangeLog b/calendar/ChangeLog deleted file mode 100644 index a62b2c29f2..0000000000 --- a/calendar/ChangeLog +++ /dev/null @@ -1,4107 +0,0 @@ -2000-05-25 Federico Mena Quintero - - * gui/event-editor-dialog.glade: Put the main notebook directly - under a simple GtkWindow. We are going to pull out the notebook - and slap it into our custom-built GnomeApp, anwyays. - - * gui/event-editor.c: Made the EventEditor derive from GnomeApp. - Added a BonoboUIHandler for its menu and toolbar. - (make_title_from_ico): Create a nice title for the window. - (get_widgets): Fetch the Glade widgets here instead of all over - the place. - (event_editor_new): Temporary hack to show the dialog here, just - so that I can test it. - - * gui/Makefile.am (EXTRA_DIST): Added the Glade messages file. - -2000-05-25 Federico Mena Quintero - - * gui/main.c (init_bonobo): Do not initialize libglade twice. - - * gui/component-factory.c (create_view): Set the folder_uri - property, otherwise the calendar will not get loaded into the - view. - -2000-05-25 Christopher James Lahey - - * gui/main.c: Make it so that warnings don't crash calendar. - -2000-05-25 Ettore Perazzoli - - * gui/evolution-calendar-control.c: Removed. - - * gui/main.c: New. - - * gui/control-factory.c: New. - * gui/control-factory.h: New. - - * gui/calendar-component-factory.c: New. - * gui/calendar-component-factory.c: New. - - * gui/evolution-calendar-control.c (calendar_control_factory): - Renamed from `calendar_factory'. - (calendar_control_factory_init): Renamed from - `calendar_factory_init'. - - * gui/Makefile.am: Link with the files from `$(builddir)/shell'. - - * gui/evolution-calendar.gnorba: New. - * gui/evolution-calendar.oafinfo: New. - -2000-05-24 Federico Mena Quintero - - * gui/print.c (range_selector_new): New function to create the - custom range selector. - (print_dialog): New function to show the print dialog. - (print_calendar): Use the print dialog. - -2000-05-24 Christopher James Lahey - - * gui/Makefile.am: Added libepaned.a. - - * gui/gnome-cal.c: Switched from GtkPaned to EPaned. - -2000-05-22 Federico Mena Quintero - - * gui/calendar-commands.c (calendar_get_events_in_range): Removed - function. - - * gui/mark.c (mark_month_item): Use - cal_client_get_events_in_range(). - - * gui/calendar-commands.c (show_year_view_clicked): Comment out, - since we don't have a year view. - - * gui/gnome-cal.c (setup_widgets): Removed the year view stuff. - (gnome_calendar_get_current_view_name): Likewise. - (gnome_calendar_update_view_times): Likewise. - (gnome_calendar_direction): Likewise. - (gnome_calendar_set_view): Likewise. - (gnome_calendar_update_all): Likewise. - (gnome_calendar_object_updated_cb): Likewise. - (gnome_calendar_object_removed_cb): Likewise. - (gnome_calendar_time_format_changed): Likewise. - (gnome_calendar_get_current_time_range): Likewise. - - * gui/gnome-cal.h (GnomeCalendar): Removed the year view stuff. - - * gui/Makefile.am (evolution_calendar_SOURCES): Added layout.[ch], - print.[ch]. Removed quick-view.[ch], year-view.[ch] since they - are no longer used. Removed all the old Pilot crap. - -2000-05-20 Damon Chaplin - - * cal-util/cal-recur.[hc]: new files to implement iCalendar recurrence - rules. These are only part finished, but people may like to check that - the architecture seems OK. - -2000-05-17 Damon Chaplin - - * gui/e-day-view.c (e_day_view_on_delete_occurrence): - * gui/e-week-view.c (e_week_view_on_delete_occurrence): use a copy of - the iCalObject so we detect the change in the "update_event" callback. - Maybe we should just update the view ourselves and then we wouldn't - need to detect any change in the callback. - - * cal-util/calobj.c (ical_object_reset_recurrence): new function to - get rid of any recurrence rules. Used when we 'unrecur' an event. - - * gui/e-day-view.c (e_day_view_key_press): don't add a new event if it - won't fit, or we end up adding a new event for each key press. - (e_day_view_update_event_label): don't update it if it doesn't have - an EText item (i.e. it isn't visible). - - * gui/e-day-view-time-item.c: allow selection of times using this - column. - -2000-05-19 Federico Mena Quintero - - * cal-util/timeutil.c (time_add_minutes): Fixed warning message. - (time_add_day): Likewise. - (time_add_month): Likewise. - (time_add_year): Likewise. - (time_from_day): Of all functions, *this* one had to have a bug. - Set the tm.tm_isdst to -1 to specify that we don't know whether - the time is in DST or not. This fixes *many* bugs upstream. - (time_week_begin): Likewise. We never noticed this since the week - functions are never used. - (time_week_end): Likewise. - -2000-05-17 Seth Alves - - * gui/event-editor.c: hooked up more widget signals to callbacks - to the gladified dialog acts more like the original one. - -2000-05-16 Seth Alves - - * gui/event-editor.c (recurrence_toggled): hook the radio buttons - to the pages of the notebook. - (append_exception): - (recurrence_exception_added): - (recurrence_exception_deleted): - (recurrence_exception_changed): code to deal with the recurrence - exception list. - -2000-05-15 Seth Alves - - * gui/event-editor.[ch]: gladeified replacement for eventedit.c - - * gui/event-editor-utils.[ch]: utilities used by event-editor.c - - * gui/event-editor-dialog.glade: glade file used by event-editor.c - -2000-05-14 Federico Mena Quintero - - * gui/gnome-cal.c (display_notification): Use the alarm - notification dialog. - (display_notification_cb): New callback for the result of the - alarm notification dialog. - - * gui/dialogs/alarm-notify.glade: New file with the alarm - notification dialog. - - * gui/dialogs/alarm-notify-dialog.[ch]: New file. - - * gui/dialogs/Makefile.am: New file. - - * gui/Makefile.am (SUBDIRS): Added the dialogs directory. - -2000-05-13 Federico Mena Quintero - - * gui/gnome-cal.c (trigger_alarm_cb): Better error checking, and - plug leaks of str_ico and ico. - - * gui/evolution-calendar-control.c (main): Initialize libglade. - -2000-05-13 Ettore Perazzoli - - * pcs/Makefile.am (INCLUDES): Add - `-I$(top_builddir)/libical/src/libical'. - -2000-05-12 Federico Mena Quintero - - * cal-util/calobj.c (generate): Use a (dtend - dtstart) offset to - compute the ending time of the occurrence. This takes care of - recurring events that span multiple days. Also, removed the DST - condition since it did not look right at all: if you have a daily - appointment at 18:00, it still should happen at 18:00 even during - daylight savings. - - * gui/gnome-cal.c (gnome_calendar_tag_calendar): Use the timeutil - functions instead of calculating the month's times by hand. Use - cal_obj_instance_list_free() instead of freeing the list by hand. - Clip the range we pass to mark_gtk_calendar_day(). - (mark_gtk_calendar_day): Fixed off-by-one error at the end of the - month by adding real day offsets. - -2000-05-11 Federico Mena Quintero - - * gui/gnome-cal.c (add_alarms_for_object): New function to add - today's alarms for a single object. - (gnome_calendar_object_updated_cb): Update the object's alarms. - - * idl/evolution-calendar.idl (Cal): Added a - get_alarms_for_object() method. - - * pcs/cal.c (Cal_get_alarms_for_object): Implemented method. - - * pcs/cal-backend.c (cal_backend_get_alarms_for_object): New - function. - - * pcs/cal-backend-imc.c (cal_backend_imc_get_alarms_for_object): - Implemented. - - * cal-client/cal-client.c (cal_client_get_alarms_for_object): New - function. - -2000-05-11 Dan Winship - - * gui/calendar-commands.c (calendar_control_activate): Now that we - depend on current gnome-libs we can make the toolbar detachable - again. - - * pcs/icalendar-save.c (timet_to_icaltime): remove unused timezone - variable to make this compile on BSD systems (where timezone is - the name of a function) - -2000-05-11 Federico Mena Quintero - - * gui/gnome-cal.c (gnome_calendar_update_all): Removed unused - arguments. Load the initial alarms here. - (load_alarms): New function to load a day's worth of alarms. - (gnome_calendar_class_init): Eeeek! This was taking in an - incorrect argument type. - (gnome_calendar_init): Now the calendar keeps a hash table of - UIDs->queued alarms. Create the hash table here. - (gnome_calendar_destroy): Destroy the alarms hash table. - (gnome_calendar_object_updated_cb): Remove the alarms for the - object and regenerate them. - (gnome_calendar_object_removed_cb): Remove the alarms for the - object. - - * gui/alarm.c (alarm_add): Do not take in a CalendarAlarm, just - the trigger time, the callback and the closure data. Return an - opaque identifier for the alarm so that it can be removed by the - client code if needed. Use the queue_alarm() helper function. - (queue_alarm): Helper function to actually queue the alarm and set - up the itimer. Deal with a nonzero return value from - setitimer(). - (alarm_remove): New function to remove an alarm based on its ID. - (pop_alarm): New helper function; pops the first alarm of the - queue and resets the timer as appropriate. - (alarm_ready): Simplified a lot by using pop_alarm(). - - * idl/evolution-calendar.idl (Cal): Added get_alarms_in_range(). - - * pcs/cal.c (build_instance_seq): New function to build a CORBA - sequence from the internal list of instances. - (Cal_get_events_in_range): Use build_instance_seq(). - (Cal_get_alarms_in_range): Implemented new method. - - * pcs/cal-backend.c (cal_backend_get_alarms_in_range): New - function with the get_alarms_in_range() engine. - - * pcs/cal-backend-imc.c (cal_backend_imc_get_alarms_in_range): - Implemented the get_alarms_in_range() method. - - * cal-client/cal-client.c (cal_client_get_alarms_in_range): New - client-side function for getting the alarms. - (build_instance_list): New helper function to build the - CalObjInstance list from the CORBA sequence. - (cal_client_get_events_in_range): Use build_instance_list(). - - * gui/calendar-commands.h: #include . #include - "gnome-cal.h". - - * gui/e-week-view.c: #include "calendar-commands.h" instead of - main.h; the latter is an obsolete file and will be killed. - - * gui/evolution-calendar-control.c (main): Call init_bonobo() - before anything else. We need the GTK+ object system initialized. - - * gui/Makefile.am (evolution_calendar_SOURCES): Do not use main.h. - - * cal-util/cal-util.c (cal_alarm_instance_list_free): New function. - -2000-05-10 Matt Loper - - * gui/calendar-commands.c (calendar_control_activate): Move - "about" menuitem to the help menu. - -2000-05-10 Christopher James Lahey - - * gui/Makefile.am: Added main.h. Combined the two EXTRA_DIST - sections. - -2000-05-09 Christopher James Lahey - - * pcs/cal-backend-imc.c: Set the format when creating a new - calendar. - -2000-05-09 Christopher James Lahey - - * pcs/cal-factory.c: Removed double free of method_string in - uri->method_string. - -2000-05-08 Ettore Perazzoli - - * pcs/cal.h: Include "calendar/pcs/evolution-calendar.h" instead - of "evolution-calendar.h". - - * pcs/cal-backend.h: Include "calendar/pcs/evolution-calendar.h" - instead of "evolution-calendar.h". - -2000-05-08 Seth Alves - - * gui/e-day-view.c (e_day_view_on_delete_appointment): call - e_day_view_stop_editing_event here to avoid a divide by zero - a bit further on. i'm not sure if this is the best fix for this. - -2000-05-08 Federico Mena Quintero - - * pcs/cal-backend.h (CalBackendClass): CalBackendClass now is just - an interface for calendar backends; this is an abstract class. - Put in the vtable for the backend methods. - - * pcs/cal-backend.c (cal_backend_new): Removed function, since - CalBackend is not just an abstract class. - Removed implementation-specific functions and made public - functions call the virtual methods instead. - - * pcs/cal-backend-imc.[ch]: New files with the CalBackendIMC - implementation; this implements a backend for iCalendar and - vCalendar files. Moved the implementation-specific stuff from - cal-backend.[ch] to here. - - * pcs/cal-backend-imc.c (CalendarFormat): Moved enumeration to - here. Added a CAL_UNKNOWN value for when the backend is not - loaded yet. - (cal_backend_imc_init): Initialize priv->format as CAL_UNKNOWN. - (save_to_vcal): Use the same VCProdIdProp value as in - cal-util/calobj.c. Use "1.0" as the VCVersionProp as per the - vCalendar spec. - (ensure_uid): Return nothing, since the result value need not be - used anymore. - (add_object): Since we mark the calendar as dirty anyways, we do - not need to check the result value of ensure_uid() anymore. - (remove_object): Asssert that we know how to handle the object's - type. We do this in add_object() anyways. - - * pcs/Makefile.am (libpcs_a_SOURCES): Added cal-backend-imc.[ch]. - - * gui/gnome-cal.c: Replaced debugging printf()s with g_message() - so that we can see the line number where they occur. - - * gui/gnome-cal.c (gnome_calendar_load_cb): Sort of handle the - LOAD_METHOD_NOT_SUPPORTED result code, and added a default for the - switch. - - * cal-client/cal-listener.h (CalListenerLoadStatus): Removed - enumeration; it is stupid to translate all values for the - CalClient when it is going to translate them again. - (CalListenerClass::cal_loaded): This signal now passes the - LoadStatus directly from the CORBA side. - - * cal-client/cal-listener.c (Listener_cal_loaded): Do not - translate the status value. - - * cal-client/cal-client.h (CalClientLoadStatus): Added the - CAL_CLIENT_LOAD_METHOD_NOT_SUPPORTED error code. - - * cal-client/cal-client.c (cal_loaded_cb): Translate the CORBA - version of the LoadStatus result code. - - * pcs/cal-factory.c (CalFactoryPrivate): New methods field for the - hash table from method strings to the GtkTypes for backend class - types. - (cal_factory_init): Create the priv->methods hash table. - (cal_factory_destroy): Free the priv->methods hash table. - (cal_factory_register_method): New function to register a backend - class for a particular URI method. - (launch_backend_for_uri): New function to launch a backend for a - particular URI's method. - (load_backend): Use launch_backend_for_uri(). Move the error - notification code from load_fn() to here. - (create_backend): Use launch_backend_for_uri(). Move the error - notification code form create_fn() to here; it is #ifdefed out - since currently cal_backend_create() does not have any error - reporting capabilities. - - * idl/evolution-calendar.idl (Listener::LoadStatus): Added a - PROTOCOL_NOT_SUPPORTED error code. - - * pcs/cal-factory.c (cal_factory_load cal_factory_create): Removed - functions, since they were supposed to be internal only. - (CalFactory_load): Call queue_load_create_job() directly. - (CalFactory_create): Likewise. - -2000-05-08 Damon Chaplin - - * gui/e-week-view.c (e_week_view_remove_event_cb): - * gui/e-day-view.c (e_day_view_remove_event_cb): don't set the ico->uid - to NULL or we won't find any other occurrences of the event. Set the - editing_event_day/num to -1 instead. - - * gui/e-week-view-event-item.c (e_week_view_event_item_draw): fixed the - positioning of the icons for long events. - - * cal-util/calobj.c (ical_object_normalize_summary): forgot to - terminate the string. - -2000-05-07 Damon Chaplin - - * gui/e-day-view.c (e_day_view_on_main_canvas_drag_data_received): - (e_day_view_on_top_canvas_drag_data_received): show the EText item, - just in case it hasn't moved, otherwise it won't appear. - - * gui/e-day-view.h (E_DAY_VIEW_BAR_WIDTH): increased from 6 to 8 to - make it easier to drag an event. Also increased E_DAY_VIEW_GAP_WIDTH - since it must be >= the BAR_WIDTH. - -2000-05-07 Matt Loper - - * gui/evolution-calendar-control.c (PROPERTY_CALENDAR_URI): - Changed to "folder_uri" from "calendar_uri". - (set_prop): The uri given to us is a directory, so we append a - filename onto the end before we use it. - -2000-05-06 Damon Chaplin - - * cal-util/timeutil.c (time_day_begin): - (time_day_end): changed these so they just do a simple localtime(), - update the struct tm, then do a mktime(). I don't know why it used to - look at the tm_isdst flags etc. From a little test program I wrote - which steps through testing every hour for a year it wasn't working - correctly, and the new code does. - (time_add_day): also got rid of the stuff that looked at tm_isdst here. - My test program now works better. - -2000-05-06 Chris Toshok - * gui/.cvsignore: ignore evolution-calendar.pure - - * gui/Makefile.am: add support for building evolution-calendar.pure - -2000-05-06 Damon Chaplin - - * gui/e-day-view.c: - * gui/e-week-view.c: finish editing event when user hits Return key. - (e_week_view_on_text_item_event): stop event signals after doing any - other calls, since otherwise it will also stop any other resulting - event signals. - - * gui/e-week-view-event-item.c (e_week_view_event_item_draw): don't - draw the start/end times while editing. - - * gui/eventedit.c: changed the Summary field to a GtkEntry, since we - now only want a single line of text. - - * cal-util/calobj.c (ical_object_normalize_summary): new function to - convert the summary field to a single line of text, by converting any - sequence of CR & LF characters to a single space. - (ical_object_create_from_vobject): call the above function. I think - all functions that load iCalObjects go through this. - (ical_new): called it here as well just in case. - -2000-05-06 Damon Chaplin - - * gui/week-view.[hc]: removed. - -2000-05-06 Damon Chaplin - - * gui/gncal-day-panel.[hc]: - * gui/gncal-day-view.[hc]: - * gui/gncal-full-day.[hc]: - * gui/gncal-week-view.[hc]: - * gui/layout.[hc]: - * gui/view-utils.[hc]: removed old calendar view files. - -2000-05-06 Damon Chaplin - - * cal-util/calobj.[hc]: added guint ref_count to iCalObject struct, - and ical_object_ref/unref() functions. I've updated all the gui/ - stuff to use ref_counts but I haven't touched the pcs/ stuff. Maybe - just using ical_object_destroy() is OK there. - - * gui/gncal-todo.c: - * gui/calendar-commands.c: - * gui/eventedit.c: - * gui/e-week-view.c: - * gui/e-day-view.c: use refcounting for iCalObjects. - - * gui/e-day-view-main-item.c: - * gui/e-day-view-top-item.c: - * gui/e-day-view.c: try not to ever draw outside the event, even when - the event is very small. - -2000-05-05 Damon Chaplin - - * gui/e-day-view.c: don't allow recurring events to be resized or - dragged, and don't show the resize/drag cursors. Actually it may be - better to let the user do the resize/drag and then ask them what they - want to do - change the single occurrence or the entire series. - - * gui/e-day-view-time-item.c (e_day_view_time_item_show_popup_menu): - use e_auto_kill_popup_menu_on_hide() to destroy the popup menu. - - * gui/popup-menu.c: include e-gui-utils.h - -2000-05-04 Damon Chaplin - - * gui/e-day-view.c (e_day_view_foreach_event_with_uid): for the long - events pass E_DAY_VIEW_LONG_EVENT as the day. Fixes SEGV. - - * gui/calendar-commands.c: when we switch views, grab the focus. - - * gui/gnome-cal.c (gnome_calendar_tag_calendar): - (gnome_calendar_mark_gtk_calendar_day): changed this so it uses - cal_client_get_events_in_range(), and doesn't load any objects. - Also just return if it isn't visible. - - * gui/calendar-commands.c (calendar_get_events_in_range): call - g_list_sort() to sort the list rather than g_list_insert_sorted() for - each element. It is much more efficient. - Also changed it so that the co->ev_start/end fields are copied from - the CalObjInstance rather than the parameters to the function - (that is right, isn't it?) - Also freed the list elements, and finally the list. - (calendar_iterate): changed this to use cal_client_get_events_in_range - since that is more efficient than getting all the uids and then loading - and parsing all the events. - - * pcs/cal-backend.c (save): output the '... saved' message before - freeing the string! - - * gui/gncal-todo.c (gncal_todo_update): - * gui/e-week-view.c (e_week_view_update_event): - * gui/e-day-view.c (e_day_view_update_event): - * gui/calendar-commands.c (calendar_get_events_in_range): - (calendar_iterate): free obj_string after it is parsed. - -2000-05-02 Damon Chaplin - - * gui/calendar-commands.c (calendar_control_activate): set the active - radio button here. Oops - it wasn't a Bonobo problem after all. - - * gui/popup-menu.c (popup_menu): added call to - e_auto_kill_popup_menu_on_hide() to destroy the menu. - - * gui/e-week-view.c (e_week_view_show_popup_menu): - * gui/e-day-view.c (e_day_view_on_event_right_click): ico->user_data - isn't useful any more, since the event editor keeps its own iCalObject. - So for now we make the menu commands available even when the event is - being edited in the event editor. - Also corrected misspellings of 'occurance' -> 'occurrence'. - - * gui/eventedit.c (event_editor_destroy): destroy the iCalObject. - The event editor now uses its own independent iCalObject. - - * gui/e-week-view.c (e_week_view_on_unrecur_appointment): - * gui/e-day-view.c (e_day_view_on_unrecur_appointment): create a new - uid for the new single instance. I'm not sure what we should do about - the creation/last modification times of the objects. - - * gui/e-week-view.c (e_week_view_on_edit_appointment): - * gui/e-day-view.c (e_day_view_on_edit_appointment): duplicate the - iCalObject before passing it to the event editor, since it will change - the fields. If we don't duplicate it we won't know what has changed - when we get the "update_event" callback. - - * gui/e-week-view.c (e_week_view_key_press): - * gui/e-day-view.c (e_day_view_key_press): set the created and last_mod - times of the new iCalObject. We may want to set the default alarm as - well. - - * cal-util/calobj.c (ical_gen_uid): made this function public so we - can generate new uids if necessary. - -2000-05-01 Damon Chaplin - - * gui/gnome-cal.[hc] (gnome_calendar_get_current_time_range): new - function to get the currently seleted time range form the current view. - - * gui/calendar-commands.c (display_objedit): use the above function - to get the time for the new appointment. - - * gui/e-week-view.c: - * gui/e-day-view.c: use a shallow copy of the ico when we update the - times (when resizing/dragging). Otherwise we won't detect that the - time has changed in the "update_event" callback. - - Also added functions to get the currently selected time range. - -2000-04-30 Seth Alves - - * pcs/icalendar-save.c (icalcomponent_create_from_ical_object): set - attendee and contact address correctly. - - * pcs/cal-backend.c (icalendar_calendar_load): init priv->object_hash - when loading. - (cal_get_type_from_filename): if file extension is .ical, consider - the file an ical file. - -2000-05-01 Damon Chaplin - - * cal-util/calobj.c (ical_object_compare_dates): new function to see - if the event dates have changed (including any recurrence rules). - It is used for optimization when we get the "object_changed" signal. - We have to do far less work if the dates are unchanged. - - * gui/e-week-view.c: - * gui/e-day-view.c: only draw the selection when we have the keyboard - focus, since the user expects to be able to type in a new event when - the selection is shown. Also keep the selection when we lose focus, - but just don't show it. - - Also quite a few changes to cope with the new client/server - architecture. - - * gui/e-day-view-top-item.c (e_day_view_top_item_draw): - * gui/e-day-view-main-item.c (e_day_view_main_item_draw): - * gui/e-week-view-main-item.c (e_week_view_main_item_draw_day): - only draw the selection if the widget has the keyboard focus. - - * gui/gnome-cal.c (mark_gtk_calendar_day): fixed so it works with - events longer than one day. And changed the code for updating events - in the new views. - -2000-04-27 Ettore Perazzoli - - * gui/evolution-calendar-control.c - (init_bonobo): OAFized. - - * gui/main.c (main): Initialize with OAF if `USING_OAF'. - - * gui/evolution-calendar-control.c: New #define - `CONTROL_FACTORY_ID', varying according to whether we are - `USING_OAF'. - (calendar_factory_init): Use `CONTROL_FACTORY_ID'. - - * gui/Makefile.am: Updated for OAF. - - * pcs/cal-factory.h: Explicitly #include - "calendar/pcs/evolution-calendar.h" instead of just - "evolution-calendar.h". - - * cal-client/cal-client.c (cal_client_construct) [USING_OAF]: Use - OAF. - - * cal-client/client-test.c (init_corba): New function, implemented - differently depending on `USING_OAF'. - -2000-04-27 - - * pcs/cal-backend.c (cal_backend_load): fix memory leak - (save_to_vcal): same - (save): same - (cal_backend_load): same - -2000-04-26 Christopher James Lahey - - * cal-util/.cvsignore: Replaced libcal-util.la with *.la - - * pcs/.cvsignore: Added *.la and *.lo. - -2000-04-25 Federico Mena Quintero - - * pcs/cal-factory.c (backend_last_client_gone_cb): Renamed from - backend_destroy_cb. Now we use it for the "last_client_gone" - signal from the backend. Also, unref the backend to destroy it. - (add_backend): Connect to the "last_client_gone" signal of the - backend. - (cal_factory_get_n_backends): New function to query the number of - running backends. - - * pcs/cal-backend.c (cal_backend_class_init): Register the new - "last_client_gone" signal. It is emitted when the last Cal client - goes away. It is used to notify the factory when a backend may be - safely destroyed. - (cal_destroy_cb): Emit the "last_client_gone" signal when the last - client disconnects from the backend. - -2000-04-25 Seth Alves - - * gui/e-day-view.c (e_day_view_find_event_from_ico): compare - iCalObjects by their UIDs instead of by their pointers. - - * pcs/cal-backend.c (cal_backend_destroy): don't save on destroy. - -2000-04-25 Ettore Perazzoli - - * cal-client/Makefile.am: Add `$(datadir)/idl'. - - * pcs/Makefile.am (idl_flags): Add `$(datadir)/idl'. - (INCLUDES): Use `$(BONOBO_GNOME_CFLAGS)'. - -2000-04-25 Seth Alves - - * gui/gnome-cal.c (gnome_calendar_destroy): hook for widget - destroy -- used to unref the CalClient so wombat knows we are gone. - (gnome_calendar_class_init): added a class init for this widget. - - * gui/e-day-view.c (e_day_view_update_event): allow for null ico - - * gui/e-week-view.c (e_week_view_update_event): allow for null ico - -2000-04-24 Federico Mena Quintero - - * cal-client/client-test.c (main): The path to the test calendar - changed when we moved stuff around. Users will have to tweak this - for their CVS setup, anyways. - (create_client): Create or load the calendar as appropriate. - (client_destroy_cb): Exit the main loop if both clients are gone. - (main): Connect to the "destroy" signal of the clients so that we - can terminate the test program. - -2000-04-24 Seth Alves - - * pcs/icalendar.c (parse_person): allow for null CN - (parse_person): allow for null sent_by - - * pcs/Makefile.am: build icalendar-test - - * pcs/icalendar-test.c: a test which loads an ical file and - converts it to our internal format, and then saves it back out. - -2000-04-24 Damon Chaplin - - * gui/Makefile.am: added new source files and pixmaps, and removed - old source files, which can be deleted. - - * gui/e-week-view-titles-item.[hc]: - * gui/e-week-view-main-item.[hc]: - * gui/e-week-view-event-item.[hc]: - * gui/e-week-view.[hc]: new files implementing the week/month views. - - * gui/yearview.xpm: - * gui/monthview.xpm: - * gui/weekview.xpm: - * gui/workweekview.xpm: - * gui/dayview.xpm: new pixmaps for the toolbar buttons. These aren't - intended to be the final pixmaps. - - * gui/calendar-commands.c: added radio buttons to the toolbar to - switch between the calendar views, and moved the am_pm_flag here so we - can get rid of view-utils.c. - - * gui/gnome-cal.[hc]: made it a subclass of GtkVBox, rearranged the - widgets into 2 notebooks, and added the selection_start_time and - selection_end_time fields. - - * gui/goto.c: updated to use new selection time range. - - * gui/quick-view.c: added '#include ' so it compiles. - - * gui/e-day-view.[hc]: changed the interface to support the new - selection time range, got rid of a few debugging messages and changed - a few bits. - -2000-04-21 Seth Alves - - * pcs/icalendar-save.c: start on code to do the opposite of - icalendar.c (convert from iCalObjects to libical's icalcomponents). - - * gui/calendar-commands.c (calendar_control_activate): moved - "About Calendar" into the View menu so it shows up. - -2000-04-20 Seth Alves - - * gui/gnome-cal.c (gnome_calendar_changed_cb): new function: callback - for listener's object updated signal. - (gnome_calendar_object_removed_cb): new function: callback for - listener's object removed signal. - (gnome_calendar_new): hook up listener's "obj_updated" and - "obj_removed" signals so if evolution is running twice, - they will both see changes right away. - (gnome_calendar_object_changed): don't call update_all, since - it will be called by the listener. - (gnome_calendar_remove_object): don't call update_all - (gnome_calendar_add_object): don't call update_all - - * gui/gncal-full-day.c (child_realize): create fullday's gcs - even if pixmap_bell has already been created. this was - causing crashes if the calendar was run twice. - -2000-04-19 Seth Alves - - * gui/eventedit.c (ee_rp_init_rule): changed the order around - a bit to avoid a Gtk-CRITICAL crash - - * gui/gncal-todo.c (gncal_todo_update): fixed code to populate - the todo clist - - * cal-client/cal-client.c (cal_client_get_uids): don't check - type against CALOBJ_TYPE_ANY since it will always match. - (cal_client_get_uids): same (re: CALOBJ_TYPE_ANY) - - * pcs/cal-backend.c (build_uids_list): same (re: CALOBJ_TYPE_ANY) - - * pcs/cal.c (Cal_get_uids): same (re: CALOBJ_TYPE_ANY) - - * pcs/cal-backend.c (remove_object): don't call save from here - because in all cases the caller of remove_object calls save - - * gui/calendar-commands.c (calendar_set_uri): calls gnome_calendar_open - instead of checking on disk and calling load or create. - - * gui/gnome-cal.c (gnome_calendar_object_changed): fixed to use - cal_client_update_object -- editing and dragging events works again - (gnome_calendar_open): collapsed gnome_calendar_load and - gnome_calendar_create into this function. added new type - GnomeCalendarOpenMode which has the value CALENDAR_OPEN or - CALENDAR_OPEN_OR_CREATE. - - * gui/evolution-calendar-control.c (calendar_properties_init): create - a property bag for this control - (set_prop): callback for property sets - (get_prop): callback for proprety gets - - * gui/calendar-commands.c (calendar_set_uri): new function, - called when the "calendar_uri" property is set on the calendar- - control's property bag. - -2000-04-18 Federico Mena Quintero - - * cal-util/Makefile.am (INCLUDES): Fix include path. - -2000-04-16 Federico Mena Quintero - - * pcs/cal-factory.h (CalFactoryClass): We have a new - "last_calendar_gone" signal that Wombat can use to terminate - itself properly. - - * pcs/cal-factory.c (cal_factory_class_init): Register the - "last_calendar_gone" signal. - (backend_destroy_cb): Emit the "last_calendar_gone" signal instead - of killing the factory. - - * pcs/Makefile.am: Added $(CORBA_GENERATED) to BUILT_SOURCES. - (INCLUDES): Make the log domain be "wombat-pcs". - -2000-04-17 Seth Alves - - * pcs/cal-backend.c (add_object): removed implicit save, since - we don't want to save as we load from disk. - (cal_backend_update_object): added a call to save, since it - isn't done by add_object now. - -2000-04-16 Federico Mena Quintero - - * cal-util/Makefile.am: Renamed library from libcalutil to - libcal-util, to be consistent with libcal-client. Install header - files in $(includedir)/evolution/cal-util. - (INCLUDES): Add "cal-util" log domain for glib. - (libcal_clientincludedir): The header files are now installed in - $(includedir)/evolution/cal-client. - - * cal-util/cal-util.h: Fix includes. - - * cal-client/client-test.c: Fix includes. - - * pcs/Makefile.am: Create libpcs.a, not a shared library, because - it is for internal use by Wombat only. The header files should - not be installed, either. Removed all the old Tlacuache stuff. - - * gui/Makefile.am (EXTRA_DIST): We no longer distribute - gncal.desktop. - (evolution_calendar_INCLUDES): Add "calendar-gui" for the glib log - domain. - - * gui/*.[ch]: Fix cal-util and cal-client includes. - - * pcs/Makefile.am (INCLUDES): Added "pcs" log domain for glib. - - * pcs/*.[ch]: Fix cal-util includes. - -2000-04-11 Chris Toshok - - * pcs/icalendar.c (icaltime_to_timet): use HAVE_TIMEZONE to switch - between linux's timezone variable and *bsd's method of getting the - gmt offset. - -2000-04-10 Seth Alves - - * pcs/cal-backend.c (save_to_vcal): create and save an actual - vcalendar instead of a list of vcal objects. - -2000-04-10 Damon Chaplin - - * gui/Makefile.am (INCLUDES): moved srcdir directories to the top so - we search headers in the evolution tree before installed headers. - (Otherwise when you do 'make install' lots of files in gui/ get - rebuilt, since they depend on the installed cal-client.h which has just - been updated.) - -2000-04-09 Seth Alves - - * gui/gnome-cal.c (gnome_calendar_load): catch cal_loaded signal - on the cal client. - (gnome_calendar_load_cb): callback for cal_loaded signal. moved - gnome_calendar_update_all from gnome_calendar_load to here. - - * gui/calendar-commands.c: minor cleanups - - * pcs/cal-backend.c (save_to_vcal): copied code from gnome-pim - to write vcal to a file - (save): filled it with more gnome-pim code - (add_object): call save () after changing - (remove_object): same - (cal_backend_create): same - (cal_backend_remove_object): same - -2000-04-08 Christopher James Lahey - - * gui/Makefile.am: Removed linking with libetable and libeminicard - since they weren't being used. - -2000-04-08 Seth Alves - - * gui/gnome-cal.c (gnome_calendar_create): new function: - friendly wrapper for cal_client_create_calendar - - * gui/calendar-commands.c (new_calendar): call gnome_calendar_create - if no filename is provided - - * gui/prop.c (properties): calendar is a frame - - * gui/calendar-commands.c (calendar_control_activate): sort out the - menus a bit, more of them show up now. - - * gui/Makefile.am: don't build library or test, just the bonobo control - - * gui/gncal-todo.c (simple_todo_editor): calendar is a frame instead - of a window, now. - - * gui/gnome-cal.c (gnome_calendar_new): same - - * gui/goto.c (goto_dialog): same - -2000-04-06 Seth Alves - - * gui/calendar-commands.c (calendar_control_activate): removed - uih from the argument list, added cal. use cal as user_data - in callbacks rather than the control. - (calendar_control_deactivate): removed uih from argument list - -2000-04-05 Seth Alves - - * gui/calendar-commands.c (setup_menu): removed - (setup_appbar): removed - (calendar_control_activate): new function -- does the work - that setup_appbar and setup_menu used to do. - (calendar_control_deactivate): undoes what calendar_control_activate - does by removing the toolbar items and menu items. - - * gui/Makefile.am: build test-calendar-widget and evolution-calendar, - common stuff is in a library - - * gui/gnome-cal.c (gnome_calendar_get_type): made the calendar widget - based on a gtk_frame rather than a gnome_app - - * gui/calendar-commands.c: split out some of main.c - - * gui/evolution-calendar-control.c: bonobo bung so evolution - can use the calendar widget - -2000-04-01 Matt Loper - - * pcs/.cvsignore: Added *.lo. - -2000-03-30 Seth Alves - - * gui/main.c (calendar_get_events_in_range): - cal_client_get_events_in_range returns a list of CalObjInstance *, not - a list of (char *) uid. - - * Makefile.am (SUBDIRS): readded the gui directory - - * gui/main.c: temporarily added alarm_defaults back in, - since the calendar doesn't link without it - -2000-03-29 Matt Loper - - * Makefile.am: remove the gui directory, which doesn't compile. - -2000-03-28 Matt Loper - - * pcs/Makefile.am: create a libpcs.la library, for use in the - wombat. - -2000-03-28 Seth Alves - - * gui/Makefile.am (LINK_FLAGS): added libeutil.la and libetext.a - - * gui/main.c (calendar_iterate): switch from string_to_ical_object to - ical_object_find_in_string - (calendar_get_events_in_range): same - (session_save_state): commented out references - to gcal->client->filename - -2000-03-27 Federico Mena Quintero - - * pcs/cal-backend.c (cal_backend_get_object): Use - ical_object_to_string(). - - * cal-util/calobj.c (ical_object_to_string): Moved over from - pcs/cal-backend.c (was string_from_ical_object). - (get_calendar_base_vobject): Likewise, moved over from - pcs/cal-backend.c. - - * cal-util/cal-util.c: Removed string_to_ical_object(); the - correct function is in calobj.[ch], called - ical_object_find_in_string(). Removed ical_object_to_string, - since we now implement it in calobj.c. - - * cal-util/calobj.c: Removed ical_object_new_from_string(); see - above. - - * idl/evolution-calendar.idl (CalObjInstance): Calendar object - instances now contain only the UID for the object, not the whole - string representation of the object. This allows clients to - implement caching of objects if they wish. - - * pcs/cal.c (Cal_get_events_in_range): Likewise. - - * pcs/cal-backend.c (build_event_list): Likewise. - - * cal-client/cal-client.c (cal_client_get_events_in_range): - Likewise. - - * cal-util/cal-util.h (CalObjInstance): Likewise. - - * cal-util/cal-util.c (cal_obj_instance_list_free): Likewise. - (cal_obj_uid_list_free): Assert that the UIDs in the list are not - NULL. - - * pcs/tlacuache.gnorba (repo_id): The calendar factory also - supports the Unknown interface. - -2000-03-17 Federico Mena Quintero - - * gui/e-day-view.c: Fix includes. - (e_day_view_on_delete_occurance): Do not call save_default_calendar(). - (e_day_view_on_delete_appointment): Likewise. - (e_day_view_on_unrecur_appointment): Likewise. - (e_day_view_finish_long_event_resize): Likewise. - (e_day_view_finish_resize): Likewise. - (e_day_view_key_press): Likewise. - (e_day_view_on_editing_stopped): Likewise. - (e_day_view_on_top_canvas_drag_data_received): Likewise. - (e_day_view_on_main_canvas_drag_data_received): Likewise. - -2000-03-13 Damon Chaplin - - * gui/e-day-view*.[hc]: new files for the Day/Work-Week views. - -2000-03-12 Federico Mena Quintero - - * gui/main.c (gnome_calendar_locate): Removed function now that it - is no CORBA server in the GUI. - (save_default_calendar): Removed function. Now the personal - calendar server will take care of saving modified calendars when - appropriate. - (close_cmd): Do not call unregister_calendar_services(). - - * gui/eventedit.c (ee_ok): Do not save the calendar. - - * gui/gncal-day-panel.c (day_view_range_activated): Likewise. - - * gui/gncal-todo.c (ok_button): Likewise. - (delete_todo): Likewise. - - * gui/gncal-full-day.c (delete_occurance): Likewise. - (delete_appointment): Likewise. - (unrecur_appointment): Likewise. - (child_focus_out): Likewise. - (update_from_drag_info): Likewise. - - * gui/gnome-cal.c (gnome_calendar_new): Removed obsolete call to - create the CORBA server. - - * gui/gnome-cal.h (GnomeCalendar): Renamed `calc' field to - `client'. - - * cal-client/cal-client.h (CalClient): Removed filename and - corba_server fields. - -2000-03-10 Federico Mena Quintero - - * gui/main.c (main): Do not pass the INIT_SERVER flag to - gnome_CORBA_init_with_popt_table(). Check for exceptions - properly. - (main): Initialize Bonobo. - (main): Call process_dates() to parse the dates from the command - line before we dump the events or the TODOs. - (main): Use bonobo_main() instead of gtk_main(). - - * cal-util/calobj.c (ical_new): Initialize the alarm types here. - Do not call default_alarm() anymore, since that is a GUI issue. - (default_alarm): Removed function. - (alarm_defaults): Removed defaults data. - - * pcs/tlacuache.c (calendar_notify): Removed stubs for - alarm_defaults, calendar_notify(), debug_alarms. - -2000-03-09 Federico Mena Quintero - - * gui/Makefile.am: Removed the corba-cal stuff. Commented out the - Pilot conduit stuff for now. - - * gui/calendar.c: Random #ifdefs to make it build, although this - file is going away. - - * gui/Makefile.am: Removed referenes to calobj.[ch] and timeutil.[ch]. - - * gui/calendar-conduit.c: Fixup includes. - - * gui/calendar-conduit.h: Fixup includes. - -2000-03-09 Seth Alves - - * gui/gnome-cal.h: replaced "Calendar *cal" with "CalClient *calc" - in the GnomeCalendar struct. - - * gui/*.c: tracked change from Calendar * to CalClient - - * gui/main.c: moved alarm_defaults from here to cal-util/calobj.c - (calendar_get_events_in_range): pulled this out of calendar.c and - fixed it up to use cal-client stuff. i'm not sure where to put it yet. - - * gui/main.c (calendar_iterate): pulled this one out of calendar.c also - -2000-03-07 Federico Mena Quintero - - * cal-client/Makefile.am: Removed cal-client-alarm.[ch] from the - list of sources. This was a miscommunication on our part. - -2000-03-05 Seth Alves - - * cal-client/cal-client-alarm.c: stubs for client side - access to alarm structures. this will probably change, - since i don't know what i'm doing. - - * cal-util/alarm-enums.h: enums for alarms needed by - both the client and the server - - * remaining source files in calendar/... have been moved - to calendar/gui. - - * gui/alarm.c: start to decouple the view from the model - in the alarm editing code - -2000-03-03 Seth Alves - - * cal-util/Makefile.am: new file -- things shared between - the client and server go in this directory - - * calobj.c calobj.h icalendar.c icalendar.h - timeutil.c timeutil.h cal-util.c cal-util.h where moved - backend stuff went into pcs. shared stuff went into - cal-util. - -2000-03-02 Federico Mena Quintero - - At this point the calendar client and personal calendar server - files were moved to the idl/, cal-client/, and pcs/ directories. - - * idl/Makefile.am: New file. - - * cal-client/Makefile.am: New file. Moved the libcal-client stuff - from calendar/Makefile.am to here. - - * pcs/Makefile.am: New file. Moved the tlacuache stuff from - calendar/Makefile.am to here. - - * Makefile.am (SUBDIRS): Added the idl and cal-client directories. - - * calendar.h: Removed the references to cal-backend.h and its - stuff. This file is going away soon! - - * icalendar.c: #include . Also, we don't need to - include cal-backend.h or gnome.h. - - * icalendar.h: Protect from multiple inclusions. - -2000-03-01 Federico Mena Quintero - - * Makefile.am: Use the gnome-config flags for orbit-idl. - Create a libcal-client library with the calendar client object. - -2000-02-29 Federico Mena Quintero - - * Makefile.am: Removed stale rule for the conduit. - -2000-02-21 Matt Loper - - * .cvsignore: Added *.lo. - -2000-02-19 Matt Loper - - * .cvsignore: Added tlacuache and tl-test. - -2000-02-18 Miguel de Icaza - - * Makefile.am (INCLUDES): Use BONOBO_VFS_GNOME_CFLAGS instead of - GNOMEUI_INCLUDES, as we use Bonobo and VFS. - -2000-02-17 Seth Alves - - * cal-backend.h: moved CalendarFormat type def here - - * cal-backend.c (cal_backend_load): if extension suggests - an ical file, attempt to load an iCal file. - (cal_get_type_from_filename): returns CAL_ICAL if file - extension is 'ics' or 'ifb', else returns CAL_VCAL - (icalendar_calendar_load): moved this here from - icalendar.c because it needs to call the static function - add_object. - -2000-02-17 Federico Mena Quintero - - * cal-client.c (cal_client_remove_object): Implemented. - - * cal.c (cal_notify_remove): Implemented. - (Cal_remove_object): Implemented. - (cal_get_epv): Fill in the remove_object field in the epv. - - * cal-backend.c (cal_backend_remove_object): Implemented. - (notify_remove): New function to notify clients that an object was - removed. - -2000-02-16 Russell Steinthal - - * calobj.[ch], eventedit.c, main.c: Change iCalObject.organizer - from char* to iCalPerson* - - * calobj.[ch]: Change iCalObject.related from list of char* to - list of iCalRelation*; assorted related fixes - - * icalendar.c: interface between libical and the gnomecal - internal representation - -2000-02-11 Federico Mena Quintero - - * cal-client.c (cal_client_update_object): Implemented. - - * cal.c (cal_notify_update): New function to notify the listener - about an updated object. - (Cal_update_object): Implemented. - (Cal_get_uids): set_release() the sequence to TRUE. - (Cal_get_events_in_range): Likewise. - - * cal-backend.c (remove_object): New function to remove objects - from a calendar backend. - (cal_backend_update_object): New public function to update an - object and notify clients about it. - - * evolution-calendar.idl (Cal): Added update_object() and - delete_object() methods. - (Listener): Removed the obj_changed method and renamed obj_added - to obj_updated. We now only have updated and removed notifiers. - - * cal-listener.[ch]: Removed the "changed" notification code. - Changed the "added" notification code to the "updated" - notification. - - * cal-client.c: Likewise. - - * tlacuache.c (create_cal_factory): Connect to "destroy" on the - factory and exit the main loop when the factory is destroyed. - - * cal-factory.c (backend_destroy_cb): New callback used when a - backend is destroyed. Removes the backend from the factory's hash - table and unrefs the factory if all backends go away. - (add_calendar_client): Free the environment. - - * cal.c (cal_new): Use bonobo_object_unref() if we fail to - initialize. - - * cal-listener.c (cal_listener_new): Likewise. - - * layout.c (layout_events): Plug li.partition memory leak. - -2000-02-10 Federico Mena Quintero - - * cal-backend.c (cal_backend_add_cal): Connect to the Cal's - destroy signal. - (cal_backend_remove_cal): Killed function now that removal of Cal - objects is done in their destroy callback. - (cal_destroy_cb): New callback to remove a Cal from the backend's - list of clients. Also, the backend destroys itself when there are - no more clients connected to it. - (save): New placeholder function to save a backend. - (destroy): New function to destroy a backend's data. - (cal_backend_destroy): Save the calendar and destroy it. - - * cal.c (cal_destroy): Reset the priv->backend to NULL. - - * cal-factory.c (add_calendar_client): There is no need to call - cal_backend_remove_cal(); we can now just destroy the Cal object. - (create_fn): Make sure we always unref the URI. - (load_fn): Move the URI unref to the end of the function for - safety. - - * cal-factory.c (add_calendar_client): Unref the Cal only if - notification of the listener was unsuccessful. Otherwise, the - calendar user agent (Listener side) keeps the reference. - - * tl-test.c (list_uids): Free the calobj. - - * cal-client.c (cal_loaded_cb): Use bonobo_object_unref() to get - rid of the listener. - (load_or_create): Likewise. - (destroy_factory): New function to get rid of the factory. - (destroy_listener): New function to get rid of the listener. - (destroy_cal): New function to get rid of the calendar client - interface object. - (cal_client_destroy): Free all resources. - (cal_client_get_object): CORBA_free() the calobj string. Boy, I - love memprof. - - * cal-listener.c (cal_listener_destroy): Reset the priv->cal to - CORBA_OBJECT_NIL. - - * cal-backend.c (cal_backend_remove_cal): Do not unref the Cal, - since the calendar user agent owns it. - (cal_backend_add_cal): Do not ref the Cal, since the calendar user - agent owns it. - - * cal-factory.c (add_calendar_client): Use bonobo_object_unref() - to get rid of the calendar client interface object. - - * calobj.c (ical_object_create_from_vobject): Duplicate the - default "PUBLIC" string. - -2000-02-09 Federico Mena Quintero - - * cal-factory.c (cal_factory_load): Added documentation comment. - (load_fn): Do not print a message if the backend could not be - loaded due to a non-fatal error. - (queue_load_create_job): Moved the stuff from cal_factory_load() - to here. Now this function serves to queue load or create - requests. - (cal_factory_load): Use queue_load_create_job(). - (cal_factory_create): Implemented; use queue_load_create_job(). - (create_fn): New job handler for creating new calendars. - (create_backend): New function to create a new backend with a new - calendar. - (add_backend): New helper function to add backends to the - factory's hash table. - (load_backend): Use add_backend() instead of adding the backend by - ourselves. - - * cal-client.c (load_or_create): Moved the functionality from - cal_client_load_calendar() to here, and added an option to create - a new calendar instead of loading an existing one. - (cal_client_load_calendar): Use load_or_create(). - (cal_client_create_calendar): Implemented. - - * cal-backend.c (cal_backend_create): Implemented. - - * evolution-calendar.idl (LoadStatus): Added an IN_USE error for - create requests. - - * cal-listener.h (CalListenerLoadStatus): Added CAL_LISTENER_LOAD_IN_USE. - - * cal-listener.c (Listener_cal_loaded): Convert the IN_USE error. - - * cal-client.h (CalClientLoadStatus): Added CAL_CLIENT_LOAD_IN_USE. - - * cal-client.c (cal_loaded_cb): Handle CAL_LISTENER_LOAD_IN_USE. - - * tl-test.c: New test program for the calendar client side; it - also exercises the server side by sending commands to it. - - * Makefile.am: Added the tl-test program. - - * tlacuache.gnorba: Updated. - - * tlacuache.c (create_cal_factory): Use the right GOAD id. - - * cal-client.c (cal_client_construct): Use the right GOAD id. - -2000-02-08 Federico Mena Quintero - - * evolution-calendar.idl (Cal): Added get_uids() method to get a - list of UIDs based on object types. - - * cal-backend.c (cal_backend_get_uids): Implemented get_uids() in - the backend. - - * cal.c (Cal_get_uids): Implemented get_uids() method. - - * cal-client.c (cal_client_get_uids): Implemented client-side - function. - - * cal-util.c (cal_obj_instance_list_free): Doh. Free the list, - not the last link. - (cal_obj_uid_list_free): New function to free a list of UIDs. - - * GnomeCal.idl (Repository): Removed unused method - get_object_by_id_list(). This is just for cleanup purposes and to - remind me exactly of what needs to be moved over to - evolution-calendar.idl. - (Repository): Removed unused get_objects() method. - - * corba-cal.c (init_calendar_repo_class): Removed the unused - get_objects method. - - * calobj.h (CalObjFindStatus): New status value enumeration for - the find function. - - * calobj.c (ical_object_find_in_string): New function to parse a - complete calendar and find a calendar object in it. This should - be used instead ical_object_new_from_string() in the future. - - * evolution-calendar.idl (CalObjInstance): Added an uid field. - Now the idea is that whenever calendar object strings are passed - around, their UIDs are passed along with them so that the actual - object can be pulled from the whole VCAL object using its UID to - identify it. - - * cal-util.h (CalObjInstance): Added uid field. - - * cal-util.c (cal_obj_instance_list_free): Free the UIDs. - - * cal-backend.c (build_event_list): Store the object's UID in the - instance structure. - - * cal.c (Cal_get_events_in_range): Copy the UID field to the CORBA - structure. - - * cal-client.c (cal_client_get_events_in_range): Copy the UID - field from the CORBA structure. - - * main.c (gnome_cal_file_menu): Removed unfinished html-month stuff. - - * Makefile.am (gnomecal_SOURCES): Removed html-month.c. - - * gnome-cal.c: #include "alarm.h" - (mail_notify): Made static. - - * alarm.h: #include "calobj.h" - - * corba-cal-factory.h (init_corba_server): Fixed prototype. - - * quick-view.c (create_items_for_event): Made static. - - * gncal-todo.c (column_resized): Made static. - - * layout.c (find_index): Made static. - -2000-02-08 Federico Mena Quintero - - * evolution-calendar.idl (CalObjInstance): New struct to wrap - instances of calendar objects for recurrencies and alarms. - (Cal::get_events_in_range): New method to get ocurring and - recurring events by time range. - - * cal-backend.c (cal_backend_get_events_in_range): New function to - get a list of event instances in a time range. - (string_from_ical_object): New internal function. - (cal_backend_get_object): Use string_from_ical_object() instead of - doing everything ourselves. - (cal_backend_get_events_in_range): New function to get a list of - the events that occur or recur in a specified time range. - - * cal-client.c (cal_client_get_events_in_range): Implemented - client-side function. - - * cal-util.h: - * cal-util.c: New files with utilities and types common to the - client and server parts. - (CalObjInstance): New structure to hold an instance of an actual - occurrence, recurrence, or alarm trigger of a calendar object. - (cal_obj_instance_list_free): New function to free a list of - calendar object instances. - - * cal.c (Cal_get_events_in_range): Implemented new method. - - * corba-cal.c (cal_repo_get_updated_objects): Free `str' with - free(), not g_free(), since calendar_get_as_vcal_string() uses - writeMemVObject(), which uses realloc(). Fixed in gnome-pim as - well. - -2000-02-04 Federico Mena Quintero - - * cal-backend.c (get_calendar_base_vobject): New function to - create the base VObject for a calendar. - (cal_backend_get_object): Create the base calendar and add the - sought object to it, then stringify it. - - * evolution-calendar.idl (Listener::obj_added - Listener::obj_changed): Now these pass in just the UIDs, not the - complete objects. - - * cal-listener.c (Listener_obj_added): Changed to pass in the uid, - not the object. - (Listener_obj_changed): Likewise. - - * cal-client.h (CalClientClass): Made the obj_added and - obj_changed signals take in the UIDs, not the full objects. - - * cal-client.c (obj_added_cb): Likewise. - (obj_changed_cb): Likewise. - -2000-02-04 Federico Mena Quintero - - * cal-backend.c (CalBackendPrivate): Renamed the event_hash field - to object_hash. Now we hash all the calendar's objects here based - on their UIDs. - (ensure_uid): New function to create UIDs for calendar objects - that don't have them. - (add_object): Ensure the object has an UID before inserting it in - the calendar. - (cal_backend_get_object): New function. - -2000-02-03 Federico Mena Quintero - - * evolution-calendar.idl (Cal): Added the get_object() method. - - * cal-client.c (cal_client_get_object): New function to get a - calendar object by its UID. - - * cal.c (Cal_get_object): Implemented. - - * cal-backend.c (cal_backend_get_object): New unfinished backend - function. We need some reorganizing of how the calendar objects - are stored. - -2000-02-02 Federico Mena Quintero - - * Makefile.am (gnomecal_SOURCES): Added the CORBA generated - sources. - -2000-02-01 Federico Mena Quintero - - * cal-client.c (cal_loaded): Handle the cal_loaded signal from the - listener. Store the calendar client interface object, and emit - our own cal_loaded signal. - (cal_client_load_calendar): Connect to the listener's signals. - (cal_client_class_init): Added the "obj_added", "obj_removed", - öbj_changed" signals. - (obj_added_cb): Handle the signal from the listener. - (obj_removed_cb): Likewise. - (obj_changed_cb): Likewise. - -2000-01-30 Federico Mena Quintero - - * Makefile.am (gnomecal_SOURCES): Added cal-client.[ch] and - cal-listener.[ch]. - -2000-01-30 Federico Mena Quintero - - * evolution-calendar.idl: Changed the namespace from - GNOME::Calendar to Evolution::Calendar. - (Listener::LoadStatus): Fixed SUCESSS -> SUCCESS typo. And I - never noticed it in the implementation. Ain't M-/ grand? - - * Makefile.am: Changed ocurrences of gnome-calendar.idl to - evolution-calendar.idl. - - * *.[ch]: Changed GNOME_Calendar_foo identifiers to - Evolution_Calendar_foo. - -2000-01-25 Federico Mena Quintero - - * cal-client.c cal-client.h: New files with the calendar client - object. - -2000-01-25 Federico Mena Quintero - - * cal-factory.c (CalFactory_load): Check that the listener is not - nil and emit and exception if it is. - - * gnome-calendar.idl (CalFactory::load CalFactory::create): Now - these raise the NilListener exception. - - * tlacuache.c (calendar_notify): Error stub for alarms. - (alarm_defaults): Stub array. - (debug_alarms): Stub variable. - (main): Initialize gnome-vfs. - -2000-01-24 Federico Mena Quintero - - * tlacuache.c: New main module for the Tlacuache personal calendar - server. - - * tlacuache.gnorba: New gnorba file for Tlacuache, the GNOME - personal calendar server. - - * Makefile.am: Added the stuff necessary to build Tlacuache. - - * cal.c (Cal_get_uri): Convert the URI to a string before - returning it. - - * cal-factory.c (CalFactory_create): Doh, this function is void. - - * job.c (job_add): Use g_idle_add(), not gtk_idle_add(). - -2000-01-24 Federico Mena Quintero - - * cal-backend.c (cal_backend_remove_cal): New function to remove a - calendar client interface object from a backend. - (cal_backend_load): Convert the URI to string and use - Parse_MIME_FromFileName(). The conversion is not very smart, - though. - - * cal-factory.c (load_backend): Moved most of the error handling - upstream to load_fn(). - (load_fn): Handle failure in case the backend could not be loaded. - (cal_factory_destroy): Free the backends and the backend hash - table. - (add_calendar_client): Implemented. We create a Cal client - interface object and attach it to the backend, and we notify the - listener. - -2000-01-22 Federico Mena Quintero - - * cal-factory.c (lookup_backend): Renamed from lookup_calendar(). - Also, return a backend instead of a Cal client object. - - * cal-backend.c (cal_backend_load): Take in a GnomeVFSURI, not a - string. - - * cal-listener.c (Listener_cal_loaded): Pass the load status to - the signal. - (cal_listener_destroy): Better error checking. - (cal_listener_new): Better error checking. - - * cal-listener.h (CalListenerLoadStatus): New enum for the load - status of a calendar. - (CalListenerClass): Added the status argument to the cal_loaded - signal. - - * gnome-calendar.idl (cal_loaded): Added a load status code. - - * cal-backend.h (CalBackendLoadStatus): Renamed from - CalBackendLoadResult. - -2000-01-18 Federico Mena Quintero - - * cal-backend.c cal-backend.h: Moved the calendar backend here. - This is the actual calendar-handling object. - (load_from_vobject): Moved over from calendar.c. Modified to use - a CalBackend instead of the old Calendar structure. - (add_object): Likewise. - - * cal.c: Now the Cal object is just a calendar client interface - object; we use it as a "viewport" onto a CalBackend. This also - lets us do correct resource management. - - * cal-common.h: New file with common forward declarations; we - can't have circular dependencies between headers. - -2000-01-18 Federico Mena Quintero - - * cal-factory.c (cal_factory_load): Queue a load job. - (load_fn): Load job handler. Lookup the calendar by URI, load it - if it is not loaded, or just report it to the new listener if it is. - - * job.c job.h: New files with a simple job queue manager. - - * gnome-calendar.idl (Listener::cal_loaded): Do not return the - whole calendar object string. The client will be able to query - the calendar for the events it needs. - - * cal-listener.c (Listener_cal_loaded): Ref the calendar GNOME - object. We unref it when the listener is destroyed. - -2000-01-17 Federico Mena Quintero - - The files from the gncal directory of the gnome-pim module on CVS - were moved here, to evolution/calendar, in preparation for the - Evolution work. The calendar is being split into a model/view - architecture. The model is a personal calendar server (PAS): it - provides storage, notification, and event generation; the - views/controllers are the calendar user agents and things like - Pilot synchronizers. - -2000-01-11 Federico Mena Quintero - - * cal.c: Removed the CORBA listener methods, adjusted for the new - IDL. - - * cal-listener.c (cal_listener_init): Create the private - structure. In it we hold a reference to the calendar the listener - is watching. - (cal_listener_destroy): Destroy the private structure and unref - the calendar. - (Listener_cal_loaded): Stuff the calendar into our private data. - (Listener_obj_added): Adjusted for new IDL. - (Listener_obj_removed): Likewise. - - * gnome-calendar.idl: New IDL for the personal calendar server. - - * cal.h cal.c: New files with the calendar object. - - * cal-listener.h cal-listener.c: New files with the calendar - listener object. - - * cal-factory.h cal-factory.c: New files with the calendar factory - object. - -2000-01-09 Eskil Heyn Olsen - - * Makefile.am: Changes to remove todo capplet stuff from distro. - -2000-01-08 Vadim Strizhevsky - - * calendar-conduit-control-applet.c: Added pilotID argument to - gpilotd_conduit_mgmt_new. - - -2000-01-05 Eskil Heyn Olsen - - * GnomeCal.idl: Added an argument to get_number_of_objects, so you - can choose which state the object should have - (any/new/modified/...). Will also add one to choose type - (event/journal etc). - - * corba-cal.c (cal_repo_get_number_of_objects): Implemented the - new version of get_number_of_objects. - - * calendar-conduit.c (pre_sync): Calls various - gnome_pilot_conduit_standard_abs_set_num_yadayda to get progress bars. - -2000-01-04 Eskil Heyn Olsen - - * calendar-conduit.c (start_calendar_server): Let's not call - g_error, but g_warning instead. - (pre_sync): Get record numbers info, total, new, deleted etc, and - tell gpilotd. - -1999-12-31 Eskil Heyn Olsen - - * eventedit.c (ee_store_recur_end_to_ical): Adds 86400 secs (1 - day) to the date chooses by the user. This ensures the recurrence - also occurs on that date. - (ee_rp_init_ending_date): And subtracts 86400 secs when about to - redisplay the box. - - * calendar.h: Added an argument to calendar_new, to enable certain - features, such as initing alarms or nor. - - * calendar.c (calendar_new): Implemented support for the - CALENDAR_INIT_ALARMS option to calendar_new. - - * corba-cal.c (cal_repo_get_updated_objects): Added - CALENDAR_INIT_ALARMS to calendar_new calls. - - * main.c: Added CALENDAR_INIT_ALARMS to calendar_new calls. This - should probably be CALENDAR_INIT_NIL, but I'm not sure, guess - steintr should check it. - - * gnome-cal.c: Added CALENDAR_INIT_ALARMS to calendar_new calls. - - * calendar-pilot-sync.c: Added CALENDAR_INIT_NIL to calendar_new calls. - -1999-12-10 Russell Steinthal - - * eventedit.c (ee_create_ae): Fix sensitivity bug when used to - create default alarm box (widgets in that box should always be - sensitive, even if the enabled checkbutton is not set) - -1999-12-08 Eskil Heyn Olsen - - * calendar-conduit-control-applet.c (setSettings): Capplets now - sets first_sync on enable, this should make the conduit copy old - entries from the pilot to gnomecal. - -1999-12-07 Eskil Heyn Olsen - - * calendar-conduit.c (pre_sync): Check if local store is - empty. If, force slow sync. - - * GnomeCal.idl (GNOME): Added get_number_of_objects. - - * corba-cal.c (cal_repo_get_number_of_objects): implemented the - get_number_of_objects. - - * calendar-conduit-control-applet.c (setStateCfg): Fixed bug that - caused the capplet to always set the sync action to Disable upon start. - -1999-12-05 Eskil Heyn Olsen - - * Makefile.am (Conduits_second_DATA): Also install .desktop files - for conduit capplets in the gnome/apps menu dir. - -1999-12-04 Eskil Heyn Olsen - - * Makefile.am (EXTRA_DIST): Added .desktop files to EXTRA_DIST. - -1999-10-12 Clifford R. Conover - - * gncal-todo.c Todo List improvements. - - Cleaned up todo item highlighting, added support for highlighting - events due today, and events not due yet. Colors are configurable - on the Colors Tab of the properties window. - - Renamed Frame in Properties window to Colors rather then Month - Colors since we are now asking for Todo item colors. - - Added ability to display time until todo item is due in list, it - automatically selects the best denomination of time (up to weeks) - and down to seconds to display. This should be made configurable - in a future version. - - Changed Todo dialog to ask for time that event is due. This - allows more accurate tracking of then the item is due, before the - dialog was only asking for the date of the todo item. - -1999-12-03 Eskil Heyn Olsen - - * calendar-conduit.c: undef DEBUG_CALCONDUT, suppresses debug output. - -1999-12-02 Russell Steinthal - - * alarm.c: Enhanced debug support: can be toggled on and off by - SIGUSR1, reports alarms which could not be added - - * gnome-cal.c, main.[ch], prop.c: Add snooze capability for audio - and display alarms. Snooze interval can be configured in the - Properties box. - -1999-11-30 Eskil Heyn Olsen - - * calendar-conduit.c (compare): Fixed compare bug. Also neated up - some of the if's in set_status. - -1999-11-22 Russell Steinthal - - * Merged todo list coloring patch from stable - * Added myself to AUTHORS, about box (per Miguel) - -1999-11-22 Eskil Heyn Olsen - - * calendar-conduit.c (pre_sync): Writes some warning - messages when pre_sync fails. - -1999-11-14 Eskil Heyn Olsen - - * Makefile.am: Stupid misplaced endif cause gncal to depend on an - install gnome-pilot... fixed... sorry. - -1999-11-12 Eskil Heyn Olsen - - * Makefile.am (extra_pilot_bins): Fixed the if then else problem, - using solution suggested by James Henstridge, appears to be caused - by a (by now fixed) bug in my automake. - -1999-11-12 Russell Steinthal - - * prop.c: Config code for timeout, make Alarms property page use a - vbox instead of an hbox so that the propbox stays a reasonable width. - - * gnome-cal.c, main.[ch]: Add timeout for audio alarms, code to load - from config file - - * eventedit.c: Give some static functions external linkage so they - can be used elsewhere (make_spin_button); add some prototypes to - appease gcc. - -1999-11-11 Russell Steinthal - - * calendar.c (calendar_day_change): Add call to - calendar_init_alarms() to schedule another day change alarm. - -1999-11-09 Eskil Heyn Olsen - - * calendar-conduit.c: Enabled debug output. Sets a g_log_domain, - now version 0.8.5. Consistent use of GSList/GList. Implemented - compare, default uses one that compares the contents of a struct - Appointment, but also has #ifdeffed code that does a field level - comparison, not complete, but perhaps educational. - - * Makefile.am (#todo_conduit_control_applet_SOURCES): Fixed an - unwanted conditional on libcalendar_conduit_la_LDFLAGS - -1999-11-05 Eskil Heyn Olsen - - * calendar-conduit-control-applet.c (readStateCfg): Commented the - code out, thus the capplet works again. - -1999-11-04 Eskil Olsen - - * Makefile.am: Uses the PISOCK_LIBDIR, for people with odd install - dirs for their pilot-link. Also install a pretty icon for the - calendar-conduit. - - * calendar-conduit-control-applet.c: Modfied the - try/revert/ok/cancel scheme to be more intuitive, also uses a - GtkOptionMenu for the possible sync methods. - - * calendar-conduit-control-applet.desktop: use the nice icon... - - * calendar-conduit.c: Ack, had to define debug_alarms and - alarm_default, otherwise they are undefined. Is gncal code messy - or is this considered a way of configuring the cal engine ? - Implemented delete_all syncabs methods. - - * calendar-pilot-sync.c: also had to declare debug_alarms and - alarm_defaults, just as ugly. - -1999-11-02 Russell Steinthal - - * prop.c: Add new alarm page to properties box - - * prop.c, calobj.c, main.[ch] eventedit.c: New support for default - alarms, configurable in the properties box. - - * gnome-cal.c, prop.c, main.[ch]: add option to beep on Display - alarms - -1999-10-23 Russell Steinthal - - * calendar.c (calendar_new): Correctly initialize calendar_day_end - and calendar_day_begin *before* installing day-change alarm. - -1999-10-21 Russell Steinthal - - * alarm.c, main.c: Added alarm debugging code - - * main.c (open_ok): Show an error box if the user tries to open a - non-existent file; fixes bug #1818 - -1999-10-19 Russell Steinthal - - * gnome-cal.c (calendar_notify): Fix typos which were causing - invalid times in audio notification dialogs; fixes Bug #2561 - -1999-10-18 Russell Steinthal - - * gncal-day-panel.c (gncal_day_panel_new): Placed the various - elements of the day view in paned windows so that the user can - adjust the relative sizes of the daily schedule, monthly calendar, - and to-do list. - -1999-10-18 Martin Norbäck - - * gncal.desktop: Added swedish translation - -1999-10-13 Eskil Olsen - - * Makefile.am: Hopefully the fixes the much-hated - gnome-pilot dependency. - -1999-10-07 Eskil Olsen - - * calendar.c (calendar_object_changed): moved the pilot_status = - MOD up, so even a CHANGE_SUMMARY will set the modified flag. - - * calendar-conduit.c: more _free calls, vamped the noise on output. - -1999-10-06 Eskil Olsen - - * *conduit*[ch]: checks return values from gpilotd_init/connect. - - * calender.c (vcalendar_create_from_calendar): removed a set - of cleanVObject cleanStrTbl, since the freed memory that the - function returned. - -1999-09-27 Timur Bakeyev - - * timeutil.c (time_from_isodate): Use tm.gmtoff or timezone to get - correct offset from UTC, according to HAVE_TM_GMTOFF or HAVE_TIMEZONE. - See also 1999-07-19 Matt Martin - -1999-09-27 Miguel de Icaza - - * month-view.c (add_event): ditto - (mark_current_day): ditto - (month_view_set): ditto - - * goto.c (goto_dialog): ditto. - - * gnome-month-item.c (gnome_month_item_init): ditto. - - * gncal-day-panel.c (gncal_day_panel_new): ditto. - - * getdate.c (RelativeDate): ditto. - - * eventedit.c (set_all_day): ditto. - (ee_rp_init_rule): ditto. - - * calendar.c (vcalendar_create_from_calendar): ditto. - - * calendar-conduit.c (update_record): ditto. - - * calobj.c (ical_object_generate_events): Get rid of pointers to - values returned from localtime, as it uses a static buffer. - -1999-09-26 Eskil Olsen - - * corba-cal.c: the g_free that was commented out since glib said - was a duplicate free, was supposed to be a free. - - * GnomeCal.idl/corba-cal.c: added a get_object_id_list and a - get_objects_by_id_list. Latter is not done. - - * calendar-conduit.c: rewrote the way the conduit iterates over - records. It no longers fetches all entries (since that didn't work - with more then 285 entries. It now fetches the id list, and gets - each record. (will be using get_objects_by_id_list to get records - in amounts of 10 or so later, to reduce amount of corba calls). - - * calendar-conduit.c: now sets alarm parameters when transferring - from gnomecal to pilot. - -1999-09-23 Eskil Olsen - - * calendar-conduit.c: better merge of summary/description - when doing ical_from_remote (update_record), also handles - import from gnomecal to pilot better, and on both ways, repeat - events are much better now. - -1999-09-22 Eskil Olsen - - * corba-cal.c: commented out a g_free that glib reported - as being a duplicate free. - * calendar-conduit.c: got gnomecal->pilot up and runnning. - -1999-02-06 Lauris Kaplinski - - * gncal.desktop: Added Estonian translations. - -1999-09-14 Federico Mena Quintero - - * gncal-full-day.c (child_popup_menu): Set the data pointers for - all the items. - -1999-09-14 Kjartan Maraas - - * doc/C/gnomecal.sgml: Merge from gnome-pim-1-0. Synced with newest - user-guide. - -1999-09-01 Miguel de Icaza - - * eventedit.c (ee_create_buttons): Make the OK button the default - button per Russell's suggestion. - -1999-08-30 Miguel de Icaza - - * calendar.c (calendar_object_changed): Modify the - object->last_mod field. - (calendar_add_object): Ditto. - - Closes bug #676 - - * main.c (save_calendar_cmd): Fix problem in which we warned the - user about the calendar being modified the first time the calendar - was used. - -1999-08-22 Tomas Ogren - - * gnomecal.gnorba: "GenericFactoy" is wrong... - -1999-08-15 Miguel de Icaza - - * calobj.c (ical_gen_uid): Fix the hostname part. - -1999-08-07 Peter Teichman - - * calendar-pilot-sync.c (sync_pilot): sync correctly for objects - created on the pilot, but not dirty (because they have been synced - with some other program in the past) - -1999-07-30 Miguel de Icaza - - * month-view.c (month_view_init): Release points here. - -1999-08-02 Peter Teichman - - * Makefile.am (libcalendar_conduit_la_LDFLAGS): - libcalendar_conduit now installs - - * calendar-pilot-sync.c (sync_pilot): do deletion of appointments - correctly, when they are deleted on the pilot - (conduit_free_Appointment): protect against double-freeing parts - of the Appointment structure - (update_record): all-day events from the pilot are handled a bit - more reasonably - -1999-08-01 Peter Teichman - - * calendar-pilot-sync.c (sync_object_to_pilot): The multi-day - appointment corruption bug is dead. Whoo! - -1999-07-31 Peter Teichman - - * Makefile.am: fixed this up slightly with respect to pilot conduits - -1999-07-30 Jonathan Blandford - - * Makefile.am (libcalendar_conduit_la_LIBADD): More autoconf-stuff - -1999-07-29 Jonathan Blandford - - * gnome-cal.c (setup_widgets): Add scrolling to the yearview. - -1999-07-28 Miguel de Icaza - - * calendar-pilot-sync.c: (sync_object_to_pilot): If the enddate is - not set, set the repeatForever to 1. This fixes all of the - birthdays problems I had. - - Make the code not take arguments - (sync_cal_to_pilot): Nice event update information - - * calendar.c (calendar_new): Add Event UID hash table. - (calendar_add_object): Add events to the hash table here. - (calendar_remove_object): Remove events here. - (calendar_object_find_event): Use the hash table here. - - * main.c (save_calendar_cmd): The object is already destroyed by - gnome_dialog_run. - - * calendar-pilot-sync.c (sync_object_to_pilot): Do not turn - archived bit on. - - * calobj.c (ical_gen_uid): Use the hostname, not the domain name. - (ical_gen_uid): Add a serial number. Isodates can be small. - - * corba-cal.c (cal_repo_update_pilot_id): New method to update the - pilot status. - (cal_repo_get_updated_objects): New method. Returns a list of - modified and not-sycned objects - - * calendar-pilot-sync.c (sync_cal_to_pilot): New function to sync - from the GnomeCalendar to the pilot. - (sync_object_to_pilot): Sync a single event to the pilot. - (try_alarm): Alarm syncing code. - -1999-07-27 Miguel de Icaza - - * calendar-pilot-sync.c: New file. Implements PalmPilot - syncronization with the Gnome Calendar. - - * calobj.c (ical_object_new_from_string): New function. Creates - an iCalObject from a vCalendar string that is supposed to contain - only one vEvent. - - * calendar.c: - (calendar_save): Split this routine in two. - - * gnome-cal.c (gnome_calendar_new): Create the corba server here. - - * main.c: Include gnorba.h, and corba-cal-factory.h here - (close_cmd): Kill the calendar server on shutdown. - - * calobj.c (load_recur_yearly_day): Added a fixme comment. WE - need to handle intervals in the years. - - * calendar.c (calendar_object_find_in_list, calendar_object_find, - calendar_object_find_todo, calendar_object_find_event): New - functions for looking up information. - - * main.c (gnome_calendar_locate): New function. - - * corba-cal.c (calendar_create_object): New file. Implements the - corba server. - - * calendar.c (calendar_object_changed): Flag pilot-status as changed. - - * calobj.c (ical_object_to_vobject): Save pilot information for syncing. - (ical_object_create_from_vobject): Load syncing information for - pilot. Do it in a way compatible with KOrganizer. - -1999-07-26 Miguel de Icaza - - * calobj.c (ical_object_create_from_vobject): Generate unique IDs - on Vevents we load that lack it. WE need this for the old - gnome calendar generated files (ie, before now :-). - - Required to sync with the Palm - -1999-07-26 Miguel de Icaza - - * calobj.c (ical_object_create_from_vobject): Generate unique IDs - on Vevents we load that lack it. WE need this for the old - gnome calendar generated files (ie, before now :-). - - Required to sync with the Palm - -1999-07-19 Matt Martin - - * timeutil.c (time_from_isodate): Handle the 'Z' parameter to the - ISO date format to convert from GMT time. - -1999-07-17 Nat Friedman - - * calendar.c (calendar_add_object): Copy the new UID into the - iCalObject structure. - -1999-07-16 Miguel de Icaza - - * gnome-month-item.c (gnome_month_item_set_arg): Merge fix from - gnome-pim-1-0: Fixed cut&paste bug for day fontsets. - -1999-07-14 Miguel de Icaza - - * calobj.c (ical_gen_uid): Returns a UID. - (ical_object_new): Use a UID when creating an event. Should get - syncing done easier. - -1999-07-14 Nicholas J Kreucher - - * calobj.c (skip_numbers): Actually skip over the numbers. - (ical_object_to_vobject): Test the proper variable for storing the - proper information. - -1999-07-14 Jean-Noel Guiheneuf - - * timeutil.c (time_add_month): Fixed the problem with next month - going from a 31-day to a 30-day by adjusting the date to the - closest day at the end of the month. - -1999-06-07 Mike McEwan - - * timeutil.c (time_add_month): Tell ktime' that we don't know - about daylight saving time so that it does *not* make adjustments - when we traverse a DST boundary. - (time_year_begin): ditto. - (time_year_end): ditto. - (time_month_begin): ditto. - (time_month_end): ditto. - -1999-06-16 Anders Carlsson - - * main.c (new_calendar): Realize the toplevel widget when - --hidden is passed to gnomecal. This fixes a segfault. - -1999-06-04 Robert Brady - - * gnome-cal.h, gnome-cal.c: Fix abort() problem with the year view. - (Bug #1367). Thanks to Owen Cliffe for - helping track it down. - -1999-06-03 Miguel de Icaza - - * calobj.c (daynumberlist): One line bug fix from Sergey I Panov. - -1999-06-02 Miguel de Icaza - - * view-utils.c (nicetime): Use %H instead of %k, as %k is a GNU - extension, not available in other systems. - -1999-06-01 Miguel de Icaza - - * calobj.c (daynumberlist): Work around broken software that - writes a broken month-of-day as "zero". Use the dtstart date for - this on this event. - -1999-05-28 Miguel de Icaza - - * Makefile.am (install-data-local): help files be gone. They are - now installed from the Docbook stuff. - -1999-05-26 Russell Steinthal - - * gncal-todo.c main.c main.h prop.c: Added support for priorities - for todo items. Doesn't do much, but you can set them and sort by - them. (Use the properties box to enable them; should they be on - by default?) - -1999-05-25 Miguel de Icaza - - * main.c (parse_an_arg): Added missing break here. It was causing - core dumps when invoked with --userfile. - - * gnome-cal.c (gnome_calendar_set_view): Add some assertions here, - to pin point the bug reported on gnome-list. - - * calobj.c (load_recurrence): Make intervals always exist. a 0 - interval is wrong. - -1999-05-25 Federico Mena Quintero - - * year-view.c: Removed unused macro CALENDAR_HEIGHT. - -1999-05-25 Federico Mena Quintero - - * year-view.c (idle_handler): Set the canvas scroll region here, - not in size_allocate(). Also, use the correct width and height - based on the allocation and the precomputed minimum width/height - values. - - * gnome-cal.c (setup_widgets): Set the scrollbar policy of the - scrolled window. - - * main.c (setup_appbar): Use the correct type for the appbar. - - * gncal-day-view.c: Removed unused function switch_to_day(). - - * gncal-day-panel.c (calendar_day_selected): Removed unused variable. - -1999-05-25 Nat Friedman - - * doc/C/gnomecal.sgml: Fixed a typo. - - * gnome-cal.c (setup_widgets): Added a scrolled window widget into - which the year view is placed. - - * year-view.c (CALENDAR_HEIGHT): The height of the total year view - inside the scrolled window. - (idle_handler): Set the height of the year view to - CALENDAR_HEIGHT. - (year_view_size_allocate): Set the scroll region of the year view - canvas to allocation->width, CALENDAR_HEIGHT. - -1999-04-25 Miguel de Icaza - - * main.c (dump_todo): Add --todo flag to dump the todo contents. - -1999-04-19 Miguel de Icaza - - * gncal-todo.c (add_activated): Use same hack used in edit_activated - -1999-04-16 Miguel de Icaza - - * gncal-todo.c (edit_activated): Kill all grabs from the CList - before running the new dialog box. - - This fixes the problem of button-3/Edit on the todo item blocking - the GUI (actually, the main window responds, but not the todo - window). - -1999-04-08 Miguel de Icaza - - * gncal-todo.c (gncal_todo_init): Make sure we can get events for - button3. The code for the nice popup menu was there but was not - getting invoked. - -1999-04-01 Steve Murphy - - * calobj.c (weekdaynum): Added this routine so Monthly recurrences - use the weekday field as a simple integer for a single weekday. - - * calobj.c (load_recur_monthly_pos): Call weekdaynum instead of - weekdaylist. The interface only lets the user input a single value - anyway. - - * calobj.c (ical_object_to_vobject): instead of code to output day - names from a bit array, use instead the value as an int and output - a single dayname. - - * calobj.c (ical_object_generate_events): first_week_day gets the - day int instead of the first entry in the bit field. I inserted a - fair chunk of code to avoid calling generate if the day is out of - range for a month. It may be unneccessary, because mktime will - turn the extra days into a valid date the next month. But not all - mktimes are equal, I fear. - - * eventedit.c (ee_store_recur_rule_to_ical): For case 3, - (Monthly), I added code to set the interval slot of the recur - struct; without this value, selecting a monthly recursing, by - date, would lead to an infinite loop broken only by a failure to - alloc more memory. Also, in the "by position" case, both - u.month_pos and u.month_day were being assigned values. This is a - mistake, as they are both part of an union, and the same - thing. The weekday field should get the recur_rr_month_weekday - value. - - * eventedit.c (ee_rp_init_rule): set default day from the weekday - field instead of the u.month_day field, which is really the - month_pos value. - - * gnome-cal.c (gnome_calendar_tag_calendar): Month days start with - 1, not 0; thus, setting tm.tm_mday = 0, and then calling mktime - will generate a time corresponding to the end of the previous - month, which may have a mday anywhere from 28 to 31. The end time - just adds 1 to the month, so your end time may not cover the last - few days of this month, depending on what the biggest mday of last - month was. I changed it so tm_mday is set to 1 instead. - -1999-03-30 Federico Mena Quintero - - * gncal-todo.c (convert_time_t_to_char): Made static. Make it use - the full year format for strftime(). - -1999-03-27 Nuno Ferreira - - * calobj.c: Include So that strings get translated. - -1999-03-26 Tomas Ogren - - * prop.c (build_hours_menu): Made it respect 12/24h settings.. - Doesn't show until next time you open the dialog.. yet.. - -1999-03-24 Tomas Ogren - - * gncal-week-view.c (gncal_week_view_set): Did some i18n work - * eventedit.c (get_exception_string): Did some i18n work - -1999-03-24 Tomas Ogren - - * gncal-todo.c (gncal_todo_init): Made clist titles i18n:able - * main.c (poptOption): Added which views that are possible for - --view in the --help text (closes #367) - * main.c (dump_events): Added (short) month to the strftime and made - the strings i18n:able - -1999-03-23 Tomas Ogren - - * gncal/calobj.c: Added 2 paranthesis.. - "foobar = d / 60*60" is _NOT_ the same as "foobar = d / (60*60)" - which caused heavy alarm-corruption with alarms between 2 hrs and - 2 days. - -1999-03-23 Nat Friedman - - * eventedit.c (ee_store_recur_rule_to_ical): Set the - recur->interval to the value of the recur_rr_month_period spin - button if the event is being set "by day." This closes bug #675 - as reported by bagfors@hpc2n.umu.se. Thanks for the report! - -1999-03-10 Clifford R. Conover - - * gncal-todo.c (simple_todo_editor): Add support for Due Date when - adding a TODO item here. - (column_resized): New function - (init_column_sorting): New function. - (todo_click_column): New function. - (convert_time_t_to_char, make_overdue_todo_style): New functions. - - * gnome-cal.c (gnome_calendar_todo_properties_changed): New - function used to update the TODO when the properties have been - chagned for it. - - * prop.c (prop_apply_todo): Apply TODO properties. - - * gncal-day-panel.c (todo_list_properties_changed): Update the - TODO display here. - - * eventedit.c (date_edit_new): Made public - -1999-03-10 Craig A Soules (soules+@andrew.cmu.edu) - - * timeutil.c, calendar.c, calobj.c, gncal-day-panel.c: Add support - for daylight time savings. - -1999-02-28 Martin Baulig - - * gncal-full-day.c (recompute_motion): For DRAG_MOVE, DRAG_SIZE_TOP - and DRAG_SIZE_BOTTOM: call child_focus_out () if the child currently - has the focus. - -1999-02-27 Changwoo Ryu - - * quick-view.c (QUICK_VIEW_FONTSET): Added Korean font to the - fontset string. - * mark.h (*_FONTSET): Likewise. - -1999-02-23 Miguel de Icaza - - * calobj.c (ical_object_to_vobject): Save the owner/organizer of - the event. - (ical_object_create_from_vobject): Load the owner/organizer of the event. - - * gncal-full-day.c (delete_occurance): Assign child to data (fixes - crash on "delete this occurrance"). - -1999-02-22 Timur Bakeyev - - * calendar.c: According to configured values, use either tm.tm_zone - or tzname. In last case, also declare it extern. - - * prop.c: langinfo.h not available everywhere. Wrapped. BTW, works - fine without it. - -1999-02-20 Tomas Ogren - - * main.c (init_username): Made use of g_get_{user,real}_name() instead - of our own home-brew... - -1999-02-17 Sergey Panov - - * gnome-month-item.c,gnome-month-item.h,goto.c,mark.h, - month-view.c,prop.c,quick-view.c,year-view.c: will define - fonts via fontset. Friendlier to locales that use iso8859-[^1] - and koi8-r encodings. Does not solve problem for Asian languiges - --- better solution is needed (e.g. standart GNOME fontstyles - defined in gtkrc). - -1999-02-16 Sergey Panov - - * main.c: Use N_() macro for color settings labels in - color_props structure. - -1999-02-15 Federico Mena Quintero - - * goto.c (goto_dialog): Indentation fixes. - -1999-02-15 Tomas Ogren - - * goto.c: Made a private copy of what localtime() returns, to be able - to keep the data after more calls to localtime(). - -1999-02-11 Miguel de Icaza - - * main.c (save_default_calendar): New function. Saves the - calendar if it is the user's default calendar - - * gncal-full-day.c (unrecur_appointment): - * gncal-day-panel.c (day_view_range_activated): - * eventedit.c (ee_ok): - * gncal-todo.c (ok_button): Added autosave for the default - calendar. - -1999-02-09 Tomas Ogren - - * main.c: Removed the gtk_widget_realize call. - -1999-02-06 Changwoo Ryu - - * gncal.desktop: Added Korean translations. - -1999-02-04 Federico Mena Quintero - - * eventedit.c (date_edit_new): New convenience function to create - a properly-configured date editor widget. - -1999-02-03 Federico Mena Quintero - - * gncal-week-view.c (gncal_week_view_new): Make the calendar start - weeks on Monday if appropriate. - (gncal_week_view_time_format_changed): New function to notify the - week view that the time format has changed. - - * gncal-day-panel.c (gncal_day_panel_new): Make the calendar start - weeks on Monday if appropriate. - (gncal_day_panel_time_format_changed): New function to notify the - day panel that the time format has changed. - - * gnome-cal.c (gnome_calendar_time_format_changed): Tell the day - and week views that the time format has changed. - -1999-02-01 Federico Mena Quintero - - * eventedit.c (event_editor_init): Set the title of the event - editor window. - -1999-01-31 Federico Mena Quintero - - * gncal-day-view.c (gncal_day_view_expose): Do not remove the - clipping rectangle here. - - * view-utils.c (view_utils_draw_events): Remove the clipping - rectangle here, since the user of this function should not know - about it. - -1999-01-30 Miguel de Icaza - - * view-utils.c (view_utils_draw_events): Improve this draw - routine. Now it can split the text in lines and fit as many - events as possible. - (nicetime): Return strings without spaces at the beginning. - - * gncal-day-view.c (gncal_day_view_expose): Move clip-clear - operation here. - -1999-01-29 Jason Tackaberry - - * gncal-full-day.c (child_popup_menu): if the user clicks on an - event that is an occurance, the menu will allow the user to delete - all occurances of this event, or just the selected occurance. - (delete_occurance): added. - - * eventedit.c (append_exception): force the clist to select the - new exception. (fixes segfault) - (delete_exception): if the last exception in the clist is deleted, - move the selection index up. (fixes segfault) - -1999-01-28 Miguel de Icaza - - * main.c (parse_an_arg): Add --hidden key to hide the calendar at - startup. Only works with GNOME window managers though :-( - - * calendar.c (calendar_day_change): Reschedule alarms for the new day. - - (calendar_init_alarms): Schedule an alarm for midnight to change - the calendar_day_begin/calendar_day_end. - - * alarm.c (alarm_ready): If we reschedule, there is no need to - activate any pending alarms. - -1999-01-28 Federico Mena Quintero - - * gncal-full-day.c (child_new): Insert the summary text here. - (child_focus_in): No need to raise the window, since we have - Spiffo(tm) layout code. Boy, this is old code. - (gncal_full_day_focus_child): Now that GtkText works better, we - can avoid synthesizing a click which was causing grief, anyway. - (child_button_press): Grab the focus before popping up the menu. - - * layout.c (find_index): Added a sanity check. - - * gncal-full-day.c (child_destroy): Unmap and unrealize the child - before unparenting/destroying it. - (child_unrealize): Unrealize the widget. What was I thinking? - (child_new): Save the focus_out_event signal connection id in - Child structure (in a new field). - (child_destroy): Disconnect from the focus_out_event signal, since - we don't want to get such an event when the widget is destroyed. - (gncal_full_day_destroy): Destroy the children properly; it was - leaking memory. - -1999-01-27 Miguel de Icaza - - * main.c (save_calendar_cmd): Warn if the calendar file has - changed. - - * calendar.c (calendar_load, calendar_save): Keep track of the - modification time for the calendar file. - -1999-01-20 Nat Friedman - - * gncal-full-day.c (gncal_full_day_key_press): Only trap printable - characters such that hotkeys work. - (UNSELECT_TIMEOUT): Changed to 0. Much saner behavior. - - * prop.c (properties): Connect gnome_help_pbox_display to the - GnomePropertyBox help button. - -1999-01-19 Federico Mena Quintero - - * quick-view.c (quick_view_do_popup): Do not grab the mouse here - (it was being grabbed incorrectly, anyways). - (quick_view_map_event): Grab the mouse when the window is mapped. - This avoids the ugly "while (xGrabPointer () != Success)" hack. - (quick_view_button_release): Handle button releases here. - -1999-01-19 Tomas Ogren - - * main.c: do gtk_widget_realize on the toplevel window.. - -1999-01-13 Federico Mena Quintero - - * gncal-day-panel.c (gncal_day_panel_new): Make the little - calendar start up with the correct date. - - * gncal-week-view.c (gncal_week_view_set): Add the month to the - date range display label. - -1999-01-08 Nat Friedman - - * main.c: Converted some more stuff to use the standards. - -1999-01-08 Nat Friedman - - * main.c (setup_appbar): New function to create the status bar. - (setup_menu): Install menu hints. - - Menu items updated to match the standards. New Settings menu - created. - -1998-12-30 Jeff Garzik - - * gncal/calendar.c, gncal/gnome-cal.c, gncal/main.c, - gncal/quick-view.c: - s/g_copy_strings/g_strconcat/ - -1998-12-16 Miguel de Icaza - - Rewrote the old and broken alarm system. It never actually - worked properly. Now it works properly, and I figured a nice way - to get the Audio alarm do something nicer (it is now like an alarm - clock :-). - - * gnome-cal.c (calendar_notify): Now we take a CalendarAlarm to - actually distinguish which alarm was triggered. - - * alarm.c (alarm_ready): The code was only activating the first - alarm. Reschedule the timer upon delivery of an alarm. - -1998-12-14 Federico Mena Quintero - - * year-view.c (idle_handler): Use the allocation size instead of - the old fields in the canvas structure. - - * goto.c (create_days): Use gtk_widget_set_usize() instead of - gnome_canvas_set_size(). - * quick-view.c (setup_event_list): Likewise. - -1998-12-09 Miguel de Icaza - - * gncal-todo.c (simple_todo_editor): Use gnome_dialog_set_parent. - * goto.c (goto_dialog): ditto - * prop.c (properties): ditto. - -1998-11-23 Miguel de Icaza - - * eventedit.c (ee_rp_init_exceptions): Update GtkClist usage. - -1998-11-23 Andrew T. Veliath - - * gncal-day-panel.c (gncal_day_panel_new): Use - gtk_scrolled_window_add_with_viewport instead of - gtk_container_add (gtk changes). - -1998-11-23 Herbert V. Riedel - - * eventedit.c: use GPOINTER_TO_INT - - * gncal-todo.c: same. - -1998-11-22 Matthew Wilson - - * main.c: Fixed the popt event parsing callback to have the - correct number of arguments. This stops it from segfaulting. - -1998-11-16 Federico Mena Quintero - - * eventedit.c (ee_classification_widgets): Doh. Fixed stupid bug - where the classification buttons were not being set correctly. - (ee_store_general_values_to_ical): Take into account the fact that - radio group lists are stored in reverse order of insertion. - - * gncal-todo.c (gncal_todo_init): Use a scrolled window to put the - clist into. - -1998-11-11 Miguel de Icaza - - * calendar.c (calendar_save): Backup the old file before saving - the caledar. - -1998-11-06 Miguel de Icaza - - * calobj.c: Add ctype.h - -1998-10-31 Federico Mena Quintero - - * gnome-cal.c (gnome_calendar_direction): Add the offset from the - beginning of the current time unit (day/month/etc), otherwise it - does not work right, for example, you are on the 31st day of a - month and the next month is a 30-day one and you jump to the next - month. - -1998-10-16 Federico Mena Quintero - - * month-view.c: Changed a lot of stuff not to use the layout code - -- the month view's days are too small to display layout - usefully. Now they display a little list of the events in each - day. We also have a popup menu for the days in the month view. - - * calendar.c (calendar_get_objects_in_range): Reverse the list so - that it is returned in increasing order. - - * eventedit.c (event_editor_new_whole_day): New public function to - create an event for the complete span of day_begin to day_end. - - * year-view.c (new_appointment): Use event_editor_new_whole_day(). - - * year-view.c (yv_popup_menu): Mark strings for i18n. - -1998-10-12 Ji Lee - - * eventedit.c (ee_store_recur_rule_to_ical): The interval was - never being loaded from the spin button. - -1998-10-09 Federico Mena Quintero - - * month-view.c (month_view_update): Create a list of children and - lay them out nicely. Lots of functions added for this purpose. - (adjust_segment): Main event segment adjustment routine. - (adjust_children): Adjusts all the children in the month view. - (child_create_segments): Creates the segments for a particular event. - (layout_children): Uses the generic layout engine to organize the children. - -1998-10-08 Federico Mena Quintero - - * gncal-todo.c (clist_row_selected): Set the sensitivity of the - edit/delete buttons. - (gncal_todo_update): Likewise. Thanks to Dirk Luetjens for the - bug report. - - * layout.c: Do some cleanup; now we pass a struct with the layout - algorithm's state instead of passing a trillion parameters around. - - * gncal-full-day.c (layout_children): Use the new generic layout - engine. - (child_compare): Sort keys are start time then end time, not just - start time. This produces somewhat nicer results for the layout - algorithm. - - The new layout code uses a partition of the time range occupied by - the events, rather than using a fixed time granularity. This is - better since the different parts of the program that use the - layout module will have different semantics regarding snapping the - event bounds to a fixed "time grid". - -1998-10-07 Federico Mena Quintero - - * layout.[ch]: New files that abstract the event layout code from - gncal-full-day.c into something useful for other parts of the - program. Now all event layout is done here. - - * Makefile.am (gnomecal_SOURCES): Added layout.[ch] to the list of - sources. - -1998-10-07 Carsten Schaar - - * main.c (main): Replaced the 'gnome_client_new_default' call with - 'gnome_master_client'. - -1998-10-02 Federico Mena Quintero - - * timeutil.c (time_day_begin): Changed name from - time_start_of_day() to be consistent with the other begin/end functions. - (time_day_end): Likewise. - - * calobj.c (ical_object_get_first_weekday): New public function to - get the first toggled day in a weekday mask. Since we do not - support multiple weekdays in a monthly-by-pos rule, we just fetch - the first toggled one. - (ical_object_generate_events): Added a missing break statement. - - * timeutil.c (time_month_end): Made it consistent with the rest of - the time begin/end functions -- now it returns the first second of - the *next* month. - (time_week_end): Actually implemented this function. It will be - used when the week view is rewritten. - - * calobj.c (time_in_range): Fix off-by-one in the comparison of - the time against the end time. - - * gncal-full-day.c (expand_space): Fixed bug where the columns not - were being expanded due to a missing "slot + j". - -1998-10-01 Federico Mena Quintero - - * month-view.c (month_view_init): Use the font #defines. - (month_view_new): Set the colors of the month view upon creation. - (mark_current_day): New function to mark the current day in the - month view. - (month_view_set): Mark the current day. - (month_view_colors_changed): Mark the current day and colorify the - month item appropriately. - - * month-view.h: Added year and month fields to the MonthView - structure. - - * main.c: Renamed the Appointments color property, since it will - be used by the month view as well. - - * goto.c (update): Set the current day's font and color. - - * year-view.c (year_view_init): Set the fonts of the month items - when creating them. - - * mark.h: Added new #defines for HEADING_FONT and TITLE_FONT. - - * year-view.c (year_view_init): Use the new font #defines. - - * prop.c (prop_apply_colors): Fixed to work with the - I-am-paranoid-and-I-need-to-size-my-ints changes to - GnomeColorPicker. - (color_spec_from_picker): Likewise. - -1998-09-30 Federico Mena Quintero - - * goto.c (create_days): Colorify the month item and prepare it for - prelighting here. - - * main.c (color_props): Changed the default colors to something - not dull. - - * year-view.c (compute_min_size): New function to compute the - minimum size of the year view properly. - (year_view_size_request): Added two new fields to the year view - structure that contain the minimum size. Return this in the - size_request method. - (year_view_new): Call compute_min_size to save the minimum size - for later use. - (idle_handler): Make it resize the items correctly. - - * gnome-month-item.c (gnome_month_item_set_arg): Reshape when - necessary. This is needed becaues we now actually calculate a - minimum size for the month item based on the font sizes and paddings. - (check_heading_sizes): New function to calculate a minimum size - based on the headings' dimensions. - (check_day_sizes): New function to calculate a minimum size based - on the day number labels' dimensions. - (check_sizes): New function that computes a minimum size for the - month item. - (reshape): Now calls check_sizes() to ensure a minimum size for - the month item. - - * year-view.c (mark_current_day): New function to mark the current - day in the year view. - - * mark.c: Removed mark_current_day from here. - -1998-09-29 Federico Mena Quintero - - * prop.c (fetch_color_spec): Changed name from fetch_prelight_spec - and made it conform to the new prelighting mechanism. - (fake_mark_days): Set the proper day attributes. - (reconfigure_month): Use colorify_month_item(). - (fake_mark_days): Use mark_month_item_index(). - - * mark.c (colorify_month_item): New public function to reset the - colors in a month item. - (get_attributes): New internal function that creates an array of - attributes for the days in a month item. This is the basis of all - the new optimizations to month item marking. - (unmark_month_item): Now it uses the attributes array to unmark - only the days that need unmarking. - (mark_event_in_month): Update the day attributes array. - (month_item_prepare_prelight): Changed the definition of the - prelight color query function. Use the new function. - (day_event): Do color changes based on the day attributes array. - (mark_month_item_index): New public function to mark a single day - by index. - (mark_event_in_month): Use mark_month_item_index(). - - * gnome-month-item.c (gnome_month_item_num2child): Now takes an - int, not a GnomeMonthItemChild. - (gnome_month_item_child2num): Now returns an int, not a - GnomeMonthItemChild. - (gnome_month_item_num2day): Now takes an int, not a - GnomeMonthItemChild. - - * goto.c (goto_dialog): Create the days before the year spin - button, because the year_changed callback expects the month item - to be created. The new semantics of the spin button cause it to - emit a value_changed signal on the adjustment upon creation -- is - this the behavior we want from it? - (goto_dialog): Use gtk_window_set_modal() instead of the - deprectaed gnome_dialog_set_modal(). - - * quick-view.c (quick_view_new): Make it look not as crappy by - putting the title inside the frame. - (quick_view_do_popup): Fixed the pointer grab and added a cursor. - (create_items_for_event): Query the text width/height from the - text item using the new object arguments, so that the size of the - popup window can be set properly. - - * year-view.c (do_quick_view_popup): Calculate a nice date string - for the popup window. - -1998-09-28 Federico Mena Quintero - - * quick-view.[ch]: New file that presents a quick view of the - events in a particular day when the mouse is clicked on the year - view. Work in progress. - - * year-view.c (do_quick_view_popup): New function that creates a - quick view for the events in a day. - - * Makefile.am (gnomecal_SOURCES): Added quick-view.[ch] to the - list of sources. - -1998-09-27 Federico Mena Quintero - - * main.c: Hotkey for File/Exit should be C-q, not C-x. - -1998-09-24 Federico Mena Quintero - - * year-view.c (do_popup_menu): New function to execute the popup - menu in the year view. - (day_event): Invoke the popup menu with the context set to days. - (new_appointment): New function to create a new appointment from - the year view. - (do_jump): New function to do the appropriate view/date jumping - from the popup menu. - - * main.c: Fixed two icons in the File menu. - -1998-09-21 Federico Mena Quintero - - * main.c: Added underlined shortcuts and accelerators to the main menu. - -1998-09-16 Raja R Harinath - - * gncal-week-view.c (): Include. - * gncal-week-view.h (): Include. - -1998-09-06 Miguel de Icaza - - * gnome-cal.c (mail_notify): Fixed the bug reported about the mail - notification not beint sent until the program was terminated. - -1998-09-03 Federico Mena Quintero - - * gncal-full-day.c (gncal_full_day_forall): Updated foreach -> - forall from Gtk changes, bleah. - - * year-view.c (day_event): New function to handle events from - days. Jumps to the day that is clicked. - - * main.c: Use a watch cursor while the previous/today/next - functions are doing their job. - - * mark.c (month_item_prepare_prelight): New public utility - function to prepare a month item for prelighting. It will store - the proper prelight information and attach the appropriate signals. - (mark_current_day): Make the current day bold as well (useful for - color-blind people, I guess). - - * prop.c (set_current_day): Reset the date in the sample calendar - and mark the current day. - (fake_mark_days): Mark fake events in the sample calendar. - - * year-view.c (year_view_set): Use the general prelighting engine. - - * goto.c (day_event): Just process button presses, as prelighting - is done behind the scenes now. - (update): Use the general prelighting engine. - - * prop.c (create_colors_page): We can now configure the colors of - the monthly calendars! Wheeeeee! There are still some nits to be - fixed, which are listed in the TODO file. - (build_color_spec): New function to build color specifications. - (parse_color_spec): New function to parse color specifications. - - * mark.c: Modified all functions to use the configured colors. - * goto.c: Likewise. - - * main.c (colors_changed): New function that notifies all - calendars that colors have changed. - - * gnome-cal.c (gnome_calendar_colors_changed): New function that - notifies all the views that the colors have changed. - - * month-view.c (month_view_colors_changed): New function that - notifies the month view that colors have changed. - - * year-view.c (year_view_colors_changed): New function that - notifies the year view that colors have changed. - - * gnome-month-item.h (struct _GnomeMonthItem): Added fields for - outline and day box colors. - - * gnome-month-item.c (gnome_month_item_set_arg): Added - outline_color, outline_color_gdk, day_box_color, and - day_box_color_gdk arguments to month items. These are convenient - to quickly set the colors of the month item. - (gnome_month_item_get_arg): Likewise. - - * main.[ch]: Added a global array of structures for color preferences. - -1998-08-31 Federico Mena Quintero - - * goto.c: Small code cleanup. - (day_event): Upon receiving a LeaveNotify event, Reset the day's - background to the correct color. - -1998-08-29 Federico Mena Quintero - - * mark.[ch]: New files with utility functions to mark calendars - with their events. - - * mark.c (mark_month_item): New public function to mark a month - item with events. - (unmark_month_item): New public function to unmark all the days in - a month item to their default appearance. - - * year-view.c (year_view_set): Use the new unmark_month_item() and - mark_month_item() to mark the months with events. - - * goto.c (update): New function that updates the calendar in the - Go-to dialog by marking the days. - - * timeutil.c (time_year_begin): Modified to take a time_t value. - (time_year_end): Likewise. - (time_month_begin): Actually implemented this function, which was - in the header file but not here. - (time_days_in_month): New public function that returns the number - of days in a month. - - * Makefile.am (gnomecal_SOURCES): Added mark.[ch] to the sources. - - * year-view.c (unmark_days): Use unmark_month_item(). - - * gncal-full-day.c (gncal_full_day_destroy): Fixed crash when - destroying the full day view. The full day's destroy method is - unusual in that it destroys the list of child widgets itself, as - it does not have a remove method, so it needs to reset the list to - NULL. - -1998-08-27 Federico Mena Quintero - - * gnome-month-item.c (build_month): Now does the correct thing - when the user wants weeks to start on Monday. Now all the Monday - special casing, as far as day numbering is concerned, is only in - this function. - - * year-view.c (mark_days): This function marks the days that have - events in them. It also fixes a memory leak in the old - implementation (it was leaking the whole list). - (unmark_days): New function used to unmark all the days in the - year view. - (mark_event): New function that marks all the days that are - spanned by a time range. It also fixes the bug in the old - implementation where it could possibly mark days past the ends of - the year (if the event crosses year boundaries, for example). - - * timeutil.c (time_year_begin): Take the year parameter since year - 1, not 1900. - (time_year_end): Likewise. - - * year-view.c (year_view_size_allocate): Now changing the size of - the calendars is done in the idle loop. - (idle_handler): This function actually does the resizing of the items. - - * year-view.h (struct _YearView): Added idle_id and need_resize - fields. - -1998-08-26 Federico Mena Quintero - - * year-view.c: Beginning of the new year view. Sizing and event - marking needs to be finished. - - * gnome-cal.c: Updated for year-view. - (gnome_calendar_time_format_changed): Use year_view_time_format_changed(). - - * year-view.[ch]: Renamed the gncal-year-view.[ch] files to - year-view.[ch]. - - * Makefile.am (gnomecal_SOURCES): Updated year-view.[ch] in the - list of source files. - -1998-08-25 Federico Mena Quintero - - * goto.c (create_days): Set the heading color of the month item. - - * main.c: Use GNOME_STOCK_PIXMAP_JUMP_TO, now that it exists, - instead of goto.xpm. Also, removed goto.xpm from cvs. - - * gnome-month-item.h (struct _GnomeMonthItem): Added fields for - the heading and day number fonts. Added fields for heading and - day number label colors. - - * gnome-month-item.c (gnome_month_item_class_init): ARG_DAY_NAMES - should be write-only. Also, added arguments for heading and day - number fonts. Added arguments for heading and day number colors. - -1998-08-24 Federico Mena Quintero - - * prop.c (build_two_radio_group): Doh. Set the state of the radio - buttons properly. - - * month-view.c (month_view_time_format_changed): New public - function that notifies the month view of a time format change. - - * gnome-cal.c (gnome_calendar_time_format_changed): New public - function that notifies the calendar of a time format change. - - * main.c (time_format_changed): Use gnome_calendar_time_format_changed(). - - * month-view.c (month_view_update): New public function to update - the month view when an event changes. This is still unfinished. - (month_view_set): New public function to set the month in the - month view. - - * gnome-cal.c (gnome_calendar_direction): Add case for month view. - (gnome_calendar_set_view): Likewise. - (gnome_calendar_update_all): Likewise. - - * timeutil.c (time_add_week): Implemented the time_add_week() - function, which was on the header file. - (time_add_month): Added public month-adding routine. - - * gnome-cal.c (gnome_calendar_get_current_view_name): Add case for - month view. - (gnome_calendar_goto): Likewise, and set the time on the month view. - - * month-view.c (month_view_new): Now it takes the calendar plus - the time_t representing the month. - - * gnome-month-item.h: Added documentation on the object arguments - for the month item. - - * month-view.c (month_view_init): Added a month/year heading to - the month view. - - * TODO: Updated the TODO list a bit. - - * main.c (gnome_cal_file_menu): The preferences menu option should - go in the File menu. - (gnome_cal_edit_menu): Added stock pixmaps to the menu items. - (gnome_cal_menu): Renamed the Calendar menu to Edit. - (gnome_cal_help_menu): Use "About Gnomecal", not just "About". - - * prop.c (hour_activated): Notify the property box that it has changed. - - * main.c: Changed the Properties menu item to Preferences. These - are global application preferences, not a single calendar's - properties. - - * prop.c (prop_apply): Save the week_starts_on_monday flag to the - configuration file. - (properties): Added a check button for weeks starting on Monday. - (properties): Beautified the Preferences dialog. - - * month-view.c (month_view_init): - * goto.c (create_days): Set the month item to start weeks on - Monday if appropriate. - - * main.c (init_calendar): A boolean is not an hour, so don't - range_check_hour() on it. - (init_calendar): Added a global week_starts_on_monday flag. - - * main.h: Added global week_starts_on_monday flag. - -1998-08-21 Miguel de Icaza - - * calobj.c (ical_object_create_from_vobject): If mail alarm or - program alarm are missing the action, then set an empty default. - -1998-08-18 Federico Mena Quintero - - * gnome-month-item.c (gnome_month_item_day2index): New public - function to get the displayed day index of the specified date. - - * gnome-cal.c (gnome_calendar_goto_today): New public function to - jump to the current day. - - * goto.c (day_event): Jump to the selected day when the user - clicks the mouse, and prelight days as appropriate. - - * timeutil.c (time_from_day): New public function to build a - time_t from a year/month/day triplet. - - * gnome-month-item.c (gnome_month_item_num2child): - (gnome_month_item_child2num): New public functions to convert an - index into a child and vice-versa, respectively. - (gnome_month_item_num2day): New public function to convert a child - number into a displayed day number. - - * goto.c (goto_dialog): Doh, use gnome-dialog properly :-) - - * gnome-month-item.c (create_items): Use g_strdup()ed day names - from the start. - -1998-08-17 Federico Mena Quintero - - * main.c (gnome_toolbar): Made it use goto.xpm. - - * Makefile.am (EXTRA_DIST): Added goto.xpm to the list of files. - -1998-08-13 Federico Mena Quintero - - * gnome-month-item.c (gnome_month_item_set_arg): Doh. Actually - recalculate the days using the month and year. - - * main.c: Added "Go to" button to quickly jump to a specific date. - - * goto.c: New file that defines the quick go-to date dialog. - - * Makefile.am (gnomecal_SOURCES): Added goto.c to the sources. - -1998-08-11 Nuno Ferreira - - * main.c (new_calendar): Made title i18n friendly. This was bug - #215. - - * eventedit.c (ee_store_recur_end_to_ical): Set recur->enddate to - recur->_enddate, not to itself, when adding recurring event and - supplying an end date. This fixes (at least part of) bug #99. - -1998-08-10 Federico Mena Quintero - - * month-view.[ch]: Start of the month view widget. This will use - the generic month item and extend it to have the semantics desired - for the gnomecal month view. - - * gnome-month-item.[ch]: New generic canvas item for the month - view and the "small calendars". This is intended to be a - high-level display engine for monthly calendars. This is a work - in progress. - - * gnome-cal.h (GnomeCalendar): Added a month_view field. - - * gnome-cal.c (setup_widgets): Create the month view and insert it - into the notebook. - - * Makefile.am: Added month-view.[ch] and gnome-month-item.[ch] to - the sources. - -1998-08-03 Federico Mena Quintero - - * main.c (about_calendar_cmd): Use an array of const strings to - keep gcc happy. - - * alarm.c (alarm_compare_by_time): Use gconstpointer to keep gcc happy. - * calendar.c (calendar_object_compare_by_start): Likewise. - * gncal-full-day.c (child_compare_by_start): Likewise. - -1998-07-07 Miguel de Icaza - - * main.c: Add support for --view flag. - (session_save_state): Save the view mode; - (new_calendar): Now takes a view mode flag. - - * gnome-cal.c (gnome_calendar_get_current_view_name): New - function for enhancing the session management support for - gnomecal. - (gnome_calendar_set_view): New function that makes a given page - active. - -1998-07-01 Nuno Ferreira - - * gncal.desktop: Added Portuguese translation. - -Mon Jun 22 13:01:16 1998 Havoc Pennington - - * main.c (session_save_state): Use gnome_geometry_string to get - the geometry string. - -1998-06-04 Federico Mena Quintero - - * eventedit.c (ee_rp_init_rule): Do not subtract 1 from - tm->tm_mday for the default_day. - - * gnome-cal.c (gnome_calendar_new): - (gnome_calendar_goto): Use the start of the day -- things expect - it to be that way. - -1998-05-27 Nuno Ferreira - - * eventedit.c (ee_store_recur_rule_to_ical): Fill in - ical->recur->interval from value in spin_button. This ixed an - infinnite loop. - -1998-05-30 Federico Mena Quintero - - * gncal-full-day.c (child_draw): Paint the decorations correctly. - (child_draw_decor): Paint the recurrence/bell icons correctly. - -1998-05-25 Miguel de Icaza - - * eventedit.c (ee_rp_init_rule): Use the contents of - ee->ical->dtstart for computing the predefined values of the recurrence. - - * gncal-full-day.c (gncal_full_day_unrealize): Fix the gc - destruction in the unrealization code and fix the pixmap unrefing. - - * main.c (close_cmd): Remove a bad hack that disabled calendar - widget destruction. - - * calobj.c (ical_object_generate_events): Fix for the weekly event - generation. Was reported on the bug tracking system. - -1998-05-18 Miguel de Icaza - - * gncal-full-day.c (layout_children): Implemented ultra-cool - layout for the events that share the same time range. Gals and - guys you can now drop Outlook on the recycle bin. - - Which reminds me. We do not have a recycle bin. How could that - happen in a project as cool as this one? Someone explain this to - me. - -1998-05-18 Federico Mena - - * gncal-full-day.c (paint_back): Eliminated unnecessary border repainting. - -Sun May 17 17:55:03 1998 Havoc Pennington - - * gncal-todo.c (simple_todo_editor): Close dialog when return is pressed. - -1998-05-15 Miguel de Icaza - - * gnome-cal.c (mark_gtk_calendar_day): Bug free version of the - range computation in place. - - * gncal-year-view.c (year_view_mark_day): Use the same new version - of the range computation here. - - * calobj.c (ical_object_generate_events): Fix the begin/end - condition. - -1998-05-14 Miguel de Icaza - - * timeutil.c (isodate_from_time_t): Do not add the spurious - padding. - - * calobj.c (store_date_list): Bug fix: I was using the wrong - pointer when saving the exception date list. - (set_date_list): Bug fix: load correctly the complete exception - date list. - (set_date_list): Use ',' for the exception date separator as the - versit people can not get their standard right. - - * gncal-full-day.c (unrecur_appointment): Support for making an - existing recurrent event `movable' for a day. - - * calobj.c (ical_object_add_exdate): New routine, used to add - exception dates. - (ical_object_duplicate): New routine: used to do the magic - recur->no-recur event. - -1998-05-08 Miguel de Icaza - - * gncal-full-day.c (new_appointment): Use gtk_calendar freeze/thaw - - * gncal-year-view.c (gncal_year_view_set_year): Use gtkcalendar freeze/thaw. - - * eventedit.c (event_editor_init): Use gnome_dialog_set_close to - avoid the ugly warning. - - * main.c (display_objedit): Default to the day the user is looking - at. - -1998-05-05 Miguel de Icaza - - * gncal-day-panel.c (full_day_size_allocated): Do not emit a value - changed signal if the value is the same. - -1998-05-04 Miguel de Icaza - - * prop.c (prop_apply): Only run the apply code once. - -1998-05-03 Miguel de Icaza - - * gncal-day-panel.c (update): Draw the day at startup. - (gncal_day_panel_set): Fix selected-day display. - (gncal_day_panel_new): Switch day on double clicks, not on single - clicks. - - * calobj.c (ical_object_compute_end): Removed debug messages. - -1998-04-30 Miguel de Icaza - - * prop.c (prop_apply): Do not call prop_cancel, ths is now using - GnomePropertyDialog. - -1998-04-29 Miguel de Icaza - - * gncal-week-view.c (sync_week): Use gnome_calendar_tag_calendar. - - * gnome-cal.c (gnome_calendar_tag_calendar): New routine used to - fill a gtk_calendar with the events on a GnomeCalendar object. - - * gncal-week-view.c (gncal_week_view_new): Set the week to the day - we double clicked. - -1998-04-28 Miguel de Icaza - - * gnome-cal.c (calendar_notify): Apply black magic to get mail - notifications to work. - - * gncal-full-day.c (child_focus_out): Temporary optimization, the - child_focus_out is constantly calling the - gnome_calendar_object_changed when the property editor has been - invoked. This happens every time the mouse moves crosses the main - window. - - * calendar.c (calendar_object_changed): Reschedule alarms when a - calendar object has changed its times. - -Sat Apr 25 22:20:45 1998 Havoc Pennington - - * eventedit.c, eventedit.h: Descend from GnomeDialog. Took vbox - out of class structure; use GnomeDialog vbox - instead. gnome_dialog_set_destroy instead of destroying in button - callbacks. Don't create buttons, separator, or vbox manually. - #include . - -1998-04-24 Miguel de Icaza - - * calobj.c (ical_object_create_from_vobject): Fixed alarm loading; - Load snooze time and snooze count - -1998-04-23 Federico Mena Quintero - - * calendar.c (calendar_save): Actually save the to-do entries. - - * gncal-todo.c (simple_todo_editor): Now you can add and edit - to-do entries. - -1998-04-22 Federico Mena Quintero - - * gncal-full-day.c: Made it use popup_menu(). - - * popup-menu.c: New file with utility functions for creating popup - menus. Maybe such a thing would be useful in libgnomeui, a la - gnome-app-helper? - - * Makefile.am (gnomecal_SOURCES): Added popup-menu.[ch] to the sources. - -1998-04-22 Miguel de Icaza - - * prop.c (properties): Added Calendar properties editor. - (properties): Make the code use a propery box. - - * main.c: Save/load properties (fix to old commit). - -1998-04-21 Federico Mena Quintero - - * gncal-todo.c: New widget for editing TODO lists. This will be - worked on a lot. - - * Makefile.am (gnomecal_SOURCES): Added gncal-todo.[ch] to the sources. - - * gncal-day-panel.c: Make it use the new TODO widget. - -1998-04-21 Miguel de Icaza - - * timeutil.c (isodate_from_time_t): Do not save with the global - time flag (Z at the end of the isodate). When we figure out a way - to load times in GMT time, we will add this back - - * view-utils.c (popup_menu): Moved this routine here as there are - more users of this code. - - * gncal-day-view.c (gncal_day_view_class_init): Add button press - handler. - (new_appointment): New routine for creating appointments on a day. - - - - * main.c (save_ok): Added call to gtk_window_set_wmclass. - - * gncal-day-panel.c (calendar_day_selected): Fix, years for mktime - should substract 1900 and gtk_calendar stores years relative to - year 0. - - * gncal-week-view.c (gncal_week_view_new): Make the week view - descend from VBox so that we can add a label to it. - (gncal_week_view_set): Display the ending day of the week - correctly. - - Added a label that displays the week range. - -1998-04-21 Federico Mena Quintero - - * gnome-cal.c: Made it use GncalDayPanel. - - * gncal-day-panel.c: New widget for the day view in the main - calendar toplevel. It basically takes care of everything - gnome-cal did by hand with respect to the day view. - - * Makefile.am (gnomecal_SOURCES): Added gncal-day-panel.[ch] to - the rules. - - * main.c: Added a separator between the About menu item and the - help topics. - -1998-04-20 Miguel de Icaza - - * eventedit.c (ee_ok): Mark the event as non-new after accepting changes. - -1998-04-20 Federico Mena Quintero - - * gncal-full-day.c (gncal_full_day_get_day_start_yoffset): New - public function that returns the y offset for the row - corresponding to the "day begin" time. - - * gncal-full-day.c (gncal_full_day_key_press): Now any printable - keystroke (not just Return) will activate the selected range. - - * gncal-full-day.c (paint_back): Made it use the new paint_row - function instead of painting everything directly. We calculate - areas in a smarter way so there is even less flicker than before, - especially when selecting regions. - - * eventedit.c: Sensitize recurrence widgets properly. - - * calobj.c (duration_callback): Pass the correct pointer type to - is_date_in_list(). - -1998-04-20 Miguel de Icaza - - * calobj.c (duration_callback): Take exception dates into - account. - - * gncal-full-day.c (new_appointment): Setup the event editor dates - to those of the currently displayed day. - (gncal_full_day_selection_range): Use sensible values in the case - no range is selected. - (new_appointment): Events now use the current day for event creation. - - * view-utils.c: Pretty up the time display. - - * calobj.c (ical_object_compute_end): Initialize - ico->recur->enddate, otherwise we loop forever during final date computation. - - * eventedit.c: Now recurrence is toggled by a radio button in the - recurrence page, as the checkbox is confusing. - - * calobj.c (is_date_in_list): Add support for the exclussion - dates. - -1998-04-18 Miguel de Icaza - - * gncal-year-view.c (double_click): Fix this routine as well. - - * gncal-week-view.c (jump_to_day): Bind the gtkcalendar signals to - the week. - - * gncal-year-view.c (gncal_year_view_set_year): Put things in the - proper range. Now the year view actually matches this year. - - * gnome-cal.html: Added small documentation. - - * main.c: Add more icons to the menus; Rename some menubar - entries; Add `new' icon to the toolbar. - (dump_events): Added argument handling and dumping of events from - the command line. Extremely cool. - - * getdate.y: Taken from the CVS source code. Used for date - parsing in the command line. - - Internationalized getdate.y. Wee! It even works with spanish. - - * calobj.c (ical_object_to_vobject): Add Quoted printable property - to items containing new lines. - (duration): Use unsigned integers, to work around buggy calendar - files generated by korganizer. - - * main.c (save_calendar_cmd): Do not ask for file name if we are - saving. - (save_as_calendar_cmd): New command. - - -1998-04-17 Miguel de Icaza - - * alarm.c (alarm_kill, alarm_init, alarm_add): Implement the alarm - management framework. - -1998-04-17 Federico Mena Quintero - - * calobj.c (ical_new): Added mandatory status property. - (ical_object_to_vobject): Only store "related" list if it exists. - (store_list): Add terminating null char and free the correct data. - - * main.c (save_calendar_cmd): Implemented calendar saving. - (open_calendar_cmd): Implemented calendar loading. - (new_calendar_cmd): Implemented calendar creation. - (new_calendar): Don't load our test calendar by default. - - * gncal-full-day.c (delete_appointment): Delete appointment implemented. - - * eventedit.c (ee_store_recur_values_to_ical): Free/create - ical's recurrence appropriately. - (ee_rp_init_rule): Initialize all missing parameters from ical. - (ee_rp_init_ending_date): Initialize missing fields from ical. - -1998-04-17 Miguel de Icaza - - * gnome-cal.c (gnome_calendar_remove_object): Add support for - removing objects. - -1998-04-17 Federico Mena Quintero - - * eventedit.c (ee_init_recurrence_page): New function that creates - the recurrence page in the toplevel notebook. - (ee_store_recur_values_to_ical): Now we can also store the recurrences. - -1998-04-17 Miguel de Icaza - - * calobj.c (ical_object_generate_events): Implement - RECUR_MONTHLY_BY_POS implemented. - (ical_object_create_from_vobject): Fix the alarm - initialization code. - (save_alarm): Save alarms. - (ical_object_generate_events): Fixed the recurrent code to take - into account the recur->endate field (if at all specified). - - (ical_object_to_vobject): Implement recurrence rule saving. - -1998-04-16 Federico Mena Quintero - - * eventedit.c (ee_store_alarm): Use menu_shell->children, not - menu->children. Why does GtkMenu have a children field in the - object structure? - (check_dates): New function that insures that start_date < end_date. - (check_times): In addition to checking whether the event spans the - whole day, now it insures that start_time < end_time. - - * gncal-full-day.c (child_set_size): Now children get bigger - temporarily while they are focused. This allows the handles not - to "overlap" the rows used by the child and thus allow editing of - very thin events. - (recompute_motion): Fix for new child coordinates. - (gncal_full_day_expose): Make it use find_child_by_window() - instead of looking for it by hand. - - * bell.xpm recur.xpm: XPM files for events with alarm and - recurrence, respectively. - -1998-04-15 Federico Mena Quintero - - * gncal-full-day.c (button_1): Preserve the up/down cursor while dragging. - - * gncal-full-day.c (child_draw): Now children have a vertical - handle as well. This can be used to move the child anytime, not - only when it is focused. - (recompute_motion): Modified for new drag behavior. - - * eventedit.c (ee_init_general_page): The general_owner may be - null. Do the proper thing when creating the label. - (ee_ok): Update the gnome calendar appropriately. - - * timeutil.h: - * gncal-year-view.h: Add some missing prototypes. - - * gncal-full-day.c (child_popup_menu): Set the sensitivity of menu - items according to whether the ical object is being edited or not. - - * eventedit.c (event_editor_new): Set the "being edited" flag on - the ical object (stored as the ical object's user data). - (event_editor_destroy): Release the flag. - - * calobj.h: The iCalObject structure now has a generic user_data pointer. - * calobj.c (ical_object_set_user_data ical_object_get_user_data): - Functions to set this data. - - * gncal-full-day.c (child_button_press): Do child popup menu correctly. - - * main.c (about_calendar_cmd): Fixed my address and added Arturo - to the authors in the about box. - - * gncal-full-day.c (find_child_by_window): Compare child's widget - windows by user_data (which will be the parent widget, that is, - the text widget). We cannot assume that child->widget->window - will be *the* window we are interested on because there may be - child widgets with multiple windows. - -1998-04-15 Miguel de Icaza - - * calobj.c (ical_foreach): Define iterator routine. - -1998-04-15 Arturo Espinosa Aldama - - * gncal-year-view.[hc]: Now using time_t for new and set. - Random fixes, as well. - -1998-04-15 Federico Mena Quintero - - * gncal-full-day.c (button_3): New popup menus activated with - mouse button 3. - (create_appointment): Create a new appointment from the popup - menus. See the FIXME. - -1998-04-15 Miguel de Icaza - - * gncal-full-day.c (layout_kill_rows): Routine to destory rows - array properly. - - * gncal-year-view.c (gncal_year_view_new): Add missing year in - call to strftime. - - * calobj.c (ical_object_create_from_vobject): Fixed memory leaks - from the return values of versit's fakeCString. - -1998-04-14 Arturo Espinosa Aldama - - * gncal-year-view.[hc]: New widget for the year view. - * Makefile.am: added required compilation of the new files. - -1998-04-14 Federico Mena Quintero - - * eventedit.c (event_editor_setup_time_frame): Fixed some table - expansions to make the dialog look nicer when resized. - - * calobj.c (ignore_space): Fixed compiler warning about unused - computed value. - (ocurrencelist): Replace str by p confusion. Removed unused - variables value and q. - (daynumber): Fixed a couple of warnings about unused values. - (load_recurrence): Removed unused variable c. Added a default - clause to the switch(type). - - * eventedit.c (ee_rp_init_frequency): Removed unused variable content. - Fixed a compiler warning by adding a missing cast. - - * calobj.c (ical_object_create_from_vobject): Make the - load_recurrence() part work correctly. Eliminated use of - syntax_error variable. - -1998-04-13 Federico Mena Quintero - - * gncal-full-day.c (child_key_press): Unfocus the child and focus - the parent fullday widget when the user presses Esc. - - * gncal-week-view.c (gncal_week_view_update): Now takes object and - flags parameters. - * gncal-day-view.c (gncal_day_view_update): Likewise. - * gncal-full-day.c (gncal_full_day_update): Likewise. - (child_focus_in): New function. In conjunction with - child_focus_out(), these only display the handles in the child - when it is focused. The result is that the user can see more of - the child's text when nothing is focused, and we can also display - fatter and nicer drag handles. - - * gnome-cal.c (gnome_calendar_object_changed): Now takes an - additional flags parameter - (gnome_calendar_update_all): Made function static. Now takes - changed object and flags parameters as well. - (gnome_calendar_object_changed): Now takes additional flags - parameter to indicate what changed in the specified object. - - * calobj.h (CalObjectChange): New enum with flags to describe what - has been changed in an object. - - * gncal-full-day.h: - * gncal-full-day.c (gncal_full_day_focus_child): New function to - let the outside world decide which child to focus. - (gncal_full_day_focus_child): Bleah. We have to synthesize a - click because GtkText will not set the cursor when you focus it. - - * gnome-cal.c (day_view_range_activated): Focus the new child in - the full day widget. - - * eventedit.c (event_editor_setup_time_frame): Re-aligned some - widgets to make it look prettier. - (ee_alarm_widgets): Likewise. - (ee_init_general_page): Likewise. - (ee_classification_widgets): Likewise. - (event_editor_init_widgets): Likewise. - - * gnome-cal.c (day_view_range_activated): Create new object and - add it to the calendar. You can now select a range in the - full-day view, hit Return, and a new event will be added at the - selected range. I still have to figure out how to focus this new child. - - * gncal-full-day.c (paint_back): Rewrote function to avoid - painting an area more than once -- eliminate flicker. - (paint_back_rows): New function that calls paint_back() only for - the area of the specified rows. - (gncal_full_day_button_press): - (gncal_full_day_button_release): - (gncal_full_day_motion): Made these functions use - paint_back_rows() instead of paint_back(), to eliminate flicker. Wheee! - -1998-04-12 Federico Mena Quintero - - * gnome-cal.c (setup_day_view): We now connect to the - range_activated signal of the fullday widget instead of catching - key presses ourselves. - (day_view_range_activated): New function that creates a new - iCalObject and inserts it into the calendar, not finished yet. - -1998-04-11 Federico Mena Quintero - - * gncal-full-day.c (get_time_from_rows): New function, calculates - a pair of time_t values from the specified start and number of rows. - - * gncal-full-day.h (GncalFullDayClass): New signal - "range_activated". It is emitted when a range is selected and the - user hits Return. - (gncal_full_day_selection_range): New function, returns the - selected range. - - * gncal-full-day.c (struct drag_info): Moved selection information - to their own fields instead of sharing the child's drag fields. - This allows us to keep the selection when a child is moved. - (recompute_motion): Made the case when (row < di->sel_click_row) - work correctly. - -1998-04-11 Miguel de Icaza - - * gnome-cal.c (gnome_calendar_goto): Add support for navigating - on the day view. - - * timeutil.c (time_start_of_day, time_end_of_day, time_day_hour): - New time manipulation functions. - - * eventedit.c (ee_rp_init_frequency): Add the different frequency - editors to a notebook. Make the notebook startup on the entry - selected recurrence type; - -1998-04-11 Federico Mena Quintero - - * gncal-full-day.c (recompute_motion): Now we support selecting a - range in the main window (by clicking+dragging). It flickers - horribly and is not perfect, but it is a start. - -1998-04-09 Federico Mena Quintero - - * gncal-full-day.c: #include - - * gncal-full-day.c (child_map): Show instead of just map the child - widget (otherwise the text widget gets confused and will not focus). - - * calobj.c (ical_object_to_vobject): Quote chars as 'x', not "x". - - * calobj.h: Added prototype for ical_object_to_vobject(). - - * gnome-cal.c (gnome_calendar_object_changed): New function. This - should be called when a calendar object is changed. - - * gncal-full-day.c (update_from_drag_info): Call - gnome_calendar_object_changed() instead of updating manually. - - * calendar.c (calendar_add_object): - (calendar_remove_object): Set the modified flag to true. - - * gncal-full-day.c (gncal_full_day_draw): Finished implementing - this function. - -1998-04-08 Raja R Harinath - - * gncal.c (update_calendar): Say `#if 0', not `#ifdef 0'. - -1998-04-07 Federico Mena Quintero - - * eventedit.c: Removed unused global variable parent_class. - - * eventedit.h: Renamed gtk_window field to window. - Made the parent_class field in the EventEditorClass structure be a - GtkWindowClass, not a gnome property box class. - Added prototype for event_editor_get_type(). - -1998-04-06 Federico Mena Quintero - - * gncal-week-view.c (gncal_week_view_new): Use the new - gtk_table_set_homogeneous() instead of setting the variable directly. - -1998-04-03 Federico Mena Quintero - - * eventedit.c (ee_create_ae): Make it return void. - (ee_alarm_widgets): Remove some unused variables. - (ee_store_alarm): Make it return void. - #include - - * eventedit.h: #include "gnome-cal.h" - - * calobj.c (list_free): Don't use g_free in the g_list_foreach. - - * calendar.h: Add prototype for calendar_load(). - - * timeutil.h: Add prototypes for time_add_*(). - - * calendar.c: - * calobj.c: - * eventedit.c: - * gnome-cal.c: #include "timeutil.h" - - * gncal-day-view.c (gncal_day_view_size_request): Make the minimum - width equal or larger to the title width. - - * main.c: #include "eventedit.h" - (main): Add a return statement. - (new_calendar): Show stuff *after* the calendar has been loaded. - - * gnome-cal.c (gnome_calendar_load): Update the day view. - (setup_widgets): Hackish setup of a day view widget - will fix later. - (gnome_calendar_init): Initialize all fields. - - * gnome-cal.h: Added day_view field. Maybe this should be changed - when the a complete day view panel is complete. - - * gncal-day-view.c (gncal_day_view_update): Draw after update, not - before. - -1998-04-06 Carsten Schaar - - * versit/.cvsignore: New file. - -Fri Apr 3 22:31:54 1998 Tom Tromey - - * calendar.c: Include . - -1998-04-03 Miguel de Icaza - - * timeutil.c (time_add_year, time_add_year, time_add_week): - Routines for time manipulation. - - * calobj.c (ical_object_destroy): Full destruction of the object. - - * eventedit.c: Finished the main event editor form; It still - lacks the details and the recurrence bits. It now adds events - and cancels. - -1998-04-03 Federico Mena Quintero - - * view-utils.c (view_utils_draw_events): The "better" format - string for strftime() wasn't better, after all :-( - -1998-04-02 Federico Mena Quintero - - * gncal-full-day.c: New full-day widget. It is still a work in - progress. It will be similar to M$ Schedule's nifty full day view - widget, but with Gtk's elegance :-) - - * Makefile.am (gnomecal_SOURCES): Added gncal-full-day.[ch] to the sources. - -1998-04-02 Miguel de Icaza - - * eventedit.c: Object editor widget. We dropped ObjEdit. - - * timeutil.c (time_from_isodate): Fix. - - * view-utils.c (view_utils_draw_events): Changed the display - formats. - -1998-04-02 Federico Mena Quintero - - * view-utils.c (view_utils_draw_events): Use better format - specifier for strftime(). - (view_utils_draw_textured_frame): Ultra-nifty function to draw - textured "metal" frames, like Netscape's handles. - -1998-04-02 Miguel de Icaza - - * gncal-day-view.c (gncal_day_view_update): Day events are now - cached inside the widget. They get initialized at this time. - - * view-utils.c (view_utils_draw_events): Use the list of events. - -1998-04-02 Federico Mena Quintero - - * gncal-day-view.c (gncal_day_view_set_shadow): New customization - function. We can't decide on a stupid border type :-) - (gncal_day_view_init): Made GTK_SHADOW_ETCHED_IN be the default - shadow type. Looks good. - -1998-04-02 Miguel de Icaza - - * main.c: New main program that uses our new datatypes and - objects. - - * calendar.c (calendar_load_from_vobject, calendar_load): - Implement loading of vCalendar objects and vCalendar files. - - * calobj.c (ical_object_create_from_vobject): Implement loading of - vCalendar event and todo objects. - - * timeutil.c (isodate_from_time_t): New function. - - * gnome-cal.c, gnome-cal.h: Implement a toplevel widget, derived - from GnomeApp. It holds all of the day views and arbitrates the - display. - -1998-04-02 Federico Mena Quintero - - * gncal-week-view.[ch]: New week view composite widget. This - provides a full week view (7 day views plus busy time display -- - the latter is currently unimplemented). - -1998-04-01 Federico Mena Quintero - - * gncal-day-view.c: New day view widget. It is intended to be a - child widget of the week view composite widget. - - * calendar.c (calendar_get_objects_in_range): - (calendar_get_events_in_range): - (calendar_get_journal_in_range): - (calendar_get_journal_in_range): These functions now take a - sort_func parameter, which is of type GCompareFunc. If the - specified value is non-NULL, it will return a sorted list. - Otherwise, it will return an unordered list. - (calendar_compare_by_dtstart): Provide a generic sorting routine - for calendar objects. - -1998-04-01 Miguel de Icaza - - * Start from scratch - -Tue Mar 31 23:46:50 1998 Tom Tromey - - * timeutil.c (format_simple_hour): `buf' now static. - -1998-03-31 Federico Mena Quintero - - * gncal.c: Removed #include "gtkcalendar.h", because it now comes - from libgnomeui. - - * Makefile.am (gncal_SOURCES): Added new source files to the rules. - - * timeutil.c (format_simple_hour): New function, formats an - hour/am_pm pair into a string of the form "3am", "12pm", "05h", - "19h", etc. It is used by the day view widget for its labels. - -1998-03-31 Craig Small - - * Now has (non working) session maangement - * Uses a clist for the dailylist like gtt - -Sat Mar 21 15:43:20 1998 Tom Tromey - - * gncal.c: Use gnome_message_box_*, not gnome_messagebox_*. - -1998-03-12 Craig Small - - * Now linked (in some horrible way) to the gtkcalendar widget. - -Sun Mar 8 16:38:10 1998 Tom Tromey - - * Makefile.am (INCLUDES): Added GNOME_INCLUDEDIR. - (gncal_LDADD): Don't include libsupport.a. - - * gncal.c (main): Use new gnome_init. - -1998-02-19 Federico Mena Quintero - - * gncal.c (main): Added app_id "gncal". - -1998-02-19 Carsten Schaar - - * Makefile.am (gncal_LDADD): Added '$(INTLLIBS)' - -1998-02-18 Raja R Harinath - - * Makefile.am (gncal_LDADD): Include `libsupport.a'. - - * calcs.c (month_atoi): Replace buggy explicit loop string compare - with strcasecmp. - (day_atoi): Likewise. - -Sun Jan 25 23:38:30 1998 Miguel de Icaza - - * menus.c: Replace "Quit" with "Exit". diff --git a/calendar/Makefile.am b/calendar/Makefile.am deleted file mode 100644 index e173063a48..0000000000 --- a/calendar/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS = doc idl cal-util pcs cal-client gui diff --git a/calendar/TODO b/calendar/TODO deleted file mode 100644 index 4a5dd6c6ff..0000000000 --- a/calendar/TODO +++ /dev/null @@ -1,88 +0,0 @@ -Cal-util: - -- calobj.h depends on libversit/vcc.h, because it uses a VObject for - ical_object_create_from_vobject(). This should be an internal - function in the PCS and nothing else (we do not install libversit, - so our public libraries should not depend on it). - -- Or maybe we *should* install libversit, since the addressbook code - uses it as well. - -- timeutil has a lot of crap and some namespace pollution. Clean it - up. - -PCS: - -- When loading a calendar, substitute duplicated UIDs by new ones, and - possibly print out a warning message. - ------ Old Gnomecal TODO starts here ----- - -Pilot: - -* Better support for untimed events (we have none now). - -* Hash objects based on their UIDs. - -* Add placeholders for deleted events, so that we can kill those - when syncing to the pilot. - -BUGS: - -- Recurrence end date is wrong. An event that repeats daily will not - be included in the ending date of the recurrence (off-by-one - error?). - -- X-fields (extensions) are stripped from a vCal file when it is - saved. They should be preserved. - -Features: - -- Add a calendar-week so that people know which week of the year it is - -Year view: - -- See why it is so fucking slow when opening its notebook page for the - first time. - -Month view: - -- Popup menu like in the year view. - -- Double click on a day takes you to the day view. - -- DnD of appointments to move them around. - -Week view: - -- Nice display as in the Palm Pilot. - -Day view: - -- Rewrite in terms of the canvas and make it pretty. - -Preferences: - -- BUG: 12/24 hours stuff is not consistent - I remember that on editing - new appointment you get the time-selectors always on 12-hr format - -Event editor dialog: - -- Make it figure out whether the alarm is in - minutes/hours/days/etc. (via a cascade of conditions) and set the - widgets appropriately. - -Gnome date selection widget: - -- Make the displayed date be localized properly -- use strftime(). - -General: - -- Write online help. Nice help. Lots of help. - -- If you leave the calendar running overnight, the "current day" - marker in the GnomeMonthItems does not get updated. - -- Add categories support. Color-coded categories. - -- Untimed events diff --git a/calendar/cal-client/.cvsignore b/calendar/cal-client/.cvsignore deleted file mode 100644 index bd3fc7c91c..0000000000 --- a/calendar/cal-client/.cvsignore +++ /dev/null @@ -1,16 +0,0 @@ -Makefile.in -.deps -.libs -.pure -Makefile -evolution-calendar-stubs.c -evolution-calendar-skels.c -evolution-calendar-common.c -evolution-calendar.h -evolution-calendar-common.lo -evolution-calendar-skels.lo -evolution-calendar-stubs.lo -cal-client.lo -cal-listener.lo -libcal-client.la -client-test diff --git a/calendar/cal-client/Makefile.am b/calendar/cal-client/Makefile.am deleted file mode 100644 index f7077ed88f..0000000000 --- a/calendar/cal-client/Makefile.am +++ /dev/null @@ -1,62 +0,0 @@ -# -# libcal-client -# - -CORBA_GENERATED = \ - evolution-calendar.h \ - evolution-calendar-common.c \ - evolution-calendar-skels.c \ - evolution-calendar-stubs.c - -idls = \ - $(srcdir)/../idl/evolution-calendar.idl - -idl_flags = `$(GNOME_CONFIG) --cflags idl` -I $(datadir)/idl - -$(CORBA_GENERATED): $(idls) - $(ORBIT_IDL) $(idl_flags) $(srcdir)/../idl/evolution-calendar.idl - -INCLUDES = \ - -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \ - -DG_LOG_DOMAIN=\"cal-client\" \ - -I$(top_srcdir)/calendar \ - -I$(srcdir) -I$(top_srcdir) \ - -I. \ - -I.. \ - -I$(top_builddir) \ - -I$(includedir) \ - $(BONOBO_GNOME_CFLAGS) - -lib_LTLIBRARIES = libcal-client.la - -libcal_clientincludedir = $(includedir)/evolution/cal-client - -libcal_client_la_SOURCES = \ - $(CORBA_GENERATED) \ - cal-client.c \ - cal-listener.c \ - cal-listener.h - -libcal_clientinclude_HEADERS = \ - cal-client.h - - -# -# client-test program -# - -noinst_PROGRAMS = client-test - -client_test_SOURCES = \ - client-test.c - -client_test_INCLUDES = \ - $(INCLUDES) \ - -DG_LOG_DOMAIN=\"client-test\" - -client_test_LDADD = \ - $(BONOBO_VFS_GNOME_LIBS) \ - $(top_builddir)/calendar/cal-util/libcal-util.la \ - $(top_builddir)/libversit/libversit.la \ - $(top_builddir)/libical/src/libical/libical.la \ - libcal-client.la diff --git a/calendar/cal-client/cal-client.c b/calendar/cal-client/cal-client.c deleted file mode 100644 index 97dda85acb..0000000000 --- a/calendar/cal-client/cal-client.c +++ /dev/null @@ -1,968 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* Evolution calendar client - * - * Copyright (C) 2000 Helix Code, Inc. - * - * Author: Federico Mena-Quintero - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. - */ - -#include -#include - -#ifdef USING_OAF -#include -#else -#include -#endif - -#include "cal-client.h" -#include "cal-listener.h" - - - -/* Loading state for the calendar client */ -typedef enum { - LOAD_STATE_NOT_LOADED, - LOAD_STATE_LOADING, - LOAD_STATE_LOADED -} LoadState; - -/* Private part of the CalClient structure */ -typedef struct { - /* Load state to avoid multiple loads */ - LoadState load_state; - - /* The calendar factory we are contacting */ - Evolution_Calendar_CalFactory factory; - - /* Our calendar listener */ - CalListener *listener; - - /* The calendar client interface object we are contacting */ - Evolution_Calendar_Cal cal; -} CalClientPrivate; - - - -/* Signal IDs */ -enum { - CAL_LOADED, - OBJ_UPDATED, - OBJ_REMOVED, - LAST_SIGNAL -}; - -static void cal_client_class_init (CalClientClass *class); -static void cal_client_init (CalClient *client); -static void cal_client_destroy (GtkObject *object); - -static guint cal_client_signals[LAST_SIGNAL]; - -static GtkObjectClass *parent_class; - - - -/** - * cal_client_get_type: - * @void: - * - * Registers the #CalClient class if necessary, and returns the type ID assigned - * to it. - * - * Return value: The type ID of the #CalClient class. - **/ -GtkType -cal_client_get_type (void) -{ - static GtkType cal_client_type = 0; - - if (!cal_client_type) { - static const GtkTypeInfo cal_client_info = { - "CalClient", - sizeof (CalClient), - sizeof (CalClientClass), - (GtkClassInitFunc) cal_client_class_init, - (GtkObjectInitFunc) cal_client_init, - NULL, /* reserved_1 */ - NULL, /* reserved_2 */ - (GtkClassInitFunc) NULL - }; - - cal_client_type = gtk_type_unique (GTK_TYPE_OBJECT, &cal_client_info); - } - - return cal_client_type; -} - -/* Class initialization function for the calendar client */ -static void -cal_client_class_init (CalClientClass *class) -{ - GtkObjectClass *object_class; - - object_class = (GtkObjectClass *) class; - - parent_class = gtk_type_class (GTK_TYPE_OBJECT); - - cal_client_signals[CAL_LOADED] = - gtk_signal_new ("cal_loaded", - GTK_RUN_FIRST, - object_class->type, - GTK_SIGNAL_OFFSET (CalClientClass, cal_loaded), - gtk_marshal_NONE__ENUM, - GTK_TYPE_NONE, 1, - GTK_TYPE_ENUM); - cal_client_signals[OBJ_UPDATED] = - gtk_signal_new ("obj_updated", - GTK_RUN_FIRST, - object_class->type, - GTK_SIGNAL_OFFSET (CalClientClass, obj_updated), - gtk_marshal_NONE__STRING, - GTK_TYPE_NONE, 1, - GTK_TYPE_STRING); - cal_client_signals[OBJ_REMOVED] = - gtk_signal_new ("obj_removed", - GTK_RUN_FIRST, - object_class->type, - GTK_SIGNAL_OFFSET (CalClientClass, obj_removed), - gtk_marshal_NONE__STRING, - GTK_TYPE_NONE, 1, - GTK_TYPE_STRING); - - gtk_object_class_add_signals (object_class, cal_client_signals, LAST_SIGNAL); - - object_class->destroy = cal_client_destroy; -} - -/* Object initialization function for the calendar client */ -static void -cal_client_init (CalClient *client) -{ - CalClientPrivate *priv; - - priv = g_new0 (CalClientPrivate, 1); - client->priv = priv; - - priv->factory = CORBA_OBJECT_NIL; - priv->load_state = LOAD_STATE_NOT_LOADED; -} - -/* Gets rid of the factory that a client knows about */ -static void -destroy_factory (CalClient *client) -{ - CalClientPrivate *priv; - CORBA_Environment ev; - int result; - - priv = client->priv; - - CORBA_exception_init (&ev); - result = CORBA_Object_is_nil (priv->factory, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_message ("destroy_factory(): could not see if the factory was nil"); - priv->factory = CORBA_OBJECT_NIL; - CORBA_exception_free (&ev); - return; - } - CORBA_exception_free (&ev); - - if (result) - return; - - CORBA_exception_init (&ev); - CORBA_Object_release (priv->factory, &ev); - if (ev._major != CORBA_NO_EXCEPTION) - g_message ("destroy_factory(): could not release the factory"); - - CORBA_exception_free (&ev); - priv->factory = CORBA_OBJECT_NIL; -} - -/* Gets rid of the listener that a client knows about */ -static void -destroy_listener (CalClient *client) -{ - CalClientPrivate *priv; - - priv = client->priv; - - if (!priv->listener) - return; - - bonobo_object_unref (BONOBO_OBJECT (priv->listener)); - priv->listener = NULL; -} - -/* Gets rid of the calendar client interface object that a client knows about */ -static void -destroy_cal (CalClient *client) -{ - CalClientPrivate *priv; - CORBA_Environment ev; - int result; - - priv = client->priv; - - CORBA_exception_init (&ev); - result = CORBA_Object_is_nil (priv->cal, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_message ("destroy_cal(): could not see if the " - "calendar client interface object was nil"); - priv->cal = CORBA_OBJECT_NIL; - CORBA_exception_free (&ev); - return; - } - CORBA_exception_free (&ev); - - if (result) - return; - - CORBA_exception_init (&ev); - Evolution_Calendar_Cal_unref (priv->cal, &ev); - if (ev._major != CORBA_NO_EXCEPTION) - g_message ("destroy_cal(): could not unref the calendar client interface object"); - - CORBA_exception_free (&ev); - - CORBA_exception_init (&ev); - CORBA_Object_release (priv->cal, &ev); - if (ev._major != CORBA_NO_EXCEPTION) - g_message ("destroy_cal(): could not release the calendar client interface object"); - - CORBA_exception_free (&ev); - priv->cal = CORBA_OBJECT_NIL; - -} - -/* Destroy handler for the calendar client */ -static void -cal_client_destroy (GtkObject *object) -{ - CalClient *client; - CalClientPrivate *priv; - - g_return_if_fail (object != NULL); - g_return_if_fail (IS_CAL_CLIENT (object)); - - client = CAL_CLIENT (object); - priv = client->priv; - - destroy_factory (client); - destroy_listener (client); - destroy_cal (client); - - priv->load_state = LOAD_STATE_NOT_LOADED; - - g_free (priv); - - if (GTK_OBJECT_CLASS (parent_class)->destroy) - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); -} - - - -/* Signal handlers for the listener's signals */ - -/* Handle the cal_loaded signal from the listener */ -static void -cal_loaded_cb (CalListener *listener, - Evolution_Calendar_Listener_LoadStatus status, - Evolution_Calendar_Cal cal, - gpointer data) -{ - CalClient *client; - CalClientPrivate *priv; - CORBA_Environment ev; - Evolution_Calendar_Cal cal_copy; - CalClientLoadStatus client_status; - - client = CAL_CLIENT (data); - priv = client->priv; - - g_assert (priv->load_state == LOAD_STATE_LOADING); - - client_status = CAL_CLIENT_LOAD_ERROR; - - switch (status) { - case Evolution_Calendar_Listener_SUCCESS: - CORBA_exception_init (&ev); - cal_copy = CORBA_Object_duplicate (cal, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_message ("cal_loaded(): could not duplicate the calendar client interface"); - CORBA_exception_free (&ev); - goto error; - } - CORBA_exception_free (&ev); - - priv->cal = cal_copy; - priv->load_state = LOAD_STATE_LOADED; - - client_status = CAL_CLIENT_LOAD_SUCCESS; - goto out; - - case Evolution_Calendar_Listener_ERROR: - client_status = CAL_CLIENT_LOAD_ERROR; - goto error; - - case Evolution_Calendar_Listener_IN_USE: - client_status = CAL_CLIENT_LOAD_IN_USE; - goto error; - - case Evolution_Calendar_Listener_METHOD_NOT_SUPPORTED: - client_status = CAL_CLIENT_LOAD_METHOD_NOT_SUPPORTED; - goto error; - - default: - g_assert_not_reached (); - } - - error: - - bonobo_object_unref (BONOBO_OBJECT (priv->listener)); - priv->listener = NULL; - priv->load_state = LOAD_STATE_NOT_LOADED; - - out: - - g_assert (priv->load_state != LOAD_STATE_LOADING); - - gtk_signal_emit (GTK_OBJECT (client), cal_client_signals[CAL_LOADED], - client_status); -} - -/* Handle the obj_updated signal from the listener */ -static void -obj_updated_cb (CalListener *listener, const Evolution_Calendar_CalObjUID uid, gpointer data) -{ - CalClient *client; - - client = CAL_CLIENT (data); - gtk_signal_emit (GTK_OBJECT (client), cal_client_signals[OBJ_UPDATED], uid); -} - -/* Handle the obj_removed signal from the listener */ -static void -obj_removed_cb (CalListener *listener, const Evolution_Calendar_CalObjUID uid, gpointer data) -{ - CalClient *client; - - client = CAL_CLIENT (data); - gtk_signal_emit (GTK_OBJECT (client), cal_client_signals[OBJ_REMOVED], uid); -} - - - -/** - * cal_client_construct: - * @client: A calendar client. - * - * Constructs a calendar client object by contacting the calendar factory of the - * calendar server. - * - * Return value: The same object as the @client argument, or NULL if the - * calendar factory could not be contacted. - **/ -CalClient * -cal_client_construct (CalClient *client) -{ - CalClientPrivate *priv; - Evolution_Calendar_CalFactory factory, factory_copy; - CORBA_Environment ev; - int result; - - CORBA_exception_init (&ev); - g_return_val_if_fail (client != NULL, NULL); - g_return_val_if_fail (IS_CAL_CLIENT (client), NULL); - - priv = client->priv; - -#ifdef USING_OAF - factory = (Evolution_Calendar_CalFactory) oaf_activate_from_id ( - "OAFIID:evolution:calendar-factory:1c915858-ece3-4a6f-9d81-ea0f108a9554", - OAF_FLAG_NO_LOCAL, NULL, &ev); -#else - factory = (Evolution_Calendar_CalFactory) goad_server_activate_with_id ( - NULL, - "evolution:calendar-factory", - GOAD_ACTIVATE_REMOTE, - NULL); -#endif - - result = CORBA_Object_is_nil (factory, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_message ("cal_client_construct(): could not see if the factory is NIL"); - CORBA_exception_free (&ev); - return NULL; - } - CORBA_exception_free (&ev); - - if (result) { - g_message ("cal_client_construct(): could not contact Tlacuache, " - "the personal calendar server"); - return NULL; - } - - CORBA_exception_init (&ev); - factory_copy = CORBA_Object_duplicate (factory, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_message ("cal_client_construct(): could not duplicate the calendar factory"); - CORBA_exception_free (&ev); - return NULL; - } - CORBA_exception_free (&ev); - - priv->factory = factory_copy; - return client; -} - -/** - * cal_client_new: - * @void: - * - * Creates a new calendar client. It should be initialized by calling - * cal_client_load_calendar() or cal_client_create_calendar(). - * - * Return value: A newly-created calendar client, or NULL if the client could - * not be constructed because it could not contact the calendar server. - **/ -CalClient * -cal_client_new (void) -{ - CalClient *client; - - client = gtk_type_new (CAL_CLIENT_TYPE); - - if (!cal_client_construct (client)) { - g_message ("cal_client_new(): could not construct the calendar client"); - gtk_object_unref (GTK_OBJECT (client)); - return NULL; - } - - return client; -} - -/* Issues a load or create request */ -static gboolean -load_or_create (CalClient *client, const char *str_uri, gboolean load) -{ - CalClientPrivate *priv; - Evolution_Calendar_Listener corba_listener; - CORBA_Environment ev; - - g_return_val_if_fail (client != NULL, FALSE); - g_return_val_if_fail (IS_CAL_CLIENT (client), FALSE); - - priv = client->priv; - g_return_val_if_fail (priv->load_state == LOAD_STATE_NOT_LOADED, FALSE); - - g_return_val_if_fail (str_uri != NULL, FALSE); - - priv->listener = cal_listener_new (); - if (!priv->listener) { - g_message ("load_or_create(): could not create the listener"); - return FALSE; - } - - gtk_signal_connect (GTK_OBJECT (priv->listener), "cal_loaded", - GTK_SIGNAL_FUNC (cal_loaded_cb), - client); - gtk_signal_connect (GTK_OBJECT (priv->listener), "obj_updated", - GTK_SIGNAL_FUNC (obj_updated_cb), - client); - gtk_signal_connect (GTK_OBJECT (priv->listener), "obj_removed", - GTK_SIGNAL_FUNC (obj_removed_cb), - client); - - corba_listener = (Evolution_Calendar_Listener) bonobo_object_corba_objref ( - BONOBO_OBJECT (priv->listener)); - - CORBA_exception_init (&ev); - - priv->load_state = LOAD_STATE_LOADING; - - if (load) - Evolution_Calendar_CalFactory_load (priv->factory, str_uri, corba_listener, &ev); - else - Evolution_Calendar_CalFactory_create (priv->factory, str_uri, corba_listener, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_message ("load_or_create(): load/create request failed"); - bonobo_object_unref (BONOBO_OBJECT (priv->listener)); - priv->listener = NULL; - priv->load_state = LOAD_STATE_NOT_LOADED; - CORBA_exception_free (&ev); - return FALSE; - } - CORBA_exception_free (&ev); - - return TRUE; -} - -/** - * cal_client_load_calendar: - * @client: A calendar client. - * @str_uri: URI of calendar to load. - * - * Makes a calendar client initiate a request to load a calendar. The calendar - * client will emit the "cal_loaded" signal when the response from the server is - * received. - * - * Return value: TRUE on success, FALSE on failure to issue the load request. - **/ -gboolean -cal_client_load_calendar (CalClient *client, const char *str_uri) -{ - return load_or_create (client, str_uri, TRUE); -} - -/** - * cal_client_create_calendar: - * @client: A calendar client. - * @str_uri: URI that will contain the calendar data. - * - * Makes a calendar client initiate a request to create a new calendar. The - * calendar client will emit the "cal_loaded" signal when the response from the - * server is received. - * - * Return value: TRUE on success, FALSE on failure to issue the create request. - **/ -gboolean -cal_client_create_calendar (CalClient *client, const char *str_uri) -{ - return load_or_create (client, str_uri, FALSE); -} - -/** - * cal_client_get_object: - * @client: A calendar client. - * @uid: Unique identifier for a calendar object. - * - * Queries a calendar for a calendar object based on its unique identifier. - * - * Return value: The string representation of a complete calendar wrapping the - * sought object, or NULL if no object had the specified UID. A complete - * calendar is returned because you also need the timezone data. - **/ -char * -cal_client_get_object (CalClient *client, const char *uid) -{ - CalClientPrivate *priv; - CORBA_Environment ev; - Evolution_Calendar_CalObj calobj; - char *retval; - - g_return_val_if_fail (client != NULL, NULL); - g_return_val_if_fail (IS_CAL_CLIENT (client), NULL); - - priv = client->priv; - g_return_val_if_fail (priv->load_state == LOAD_STATE_LOADED, NULL); - - g_return_val_if_fail (uid != NULL, NULL); - - retval = NULL; - - CORBA_exception_init (&ev); - calobj = Evolution_Calendar_Cal_get_object (priv->cal, uid, &ev); - - if (ev._major == CORBA_USER_EXCEPTION - && strcmp (CORBA_exception_id (&ev), ex_Evolution_Calendar_Cal_NotFound) == 0) - goto out; - else if (ev._major != CORBA_NO_EXCEPTION) { - g_message ("cal_client_get_object(): could not get the object"); - goto out; - } - - retval = g_strdup (calobj); - CORBA_free (calobj); - - out: - CORBA_exception_free (&ev); - return retval; -} - -/** - * cal_client_get_uids: - * @client: A calendar client. - * @type: Bitmask with types of objects to return. - * - * Queries a calendar for a list of unique identifiers corresponding to calendar - * objects whose type matches one of the types specified in the @type flags. - * - * Return value: A list of strings that are the sought UIDs. - **/ -GList * -cal_client_get_uids (CalClient *client, CalObjType type) -{ - CalClientPrivate *priv; - CORBA_Environment ev; - Evolution_Calendar_CalObjUIDSeq *seq; - int t; - GList *uids; - int i; - - g_return_val_if_fail (client != NULL, NULL); - g_return_val_if_fail (IS_CAL_CLIENT (client), NULL); - - priv = client->priv; - /*g_return_val_if_fail (priv->load_state == LOAD_STATE_LOADED, NULL);*/ - if (priv->load_state != LOAD_STATE_LOADED) - return NULL; - - t = (((type & CALOBJ_TYPE_EVENT) ? Evolution_Calendar_TYPE_EVENT : 0) - | ((type & CALOBJ_TYPE_TODO) ? Evolution_Calendar_TYPE_TODO : 0) - | ((type & CALOBJ_TYPE_JOURNAL) ? Evolution_Calendar_TYPE_JOURNAL : 0) - | ((type & CALOBJ_TYPE_OTHER) ? Evolution_Calendar_TYPE_OTHER : 0) - /* - | ((type & CALOBJ_TYPE_ANY) ? Evolution_Calendar_TYPE_ANY : 0) - */ - ); - - CORBA_exception_init (&ev); - - seq = Evolution_Calendar_Cal_get_uids (priv->cal, t, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_message ("cal_client_get_uids(): could not get the list of UIDs"); - CORBA_exception_free (&ev); - return NULL; - } - - /* Create the list */ - - uids = NULL; - - for (i = 0; i < seq->_length; i++) - uids = g_list_prepend (uids, g_strdup (seq->_buffer[i])); - - CORBA_free (seq); - - return uids; -} - -/* Builds a GList of CalObjInstance structures from the CORBA sequence */ -static GList * -build_object_instance_list (Evolution_Calendar_CalObjInstanceSeq *seq) -{ - GList *list; - int i; - - /* Create the list in reverse order */ - - list = NULL; - for (i = 0; i < seq->_length; i++) { - Evolution_Calendar_CalObjInstance *corba_icoi; - CalObjInstance *icoi; - - corba_icoi = &seq->_buffer[i]; - icoi = g_new (CalObjInstance, 1); - - icoi->uid = g_strdup (corba_icoi->uid); - icoi->start = corba_icoi->start; - icoi->end = corba_icoi->end; - - list = g_list_prepend (list, icoi); - } - - list = g_list_reverse (list); - return list; -} - -/** - * cal_client_get_events_in_range: - * @client: A calendar client. - * @start: Start time for query. - * @end: End time for query. - * - * Queries a calendar for the events that occur or recur in the specified range - * of time. - * - * Return value: A list of #CalObjInstance structures. - **/ -GList * -cal_client_get_events_in_range (CalClient *client, time_t start, time_t end) -{ - CalClientPrivate *priv; - CORBA_Environment ev; - Evolution_Calendar_CalObjInstanceSeq *seq; - GList *events; - - g_return_val_if_fail (client != NULL, NULL); - g_return_val_if_fail (IS_CAL_CLIENT (client), NULL); - - priv = client->priv; - if (priv->load_state != LOAD_STATE_LOADED) - return NULL; - - g_return_val_if_fail (start != -1 && end != -1, NULL); - g_return_val_if_fail (start <= end, NULL); - - CORBA_exception_init (&ev); - - seq = Evolution_Calendar_Cal_get_events_in_range (priv->cal, start, end, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_message ("cal_client_get_events_in_range(): could not get the event range"); - CORBA_exception_free (&ev); - return NULL; - } - CORBA_exception_free (&ev); - - events = build_object_instance_list (seq); - CORBA_free (seq); - - return events; -} - -/* Translates the CORBA representation of an AlarmType */ -static enum AlarmType -uncorba_alarm_type (Evolution_Calendar_AlarmType corba_type) -{ - switch (corba_type) { - case Evolution_Calendar_MAIL: - return ALARM_MAIL; - - case Evolution_Calendar_PROGRAM: - return ALARM_PROGRAM; - - case Evolution_Calendar_DISPLAY: - return ALARM_DISPLAY; - - case Evolution_Calendar_AUDIO: - return ALARM_AUDIO; - - default: - g_assert_not_reached (); - return ALARM_DISPLAY; - } -} - -/* Builds a GList of CalAlarmInstance structures from the CORBA sequence */ -static GList * -build_alarm_instance_list (Evolution_Calendar_CalAlarmInstanceSeq *seq) -{ - GList *list; - int i; - - /* Create the list in reverse order */ - - list = NULL; - for (i = 0; i < seq->_length; i++) { - Evolution_Calendar_CalAlarmInstance *corba_ai; - CalAlarmInstance *ai; - - corba_ai = &seq->_buffer[i]; - ai = g_new (CalAlarmInstance, 1); - - ai->uid = g_strdup (corba_ai->uid); - ai->type = uncorba_alarm_type (corba_ai->type); - ai->trigger = corba_ai->trigger; - ai->occur = corba_ai->occur; - - list = g_list_prepend (list, ai); - } - - list = g_list_reverse (list); - return list; -} - -/** - * cal_client_get_alarms_in_range: - * @client: A calendar client. - * @start: Start time for query. - * @end: End time for query. - * - * Queries a calendar for the alarms that trigger in the specified range of - * time. - * - * Return value: A list of #CalAlarmInstance structures. - **/ -GList * -cal_client_get_alarms_in_range (CalClient *client, time_t start, time_t end) -{ - CalClientPrivate *priv; - CORBA_Environment ev; - Evolution_Calendar_CalAlarmInstanceSeq *seq; - GList *alarms; - - g_return_val_if_fail (client != NULL, NULL); - g_return_val_if_fail (IS_CAL_CLIENT (client), NULL); - - priv = client->priv; - if (priv->load_state != LOAD_STATE_LOADED) - return NULL; - - g_return_val_if_fail (start != -1 && end != -1, NULL); - g_return_val_if_fail (start <= end, NULL); - - CORBA_exception_init (&ev); - - seq = Evolution_Calendar_Cal_get_alarms_in_range (priv->cal, start, end, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_message ("cal_client_get_alarms_in_range(): could not get the alarm range"); - CORBA_exception_free (&ev); - return NULL; - } - CORBA_exception_free (&ev); - - alarms = build_alarm_instance_list (seq); - CORBA_free (seq); - - return alarms; -} - -/** - * cal_client_get_alarms_for_object: - * @client: A calendar client. - * @uid: Unique identifier for a calendar object. - * @start: Start time for query. - * @end: End time for query. - * @alarms: Return value for the list of alarm instances. - * - * Queries a calendar for the alarms of a particular object that trigger in the - * specified range of time. - * - * Return value: TRUE on success, FALSE if the object was not found. - **/ -gboolean -cal_client_get_alarms_for_object (CalClient *client, const char *uid, - time_t start, time_t end, - GList **alarms) -{ - CalClientPrivate *priv; - CORBA_Environment ev; - Evolution_Calendar_CalAlarmInstanceSeq *seq; - gboolean retval; - - g_return_val_if_fail (client != NULL, FALSE); - g_return_val_if_fail (IS_CAL_CLIENT (client), FALSE); - - priv = client->priv; - if (priv->load_state != LOAD_STATE_LOADED) - return FALSE; - - g_return_val_if_fail (uid != NULL, FALSE); - g_return_val_if_fail (start != -1 && end != -1, FALSE); - g_return_val_if_fail (start <= end, FALSE); - g_return_val_if_fail (alarms != NULL, FALSE); - - *alarms = NULL; - retval = FALSE; - - CORBA_exception_init (&ev); - - seq = Evolution_Calendar_Cal_get_alarms_for_object (priv->cal, uid, start, end, &ev); - if (ev._major == CORBA_USER_EXCEPTION - && strcmp (CORBA_exception_id (&ev), ex_Evolution_Calendar_Cal_NotFound) == 0) - goto out; - else if (ev._major != CORBA_NO_EXCEPTION) { - g_message ("cal_client_get_alarms_for_object(): could not get the alarm range"); - goto out; - } - - retval = TRUE; - *alarms = build_alarm_instance_list (seq); - CORBA_free (seq); - - out: - CORBA_exception_free (&ev); - return retval; - -} - -/** - * cal_client_update_object: - * @client: A calendar client. - * @uid: Unique identifier of object to update. - * @calobj: String representation of the new calendar object. - * - * Asks a calendar to update an object based on its UID. Any existing object - * with the specified UID will be replaced. The client program should not - * assume that the object is actually in the server's storage until it has - * received the "obj_updated" notification signal. - * - * Return value: TRUE on success, FALSE on specifying an invalid object. - **/ -gboolean -cal_client_update_object (CalClient *client, const char *uid, const char *calobj) -{ - CalClientPrivate *priv; - CORBA_Environment ev; - gboolean retval; - - g_return_val_if_fail (client != NULL, FALSE); - g_return_val_if_fail (IS_CAL_CLIENT (client), FALSE); - - priv = client->priv; - g_return_val_if_fail (priv->load_state == LOAD_STATE_LOADED, FALSE); - - g_return_val_if_fail (uid != NULL, FALSE); - g_return_val_if_fail (calobj != NULL, FALSE); - - retval = FALSE; - - CORBA_exception_init (&ev); - Evolution_Calendar_Cal_update_object (priv->cal, uid, calobj, &ev); - - if (ev._major == CORBA_USER_EXCEPTION && - strcmp (CORBA_exception_id (&ev), ex_Evolution_Calendar_Cal_InvalidObject) == 0) - goto out; - else if (ev._major != CORBA_NO_EXCEPTION) { - g_message ("cal_client_update_object(): could not update the object"); - goto out; - } - - retval = TRUE; - - out: - CORBA_exception_free (&ev); - return retval; -} - -gboolean -cal_client_remove_object (CalClient *client, const char *uid) -{ - CalClientPrivate *priv; - CORBA_Environment ev; - gboolean retval; - - g_return_val_if_fail (client != NULL, FALSE); - g_return_val_if_fail (IS_CAL_CLIENT (client), FALSE); - - priv = client->priv; - g_return_val_if_fail (priv->load_state == LOAD_STATE_LOADED, FALSE); - - g_return_val_if_fail (uid != NULL, FALSE); - - retval = FALSE; - - CORBA_exception_init (&ev); - Evolution_Calendar_Cal_remove_object (priv->cal, uid, &ev); - - if (ev._major == CORBA_USER_EXCEPTION && - strcmp (CORBA_exception_id (&ev), ex_Evolution_Calendar_Cal_NotFound) == 0) - goto out; - else if (ev._major != CORBA_NO_EXCEPTION) { - g_message ("cal_client_remove_object(): could not remove the object"); - goto out; - } - - retval = TRUE; - - out: - CORBA_exception_free (&ev); - return retval; -} diff --git a/calendar/cal-client/cal-client.h b/calendar/cal-client/cal-client.h deleted file mode 100644 index 12cbcc7c87..0000000000 --- a/calendar/cal-client/cal-client.h +++ /dev/null @@ -1,97 +0,0 @@ -/* Evolution calendar client - * - * Copyright (C) 2000 Helix Code, Inc. - * - * Author: Federico Mena-Quintero - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. - */ - -#ifndef CAL_CLIENT_H -#define CAL_CLIENT_H - -#include -#include -#include - -BEGIN_GNOME_DECLS - - - -#define CAL_CLIENT_TYPE (cal_client_get_type ()) -#define CAL_CLIENT(obj) (GTK_CHECK_CAST ((obj), CAL_CLIENT_TYPE, CalClient)) -#define CAL_CLIENT_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), CAL_CLIENT_TYPE, CalClientClass)) -#define IS_CAL_CLIENT(obj) (GTK_CHECK_TYPE ((obj), CAL_CLIENT_TYPE)) -#define IS_CAL_CLIENT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), CAL_CLIENT_TYPE)) - -typedef struct _CalClient CalClient; -typedef struct _CalClientClass CalClientClass; - -/* Load status for the cal_loaded signal */ -typedef enum { - CAL_CLIENT_LOAD_SUCCESS, - CAL_CLIENT_LOAD_ERROR, - CAL_CLIENT_LOAD_IN_USE, - CAL_CLIENT_LOAD_METHOD_NOT_SUPPORTED -} CalClientLoadStatus; - -struct _CalClient { - GtkObject object; - - /* Private data */ - gpointer priv; -}; - -struct _CalClientClass { - GtkObjectClass parent_class; - - /* Notification signals */ - - void (* cal_loaded) (CalClient *client, CalClientLoadStatus status); - - void (* obj_updated) (CalClient *client, const char *uid); - void (* obj_removed) (CalClient *client, const char *uid); -}; - -GtkType cal_client_get_type (void); - -CalClient *cal_client_construct (CalClient *client); - -CalClient *cal_client_new (void); - -gboolean cal_client_load_calendar (CalClient *client, const char *str_uri); -gboolean cal_client_create_calendar (CalClient *client, const char *str_uri); - -char *cal_client_get_object (CalClient *client, const char *uid); - -GList *cal_client_get_uids (CalClient *client, CalObjType type); - -GList *cal_client_get_events_in_range (CalClient *client, time_t start, time_t end); - -GList *cal_client_get_alarms_in_range (CalClient *client, time_t start, time_t end); - -gboolean cal_client_get_alarms_for_object (CalClient *client, const char *uid, - time_t start, time_t end, - GList **alarms); - -gboolean cal_client_update_object (CalClient *client, const char *uid, const char *calobj); - -gboolean cal_client_remove_object (CalClient *client, const char *uid); - - - -END_GNOME_DECLS - -#endif diff --git a/calendar/cal-client/cal-listener.c b/calendar/cal-client/cal-listener.c deleted file mode 100644 index 884d64e8f9..0000000000 --- a/calendar/cal-client/cal-listener.c +++ /dev/null @@ -1,402 +0,0 @@ -/* Evolution calendar listener - * - * Copyright (C) 2000 Helix Code, Inc. - * - * Author: Federico Mena-Quintero - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. - */ - -#include -#include -#include "cal-listener.h" - - - -/* Private part of the CalListener structure */ -typedef struct { - /* The calendar this listener refers to */ - Evolution_Calendar_Cal cal; -} CalListenerPrivate; - - - -/* Signal IDs */ -enum { - CAL_LOADED, - OBJ_UPDATED, - OBJ_REMOVED, - LAST_SIGNAL -}; - -static void cal_listener_class_init (CalListenerClass *class); -static void cal_listener_init (CalListener *listener); -static void cal_listener_destroy (GtkObject *object); - -static void marshal_cal_loaded (GtkObject *object, GtkSignalFunc func, gpointer data, GtkArg *args); - -static POA_Evolution_Calendar_Listener__vepv cal_listener_vepv; - -static guint cal_listener_signals[LAST_SIGNAL]; - -static BonoboObjectClass *parent_class; - - - -/** - * cal_listener_get_type: - * @void: - * - * Registers the #CalListener class if necessary, and returns the type ID - * associated to it. - * - * Return value: The type ID of the #CalListener class. - **/ -GtkType -cal_listener_get_type (void) -{ - static GtkType cal_listener_type = 0; - - if (!cal_listener_type) { - static const GtkTypeInfo cal_listener_info = { - "CalListener", - sizeof (CalListener), - sizeof (CalListenerClass), - (GtkClassInitFunc) cal_listener_class_init, - (GtkObjectInitFunc) cal_listener_init, - NULL, /* reserved_1 */ - NULL, /* reserved_2 */ - (GtkClassInitFunc) NULL - }; - - cal_listener_type = gtk_type_unique (bonobo_object_get_type (), &cal_listener_info); - } - - return cal_listener_type; -} - -/* CORBA class initialization function for the calendar listener */ -static void -init_cal_listener_corba_class (void) -{ - cal_listener_vepv.Bonobo_Unknown_epv = bonobo_object_get_epv (); - cal_listener_vepv.Evolution_Calendar_Listener_epv = cal_listener_get_epv (); -} - -/* Class initialization function for the calendar listener */ -static void -cal_listener_class_init (CalListenerClass *class) -{ - GtkObjectClass *object_class; - - object_class = (GtkObjectClass *) class; - - parent_class = gtk_type_class (bonobo_object_get_type ()); - - cal_listener_signals[CAL_LOADED] = - gtk_signal_new ("cal_loaded", - GTK_RUN_FIRST, - object_class->type, - GTK_SIGNAL_OFFSET (CalListenerClass, cal_loaded), - marshal_cal_loaded, - GTK_TYPE_NONE, 2, - GTK_TYPE_ENUM, - GTK_TYPE_POINTER); - cal_listener_signals[OBJ_UPDATED] = - gtk_signal_new ("obj_updated", - GTK_RUN_FIRST, - object_class->type, - GTK_SIGNAL_OFFSET (CalListenerClass, obj_updated), - gtk_marshal_NONE__POINTER, - GTK_TYPE_NONE, 1, - GTK_TYPE_POINTER); - cal_listener_signals[OBJ_REMOVED] = - gtk_signal_new ("obj_removed", - GTK_RUN_FIRST, - object_class->type, - GTK_SIGNAL_OFFSET (CalListenerClass, obj_removed), - gtk_marshal_NONE__POINTER, - GTK_TYPE_NONE, 1, - GTK_TYPE_POINTER); - - gtk_object_class_add_signals (object_class, cal_listener_signals, LAST_SIGNAL); - - object_class->destroy = cal_listener_destroy; - - init_cal_listener_corba_class (); -} - -/* Object initialization function for the calendar listener */ -static void -cal_listener_init (CalListener *listener) -{ - CalListenerPrivate *priv; - - priv = g_new0 (CalListenerPrivate, 1); - listener->priv = priv; - - priv->cal = CORBA_OBJECT_NIL; -} - -/* Destroy handler for the calendar listener */ -static void -cal_listener_destroy (GtkObject *object) -{ - CalListener *listener; - CalListenerPrivate *priv; - CORBA_Environment ev; - gboolean result; - - g_return_if_fail (object != NULL); - g_return_if_fail (IS_CAL_LISTENER (object)); - - listener = CAL_LISTENER (object); - priv = listener->priv; - - CORBA_exception_init (&ev); - result = CORBA_Object_is_nil (priv->cal, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) - g_message ("cal_listener_destroy(): could not see if the calendar was NIL"); - else if (!result) { - CORBA_exception_free (&ev); - - CORBA_exception_init (&ev); - CORBA_Object_release (priv->cal, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) - g_message ("cal_listener_destroy(): could not release the calendar"); - - priv->cal = CORBA_OBJECT_NIL; - } - CORBA_exception_free (&ev); - - g_free (priv); - - if (GTK_OBJECT_CLASS (parent_class)->destroy) - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); -} - - - -/* Marshalers */ - -typedef void (* CalLoadedFunc) (GtkObject *object, gint status, gpointer cal, gpointer data); - -static void -marshal_cal_loaded (GtkObject *object, GtkSignalFunc func, gpointer data, GtkArg *args) -{ - CalLoadedFunc rfunc; - - rfunc = (CalLoadedFunc) func; - (* rfunc) (object, GTK_VALUE_ENUM (args[0]), GTK_VALUE_POINTER (args[1]), data); -} - - - -/* CORBA servant implementation */ - -/* Listener::cal_loaded method */ -static void -Listener_cal_loaded (PortableServer_Servant servant, - Evolution_Calendar_Listener_LoadStatus status, - Evolution_Calendar_Cal cal, - CORBA_Environment *ev) -{ - CalListener *listener; - CalListenerPrivate *priv; - CORBA_Environment aev; - Evolution_Calendar_Cal cal_copy; - - listener = CAL_LISTENER (bonobo_object_from_servant (servant)); - priv = listener->priv; - - if (priv->cal != CORBA_OBJECT_NIL) { - g_message ("Listener_cal_loaded(): calendar was already loaded!"); - return; - } - - CORBA_exception_init (&aev); - cal_copy = CORBA_Object_duplicate (cal, &aev); - - if (aev._major != CORBA_NO_EXCEPTION) { - g_message ("Listener_cal_loaded(): could not duplicate the calendar"); - CORBA_exception_free (&aev); - return; - } - CORBA_exception_free (&aev); - - priv->cal = cal_copy; - - gtk_signal_emit (GTK_OBJECT (listener), cal_listener_signals[CAL_LOADED], - status, cal); -} - -/* Listener::obj_updated method */ -static void -Listener_obj_updated (PortableServer_Servant servant, - Evolution_Calendar_CalObjUID uid, - CORBA_Environment *ev) -{ - CalListener *listener; - - listener = CAL_LISTENER (bonobo_object_from_servant (servant)); - gtk_signal_emit (GTK_OBJECT (listener), cal_listener_signals[OBJ_UPDATED], - uid); -} - -/* Listener::obj_removed method */ -static void -Listener_obj_removed (PortableServer_Servant servant, - Evolution_Calendar_CalObjUID uid, - CORBA_Environment *ev) -{ - CalListener *listener; - - listener = CAL_LISTENER (bonobo_object_from_servant (servant)); - gtk_signal_emit (GTK_OBJECT (listener), cal_listener_signals[OBJ_REMOVED], - uid); -} - -/** - * cal_listener_get_epv: - * @void: - * - * Creates an EPV for the Listener CORBA class. - * - * Return value: A newly-allocated EPV. - **/ -POA_Evolution_Calendar_Listener__epv * -cal_listener_get_epv (void) -{ - POA_Evolution_Calendar_Listener__epv *epv; - - epv = g_new0 (POA_Evolution_Calendar_Listener__epv, 1); - epv->cal_loaded = Listener_cal_loaded; - epv->obj_updated = Listener_obj_updated; - epv->obj_removed = Listener_obj_removed; - return epv; -} - - - -/** - * cal_listener_construct: - * @listener: A calendar listener. - * @corba_listener: CORBA object for the calendar listener. - * - * Constructs a calendar listener by binding the corresponding CORBA object to - * it. - * - * Return value: the same object as the @listener argument. - **/ -CalListener * -cal_listener_construct (CalListener *listener, Evolution_Calendar_Listener corba_listener) -{ - g_return_val_if_fail (listener != NULL, NULL); - g_return_val_if_fail (IS_CAL_LISTENER (listener), NULL); - - bonobo_object_construct (BONOBO_OBJECT (listener), corba_listener); - return listener; -} - -/** - * cal_listener_corba_object_create: - * @object: #BonoboObject that will wrap the CORBA object. - * - * Creates and activates the CORBA object that is wrapped by the specified - * calendar listener @object. - * - * Return value: An activated object reference or #CORBA_OBJECT_NIL in case of - * failure. - **/ -Evolution_Calendar_Listener -cal_listener_corba_object_create (BonoboObject *object) -{ - POA_Evolution_Calendar_Listener *servant; - CORBA_Environment ev; - - g_return_val_if_fail (object != NULL, CORBA_OBJECT_NIL); - g_return_val_if_fail (IS_CAL_LISTENER (object), CORBA_OBJECT_NIL); - - servant = (POA_Evolution_Calendar_Listener *) g_new0 (BonoboObjectServant, 1); - servant->vepv = &cal_listener_vepv; - - CORBA_exception_init (&ev); - POA_Evolution_Calendar_Listener__init ((PortableServer_Servant) servant, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_free (servant); - CORBA_exception_free (&ev); - return CORBA_OBJECT_NIL; - } - - CORBA_exception_free (&ev); - return (Evolution_Calendar_Listener) bonobo_object_activate_servant (object, servant); -} - -/** - * cal_listener_new: - * @void: - * - * Creates a new #CalListener object. - * - * Return value: A newly-created #CalListener, or NULL if its corresponding - * CORBA object could not be created. - **/ -CalListener * -cal_listener_new (void) -{ - CalListener *listener; - CORBA_Environment ev; - Evolution_Calendar_Listener corba_listener; - gboolean result; - - listener = gtk_type_new (CAL_LISTENER_TYPE); - - corba_listener = cal_listener_corba_object_create (BONOBO_OBJECT (listener)); - - CORBA_exception_init (&ev); - result = CORBA_Object_is_nil (corba_listener, &ev); - - if (ev._major != CORBA_NO_EXCEPTION || result) { - g_message ("cal_listener_new(): could not create the CORBA listener"); - bonobo_object_unref (BONOBO_OBJECT (listener)); - CORBA_exception_free (&ev); - return NULL; - } - CORBA_exception_free (&ev); - - return cal_listener_construct (listener, corba_listener); -} - -/** - * cal_listener_get_calendar: - * @listener: A calendar listener. - * - * Queries the calendar that a listener is watching. - * - * Return value: The calendar that the listener is watching. - **/ -Evolution_Calendar_Cal -cal_listener_get_calendar (CalListener *listener) -{ - CalListenerPrivate *priv; - - g_return_val_if_fail (listener != NULL, CORBA_OBJECT_NIL); - g_return_val_if_fail (IS_CAL_LISTENER (listener), CORBA_OBJECT_NIL); - - priv = listener->priv; - return priv->cal; -} diff --git a/calendar/cal-client/cal-listener.h b/calendar/cal-client/cal-listener.h deleted file mode 100644 index 171da0d5c3..0000000000 --- a/calendar/cal-client/cal-listener.h +++ /dev/null @@ -1,79 +0,0 @@ -/* Evolution calendar listener - * - * Copyright (C) 2000 Helix Code, Inc. - * - * Author: Federico Mena-Quintero - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. - */ - -#ifndef CAL_LISTENER_H -#define CAL_LISTENER_H - -#include -#include -#include "evolution-calendar.h" - -BEGIN_GNOME_DECLS - - - -#define CAL_LISTENER_TYPE (cal_listener_get_type ()) -#define CAL_LISTENER(obj) (GTK_CHECK_CAST ((obj), CAL_LISTENER_TYPE, CalListener)) -#define CAL_LISTENER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), CAL_LISTENER_TYPE, \ - CalListenerClass)) -#define IS_CAL_LISTENER(obj) (GTK_CHECK_TYPE ((obj), CAL_LISTENER_TYPE)) -#define IS_CAL_LISTENER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), CAL_LISTENER_TYPE)) - -typedef struct _CalListener CalListener; -typedef struct _CalListenerClass CalListenerClass; - -struct _CalListener { - BonoboObject object; - - /* Private data */ - gpointer priv; -}; - -struct _CalListenerClass { - BonoboObjectClass parent_class; - - /* Notification signals */ - - void (* cal_loaded) (CalListener *listener, - Evolution_Calendar_Listener_LoadStatus status, - Evolution_Calendar_Cal cal); - void (* obj_updated) (CalListener *listener, const Evolution_Calendar_CalObjUID uid); - void (* obj_removed) (CalListener *listener, const Evolution_Calendar_CalObjUID uid); -}; - -GtkType cal_listener_get_type (void); - -CalListener *cal_listener_construct (CalListener *listener, - Evolution_Calendar_Listener corba_listener); - -Evolution_Calendar_Listener cal_listener_corba_object_create (BonoboObject *object); - -CalListener *cal_listener_new (void); - -Evolution_Calendar_Cal cal_listener_get_calendar (CalListener *listener); - -POA_Evolution_Calendar_Listener__epv *cal_listener_get_epv (void); - - - -END_GNOME_DECLS - -#endif diff --git a/calendar/cal-client/client-test.c b/calendar/cal-client/client-test.c deleted file mode 100644 index f4b847eb65..0000000000 --- a/calendar/cal-client/client-test.c +++ /dev/null @@ -1,205 +0,0 @@ -#include -#include -#include -#include -static CalClient *client1; -static CalClient *client2; - -/* Prints a message with a client identifier */ -static void -cl_printf (CalClient *client, const char *format, ...) -{ - va_list args; - - va_start (args, format); - printf ("Client %s: ", - client == client1 ? "1" : - client == client2 ? "2" : - "UNKNOWN"); - vprintf (format, args); - va_end (args); -} - -/* Lists the UIDs of objects in a calendar, called as an idle handler */ -static gboolean -list_uids (gpointer data) -{ - CalClient *client; - GList *uids; - GList *l; - - client = CAL_CLIENT (data); - - uids = cal_client_get_uids (client, CALOBJ_TYPE_ANY); - - cl_printf (client, "UIDs: "); - - if (!uids) - printf ("none\n"); - else { - for (l = uids; l; l = l->next) { - char *uid; - - uid = l->data; - printf ("`%s' ", uid); - } - - printf ("\n"); - - for (l = uids; l; l = l->next) { - char *uid; - char *calobj; - - uid = l->data; - calobj = cal_client_get_object (client, uid); - - printf ("------------------------------\n%s", calobj); - printf ("------------------------------\n"); - - cal_client_update_object (client, uid, calobj); - - g_free (calobj); - } - } - - cal_obj_uid_list_free (uids); - - gtk_object_unref (GTK_OBJECT (client)); - - return FALSE; -} - -/* Callback used when a calendar is loaded */ -static void -cal_loaded (CalClient *client, CalClientLoadStatus status, gpointer data) -{ - cl_printf (client, "Load/create %s\n", - ((status == CAL_CLIENT_LOAD_SUCCESS) ? "success" : - (status == CAL_CLIENT_LOAD_ERROR) ? "error" : - (status == CAL_CLIENT_LOAD_IN_USE) ? "in use" : - "unknown status value")); - - if (status == CAL_CLIENT_LOAD_SUCCESS) - g_idle_add (list_uids, client); - else - gtk_object_unref (GTK_OBJECT (client)); -} - -/* Callback used when an object is updated */ -static void -obj_updated (CalClient *client, const char *uid, gpointer data) -{ - cl_printf (client, "Object updated: %s\n", uid); -} - -/* Creates a calendar client and tries to load the specified URI into it */ -static CalClient * -create_client (const char *uri, gboolean load) -{ - CalClient *client; - gboolean result; - - client = cal_client_new (); - if (!client) { - g_message ("create_client(): could not create the client"); - exit (1); - } - - gtk_signal_connect (GTK_OBJECT (client), "cal_loaded", - GTK_SIGNAL_FUNC (cal_loaded), - NULL); - gtk_signal_connect (GTK_OBJECT (client), "obj_updated", - GTK_SIGNAL_FUNC (obj_updated), - NULL); - - printf ("Calendar loading `%s'...\n", uri); - - if (load) - result = cal_client_load_calendar (client, uri); - else - result = cal_client_create_calendar (client, uri); - - if (!result) { - g_message ("create_client(): failure when issuing calendar %s request `%s'", - load ? "load" : "create", - uri); - exit (1); - } - - return client; -} - -/* Callback used when a client is destroyed */ -static void -client_destroy_cb (GtkObject *object, gpointer data) -{ - if (CAL_CLIENT (object) == client1) - client1 = NULL; - else if (CAL_CLIENT (object) == client2) - client2 = NULL; - else - g_assert_not_reached (); - - if (!client1 && !client2) - gtk_main_quit (); -} - -#ifdef USING_OAF - -#include - -static void -init_corba (int *argc, char **argv) -{ - gnome_init ("tl-test", VERSION, *argc, argv); - oaf_init (*argc, argv); -} - -#else - -#include - -static void -init_corba (int *argc, char **argv) -{ - CORBA_Environment ev; - - CORBA_exception_init (&ev); - gnome_CORBA_init ("tl-test", VERSION, &argc, argv, 0, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_message ("main(): could not initialize the ORB"); - CORBA_exception_free (&ev); - exit (1); - } - CORBA_exception_free (&ev); -} - -#endif - -int -main (int argc, char **argv) -{ - bindtextdomain (PACKAGE, GNOMELOCALEDIR); - textdomain (PACKAGE); - - init_corba (&argc, argv); - - if (!bonobo_init (CORBA_OBJECT_NIL, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL)) { - g_message ("main(): could not initialize Bonobo"); - exit (1); - } - - client1 = create_client ("/cvs/evolution/calendar/gui/test2.vcf", TRUE); - gtk_signal_connect (GTK_OBJECT (client1), "destroy", - client_destroy_cb, - NULL); - - client2 = create_client ("/cvs/evolution/calendar/gui/test2.vcf", FALSE); - gtk_signal_connect (GTK_OBJECT (client2), "destroy", - client_destroy_cb, - NULL); - - bonobo_main (); - - return 0; -} diff --git a/calendar/cal-util/.cvsignore b/calendar/cal-util/.cvsignore deleted file mode 100644 index fe97f9aa2c..0000000000 --- a/calendar/cal-util/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -.libs -Makefile.in -Makefile -.deps -*.lo -*.la diff --git a/calendar/cal-util/Makefile.am b/calendar/cal-util/Makefile.am deleted file mode 100644 index f110e96394..0000000000 --- a/calendar/cal-util/Makefile.am +++ /dev/null @@ -1,25 +0,0 @@ -INCLUDES = \ - -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \ - -DG_LOG_DOMAIN=\"cal-util\" \ - -I$(top_srcdir) \ - -I$(top_srcdir)/calendar \ - -I. \ - -I.. \ - -I$(top_builddir) \ - $(GNOME_INCLUDEDIR) - -lib_LTLIBRARIES = libcal-util.la - -libcal_util_la_SOURCES = \ - cal-recur.c \ - cal-util.c \ - calobj.c \ - timeutil.c - -libcal_utilincludedir = $(includedir)/evolution/cal-util - -libcal_utilinclude_HEADERS = \ - cal-recur.h \ - cal-util.h \ - calobj.h \ - timeutil.h diff --git a/calendar/cal-util/cal-recur.c b/calendar/cal-util/cal-recur.c deleted file mode 100644 index 711ef5e64d..0000000000 --- a/calendar/cal-util/cal-recur.c +++ /dev/null @@ -1,1131 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * Evolution calendar recurrence rule functions - * - * Copyright (C) 2000 Helix Code, Inc. - * - * Author: Damon Chaplin - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. - */ - -#include -#include -#include -#include - - -/* - * Introduction to The Recurrence Generation Functions: - * - * Note: This is pretty complicated. See the iCalendar spec (RFC 2445) for - * the specification of the recurrence rules and lots of examples - * (sections 4.3.10 & 4.8.5). We also want to support the older - * vCalendar spec, though this should be easy since it is basically a - * subset of iCalendar. - * - * o An iCalendar event can have any number of recurrence rules specifying - * occurrences of the event, as well as dates & times of specific - * occurrences. It can also have any number of recurrence rules and - * specific dates & times specifying exceptions to the occurrences. - * So we first merge all the occurrences generated, eliminating any - * duplicates, then we generate all the exceptions and remove these to - * form the final set of occurrences. - * - * o There are 7 frequencies of occurrences: YEARLY, MONTHLY, WEEKLY, DAILY, - * HOURLY, MINUTELY & SECONDLY. The 'interval' property specifies the - * multiples of the frequency between each 'set' of occurrences. So for - * a YEARLY frequency with an interval of 3, we generate a set of occurrences - * for every 3rd year. We use complete years here - any generated - * occurrences that occur before the event's start (or after its end) - * are just discarded. - * - * o There are 8 frequency modifiers: BYMONTH, BYWEEKNO, BYYEARDAY, BYMONTHDAY, - * BYDAY, BYHOUR & BYSECOND. These can either add extra occurrences or - * filter out occurrences. For example 'FREQ=YEARLY;BYMONTH=1,2' produces - * 2 occurrences for each year rather than the default 1. And - * 'FREQ=DAILY; BYMONTH=1' filters out all occurrences except those in Jan. - * If the modifier works on periods which are less than the recurrence - * frequency, then extra occurrences are added, else occurrences are - * filtered. So we have 2 functions for each modifier - one to expand events - * and the other to filter. We use a table of functions for each frequency - * which points to the appropriate function to use for each modifier. - * - * o Any number of frequency modifiers can be used in a recurrence rule - * (though BYWEEKNO can only be used in a YEARLY rule). They are applied in - * the order given above. - * - * o After the set of occurrences for the frequency interval are generated, - * the BYSETPOS property is used to select which of the occurrences are - * finally output. If BYSETPOS is not specified then all the occurrences are - * output. - */ - - -#define CAL_OBJ_NUM_FILTERS 8 - -typedef gboolean (*CalObjFindStartFn) (CalObjTime *event_start, - CalObjTime *event_end, - Recurrence *recur, - CalObjTime *interval_start, - CalObjTime *interval_end, - CalObjTime *cotime); -typedef gboolean (*CalObjFindNextFn) (CalObjTime *cotime, - CalObjTime *event_end, - Recurrence *recur, - CalObjTime *interval_end); -typedef GArray* (*CalObjFilterFn) (Recurrence *recur, - GArray *occs); - -typedef struct _CalObjRecurVTable CalObjRecurVTable; -struct _CalObjRecurVTable { - CalObjFindStartFn find_start_position; - CalObjFindNextFn find_next_position; - CalObjFilterFn filters[CAL_OBJ_NUM_FILTERS]; -}; - - -static CalObjRecurVTable* cal_obj_get_vtable (Recurrence *recur); -static void cal_obj_sort_occurrences (GArray *occs); -static gint cal_obj_time_compare_func (const void *arg1, - const void *arg2); -static void cal_obj_remove_duplicates (GArray *occs); -static GArray* cal_obj_bysetpos_filter (GArray *occs); - - -static gboolean cal_obj_yearly_find_start_position (CalObjTime *event_start, - CalObjTime *event_end, - Recurrence *recur, - CalObjTime *interval_start, - CalObjTime *interval_end, - CalObjTime *cotime); -static gboolean cal_obj_yearly_find_next_position (CalObjTime *cotime, - CalObjTime *event_end, - Recurrence *recur, - CalObjTime *interval_end); - -static gboolean cal_obj_monthly_find_start_position (CalObjTime *event_start, - CalObjTime *event_end, - Recurrence *recur, - CalObjTime *interval_start, - CalObjTime *interval_end, - CalObjTime *cotime); -static gboolean cal_obj_monthly_find_next_position (CalObjTime *cotime, - CalObjTime *event_end, - Recurrence *recur, - CalObjTime *interval_end); - -static gboolean cal_obj_weekly_find_start_position (CalObjTime *event_start, - CalObjTime *event_end, - Recurrence *recur, - CalObjTime *interval_start, - CalObjTime *interval_end, - CalObjTime *cotime); -static gboolean cal_obj_weekly_find_next_position (CalObjTime *cotime, - CalObjTime *event_end, - Recurrence *recur, - CalObjTime *interval_end); - -static gboolean cal_obj_daily_find_start_position (CalObjTime *event_start, - CalObjTime *event_end, - Recurrence *recur, - CalObjTime *interval_start, - CalObjTime *interval_end, - CalObjTime *cotime); -static gboolean cal_obj_daily_find_next_position (CalObjTime *cotime, - CalObjTime *event_end, - Recurrence *recur, - CalObjTime *interval_end); - -static gboolean cal_obj_hourly_find_start_position (CalObjTime *event_start, - CalObjTime *event_end, - Recurrence *recur, - CalObjTime *interval_start, - CalObjTime *interval_end, - CalObjTime *cotime); -static gboolean cal_obj_hourly_find_next_position (CalObjTime *cotime, - CalObjTime *event_end, - Recurrence *recur, - CalObjTime *interval_end); - -static gboolean cal_obj_minutely_find_start_position (CalObjTime *event_start, - CalObjTime *event_end, - Recurrence *recur, - CalObjTime *interval_start, - CalObjTime *interval_end, - CalObjTime *cotime); -static gboolean cal_obj_minutely_find_next_position (CalObjTime *cotime, - CalObjTime *event_end, - Recurrence *recur, - CalObjTime *interval_end); - -static gboolean cal_obj_secondly_find_start_position (CalObjTime *event_start, - CalObjTime *event_end, - Recurrence *recur, - CalObjTime *interval_start, - CalObjTime *interval_end, - CalObjTime *cotime); -static gboolean cal_obj_secondly_find_next_position (CalObjTime *cotime, - CalObjTime *event_end, - Recurrence *recur, - CalObjTime *interval_end); - -static GArray* cal_obj_bymonth_expand (Recurrence *recur, - GArray *occs); -static GArray* cal_obj_bymonth_filter (Recurrence *recur, - GArray *occs); -static GArray* cal_obj_byweekno_expand (Recurrence *recur, - GArray *occs); -#if 0 -/* This isn't used at present. */ -static GArray* cal_obj_byweekno_filter (Recurrence *recur, - GArray *occs); -#endif -static GArray* cal_obj_byyearday_expand (Recurrence *recur, - GArray *occs); -static GArray* cal_obj_byyearday_filter (Recurrence *recur, - GArray *occs); -static GArray* cal_obj_bymonthday_expand (Recurrence *recur, - GArray *occs); -static GArray* cal_obj_bymonthday_filter (Recurrence *recur, - GArray *occs); -static GArray* cal_obj_byday_expand (Recurrence *recur, - GArray *occs); -static GArray* cal_obj_byday_filter (Recurrence *recur, - GArray *occs); -static GArray* cal_obj_byhour_expand (Recurrence *recur, - GArray *occs); -static GArray* cal_obj_byhour_filter (Recurrence *recur, - GArray *occs); -static GArray* cal_obj_byminute_expand (Recurrence *recur, - GArray *occs); -static GArray* cal_obj_byminute_filter (Recurrence *recur, - GArray *occs); -static GArray* cal_obj_bysecond_expand (Recurrence *recur, - GArray *occs); -static GArray* cal_obj_bysecond_filter (Recurrence *recur, - GArray *occs); - -static void cal_obj_time_add_days (CalObjTime *cotime, - gint days); - - -CalObjRecurVTable cal_obj_yearly_vtable = { - cal_obj_yearly_find_start_position, - cal_obj_yearly_find_next_position, - { - cal_obj_bymonth_expand, - cal_obj_byweekno_expand, - cal_obj_byyearday_expand, - cal_obj_bymonthday_expand, - cal_obj_byday_expand, - cal_obj_byhour_expand, - cal_obj_byminute_expand, - cal_obj_bysecond_expand - }, -}; - -CalObjRecurVTable cal_obj_monthly_vtable = { - cal_obj_monthly_find_start_position, - cal_obj_monthly_find_next_position, - { - cal_obj_bymonth_filter, - NULL, - cal_obj_byyearday_filter, - cal_obj_bymonthday_expand, - cal_obj_byday_expand, - cal_obj_byhour_expand, - cal_obj_byminute_expand, - cal_obj_bysecond_expand - }, -}; - -CalObjRecurVTable cal_obj_weekly_vtable = { - cal_obj_weekly_find_start_position, - cal_obj_weekly_find_next_position, - { - cal_obj_bymonth_filter, - NULL, - cal_obj_byyearday_filter, - cal_obj_bymonthday_filter, - cal_obj_byday_expand, - cal_obj_byhour_expand, - cal_obj_byminute_expand, - cal_obj_bysecond_expand - }, -}; - -CalObjRecurVTable cal_obj_daily_vtable = { - cal_obj_daily_find_start_position, - cal_obj_daily_find_next_position, - { - cal_obj_bymonth_filter, - NULL, - cal_obj_byyearday_filter, - cal_obj_bymonthday_filter, - cal_obj_byday_filter, - cal_obj_byhour_expand, - cal_obj_byminute_expand, - cal_obj_bysecond_expand - }, -}; - -CalObjRecurVTable cal_obj_hourly_vtable = { - cal_obj_hourly_find_start_position, - cal_obj_hourly_find_next_position, - { - cal_obj_bymonth_filter, - NULL, - cal_obj_byyearday_filter, - cal_obj_bymonthday_filter, - cal_obj_byday_filter, - cal_obj_byhour_filter, - cal_obj_byminute_expand, - cal_obj_bysecond_expand - }, -}; - -CalObjRecurVTable cal_obj_minutely_vtable = { - cal_obj_minutely_find_start_position, - cal_obj_minutely_find_next_position, - { - cal_obj_bymonth_filter, - NULL, - cal_obj_byyearday_filter, - cal_obj_bymonthday_filter, - cal_obj_byday_filter, - cal_obj_byhour_filter, - cal_obj_byminute_filter, - cal_obj_bysecond_expand - }, -}; - -CalObjRecurVTable cal_obj_secondly_vtable = { - cal_obj_secondly_find_start_position, - cal_obj_secondly_find_next_position, - { - cal_obj_bymonth_filter, - NULL, - cal_obj_byyearday_filter, - cal_obj_bymonthday_filter, - cal_obj_byday_filter, - cal_obj_byhour_filter, - cal_obj_byminute_filter, - cal_obj_bysecond_filter - }, -}; - - - - -/* Returns an unsorted array of time_t's resulting from expanding the - recurrence within the given interval. Each iCalendar event can have any - number of recurrence rules specifying occurrences of the event, as well as - any number of recurrence rules specifying exceptions. */ -GArray* -cal_obj_expand_recurrence (CalObjTime *event_start, - CalObjTime *event_end, - Recurrence *recur, - CalObjTime *interval_start, - CalObjTime *interval_end) -{ - CalObjRecurVTable *vtable; - CalObjTime occ; - GArray *all_occs, *occs; - gint filter; - - vtable = cal_obj_get_vtable (recur); - - /* This is the resulting array of CalObjTime elements. */ - all_occs = g_array_new (FALSE, FALSE, sizeof (CalObjTime)); - - /* Get the first period based on the frequency and the interval that - intersects the interval between start and end. */ - if ((*vtable->find_start_position) (event_start, event_end, recur, - interval_start, interval_end, - &occ)) - return all_occs; - - /* Loop until the event ends or we go past the end of the required - interval. */ - for (;;) { - - /* We start with just the one time in the set. */ - occs = g_array_new (FALSE, FALSE, sizeof (CalObjTime)); - g_array_append_val (occs, occ); - - /* Generate the set of occurrences for this period. */ - for (filter = 0; filter < CAL_OBJ_NUM_FILTERS; filter++) { - if (vtable->filters[filter]) - occs = (*vtable->filters[filter]) (recur, - occs); - } - - /* Sort the occurrences and remove duplicates. */ - cal_obj_sort_occurrences (occs); - cal_obj_remove_duplicates (occs); - - /* Apply the BYSETPOS property. */ - occs = cal_obj_bysetpos_filter (occs); - - /* Add the occurrences onto the main array. */ - g_array_append_vals (all_occs, occs->data, occs->len); - - /* Skip to the next period, or exit the loop if finished. */ - if ((*vtable->find_next_position) (&occ, event_end, recur, - interval_end)) - break; - } - - return all_occs; -} - - -/* Returns the function table corresponding to the recurrence frequency. */ -static CalObjRecurVTable* -cal_obj_get_vtable (Recurrence *recur) -{ - switch (recur->type) { - case RECUR_YEARLY: - return &cal_obj_yearly_vtable; - case RECUR_MONTHLY: - return &cal_obj_monthly_vtable; - case RECUR_WEEKLY: - return &cal_obj_weekly_vtable; - case RECUR_DAILY: - return &cal_obj_daily_vtable; - case RECUR_HOURLY: - return &cal_obj_hourly_vtable; - case RECUR_MINUTELY: - return &cal_obj_minutely_vtable; - case RECUR_SECONDLY: - return &cal_obj_secondly_vtable; - } - return NULL; -} - - -static void -cal_obj_sort_occurrences (GArray *occs) -{ - qsort (occs->data, occs->len, sizeof (CalObjTime), - cal_obj_time_compare_func); -} - - -static gint -cal_obj_time_compare_func (const void *arg1, - const void *arg2) -{ - CalObjTime *cotime1, *cotime2; - - cotime1 = (CalObjTime*) arg1; - cotime2 = (CalObjTime*) arg2; - - if (cotime1->year < cotime2->year) - return -1; - if (cotime1->year > cotime2->year) - return 1; - - if (cotime1->month < cotime2->month) - return -1; - if (cotime1->month > cotime2->month) - return 1; - - if (cotime1->day < cotime2->day) - return -1; - if (cotime1->day > cotime2->day) - return 1; - - if (cotime1->hour < cotime2->hour) - return -1; - if (cotime1->hour > cotime2->hour) - return 1; - - if (cotime1->minute < cotime2->minute) - return -1; - if (cotime1->minute > cotime2->minute) - return 1; - - if (cotime1->second < cotime2->second) - return -1; - if (cotime1->second > cotime2->second) - return 1; - - return 0; -} - - -static void -cal_obj_remove_duplicates (GArray *occs) -{ - CalObjTime *occ, *prev_occ = NULL; - gint len, i, j = 0; - - len = occs->len; - for (i = 0; i < len; i++) { - occ = &g_array_index (occs, CalObjTime, i); - - if (!prev_occ - || cal_obj_time_compare_func (occ, prev_occ) != 0) { - if (i != j) - g_array_index (occs, CalObjTime, j) - = g_array_index (occs, CalObjTime, i); - j++; - } - - prev_occ = occ; - } - - g_array_set_size (occs, j); -} - - -static GArray* -cal_obj_bysetpos_filter (GArray *occs) -{ - - return occs; -} - - - - -static gboolean -cal_obj_yearly_find_start_position (CalObjTime *event_start, - CalObjTime *event_end, - Recurrence *recur, - CalObjTime *interval_start, - CalObjTime *interval_end, - CalObjTime *cotime) -{ - - - return FALSE; -} - - -static gboolean -cal_obj_yearly_find_next_position (CalObjTime *cotime, - CalObjTime *event_end, - Recurrence *recur, - CalObjTime *interval_end) -{ - /* NOTE: The day may now be invalid, e.g. 29th Feb. - Make sure we remove these eventually. */ - cotime->year += recur->interval; - - if (cotime->year > event_end->year - || cotime->year > interval_end->year) - return TRUE; - - return FALSE; -} - - - -static gboolean -cal_obj_monthly_find_start_position (CalObjTime *event_start, - CalObjTime *event_end, - Recurrence *recur, - CalObjTime *interval_start, - CalObjTime *interval_end, - CalObjTime *cotime) -{ - - - return FALSE; -} - - -static gboolean -cal_obj_monthly_find_next_position (CalObjTime *cotime, - CalObjTime *event_end, - Recurrence *recur, - CalObjTime *interval_end) -{ - cotime->month += recur->interval; - cotime->year += cotime->month / 12; - cotime->month %= 12; - - if (cotime->year > event_end->year - || cotime->year > interval_end->year - || (cotime->year == event_end->year - && cotime->month > event_end->month) - || (cotime->year == interval_end->year - && cotime->month > interval_end->month)) - return TRUE; - - return FALSE; -} - - - -static gboolean -cal_obj_weekly_find_start_position (CalObjTime *event_start, - CalObjTime *event_end, - Recurrence *recur, - CalObjTime *interval_start, - CalObjTime *interval_end, - CalObjTime *cotime) -{ - - - return FALSE; -} - - -static gboolean -cal_obj_weekly_find_next_position (CalObjTime *cotime, - CalObjTime *event_end, - Recurrence *recur, - CalObjTime *interval_end) -{ - cal_obj_time_add_days (cotime, recur->interval); - - - - return FALSE; -} - - -static gboolean -cal_obj_daily_find_start_position (CalObjTime *event_start, - CalObjTime *event_end, - Recurrence *recur, - CalObjTime *interval_start, - CalObjTime *interval_end, - CalObjTime *cotime) -{ - - - return FALSE; -} - - -static gboolean -cal_obj_daily_find_next_position (CalObjTime *cotime, - CalObjTime *event_end, - Recurrence *recur, - CalObjTime *interval_end) -{ - - cal_obj_time_add_days (cotime, recur->interval); - - - return FALSE; -} - - -static gboolean -cal_obj_hourly_find_start_position (CalObjTime *event_start, - CalObjTime *event_end, - Recurrence *recur, - CalObjTime *interval_start, - CalObjTime *interval_end, - CalObjTime *cotime) -{ - - - return FALSE; -} - - -static gboolean -cal_obj_hourly_find_next_position (CalObjTime *cotime, - CalObjTime *event_end, - Recurrence *recur, - CalObjTime *interval_end) -{ - - - return FALSE; -} - - -static gboolean -cal_obj_minutely_find_start_position (CalObjTime *event_start, - CalObjTime *event_end, - Recurrence *recur, - CalObjTime *interval_start, - CalObjTime *interval_end, - CalObjTime *cotime) -{ - - - return FALSE; -} - - -static gboolean -cal_obj_minutely_find_next_position (CalObjTime *cotime, - CalObjTime *event_end, - Recurrence *recur, - CalObjTime *interval_end) -{ - - - return FALSE; -} - - -static gboolean -cal_obj_secondly_find_start_position (CalObjTime *event_start, - CalObjTime *event_end, - Recurrence *recur, - CalObjTime *interval_start, - CalObjTime *interval_end, - CalObjTime *cotime) -{ - - - return FALSE; -} - - -static gboolean -cal_obj_secondly_find_next_position (CalObjTime *cotime, - CalObjTime *event_end, - Recurrence *recur, - CalObjTime *interval_end) -{ - - - return FALSE; -} - - - - - -/* If the BYMONTH rule is specified it expands each occurrence in occs, by - using each of the months in the bymonth list. */ -static GArray* -cal_obj_bymonth_expand (Recurrence *recur, - GArray *occs) -{ - GArray *new_occs; - CalObjTime *occ; - GList *elem; - gint len, i; - - /* If BYMONTH has not been specified, or the array is empty, just - return the array. */ - if (!recur->bymonth || occs->len == 0) - return occs; - - new_occs = g_array_new (FALSE, FALSE, sizeof (CalObjTime)); - - len = occs->len; - for (i = 0; i < len; i++) { - occ = &g_array_index (occs, CalObjTime, i); - - elem = recur->bymonth; - while (elem) { - /* NOTE: The day may now be invalid, e.g. 31st Feb. - Make sure we remove these eventually. */ - occ->month = GPOINTER_TO_INT (elem->data); - g_array_append_vals (new_occs, occ, 1); - elem = elem->next; - } - } - - g_array_free (occs, TRUE); - - return new_occs; -} - - -/* If the BYMONTH rule is specified it filters out all occurrences in occs - which do not match one of the months in the bymonth list. */ -static GArray* -cal_obj_bymonth_filter (Recurrence *recur, - GArray *occs) -{ - GArray *new_occs; - CalObjTime *occ; - guint8 months[12]; - gint mon, len, i; - GList *elem; - - /* If BYMONTH has not been specified, or the array is empty, just - return the array. */ - elem = recur->bymonth; - if (!elem || occs->len == 0) - return occs; - - /* Create an array of months from bymonths for fast lookup. */ - memset (&months, 0, sizeof (months)); - while (elem) { - mon = GPOINTER_TO_INT (elem->data); - months[mon] = 1; - elem = elem->next; - } - - new_occs = g_array_new (FALSE, FALSE, sizeof (CalObjTime)); - - len = occs->len; - for (i = 0; i < len; i++) { - occ = &g_array_index (occs, CalObjTime, i); - if (months[occ->month]) - g_array_append_vals (new_occs, occ, 1); - } - - g_array_free (occs, TRUE); - - return new_occs; -} - - - -static GArray* -cal_obj_byweekno_expand (Recurrence *recur, - GArray *occs) -{ - - return occs; -} - - -#if 0 -/* This isn't used at present. */ -static GArray* -cal_obj_byweekno_filter (Recurrence *recur, - GArray *occs) -{ - - return occs; -} -#endif - - -static GArray* -cal_obj_byyearday_expand (Recurrence *recur, - GArray *occs) -{ - - return occs; -} - - -static GArray* -cal_obj_byyearday_filter (Recurrence *recur, - GArray *occs) -{ - - return occs; -} - - - -static GArray* -cal_obj_bymonthday_expand (Recurrence *recur, - GArray *occs) -{ - - return occs; -} - - -static GArray* -cal_obj_bymonthday_filter (Recurrence *recur, - GArray *occs) -{ - - return occs; -} - - - -static GArray* -cal_obj_byday_expand (Recurrence *recur, - GArray *occs) -{ - - return occs; -} - - -static GArray* -cal_obj_byday_filter (Recurrence *recur, - GArray *occs) -{ - - return occs; -} - - - -/* If the BYHOUR rule is specified it expands each occurrence in occs, by - using each of the hours in the byhour list. */ -static GArray* -cal_obj_byhour_expand (Recurrence *recur, - GArray *occs) -{ - GArray *new_occs; - CalObjTime *occ; - GList *elem; - gint len, i; - - /* If BYHOUR has not been specified, or the array is empty, just - return the array. */ - if (!recur->byhour || occs->len == 0) - return occs; - - new_occs = g_array_new (FALSE, FALSE, sizeof (CalObjTime)); - - len = occs->len; - for (i = 0; i < len; i++) { - occ = &g_array_index (occs, CalObjTime, i); - - elem = recur->byhour; - while (elem) { - occ->hour = GPOINTER_TO_INT (elem->data); - g_array_append_vals (new_occs, occ, 1); - elem = elem->next; - } - } - - g_array_free (occs, TRUE); - - return new_occs; -} - - -/* If the BYHOUR rule is specified it filters out all occurrences in occs - which do not match one of the hours in the byhour list. */ -static GArray* -cal_obj_byhour_filter (Recurrence *recur, - GArray *occs) -{ - GArray *new_occs; - CalObjTime *occ; - guint8 hours[24]; - gint hour, len, i; - GList *elem; - - /* If BYHOURUTE has not been specified, or the array is empty, just - return the array. */ - elem = recur->byhour; - if (!elem || occs->len == 0) - return occs; - - /* Create an array of hours from byhour for fast lookup. */ - memset (&hours, 0, sizeof (hours)); - while (elem) { - hour = GPOINTER_TO_INT (elem->data); - hours[hour] = 1; - elem = elem->next; - } - - new_occs = g_array_new (FALSE, FALSE, sizeof (CalObjTime)); - - len = occs->len; - for (i = 0; i < len; i++) { - occ = &g_array_index (occs, CalObjTime, i); - if (hours[occ->hour]) - g_array_append_vals (new_occs, occ, 1); - } - - g_array_free (occs, TRUE); - - return new_occs; -} - - - -/* If the BYMINUTE rule is specified it expands each occurrence in occs, by - using each of the minutes in the byminute list. */ -static GArray* -cal_obj_byminute_expand (Recurrence *recur, - GArray *occs) -{ - GArray *new_occs; - CalObjTime *occ; - GList *elem; - gint len, i; - - /* If BYMINUTE has not been specified, or the array is empty, just - return the array. */ - if (!recur->byminute || occs->len == 0) - return occs; - - new_occs = g_array_new (FALSE, FALSE, sizeof (CalObjTime)); - - len = occs->len; - for (i = 0; i < len; i++) { - occ = &g_array_index (occs, CalObjTime, i); - - elem = recur->byminute; - while (elem) { - occ->minute = GPOINTER_TO_INT (elem->data); - g_array_append_vals (new_occs, occ, 1); - elem = elem->next; - } - } - - g_array_free (occs, TRUE); - - return new_occs; -} - - -/* If the BYMINUTE rule is specified it filters out all occurrences in occs - which do not match one of the minutes in the byminute list. */ -static GArray* -cal_obj_byminute_filter (Recurrence *recur, - GArray *occs) -{ - GArray *new_occs; - CalObjTime *occ; - guint8 minutes[60]; - gint min, len, i; - GList *elem; - - /* If BYMINUTE has not been specified, or the array is empty, just - return the array. */ - elem = recur->byminute; - if (!elem || occs->len == 0) - return occs; - - /* Create an array of minutes from byminutes for fast lookup. */ - memset (&minutes, 0, sizeof (minutes)); - while (elem) { - min = GPOINTER_TO_INT (elem->data); - minutes[min] = 1; - elem = elem->next; - } - - new_occs = g_array_new (FALSE, FALSE, sizeof (CalObjTime)); - - len = occs->len; - for (i = 0; i < len; i++) { - occ = &g_array_index (occs, CalObjTime, i); - if (minutes[occ->minute]) - g_array_append_vals (new_occs, occ, 1); - } - - g_array_free (occs, TRUE); - - return new_occs; -} - - - -/* If the BYSECOND rule is specified it expands each occurrence in occs, by - using each of the seconds in the bysecond list. */ -static GArray* -cal_obj_bysecond_expand (Recurrence *recur, - GArray *occs) -{ - GArray *new_occs; - CalObjTime *occ; - GList *elem; - gint len, i; - - /* If BYSECOND has not been specified, or the array is empty, just - return the array. */ - if (!recur->bysecond || occs->len == 0) - return occs; - - new_occs = g_array_new (FALSE, FALSE, sizeof (CalObjTime)); - - len = occs->len; - for (i = 0; i < len; i++) { - occ = &g_array_index (occs, CalObjTime, i); - - elem = recur->bysecond; - while (elem) { - occ->second = GPOINTER_TO_INT (elem->data); - g_array_append_vals (new_occs, occ, 1); - elem = elem->next; - } - } - - g_array_free (occs, TRUE); - - return new_occs; -} - - -/* If the BYSECOND rule is specified it filters out all occurrences in occs - which do not match one of the seconds in the bysecond list. */ -static GArray* -cal_obj_bysecond_filter (Recurrence *recur, - GArray *occs) -{ - GArray *new_occs; - CalObjTime *occ; - guint8 seconds[61]; - gint sec, len, i; - GList *elem; - - /* If BYSECOND has not been specified, or the array is empty, just - return the array. */ - elem = recur->bysecond; - if (!elem || occs->len == 0) - return occs; - - /* Create an array of seconds from byseconds for fast lookup. */ - memset (&seconds, 0, sizeof (seconds)); - while (elem) { - sec = GPOINTER_TO_INT (elem->data); - seconds[sec] = 1; - elem = elem->next; - } - - new_occs = g_array_new (FALSE, FALSE, sizeof (CalObjTime)); - - len = occs->len; - for (i = 0; i < len; i++) { - occ = &g_array_index (occs, CalObjTime, i); - if (seconds[occ->second]) - g_array_append_vals (new_occs, occ, 1); - } - - g_array_free (occs, TRUE); - - return new_occs; -} - - - -static void -cal_obj_time_add_days (CalObjTime *cotime, - gint days) -{ - guint day, days_in_month; - - /* We use a guint to avoid overflow on the guint8. */ - day = (guint) cotime->day; - day += days; - - for (;;) { - days_in_month = time_days_in_month (cotime->year, - cotime->month); - if (day <= days_in_month) - break; - - cotime->month++; - if (cotime->month >= 12) { - cotime->year++; - cotime->month = 0; - } - - day -= days_in_month; - } - - cotime->day = (guint8) day; -} diff --git a/calendar/cal-util/cal-recur.h b/calendar/cal-util/cal-recur.h deleted file mode 100644 index 340b897417..0000000000 --- a/calendar/cal-util/cal-recur.h +++ /dev/null @@ -1,102 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * Evolution calendar recurrence rule functions - * - * Copyright (C) 2000 Helix Code, Inc. - * - * Author: Damon Chaplin - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. - */ - -#ifndef CAL_RECURL_H -#define CAL_RECUR_H - -#include -#include - -BEGIN_GNOME_DECLS - - -/* FIXME: I've put modified versions of RecurType and Recurrence here, since - the ones in calobj.h don't support all of iCalendar. Hopefully Seth will - update those soon and these can be removed. */ - -enum RecurType { - RECUR_YEARLY, - RECUR_MONTHLY, - RECUR_WEEKLY, - RECUR_DAILY, - RECUR_HOURLY, - RECUR_MINUTELY, - RECUR_SECONDLY, -}; - -typedef struct { - enum RecurType type; - - int interval; - - int weekday; - - int month_pos; - - int month_day; - - - /* For BYMONTH modifier. A list of GINT_TO_POINTERs, 0-11. */ - GList *bymonth; - - - /* For BYHOUR modifier. A list of GINT_TO_POINTERs, 0-23. */ - GList *byhour; - - /* For BYMINUTE modifier. A list of GINT_TO_POINTERs, 0-59. */ - GList *byminute; - - /* For BYSECOND modifier. A list of GINT_TO_POINTERs, 0-60. */ - GList *bysecond; - -} Recurrence; - - - -/* This is what we use to represent a date & time. */ -typedef struct _CalObjTime CalObjTime; -struct _CalObjTime { - guint16 year; - guint8 month; /* 0 - 11 */ - guint8 day; /* 1 - 31 */ - guint8 hour; /* 0 - 23 */ - guint8 minute; /* 0 - 59 */ - guint8 second; /* 0 - 59 (maybe 60 for leap second) */ -}; - - - -/* Returns an unsorted array of time_t's resulting from expanding the - recurrence within the given interval. Each iCalendar event can have any - number of recurrence rules specifying occurrences of the event, as well as - any number of recurrence rules specifying exceptions. */ -GArray* -cal_obj_expand_recurrence (CalObjTime *event_start, - CalObjTime *event_end, - Recurrence *recur, - CalObjTime *interval_start, - CalObjTime *interval_end); - -END_GNOME_DECLS - -#endif diff --git a/calendar/cal-util/cal-util.c b/calendar/cal-util/cal-util.c deleted file mode 100644 index 40c4fe5bfe..0000000000 --- a/calendar/cal-util/cal-util.c +++ /dev/null @@ -1,100 +0,0 @@ -/* Evolution calendar utilities and types - * - * Copyright (C) 2000 Helix Code, Inc. - * - * Author: Federico Mena-Quintero - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. - */ - -#include -#include -#include "cal-util.h" -#include "libversit/vcc.h" - - - -/** - * cal_obj_instance_list_free: - * @list: List of #CalObjInstance structures. - * - * Frees a list of #CalObjInstance structures. - **/ -void -cal_obj_instance_list_free (GList *list) -{ - CalObjInstance *i; - GList *l; - - for (l = list; l; l = l->next) { - i = l->data; - - g_assert (i != NULL); - g_assert (i->uid != NULL); - - g_free (i->uid); - g_free (i); - } - - g_list_free (list); -} - -/** - * cal_alarm_instance_list_free: - * @list: List of #CalAlarmInstance structures. - * - * Frees a list of #CalAlarmInstance structures. - **/ -void -cal_alarm_instance_list_free (GList *list) -{ - CalAlarmInstance *i; - GList *l; - - for (l = list; l; l = l->next) { - i = l->data; - - g_assert (i != NULL); - g_assert (i->uid != NULL); - - g_free (i->uid); - g_free (i); - } - - g_list_free (list); -} - -/** - * cal_obj_uid_list_free: - * @list: List of strings with unique identifiers. - * - * Frees a list of unique identifiers for calendar objects. - **/ -void -cal_obj_uid_list_free (GList *list) -{ - GList *l; - - for (l = list; l; l = l->next) { - char *uid; - - uid = l->data; - - g_assert (uid != NULL); - g_free (uid); - } - - g_list_free (list); -} diff --git a/calendar/cal-util/cal-util.h b/calendar/cal-util/cal-util.h deleted file mode 100644 index b222ea8cba..0000000000 --- a/calendar/cal-util/cal-util.h +++ /dev/null @@ -1,68 +0,0 @@ -/* Evolution calendar utilities and types - * - * Copyright (C) 2000 Helix Code, Inc. - * - * Author: Federico Mena-Quintero - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. - */ - -#ifndef CAL_UTIL_H -#define CAL_UTIL_H - -#include -#include -#include -#include - -BEGIN_GNOME_DECLS - - - -/* Instance of a calendar object. This can be an actual occurrence, a - * recurrence, or an alarm trigger of a `real' calendar object. - */ -typedef struct { - char *uid; /* UID of the object */ - time_t start; /* Start time of instance */ - time_t end; /* End time of instance */ -} CalObjInstance; - -void cal_obj_instance_list_free (GList *list); - -/* Instance of an alarm trigger */ -typedef struct { - char *uid; /* UID of object */ - enum AlarmType type; /* Type of alarm */ - time_t trigger; /* Alarm trigger time */ - time_t occur; /* Occurrence time */ -} CalAlarmInstance; - -void cal_alarm_instance_list_free (GList *list); - -/* Used for multiple UID queries */ -typedef enum { - CALOBJ_TYPE_EVENT = 1 << 0, - CALOBJ_TYPE_TODO = 1 << 1, - CALOBJ_TYPE_JOURNAL = 1 << 2, - CALOBJ_TYPE_OTHER = 1 << 3, - CALOBJ_TYPE_ANY = 0x0f -} CalObjType; - -void cal_obj_uid_list_free (GList *list); - -END_GNOME_DECLS - -#endif diff --git a/calendar/cal-util/calobj.c b/calendar/cal-util/calobj.c deleted file mode 100644 index d2c47fbc65..0000000000 --- a/calendar/cal-util/calobj.c +++ /dev/null @@ -1,1810 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * Calendar objects implementations. - * Copyright (C) 1998 the Free Software Foundation - * - * Authors: - * Miguel de Icaza (miguel@gnu.org) - * Federico Mena (quartic@gimp.org) - */ -#include -#include -#include -#include -#include -#include "calobj.h" -#include "timeutil.h" -#include "libversit/vcc.h" - - - -/* VCalendar product ID */ -#define PRODID "-//Helix Code//NONSGML Evolution Calendar//EN" - -static gint compare_exdates (gconstpointer a, gconstpointer b); -static void ical_object_normalize_summary (iCalObject *ico); - - - -char * -ical_gen_uid (void) -{ - static char *hostname; - time_t t = time (NULL); - static int serial; - - if (!hostname){ - char buffer [128]; - - if ((gethostname (buffer, sizeof (buffer)-1) == 0) && - (buffer [0] != 0)) - hostname = g_strdup (buffer); - else - hostname = g_strdup ("localhost"); - } - - return g_strdup_printf ( - "%s-%d-%d-%d-%d@%s", - isodate_from_time_t (t), - getpid (), - getgid (), - getppid (), - serial++, - hostname); -} - -iCalObject * -ical_object_new (void) -{ - iCalObject *ico; - - ico = g_new0 (iCalObject, 1); - - ico->seq = -1; - ico->dtstamp = time (NULL); - ico->uid = ical_gen_uid (); - - ico->pilot_id = 0; - ico->pilot_status = ICAL_PILOT_SYNC_MOD; - - ico->ref_count = 1; - - return ico; -} - -iCalObject * -ical_new (char *comment, char *organizer, char *summary) -{ - iCalObject *ico; - - ico = ical_object_new (); - - ico->comment = g_strdup (comment); - ico->organizer = g_new0 (iCalPerson, 1); - ico->organizer->addr = g_strdup (organizer); - ico->summary = g_strdup (summary); - ico->class = g_strdup ("PUBLIC"); - ico->status = g_strdup ("NEEDS ACTION"); - - ico->dalarm.type = ALARM_DISPLAY; - ico->palarm.type = ALARM_PROGRAM; - ico->malarm.type = ALARM_MAIL; - ico->aalarm.type = ALARM_AUDIO; - - ical_object_normalize_summary (ico); - - return ico; -} - - -void -ical_object_ref (iCalObject *ico) -{ - ico->ref_count++; -} - - -void -ical_object_unref (iCalObject *ico) -{ - ico->ref_count--; - if (ico->ref_count == 0) - ical_object_destroy (ico); -} - - -static void -my_free (gpointer data, gpointer user_dat_ignored) -{ - g_free (data); -} - -static void -list_free (GList *list) -{ - g_list_foreach (list, my_free, 0); - g_list_free (list); -} - -#define free_if_defined(x) if (x){ g_free (x); x = 0; } -#define lfree_if_defined(x) if (x){ list_free (x); x = 0; } -void -ical_object_destroy (iCalObject *ico) -{ - /* Regular strings */ - free_if_defined (ico->comment); - free_if_defined (ico->organizer); - free_if_defined (ico->summary); - free_if_defined (ico->uid); - free_if_defined (ico->status); - free_if_defined (ico->class); - free_if_defined (ico->url); - free_if_defined (ico->recur); - - /* Lists */ - lfree_if_defined (ico->exdate); - lfree_if_defined (ico->categories); - lfree_if_defined (ico->resources); - lfree_if_defined (ico->related); - lfree_if_defined (ico->attach); - - /* Alarms */ - g_free (ico->dalarm.data); - g_free (ico->palarm.data); - g_free (ico->malarm.data); - g_free (ico->aalarm.data); - - g_free (ico); -} - -/* This resets any recurrence rules of the iCalObject. */ -void -ical_object_reset_recurrence (iCalObject *ico) -{ - free_if_defined (ico->recur); - lfree_if_defined (ico->exdate); -} - -static GList * -set_list (char *str) -{ - GList *list = 0; - char *s; - - for (s = strtok (str, ";"); s; s = strtok (NULL, ";")) - list = g_list_prepend (list, g_strdup (s)); - - return list; -} - -static GList * -set_date_list (char *str) -{ - GList *list = 0; - char *s; - - for (s = strtok (str, ";,"); s; s = strtok (NULL, ";,")){ - time_t *t = g_new (time_t, 1); - - while (*s && isspace (*s)) - s++; - *t = time_from_isodate (s); - list = g_list_prepend (list, t); - } - return list; -} - -void -ical_object_add_exdate (iCalObject *o, time_t t) -{ - time_t *pt = g_new (time_t, 1); - - *pt = t; - o->exdate = g_list_prepend (o->exdate, pt); -} - -static void -ignore_space(char **str) -{ - while (**str && isspace (**str)) - (*str)++; -} - -static void -skip_numbers (char **str) -{ - while (**str){ - ignore_space (str); - if (!isdigit (**str)) - return; - while (**str && isdigit (**str)) - (*str)++; - } -} - -static void -weekdaylist (iCalObject *o, char **str) -{ - int i; - struct { - char first_letter, second_letter; - int index; - } days [] = { - { 'S', 'U', 0 }, - { 'M', 'O', 1 }, - { 'T', 'U', 2 }, - { 'W', 'E', 3 }, - { 'T', 'H', 4 }, - { 'F', 'R', 5 }, - { 'S', 'A', 6 } - }; - - ignore_space (str); - do { - for (i = 0; i < 7; i++){ - if (**str == days [i].first_letter && *(*str+1) == days [i].second_letter){ - o->recur->weekday |= 1 << i; - *str += 2; - if (**str == ' ') - (*str)++; - } - } - } while (isalpha (**str)); - - if (o->recur->weekday == 0){ - struct tm tm = *localtime (&o->dtstart); - - o->recur->weekday = 1 << tm.tm_wday; - } -} - -static void -weekdaynum (iCalObject *o, char **str) -{ - int i; - struct { - char first_letter, second_letter; - int index; - } days [] = { - { 'S', 'U', 0 }, - { 'M', 'O', 1 }, - { 'T', 'U', 2 }, - { 'W', 'E', 3 }, - { 'T', 'H', 4 }, - { 'F', 'R', 5 }, - { 'S', 'A', 6 } - }; - - ignore_space (str); - do { - for (i = 0; i < 7; i++){ - if (**str == days [i].first_letter && *(*str+1) == days [i].second_letter){ - o->recur->weekday = i; - *str += 2; - if (**str == ' ') - (*str)++; - } - } - } while (isalpha (**str)); -} - -static void -ocurrencelist (iCalObject *o, char **str) -{ - char *p; - - ignore_space (str); - p = *str; - if (!isdigit (*p)) - return; - - if (!(*p >= '1' && *p <= '5')) - return; - - if (!(*(p+1) == '+' || *(p+1) == '-')) - return; - - o->recur->u.month_pos = (*p-'0') * (*(p+1) == '+' ? 1 : -1); - *str += 2; -} - -#if 0 - -static void -daynumber (iCalObject *o, char **str) -{ - int val = 0; - char *p = *str; - - ignore_space (str); - if (strcmp (p, "LD")){ - o->recur->u.month_day = DAY_LASTDAY; - *str += 2; - return; - } - - if (!(isdigit (*p))) - return; - - while (**str && isdigit (**str)){ - val = val * 10 + (**str - '0'); - (*str)++; - } - - if (**str == '+') - (*str)++; - - if (**str == '-') - val *= -1; - o->recur->u.month_day = val; -} - -#endif - -static void -daynumberlist (iCalObject *o, char **str) -{ - int first = 0; - int val = 0; - - ignore_space (str); - - while (**str){ - if (!isdigit (**str)) - return; - while (**str && isdigit (**str)){ - val = 10 * val + (**str - '0'); - (*str)++; - } - if (!first){ - /* - * Some broken applications set this to zero - */ - if (val == 0){ - struct tm day = *localtime (&o->dtstart); - - val = day.tm_mday; - } - o->recur->u.month_day = val; - first = 1; - val = 0; - } - } -} - -static void -load_recur_weekly (iCalObject *o, char **str) -{ - weekdaylist (o, str); -} - -static void -load_recur_monthly_pos (iCalObject *o, char **str) -{ - ocurrencelist (o, str); - weekdaynum (o, str); -} - -static void -load_recur_monthly_day (iCalObject *o, char **str) -{ - daynumberlist (o, str); -} - -static void -load_recur_yearly_month (iCalObject *o, char **str) -{ - /* Skip as we do not support multiple months and we do expect - * the dtstart to agree with the value on this field - */ - skip_numbers (str); -} - -static void -load_recur_yearly_day (iCalObject *o, char **str) -{ - /* Skip as we do not support multiple days and we do expect - * the dtstart to agree with the value on this field - * - * FIXME: we should support every-n-years - */ - skip_numbers (str); -} - -static void -duration (iCalObject *o, char **str) -{ - unsigned int duration = 0; - - ignore_space (str); - if (**str != '#') - return; - (*str)++; - while (**str && isdigit (**str)){ - duration = duration * 10 + (**str - '0'); - (*str)++; - } - o->recur->duration = duration; -} - -static void -enddate (iCalObject *o, char **str) -{ - ignore_space (str); - if (isdigit (**str)){ - o->recur->_enddate = time_from_isodate (*str); - *str += 16; - } -} - -static int -load_recurrence (iCalObject *o, char *str) -{ - enum RecurType type; - int interval = 0; - - type = -1; - switch (*str++){ - case 'D': - type = RECUR_DAILY; - break; - - case 'W': - type = RECUR_WEEKLY; - break; - - case 'M': - if (*str == 'P') - type = RECUR_MONTHLY_BY_POS; - else if (*str == 'D') - type = RECUR_MONTHLY_BY_DAY; - str++; - break; - - case 'Y': - if (*str == 'M') - type = RECUR_YEARLY_BY_MONTH; - else if (*str == 'D') - type = RECUR_YEARLY_BY_DAY; - str++; - break; - } - if (type == -1) - return 0; - - o->recur = g_new0 (Recurrence, 1); - o->recur->type = type; - ignore_space (&str); - - /* Get the interval */ - for (;*str && isdigit (*str);str++) - interval = interval * 10 + (*str-'0'); - - if (interval == 0) - interval = 1; - - o->recur->interval = interval; - - /* this is the default per the spec */ - o->recur->duration = 2; - - ignore_space (&str); - - switch (type){ - case RECUR_DAILY: - break; - case RECUR_WEEKLY: - load_recur_weekly (o, &str); - break; - case RECUR_MONTHLY_BY_POS: - load_recur_monthly_pos (o, &str); - break; - case RECUR_MONTHLY_BY_DAY: - load_recur_monthly_day (o, &str); - break; - case RECUR_YEARLY_BY_MONTH: - load_recur_yearly_month (o, &str); - break; - case RECUR_YEARLY_BY_DAY: - load_recur_yearly_day (o, &str); - break; - default: - g_warning ("Unimplemented recurrence type %d", (int) type); - break; - } - duration (o, &str); - enddate (o, &str); - - /* Compute the enddate */ - if (o->recur->_enddate == 0){ - if (o->recur->duration != 0){ - ical_object_compute_end (o); - } else - o->recur->enddate = 0; - } else { - o->recur->enddate = o->recur->_enddate; - } - return 1; -} - -#define is_a_prop_of(obj,prop) isAPropertyOf (obj,prop) -#define str_val(obj) the_str = fakeCString (vObjectUStringZValue (obj)) -#define has(obj,prop) (vo = isAPropertyOf (obj, prop)) - -/* - * FIXME: This is loosing precission. Enhanec the thresholds - */ -#define HOURS(n) (n*(60*60)) - -static void -setup_alarm_at (iCalObject *ico, CalendarAlarm *alarm, char *iso_time, VObject *vo) -{ - time_t alarm_time = time_from_isodate (iso_time); - time_t base = ico->dtstart; - int d = difftime (base, alarm_time); - VObject *a; - char *the_str; - - alarm->enabled = 1; - if (d > HOURS (2)){ - if (d > HOURS (48)){ - alarm->count = d / HOURS (24); - alarm->units = ALARM_DAYS; - } else { - alarm->count = d / (60*60); - alarm->units = ALARM_HOURS; - } - } else { - alarm->count = d / 60; - alarm->units = ALARM_MINUTES; - } - - if ((a = is_a_prop_of (vo, VCSnoozeTimeProp))){ - alarm->snooze_secs = isodiff_to_secs (str_val (a)); - free (the_str); - } - - if ((a = is_a_prop_of (vo, VCRepeatCountProp))){ - alarm->snooze_repeat = atoi (str_val (a)); - free (the_str); - } -} - -/* - * Duplicates an iCalObject. Implementation is a grand hack. - * If you need the new ICalObject to have a new uid, free the current one, - * and call ical_gen_uid() to generate a new one. - */ -iCalObject * -ical_object_duplicate (iCalObject *o) -{ - VObject *vo; - iCalObject *new; - - vo = ical_object_to_vobject (o); - switch (o->type){ - case ICAL_EVENT: - new = ical_object_create_from_vobject (vo, VCEventProp); - break; - case ICAL_TODO: - new = ical_object_create_from_vobject (vo, VCTodoProp); - break; - default: - new = NULL; - } - - cleanVObject (vo); - return new; -} - -/* FIXME: we need to load the recurrence properties */ -iCalObject * -ical_object_create_from_vobject (VObject *o, const char *object_name) -{ - time_t now = time (NULL); - iCalObject *ical; - VObject *vo, *a; - VObjectIterator i; - char *the_str; - - ical = g_new0 (iCalObject, 1); - - if (strcmp (object_name, VCEventProp) == 0) - ical->type = ICAL_EVENT; - else if (strcmp (object_name, VCTodoProp) == 0) - ical->type = ICAL_TODO; - else { - g_free (ical); - return 0; - } - - ical->ref_count = 1; - - /* uid */ - if (has (o, VCUniqueStringProp)){ - ical->uid = g_strdup (str_val (vo)); - free (the_str); - } else { - ical->uid = ical_gen_uid (); - } - - /* seq */ - if (has (o, VCSequenceProp)){ - ical->seq = atoi (str_val (vo)); - free (the_str); - } else - ical->seq = 0; - - /* dtstart */ - if (has (o, VCDTstartProp)){ - ical->dtstart = time_from_isodate (str_val (vo)); - free (the_str); - } else - ical->dtstart = 0; - - /* dtend */ - ical->dtend = 0; /* default value */ - if (ical->type == ICAL_EVENT){ - if (has (o, VCDTendProp)){ - ical->dtend = time_from_isodate (str_val (vo)); - free (the_str); - } - } else if (ical->type == ICAL_TODO){ - if (has (o, VCDueProp)){ - ical->dtend = time_from_isodate (str_val (vo)); - free (the_str); - } - } - - /* dcreated */ - if (has (o, VCDCreatedProp)){ - ical->created = time_from_isodate (str_val (vo)); - free (the_str); - } - - /* completed */ - if (has (o, VCCompletedProp)){ - ical->completed = time_from_isodate (str_val (vo)); - free (the_str); - } - - /* last_mod */ - if (has (o, VCLastModifiedProp)){ - ical->last_mod = time_from_isodate (str_val (vo)); - free (the_str); - } else - ical->last_mod = now; - - /* exdate */ - if (has (o, VCExpDateProp)){ - ical->exdate = set_date_list (str_val (vo)); - free (the_str); - } - - /* description/comment */ - if (has (o, VCDescriptionProp)){ - ical->comment = g_strdup (str_val (vo)); - free (the_str); - } - - /* summary */ - if (has (o, VCSummaryProp)){ - ical->summary = g_strdup (str_val (vo)); - free (the_str); - - /* Convert any CR/LF/CRLF sequences in the summary field to - spaces so we just have a one-line field. */ - ical_object_normalize_summary (ical); - } else - ical->summary = g_strdup (""); - - /* status */ - if (has (o, VCStatusProp)){ - ical->status = g_strdup (str_val (vo)); - free (the_str); - } else - ical->status = g_strdup ("NEEDS ACTION"); - - if (has (o, VCClassProp)){ - ical->class = g_strdup (str_val (vo)); - free (the_str); - } else - ical->class = g_strdup ("PUBLIC"); - - /* categories */ - if (has (o, VCCategoriesProp)){ - ical->categories = set_list (str_val (vo)); - free (the_str); - } - - /* resources */ - if (has (o, VCResourcesProp)){ - ical->resources = set_list (str_val (vo)); - free (the_str); - } - - /* priority */ - if (has (o, VCPriorityProp)){ - ical->priority = atoi (str_val (vo)); - free (the_str); - } - - /* tranparency */ - if (has (o, VCTranspProp)){ - ical->transp = atoi (str_val (vo)) ? ICAL_TRANSPARENT : ICAL_OPAQUE; - free (the_str); - } - - /* Organizer */ - if (has (o, VCOrgNameProp)){ - ical->organizer = g_new0 (iCalPerson, 1); - ical->organizer->addr = g_strdup (str_val (vo)); - free (the_str); - } - - /* related */ - if (has (o, VCRelatedToProp)){ - char *str; - char *s; - iCalRelation *rel; - str = str_val (vo); - for (s = strtok (str, ";"); s; s = strtok (NULL, ";")) { - rel = g_new0 (iCalRelation, 1); - rel->uid = g_strdup (s); - rel->reltype = g_strdup ("PARENT"); - ical->related = g_list_prepend (ical->related, rel); - } - free (the_str); - } - - /* attach */ - initPropIterator (&i, o); - while (moreIteration (&i)){ - vo = nextVObject (&i); - if (strcmp (vObjectName (vo), VCAttachProp) == 0){ - ical->attach = g_list_prepend (ical->attach, g_strdup (str_val (vo))); - free (the_str); - } - } - - /* url */ - if (has (o, VCURLProp)){ - ical->url = g_strdup (str_val (vo)); - free (the_str); - } - - /* dalarm */ - ical->dalarm.type = ALARM_DISPLAY; - ical->dalarm.enabled = 0; - if (has (o, VCDAlarmProp)){ - if ((a = is_a_prop_of (vo, VCRunTimeProp))){ - setup_alarm_at (ical, &ical->dalarm, str_val (a), vo); - free (the_str); - } - } - - /* aalarm */ - ical->aalarm.type = ALARM_AUDIO; - ical->aalarm.enabled = 0; - if (has (o, VCAAlarmProp)){ - if ((a = is_a_prop_of (vo, VCRunTimeProp))){ - setup_alarm_at (ical, &ical->aalarm, str_val (a), vo); - free (the_str); - } - } - - /* palarm */ - ical->palarm.type = ALARM_PROGRAM; - ical->palarm.enabled = 0; - if (has (o, VCPAlarmProp)){ - ical->palarm.type = ALARM_PROGRAM; - if ((a = is_a_prop_of (vo, VCRunTimeProp))){ - setup_alarm_at (ical, &ical->palarm, str_val (a), vo); - free (the_str); - - if ((a = is_a_prop_of (vo, VCProcedureNameProp))){ - ical->palarm.data = g_strdup (str_val (a)); - free (the_str); - } else - ical->palarm.data = g_strdup (""); - } - } - - /* malarm */ - ical->malarm.type = ALARM_MAIL; - ical->malarm.enabled = 0; - if (has (o, VCMAlarmProp)){ - ical->malarm.type = ALARM_MAIL; - if ((a = is_a_prop_of (vo, VCRunTimeProp))){ - setup_alarm_at (ical, &ical->malarm, str_val (a), vo); - free (the_str); - - if ((a = is_a_prop_of (vo, VCEmailAddressProp))){ - ical->malarm.data = g_strdup (str_val (a)); - free (the_str); - } else - ical->malarm.data = g_strdup (""); - } - } - - /* rrule */ - if (has (o, VCRRuleProp)){ - if (!load_recurrence (ical, str_val (vo))) { - ical_object_destroy (ical); - return NULL; - } - free (the_str); - } - - /* - * Pilot - */ - if (has (o, XPilotIdProp)){ - ical->pilot_id = atoi (str_val (vo)); - free (the_str); - } else - ical->pilot_id = 0; - - if (has (o, XPilotStatusProp)){ - ical->pilot_status = atoi (str_val (vo)); - free (the_str); - } else - ical->pilot_status = ICAL_PILOT_SYNC_MOD; - - return ical; -} - -static char * -to_str (int num) -{ - static char buf [40]; - - sprintf (buf, "%d", num); - return buf; -} - -/* - * stores a GList in the property. - */ -static void -store_list (VObject *o, char *prop, GList *values) -{ - GList *l; - int len; - char *result, *p; - - for (len = 0, l = values; l; l = l->next) - len += strlen (l->data) + 1; - - result = g_malloc (len); - - for (p = result, l = values; l; l = l->next) { - int len = strlen (l->data); - - strcpy (p, l->data); - - if (l->next) { - p [len] = ';'; - p += len+1; - } else - p += len; - } - - *p = 0; - - addPropValue (o, prop, result); - g_free (result); -} - -static void -store_rel_list (VObject *o, char *prop, GList *values) -{ - GList *l; - int len; - char *result, *p; - - for (len = 0, l = values; l; l = l->next) - len += strlen (((iCalRelation*)(l->data))->uid) + 1; - - result = g_malloc (len); - - for (p = result, l = values; l; l = l->next) { - int len = strlen (((iCalRelation*)(l->data))->uid); - - strcpy (p, ((iCalRelation*)(l->data))->uid); - - if (l->next) { - p [len] = ';'; - p += len+1; - } else - p += len; - } - - *p = 0; - - addPropValue (o, prop, result); - g_free (result); -} - -static void -store_date_list (VObject *o, char *prop, GList *values) -{ - GList *l; - int size, len; - char *s, *p; - - size = g_list_length (values); - s = p = g_malloc ((size * 17 + 1) * sizeof (char)); - - for (l = values; l; l = l->next){ - strcpy (s, isodate_from_time_t (*(time_t *)l->data)); - len = strlen (s); - s [len] = ','; - s += len + 1; - } - s--; - *s = 0; - addPropValue (o, prop, p); - g_free (p); -} - -static char *recur_type_name [] = { "D", "W", "MP", "MD", "YM", "YD" }; -static char *recur_day_list [] = { "SU", "MO", "TU","WE", "TH", "FR", "SA" }; -static char *alarm_names [] = { VCMAlarmProp, VCPAlarmProp, VCDAlarmProp, VCAAlarmProp }; - -static VObject * -save_alarm (VObject *o, CalendarAlarm *alarm, iCalObject *ical) -{ - VObject *alarm_object; - struct tm tm; - time_t alarm_time; - - if (!alarm->enabled) - return NULL; - tm = *localtime (&ical->dtstart); - switch (alarm->units){ - case ALARM_MINUTES: - tm.tm_min -= alarm->count; - break; - - case ALARM_HOURS: - tm.tm_hour -= alarm->count; - break; - - case ALARM_DAYS: - tm.tm_mday -= alarm->count; - break; - } - - alarm_time = mktime (&tm); - alarm_object = addProp (o, alarm_names [alarm->type]); - addPropValue (alarm_object, VCRunTimeProp, isodate_from_time_t (alarm_time)); - - if (alarm->snooze_secs) - addPropValue (alarm_object, VCSnoozeTimeProp, isodiff_from_secs (alarm->snooze_secs)); - else - addPropValue (alarm_object, VCSnoozeTimeProp, ""); - - if (alarm->snooze_repeat){ - char buf [20]; - - sprintf (buf, "%d", alarm->snooze_repeat); - addPropValue (alarm_object, VCRepeatCountProp, buf); - } else - addPropValue (alarm_object, VCRepeatCountProp, ""); - return alarm_object; -} - -VObject * -ical_object_to_vobject (iCalObject *ical) -{ - VObject *o, *alarm, *s; - GList *l; - - if (ical->type == ICAL_EVENT) - o = newVObject (VCEventProp); - else - o = newVObject (VCTodoProp); - - /* uid */ - if (ical->uid) - addPropValue (o, VCUniqueStringProp, ical->uid); - - /* seq */ - addPropValue (o, VCSequenceProp, to_str (ical->seq)); - - /* dtstart */ - addPropValue (o, VCDTstartProp, isodate_from_time_t (ical->dtstart)); - - /* dtend */ - if (ical->type == ICAL_EVENT){ - addPropValue (o, VCDTendProp, isodate_from_time_t (ical->dtend)); - } else if (ical->type == ICAL_TODO){ - addPropValue (o, VCDueProp, isodate_from_time_t (ical->dtend)); - } - - /* dcreated */ - addPropValue (o, VCDCreatedProp, isodate_from_time_t (ical->created)); - - /* completed */ - if (ical->completed) - addPropValue (o, VCDTendProp, isodate_from_time_t (ical->completed)); - - /* last_mod */ - addPropValue (o, VCLastModifiedProp, isodate_from_time_t (ical->last_mod)); - - /* exdate */ - if (ical->exdate) - store_date_list (o, VCExpDateProp, ical->exdate); - - /* description/comment */ - if (ical->comment && strlen (ical->comment)){ - s = addPropValue (o, VCDescriptionProp, ical->comment); - if (strchr (ical->comment, '\n')) - addProp (s, VCQuotedPrintableProp); - } - - /* summary */ - if (strlen (ical->summary)){ - s = addPropValue (o, VCSummaryProp, ical->summary); - if (strchr (ical->summary, '\n')) - addProp (s, VCQuotedPrintableProp); - } - - /* status */ - addPropValue (o, VCStatusProp, ical->status); - - /* class */ - addPropValue (o, VCClassProp, ical->class); - - /* categories */ - if (ical->categories) - store_list (o, VCCategoriesProp, ical->categories); - - /* resources */ - if (ical->resources) - store_list (o, VCCategoriesProp, ical->resources); - - /* priority */ - addPropValue (o, VCPriorityProp, to_str (ical->priority)); - - /* transparency */ - addPropValue (o, VCTranspProp, to_str (ical->transp)); - - /* Owner/organizer */ - if (ical->organizer && ical->organizer->addr) - addPropValue (o, VCOrgNameProp, ical->organizer->addr); - - /* related */ - if (ical->related) - store_rel_list (o, VCRelatedToProp, ical->related); - - /* attach */ - for (l = ical->attach; l; l = l->next) - addPropValue (o, VCAttachProp, l->data); - - /* url */ - if (ical->url) - addPropValue (o, VCURLProp, ical->url); - - if (ical->recur){ - char result [256]; - char buffer [80]; - int i; - - sprintf (result, "%s%d ", recur_type_name [ical->recur->type], ical->recur->interval); - switch (ical->recur->type){ - case RECUR_DAILY: - break; - - case RECUR_WEEKLY: - for (i = 0; i < 7; i++){ - if (ical->recur->weekday & (1 << i)){ - sprintf (buffer, "%s ", recur_day_list [i]); - strcat (result, buffer); - } - } - break; - - case RECUR_MONTHLY_BY_POS: { - int nega = ical->recur->u.month_pos < 0; - - sprintf (buffer, "%d%s ", nega ? -ical->recur->u.month_pos : ical->recur->u.month_pos, - nega ? "-" : "+"); - strcat (result, buffer); - /* the gui is set up for a single day, not a set here in this case */ - sprintf (buffer, "%s ", recur_day_list [ical->recur->weekday]); - strcat (result, buffer); - } - break; - - case RECUR_MONTHLY_BY_DAY: - sprintf (buffer, "%d ", ical->recur->u.month_pos); - strcat (result, buffer); - break; - - case RECUR_YEARLY_BY_MONTH: - break; - - case RECUR_YEARLY_BY_DAY: - break; - } - if (ical->recur->_enddate == 0) - sprintf (buffer, "#%d ",ical->recur->duration); - else - sprintf (buffer, "%s ", isodate_from_time_t (ical->recur->_enddate)); - strcat (result, buffer); - addPropValue (o, VCRRuleProp, result); - } - - save_alarm (o, &ical->aalarm, ical); - save_alarm (o, &ical->dalarm, ical); - - if ((alarm = save_alarm (o, &ical->palarm, ical))) - addPropValue (alarm, VCProcedureNameProp, ical->palarm.data); - if ((alarm = save_alarm (o, &ical->malarm, ical))) - addPropValue (alarm, VCEmailAddressProp, ical->malarm.data); - - /* Pilot */ - { - char buffer [20]; - - sprintf (buffer, "%d", ical->pilot_id); - addPropValue (o, XPilotIdProp, buffer); - sprintf (buffer, "%d", ical->pilot_status); - addPropValue (o, XPilotStatusProp, buffer); - } - - return o; -} - -void -ical_foreach (GList *events, calendarfn fn, void *closure) -{ - for (; events; events = events->next){ - iCalObject *ical = events->data; - - (*fn) (ical, ical->dtstart, ical->dtend, closure); - } -} - -static int -is_date_in_list (GList *list, struct tm *date) -{ - struct tm tm; - - for (; list; list = list->next){ - time_t *timep = list->data; - - tm = *localtime (timep); - if (date->tm_mday == tm.tm_mday && - date->tm_mon == tm.tm_mon && - date->tm_year == tm.tm_year){ - return 1; - } - } - return 0; -} - -/* Generates an event instance based on the reference time */ -static gboolean -generate (iCalObject *ico, time_t reference, calendarfn cb, void *closure) -{ - time_t offset; - struct tm tm_start, ref; - time_t start, end; - - offset = ico->dtend - ico->dtstart; - - tm_start = *localtime (&ico->dtstart); - ref = *localtime (&reference); - - tm_start.tm_mday = ref.tm_mday; - tm_start.tm_mon = ref.tm_mon; - tm_start.tm_year = ref.tm_year; - - start = mktime (&tm_start); - if (start == -1) { - g_message ("generate(): Produced invalid start date!"); - return FALSE; - } - - end = start + offset; - -#if 0 - /* FIXME: I think this is not needed, since we are offsetting by full day values, - * and the times should remain the same --- if you have a daily appointment - * at 18:00, it is always at 18:00 even during daylight savings. - * - * However, what should happen on the exact change-of-savings day with - * appointments in the early morning hours? - */ - - if (ref.tm_isdst > tm_start.tm_isdst) { - tm_start.tm_hour--; - tm_end.tm_hour--; - } else if (ref.tm_isdst < tm_start.tm_isdst) { - tm_start.tm_hour++; - tm_end.tm_hour++; - } -#endif - - if (ico->exdate && is_date_in_list (ico->exdate, &tm_start)) - return TRUE; - - return (*cb) (ico, start, end, closure); -} - -int -ical_object_get_first_weekday (int weekday_mask) -{ - int i; - - for (i = 0; i < 7; i++) - if (weekday_mask & (1 << i)) - return i; - - return -1; -} - -#define time_in_range(t, a, b) ((t >= a) && (b ? (t < b) : 1)) -#define recur_in_range(t, r) (r->enddate ? (t < r->enddate) : 1) - -/* - * Generate every possible event. Invokes the callback routine for - * every occurrence of the event in the [START, END] time interval. - * - * If END is zero, the event is generated forever. - * The callback routine is expected to return 0 when no further event - * generation is requested. - */ -void -ical_object_generate_events (iCalObject *ico, time_t start, time_t end, calendarfn cb, void *closure) -{ - time_t current; - int first_week_day; - - /* If there is no recurrence, just check ranges */ - - if (!ico->recur) { - if ((end && (ico->dtstart < end) && (ico->dtend > start)) - || ((end == 0) && (ico->dtend > start))) { - /* The new calendar views expect the times to not be - clipped, so they can show that it continues past - the end of the viewable area. */ -#if 0 - time_t ev_s, ev_e; - - /* Clip range */ - - ev_s = MAX (ico->dtstart, start); - ev_e = MIN (ico->dtend, end); - - (* cb) (ico, ev_s, ev_e, closure); -#else - (* cb) (ico, ico->dtstart, ico->dtend, closure); -#endif - } - return; - } - - /* The event has a recurrence rule -- check that we will generate at least one instance */ - - if (end != 0) { - if (ico->dtstart > end) - return; - - if (!IS_INFINITE (ico->recur) && (ico->recur->enddate < start)) - return; - } - - /* Generate the instances */ - - current = ico->dtstart; - - switch (ico->recur->type) { - case RECUR_DAILY: - do { - if (time_in_range (current, start, end) && recur_in_range (current, ico->recur)) - if (!generate (ico, current, cb, closure)) - return; - - /* Advance */ - - current = time_add_day (current, ico->recur->interval); - - if (current == -1) { - g_warning ("RECUR_DAILY: time_add_day() returned invalid time"); - return; - } - } while ((current < end) || (end == 0)); - - break; - - case RECUR_WEEKLY: - do { - struct tm tm; - - tm = *localtime (¤t); - - if (time_in_range (current, start, end) && recur_in_range (current, ico->recur)) { - /* Weekdays to recur on are specified as a bitmask */ - if (ico->recur->weekday & (1 << tm.tm_wday)) { - if (!generate (ico, current, cb, closure)) - return; - } - } - - /* Advance by day for scanning the week or by interval at week end */ - - if (tm.tm_wday == 6) - current = time_add_day (current, (ico->recur->interval - 1) * 7 + 1); - else - current = time_add_day (current, 1); - - if (current == -1) { - g_warning ("RECUR_WEEKLY: time_add_day() returned invalid time\n"); - return; - } - } while (current < end || (end == 0)); - - break; - - case RECUR_MONTHLY_BY_POS: - /* FIXME: We only deal with positives now */ - if (ico->recur->u.month_pos < 0) { - g_warning ("RECUR_MONTHLY_BY_POS does not support negative positions yet"); - return; - } - - if (ico->recur->u.month_pos == 0) - return; - - first_week_day = /* ical_object_get_first_weekday (ico->recur->weekday); */ - ico->recur->weekday; /* the i/f only lets you choose a single day of the week! */ - - /* This should not happen, but take it into account */ - if (first_week_day == -1) { - g_warning ("ical_object_get_first_weekday() returned -1"); - return; - } - - do { - struct tm tm; - time_t t; - int week_day_start; - - tm = *localtime (¤t); - tm.tm_mday = 1; - t = mktime (&tm); - tm = *localtime (&t); - week_day_start = tm.tm_wday; - - tm.tm_mday = (7 * (ico->recur->u.month_pos - ((week_day_start <= first_week_day ) ? 1 : 0)) - - (week_day_start - first_week_day) + 1); - if( tm.tm_mday > 31 ) - { - tm.tm_mday = 1; - tm.tm_mon += ico->recur->interval; - current = mktime (&tm); - continue; - } - - switch( tm.tm_mon ) - { - case 3: - case 5: - case 8: - case 10: - if( tm.tm_mday > 30 ) - { - tm.tm_mday = 1; - tm.tm_mon += ico->recur->interval; - current = mktime (&tm); - continue; - } - break; - case 1: - if( ((tm.tm_year+1900)%4) == 0 - && ((tm.tm_year+1900)%400) != 100 - && ((tm.tm_year+1900)%400) != 200 - && ((tm.tm_year+1900)%400) != 300 ) - { - - if( tm.tm_mday > 29 ) - { - tm.tm_mday = 1; - tm.tm_mon += ico->recur->interval; - current = mktime (&tm); - continue; - } - } - else - { - if( tm.tm_mday > 28 ) - { - tm.tm_mday = 1; - tm.tm_mon += ico->recur->interval; - current = mktime (&tm); - continue; - } - } - break; - } - - t = mktime (&tm); - - if (time_in_range (t, start, end) && recur_in_range (current, ico->recur)) - if (!generate (ico, t, cb, closure)) - return; - - /* Advance by the appropriate number of months */ - - current = mktime (&tm); - - tm.tm_mday = 1; - tm.tm_mon += ico->recur->interval; - current = mktime (&tm); - - if (current == -1) { - g_warning ("RECUR_MONTHLY_BY_DAY: mktime error\n"); - return; - } - } while ((current < end) || (end == 0)); - - break; - - case RECUR_MONTHLY_BY_DAY: - do { - struct tm tm; - time_t t; - int p; - - tm = *localtime (¤t); - - p = tm.tm_mday; - tm.tm_mday = ico->recur->u.month_day; - t = mktime (&tm); - if (time_in_range (t, start, end) && recur_in_range (current, ico->recur)) - if (!generate (ico, t, cb, closure)) - return; - - /* Advance by the appropriate number of months */ - - tm.tm_mday = p; - tm.tm_mon += ico->recur->interval; - current = mktime (&tm); - - if (current == -1) { - g_warning ("RECUR_MONTHLY_BY_DAY: mktime error\n"); - return; - } - } while (current < end || (end == 0)); - - break; - - case RECUR_YEARLY_BY_MONTH: - case RECUR_YEARLY_BY_DAY: - do { - if (time_in_range (current, start, end) && recur_in_range (current, ico->recur)) - if (!generate (ico, current, cb, closure)) - return; - - /* Advance */ - - current = time_add_year (current, ico->recur->interval); - } while (current < end || (end == 0)); - - break; - - default: - g_assert_not_reached (); - } -} - -static int -duration_callback (iCalObject *ico, time_t start, time_t end, void *closure) -{ - int *count = closure; - struct tm tm; - - tm = *localtime (&start); - - (*count)++; - if (ico->recur->duration == *count) { - ico->recur->enddate = time_day_end (end); - return 0; - } - return 1; -} - -/* Computes ico->recur->enddate from ico->recur->duration */ -void -ical_object_compute_end (iCalObject *ico) -{ - int count = 0; - - g_return_if_fail (ico->recur != NULL); - - ico->recur->_enddate = 0; - ico->recur->enddate = 0; - ical_object_generate_events (ico, ico->dtstart, 0, duration_callback, &count); -} - -int -alarm_compute_offset (CalendarAlarm *a) -{ - if (!a->enabled) - return -1; - switch (a->units){ - case ALARM_MINUTES: - a->offset = a->count * 60; - break; - case ALARM_HOURS: - a->offset = a->count * 3600; - break; - case ALARM_DAYS: - a->offset = a->count * 24 * 3600; - } - return a->offset; -} - -/** - * ical_object_find_in_string: - * @uid: Unique identifier of the sought object. - * @vcalobj: String representation of a complete calendar object. - * @ico: The resulting #iCalObject is stored here. - * - * Parses a complete vCalendar object string and tries to find the calendar - * object that matches the specified @uid. If found, it stores the resulting - * #iCalObject in the @ico parameter. - * - * Return value: A result code depending on whether the parse and search were - * successful. - **/ -CalObjFindStatus -ical_object_find_in_string (const char *uid, const char *vcalobj, iCalObject **ico) -{ - VObject *vcal; - VObjectIterator i; - CalObjFindStatus status; - - g_return_val_if_fail (uid != NULL, CAL_OBJ_FIND_SYNTAX_ERROR); - g_return_val_if_fail (vcalobj != NULL, CAL_OBJ_FIND_SYNTAX_ERROR); - g_return_val_if_fail (ico != NULL, CAL_OBJ_FIND_SYNTAX_ERROR); - - *ico = NULL; - status = CAL_OBJ_FIND_NOT_FOUND; - - vcal = Parse_MIME (vcalobj, strlen (vcalobj)); - - if (!vcal) - return CAL_OBJ_FIND_SYNTAX_ERROR; - - initPropIterator (&i, vcal); - - while (moreIteration (&i)) { - VObject *vobj; - VObject *uid_prop; - char *the_str; - - vobj = nextVObject (&i); - - uid_prop = isAPropertyOf (vobj, VCUniqueStringProp); - if (!uid_prop) - continue; - - /* str_val() sets the_str to the string representation of the - * property. - */ - str_val (uid_prop); - - if (strcmp (the_str, uid) == 0) { - const char *object_name; - - object_name = vObjectName (vobj); - *ico = ical_object_create_from_vobject (vobj, object_name); - - if (*ico) - status = CAL_OBJ_FIND_SUCCESS; - } - - free (the_str); - - if (status == CAL_OBJ_FIND_SUCCESS) - break; - } - - cleanVObject (vcal); - cleanStrTbl (); - - return status; -} - -/* Creates a VObject with the base information of a calendar */ -static VObject * -get_calendar_base_vobject (void) -{ - VObject *vobj; - time_t now; - struct tm tm; - - /* We call localtime for the side effect of setting tzname */ - - now = time (NULL); - tm = *localtime (&now); - - vobj = newVObject (VCCalProp); - - addPropValue (vobj, VCProdIdProp, PRODID); - -#if defined (HAVE_TM_ZONE) - addPropValue (vobj, VCTimeZoneProp, tm.tm_zone); -#elif defined (HAVE_TZNAME) - addPropValue (vobj, VCTimeZoneProp, tzname[0]); -#endif - - /* Per the vCalendar spec, this must be "1.0" */ - addPropValue (vobj, VCVersionProp, "1.0"); - - return vobj; -} - -/** - * ical_object_to_string: - * @ico: A calendar object. - * - * Converts a vCalendar object to its string representation. It is wrapped - * inside a complete VCALENDAR object because other auxiliary information such - * as timezones may appear there. - * - * Return value: String representation of the object. - **/ -char * -ical_object_to_string (iCalObject *ico) -{ - VObject *vcalobj, *vobj; - char *buf, *gbuf; - - vcalobj = get_calendar_base_vobject (); - vobj = ical_object_to_vobject (ico); - addVObjectProp (vcalobj, vobj); - - buf = writeMemVObject (NULL, NULL, vcalobj); - - cleanVObject (vcalobj); - cleanStrTbl (); - - /* We have to g_strdup() it because libversit uses malloc()/realloc(), - * and we want clients to be able to use g_free(). Sigh. - */ - gbuf = g_strdup (buf); - free (buf); - - return gbuf; -} - - -/** - * ical_object_compare_dates: - * @ico1: A calendar event. - * @ico2: A calendar event to compare with @ico1. - * - * Returns TRUE if the dates of both objects match, including any recurrence - * rules. Both calendar objects must have a type of ICAL_EVENT. - * - * Return value: TRUE if both calendar objects have the same dates. - **/ -gboolean -ical_object_compare_dates (iCalObject *ico1, - iCalObject *ico2) -{ - Recurrence *recur1, *recur2; - gint num_exdates; - GList *elem1, *elem2; - time_t *time1, *time2; - - g_return_val_if_fail (ico1 != NULL, FALSE); - g_return_val_if_fail (ico2 != NULL, FALSE); - g_return_val_if_fail (ico1->type == ICAL_EVENT, FALSE); - g_return_val_if_fail (ico2->type == ICAL_EVENT, FALSE); - - /* First check the base dates. */ - if (ico1->dtstart != ico2->dtstart - || ico1->dtend != ico2->dtend) - return FALSE; - - recur1 = ico1->recur; - recur2 = ico2->recur; - - /* If the event doesn't recur, we already know it matches. */ - if (!recur1 && !recur2) - return TRUE; - - /* Check that both recur. */ - if (!(recur1 && recur2)) - return FALSE; - - /* Now we need to see if the recurrence rules are the same. */ - if (recur1->type != recur2->type - || recur1->interval != recur2->interval - || recur1->enddate != recur2->enddate - || recur1->weekday != recur2->weekday - || recur1->duration != recur2->duration - || recur1->_enddate != recur2->_enddate - || recur1->__count != recur2->__count) - return FALSE; - - switch (recur1->type) { - case RECUR_MONTHLY_BY_POS: - if (recur1->u.month_pos != recur2->u.month_pos) - return FALSE; - break; - case RECUR_MONTHLY_BY_DAY: - if (recur1->u.month_day != recur2->u.month_day) - return FALSE; - break; - default: - break; - } - - /* Now check if the excluded dates match. */ - num_exdates = g_list_length (ico1->exdate); - if (g_list_length (ico2->exdate) != num_exdates) - return FALSE; - if (num_exdates == 0) - return TRUE; - - ico1->exdate = g_list_sort (ico1->exdate, compare_exdates); - ico2->exdate = g_list_sort (ico2->exdate, compare_exdates); - - elem1 = ico1->exdate; - elem2 = ico2->exdate; - while (elem1) { - time1 = (time_t*) elem1->data; - time2 = (time_t*) elem2->data; - - if (*time1 != *time2) - return FALSE; - - elem1 = elem1->next; - elem2 = elem2->next; - } - - return TRUE; -} - - -static gint -compare_exdates (gconstpointer a, gconstpointer b) -{ - const time_t *ca = a, *cb = b; - time_t diff = *ca - *cb; - return (diff < 0) ? -1 : (diff > 0) ? 1 : 0; -} - - -/* Converts any CR/LF sequences in the summary field to spaces so we just - have a one-line field. The iCalObjects summary field is changed. */ -static void -ical_object_normalize_summary (iCalObject *ico) -{ - gchar *src, *dest, ch; - gboolean just_output_space = FALSE; - - src = dest = ico->summary; - while ((ch = *src++)) { - if (ch == '\n' || ch == '\r') { - /* We only output 1 space for each sequence of CR & LF - characters. */ - if (!just_output_space) { - *dest++ = ' '; - just_output_space = TRUE; - } - } else { - *dest++ = ch; - just_output_space = FALSE; - } - } - *dest = '\0'; -} diff --git a/calendar/cal-util/calobj.h b/calendar/cal-util/calobj.h deleted file mode 100644 index cf5483a228..0000000000 --- a/calendar/cal-util/calobj.h +++ /dev/null @@ -1,287 +0,0 @@ -/* - * Internal representation of a Calendar object. This is modeled after the - * iCalendar/vCalendar specificiation - * - * Authors: Miguel de Icaza (miguel@gnu.org) - * Federico Mena (quartic@gimp.org). - */ -#ifndef CALOBJ_H -#define CALOBJ_H - -#include -#include "libversit/vcc.h" - -BEGIN_GNOME_DECLS - -enum AlarmType { - ALARM_MAIL, - ALARM_PROGRAM, - ALARM_DISPLAY, - ALARM_AUDIO -}; - -enum AlarmUnit { - ALARM_MINUTES, - ALARM_HOURS, - ALARM_DAYS -}; - -typedef struct { - enum AlarmType type; - int enabled; - int count; - enum AlarmUnit units; - char *data; /* not used for iCalendar alarms */ - - /* the following pointers are used for iCalendar alarms */ - - char *attach; /* AUDIO, EMAIL, PROC */ - char *desc; /* DISPLAY, EMAIL, PROC */ - char *summary; /* EMAIL */ - char *attendee; /* EMAIL */ - - /* Does not get saved, internally used */ - time_t offset; - time_t trigger; - - int snooze_secs; - int snooze_repeat; - - /* Widgets */ - void *w_count; /* A GtkEntry */ - void *w_enabled; /* A GtkChecButton */ - void *w_timesel; /* A GtkMenu */ - void *w_entry; /* A GnomeEntryFile/GtkEntry for PROGRAM/MAIL */ - void *w_label; -} CalendarAlarm; - -/* Calendar object type */ -typedef enum { - ICAL_EVENT, - ICAL_TODO, - ICAL_JOURNAL, - ICAL_FBREQUEST, - ICAL_FBREPLY, - ICAL_BUSYTIME, - ICAL_TIMEZONE -} iCalType; - -/* For keys that might contain binary or text/binary */ -typedef struct { - char *data; - int len; -} iCalValue; - -typedef enum { - ICAL_PILOT_SYNC_NONE = 0, - ICAL_PILOT_SYNC_MOD = 1, - ICAL_PILOT_SYNC_DEL = 3 -} iCalPilotState; - -typedef struct { - int valid; /* true if the Geography was specified */ - double latitude; - double longitude; -} iCalGeo; - -typedef enum { - ICAL_OPAQUE, - ICAL_TRANSPARENT -} iCalTransp; - -typedef struct { - char *uid; - char *reltype; -} iCalRelation; - -typedef char NotYet; - -enum RecurType { - RECUR_DAILY, - RECUR_WEEKLY, - RECUR_MONTHLY_BY_POS, - RECUR_MONTHLY_BY_DAY, - RECUR_YEARLY_BY_MONTH, - RECUR_YEARLY_BY_DAY, -}; - -#define DAY_LASTDAY 10000 - -typedef struct { - enum RecurType type; - - int interval; - - /* Used for recur computation */ - time_t enddate; /* If the value is zero, it is an infinite event - * otherwise, it is either the _enddate value (if - * this is what got specified) or it is our computed - * ending date (computed from the duration item). - */ - - int weekday; - - union { - int month_pos; - int month_day; - } u; - - int duration; - time_t _enddate; /* As found on the vCalendar file */ - int __count; -} Recurrence; - -/* - NOTE: iCalPerson is used for various property values which specify - people (e.g. ATTENDEE, ORGANIZER, etc. Not all fields are valid - under RFC 2445 for all property values, but iCalPerson can store - them anyway. Enforcing the RFC is a job for the parser. -*/ - -typedef struct { - char *addr; - char *name; - char *role; - char *partstat; - gboolean rsvp; - char *cutype; /* calendar user type */ - GList *member; /* group memberships */ - GList *deleg_to; - GList *deleg_from; - char *sent_by; - char *directory; - GList *altrep; /* list of char* URI's */ -} iCalPerson; - -#define IS_INFINITE(r) (r->duration == 0) - -/* Flags to indicate what has changed in an object */ -typedef enum { - CHANGE_NEW = 1 << 0, /* new object */ - CHANGE_SUMMARY = 1 << 1, /* summary */ - CHANGE_DATES = 1 << 2, /* dtstart / dtend */ - CHANGE_ALL = CHANGE_SUMMARY | CHANGE_DATES -} CalObjectChange; - -/* - * This describes an iCalendar object, note that we never store durations, instead we - * always compute the end time computed from the start + duration. - */ -typedef struct { - iCalType type; - - GList *attach; /* type: one or more URIs or binary data */ - GList *attendee; /* type: CAL-ADDRESS (list of iCalPerson) */ - GList *categories; /* type: one or more TEXT */ - char *class; - - char *comment; /* we collapse one or more TEXTs into one */ - time_t completed; - time_t created; - GList *contact; /* type: one or more TEXT */ - char *desc; - time_t dtstamp; - time_t dtstart; - time_t dtend; /* also duedate for todo's */ - gboolean date_only; /* set if the start/end times were - specified using dates, not times (internal use, not stored to disk) */ - GList *exdate; /* type: one or more time_t's */ - GList *exrule; /* type: one or more RECUR */ - iCalGeo geo; - time_t last_mod; - char *location; - iCalPerson *organizer; - int percent; - int priority; - char *rstatus; /* request status for freebusy */ - GList *related; /* type: one or more TEXT */ - GList *resources; /* type: one or more TEXT */ - GList *rdate; /* type: one or more recurrence date */ - GList *rrule; /* type: one or more recurrence rules */ - int seq; - char *status; - char *summary; - iCalTransp transp; - char *uid; - char *url; - time_t recurid; - - CalendarAlarm dalarm; - CalendarAlarm aalarm; - CalendarAlarm palarm; - CalendarAlarm malarm; - - GList *alarms; - - Recurrence *recur; - - int new; - void *user_data; /* Generic data pointer */ - - /* Pilot */ - iCalPilotState pilot_status; /* Status information */ - guint32 pilot_id; /* Pilot ID */ - - guint ref_count; -} iCalObject; - -/* The callback for the recurrence generator */ -typedef int (*calendarfn) (iCalObject *, time_t, time_t, void *); - -iCalObject *ical_new (char *comment, char *organizer, char *summary); -iCalObject *ical_object_new (void); - -/* iCalObjects are created with a refcount of 1. When it drops to 0 it is - destroyed with ical_object_destroy(). To maintain backwards compatability - ical_object_destroy() can still be used, though code which uses it should - not be mixed with code that uses refcounts. */ -void ical_object_ref (iCalObject *ico); -void ical_object_unref (iCalObject *ico); - -void ical_object_destroy (iCalObject *ico); - -iCalObject *ical_object_create_from_vobject (VObject *obj, const char *object_name); -VObject *ical_object_to_vobject (iCalObject *ical); -iCalObject *ical_object_duplicate (iCalObject *o); -void ical_foreach (GList *events, calendarfn fn, void *closure); -void ical_object_generate_events (iCalObject *ico, time_t start, time_t end, calendarfn cb, void *closure); -void ical_object_add_exdate (iCalObject *o, time_t t); - -/* Computes the enddate field of the recurrence based on the duration */ -void ical_object_compute_end (iCalObject *ico); - -typedef enum { - CAL_OBJ_FIND_SUCCESS, - CAL_OBJ_FIND_SYNTAX_ERROR, - CAL_OBJ_FIND_NOT_FOUND -} CalObjFindStatus; - -CalObjFindStatus ical_object_find_in_string (const char *uid, const char *vcalobj, iCalObject **ico); - -char *ical_object_to_string (iCalObject *ico); - - -/* Returns the first toggled day in a weekday mask -- we do this because we do not support multiple - * days on a monthly-by-pos recurrence. If no days are toggled, it returns -1. - */ -int ical_object_get_first_weekday (int weekday_mask); - -/* Returns the number of seconds configured to trigger the alarm in advance to an event */ -int alarm_compute_offset (CalendarAlarm *a); - - -/* Returns TRUE if the dates of both objects match, including any recurrence - rules. */ -gboolean ical_object_compare_dates (iCalObject *ico1, iCalObject *ico2); - -/* Generates a new uid for a calendar object. Should be g_free'd eventually. */ -char *ical_gen_uid (void); - -/* This resets any recurrence rules of the iCalObject. */ -void ical_object_reset_recurrence (iCalObject *ico); - - -END_GNOME_DECLS - -#endif - diff --git a/calendar/cal-util/icalendar-save.c b/calendar/cal-util/icalendar-save.c deleted file mode 100644 index 8fae9a02f5..0000000000 --- a/calendar/cal-util/icalendar-save.c +++ /dev/null @@ -1,509 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -#include -#include -#include -#include "icalendar-save.h" - - -static void unparse_person (iCalPerson *person, icalproperty *person_prop); -static struct icaltimetype timet_to_icaltime (time_t tt); -static icalproperty *unparse_related (iCalRelation *rel); -static icalcomponent *unparse_alarm (CalendarAlarm *alarm); - - -icalcomponent* -icalcomponent_create_from_ical_object (iCalObject *ical) -{ - icalcomponent_kind kind; - icalcomponent *comp; - icalproperty *prop; - - switch (ical->type) { - case ICAL_EVENT: kind = ICAL_VEVENT_COMPONENT; break; - case ICAL_TODO: kind = ICAL_VTODO_COMPONENT; break; - case ICAL_JOURNAL: kind = ICAL_VJOURNAL_COMPONENT; break; - case ICAL_FBREQUEST: kind = ICAL_VFREEBUSY_COMPONENT; break; - case ICAL_TIMEZONE: kind = ICAL_VTIMEZONE_COMPONENT; break; - default: - kind = ICAL_NO_COMPONENT; break; - } - - comp = icalcomponent_new (kind); - - /*** calscale ***/ - prop = icalproperty_new_calscale ("GREGORIAN"); - icalcomponent_add_property (comp, prop); - - /*** catagories ***/ - if (ical->categories) { - /* ical->categories is a GList of (char *) */ - GList *cur; - for (cur = ical->categories; cur; cur = cur->next) { - prop = icalproperty_new_categories ((char *) cur); - icalcomponent_add_property (comp, prop); - } - } - - /*** class ***/ - if (ical->class) { - prop = icalproperty_new_class (ical->class); - icalcomponent_add_property (comp, prop); - } - - /*** comment ***/ - if (ical->comment) { - prop = icalproperty_new_comment (ical->comment); - icalcomponent_add_property (comp, prop); - } - - /*** description ***/ - if (ical->desc) { - prop = icalproperty_new_description (ical->desc); - icalcomponent_add_property (comp, prop); - } - - /*** geo ***/ - if (ical->geo.valid) { - struct icalgeotype v; - v.lat = ical->geo.latitude; - v.lon = ical->geo.longitude; - prop = icalproperty_new_geo (v); - icalcomponent_add_property (comp, prop); - } - - /*** location ***/ - if (ical->location) { - prop = icalproperty_new_location (ical->location); - icalcomponent_add_property (comp, prop); - } - - /*** percentcomplete ***/ - prop = icalproperty_new_percentcomplete (ical->percent); - icalcomponent_add_property (comp, prop); - - /*** priority ***/ - if (ical->priority) { - prop = icalproperty_new_priority (ical->priority); - icalcomponent_add_property (comp, prop); - } - - /*** resources ***/ - if (ical->resources) { - /* ical->resources is a GList of (char *) */ - GList *cur; - for (cur = ical->resources; cur; cur = cur->next) { - prop = icalproperty_new_resources ((char *) cur); - icalcomponent_add_property (comp, prop); - } - } - - /*** status ***/ - if (ical->status) { - prop = icalproperty_new_status (ical->status); - icalcomponent_add_property (comp, prop); - } - - /*** summary ***/ - if (ical->summary) { - prop = icalproperty_new_summary (ical->summary); - icalcomponent_add_property (comp, prop); - } - - /*** completed ***/ - if (ical->completed) { - struct icaltimetype ictime; - ictime = timet_to_icaltime (ical->completed); - prop = icalproperty_new_completed (ictime); - icalcomponent_add_property (comp, prop); - } - - /*** dtend ***/ /*** due ***/ - if (ical->dtend) { - /* FIXME: We should handle timezone specifiers */ - struct icaltimetype ictime; - ictime = timet_to_icaltime (ical->dtend); - if (ical->type == ICAL_TODO) - prop = icalproperty_new_due (ictime); - else - prop = icalproperty_new_dtend (ictime); - if (ical->date_only) { - icalparameter *param; - param = icalparameter_new (ICAL_VALUE_PARAMETER); - icalparameter_set_value (param, ICAL_VALUE_DATE); - icalproperty_add_parameter (prop, param); - } - icalcomponent_add_property (comp, prop); - } - - /*** dtstart ***/ - if (ical->dtstart) { - /* FIXME: We should handle timezone specifiers */ - struct icaltimetype ictime; - ictime = timet_to_icaltime (ical->dtstart); - prop = icalproperty_new_dtstart (ictime); - if (ical->date_only) { - icalparameter *param; - param = icalparameter_new (ICAL_VALUE_PARAMETER); - icalparameter_set_value (param, ICAL_VALUE_DATE); - icalproperty_add_parameter (prop, param); - } - icalcomponent_add_property (comp, prop); - } - - /*** duration ***/ - { - /* FIX ME */ - } - - /*** freebusy ***/ - { - /* FIX ME */ - } - - /*** transp ***/ - { - if (ical->transp == ICAL_TRANSP_PROPERTY) - prop = icalproperty_new_transp ("TRANSPARENT"); - else - prop = icalproperty_new_transp ("OPAQUE"); - icalcomponent_add_property (comp, prop); - } - - /* - ICAL_TZID_PROPERTY: - ICAL_TZNAME_PROPERTY: - ICAL_TZOFFSETFROM_PROPERTY: - ICAL_TZOFFSETTO_PROPERTY: - ICAL_TZURL_PROPERTY: - */ - - /*** attendee ***/ - if (ical->attendee) { - /* a list of (iCalPerson *) */ - GList *cur; - for (cur = ical->attendee; cur; cur = cur->next) { - iCalPerson *person = (iCalPerson *) cur->data; - prop = icalproperty_new_attendee (person->addr); - unparse_person (person, prop); - icalcomponent_add_property (comp, prop); - } - } - - /*** contact ***/ - if (ical->contact) { - /* a list of (iCalPerson *) */ - GList *cur; - for (cur = ical->contact; cur; cur = cur->next) { - iCalPerson *person = (iCalPerson *) cur->data; - prop = icalproperty_new_contact (person->addr); - unparse_person (person, prop); - icalcomponent_add_property (comp, prop); - } - } - - /*** organizer ***/ - if (ical->organizer) { - prop = icalproperty_new_organizer (ical->organizer->addr); - unparse_person (ical->organizer, prop); - icalcomponent_add_property (comp, prop); - } - - /*** recurrenceid ***/ - if (ical->recurid) { - struct icaltimetype ictime; - ictime = timet_to_icaltime (ical->recurid); - prop = icalproperty_new_recurrenceid (ictime); - } - - /*** relatedto ***/ - - if (ical->related) { - /* a list of (iCalPerson *) */ - GList *cur; - for (cur = ical->related; cur; cur = cur->next) { - iCalRelation *related = (iCalRelation *) cur->data; - prop = unparse_related (related); - icalcomponent_add_property (comp, prop); - } - } - - - /*** url ***/ - if (ical->url) { - prop = icalproperty_new_url (ical->url); - icalcomponent_add_property (comp, prop); - } - - /*** uid ***/ - if (ical->uid) { - prop = icalproperty_new_uid (ical->uid); - icalcomponent_add_property (comp, prop); - } - - /*** exdate ***/ - if (ical->exdate) { - struct icaltimetype v; - GList *cur; - for (cur = ical->exdate; cur; cur = cur->next) { - time_t t = (time_t) cur->data; - v = timet_to_icaltime (t); - prop = icalproperty_new_exdate (v); - icalcomponent_add_property (comp, prop); - } - } - - /*** created ***/ - if (ical->created) { - struct icaltimetype v; - v = timet_to_icaltime (ical->created); - prop = icalproperty_new_created (v); - icalcomponent_add_property (comp, prop); - } - - /*** dtstamp ***/ - if (ical->dtstamp) { - struct icaltimetype v; - v = timet_to_icaltime (ical->dtstamp); - prop = icalproperty_new_created (v); - icalcomponent_add_property (comp, prop); - } - - /*** lastmodified ***/ - if (ical->last_mod) { - struct icaltimetype v; - v = timet_to_icaltime (ical->last_mod); - prop = icalproperty_new_created (v); - icalcomponent_add_property (comp, prop); - } - - /*** sequence ***/ - if (ical->seq) { - prop = icalproperty_new_sequence (ical->seq); - icalcomponent_add_property (comp, prop); - } - - /*** requeststatus ***/ - if (ical->rstatus) { - prop = icalproperty_new_requeststatus (ical->rstatus); - icalcomponent_add_property (comp, prop); - } - - /* if there is a VALARM subcomponent, add it here */ - - if (ical->alarms) { - GList *cur; - for (cur = ical->alarms; cur; cur = cur->next) { - CalendarAlarm *alarm = (CalendarAlarm *) cur->data; - icalcomponent *subcomp = unparse_alarm (alarm); - icalcomponent_add_component (comp, subcomp); - } - } - - return comp; -} - - -/* FIX ME -- same as icaltimetype_from_timet in icaltypes.c */ -static -struct icaltimetype timet_to_icaltime (time_t tt) -{ - struct tm *t; - struct icaltimetype i; - - t = gmtime (&tt); - - /*return tt - (i->is_utc ? timezone : 0); */ - i.is_utc = 0; - - i.year = t->tm_year + 1900; - i.month = t->tm_mon + 1; - i.day = t->tm_mday; - - if (t->tm_hour == 0 && t->tm_min == 0 && t->tm_sec == 0) { - i.is_date = 1; - i.hour = 0; - i.minute = 0; - i.second = 0; - } else { - i.is_date = 0; - i.hour = t->tm_hour; - i.minute = t->tm_min; - i.second = t->tm_sec; - } - - return i; -} - - -/* fills in "person_prop" with information from "person" */ - -static -void unparse_person (iCalPerson *person, icalproperty *person_prop) -{ - icalparameter *param; - GList *cur; - - /* convert iCalPerson to an icalproperty */ - - if (person->name) { - param = icalparameter_new_cn (person->name); - icalproperty_add_parameter (person_prop, param); - } - - if (g_strcasecmp (person->role, "CHAIR") == 0) - param = icalparameter_new_role (ICAL_ROLE_CHAIR); - else if (g_strcasecmp (person->role, "REQPARTICIPANT") == 0) - param = icalparameter_new_role (ICAL_ROLE_REQPARTICIPANT); - else if (g_strcasecmp (person->role, "OPTPARTICIPANT") == 0) - param = icalparameter_new_role (ICAL_ROLE_OPTPARTICIPANT); - else if (g_strcasecmp (person->role, "NONPARTICIPANT") == 0) - param = icalparameter_new_role (ICAL_ROLE_NONPARTICIPANT); - else - param = icalparameter_new_role (ICAL_ROLE_XNAME); - icalproperty_add_parameter (person_prop, param); - - if (g_strcasecmp (person->partstat, "NEEDSACTION") == 0) - param = icalparameter_new_partstat (ICAL_PARTSTAT_NEEDSACTION); - else if (g_strcasecmp (person->partstat, "ACCEPTED") == 0) - param = icalparameter_new_partstat (ICAL_PARTSTAT_ACCEPTED); - else if (g_strcasecmp (person->partstat, "DECLINED") == 0) - param = icalparameter_new_partstat (ICAL_PARTSTAT_DECLINED); - else if (g_strcasecmp (person->partstat, "TENTATIVE") == 0) - param = icalparameter_new_partstat (ICAL_PARTSTAT_TENTATIVE); - else if (g_strcasecmp (person->partstat, "DELEGATED") == 0) - param = icalparameter_new_partstat (ICAL_PARTSTAT_DELEGATED); - else if (g_strcasecmp (person->partstat, "COMPLETED") == 0) - param = icalparameter_new_partstat (ICAL_PARTSTAT_COMPLETED); - else if (g_strcasecmp (person->partstat, "INPROCESS") == 0) - param = icalparameter_new_partstat (ICAL_PARTSTAT_INPROCESS); - else /* FIX ME, NEEDSACTION instead? */ - param = icalparameter_new_partstat (ICAL_PARTSTAT_XNAME); - icalproperty_add_parameter (person_prop, param); - - if (person->rsvp != FALSE) { - param = icalparameter_new_rsvp (TRUE); - icalproperty_add_parameter (person_prop, param); - } - - if (g_strcasecmp (person->cutype, "INDIVIDUAL") == 0) - param = icalparameter_new_cutype (ICAL_CUTYPE_INDIVIDUAL); - else if (g_strcasecmp (person->cutype, "GROUP") == 0) - param = icalparameter_new_cutype (ICAL_CUTYPE_GROUP); - else if (g_strcasecmp (person->cutype, "RESOURCE") == 0) - param = icalparameter_new_cutype (ICAL_CUTYPE_RESOURCE); - else if (g_strcasecmp (person->cutype, "ROOM") == 0) - param = icalparameter_new_cutype (ICAL_CUTYPE_ROOM); - else /* FIX ME, INDIVIDUAL instead? */ - param = icalparameter_new_cutype (ICAL_CUTYPE_UNKNOWN); - icalproperty_add_parameter (person_prop, param); - - /* person->member is a list of ICAL_MEMBER_PARAMETER */ - for (cur = person->member; cur; cur = cur->next) { - gchar *member = (gchar *) cur->data; - param = icalparameter_new_member (member); - icalproperty_add_parameter (person_prop, param); - } - - /* person->deleg_to is a list of ICAL_DELEGATEDTO_PARAMETER */ - for (cur = person->deleg_to; cur; cur = cur->next) { - gchar *deleg_to = (gchar *) cur->data; - param = icalparameter_new_delegatedto (deleg_to); - icalproperty_add_parameter (person_prop, param); - } - - /* ret->deleg_from is a list of ICAL_DELEGATEDFROM_PARAMETER */ - for (cur = person->deleg_from; cur; cur = cur->next) { - gchar *deleg_from = (gchar *) cur->data; - param = icalparameter_new_delegatedfrom (deleg_from); - icalproperty_add_parameter (person_prop, param); - } - - if (person->sent_by) { - param = icalparameter_new_sentby (person->sent_by); - icalproperty_add_parameter (person_prop, param); - } - - /* ret->deleg_to is a list of ICAL_DIR_PARAMETER */ - /* FIX ME ... */ -} - - -static -icalproperty *unparse_related (iCalRelation *rel) -{ - icalproperty *prop; - - prop = icalproperty_new_relatedto (rel->reltype); - - icalproperty_set_relatedto (prop, rel->uid); - - /* FIX ME RELTYPE_XNAME ? */ - - return prop; -} - - -static -icalcomponent *unparse_alarm (CalendarAlarm *alarm) -{ - icalcomponent *comp = icalcomponent_new (ICAL_VALARM_COMPONENT); - icalproperty *prop; - - prop = NULL; - switch (alarm->type){ - case ALARM_AUDIO: - prop = icalproperty_new_action ("AUDIO"); - break; - case ALARM_DISPLAY: - prop = icalproperty_new_action ("DISPLAY"); - break; - case ALARM_MAIL: - prop = icalproperty_new_action ("EMAIL"); - break; - case ALARM_PROGRAM: - prop = icalproperty_new_action ("PROCEDURE"); - break; - default: - g_warning ("Unsupported alarm type!"); - break; - } - if (prop) - icalcomponent_add_property (comp, prop); - - if (alarm->snooze_repeat) - prop = icalproperty_new_repeat (alarm->snooze_repeat); - - if (alarm->snooze_secs) { - struct icaldurationtype dur; - dur = icaldurationtype_from_timet (alarm->snooze_secs); - prop = icalproperty_new_duration (dur); - icalcomponent_add_property (comp, prop); - } - - if (alarm->attach) { - struct icalattachtype *attach; - attach = icalattachtype_new (); - icalattachtype_set_url (attach, alarm->attach); - prop = icalproperty_new_attach (*attach); - icalattachtype_free (attach); - icalcomponent_add_property (comp, prop); - } - - if (alarm->desc) { - prop = icalproperty_new_description (alarm->desc); - icalcomponent_add_property (comp, prop); - } - - if (alarm->summary) { - prop = icalproperty_new_summary (alarm->summary); - icalcomponent_add_property (comp, prop); - } - - if (alarm->attendee) { - icalproperty_new_attendee (alarm->attendee); - icalcomponent_add_property (comp, prop); - } - - return comp; -} diff --git a/calendar/cal-util/icalendar-save.h b/calendar/cal-util/icalendar-save.h deleted file mode 100644 index 1e0ab59e70..0000000000 --- a/calendar/cal-util/icalendar-save.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef ICALENDAR_SAVE_H -#define ICALENDAR_SAVE_H - -#include -#include - - - -icalcomponent *icalcomponent_create_from_ical_object (iCalObject *ical); - - - -#endif diff --git a/calendar/cal-util/icalendar-test.c b/calendar/cal-util/icalendar-test.c deleted file mode 100644 index 921e109a2c..0000000000 --- a/calendar/cal-util/icalendar-test.c +++ /dev/null @@ -1,146 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -#include -#include -#include - -#include -#include -#include -#include "libversit/vcc.h" - -#include "icalendar-save.h" -#include "icalendar.h" - - -static icalcomponent* -icalendar_parse_file (char* fname) -{ - FILE* fp; - icalcomponent* comp = NULL; - gchar* str; - struct stat st; - int n; - - fp = fopen (fname, "r"); - if (!fp) { - g_warning ("Cannot open open calendar file."); - return NULL; - } - - stat (fname, &st); - - str = g_malloc (st.st_size + 2); - - n = fread ((gchar*) str, 1, st.st_size, fp); - if (n != st.st_size) { - g_warning ("Read error."); - } - str[n] = '\0'; - - fclose (fp); - - comp = icalparser_parse_string (str); - g_free (str); - - return comp; -} - - -static GList * -icalendar_calendar_load (GList *icals, char *fname) -{ - icalcomponent *comp; - icalcomponent *subcomp; - iCalObject *ical; - - comp = icalendar_parse_file (fname); - subcomp = icalcomponent_get_first_component (comp, - ICAL_ANY_COMPONENT); - while (subcomp) { - ical = ical_object_create_from_icalcomponent (subcomp); - if (ical->type != ICAL_EVENT && - ical->type != ICAL_TODO && - ical->type != ICAL_JOURNAL) { - g_warning ("Skipping unsupported iCalendar component"); - } else { - printf ("prepending %p\n", ical); - icals = g_list_prepend (icals, ical); - } - subcomp = icalcomponent_get_next_component (comp, - ICAL_ANY_COMPONENT); - } - - return icals; -} - - - - -static void -icalendar_calendar_save (GList *icals, char *fname) -{ - GList *cur; - icalcomponent *top = icalcomponent_new (ICAL_VCALENDAR_COMPONENT); - char *out_cal_string; - - for (cur=icals; cur; cur=cur->next) { - iCalObject *ical = (iCalObject *) cur->data; - icalcomponent *comp; - comp = icalcomponent_create_from_ical_object (ical); - icalcomponent_add_component (top, comp); - } - - out_cal_string = icalcomponent_as_ical_string (top); - - printf ("---------------------------------------------------------\n"); - printf ("%s", out_cal_string); -} - - - -int main (int argc, char *argv[]) -{ - GList *icals = NULL; - int i; - long int n0, n1; - struct icaldurationtype dt; - - - /* test icaldurationtype_from_timet */ - srandom (time (0)); - - for (i=0; i<10; i++) { - n0 = random () % ((60 * 60 * 24 * 7) * 4); - dt = icaldurationtype_from_timet (n0); - n1 = icaldurationtype_as_timet (dt); - - printf ("%ld -> (%d %d %d %d %d) -> %ld\n", - n0, - dt.weeks, dt.days, dt.hours, dt.minutes, dt.seconds, - n1); - if (n0 != n1) abort (); - } - - /*****************/ - /* test conversion of icalcomponents to and from iCalObjects */ - /*****************/ - - /* load an ical file */ - - if (argc < 2) { - printf ("give ical file as argument.\n"); - return 1; - } - - icals = icalendar_calendar_load (icals, argv[ 1 ]); - - printf ("loaded %d ical components\n", g_list_length (icals)); - - - /* save it back out */ - - icalendar_calendar_save (icals, "out.ical"); - - return 0; -} diff --git a/calendar/cal-util/icalendar.c b/calendar/cal-util/icalendar.c deleted file mode 100644 index eedb732617..0000000000 --- a/calendar/cal-util/icalendar.c +++ /dev/null @@ -1,674 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * icalendar server for gnomecal - * - * This module interfaces between libical and the gnomecal internal - * representation - * - * Copyright (C) 1999 The Free Software Foundation - * Authors: - * Russell Steinthal (rms39@columbia.edu) - * - */ - -#include -#include -#include -#include "icalendar.h" - -static time_t icaltime_to_timet (struct icaltimetype* i); -static CalendarAlarm* parse_alarm (icalproperty *prop); -static iCalPerson* parse_person (icalproperty *prop, gchar *value); -static iCalRelation* parse_related (icalproperty *prop); - -/* Duplicate a string without memory leaks */ -static gchar* copy_str (gchar** store, gchar* src) -{ - if (*store) - g_free (*store); - return (*store = g_strdup (src)); -} - -static GList* -copy_to_list (GList** store, gchar* src) -{ - *store = g_list_prepend (*store, g_strdup (src)); - return *store; -} - - -iCalObject * -ical_object_create_from_icalcomponent (icalcomponent* comp) -{ - iCalObject *ical = NULL; - iCalPerson *person; - icalcomponent *subcomp; - icalproperty *prop; - icalparameter *param; - struct icaltimetype ictime; - time_t *pt; - CalendarAlarm *alarm = NULL; - icalcomponent_kind compType; - struct icalgeotype geo; - struct icalperiodtype period; - - gboolean root = FALSE; - gboolean attachment = FALSE; - - char *tmpStr; /* this is a library-owned string */ - - ical = g_new0 (iCalObject, 1); - - compType = icalcomponent_isa (comp); - - switch (compType) { - case ICAL_XROOT_COMPONENT: - root = TRUE; - break; - case ICAL_XATTACH_COMPONENT: - attachment = TRUE; - break; - case ICAL_VEVENT_COMPONENT: - ical->type = ICAL_EVENT; - break; - case ICAL_VTODO_COMPONENT: - ical->type = ICAL_TODO; - break; - case ICAL_VJOURNAL_COMPONENT: - ical->type = ICAL_JOURNAL; - break; - case ICAL_VCALENDAR_COMPONENT: - /* FIXME: what does this mean? */ - break; - case ICAL_VFREEBUSY_COMPONENT: - ical->type = ICAL_FBREQUEST; - /* NOTE: This is not conclusive- you need to analyze - properties to determine whether this is an - FBREQUEST or an FBREPLY */ - break; - case ICAL_VTIMEZONE_COMPONENT: - ical->type = ICAL_TIMEZONE; - break; - case ICAL_VALARM_COMPONENT: - case ICAL_XAUDIOALARM_COMPONENT: - case ICAL_XDISPLAYALARM_COMPONENT: - case ICAL_XEMAILALARM_COMPONENT: - case ICAL_XPROCEDUREALARM_COMPONENT: - /* this should not be reached, since this loop should - only be processing first level components */ - break; - case ICAL_XSTANDARD_COMPONENT: - /* FIXME: what does this mean? */ - break; - case ICAL_XDAYLIGHT_COMPONENT: - /* FIXME: what does this mean? */ - break; - case ICAL_X_COMPONENT: - /* FIXME: what does this mean? */ - break; - case ICAL_VSCHEDULE_COMPONENT: - /* FIXME: what does this mean? */ - break; - case ICAL_XLICINVALID_COMPONENT: - /* FIXME: what does this mean? */ - break; - case ICAL_NO_COMPONENT: - case ICAL_ANY_COMPONENT: - /* should not occur */ - break; - case ICAL_VQUERY_COMPONENT: - case ICAL_VCAR_COMPONENT: - case ICAL_VCOMMAND_COMPONENT: - /* FIXME: what does this mean? */ - break; - } - - prop = icalcomponent_get_first_property (comp, ICAL_ANY_PROPERTY); - while (prop) { - switch (icalproperty_isa (prop)) { - case ICAL_CALSCALE_PROPERTY: - if (g_strcasecmp (icalproperty_get_calscale (prop), - "GREGORIAN")) - g_warning ("Unknown calendar format."); - break; - case ICAL_METHOD_PROPERTY: - /* FIXME: implement something here */ - break; - case ICAL_ATTACH_PROPERTY: - /* FIXME: not yet implemented */ - break; - case ICAL_CATEGORIES_PROPERTY: - copy_to_list (&ical->categories, - icalproperty_get_categories (prop)); - break; - case ICAL_CLASS_PROPERTY: - copy_str (&ical->class, icalproperty_get_class (prop)); - break; - case ICAL_COMMENT_PROPERTY: - /*tmpStr = icalproperty_get_comment (prop);*/ - tmpStr = g_strconcat (icalproperty_get_comment (prop), - ical->comment, - NULL); - if (ical->comment) - g_free (ical->comment); - ical->comment = tmpStr; - break; - case ICAL_DESCRIPTION_PROPERTY: - copy_str (&ical->desc, - icalproperty_get_description (prop)); - break; - case ICAL_GEO_PROPERTY: - geo = icalproperty_get_geo (prop); - ical->geo.latitude = geo.lat; - ical->geo.longitude = geo.lon; - ical->geo.valid = TRUE; - break; - case ICAL_LOCATION_PROPERTY: - copy_str (&ical->location, - icalproperty_get_location (prop)); - break; - case ICAL_PERCENTCOMPLETE_PROPERTY: - ical->percent = icalproperty_get_percentcomplete (prop); - break; - case ICAL_PRIORITY_PROPERTY: - ical->priority = icalproperty_get_priority (prop); - if (ical->priority < 0 || ical->priority > 9) - g_warning ("Priority out-of-range (see RFC2445)"); - break; - case ICAL_RESOURCES_PROPERTY: - copy_to_list (&ical->resources, - icalproperty_get_resources (prop)); - break; - case ICAL_STATUS_PROPERTY: - copy_str (&ical->status, - icalproperty_get_status (prop)); - break; - case ICAL_SUMMARY_PROPERTY: - copy_str (&ical->summary, - icalproperty_get_summary (prop)); - break; - case ICAL_COMPLETED_PROPERTY: - ictime = icalproperty_get_completed (prop); - ical->completed = icaltime_to_timet (&ictime); - break; - case ICAL_DTEND_PROPERTY: - ictime = icalproperty_get_dtend (prop); - ical->dtend = icaltime_to_timet (&ictime); - param = icalproperty_get_first_parameter (prop, - ICAL_VALUE_PARAMETER); - if (param) - ical->date_only = (icalparameter_get_value (param) == ICAL_VALUE_DATE); - /* FIXME: We should handle timezone specifiers */ - break; - case ICAL_DUE_PROPERTY: - ictime = icalproperty_get_due (prop); - ical->dtend = icaltime_to_timet (&ictime); - param = icalproperty_get_first_parameter (prop, - ICAL_VALUE_PARAMETER); - ical->date_only = (icalparameter_get_value (param) == - ICAL_VALUE_DATE); - /* FIXME: We should handle timezone specifiers */ - break; - case ICAL_DTSTART_PROPERTY: - ictime = icalproperty_get_dtstart (prop); - ical->dtstart = icaltime_to_timet (&ictime); - param = icalproperty_get_first_parameter (prop, - ICAL_VALUE_PARAMETER); - if (param) - ical->date_only = (icalparameter_get_value (param) == ICAL_VALUE_DATE); - /* FIXME: We should handle timezone specifiers */ - break; - case ICAL_DURATION_PROPERTY: - /* FIXME: I don't see the necessary libical function */ - break; - case ICAL_FREEBUSY_PROPERTY: - period = icalproperty_get_freebusy (prop); - ical->dtstart = icaltime_to_timet (&(period.start)); - /* FIXME: period.end is specified as being relative - to start, so this may not be correct */ - ical->dtend = icaltime_to_timet (&(period.end)); - break; - case ICAL_TRANSP_PROPERTY: - tmpStr = icalproperty_get_transp (prop); - /* do not i18n the following string constant! */ - if (!g_strcasecmp (tmpStr, "TRANSPARENT")) - ical->transp = ICAL_TRANSPARENT; - else - ical->transp = ICAL_OPAQUE; - break; - case ICAL_TZID_PROPERTY: - case ICAL_TZNAME_PROPERTY: - case ICAL_TZOFFSETFROM_PROPERTY: - case ICAL_TZOFFSETTO_PROPERTY: - case ICAL_TZURL_PROPERTY: - /* no implementation for now */ - break; - case ICAL_ATTENDEE_PROPERTY: - tmpStr = icalproperty_get_attendee (prop); - person = parse_person (prop, tmpStr); - ical->attendee = g_list_prepend (ical->attendee, - person); - break; - case ICAL_CONTACT_PROPERTY: - tmpStr = icalproperty_get_contact (prop); - person = parse_person (prop, tmpStr); - ical->contact = g_list_prepend (ical->contact, person); - break; - case ICAL_ORGANIZER_PROPERTY: - tmpStr = icalproperty_get_organizer (prop); - person = parse_person (prop, tmpStr); - if (ical->organizer) - g_free (ical->organizer); - ical->organizer = person; - break; - case ICAL_RECURRENCEID_PROPERTY: - ictime = icalproperty_get_recurrenceid (prop); - ical->recurid = icaltime_to_timet (&ictime); - /* FIXME: Range parameter not implemented */ - break; - case ICAL_RELATEDTO_PROPERTY: - ical->related = g_list_prepend (ical->related, - parse_related (prop)); - break; - case ICAL_URL_PROPERTY: - copy_str (&ical->url, - icalproperty_get_url (prop)); - break; - case ICAL_UID_PROPERTY: - copy_str (&ical->uid, - icalproperty_get_uid (prop)); - break; - case ICAL_EXDATE_PROPERTY: - /* FIXME: This does not appear to parse - multiple exdate values in one property, as - allowed by the RFC; needs a libical fix */ - ictime = icalproperty_get_exdate (prop); - pt = g_new0 (time_t, 1); - *pt = icaltime_to_timet (&ictime); - ical->exdate = g_list_prepend (ical->exdate, pt); - break; - case ICAL_EXRULE_PROPERTY: - case ICAL_RDATE_PROPERTY: - case ICAL_RRULE_PROPERTY: - /* FIXME: need recursion processing */ - break; - case ICAL_ACTION_PROPERTY: - case ICAL_REPEAT_PROPERTY: - case ICAL_TRIGGER_PROPERTY: - /* should only occur in VALARM's, handled below */ - g_assert_not_reached(); - break; - case ICAL_CREATED_PROPERTY: - ictime = icalproperty_get_created (prop); - ical->created = icaltime_to_timet (&ictime); - break; - case ICAL_DTSTAMP_PROPERTY: - ictime = icalproperty_get_dtstamp (prop); - ical->dtstamp = icaltime_to_timet (&ictime); - break; - case ICAL_LASTMODIFIED_PROPERTY: - ictime = icalproperty_get_lastmodified (prop); - ical->last_mod = icaltime_to_timet (&ictime); - break; - case ICAL_SEQUENCE_PROPERTY: - ical->seq = icalproperty_get_sequence (prop); - break; - case ICAL_REQUESTSTATUS_PROPERTY: - copy_str (&ical->rstatus, - icalproperty_get_requeststatus (prop)); - break; - case ICAL_X_PROPERTY: - g_warning ("Unsupported X-property: %s", - icalproperty_as_ical_string (prop)); - break; - case ICAL_XLICERROR_PROPERTY: - g_warning ("Unsupported property: %s", - icalproperty_get_xlicerror (prop)); - break; - case ICAL_PRODID_PROPERTY: - case ICAL_VERSION_PROPERTY: - /* nothing to do for this property */ - break; - default: - g_warning ("Unsupported property: %s", icalproperty_as_ical_string -(prop)); - break; - - } - - prop = icalcomponent_get_next_property (comp, - ICAL_ANY_PROPERTY); - } - - /* now parse subcomponents --- should only be VALARM's */ - subcomp = icalcomponent_get_first_component (comp, - ICAL_ANY_COMPONENT); - while (subcomp) { - compType = icalcomponent_isa (subcomp); - switch (compType) { - case ICAL_VALARM_COMPONENT: - alarm = parse_alarm (subcomp); - if (alarm) - ical->alarms = g_list_prepend (ical->alarms, - alarm); - break; - default: - g_warning ("Only nested VALARM components are supported."); - } - - subcomp = icalcomponent_get_next_component (comp, - ICAL_ANY_COMPONENT); - } - - return ical; -} - - -static time_t icaltime_to_timet (struct icaltimetype* i) -{ - struct tm t; - time_t ret; - - t.tm_year = i->year - 1900; - t.tm_mon = i->month - 1; - t.tm_mday = i->day; - if (!i->is_date) { - t.tm_hour = i->hour; - t.tm_min = i->minute; - t.tm_sec = i->second; - } else { - t.tm_hour = 0; - t.tm_min = 0; - t.tm_sec = 0; - } - - ret = mktime(&t); - - if (i->is_utc) { -#ifdef HAVE_TIMEZONE - extern long timezone; - ret -= timezone; -#else - struct tm *tmp; - time_t tod = time(NULL); - tmp = localtime (&tod); - ret += tmp->tm_gmtoff; -#endif - } - - return ret; -} - -static iCalPerson* -parse_person (icalproperty* prop, gchar* value) -{ - icalparameter* param; - icalparameter_role role; - icalparameter_partstat partstat; - icalparameter_cutype cutype; - - iCalPerson* ret; - - ret = g_new0 (iCalPerson, 1); - - ret->addr = g_strdup (value); - - param = icalproperty_get_first_parameter (prop, - ICAL_CN_PARAMETER); - if (param) - ret->name = g_strdup (icalparameter_get_cn (param)); - else - ret->name = NULL; - - - param = icalproperty_get_first_parameter (prop, - ICAL_ROLE_PARAMETER); - if (param) { - role = icalparameter_get_role (param); - switch (role) { - case ICAL_ROLE_CHAIR: - ret->role = g_strdup ("CHAIR"); - break; - case ICAL_ROLE_REQPARTICIPANT: - ret->role = g_strdup ("REQPARTICIPANT"); - break; - case ICAL_ROLE_OPTPARTICIPANT: - ret->role = g_strdup ("OPTPARTICIPANT"); - break; - case ICAL_ROLE_NONPARTICIPANT: - ret->role = g_strdup ("NONPARTICIPANT"); - break; - case ICAL_ROLE_XNAME: - default: - ret->role = g_strdup ("UNKNOWN"); - break; - } - } else - ret->role = g_strdup ("REQPARTICIPANT"); - - param = icalproperty_get_first_parameter (prop, ICAL_PARTSTAT_PARAMETER); - if (param) { - partstat = icalparameter_get_partstat (param); - switch (partstat) { - case ICAL_PARTSTAT_NEEDSACTION: - ret->partstat = g_strdup ("NEEDSACTION"); - break; - case ICAL_PARTSTAT_ACCEPTED: - ret->partstat = g_strdup ("ACCEPTED"); - break; - case ICAL_PARTSTAT_DECLINED: - ret->partstat = g_strdup ("DECLINED"); - break; - case ICAL_PARTSTAT_TENTATIVE: - ret->partstat = g_strdup ("TENTATIVE"); - break; - case ICAL_PARTSTAT_DELEGATED: - ret->partstat = g_strdup ("DELEGATED"); - break; - case ICAL_PARTSTAT_COMPLETED: - ret->partstat = g_strdup ("COMPLETED"); - break; - case ICAL_PARTSTAT_INPROCESS: - ret->partstat = g_strdup ("INPROCESS"); - break; - case ICAL_PARTSTAT_XNAME: - ret->partstat = g_strdup (icalparameter_get_xvalue (param)); - break; - default: - ret->partstat = g_strdup ("UNKNOWN"); - break; - } - } else - ret->partstat = g_strdup ("NEEDSACTION"); - - param = icalproperty_get_first_parameter (prop, ICAL_RSVP_PARAMETER); - if (param) - ret->rsvp = icalparameter_get_rsvp (param); - else - ret->rsvp = FALSE; - - param = icalproperty_get_first_parameter (prop, ICAL_CUTYPE_PARAMETER -); - if (param) { - cutype = icalparameter_get_cutype (param); - switch (cutype) { - case ICAL_CUTYPE_INDIVIDUAL: - ret->cutype = g_strdup ("INDIVIDUAL"); - break; - case ICAL_CUTYPE_GROUP: - ret->cutype = g_strdup ("GROUP"); - break; - case ICAL_CUTYPE_RESOURCE: - ret->cutype = g_strdup ("RESOURCE"); - break; - case ICAL_CUTYPE_ROOM: - ret->cutype = g_strdup ("ROOM"); - break; - case ICAL_CUTYPE_UNKNOWN: - case ICAL_CUTYPE_XNAME: - default: - ret->cutype = g_strdup ("UNKNOWN"); - break; - } - } else - ret->cutype = g_strdup ("INDIVIDUAL"); - - param = icalproperty_get_first_parameter (prop, ICAL_MEMBER_PARAMETER -); - while (param) { - copy_to_list (&ret->member, icalparameter_get_member (param)); - param = icalproperty_get_next_parameter (prop, - ICAL_MEMBER_PARAMETER); - } - - param = icalproperty_get_first_parameter (prop, ICAL_DELEGATEDTO_PARAMETER); - while (param) { - copy_to_list (&ret->deleg_to, - icalparameter_get_delegatedto (param)); - param = icalproperty_get_next_parameter (prop, - ICAL_DELEGATEDTO_PARAMETER); - } - - param = icalproperty_get_first_parameter (prop, ICAL_DELEGATEDFROM_PARAMETER); - while (param) { - copy_to_list (&ret->deleg_from, - icalparameter_get_delegatedfrom (param)); - param = icalproperty_get_next_parameter (prop, - ICAL_DELEGATEDFROM_PARAMETER); - } - - param = icalproperty_get_first_parameter (prop, ICAL_SENTBY_PARAMETER); - if (param) - copy_str (&ret->sent_by, icalparameter_get_sentby (param)); - else - ret->sent_by = NULL; - - param = icalproperty_get_first_parameter (prop, ICAL_DIR_PARAMETER); - while (param) { - copy_to_list (&ret->deleg_to, - icalparameter_get_delegatedto (param)); - param = icalproperty_get_next_parameter (prop, - ICAL_DIR_PARAMETER); - } - - return ret; -} - -static iCalRelation* -parse_related (icalproperty* prop) -{ - iCalRelation* rel; - icalparameter* param; - icalparameter_reltype type; - - rel = g_new0 (iCalRelation, 1); - rel->uid = g_strdup (icalproperty_get_relatedto (prop)); - - param = icalproperty_get_first_parameter (prop, - ICAL_RELTYPE_PARAMETER); - if (param) { - type = icalparameter_get_reltype (param); - switch (type) { - case ICAL_RELTYPE_PARENT: - rel->reltype = g_strdup ("PARENT"); - break; - case ICAL_RELTYPE_CHILD: - rel->reltype = g_strdup ("CHILD"); - break; - case ICAL_RELTYPE_SIBLING: - rel->reltype = g_strdup ("SIBLING"); - break; - case ICAL_RELTYPE_XNAME: - rel->reltype = g_strdup (icalparameter_get_xvalue (param)); - break; - default: - rel->reltype = g_strdup ("UNKNOWN"); - break; - } - } else - rel->reltype = g_strdup ("PARENT"); - - return rel; -} - -#ifdef TEST - -int main(int argc, char* argv[]) -{ - icalcomponent* comp; - comp = icalendar_parse_file (argv[1]); - printf ("%s\n", icalcomponent_as_ical_string (comp)); - return 0; -} - -#endif - - -static CalendarAlarm* -parse_alarm (icalcomponent* comp) -{ - CalendarAlarm *alarm; - icalproperty *prop; - char *tmpStr; - struct icaldurationtype dur; - struct icalattachtype attach; - - g_return_val_if_fail (comp != NULL, NULL); - - alarm = g_new0 (CalendarAlarm, 1); - - prop = icalcomponent_get_first_property (comp, ICAL_ANY_PROPERTY); - while (prop) { - switch (icalproperty_isa (prop)) { - case ICAL_ACTION_PROPERTY: - tmpStr = icalproperty_get_action (prop); - if (!g_strcasecmp (tmpStr, "AUDIO")) - alarm->type = ALARM_AUDIO; - else if (!g_strcasecmp (tmpStr, "DISPLAY")) - alarm->type = ALARM_DISPLAY; - else if (!g_strcasecmp (tmpStr, "EMAIL")) - alarm->type = ALARM_MAIL; - else if (!g_strcasecmp (tmpStr, "PROCEDURE")) - alarm->type = ALARM_PROGRAM; - else - g_warning ("Unsupported alarm type!"); - break; - case ICAL_TRIGGER_PROPERTY: - /* FIXME: waiting on proper libical support */ - break; - case ICAL_REPEAT_PROPERTY: - alarm->snooze_repeat = icalproperty_get_repeat (prop); - break; - case ICAL_DURATION_PROPERTY: - dur = icalproperty_get_duration (prop); - alarm->snooze_secs = icaldurationtype_as_timet (dur); - break; - case ICAL_ATTACH_PROPERTY: - attach = icalproperty_get_attach (prop); - copy_str (&alarm->attach, - icalattachtype_get_url (&attach)); - break; - case ICAL_DESCRIPTION_PROPERTY: - copy_str (&alarm->desc, - icalproperty_get_description (prop)); - break; - case ICAL_SUMMARY_PROPERTY: - copy_str (&alarm->summary, - icalproperty_get_summary (prop)); - break; - case ICAL_ATTENDEE_PROPERTY: - copy_str (&alarm->attendee, - icalproperty_get_attendee (prop)); - break; - default: - g_warning ("Unsupported alarm property: %s", - icalproperty_as_ical_string (prop)); - break; - } - - prop = icalcomponent_get_next_property (comp, - ICAL_ANY_PROPERTY); - } - - return alarm; -} diff --git a/calendar/cal-util/icalendar.h b/calendar/cal-util/icalendar.h deleted file mode 100644 index 2a22fbab71..0000000000 --- a/calendar/cal-util/icalendar.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef ICALENDAR_H -#define ICALENDAR_H - -#include -#include - - - -iCalObject *ical_object_create_from_icalcomponent (icalcomponent* comp); - - - -#endif diff --git a/calendar/cal-util/timeutil.c b/calendar/cal-util/timeutil.c deleted file mode 100644 index f887a8df37..0000000000 --- a/calendar/cal-util/timeutil.c +++ /dev/null @@ -1,557 +0,0 @@ -/* Miscellaneous time-related utilities - * - * Copyright (C) 1998 The Free Software Foundation - * - * Authors: Federico Mena - * Miguel de Icaza - */ - -#include -#include -#include "timeutil.h" - -#define digit_at(x,y) (x [y] - '0') - -time_t -time_from_isodate (char *str) -{ - struct tm my_tm; - time_t t; - - if (strlen (str) < 14) - return -1; - - my_tm.tm_year = (digit_at (str, 0) * 1000 + digit_at (str, 1) * 100 + - digit_at (str, 2) * 10 + digit_at (str, 3)) - 1900; - - my_tm.tm_mon = digit_at (str, 4) * 10 + digit_at (str, 5) - 1; - my_tm.tm_mday = digit_at (str, 6) * 10 + digit_at (str, 7); - my_tm.tm_hour = digit_at (str, 9) * 10 + digit_at (str, 10); - my_tm.tm_min = digit_at (str, 11) * 10 + digit_at (str, 12); - my_tm.tm_sec = digit_at (str, 13) * 10 + digit_at (str, 14); - my_tm.tm_isdst = -1; - - t = mktime (&my_tm); - - if (str [15] == 'Z') -#if defined(HAVE_TM_GMTOFF) - t -= my_tm.tm_gmtoff -#elsif defined(HAVE_TIMEZONE) - t -= timezone -#endif - ; - - return t; -} - -void -print_time_t (time_t t) -{ - struct tm *tm = localtime (&t); - - printf ("TIEMPO: %d/%d/%d %d:%d:%d\n", - tm->tm_mon+1, tm->tm_mday, tm->tm_year, - tm->tm_hour, tm->tm_min, tm->tm_sec); -} - -int -get_time_t_hour (time_t t) -{ - struct tm *tm; - - tm = localtime (&t); - return tm->tm_hour; -} - -char * -isodate_from_time_t (time_t t) -{ - struct tm *tm; - static char isotime [40]; - - tm = localtime (&t); - strftime (isotime, sizeof (isotime)-1, "%Y%m%dT%H%M%S", tm); - return isotime; -} - -time_t -time_from_start_duration (time_t start, char *duration) -{ - printf ("Not yet implemented\n"); - return 0; -} - -char * -format_simple_hour (int hour, int use_am_pm) -{ - static char buf[256]; - - /* I don't know whether this is the best way to internationalize it. - * Does any language use different conventions? - Federico - */ - - if (use_am_pm) - g_snprintf (buf, sizeof(buf), "%d%s", - (hour == 0) ? 12 : (hour > 12) ? (hour - 12) : hour, - (hour < 12) ? _("am") : _("pm")); - else - g_snprintf (buf, sizeof(buf), "%02d%s", hour, _("h")); - - return buf; - -} - -time_t -time_add_minutes (time_t time, int minutes) -{ - struct tm *tm = localtime (&time); - time_t new_time; - - tm->tm_min += minutes; - if ((new_time = mktime (tm)) == -1){ - g_message ("time_add_minutes(): mktime() could not handle " - "adding %d minutes with\n", minutes); - print_time_t (time); - return time; - } - return new_time; -} - -/* Adds a day onto the time, using local time. - Note that if clocks go forward due to daylight savings time, there are - some non-existent local times, so the hour may be changed to make it a - valid time. This also means that it may not be wise to keep calling - time_add_day() to step through a certain period - if the hour gets changed - to make it valid time, any further calls to time_add_day() will also return - this hour, which may not be what you want. */ -time_t -time_add_day (time_t time, int days) -{ - struct tm *tm = localtime (&time); - time_t new_time; -#if 0 - int dst_flag = tm->tm_isdst; -#endif - - tm->tm_mday += days; - - if ((new_time = mktime (tm)) == -1){ - g_message ("time_add_day(): mktime() could not handling adding %d days with\n", - days); - print_time_t (time); - return time; - } - -#if 0 - /* I don't know what this is for. See also time_day_begin() and - time_day_end(). - Damon. */ - if (dst_flag > tm->tm_isdst){ - tm->tm_hour++; - new_time += 3600; - } else if (dst_flag < tm->tm_isdst){ - tm->tm_hour--; - new_time -= 3600; - } -#endif - - return new_time; -} - -time_t -time_add_week (time_t time, int weeks) -{ - return time_add_day (time, weeks * 7); -} - -time_t -time_add_month (time_t time, int months) -{ - struct tm *tm = localtime (&time); - time_t new_time; - int mday; - - mday = tm->tm_mday; - - tm->tm_mon += months; - tm->tm_isdst = -1; - if ((new_time = mktime (tm)) == -1){ - g_message ("time_add_month(): mktime() could not handling adding %d months with\n", - months); - print_time_t (time); - return time; - } - tm = localtime (&new_time); - if (tm->tm_mday < mday){ - tm->tm_mon--; - tm->tm_mday = time_days_in_month (tm->tm_year+1900, tm->tm_mon); - return new_time = mktime (tm); - } - else - return new_time; -} - -time_t -time_add_year (time_t time, int years) -{ - struct tm *tm = localtime (&time); - time_t new_time; - - tm->tm_year += years; - if ((new_time = mktime (tm)) == -1){ - g_message ("time_add_year(): mktime() could not handling adding %d years with\n", - years); - print_time_t (time); - return time; - } - return new_time; -} - -time_t -time_day_hour (time_t t, int hour) -{ - struct tm tm; - - tm = *localtime (&t); - tm.tm_hour = hour; - tm.tm_min = 0; - tm.tm_sec = 0; - - return mktime (&tm); -} - -/* Number of days in a month, for normal and leap years */ -static const int days_in_month[2][12] = { - { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }, - { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 } -}; - -/* Returns whether the specified year is a leap year */ -static int -is_leap_year (int year) -{ - if (year <= 1752) - return !(year % 4); - else - return (!(year % 4) && (year % 100)) || !(year % 400); -} - -int -time_days_in_month (int year, int month) -{ - g_return_val_if_fail (year >= 1900, 0); - g_return_val_if_fail ((month >= 0) && (month < 12), 0); - - return days_in_month [is_leap_year (year)][month]; -} - -time_t -time_from_day (int year, int month, int day) -{ - struct tm tm; - - memset (&tm, 0, sizeof (tm)); - tm.tm_year = year - 1900; - tm.tm_mon = month; - tm.tm_mday = day; - tm.tm_isdst = -1; - - return mktime (&tm); -} - -time_t -time_year_begin (time_t t) -{ - struct tm tm; - - tm = *localtime (&t); - tm.tm_hour = 0; - tm.tm_min = 0; - tm.tm_sec = 0; - tm.tm_mon = 0; - tm.tm_mday = 1; - tm.tm_isdst = -1; - - return mktime (&tm); -} - -time_t -time_year_end (time_t t) -{ - struct tm tm; - - tm = *localtime (&t); - tm.tm_hour = 0; - tm.tm_min = 0; - tm.tm_sec = 0; - tm.tm_mon = 0; - tm.tm_mday = 1; - tm.tm_year++; - tm.tm_isdst = -1; - - return mktime (&tm); -} - -time_t -time_month_begin (time_t t) -{ - struct tm tm; - - tm = *localtime (&t); - tm.tm_hour = 0; - tm.tm_min = 0; - tm.tm_sec = 0; - tm.tm_mday = 1; - tm.tm_isdst = -1; - - return mktime (&tm); -} - -time_t -time_month_end (time_t t) -{ - struct tm tm; - - tm = *localtime (&t); - tm.tm_hour = 0; - tm.tm_min = 0; - tm.tm_sec = 0; - tm.tm_mday = 1; - tm.tm_mon++; - tm.tm_isdst = -1; - - return mktime (&tm); -} - -time_t -time_week_begin (time_t t) -{ - struct tm tm; - - /* FIXME: make it take week_starts_on_monday into account */ - - tm = *localtime (&t); - tm.tm_hour = 0; - tm.tm_min = 0; - tm.tm_sec = 0; - tm.tm_mday -= tm.tm_wday; - tm.tm_isdst = -1; - - return mktime (&tm); -} - -time_t -time_week_end (time_t t) -{ - struct tm tm; - - /* FIXME: make it take week_starts_on_monday into account */ - - tm = *localtime (&t); - tm.tm_hour = 0; - tm.tm_min = 0; - tm.tm_sec = 0; - tm.tm_mday += 7 - tm.tm_wday; - tm.tm_isdst = -1; - - return mktime (&tm); -} - -/* Returns the start of the day, according to the local time. */ -time_t -time_day_begin (time_t t) -{ -#if 1 - struct tm tm; - - tm = *localtime (&t); - tm.tm_hour = 0; - tm.tm_min = 0; - tm.tm_sec = 0; - tm.tm_isdst = -1; - - return mktime (&tm); - -#else - /* This is the original code which sometimes produces a time of 1:00. - I don't understand why it looked at the tm_isdst flags at all. - - Damon. */ - - struct tm tm; - time_t temp = t - 43200; - int dstflag, dstflag2; - - tm = *localtime(&temp); /* one day */ - dstflag = tm.tm_isdst; - - tm = *localtime (&t); - dstflag2 = tm.tm_isdst; - - if (dstflag < dstflag2) - tm.tm_hour = 1; - else - tm.tm_hour = 0; - - tm.tm_min = 0; - tm.tm_sec = 0; - - temp = mktime(&tm); - if (dstflag > dstflag2){ - temp += 3600; - } - - return temp; -#endif -} - -/* Returns the end of the day, according to the local time. */ -time_t -time_day_end (time_t t) -{ -#if 1 - struct tm tm; - - tm = *localtime (&t); - tm.tm_mday++; - tm.tm_hour = 0; - tm.tm_min = 0; - tm.tm_sec = 0; - tm.tm_isdst = -1; - - return mktime (&tm); - -#else - /* This is the original code which has more problems than - time_day_begin(). - Damon. */ - - struct tm tm; - time_t temp; - int dstflag, dstflag2; - - t += 10800; - temp = t - 86400; - - tm = *localtime(&temp); /* one day */ - dstflag = tm.tm_isdst; - - tm = *localtime (&t); - dstflag2 = tm.tm_isdst; - - if (dstflag < dstflag2) - tm.tm_hour = 23; - else { - tm.tm_mday++; - tm.tm_hour = 0; - } - tm.tm_min = 0; - tm.tm_sec = 0; - - temp = mktime(&tm); - if(dstflag > dstflag2) { - } - return temp; -#endif -} - -static char * -pcat (char *dest, int num, char key) -{ - int c; - - c = sprintf (dest, "%d%c", num, key); - return dest + c; -} - -/* Converts secs into the ISO difftime representation */ -char * -isodiff_from_secs (int secs) -{ - static char buffer [60], *p; - int years, months, weeks, days, hours, minutes; - - years = months = weeks = days = hours = minutes = 0; - - years = secs / (365 * 86400); - secs %= (365 * 86400); - months = secs / (30 * 86400); - secs %= (30 * 86400); - weeks = secs / (7 * 86400); - secs %= (7 * 86400); - days = secs / 86400; - secs %= 86400; - hours = secs / 3600; - secs %= 3600; - minutes = secs / 60; - secs %= 60; - - strcpy (buffer, "P"); - p = buffer + 1; - if (years) - p = pcat (p, years, 'Y'); - if (months) - p = pcat (p, months, 'M'); - if (weeks) - p = pcat (p, weeks, 'W'); - if (days) - p = pcat (p, days, 'D'); - if (hours || minutes || secs){ - *p++ = 'T'; - if (hours) - p = pcat (p, hours, 'H'); - if (minutes) - p = pcat (p, minutes, 'M'); - if (secs) - p = pcat (p, secs, 'S'); - } - - return buffer; -} - -int -isodiff_to_secs (char *str) -{ - int value, time; - int years, months, weeks, days, hours, minutes, seconds; - - value = years = months = weeks = days = hours = minutes = time = seconds = 0; - if (*str != 'P') - return 0; - - str++; - while (*str){ - switch (*str){ - case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': - value = value * 10 + (*str - '0'); - break; - case 'Y': - years = value; value = 0; - break; - case 'M': - if (time) - minutes = value; - else - months = value; - value = 0; - break; - case 'W': - weeks = value; value = 0; - break; - case 'D': - days = value; value = 0; - break; - case 'T': - value = 0; time = 1; - break; - case 'H': - hours = value; value = 0; - break; - case 'S': - seconds = value; value = 0; - break; - } - str++; - } - return seconds + (minutes * 60) + (hours * 3600) + - (days * 86400) + (weeks * 7 * 86400) + - (months * 30 * 86400) + (years * 365 * 86400); -} diff --git a/calendar/cal-util/timeutil.h b/calendar/cal-util/timeutil.h deleted file mode 100644 index 407213d7f8..0000000000 --- a/calendar/cal-util/timeutil.h +++ /dev/null @@ -1,81 +0,0 @@ -/* Miscellaneous time-related utilities - * - * Copyright (C) 1998 The Free Software Foundation - * - * Authors: Federico Mena - * Miguel de Icaza - */ - -#ifndef TIMEUTIL_H -#define TIMEUTIL_H - - -#include - - -time_t time_from_isodate (char *str); -time_t time_from_start_duration (time_t start, char *duration); -char *isodate_from_time_t (time_t t); -int get_time_t_hour (time_t t); -int isodiff_to_secs (char *str); -char *isodiff_from_secs (int secs); - -time_t time_add_minutes (time_t time, int minutes); -time_t time_add_day (time_t time, int days); -time_t time_add_week (time_t time, int weeks); -time_t time_add_month (time_t time, int months); -time_t time_add_year (time_t time, int years); - - -/* Returns pointer to a statically-allocated buffer with a string of the form - * 3am, 4am, 12pm, 08h, 17h, etc. - * The string is internationalized, hopefully correctly. - */ -char *format_simple_hour (int hour, int use_am_pm); - -/* Returns the number of days in the specified month. Years are full years (starting from year 1). - * Months are in [0, 11]. - */ -int time_days_in_month (int year, int month); - -/* Converts the specified date to a time_t at the start of the specified day. Years are full years - * (starting from year 1). Months are in [0, 11]. Days are 1-based. - */ -time_t time_from_day (int year, int month, int day); - -time_t time_day_hour (time_t t, int hour); - -/* For the functions below, time ranges are considered to contain the start time, but not the end - * time. - */ - -/* These two functions take a time value and return the beginning or end of the corresponding year, - * respectively. - */ -time_t time_year_begin (time_t t); -time_t time_year_end (time_t t); - -/* These two functions take a time value and return the beginning or end of the corresponding month, - * respectively. - */ -time_t time_month_begin (time_t t); -time_t time_month_end (time_t t); - -/* These functions take a time value and return the beginning or end of the corresponding week, - * respectively. This takes into account the global week_starts_on_monday flag. - */ -time_t time_week_begin (time_t t); -time_t time_week_end (time_t t); - -/* These two functions take a time value and return the beginning or end of the corresponding day, - * respectively. - */ -time_t time_day_begin (time_t t); -time_t time_day_end (time_t t); - - -time_t parse_date (char *str); -void print_time_t (time_t t); - - -#endif diff --git a/calendar/conduits/calendar/calendar-conduit-control-applet.c b/calendar/conduits/calendar/calendar-conduit-control-applet.c deleted file mode 100644 index 2d6fb60ef5..0000000000 --- a/calendar/conduits/calendar/calendar-conduit-control-applet.c +++ /dev/null @@ -1,360 +0,0 @@ -/* Control applet ("capplet") for the gnome-pilot calendar conduit, */ -/* based on */ -/* gpilotd control applet ('capplet') for use with the GNOME control center */ -/* $Id$ */ - -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#include - -#include "calendar-conduit.h" - -/* tell changes callbacks to ignore changes or not */ -static gboolean ignore_changes=FALSE; - -/* capplet widget */ -static GtkWidget *capplet=NULL; - -/* host/device/pilot configuration windows */ -GtkWidget *cfgOptionsWindow=NULL; -GtkWidget *cfgStateWindow=NULL; -GtkWidget *dialogWindow=NULL; - -GnomePilotConduitMgmt *conduit; - -static void doTrySettings(GtkWidget *widget, gpointer); -static void doRevertSettings(GtkWidget *widget, gpointer); -static void doSaveSettings(GtkWidget *widget, gpointer); - -static void readStateCfg(GtkWidget *w,GCalConduitCfg *cfg); -static void setStateCfg(GtkWidget *w,GCalConduitCfg *cfg); -void about_cb (GtkWidget *, gpointer); -GCalConduitCfg *origState = NULL; -GCalConduitCfg *curState = NULL; - -gint pilotId; -CORBA_Environment ev; - -/* This array must be in the same order as enumerations - in GnomePilotConduitSyncType as they are used as index. - Custom type implies Disabled state. -*/ -static gchar* sync_options[] ={ N_("Disabled"), - N_("Synchronize"), - N_("Copy From Pilot"), - N_("Copy To Pilot"), - N_("Merge From Pilot"), - N_("Merge To Pilot")}; -#define SYNC_OPTIONS_COUNT 6 - -static void -setSettings(GCalConduitCfg* conduitCfg) -{ - if(conduitCfg->sync_type!=GnomePilotConduitSyncTypeCustom) - gpilotd_conduit_mgmt_enable_with_first_sync(conduit,pilotId, - conduitCfg->sync_type, - conduitCfg->sync_type, - TRUE); - else - gpilotd_conduit_mgmt_disable(conduit,pilotId); - - gcalconduit_save_configuration(conduitCfg); -} - -static void -doTrySettings(GtkWidget *widget, gpointer whatever) -{ - readStateCfg(cfgStateWindow,curState); - setSettings(curState); -} - -static void -doSaveSettings(GtkWidget *widget, gpointer whatever) -{ - doTrySettings(widget,whatever); -} - -static void -doCancelSettings(GtkWidget *widget, gpointer whatever) -{ - setSettings(origState); -} - -static void -doRevertSettings(GtkWidget *widget, gpointer whatever) -{ - gcalconduit_destroy_configuration(&curState); - curState = gcalconduit_dupe_configuration(origState); - setStateCfg(cfgStateWindow,curState); - setSettings(curState); -} - -static void -insert_dir_callback (GtkEditable *editable, const gchar *text, - gint len, gint *position, void *data) -{ - gint i; - gchar *curname; - - curname = gtk_entry_get_text(GTK_ENTRY(editable)); - if (*curname == '\0' && len > 0) { - if (isspace(text[0])) { - gtk_signal_emit_stop_by_name(GTK_OBJECT(editable), "insert_text"); - return; - } - } else { - for (i=0; i"),NULL}; - - about = gnome_about_new(_("GnomeCalendar Conduit"), VERSION, - _("(C) 1998"), - authors, - _("Configuration utility for the calendar conduit.\n"), - _("gnome-calendar-conduit.png")); - gtk_widget_show (about); - - return; -} - -static void toggled_cb(GtkWidget *widget, gpointer data) { - capplet_widget_state_changed(CAPPLET_WIDGET(capplet), TRUE); -} - -/* called by the sync_type GtkOptionMenu */ -static void -sync_action_selection(GtkMenuShell *widget, gpointer unused) -{ - if (!ignore_changes) { - capplet_widget_state_changed(CAPPLET_WIDGET (capplet), TRUE); - } -} - -/* called by the sync_type GtkOptionMenu */ -static void -activate_sync_type(GtkMenuItem *widget, gpointer data) -{ - curState->sync_type = GPOINTER_TO_INT(data); - if(!ignore_changes) - capplet_widget_state_changed(CAPPLET_WIDGET(capplet), TRUE); -} - -static GtkWidget -*createStateCfgWindow(void) -{ - GtkWidget *vbox, *table; - GtkWidget *label; - GtkWidget *optionMenu,*menuItem; - GtkMenu *menu; - gint i; - - vbox = gtk_vbox_new(FALSE, GNOME_PAD); - - table = gtk_hbox_new(FALSE, 0); - gtk_box_pack_start(GTK_BOX(vbox), table, FALSE, FALSE, GNOME_PAD); - - label = gtk_label_new(_("Synchronize Action")); - gtk_box_pack_start(GTK_BOX(table), label, FALSE, FALSE, GNOME_PAD); - - optionMenu=gtk_option_menu_new(); - gtk_object_set_data(GTK_OBJECT(vbox), "conduit_state", optionMenu); - menu = GTK_MENU(gtk_menu_new()); - - for (i=0; isync_type); - ignore_changes = FALSE; -} - - -static void -readStateCfg(GtkWidget *w,GCalConduitCfg *cfg) -{ -/* - GtkWidget *button; - - button = gtk_object_get_data(GTK_OBJECT(w), "conduit_on_off"); - - g_assert(button!=NULL); - - activated = GTK_TOGGLE_BUTTON(button)->active; -*/ -} - -static void -pilot_capplet_setup(void) -{ - GtkWidget *frame, *table; - - capplet = capplet_widget_new(); - - table = gtk_table_new(1, 2, FALSE); - gtk_container_border_width(GTK_CONTAINER(table), GNOME_PAD); - gtk_container_add(GTK_CONTAINER(capplet), table); - - frame = gtk_frame_new(_("Conduit state")); - gtk_container_border_width(GTK_CONTAINER(frame), GNOME_PAD_SMALL); - gtk_table_attach_defaults(GTK_TABLE(table), frame, 0, 1, 0, 1); - cfgStateWindow = createStateCfgWindow(); - gtk_container_add(GTK_CONTAINER(frame), cfgStateWindow); - - gtk_signal_connect(GTK_OBJECT(capplet), "try", - GTK_SIGNAL_FUNC(doTrySettings), NULL); - gtk_signal_connect(GTK_OBJECT(capplet), "revert", - GTK_SIGNAL_FUNC(doRevertSettings), NULL); - gtk_signal_connect(GTK_OBJECT(capplet), "ok", - GTK_SIGNAL_FUNC(doSaveSettings), NULL); - gtk_signal_connect(GTK_OBJECT(capplet), "cancel", - GTK_SIGNAL_FUNC(doCancelSettings), NULL); - gtk_signal_connect(GTK_OBJECT(capplet), "help", - GTK_SIGNAL_FUNC(about_cb), NULL); - - - setStateCfg(cfgStateWindow,curState); - - gtk_widget_show_all(capplet); -} - -static void -run_error_dialog(gchar *mesg,...) { - char tmp[80]; - va_list ap; - - va_start(ap,mesg); - vsnprintf(tmp,79,mesg,ap); - dialogWindow = gnome_message_box_new(mesg,GNOME_MESSAGE_BOX_ERROR,GNOME_STOCK_BUTTON_OK,NULL); - gnome_dialog_run_and_close(GNOME_DIALOG(dialogWindow)); - va_end(ap); -} - -gint get_pilot_id_from_gpilotd() { - gint *pilots; - int i; - - i=0; - gpilotd_get_pilot_ids(&pilots); - if(pilots) { - while(pilots[i]!=-1) { g_message("pilot %d = \"%d\"",i,pilots[i]); i++; } - if(i==0) { - run_error_dialog(_("No pilot configured, please choose the\n'Pilot Link Properties' capplet first.")); - return -1; - } else { - if(i==1) - return pilots[0]; - else { - g_message("too many pilots..."); - return pilots[0]; - } - } - } else { - run_error_dialog(_("No pilot configured, please choose the\n'Pilot Link Properties' capplet first.")); - return -1; - } -} - -int -main( int argc, char *argv[] ) -{ - /* we're a capplet */ - gnome_capplet_init ("calendar conduit control applet", NULL, argc, argv, - NULL, - 0, NULL); - - /* get pilot name from gpilotd */ - /* 1. initialize the gpilotd connection */ - if (gpilotd_init(&argc,argv)!=0) { - run_error_dialog(_("Cannot initialze the GnomePilot Daemon")); - g_error(_("Cannot initialze the GnomePilot Daemon")); - return -1; - } - - /* 2 connect to gpilotd */ - if (gpilotd_connect()!=0) { - run_error_dialog(_("Cannot connect to the GnomePilot Daemon")); - g_error(_("Cannot connect to the GnomePilot Daemon")); - return -1; - } - - pilotId = get_pilot_id_from_gpilotd(); - if(!pilotId) return -1; - - /* put all code to set things up in here */ - conduit = gpilotd_conduit_mgmt_new("calendar_conduit",pilotId); - gcalconduit_load_configuration(&origState,pilotId); - gpilotd_conduit_mgmt_get_sync_type(conduit,pilotId,&origState->sync_type); - - curState = gcalconduit_dupe_configuration(origState); - - pilot_capplet_setup(); - - - /* done setting up, now run main loop */ - capplet_gtk_main(); - return 0; -} diff --git a/calendar/conduits/calendar/calendar-conduit-control-applet.desktop b/calendar/conduits/calendar/calendar-conduit-control-applet.desktop deleted file mode 100644 index 2a5af4f24e..0000000000 --- a/calendar/conduits/calendar/calendar-conduit-control-applet.desktop +++ /dev/null @@ -1,11 +0,0 @@ -[Desktop Entry] -Name=GnomeCalendar -Name[da]=Gnome kalender -Name[no]=GNOME kalender -Comment=Configure the GnomeCal conduit -Comment[da]=Konfigurér GnomeCal-komponent -Comment[no]=Konfigurér GnomeCal-komponent -Exec=calendar-conduit-control-applet --cap-id=1 -Terminal=0 -Type=Application -Icon=gnome-calendar-conduit.png diff --git a/calendar/conduits/calendar/calendar-conduit.c b/calendar/conduits/calendar/calendar-conduit.c deleted file mode 100644 index 8aa0e23a3f..0000000000 --- a/calendar/conduits/calendar/calendar-conduit.c +++ /dev/null @@ -1,1406 +0,0 @@ -/* $Id$ */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "GnomeCal.h" -#include "calendar-conduit.h" - -int debug_alarms = 0; /* needed to satisfy some other part of gncal */ -/* Default values for alarms */ /* needed to satisfy some other part of gncal */ -CalendarAlarm alarm_defaults[4] = { - { ALARM_MAIL, 0, 15, ALARM_MINUTES }, - { ALARM_PROGRAM, 0, 15, ALARM_MINUTES }, - { ALARM_DISPLAY, 0, 15, ALARM_MINUTES }, - { ALARM_AUDIO, 0, 15, ALARM_MINUTES } -}; - -GnomePilotConduit * conduit_get_gpilot_conduit (guint32); -void conduit_destroy_gpilot_conduit (GnomePilotConduit*); -void local_record_from_icalobject(GCalLocalRecord *local,iCalObject *obj); - -#define CONDUIT_VERSION "0.8.11" -#ifdef G_LOG_DOMAIN -#undef G_LOG_DOMAIN -#endif -#define G_LOG_DOMAIN "gcalconduit" - -#define DEBUG_CALCONDUIT -#undef DEBUG_CALCONDUIT - -#ifdef DEBUG_CALCONDUIT -#define show_exception(e) g_warning ("Exception: %s\n", CORBA_exception_id (e)) -#define LOG(e...) g_log(G_LOG_DOMAIN,G_LOG_LEVEL_MESSAGE, e) -#else -#define show_exception(e) -#define LOG(e...) -#endif - -#define WARN(e...) g_log(G_LOG_DOMAIN,G_LOG_LEVEL_WARNING, e) -#define INFO(e...) g_log(G_LOG_DOMAIN,G_LOG_LEVEL_MESSAGE, e) - -#define catch_ret_val(_env,ret) \ - if (_env._major != CORBA_NO_EXCEPTION) { \ - g_log(G_LOG_DOMAIN,G_LOG_LEVEL_MESSAGE,"%s:%d: Caught exception",__FILE__,__LINE__); \ - g_warning ("Exception: %s\n", CORBA_exception_id (&(_env))); \ - CORBA_exception_free(&(_env)); \ - return ret; \ - } - -static int -start_calendar_server (GnomePilotConduitStandardAbs *conduit, - GCalConduitContext *ctxt) -{ - - g_return_val_if_fail(conduit!=NULL,-2); - g_return_val_if_fail(ctxt!=NULL,-2); - - ctxt->calendar = goad_server_activate_with_id (NULL, - "IDL:GNOME:Calendar:Repository:1.0", - 0, NULL); - if (ctxt->calendar == CORBA_OBJECT_NIL) { - g_warning ("Can not communicate with GnomeCalendar server"); - return -1; - } - - if (ctxt->ev._major != CORBA_NO_EXCEPTION){ - show_exception(&(ctxt->ev)); - CORBA_exception_free(&(ctxt->ev)); - return -1; - } - return 0; -} - - -/* Just a stub to link with */ -void -calendar_notify (time_t time, CalendarAlarm *which, void *data) -{ -} - -static GSList * -get_calendar_objects(GnomePilotConduitStandardAbs *conduit, - gboolean *status, - GCalConduitContext *ctxt) -{ - GSList *result; - GNOME_Calendar_Repository_String_Sequence *uids; - - g_return_val_if_fail(conduit!=NULL,NULL); - g_return_val_if_fail(ctxt!=NULL,NULL); - - result = NULL; - uids = GNOME_Calendar_Repository_get_object_id_list (ctxt->calendar, &(ctxt->ev)); - - if (ctxt->ev._major == CORBA_USER_EXCEPTION){ - INFO ("Object did not exist"); - show_exception(&(ctxt->ev)); - CORBA_exception_free(&(ctxt->ev)); - if(status!=NULL) (*status) = FALSE; - return NULL; - } else if(ctxt->ev._major != CORBA_NO_EXCEPTION) { - WARN (_("Error while communicating with calendar server")); - show_exception(&(ctxt->ev)); - CORBA_exception_free(&(ctxt->ev)); - if(status!=NULL) (*status) = FALSE; - return NULL; - } - - if(status!=NULL) (*status) = TRUE; - if(uids->_length>0) { - int i; - for(i=0;i_length;i++) { - result = g_slist_prepend(result,g_strdup(uids->_buffer[i])); - } - } else { - INFO ("No entries found"); - } - - CORBA_free(uids); - - return result; -} - -static void -local_record_from_ical_uid(GCalLocalRecord *local, - char *uid, - GCalConduitContext *ctxt) -{ - iCalObject *obj; - char *vcalendar_string; - - g_assert(local!=NULL); - - vcalendar_string = GNOME_Calendar_Repository_get_object(ctxt->calendar, uid, &(ctxt->ev)); - - if (ctxt->ev._major == CORBA_USER_EXCEPTION){ - INFO ("Object did not exist"); - show_exception(&(ctxt->ev)); - CORBA_exception_free(&(ctxt->ev)); - return; - } else if(ctxt->ev._major != CORBA_NO_EXCEPTION) { - WARN (_("Error while communicating with calendar server")); - show_exception(&(ctxt->ev)); - CORBA_exception_free(&(ctxt->ev)); - return; - } - g_return_if_fail(vcalendar_string!=NULL); - - obj = ical_object_new_from_string (vcalendar_string); - - local_record_from_icalobject(local,obj); - - return; -} - - -/* - * converts a iCalObject to a GCalLocalRecord - */ - -void -local_record_from_icalobject(GCalLocalRecord *local, - iCalObject *obj) -{ - g_return_if_fail(local!=NULL); - g_return_if_fail(obj!=NULL); - - local->ical = obj; - local->local.ID = local->ical->pilot_id; - -/* - LOG ("local->Id = %ld [%s], status = %d", - local->local.ID,obj->summary,local->ical->pilot_status); -*/ - switch(local->ical->pilot_status) { - case ICAL_PILOT_SYNC_NONE: - local->local.attr = GnomePilotRecordNothing; - break; - case ICAL_PILOT_SYNC_MOD: - local->local.attr = GnomePilotRecordModified; - break; - case ICAL_PILOT_SYNC_DEL: - local->local.attr = GnomePilotRecordDeleted; - break; - } - - /* Records without a pilot_id are new */ - if(local->local.ID == 0) - local->local.attr = GnomePilotRecordNew; - - local->local.secret = 0; - if(obj->class!=NULL) - if(strcmp(obj->class,"PRIVATE")==0) - local->local.secret = 1; - - local->local.archived = 0; -} - -/* - * Given a PilotRecord, find the matching record in - * the calendar repository. If no match, return NULL - */ -static GCalLocalRecord * -find_record_in_repository(GnomePilotConduitStandardAbs *conduit, - PilotRecord *remote, - GCalConduitContext *ctxt) -{ - char *vcal_string; - GCalLocalRecord *loc; - - g_return_val_if_fail(conduit!=NULL,NULL); - g_return_val_if_fail(remote!=NULL,NULL); - - LOG ("requesting %ld", remote->ID); - - vcal_string = - GNOME_Calendar_Repository_get_object_by_pilot_id (ctxt->calendar, remote->ID, &(ctxt->ev)); - - if (ctxt->ev._major == CORBA_USER_EXCEPTION){ - INFO ("Object did not exist"); - show_exception(&(ctxt->ev)); - CORBA_exception_free(&(ctxt->ev)); - return NULL; - } else if(ctxt->ev._major != CORBA_NO_EXCEPTION) { - WARN (_("Error while communicating with calendar server")); - show_exception(&(ctxt->ev)); - CORBA_exception_free(&(ctxt->ev)); - return NULL; - } else { - LOG ("Found"); - loc = g_new0(GCalLocalRecord,1); - /* memory allocated in new_from_string is freed in free_match */ - local_record_from_icalobject(loc, - ical_object_new_from_string (vcal_string)); - /* g_free(vcal_string); FIXME: this coredumps, but won't it leak without ? */ - return loc; - } - - return NULL; -} - -/* - * updates an given iCalObject in the repository - */ -static void -update_calendar_entry_in_repository(GnomePilotConduitStandardAbs *conduit, - iCalObject *obj, - GCalConduitContext *ctxt) -{ - char *str; - - g_return_if_fail(conduit!=NULL); - g_return_if_fail(obj!=NULL); - - str = calendar_string_from_object (obj); - - GNOME_Calendar_Repository_update_object (ctxt->calendar, obj->uid, str, &(ctxt->ev)); - - if (ctxt->ev._major == CORBA_USER_EXCEPTION){ - INFO ("Object did not exist"); - show_exception(&(ctxt->ev)); - CORBA_exception_free(&(ctxt->ev)); - return; - } else if(ctxt->ev._major != CORBA_NO_EXCEPTION) { - WARN (_("Error while communicating with calendar server")); - show_exception(&(ctxt->ev)); - CORBA_exception_free(&(ctxt->ev)); - return; - } - - free (str); -} - -static iCalObject * -ical_from_remote_record(GnomePilotConduitStandardAbs *conduit, - PilotRecord *remote, - iCalObject *in_obj) -{ - iCalObject *obj; - int i; - struct Appointment a; - time_t now; - - now = time (NULL); - - g_return_val_if_fail(remote!=NULL,NULL); - memset(&a,0,sizeof(struct Appointment)); - unpack_Appointment(&a,remote->record,remote->length); - - if (in_obj == NULL) - obj = ical_new (a.note ? a.note : "", - g_get_user_name (), - a.description ? a.description : ""); - else - obj = in_obj; - - if (a.note) { - g_free(obj->comment); - obj->comment = g_strdup(a.note); - } - if (a.description) { - g_free(obj->summary); - obj->summary = g_strdup(a.description); - } - - obj->created = now; - obj->last_mod = now; - obj->priority = 0; - obj->transp = 0; - obj->related = NULL; - obj->pilot_id = remote->ID; - obj->pilot_status = ICAL_PILOT_SYNC_NONE; - - /* - * Begin and end - */ - - if (a.event) - { - /* turn day-long events into a full day's appointment - FIXME: get settings from gnomecal */ - a.begin.tm_sec = 0; - a.begin.tm_min = 0; - a.begin.tm_hour = 0; - - a.end.tm_sec = 0; - a.end.tm_min =59; - a.end.tm_hour = 23; - } - - obj->dtstart = mktime (&a.begin); - obj->dtend = mktime (&a.end); - - /* Special case: daily repetitions are converted to a multi-day event */ - /* This sucketh, a pilot event scheduled for dailyRepeat, freq 1, end on - whatever is cleary converted wrong - if (a.repeatType == repeatDaily){ - time_t newt = time_add_day (obj->dtend, a.repeatFrequency); - - obj->dtend = newt; - } - */ - - /* - * Alarm - */ - if (a.alarm){ - obj->aalarm.type = ALARM_AUDIO; - obj->aalarm.enabled = 1; - obj->aalarm.count = a.advance; - - switch (a.advanceUnits){ - case advMinutes: - obj->aalarm.units = ALARM_MINUTES; - break; - - case advHours: - obj->aalarm.units = ALARM_HOURS; - break; - - case advDays: - obj->aalarm.units = ALARM_DAYS; - break; - default: - } - } - - /* - * Recurrence - */ - if (a.repeatFrequency){ - obj->recur = g_new0 (Recurrence, 1); - - switch (a.repeatType){ - case repeatDaily: - /* - * In the Pilot daily repetitions are actually - * multi-day events - */ - obj->recur->type = RECUR_DAILY; - break; - - case repeatMonthlyByDate: - obj->recur->type = RECUR_MONTHLY_BY_DAY; - obj->recur->u.month_day = a.repeatFrequency; - break; - - case repeatWeekly: - { - int wd; - - obj->recur->type = RECUR_WEEKLY; - for (wd = 0; wd < 7; wd++) - if (a.repeatDays [wd]) - obj->recur->weekday |= 1 << wd; - - if (obj->recur->weekday == 0){ - struct tm tm = *localtime (&obj->dtstart); - - obj->recur->weekday = 1 << tm.tm_wday; - } - break; - } - - case repeatMonthlyByDay: - obj->recur->type = RECUR_MONTHLY_BY_POS; - obj->recur->u.month_pos = a.repeatFrequency; - obj->recur->weekday = (a.repeatDay / 7); - break; - - case repeatYearly: - obj->recur->type = RECUR_YEARLY_BY_DAY; - break; - - default: - g_assert_not_reached(); - } - - if (a.repeatForever) - obj->recur->duration = 0; - else - obj->recur->_enddate = mktime (&a.repeatEnd); - - obj->recur->interval = a.repeatFrequency; - } - - /* - * Load exception dates - */ - obj->exdate = NULL; - for (i = 0; i < a.exceptions; i++){ - time_t *t = g_new (time_t, 1); - - *t = mktime (&(a.exception [i])); - obj->exdate = g_list_prepend (obj->exdate, t); - } - - g_free (obj->class); - - if (remote->attr & dlpRecAttrSecret) - obj->class = g_strdup ("PRIVATE"); - else - obj->class = g_strdup ("PUBLIC"); - - - free_Appointment(&a); - - return obj; -} - -/* Code blatantly stolen from - * calendar-pilot-sync.c: - * - * (C) 1999 International GNOME Support - * - * Author: - * Miguel de Icaza (miguel@gnome-support.com) - * - */ -static gint -update_record (GnomePilotConduitStandardAbs *conduit, - PilotRecord *remote, - GCalConduitContext *ctxt) -{ - char *vcal_string; - iCalObject *obj; - struct Appointment a; - - g_return_val_if_fail(remote!=NULL,-1); - - memset(&a,0,sizeof(struct Appointment)); - unpack_Appointment(&a,remote->record,remote->length); - - obj = ical_new (a.note ? a.note : "", - g_get_user_name (), - a.description ? a.description : ""); - - LOG ("requesting %ld [%s]", remote->ID, a.description); - vcal_string = GNOME_Calendar_Repository_get_object_by_pilot_id (ctxt->calendar, remote->ID, &(ctxt->ev)); - - if (ctxt->ev._major == CORBA_USER_EXCEPTION){ - LOG ("Object did not exist, creating a new one"); - show_exception(&(ctxt->ev)); - CORBA_exception_free(&(ctxt->ev)); - ical_from_remote_record(conduit,remote,obj); - } else if(ctxt->ev._major != CORBA_NO_EXCEPTION) { - WARN (_("Error while communicating with calendar server")); - show_exception(&(ctxt->ev)); - CORBA_exception_free(&(ctxt->ev)); - ical_object_destroy (obj); - free_Appointment(&a); - return -1; - } else { - LOG ("Found"); - ical_object_destroy (obj); - obj = ical_object_new_from_string (vcal_string); - ical_from_remote_record(conduit,remote,obj); - CORBA_free(vcal_string); - } - - /* update record on server */ - - update_calendar_entry_in_repository(conduit,obj,ctxt); - - /* - * Shutdown - */ - ical_object_destroy (obj); - free_Appointment(&a); - - return 0; -} - -static void -check_for_slow_setting(GnomePilotConduit *c, - GCalConduitContext *ctxt) -{ - CORBA_long entry_number; - entry_number = - GNOME_Calendar_Repository_get_number_of_objects(ctxt->calendar, - GNOME_Calendar_Repository_ANY, - &(ctxt->ev)); - - if (ctxt->ev._major == CORBA_USER_EXCEPTION){ - show_exception(&(ctxt->ev)); - CORBA_exception_free(&(ctxt->ev)); - } else if(ctxt->ev._major != CORBA_NO_EXCEPTION) { - WARN (_("Error while communicating with calendar server")); - show_exception(&(ctxt->ev)); - CORBA_exception_free(&(ctxt->ev)); - } else { - LOG (_("Calendar holds %d entries"),entry_number); - /* If the local base is empty, do a slow sync */ - if ( entry_number <= 0) { - gnome_pilot_conduit_standard_set_slow(GNOME_PILOT_CONDUIT_STANDARD(c)); - } - } -} - -static gint -pre_sync(GnomePilotConduit *c, - GnomePilotDBInfo *dbi, - GCalConduitContext *ctxt) -{ - int l; - gint num_records; - unsigned char *buf; - - g_message ("GnomeCal Conduit v.%s",CONDUIT_VERSION); - - ctxt->calendar = CORBA_OBJECT_NIL; - - if (start_calendar_server(GNOME_PILOT_CONDUIT_STANDARD_ABS(c),ctxt) != 0) { - WARN(_("Could not start gnomecal server")); - gnome_pilot_conduit_error(GNOME_PILOT_CONDUIT(c), - _("Could not start gnomecal server")); - return -1; - } - - /* Set the counters for the progress bar crap */ - num_records = GNOME_Calendar_Repository_get_number_of_objects (ctxt->calendar, GNOME_Calendar_Repository_ANY, &(ctxt->ev)); - catch_ret_val(ctxt->ev,-1); - gnome_pilot_conduit_standard_abs_set_num_local_records(GNOME_PILOT_CONDUIT_STANDARD_ABS(c), - num_records); - num_records = GNOME_Calendar_Repository_get_number_of_objects (ctxt->calendar, GNOME_Calendar_Repository_MODIFIED, &(ctxt->ev)); - catch_ret_val(ctxt->ev,-1); - gnome_pilot_conduit_standard_abs_set_num_updated_local_records(GNOME_PILOT_CONDUIT_STANDARD_ABS(c), - num_records); - num_records = GNOME_Calendar_Repository_get_number_of_objects (ctxt->calendar, GNOME_Calendar_Repository_NEW, &(ctxt->ev)); - catch_ret_val(ctxt->ev,-1); - gnome_pilot_conduit_standard_abs_set_num_new_local_records(GNOME_PILOT_CONDUIT_STANDARD_ABS(c), - num_records); - num_records = GNOME_Calendar_Repository_get_number_of_objects (ctxt->calendar, GNOME_Calendar_Repository_DELETED, &(ctxt->ev)); - catch_ret_val(ctxt->ev,-1); - gnome_pilot_conduit_standard_abs_set_num_deleted_local_records(GNOME_PILOT_CONDUIT_STANDARD_ABS(c), - num_records); - - gtk_object_set_data(GTK_OBJECT(c),"dbinfo",dbi); - - /* load_records(c); */ - - buf = (unsigned char*)g_malloc(0xffff); - if((l=dlp_ReadAppBlock(dbi->pilot_socket,dbi->db_handle,0,(unsigned char *)buf,0xffff)) < 0) { - WARN(_("Could not read pilot's DateBook application block")); - WARN("dlp_ReadAppBlock(...) = %d",l); - gnome_pilot_conduit_error(GNOME_PILOT_CONDUIT(c), - _("Could not read pilot's DateBook application block")); - return -1; - } - unpack_AppointmentAppInfo(&(ctxt->ai),buf,l); - g_free(buf); - - check_for_slow_setting(c,ctxt); - - return 0; -} - -/** - * Find (if possible) the local record which matches - * the given PilotRecord. - * if successfull, return non-zero and set *local to - * a non-null value (the located local record), - * otherwise return 0 and set *local = NULL; - */ - -static gint -match_record (GnomePilotConduitStandardAbs *conduit, - GCalLocalRecord **local, - PilotRecord *remote, - GCalConduitContext *ctxt) -{ - LOG ("in match_record"); - - g_return_val_if_fail(local!=NULL,-1); - g_return_val_if_fail(remote!=NULL,-1); - - *local = find_record_in_repository(conduit,remote,ctxt); - - if (*local==NULL) return -1; - return 0; -} - -/** - * Free the data allocated by a previous match_record call. - * If successfull, return non-zero and ser *local=NULL, otherwise - * return 0. - */ -static gint -free_match (GnomePilotConduitStandardAbs *conduit, - GCalLocalRecord **local, - GCalConduitContext *ctxt) -{ - LOG ("entering free_match"); - - g_return_val_if_fail(local!=NULL,-1); - g_return_val_if_fail(*local!=NULL,-1); - - ical_object_destroy (GCAL_LOCALRECORD(*local)->ical); - g_free(*local); - - *local = NULL; - return 0; -} - -/* - Move to archive and set status to Nothing - */ -static gint -archive_local (GnomePilotConduitStandardAbs *conduit, - GCalLocalRecord *local, - GCalConduitContext *ctxt) -{ - LOG ("entering archive_local"); - - g_return_val_if_fail(local!=NULL,-1); - - return -1; -} - -/* - Store in archive and set status to Nothing - */ -static gint -archive_remote (GnomePilotConduitStandardAbs *conduit, - GCalLocalRecord *local, - PilotRecord *remote, - GCalConduitContext *ctxt) -{ - LOG ("entering archive_remote"); - - g_return_val_if_fail(remote!=NULL,-1); - g_return_val_if_fail(local!=NULL,-1); - - return -1; -} - -/* - Store and set status to Nothing - */ -static gint -store_remote (GnomePilotConduitStandardAbs *conduit, - PilotRecord *remote, - GCalConduitContext *ctxt) -{ - LOG ("entering store_remote"); - - g_return_val_if_fail(remote!=NULL,-1); - remote->attr = GnomePilotRecordNothing; - - return update_record(conduit,remote,ctxt); -} - -static gint -clear_status_archive_local (GnomePilotConduitStandardAbs *conduit, - GCalLocalRecord *local, - GCalConduitContext *ctxt) -{ - LOG ("entering clear_status_archive_local"); - - g_return_val_if_fail(local!=NULL,-1); - - return -1; -} - -static gint -iterate (GnomePilotConduitStandardAbs *conduit, - GCalLocalRecord **local, - GCalConduitContext *ctxt) -{ - static GSList *events,*iterator; - static int hest; - - g_return_val_if_fail(local!=NULL,-1); - - if(*local==NULL) { - LOG ("beginning iteration"); - - events = get_calendar_objects(conduit,NULL,ctxt); - hest = 0; - - if(events!=NULL) { - LOG ("iterating over %d records",g_slist_length(events)); - *local = g_new0(GCalLocalRecord,1); - - local_record_from_ical_uid(*local,(gchar*)events->data,ctxt); - iterator = events; - } else { - LOG ("no events"); - (*local) = NULL; - } - } else { - /*LOG ("continuing iteration");*/ - hest++; - if(g_slist_next(iterator)==NULL) { - GSList *l; - - LOG ("ending"); - /** free stuff allocated for iteration */ - g_free((*local)); - - LOG ("iterated over %d records",hest); - for(l=events;l;l=l->next) - g_free(l->data); - - g_slist_free(events); - - /* ends iteration */ - (*local) = NULL; - return 0; - } else { - iterator = g_slist_next(iterator); - local_record_from_ical_uid(*local,(gchar*)(iterator->data),ctxt); - } - } - return 1; -} - -static gint -iterate_specific (GnomePilotConduitStandardAbs *conduit, - GCalLocalRecord **local, - gint flag, - gint archived, - GCalConduitContext *ctxt) -{ -#ifdef DEBUG_CALCONDUIT - { - gchar *tmp; - switch (flag) { - case GnomePilotRecordNothing: tmp = g_strdup("RecordNothing"); break; - case GnomePilotRecordModified: tmp = g_strdup("RecordModified"); break; - case GnomePilotRecordNew: tmp = g_strdup("RecordNew"); break; - default: tmp = g_strdup_printf("0x%x",flag); break; - } - LOG ("entering iterate_specific(flag = %s)",tmp); - g_free(tmp); - } -#endif - g_return_val_if_fail(local!=NULL,-1); - - /* iterate until a record meets the criteria */ - while(gnome_pilot_conduit_standard_abs_iterate(conduit,(LocalRecord**)local)) { - if((*local)==NULL) break; - if(archived && ((*local)->local.archived==archived)) break; - if(((*local)->local.attr == flag)) break; - } - - return (*local)==NULL?0:1; -} - -static gint -purge (GnomePilotConduitStandardAbs *conduit, - GCalConduitContext *ctxt) -{ - LOG ("entering purge"); - - - /* HEST, gem posterne her */ - - return -1; -} - -static gint -set_status (GnomePilotConduitStandardAbs *conduit, - GCalLocalRecord *local, - gint status, - GCalConduitContext *ctxt) -{ - LOG ("entering set_status(status=%d)",status); - - g_return_val_if_fail(local!=NULL,-1); - - g_assert(local->ical!=NULL); - - local->local.attr = status; - switch(status) { - case GnomePilotRecordPending: - case GnomePilotRecordNothing: - local->ical->pilot_status = ICAL_PILOT_SYNC_NONE; - break; - case GnomePilotRecordDeleted: - break; - case GnomePilotRecordNew: - case GnomePilotRecordModified: - local->ical->pilot_status = ICAL_PILOT_SYNC_MOD; - break; - } - - if ( status == GnomePilotRecordDeleted) { - GNOME_Calendar_Repository_delete_object(ctxt->calendar,local->ical->uid,&(ctxt->ev)); - } else { - GNOME_Calendar_Repository_update_pilot_id(ctxt->calendar, - local->ical->uid, - local->local.ID, - local->ical->pilot_status, - &(ctxt->ev)); - } - - if (ctxt->ev._major == CORBA_USER_EXCEPTION){ - LOG ("Object did not exist"); - show_exception(&(ctxt->ev)); - CORBA_exception_free(&(ctxt->ev)); - return -1; - } else if(ctxt->ev._major != CORBA_NO_EXCEPTION) { - WARN (_("Error while communicating with calendar server")); - show_exception(&(ctxt->ev)); - CORBA_exception_free(&(ctxt->ev)); - return -1; - } - return 0; -} - -static gint -set_archived (GnomePilotConduitStandardAbs *conduit, - GCalLocalRecord *local, - gint archived, - GCalConduitContext *ctxt) -{ - LOG ("entering set_archived"); - - g_return_val_if_fail(local!=NULL,-1); - g_assert(local->ical!=NULL); - - local->local.archived = archived; - update_calendar_entry_in_repository(conduit,local->ical,ctxt); - /* FIXME: This should move the entry into a speciel - calendar file, eg. Archive, or (by config option), simply - delete it */ - return 0; -} - -static gint -set_pilot_id (GnomePilotConduitStandardAbs *conduit, - GCalLocalRecord *local, - guint32 ID, - GCalConduitContext *ctxt) -{ - LOG ("entering set_pilot_id(id=%d)",ID); - - g_return_val_if_fail(local!=NULL,-1); - g_assert(local->ical!=NULL); - - local->local.ID = ID; - local->ical->pilot_id = ID; - GNOME_Calendar_Repository_update_pilot_id(ctxt->calendar, - local->ical->uid, - local->local.ID, - local->ical->pilot_status, - &(ctxt->ev)); - - if (ctxt->ev._major == CORBA_USER_EXCEPTION){ - LOG ("Object did not exist"); - show_exception(&(ctxt->ev)); - CORBA_exception_free(&(ctxt->ev)); - return -1; - } else if(ctxt->ev._major != CORBA_NO_EXCEPTION) { - WARN (_("Error while communicating with calendar server")); - show_exception(&(ctxt->ev)); - CORBA_exception_free(&(ctxt->ev)); - return -1; - } - return 0; -} - -static gint -transmit (GnomePilotConduitStandardAbs *conduit, - GCalLocalRecord *local, - PilotRecord **remote, - GCalConduitContext *ctxt) -{ - PilotRecord *p; - int daycount; - - LOG ("entering transmit"); - - g_return_val_if_fail(local!=NULL,-1); - g_return_val_if_fail(remote!=NULL,-1); - g_assert(local->ical!=NULL); - - p = g_new0(PilotRecord,1); - - p->ID = local->local.ID; - p->attr = local->local.attr; - p->archived = local->local.archived; - p->secret = local->local.secret; - - local->a = g_new0(struct Appointment,1); - - local->a->event = 0; /* if no start time, leave at 1 */ - local->a->begin = *localtime(&local->ical->dtstart); - local->a->end = *localtime(&local->ical->dtend); - - /* set the Audio Alarm parameters */ - if(local->ical->aalarm.enabled) { - local->a->alarm = 1; - local->a->advance = local->ical->aalarm.count; - switch(local->ical->aalarm.units) { - case ALARM_MINUTES: - local->a->advanceUnits = advMinutes; - break; - case ALARM_HOURS: - local->a->advanceUnits = advHours; - break; - case ALARM_DAYS: - local->a->advanceUnits = advDays; - break; - } - } else { - local->a->alarm = 0; - local->a->advance = 0; - local->a->advanceUnits = advMinutes; - } - - /* set the recurrence parameters */ - if (local->ical->recur != NULL) { - switch (local->ical->recur->type) { - case RECUR_DAILY: - local->a->repeatType = repeatDaily; - break; - case RECUR_WEEKLY: - local->a->repeatType = repeatWeekly; - break; - case RECUR_MONTHLY_BY_POS: - local->a->repeatType = repeatMonthlyByDate; - break; - case RECUR_MONTHLY_BY_DAY: - local->a->repeatType = repeatMonthlyByDay; - break; - case RECUR_YEARLY_BY_MONTH: - local->a->repeatType = repeatYearly; - break; - case RECUR_YEARLY_BY_DAY: - local->a->repeatType = repeatYearly; - break; - } - if (local->ical->recur->duration == 0) { - local->a->repeatForever = 1; - } else { - local->a->repeatForever = 0; - local->a->repeatEnd = *localtime(&local->ical->recur->_enddate); - } - local->a->repeatFrequency = local->ical->recur->interval; - - - for ( daycount=0; daycount<7; daycount++ ) { - if (local->ical->recur->weekday & (1 << daycount)) - local->a->repeatDays[daycount] = 1; - } - } else { - local->a->repeatType = repeatNone; - local->a->repeatForever = 0; - local->a->repeatEnd = local->a->end; - local->a->repeatFrequency = 0; - local->a->repeatDay = dom1stSun; - local->a->repeatDays[0] = 0; - local->a->repeatDays[1] = 0; - local->a->repeatDays[2] = 0; - local->a->repeatDays[3] = 0; - local->a->repeatDays[4] = 0; - local->a->repeatDays[5] = 0; - local->a->repeatDays[6] = 0; - local->a->repeatWeekstart = 0; - local->a->exceptions = 0; - local->a->exception = NULL; - } - - /* STOP: don't replace these with g_strdup, since free_Appointment - uses free to deallocte */ - local->a->note = - local->ical->comment==NULL?NULL:strdup(local->ical->comment); - local->a->description = - local->ical->summary==NULL?NULL:strdup(local->ical->summary); - - /* Generate pilot record structure */ - p->record = g_new0(char,0xffff); - p->length = pack_Appointment(local->a,p->record,0xffff); - -#if 0 - /* This is some debug code that hexdumps the calendar entry... - You won't need this. */ - { - int x,y; - g_message("calconduit: new item from %s to %s",asctime(&(local->a->begin)),asctime(&(local->a->end))); - - g_message("local->a->note = %s",local->a->note); - g_message("local->a->description = %s",local->a->description); - g_message("sizeof(p->record) = %d, length is %d",sizeof(p->record),p->length); - for(x=0;xlength;x+=32) { - for(y=x;yrecord[y]<33 || p->record[y]>128) - printf("%02X",p->record[y]); - else - printf(" %c",p->record[y]); - printf("\n"); - } - } -#endif - - *remote = p; - - return 0; -} - -static gint -free_transmit (GnomePilotConduitStandardAbs *conduit, - GCalLocalRecord *local, - PilotRecord **remote, - GCalConduitContext *ctxt) -{ - LOG ("entering free_transmit"); - - g_return_val_if_fail(local!=NULL,-1); - g_return_val_if_fail(remote!=NULL,-1); - - free_Appointment(local->a); - g_free((*remote)->record); - *remote = NULL; - return 0; -} - -static gint -compare (GnomePilotConduitStandardAbs *conduit, - GCalLocalRecord *local, - PilotRecord *remote, - GCalConduitContext *ctxt) -{ - /* used by the quick compare */ - PilotRecord *remoteOfLocal; - int err; - int retval; - - /* used by the tedious compare */ - struct Appointment a; - int daycount; - - g_message ("entering compare"); - - g_return_val_if_fail (local!=NULL,-1); - g_return_val_if_fail (remote!=NULL,-1); -#if 1 - err = transmit(conduit,local,&remoteOfLocal,ctxt); - if (err != 0) return err; - - retval = 0; - if (remote->length == remoteOfLocal->length) { - if (memcmp(remoteOfLocal->record,remote->record,remote->length)!=0) { - g_message("compare failed on contents"); - retval = 1; - } - } else { - g_message("compare failed on length"); - retval = 1; - } - - free_transmit(conduit,local,&remoteOfLocal,ctxt); - return retval; - -#else - /** FIXME: All the { LOG("yadayada"); return 1; } bloat is for debug purposes. - Once this is known to work, compact to return 1;'s */ - - /* Check record attributes */ - if (local->local.ID != remote->ID) { - LOG("failed local->local.ID == remote->ID"); - return 1; - } - if (local->local.attr != remote->attr) { - LOG("failed local->local.attr == remote->attr"); - return 1; - } - if (local->local.archived != remote->archived) { - LOG("failed local->local.archived == remote->archived"); - return 1; - } - if (local->local.secret != remote->secret) { - LOG("failed local->local.secret == remote->secret"); - return 1; - } - - unpack_Appointment(&a,remote->record,remote->length); - - /* Check records begin/end time */ - if (a.event==0) { -/* FIXME - if (a.begin != *localtime(&local->ical->dtstart)) { - LOG("a.begin == *localtime(&local->ical->dtstart)"); - return 1; - } - if (a.end != *localtime(&local->ical->dtend)) { - LOG("a.end == *localtime(&local->ical->dtend)"); - return 1; - } -*/ - } else { - LOG("failed local->a.event != 0, unsupported by gnomecal"); - return 1; - } - - /* Check records alarm settings */ - if(a.alarm == 1) { - if (local->ical->aalarm.enabled == 1) { - if (a.advance != local->ical->aalarm.count) { - LOG("failed a.advance == local->ical->aalarm.count"); - return 1; - } - switch(local->ical->aalarm.units) { - case ALARM_MINUTES: - if (a.advanceUnits != advMinutes) { - LOG("failed local->ical->aalarm.units == a.advanceUnits"); - return 1; - } - break; - case ALARM_HOURS: - if (a.advanceUnits != advHours) { - LOG("failed local->ical->aalarm.units == a.advanceUnits"); - return 1; - } - break; - case ALARM_DAYS: - if (a.advanceUnits != advDays) { - LOG("failed local->ical->aalarm.units == a.advanceUnits"); - return 1; - } - break; - } - } else { - LOG("failed a.alarm == 1 && local->ical->aalarm.enabled == 1"); - return 1; - } - } else if (local->ical->aalarm.enabled == 1) { - LOG("failed a.alarm != 1 && local->ical->aalarm.enabled != 1"); - return 1; - } - - /* Check records recurrence settings */ - /* If this code is broken, a more or less safe although not efficient - approach is (other the fixing the bug), if either has recurrence, - return 1, thus failing the comparision */ - if (local->ical->recur != NULL) { - if (a.repeatType == repeatNone) { - LOG("failed: local->ical->recur != NULL && a.repeatType != repeatNone"); - return 1; - } - switch (local->ical->recur->type) { - case RECUR_DAILY: - if (a.repeatType != repeatDaily) { - LOG("failed a.repeatType == repeatDaily"); - return 1; } - break; - case RECUR_WEEKLY: - if (a.repeatType != repeatWeekly) { - LOG("failed a.repeatType == repeatWeekly"); - return 1; } - break; - case RECUR_MONTHLY_BY_POS: - if (a.repeatType != repeatMonthlyByDate) { - LOG("failed a.repeatType == repeatMonthlyByDate"); - return 1; } - break; - case RECUR_MONTHLY_BY_DAY: - if (a.repeatType != repeatMonthlyByDay) { - LOG("failed a.repeatType == repeatMonthlyByDay"); - return 1; } - break; - case RECUR_YEARLY_BY_MONTH: - if (a.repeatType != repeatYearly) { - LOG("failed a.repeatType == repeatYearly"); - return 1; } - break; - case RECUR_YEARLY_BY_DAY: - if (a.repeatType != repeatYearly) { - LOG("failed a.repeatType == repeatYearly"); - return 1; } - break; - } - if (local->ical->recur->duration == 0) { - if(a.repeatForever != 1) { - LOG("failed local->ical->recur->duration == 0 && a.repeatForever == 1"); - return 1; - } - } else { - if(a.repeatForever != 0) { - LOG("failed local->ical->recur->duration != 0 && ! a.repeatForever == 0"); - return 1; - } -/* FIXME - if(a.repeatEnd != *localtime(&local->ical->recur->_enddate)) { - LOG("failed a.repeatEnd == *localtime(&local->ical->recur->_enddate)"); - return 1; - } -*/ - } - if (a.repeatFrequency != local->ical->recur->interval) { - LOG("failed a.repeatFrequency == local->ical->recur->interval"); - return 1; - } - for (daycount = 0; daycount<7; daycount++) { - if(local->ical->recur->weekday & (1<ical->recur->weekday & (1<ical->recur->weekday &! (1<ical->recur == NULL && a.repeatType == repeatNone"); - return 1; - } - - /* check the note and description */ - if(a.note!=NULL) { - if(local->ical->comment==NULL) { - LOG("failed a.note != NULL && local->ical->coment != NULL"); - return 1; - } - if(strcmp(local->ical->comment,a.note)!=0) { - LOG("failed strcmp(local->ical->comment,a.note)==0"); - return 1; - } - } if(local->ical->comment!=NULL) { - LOG("failed a.note == NULL && local->ical->coment == NULL"); - return 1; - } - if(a.description!=NULL) { - if(local->ical->summary==NULL) { - LOG("failed a.description != NULL && local->ical->coment != NULL"); - return 1; - } - if(strcmp(local->ical->summary,a.description)!=0) { - LOG("failed strcmp(local->ical->summary,a.description)==0"); - return 1; - } - } if(local->ical->summary!=NULL) { - LOG("failed a.description == NULL && local->ical->coment == NULL"); - return 1; - } -#endif - return 0; -} - -static gint -compare_backup (GnomePilotConduitStandardAbs *conduit, - GCalLocalRecord *local, - PilotRecord *remote, - GCalConduitContext *ctxt) -{ - LOG ("entering compare_backup"); - - g_return_val_if_fail(local!=NULL,-1); - g_return_val_if_fail(remote!=NULL,-1); - - return -1; -} - -static gint -delete_all (GnomePilotConduitStandardAbs *conduit, - GCalConduitContext *ctxt) -{ - GSList *events,*it; - gboolean error; - - events = get_calendar_objects(conduit,&error,ctxt); - - if (error == FALSE) return -1; - for (it=events;it;it = g_slist_next(it)) { - GNOME_Calendar_Repository_delete_object(ctxt->calendar, - it->data, - &(ctxt->ev)); - if (ctxt->ev._major == CORBA_USER_EXCEPTION){ - INFO ("Object did not exist"); - show_exception(&(ctxt->ev)); - CORBA_exception_free(&(ctxt->ev)); - } else if(ctxt->ev._major != CORBA_NO_EXCEPTION) { - WARN (_("Error while communicating with calendar server")); - show_exception(&(ctxt->ev)); - CORBA_exception_free(&(ctxt->ev)); - /* destroy loop, free data */ - for (it=events;it;it = g_slist_next(it)) g_free(it->data); - g_slist_free(events); - return -1; - } - g_free(it->data); - } - g_slist_free(events); - return -1; -} - -GnomePilotConduit * -conduit_get_gpilot_conduit (guint32 pilotId) -{ - GtkObject *retval; - GCalConduitCfg *cfg; - GCalConduitContext *ctxt; - - - retval = gnome_pilot_conduit_standard_abs_new ("DatebookDB", 0x64617465); - g_assert (retval != NULL); - gnome_pilot_conduit_construct(GNOME_PILOT_CONDUIT(retval),"GnomeCalConduit"); - - gcalconduit_load_configuration(&cfg,pilotId); - gtk_object_set_data(retval,"gcalconduit_cfg",cfg); - - gcalconduit_new_context(&ctxt,cfg); - gtk_object_set_data(GTK_OBJECT(retval),"gcalconduit_context",ctxt); - - gtk_signal_connect (retval, "match_record", (GtkSignalFunc) match_record, ctxt); - gtk_signal_connect (retval, "free_match", (GtkSignalFunc) free_match, ctxt); - gtk_signal_connect (retval, "archive_local", (GtkSignalFunc) archive_local, ctxt); - gtk_signal_connect (retval, "archive_remote", (GtkSignalFunc) archive_remote, ctxt); - gtk_signal_connect (retval, "store_remote", (GtkSignalFunc) store_remote, ctxt); - gtk_signal_connect (retval, "clear_status_archive_local", (GtkSignalFunc) clear_status_archive_local, ctxt); - gtk_signal_connect (retval, "iterate", (GtkSignalFunc) iterate, ctxt); - gtk_signal_connect (retval, "iterate_specific", (GtkSignalFunc) iterate_specific, ctxt); - gtk_signal_connect (retval, "purge", (GtkSignalFunc) purge, ctxt); - gtk_signal_connect (retval, "set_status", (GtkSignalFunc) set_status, ctxt); - gtk_signal_connect (retval, "set_archived", (GtkSignalFunc) set_archived, ctxt); - gtk_signal_connect (retval, "set_pilot_id", (GtkSignalFunc) set_pilot_id, ctxt); - gtk_signal_connect (retval, "compare", (GtkSignalFunc) compare, ctxt); - gtk_signal_connect (retval, "compare_backup", (GtkSignalFunc) compare_backup, ctxt); - gtk_signal_connect (retval, "free_transmit", (GtkSignalFunc) free_transmit, ctxt); - gtk_signal_connect (retval, "delete_all", (GtkSignalFunc) delete_all, ctxt); - gtk_signal_connect (retval, "transmit", (GtkSignalFunc) transmit, ctxt); - gtk_signal_connect (retval, "pre_sync", (GtkSignalFunc) pre_sync, ctxt); - - return GNOME_PILOT_CONDUIT (retval); -} - -void -conduit_destroy_gpilot_conduit (GnomePilotConduit *conduit) -{ - GCalConduitCfg *cc; - GCalConduitContext *ctxt; - - cc = GET_GCALCONFIG(conduit); - ctxt = GET_GCALCONTEXT(conduit); - - if(ctxt->calendar!=CORBA_OBJECT_NIL) - GNOME_Calendar_Repository_done (ctxt->calendar, &(ctxt->ev)); - - gcalconduit_destroy_configuration(&cc); - - gcalconduit_destroy_context(&ctxt); - - gtk_object_destroy (GTK_OBJECT (conduit)); - -} - - diff --git a/calendar/conduits/calendar/calendar-conduit.h b/calendar/conduits/calendar/calendar-conduit.h deleted file mode 100644 index fa8c151d4c..0000000000 --- a/calendar/conduits/calendar/calendar-conduit.h +++ /dev/null @@ -1,135 +0,0 @@ -/* $Id$ */ - -#ifndef __CALENDAR_CONDUIT_H__ -#define __CALENDAR_CONDUIT_H__ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "GnomeCal.h" - -/* This is the local record structure for the GnomeCal conduit. */ -typedef struct _GCalLocalRecord GCalLocalRecord; -struct _GCalLocalRecord { - /* The stuff from gnome-pilot-conduit-standard-abs.h - Must be first in the structure, or instances of this - structure cannot be used by gnome-pilot-conduit-standard-abs. - */ - LocalRecord local; - /* The corresponding iCal object, as found by GnomeCal. */ - iCalObject *ical; - /* pilot-link appointment structure, used for implementing Transmit. */ - struct Appointment *a; -}; -#define GCAL_LOCALRECORD(s) ((GCalLocalRecord*)(s)) - -/* This is the configuration of the GnomeCal conduit. */ -typedef struct _GCalConduitCfg GCalConduitCfg; -struct _GCalConduitCfg { - gboolean open_secret; - guint32 pilotId; - GnomePilotConduitSyncType sync_type; /* only used by capplet */ -}; -#define GET_GCALCONFIG(c) ((GCalConduitCfg*)gtk_object_get_data(GTK_OBJECT(c),"gcalconduit_cfg")) - -/* This is the context for all the GnomeCal conduit methods. */ -typedef struct _GCalConduitContext GCalConduitContext; -struct _GCalConduitContext { - struct AppointmentAppInfo ai; - GCalConduitCfg *cfg; - GNOME_Calendar_Repository calendar; - CORBA_Environment ev; - CORBA_ORB orb; -}; -#define GET_GCALCONTEXT(c) ((GCalConduitContext*)gtk_object_get_data(GTK_OBJECT(c),"gcalconduit_context")) - -/* Given a GCalConduitCfg*, allocates the structure and - loads the configuration data for the given pilot. */ -static void -gcalconduit_load_configuration(GCalConduitCfg **c, - guint32 pilotId) -{ - gchar prefix[256]; - g_snprintf(prefix,255,"/gnome-pilot.d/calendard-conduit/Pilot_%u/",pilotId); - - *c = g_new0(GCalConduitCfg,1); - g_assert(*c != NULL); - gnome_config_push_prefix(prefix); - (*c)->open_secret = gnome_config_get_bool("open_secret=FALSE"); - (*c)->sync_type = GnomePilotConduitSyncTypeCustom; /* set in capplets main */ - gnome_config_pop_prefix(); - - (*c)->pilotId = pilotId; -} - -/* Saves the configuration data. */ -static void -gcalconduit_save_configuration(GCalConduitCfg *c) -{ - gchar prefix[256]; - - g_snprintf(prefix,255,"/gnome-pilot.d/calendar-conduit/Pilot_%u/",c->pilotId); - - gnome_config_push_prefix(prefix); - gnome_config_set_bool("open_secret",c->open_secret); - gnome_config_pop_prefix(); - - gnome_config_sync(); - gnome_config_drop_all(); -} - -/* Creates a duplicate of the configuration data */ -static GCalConduitCfg* -gcalconduit_dupe_configuration(GCalConduitCfg *c) { - GCalConduitCfg *retval; - g_return_val_if_fail(c!=NULL,NULL); - retval = g_new0(GCalConduitCfg,1); - retval->sync_type = c->sync_type; - retval->open_secret = c->open_secret; - retval->pilotId = c->pilotId; - return retval; -} - -/* Destroys any data allocated by gcalconduit_load_configuration - and deallocates the given configuration. */ -static void -gcalconduit_destroy_configuration(GCalConduitCfg **c) -{ - g_return_if_fail(c!=NULL); - g_return_if_fail(*c!=NULL); - g_free(*c); - *c = NULL; -} - -/* Given a GCalConduitContxt*, allocates the structure */ -static void -gcalconduit_new_context(GCalConduitContext **ctxt, - GCalConduitCfg *c) -{ - *ctxt = g_new0(GCalConduitContext,1); - g_assert(ctxt!=NULL); - (*ctxt)->cfg = c; - CORBA_exception_init (&((*ctxt)->ev)); -} - -/* Destroys any data allocated by gcalconduit_new_context - and deallocates its data. */ -static void -gcalconduit_destroy_context(GCalConduitContext **ctxt) -{ - g_return_if_fail(ctxt!=NULL); - g_return_if_fail(*ctxt!=NULL); -/* - if ((*ctxt)->cfg!=NULL) - gcalconduit_destroy_configuration(&((*ctxt)->cfg)); -*/ - g_free(*ctxt); - *ctxt = NULL; -} -#endif __CALENDAR_CONDUIT_H__ diff --git a/calendar/conduits/todo/todo-conduit-control-applet.c b/calendar/conduits/todo/todo-conduit-control-applet.c deleted file mode 100644 index 54a26715ef..0000000000 --- a/calendar/conduits/todo/todo-conduit-control-applet.c +++ /dev/null @@ -1,287 +0,0 @@ -/* Control applet ("capplet") for the gnome-pilot todo conduit, */ -/* based on */ -/* gpilotd control applet ('capplet') for use with the GNOME control center */ -/* $Id$ */ - -#include -#include -#include -#include - -#include -#include - -#include -#include -#include - -#include "todo-conduit.h" - -/* tell changes callbacks to ignore changes or not */ -static gboolean ignore_changes=FALSE; - -/* capplet widget */ -static GtkWidget *capplet=NULL; - -/* host/device/pilot configuration windows */ -GtkWidget *cfgOptionsWindow=NULL; -GtkWidget *cfgStateWindow=NULL; -GtkWidget *dialogWindow=NULL; - -gboolean activated,org_activation_state; -GnomePilotConduitMgmt *conduit; - -static void doTrySettings(GtkWidget *widget, ConduitCfg *conduitCfg); -static void doRevertSettings(GtkWidget *widget, ConduitCfg *conduitCfg); -static void doSaveSettings(GtkWidget *widget, ConduitCfg *conduitCfg); - -static void readStateCfg(GtkWidget *w); -static void setStateCfg(GtkWidget *w); - -gint pilotId; -CORBA_Environment ev; - -static void -doTrySettings(GtkWidget *widget, ConduitCfg *conduitCfg) -{ - readStateCfg(cfgStateWindow); - if(activated) - gpilotd_conduit_mgmt_enable(conduit,pilotId,GnomePilotConduitSyncTypeSynchronize); - else - gpilotd_conduit_mgmt_disable(conduit,pilotId); -} - -static void -doSaveSettings(GtkWidget *widget, ConduitCfg *conduitCfg) -{ - doTrySettings(widget, conduitCfg); - save_configuration(NULL); -} - - -static void -doRevertSettings(GtkWidget *widget, ConduitCfg *conduitCfg) -{ - activated = org_activation_state; - setStateCfg(cfgStateWindow); -} - -static void -insert_dir_callback (GtkEditable *editable, const gchar *text, - gint len, gint *position, void *data) -{ - gint i; - gchar *curname; - - curname = gtk_entry_get_text(GTK_ENTRY(editable)); - if (*curname == '\0' && len > 0) { - if (isspace(text[0])) { - gtk_signal_emit_stop_by_name(GTK_OBJECT(editable), "insert_text"); - return; - } - } else { - for (i=0; i"),NULL}; - - about = gnome_about_new(_("Gpilotd todo conduit"), VERSION, - _("(C) 1998 the Free Software Foundation"), - authors, - _("Configuration utility for the todo conduit.\n"), - _("gnome-unknown.xpm")); - gtk_widget_show (about); - - return; -} - -static void toggled_cb(GtkWidget *widget, gpointer data) { - gtk_widget_set_sensitive(cfgOptionsWindow,GTK_TOGGLE_BUTTON(widget)->active); - capplet_widget_state_changed(CAPPLET_WIDGET(capplet), TRUE); -} - -static GtkWidget -*createStateCfgWindow(void) -{ - GtkWidget *vbox, *table; - GtkWidget *entry, *label; - GtkWidget *button; - - vbox = gtk_vbox_new(FALSE, GNOME_PAD); - - table = gtk_table_new(2, 2, FALSE); - gtk_table_set_row_spacings(GTK_TABLE(table), 4); - gtk_table_set_col_spacings(GTK_TABLE(table), 10); - gtk_box_pack_start(GTK_BOX(vbox), table, FALSE, FALSE, GNOME_PAD); - - label = gtk_label_new(_("Enabled")); - gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 1,2); - - button = gtk_check_button_new(); - gtk_object_set_data(GTK_OBJECT(vbox), "conduit_on_off", button); - gtk_signal_connect(GTK_OBJECT(button), "toggled", - GTK_SIGNAL_FUNC(toggled_cb), - NULL); - gtk_table_attach_defaults(GTK_TABLE(table), button, 1, 2, 1,2); - - return vbox; -} - -static void -setStateCfg(GtkWidget *cfg) -{ - GtkWidget *button; - gchar num[40]; - - button = gtk_object_get_data(GTK_OBJECT(cfg), "conduit_on_off"); - - g_assert(button!=NULL); - - ignore_changes = TRUE; - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button),activated); - gtk_widget_set_sensitive(cfgOptionsWindow,GTK_TOGGLE_BUTTON(button)->active); - ignore_changes = FALSE; -} - - -static void -readStateCfg(GtkWidget *cfg) -{ - GtkWidget *button; - - button = gtk_object_get_data(GTK_OBJECT(cfg), "conduit_on_off"); - - g_assert(button!=NULL); - - activated = GTK_TOGGLE_BUTTON(button)->active; -} - -static void -pilot_capplet_setup(void) -{ - GtkWidget *frame, *table; - - capplet = capplet_widget_new(); - - table = gtk_table_new(1, 2, FALSE); - gtk_container_border_width(GTK_CONTAINER(table), GNOME_PAD); - gtk_container_add(GTK_CONTAINER(capplet), table); - - frame = gtk_frame_new(_("Conduit state")); - gtk_container_border_width(GTK_CONTAINER(frame), GNOME_PAD_SMALL); - gtk_table_attach_defaults(GTK_TABLE(table), frame, 0, 1, 0, 1); - cfgStateWindow = createStateCfgWindow(); - gtk_container_add(GTK_CONTAINER(frame), cfgStateWindow); - - gtk_signal_connect(GTK_OBJECT(capplet), "try", - GTK_SIGNAL_FUNC(doTrySettings), NULL); - gtk_signal_connect(GTK_OBJECT(capplet), "revert", - GTK_SIGNAL_FUNC(doRevertSettings), NULL); - gtk_signal_connect(GTK_OBJECT(capplet), "ok", - GTK_SIGNAL_FUNC(doSaveSettings), NULL); - gtk_signal_connect(GTK_OBJECT(capplet), "help", - GTK_SIGNAL_FUNC(about_cb), NULL); - - - setStateCfg(cfgStateWindow); - - gtk_widget_show_all(capplet); -} - -void run_error_dialog(gchar *mesg,...) { - char tmp[80]; - va_list ap; - - va_start(ap,mesg); - vsnprintf(tmp,79,mesg,ap); - dialogWindow = gnome_message_box_new(mesg,GNOME_MESSAGE_BOX_ERROR,GNOME_STOCK_BUTTON_OK,NULL); - gnome_dialog_run_and_close(GNOME_DIALOG(dialogWindow)); - va_end(ap); -} - -gint get_pilot_id_from_gpilotd() { - gint *pilots; - int i; - - i=0; - gpilotd_get_pilot_ids(&pilots); - if(pilots) { - while(pilots[i]!=-1) { g_message("pilot %d = \"%d\"",i,pilots[i]); i++; } - if(i==0) { - run_error_dialog(_("No pilot configured, please choose the\n'Pilot Link Properties' capplet first.")); - return -1; - } else { - if(i==1) - return pilots[0]; - else { - g_message("too many pilots..."); - return pilots[0]; - } - } - } else { - run_error_dialog(_("No pilot configured, please choose the\n'Pilot Link Properties' capplet first.")); - return -1; - } -} - -int -main( int argc, char *argv[] ) -{ - /* we're a capplet */ - gnome_capplet_init ("todo conduit control applet", NULL, argc, argv, - NULL, - 0, NULL); - - /* put all code to set things up in here */ - conduit = gpilotd_conduit_mgmt_new("todo_conduit"); - - /* get pilot name from gpilotd */ - /* 1. initialize the gpilotd connection */ - if (gpilotd_init(&argc,argv)!=0) { - run_error_dialog(_("Cannot initialze the GnomePilot Daemon")); - g_error(_("Cannot initialze the GnomePilot Daemon")); - return -1; - } - - /* 2 connect to gpilotd */ - if (gpilotd_connect()!=0) { - run_error_dialog(_("Cannot connect to the GnomePilot Daemon")); - g_error(_("Cannot connect to the GnomePilot Daemon")); - return -1; - } - - pilotId = get_pilot_id_from_gpilotd(); - if(!pilotId) return -1; - org_activation_state = activated = gpilotd_conduit_mgmt_is_enabled(conduit,pilotId); - - pilot_capplet_setup(); - - - /* done setting up, now run main loop */ - capplet_gtk_main(); - return 0; -} diff --git a/calendar/conduits/todo/todo-conduit-control-applet.desktop b/calendar/conduits/todo/todo-conduit-control-applet.desktop deleted file mode 100644 index a817e16843..0000000000 --- a/calendar/conduits/todo/todo-conduit-control-applet.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Name=Todo conduit -Name[da]=Udstående -Name[no]=Oppgaver -Comment=Configure the todo conduit -Comment[da]=Konfigurér Udstående -Comment[no]=Konfigurér oppgavelisten -Exec=todo-conduit-control-applet --cap-id=1 -Terminal=0 -Type=Application diff --git a/calendar/conduits/todo/todo-conduit.c b/calendar/conduits/todo/todo-conduit.c deleted file mode 100644 index 3a543816af..0000000000 --- a/calendar/conduits/todo/todo-conduit.c +++ /dev/null @@ -1,256 +0,0 @@ -/* $Id$ */ - -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "todo-conduit.h" - -static gint -load_records(GnomePilotConduit *c) -{ - return 0; -} - -static gint -pre_sync(GnomePilotConduit *c, GnomePilotDBInfo *dbi) { - int l; - unsigned char *buf; - - gtk_object_set_data(GTK_OBJECT(c),"dbinfo",dbi); - - load_records(c); - - buf = (unsigned char*)g_malloc(0xffff); - if((l=dlp_ReadAppBlock(dbi->pilot_socket,dbi->db_handle,0,(unsigned char *)buf,0xffff))<0) { - return -1; - } - unpack_ToDoAppInfo(&(GET_DATA(c)->ai),buf,l); - g_free(buf); - - return 0; -} - -static gint -post_sync(GnomePilotConduit *c) { - return 0; -} - -static gint -match_record (GnomePilotConduitStandardAbs *pilot_conduit_standard_abs, - LocalRecord **local, - PilotRecord *remote, - gpointer data) -{ - g_print ("in match_record\n"); - return 0; -} -static gint -free_match (GnomePilotConduitStandardAbs *pilot_conduit_standard_abs, - LocalRecord **local, - gpointer data) -{ - g_print ("entering free_match\n"); - *local = NULL; - - return 0; -} -static gint -archive_local (GnomePilotConduitStandardAbs *pilot_conduit_standard_abs, - LocalRecord *local, - gpointer data) -{ - g_print ("entering archive_local\n"); - return 1; - -} -static gint -archive_remote (GnomePilotConduitStandardAbs *pilot_conduit_standard_abs, - LocalRecord *local, - PilotRecord *remote, - gpointer data) -{ - g_print ("entering archive_remote\n"); - return 1; -} -static gint -store_remote (GnomePilotConduitStandardAbs *pilot_conduit_standard_abs, - PilotRecord *remote, - gpointer data) -{ - g_print ("entering store_remote\n"); - g_print ("Rec:%s:\nLength:%d\n", remote->record, remote->length); - return 1; -} -static gint -clear_status_archive_local (GnomePilotConduitStandardAbs *pilot_conduit_standard_abs, - LocalRecord *local, - gpointer data) -{ - g_print ("entering clear_status_archive_local\n"); - return 1; -} -static gint -iterate (GnomePilotConduitStandardAbs *pilot_conduit_standard_abs, - LocalRecord **local, - gpointer data) -{ - g_print ("entering iterate\n"); - return 1; -} -static gint -iterate_specific (GnomePilotConduitStandardAbs *pilot_conduit_standard_abs, - LocalRecord **local, - gint flag, - gint archived, - gpointer data) -{ - g_print ("entering iterate_specific\n"); - return 1; -} -static gint -purge (GnomePilotConduitStandardAbs *pilot_conduit_standard_abs, - gpointer data) -{ - g_print ("entering purge\n"); - return 1; -} -static gint -set_status (GnomePilotConduitStandardAbs *pilot_conduit_standard_abs, - LocalRecord *local, - gint status, - gpointer data) -{ - g_print ("entering set_status\n"); - return 1; -} -static gint -set_archived (GnomePilotConduitStandardAbs *pilot_conduit_standard_abs, - LocalRecord *local, - gint archived, - gpointer data) -{ - g_print ("entering set_archived\n"); - return 1; -} -static gint -set_pilot_id (GnomePilotConduitStandardAbs *pilot_conduit_standard_abs, - LocalRecord *local, - guint32 ID, - gpointer data) -{ - g_print ("entering set_pilot_id\n"); - return 1; -} -static gint -compare (GnomePilotConduitStandardAbs *pilot_conduit_standard_abs, - LocalRecord *local, - PilotRecord *remote, - gpointer data) -{ - g_print ("entering compare\n"); - return 1; -} -static gint -compare_backup (GnomePilotConduitStandardAbs *pilot_conduit_standard_abs, - LocalRecord *local, - PilotRecord *remote, - gpointer data) -{ - g_print ("entering compare_backup\n"); - return 1; -} -static gint -free_transmit (GnomePilotConduitStandardAbs *pilot_conduit_standard_abs, - LocalRecord *local, - PilotRecord *remote, - gpointer data) -{ - g_print ("entering free_transmit\n"); - return 1; -} -static gint -delete_all (GnomePilotConduitStandardAbs *pilot_conduit_standard_abs, - gpointer data) -{ - g_print ("entering delete_all\n"); - return 1; -} -static PilotRecord * -transmit (GnomePilotConduitStandardAbs *pilot_conduit_standard_abs, - LocalRecord *local, - gpointer data) -{ - g_print ("entering transmit\n"); - return NULL; -} - -static GnomePilotConduit * -conduit_get_gpilot_conduit (guint32 pilotId) -{ - GtkObject *retval; - ConduitCfg *cfg; - ConduitData *cdata; - - g_print ("creating our new conduit\n"); - retval = gnome_pilot_conduit_standard_abs_new ("TodoDB", 0x0); - g_assert (retval != NULL); - gnome_pilot_conduit_construct(GNOME_PILOT_CONDUIT(retval),"todo"); - - cfg = g_new0(ConduitCfg,1); - g_assert(cfg != NULL); - gtk_object_set_data(retval,"conduit_cfg",cfg); - - cdata = g_new0(ConduitData,1); - g_assert(cdata != NULL); - gtk_object_set_data(retval,"conduit_data",cdata); - - gtk_signal_connect (retval, "match_record", (GtkSignalFunc) match_record, NULL); - gtk_signal_connect (retval, "free_match", (GtkSignalFunc) free_match, NULL); - gtk_signal_connect (retval, "archive_local", (GtkSignalFunc) archive_local, NULL); - gtk_signal_connect (retval, "archive_remote", (GtkSignalFunc) archive_remote, NULL); - gtk_signal_connect (retval, "store_remote", (GtkSignalFunc) store_remote, NULL); - gtk_signal_connect (retval, "clear_status_archive_local", (GtkSignalFunc) clear_status_archive_local, NULL); - gtk_signal_connect (retval, "iterate", (GtkSignalFunc) iterate, NULL); - gtk_signal_connect (retval, "iterate_specific", (GtkSignalFunc) iterate_specific, NULL); - gtk_signal_connect (retval, "purge", (GtkSignalFunc) purge, NULL); - gtk_signal_connect (retval, "set_status", (GtkSignalFunc) set_status, NULL); - gtk_signal_connect (retval, "set_archived", (GtkSignalFunc) set_archived, NULL); - gtk_signal_connect (retval, "set_pilot_id", (GtkSignalFunc) set_pilot_id, NULL); - gtk_signal_connect (retval, "compare", (GtkSignalFunc) compare, NULL); - gtk_signal_connect (retval, "compare_backup", (GtkSignalFunc) compare_backup, NULL); - gtk_signal_connect (retval, "free_transmit", (GtkSignalFunc) free_transmit, NULL); - gtk_signal_connect (retval, "delete_all", (GtkSignalFunc) delete_all, NULL); - gtk_signal_connect (retval, "transmit", (GtkSignalFunc) transmit, NULL); - gtk_signal_connect (retval, "pre_sync", (GtkSignalFunc) pre_sync, NULL); - gtk_signal_connect (retval, "post_sync", (GtkSignalFunc) post_sync, NULL); - - load_configuration(&cfg,pilotId); - - return GNOME_PILOT_CONDUIT (retval); -} -static void -conduit_destroy_gpilot_conduit (GnomePilotConduit *conduit) -{ - ConduitCfg *cc; - cc = GET_CONFIG(conduit); - destroy_configuration(&cc); - gtk_object_destroy (GTK_OBJECT (conduit)); -} - - diff --git a/calendar/conduits/todo/todo-conduit.h b/calendar/conduits/todo/todo-conduit.h deleted file mode 100644 index c224b2b1f3..0000000000 --- a/calendar/conduits/todo/todo-conduit.h +++ /dev/null @@ -1,59 +0,0 @@ -/* $Id$ */ - -#ifndef __TODO_CONDUIT_H__ -#define __TODO_CONDUIT_H__ - -#include -#include -#include -#include -#include - -typedef struct _ConduitCfg ConduitCfg; - -struct _ConduitCfg { - gboolean open_secret; - guint32 pilotId; -}; - -#define GET_CONFIG(c) ((ConduitCfg*)gtk_object_get_data(GTK_OBJECT(c),"conduit_cfg")) - -typedef struct _ConduitData ConduitData; - -struct _ConduitData { - struct ToDoAppInfo ai; -}; - -#define GET_DATA(c) ((ConduitData*)gtk_object_get_data(GTK_OBJECT(c),"conduit_data")) - -static void load_configuration(ConduitCfg **c,guint32 pilotId) { - gchar prefix[256]; - g_snprintf(prefix,255,"/gnome-pilot.d/todod-conduit/Pilot_%u/",pilotId); - - *c = g_new0(ConduitCfg,1); - gnome_config_push_prefix(prefix); - (*c)->open_secret = gnome_config_get_bool("open secret=FALSE"); - gnome_config_pop_prefix(); - - (*c)->pilotId = pilotId; -} - -static void save_configuration(ConduitCfg *c) { - gchar prefix[256]; - - g_snprintf(prefix,255,"/gnome-pilot.d/todo-conduit/Pilot_%u/",c->pilotId); - - gnome_config_push_prefix(prefix); - gnome_config_set_bool("open secret",c->open_secret); - gnome_config_pop_prefix(); - - gnome_config_sync(); - gnome_config_drop_all(); -} - -static void destroy_configuration(ConduitCfg **c) { - g_free(*c); - *c = NULL; -} - -#endif __TODO_CONDUIT_H__ diff --git a/calendar/doc/.cvsignore b/calendar/doc/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/calendar/doc/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/calendar/doc/C/.cvsignore b/calendar/doc/C/.cvsignore deleted file mode 100644 index 93942d6aa5..0000000000 --- a/calendar/doc/C/.cvsignore +++ /dev/null @@ -1,5 +0,0 @@ -Makefile -Makefile.in -gnomecal -gnomecal.html -gnomecal.junk diff --git a/calendar/doc/C/Makefile.am b/calendar/doc/C/Makefile.am deleted file mode 100644 index fbd3b63acf..0000000000 --- a/calendar/doc/C/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -gnomecal_helpdir = $(datadir)/gnome/help/gnomecal/C - -gnomecal_help_DATA = \ - gnomecal.html \ - topic.dat - -SGML_FILES = \ - gnomecal.sgml - -EXTRA_DIST = \ - topic.dat \ - $(SGML_FILES) - -all: - -gnomecal.html: gnomecal/gnomecal.html - -cp gnomecal/gnomecal.html . - -gnomecal/gnomecal.html: $(SGML_FILES) - -db2html gnomecal.sgml - -dist-hook: - mkdir $(distdir)/gnomecal - -cp gnomecal/*.html gnomecal/*.css $(distdir)/gnomecal - -cp gnomecal.html $(distdir) - mkdir $(distdir)/images - -cp images/*.gif images/*.jpg $(distdir)/images - -install-data-local: gnomecal.html - $(mkinstalldirs) $(DESTDIR)$(gnomecal_helpdir)/images - -for file in $(srcdir)/gnomecal/*.html $(srcdir)/gnomecal/*.css; do \ - basefile=`basename $$file`; \ - $(INSTALL_DATA) $(srcdir)/$$file $(DESTDIR)$(gnomecal_helpdir)/$$basefile; \ - done - -for file in $(srcdir)/images/*.jpg $(srcdir)/images/*.gif; do \ - $(INSTALL_DATA) $(srcdir)/$$file $(DESTDIR)$(gnomecal_helpdir)/images;\ - done - -gnomecal.ps: gnomecal.sgml - -db2ps $< - -gnomecal.rtf: gnomecal.sgml - -db2rtf $< - diff --git a/calendar/doc/C/gnomecal.sgml b/calendar/doc/C/gnomecal.sgml deleted file mode 100644 index 00c9c8bb72..0000000000 --- a/calendar/doc/C/gnomecal.sgml +++ /dev/null @@ -1,465 +0,0 @@ - - - - - GNOME calendar user's manual - - - Dave Mason - -
- dcm@redhat.com -
-
-
- - Miguel de Icaza - Amozurrutia - -
- miguel@gnu.org -
-
-
-
- - 1998, 1999 Miguel de Icaza, Dave Mason - - - This documentation is free software; you can redistribute - it and/or modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later - version. - - This program is distributed in the hope that it will be - useful, but WITHOUT ANY WARRANTY; without even the implied - warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU General Public License for more details. - - 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., 59 Temple Place, Suite 330, Boston, - MA 02111-1307 USA - - For more details see the file COPYING in the source - distribution of GNOME. - -
- - - - - Command line options - - - The following command line options are recognized by the - gnomecal program. You can use these - options to alter the behaviour of the program or to quickly - query the program for appointments, and to do items from the - command line without requiring an X display. These are useful - for example to include in scripts. - - - - - - - - --events. Displays the events for the - date specified (or today, if no date is specified). - - - - - - --from DATE. Define the beginning of - the range for the event display, or the startup day on the - calenday views. By default, the event will span the whole - day specified in DATE. - - - - - - --to DATE. Define the range end for - the event display. If this is not specified, it will - default to the end of the day specified by the - --from option. - - - - - - --file FILE. Set the calendar to the - FILE specified on the command line. - - - - - - --todo. Dumps the to-do values to - standard output. - - - - - - --userfile. Use this if you want to - force the file to be loaded to be the default user's - calendar (this is the default, only used to override the - --file if you have some sort of macro. - - - - - - --geometry. Used to specity the - startup geometry of the application (location and size). - - - - - - --view VIEWMODE. Use this to specify - the startup view that should be used. - VIEWMODE is one of: dayview, - weekview, monthview, yearview. - - - - - - - - DATE is interpreted as being in the local - time-zone, unless a specific timezone is specified. Examples - of valid date specifications include: "1 month ago", "2 hours - ago", "400000 seconds ago", "last year", "last Monday", - "yesterday", "a fortnight ago", "3/31/92 10:00:07 PST", "January - 23, 1987 10:05pm", "22:00 GMT". - - - - - Technical information about the GNOME calendar - - - Currently, the GNOME calendar uses the vCal file format standard - for storing and loading its appointment and todo database. This - standard is widely used in various other calendar applications, - so it provides a good mechanism for exchanging appointments. - - - In the future the GNOME calendar will support the upcoming - iCalendar specification as well. - - - If you want to know more about the vCal specification, you can - check the Internet - Mail Consortium (http://www.imc.org) for the details. - - - - - The GNOME Calendar - - Introduction - - - - GNOME Calendar - - - - - Calendar - - - The GNOME Calendar is a simple calendar applications which can be quite - useful in your daily work. The Calendar, like much of GNOME, is in its - infancy and while it is a very useful application, there is some very - impressive functionality still to come like network shared calendar usage, - and syncing capability with Palm Pilots and other hand held PDAs. The - Calendar can be launched from the Applications submenu of - the Main Menu. - - - The Calendar is broken up into four main tabs: Day, Week, Month, - and Year. Each view allows you to view the respective time period - but will also allow you to schedule appointments from any one of - the tabs. - -
- The GNOME Calendar - - The GNOME Calendar - - - -
-
- Setting Up the GNOME Calendar - - The GNOME Calendar can be used in the state which it is shipped but there - are tools available to make sure it is setup the way you would like it to - be. The first place you should go is the GNOME Calendar Preferences. You - can find the Preferences dialog by selecting the - Preferences menu item from the - Settings menu. -
- The GNOME Calendar Preferences - - The GNOME Calendar Preferences. - - - -
-
- - The Calendar Preferences dialog is broken up into three tabs, Time display, - Colors, and Todo list. - - - Time - This tab is broken up into three main sections: Time format, Weeks - start on, and Day range. - - - Time format - This allows you to choose between a 12 or 24 hour format - clock. - - - Weeks start on - This allows you to define what day your week will start - on, Sunday or Monday. This will affect how the calendar is laid out in the - Day and Week views. - - - Day range - This section lets you choose what time your days will start - and end. Any hours outside the range selected will be shaded on your Day - view. - - - Colors - This tab allows you to change the default colors used in the - Calendar. There are seven color choices you can customize: Outline, - Headings, Empty days, Appointments, Highlighted day, Day numbers, and - Current day's number. Each choice has a small color selector box next to - it. When you press this box you will be given a color selector dialog in - which you can choose the color you want. Once you have selected a color the - small sample calendar on the right side of the tab will preview your choice. - - - Todo List - This tab allows you to define which columns will be shown in the - Todo List in the Day View. You can set the Summary, Due Date, and Priority - columns. - - - Once you have made the changes to the Calendar Preferences you may press the - Apply button to apply them. - -
- - Using the GNOME Calendar - - Using the GNOME Calendar is quite simple and most tasks can be performed - from any of the major views, Day, Week, Month or Year. Probably one of the - most important features to remember is that at any time you may right mouse - click on a particular day and add a new appointment. There are many other - features which will be described below in each of the major views. - - - The Day View - - The Day tab is probably the most useful view in the GNOME Calendar as it - acts just as a day timer would. On the left of the tab is the hour listing - for the current day. The light grey coloring in the hour list separates the - work hours from the non-work hours. If you would like to change the work - hours displayed in light grey you can do so in . - -
- The Day View - - The Day View - - - -
- - TIP - - One tip for adding a new appointment in the Day View is to select a few - hours in the hours list by clicking and dragging your mouse down the hours - list. Once the correct range of time has been selected you may press Enter - and type in the appointment. This will allow you to skip the Create New - Appointment dialog. - - - - Next to the hours listing in the top right hand corner is a small full - month calendar. You may change the month or year of the small month - calendar by pressing the forward and backward arrows on the top. You may - use the small month calendar to navigate the days as well. Double clicking - on any day in the small month calendar will move the current day view to - that particular day. - - - Below the small month calendar is your Todo list. The Todo list is a - simple list where you can keep all your tasks on hand. To add an item to - the Todo list press the Add button. This will - launch a small editing box where you can type in the item. Once you have - entered an item in the Todo list you may use the - Edit and Delete to manage - your items. The Todo items are available no matter which days are displayed - in the Day View and can only be deleted with the - Delete button. - -
- - The Week View - - The Week View shows the current week with detailed descriptions of your - appointments. If you would like to add an appointment for any of the days - in the week view you may right mouse click on the day and select the - New appointment menu item from the - pop-up menu. You may also use the week view to navigate - to particular days in the Day View. Double-click on any day in the Week - View and you will go to that day in the Day View. - -
- The Week View - - The Week View - - - -
- - In the lower left corner of the Week View there is a small month calendar. - You may change the month or year of the small month calendar by pressing - the forward and backward arrows on the top. You may use the small month - calendar to navigate the days as well. Double clicking on any day in the - small month calendar will move the current week view to that particular - week. - -
- - The Month View - - The Month View shows the entire month with brief detailed descriptions of - your appointments. The Month View makes use of the customized colors - available in the Calendar. You may read about how to set these colors in - . For any day with a brief description of an - appointment you may click on the day to display a detailed description of - the appointment in a pop-up window. If you would like to add an appointment - to a day in the Month View you may right mouse click on any day and select - the New Appointment in this day item from the - pop-up menu. You may use the items in the - pop-up menu to navigate in the Day, Week, and Year views - by selecting either Jump to this day, - Jump to this week, orJump to this - Year. - -
- The Month View - - The Month View - - - -
-
- - The Year View - - The Year View shows you the entire year with no descriptions of - appointments. Like the Month View, the Year View makes use of the - customized colors available in the Calendar. You may read about how to set - these colors in . If you have an appointment on a - day you may click on that day and a description of the appointment will be - displayed in the pop-up window. If you would like to add an appointment to - a day in the Year View you may right mouse click on any day and select the - New Appointment in this day item from the - pop-up menu. You may use the items in the - pop-up menu to navigate in the Day, Week, and Month - views by selecting either Jump to this day, - Jump to this week, or Jump to this - Month. - -
- The Year View - - The Year View - - - -
-
-
- - Making a New Appointment - - There are many methods for making a new appointment in the GNOME Calendar, - the easiest is by pressing the New button on the - button bar. Whenever you make a new appointment you will launch the Create - New Appointment dialog that allows you to set the properties of that - appointment. The Create New Appointment dialog is broken into two - different tabs, the General and the Recurrence tabs. - - - General - The General tab is the area in which you specify the time of the - appointment and set reminders for yourself. There are four different areas - on the General tab: Summary, Time, Alarms, and Classification. - - - - Summary - The Summary box allows you to type a description of the - appointment. Keep in mind that only a portion of this description will - be available in the Week and Month Views. - - - - - Time - The Time area allows you to set the time range for the - appointment by selecting the date and hours. To the right of the start - and end days there is a small selection box named Calendar. This will - bring up a small Calendar when pressed. You may select the start and end - date in the small calendar. To the right of the start en end hours - there is a small button which will display the hours of the day when - pressed. Each hour in the list will have a sub menu displaying each - quarter hour so you may select them. The hours are restricted to those - included in the Day Range. - - - - - Alarms - The Alarms area allows you to set up an alarm to remind you of - an appointment. There are four different types of alarms you may use to - remind yourself of appointments: Display, Audio, Program, and Mail. The - Display alarm will display a message on your screen in the time you - set. The Audio alarm will play an audio file at the time you set. The - Program alarm will run a program you specify at the time you set. The - Mail alarm will send email to the user specified at the time you set. - - - - - - - Recurrence - The Recurrence tab allows you to specify how often an - appointment should recur, if at all. The first property you should set if - you want a recurring appointment is the Recurrence rule. You may choose - among None, Daily, Weekly, Monthly, and Yearly. For each selection you may - adjust the recurrence properties for your selection. In the Ending date - area you may set a rule which will stop the recurrence of your appointment - or allow it to repeat forever. In the Exceptions area you may make - exceptions to the recurring appointment by double-clicking the date and - pressing the Add button. - - -
-
diff --git a/calendar/doc/C/images/cal-props.gif b/calendar/doc/C/images/cal-props.gif deleted file mode 100644 index 4a3ca0c706..0000000000 Binary files a/calendar/doc/C/images/cal-props.gif and /dev/null differ diff --git a/calendar/doc/C/images/calday.gif b/calendar/doc/C/images/calday.gif deleted file mode 100644 index d708cbb2e7..0000000000 Binary files a/calendar/doc/C/images/calday.gif and /dev/null differ diff --git a/calendar/doc/C/images/calmonth.gif b/calendar/doc/C/images/calmonth.gif deleted file mode 100644 index be20d3255c..0000000000 Binary files a/calendar/doc/C/images/calmonth.gif and /dev/null differ diff --git a/calendar/doc/C/images/calweek.gif b/calendar/doc/C/images/calweek.gif deleted file mode 100644 index 04820f9470..0000000000 Binary files a/calendar/doc/C/images/calweek.gif and /dev/null differ diff --git a/calendar/doc/C/images/calyear.gif b/calendar/doc/C/images/calyear.gif deleted file mode 100644 index 6e2333f419..0000000000 Binary files a/calendar/doc/C/images/calyear.gif and /dev/null differ diff --git a/calendar/doc/C/topic.dat b/calendar/doc/C/topic.dat deleted file mode 100644 index 23af169d62..0000000000 --- a/calendar/doc/C/topic.dat +++ /dev/null @@ -1,2 +0,0 @@ -gnomecal.html Manual -cmdline.html Command line options diff --git a/calendar/doc/Makefile.am b/calendar/doc/Makefile.am deleted file mode 100644 index 42ffacc264..0000000000 --- a/calendar/doc/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS = C diff --git a/calendar/gui/.cvsignore b/calendar/gui/.cvsignore deleted file mode 100644 index c55e5d266f..0000000000 --- a/calendar/gui/.cvsignore +++ /dev/null @@ -1,21 +0,0 @@ -Makefile.in -Makefile -.deps -_libs -.libs -.pure -gncal -evolution-calendar -evolution-calendar.pure -test-calendar-widget -getdate.c -GnomeCal-skels.c -GnomeCal-common.c -GnomeCal.h -calendar-pilot-sync -evolution-calendar-stubs.c -evolution-calendar-skels.c -evolution-calendar-common.c -evolution-calendar.h -GnomeCal-stubs.c -*.lo diff --git a/calendar/gui/GNOME_Evolution_Calendar.oaf.in b/calendar/gui/GNOME_Evolution_Calendar.oaf.in deleted file mode 100644 index c8a4907854..0000000000 --- a/calendar/gui/GNOME_Evolution_Calendar.oaf.in +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/calendar/gui/GNOME_Evolution_Calendar.oafinfo b/calendar/gui/GNOME_Evolution_Calendar.oafinfo deleted file mode 100644 index c8a4907854..0000000000 --- a/calendar/gui/GNOME_Evolution_Calendar.oafinfo +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/calendar/gui/GNOME_Evolution_Calendar_Control.oaf.in b/calendar/gui/GNOME_Evolution_Calendar_Control.oaf.in deleted file mode 100644 index fb0f138caf..0000000000 --- a/calendar/gui/GNOME_Evolution_Calendar_Control.oaf.in +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/calendar/gui/GNOME_Evolution_Calendar_Control.oafinfo b/calendar/gui/GNOME_Evolution_Calendar_Control.oafinfo deleted file mode 100644 index fb0f138caf..0000000000 --- a/calendar/gui/GNOME_Evolution_Calendar_Control.oafinfo +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/calendar/gui/GNOME_Evolution_Calendar_gnomecal.oaf.in b/calendar/gui/GNOME_Evolution_Calendar_gnomecal.oaf.in deleted file mode 100644 index c8a4907854..0000000000 --- a/calendar/gui/GNOME_Evolution_Calendar_gnomecal.oaf.in +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/calendar/gui/GNOME_Evolution_Calendar_gnomecal.oafinfo b/calendar/gui/GNOME_Evolution_Calendar_gnomecal.oafinfo deleted file mode 100644 index c8a4907854..0000000000 --- a/calendar/gui/GNOME_Evolution_Calendar_gnomecal.oafinfo +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/calendar/gui/GnomeCal.idl b/calendar/gui/GnomeCal.idl deleted file mode 100644 index 3838c7c0bc..0000000000 --- a/calendar/gui/GnomeCal.idl +++ /dev/null @@ -1,104 +0,0 @@ -#include - -module GNOME { - - module Calendar { - - interface Repository { - - exception NotFound {}; - typedef sequence String_Sequence; - - /* - * get_object: - * @uid: Unique Identifier for the object - * - * Returns a vCalendar object for the object - * that matches the UID @uid. - */ - string get_object (in string uid) - raises (NotFound); - - /* - * get_object_by_pilot_id: - * @pilot_id: the pilot id - * - * Returns the object that has the @pilot_id - * identifier. - */ - string get_object_by_pilot_id (in long pilot_id) - raises (NotFound); - - /* - * get_id_from_pilot_id: - * @pilot_id: the pilot id - * - * Returns the object id that matches the @pilot_id - * identifier. - */ - string get_id_from_pilot_id (in long pilot_id) - raises (NotFound); - - /* - * delete_object: - * @uid: Unique Identifier for the object - */ - void delete_object (in string uid) - raises (NotFound); - - /* - * update_object: - * @uid: uid of object to update - * @object: vcard object to update - */ - void update_object (in string uid, in string object); - - /* - * update_pilot_id: - * @uid: Unique identifier for the event we want to update - * @pilot_id: new ID assigned by the pilot - * @pilot_status: Status to flag the event with - */ - void update_pilot_id (in string uid, in long pilot_id, in long pilot_status) - raises (NotFound); - - /* - * get_object_id_list - * - * Returns a sequence of the UID's of the entries - */ - String_Sequence get_object_id_list(); - - /* - * get_updated_objects: - * - * Returns a vCalendar with all the objects that have been - * modified since the last Pilot Sync - */ - string get_updated_objects (); - - /* - * Returns the number of objects of a specific type in the calendar - * repository. - */ - - enum RecordStatus { - ANY, /* This means all records */ - NEW, - MODIFIED, - DELETED - }; - - long get_number_of_objects(in RecordStatus record_status); - - /* - * done: - * - * Informs the calendar that we are done using it, - * gets a chance to destroy windows and save information. - */ - void done (); - }; - }; -}; - diff --git a/calendar/gui/Makefile.am b/calendar/gui/Makefile.am deleted file mode 100644 index 5ef1cc9c83..0000000000 --- a/calendar/gui/Makefile.am +++ /dev/null @@ -1,142 +0,0 @@ -SUBDIRS = dialogs - -help_base = $(datadir)/gnome/help/cal - -CPPFLAGS = \ - -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" - -INCLUDES = \ - -DG_LOG_DOMAIN=\"calendar-gui\" \ - -I$(top_builddir)/shell \ - -I$(top_srcdir)/shell \ - -I$(top_srcdir) \ - -I$(top_srcdir)/calendar \ - -I$(top_srcdir)/libical/src/libical \ - -I$(includedir) \ - $(BONOBO_VFS_GNOME_CFLAGS) \ - $(GNOME_CONDUIT_INCLUDEDIR) \ - $(PISOCK_INCLUDEDIR) \ - -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \ - -DGNOMELOCALEDIR=\""$(datadir)/locale"\" - -LINK_FLAGS = \ - $(BONOBO_VFS_GNOME_LIBS) \ - $(INTLLIBS) \ - dialogs/libcal-dialogs.a \ - $(top_builddir)/calendar/cal-client/libcal-client.la \ - $(top_builddir)/calendar/cal-util/libcal-util.la \ - $(top_builddir)/e-util/libeutil.la \ - $(top_builddir)/widgets/e-paned/libepaned.a \ - $(top_builddir)/widgets/e-text/libetext.a \ - $(top_builddir)/libversit/libversit.la \ - $(top_builddir)/libical/src/libical/libical.la - -gladedir = $(datadir)/evolution/glade - -glade_DATA = \ - event-editor-dialog.glade - -glade_messages = event-editor-dialog.glade.h - -bin_PROGRAMS = evolution-calendar - -evolution_calendar_SOURCES = \ - alarm.c \ - alarm.h \ - calendar-commands.c \ - calendar-commands.h \ - control-factory.c \ - control-factory.h \ - component-factory.c \ - component-factory.h \ - e-day-view-main-item.c \ - e-day-view-main-item.h \ - e-day-view-time-item.c \ - e-day-view-time-item.h \ - e-day-view-top-item.c \ - e-day-view-top-item.h \ - e-day-view.c \ - e-day-view.h \ - e-week-view-event-item.c \ - e-week-view-event-item.h \ - e-week-view-main-item.c \ - e-week-view-main-item.h \ - e-week-view-titles-item.c \ - e-week-view-titles-item.h \ - e-week-view.c \ - e-week-view.h \ - event-editor.c \ - event-editor.h \ - event-editor-utils.c \ - event-editor-utils.h \ - getdate.y \ - gncal-todo.c \ - gncal-todo.h \ - gnome-month-item.c \ - gnome-month-item.h \ - gnome-cal.c \ - gnome-cal.h \ - goto.c \ - layout.c \ - layout.h \ - main.c \ - mark.c \ - mark.h \ - popup-menu.c \ - popup-menu.h \ - prop.c - -# print.c \ -# print.h \ - -# FIXME We should make a libeshell library instead of this gross hack. -SHELL_OBJS = \ - $(top_builddir)/shell/Evolution-common.o \ - $(top_builddir)/shell/Evolution-stubs.o \ - $(top_builddir)/shell/Evolution-skels.o \ - $(top_builddir)/shell/evolution-shell-component.o - -evolution_calendar_LDADD = \ - $(SHELL_OBJS) \ - $(EXTRA_GNOME_LIBS) \ - $(BONOBO_HTML_GNOME_LIBS) \ - $(top_builddir)/widgets/e-text/libetext.a \ - $(top_builddir)/e-util/libeutil.la \ - $(LINK_FLAGS) - -evolution_calendar_LDFLAGS = `gnome-config --libs gdk_pixbuf` - -if USING_OAF -oafdir = $(datadir)/oaf -oaf_DATA = calendar-control.oafinfo evolution-calendar.oafinfo -else -gnorbadir = $(sysconfdir)/CORBA/servers -gnorba_DATA = calendar-control.gnorba evolution-calendar.gnorba -endif - -EXTRA_DIST = \ - $(glade_DATA) \ - bell.xpm \ - recur.xpm \ - dayview.xpm \ - workweekview.xpm \ - weekview.xpm \ - monthview.xpm \ - yearview.xpm \ - calendar-control.gnorba \ - calendar-control.oafinfo - -install-data-local: - $(mkinstalldirs) $(DESTDIR)$(help_base)/C - -if ENABLE_PURIFY -PLINK = $(LIBTOOL) --mode=link $(PURIFY) $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ - -all-local: evolution-calendar.pure - -evolution-calendar.pure: evolution-calendar - @rm -f evolution-calendar.pure - $(PLINK) $(evolution_calendar_LDFLAGS) $(evolution_calendar_OBJECTS) $(evolution_calendar_LDADD) $(LIBS) - -endif - diff --git a/calendar/gui/alarm-notify/alarm-notify-dialog.c b/calendar/gui/alarm-notify/alarm-notify-dialog.c deleted file mode 100644 index 931ab0bfac..0000000000 --- a/calendar/gui/alarm-notify/alarm-notify-dialog.c +++ /dev/null @@ -1,218 +0,0 @@ -/* Evolution calendar - alarm notification dialog - * - * Copyright (C) 2000 Helix Code, Inc. - * - * Author: Federico Mena-Quintero - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. - */ - -#include -#include -#include -#include -#include -#include -#include "alarm-notify-dialog.h" - - - -/* The useful contents of the alarm notify dialog */ -typedef struct { - GladeXML *xml; - - GtkWidget *dialog; - GtkWidget *close; - GtkWidget *snooze; - GtkWidget *edit; - GtkWidget *heading; - GtkWidget *summary; - GtkWidget *snooze_time; - - AlarmNotifyFunc func; - gpointer func_data; -} AlarmNotify; - - - -/* Callback used when the notify dialog is destroyed */ -static void -dialog_destroy_cb (GtkObject *object, gpointer data) -{ - AlarmNotify *an; - - an = data; - gtk_object_unref (GTK_OBJECT (an->xml)); - g_free (an); -} - -/* Delete_event handler for the alarm notify dialog */ -static gint -delete_event_cb (GtkWidget *widget, GdkEvent *event, gpointer data) -{ - AlarmNotify *an; - - an = data; - g_assert (an->func != NULL); - - (* an->func) (ALARM_NOTIFY_CLOSE, -1, an->func_data); - - gtk_widget_destroy (widget); - return TRUE; -} - -/* Callback for the close button */ -static void -close_clicked_cb (GtkWidget *widget, gpointer data) -{ - AlarmNotify *an; - - an = data; - g_assert (an->func != NULL); - - (* an->func) (ALARM_NOTIFY_CLOSE, -1, an->func_data); - - gtk_widget_destroy (an->dialog); -} - -/* Callback for the snooze button */ -static void -snooze_clicked_cb (GtkWidget *widget, gpointer data) -{ - AlarmNotify *an; - int snooze_time; - - an = data; - g_assert (an->func != NULL); - - snooze_time = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (an->snooze_time)); - (* an->func) (ALARM_NOTIFY_SNOOZE, snooze_time, an->func_data); - - gtk_widget_destroy (an->dialog); -} - -/* Callback for the edit button */ -static void -edit_clicked_cb (GtkWidget *widget, gpointer data) -{ - AlarmNotify *an; - - an = data; - g_assert (an->func != NULL); - - (* an->func) (ALARM_NOTIFY_EDIT, -1, an->func_data); - - gtk_widget_destroy (an->dialog); -} - -/** - * alarm_notify_dialog: - * @func: Function to be called when a dialog action is invoked. - * @data: Closure data for @func. - * - * Runs the alarm notification dialog. The specified @func will be used to - * notify the client about result of the actions in the dialog. - * - * Return value: TRUE on success, FALSE if the dialog could not be created. - **/ -gboolean -alarm_notify_dialog (time_t trigger, time_t occur, iCalObject *ico, - AlarmNotifyFunc func, gpointer func_data) -{ - AlarmNotify *an; - char buf[256]; - struct tm tm_trigger; - struct tm tm_occur; - - g_return_val_if_fail (trigger != -1, FALSE); - g_return_val_if_fail (occur != -1, FALSE); - g_return_val_if_fail (ico != NULL, FALSE); - g_return_val_if_fail (func != NULL, FALSE); - - an = g_new0 (AlarmNotify, 1); - - an->func = func; - an->func_data = func_data; - - an->xml = glade_xml_new (EVOLUTION_GLADEDIR "/alarm-notify.glade", NULL); - if (!an->xml) { - g_message ("alarm_notify_dialog(): Could not load the Glade XML file!"); - g_free (an); - return FALSE; - } - - an->dialog = glade_xml_get_widget (an->xml, "alarm-notify"); - an->close = glade_xml_get_widget (an->xml, "close"); - an->snooze = glade_xml_get_widget (an->xml, "snooze"); - an->edit = glade_xml_get_widget (an->xml, "edit"); - an->heading = glade_xml_get_widget (an->xml, "heading"); - an->summary = glade_xml_get_widget (an->xml, "summary"); - an->snooze_time = glade_xml_get_widget (an->xml, "snooze-time"); - - if (!(an->dialog && an->close && an->snooze && an->edit && an->heading && an->summary - && an->snooze_time)) { - g_message ("alarm_notify_dialog(): Could not find all widgets in Glade file!"); - gtk_object_unref (GTK_OBJECT (an->xml)); - g_free (an); - return FALSE; - } - - gtk_object_set_data (GTK_OBJECT (an->dialog), "alarm-notify", an); - gtk_signal_connect (GTK_OBJECT (an->dialog), "destroy", - GTK_SIGNAL_FUNC (dialog_destroy_cb), an); - - /* Title */ - - /* FIXME: use am_pm_flag or 24-hour time */ - - tm_trigger = *localtime (&trigger); - strftime (buf, sizeof (buf), _("Alarm on %A %b %d %Y %H:%M"), &tm_trigger); - gtk_window_set_title (GTK_WINDOW (an->dialog), buf); - - /* Heading */ - - tm_occur = *localtime (&occur); - strftime (buf, sizeof (buf), - _("Notification about your appointment on %A %b %d %Y %H:%M"), - &tm_occur); - gtk_label_set_text (GTK_LABEL (an->heading), buf); - - /* Summary */ - - gtk_label_set_text (GTK_LABEL (an->summary), ico->summary); - - /* Connect actions */ - - gtk_signal_connect (GTK_OBJECT (an->dialog), "delete_event", - GTK_SIGNAL_FUNC (delete_event_cb), - an); - - gtk_signal_connect (GTK_OBJECT (an->close), "clicked", - GTK_SIGNAL_FUNC (close_clicked_cb), - an); - - gtk_signal_connect (GTK_OBJECT (an->snooze), "clicked", - GTK_SIGNAL_FUNC (snooze_clicked_cb), - an); - - gtk_signal_connect (GTK_OBJECT (an->edit), "clicked", - GTK_SIGNAL_FUNC (edit_clicked_cb), - an); - - /* Run! */ - - gtk_widget_show (an->dialog); - return TRUE; -} diff --git a/calendar/gui/alarm-notify/alarm-notify-dialog.h b/calendar/gui/alarm-notify/alarm-notify-dialog.h deleted file mode 100644 index 770768f59c..0000000000 --- a/calendar/gui/alarm-notify/alarm-notify-dialog.h +++ /dev/null @@ -1,44 +0,0 @@ -/* Evolution calendar - alarm notification dialog - * - * Copyright (C) 2000 Helix Code, Inc. - * - * Author: Federico Mena-Quintero - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. - */ - -#ifndef ALARM_NOTIFY_DIALOG_H -#define ALARM_NOTIFY_DIALOG_H - -#include -#include -#include - - - -typedef enum { - ALARM_NOTIFY_CLOSE, - ALARM_NOTIFY_SNOOZE, - ALARM_NOTIFY_EDIT -} AlarmNotifyResult; - -typedef void (* AlarmNotifyFunc) (AlarmNotifyResult result, int snooze_mins, gpointer data); - -gboolean alarm_notify_dialog (time_t trigger, time_t occur, iCalObject *ico, - AlarmNotifyFunc func, gpointer func_data); - - - -#endif diff --git a/calendar/gui/alarm-notify/alarm-notify.glade b/calendar/gui/alarm-notify/alarm-notify.glade deleted file mode 100644 index 32d7e03f8b..0000000000 --- a/calendar/gui/alarm-notify/alarm-notify.glade +++ /dev/null @@ -1,230 +0,0 @@ - - - - - Evolution Calendar - evolution-calendar - - src - pixmaps - C - True - True - False - True - True - True - True - interface.c - interface.h - callbacks.c - callbacks.h - support.c - support.h - True - alarm-notify.glade.h - - - - GtkWindow - alarm-notify - True - - GTK_WINDOW_DIALOG - GTK_WIN_POS_CENTER - False - False - False - False - - - GtkVBox - vbox2 - 4 - True - False - 4 - - - GtkHBox - hbox3 - True - False - 8 - - 0 - True - True - - - - GtkVBox - vbox5 - True - False - 4 - - 0 - True - True - - - - GtkLabel - heading - True - - GTK_JUSTIFY_LEFT - True - 0 - 0.5 - 0 - 0 - - 0 - False - False - - - - - GtkLabel - summary - True - - GTK_JUSTIFY_LEFT - True - 0 - 0.5 - 0 - 0 - - 0 - False - False - - - - - - GtkVBox - vbox4 - True - False - 4 - - 0 - True - True - - - - GtkButton - close - True - True - - - 0 - False - False - - - - - GtkButton - snooze - True - True - - - 0 - False - False - - - - - GtkButton - edit - True - True - - - 0 - False - False - - - - - - - GtkHSeparator - hseparator1 - True - - 0 - True - True - - - - - GtkHBox - hbox4 - True - False - 4 - - 0 - True - True - - - - GtkLabel - label4 - True - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 0 - False - False - - - - - GtkSpinButton - snooze-time - True - True - 1 - 0 - False - GTK_UPDATE_ALWAYS - False - False - 5 - 1 - 1440 - 1 - 5 - 5 - - 0 - False - False - - - - - - - diff --git a/calendar/gui/alarm-notify/alarm.c b/calendar/gui/alarm-notify/alarm.c deleted file mode 100644 index 20f64ffd75..0000000000 --- a/calendar/gui/alarm-notify/alarm.c +++ /dev/null @@ -1,305 +0,0 @@ -/* Evolution calendar - alarm notification support - * - * Copyright (C) 2000 Helix Code, Inc. - * - * Authors: Miguel de Icaza - * Federico Mena-Quintero - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. - */ - -#include -#include -#include -#include -#include -#include -#include -#include "alarm.h" - - - -/* The pipes used to notify about an alarm */ -static int alarm_pipes [2]; - -/* The list of pending alarms */ -static GList *alarms; - -/* A queued alarm structure */ -typedef struct { - time_t trigger; - AlarmFunction alarm_fn; - gpointer data; - AlarmDestroyNotify destroy_notify_fn; -} AlarmRecord; - - - -/* SIGALRM handler. Notifies the callback about the alarm. */ -static void -alarm_signal (int arg) -{ - char c = 0; - - write (alarm_pipes [1], &c, 1); -} - -/* Sets up an itimer and returns a success code */ -static gboolean -setup_itimer (time_t diff) -{ - struct itimerval itimer; - int v; - - itimer.it_interval.tv_sec = 0; - itimer.it_interval.tv_usec = 0; - itimer.it_value.tv_sec = diff; - itimer.it_value.tv_usec = 0; - - v = setitimer (ITIMER_REAL, &itimer, NULL); - - return (v == 0) ? TRUE : FALSE; -} - -/* Removes the head alarm, returns it, and schedules the next alarm in the - * queue. - */ -static AlarmRecord * -pop_alarm (void) -{ - AlarmRecord *ar; - GList *l; - - if (!alarms) - return NULL; - - ar = alarms->data; - - l = alarms; - alarms = g_list_remove_link (alarms, l); - g_list_free_1 (l); - - if (alarms) { - time_t now; - AlarmRecord *new_ar; - - now = time (NULL); - new_ar = alarms->data; - - if (!setup_itimer (new_ar->trigger)) { - g_message ("pop_alarm(): Could not reset the timer! " - "Weird things will happen."); - - /* FIXME: should we free the alarm list? What - * about further alarm removal requests that - * will fail? - */ - } - } else { - struct itimerval itimer; - int v; - - itimer.it_interval.tv_sec = 0; - itimer.it_interval.tv_usec = 0; - itimer.it_value.tv_sec = 0; - itimer.it_value.tv_usec = 0; - - v = setitimer (ITIMER_REAL, &itimer, NULL); - if (v != 0) - g_message ("pop_alarm(): Could not clear the timer! " - "Weird things may happen."); - } - - return ar; -} - -/* Input handler for our own alarm notification pipe */ -static void -alarm_ready (gpointer data, gint fd, GdkInputCondition cond) -{ - AlarmRecord *ar; - char c; - - if (read (alarm_pipes [0], &c, 1) != 1) { - g_message ("alarm_ready(): Uh? Could not read from notification pipe."); - return; - } - - g_assert (alarms != NULL); - ar = pop_alarm (); - - g_message ("alarm_ready(): Notifying about alarm on %s", ctime (&ar->trigger)); - - (* ar->alarm_fn) (ar, ar->trigger, ar->data); - - if (ar->destroy_notify_fn) - (* ar->destroy_notify_fn) (ar->data); - - g_free (ar); -} - -static int -compare_alarm_by_time (gconstpointer a, gconstpointer b) -{ - const AlarmRecord *ara = a; - const AlarmRecord *arb = b; - time_t diff; - - diff = ara->trigger - arb->trigger; - return (diff < 0) ? -1 : (diff > 0) ? 1 : 0; -} - -/* Adds an alarm to the queue and sets up the timer */ -static gboolean -queue_alarm (time_t now, AlarmRecord *ar) -{ - time_t diff; - AlarmRecord *old_head; - - if (alarms) - old_head = alarms->data; - else - old_head = NULL; - - alarms = g_list_insert_sorted (alarms, ar, compare_alarm_by_time); - - if (old_head == alarms->data) - return TRUE; - - /* Set the timer for removal upon activation */ - - diff = ar->trigger - now; - if (!setup_itimer (diff)) { - GList *l; - - g_message ("queue_alarm(): Could not set up timer! Not queueing alarm."); - - l = g_list_find (alarms, ar); - g_assert (l != NULL); - - alarms = g_list_remove_link (alarms, l); - g_list_free_1 (l); - return FALSE; - } - - return TRUE; -} - -/** - * alarm_add: - * @trigger: Time at which alarm will trigger. - * @alarm_fn: Callback for trigger. - * @data: Closure data for callback. - * - * Adds an alarm to trigger at the specified time. The @alarm_fn will be called - * with the provided data and the alarm will be removed from the trigger list. - * - * Return value: An identifier for this alarm; it can be used to remove the - * alarm later with alarm_remove(). If the trigger time occurs in the past, then - * the alarm will not be queued and the function will return NULL. - **/ -gpointer -alarm_add (time_t trigger, AlarmFunction alarm_fn, gpointer data, - AlarmDestroyNotify destroy_notify_fn) -{ - time_t now; - AlarmRecord *ar; - - now = time (NULL); - if (trigger < now) - return NULL; - - ar = g_new (AlarmRecord, 1); - ar->trigger = trigger; - ar->alarm_fn = alarm_fn; - ar->data = data; - ar->destroy_notify_fn = destroy_notify_fn; - - g_message ("alarm_add(): Adding alarm for %s", ctime (&trigger)); - - if (!queue_alarm (now, ar)) { - if (ar->destroy_notify_fn) - (* ar->destroy_notify_fn) (ar->data); - - g_free (ar); - ar = NULL; - } - - return ar; -} - -/** - * alarm_remove: - * @alarm: A queued alarm identifier. - * - * Removes an alarm from the alarm queue. - **/ -void -alarm_remove (gpointer alarm) -{ - AlarmRecord *ar; - AlarmRecord *old_head; - GList *l; - - ar = alarm; - - l = g_list_find (alarms, ar); - if (!l) { - g_message ("alarm_remove(): Requested removal of nonexistent alarm!"); - return; - } - - old_head = alarms->data; - - if (old_head == ar) - pop_alarm (); - else { - alarms = g_list_remove_link (alarms, l); - g_list_free_1 (l); - } - - if (ar->destroy_notify_fn) - (* ar->destroy_notify_fn) (ar->data); - - g_free (ar); -} - -/** - * alarm_init: - * @void: - * - * Initializes the alarm notification system. This must be called near the - * beginning of the program. - **/ -void -alarm_init (void) -{ - struct sigaction sa; - int flags; - - pipe (alarm_pipes); - - /* set non blocking mode */ - flags = 0; - fcntl (alarm_pipes [0], F_GETFL, &flags); - fcntl (alarm_pipes [0], F_SETFL, flags | O_NONBLOCK); - gdk_input_add (alarm_pipes [0], GDK_INPUT_READ, alarm_ready, NULL); - - /* Setup the signal handler */ - sa.sa_handler = alarm_signal; - sigemptyset (&sa.sa_mask); - sa.sa_flags = SA_RESTART; - sigaction (SIGALRM, &sa, NULL); -} diff --git a/calendar/gui/alarm-notify/alarm.h b/calendar/gui/alarm-notify/alarm.h deleted file mode 100644 index 2394d28024..0000000000 --- a/calendar/gui/alarm-notify/alarm.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Evolution calendar - alarm notification support - * - * Copyright (C) 2000 Helix Code, Inc. - * - * Authors: Miguel de Icaza - * Federico Mena-Quintero - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. - */ - -#ifndef ALARM_H -#define ALARM_H - -#include - - - -typedef void (* AlarmFunction) (gpointer alarm_id, time_t trigger, gpointer data); -typedef void (* AlarmDestroyNotify) (gpointer data); - -void alarm_init (void); -gpointer alarm_add (time_t trigger, AlarmFunction alarm_fn, gpointer data, - AlarmDestroyNotify destroy_notify_fn); -void alarm_remove (gpointer alarm); - - - -#endif diff --git a/calendar/gui/alarm.c b/calendar/gui/alarm.c deleted file mode 100644 index 20f64ffd75..0000000000 --- a/calendar/gui/alarm.c +++ /dev/null @@ -1,305 +0,0 @@ -/* Evolution calendar - alarm notification support - * - * Copyright (C) 2000 Helix Code, Inc. - * - * Authors: Miguel de Icaza - * Federico Mena-Quintero - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. - */ - -#include -#include -#include -#include -#include -#include -#include -#include "alarm.h" - - - -/* The pipes used to notify about an alarm */ -static int alarm_pipes [2]; - -/* The list of pending alarms */ -static GList *alarms; - -/* A queued alarm structure */ -typedef struct { - time_t trigger; - AlarmFunction alarm_fn; - gpointer data; - AlarmDestroyNotify destroy_notify_fn; -} AlarmRecord; - - - -/* SIGALRM handler. Notifies the callback about the alarm. */ -static void -alarm_signal (int arg) -{ - char c = 0; - - write (alarm_pipes [1], &c, 1); -} - -/* Sets up an itimer and returns a success code */ -static gboolean -setup_itimer (time_t diff) -{ - struct itimerval itimer; - int v; - - itimer.it_interval.tv_sec = 0; - itimer.it_interval.tv_usec = 0; - itimer.it_value.tv_sec = diff; - itimer.it_value.tv_usec = 0; - - v = setitimer (ITIMER_REAL, &itimer, NULL); - - return (v == 0) ? TRUE : FALSE; -} - -/* Removes the head alarm, returns it, and schedules the next alarm in the - * queue. - */ -static AlarmRecord * -pop_alarm (void) -{ - AlarmRecord *ar; - GList *l; - - if (!alarms) - return NULL; - - ar = alarms->data; - - l = alarms; - alarms = g_list_remove_link (alarms, l); - g_list_free_1 (l); - - if (alarms) { - time_t now; - AlarmRecord *new_ar; - - now = time (NULL); - new_ar = alarms->data; - - if (!setup_itimer (new_ar->trigger)) { - g_message ("pop_alarm(): Could not reset the timer! " - "Weird things will happen."); - - /* FIXME: should we free the alarm list? What - * about further alarm removal requests that - * will fail? - */ - } - } else { - struct itimerval itimer; - int v; - - itimer.it_interval.tv_sec = 0; - itimer.it_interval.tv_usec = 0; - itimer.it_value.tv_sec = 0; - itimer.it_value.tv_usec = 0; - - v = setitimer (ITIMER_REAL, &itimer, NULL); - if (v != 0) - g_message ("pop_alarm(): Could not clear the timer! " - "Weird things may happen."); - } - - return ar; -} - -/* Input handler for our own alarm notification pipe */ -static void -alarm_ready (gpointer data, gint fd, GdkInputCondition cond) -{ - AlarmRecord *ar; - char c; - - if (read (alarm_pipes [0], &c, 1) != 1) { - g_message ("alarm_ready(): Uh? Could not read from notification pipe."); - return; - } - - g_assert (alarms != NULL); - ar = pop_alarm (); - - g_message ("alarm_ready(): Notifying about alarm on %s", ctime (&ar->trigger)); - - (* ar->alarm_fn) (ar, ar->trigger, ar->data); - - if (ar->destroy_notify_fn) - (* ar->destroy_notify_fn) (ar->data); - - g_free (ar); -} - -static int -compare_alarm_by_time (gconstpointer a, gconstpointer b) -{ - const AlarmRecord *ara = a; - const AlarmRecord *arb = b; - time_t diff; - - diff = ara->trigger - arb->trigger; - return (diff < 0) ? -1 : (diff > 0) ? 1 : 0; -} - -/* Adds an alarm to the queue and sets up the timer */ -static gboolean -queue_alarm (time_t now, AlarmRecord *ar) -{ - time_t diff; - AlarmRecord *old_head; - - if (alarms) - old_head = alarms->data; - else - old_head = NULL; - - alarms = g_list_insert_sorted (alarms, ar, compare_alarm_by_time); - - if (old_head == alarms->data) - return TRUE; - - /* Set the timer for removal upon activation */ - - diff = ar->trigger - now; - if (!setup_itimer (diff)) { - GList *l; - - g_message ("queue_alarm(): Could not set up timer! Not queueing alarm."); - - l = g_list_find (alarms, ar); - g_assert (l != NULL); - - alarms = g_list_remove_link (alarms, l); - g_list_free_1 (l); - return FALSE; - } - - return TRUE; -} - -/** - * alarm_add: - * @trigger: Time at which alarm will trigger. - * @alarm_fn: Callback for trigger. - * @data: Closure data for callback. - * - * Adds an alarm to trigger at the specified time. The @alarm_fn will be called - * with the provided data and the alarm will be removed from the trigger list. - * - * Return value: An identifier for this alarm; it can be used to remove the - * alarm later with alarm_remove(). If the trigger time occurs in the past, then - * the alarm will not be queued and the function will return NULL. - **/ -gpointer -alarm_add (time_t trigger, AlarmFunction alarm_fn, gpointer data, - AlarmDestroyNotify destroy_notify_fn) -{ - time_t now; - AlarmRecord *ar; - - now = time (NULL); - if (trigger < now) - return NULL; - - ar = g_new (AlarmRecord, 1); - ar->trigger = trigger; - ar->alarm_fn = alarm_fn; - ar->data = data; - ar->destroy_notify_fn = destroy_notify_fn; - - g_message ("alarm_add(): Adding alarm for %s", ctime (&trigger)); - - if (!queue_alarm (now, ar)) { - if (ar->destroy_notify_fn) - (* ar->destroy_notify_fn) (ar->data); - - g_free (ar); - ar = NULL; - } - - return ar; -} - -/** - * alarm_remove: - * @alarm: A queued alarm identifier. - * - * Removes an alarm from the alarm queue. - **/ -void -alarm_remove (gpointer alarm) -{ - AlarmRecord *ar; - AlarmRecord *old_head; - GList *l; - - ar = alarm; - - l = g_list_find (alarms, ar); - if (!l) { - g_message ("alarm_remove(): Requested removal of nonexistent alarm!"); - return; - } - - old_head = alarms->data; - - if (old_head == ar) - pop_alarm (); - else { - alarms = g_list_remove_link (alarms, l); - g_list_free_1 (l); - } - - if (ar->destroy_notify_fn) - (* ar->destroy_notify_fn) (ar->data); - - g_free (ar); -} - -/** - * alarm_init: - * @void: - * - * Initializes the alarm notification system. This must be called near the - * beginning of the program. - **/ -void -alarm_init (void) -{ - struct sigaction sa; - int flags; - - pipe (alarm_pipes); - - /* set non blocking mode */ - flags = 0; - fcntl (alarm_pipes [0], F_GETFL, &flags); - fcntl (alarm_pipes [0], F_SETFL, flags | O_NONBLOCK); - gdk_input_add (alarm_pipes [0], GDK_INPUT_READ, alarm_ready, NULL); - - /* Setup the signal handler */ - sa.sa_handler = alarm_signal; - sigemptyset (&sa.sa_mask); - sa.sa_flags = SA_RESTART; - sigaction (SIGALRM, &sa, NULL); -} diff --git a/calendar/gui/alarm.h b/calendar/gui/alarm.h deleted file mode 100644 index 2394d28024..0000000000 --- a/calendar/gui/alarm.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Evolution calendar - alarm notification support - * - * Copyright (C) 2000 Helix Code, Inc. - * - * Authors: Miguel de Icaza - * Federico Mena-Quintero - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. - */ - -#ifndef ALARM_H -#define ALARM_H - -#include - - - -typedef void (* AlarmFunction) (gpointer alarm_id, time_t trigger, gpointer data); -typedef void (* AlarmDestroyNotify) (gpointer data); - -void alarm_init (void); -gpointer alarm_add (time_t trigger, AlarmFunction alarm_fn, gpointer data, - AlarmDestroyNotify destroy_notify_fn); -void alarm_remove (gpointer alarm); - - - -#endif diff --git a/calendar/gui/bell.xpm b/calendar/gui/bell.xpm deleted file mode 100644 index b1ab537a17..0000000000 --- a/calendar/gui/bell.xpm +++ /dev/null @@ -1,83 +0,0 @@ -/* XPM */ -static char * bell_xpm[] = { -"16 16 64 1", -" c None", -". c #000000", -"+ c #E3BB43", -"@ c #E6C049", -"# c #EED275", -"$ c #F4E193", -"% c #F4DF8C", -"& c #EAC95C", -"* c #EFD57A", -"= c #FAEFBB", -"- c #FDF6D3", -"; c #FDF5C6", -"> c #F4E18F", -", c #E4BD43", -"' c #F6E295", -") c #FEF9D8", -"! c #FFFFFF", -"~ c #FFFADA", -"{ c #FCEEAA", -"] c #EBCA5A", -"^ c #E9C550", -"/ c #FAEA9C", -"( c #FEF7CB", -"_ c #FFF8CC", -": c #FDF1A8", -"< c #EED060", -"[ c #D39D12", -"} c #F2D55D", -"| c #FCEC91", -"1 c #FFF4AE", -"2 c #FFF5B6", -"3 c #FEEF97", -"4 c #F3D65E", -"5 c #D5A216", -"6 c #FAE05C", -"7 c #FFED7C", -"8 c #FFEF8C", -"9 c #FFF092", -"0 c #FDEB7A", -"a c #F4D750", -"b c #D8A717", -"c c #EAC01D", -"d c #F6D83E", -"e c #FAE255", -"f c #FAE362", -"g c #F9E161", -"h c #F6DE5B", -"i c #F1D145", -"j c #E6BE28", -"k c #D09B09", -"l c #B67E00", -"m c #CE9100", -"n c #D69F04", -"o c #E0B011", -"p c #E6BA1D", -"q c #E3B721", -"r c #E0B21E", -"s c #DCAB16", -"t c #D7A20D", -"u c #CC9303", -"v c #BE8400", -"w c #AC7500", -"x c #A06B00", -"y c #FFDD00", -" ", -" .. ", -" .+@. ", -" .#$%&. ", -" .*=-;>,. ", -" .')!~{]. ", -" .^/(~_:<[. ", -" .}|121345. ", -" .678980ab. ", -" .cdefghijkl. ", -" .mnopqrstuvwx. ", -" .............. ", -" .8y. ", -" .. ", -" ", -" "}; diff --git a/calendar/gui/cal_struct.h b/calendar/gui/cal_struct.h deleted file mode 100644 index 411036c7aa..0000000000 --- a/calendar/gui/cal_struct.h +++ /dev/null @@ -1,27 +0,0 @@ -#define MAX_SZ 30 - -enum RepeatType { - Single, - Days, - Months, - WeekDays, - MonthDays -}; - - -struct actionitem { - char date[MAX_SZ]; - int time; /* Minutes past midnight */ -}; - -struct event { - struct actionitem start; - struct actionitem end; - - enum RepeatType repeat; - int repeatcount; - char description[MAX_SZ]; - char subtype[MAX_SZ]; - GList *properties; -}; - diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c deleted file mode 100644 index 5726f45362..0000000000 --- a/calendar/gui/calendar-commands.c +++ /dev/null @@ -1,882 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * Main file for the GNOME Calendar program - * Copyright (C) 1998 the Free Software Foundation - * - * Authors: - * Miguel de Icaza (miguel@kernel.org) - * Federico Mena (federico@helixcode.com) - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "eventedit.h" -#include "gnome-cal.h" -#include "calendar-commands.h" - -#include "dayview.xpm" -#include "workweekview.xpm" -#include "weekview.xpm" -#include "monthview.xpm" -#include "yearview.xpm" - -/* The username, used to set the `owner' field of the event */ -char *user_name; - -/* The full user name from the Gecos field */ -char *full_name; - -/* a gnome-config string prefix that can be used to access the calendar config info */ -char *calendar_settings; - -/* Day begin, day end parameters */ -int day_begin, day_end; - -/* Whether weeks starts on Sunday or Monday */ -int week_starts_on_monday; - -/* If AM/PM indicators should be used. This may not be supported by the new - views. */ -int am_pm_flag = 0; - -/* The array of color properties -- keep in sync with the enumeration defined in main.h. The color - * values specified here are the defaults for the program. - */ -struct color_prop color_props[] = { - { 0x3e72, 0x35ec, 0x8ba2, N_("Outline:"), "/calendar/Colors/outline" }, - { 0xffff, 0xffff, 0xffff, N_("Headings:"), "/calendar/Colors/headings" }, - { 0xf26c, 0xecec, 0xbbe7, N_("Empty days:"), "/calendar/Colors/empty_bg" }, - { 0xfc1e, 0xf87f, 0x5f80, N_("Appointments:"), "/calendar/Colors/mark_bg" }, - { 0xd364, 0xc6b7, 0x7969, N_("Highlighted day:"), "/calendar/Colors/prelight_bg" }, - { 0x01f0, 0x01f0, 0x01f0, N_("Day numbers:"), "/calendar/Colors/day_fg" }, - { 0x0000, 0x0000, 0xffff, N_("Current day's number:"), "/calendar/Colors/current_fg" }, - { 0xbbbb, 0xbbbb, 0x0000, N_("To-Do item that is not yet due:"), "/calendar/Colors/todo_not_yet" }, - { 0xdddd, 0xbbbb, 0x0000, N_("To-Do item that is due today:"), "/calendar/Colors/todo_today" }, - { 0xbbbb, 0xdddd, 0x0000, N_("To-Do item that is overdue:"), "/calendar/Colors/todo_overdue" } -}; - -/* Number of active calendars */ -int active_calendars = 0; - -/* A list of all of the calendars started */ -GList *all_calendars = NULL; - -/* If set, beep on display alarms */ -gboolean beep_on_display = 0; - -/* If true, timeout the beeper on audio alarms */ - -gboolean enable_aalarm_timeout = 0; -guint audio_alarm_timeout = 0; -const guint MAX_AALARM_TIMEOUT = 3600; -const guint MAX_SNOOZE_SECS = 3600; -gboolean enable_snooze = 0; -guint snooze_secs = 60; - -/*extern CalendarAlarm alarm_defaults[4];*/ -CalendarAlarm alarm_defaults[4] = { - { ALARM_MAIL, 0, 15, ALARM_MINUTES }, - { ALARM_PROGRAM, 0, 15, ALARM_MINUTES }, - { ALARM_DISPLAY, 0, 15, ALARM_MINUTES }, - { ALARM_AUDIO, 0, 15, ALARM_MINUTES } -}; - - -static void calendar_iterate_free_cache_entry (gpointer key, - gpointer value, - gpointer user_data); - -static void -init_username (void) -{ - user_name = g_strdup(g_get_user_name()); - full_name = g_strdup(g_get_real_name()); -} - -static int -range_check_hour (int hour) -{ - if (hour < 0) - hour = 0; - else if (hour >= 24) - hour = 23; - - return hour; -} - -static void -init_default_alarms (void) -{ - int i; - gboolean def; - - alarm_defaults [ALARM_DISPLAY].type = ALARM_DISPLAY; - alarm_defaults [ALARM_AUDIO].type = ALARM_AUDIO; - alarm_defaults [ALARM_PROGRAM].type = ALARM_PROGRAM; - alarm_defaults [ALARM_MAIL].type = ALARM_MAIL; - - for (i = 0; i < 4; i++) { - switch (alarm_defaults [i].type) { - case ALARM_DISPLAY: - gnome_config_push_prefix ("/calendar/alarms/def_disp_"); - break; - case ALARM_AUDIO: - gnome_config_push_prefix ("/calendar/alarms/def_audio_"); - break; - case ALARM_PROGRAM: - gnome_config_push_prefix ("/calendar/alarms/def_prog_"); - break; - case ALARM_MAIL: - gnome_config_push_prefix ("/calendar/alarms/def_mail_"); - break; - } - - alarm_defaults[i].enabled = gnome_config_get_int ("enabled=0"); - if (alarm_defaults[i].type != ALARM_MAIL) { - alarm_defaults[i].count = gnome_config_get_int ("count=15"); - alarm_defaults[i].units = gnome_config_get_int ("units=0"); - } else { - alarm_defaults[i].count = gnome_config_get_int ("count=1"); - alarm_defaults[i].count = gnome_config_get_int ("count=2"); - } - - alarm_defaults[i].data = gnome_config_get_string_with_default ("data=", - &def); - if (def) - alarm_defaults[i].data = NULL; - - gnome_config_pop_prefix (); - } -} - - -static void -about_calendar_cmd (BonoboUIHandler *uih, void *user_data, const char *path) -{ - GtkWidget *about; - const gchar *authors[] = { - "Miguel de Icaza (miguel@kernel.org)", - "Federico Mena (federico@gimp.org)", - "Arturo Espinosa (arturo@nuclecu.unam.mx)", - "Russell Steinthal (rms39@columbia.edu)", - NULL - }; - - about = gnome_about_new (_("Gnome Calendar"), VERSION, - "(C) 1998 the Free Software Foundation", - authors, - _("The GNOME personal calendar and schedule manager."), - NULL); - gtk_window_set_modal (GTK_WINDOW (about), TRUE); - gnome_dialog_set_close (GNOME_DIALOG (about), TRUE); - gtk_widget_show (about); -} - -static void -display_objedit (BonoboUIHandler *uih, void *user_data, const char *path) -{ - GtkWidget *ee; - iCalObject *ico; - GnomeCalendar *gcal = GNOME_CALENDAR (user_data); - - ico = ical_new ("", user_name, ""); - ico->new = 1; - - gnome_calendar_get_current_time_range (gcal, &ico->dtstart, - &ico->dtend); - - ee = event_editor_new (gcal, ico); - gtk_widget_show (ee); -} - -static void -display_objedit_today (BonoboUIHandler *uih, void *user_data, const char *path) -{ - GtkWidget *ee; - GnomeCalendar *gcal = GNOME_CALENDAR (user_data); - - ee = event_editor_new (gcal, NULL); - gtk_widget_show (ee); -} - -void -time_format_changed (void) -{ - GList *l; - - for (l = all_calendars; l; l = l->next) - gnome_calendar_time_format_changed (GNOME_CALENDAR (l->data)); -} - -void -colors_changed (void) -{ - GList *l; - - for (l = all_calendars; l; l = l->next) - gnome_calendar_colors_changed (GNOME_CALENDAR (l->data)); -} - -void -todo_properties_changed(void) -{ - GList *l; - - for (l = all_calendars; l; l = l->next) - gnome_calendar_todo_properties_changed (GNOME_CALENDAR (l->data)); -} - -/* Sets a clock cursor for the specified calendar window */ -static void -set_clock_cursor (GnomeCalendar *gcal) -{ - GdkCursor *cursor; - - cursor = gdk_cursor_new (GDK_WATCH); - gdk_window_set_cursor (GTK_WIDGET (gcal)->window, cursor); - gdk_cursor_destroy (cursor); - gdk_flush (); -} - -/* Resets the normal cursor for the specified calendar window */ -static void -set_normal_cursor (GnomeCalendar *gcal) -{ - gdk_window_set_cursor (GTK_WIDGET (gcal)->window, NULL); - gdk_flush (); -} - -static void -previous_clicked (BonoboUIHandler *uih, void *user_data, const char *path) -{ - GnomeCalendar *gcal = GNOME_CALENDAR (user_data); - set_clock_cursor (gcal); - gnome_calendar_previous (gcal); - set_normal_cursor (gcal); -} - -static void -next_clicked (BonoboUIHandler *uih, void *user_data, const char *path) -{ - GnomeCalendar *gcal = GNOME_CALENDAR (user_data); - set_clock_cursor (gcal); - gnome_calendar_next (gcal); - set_normal_cursor (gcal); -} - -static void -today_clicked (BonoboUIHandler *uih, void *user_data, const char *path) -{ - GnomeCalendar *gcal = GNOME_CALENDAR (user_data); - set_clock_cursor (gcal); - gnome_calendar_goto_today (gcal); - set_normal_cursor (gcal); -} - -static void -goto_clicked (BonoboUIHandler *uih, void *user_data, const char *path) -{ - GnomeCalendar *gcal = GNOME_CALENDAR (user_data); - goto_dialog (gcal); -} - -static void -show_day_view_clicked (BonoboUIHandler *uih, void *user_data, const char *path) -{ - GnomeCalendar *gcal = GNOME_CALENDAR (user_data); - gnome_calendar_set_view (gcal, "dayview"); - gtk_widget_grab_focus (gcal->day_view); -} - -static void -show_work_week_view_clicked (BonoboUIHandler *uih, void *user_data, const char *path) -{ - GnomeCalendar *gcal = GNOME_CALENDAR (user_data); - gnome_calendar_set_view (gcal, "workweekview"); - gtk_widget_grab_focus (gcal->work_week_view); -} - -static void -show_week_view_clicked (BonoboUIHandler *uih, void *user_data, const char *path) -{ - GnomeCalendar *gcal = GNOME_CALENDAR (user_data); - gnome_calendar_set_view (gcal, "weekview"); - gtk_widget_grab_focus (gcal->week_view); -} - -static void -show_month_view_clicked (BonoboUIHandler *uih, void *user_data, const char *path) -{ - GnomeCalendar *gcal = GNOME_CALENDAR (user_data); - gnome_calendar_set_view (gcal, "monthview"); - gtk_widget_grab_focus (gcal->month_view); -} - -static void -show_year_view_clicked (BonoboUIHandler *uih, void *user_data, const char *path) -{ -#if 0 - GnomeCalendar *gcal = GNOME_CALENDAR (user_data); - gnome_calendar_set_view (gcal, "yearview"); - gtk_widget_grab_focus (gcal->year_view); -#endif -} - -static void -new_calendar_cmd (BonoboUIHandler *uih, void *user_data, const char *path) -{ - new_calendar (full_name, NULL, NULL, FALSE); -} - -static void -close_cmd (BonoboUIHandler *uih, void *user_data, const char *path) -{ - GnomeCalendar *gcal = GNOME_CALENDAR (user_data); - all_calendars = g_list_remove (all_calendars, gcal); - - gtk_widget_destroy (GTK_WIDGET (gcal)); - active_calendars--; - - if (active_calendars == 0) - gtk_main_quit (); -} - - -void -quit_cmd (BonoboUIHandler *uih, void *user_data, const char *path) -{ - while (all_calendars){ - GnomeCalendar *cal = GNOME_CALENDAR (all_calendars->data); - - close_cmd (uih, cal, path); - } -} - - -static void -open_ok (GtkWidget *widget, GtkFileSelection *fs) -{ - GtkWidget *error_dialog; - int ret; - if(!g_file_exists (gtk_file_selection_get_filename (fs))) { - error_dialog = gnome_message_box_new ( - _("File not found"), - GNOME_MESSAGE_BOX_ERROR, - GNOME_STOCK_BUTTON_OK, - NULL); - - gnome_dialog_set_parent (GNOME_DIALOG (error_dialog), GTK_WINDOW (fs)); - ret = gnome_dialog_run (GNOME_DIALOG (error_dialog)); - } else { - /* FIXME: find out who owns this calendar and use that name */ -#warning "FIXME: find out who owns this calendar and use that name" - /* - new_calendar ("Somebody", gtk_file_selection_get_filename (fs), NULL, NULL, FALSE); - */ - gtk_widget_destroy (GTK_WIDGET (fs)); - } -} - -static void -open_calendar_cmd (BonoboUIHandler *uih, void *user_data, const char *path) -{ - GtkFileSelection *fs; - - fs = GTK_FILE_SELECTION (gtk_file_selection_new (_("Open calendar"))); - - gtk_signal_connect (GTK_OBJECT (fs->ok_button), "clicked", - (GtkSignalFunc) open_ok, - fs); - gtk_signal_connect_object (GTK_OBJECT (fs->cancel_button), "clicked", - (GtkSignalFunc) gtk_widget_destroy, - GTK_OBJECT (fs)); - - gtk_widget_show (GTK_WIDGET (fs)); - gtk_grab_add (GTK_WIDGET (fs)); /* Yes, it is modal, so sue me */ -} - -static void -save_ok (GtkWidget *widget, GtkFileSelection *fs) -{ - GnomeCalendar *gcal; - gchar *fname; - - gcal = GNOME_CALENDAR (gtk_object_get_user_data (GTK_OBJECT (fs))); - gtk_window_set_wmclass (GTK_WINDOW (gcal), "gnomecal", "gnomecal"); - - fname = g_strdup (gtk_file_selection_get_filename (fs)); - g_free(fname); - gtk_main_quit (); -} - -static gint -close_save (GtkWidget *w) -{ - gtk_main_quit (); - return TRUE; -} - -static void -save_as_calendar_cmd (BonoboUIHandler *uih, void *user_data, const char *path) -{ - GtkFileSelection *fs; - - fs = GTK_FILE_SELECTION (gtk_file_selection_new (_("Save calendar"))); - gtk_object_set_user_data (GTK_OBJECT (fs), user_data); - - gtk_signal_connect (GTK_OBJECT (fs->ok_button), "clicked", - (GtkSignalFunc) save_ok, - fs); - gtk_signal_connect_object (GTK_OBJECT (fs->cancel_button), "clicked", - (GtkSignalFunc) close_save, - GTK_OBJECT (fs)); - gtk_signal_connect_object (GTK_OBJECT (fs), "delete_event", - GTK_SIGNAL_FUNC (close_save), - GTK_OBJECT (fs)); - gtk_widget_show (GTK_WIDGET (fs)); - gtk_grab_add (GTK_WIDGET (fs)); /* Yes, it is modal, so sue me even more */ - gtk_main (); - gtk_widget_destroy (GTK_WIDGET (fs)); -} - -static void -properties_cmd (BonoboUIHandler *uih, void *user_data, const char *path) -{ - GnomeCalendar *gcal = GNOME_CALENDAR (user_data); - properties (GTK_WIDGET (gcal)); -} - - -static GnomeUIInfo gnome_toolbar_view_buttons [] = { - GNOMEUIINFO_RADIOITEM (N_("Day"), N_("Show 1 day"), - show_day_view_clicked, - dayview_xpm), - GNOMEUIINFO_RADIOITEM (N_("5 Days"), N_("Show the working week"), - show_work_week_view_clicked, - workweekview_xpm), - GNOMEUIINFO_RADIOITEM (N_("Week"), N_("Show 1 week"), - show_week_view_clicked, - weekview_xpm), - GNOMEUIINFO_RADIOITEM (N_("Month"), N_("Show 1 month"), - show_month_view_clicked, - monthview_xpm), -#if 0 - GNOMEUIINFO_RADIOITEM (N_("Year"), N_("Show 1 year"), - show_year_view_clicked, - yearview_xpm), -#endif - GNOMEUIINFO_END -}; - - -static GnomeUIInfo gnome_toolbar [] = { - GNOMEUIINFO_ITEM_STOCK (N_("New"), N_("Create a new appointment"), display_objedit, GNOME_STOCK_PIXMAP_NEW), - - GNOMEUIINFO_SEPARATOR, - - GNOMEUIINFO_ITEM_STOCK (N_("Prev"), N_("Go back in time"), previous_clicked, GNOME_STOCK_PIXMAP_BACK), - GNOMEUIINFO_ITEM_STOCK (N_("Today"), N_("Go to present time"), today_clicked, GNOME_STOCK_PIXMAP_HOME), - GNOMEUIINFO_ITEM_STOCK (N_("Next"), N_("Go forward in time"), next_clicked, GNOME_STOCK_PIXMAP_FORWARD), - - GNOMEUIINFO_SEPARATOR, - - GNOMEUIINFO_ITEM_STOCK (N_("Go to"), N_("Go to a specific date"), goto_clicked, GNOME_STOCK_PIXMAP_JUMP_TO), - - GNOMEUIINFO_SEPARATOR, - - GNOMEUIINFO_RADIOLIST (gnome_toolbar_view_buttons), - - GNOMEUIINFO_END -}; - - - -/* Performs signal connection as appropriate for interpreters or native bindings */ -static void -do_ui_signal_connect (GnomeUIInfo *uiinfo, gchar *signal_name, - GnomeUIBuilderData *uibdata) -{ - if (uibdata->is_interp) - gtk_signal_connect_full (GTK_OBJECT (uiinfo->widget), - signal_name, NULL, uibdata->relay_func, - uibdata->data ? - uibdata->data : uiinfo->user_data, - uibdata->destroy_func, FALSE, FALSE); - - else if (uiinfo->moreinfo) - gtk_signal_connect (GTK_OBJECT (uiinfo->widget), - signal_name, uiinfo->moreinfo, uibdata->data ? - uibdata->data : uiinfo->user_data); -} - - -void -calendar_control_activate (BonoboControl *control, - GnomeCalendar *cal) -{ - Bonobo_UIHandler remote_uih; - GtkWidget *toolbar; - GnomeUIBuilderData uibdata; - BonoboUIHandler *uih = bonobo_control_get_ui_handler (control); - gchar *page_name; - gint button; - g_assert (uih); - - uibdata.connect_func = do_ui_signal_connect; - uibdata.data = cal; - uibdata.is_interp = FALSE; - uibdata.relay_func = NULL; - uibdata.destroy_func = NULL; - - g_print ("In calendar_control_activate\n"); - - remote_uih = bonobo_control_get_remote_ui_handler (control); - bonobo_ui_handler_set_container (uih, remote_uih); - - toolbar = gtk_toolbar_new (GTK_ORIENTATION_HORIZONTAL, - GTK_TOOLBAR_BOTH); - gnome_app_fill_toolbar_custom (GTK_TOOLBAR (toolbar), - gnome_toolbar, &uibdata, - /*app->accel_group*/ NULL); - - /*gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));*/ - - /* Note that these indices should correspond with the button indices - in gnome_toolbar_view_buttons. */ - page_name = gnome_calendar_get_current_view_name (cal); - if (!strcmp (page_name, "dayview")) { - button = 0; - } else if (!strcmp (page_name, "workweekview")) { - button = 1; - } else if (!strcmp (page_name, "weekview")) { - button = 2; - } else if (!strcmp (page_name, "monthview")) { - button = 3; - } else if (!strcmp (page_name, "yearview")) { - button = 4; - } else { - g_warning ("Unknown calendar view: %s", page_name); - button = 0; - } - - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gnome_toolbar_view_buttons[button].widget), TRUE); - - gtk_widget_show_all (toolbar); - - bonobo_ui_handler_dock_add (uih, "/Toolbar", - bonobo_object_corba_objref (BONOBO_OBJECT (bonobo_control_new (toolbar))), - GNOME_DOCK_ITEM_BEH_EXCLUSIVE, - GNOME_DOCK_TOP, - 1, 1, 0); - - - /* file menu */ - bonobo_ui_handler_menu_new_item (uih, "/File/New/Calendar", N_("New Ca_lendar"), - N_("Create a new calendar"), - -1, BONOBO_UI_HANDLER_PIXMAP_NONE, - NULL, 0, 0, new_calendar_cmd, cal); - bonobo_ui_handler_menu_new_item (uih, "/File/Open/Calendar", N_("Open Ca_lendar"), - N_("Open a calendar"), -1, - BONOBO_UI_HANDLER_PIXMAP_NONE, NULL, - 0, 0, open_calendar_cmd, cal); - bonobo_ui_handler_menu_new_item (uih, "/File/Save Calendar As", - N_("Save Calendar As"), - N_("Save Calendar As"), - -1, - BONOBO_UI_HANDLER_PIXMAP_NONE, NULL, - 0, 0, save_as_calendar_cmd, cal); - bonobo_ui_handler_menu_new_item (uih, "/File/Close", N_("_Close Calendar"), - N_("Close current calendar"), - -1, BONOBO_UI_HANDLER_PIXMAP_NONE, NULL, - 0, 0, close_cmd, cal); - /*bonobo_ui_handler_menu_new_item (uih, "/File/Exit", - N_("_Exit"), N_("Exit"), - -1, BONOBO_UI_HANDLER_PIXMAP_NONE, NULL, - 0, 0, quit_cmd, cal); */ - - /* edit menu */ - bonobo_ui_handler_menu_new_item (uih, "/Edit/New Appointment", - N_("_New appointment..."), N_("Create a new appointment"), - -1, BONOBO_UI_HANDLER_PIXMAP_STOCK, - GNOME_STOCK_MENU_NEW, 0, 0, - display_objedit, cal); - bonobo_ui_handler_menu_new_item (uih, "/Edit/New Appointment for today", - N_("New appointment for _today..."), - N_("Create a new appointment for today"), - -1, BONOBO_UI_HANDLER_PIXMAP_STOCK, - GNOME_STOCK_MENU_NEW, 0, 0, - display_objedit_today, cal); - - //bonobo_ui_handler_menu_new_separator (uih, "/Edit", -1); - - bonobo_ui_handler_menu_new_item (uih, "/Edit/Preferences", - N_("Preferences"), N_("Preferences"), - -1, BONOBO_UI_HANDLER_PIXMAP_NONE, NULL, - 0, 0, properties_cmd, cal); - /* help menu */ - - bonobo_ui_handler_menu_new_item (uih, - "/Help/About Calendar", - N_("About Calendar"), - N_("About Calendar"), - -1, - BONOBO_UI_HANDLER_PIXMAP_NONE, NULL, - 0, 0, about_calendar_cmd, cal); - -} - - -void -calendar_control_deactivate (BonoboControl *control) -{ - BonoboUIHandler *uih = bonobo_control_get_ui_handler (control); - g_assert (uih); - - g_print ("In calendar_control_deactivate\n"); - - bonobo_ui_handler_dock_remove (uih, "/Toolbar"); - bonobo_ui_handler_unset_container (uih); -} - - - - -static gint -calendar_close_event (GtkWidget *widget, GdkEvent *event, GnomeCalendar *gcal) -{ - close_cmd (NULL, gcal, NULL); - return TRUE; -} - - -GnomeCalendar * -new_calendar (char *full_name, char *geometry, char *page, gboolean hidden) -{ - GtkWidget *toplevel; - char title[128]; - int xpos, ypos, width, height; - - - /* i18n: This "%s%s" indicates possession. Languages where the order is - * the inverse should translate it to "%2$s%1$s". - */ - g_snprintf(title, 128, _("%s%s"), full_name, _("'s calendar")); - - toplevel = gnome_calendar_new (title); - - if (gnome_parse_geometry (geometry, &xpos, &ypos, &width, &height)){ - if (xpos != -1) - gtk_widget_set_uposition (toplevel, xpos, ypos); - } - - if (page) - gnome_calendar_set_view (GNOME_CALENDAR (toplevel), page); - - gtk_signal_connect (GTK_OBJECT (toplevel), "delete_event", - GTK_SIGNAL_FUNC(calendar_close_event), toplevel); - - active_calendars++; - all_calendars = g_list_prepend (all_calendars, toplevel); - - if (hidden){ - GnomeWinState state; - - /* Realize the toplevel window to prevent a segfault */ - gtk_widget_realize (toplevel); - state = gnome_win_hints_get_state (toplevel); - - state |= WIN_STATE_MINIMIZED; - gnome_win_hints_set_state (toplevel, state); - } - - gtk_widget_show (toplevel); - - return GNOME_CALENDAR (toplevel); -} - - -void calendar_set_uri (GnomeCalendar *gcal, char *calendar_file) -{ - gboolean success; - - g_return_if_fail (gcal); - g_return_if_fail (calendar_file); - - printf ("calendar_set_uri: calendar_file is '%s'\n", calendar_file); - - success = gnome_calendar_open (gcal, - calendar_file, - CALENDAR_OPEN_OR_CREATE); - - printf (" load or create returned %d\n", success); -} - - - - - -/* - * Initializes the calendar internal variables, loads defaults - */ -void -init_calendar (void) -{ - int i; - char *cspec, *color; - char *str; - - init_username (); - /*user_calendar_file = g_concat_dir_and_file (gnome_util_user_home (), ".gnome/user-cal.vcf");*/ - - gnome_config_push_prefix (calendar_settings); - - /* Read calendar settings */ - - day_begin = range_check_hour (gnome_config_get_int ("/calendar/Calendar/Day start=8")); - day_end = range_check_hour (gnome_config_get_int ("/calendar/Calendar/Day end=17")); - am_pm_flag = gnome_config_get_bool ("/calendar/Calendar/AM PM flag=0"); - week_starts_on_monday = gnome_config_get_bool ("/calendar/Calendar/Week starts on Monday=0"); - - if (day_end < day_begin){ - day_begin = 8; - day_end = 17; - } - - /* Read color settings */ - - for (i = 0; i < COLOR_PROP_LAST; i++) { - cspec = build_color_spec (color_props[i].r, color_props[i].g, color_props[i].b); - str = g_strconcat (color_props[i].key, "=", cspec, NULL); - - color = gnome_config_get_string (str); - parse_color_spec (color, &color_props[i].r, &color_props[i].g, &color_props[i].b); - - g_free (str); - g_free (color); - } - - /* read todolist settings */ - - todo_show_time_remaining = gnome_config_get_bool("/calendar/Todo/show_time_remain"); - todo_show_due_date = gnome_config_get_bool("/calendar/Todo/show_due_date"); - - todo_item_dstatus_highlight_overdue = gnome_config_get_bool("/calendar/Todo/highlight_overdue"); - - todo_item_dstatus_highlight_due_today = gnome_config_get_bool("/calendar/Todo/highlight_due_today"); - - todo_item_dstatus_highlight_not_due_yet = gnome_config_get_bool("/calendar/Todo/highlight_not_due_yet"); - - todo_current_sort_column = gnome_config_get_int("/calendar/Todo/sort_column"); - - todo_current_sort_type = gnome_config_get_int("/calendar/Todo/sort_type"); - - todo_show_priority = gnome_config_get_bool("/calendar/Todo/show_priority"); - - /* read alarm settings */ - beep_on_display = gnome_config_get_bool ("/calendar/alarms/beep_on_display=FALSE"); - enable_aalarm_timeout = gnome_config_get_bool ("/calendar/alarms/enable_audio_timeout=FALSE"); - audio_alarm_timeout = gnome_config_get_int ("/calendar/alarms/audio_alarm_timeout=60"); - if (audio_alarm_timeout < 1) - audio_alarm_timeout = 1; - if (audio_alarm_timeout > MAX_AALARM_TIMEOUT) - audio_alarm_timeout = MAX_AALARM_TIMEOUT; - enable_snooze = gnome_config_get_bool ("/calendar/alarms/enable_snooze=FALSE"); - snooze_secs = gnome_config_get_int ("/calendar/alarms/snooze_secs=300"); - if (snooze_secs < 1) - snooze_secs = 1; - if (snooze_secs > MAX_SNOOZE_SECS) - snooze_secs = MAX_SNOOZE_SECS; - - init_default_alarms (); - - - /* Done */ - - gnome_config_pop_prefix (); -} - - - -/* FIXME -- where should this go? */ -void -calendar_iterate (GnomeCalendar *cal, - time_t start, time_t end, - calendarfn cb, void *closure) -{ - GList *l, *cois; - GHashTable *cache; - CalObjFindStatus status; - CalObjInstance *coi; - char *uid, *obj_string; - iCalObject *ico; - - cois = cal_client_get_events_in_range (cal->client, start, end); - - /* We use a hash table to keep a cache of uid->iCalObject, so for - recurring events we only load and parse the objects once. */ - cache = g_hash_table_new (g_str_hash, g_str_equal); - - for (l = cois; l; l = l->next) { - coi = l->data; - uid = coi->uid; - - ico = g_hash_table_lookup (cache, uid); - if (!ico) { - obj_string = cal_client_get_object (cal->client, uid); - - status = ical_object_find_in_string (uid, obj_string, - &ico); - g_free (obj_string); - - switch (status) { - case CAL_OBJ_FIND_SUCCESS: - g_hash_table_insert (cache, ico->uid, ico); - - break; - case CAL_OBJ_FIND_SYNTAX_ERROR: - printf ("calendar_iterate: syntax error uid=%s\n", - uid); - ico = NULL; - break; - case CAL_OBJ_FIND_NOT_FOUND: - printf ("calendar_iterate: obj not found uid=%s\n", - uid); - ico = NULL; - break; - } - } - - if (ico) - (*cb) (ico, coi->start, coi->end, closure); - - g_free (uid); - g_free (coi); - } - - g_list_free (cois); - - /* We need to unref all the iCalObjects in the cache now. The callback - function should have ref'd any of them it wants to keep. */ - g_hash_table_foreach (cache, calendar_iterate_free_cache_entry, NULL); - - g_hash_table_destroy (cache); -} - - -static void -calendar_iterate_free_cache_entry (gpointer key, - gpointer value, - gpointer user_data) -{ - ical_object_unref ((iCalObject*) value); -} diff --git a/calendar/gui/calendar-commands.h b/calendar/gui/calendar-commands.h deleted file mode 100644 index a3e5f5393c..0000000000 --- a/calendar/gui/calendar-commands.h +++ /dev/null @@ -1,129 +0,0 @@ -#ifndef CALENDAR_COMMANDS_H -#define CALENDAR_COMMANDS_H - -#include -#include -#include "gnome-cal.h" - -/* This enum and the following array define the color preferences */ - -typedef enum { - COLOR_PROP_OUTLINE_COLOR, /* Color of calendar outline */ - COLOR_PROP_HEADING_COLOR, /* Color for headings */ - COLOR_PROP_EMPTY_DAY_BG, /* Background color for empty days */ - COLOR_PROP_MARK_DAY_BG, /* Background color for days with appointments */ - COLOR_PROP_PRELIGHT_DAY_BG, /* Background color for prelighted day */ - COLOR_PROP_DAY_FG, /* Color for day numbers */ - COLOR_PROP_CURRENT_DAY_FG, /* Color for current day's number */ - COLOR_PROP_TODO_NOT_DUE_YET, /* Color for Todo items not yet due */ - COLOR_PROP_TODO_DUE_TODAY, /* Color for Todo items due today */ - COLOR_PROP_TODO_OVERDUE, /* Color for Todo items that are overdue */ - COLOR_PROP_LAST /* Number of color properties */ -} ColorProp; - -struct color_prop { - int r; /* Values are in [0, 65535] */ - int g; - int b; - char *label; /* Label for properties dialog */ - char *key; /* Key for gnome_config */ -}; - -extern struct color_prop color_props[]; - - -#define COOKIE_USER_HOME_DIR ((char *) -1) - - -/* Calendar preferences */ - -extern int day_begin, day_end; -extern char *user_name; -extern int am_pm_flag; -extern int week_starts_on_monday; - -/* todo preferences */ -extern int todo_show_due_date; - -extern int todo_item_dstatus_highlight_overdue; -extern int todo_item_dstatus_highlight_due_today; -extern int todo_item_dstatus_highlight_not_due_yet; - -extern int todo_show_time_remaining; -extern int todo_show_priority; -extern char *todo_overdue_font_text; -extern gboolean todo_style_changed; -extern gint todo_current_sort_column; -extern gint todo_current_sort_type; - -/* alarm stuff */ -extern CalendarAlarm alarm_defaults[4]; -extern gboolean beep_on_display; -extern gboolean enable_aalarm_timeout; -extern guint audio_alarm_timeout; -extern const guint MAX_AALARM_TIMEOUT; -extern gboolean enable_snooze; -extern guint snooze_secs; -extern const guint MAX_SNOOZE_SECS; - -/* Creates and runs the preferences dialog box */ -void properties (GtkWidget *toplevel); - -/* Asks for all the time-related displays to be updated when the user changes the time format - * preferences. - */ -void time_format_changed (void); - -/* Asks for all the month items' colors to be reset */ -void colors_changed (void); - -/* Asks for all todo lists to reflect the accurate properties */ -void todo_properties_changed(void); - -/* Creates and runs the Go-to date dialog */ -void goto_dialog (GnomeCalendar *gcal); - -/* Returns a pointer to a statically-allocated string with a representation of the specified color. - * Values must be in [0, 65535]. - */ -char *build_color_spec (int r, int g, int b); - -/* Parses a color specification of the form "#%04x%04x%04x" and returns the color components. */ -void parse_color_spec (char *spec, int *r, int *g, int *b); - -/* Calls build_color_spec() for the color in the specified property number */ -char *color_spec_from_prop (ColorProp propnum); - -GnomeCalendar *new_calendar (char *full_name, - char *geometry, - char *page, - gboolean hidden); - -void calendar_set_uri (GnomeCalendar *gcal, char *calendar_file); - - -/*----------------------------------------------------------------------*/ -/* FIXME -- where should this stuff go? */ -/*----------------------------------------------------------------------*/ - -void -calendar_iterate (GnomeCalendar *cal, - time_t start, time_t end, - calendarfn cb, void *closure); - -void init_calendar (void); - -void calendar_control_activate (BonoboControl *control, - GnomeCalendar *cal); -void calendar_control_deactivate (BonoboControl *control); - -void quit_cmd (BonoboUIHandler *uih, void *user_data, const char *path); - -/*extern char *user_calendar_file;*/ -extern char *user_name; -extern char *full_name; -extern int debug_alarms; -extern int active_calendars; -extern GList *all_calendars; - -#endif /* CALENDAR_COMMANDS_H */ diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c deleted file mode 100644 index 1509f70457..0000000000 --- a/calendar/gui/calendar-component.c +++ /dev/null @@ -1,98 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* component-factory.c - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include "evolution-shell-component.h" -#include "component-factory.h" -#include "control-factory.h" - - -#ifdef USING_OAF -#define COMPONENT_FACTORY_ID "OAFIID:evolution-shell-component-factory:evolution-calendar:cba77062-1466-4aac-8ce7-b019eaf2e921" -#else -#define COMPONENT_FACTORY_ID "evolution-shell-component-factory:evolution-calendar" -#endif - -static BonoboGenericFactory *factory = NULL; - -static const EvolutionShellComponentFolderType folder_types[] = { - { "calendar", "evolution-calendar.png" }, - { NULL, NULL } -}; - - -/* EvolutionShellComponent methods and signals. */ - -static BonoboControl * -create_view (EvolutionShellComponent *shell_component, - const char *physical_uri, - void *closure) -{ - BonoboControl *control; - - control = control_factory_new_control (); - bonobo_control_set_property (control, "folder_uri", physical_uri, NULL); - - return control; -} - -static void -owner_set_cb (EvolutionShellComponent *shell_component, - Evolution_Shell shell_interface) -{ - g_print ("evolution-calendar: Yeeeh! We have an owner!\n"); /* FIXME */ -} - - -/* The factory function. */ - -static BonoboObject * -factory_fn (BonoboGenericFactory *factory, - void *closure) -{ - EvolutionShellComponent *shell_component; - - shell_component = evolution_shell_component_new (folder_types, create_view, NULL); - - gtk_signal_connect (GTK_OBJECT (shell_component), "owner_set", - GTK_SIGNAL_FUNC (owner_set_cb), NULL); - - return BONOBO_OBJECT (shell_component); -} - - -void -component_factory_init (void) -{ - if (factory != NULL) - return; - - factory = bonobo_generic_factory_new (COMPONENT_FACTORY_ID, factory_fn, NULL); - - if (factory == NULL) - g_error ("Cannot initialize Evolution's calendar component."); -} diff --git a/calendar/gui/calendar-component.h b/calendar/gui/calendar-component.h deleted file mode 100644 index f83a849452..0000000000 --- a/calendar/gui/calendar-component.h +++ /dev/null @@ -1,29 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* component-factory.h - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -#ifndef _COMPONENT_FACTORY_H_ -#define _COMPONENT_FACTORY_H_ - -void component_factory_init (void); - -#endif /* _COMPONENT_FACTORY_H_ */ diff --git a/calendar/gui/calendar-conduit-control-applet.c b/calendar/gui/calendar-conduit-control-applet.c deleted file mode 100644 index 2d6fb60ef5..0000000000 --- a/calendar/gui/calendar-conduit-control-applet.c +++ /dev/null @@ -1,360 +0,0 @@ -/* Control applet ("capplet") for the gnome-pilot calendar conduit, */ -/* based on */ -/* gpilotd control applet ('capplet') for use with the GNOME control center */ -/* $Id$ */ - -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#include - -#include "calendar-conduit.h" - -/* tell changes callbacks to ignore changes or not */ -static gboolean ignore_changes=FALSE; - -/* capplet widget */ -static GtkWidget *capplet=NULL; - -/* host/device/pilot configuration windows */ -GtkWidget *cfgOptionsWindow=NULL; -GtkWidget *cfgStateWindow=NULL; -GtkWidget *dialogWindow=NULL; - -GnomePilotConduitMgmt *conduit; - -static void doTrySettings(GtkWidget *widget, gpointer); -static void doRevertSettings(GtkWidget *widget, gpointer); -static void doSaveSettings(GtkWidget *widget, gpointer); - -static void readStateCfg(GtkWidget *w,GCalConduitCfg *cfg); -static void setStateCfg(GtkWidget *w,GCalConduitCfg *cfg); -void about_cb (GtkWidget *, gpointer); -GCalConduitCfg *origState = NULL; -GCalConduitCfg *curState = NULL; - -gint pilotId; -CORBA_Environment ev; - -/* This array must be in the same order as enumerations - in GnomePilotConduitSyncType as they are used as index. - Custom type implies Disabled state. -*/ -static gchar* sync_options[] ={ N_("Disabled"), - N_("Synchronize"), - N_("Copy From Pilot"), - N_("Copy To Pilot"), - N_("Merge From Pilot"), - N_("Merge To Pilot")}; -#define SYNC_OPTIONS_COUNT 6 - -static void -setSettings(GCalConduitCfg* conduitCfg) -{ - if(conduitCfg->sync_type!=GnomePilotConduitSyncTypeCustom) - gpilotd_conduit_mgmt_enable_with_first_sync(conduit,pilotId, - conduitCfg->sync_type, - conduitCfg->sync_type, - TRUE); - else - gpilotd_conduit_mgmt_disable(conduit,pilotId); - - gcalconduit_save_configuration(conduitCfg); -} - -static void -doTrySettings(GtkWidget *widget, gpointer whatever) -{ - readStateCfg(cfgStateWindow,curState); - setSettings(curState); -} - -static void -doSaveSettings(GtkWidget *widget, gpointer whatever) -{ - doTrySettings(widget,whatever); -} - -static void -doCancelSettings(GtkWidget *widget, gpointer whatever) -{ - setSettings(origState); -} - -static void -doRevertSettings(GtkWidget *widget, gpointer whatever) -{ - gcalconduit_destroy_configuration(&curState); - curState = gcalconduit_dupe_configuration(origState); - setStateCfg(cfgStateWindow,curState); - setSettings(curState); -} - -static void -insert_dir_callback (GtkEditable *editable, const gchar *text, - gint len, gint *position, void *data) -{ - gint i; - gchar *curname; - - curname = gtk_entry_get_text(GTK_ENTRY(editable)); - if (*curname == '\0' && len > 0) { - if (isspace(text[0])) { - gtk_signal_emit_stop_by_name(GTK_OBJECT(editable), "insert_text"); - return; - } - } else { - for (i=0; i"),NULL}; - - about = gnome_about_new(_("GnomeCalendar Conduit"), VERSION, - _("(C) 1998"), - authors, - _("Configuration utility for the calendar conduit.\n"), - _("gnome-calendar-conduit.png")); - gtk_widget_show (about); - - return; -} - -static void toggled_cb(GtkWidget *widget, gpointer data) { - capplet_widget_state_changed(CAPPLET_WIDGET(capplet), TRUE); -} - -/* called by the sync_type GtkOptionMenu */ -static void -sync_action_selection(GtkMenuShell *widget, gpointer unused) -{ - if (!ignore_changes) { - capplet_widget_state_changed(CAPPLET_WIDGET (capplet), TRUE); - } -} - -/* called by the sync_type GtkOptionMenu */ -static void -activate_sync_type(GtkMenuItem *widget, gpointer data) -{ - curState->sync_type = GPOINTER_TO_INT(data); - if(!ignore_changes) - capplet_widget_state_changed(CAPPLET_WIDGET(capplet), TRUE); -} - -static GtkWidget -*createStateCfgWindow(void) -{ - GtkWidget *vbox, *table; - GtkWidget *label; - GtkWidget *optionMenu,*menuItem; - GtkMenu *menu; - gint i; - - vbox = gtk_vbox_new(FALSE, GNOME_PAD); - - table = gtk_hbox_new(FALSE, 0); - gtk_box_pack_start(GTK_BOX(vbox), table, FALSE, FALSE, GNOME_PAD); - - label = gtk_label_new(_("Synchronize Action")); - gtk_box_pack_start(GTK_BOX(table), label, FALSE, FALSE, GNOME_PAD); - - optionMenu=gtk_option_menu_new(); - gtk_object_set_data(GTK_OBJECT(vbox), "conduit_state", optionMenu); - menu = GTK_MENU(gtk_menu_new()); - - for (i=0; isync_type); - ignore_changes = FALSE; -} - - -static void -readStateCfg(GtkWidget *w,GCalConduitCfg *cfg) -{ -/* - GtkWidget *button; - - button = gtk_object_get_data(GTK_OBJECT(w), "conduit_on_off"); - - g_assert(button!=NULL); - - activated = GTK_TOGGLE_BUTTON(button)->active; -*/ -} - -static void -pilot_capplet_setup(void) -{ - GtkWidget *frame, *table; - - capplet = capplet_widget_new(); - - table = gtk_table_new(1, 2, FALSE); - gtk_container_border_width(GTK_CONTAINER(table), GNOME_PAD); - gtk_container_add(GTK_CONTAINER(capplet), table); - - frame = gtk_frame_new(_("Conduit state")); - gtk_container_border_width(GTK_CONTAINER(frame), GNOME_PAD_SMALL); - gtk_table_attach_defaults(GTK_TABLE(table), frame, 0, 1, 0, 1); - cfgStateWindow = createStateCfgWindow(); - gtk_container_add(GTK_CONTAINER(frame), cfgStateWindow); - - gtk_signal_connect(GTK_OBJECT(capplet), "try", - GTK_SIGNAL_FUNC(doTrySettings), NULL); - gtk_signal_connect(GTK_OBJECT(capplet), "revert", - GTK_SIGNAL_FUNC(doRevertSettings), NULL); - gtk_signal_connect(GTK_OBJECT(capplet), "ok", - GTK_SIGNAL_FUNC(doSaveSettings), NULL); - gtk_signal_connect(GTK_OBJECT(capplet), "cancel", - GTK_SIGNAL_FUNC(doCancelSettings), NULL); - gtk_signal_connect(GTK_OBJECT(capplet), "help", - GTK_SIGNAL_FUNC(about_cb), NULL); - - - setStateCfg(cfgStateWindow,curState); - - gtk_widget_show_all(capplet); -} - -static void -run_error_dialog(gchar *mesg,...) { - char tmp[80]; - va_list ap; - - va_start(ap,mesg); - vsnprintf(tmp,79,mesg,ap); - dialogWindow = gnome_message_box_new(mesg,GNOME_MESSAGE_BOX_ERROR,GNOME_STOCK_BUTTON_OK,NULL); - gnome_dialog_run_and_close(GNOME_DIALOG(dialogWindow)); - va_end(ap); -} - -gint get_pilot_id_from_gpilotd() { - gint *pilots; - int i; - - i=0; - gpilotd_get_pilot_ids(&pilots); - if(pilots) { - while(pilots[i]!=-1) { g_message("pilot %d = \"%d\"",i,pilots[i]); i++; } - if(i==0) { - run_error_dialog(_("No pilot configured, please choose the\n'Pilot Link Properties' capplet first.")); - return -1; - } else { - if(i==1) - return pilots[0]; - else { - g_message("too many pilots..."); - return pilots[0]; - } - } - } else { - run_error_dialog(_("No pilot configured, please choose the\n'Pilot Link Properties' capplet first.")); - return -1; - } -} - -int -main( int argc, char *argv[] ) -{ - /* we're a capplet */ - gnome_capplet_init ("calendar conduit control applet", NULL, argc, argv, - NULL, - 0, NULL); - - /* get pilot name from gpilotd */ - /* 1. initialize the gpilotd connection */ - if (gpilotd_init(&argc,argv)!=0) { - run_error_dialog(_("Cannot initialze the GnomePilot Daemon")); - g_error(_("Cannot initialze the GnomePilot Daemon")); - return -1; - } - - /* 2 connect to gpilotd */ - if (gpilotd_connect()!=0) { - run_error_dialog(_("Cannot connect to the GnomePilot Daemon")); - g_error(_("Cannot connect to the GnomePilot Daemon")); - return -1; - } - - pilotId = get_pilot_id_from_gpilotd(); - if(!pilotId) return -1; - - /* put all code to set things up in here */ - conduit = gpilotd_conduit_mgmt_new("calendar_conduit",pilotId); - gcalconduit_load_configuration(&origState,pilotId); - gpilotd_conduit_mgmt_get_sync_type(conduit,pilotId,&origState->sync_type); - - curState = gcalconduit_dupe_configuration(origState); - - pilot_capplet_setup(); - - - /* done setting up, now run main loop */ - capplet_gtk_main(); - return 0; -} diff --git a/calendar/gui/calendar-conduit-control-applet.desktop b/calendar/gui/calendar-conduit-control-applet.desktop deleted file mode 100644 index 2a5af4f24e..0000000000 --- a/calendar/gui/calendar-conduit-control-applet.desktop +++ /dev/null @@ -1,11 +0,0 @@ -[Desktop Entry] -Name=GnomeCalendar -Name[da]=Gnome kalender -Name[no]=GNOME kalender -Comment=Configure the GnomeCal conduit -Comment[da]=Konfigurér GnomeCal-komponent -Comment[no]=Konfigurér GnomeCal-komponent -Exec=calendar-conduit-control-applet --cap-id=1 -Terminal=0 -Type=Application -Icon=gnome-calendar-conduit.png diff --git a/calendar/gui/calendar-conduit.c b/calendar/gui/calendar-conduit.c deleted file mode 100644 index 8aa0e23a3f..0000000000 --- a/calendar/gui/calendar-conduit.c +++ /dev/null @@ -1,1406 +0,0 @@ -/* $Id$ */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "GnomeCal.h" -#include "calendar-conduit.h" - -int debug_alarms = 0; /* needed to satisfy some other part of gncal */ -/* Default values for alarms */ /* needed to satisfy some other part of gncal */ -CalendarAlarm alarm_defaults[4] = { - { ALARM_MAIL, 0, 15, ALARM_MINUTES }, - { ALARM_PROGRAM, 0, 15, ALARM_MINUTES }, - { ALARM_DISPLAY, 0, 15, ALARM_MINUTES }, - { ALARM_AUDIO, 0, 15, ALARM_MINUTES } -}; - -GnomePilotConduit * conduit_get_gpilot_conduit (guint32); -void conduit_destroy_gpilot_conduit (GnomePilotConduit*); -void local_record_from_icalobject(GCalLocalRecord *local,iCalObject *obj); - -#define CONDUIT_VERSION "0.8.11" -#ifdef G_LOG_DOMAIN -#undef G_LOG_DOMAIN -#endif -#define G_LOG_DOMAIN "gcalconduit" - -#define DEBUG_CALCONDUIT -#undef DEBUG_CALCONDUIT - -#ifdef DEBUG_CALCONDUIT -#define show_exception(e) g_warning ("Exception: %s\n", CORBA_exception_id (e)) -#define LOG(e...) g_log(G_LOG_DOMAIN,G_LOG_LEVEL_MESSAGE, e) -#else -#define show_exception(e) -#define LOG(e...) -#endif - -#define WARN(e...) g_log(G_LOG_DOMAIN,G_LOG_LEVEL_WARNING, e) -#define INFO(e...) g_log(G_LOG_DOMAIN,G_LOG_LEVEL_MESSAGE, e) - -#define catch_ret_val(_env,ret) \ - if (_env._major != CORBA_NO_EXCEPTION) { \ - g_log(G_LOG_DOMAIN,G_LOG_LEVEL_MESSAGE,"%s:%d: Caught exception",__FILE__,__LINE__); \ - g_warning ("Exception: %s\n", CORBA_exception_id (&(_env))); \ - CORBA_exception_free(&(_env)); \ - return ret; \ - } - -static int -start_calendar_server (GnomePilotConduitStandardAbs *conduit, - GCalConduitContext *ctxt) -{ - - g_return_val_if_fail(conduit!=NULL,-2); - g_return_val_if_fail(ctxt!=NULL,-2); - - ctxt->calendar = goad_server_activate_with_id (NULL, - "IDL:GNOME:Calendar:Repository:1.0", - 0, NULL); - if (ctxt->calendar == CORBA_OBJECT_NIL) { - g_warning ("Can not communicate with GnomeCalendar server"); - return -1; - } - - if (ctxt->ev._major != CORBA_NO_EXCEPTION){ - show_exception(&(ctxt->ev)); - CORBA_exception_free(&(ctxt->ev)); - return -1; - } - return 0; -} - - -/* Just a stub to link with */ -void -calendar_notify (time_t time, CalendarAlarm *which, void *data) -{ -} - -static GSList * -get_calendar_objects(GnomePilotConduitStandardAbs *conduit, - gboolean *status, - GCalConduitContext *ctxt) -{ - GSList *result; - GNOME_Calendar_Repository_String_Sequence *uids; - - g_return_val_if_fail(conduit!=NULL,NULL); - g_return_val_if_fail(ctxt!=NULL,NULL); - - result = NULL; - uids = GNOME_Calendar_Repository_get_object_id_list (ctxt->calendar, &(ctxt->ev)); - - if (ctxt->ev._major == CORBA_USER_EXCEPTION){ - INFO ("Object did not exist"); - show_exception(&(ctxt->ev)); - CORBA_exception_free(&(ctxt->ev)); - if(status!=NULL) (*status) = FALSE; - return NULL; - } else if(ctxt->ev._major != CORBA_NO_EXCEPTION) { - WARN (_("Error while communicating with calendar server")); - show_exception(&(ctxt->ev)); - CORBA_exception_free(&(ctxt->ev)); - if(status!=NULL) (*status) = FALSE; - return NULL; - } - - if(status!=NULL) (*status) = TRUE; - if(uids->_length>0) { - int i; - for(i=0;i_length;i++) { - result = g_slist_prepend(result,g_strdup(uids->_buffer[i])); - } - } else { - INFO ("No entries found"); - } - - CORBA_free(uids); - - return result; -} - -static void -local_record_from_ical_uid(GCalLocalRecord *local, - char *uid, - GCalConduitContext *ctxt) -{ - iCalObject *obj; - char *vcalendar_string; - - g_assert(local!=NULL); - - vcalendar_string = GNOME_Calendar_Repository_get_object(ctxt->calendar, uid, &(ctxt->ev)); - - if (ctxt->ev._major == CORBA_USER_EXCEPTION){ - INFO ("Object did not exist"); - show_exception(&(ctxt->ev)); - CORBA_exception_free(&(ctxt->ev)); - return; - } else if(ctxt->ev._major != CORBA_NO_EXCEPTION) { - WARN (_("Error while communicating with calendar server")); - show_exception(&(ctxt->ev)); - CORBA_exception_free(&(ctxt->ev)); - return; - } - g_return_if_fail(vcalendar_string!=NULL); - - obj = ical_object_new_from_string (vcalendar_string); - - local_record_from_icalobject(local,obj); - - return; -} - - -/* - * converts a iCalObject to a GCalLocalRecord - */ - -void -local_record_from_icalobject(GCalLocalRecord *local, - iCalObject *obj) -{ - g_return_if_fail(local!=NULL); - g_return_if_fail(obj!=NULL); - - local->ical = obj; - local->local.ID = local->ical->pilot_id; - -/* - LOG ("local->Id = %ld [%s], status = %d", - local->local.ID,obj->summary,local->ical->pilot_status); -*/ - switch(local->ical->pilot_status) { - case ICAL_PILOT_SYNC_NONE: - local->local.attr = GnomePilotRecordNothing; - break; - case ICAL_PILOT_SYNC_MOD: - local->local.attr = GnomePilotRecordModified; - break; - case ICAL_PILOT_SYNC_DEL: - local->local.attr = GnomePilotRecordDeleted; - break; - } - - /* Records without a pilot_id are new */ - if(local->local.ID == 0) - local->local.attr = GnomePilotRecordNew; - - local->local.secret = 0; - if(obj->class!=NULL) - if(strcmp(obj->class,"PRIVATE")==0) - local->local.secret = 1; - - local->local.archived = 0; -} - -/* - * Given a PilotRecord, find the matching record in - * the calendar repository. If no match, return NULL - */ -static GCalLocalRecord * -find_record_in_repository(GnomePilotConduitStandardAbs *conduit, - PilotRecord *remote, - GCalConduitContext *ctxt) -{ - char *vcal_string; - GCalLocalRecord *loc; - - g_return_val_if_fail(conduit!=NULL,NULL); - g_return_val_if_fail(remote!=NULL,NULL); - - LOG ("requesting %ld", remote->ID); - - vcal_string = - GNOME_Calendar_Repository_get_object_by_pilot_id (ctxt->calendar, remote->ID, &(ctxt->ev)); - - if (ctxt->ev._major == CORBA_USER_EXCEPTION){ - INFO ("Object did not exist"); - show_exception(&(ctxt->ev)); - CORBA_exception_free(&(ctxt->ev)); - return NULL; - } else if(ctxt->ev._major != CORBA_NO_EXCEPTION) { - WARN (_("Error while communicating with calendar server")); - show_exception(&(ctxt->ev)); - CORBA_exception_free(&(ctxt->ev)); - return NULL; - } else { - LOG ("Found"); - loc = g_new0(GCalLocalRecord,1); - /* memory allocated in new_from_string is freed in free_match */ - local_record_from_icalobject(loc, - ical_object_new_from_string (vcal_string)); - /* g_free(vcal_string); FIXME: this coredumps, but won't it leak without ? */ - return loc; - } - - return NULL; -} - -/* - * updates an given iCalObject in the repository - */ -static void -update_calendar_entry_in_repository(GnomePilotConduitStandardAbs *conduit, - iCalObject *obj, - GCalConduitContext *ctxt) -{ - char *str; - - g_return_if_fail(conduit!=NULL); - g_return_if_fail(obj!=NULL); - - str = calendar_string_from_object (obj); - - GNOME_Calendar_Repository_update_object (ctxt->calendar, obj->uid, str, &(ctxt->ev)); - - if (ctxt->ev._major == CORBA_USER_EXCEPTION){ - INFO ("Object did not exist"); - show_exception(&(ctxt->ev)); - CORBA_exception_free(&(ctxt->ev)); - return; - } else if(ctxt->ev._major != CORBA_NO_EXCEPTION) { - WARN (_("Error while communicating with calendar server")); - show_exception(&(ctxt->ev)); - CORBA_exception_free(&(ctxt->ev)); - return; - } - - free (str); -} - -static iCalObject * -ical_from_remote_record(GnomePilotConduitStandardAbs *conduit, - PilotRecord *remote, - iCalObject *in_obj) -{ - iCalObject *obj; - int i; - struct Appointment a; - time_t now; - - now = time (NULL); - - g_return_val_if_fail(remote!=NULL,NULL); - memset(&a,0,sizeof(struct Appointment)); - unpack_Appointment(&a,remote->record,remote->length); - - if (in_obj == NULL) - obj = ical_new (a.note ? a.note : "", - g_get_user_name (), - a.description ? a.description : ""); - else - obj = in_obj; - - if (a.note) { - g_free(obj->comment); - obj->comment = g_strdup(a.note); - } - if (a.description) { - g_free(obj->summary); - obj->summary = g_strdup(a.description); - } - - obj->created = now; - obj->last_mod = now; - obj->priority = 0; - obj->transp = 0; - obj->related = NULL; - obj->pilot_id = remote->ID; - obj->pilot_status = ICAL_PILOT_SYNC_NONE; - - /* - * Begin and end - */ - - if (a.event) - { - /* turn day-long events into a full day's appointment - FIXME: get settings from gnomecal */ - a.begin.tm_sec = 0; - a.begin.tm_min = 0; - a.begin.tm_hour = 0; - - a.end.tm_sec = 0; - a.end.tm_min =59; - a.end.tm_hour = 23; - } - - obj->dtstart = mktime (&a.begin); - obj->dtend = mktime (&a.end); - - /* Special case: daily repetitions are converted to a multi-day event */ - /* This sucketh, a pilot event scheduled for dailyRepeat, freq 1, end on - whatever is cleary converted wrong - if (a.repeatType == repeatDaily){ - time_t newt = time_add_day (obj->dtend, a.repeatFrequency); - - obj->dtend = newt; - } - */ - - /* - * Alarm - */ - if (a.alarm){ - obj->aalarm.type = ALARM_AUDIO; - obj->aalarm.enabled = 1; - obj->aalarm.count = a.advance; - - switch (a.advanceUnits){ - case advMinutes: - obj->aalarm.units = ALARM_MINUTES; - break; - - case advHours: - obj->aalarm.units = ALARM_HOURS; - break; - - case advDays: - obj->aalarm.units = ALARM_DAYS; - break; - default: - } - } - - /* - * Recurrence - */ - if (a.repeatFrequency){ - obj->recur = g_new0 (Recurrence, 1); - - switch (a.repeatType){ - case repeatDaily: - /* - * In the Pilot daily repetitions are actually - * multi-day events - */ - obj->recur->type = RECUR_DAILY; - break; - - case repeatMonthlyByDate: - obj->recur->type = RECUR_MONTHLY_BY_DAY; - obj->recur->u.month_day = a.repeatFrequency; - break; - - case repeatWeekly: - { - int wd; - - obj->recur->type = RECUR_WEEKLY; - for (wd = 0; wd < 7; wd++) - if (a.repeatDays [wd]) - obj->recur->weekday |= 1 << wd; - - if (obj->recur->weekday == 0){ - struct tm tm = *localtime (&obj->dtstart); - - obj->recur->weekday = 1 << tm.tm_wday; - } - break; - } - - case repeatMonthlyByDay: - obj->recur->type = RECUR_MONTHLY_BY_POS; - obj->recur->u.month_pos = a.repeatFrequency; - obj->recur->weekday = (a.repeatDay / 7); - break; - - case repeatYearly: - obj->recur->type = RECUR_YEARLY_BY_DAY; - break; - - default: - g_assert_not_reached(); - } - - if (a.repeatForever) - obj->recur->duration = 0; - else - obj->recur->_enddate = mktime (&a.repeatEnd); - - obj->recur->interval = a.repeatFrequency; - } - - /* - * Load exception dates - */ - obj->exdate = NULL; - for (i = 0; i < a.exceptions; i++){ - time_t *t = g_new (time_t, 1); - - *t = mktime (&(a.exception [i])); - obj->exdate = g_list_prepend (obj->exdate, t); - } - - g_free (obj->class); - - if (remote->attr & dlpRecAttrSecret) - obj->class = g_strdup ("PRIVATE"); - else - obj->class = g_strdup ("PUBLIC"); - - - free_Appointment(&a); - - return obj; -} - -/* Code blatantly stolen from - * calendar-pilot-sync.c: - * - * (C) 1999 International GNOME Support - * - * Author: - * Miguel de Icaza (miguel@gnome-support.com) - * - */ -static gint -update_record (GnomePilotConduitStandardAbs *conduit, - PilotRecord *remote, - GCalConduitContext *ctxt) -{ - char *vcal_string; - iCalObject *obj; - struct Appointment a; - - g_return_val_if_fail(remote!=NULL,-1); - - memset(&a,0,sizeof(struct Appointment)); - unpack_Appointment(&a,remote->record,remote->length); - - obj = ical_new (a.note ? a.note : "", - g_get_user_name (), - a.description ? a.description : ""); - - LOG ("requesting %ld [%s]", remote->ID, a.description); - vcal_string = GNOME_Calendar_Repository_get_object_by_pilot_id (ctxt->calendar, remote->ID, &(ctxt->ev)); - - if (ctxt->ev._major == CORBA_USER_EXCEPTION){ - LOG ("Object did not exist, creating a new one"); - show_exception(&(ctxt->ev)); - CORBA_exception_free(&(ctxt->ev)); - ical_from_remote_record(conduit,remote,obj); - } else if(ctxt->ev._major != CORBA_NO_EXCEPTION) { - WARN (_("Error while communicating with calendar server")); - show_exception(&(ctxt->ev)); - CORBA_exception_free(&(ctxt->ev)); - ical_object_destroy (obj); - free_Appointment(&a); - return -1; - } else { - LOG ("Found"); - ical_object_destroy (obj); - obj = ical_object_new_from_string (vcal_string); - ical_from_remote_record(conduit,remote,obj); - CORBA_free(vcal_string); - } - - /* update record on server */ - - update_calendar_entry_in_repository(conduit,obj,ctxt); - - /* - * Shutdown - */ - ical_object_destroy (obj); - free_Appointment(&a); - - return 0; -} - -static void -check_for_slow_setting(GnomePilotConduit *c, - GCalConduitContext *ctxt) -{ - CORBA_long entry_number; - entry_number = - GNOME_Calendar_Repository_get_number_of_objects(ctxt->calendar, - GNOME_Calendar_Repository_ANY, - &(ctxt->ev)); - - if (ctxt->ev._major == CORBA_USER_EXCEPTION){ - show_exception(&(ctxt->ev)); - CORBA_exception_free(&(ctxt->ev)); - } else if(ctxt->ev._major != CORBA_NO_EXCEPTION) { - WARN (_("Error while communicating with calendar server")); - show_exception(&(ctxt->ev)); - CORBA_exception_free(&(ctxt->ev)); - } else { - LOG (_("Calendar holds %d entries"),entry_number); - /* If the local base is empty, do a slow sync */ - if ( entry_number <= 0) { - gnome_pilot_conduit_standard_set_slow(GNOME_PILOT_CONDUIT_STANDARD(c)); - } - } -} - -static gint -pre_sync(GnomePilotConduit *c, - GnomePilotDBInfo *dbi, - GCalConduitContext *ctxt) -{ - int l; - gint num_records; - unsigned char *buf; - - g_message ("GnomeCal Conduit v.%s",CONDUIT_VERSION); - - ctxt->calendar = CORBA_OBJECT_NIL; - - if (start_calendar_server(GNOME_PILOT_CONDUIT_STANDARD_ABS(c),ctxt) != 0) { - WARN(_("Could not start gnomecal server")); - gnome_pilot_conduit_error(GNOME_PILOT_CONDUIT(c), - _("Could not start gnomecal server")); - return -1; - } - - /* Set the counters for the progress bar crap */ - num_records = GNOME_Calendar_Repository_get_number_of_objects (ctxt->calendar, GNOME_Calendar_Repository_ANY, &(ctxt->ev)); - catch_ret_val(ctxt->ev,-1); - gnome_pilot_conduit_standard_abs_set_num_local_records(GNOME_PILOT_CONDUIT_STANDARD_ABS(c), - num_records); - num_records = GNOME_Calendar_Repository_get_number_of_objects (ctxt->calendar, GNOME_Calendar_Repository_MODIFIED, &(ctxt->ev)); - catch_ret_val(ctxt->ev,-1); - gnome_pilot_conduit_standard_abs_set_num_updated_local_records(GNOME_PILOT_CONDUIT_STANDARD_ABS(c), - num_records); - num_records = GNOME_Calendar_Repository_get_number_of_objects (ctxt->calendar, GNOME_Calendar_Repository_NEW, &(ctxt->ev)); - catch_ret_val(ctxt->ev,-1); - gnome_pilot_conduit_standard_abs_set_num_new_local_records(GNOME_PILOT_CONDUIT_STANDARD_ABS(c), - num_records); - num_records = GNOME_Calendar_Repository_get_number_of_objects (ctxt->calendar, GNOME_Calendar_Repository_DELETED, &(ctxt->ev)); - catch_ret_val(ctxt->ev,-1); - gnome_pilot_conduit_standard_abs_set_num_deleted_local_records(GNOME_PILOT_CONDUIT_STANDARD_ABS(c), - num_records); - - gtk_object_set_data(GTK_OBJECT(c),"dbinfo",dbi); - - /* load_records(c); */ - - buf = (unsigned char*)g_malloc(0xffff); - if((l=dlp_ReadAppBlock(dbi->pilot_socket,dbi->db_handle,0,(unsigned char *)buf,0xffff)) < 0) { - WARN(_("Could not read pilot's DateBook application block")); - WARN("dlp_ReadAppBlock(...) = %d",l); - gnome_pilot_conduit_error(GNOME_PILOT_CONDUIT(c), - _("Could not read pilot's DateBook application block")); - return -1; - } - unpack_AppointmentAppInfo(&(ctxt->ai),buf,l); - g_free(buf); - - check_for_slow_setting(c,ctxt); - - return 0; -} - -/** - * Find (if possible) the local record which matches - * the given PilotRecord. - * if successfull, return non-zero and set *local to - * a non-null value (the located local record), - * otherwise return 0 and set *local = NULL; - */ - -static gint -match_record (GnomePilotConduitStandardAbs *conduit, - GCalLocalRecord **local, - PilotRecord *remote, - GCalConduitContext *ctxt) -{ - LOG ("in match_record"); - - g_return_val_if_fail(local!=NULL,-1); - g_return_val_if_fail(remote!=NULL,-1); - - *local = find_record_in_repository(conduit,remote,ctxt); - - if (*local==NULL) return -1; - return 0; -} - -/** - * Free the data allocated by a previous match_record call. - * If successfull, return non-zero and ser *local=NULL, otherwise - * return 0. - */ -static gint -free_match (GnomePilotConduitStandardAbs *conduit, - GCalLocalRecord **local, - GCalConduitContext *ctxt) -{ - LOG ("entering free_match"); - - g_return_val_if_fail(local!=NULL,-1); - g_return_val_if_fail(*local!=NULL,-1); - - ical_object_destroy (GCAL_LOCALRECORD(*local)->ical); - g_free(*local); - - *local = NULL; - return 0; -} - -/* - Move to archive and set status to Nothing - */ -static gint -archive_local (GnomePilotConduitStandardAbs *conduit, - GCalLocalRecord *local, - GCalConduitContext *ctxt) -{ - LOG ("entering archive_local"); - - g_return_val_if_fail(local!=NULL,-1); - - return -1; -} - -/* - Store in archive and set status to Nothing - */ -static gint -archive_remote (GnomePilotConduitStandardAbs *conduit, - GCalLocalRecord *local, - PilotRecord *remote, - GCalConduitContext *ctxt) -{ - LOG ("entering archive_remote"); - - g_return_val_if_fail(remote!=NULL,-1); - g_return_val_if_fail(local!=NULL,-1); - - return -1; -} - -/* - Store and set status to Nothing - */ -static gint -store_remote (GnomePilotConduitStandardAbs *conduit, - PilotRecord *remote, - GCalConduitContext *ctxt) -{ - LOG ("entering store_remote"); - - g_return_val_if_fail(remote!=NULL,-1); - remote->attr = GnomePilotRecordNothing; - - return update_record(conduit,remote,ctxt); -} - -static gint -clear_status_archive_local (GnomePilotConduitStandardAbs *conduit, - GCalLocalRecord *local, - GCalConduitContext *ctxt) -{ - LOG ("entering clear_status_archive_local"); - - g_return_val_if_fail(local!=NULL,-1); - - return -1; -} - -static gint -iterate (GnomePilotConduitStandardAbs *conduit, - GCalLocalRecord **local, - GCalConduitContext *ctxt) -{ - static GSList *events,*iterator; - static int hest; - - g_return_val_if_fail(local!=NULL,-1); - - if(*local==NULL) { - LOG ("beginning iteration"); - - events = get_calendar_objects(conduit,NULL,ctxt); - hest = 0; - - if(events!=NULL) { - LOG ("iterating over %d records",g_slist_length(events)); - *local = g_new0(GCalLocalRecord,1); - - local_record_from_ical_uid(*local,(gchar*)events->data,ctxt); - iterator = events; - } else { - LOG ("no events"); - (*local) = NULL; - } - } else { - /*LOG ("continuing iteration");*/ - hest++; - if(g_slist_next(iterator)==NULL) { - GSList *l; - - LOG ("ending"); - /** free stuff allocated for iteration */ - g_free((*local)); - - LOG ("iterated over %d records",hest); - for(l=events;l;l=l->next) - g_free(l->data); - - g_slist_free(events); - - /* ends iteration */ - (*local) = NULL; - return 0; - } else { - iterator = g_slist_next(iterator); - local_record_from_ical_uid(*local,(gchar*)(iterator->data),ctxt); - } - } - return 1; -} - -static gint -iterate_specific (GnomePilotConduitStandardAbs *conduit, - GCalLocalRecord **local, - gint flag, - gint archived, - GCalConduitContext *ctxt) -{ -#ifdef DEBUG_CALCONDUIT - { - gchar *tmp; - switch (flag) { - case GnomePilotRecordNothing: tmp = g_strdup("RecordNothing"); break; - case GnomePilotRecordModified: tmp = g_strdup("RecordModified"); break; - case GnomePilotRecordNew: tmp = g_strdup("RecordNew"); break; - default: tmp = g_strdup_printf("0x%x",flag); break; - } - LOG ("entering iterate_specific(flag = %s)",tmp); - g_free(tmp); - } -#endif - g_return_val_if_fail(local!=NULL,-1); - - /* iterate until a record meets the criteria */ - while(gnome_pilot_conduit_standard_abs_iterate(conduit,(LocalRecord**)local)) { - if((*local)==NULL) break; - if(archived && ((*local)->local.archived==archived)) break; - if(((*local)->local.attr == flag)) break; - } - - return (*local)==NULL?0:1; -} - -static gint -purge (GnomePilotConduitStandardAbs *conduit, - GCalConduitContext *ctxt) -{ - LOG ("entering purge"); - - - /* HEST, gem posterne her */ - - return -1; -} - -static gint -set_status (GnomePilotConduitStandardAbs *conduit, - GCalLocalRecord *local, - gint status, - GCalConduitContext *ctxt) -{ - LOG ("entering set_status(status=%d)",status); - - g_return_val_if_fail(local!=NULL,-1); - - g_assert(local->ical!=NULL); - - local->local.attr = status; - switch(status) { - case GnomePilotRecordPending: - case GnomePilotRecordNothing: - local->ical->pilot_status = ICAL_PILOT_SYNC_NONE; - break; - case GnomePilotRecordDeleted: - break; - case GnomePilotRecordNew: - case GnomePilotRecordModified: - local->ical->pilot_status = ICAL_PILOT_SYNC_MOD; - break; - } - - if ( status == GnomePilotRecordDeleted) { - GNOME_Calendar_Repository_delete_object(ctxt->calendar,local->ical->uid,&(ctxt->ev)); - } else { - GNOME_Calendar_Repository_update_pilot_id(ctxt->calendar, - local->ical->uid, - local->local.ID, - local->ical->pilot_status, - &(ctxt->ev)); - } - - if (ctxt->ev._major == CORBA_USER_EXCEPTION){ - LOG ("Object did not exist"); - show_exception(&(ctxt->ev)); - CORBA_exception_free(&(ctxt->ev)); - return -1; - } else if(ctxt->ev._major != CORBA_NO_EXCEPTION) { - WARN (_("Error while communicating with calendar server")); - show_exception(&(ctxt->ev)); - CORBA_exception_free(&(ctxt->ev)); - return -1; - } - return 0; -} - -static gint -set_archived (GnomePilotConduitStandardAbs *conduit, - GCalLocalRecord *local, - gint archived, - GCalConduitContext *ctxt) -{ - LOG ("entering set_archived"); - - g_return_val_if_fail(local!=NULL,-1); - g_assert(local->ical!=NULL); - - local->local.archived = archived; - update_calendar_entry_in_repository(conduit,local->ical,ctxt); - /* FIXME: This should move the entry into a speciel - calendar file, eg. Archive, or (by config option), simply - delete it */ - return 0; -} - -static gint -set_pilot_id (GnomePilotConduitStandardAbs *conduit, - GCalLocalRecord *local, - guint32 ID, - GCalConduitContext *ctxt) -{ - LOG ("entering set_pilot_id(id=%d)",ID); - - g_return_val_if_fail(local!=NULL,-1); - g_assert(local->ical!=NULL); - - local->local.ID = ID; - local->ical->pilot_id = ID; - GNOME_Calendar_Repository_update_pilot_id(ctxt->calendar, - local->ical->uid, - local->local.ID, - local->ical->pilot_status, - &(ctxt->ev)); - - if (ctxt->ev._major == CORBA_USER_EXCEPTION){ - LOG ("Object did not exist"); - show_exception(&(ctxt->ev)); - CORBA_exception_free(&(ctxt->ev)); - return -1; - } else if(ctxt->ev._major != CORBA_NO_EXCEPTION) { - WARN (_("Error while communicating with calendar server")); - show_exception(&(ctxt->ev)); - CORBA_exception_free(&(ctxt->ev)); - return -1; - } - return 0; -} - -static gint -transmit (GnomePilotConduitStandardAbs *conduit, - GCalLocalRecord *local, - PilotRecord **remote, - GCalConduitContext *ctxt) -{ - PilotRecord *p; - int daycount; - - LOG ("entering transmit"); - - g_return_val_if_fail(local!=NULL,-1); - g_return_val_if_fail(remote!=NULL,-1); - g_assert(local->ical!=NULL); - - p = g_new0(PilotRecord,1); - - p->ID = local->local.ID; - p->attr = local->local.attr; - p->archived = local->local.archived; - p->secret = local->local.secret; - - local->a = g_new0(struct Appointment,1); - - local->a->event = 0; /* if no start time, leave at 1 */ - local->a->begin = *localtime(&local->ical->dtstart); - local->a->end = *localtime(&local->ical->dtend); - - /* set the Audio Alarm parameters */ - if(local->ical->aalarm.enabled) { - local->a->alarm = 1; - local->a->advance = local->ical->aalarm.count; - switch(local->ical->aalarm.units) { - case ALARM_MINUTES: - local->a->advanceUnits = advMinutes; - break; - case ALARM_HOURS: - local->a->advanceUnits = advHours; - break; - case ALARM_DAYS: - local->a->advanceUnits = advDays; - break; - } - } else { - local->a->alarm = 0; - local->a->advance = 0; - local->a->advanceUnits = advMinutes; - } - - /* set the recurrence parameters */ - if (local->ical->recur != NULL) { - switch (local->ical->recur->type) { - case RECUR_DAILY: - local->a->repeatType = repeatDaily; - break; - case RECUR_WEEKLY: - local->a->repeatType = repeatWeekly; - break; - case RECUR_MONTHLY_BY_POS: - local->a->repeatType = repeatMonthlyByDate; - break; - case RECUR_MONTHLY_BY_DAY: - local->a->repeatType = repeatMonthlyByDay; - break; - case RECUR_YEARLY_BY_MONTH: - local->a->repeatType = repeatYearly; - break; - case RECUR_YEARLY_BY_DAY: - local->a->repeatType = repeatYearly; - break; - } - if (local->ical->recur->duration == 0) { - local->a->repeatForever = 1; - } else { - local->a->repeatForever = 0; - local->a->repeatEnd = *localtime(&local->ical->recur->_enddate); - } - local->a->repeatFrequency = local->ical->recur->interval; - - - for ( daycount=0; daycount<7; daycount++ ) { - if (local->ical->recur->weekday & (1 << daycount)) - local->a->repeatDays[daycount] = 1; - } - } else { - local->a->repeatType = repeatNone; - local->a->repeatForever = 0; - local->a->repeatEnd = local->a->end; - local->a->repeatFrequency = 0; - local->a->repeatDay = dom1stSun; - local->a->repeatDays[0] = 0; - local->a->repeatDays[1] = 0; - local->a->repeatDays[2] = 0; - local->a->repeatDays[3] = 0; - local->a->repeatDays[4] = 0; - local->a->repeatDays[5] = 0; - local->a->repeatDays[6] = 0; - local->a->repeatWeekstart = 0; - local->a->exceptions = 0; - local->a->exception = NULL; - } - - /* STOP: don't replace these with g_strdup, since free_Appointment - uses free to deallocte */ - local->a->note = - local->ical->comment==NULL?NULL:strdup(local->ical->comment); - local->a->description = - local->ical->summary==NULL?NULL:strdup(local->ical->summary); - - /* Generate pilot record structure */ - p->record = g_new0(char,0xffff); - p->length = pack_Appointment(local->a,p->record,0xffff); - -#if 0 - /* This is some debug code that hexdumps the calendar entry... - You won't need this. */ - { - int x,y; - g_message("calconduit: new item from %s to %s",asctime(&(local->a->begin)),asctime(&(local->a->end))); - - g_message("local->a->note = %s",local->a->note); - g_message("local->a->description = %s",local->a->description); - g_message("sizeof(p->record) = %d, length is %d",sizeof(p->record),p->length); - for(x=0;xlength;x+=32) { - for(y=x;yrecord[y]<33 || p->record[y]>128) - printf("%02X",p->record[y]); - else - printf(" %c",p->record[y]); - printf("\n"); - } - } -#endif - - *remote = p; - - return 0; -} - -static gint -free_transmit (GnomePilotConduitStandardAbs *conduit, - GCalLocalRecord *local, - PilotRecord **remote, - GCalConduitContext *ctxt) -{ - LOG ("entering free_transmit"); - - g_return_val_if_fail(local!=NULL,-1); - g_return_val_if_fail(remote!=NULL,-1); - - free_Appointment(local->a); - g_free((*remote)->record); - *remote = NULL; - return 0; -} - -static gint -compare (GnomePilotConduitStandardAbs *conduit, - GCalLocalRecord *local, - PilotRecord *remote, - GCalConduitContext *ctxt) -{ - /* used by the quick compare */ - PilotRecord *remoteOfLocal; - int err; - int retval; - - /* used by the tedious compare */ - struct Appointment a; - int daycount; - - g_message ("entering compare"); - - g_return_val_if_fail (local!=NULL,-1); - g_return_val_if_fail (remote!=NULL,-1); -#if 1 - err = transmit(conduit,local,&remoteOfLocal,ctxt); - if (err != 0) return err; - - retval = 0; - if (remote->length == remoteOfLocal->length) { - if (memcmp(remoteOfLocal->record,remote->record,remote->length)!=0) { - g_message("compare failed on contents"); - retval = 1; - } - } else { - g_message("compare failed on length"); - retval = 1; - } - - free_transmit(conduit,local,&remoteOfLocal,ctxt); - return retval; - -#else - /** FIXME: All the { LOG("yadayada"); return 1; } bloat is for debug purposes. - Once this is known to work, compact to return 1;'s */ - - /* Check record attributes */ - if (local->local.ID != remote->ID) { - LOG("failed local->local.ID == remote->ID"); - return 1; - } - if (local->local.attr != remote->attr) { - LOG("failed local->local.attr == remote->attr"); - return 1; - } - if (local->local.archived != remote->archived) { - LOG("failed local->local.archived == remote->archived"); - return 1; - } - if (local->local.secret != remote->secret) { - LOG("failed local->local.secret == remote->secret"); - return 1; - } - - unpack_Appointment(&a,remote->record,remote->length); - - /* Check records begin/end time */ - if (a.event==0) { -/* FIXME - if (a.begin != *localtime(&local->ical->dtstart)) { - LOG("a.begin == *localtime(&local->ical->dtstart)"); - return 1; - } - if (a.end != *localtime(&local->ical->dtend)) { - LOG("a.end == *localtime(&local->ical->dtend)"); - return 1; - } -*/ - } else { - LOG("failed local->a.event != 0, unsupported by gnomecal"); - return 1; - } - - /* Check records alarm settings */ - if(a.alarm == 1) { - if (local->ical->aalarm.enabled == 1) { - if (a.advance != local->ical->aalarm.count) { - LOG("failed a.advance == local->ical->aalarm.count"); - return 1; - } - switch(local->ical->aalarm.units) { - case ALARM_MINUTES: - if (a.advanceUnits != advMinutes) { - LOG("failed local->ical->aalarm.units == a.advanceUnits"); - return 1; - } - break; - case ALARM_HOURS: - if (a.advanceUnits != advHours) { - LOG("failed local->ical->aalarm.units == a.advanceUnits"); - return 1; - } - break; - case ALARM_DAYS: - if (a.advanceUnits != advDays) { - LOG("failed local->ical->aalarm.units == a.advanceUnits"); - return 1; - } - break; - } - } else { - LOG("failed a.alarm == 1 && local->ical->aalarm.enabled == 1"); - return 1; - } - } else if (local->ical->aalarm.enabled == 1) { - LOG("failed a.alarm != 1 && local->ical->aalarm.enabled != 1"); - return 1; - } - - /* Check records recurrence settings */ - /* If this code is broken, a more or less safe although not efficient - approach is (other the fixing the bug), if either has recurrence, - return 1, thus failing the comparision */ - if (local->ical->recur != NULL) { - if (a.repeatType == repeatNone) { - LOG("failed: local->ical->recur != NULL && a.repeatType != repeatNone"); - return 1; - } - switch (local->ical->recur->type) { - case RECUR_DAILY: - if (a.repeatType != repeatDaily) { - LOG("failed a.repeatType == repeatDaily"); - return 1; } - break; - case RECUR_WEEKLY: - if (a.repeatType != repeatWeekly) { - LOG("failed a.repeatType == repeatWeekly"); - return 1; } - break; - case RECUR_MONTHLY_BY_POS: - if (a.repeatType != repeatMonthlyByDate) { - LOG("failed a.repeatType == repeatMonthlyByDate"); - return 1; } - break; - case RECUR_MONTHLY_BY_DAY: - if (a.repeatType != repeatMonthlyByDay) { - LOG("failed a.repeatType == repeatMonthlyByDay"); - return 1; } - break; - case RECUR_YEARLY_BY_MONTH: - if (a.repeatType != repeatYearly) { - LOG("failed a.repeatType == repeatYearly"); - return 1; } - break; - case RECUR_YEARLY_BY_DAY: - if (a.repeatType != repeatYearly) { - LOG("failed a.repeatType == repeatYearly"); - return 1; } - break; - } - if (local->ical->recur->duration == 0) { - if(a.repeatForever != 1) { - LOG("failed local->ical->recur->duration == 0 && a.repeatForever == 1"); - return 1; - } - } else { - if(a.repeatForever != 0) { - LOG("failed local->ical->recur->duration != 0 && ! a.repeatForever == 0"); - return 1; - } -/* FIXME - if(a.repeatEnd != *localtime(&local->ical->recur->_enddate)) { - LOG("failed a.repeatEnd == *localtime(&local->ical->recur->_enddate)"); - return 1; - } -*/ - } - if (a.repeatFrequency != local->ical->recur->interval) { - LOG("failed a.repeatFrequency == local->ical->recur->interval"); - return 1; - } - for (daycount = 0; daycount<7; daycount++) { - if(local->ical->recur->weekday & (1<ical->recur->weekday & (1<ical->recur->weekday &! (1<ical->recur == NULL && a.repeatType == repeatNone"); - return 1; - } - - /* check the note and description */ - if(a.note!=NULL) { - if(local->ical->comment==NULL) { - LOG("failed a.note != NULL && local->ical->coment != NULL"); - return 1; - } - if(strcmp(local->ical->comment,a.note)!=0) { - LOG("failed strcmp(local->ical->comment,a.note)==0"); - return 1; - } - } if(local->ical->comment!=NULL) { - LOG("failed a.note == NULL && local->ical->coment == NULL"); - return 1; - } - if(a.description!=NULL) { - if(local->ical->summary==NULL) { - LOG("failed a.description != NULL && local->ical->coment != NULL"); - return 1; - } - if(strcmp(local->ical->summary,a.description)!=0) { - LOG("failed strcmp(local->ical->summary,a.description)==0"); - return 1; - } - } if(local->ical->summary!=NULL) { - LOG("failed a.description == NULL && local->ical->coment == NULL"); - return 1; - } -#endif - return 0; -} - -static gint -compare_backup (GnomePilotConduitStandardAbs *conduit, - GCalLocalRecord *local, - PilotRecord *remote, - GCalConduitContext *ctxt) -{ - LOG ("entering compare_backup"); - - g_return_val_if_fail(local!=NULL,-1); - g_return_val_if_fail(remote!=NULL,-1); - - return -1; -} - -static gint -delete_all (GnomePilotConduitStandardAbs *conduit, - GCalConduitContext *ctxt) -{ - GSList *events,*it; - gboolean error; - - events = get_calendar_objects(conduit,&error,ctxt); - - if (error == FALSE) return -1; - for (it=events;it;it = g_slist_next(it)) { - GNOME_Calendar_Repository_delete_object(ctxt->calendar, - it->data, - &(ctxt->ev)); - if (ctxt->ev._major == CORBA_USER_EXCEPTION){ - INFO ("Object did not exist"); - show_exception(&(ctxt->ev)); - CORBA_exception_free(&(ctxt->ev)); - } else if(ctxt->ev._major != CORBA_NO_EXCEPTION) { - WARN (_("Error while communicating with calendar server")); - show_exception(&(ctxt->ev)); - CORBA_exception_free(&(ctxt->ev)); - /* destroy loop, free data */ - for (it=events;it;it = g_slist_next(it)) g_free(it->data); - g_slist_free(events); - return -1; - } - g_free(it->data); - } - g_slist_free(events); - return -1; -} - -GnomePilotConduit * -conduit_get_gpilot_conduit (guint32 pilotId) -{ - GtkObject *retval; - GCalConduitCfg *cfg; - GCalConduitContext *ctxt; - - - retval = gnome_pilot_conduit_standard_abs_new ("DatebookDB", 0x64617465); - g_assert (retval != NULL); - gnome_pilot_conduit_construct(GNOME_PILOT_CONDUIT(retval),"GnomeCalConduit"); - - gcalconduit_load_configuration(&cfg,pilotId); - gtk_object_set_data(retval,"gcalconduit_cfg",cfg); - - gcalconduit_new_context(&ctxt,cfg); - gtk_object_set_data(GTK_OBJECT(retval),"gcalconduit_context",ctxt); - - gtk_signal_connect (retval, "match_record", (GtkSignalFunc) match_record, ctxt); - gtk_signal_connect (retval, "free_match", (GtkSignalFunc) free_match, ctxt); - gtk_signal_connect (retval, "archive_local", (GtkSignalFunc) archive_local, ctxt); - gtk_signal_connect (retval, "archive_remote", (GtkSignalFunc) archive_remote, ctxt); - gtk_signal_connect (retval, "store_remote", (GtkSignalFunc) store_remote, ctxt); - gtk_signal_connect (retval, "clear_status_archive_local", (GtkSignalFunc) clear_status_archive_local, ctxt); - gtk_signal_connect (retval, "iterate", (GtkSignalFunc) iterate, ctxt); - gtk_signal_connect (retval, "iterate_specific", (GtkSignalFunc) iterate_specific, ctxt); - gtk_signal_connect (retval, "purge", (GtkSignalFunc) purge, ctxt); - gtk_signal_connect (retval, "set_status", (GtkSignalFunc) set_status, ctxt); - gtk_signal_connect (retval, "set_archived", (GtkSignalFunc) set_archived, ctxt); - gtk_signal_connect (retval, "set_pilot_id", (GtkSignalFunc) set_pilot_id, ctxt); - gtk_signal_connect (retval, "compare", (GtkSignalFunc) compare, ctxt); - gtk_signal_connect (retval, "compare_backup", (GtkSignalFunc) compare_backup, ctxt); - gtk_signal_connect (retval, "free_transmit", (GtkSignalFunc) free_transmit, ctxt); - gtk_signal_connect (retval, "delete_all", (GtkSignalFunc) delete_all, ctxt); - gtk_signal_connect (retval, "transmit", (GtkSignalFunc) transmit, ctxt); - gtk_signal_connect (retval, "pre_sync", (GtkSignalFunc) pre_sync, ctxt); - - return GNOME_PILOT_CONDUIT (retval); -} - -void -conduit_destroy_gpilot_conduit (GnomePilotConduit *conduit) -{ - GCalConduitCfg *cc; - GCalConduitContext *ctxt; - - cc = GET_GCALCONFIG(conduit); - ctxt = GET_GCALCONTEXT(conduit); - - if(ctxt->calendar!=CORBA_OBJECT_NIL) - GNOME_Calendar_Repository_done (ctxt->calendar, &(ctxt->ev)); - - gcalconduit_destroy_configuration(&cc); - - gcalconduit_destroy_context(&ctxt); - - gtk_object_destroy (GTK_OBJECT (conduit)); - -} - - diff --git a/calendar/gui/calendar-conduit.h b/calendar/gui/calendar-conduit.h deleted file mode 100644 index fa8c151d4c..0000000000 --- a/calendar/gui/calendar-conduit.h +++ /dev/null @@ -1,135 +0,0 @@ -/* $Id$ */ - -#ifndef __CALENDAR_CONDUIT_H__ -#define __CALENDAR_CONDUIT_H__ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "GnomeCal.h" - -/* This is the local record structure for the GnomeCal conduit. */ -typedef struct _GCalLocalRecord GCalLocalRecord; -struct _GCalLocalRecord { - /* The stuff from gnome-pilot-conduit-standard-abs.h - Must be first in the structure, or instances of this - structure cannot be used by gnome-pilot-conduit-standard-abs. - */ - LocalRecord local; - /* The corresponding iCal object, as found by GnomeCal. */ - iCalObject *ical; - /* pilot-link appointment structure, used for implementing Transmit. */ - struct Appointment *a; -}; -#define GCAL_LOCALRECORD(s) ((GCalLocalRecord*)(s)) - -/* This is the configuration of the GnomeCal conduit. */ -typedef struct _GCalConduitCfg GCalConduitCfg; -struct _GCalConduitCfg { - gboolean open_secret; - guint32 pilotId; - GnomePilotConduitSyncType sync_type; /* only used by capplet */ -}; -#define GET_GCALCONFIG(c) ((GCalConduitCfg*)gtk_object_get_data(GTK_OBJECT(c),"gcalconduit_cfg")) - -/* This is the context for all the GnomeCal conduit methods. */ -typedef struct _GCalConduitContext GCalConduitContext; -struct _GCalConduitContext { - struct AppointmentAppInfo ai; - GCalConduitCfg *cfg; - GNOME_Calendar_Repository calendar; - CORBA_Environment ev; - CORBA_ORB orb; -}; -#define GET_GCALCONTEXT(c) ((GCalConduitContext*)gtk_object_get_data(GTK_OBJECT(c),"gcalconduit_context")) - -/* Given a GCalConduitCfg*, allocates the structure and - loads the configuration data for the given pilot. */ -static void -gcalconduit_load_configuration(GCalConduitCfg **c, - guint32 pilotId) -{ - gchar prefix[256]; - g_snprintf(prefix,255,"/gnome-pilot.d/calendard-conduit/Pilot_%u/",pilotId); - - *c = g_new0(GCalConduitCfg,1); - g_assert(*c != NULL); - gnome_config_push_prefix(prefix); - (*c)->open_secret = gnome_config_get_bool("open_secret=FALSE"); - (*c)->sync_type = GnomePilotConduitSyncTypeCustom; /* set in capplets main */ - gnome_config_pop_prefix(); - - (*c)->pilotId = pilotId; -} - -/* Saves the configuration data. */ -static void -gcalconduit_save_configuration(GCalConduitCfg *c) -{ - gchar prefix[256]; - - g_snprintf(prefix,255,"/gnome-pilot.d/calendar-conduit/Pilot_%u/",c->pilotId); - - gnome_config_push_prefix(prefix); - gnome_config_set_bool("open_secret",c->open_secret); - gnome_config_pop_prefix(); - - gnome_config_sync(); - gnome_config_drop_all(); -} - -/* Creates a duplicate of the configuration data */ -static GCalConduitCfg* -gcalconduit_dupe_configuration(GCalConduitCfg *c) { - GCalConduitCfg *retval; - g_return_val_if_fail(c!=NULL,NULL); - retval = g_new0(GCalConduitCfg,1); - retval->sync_type = c->sync_type; - retval->open_secret = c->open_secret; - retval->pilotId = c->pilotId; - return retval; -} - -/* Destroys any data allocated by gcalconduit_load_configuration - and deallocates the given configuration. */ -static void -gcalconduit_destroy_configuration(GCalConduitCfg **c) -{ - g_return_if_fail(c!=NULL); - g_return_if_fail(*c!=NULL); - g_free(*c); - *c = NULL; -} - -/* Given a GCalConduitContxt*, allocates the structure */ -static void -gcalconduit_new_context(GCalConduitContext **ctxt, - GCalConduitCfg *c) -{ - *ctxt = g_new0(GCalConduitContext,1); - g_assert(ctxt!=NULL); - (*ctxt)->cfg = c; - CORBA_exception_init (&((*ctxt)->ev)); -} - -/* Destroys any data allocated by gcalconduit_new_context - and deallocates its data. */ -static void -gcalconduit_destroy_context(GCalConduitContext **ctxt) -{ - g_return_if_fail(ctxt!=NULL); - g_return_if_fail(*ctxt!=NULL); -/* - if ((*ctxt)->cfg!=NULL) - gcalconduit_destroy_configuration(&((*ctxt)->cfg)); -*/ - g_free(*ctxt); - *ctxt = NULL; -} -#endif __CALENDAR_CONDUIT_H__ diff --git a/calendar/gui/calendar-control.gnorba b/calendar/gui/calendar-control.gnorba deleted file mode 100644 index ed504d8f5b..0000000000 --- a/calendar/gui/calendar-control.gnorba +++ /dev/null @@ -1,11 +0,0 @@ -[control-factory:calendar] -type=exe -repo_id=IDL:Bonobo/GenericFactory:1.0 -description=Factory for the sample Calendar control -location_info=evolution-calendar - -[control:calendar] -type=factory -repo_id=IDL:BonoboControl/calendar-control:1.0 IDL:Bonobo/Control:1.0 -description=A sample Bonobo control which displays an calendar. -location_info=control-factory:calendar diff --git a/calendar/gui/calendar-control.oafinfo b/calendar/gui/calendar-control.oafinfo deleted file mode 100644 index fb0f138caf..0000000000 --- a/calendar/gui/calendar-control.oafinfo +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/calendar/gui/calendar-pilot-sync.c b/calendar/gui/calendar-pilot-sync.c deleted file mode 100644 index 7378f796fd..0000000000 --- a/calendar/gui/calendar-pilot-sync.c +++ /dev/null @@ -1,658 +0,0 @@ -/* - * calendar-pilot-sync.c: - * - * (C) 1999 International GNOME Support - * - * Author: - * Miguel de Icaza (miguel@gnome-support.com) - * - */ -#include -#include -#include -#include -#include -#include -#include -#include "calobj.h" -/* #include "calendar.h" DELETE */ -#include "timeutil.h" -#include "GnomeCal.h" -#include "pi-source.h" -#include "pi-socket.h" -#include "pi-datebook.h" -#include "pi-dlp.h" - -/* the CORBA ORB */ -CORBA_ORB orb; - -/* The default port to communicate with */ -char *pilot_port = "/dev/pilot"; - -CORBA_Environment ev; - -/* Our pi-socket address where we connect to */ -struct pi_sockaddr addr; - -/* The Pilot DB identifier for DateBook */ -int db; - -/* If true, enable debug output for alarms */ -int debug_alarms = 0; - -/* True if you want to dump the flags bits from the records */ -int debug_attrs = 0; - -/* Default values for alarms */ -CalendarAlarm alarm_defaults[4] = { - { ALARM_MAIL, 0, 15, ALARM_MINUTES }, - { ALARM_PROGRAM, 0, 15, ALARM_MINUTES }, - { ALARM_DISPLAY, 0, 15, ALARM_MINUTES }, - { ALARM_AUDIO, 0, 15, ALARM_MINUTES } -}; - -int only_desktop_to_pilot = 0; - -int only_pilot_to_desktop = 0; - -const struct poptOption calendar_sync_options [] = { - { "pilot", 0, POPT_ARG_STRING, &pilot_port, 0, - N_("Specifies the port on which the Pilot is"), N_("PORT") }, - { "debug-attrs", 0, POPT_ARG_NONE, &debug_attrs, 0, - N_("If you want to debug the attributes on records"), NULL }, - { "only-desktop", 0, POPT_ARG_NONE, &only_desktop_to_pilot, 0, - N_("Only syncs from desktop to pilot"), NULL }, - { "only-pilot", 0, POPT_ARG_INT, &only_pilot_to_desktop, 0, - N_("Only syncs from pilot to desktop"), NULL }, - { NULL, '\0', 0, NULL, 0 } -}; - -static void -conduit_free_Appointment (struct Appointment *a) -{ - /* free_Appointment is brain-dead with respect to guarding against - double-frees */ - - free_Appointment (a); - a->exception = 0; - a->description = 0; - a->note = 0; -} - -static int -setup_connection (void) -{ - int socket; - int ret, news; - - if (!(socket = pi_socket(PI_AF_SLP, PI_SOCK_STREAM, PI_PF_PADP))) - g_error (_("Can not create Pilot socket\n")); - - addr.pi_family = PI_AF_SLP; - strncpy ((void *) &addr.pi_device, pilot_port, sizeof (addr.pi_device)); - - ret = pi_bind (socket, (struct sockaddr *)&addr, sizeof (addr)); - if (ret == -1) - g_error (_("Can not bind to device %s\n"), pilot_port); - - if (pi_listen (socket, 1) == -1) - g_error (_("Failed to get a connection from the Pilot device")); - - if ((news = pi_accept (socket, 0, 0)) == -1) - g_error (_("pi_accept failed")); - - return news; -} - -static GNOME_Calendar_Repository -locate_calendar_server (void) -{ - GNOME_Calendar_Repository repo; - - repo = goad_server_activate_with_id ( - NULL, "IDL:GNOME:Calendar:Repository:1.0", - 0, NULL); - - if (repo == CORBA_OBJECT_NIL) - g_error ("Can not communicate with GnomeCalendar server"); - - if (ev._major != CORBA_NO_EXCEPTION){ - printf ("Exception: %s\n", CORBA_exception_id (&ev)); - abort (); - } - - return repo; -} - -static void -delete_record (GNOME_Calendar_Repository repo, int id) -{ - char *uid; - - uid = GNOME_Calendar_Repository_get_id_from_pilot_id (repo, id, &ev); - - /* The record was already deleted */ - if (ev._major != CORBA_NO_EXCEPTION) - return; - - GNOME_Calendar_Repository_delete_object (repo, uid, &ev); - CORBA_free (uid); -} - -static void -update_record (GNOME_Calendar_Repository repo, int id, struct Appointment *a, int attr) -{ - char *vcal_string; - iCalObject *obj; - int i; - char *str; - - obj = ical_new (a->note ? a->note : "", - g_get_user_name (), - a->description ? a->description : ""); - - printf ("requesting %d [%s]\n", id, a->description); - vcal_string = GNOME_Calendar_Repository_get_object_by_pilot_id (repo, id, &ev); - - if (ev._major == CORBA_USER_EXCEPTION){ - time_t now = time (NULL); - - obj->created = now; - obj->last_mod = now; - obj->priority = 0; - obj->transp = 0; - obj->related = NULL; - obj->pilot_id = id; - obj->pilot_status = ICAL_PILOT_SYNC_NONE; - printf (_("\tObject did not exist, creating a new one\n")); - } else { - printf ("\tFound\n"); - obj = ical_object_new_from_string (vcal_string); - } - - if (obj->pilot_status == ICAL_PILOT_SYNC_MOD){ - printf (_("\tObject has been modified on desktop and on the pilot, desktop takes precedence\n")); - ical_object_destroy (obj); - return; - } - - /* - * Begin and end - */ - - if (a->event) - { - /* turn day-long events into a full day's appointment */ - a->begin.tm_sec = 0; - a->begin.tm_min = 0; - a->begin.tm_hour = 6; - - a->end.tm_sec = 0; - a->end.tm_min = 0; - a->end.tm_hour = 10; - } - - obj->dtstart = mktime (&a->begin); - obj->dtend = mktime (&a->end); - - /* Special case: daily repetitions are converted to a multi-day event */ - if (a->repeatType == repeatDaily){ - time_t newt = time_add_day (obj->dtend, a->repeatFrequency); - - obj->dtend = newt; - } - - /* - * Alarm - */ - if (a->alarm){ - obj->aalarm.type = ALARM_AUDIO; - obj->aalarm.enabled = 1; - obj->aalarm.count = a->advance; - - switch (a->advanceUnits){ - case advMinutes: - obj->aalarm.units = ALARM_MINUTES; - break; - - case advHours: - obj->aalarm.units = ALARM_HOURS; - break; - - case advDays: - obj->aalarm.units = ALARM_DAYS; - break; - default: - } - } - - /* - * Recurrence - */ - if (a->repeatFrequency && a->repeatType != repeatDaily){ - obj->recur = g_new0 (Recurrence, 1); - - switch (a->repeatType){ - case repeatDaily: - /* - * In the Pilot daily repetitions are actually - * multi-day events - */ - g_warning ("Should not have got here"); - break; - - case repeatMonthlyByDate: - obj->recur->type = RECUR_MONTHLY_BY_DAY; - obj->recur->u.month_day = a->repeatFrequency; - break; - - case repeatWeekly: - { - int wd; - - obj->recur->type = RECUR_WEEKLY; - for (wd = 0; wd < 7; wd++) - if (a->repeatDays [wd]) - obj->recur->weekday |= 1 << wd; - - if (obj->recur->weekday == 0){ - struct tm tm = *localtime (&obj->dtstart); - - obj->recur->weekday = 1 << tm.tm_wday; - } - break; - } - - case repeatMonthlyByDay: - obj->recur->type = RECUR_MONTHLY_BY_POS; - obj->recur->u.month_pos = a->repeatFrequency; - obj->recur->weekday = (a->repeatDay / 7); - break; - - case repeatYearly: - obj->recur->type = RECUR_YEARLY_BY_DAY; - break; - - default: - g_warning ("Unhandled repeate case"); - } - - if (a->repeatForever) - obj->recur->duration = 0; - else - obj->recur->_enddate = mktime (&a->repeatEnd); - } - - /* - * Load exception dates - */ - obj->exdate = NULL; - for (i = 0; i < a->exceptions; i++){ - time_t *t = g_new (time_t, 1); - - *t = mktime (&(a->exception [i])); - obj->exdate = g_list_prepend (obj->exdate, t); - } - - g_free (obj->class); - - if (attr & dlpRecAttrSecret) - obj->class = g_strdup ("PRIVATE"); - else - obj->class = g_strdup ("PUBLIC"); - - /* - * Now, convert the in memory iCalObject to a full vCalendar we can send - */ - str = calendar_string_from_object (obj); - - GNOME_Calendar_Repository_update_object (repo, obj->uid, str, &ev); - - free (str); - - /* - * Shutdown - */ - ical_object_destroy (obj); -} - -/* - * Sets the alarm for Appointment based on @alarm - */ -static int -try_alarm (CalendarAlarm *alarm, struct Appointment *a) -{ - if (!alarm->enabled) - return 0; - - a->advance = alarm->count; - switch (alarm->type){ - case ALARM_DAYS: - a->advanceUnits = advDays; - break; - - case ALARM_HOURS: - a->advanceUnits = advHours; - break; - - case ALARM_MINUTES: - a->advanceUnits = advMinutes; - break; - - default: - return 0; - } - a->alarm = 1; - return 1; -} - -static void -sync_object_to_pilot (GNOME_Calendar_Repository repo, iCalObject *obj, int pilot_fd) -{ - char buffer [65536]; - struct Appointment *a; - int wd, i, idx, attr, cat, rec_len; - recordid_t new_id; - GList *l; - - a = g_new0 (struct Appointment, 1); - - attr = 0; - cat = 0; - idx = 0; - - if (obj->pilot_id){ - rec_len = dlp_ReadRecordById (pilot_fd, db, obj->pilot_id, - buffer, &idx, &rec_len, &attr, &cat); - - if (rec_len > 0) - unpack_Appointment (a, buffer, rec_len); - } else { - attr = 0; - cat = 0; - } - - /* a contains the appointment either cleared or with the data from the Pilot */ - a->begin = *localtime (&obj->dtstart); - a->end = *localtime (&obj->dtend); - - /* FIXME: add support for timeless */ - a->event = 0; - - /* Alarms, try the various ones. Probably we should only do Audio? - * Otherwise going gnomecal->pilot->gnomecal would get the gnomecal - * with *possibly* an alarm that was not originally defined. - */ - a->alarm = 0; - if (try_alarm (&obj->aalarm, a) == 0) - if (try_alarm (&obj->dalarm, a) == 0) - try_alarm (&obj->palarm, a); - - /* Recurrence */ - if (obj->recur){ - a->repeatFrequency = obj->recur->interval; - - switch (obj->recur->type){ - case RECUR_MONTHLY_BY_POS: - a->repeatType = repeatMonthlyByDay; - a->repeatFrequency = obj->recur->u.month_pos; - a->repeatDay = obj->recur->weekday * 7; - break; - - case RECUR_MONTHLY_BY_DAY: - a->repeatType = repeatMonthlyByDate; - a->repeatFrequency = obj->recur->u.month_day; - break; - - case RECUR_YEARLY_BY_DAY: - a->repeatType = repeatYearly; - break; - - case RECUR_WEEKLY: - for (wd = 0; wd < 7; wd++) - if (obj->recur->weekday & (1 << wd)) - a->repeatDays [wd] = 1; - a->repeatType = repeatWeekly; - break; - case RECUR_DAILY: - - default: - a->repeatType = repeatNone; - break; - } - if (obj->recur->enddate == 0){ - a->repeatForever = 1; - } else - a->repeatEnd = *localtime (&obj->recur->enddate); - } - - /* - * Pilot uses a repeat-daily for a multi-day event, adjust for that case - */ - if ((a->end.tm_mday != a->begin.tm_mday) || - (a->end.tm_mon != a->begin.tm_mon) || - (a->end.tm_year != a->begin.tm_year)){ - a->event = 1; - a->begin.tm_sec = 0; - a->begin.tm_min = 0; - a->begin.tm_hour = 0; - - a->end.tm_sec = 0; - a->end.tm_min = 0; - a->end.tm_hour = 0; - - a->repeatEnd = a->end; - a->repeatForever = 0; - a->repeatFrequency = 1; - a->repeatType = repeatDaily; - } - - /* - * Exceptions - */ - a->exceptions = g_list_length (obj->exdate); - a->exception = (struct tm *) malloc (sizeof (struct tm) * a->exceptions); - for (i = 0, l = obj->exdate; l; l = l->next, i++){ - time_t *exdate = l->data; - - a->exception [i] = *localtime (exdate); - } - - /* - * Description and note. - * - * We use strdup to be correct. free_Appointment assumes we used - * malloc. - */ - if (obj->comment) - a->note = strdup (obj->comment); - else - a->note = 0; - - if (obj->summary) - a->description = strdup (obj->summary); - else - a->description = strdup (_("No description")); - - if (strcmp (obj->class, "PUBLIC") != 0) - attr |= dlpRecAttrSecret; - else - attr &= ~dlpRecAttrSecret; - - /* - * Send the appointment to the pilot - */ - rec_len = pack_Appointment (a, buffer, sizeof (buffer)); - attr &= ~dlpRecAttrDirty; - - dlp_WriteRecord ( - pilot_fd, db, 0, - obj->pilot_id, 0, buffer, rec_len, &new_id); - - GNOME_Calendar_Repository_update_pilot_id (repo, obj->uid, new_id, ICAL_PILOT_SYNC_NONE, &ev); - - conduit_free_Appointment (a); - g_free (a); -} - -static void -sync_cal_to_pilot (GNOME_Calendar_Repository repo, Calendar *cal, int pilot_fd) -{ - GList *l; - int c = g_list_length (cal->events); - int i; - - printf ("\n"); - for (i = 0, l = cal->events; l; l = l->next, i++){ - iCalObject *obj = l->data; - - printf ("Syncing desktop to pilot: %d/%d\r", i + 1, c); - fflush (stdout); - if (obj->pilot_status != ICAL_PILOT_SYNC_MOD){ - g_warning ("Strange, we were supposed to get only a dirty object"); - continue; - } - - sync_object_to_pilot (repo, obj, pilot_fd); - } - printf ("\n"); -} - -static void -dump_attr (int flags) -{ - if (flags & dlpRecAttrDeleted) - fprintf(stderr, " Deleted"); - if (flags & dlpRecAttrDirty) - fprintf(stderr, " Dirty"); - if (flags & dlpRecAttrBusy) - fprintf(stderr, " Busy"); - if (flags & dlpRecAttrSecret) - fprintf(stderr, " Secret"); - if (flags & dlpRecAttrArchived) - fprintf(stderr, " Archive"); - fprintf (stderr, "\n"); -} - -static void -sync_pilot (GNOME_Calendar_Repository repo, int pilot_fd) -{ - struct PilotUser user_info; - int record; - unsigned char buffer [65536]; - Calendar *dirty_cal; - char *vcalendar_string; - char *error; - - printf (_("Syncing with the pilot...")); - dlp_ReadUserInfo (pilot_fd, &user_info); - - /* This informs the user of the progress on the Pilot */ - dlp_OpenConduit (pilot_fd); - - if (dlp_OpenDB (pilot_fd, 0, 0x80 | 0x40, "DatebookDB", &db) < 0){ - g_warning (_("Could not open DatebookDB on the Pilot")); - dlp_AddSyncLogEntry (pilot_fd, _("Unable to open DatebookDB")); - pi_close (pilot_fd); - exit (1); - } - - /* - * 1. Pull all the records from the Pilot, and make any updates - * required on the desktop side - */ - if (!only_desktop_to_pilot){ - for (record = 0;; record++){ - struct Appointment a; - int rec_len, attr, size; - recordid_t id; - - rec_len = dlp_ReadRecordByIndex ( - pilot_fd, db, - record, buffer, &id, &size, &attr, 0); - - if (rec_len < 0) - break; - - printf ("processing record %d\n", record); - unpack_Appointment (&a, buffer, rec_len); - - if (debug_attrs) - dump_attr (attr); - - /* If the object was deleted, remove it from the database */ - if (attr & dlpRecAttrDeleted){ - printf ("Deleting id %ld\n", id); - delete_record (repo, id); - conduit_free_Appointment (&a); - dlp_DeleteRecord (pilot_fd, db, 0, id); - continue; - } - - if (attr & dlpRecAttrArchived) - continue; - - printf ("updating record\n"); - update_record (repo, id, &a, attr); - - conduit_free_Appointment (&a); - } - } - - /* - * 2. Pull all the records from the Calendar, and move any new items - * to the pilot - */ - if (!only_pilot_to_desktop){ - vcalendar_string = GNOME_Calendar_Repository_get_updated_objects (repo, &ev); - dirty_cal = calendar_new ("Temporal",CALENDAR_INIT_NIL); - error = calendar_load_from_memory (dirty_cal, vcalendar_string); - if (!error) - sync_cal_to_pilot (repo, dirty_cal, pilot_fd); - calendar_destroy (dirty_cal); - } - - - dlp_CloseDB (pilot_fd, db); - dlp_AddSyncLogEntry (pilot_fd, _("Synced DateBook from Pilot to GnomeCal")); - pi_close (pilot_fd); -} - -int -main (int argc, char *argv []) -{ - int link; - GNOME_Calendar_Repository repository; - - CORBA_exception_init (&ev); - orb = gnome_CORBA_init_with_popt_table ( - "calendar-pilot-sync", VERSION, &argc, argv, - calendar_sync_options, 0, NULL, 0, &ev); - - printf ("Please, press HotSync button on the palm..."); - fflush (stdout); - link = setup_connection (); - printf ("Connected\n"); - - printf ("Launching GnomeCal..."); - fflush (stdout); - repository = locate_calendar_server (); - printf ("Done\n"); - - printf ("\n"); - sync_pilot (repository, link); - printf ("\n"); - - GNOME_Calendar_Repository_done (repository, &ev); - - CORBA_exception_free (&ev); - - return 0; -} - -/* Just a stub to link with */ -void -calendar_notify (time_t time, CalendarAlarm *which, void *data) -{ -} - diff --git a/calendar/gui/component-factory.c b/calendar/gui/component-factory.c deleted file mode 100644 index 1509f70457..0000000000 --- a/calendar/gui/component-factory.c +++ /dev/null @@ -1,98 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* component-factory.c - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include "evolution-shell-component.h" -#include "component-factory.h" -#include "control-factory.h" - - -#ifdef USING_OAF -#define COMPONENT_FACTORY_ID "OAFIID:evolution-shell-component-factory:evolution-calendar:cba77062-1466-4aac-8ce7-b019eaf2e921" -#else -#define COMPONENT_FACTORY_ID "evolution-shell-component-factory:evolution-calendar" -#endif - -static BonoboGenericFactory *factory = NULL; - -static const EvolutionShellComponentFolderType folder_types[] = { - { "calendar", "evolution-calendar.png" }, - { NULL, NULL } -}; - - -/* EvolutionShellComponent methods and signals. */ - -static BonoboControl * -create_view (EvolutionShellComponent *shell_component, - const char *physical_uri, - void *closure) -{ - BonoboControl *control; - - control = control_factory_new_control (); - bonobo_control_set_property (control, "folder_uri", physical_uri, NULL); - - return control; -} - -static void -owner_set_cb (EvolutionShellComponent *shell_component, - Evolution_Shell shell_interface) -{ - g_print ("evolution-calendar: Yeeeh! We have an owner!\n"); /* FIXME */ -} - - -/* The factory function. */ - -static BonoboObject * -factory_fn (BonoboGenericFactory *factory, - void *closure) -{ - EvolutionShellComponent *shell_component; - - shell_component = evolution_shell_component_new (folder_types, create_view, NULL); - - gtk_signal_connect (GTK_OBJECT (shell_component), "owner_set", - GTK_SIGNAL_FUNC (owner_set_cb), NULL); - - return BONOBO_OBJECT (shell_component); -} - - -void -component_factory_init (void) -{ - if (factory != NULL) - return; - - factory = bonobo_generic_factory_new (COMPONENT_FACTORY_ID, factory_fn, NULL); - - if (factory == NULL) - g_error ("Cannot initialize Evolution's calendar component."); -} diff --git a/calendar/gui/component-factory.h b/calendar/gui/component-factory.h deleted file mode 100644 index f83a849452..0000000000 --- a/calendar/gui/component-factory.h +++ /dev/null @@ -1,29 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* component-factory.h - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -#ifndef _COMPONENT_FACTORY_H_ -#define _COMPONENT_FACTORY_H_ - -void component_factory_init (void); - -#endif /* _COMPONENT_FACTORY_H_ */ diff --git a/calendar/gui/control-factory.c b/calendar/gui/control-factory.c deleted file mode 100644 index a55d0dac79..0000000000 --- a/calendar/gui/control-factory.c +++ /dev/null @@ -1,193 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* control-factory.c - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include -#include -#include -#include -#include - -#ifdef USING_OAF -#include -#else -#include -#endif - -#include -#include -#include -#include -#include - -#include "control-factory.h" - -#define PROPERTY_CALENDAR_URI "folder_uri" - -#define PROPERTY_CALENDAR_URI_IDX 1 - -#ifdef USING_OAF -#define CONTROL_FACTORY_ID "OAFIID:control-factory:calendar:f4f90989-0f50-4af2-ad94-8bbdf331f0bc" -#else -#define CONTROL_FACTORY_ID "control-factory:calendar" -#endif - - -CORBA_Environment ev; -CORBA_ORB orb; - - -static void -control_activate_cb (BonoboControl *control, - gboolean activate, - gpointer user_data) -{ - if (activate) - calendar_control_activate (control, user_data); - else - calendar_control_deactivate (control); -} - - -static void -get_prop (BonoboPropertyBag *bag, - BonoboArg *arg, - guint arg_id, - gpointer user_data) -{ - /*GnomeCalendar *gcal = user_data;*/ - - switch (arg_id) { - - case PROPERTY_CALENDAR_URI_IDX: - /* - if (fb && fb->uri) - BONOBO_ARG_SET_STRING (arg, fb->uri); - else - BONOBO_ARG_SET_STRING (arg, ""); - */ - break; - - default: - g_warning ("Unhandled arg %d\n", arg_id); - } -} - - -static void -set_prop (BonoboPropertyBag *bag, - const BonoboArg *arg, - guint arg_id, - gpointer user_data) -{ - GnomeCalendar *gcal = user_data; - char *filename; - - switch (arg_id) { - - case PROPERTY_CALENDAR_URI_IDX: - printf ("set_prop: '%s'\n", BONOBO_ARG_GET_STRING (arg)); - filename = g_strdup_printf ("%s/calendar.vcf", - BONOBO_ARG_GET_STRING (arg)); - calendar_set_uri (gcal, filename); - g_free (filename); - break; - - default: - g_warning ("Unhandled arg %d\n", arg_id); - break; - } -} - - -static void -calendar_properties_init (GnomeCalendar *gcal) -{ - gcal->properties = bonobo_property_bag_new (get_prop, set_prop, gcal); - - bonobo_property_bag_add (gcal->properties, - PROPERTY_CALENDAR_URI, - PROPERTY_CALENDAR_URI_IDX, - BONOBO_ARG_STRING, - NULL, - _("The URI that the calendar will display"), - 0); - - bonobo_control_set_property_bag (gcal->control, gcal->properties); -} - - -static BonoboControl * -create_control (void) -{ - BonoboControl *control; - GnomeCalendar *cal; - - cal = new_calendar (full_name, NULL, NULL, 0); - gtk_widget_show (GTK_WIDGET (cal)); - - control = bonobo_control_new (GTK_WIDGET (cal)); - cal->control = control; - - calendar_properties_init (cal); - - gtk_signal_connect (GTK_OBJECT (control), "activate", - control_activate_cb, cal); - - return control; -} - - -static BonoboObject * -control_factory (BonoboGenericFactory *Factory, void *closure) -{ - return BONOBO_OBJECT (create_control ()); -} - - -void -control_factory_init (void) -{ - static BonoboGenericFactory *factory = NULL; - - if (factory != NULL) - return; - - puts ("XXXXXX - initializing calendar factory!!!"); - - factory = bonobo_generic_factory_new (CONTROL_FACTORY_ID, control_factory, NULL); - - if (factory == NULL) - g_error ("I could not register a Calendar control factory."); -} - - -BonoboControl * -control_factory_new_control (void) -{ - return create_control (); -} diff --git a/calendar/gui/control-factory.h b/calendar/gui/control-factory.h deleted file mode 100644 index bacd2d3d90..0000000000 --- a/calendar/gui/control-factory.h +++ /dev/null @@ -1,30 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* control-factory.c - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Federico Mena Quintero - */ - -#ifndef _CONTROL_FACTORY_H_ -#define _CONTROL_FACTORY_H_ - -void control_factory_init (void); -BonoboControl *control_factory_new_control (void); - -#endif /* _CONTROL_FACTORY_H_ */ diff --git a/calendar/gui/dayview.xpm b/calendar/gui/dayview.xpm deleted file mode 100644 index bc8e74e4d6..0000000000 --- a/calendar/gui/dayview.xpm +++ /dev/null @@ -1,42 +0,0 @@ -/* XPM */ -static char * dayview_xpm[] = { -"24 24 15 1", -" c None", -". c #000000", -"+ c #FFFFFF", -"@ c #D1D1D1", -"# c #AAAFE2", -"$ c #C7CAEB", -"% c #A3A6C7", -"& c #0010A8", -"* c #555FC5", -"= c #1725AC", -"- c #4550B5", -"; c #E3E4F5", -"> c #8B90C3", -", c #3945BB", -"' c #BABBCC", -" ", -" ", -" ", -" ", -" ...................... ", -" .............+.++.++.. ", -" .++@++@++@++@++@++@++. ", -" .++@++@++@++@++@++@++. ", -" .@@@@@@@@@@@@@@@@@@@@. ", -" .++@++@++@#$@++@++@++. ", -" .++@++@++%&*@++@++@++. ", -" .@@@@@@@%=&-@@@@@@@@@. ", -" .++@++@++@&*@++@++@++. ", -" .++@++@++@&*@++@++@++. ", -" .@@@@@@@@@&-@@@@@@@@@. ", -" .++@++@++@&*@++@++@++. ", -" .++@++@+;>&,>++@++@++. ", -" .@@@@@@@'>>>>@@@@@@@@. ", -" .++@++@++@++@++@++@++. ", -" .++@++@++@++@++@++@++. ", -" ...................... ", -" ", -" ", -" "}; diff --git a/calendar/gui/dialogs/.cvsignore b/calendar/gui/dialogs/.cvsignore deleted file mode 100644 index e995588475..0000000000 --- a/calendar/gui/dialogs/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -.deps -Makefile -Makefile.in diff --git a/calendar/gui/dialogs/Makefile.am b/calendar/gui/dialogs/Makefile.am deleted file mode 100644 index 6caf99e8f5..0000000000 --- a/calendar/gui/dialogs/Makefile.am +++ /dev/null @@ -1,27 +0,0 @@ -gladedir = $(datadir)/evolution/glade - -INCLUDES = \ - -DG_LOG_DOMAIN=\"calendar-gui\" \ - -I$(top_srcdir) \ - -I$(top_srcdir)/calendar \ - -I$(top_srcdir)/libical/src/libical \ - -I$(includedir) \ - -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \ - $(BONOBO_VFS_GNOME_CFLAGS) \ - -DGNOMELOCALEDIR=\""$(datadir)/locale"\" - -noinst_LIBRARIES = libcal-dialogs.a - -libcal_dialogs_a_SOURCES = \ - alarm-notify-dialog.c \ - alarm-notify-dialog.h - -glade_DATA = \ - alarm-notify.glade - -glade_messages = \ - alarm-notify.glade.h - -EXTRA_DIST = \ - $(glade_DATA) \ - $(glade_messages) diff --git a/calendar/gui/dialogs/alarm-notify-dialog.c b/calendar/gui/dialogs/alarm-notify-dialog.c deleted file mode 100644 index 931ab0bfac..0000000000 --- a/calendar/gui/dialogs/alarm-notify-dialog.c +++ /dev/null @@ -1,218 +0,0 @@ -/* Evolution calendar - alarm notification dialog - * - * Copyright (C) 2000 Helix Code, Inc. - * - * Author: Federico Mena-Quintero - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. - */ - -#include -#include -#include -#include -#include -#include -#include "alarm-notify-dialog.h" - - - -/* The useful contents of the alarm notify dialog */ -typedef struct { - GladeXML *xml; - - GtkWidget *dialog; - GtkWidget *close; - GtkWidget *snooze; - GtkWidget *edit; - GtkWidget *heading; - GtkWidget *summary; - GtkWidget *snooze_time; - - AlarmNotifyFunc func; - gpointer func_data; -} AlarmNotify; - - - -/* Callback used when the notify dialog is destroyed */ -static void -dialog_destroy_cb (GtkObject *object, gpointer data) -{ - AlarmNotify *an; - - an = data; - gtk_object_unref (GTK_OBJECT (an->xml)); - g_free (an); -} - -/* Delete_event handler for the alarm notify dialog */ -static gint -delete_event_cb (GtkWidget *widget, GdkEvent *event, gpointer data) -{ - AlarmNotify *an; - - an = data; - g_assert (an->func != NULL); - - (* an->func) (ALARM_NOTIFY_CLOSE, -1, an->func_data); - - gtk_widget_destroy (widget); - return TRUE; -} - -/* Callback for the close button */ -static void -close_clicked_cb (GtkWidget *widget, gpointer data) -{ - AlarmNotify *an; - - an = data; - g_assert (an->func != NULL); - - (* an->func) (ALARM_NOTIFY_CLOSE, -1, an->func_data); - - gtk_widget_destroy (an->dialog); -} - -/* Callback for the snooze button */ -static void -snooze_clicked_cb (GtkWidget *widget, gpointer data) -{ - AlarmNotify *an; - int snooze_time; - - an = data; - g_assert (an->func != NULL); - - snooze_time = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (an->snooze_time)); - (* an->func) (ALARM_NOTIFY_SNOOZE, snooze_time, an->func_data); - - gtk_widget_destroy (an->dialog); -} - -/* Callback for the edit button */ -static void -edit_clicked_cb (GtkWidget *widget, gpointer data) -{ - AlarmNotify *an; - - an = data; - g_assert (an->func != NULL); - - (* an->func) (ALARM_NOTIFY_EDIT, -1, an->func_data); - - gtk_widget_destroy (an->dialog); -} - -/** - * alarm_notify_dialog: - * @func: Function to be called when a dialog action is invoked. - * @data: Closure data for @func. - * - * Runs the alarm notification dialog. The specified @func will be used to - * notify the client about result of the actions in the dialog. - * - * Return value: TRUE on success, FALSE if the dialog could not be created. - **/ -gboolean -alarm_notify_dialog (time_t trigger, time_t occur, iCalObject *ico, - AlarmNotifyFunc func, gpointer func_data) -{ - AlarmNotify *an; - char buf[256]; - struct tm tm_trigger; - struct tm tm_occur; - - g_return_val_if_fail (trigger != -1, FALSE); - g_return_val_if_fail (occur != -1, FALSE); - g_return_val_if_fail (ico != NULL, FALSE); - g_return_val_if_fail (func != NULL, FALSE); - - an = g_new0 (AlarmNotify, 1); - - an->func = func; - an->func_data = func_data; - - an->xml = glade_xml_new (EVOLUTION_GLADEDIR "/alarm-notify.glade", NULL); - if (!an->xml) { - g_message ("alarm_notify_dialog(): Could not load the Glade XML file!"); - g_free (an); - return FALSE; - } - - an->dialog = glade_xml_get_widget (an->xml, "alarm-notify"); - an->close = glade_xml_get_widget (an->xml, "close"); - an->snooze = glade_xml_get_widget (an->xml, "snooze"); - an->edit = glade_xml_get_widget (an->xml, "edit"); - an->heading = glade_xml_get_widget (an->xml, "heading"); - an->summary = glade_xml_get_widget (an->xml, "summary"); - an->snooze_time = glade_xml_get_widget (an->xml, "snooze-time"); - - if (!(an->dialog && an->close && an->snooze && an->edit && an->heading && an->summary - && an->snooze_time)) { - g_message ("alarm_notify_dialog(): Could not find all widgets in Glade file!"); - gtk_object_unref (GTK_OBJECT (an->xml)); - g_free (an); - return FALSE; - } - - gtk_object_set_data (GTK_OBJECT (an->dialog), "alarm-notify", an); - gtk_signal_connect (GTK_OBJECT (an->dialog), "destroy", - GTK_SIGNAL_FUNC (dialog_destroy_cb), an); - - /* Title */ - - /* FIXME: use am_pm_flag or 24-hour time */ - - tm_trigger = *localtime (&trigger); - strftime (buf, sizeof (buf), _("Alarm on %A %b %d %Y %H:%M"), &tm_trigger); - gtk_window_set_title (GTK_WINDOW (an->dialog), buf); - - /* Heading */ - - tm_occur = *localtime (&occur); - strftime (buf, sizeof (buf), - _("Notification about your appointment on %A %b %d %Y %H:%M"), - &tm_occur); - gtk_label_set_text (GTK_LABEL (an->heading), buf); - - /* Summary */ - - gtk_label_set_text (GTK_LABEL (an->summary), ico->summary); - - /* Connect actions */ - - gtk_signal_connect (GTK_OBJECT (an->dialog), "delete_event", - GTK_SIGNAL_FUNC (delete_event_cb), - an); - - gtk_signal_connect (GTK_OBJECT (an->close), "clicked", - GTK_SIGNAL_FUNC (close_clicked_cb), - an); - - gtk_signal_connect (GTK_OBJECT (an->snooze), "clicked", - GTK_SIGNAL_FUNC (snooze_clicked_cb), - an); - - gtk_signal_connect (GTK_OBJECT (an->edit), "clicked", - GTK_SIGNAL_FUNC (edit_clicked_cb), - an); - - /* Run! */ - - gtk_widget_show (an->dialog); - return TRUE; -} diff --git a/calendar/gui/dialogs/alarm-notify-dialog.h b/calendar/gui/dialogs/alarm-notify-dialog.h deleted file mode 100644 index 770768f59c..0000000000 --- a/calendar/gui/dialogs/alarm-notify-dialog.h +++ /dev/null @@ -1,44 +0,0 @@ -/* Evolution calendar - alarm notification dialog - * - * Copyright (C) 2000 Helix Code, Inc. - * - * Author: Federico Mena-Quintero - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. - */ - -#ifndef ALARM_NOTIFY_DIALOG_H -#define ALARM_NOTIFY_DIALOG_H - -#include -#include -#include - - - -typedef enum { - ALARM_NOTIFY_CLOSE, - ALARM_NOTIFY_SNOOZE, - ALARM_NOTIFY_EDIT -} AlarmNotifyResult; - -typedef void (* AlarmNotifyFunc) (AlarmNotifyResult result, int snooze_mins, gpointer data); - -gboolean alarm_notify_dialog (time_t trigger, time_t occur, iCalObject *ico, - AlarmNotifyFunc func, gpointer func_data); - - - -#endif diff --git a/calendar/gui/dialogs/alarm-notify.glade b/calendar/gui/dialogs/alarm-notify.glade deleted file mode 100644 index 32d7e03f8b..0000000000 --- a/calendar/gui/dialogs/alarm-notify.glade +++ /dev/null @@ -1,230 +0,0 @@ - - - - - Evolution Calendar - evolution-calendar - - src - pixmaps - C - True - True - False - True - True - True - True - interface.c - interface.h - callbacks.c - callbacks.h - support.c - support.h - True - alarm-notify.glade.h - - - - GtkWindow - alarm-notify - True - - GTK_WINDOW_DIALOG - GTK_WIN_POS_CENTER - False - False - False - False - - - GtkVBox - vbox2 - 4 - True - False - 4 - - - GtkHBox - hbox3 - True - False - 8 - - 0 - True - True - - - - GtkVBox - vbox5 - True - False - 4 - - 0 - True - True - - - - GtkLabel - heading - True - - GTK_JUSTIFY_LEFT - True - 0 - 0.5 - 0 - 0 - - 0 - False - False - - - - - GtkLabel - summary - True - - GTK_JUSTIFY_LEFT - True - 0 - 0.5 - 0 - 0 - - 0 - False - False - - - - - - GtkVBox - vbox4 - True - False - 4 - - 0 - True - True - - - - GtkButton - close - True - True - - - 0 - False - False - - - - - GtkButton - snooze - True - True - - - 0 - False - False - - - - - GtkButton - edit - True - True - - - 0 - False - False - - - - - - - GtkHSeparator - hseparator1 - True - - 0 - True - True - - - - - GtkHBox - hbox4 - True - False - 4 - - 0 - True - True - - - - GtkLabel - label4 - True - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 0 - False - False - - - - - GtkSpinButton - snooze-time - True - True - 1 - 0 - False - GTK_UPDATE_ALWAYS - False - False - 5 - 1 - 1440 - 1 - 5 - 5 - - 0 - False - False - - - - - - - diff --git a/calendar/gui/dialogs/alarm-notify.glade.h b/calendar/gui/dialogs/alarm-notify.glade.h deleted file mode 100644 index c7b8918e06..0000000000 --- a/calendar/gui/dialogs/alarm-notify.glade.h +++ /dev/null @@ -1,10 +0,0 @@ -/* - * Translatable strings file generated by Glade. - * Add this file to your project's POTFILES.in. - * DO NOT compile it as part of your application. - */ - -gchar *s = N_("Close"); -gchar *s = N_("Snooze"); -gchar *s = N_("Edit appointment"); -gchar *s = N_("Snooze time (minutes)"); diff --git a/calendar/gui/e-day-view-main-item.c b/calendar/gui/e-day-view-main-item.c deleted file mode 100644 index b3a531f62e..0000000000 --- a/calendar/gui/e-day-view-main-item.c +++ /dev/null @@ -1,648 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -/* - * Author : - * Damon Chaplin - * - * Copyright 1999, Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ - -/* - * EDayViewMainItem - canvas item which displays most of the appointment - * data in the main Day/Work Week display. - */ - -#include -#include "e-day-view-main-item.h" - -static void e_day_view_main_item_class_init (EDayViewMainItemClass *class); -static void e_day_view_main_item_init (EDayViewMainItem *dvtitem); - -static void e_day_view_main_item_set_arg (GtkObject *o, GtkArg *arg, - guint arg_id); -static void e_day_view_main_item_update (GnomeCanvasItem *item, - double *affine, - ArtSVP *clip_path, int flags); -static void e_day_view_main_item_draw (GnomeCanvasItem *item, - GdkDrawable *drawable, - int x, int y, - int width, int height); -static double e_day_view_main_item_point (GnomeCanvasItem *item, - double x, double y, - int cx, int cy, - GnomeCanvasItem **actual_item); -static gint e_day_view_main_item_event (GnomeCanvasItem *item, - GdkEvent *event); - -static void e_day_view_main_item_draw_long_events_in_vbars (EDayViewMainItem *dvmitem, - GdkDrawable *drawable, - int x, - int y, - int width, - int height); -static void e_day_view_main_item_draw_events_in_vbars (EDayViewMainItem *dvmitem, - GdkDrawable *drawable, - int x, int y, - int width, int height, - gint day); -static void e_day_view_main_item_draw_day_events (EDayViewMainItem *dvmitem, - GdkDrawable *drawable, - int x, int y, - int width, int height, - gint day); -static void e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem, - GdkDrawable *drawable, - int x, int y, - int width, int height, - gint day, gint event_num); - -static GnomeCanvasItemClass *parent_class; - -/* The arguments we take */ -enum { - ARG_0, - ARG_DAY_VIEW -}; - - -GtkType -e_day_view_main_item_get_type (void) -{ - static GtkType e_day_view_main_item_type = 0; - - if (!e_day_view_main_item_type) { - GtkTypeInfo e_day_view_main_item_info = { - "EDayViewMainItem", - sizeof (EDayViewMainItem), - sizeof (EDayViewMainItemClass), - (GtkClassInitFunc) e_day_view_main_item_class_init, - (GtkObjectInitFunc) e_day_view_main_item_init, - NULL, /* reserved_1 */ - NULL, /* reserved_2 */ - (GtkClassInitFunc) NULL - }; - - e_day_view_main_item_type = gtk_type_unique (gnome_canvas_item_get_type (), &e_day_view_main_item_info); - } - - return e_day_view_main_item_type; -} - - -static void -e_day_view_main_item_class_init (EDayViewMainItemClass *class) -{ - GtkObjectClass *object_class; - GnomeCanvasItemClass *item_class; - - parent_class = gtk_type_class (gnome_canvas_item_get_type()); - - object_class = (GtkObjectClass *) class; - item_class = (GnomeCanvasItemClass *) class; - - gtk_object_add_arg_type ("EDayViewMainItem::day_view", - GTK_TYPE_POINTER, GTK_ARG_WRITABLE, - ARG_DAY_VIEW); - - object_class->set_arg = e_day_view_main_item_set_arg; - - /* GnomeCanvasItem method overrides */ - item_class->update = e_day_view_main_item_update; - item_class->draw = e_day_view_main_item_draw; - item_class->point = e_day_view_main_item_point; - item_class->event = e_day_view_main_item_event; -} - - -static void -e_day_view_main_item_init (EDayViewMainItem *dvtitem) -{ - dvtitem->day_view = NULL; -} - - -static void -e_day_view_main_item_set_arg (GtkObject *o, GtkArg *arg, guint arg_id) -{ - GnomeCanvasItem *item; - EDayViewMainItem *dvmitem; - - item = GNOME_CANVAS_ITEM (o); - dvmitem = E_DAY_VIEW_MAIN_ITEM (o); - - switch (arg_id){ - case ARG_DAY_VIEW: - dvmitem->day_view = GTK_VALUE_POINTER (*arg); - break; - } -} - - -static void -e_day_view_main_item_update (GnomeCanvasItem *item, - double *affine, - ArtSVP *clip_path, - int flags) -{ - if (GNOME_CANVAS_ITEM_CLASS (parent_class)->update) - (* GNOME_CANVAS_ITEM_CLASS (parent_class)->update) (item, affine, clip_path, flags); - - /* The item covers the entire canvas area. */ - item->x1 = 0; - item->y1 = 0; - item->x2 = INT_MAX; - item->y2 = INT_MAX; -} - - -/* - * DRAWING ROUTINES - functions to paint the canvas item. - */ - -static void -e_day_view_main_item_draw (GnomeCanvasItem *canvas_item, GdkDrawable *drawable, - int x, int y, int width, int height) -{ - EDayViewMainItem *dvmitem; - EDayView *day_view; - GtkStyle *style; - GdkGC *fg_gc, *bg_gc, *light_gc, *dark_gc, *gc; - GdkFont *font; - gint row, row_y, grid_x1, grid_x2; - gint day, grid_y1, grid_y2; - gint work_day_start_row, work_day_end_row; - gint work_day_start_y, work_day_end_y; - gint work_day_x, work_day_w; - gint start_row, end_row, rect_x, rect_y, rect_width, rect_height; - -#if 0 - g_print ("In e_day_view_main_item_draw %i,%i %ix%i\n", - x, y, width, height); -#endif - dvmitem = E_DAY_VIEW_MAIN_ITEM (canvas_item); - day_view = dvmitem->day_view; - g_return_if_fail (day_view != NULL); - - style = GTK_WIDGET (day_view)->style; - font = style->font; - fg_gc = style->fg_gc[GTK_STATE_NORMAL]; - bg_gc = style->bg_gc[GTK_STATE_NORMAL]; - light_gc = style->light_gc[GTK_STATE_NORMAL]; - dark_gc = style->dark_gc[GTK_STATE_NORMAL]; - - /* Paint the background colors. */ - gc = day_view->main_gc; - work_day_start_row = e_day_view_convert_time_to_row (day_view, day_view->work_day_start_hour, day_view->work_day_start_minute); - work_day_start_y = work_day_start_row * day_view->row_height - y; - work_day_end_row = e_day_view_convert_time_to_row (day_view, day_view->work_day_end_hour, day_view->work_day_end_minute); - work_day_end_y = work_day_end_row * day_view->row_height - y; - - work_day_x = day_view->day_offsets[0] - x; - work_day_w = width - work_day_x; - gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_BG_NOT_WORKING]); - gdk_draw_rectangle (drawable, gc, TRUE, - work_day_x, 0 - y, - work_day_w, work_day_start_y - (0 - y)); - gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_BG_WORKING]); - gdk_draw_rectangle (drawable, gc, TRUE, - work_day_x, work_day_start_y, - work_day_w, work_day_end_y - work_day_start_y); - gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_BG_NOT_WORKING]); - gdk_draw_rectangle (drawable, gc, TRUE, - work_day_x, work_day_end_y, - work_day_w, height - work_day_end_y); - - /* Paint the selection background. */ - if (GTK_WIDGET_HAS_FOCUS (day_view) - && day_view->selection_start_day != -1 - && !day_view->selection_in_top_canvas) { - for (day = day_view->selection_start_day; - day <= day_view->selection_end_day; - day++) { - if (day == day_view->selection_start_day - && day_view->selection_start_row != -1) - start_row = day_view->selection_start_row; - else - start_row = 0; - if (day == day_view->selection_end_day - && day_view->selection_end_row != -1) - end_row = day_view->selection_end_row; - else - end_row = day_view->rows - 1; - - rect_x = day_view->day_offsets[day] - x; - rect_width = day_view->day_widths[day]; - rect_y = start_row * day_view->row_height - y; - rect_height = (end_row - start_row + 1) * day_view->row_height; - - gc = style->bg_gc[GTK_STATE_SELECTED]; - gdk_draw_rectangle (drawable, gc, TRUE, - rect_x, rect_y, - rect_width, rect_height); - } - } - - /* Drawing the horizontal grid lines. */ - grid_x1 = day_view->day_offsets[0] - x; - grid_x2 = day_view->day_offsets[day_view->days_shown] - x; - - for (row = 0, row_y = 0 - y; - row < day_view->rows && row_y < height; - row++, row_y += day_view->row_height) { - if (row_y >= 0 && row_y < height) - gdk_draw_line (drawable, dark_gc, - grid_x1, row_y, grid_x2, row_y); - } - - /* Draw the vertical bars down the left of each column. */ - grid_y1 = 0; - grid_y2 = height; - for (day = 0; day < day_view->days_shown; day++) { - grid_x1 = day_view->day_offsets[day] - x; - - /* Skip if it isn't visible. */ - if (grid_x1 >= width || grid_x1 + E_DAY_VIEW_BAR_WIDTH <= 0) - continue; - - gdk_draw_line (drawable, fg_gc, - grid_x1, grid_y1, - grid_x1, grid_y2); - gdk_draw_line (drawable, fg_gc, - grid_x1 + E_DAY_VIEW_BAR_WIDTH - 1, grid_y1, - grid_x1 + E_DAY_VIEW_BAR_WIDTH - 1, grid_y2); - gdk_draw_rectangle (drawable, style->white_gc, TRUE, - grid_x1 + 1, grid_y1, - E_DAY_VIEW_BAR_WIDTH - 2, grid_y2 - grid_y1); - - /* Fill in the bars when the user is busy. */ - e_day_view_main_item_draw_events_in_vbars (dvmitem, drawable, - x, y, - width, height, - day); - } - - /* Fill in the vertical bars corresponding to the busy times from the - long events. */ - e_day_view_main_item_draw_long_events_in_vbars (dvmitem, drawable, - x, y, width, height); - - /* Draw the event borders and backgrounds, and the vertical bars - down the left edges. */ - for (day = 0; day < day_view->days_shown; day++) { - e_day_view_main_item_draw_day_events (dvmitem, drawable, - x, y, width, height, - day); - } -} - - -static void -e_day_view_main_item_draw_events_in_vbars (EDayViewMainItem *dvmitem, - GdkDrawable *drawable, - int x, int y, - int width, int height, - gint day) -{ - EDayView *day_view; - EDayViewEvent *event; - GdkGC *gc; - gint grid_x, event_num, bar_y, bar_h; - - day_view = dvmitem->day_view; - - gc = day_view->main_gc; - gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_EVENT_VBAR]); - - grid_x = day_view->day_offsets[day] + 1 - x; - - /* Draw the busy times corresponding to the events in the day. */ - for (event_num = 0; event_num < day_view->events[day]->len; - event_num++) { - event = &g_array_index (day_view->events[day], EDayViewEvent, - event_num); - - /* We can skip the events in the first column since they will - draw over this anyway. */ - if (event->num_columns > 0 && event->start_row_or_col == 0) - continue; - - bar_y = event->start_minute * day_view->row_height / day_view->mins_per_row; - bar_h = event->end_minute * day_view->row_height / day_view->mins_per_row - bar_y; - bar_y -= y; - - /* Skip it if it isn't visible. */ - if (bar_y >= height || bar_y + bar_h <= 0) - continue; - - gdk_draw_rectangle (drawable, gc, TRUE, - grid_x, bar_y, - E_DAY_VIEW_BAR_WIDTH - 2, bar_h); - } -} - - -static void -e_day_view_main_item_draw_long_events_in_vbars (EDayViewMainItem *dvmitem, - GdkDrawable *drawable, - int x, int y, - int width, int height) -{ - EDayView *day_view; - EDayViewEvent *event; - gint event_num, start_day, end_day, day, bar_y1, bar_y2, grid_x; - GdkGC *gc; - - day_view = dvmitem->day_view; - - gc = day_view->main_gc; - gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_EVENT_VBAR]); - - for (event_num = 0; event_num < day_view->long_events->len; - event_num++) { - event = &g_array_index (day_view->long_events, EDayViewEvent, - event_num); - - if (!e_day_view_find_long_event_days (day_view, event, - &start_day, &end_day)) - continue; - - for (day = start_day; day <= end_day; day++) { - grid_x = day_view->day_offsets[day] + 1 - x; - - /* Skip if it isn't visible. */ - if (grid_x >= width - || grid_x + E_DAY_VIEW_BAR_WIDTH <= 0) - continue; - - if (event->start <= day_view->day_starts[day]) { - bar_y1 = 0; - } else { - bar_y1 = event->start_minute * day_view->row_height / day_view->mins_per_row - y; - } - - if (event->end >= day_view->day_starts[day + 1]) { - bar_y2 = height; - } else { - bar_y2 = event->end_minute * day_view->row_height / day_view->mins_per_row - y; - } - - if (bar_y1 < height && bar_y2 > 0 && bar_y2 > bar_y1) { - gdk_draw_rectangle (drawable, gc, TRUE, - grid_x, bar_y1, - E_DAY_VIEW_BAR_WIDTH - 2, - bar_y2 - bar_y1); - } - } - - - } -} - - -static void -e_day_view_main_item_draw_day_events (EDayViewMainItem *dvmitem, - GdkDrawable *drawable, - int x, int y, int width, int height, - gint day) -{ - EDayView *day_view; - gint event_num; - - day_view = dvmitem->day_view; - - for (event_num = 0; event_num < day_view->events[day]->len; - event_num++) { - e_day_view_main_item_draw_day_event (dvmitem, drawable, - x, y, width, height, - day, event_num); - } -} - - -static void -e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem, - GdkDrawable *drawable, - int x, int y, int width, int height, - gint day, gint event_num) -{ - EDayView *day_view; - EDayViewEvent *event; - gint item_x, item_y, item_w, item_h, bar_y1, bar_y2; - GtkStyle *style; - GdkGC *gc; - iCalObject *ico; - gint num_icons, icon_x, icon_y, icon_x_inc, icon_y_inc; - gint max_icon_w, max_icon_h; - gboolean draw_reminder_icon, draw_recurrence_icon; - - day_view = dvmitem->day_view; - - /* If the event is currently being dragged, don't draw it. It will - be drawn in the special drag items. */ - if (day_view->drag_event_day == day - && day_view->drag_event_num == event_num) - return; - - style = GTK_WIDGET (day_view)->style; - - gc = day_view->main_gc; - gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_EVENT_VBAR]); - - /* Get the position of the event. If it is not shown skip it.*/ - if (!e_day_view_get_event_position (day_view, day, event_num, - &item_x, &item_y, - &item_w, &item_h)) - return; - - item_x -= x; - item_y -= y; - - event = &g_array_index (day_view->events[day], EDayViewEvent, - event_num); - - /* Fill in the white background. Note that for events in the first - column of the day, we might not want to paint over the vertical bar, - since that is used for multiple events. But then you can't see - where the event in the first column finishes. */ -#if 0 - if (event->start_row_or_col == 0) - gdk_draw_rectangle (drawable, style->white_gc, TRUE, - item_x + E_DAY_VIEW_BAR_WIDTH, item_y + 1, - MAX (item_w - E_DAY_VIEW_BAR_WIDTH - 1, 0), - item_h - 2); - else -#endif - gdk_draw_rectangle (drawable, style->white_gc, TRUE, - item_x + 1, item_y + 1, - MAX (item_w - 2, 0), item_h - 2); - - /* Draw the right edge of the vertical bar. */ - gdk_draw_line (drawable, style->black_gc, - item_x + E_DAY_VIEW_BAR_WIDTH - 1, - item_y + 1, - item_x + E_DAY_VIEW_BAR_WIDTH - 1, - item_y + item_h - 2); - - /* Draw the vertical colored bar showing when the appointment - begins & ends. */ - bar_y1 = event->start_minute * day_view->row_height / day_view->mins_per_row - y; - bar_y2 = event->end_minute * day_view->row_height / day_view->mins_per_row - y; - - /* When an item is being resized, we fill the bar up to the new row. */ - if (day_view->resize_drag_pos != E_DAY_VIEW_POS_NONE - && day_view->resize_event_day == day - && day_view->resize_event_num == event_num) { - if (day_view->resize_drag_pos == E_DAY_VIEW_POS_TOP_EDGE) - bar_y1 = item_y + 1; - else if (day_view->resize_drag_pos == E_DAY_VIEW_POS_BOTTOM_EDGE) - bar_y2 = item_y + item_h - 1; - } - - gdk_draw_rectangle (drawable, gc, TRUE, - item_x + 1, bar_y1, - E_DAY_VIEW_BAR_WIDTH - 2, bar_y2 - bar_y1); - - /* Draw the box around the entire event. Do this after drawing - the colored bar so we don't have to worry about being 1 - pixel out. */ - gdk_draw_rectangle (drawable, style->black_gc, FALSE, - item_x, item_y, MAX (item_w - 1, 0), item_h - 1); - -#if 0 - /* Draw the horizontal bars above and beneath the event if it - is currently being edited. */ - if (day_view->editing_event_day == day - && day_view->editing_event_num == event_num) { - gdk_draw_rectangle (drawable, gc, TRUE, - item_x, - item_y - E_DAY_VIEW_BAR_HEIGHT, - item_w, - E_DAY_VIEW_BAR_HEIGHT); - gdk_draw_rectangle (drawable, gc, TRUE, - item_x, item_y + item_h, - item_w, E_DAY_VIEW_BAR_HEIGHT); - } -#endif - - /* Draw the reminder & recurrence icons, if needed. */ - num_icons = 0; - draw_reminder_icon = FALSE; - draw_recurrence_icon = FALSE; - icon_x = item_x + E_DAY_VIEW_BAR_WIDTH + E_DAY_VIEW_ICON_X_PAD; - icon_y = item_y + E_DAY_VIEW_EVENT_BORDER_HEIGHT - + E_DAY_VIEW_ICON_Y_PAD; - ico = event->ico; - - if (ico->dalarm.enabled || ico->malarm.enabled - || ico->palarm.enabled || ico->aalarm.enabled) { - draw_reminder_icon = TRUE; - num_icons++; - } - - if (ico->recur) { - draw_recurrence_icon = TRUE; - num_icons++; - } - - if (num_icons != 0) { - if (item_h >= (E_DAY_VIEW_ICON_HEIGHT + E_DAY_VIEW_ICON_Y_PAD) - * num_icons) { - icon_x_inc = 0; - icon_y_inc = E_DAY_VIEW_ICON_HEIGHT - + E_DAY_VIEW_ICON_Y_PAD; - } else { - icon_x_inc = E_DAY_VIEW_ICON_WIDTH - + E_DAY_VIEW_ICON_X_PAD; - icon_y_inc = 0; - } - - if (draw_reminder_icon) { - max_icon_w = item_x + item_w - icon_x - - E_DAY_VIEW_EVENT_BORDER_WIDTH; - max_icon_h = item_y + item_h - icon_y - - E_DAY_VIEW_EVENT_BORDER_HEIGHT; - - gdk_gc_set_clip_origin (gc, icon_x, icon_y); - gdk_gc_set_clip_mask (gc, day_view->reminder_mask); - gdk_draw_pixmap (drawable, gc, - day_view->reminder_icon, - 0, 0, icon_x, icon_y, - MIN (E_DAY_VIEW_ICON_WIDTH, - max_icon_w), - MIN (E_DAY_VIEW_ICON_HEIGHT, - max_icon_h)); - icon_x += icon_x_inc; - icon_y += icon_y_inc; - } - - if (draw_recurrence_icon) { - max_icon_w = item_x + item_w - icon_x - - E_DAY_VIEW_EVENT_BORDER_WIDTH; - max_icon_h = item_y + item_h - icon_y - - E_DAY_VIEW_EVENT_BORDER_HEIGHT; - - gdk_gc_set_clip_origin (gc, icon_x, icon_y); - gdk_gc_set_clip_mask (gc, day_view->recurrence_mask); - gdk_draw_pixmap (drawable, gc, - day_view->recurrence_icon, - 0, 0, icon_x, icon_y, - MIN (E_DAY_VIEW_ICON_WIDTH, - max_icon_w), - MIN (E_DAY_VIEW_ICON_HEIGHT, - max_icon_h)); - } - gdk_gc_set_clip_mask (gc, NULL); - } -} - - -/* This is supposed to return the nearest item to the point and the distance. - Since we are the only item we just return ourself and 0 for the distance. - This is needed so that we get button/motion events. */ -static double -e_day_view_main_item_point (GnomeCanvasItem *item, double x, double y, - int cx, int cy, - GnomeCanvasItem **actual_item) -{ - *actual_item = item; - return 0.0; -} - - -static gint -e_day_view_main_item_event (GnomeCanvasItem *item, GdkEvent *event) -{ - EDayViewMainItem *dvtitem; - - dvtitem = E_DAY_VIEW_MAIN_ITEM (item); - - switch (event->type) { - case GDK_BUTTON_PRESS: - - case GDK_BUTTON_RELEASE: - - case GDK_MOTION_NOTIFY: - - default: - break; - } - - return FALSE; -} - - diff --git a/calendar/gui/e-day-view-main-item.h b/calendar/gui/e-day-view-main-item.h deleted file mode 100644 index d8305e594d..0000000000 --- a/calendar/gui/e-day-view-main-item.h +++ /dev/null @@ -1,65 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -/* - * Author : - * Damon Chaplin - * - * Copyright 1999, Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ -#ifndef _E_DAY_VIEW_MAIN_ITEM_H_ -#define _E_DAY_VIEW_MAIN_ITEM_H_ - -#include "e-day-view.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* - * EDayViewMainItem - canvas item which displays most of the appointment - * data in the main Day/Work Week display. - */ - -#define E_DAY_VIEW_MAIN_ITEM(obj) (GTK_CHECK_CAST((obj), \ - e_day_view_main_item_get_type (), EDayViewMainItem)) -#define E_DAY_VIEW_MAIN_ITEM_CLASS(k) (GTK_CHECK_CLASS_CAST ((k),\ - e_day_view_main_item_get_type ())) -#define E_IS_DAY_VIEW_MAIN_ITEM(o) (GTK_CHECK_TYPE((o), \ - e_day_view_main_item_get_type ())) - -typedef struct { - GnomeCanvasItem canvas_item; - - /* The parent EDayView widget. */ - EDayView *day_view; -} EDayViewMainItem; - -typedef struct { - GnomeCanvasItemClass parent_class; - -} EDayViewMainItemClass; - - -GtkType e_day_view_main_item_get_type (void); - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* _E_DAY_VIEW_MAIN_ITEM_H_ */ diff --git a/calendar/gui/e-day-view-time-item.c b/calendar/gui/e-day-view-time-item.c deleted file mode 100644 index c2dcf55727..0000000000 --- a/calendar/gui/e-day-view-time-item.c +++ /dev/null @@ -1,531 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -/* - * Author : - * Damon Chaplin - * - * Copyright 1999, Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ - -/* - * EDayViewTimeItem - canvas item which displays the times down the left of - * the EDayView. - */ - -#include -#include -#include -#include "e-day-view-time-item.h" -#include "../../e-util/e-gui-utils.h" - - -/* The spacing between items in the time column. GRID_X_PAD is the space down - either side of the column, i.e. outside the main horizontal grid lines. - HOUR_L_PAD & HOUR_R_PAD are the spaces on the left & right side of the - big hour number (this is inside the horizontal grid lines). - MIN_X_PAD is the spacing either side of the minute number. The smaller - horizontal grid lines match with this. - 60_MIN_X_PAD is the space either side of the HH:MM display used when - we are displaying 60 mins per row (inside the main grid lines). */ -#define E_DVTMI_TIME_GRID_X_PAD 4 -#define E_DVTMI_HOUR_L_PAD 4 -#define E_DVTMI_HOUR_R_PAD 2 -#define E_DVTMI_MIN_X_PAD 2 -#define E_DVTMI_60_MIN_X_PAD 4 - - -static void e_day_view_time_item_class_init (EDayViewTimeItemClass *class); -static void e_day_view_time_item_init (EDayViewTimeItem *dvtmitem); -static void e_day_view_time_item_set_arg (GtkObject *o, - GtkArg *arg, - guint arg_id); - -static void e_day_view_time_item_update (GnomeCanvasItem *item, - double *affine, - ArtSVP *clip_path, int flags); -static void e_day_view_time_item_draw (GnomeCanvasItem *item, - GdkDrawable *drawable, - int x, int y, - int width, int height); -static double e_day_view_time_item_point (GnomeCanvasItem *item, - double x, double y, - int cx, int cy, - GnomeCanvasItem **actual_item); -static gint e_day_view_time_item_event (GnomeCanvasItem *item, - GdkEvent *event); -static void e_day_view_time_item_show_popup_menu (EDayViewTimeItem *dvtmitem, - GdkEvent *event); -static void e_day_view_time_item_on_set_divisions (GtkWidget *item, - EDayViewTimeItem *dvtmitem); -static void e_day_view_time_item_on_button_press (EDayViewTimeItem *dvtmitem, - GdkEvent *event); -static void e_day_view_time_item_on_button_release (EDayViewTimeItem *dvtmitem, - GdkEvent *event); -static void e_day_view_time_item_on_motion_notify (EDayViewTimeItem *dvtmitem, - GdkEvent *event); -static gint e_day_view_time_item_convert_position_to_row (EDayViewTimeItem *dvtmitem, - gint y); - - -static GnomeCanvasItemClass *parent_class; - - -/* The arguments we take */ -enum { - ARG_0, - ARG_DAY_VIEW -}; - - -GtkType -e_day_view_time_item_get_type (void) -{ - static GtkType e_day_view_time_item_type = 0; - - if (!e_day_view_time_item_type) { - GtkTypeInfo e_day_view_time_item_info = { - "EDayViewTimeItem", - sizeof (EDayViewTimeItem), - sizeof (EDayViewTimeItemClass), - (GtkClassInitFunc) e_day_view_time_item_class_init, - (GtkObjectInitFunc) e_day_view_time_item_init, - NULL, /* reserved_1 */ - NULL, /* reserved_2 */ - (GtkClassInitFunc) NULL - }; - - e_day_view_time_item_type = gtk_type_unique (gnome_canvas_item_get_type (), &e_day_view_time_item_info); - } - - return e_day_view_time_item_type; -} - - -static void -e_day_view_time_item_class_init (EDayViewTimeItemClass *class) -{ - GtkObjectClass *object_class; - GnomeCanvasItemClass *item_class; - - parent_class = gtk_type_class (gnome_canvas_item_get_type()); - - object_class = (GtkObjectClass *) class; - item_class = (GnomeCanvasItemClass *) class; - - gtk_object_add_arg_type ("EDayViewTimeItem::day_view", - GTK_TYPE_POINTER, GTK_ARG_WRITABLE, - ARG_DAY_VIEW); - - object_class->set_arg = e_day_view_time_item_set_arg; - - /* GnomeCanvasItem method overrides */ - item_class->update = e_day_view_time_item_update; - item_class->draw = e_day_view_time_item_draw; - item_class->point = e_day_view_time_item_point; - item_class->event = e_day_view_time_item_event; -} - - -static void -e_day_view_time_item_init (EDayViewTimeItem *dvtmitem) -{ - dvtmitem->dragging_selection = FALSE; -} - - -static void -e_day_view_time_item_set_arg (GtkObject *o, GtkArg *arg, guint arg_id) -{ - GnomeCanvasItem *item; - EDayViewTimeItem *dvtmitem; - - item = GNOME_CANVAS_ITEM (o); - dvtmitem = E_DAY_VIEW_TIME_ITEM (o); - - switch (arg_id){ - case ARG_DAY_VIEW: - dvtmitem->day_view = GTK_VALUE_POINTER (*arg); - break; - } -} - - -static void -e_day_view_time_item_update (GnomeCanvasItem *item, - double *affine, - ArtSVP *clip_path, - int flags) -{ - if (GNOME_CANVAS_ITEM_CLASS (parent_class)->update) - (* GNOME_CANVAS_ITEM_CLASS (parent_class)->update) (item, affine, clip_path, flags); - - /* The item covers the entire canvas area. */ - item->x1 = 0; - item->y1 = 0; - item->x2 = INT_MAX; - item->y2 = INT_MAX; -} - - -/* Returns the minimum width needed for the column, by adding up all the - maximum widths of the strings. The string widths are all calculated in - the style_set handlers of EDayView and EDayViewTimeCanvas. */ -gint -e_day_view_time_item_get_column_width (EDayViewTimeItem *dvtmitem) -{ - EDayView *day_view; - - day_view = dvtmitem->day_view; - g_return_val_if_fail (day_view != NULL, 0); - - /* Calculate the width of each time column. */ - if (day_view->mins_per_row == 60) { - dvtmitem->column_width = day_view->max_small_hour_width - + day_view->colon_width - + day_view->max_minute_width - + E_DVTMI_60_MIN_X_PAD * 2 - + E_DVTMI_TIME_GRID_X_PAD * 2; - } else { - dvtmitem->column_width = day_view->max_large_hour_width - + day_view->max_minute_width - + E_DVTMI_MIN_X_PAD * 2 - + E_DVTMI_HOUR_L_PAD - + E_DVTMI_HOUR_R_PAD - + E_DVTMI_TIME_GRID_X_PAD * 2; - } - - return dvtmitem->column_width; -} - - -/* - * DRAWING ROUTINES - functions to paint the canvas item. - */ - -static void -e_day_view_time_item_draw (GnomeCanvasItem *canvas_item, - GdkDrawable *drawable, - int x, - int y, - int width, - int height) -{ - EDayView *day_view; - EDayViewTimeItem *dvtmitem; - gint time_hour_x1, time_hour_x2, time_min_x1; - gint hour, minute, hour_y, min_y, hour_r, min_r, start_y; - gint row, row_y, min_width, hour_width; - GtkStyle *style; - GdkFont *small_font, *large_font; - GdkGC *fg_gc, *dark_gc; - gchar buffer[16]; - - dvtmitem = E_DAY_VIEW_TIME_ITEM (canvas_item); - day_view = dvtmitem->day_view; - g_return_if_fail (day_view != NULL); - - style = GTK_WIDGET (day_view)->style; - small_font = style->font; - large_font = day_view->large_font; - fg_gc = style->fg_gc[GTK_STATE_NORMAL]; - dark_gc = style->dark_gc[GTK_STATE_NORMAL]; - - /* Step through each row, drawing the horizontal grid lines for each - day column and the times. */ - time_hour_x1 = E_DVTMI_TIME_GRID_X_PAD - x; - time_hour_x2 = dvtmitem->column_width - E_DVTMI_TIME_GRID_X_PAD - x; - if (day_view->mins_per_row == 60) { - min_r = time_hour_x2 - E_DVTMI_60_MIN_X_PAD; - } else { - time_min_x1 = time_hour_x2 - E_DVTMI_MIN_X_PAD * 2 - - day_view->max_minute_width; - hour_r = time_min_x1 - E_DVTMI_HOUR_R_PAD; - min_r = time_hour_x2 - E_DVTMI_MIN_X_PAD; - } - - hour = day_view->first_hour_shown; - hour_y = large_font->ascent + 2; /* FIXME */ - minute = day_view->first_minute_shown; - min_y = small_font->ascent + 2; /* FIXME */ - start_y = 0 - MAX (day_view->row_height, hour_y + large_font->descent); - for (row = 0, row_y = 0 - y; - row < day_view->rows && row_y < height; - row++, row_y += day_view->row_height) { - if (row_y > start_y) { - /* Draw the times down the left if needed. */ - if (min_r <= 0) - continue; - - if (day_view->mins_per_row == 60) { - gdk_draw_line (drawable, dark_gc, - time_hour_x1, row_y, - time_hour_x2, row_y); - sprintf (buffer, "%02i:%02i", hour, minute); - min_width = day_view->small_hour_widths[hour] + day_view->minute_widths[minute / 5] + day_view->colon_width; - gdk_draw_string (drawable, small_font, fg_gc, - min_r - min_width, - row_y + min_y, buffer); - } else { - if (minute == 0) { - gdk_draw_line (drawable, dark_gc, - time_hour_x1, row_y, - time_hour_x2, row_y); - sprintf (buffer, "%02i", hour); - hour_width = day_view->large_hour_widths[hour]; - gdk_draw_string (drawable, large_font, - fg_gc, - hour_r - hour_width, - row_y + hour_y, - buffer); - } else { - gdk_draw_line (drawable, dark_gc, - time_min_x1, row_y, - time_hour_x2, row_y); - } - - if (day_view->mins_per_row != 30 - || minute != 30) { - sprintf (buffer, "%02i", minute); - min_width = day_view->minute_widths[minute / 5]; - gdk_draw_string (drawable, small_font, - fg_gc, - min_r - min_width, - row_y + min_y, - buffer); - } - } - } - - minute += day_view->mins_per_row; - if (minute >= 60) { - hour++; - minute -= 60; - } - } -} - - -static double -e_day_view_time_item_point (GnomeCanvasItem *item, double x, double y, - int cx, int cy, - GnomeCanvasItem **actual_item) -{ - *actual_item = item; - return 0.0; -} - - -static gint -e_day_view_time_item_event (GnomeCanvasItem *item, - GdkEvent *event) -{ - EDayViewTimeItem *dvtmitem; - - dvtmitem = E_DAY_VIEW_TIME_ITEM (item); - - switch (event->type) { - case GDK_BUTTON_PRESS: - if (event->button.button == 1) { - e_day_view_time_item_on_button_press (dvtmitem, event); - } else if (event->button.button == 3) { - e_day_view_time_item_show_popup_menu (dvtmitem, event); - return TRUE; - } - break; - case GDK_BUTTON_RELEASE: - if (event->button.button == 1) - e_day_view_time_item_on_button_release (dvtmitem, - event); - break; - - case GDK_MOTION_NOTIFY: - e_day_view_time_item_on_motion_notify (dvtmitem, event); - break; - - default: - break; - } - - return FALSE; -} - - -static void -e_day_view_time_item_show_popup_menu (EDayViewTimeItem *dvtmitem, - GdkEvent *event) -{ - static gint divisions[] = { 60, 30, 15, 10, 5 }; - EDayView *day_view; - gint num_divisions = sizeof (divisions) / sizeof (divisions[0]); - GtkWidget *menu, *item; - gchar buffer[256]; - GSList *group = NULL; - gint current_divisions, i; - - day_view = dvtmitem->day_view; - g_return_if_fail (day_view != NULL); - - current_divisions = e_day_view_get_mins_per_row (day_view); - - menu = gtk_menu_new (); - - /* Make sure the menu is destroyed when it disappears. */ - e_auto_kill_popup_menu_on_hide (GTK_MENU (menu)); - - for (i = 0; i < num_divisions; i++) { - sprintf (buffer, _("%02i minute divisions"), divisions[i]); - item = gtk_radio_menu_item_new_with_label (group, buffer); - group = gtk_radio_menu_item_group (GTK_RADIO_MENU_ITEM (item)); - gtk_widget_show (item); - gtk_menu_append (GTK_MENU (menu), item); - - if (current_divisions == divisions[i]) - gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (item), TRUE); - - gtk_object_set_data (GTK_OBJECT (item), "divisions", - GINT_TO_POINTER (divisions[i])); - - gtk_signal_connect (GTK_OBJECT (item), "toggled", - e_day_view_time_item_on_set_divisions, - dvtmitem); - } - - gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, - event->button.button, event->button.time); -} - - -static void -e_day_view_time_item_on_set_divisions (GtkWidget *item, - EDayViewTimeItem *dvtmitem) -{ - EDayView *day_view; - gint divisions; - - day_view = dvtmitem->day_view; - g_return_if_fail (day_view != NULL); - - if (!GTK_CHECK_MENU_ITEM (item)->active) - return; - - divisions = GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (item), - "divisions")); - e_day_view_set_mins_per_row (day_view, divisions); -} - - -static void -e_day_view_time_item_on_button_press (EDayViewTimeItem *dvtmitem, - GdkEvent *event) -{ - EDayView *day_view; - GnomeCanvas *canvas; - gint row; - - day_view = dvtmitem->day_view; - g_return_if_fail (day_view != NULL); - - canvas = GNOME_CANVAS_ITEM (dvtmitem)->canvas; - - row = e_day_view_time_item_convert_position_to_row (dvtmitem, - event->button.y); - - if (row == -1) - return; - - if (!GTK_WIDGET_HAS_FOCUS (day_view)) - gtk_widget_grab_focus (GTK_WIDGET (day_view)); - - if (gdk_pointer_grab (GTK_LAYOUT (canvas)->bin_window, FALSE, - GDK_POINTER_MOTION_MASK - | GDK_BUTTON_RELEASE_MASK, - FALSE, NULL, event->button.time) == 0) { - e_day_view_start_selection (day_view, -1, row); - dvtmitem->dragging_selection = TRUE; - } -} - - -static void -e_day_view_time_item_on_button_release (EDayViewTimeItem *dvtmitem, - GdkEvent *event) -{ - EDayView *day_view; - - day_view = dvtmitem->day_view; - g_return_if_fail (day_view != NULL); - - if (dvtmitem->dragging_selection) { - gdk_pointer_ungrab (event->button.time); - e_day_view_finish_selection (day_view); - e_day_view_stop_auto_scroll (day_view); - } - - dvtmitem->dragging_selection = FALSE; -} - - -static void -e_day_view_time_item_on_motion_notify (EDayViewTimeItem *dvtmitem, - GdkEvent *event) -{ - EDayView *day_view; - GnomeCanvas *canvas; - gdouble window_y; - gint y, row; - - if (!dvtmitem->dragging_selection) - return; - - day_view = dvtmitem->day_view; - g_return_if_fail (day_view != NULL); - - canvas = GNOME_CANVAS_ITEM (dvtmitem)->canvas; - - y = event->motion.y; - row = e_day_view_time_item_convert_position_to_row (dvtmitem, y); - - if (row != -1) { - gnome_canvas_world_to_window (canvas, 0, event->motion.y, - NULL, &window_y); - e_day_view_update_selection (day_view, -1, row); - e_day_view_check_auto_scroll (day_view, -1, (gint) window_y); - } -} - - -/* Returns the row corresponding to the y position, or -1. */ -static gint -e_day_view_time_item_convert_position_to_row (EDayViewTimeItem *dvtmitem, - gint y) -{ - EDayView *day_view; - gint row; - - day_view = dvtmitem->day_view; - g_return_val_if_fail (day_view != NULL, -1); - - if (y < 0) - return -1; - - row = y / day_view->row_height; - if (row >= day_view->rows) - return -1; - - return row; -} diff --git a/calendar/gui/e-day-view-time-item.h b/calendar/gui/e-day-view-time-item.h deleted file mode 100644 index 8b20fe999e..0000000000 --- a/calendar/gui/e-day-view-time-item.h +++ /dev/null @@ -1,74 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -/* - * Author : - * Damon Chaplin - * - * Copyright 1999, Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ -#ifndef _E_DAY_VIEW_TIME_ITEM_H_ -#define _E_DAY_VIEW_TIME_ITEM_H_ - -#include "e-day-view.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* - * EDayViewTimeItem - canvas item which displays the times down the left of - * the EDayView. - */ - -#define E_DAY_VIEW_TIME_ITEM(obj) (GTK_CHECK_CAST((obj), \ - e_day_view_time_item_get_type (), EDayViewTimeItem)) -#define E_DAY_VIEW_TIME_ITEM_CLASS(k) (GTK_CHECK_CLASS_CAST ((k),\ - e_day_view_time_item_get_type ())) -#define E_IS_DAY_VIEW_TIME_ITEM(o) (GTK_CHECK_TYPE((o), \ - e_day_view_time_item_get_type ())) - -typedef struct { - GnomeCanvasItem canvas_item; - - /* The parent EDayView widget. */ - EDayView *day_view; - - /* The width of the time column. */ - gint column_width; - - /* TRUE if we are currently dragging the selection times. */ - gboolean dragging_selection; -} EDayViewTimeItem; - -typedef struct { - GnomeCanvasItemClass parent_class; - -} EDayViewTimeItemClass; - - -GtkType e_day_view_time_item_get_type (void); - - -gint e_day_view_time_item_get_column_width (EDayViewTimeItem *dvtmitem); - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* _E_DAY_VIEW_TIME_ITEM_H_ */ diff --git a/calendar/gui/e-day-view-top-item.c b/calendar/gui/e-day-view-top-item.c deleted file mode 100644 index 45872238a7..0000000000 --- a/calendar/gui/e-day-view-top-item.c +++ /dev/null @@ -1,583 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -/* - * Author : - * Damon Chaplin - * - * Copyright 1999, Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ - -/* - * EDayViewTopItem - displays the top part of the Day/Work Week calendar view. - */ - -#include -#include "e-day-view-top-item.h" - -static void e_day_view_top_item_class_init (EDayViewTopItemClass *class); -static void e_day_view_top_item_init (EDayViewTopItem *dvtitem); - -static void e_day_view_top_item_set_arg (GtkObject *o, - GtkArg *arg, - guint arg_id); -static void e_day_view_top_item_update (GnomeCanvasItem *item, - double *affine, - ArtSVP *clip_path, - int flags); -static void e_day_view_top_item_draw (GnomeCanvasItem *item, - GdkDrawable *drawable, - int x, - int y, - int width, - int height); -static void e_day_view_top_item_draw_long_event (EDayViewTopItem *dvtitem, - gint event_num, - GdkDrawable *drawable, - int x, - int y, - int width, - int height); -static void e_day_view_top_item_draw_triangle (EDayViewTopItem *dvtitem, - GdkDrawable *drawable, - gint x, - gint y, - gint w, - gint h); -static double e_day_view_top_item_point (GnomeCanvasItem *item, - double x, - double y, - int cx, - int cy, - GnomeCanvasItem **actual_item); -static gint e_day_view_top_item_event (GnomeCanvasItem *item, - GdkEvent *event); - - -static GnomeCanvasItemClass *parent_class; - -/* The arguments we take */ -enum { - ARG_0, - ARG_DAY_VIEW -}; - - -GtkType -e_day_view_top_item_get_type (void) -{ - static GtkType e_day_view_top_item_type = 0; - - if (!e_day_view_top_item_type) { - GtkTypeInfo e_day_view_top_item_info = { - "EDayViewTopItem", - sizeof (EDayViewTopItem), - sizeof (EDayViewTopItemClass), - (GtkClassInitFunc) e_day_view_top_item_class_init, - (GtkObjectInitFunc) e_day_view_top_item_init, - NULL, /* reserved_1 */ - NULL, /* reserved_2 */ - (GtkClassInitFunc) NULL - }; - - e_day_view_top_item_type = gtk_type_unique (gnome_canvas_item_get_type (), &e_day_view_top_item_info); - } - - return e_day_view_top_item_type; -} - - -static void -e_day_view_top_item_class_init (EDayViewTopItemClass *class) -{ - GtkObjectClass *object_class; - GnomeCanvasItemClass *item_class; - - parent_class = gtk_type_class (gnome_canvas_item_get_type()); - - object_class = (GtkObjectClass *) class; - item_class = (GnomeCanvasItemClass *) class; - - gtk_object_add_arg_type ("EDayViewTopItem::day_view", - GTK_TYPE_POINTER, GTK_ARG_WRITABLE, - ARG_DAY_VIEW); - - object_class->set_arg = e_day_view_top_item_set_arg; - - /* GnomeCanvasItem method overrides */ - item_class->update = e_day_view_top_item_update; - item_class->draw = e_day_view_top_item_draw; - item_class->point = e_day_view_top_item_point; - item_class->event = e_day_view_top_item_event; -} - - -static void -e_day_view_top_item_init (EDayViewTopItem *dvtitem) -{ - dvtitem->day_view = NULL; -} - - -static void -e_day_view_top_item_set_arg (GtkObject *o, GtkArg *arg, guint arg_id) -{ - GnomeCanvasItem *item; - EDayViewTopItem *dvtitem; - - item = GNOME_CANVAS_ITEM (o); - dvtitem = E_DAY_VIEW_TOP_ITEM (o); - - switch (arg_id){ - case ARG_DAY_VIEW: - dvtitem->day_view = GTK_VALUE_POINTER (*arg); - break; - } -} - - -static void -e_day_view_top_item_update (GnomeCanvasItem *item, - double *affine, - ArtSVP *clip_path, - int flags) -{ - if (GNOME_CANVAS_ITEM_CLASS (parent_class)->update) - (* GNOME_CANVAS_ITEM_CLASS (parent_class)->update) (item, affine, clip_path, flags); - - /* The item covers the entire canvas area. */ - item->x1 = 0; - item->y1 = 0; - item->x2 = INT_MAX; - item->y2 = INT_MAX; -} - - -/* - * DRAWING ROUTINES - functions to paint the canvas item. - */ - -static void -e_day_view_top_item_draw (GnomeCanvasItem *canvas_item, - GdkDrawable *drawable, - int x, - int y, - int width, - int height) -{ - EDayViewTopItem *dvtitem; - EDayView *day_view; - GtkStyle *style; - GdkGC *fg_gc, *bg_gc, *light_gc, *dark_gc; - gchar buffer[128]; - GdkRectangle clip_rect; - GdkFont *font; - gint canvas_width, canvas_height, left_edge, day, date_width, date_x; - gint item_height, event_num; - struct tm *day_start; - -#if 0 - g_print ("In e_day_view_top_item_draw %i,%i %ix%i\n", - x, y, width, height); -#endif - dvtitem = E_DAY_VIEW_TOP_ITEM (canvas_item); - day_view = dvtitem->day_view; - g_return_if_fail (day_view != NULL); - - style = GTK_WIDGET (day_view)->style; - font = style->font; - fg_gc = style->fg_gc[GTK_STATE_NORMAL]; - bg_gc = style->bg_gc[GTK_STATE_NORMAL]; - light_gc = style->light_gc[GTK_STATE_NORMAL]; - dark_gc = style->dark_gc[GTK_STATE_NORMAL]; - canvas_width = GTK_WIDGET (canvas_item->canvas)->allocation.width; - canvas_height = GTK_WIDGET (canvas_item->canvas)->allocation.height; - left_edge = 0; - item_height = day_view->top_row_height - E_DAY_VIEW_TOP_CANVAS_Y_GAP; - - /* Clear the entire background. */ - gdk_draw_rectangle (drawable, dark_gc, TRUE, - left_edge - x, 0, - canvas_width - left_edge, height); - - /* Draw the shadow around the dates. */ - gdk_draw_line (drawable, light_gc, - left_edge + 1 - x, 1 - y, - canvas_width - 2 - x, 1 - y); - gdk_draw_line (drawable, light_gc, - left_edge + 1 - x, 2 - y, - left_edge + 1 - x, item_height - 1 - y); - - /* Draw the background for the dates. */ - gdk_draw_rectangle (drawable, bg_gc, TRUE, - left_edge + 2 - x, 2 - y, - canvas_width - left_edge - 3, - item_height - 3); - - /* Draw the selection background. */ - if (GTK_WIDGET_HAS_FOCUS (day_view) - && day_view->selection_start_day != -1) { - gint start_col, end_col, rect_x, rect_y, rect_w, rect_h; - - start_col = day_view->selection_start_day; - end_col = day_view->selection_end_day; - - if (end_col > start_col - || day_view->selection_start_row == -1 - || day_view->selection_end_row == -1) { - rect_x = day_view->day_offsets[start_col]; - rect_y = item_height; - rect_w = day_view->day_offsets[end_col + 1] - rect_x; - rect_h = canvas_height - 1 - rect_y; - - gdk_draw_rectangle (drawable, style->white_gc, TRUE, - rect_x - x, rect_y - y, - rect_w, rect_h); - } - } - - /* Draw the date. Set a clipping rectangle so we don't draw over the - next day. */ - for (day = 0; day < day_view->days_shown; day++) { - day_start = localtime (&day_view->day_starts[day]); - - if (day_view->date_format == E_DAY_VIEW_DATE_FULL) - strftime (buffer, 128, "%d %B", day_start); - else if (day_view->date_format == E_DAY_VIEW_DATE_ABBREVIATED) - strftime (buffer, 128, "%d %b", day_start); - else - strftime (buffer, 128, "%d", day_start); - - clip_rect.x = day_view->day_offsets[day] - x; - clip_rect.y = 2 - y; - clip_rect.width = day_view->day_widths[day]; - clip_rect.height = item_height - 2; - gdk_gc_set_clip_rectangle (fg_gc, &clip_rect); - - date_width = gdk_string_width (font, buffer); - date_x = day_view->day_offsets[day] + (day_view->day_widths[day] - date_width) / 2; - gdk_draw_string (drawable, font, fg_gc, - date_x - x, 3 + font->ascent - y, buffer); - - gdk_gc_set_clip_rectangle (fg_gc, NULL); - - /* Draw the lines down the left and right of the date cols. */ - if (day != 0) { - gdk_draw_line (drawable, light_gc, - day_view->day_offsets[day] - x, - 4 - y, - day_view->day_offsets[day] - x, - item_height - 4 - y); - - gdk_draw_line (drawable, dark_gc, - day_view->day_offsets[day] - 1 - x, - 4 - y, - day_view->day_offsets[day] - 1 - x, - item_height - 4 - y); - } - - /* Draw the lines between each column. */ - if (day != 0) { - gdk_draw_line (drawable, style->black_gc, - day_view->day_offsets[day] - x, - item_height - y, - day_view->day_offsets[day] - x, - canvas_height - y); - } - } - - /* Draw the long events. */ - for (event_num = 0; event_num < day_view->long_events->len; - event_num++) { - e_day_view_top_item_draw_long_event (dvtitem, event_num, - drawable, - x, y, width, height); - } -} - - -/* This draws one event in the top canvas. */ -static void -e_day_view_top_item_draw_long_event (EDayViewTopItem *dvtitem, - gint event_num, - GdkDrawable *drawable, - int x, - int y, - int width, - int height) -{ - EDayView *day_view; - EDayViewEvent *event; - GtkStyle *style; - GdkGC *gc, *fg_gc, *bg_gc; - GdkFont *font; - gint start_day, end_day; - gint item_x, item_y, item_w, item_h; - gint text_x, icon_x, icon_y, icon_x_inc; - iCalObject *ico; - gchar buffer[16]; - gint hour, minute, offset, time_width, time_x, min_end_time_x; - gboolean draw_start_triangle, draw_end_triangle; - GdkRectangle clip_rect; - - day_view = dvtitem->day_view; - - /* If the event is currently being dragged, don't draw it. It will - be drawn in the special drag items. */ - if (day_view->drag_event_day == E_DAY_VIEW_LONG_EVENT - && day_view->drag_event_num == event_num) - return; - - if (!e_day_view_get_long_event_position (day_view, event_num, - &start_day, &end_day, - &item_x, &item_y, - &item_w, &item_h)) - return; - - event = &g_array_index (day_view->long_events, EDayViewEvent, - event_num); - - style = GTK_WIDGET (day_view)->style; - font = style->font; - gc = day_view->main_gc; - fg_gc = style->fg_gc[GTK_STATE_NORMAL]; - bg_gc = style->bg_gc[GTK_STATE_NORMAL]; - ico = event->ico; - - /* Draw the lines across the top & bottom of the entire event. */ - gdk_draw_line (drawable, fg_gc, - item_x - x, item_y - y, - item_x + item_w - 1 - x, item_y - y); - gdk_draw_line (drawable, fg_gc, - item_x - x, item_y + item_h - 1 - y, - item_x + item_w - 1 - x, item_y + item_h - 1 - y); - - /* Fill it in. */ - gdk_draw_rectangle (drawable, bg_gc, TRUE, - item_x - x, item_y + 1 - y, - item_w, item_h - 2); - - /* When resizing we don't draw the triangles.*/ - draw_start_triangle = TRUE; - draw_end_triangle = TRUE; - if (day_view->resize_drag_pos != E_DAY_VIEW_POS_NONE - && day_view->resize_event_day == E_DAY_VIEW_LONG_EVENT - && day_view->resize_event_num == event_num) { - if (day_view->resize_drag_pos == E_DAY_VIEW_POS_LEFT_EDGE) - draw_start_triangle = FALSE; - - if (day_view->resize_drag_pos == E_DAY_VIEW_POS_RIGHT_EDGE) - draw_end_triangle = FALSE; - } - - /* If the event starts before the first day shown, draw a triangle, - else just draw a vertical line down the left. */ - if (draw_start_triangle - && event->start < day_view->day_starts[start_day]) { - e_day_view_top_item_draw_triangle (dvtitem, drawable, - item_x - x, item_y - y, - -E_DAY_VIEW_BAR_WIDTH, - item_h); - } else { - gdk_draw_line (drawable, fg_gc, - item_x - x, item_y - y, - item_x - x, item_y + item_h - 1 - y); - } - - /* Similar for the event end. */ - if (draw_end_triangle - && event->end > day_view->day_starts[end_day + 1]) { - e_day_view_top_item_draw_triangle (dvtitem, drawable, - item_x + item_w - 1 - x, - item_y - y, - E_DAY_VIEW_BAR_WIDTH, - item_h); - } else { - gdk_draw_line (drawable, fg_gc, - item_x + item_w - 1 - x, - item_y - y, - item_x + item_w - 1 - x, - item_y + item_h - 1 - y); - } - - /* If we are editing the event we don't show the icons or the start - & end times. */ - if (day_view->editing_event_day == E_DAY_VIEW_LONG_EVENT - && day_view->editing_event_num == event_num) - return; - - /* Determine the position of the label, so we know where to place the - icons. Note that since the top canvas never scrolls we don't need - to take the scroll offset into account. It will always be 0. */ - text_x = event->canvas_item->x1; - - /* Draw the icons. */ - icon_x_inc = E_DAY_VIEW_ICON_WIDTH + E_DAY_VIEW_ICON_X_PAD; - icon_x = text_x - icon_x_inc - x; - icon_y = item_y + 1 + E_DAY_VIEW_ICON_Y_PAD - y; - - if (ico->recur) { - gdk_gc_set_clip_origin (gc, icon_x, icon_y); - gdk_gc_set_clip_mask (gc, day_view->recurrence_mask); - gdk_draw_pixmap (drawable, gc, - day_view->recurrence_icon, - 0, 0, icon_x, icon_y, - E_DAY_VIEW_ICON_WIDTH, - E_DAY_VIEW_ICON_HEIGHT); - icon_x -= icon_x_inc; - } - - if (ico->dalarm.enabled || ico->malarm.enabled - || ico->palarm.enabled || ico->aalarm.enabled) { - gdk_gc_set_clip_origin (gc, icon_x, icon_y); - gdk_gc_set_clip_mask (gc, day_view->reminder_mask); - gdk_draw_pixmap (drawable, gc, - day_view->reminder_icon, - 0, 0, icon_x, icon_y, - E_DAY_VIEW_ICON_WIDTH, - E_DAY_VIEW_ICON_HEIGHT); - icon_x -= icon_x_inc; - } - gdk_gc_set_clip_mask (gc, NULL); - - /* Draw the start & end times, if necessary. - Note that GtkLabel adds 1 to the ascent so we must do that to be - level with it. */ - min_end_time_x = item_x + E_DAY_VIEW_LONG_EVENT_X_PAD - x; - - if (event->start > day_view->day_starts[start_day]) { - offset = day_view->first_hour_shown * 60 - + day_view->first_minute_shown + event->start_minute; - hour = offset / 60; - minute = offset % 60; - sprintf (buffer, "%02i:%02i", hour, minute); - - clip_rect.x = item_x - x; - clip_rect.y = item_y - y; - clip_rect.width = item_w - E_DAY_VIEW_LONG_EVENT_BORDER_WIDTH; - clip_rect.height = item_h; - gdk_gc_set_clip_rectangle (fg_gc, &clip_rect); - - gdk_draw_string (drawable, font, fg_gc, - item_x + E_DAY_VIEW_LONG_EVENT_X_PAD - x, - item_y + E_DAY_VIEW_LONG_EVENT_Y_PAD + font->ascent + 1 - y, - buffer); - - gdk_gc_set_clip_rectangle (fg_gc, NULL); - - min_end_time_x += day_view->small_hour_widths[hour] + 2 - + day_view->max_minute_width + day_view->colon_width; - } - - if (event->end < day_view->day_starts[end_day + 1]) { - offset = day_view->first_hour_shown * 60 - + day_view->first_minute_shown - + event->end_minute; - hour = offset / 60; - minute = offset % 60; - time_width = day_view->small_hour_widths[hour] - + day_view->max_minute_width + day_view->colon_width; - time_x = item_x + item_w - E_DAY_VIEW_LONG_EVENT_X_PAD - time_width - E_DAY_VIEW_LONG_EVENT_TIME_X_PAD - x; - - if (time_x >= min_end_time_x) { - sprintf (buffer, "%02i:%02i", hour, minute); - gdk_draw_string (drawable, font, fg_gc, - time_x, - item_y + E_DAY_VIEW_LONG_EVENT_Y_PAD - + font->ascent + 1 - y, - buffer); - } - } -} - - -/* This draws a little triangle to indicate that an event extends past - the days visible on screen. */ -static void -e_day_view_top_item_draw_triangle (EDayViewTopItem *dvtitem, - GdkDrawable *drawable, - gint x, - gint y, - gint w, - gint h) -{ - EDayView *day_view; - GtkStyle *style; - GdkGC *fg_gc, *bg_gc; - GdkPoint points[3]; - gint c1, c2; - - day_view = dvtitem->day_view; - - style = GTK_WIDGET (day_view)->style; - fg_gc = style->fg_gc[GTK_STATE_NORMAL]; - bg_gc = style->bg_gc[GTK_STATE_NORMAL]; - - points[0].x = x; - points[0].y = y; - points[1].x = x + w; - points[1].y = y + (h / 2) - 1; - points[2].x = x; - points[2].y = y + h - 1; - - /* If the height is odd we can use the same central point for both - lines. If it is even we use different end-points. */ - c1 = c2 = y + (h / 2); - if (h % 2 == 0) - c1--; - - gdk_draw_polygon (drawable, bg_gc, TRUE, points, 3); - gdk_draw_line (drawable, fg_gc, x, y, x + w, c1); - gdk_draw_line (drawable, fg_gc, x, y + h - 1, x + w, c2); -} - - -/* This is supposed to return the nearest item the the point and the distance. - Since we are the only item we just return ourself and 0 for the distance. - This is needed so that we get button/motion events. */ -static double -e_day_view_top_item_point (GnomeCanvasItem *item, double x, double y, - int cx, int cy, - GnomeCanvasItem **actual_item) -{ - *actual_item = item; - return 0.0; -} - - -static gint -e_day_view_top_item_event (GnomeCanvasItem *item, GdkEvent *event) -{ - EDayViewTopItem *dvtitem; - - dvtitem = E_DAY_VIEW_TOP_ITEM (item); - - switch (event->type) { - case GDK_BUTTON_PRESS: - - case GDK_BUTTON_RELEASE: - - case GDK_MOTION_NOTIFY: - - default: - break; - } - - return FALSE; -} - - diff --git a/calendar/gui/e-day-view-top-item.h b/calendar/gui/e-day-view-top-item.h deleted file mode 100644 index 435ef12b58..0000000000 --- a/calendar/gui/e-day-view-top-item.h +++ /dev/null @@ -1,65 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -/* - * Author : - * Damon Chaplin - * - * Copyright 1999, Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ -#ifndef _E_DAY_VIEW_TOP_ITEM_H_ -#define _E_DAY_VIEW_TOP_ITEM_H_ - -#include "e-day-view.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* - * EDayViewTopItem - displays the top part of the Day/Work Week calendar view. - */ - -#define E_DAY_VIEW_TOP_ITEM(obj) (GTK_CHECK_CAST((obj), \ - e_day_view_top_item_get_type (), EDayViewTopItem)) -#define E_DAY_VIEW_TOP_ITEM_CLASS(k) (GTK_CHECK_CLASS_CAST ((k),\ - e_day_view_top_item_get_type ())) -#define E_IS_DAY_VIEW_TOP_ITEM(o) (GTK_CHECK_TYPE((o), \ - e_day_view_top_item_get_type ())) - -typedef struct { - GnomeCanvasItem canvas_item; - - /* The parent EDayView widget. */ - EDayView *day_view; -} EDayViewTopItem; - -typedef struct { - GnomeCanvasItemClass parent_class; - -} EDayViewTopItemClass; - - -GtkType e_day_view_top_item_get_type (void); - - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* _E_DAY_VIEW_TOP_ITEM_H_ */ diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c deleted file mode 100644 index 0963b00acb..0000000000 --- a/calendar/gui/e-day-view.c +++ /dev/null @@ -1,5199 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -/* - * Author : - * Damon Chaplin - * - * Copyright 1999, Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ - -/* - * EDayView - displays the Day & Work-Week views of the calendar. - */ - -#include -#include -#include -#include -#include -#include -#include "e-day-view.h" -#include "e-day-view-time-item.h" -#include "e-day-view-top-item.h" -#include "e-day-view-main-item.h" -#include "calendar-commands.h" -#include "popup-menu.h" -#include "eventedit.h" -#include "../e-util/e-canvas.h" -#include "../widgets/e-text/e-text.h" - -/* Images */ -#include "bell.xpm" -#include "recur.xpm" - -/* The minimum amount of space wanted on each side of the date string. */ -#define E_DAY_VIEW_DATE_X_PAD 4 - -#define E_DAY_VIEW_LARGE_FONT \ - "-adobe-utopia-regular-r-normal-*-*-240-*-*-p-*-iso8859-*" -#define E_DAY_VIEW_LARGE_FONT_FALLBACK \ - "-adobe-helvetica-bold-r-normal-*-*-240-*-*-p-*-iso8859-*" - -/* The offset from the top/bottom of the canvas before auto-scrolling starts.*/ -#define E_DAY_VIEW_AUTO_SCROLL_OFFSET 16 - -/* The time between each auto-scroll, in milliseconds. */ -#define E_DAY_VIEW_AUTO_SCROLL_TIMEOUT 50 - -/* The number of timeouts we skip before we start scrolling. */ -#define E_DAY_VIEW_AUTO_SCROLL_DELAY 5 - -/* The number of pixels the mouse has to be moved with the button down before - we start a drag. */ -#define E_DAY_VIEW_DRAG_START_OFFSET 4 - -/* Drag and Drop stuff. */ -enum { - TARGET_CALENDAR_EVENT -}; -static GtkTargetEntry target_table[] = { - { "application/x-e-calendar-event", 0, TARGET_CALENDAR_EVENT } -}; -static guint n_targets = sizeof(target_table) / sizeof(target_table[0]); - -static void e_day_view_class_init (EDayViewClass *class); -static void e_day_view_init (EDayView *day_view); -static void e_day_view_destroy (GtkObject *object); -static void e_day_view_realize (GtkWidget *widget); -static void e_day_view_unrealize (GtkWidget *widget); -static void e_day_view_style_set (GtkWidget *widget, - GtkStyle *previous_style); -static void e_day_view_size_allocate (GtkWidget *widget, - GtkAllocation *allocation); -static gboolean e_day_view_update_scroll_regions (EDayView *day_view); -static gint e_day_view_focus_in (GtkWidget *widget, - GdkEventFocus *event); -static gint e_day_view_focus_out (GtkWidget *widget, - GdkEventFocus *event); -static gint e_day_view_key_press (GtkWidget *widget, - GdkEventKey *event); -static gboolean e_day_view_check_if_new_event_fits (EDayView *day_view); - -static void e_day_view_on_canvas_realized (GtkWidget *widget, - EDayView *day_view); - -static gboolean e_day_view_on_top_canvas_button_press (GtkWidget *widget, - GdkEventButton *event, - EDayView *day_view); -static gboolean e_day_view_on_top_canvas_button_release (GtkWidget *widget, - GdkEventButton *event, - EDayView *day_view); -static gboolean e_day_view_on_top_canvas_motion (GtkWidget *widget, - GdkEventMotion *event, - EDayView *day_view); - -static gboolean e_day_view_on_main_canvas_button_press (GtkWidget *widget, - GdkEventButton *event, - EDayView *day_view); -static gboolean e_day_view_on_main_canvas_button_release (GtkWidget *widget, - GdkEventButton *event, - EDayView *day_view); -static void e_day_view_update_calendar_selection_time (EDayView *day_view); -static gboolean e_day_view_on_main_canvas_motion (GtkWidget *widget, - GdkEventMotion *event, - EDayView *day_view); -static gboolean e_day_view_convert_event_coords (EDayView *day_view, - GdkEvent *event, - GdkWindow *window, - gint *x_return, - gint *y_return); -static void e_day_view_update_long_event_resize (EDayView *day_view, - gint day); -static void e_day_view_update_resize (EDayView *day_view, - gint row); -static void e_day_view_finish_long_event_resize (EDayView *day_view); -static void e_day_view_finish_resize (EDayView *day_view); -static void e_day_view_abort_resize (EDayView *day_view, - guint32 time); - - -static gboolean e_day_view_on_long_event_button_press (EDayView *day_view, - gint event_num, - GdkEventButton *event, - EDayViewPosition pos, - gint event_x, - gint event_y); -static gboolean e_day_view_on_event_button_press (EDayView *day_view, - gint day, - gint event_num, - GdkEventButton *event, - EDayViewPosition pos, - gint event_x, - gint event_y); -static void e_day_view_on_long_event_click (EDayView *day_view, - gint event_num, - GdkEventButton *bevent, - EDayViewPosition pos, - gint event_x, - gint event_y); -static void e_day_view_on_event_click (EDayView *day_view, - gint day, - gint event_num, - GdkEventButton *event, - EDayViewPosition pos, - gint event_x, - gint event_y); -static void e_day_view_on_event_double_click (EDayView *day_view, - gint day, - gint event_num); -static void e_day_view_on_event_right_click (EDayView *day_view, - GdkEventButton *bevent, - gint day, - gint event_num); - -static void e_day_view_recalc_day_starts (EDayView *day_view, - time_t start_time); -static void e_day_view_recalc_num_rows (EDayView *day_view); - -static EDayViewPosition e_day_view_convert_position_in_top_canvas (EDayView *day_view, - gint x, - gint y, - gint *day_return, - gint *event_num_return); -static EDayViewPosition e_day_view_convert_position_in_main_canvas (EDayView *day_view, - gint x, - gint y, - gint *day_return, - gint *row_return, - gint *event_num_return); -static gboolean e_day_view_find_event_from_item (EDayView *day_view, - GnomeCanvasItem *item, - gint *day_return, - gint *event_num_return); -static gboolean e_day_view_find_event_from_uid (EDayView *day_view, - const gchar *uid, - gint *day_return, - gint *event_num_return); - -typedef gboolean (* EDayViewForeachEventCallback) (EDayView *day_view, - gint day, - gint event_num, - gpointer data); - -static void e_day_view_foreach_event_with_uid (EDayView *day_view, - const gchar *uid, - EDayViewForeachEventCallback callback, - gpointer data); - -static void e_day_view_reload_events (EDayView *day_view); -static void e_day_view_free_events (EDayView *day_view); -static void e_day_view_free_event_array (EDayView *day_view, - GArray *array); -static int e_day_view_add_event (iCalObject *ico, - time_t start, - time_t end, - gpointer data); -static void e_day_view_update_event_label (EDayView *day_view, - gint day, - gint event_num); -static void e_day_view_update_long_event_label (EDayView *day_view, - gint event_num); - -static void e_day_view_layout_long_events (EDayView *day_view); -static void e_day_view_layout_long_event (EDayView *day_view, - EDayViewEvent *event, - guint8 *grid); -static void e_day_view_reshape_long_events (EDayView *day_view); -static void e_day_view_reshape_long_event (EDayView *day_view, - gint event_num); -static void e_day_view_layout_day_events (EDayView *day_view, - gint day); -static void e_day_view_layout_day_event (EDayView *day_view, - gint day, - EDayViewEvent *event, - guint8 *grid, - guint16 *group_starts); -static void e_day_view_expand_day_event (EDayView *day_view, - gint day, - EDayViewEvent *event, - guint8 *grid); -static void e_day_view_recalc_cols_per_row (EDayView *day_view, - gint day, - guint16 *group_starts); -static void e_day_view_reshape_day_events (EDayView *day_view, - gint day); -static void e_day_view_reshape_day_event (EDayView *day_view, - gint day, - gint event_num); -static void e_day_view_reshape_main_canvas_resize_bars (EDayView *day_view); -static void e_day_view_reshape_resize_long_event_rect_item (EDayView *day_view); -static void e_day_view_reshape_resize_rect_item (EDayView *day_view); - -static void e_day_view_ensure_events_sorted (EDayView *day_view); -static gint e_day_view_event_sort_func (const void *arg1, - const void *arg2); - -static void e_day_view_start_editing_event (EDayView *day_view, - gint day, - gint event_num, - gchar *initial_text); -static void e_day_view_stop_editing_event (EDayView *day_view); -static gboolean e_day_view_on_text_item_event (GnomeCanvasItem *item, - GdkEvent *event, - EDayView *day_view); -static void e_day_view_on_editing_started (EDayView *day_view, - GnomeCanvasItem *item); -static void e_day_view_on_editing_stopped (EDayView *day_view, - GnomeCanvasItem *item); - -static time_t e_day_view_convert_grid_position_to_time (EDayView *day_view, - gint col, - gint row); -static gboolean e_day_view_convert_time_to_grid_position (EDayView *day_view, - time_t time, - gint *col, - gint *row); - -static void e_day_view_start_auto_scroll (EDayView *day_view, - gboolean scroll_up); -static gboolean e_day_view_auto_scroll_handler (gpointer data); - -static void e_day_view_on_new_appointment (GtkWidget *widget, - gpointer data); -static void e_day_view_on_edit_appointment (GtkWidget *widget, - gpointer data); -static void e_day_view_on_delete_occurrence (GtkWidget *widget, - gpointer data); -static void e_day_view_on_delete_appointment (GtkWidget *widget, - gpointer data); -static void e_day_view_on_unrecur_appointment (GtkWidget *widget, - gpointer data); -static EDayViewEvent* e_day_view_get_popup_menu_event (EDayView *day_view); - -static gint e_day_view_on_top_canvas_drag_motion (GtkWidget *widget, - GdkDragContext *context, - gint x, - gint y, - guint time, - EDayView *day_view); -static void e_day_view_update_top_canvas_drag (EDayView *day_view, - gint day); -static void e_day_view_reshape_top_canvas_drag_item (EDayView *day_view); -static gint e_day_view_on_main_canvas_drag_motion (GtkWidget *widget, - GdkDragContext *context, - gint x, - gint y, - guint time, - EDayView *day_view); -static void e_day_view_reshape_main_canvas_drag_item (EDayView *day_view); -static void e_day_view_update_main_canvas_drag (EDayView *day_view, - gint row, - gint day); -static void e_day_view_on_top_canvas_drag_leave (GtkWidget *widget, - GdkDragContext *context, - guint time, - EDayView *day_view); -static void e_day_view_on_main_canvas_drag_leave (GtkWidget *widget, - GdkDragContext *context, - guint time, - EDayView *day_view); -static void e_day_view_on_drag_begin (GtkWidget *widget, - GdkDragContext *context, - EDayView *day_view); -static void e_day_view_on_drag_end (GtkWidget *widget, - GdkDragContext *context, - EDayView *day_view); -static void e_day_view_on_drag_data_get (GtkWidget *widget, - GdkDragContext *context, - GtkSelectionData *selection_data, - guint info, - guint time, - EDayView *day_view); -static void e_day_view_on_top_canvas_drag_data_received (GtkWidget *widget, - GdkDragContext *context, - gint x, - gint y, - GtkSelectionData *data, - guint info, - guint time, - EDayView *day_view); -static void e_day_view_on_main_canvas_drag_data_received (GtkWidget *widget, - GdkDragContext *context, - gint x, - gint y, - GtkSelectionData *data, - guint info, - guint time, - EDayView *day_view); -static gboolean e_day_view_update_event_cb (EDayView *day_view, - gint day, - gint event_num, - gpointer data); -static gboolean e_day_view_remove_event_cb (EDayView *day_view, - gint day, - gint event_num, - gpointer data); - - -static GtkTableClass *parent_class; - - -GtkType -e_day_view_get_type (void) -{ - static GtkType e_day_view_type = 0; - - if (!e_day_view_type){ - GtkTypeInfo e_day_view_info = { - "EDayView", - sizeof (EDayView), - sizeof (EDayViewClass), - (GtkClassInitFunc) e_day_view_class_init, - (GtkObjectInitFunc) e_day_view_init, - NULL, /* reserved 1 */ - NULL, /* reserved 2 */ - (GtkClassInitFunc) NULL - }; - - parent_class = gtk_type_class (GTK_TYPE_TABLE); - e_day_view_type = gtk_type_unique (GTK_TYPE_TABLE, - &e_day_view_info); - } - - return e_day_view_type; -} - - -static void -e_day_view_class_init (EDayViewClass *class) -{ - GtkObjectClass *object_class; - GtkWidgetClass *widget_class; - - object_class = (GtkObjectClass *) class; - widget_class = (GtkWidgetClass *) class; - - /* Method override */ - object_class->destroy = e_day_view_destroy; - - widget_class->realize = e_day_view_realize; - widget_class->unrealize = e_day_view_unrealize; - widget_class->style_set = e_day_view_style_set; - widget_class->size_allocate = e_day_view_size_allocate; - widget_class->focus_in_event = e_day_view_focus_in; - widget_class->focus_out_event = e_day_view_focus_out; - widget_class->key_press_event = e_day_view_key_press; -} - - -static void -e_day_view_init (EDayView *day_view) -{ - GdkColormap *colormap; - gboolean success[E_DAY_VIEW_COLOR_LAST]; - gint day, nfailed; - GnomeCanvasGroup *canvas_group; - - GTK_WIDGET_SET_FLAGS (day_view, GTK_CAN_FOCUS); - - colormap = gtk_widget_get_colormap (GTK_WIDGET (day_view)); - - day_view->calendar = NULL; - - day_view->long_events = g_array_new (FALSE, FALSE, - sizeof (EDayViewEvent)); - day_view->long_events_sorted = TRUE; - day_view->long_events_need_layout = FALSE; - day_view->long_events_need_reshape = FALSE; - - for (day = 0; day < E_DAY_VIEW_MAX_DAYS; day++) { - day_view->events[day] = g_array_new (FALSE, FALSE, - sizeof (EDayViewEvent)); - day_view->events_sorted[day] = TRUE; - day_view->need_layout[day] = FALSE; - day_view->need_reshape[day] = FALSE; - } - - /* These indicate that the times haven't been set. */ - day_view->lower = 0; - day_view->upper = 0; - - /* FIXME: Initialize day_starts. */ - day_view->days_shown = 1; - - day_view->mins_per_row = 30; - day_view->date_format = E_DAY_VIEW_DATE_FULL; - day_view->rows_in_top_display = 0; - - /* Note that these don't work yet. It would need a few fixes to the - way event->start_minute and event->end_minute are used, and there - may be problems with events that go outside the visible times. */ - day_view->first_hour_shown = 0; - day_view->first_minute_shown = 0; - day_view->last_hour_shown = 24; - day_view->last_minute_shown = 0; - - day_view->main_gc = NULL; - e_day_view_recalc_num_rows (day_view); - - day_view->work_day_start_hour = 9; - day_view->work_day_start_minute = 0; - day_view->work_day_end_hour = 17; - day_view->work_day_end_minute = 0; - day_view->scroll_to_work_day = TRUE; - - day_view->editing_event_day = -1; - day_view->editing_event_num = -1; - day_view->editing_new_event = FALSE; - - day_view->resize_bars_event_day = -1; - day_view->resize_bars_event_num = -1; - - day_view->selection_start_row = -1; - day_view->selection_start_day = -1; - day_view->selection_end_row = -1; - day_view->selection_end_day = -1; - day_view->selection_drag_pos = E_DAY_VIEW_DRAG_NONE; - day_view->selection_in_top_canvas = FALSE; - - day_view->resize_drag_pos = E_DAY_VIEW_POS_NONE; - - day_view->pressed_event_day = -1; - - day_view->drag_event_day = -1; - day_view->drag_last_day = -1; - - day_view->auto_scroll_timeout_id = 0; - - /* Create the large font. */ - day_view->large_font = gdk_font_load (E_DAY_VIEW_LARGE_FONT); - if (!day_view->large_font) - day_view->large_font = gdk_font_load (E_DAY_VIEW_LARGE_FONT_FALLBACK); - if (!day_view->large_font) - g_warning ("Couldn't load font"); - - - /* Allocate the colors. */ -#if 1 - day_view->colors[E_DAY_VIEW_COLOR_BG_WORKING].red = 255 * 257; - day_view->colors[E_DAY_VIEW_COLOR_BG_WORKING].green = 255 * 257; - day_view->colors[E_DAY_VIEW_COLOR_BG_WORKING].blue = 131 * 257; - - day_view->colors[E_DAY_VIEW_COLOR_BG_NOT_WORKING].red = 211 * 257; - day_view->colors[E_DAY_VIEW_COLOR_BG_NOT_WORKING].green = 208 * 257; - day_view->colors[E_DAY_VIEW_COLOR_BG_NOT_WORKING].blue = 6 * 257; -#else - - /* FG: MistyRose1, LightPink3 | RosyBrown | MistyRose3. */ - - day_view->colors[E_DAY_VIEW_COLOR_BG_WORKING].red = 255 * 257; - day_view->colors[E_DAY_VIEW_COLOR_BG_WORKING].green = 228 * 257; - day_view->colors[E_DAY_VIEW_COLOR_BG_WORKING].blue = 225 * 257; - - day_view->colors[E_DAY_VIEW_COLOR_BG_NOT_WORKING].red = 238 * 257; - day_view->colors[E_DAY_VIEW_COLOR_BG_NOT_WORKING].green = 162 * 257; - day_view->colors[E_DAY_VIEW_COLOR_BG_NOT_WORKING].blue = 173 * 257; -#endif - - day_view->colors[E_DAY_VIEW_COLOR_EVENT_VBAR].red = 0; - day_view->colors[E_DAY_VIEW_COLOR_EVENT_VBAR].green = 0; - day_view->colors[E_DAY_VIEW_COLOR_EVENT_VBAR].blue = 65535; - - day_view->colors[E_DAY_VIEW_COLOR_EVENT_BACKGROUND].red = 65535; - day_view->colors[E_DAY_VIEW_COLOR_EVENT_BACKGROUND].green = 65535; - day_view->colors[E_DAY_VIEW_COLOR_EVENT_BACKGROUND].blue = 65535; - - day_view->colors[E_DAY_VIEW_COLOR_EVENT_BORDER].red = 0; - day_view->colors[E_DAY_VIEW_COLOR_EVENT_BORDER].green = 0; - day_view->colors[E_DAY_VIEW_COLOR_EVENT_BORDER].blue = 0; - - nfailed = gdk_colormap_alloc_colors (colormap, day_view->colors, - E_DAY_VIEW_COLOR_LAST, FALSE, - TRUE, success); - if (nfailed) - g_warning ("Failed to allocate all colors"); - - - - /* - * Top Canvas - */ - day_view->top_canvas = e_canvas_new (); - gtk_table_attach (GTK_TABLE (day_view), day_view->top_canvas, - 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0); - gtk_widget_show (day_view->top_canvas); - gtk_signal_connect_after (GTK_OBJECT (day_view->top_canvas), "button_press_event", - GTK_SIGNAL_FUNC (e_day_view_on_top_canvas_button_press), - day_view); - gtk_signal_connect_after (GTK_OBJECT (day_view->top_canvas), "button_release_event", - GTK_SIGNAL_FUNC (e_day_view_on_top_canvas_button_release), - day_view); - gtk_signal_connect_after (GTK_OBJECT (day_view->top_canvas), "motion_notify_event", - GTK_SIGNAL_FUNC (e_day_view_on_top_canvas_motion), - day_view); - gtk_signal_connect_after (GTK_OBJECT (day_view->top_canvas), - "drag_motion", - GTK_SIGNAL_FUNC (e_day_view_on_top_canvas_drag_motion), - day_view); - gtk_signal_connect_after (GTK_OBJECT (day_view->top_canvas), - "drag_leave", - GTK_SIGNAL_FUNC (e_day_view_on_top_canvas_drag_leave), - day_view); - gtk_signal_connect (GTK_OBJECT (day_view->top_canvas), - "drag_begin", - GTK_SIGNAL_FUNC (e_day_view_on_drag_begin), - day_view); - gtk_signal_connect (GTK_OBJECT (day_view->top_canvas), - "drag_end", - GTK_SIGNAL_FUNC (e_day_view_on_drag_end), - day_view); - gtk_signal_connect (GTK_OBJECT (day_view->top_canvas), - "drag_data_get", - GTK_SIGNAL_FUNC (e_day_view_on_drag_data_get), - day_view); - gtk_signal_connect (GTK_OBJECT (day_view->top_canvas), - "drag_data_received", - GTK_SIGNAL_FUNC (e_day_view_on_top_canvas_drag_data_received), - day_view); - - canvas_group = GNOME_CANVAS_GROUP (GNOME_CANVAS (day_view->top_canvas)->root); - - day_view->top_canvas_item = - gnome_canvas_item_new (canvas_group, - e_day_view_top_item_get_type (), - "EDayViewTopItem::day_view", day_view, - NULL); - - day_view->resize_long_event_rect_item = - gnome_canvas_item_new (canvas_group, - gnome_canvas_rect_get_type(), - "fill_color_gdk", &day_view->colors[E_DAY_VIEW_COLOR_EVENT_BACKGROUND], - "outline_color_gdk", &day_view->colors[E_DAY_VIEW_COLOR_EVENT_BORDER], - NULL); - gnome_canvas_item_hide (day_view->resize_long_event_rect_item); - - day_view->drag_long_event_rect_item = - gnome_canvas_item_new (canvas_group, - gnome_canvas_rect_get_type (), - "width_pixels", 1, - "fill_color_gdk", &day_view->colors[E_DAY_VIEW_COLOR_EVENT_BACKGROUND], - "outline_color_gdk", &day_view->colors[E_DAY_VIEW_COLOR_EVENT_BORDER], - NULL); - gnome_canvas_item_hide (day_view->drag_long_event_rect_item); - - day_view->drag_long_event_item = - gnome_canvas_item_new (canvas_group, - e_text_get_type (), - "anchor", GTK_ANCHOR_NW, - "line_wrap", TRUE, - "clip", TRUE, - "max_lines", 1, - "editable", TRUE, - NULL); - gnome_canvas_item_hide (day_view->drag_long_event_item); - - /* - * Main Canvas - */ - day_view->main_canvas = e_canvas_new (); - gtk_table_attach (GTK_TABLE (day_view), day_view->main_canvas, - 1, 2, 1, 2, - GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); - gtk_widget_show (day_view->main_canvas); - gtk_signal_connect (GTK_OBJECT (day_view->main_canvas), "realize", - GTK_SIGNAL_FUNC (e_day_view_on_canvas_realized), - day_view); - gtk_signal_connect_after (GTK_OBJECT (day_view->main_canvas), - "button_press_event", - GTK_SIGNAL_FUNC (e_day_view_on_main_canvas_button_press), - day_view); - gtk_signal_connect_after (GTK_OBJECT (day_view->main_canvas), - "button_release_event", - GTK_SIGNAL_FUNC (e_day_view_on_main_canvas_button_release), - day_view); - gtk_signal_connect_after (GTK_OBJECT (day_view->main_canvas), - "motion_notify_event", - GTK_SIGNAL_FUNC (e_day_view_on_main_canvas_motion), - day_view); - gtk_signal_connect_after (GTK_OBJECT (day_view->main_canvas), - "drag_motion", - GTK_SIGNAL_FUNC (e_day_view_on_main_canvas_drag_motion), - day_view); - gtk_signal_connect_after (GTK_OBJECT (day_view->main_canvas), - "drag_leave", - GTK_SIGNAL_FUNC (e_day_view_on_main_canvas_drag_leave), - day_view); - gtk_signal_connect (GTK_OBJECT (day_view->main_canvas), - "drag_begin", - GTK_SIGNAL_FUNC (e_day_view_on_drag_begin), - day_view); - gtk_signal_connect (GTK_OBJECT (day_view->main_canvas), - "drag_end", - GTK_SIGNAL_FUNC (e_day_view_on_drag_end), - day_view); - gtk_signal_connect (GTK_OBJECT (day_view->main_canvas), - "drag_data_get", - GTK_SIGNAL_FUNC (e_day_view_on_drag_data_get), - day_view); - gtk_signal_connect (GTK_OBJECT (day_view->main_canvas), - "drag_data_received", - GTK_SIGNAL_FUNC (e_day_view_on_main_canvas_drag_data_received), - day_view); - - canvas_group = GNOME_CANVAS_GROUP (GNOME_CANVAS (day_view->main_canvas)->root); - - day_view->main_canvas_item = - gnome_canvas_item_new (canvas_group, - e_day_view_main_item_get_type (), - "EDayViewMainItem::day_view", day_view, - NULL); - - day_view->resize_rect_item = - gnome_canvas_item_new (canvas_group, - gnome_canvas_rect_get_type(), - "fill_color_gdk", &day_view->colors[E_DAY_VIEW_COLOR_EVENT_BACKGROUND], - "outline_color_gdk", &day_view->colors[E_DAY_VIEW_COLOR_EVENT_BORDER], - NULL); - gnome_canvas_item_hide (day_view->resize_rect_item); - - day_view->resize_bar_item = - gnome_canvas_item_new (canvas_group, - gnome_canvas_rect_get_type(), - "fill_color_gdk", &day_view->colors[E_DAY_VIEW_COLOR_EVENT_VBAR], - "outline_color_gdk", &day_view->colors[E_DAY_VIEW_COLOR_EVENT_BORDER], - NULL); - gnome_canvas_item_hide (day_view->resize_bar_item); - - day_view->main_canvas_top_resize_bar_item = - gnome_canvas_item_new (canvas_group, - gnome_canvas_rect_get_type (), - "width_pixels", 1, - "fill_color_gdk", &day_view->colors[E_DAY_VIEW_COLOR_EVENT_VBAR], - "outline_color_gdk", &day_view->colors[E_DAY_VIEW_COLOR_EVENT_BORDER], - NULL); - gnome_canvas_item_hide (day_view->main_canvas_top_resize_bar_item); - - day_view->main_canvas_bottom_resize_bar_item = - gnome_canvas_item_new (canvas_group, - gnome_canvas_rect_get_type (), - "width_pixels", 1, - "fill_color_gdk", &day_view->colors[E_DAY_VIEW_COLOR_EVENT_VBAR], - "outline_color_gdk", &day_view->colors[E_DAY_VIEW_COLOR_EVENT_BORDER], - NULL); - gnome_canvas_item_hide (day_view->main_canvas_bottom_resize_bar_item); - - - day_view->drag_rect_item = - gnome_canvas_item_new (canvas_group, - gnome_canvas_rect_get_type (), - "width_pixels", 1, - "fill_color_gdk", &day_view->colors[E_DAY_VIEW_COLOR_EVENT_BACKGROUND], - "outline_color_gdk", &day_view->colors[E_DAY_VIEW_COLOR_EVENT_BORDER], - NULL); - gnome_canvas_item_hide (day_view->drag_rect_item); - - day_view->drag_bar_item = - gnome_canvas_item_new (canvas_group, - gnome_canvas_rect_get_type (), - "width_pixels", 1, - "fill_color_gdk", &day_view->colors[E_DAY_VIEW_COLOR_EVENT_VBAR], - "outline_color_gdk", &day_view->colors[E_DAY_VIEW_COLOR_EVENT_BORDER], - NULL); - gnome_canvas_item_hide (day_view->drag_bar_item); - - day_view->drag_item = - gnome_canvas_item_new (canvas_group, - e_text_get_type (), - "anchor", GTK_ANCHOR_NW, - "line_wrap", TRUE, - "clip", TRUE, - "editable", TRUE, - NULL); - gnome_canvas_item_hide (day_view->drag_item); - - - /* - * Times Canvas - */ - day_view->time_canvas = e_canvas_new (); - gtk_layout_set_vadjustment (GTK_LAYOUT (day_view->time_canvas), - GTK_LAYOUT (day_view->main_canvas)->vadjustment); - gtk_table_attach (GTK_TABLE (day_view), day_view->time_canvas, - 0, 1, 1, 2, - GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); - gtk_widget_show (day_view->time_canvas); - - canvas_group = GNOME_CANVAS_GROUP (GNOME_CANVAS (day_view->time_canvas)->root); - - day_view->time_canvas_item = - gnome_canvas_item_new (canvas_group, - e_day_view_time_item_get_type (), - "EDayViewTimeItem::day_view", day_view, - NULL); - - - /* - * Scrollbar. - */ - day_view->vscrollbar = gtk_vscrollbar_new (GTK_LAYOUT (day_view->main_canvas)->vadjustment); - gtk_table_attach (GTK_TABLE (day_view), day_view->vscrollbar, - 2, 3, 1, 2, 0, GTK_EXPAND | GTK_FILL, 0, 0); - gtk_widget_show (day_view->vscrollbar); - - - /* Create the pixmaps. */ - day_view->reminder_icon = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap, &day_view->reminder_mask, NULL, bell_xpm); - day_view->recurrence_icon = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap, &day_view->recurrence_mask, NULL, recur_xpm); - - - /* Create the cursors. */ - day_view->normal_cursor = gdk_cursor_new (GDK_TOP_LEFT_ARROW); - day_view->move_cursor = gdk_cursor_new (GDK_FLEUR); - day_view->resize_width_cursor = gdk_cursor_new (GDK_SB_H_DOUBLE_ARROW); - day_view->resize_height_cursor = gdk_cursor_new (GDK_SB_V_DOUBLE_ARROW); - day_view->last_cursor_set_in_top_canvas = NULL; - day_view->last_cursor_set_in_main_canvas = NULL; - - /* Set up the drop sites. */ - gtk_drag_dest_set (day_view->top_canvas, - GTK_DEST_DEFAULT_ALL, - target_table, n_targets, - GDK_ACTION_COPY | GDK_ACTION_MOVE); - gtk_drag_dest_set (day_view->main_canvas, - GTK_DEST_DEFAULT_ALL, - target_table, n_targets, - GDK_ACTION_COPY | GDK_ACTION_MOVE); -} - - -/* Turn off the background of the canvas windows. This reduces flicker - considerably when scrolling. (Why isn't it in GnomeCanvas?). */ -static void -e_day_view_on_canvas_realized (GtkWidget *widget, - EDayView *day_view) -{ - gdk_window_set_back_pixmap (GTK_LAYOUT (widget)->bin_window, - NULL, FALSE); -} - - -/** - * e_day_view_new: - * @Returns: a new #EDayView. - * - * Creates a new #EDayView. - **/ -GtkWidget * -e_day_view_new (void) -{ - GtkWidget *day_view; - - day_view = GTK_WIDGET (gtk_type_new (e_day_view_get_type ())); - - return day_view; -} - - -static void -e_day_view_destroy (GtkObject *object) -{ - EDayView *day_view; - gint day; - - day_view = E_DAY_VIEW (object); - - e_day_view_stop_auto_scroll (day_view); - - if (day_view->large_font) - gdk_font_unref (day_view->large_font); - - gdk_cursor_destroy (day_view->normal_cursor); - gdk_cursor_destroy (day_view->move_cursor); - gdk_cursor_destroy (day_view->resize_width_cursor); - gdk_cursor_destroy (day_view->resize_height_cursor); - - e_day_view_free_events (day_view); - g_array_free (day_view->long_events, TRUE); - for (day = 0; day < E_DAY_VIEW_MAX_DAYS; day++) - g_array_free (day_view->events[day], TRUE); - - GTK_OBJECT_CLASS (parent_class)->destroy (object); -} - - -static void -e_day_view_realize (GtkWidget *widget) -{ - EDayView *day_view; - - if (GTK_WIDGET_CLASS (parent_class)->realize) - (*GTK_WIDGET_CLASS (parent_class)->realize)(widget); - - day_view = E_DAY_VIEW (widget); - day_view->main_gc = gdk_gc_new (widget->window); -} - - -static void -e_day_view_unrealize (GtkWidget *widget) -{ - EDayView *day_view; - - day_view = E_DAY_VIEW (widget); - - gdk_gc_unref (day_view->main_gc); - day_view->main_gc = NULL; - - if (GTK_WIDGET_CLASS (parent_class)->unrealize) - (*GTK_WIDGET_CLASS (parent_class)->unrealize)(widget); -} - - -static void -e_day_view_style_set (GtkWidget *widget, - GtkStyle *previous_style) -{ - EDayView *day_view; - GdkFont *font; - gint top_rows, top_canvas_height; - gint month, max_month_width, max_abbr_month_width, number_width; - gint hour, max_large_hour_width, month_width; - gint minute, max_minute_width, i; - GDate date; - gchar buffer[128]; - gint times_width; - - if (GTK_WIDGET_CLASS (parent_class)->style_set) - (*GTK_WIDGET_CLASS (parent_class)->style_set)(widget, previous_style); - - day_view = E_DAY_VIEW (widget); - font = widget->style->font; - - /* Recalculate the height of each row based on the font size. */ - day_view->row_height = font->ascent + font->descent + E_DAY_VIEW_EVENT_BORDER_HEIGHT * 2 + E_DAY_VIEW_EVENT_Y_PAD * 2 + 2 /* FIXME */; - day_view->row_height = MAX (day_view->row_height, E_DAY_VIEW_ICON_HEIGHT + E_DAY_VIEW_ICON_Y_PAD + 2); - GTK_LAYOUT (day_view->main_canvas)->vadjustment->step_increment = day_view->row_height; - - day_view->top_row_height = font->ascent + font->descent + E_DAY_VIEW_LONG_EVENT_BORDER_HEIGHT * 2 + E_DAY_VIEW_LONG_EVENT_Y_PAD * 2 + E_DAY_VIEW_TOP_CANVAS_Y_GAP; - day_view->top_row_height = MAX (day_view->top_row_height, E_DAY_VIEW_ICON_HEIGHT + E_DAY_VIEW_ICON_Y_PAD + 2 + E_DAY_VIEW_TOP_CANVAS_Y_GAP); - - /* Set the height of the top canvas based on the row height and the - number of rows needed (min 1 + 1 for the dates + 1 space for DnD).*/ - top_rows = MAX (1, day_view->rows_in_top_display); - top_canvas_height = (top_rows + 2) * day_view->top_row_height; - gtk_widget_set_usize (day_view->top_canvas, -1, top_canvas_height); - - /* Find the biggest full month name. */ - g_date_clear (&date, 1); - g_date_set_dmy (&date, 20, 1, 2000); - max_month_width = 0; - max_abbr_month_width = 0; - for (month = 1; month <= 12; month++) { - g_date_set_month (&date, month); - - g_date_strftime (buffer, 128, "%B", &date); - month_width = gdk_string_width (font, buffer); - max_month_width = MAX (max_month_width, month_width); - - g_date_strftime (buffer, 128, "%b", &date); - month_width = gdk_string_width (font, buffer); - max_abbr_month_width = MAX (max_abbr_month_width, month_width); - } - number_width = gdk_string_width (font, "31 "); - day_view->long_format_width = number_width + max_month_width - + E_DAY_VIEW_DATE_X_PAD; - day_view->abbreviated_format_width = number_width - + max_abbr_month_width + E_DAY_VIEW_DATE_X_PAD; - - /* Calculate the widths of all the time strings necessary. */ - day_view->max_small_hour_width = 0; - max_large_hour_width = 0; - for (hour = 0; hour < 24; hour++) { - sprintf (buffer, "%02i", hour); - day_view->small_hour_widths[hour] = gdk_string_width (font, buffer); - day_view->large_hour_widths[hour] = gdk_string_width (day_view->large_font, buffer); - day_view->max_small_hour_width = MAX (day_view->max_small_hour_width, day_view->small_hour_widths[hour]); - max_large_hour_width = MAX (max_large_hour_width, day_view->large_hour_widths[hour]); - } - day_view->max_large_hour_width = max_large_hour_width; - - max_minute_width = 0; - for (minute = 0, i = 0; minute < 60; minute += 5, i++) { - sprintf (buffer, "%02i", minute); - day_view->minute_widths[i] = gdk_string_width (font, buffer); - max_minute_width = MAX (max_minute_width, day_view->minute_widths[i]); - } - day_view->max_minute_width = max_minute_width; - day_view->colon_width = gdk_string_width (font, ":"); - - /* Calculate the width of the time column. */ - times_width = e_day_view_time_item_get_column_width (E_DAY_VIEW_TIME_ITEM (day_view->time_canvas_item)); - gtk_widget_set_usize (day_view->time_canvas, times_width, -1); -} - - -/* This recalculates the sizes of each column. */ -static void -e_day_view_size_allocate (GtkWidget *widget, GtkAllocation *allocation) -{ - EDayView *day_view; - gfloat width, offset; - gint col, day, scroll_y; - gboolean need_reshape; - gdouble old_x2, old_y2, new_x2, new_y2; - -#if 0 - g_print ("In e_day_view_size_allocate\n"); -#endif - day_view = E_DAY_VIEW (widget); - - (*GTK_WIDGET_CLASS (parent_class)->size_allocate) (widget, allocation); - - /* Calculate the column sizes, using floating point so that pixels - get divided evenly. Note that we use one more element than the - number of columns, to make it easy to get the column widths. */ - width = day_view->main_canvas->allocation.width; - width /= day_view->days_shown; - offset = 0; - for (col = 0; col <= day_view->days_shown; col++) { - day_view->day_offsets[col] = floor (offset + 0.5); - offset += width; - } - - /* Calculate the days widths based on the offsets. */ - for (col = 0; col < day_view->days_shown; col++) { - day_view->day_widths[col] = day_view->day_offsets[col + 1] - day_view->day_offsets[col]; - } - - /* Determine which date format to use, based on the column widths. */ - if (day_view->day_widths[0] > day_view->long_format_width) - day_view->date_format = E_DAY_VIEW_DATE_FULL; - else if (day_view->day_widths[0] > day_view->abbreviated_format_width) - day_view->date_format = E_DAY_VIEW_DATE_ABBREVIATED; - else - day_view->date_format = E_DAY_VIEW_DATE_SHORT; - - /* Set the scroll region of the top canvas to its allocated size. */ - gnome_canvas_get_scroll_region (GNOME_CANVAS (day_view->top_canvas), - NULL, NULL, &old_x2, &old_y2); - new_x2 = day_view->top_canvas->allocation.width - 1; - new_y2 = day_view->top_canvas->allocation.height - 1; - if (old_x2 != new_x2 || old_y2 != new_y2) - gnome_canvas_set_scroll_region (GNOME_CANVAS (day_view->top_canvas), - 0, 0, new_x2, new_y2); - - need_reshape = e_day_view_update_scroll_regions (day_view); - - /* Scroll to the start of the working day, if this is the initial - allocation. */ - if (day_view->scroll_to_work_day) { - scroll_y = e_day_view_convert_time_to_position (day_view, day_view->work_day_start_hour, day_view->work_day_start_minute); - gnome_canvas_scroll_to (GNOME_CANVAS (day_view->main_canvas), - 0, scroll_y); - day_view->scroll_to_work_day = FALSE; - } - - /* Flag that we need to reshape the events. Note that changes in height - don't matter, since the rows are always the same height. */ - if (need_reshape) { - day_view->long_events_need_reshape = TRUE; - for (day = 0; day < E_DAY_VIEW_MAX_DAYS; day++) - day_view->need_reshape[day] = TRUE; - - e_day_view_check_layout (day_view); - } -} - - -static gint -e_day_view_focus_in (GtkWidget *widget, GdkEventFocus *event) -{ - EDayView *day_view; - - g_return_val_if_fail (widget != NULL, FALSE); - g_return_val_if_fail (E_IS_DAY_VIEW (widget), FALSE); - g_return_val_if_fail (event != NULL, FALSE); - - day_view = E_DAY_VIEW (widget); - - GTK_WIDGET_SET_FLAGS (widget, GTK_HAS_FOCUS); - - gtk_widget_queue_draw (day_view->top_canvas); - gtk_widget_queue_draw (day_view->main_canvas); - - return FALSE; -} - - -static gint -e_day_view_focus_out (GtkWidget *widget, GdkEventFocus *event) -{ - EDayView *day_view; - - g_return_val_if_fail (widget != NULL, FALSE); - g_return_val_if_fail (E_IS_DAY_VIEW (widget), FALSE); - g_return_val_if_fail (event != NULL, FALSE); - - day_view = E_DAY_VIEW (widget); - - GTK_WIDGET_UNSET_FLAGS (widget, GTK_HAS_FOCUS); - - gtk_widget_queue_draw (day_view->top_canvas); - gtk_widget_queue_draw (day_view->main_canvas); - - return FALSE; -} - - -void -e_day_view_set_calendar (EDayView *day_view, - GnomeCalendar *calendar) -{ - g_return_if_fail (E_IS_DAY_VIEW (day_view)); - - day_view->calendar = calendar; - - /* FIXME: free current events? */ -} - - -/* This reloads all calendar events. */ -void -e_day_view_update_all_events (EDayView *day_view) -{ - e_day_view_reload_events (day_view); -} - - -/* This is called when one event has been added or updated. */ -void -e_day_view_update_event (EDayView *day_view, - const gchar *uid) -{ - EDayViewEvent *event; - gchar *obj_string; - iCalObject *ico; - CalObjFindStatus status; - gint day, event_num; - - g_return_if_fail (E_IS_DAY_VIEW (day_view)); - -#if 1 - /* FIXME: Just for testing. */ - chdir ("/home/damon/tmp"); - g_log_set_always_fatal (G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL); - - g_print ("In e_day_view_update_event day_view:%p uid:%s\n", - day_view, uid); -#endif - - /* If our calendar or time hasn't been set yet, just return. */ - if (!day_view->calendar - || (day_view->lower == 0 && day_view->upper == 0)) - return; - - /* Get the event from the server. */ - obj_string = cal_client_get_object (day_view->calendar->client, uid); - status = ical_object_find_in_string (uid, obj_string, &ico); - g_free (obj_string); - - switch (status) { - case CAL_OBJ_FIND_SUCCESS: - /* Do nothing. */ - break; - case CAL_OBJ_FIND_SYNTAX_ERROR: - g_warning ("syntax error uid=%s\n", uid); - return; - case CAL_OBJ_FIND_NOT_FOUND: - g_warning ("obj not found uid=%s\n", uid); - return; - } - - /* We only care about events. */ - if (ico && ico->type != ICAL_EVENT) { - ical_object_unref (ico); - return; - } - - /* If the event already exists and the dates didn't change, we can - update the event fairly easily without changing the events arrays - or computing a new layout. */ - if (e_day_view_find_event_from_uid (day_view, uid, &day, &event_num)) { - if (day == E_DAY_VIEW_LONG_EVENT) - event = &g_array_index (day_view->long_events, - EDayViewEvent, event_num); - else - event = &g_array_index (day_view->events[day], - EDayViewEvent, event_num); - - if (ical_object_compare_dates (event->ico, ico)) { - g_print ("updated object's dates unchanged\n"); - e_day_view_foreach_event_with_uid (day_view, uid, e_day_view_update_event_cb, ico); - ical_object_unref (ico); - gtk_widget_queue_draw (day_view->top_canvas); - gtk_widget_queue_draw (day_view->main_canvas); - return; - } - - /* The dates have changed, so we need to remove the - old occurrrences before adding the new ones. */ - g_print ("dates changed - removing occurrences\n"); - e_day_view_foreach_event_with_uid (day_view, uid, - e_day_view_remove_event_cb, - NULL); - } - - /* Add the occurrences of the event. */ - ical_object_generate_events (ico, day_view->lower, day_view->upper, - e_day_view_add_event, day_view); - ical_object_unref (ico); - - e_day_view_check_layout (day_view); - - gtk_widget_queue_draw (day_view->top_canvas); - gtk_widget_queue_draw (day_view->main_canvas); -} - - -static gboolean -e_day_view_update_event_cb (EDayView *day_view, - gint day, - gint event_num, - gpointer data) -{ - EDayViewEvent *event; - iCalObject *ico; - - ico = data; -#if 0 - g_print ("In e_day_view_update_event_cb day:%i event_num:%i\n", - day, event_num); -#endif - if (day == E_DAY_VIEW_LONG_EVENT) { - event = &g_array_index (day_view->long_events, EDayViewEvent, - event_num); - } else { - event = &g_array_index (day_view->events[day], EDayViewEvent, - event_num); - } - - ical_object_unref (event->ico); - event->ico = ico; - ical_object_ref (ico); - - /* If we are editing an event which we have just created, we will get - an update_event callback from the server. But we need to ignore it - or we will lose the text the user has already typed in. */ - if (day_view->editing_new_event - && day_view->editing_event_day == day - && day_view->editing_event_num == event_num) { - return TRUE; - } - - if (day == E_DAY_VIEW_LONG_EVENT) { - e_day_view_update_long_event_label (day_view, event_num); - e_day_view_reshape_long_event (day_view, event_num); - } else { - e_day_view_update_event_label (day_view, day, event_num); - e_day_view_reshape_day_event (day_view, day, event_num); - } - return TRUE; -} - - -/* This calls a given function for each event instance that matches the given - uid. Note that it is safe for the callback to remove the event (since we - step backwards through the arrays). */ -static void -e_day_view_foreach_event_with_uid (EDayView *day_view, - const gchar *uid, - EDayViewForeachEventCallback callback, - gpointer data) -{ - EDayViewEvent *event; - gint day, event_num; - - for (day = 0; day < day_view->days_shown; day++) { - for (event_num = day_view->events[day]->len - 1; - event_num >= 0; - event_num--) { - event = &g_array_index (day_view->events[day], - EDayViewEvent, event_num); - if (event->ico->uid - && !strcmp (uid, event->ico->uid)) { - if (!(*callback) (day_view, day, event_num, - data)) - return; - } - } - } - - for (event_num = day_view->long_events->len - 1; - event_num >= 0; - event_num--) { - event = &g_array_index (day_view->long_events, - EDayViewEvent, event_num); - if (event->ico->uid - && !strcmp (uid, event->ico->uid)) { - if (!(*callback) (day_view, E_DAY_VIEW_LONG_EVENT, - event_num, data)) - return; - } - } -} - - -/* This removes all the events associated with the given uid. Note that for - recurring events there may be more than one. If any events are found and - removed we need to layout the events again. */ -void -e_day_view_remove_event (EDayView *day_view, - const gchar *uid) -{ - g_return_if_fail (E_IS_DAY_VIEW (day_view)); - -#if 1 - g_print ("In e_day_view_remove_event day_view:%p uid:%s\n", - day_view, uid); -#endif - - e_day_view_foreach_event_with_uid (day_view, uid, - e_day_view_remove_event_cb, NULL); - - e_day_view_check_layout (day_view); - gtk_widget_queue_draw (day_view->top_canvas); - gtk_widget_queue_draw (day_view->main_canvas); -} - - -static gboolean -e_day_view_remove_event_cb (EDayView *day_view, - gint day, - gint event_num, - gpointer data) -{ - EDayViewEvent *event; - -#if 1 - g_print ("In e_day_view_remove_event_cb day:%i event_num:%i\n", - day, event_num); -#endif - - if (day == E_DAY_VIEW_LONG_EVENT) - event = &g_array_index (day_view->long_events, - EDayViewEvent, event_num); - else - event = &g_array_index (day_view->events[day], - EDayViewEvent, event_num); - - /* If we were editing this event, set editing_event_num to -1 so - on_editing_stopped doesn't try to update the event. */ - if (day_view->editing_event_day == day - && day_view->editing_event_num == event_num) - day_view->editing_event_day = -1; - - if (event->canvas_item) - gtk_object_destroy (GTK_OBJECT (event->canvas_item)); - ical_object_unref (event->ico); - - if (day == E_DAY_VIEW_LONG_EVENT) { - g_array_remove_index (day_view->long_events, event_num); - day_view->long_events_need_layout = TRUE; - } else { - g_array_remove_index (day_view->events[day], event_num); - day_view->need_layout[day] = TRUE; - } - return TRUE; -} - - -/* This updates the text shown for an event. If the event start or end do not - lie on a row boundary, the time is displayed before the summary. */ -static void -e_day_view_update_event_label (EDayView *day_view, - gint day, - gint event_num) -{ - EDayViewEvent *event; - gchar *text; - gboolean free_text = FALSE, editing_event = FALSE; - gint offset, start_minute, end_minute; - - event = &g_array_index (day_view->events[day], EDayViewEvent, - event_num); - - /* If the event isn't visible just return. */ - if (!event->canvas_item) - return; - - text = event->ico->summary ? event->ico->summary : ""; - - if (day_view->editing_event_day == day - && day_view->editing_event_num == event_num) - editing_event = TRUE; - - if (!editing_event - && (event->start_minute % day_view->mins_per_row != 0 - || event->end_minute % day_view->mins_per_row != 0)) { - offset = day_view->first_hour_shown * 60 - + day_view->first_minute_shown; - start_minute = offset + event->start_minute; - end_minute = offset + event->end_minute; - text = g_strdup_printf ("%02i:%02i-%02i:%02i %s", - start_minute / 60, - start_minute % 60, - end_minute / 60, - end_minute % 60, - text); - free_text = TRUE; - } - - gnome_canvas_item_set (event->canvas_item, - "text", text, - NULL); - - if (free_text) - g_free (text); -} - - -static void -e_day_view_update_long_event_label (EDayView *day_view, - gint event_num) -{ - EDayViewEvent *event; - - event = &g_array_index (day_view->long_events, EDayViewEvent, - event_num); - - /* If the event isn't visible just return. */ - if (!event->canvas_item) - return; - - gnome_canvas_item_set (event->canvas_item, - "text", event->ico->summary ? event->ico->summary : "", - NULL); -} - - -/* Finds the day and index of the event with the given canvas item. - If is is a long event, -1 is returned as the day. - Returns TRUE if the event was found. */ -static gboolean -e_day_view_find_event_from_item (EDayView *day_view, - GnomeCanvasItem *item, - gint *day_return, - gint *event_num_return) -{ - EDayViewEvent *event; - gint day, event_num; - - for (day = 0; day < day_view->days_shown; day++) { - for (event_num = 0; event_num < day_view->events[day]->len; - event_num++) { - event = &g_array_index (day_view->events[day], - EDayViewEvent, event_num); - if (event->canvas_item == item) { - *day_return = day; - *event_num_return = event_num; - return TRUE; - } - } - } - - for (event_num = 0; event_num < day_view->long_events->len; - event_num++) { - event = &g_array_index (day_view->long_events, - EDayViewEvent, event_num); - if (event->canvas_item == item) { - *day_return = E_DAY_VIEW_LONG_EVENT; - *event_num_return = event_num; - return TRUE; - } - } - - return FALSE; -} - - -/* Finds the day and index of the event with the given uid. - If is is a long event, E_DAY_VIEW_LONG_EVENT is returned as the day. - Returns TRUE if an event with the uid was found. - Note that for recurring events there may be several EDayViewEvents, one - for each instance, all with the same iCalObject and uid. So only use this - function if you know the event doesn't recur or you are just checking to - see if any events with the uid exist. */ -static gboolean -e_day_view_find_event_from_uid (EDayView *day_view, - const gchar *uid, - gint *day_return, - gint *event_num_return) -{ - EDayViewEvent *event; - gint day, event_num; - - for (day = 0; day < day_view->days_shown; day++) { - for (event_num = 0; event_num < day_view->events[day]->len; - event_num++) { - event = &g_array_index (day_view->events[day], - EDayViewEvent, event_num); - if (event->ico->uid - && !strcmp (uid, event->ico->uid)) { - *day_return = day; - *event_num_return = event_num; - return TRUE; - } - } - } - - for (event_num = 0; event_num < day_view->long_events->len; - event_num++) { - event = &g_array_index (day_view->long_events, - EDayViewEvent, event_num); - if (event->ico->uid - && !strcmp (uid, event->ico->uid)) { - *day_return = E_DAY_VIEW_LONG_EVENT; - *event_num_return = event_num; - return TRUE; - } - } - - return FALSE; -} - - -/* This sets the selected time range. The EDayView will show the day or week - corresponding to the start time. If the start_time & end_time are not equal - and are both visible in the view, then the selection is set to those times, - otherwise it is set to 1 hour from the start of the working day. */ -void -e_day_view_set_selected_time_range (EDayView *day_view, - time_t start_time, - time_t end_time) -{ - GDate date; - time_t lower; - gint start_row, start_col, end_row, end_col; - gboolean need_redraw = FALSE, start_in_grid, end_in_grid; - - g_return_if_fail (E_IS_DAY_VIEW (day_view)); - - /* Calculate the first day that should be shown, based on start_time - and the days_shown setting. If we are showing 1 day it is just the - start of the day given by start_time, otherwise it is the previous - Monday. */ - if (day_view->days_shown == 1) - lower = time_day_begin (start_time); - else { - g_date_clear (&date, 1); - g_date_set_time (&date, start_time); - g_date_subtract_days (&date, g_date_weekday (&date) - 1); - lower = time_from_day (g_date_year (&date), - g_date_month (&date) - 1, - g_date_day (&date)); - } - - /* See if we need to change the days shown. */ - if (lower != day_view->lower) { - e_day_view_recalc_day_starts (day_view, lower); - e_day_view_reload_events (day_view); - need_redraw = TRUE; - } - - /* Set the selection. */ - start_in_grid = e_day_view_convert_time_to_grid_position (day_view, - start_time, - &start_col, - &start_row); - end_in_grid = e_day_view_convert_time_to_grid_position (day_view, - end_time - 60, - &end_col, - &end_row); - - /* If either of the times isn't in the grid, or the selection covers - an entire day, we set the selection to 1 row from the start of the - working day, in the day corresponding to the start time. */ - if (!start_in_grid || !end_in_grid - || (start_row == 0 && end_row == day_view->rows - 1)) { - end_col = start_col; - - start_row = e_day_view_convert_time_to_row (day_view, day_view->work_day_start_hour, day_view->work_day_start_minute); - start_row = CLAMP (start_row, 0, day_view->rows - 1); - end_row = start_row; - } - - if (start_row != day_view->selection_start_row - || start_col != day_view->selection_start_day) { - need_redraw = TRUE; - day_view->selection_in_top_canvas = FALSE; - day_view->selection_start_row = start_row; - day_view->selection_start_day = start_col; - } - - if (end_row != day_view->selection_end_row - || end_col != day_view->selection_end_day) { - need_redraw = TRUE; - day_view->selection_in_top_canvas = FALSE; - day_view->selection_end_row = end_row; - day_view->selection_end_day = end_col; - } - - if (need_redraw) { - gtk_widget_queue_draw (day_view->top_canvas); - gtk_widget_queue_draw (day_view->main_canvas); - } -} - - -/* Returns the selected time range. */ -void -e_day_view_get_selected_time_range (EDayView *day_view, - time_t *start_time, - time_t *end_time) -{ - gint start_col, start_row, end_col, end_row; - - start_col = day_view->selection_start_day; - start_row = day_view->selection_start_row; - end_col = day_view->selection_end_day; - end_row = day_view->selection_end_row; - - if (start_col == -1) { - start_col = 0; - start_row = 0; - end_col = 0; - end_row = 0; - } - - /* Check if the selection is only in the top canvas, in which case - we can simply use the day_starts array. */ - if (day_view->selection_in_top_canvas) { - *start_time = day_view->day_starts[start_col]; - *end_time = day_view->day_starts[end_col + 1]; - } else { - /* Convert the start col + row into a time. */ - *start_time = e_day_view_convert_grid_position_to_time (day_view, start_col, start_row); - *end_time = e_day_view_convert_grid_position_to_time (day_view, end_col, end_row + 1); - } -} - - -static void -e_day_view_recalc_day_starts (EDayView *day_view, - time_t start_time) -{ - gint day; - - day_view->day_starts[0] = start_time; - for (day = 1; day <= day_view->days_shown; day++) { - day_view->day_starts[day] = time_add_day (day_view->day_starts[day - 1], 1); - } - - day_view->lower = start_time; - day_view->upper = day_view->day_starts[day_view->days_shown]; -} - - -gint -e_day_view_get_days_shown (EDayView *day_view) -{ - g_return_val_if_fail (E_IS_DAY_VIEW (day_view), -1); - - return day_view->days_shown; -} - - -void -e_day_view_set_days_shown (EDayView *day_view, - gint days_shown) -{ - g_return_if_fail (E_IS_DAY_VIEW (day_view)); - g_return_if_fail (days_shown >= 1); - g_return_if_fail (days_shown <= E_DAY_VIEW_MAX_DAYS); - - if (day_view->days_shown != days_shown) { - day_view->days_shown = days_shown; - - /* FIXME: Update everything. */ - } -} - - -gint -e_day_view_get_mins_per_row (EDayView *day_view) -{ - g_return_val_if_fail (E_IS_DAY_VIEW (day_view), -1); - - return day_view->mins_per_row; -} - - -void -e_day_view_set_mins_per_row (EDayView *day_view, - gint mins_per_row) -{ - gint day; - - g_return_if_fail (E_IS_DAY_VIEW (day_view)); - - if (mins_per_row != 5 && mins_per_row != 10 && mins_per_row != 15 - && mins_per_row != 30 && mins_per_row != 60) { - g_warning ("Invalid minutes per row setting"); - return; - } - - if (day_view->mins_per_row == mins_per_row) - return; - - day_view->mins_per_row = mins_per_row; - e_day_view_recalc_num_rows (day_view); - - /* If we aren't visible, we'll sort it out later. */ - if (!GTK_WIDGET_VISIBLE (day_view)) - return; - - for (day = 0; day < E_DAY_VIEW_MAX_DAYS; day++) - day_view->need_layout[day] = TRUE; - - /* We must layout the events before updating the scroll region, since - that will result in a redraw which would crash otherwise. */ - e_day_view_check_layout (day_view); - gtk_widget_queue_draw (day_view->time_canvas); - gtk_widget_queue_draw (day_view->main_canvas); - - e_day_view_update_scroll_regions (day_view); -} - - -static gboolean -e_day_view_update_scroll_regions (EDayView *day_view) -{ - gdouble old_x2, old_y2, new_x2, new_y2; - gboolean need_reshape = FALSE; - - /* Set the scroll region of the time canvas to its allocated width, - but with the height the same as the main canvas. */ - gnome_canvas_get_scroll_region (GNOME_CANVAS (day_view->time_canvas), - NULL, NULL, &old_x2, &old_y2); - new_x2 = day_view->time_canvas->allocation.width - 1; - new_y2 = MAX (day_view->rows * day_view->row_height, - day_view->main_canvas->allocation.height) - 1; - if (old_x2 != new_x2 || old_y2 != new_y2) - gnome_canvas_set_scroll_region (GNOME_CANVAS (day_view->time_canvas), - 0, 0, new_x2, new_y2); - - /* Set the scroll region of the main canvas to its allocated width, - but with the height depending on the number of rows needed. */ - gnome_canvas_get_scroll_region (GNOME_CANVAS (day_view->main_canvas), - NULL, NULL, &old_x2, &old_y2); - new_x2 = day_view->main_canvas->allocation.width - 1; - if (old_x2 != new_x2 || old_y2 != new_y2) { - need_reshape = TRUE; - gnome_canvas_set_scroll_region (GNOME_CANVAS (day_view->main_canvas), - 0, 0, new_x2, new_y2); - } - - return need_reshape; -} - - -/* This recalculates the number of rows to display, based on the time range - shown and the minutes per row. */ -static void -e_day_view_recalc_num_rows (EDayView *day_view) -{ - gint hours, minutes, total_minutes; - - hours = day_view->last_hour_shown - day_view->first_hour_shown; - /* This could be negative but it works out OK. */ - minutes = day_view->last_minute_shown - day_view->first_minute_shown; - total_minutes = hours * 60 + minutes; - day_view->rows = total_minutes / day_view->mins_per_row; -} - - -/* Converts an hour and minute to a row in the canvas. Note that if we aren't - showing all 24 hours of the day, the returned row may be negative or - greater than day_view->rows. */ -gint -e_day_view_convert_time_to_row (EDayView *day_view, - gint hour, - gint minute) -{ - gint total_minutes, start_minute, offset; - - total_minutes = hour * 60 + minute; - start_minute = day_view->first_hour_shown * 60 - + day_view->first_minute_shown; - offset = total_minutes - start_minute; - if (offset < 0) - return -1; - else - return offset / day_view->mins_per_row; -} - - -/* Converts an hour and minute to a y coordinate in the canvas. */ -gint -e_day_view_convert_time_to_position (EDayView *day_view, - gint hour, - gint minute) -{ - gint total_minutes, start_minute, offset; - - total_minutes = hour * 60 + minute; - start_minute = day_view->first_hour_shown * 60 - + day_view->first_minute_shown; - offset = total_minutes - start_minute; - - return offset * day_view->row_height / day_view->mins_per_row; -} - - -static gboolean -e_day_view_on_top_canvas_button_press (GtkWidget *widget, - GdkEventButton *event, - EDayView *day_view) -{ - gint event_x, event_y, scroll_x, scroll_y, day, event_num; - EDayViewPosition pos; - - /* Convert the coords to the main canvas window, or return if the - window is not found. */ - if (!e_day_view_convert_event_coords (day_view, (GdkEvent*) event, - GTK_LAYOUT (widget)->bin_window, - &event_x, &event_y)) - return FALSE; - - /* The top canvas doesn't scroll, but just in case. */ - gnome_canvas_get_scroll_offsets (GNOME_CANVAS (widget), - &scroll_x, &scroll_y); - event_x += scroll_x; - event_y += scroll_y; - - pos = e_day_view_convert_position_in_top_canvas (day_view, - event_x, event_y, - &day, &event_num); - - if (pos == E_DAY_VIEW_POS_OUTSIDE) - return FALSE; - - if (pos != E_DAY_VIEW_POS_NONE) - return e_day_view_on_long_event_button_press (day_view, - event_num, - event, pos, - event_x, - event_y); - - e_day_view_stop_editing_event (day_view); - - if (event->button == 1) { - if (!GTK_WIDGET_HAS_FOCUS (day_view)) - gtk_widget_grab_focus (GTK_WIDGET (day_view)); - - if (gdk_pointer_grab (GTK_LAYOUT (widget)->bin_window, FALSE, - GDK_POINTER_MOTION_MASK - | GDK_BUTTON_RELEASE_MASK, - FALSE, NULL, event->time) == 0) { - e_day_view_start_selection (day_view, day, -1); - } - } else if (event->button == 3) { - e_day_view_on_event_right_click (day_view, event, -1, -1); - } - - return TRUE; -} - - -static gboolean -e_day_view_convert_event_coords (EDayView *day_view, - GdkEvent *event, - GdkWindow *window, - gint *x_return, - gint *y_return) -{ - gint event_x, event_y, win_x, win_y; - GdkWindow *event_window;; - - /* Get the event window, x & y from the appropriate event struct. */ - switch (event->type) { - case GDK_BUTTON_PRESS: - case GDK_2BUTTON_PRESS: - case GDK_3BUTTON_PRESS: - case GDK_BUTTON_RELEASE: - event_x = event->button.x; - event_y = event->button.y; - event_window = event->button.window; - break; - case GDK_MOTION_NOTIFY: - event_x = event->motion.x; - event_y = event->motion.y; - event_window = event->motion.window; - break; - default: - /* Shouldn't get here. */ - g_assert_not_reached (); - return FALSE; - } - - while (event_window && event_window != window - && event_window != GDK_ROOT_PARENT()) { - gdk_window_get_position (event_window, &win_x, &win_y); - event_x += win_x; - event_y += win_y; - event_window = gdk_window_get_parent (event_window); - } - - *x_return = event_x; - *y_return = event_y; - - if (event_window != window) - g_warning ("Couldn't find event window\n"); - - return (event_window == window) ? TRUE : FALSE; -} - - -static gboolean -e_day_view_on_main_canvas_button_press (GtkWidget *widget, - GdkEventButton *event, - EDayView *day_view) -{ - gint event_x, event_y, scroll_x, scroll_y, row, day, event_num; - EDayViewPosition pos; - - /* Convert the coords to the main canvas window, or return if the - window is not found. */ - if (!e_day_view_convert_event_coords (day_view, (GdkEvent*) event, - GTK_LAYOUT (widget)->bin_window, - &event_x, &event_y)) - return FALSE; - - gnome_canvas_get_scroll_offsets (GNOME_CANVAS (widget), - &scroll_x, &scroll_y); - event_x += scroll_x; - event_y += scroll_y; - - /* Find out where the mouse is. */ - pos = e_day_view_convert_position_in_main_canvas (day_view, - event_x, event_y, - &day, &row, - &event_num); - - if (pos == E_DAY_VIEW_POS_OUTSIDE) - return FALSE; - - if (pos != E_DAY_VIEW_POS_NONE) - return e_day_view_on_event_button_press (day_view, day, - event_num, event, pos, - event_x, event_y); - - e_day_view_stop_editing_event (day_view); - - /* Start the selection drag. */ - if (event->button == 1) { - if (!GTK_WIDGET_HAS_FOCUS (day_view)) - gtk_widget_grab_focus (GTK_WIDGET (day_view)); - - if (gdk_pointer_grab (GTK_LAYOUT (widget)->bin_window, FALSE, - GDK_POINTER_MOTION_MASK - | GDK_BUTTON_RELEASE_MASK, - FALSE, NULL, event->time) == 0) { - e_day_view_start_selection (day_view, day, row); - } - } else if (event->button == 3) { - e_day_view_on_event_right_click (day_view, event, -1, -1); - } - - return TRUE; -} - - -static gboolean -e_day_view_on_long_event_button_press (EDayView *day_view, - gint event_num, - GdkEventButton *event, - EDayViewPosition pos, - gint event_x, - gint event_y) -{ - if (event->button == 1) { - if (event->type == GDK_BUTTON_PRESS) { - e_day_view_on_long_event_click (day_view, event_num, - event, pos, - event_x, event_y); - return TRUE; - } else if (event->type == GDK_2BUTTON_PRESS) { - e_day_view_on_event_double_click (day_view, -1, - event_num); - return TRUE; - } - } else if (event->button == 3) { - e_day_view_on_event_right_click (day_view, event, - E_DAY_VIEW_LONG_EVENT, - event_num); - return TRUE; - } - return FALSE; -} - - -static gboolean -e_day_view_on_event_button_press (EDayView *day_view, - gint day, - gint event_num, - GdkEventButton *event, - EDayViewPosition pos, - gint event_x, - gint event_y) -{ - if (event->button == 1) { - if (event->type == GDK_BUTTON_PRESS) { - e_day_view_on_event_click (day_view, day, event_num, - event, pos, - event_x, event_y); - return TRUE; - } else if (event->type == GDK_2BUTTON_PRESS) { - e_day_view_on_event_double_click (day_view, day, - event_num); - return TRUE; - } - } else if (event->button == 3) { - e_day_view_on_event_right_click (day_view, event, - day, event_num); - return TRUE; - } - return FALSE; -} - - -static void -e_day_view_on_long_event_click (EDayView *day_view, - gint event_num, - GdkEventButton *bevent, - EDayViewPosition pos, - gint event_x, - gint event_y) -{ - EDayViewEvent *event; - gint start_day, end_day, day; - gint item_x, item_y, item_w, item_h; - - event = &g_array_index (day_view->long_events, EDayViewEvent, - event_num); - - /* Ignore clicks on the EText while editing. */ - if (pos == E_DAY_VIEW_POS_EVENT - && E_TEXT (event->canvas_item)->editing) - return; - - if (!event->ico->recur - && (pos == E_DAY_VIEW_POS_LEFT_EDGE - || pos == E_DAY_VIEW_POS_RIGHT_EDGE)) { - if (!e_day_view_find_long_event_days (day_view, event, - &start_day, &end_day)) - return; - - /* Grab the keyboard focus, so the event being edited is saved - and we can use the Escape key to abort the resize. */ - if (!GTK_WIDGET_HAS_FOCUS (day_view)) - gtk_widget_grab_focus (GTK_WIDGET (day_view)); - - if (gdk_pointer_grab (GTK_LAYOUT (day_view->top_canvas)->bin_window, FALSE, - GDK_POINTER_MOTION_MASK - | GDK_BUTTON_RELEASE_MASK, - FALSE, NULL, bevent->time) == 0) { - - day_view->resize_event_day = E_DAY_VIEW_LONG_EVENT; - day_view->resize_event_num = event_num; - day_view->resize_drag_pos = pos; - day_view->resize_start_row = start_day; - day_view->resize_end_row = end_day; - - /* Create the edit rect if necessary. */ - e_day_view_reshape_resize_long_event_rect_item (day_view); - - /* Make sure the text item is on top. */ - gnome_canvas_item_raise_to_top (day_view->resize_long_event_rect_item); - - /* Raise the event's item, above the rect as well. */ - gnome_canvas_item_raise_to_top (event->canvas_item); - } - } else if (e_day_view_get_long_event_position (day_view, event_num, - &start_day, &end_day, - &item_x, &item_y, - &item_w, &item_h)) { - /* Remember the item clicked and the mouse position, - so we can start a drag if the mouse moves. */ - day_view->pressed_event_day = E_DAY_VIEW_LONG_EVENT; - day_view->pressed_event_num = event_num; - - day_view->drag_event_x = event_x; - day_view->drag_event_y = event_y; - - e_day_view_convert_position_in_top_canvas (day_view, - event_x, event_y, - &day, NULL); - day_view->drag_event_offset = day - start_day; - } -} - - -static void -e_day_view_on_event_click (EDayView *day_view, - gint day, - gint event_num, - GdkEventButton *bevent, - EDayViewPosition pos, - gint event_x, - gint event_y) -{ - EDayViewEvent *event; - gint tmp_day, row, start_row; - - event = &g_array_index (day_view->events[day], EDayViewEvent, - event_num); - - /* Ignore clicks on the EText while editing. */ - if (pos == E_DAY_VIEW_POS_EVENT - && E_TEXT (event->canvas_item)->editing) - return; - - if (!event->ico->recur - && (pos == E_DAY_VIEW_POS_TOP_EDGE - || pos == E_DAY_VIEW_POS_BOTTOM_EDGE)) { - /* Grab the keyboard focus, so the event being edited is saved - and we can use the Escape key to abort the resize. */ - if (!GTK_WIDGET_HAS_FOCUS (day_view)) - gtk_widget_grab_focus (GTK_WIDGET (day_view)); - - if (gdk_pointer_grab (GTK_LAYOUT (day_view->main_canvas)->bin_window, FALSE, - GDK_POINTER_MOTION_MASK - | GDK_BUTTON_RELEASE_MASK, - FALSE, NULL, bevent->time) == 0) { - - day_view->resize_event_day = day; - day_view->resize_event_num = event_num; - day_view->resize_drag_pos = pos; - day_view->resize_start_row = event->start_minute / day_view->mins_per_row; - day_view->resize_end_row = (event->end_minute - 1) / day_view->mins_per_row; - - day_view->resize_bars_event_day = day; - day_view->resize_bars_event_num = event_num; - - /* Create the edit rect if necessary. */ - e_day_view_reshape_resize_rect_item (day_view); - - e_day_view_reshape_main_canvas_resize_bars (day_view); - - /* Make sure the text item is on top. */ - gnome_canvas_item_raise_to_top (day_view->resize_rect_item); - gnome_canvas_item_raise_to_top (day_view->resize_bar_item); - - /* Raise the event's item, above the rect as well. */ - gnome_canvas_item_raise_to_top (event->canvas_item); - } - - } else { - /* Remember the item clicked and the mouse position, - so we can start a drag if the mouse moves. */ - day_view->pressed_event_day = day; - day_view->pressed_event_num = event_num; - - day_view->drag_event_x = event_x; - day_view->drag_event_y = event_y; - - e_day_view_convert_position_in_main_canvas (day_view, - event_x, event_y, - &tmp_day, &row, - NULL); - start_row = event->start_minute / day_view->mins_per_row; - day_view->drag_event_offset = row - start_row; - } -} - - -static void -e_day_view_reshape_resize_long_event_rect_item (EDayView *day_view) -{ - gint day, event_num, start_day, end_day; - gint item_x, item_y, item_w, item_h; - gdouble x1, y1, x2, y2; - - day = day_view->resize_event_day; - event_num = day_view->resize_event_num; - - /* If we're not resizing an event, or the event is not shown, - hide the resize bars. */ - if (day_view->resize_drag_pos == E_DAY_VIEW_POS_NONE - || !e_day_view_get_long_event_position (day_view, event_num, - &start_day, &end_day, - &item_x, &item_y, - &item_w, &item_h)) { - gnome_canvas_item_hide (day_view->resize_long_event_rect_item); - return; - } - - x1 = item_x; - y1 = item_y; - x2 = item_x + item_w - 1; - y2 = item_y + item_h - 1; - - gnome_canvas_item_set (day_view->resize_long_event_rect_item, - "x1", x1, - "y1", y1, - "x2", x2, - "y2", y2, - NULL); - gnome_canvas_item_show (day_view->resize_long_event_rect_item); -} - - -static void -e_day_view_reshape_resize_rect_item (EDayView *day_view) -{ - gint day, event_num; - gint item_x, item_y, item_w, item_h; - gdouble x1, y1, x2, y2; - - day = day_view->resize_event_day; - event_num = day_view->resize_event_num; - - /* If we're not resizing an event, or the event is not shown, - hide the resize bars. */ - if (day_view->resize_drag_pos == E_DAY_VIEW_POS_NONE - || !e_day_view_get_event_position (day_view, day, event_num, - &item_x, &item_y, - &item_w, &item_h)) { - gnome_canvas_item_hide (day_view->resize_rect_item); - return; - } - - x1 = item_x; - y1 = item_y; - x2 = item_x + item_w - 1; - y2 = item_y + item_h - 1; - - gnome_canvas_item_set (day_view->resize_rect_item, - "x1", x1 + E_DAY_VIEW_BAR_WIDTH - 1, - "y1", y1, - "x2", x2, - "y2", y2, - NULL); - gnome_canvas_item_show (day_view->resize_rect_item); - - gnome_canvas_item_set (day_view->resize_bar_item, - "x1", x1, - "y1", y1, - "x2", x1 + E_DAY_VIEW_BAR_WIDTH - 1, - "y2", y2, - NULL); - gnome_canvas_item_show (day_view->resize_bar_item); -} - - -static void -e_day_view_on_event_double_click (EDayView *day_view, - gint day, - gint event_num) -{ -#if 0 - g_print ("In e_day_view_on_event_double_click\n"); -#endif - -} - - -static void -e_day_view_on_event_right_click (EDayView *day_view, - GdkEventButton *bevent, - gint day, - gint event_num) -{ - EDayViewEvent *event; - int have_selection, not_being_edited, items, i; - struct menu_item *context_menu; - - static struct menu_item main_items[] = { - { N_("New appointment..."), (GtkSignalFunc) e_day_view_on_new_appointment, NULL, TRUE } - }; - - static struct menu_item child_items[] = { - { N_("Edit this appointment..."), (GtkSignalFunc) e_day_view_on_edit_appointment, NULL, TRUE }, - { N_("Delete this appointment"), (GtkSignalFunc) e_day_view_on_delete_appointment, NULL, TRUE }, - { NULL, NULL, NULL, TRUE }, - { N_("New appointment..."), (GtkSignalFunc) e_day_view_on_new_appointment, NULL, TRUE } - }; - - static struct menu_item recur_child_items[] = { - { N_("Edit this appointment..."), (GtkSignalFunc) e_day_view_on_edit_appointment, NULL, TRUE }, - { N_("Make this appointment movable"), (GtkSignalFunc) e_day_view_on_unrecur_appointment, NULL, TRUE }, - { N_("Delete this occurrence"), (GtkSignalFunc) e_day_view_on_delete_occurrence, NULL, TRUE }, - { N_("Delete all occurrences"), (GtkSignalFunc) e_day_view_on_delete_appointment, NULL, TRUE }, - { NULL, NULL, NULL, TRUE }, - { N_("New appointment..."), (GtkSignalFunc) e_day_view_on_new_appointment, NULL, TRUE } - }; - - have_selection = GTK_WIDGET_HAS_FOCUS (day_view) - && day_view->selection_start_day != -1; - - if (event_num == -1) { - items = 1; - context_menu = &main_items[0]; - context_menu[0].sensitive = have_selection; - } else { - if (day == E_DAY_VIEW_LONG_EVENT) - event = &g_array_index (day_view->long_events, - EDayViewEvent, event_num); - else - event = &g_array_index (day_view->events[day], - EDayViewEvent, event_num); - - /* This used to be set only if the event wasn't being edited - in the event editor, but we can't check that at present. - We could possibly set up another method of checking it. */ - not_being_edited = TRUE; - - if (event->ico->recur) { - items = 6; - context_menu = &recur_child_items[0]; - context_menu[0].sensitive = not_being_edited; - context_menu[1].sensitive = not_being_edited; - context_menu[2].sensitive = not_being_edited; - context_menu[3].sensitive = not_being_edited; - context_menu[5].sensitive = have_selection; - } else { - items = 4; - context_menu = &child_items[0]; - context_menu[0].sensitive = not_being_edited; - context_menu[1].sensitive = not_being_edited; - context_menu[3].sensitive = have_selection; - } - } - - for (i = 0; i < items; i++) - context_menu[i].data = day_view; - - day_view->popup_event_day = day; - day_view->popup_event_num = event_num; - popup_menu (context_menu, items, bevent); -} - - -static void -e_day_view_on_new_appointment (GtkWidget *widget, gpointer data) -{ - EDayView *day_view; - GtkWidget *event_editor; - iCalObject *ico; - - day_view = E_DAY_VIEW (data); - - ico = ical_new ("", user_name, ""); - ico->new = 1; - - e_day_view_get_selected_time_range (day_view, &ico->dtstart, - &ico->dtend); - event_editor = event_editor_new (day_view->calendar, ico); - ical_object_unref (ico); - //gtk_widget_show (event_editor); -} - - -static void -e_day_view_on_edit_appointment (GtkWidget *widget, gpointer data) -{ - EDayView *day_view; - EDayViewEvent *event; - GtkWidget *event_editor; - iCalObject *ico; - - day_view = E_DAY_VIEW (data); - - event = e_day_view_get_popup_menu_event (day_view); - if (event == NULL) - return; - - /* We must duplicate the iCalObject, since the event editor will change - * the fields. - */ - ico = ical_object_duplicate (event->ico); - - event_editor = event_editor_new (day_view->calendar, ico); - ical_object_unref (ico); - //gtk_widget_show (event_editor); -} - - -static void -e_day_view_on_delete_occurrence (GtkWidget *widget, gpointer data) -{ - EDayView *day_view; - EDayViewEvent *event; - iCalObject *ico; - - day_view = E_DAY_VIEW (data); - - event = e_day_view_get_popup_menu_event (day_view); - if (event == NULL) - return; - - /* We must duplicate the iCalObject, or we won't know it has changed - when we get the "update_event" callback. */ - ico = ical_object_duplicate (event->ico); - - ical_object_add_exdate (ico, event->start); - gnome_calendar_object_changed (day_view->calendar, ico, CHANGE_DATES); - ical_object_unref (ico); -} - - -static void -e_day_view_on_delete_appointment (GtkWidget *widget, gpointer data) -{ - EDayView *day_view; - EDayViewEvent *event; - - day_view = E_DAY_VIEW (data); - - event = e_day_view_get_popup_menu_event (day_view); - if (event == NULL) - return; - - if (day_view->editing_event_day >= 0) - e_day_view_stop_editing_event (day_view); - - gnome_calendar_remove_object (day_view->calendar, event->ico); -} - - -static void -e_day_view_on_unrecur_appointment (GtkWidget *widget, gpointer data) -{ - EDayView *day_view; - EDayViewEvent *event; - iCalObject *ico, *new_ico; - - day_view = E_DAY_VIEW (data); - - event = e_day_view_get_popup_menu_event (day_view); - if (event == NULL) - return; - - /* For the recurring object, we add a exception to get rid of the - instance. */ - ico = ical_object_duplicate (event->ico); - ical_object_add_exdate (ico, event->start); - - /* For the unrecurred instance we duplicate the original object, - create a new uid for it, get rid of the recurrence rules, and set - the start & end times to the instances times. */ - new_ico = ical_object_duplicate (event->ico); - g_free (new_ico->uid); - new_ico->uid = ical_gen_uid (); - ical_object_reset_recurrence (new_ico); - new_ico->dtstart = event->start; - new_ico->dtend = event->end; - - /* Now update both iCalObjects. Note that we do this last since at - present the updates happen synchronously so our event may disappear. - */ - gnome_calendar_object_changed (day_view->calendar, ico, CHANGE_ALL); - ical_object_unref (ico); - - gnome_calendar_add_object (day_view->calendar, new_ico); - ical_object_unref (new_ico); -} - - -static EDayViewEvent* -e_day_view_get_popup_menu_event (EDayView *day_view) -{ - if (day_view->popup_event_num == -1) - return NULL; - - if (day_view->popup_event_day == E_DAY_VIEW_LONG_EVENT) - return &g_array_index (day_view->long_events, - EDayViewEvent, - day_view->popup_event_num); - else - return &g_array_index (day_view->events[day_view->popup_event_day], - EDayViewEvent, - day_view->popup_event_num); -} - - -static gboolean -e_day_view_on_top_canvas_button_release (GtkWidget *widget, - GdkEventButton *event, - EDayView *day_view) -{ - if (day_view->selection_drag_pos != E_DAY_VIEW_DRAG_NONE) { - gdk_pointer_ungrab (event->time); - e_day_view_finish_selection (day_view); - } else if (day_view->resize_drag_pos != E_DAY_VIEW_POS_NONE) { - e_day_view_finish_long_event_resize (day_view); - gdk_pointer_ungrab (event->time); - } else if (day_view->pressed_event_day != -1) { - e_day_view_start_editing_event (day_view, - day_view->pressed_event_day, - day_view->pressed_event_num, - NULL); - } - - day_view->pressed_event_day = -1; - - return FALSE; -} - - -static gboolean -e_day_view_on_main_canvas_button_release (GtkWidget *widget, - GdkEventButton *event, - EDayView *day_view) -{ - if (day_view->selection_drag_pos != E_DAY_VIEW_DRAG_NONE) { - gdk_pointer_ungrab (event->time); - e_day_view_finish_selection (day_view); - e_day_view_stop_auto_scroll (day_view); - } else if (day_view->resize_drag_pos != E_DAY_VIEW_POS_NONE) { - e_day_view_finish_resize (day_view); - gdk_pointer_ungrab (event->time); - e_day_view_stop_auto_scroll (day_view); - } else if (day_view->pressed_event_day != -1) { - e_day_view_start_editing_event (day_view, - day_view->pressed_event_day, - day_view->pressed_event_num, - NULL); - } - - day_view->pressed_event_day = -1; - - return FALSE; -} - - -static void -e_day_view_update_calendar_selection_time (EDayView *day_view) -{ - time_t start, end; - - e_day_view_get_selected_time_range (day_view, &start, &end); - gnome_calendar_set_selected_time_range (day_view->calendar, - start, end); -} - - -static gboolean -e_day_view_on_top_canvas_motion (GtkWidget *widget, - GdkEventMotion *mevent, - EDayView *day_view) -{ - EDayViewEvent *event = NULL; - EDayViewPosition pos; - gint event_x, event_y, scroll_x, scroll_y, canvas_x, canvas_y; - gint day, event_num; - GdkCursor *cursor; - -#if 0 - g_print ("In e_day_view_on_top_canvas_motion\n"); -#endif - - /* Convert the coords to the main canvas window, or return if the - window is not found. */ - if (!e_day_view_convert_event_coords (day_view, (GdkEvent*) mevent, - GTK_LAYOUT (widget)->bin_window, - &event_x, &event_y)) - return FALSE; - - /* The top canvas doesn't scroll, but just in case. */ - gnome_canvas_get_scroll_offsets (GNOME_CANVAS (widget), - &scroll_x, &scroll_y); - canvas_x = event_x + scroll_x; - canvas_y = event_y + scroll_y; - - pos = e_day_view_convert_position_in_top_canvas (day_view, - canvas_x, canvas_y, - &day, &event_num); - if (event_num != -1) - event = &g_array_index (day_view->long_events, EDayViewEvent, - event_num); - - if (day_view->selection_drag_pos != E_DAY_VIEW_DRAG_NONE) { - e_day_view_update_selection (day_view, day, -1); - return TRUE; - } else if (day_view->resize_drag_pos != E_DAY_VIEW_POS_NONE) { - if (pos != E_DAY_VIEW_POS_OUTSIDE) { - e_day_view_update_long_event_resize (day_view, day); - return TRUE; - } - } else if (day_view->pressed_event_day == E_DAY_VIEW_LONG_EVENT) { - GtkTargetList *target_list; - - event = &g_array_index (day_view->long_events, EDayViewEvent, - day_view->pressed_event_num); - - if (!event->ico->recur - && (abs (canvas_x - day_view->drag_event_x) > E_DAY_VIEW_DRAG_START_OFFSET - || abs (canvas_y - day_view->drag_event_y) > E_DAY_VIEW_DRAG_START_OFFSET)) { - day_view->drag_event_day = day_view->pressed_event_day; - day_view->drag_event_num = day_view->pressed_event_num; - day_view->pressed_event_day = -1; - - /* Hide the horizontal bars. */ - if (day_view->resize_bars_event_day != -1) { - day_view->resize_bars_event_day = -1; - day_view->resize_bars_event_num = -1; - gnome_canvas_item_hide (day_view->main_canvas_top_resize_bar_item); - gnome_canvas_item_hide (day_view->main_canvas_bottom_resize_bar_item); - } - - target_list = gtk_target_list_new (target_table, - n_targets); - gtk_drag_begin (widget, target_list, - GDK_ACTION_COPY | GDK_ACTION_MOVE, - 1, (GdkEvent*)mevent); - gtk_target_list_unref (target_list); - } - } else { - cursor = day_view->normal_cursor; - - /* Recurring events can't be resized. */ - if (event && !event->ico->recur) { - switch (pos) { - case E_DAY_VIEW_POS_LEFT_EDGE: - case E_DAY_VIEW_POS_RIGHT_EDGE: - cursor = day_view->resize_width_cursor; - break; - default: - break; - } - } - - /* Only set the cursor if it is different to last one set. */ - if (day_view->last_cursor_set_in_top_canvas != cursor) { - day_view->last_cursor_set_in_top_canvas = cursor; - gdk_window_set_cursor (widget->window, cursor); - } - - } - - return FALSE; -} - - -static gboolean -e_day_view_on_main_canvas_motion (GtkWidget *widget, - GdkEventMotion *mevent, - EDayView *day_view) -{ - EDayViewEvent *event = NULL; - EDayViewPosition pos; - gint event_x, event_y, scroll_x, scroll_y, canvas_x, canvas_y; - gint row, day, event_num; - GdkCursor *cursor; - -#if 0 - g_print ("In e_day_view_on_main_canvas_motion\n"); -#endif - - /* Convert the coords to the main canvas window, or return if the - window is not found. */ - if (!e_day_view_convert_event_coords (day_view, (GdkEvent*) mevent, - GTK_LAYOUT (widget)->bin_window, - &event_x, &event_y)) - return FALSE; - - gnome_canvas_get_scroll_offsets (GNOME_CANVAS (widget), - &scroll_x, &scroll_y); - canvas_x = event_x + scroll_x; - canvas_y = event_y + scroll_y; - - pos = e_day_view_convert_position_in_main_canvas (day_view, - canvas_x, canvas_y, - &day, &row, - &event_num); - if (event_num != -1) - event = &g_array_index (day_view->events[day], EDayViewEvent, - event_num); - - if (day_view->selection_drag_pos != E_DAY_VIEW_DRAG_NONE) { - if (pos != E_DAY_VIEW_POS_OUTSIDE) { - e_day_view_update_selection (day_view, day, row); - e_day_view_check_auto_scroll (day_view, - event_x, event_y); - return TRUE; - } - } else if (day_view->resize_drag_pos != E_DAY_VIEW_POS_NONE) { - if (pos != E_DAY_VIEW_POS_OUTSIDE) { - e_day_view_update_resize (day_view, row); - e_day_view_check_auto_scroll (day_view, - event_x, event_y); - return TRUE; - } - } else if (day_view->pressed_event_day != -1 - && day_view->pressed_event_day != E_DAY_VIEW_LONG_EVENT) { - GtkTargetList *target_list; - - event = &g_array_index (day_view->events[day_view->pressed_event_day], EDayViewEvent, day_view->pressed_event_num); - - if (!event->ico->recur - && (abs (canvas_x - day_view->drag_event_x) > E_DAY_VIEW_DRAG_START_OFFSET - || abs (canvas_y - day_view->drag_event_y) > E_DAY_VIEW_DRAG_START_OFFSET)) { - day_view->drag_event_day = day_view->pressed_event_day; - day_view->drag_event_num = day_view->pressed_event_num; - day_view->pressed_event_day = -1; - - /* Hide the horizontal bars. */ - if (day_view->resize_bars_event_day != -1) { - day_view->resize_bars_event_day = -1; - day_view->resize_bars_event_num = -1; - gnome_canvas_item_hide (day_view->main_canvas_top_resize_bar_item); - gnome_canvas_item_hide (day_view->main_canvas_bottom_resize_bar_item); - } - - target_list = gtk_target_list_new (target_table, - n_targets); - gtk_drag_begin (widget, target_list, - GDK_ACTION_COPY | GDK_ACTION_MOVE, - 1, (GdkEvent*)mevent); - gtk_target_list_unref (target_list); - } - } else { - cursor = day_view->normal_cursor; - - /* Recurring events can't be resized. */ - if (event && !event->ico->recur) { - switch (pos) { - case E_DAY_VIEW_POS_LEFT_EDGE: - cursor = day_view->move_cursor; - break; - case E_DAY_VIEW_POS_TOP_EDGE: - case E_DAY_VIEW_POS_BOTTOM_EDGE: - cursor = day_view->resize_height_cursor; - break; - default: - break; - } - } - - /* Only set the cursor if it is different to last one set. */ - if (day_view->last_cursor_set_in_main_canvas != cursor) { - day_view->last_cursor_set_in_main_canvas = cursor; - gdk_window_set_cursor (widget->window, cursor); - } - } - - return FALSE; -} - - -/* This sets the selection to a single cell. If day is -1 then the current - start day is reused. If row is -1 then the selection is in the top canvas. -*/ -void -e_day_view_start_selection (EDayView *day_view, - gint day, - gint row) -{ - if (day == -1) { - day = day_view->selection_start_day; - if (day == -1) - day = 0; - } - - day_view->selection_start_day = day; - day_view->selection_end_day = day; - - day_view->selection_start_row = row; - day_view->selection_end_row = row; - - day_view->selection_drag_pos = E_DAY_VIEW_DRAG_END; - day_view->selection_in_top_canvas = (row == -1) ? TRUE : FALSE; - - /* FIXME: Optimise? */ - gtk_widget_queue_draw (day_view->top_canvas); - gtk_widget_queue_draw (day_view->main_canvas); -} - - -/* Updates the selection during a drag. If day is -1 the selection day is - unchanged. */ -void -e_day_view_update_selection (EDayView *day_view, - gint day, - gint row) -{ - gint tmp_row, tmp_day; - gboolean need_redraw = FALSE; - -#if 0 - g_print ("Updating selection %i,%i\n", day, row); -#endif - - day_view->selection_in_top_canvas = (row == -1) ? TRUE : FALSE; - - if (day == -1) - day = (day_view->selection_drag_pos == E_DAY_VIEW_DRAG_START) - ? day_view->selection_start_day - : day_view->selection_end_day; - - if (day_view->selection_drag_pos == E_DAY_VIEW_DRAG_START) { - if (row != day_view->selection_start_row - || day != day_view->selection_start_day) { - need_redraw = TRUE; - day_view->selection_start_row = row; - day_view->selection_start_day = day; - } - } else { - if (row != day_view->selection_end_row - || day != day_view->selection_end_day) { - need_redraw = TRUE; - day_view->selection_end_row = row; - day_view->selection_end_day = day; - } - } - - /* Switch the drag position if necessary. */ - if (day_view->selection_start_day > day_view->selection_end_day - || (day_view->selection_start_day == day_view->selection_end_day - && day_view->selection_start_row > day_view->selection_end_row)) { - tmp_row = day_view->selection_start_row; - tmp_day = day_view->selection_start_day; - day_view->selection_start_day = day_view->selection_end_day; - day_view->selection_start_row = day_view->selection_end_row; - day_view->selection_end_day = tmp_day; - day_view->selection_end_row = tmp_row; - if (day_view->selection_drag_pos == E_DAY_VIEW_DRAG_START) - day_view->selection_drag_pos = E_DAY_VIEW_DRAG_END; - else - day_view->selection_drag_pos = E_DAY_VIEW_DRAG_START; - } - - /* FIXME: Optimise? */ - if (need_redraw) { - gtk_widget_queue_draw (day_view->top_canvas); - gtk_widget_queue_draw (day_view->main_canvas); - } -} - - -void -e_day_view_finish_selection (EDayView *day_view) -{ - day_view->selection_drag_pos = E_DAY_VIEW_DRAG_NONE; - e_day_view_update_calendar_selection_time (day_view); -} - - -static void -e_day_view_update_long_event_resize (EDayView *day_view, - gint day) -{ - EDayViewEvent *event; - gint event_num; - gboolean need_reshape = FALSE; - -#if 0 - g_print ("Updating resize Day:%i\n", day); -#endif - - event_num = day_view->resize_event_num; - event = &g_array_index (day_view->long_events, EDayViewEvent, - event_num); - - if (day_view->resize_drag_pos == E_DAY_VIEW_POS_LEFT_EDGE) { - day = MIN (day, day_view->resize_end_row); - if (day != day_view->resize_start_row) { - need_reshape = TRUE; - day_view->resize_start_row = day; - - } - } else { - day = MAX (day, day_view->resize_start_row); - if (day != day_view->resize_end_row) { - need_reshape = TRUE; - day_view->resize_end_row = day; - } - } - - /* FIXME: Optimise? */ - if (need_reshape) { - e_day_view_reshape_long_event (day_view, event_num); - e_day_view_reshape_resize_long_event_rect_item (day_view); - gtk_widget_queue_draw (day_view->top_canvas); - } -} - - -static void -e_day_view_update_resize (EDayView *day_view, - gint row) -{ - EDayViewEvent *event; - gint day, event_num; - gboolean need_reshape = FALSE; - -#if 0 - g_print ("Updating resize Row:%i\n", row); -#endif - - day = day_view->resize_event_day; - event_num = day_view->resize_event_num; - event = &g_array_index (day_view->events[day], EDayViewEvent, - event_num); - - if (day_view->resize_drag_pos == E_DAY_VIEW_POS_TOP_EDGE) { - row = MIN (row, day_view->resize_end_row); - if (row != day_view->resize_start_row) { - need_reshape = TRUE; - day_view->resize_start_row = row; - - } - } else { - row = MAX (row, day_view->resize_start_row); - if (row != day_view->resize_end_row) { - need_reshape = TRUE; - day_view->resize_end_row = row; - } - } - - /* FIXME: Optimise? */ - if (need_reshape) { - e_day_view_reshape_day_event (day_view, day, event_num); - e_day_view_reshape_resize_rect_item (day_view); - e_day_view_reshape_main_canvas_resize_bars (day_view); - gtk_widget_queue_draw (day_view->main_canvas); - } -} - - -/* This converts the resize start or end row back to a time and updates the - event. */ -static void -e_day_view_finish_long_event_resize (EDayView *day_view) -{ - EDayViewEvent *event; - gint event_num; - iCalObject ico; - - event_num = day_view->resize_event_num; - event = &g_array_index (day_view->long_events, EDayViewEvent, - event_num); - - /* We use a temporary shallow copy of the ico since we don't want to - change the original ico here. Otherwise we would not detect that - the event's time had changed in the "update_event" callback. */ - ico = *event->ico; - - if (day_view->resize_drag_pos == E_DAY_VIEW_POS_LEFT_EDGE) { - ico.dtstart = day_view->day_starts[day_view->resize_start_row]; - } else { - ico.dtend = day_view->day_starts[day_view->resize_end_row + 1]; - } - - gnome_canvas_item_hide (day_view->resize_long_event_rect_item); - - day_view->resize_drag_pos = E_DAY_VIEW_POS_NONE; - - /* Notify calendar of change */ - gnome_calendar_object_changed (day_view->calendar, &ico, CHANGE_DATES); -} - - -/* This converts the resize start or end row back to a time and updates the - event. */ -static void -e_day_view_finish_resize (EDayView *day_view) -{ - EDayViewEvent *event; - gint day, event_num; - iCalObject ico; - - day = day_view->resize_event_day; - event_num = day_view->resize_event_num; - event = &g_array_index (day_view->events[day], EDayViewEvent, - event_num); - - /* We use a temporary shallow copy of the ico since we don't want to - change the original ico here. Otherwise we would not detect that - the event's time had changed in the "update_event" callback. */ - ico = *event->ico; - - if (day_view->resize_drag_pos == E_DAY_VIEW_POS_TOP_EDGE) { - ico.dtstart = e_day_view_convert_grid_position_to_time (day_view, day, day_view->resize_start_row); - } else { - ico.dtend = e_day_view_convert_grid_position_to_time (day_view, day, day_view->resize_end_row + 1); - } - - gnome_canvas_item_hide (day_view->resize_rect_item); - gnome_canvas_item_hide (day_view->resize_bar_item); - - /* Hide the horizontal bars. */ - day_view->resize_bars_event_day = -1; - day_view->resize_bars_event_num = -1; - gnome_canvas_item_hide (day_view->main_canvas_top_resize_bar_item); - gnome_canvas_item_hide (day_view->main_canvas_bottom_resize_bar_item); - - day_view->resize_drag_pos = E_DAY_VIEW_POS_NONE; - - /* Notify calendar of change */ - gnome_calendar_object_changed (day_view->calendar, &ico, CHANGE_DATES); -} - - -static void -e_day_view_abort_resize (EDayView *day_view, - guint32 time) -{ - gint day, event_num; - - if (day_view->resize_drag_pos == E_DAY_VIEW_POS_NONE) - return; - - day_view->resize_drag_pos = E_DAY_VIEW_POS_NONE; - gdk_pointer_ungrab (time); - - day = day_view->resize_event_day; - event_num = day_view->resize_event_num; - - if (day == E_DAY_VIEW_LONG_EVENT) { - e_day_view_reshape_long_event (day_view, event_num); - gtk_widget_queue_draw (day_view->top_canvas); - - day_view->last_cursor_set_in_top_canvas = day_view->normal_cursor; - gdk_window_set_cursor (day_view->top_canvas->window, - day_view->normal_cursor); - gnome_canvas_item_hide (day_view->resize_long_event_rect_item); - } else { - e_day_view_reshape_day_event (day_view, day, event_num); - e_day_view_reshape_main_canvas_resize_bars (day_view); - gtk_widget_queue_draw (day_view->main_canvas); - - day_view->last_cursor_set_in_main_canvas = day_view->normal_cursor; - gdk_window_set_cursor (day_view->main_canvas->window, - day_view->normal_cursor); - gnome_canvas_item_hide (day_view->resize_rect_item); - gnome_canvas_item_hide (day_view->resize_bar_item); - } -} - - -static void -e_day_view_reload_events (EDayView *day_view) -{ - e_day_view_free_events (day_view); - - /* Reset all our indices. */ - day_view->editing_event_day = -1; - day_view->popup_event_day = -1; - day_view->resize_bars_event_day = -1; - day_view->resize_event_day = -1; - day_view->pressed_event_day = -1; - day_view->drag_event_day = -1; - - /* If both lower & upper are 0, then the time range hasn't been set, - so we don't try to load any events. */ - if (day_view->calendar - && (day_view->lower != 0 || day_view->upper != 0)) { - calendar_iterate (day_view->calendar, - day_view->lower, - day_view->upper, - e_day_view_add_event, - day_view); - } - - /* We need to do this to make sure the top canvas is resized. */ - day_view->long_events_need_layout = TRUE; - - e_day_view_check_layout (day_view); - e_day_view_reshape_main_canvas_resize_bars (day_view); - - gtk_widget_queue_draw (day_view->top_canvas); - gtk_widget_queue_draw (day_view->main_canvas); -} - - -static void -e_day_view_free_events (EDayView *day_view) -{ - gint day; - - e_day_view_free_event_array (day_view, day_view->long_events); - - for (day = 0; day < E_DAY_VIEW_MAX_DAYS; day++) - e_day_view_free_event_array (day_view, day_view->events[day]); -} - - -static void -e_day_view_free_event_array (EDayView *day_view, - GArray *array) -{ - EDayViewEvent *event; - gint event_num; - - for (event_num = 0; event_num < array->len; event_num++) { - event = &g_array_index (array, EDayViewEvent, event_num); - if (event->canvas_item) - gtk_object_destroy (GTK_OBJECT (event->canvas_item)); - ical_object_unref (event->ico); - } - - g_array_set_size (array, 0); -} - - -/* This adds one event to the view, adding it to the appropriate array. */ -static int -e_day_view_add_event (iCalObject *ico, - time_t start, - time_t end, - gpointer data) - -{ - EDayView *day_view; - EDayViewEvent event; - gint day, offset; - struct tm start_tm, end_tm; - - day_view = E_DAY_VIEW (data); - - /* Check that the event times are valid. */ - g_return_val_if_fail (start <= end, TRUE); - g_return_val_if_fail (start < day_view->upper, TRUE); - g_return_val_if_fail (end > day_view->lower, TRUE); - - start_tm = *(localtime (&start)); - end_tm = *(localtime (&end)); - - event.ico = ico; - ical_object_ref (ico); - event.start = start; - event.end = end; - event.canvas_item = NULL; - - /* Calculate the start & end minute, relative to the top of the - display. */ - offset = day_view->first_hour_shown * 60 - + day_view->first_minute_shown; - event.start_minute = start_tm.tm_hour * 60 + start_tm.tm_min - offset; - event.end_minute = end_tm.tm_hour * 60 + end_tm.tm_min - offset; - - event.start_row_or_col = -1; - event.num_columns = -1; - - /* Find out which array to add the event to. */ - for (day = 0; day < day_view->days_shown; day++) { - if (start >= day_view->day_starts[day] - && end <= day_view->day_starts[day + 1]) { - - /* Special case for when the appointment ends at - midnight, i.e. the start of the next day. */ - if (end == day_view->day_starts[day + 1]) { - - /* If the event last the entire day, then we - skip it here so it gets added to the top - canvas. */ - if (start == day_view->day_starts[day]) - break; - - event.end_minute = 24 * 60; - } - - g_array_append_val (day_view->events[day], event); - day_view->events_sorted[day] = FALSE; - day_view->need_layout[day] = TRUE; - return TRUE; - } - } - - /* The event wasn't within one day so it must be a long event, - i.e. shown in the top canvas. */ - g_array_append_val (day_view->long_events, event); - day_view->long_events_sorted = FALSE; - day_view->long_events_need_layout = TRUE; - return TRUE; -} - - -/* This lays out the short (less than 1 day) events in the columns. - Any long events are simply skipped. */ -void -e_day_view_check_layout (EDayView *day_view) -{ - gint day; - - /* Don't bother if we aren't visible. */ - if (!GTK_WIDGET_VISIBLE (day_view)) - return; - - /* Make sure the events are sorted (by start and size). */ - e_day_view_ensure_events_sorted (day_view); - - for (day = 0; day < day_view->days_shown; day++) { - if (day_view->need_layout[day]) - e_day_view_layout_day_events (day_view, day); - - if (day_view->need_layout[day] - || day_view->need_reshape[day]) { - e_day_view_reshape_day_events (day_view, day); - - if (day_view->resize_bars_event_day == day) - e_day_view_reshape_main_canvas_resize_bars (day_view); - } - - day_view->need_layout[day] = FALSE; - day_view->need_reshape[day] = FALSE; - } - - if (day_view->long_events_need_layout) - e_day_view_layout_long_events (day_view); - - if (day_view->long_events_need_layout - || day_view->long_events_need_reshape) - e_day_view_reshape_long_events (day_view); - - day_view->long_events_need_layout = FALSE; - day_view->long_events_need_reshape = FALSE; -} - - -static void -e_day_view_layout_long_events (EDayView *day_view) -{ - EDayViewEvent *event; - gint event_num, old_rows_in_top_display, top_canvas_height, top_rows; - guint8 *grid; - - /* This is a temporary 2-d grid which is used to place events. - Each element is 0 if the position is empty, or 1 if occupied. - We allocate the maximum size possible here, assuming that each - event will need its own row. */ - grid = g_new0 (guint8, - day_view->long_events->len * E_DAY_VIEW_MAX_DAYS); - - /* Reset the number of rows in the top display to 0. It will be - updated as events are layed out below. */ - old_rows_in_top_display = day_view->rows_in_top_display; - day_view->rows_in_top_display = 0; - - /* Iterate over the events, finding which days they cover, and putting - them in the first free row available. */ - for (event_num = 0; event_num < day_view->long_events->len; - event_num++) { - event = &g_array_index (day_view->long_events, - EDayViewEvent, event_num); - e_day_view_layout_long_event (day_view, event, grid); - } - - /* Free the grid. */ - g_free (grid); - - /* Set the height of the top canvas based on the row height and the - number of rows needed (min 1 + 1 for the dates + 1 space for DnD).*/ - if (day_view->rows_in_top_display != old_rows_in_top_display) { - top_rows = MAX (1, day_view->rows_in_top_display); - top_canvas_height = (top_rows + 2) * day_view->top_row_height; - gtk_widget_set_usize (day_view->top_canvas, -1, - top_canvas_height); - } -} - - -static void -e_day_view_layout_long_event (EDayView *day_view, - EDayViewEvent *event, - guint8 *grid) -{ - gint start_day, end_day, free_row, day, row; - - event->num_columns = 0; - - if (!e_day_view_find_long_event_days (day_view, event, - &start_day, &end_day)) - return; - - /* Try each row until we find a free one. */ - row = 0; - do { - free_row = row; - for (day = start_day; day <= end_day; day++) { - if (grid[row * E_DAY_VIEW_MAX_DAYS + day]) { - free_row = -1; - break; - } - } - row++; - } while (free_row == -1); - - event->start_row_or_col = free_row; - event->num_columns = 1; - - /* Mark the cells as full. */ - for (day = start_day; day <= end_day; day++) { - grid[free_row * E_DAY_VIEW_MAX_DAYS + day] = 1; - } - - /* Update the number of rows in the top canvas if necessary. */ - day_view->rows_in_top_display = MAX (day_view->rows_in_top_display, - free_row + 1); -} - - -static void -e_day_view_reshape_long_events (EDayView *day_view) -{ - EDayViewEvent *event; - gint event_num; - - for (event_num = 0; event_num < day_view->long_events->len; - event_num++) { - event = &g_array_index (day_view->long_events, EDayViewEvent, - event_num); - - if (event->num_columns == 0) { - if (event->canvas_item) { - gtk_object_destroy (GTK_OBJECT (event->canvas_item)); - event->canvas_item = NULL; - } - } else { - e_day_view_reshape_long_event (day_view, event_num); - } - } -} - - -static void -e_day_view_reshape_long_event (EDayView *day_view, - gint event_num) -{ - EDayViewEvent *event; - GdkFont *font; - gint start_day, end_day, item_x, item_y, item_w, item_h; - gint text_x, text_w, num_icons, icons_width, width, time_width; - iCalObject *ico; - gint min_text_x, max_text_w, text_width, line_len; - gchar *text, *end_of_line; - gboolean show_icons = TRUE, use_max_width = FALSE; - - if (!e_day_view_get_long_event_position (day_view, event_num, - &start_day, &end_day, - &item_x, &item_y, - &item_w, &item_h)) { - if (event->canvas_item) { - gtk_object_destroy (GTK_OBJECT (event->canvas_item)); - event->canvas_item = NULL; - } - return; - } - - /* Take off the border and padding. */ - item_x += E_DAY_VIEW_LONG_EVENT_BORDER_WIDTH + E_DAY_VIEW_LONG_EVENT_X_PAD; - item_w -= (E_DAY_VIEW_LONG_EVENT_BORDER_WIDTH + E_DAY_VIEW_LONG_EVENT_X_PAD) * 2; - item_y += E_DAY_VIEW_LONG_EVENT_BORDER_HEIGHT + E_DAY_VIEW_LONG_EVENT_Y_PAD; - item_h -= (E_DAY_VIEW_LONG_EVENT_BORDER_HEIGHT + E_DAY_VIEW_LONG_EVENT_Y_PAD) * 2; - - event = &g_array_index (day_view->long_events, EDayViewEvent, - event_num); - /* We don't show the icons while resizing, since we'd have to - draw them on top of the resize rect. Nor when editing. */ - num_icons = 0; - ico = event->ico; - font = GTK_WIDGET (day_view)->style->font; - - if (day_view->resize_drag_pos != E_DAY_VIEW_POS_NONE - && day_view->resize_event_day == E_DAY_VIEW_LONG_EVENT - && day_view->resize_event_num == event_num) - show_icons = FALSE; - - if (day_view->editing_event_day == E_DAY_VIEW_LONG_EVENT - && day_view->editing_event_num == event_num) { - show_icons = FALSE; - use_max_width = TRUE; - } - - if (show_icons) { - if (ico->dalarm.enabled || ico->malarm.enabled - || ico->palarm.enabled || ico->aalarm.enabled) - num_icons++; - if (ico->recur) - num_icons++; - } - - if (!event->canvas_item) { - event->canvas_item = - gnome_canvas_item_new (GNOME_CANVAS_GROUP (GNOME_CANVAS (day_view->top_canvas)->root), - e_text_get_type (), - "font_gdk", GTK_WIDGET (day_view)->style->font, - "anchor", GTK_ANCHOR_NW, - "clip", TRUE, - "max_lines", 1, - "editable", TRUE, - NULL); - gtk_signal_connect (GTK_OBJECT (event->canvas_item), "event", - GTK_SIGNAL_FUNC (e_day_view_on_text_item_event), - day_view); - e_day_view_update_long_event_label (day_view, event_num); - } - - /* Calculate its position. We first calculate the ideal position which - is centered with the icons. We then make sure we haven't gone off - the left edge of the available space. Finally we make sure we don't - go off the right edge. */ - icons_width = (E_DAY_VIEW_ICON_WIDTH + E_DAY_VIEW_ICON_X_PAD) - * num_icons; - time_width = day_view->max_small_hour_width + day_view->colon_width - + day_view->max_minute_width; - - if (use_max_width) { - text_x = item_x; - text_w = item_w; - } else { - /* Get the requested size of the label. */ - gtk_object_get (GTK_OBJECT (event->canvas_item), - "text", &text, - NULL); - text_width = 0; - if (text) { - end_of_line = strchr (text, '\n'); - if (end_of_line) - line_len = end_of_line - text; - else - line_len = strlen (text); - text_width = gdk_text_width (font, text, line_len); - g_free (text); - } - - width = text_width + icons_width; - text_x = item_x + (item_w - width) / 2; - - min_text_x = item_x; - if (event->start > day_view->day_starts[start_day]) - min_text_x += time_width + E_DAY_VIEW_LONG_EVENT_TIME_X_PAD; - - text_x = MAX (text_x, min_text_x); - - max_text_w = item_x + item_w - text_x; - if (event->end < day_view->day_starts[end_day + 1]) - max_text_w -= time_width + E_DAY_VIEW_LONG_EVENT_TIME_X_PAD; - - text_w = MIN (width, max_text_w); - - /* Now take out the space for the icons. */ - text_x += icons_width; - text_w -= icons_width; - } - - text_w = MAX (text_w, 0); - gnome_canvas_item_set (event->canvas_item, - "x", (gdouble) text_x, - "y", (gdouble) item_y, - "clip_width", (gdouble) text_w, - "clip_height", (gdouble) item_h, - NULL); -} - - -/* Find the start and end days for the event. */ -gboolean -e_day_view_find_long_event_days (EDayView *day_view, - EDayViewEvent *event, - gint *start_day_return, - gint *end_day_return) -{ - gint day, start_day, end_day; - - start_day = -1; - end_day = -1; - - for (day = 0; day < day_view->days_shown; day++) { - if (start_day == -1 - && event->start < day_view->day_starts[day + 1]) - start_day = day; - if (event->end > day_view->day_starts[day]) - end_day = day; - } - - /* Sanity check. */ - if (start_day < 0 || start_day >= day_view->days_shown - || end_day < 0 || end_day >= day_view->days_shown - || end_day < start_day) { - g_warning ("Invalid date range for event"); - return FALSE; - } - - *start_day_return = start_day; - *end_day_return = end_day; - - return TRUE; -} - - -static void -e_day_view_layout_day_events (EDayView *day_view, - gint day) -{ - EDayViewEvent *event; - gint row, event_num; - guint8 *grid; - - /* This is a temporary array which keeps track of rows which are - connected. When an appointment spans multiple rows then the number - of columns in each of these rows must be the same (i.e. the maximum - of all of them). Each element in the array corresponds to one row - and contains the index of the first row in the group of connected - rows. */ - guint16 group_starts[12 * 24]; - - /* Reset the cols_per_row array, and initialize the connected rows. */ - for (row = 0; row < day_view->rows; row++) { - day_view->cols_per_row[day][row] = 0; - group_starts[row] = row; - } - - /* This is a temporary 2-d grid which is used to place events. - Each element is 0 if the position is empty, or 1 if occupied. */ - grid = g_new0 (guint8, day_view->rows * E_DAY_VIEW_MAX_COLUMNS); - - - /* Iterate over the events, finding which rows they cover, and putting - them in the first free column available. Increment the number of - events in each of the rows it covers, and make sure they are all - in one group. */ - for (event_num = 0; event_num < day_view->events[day]->len; - event_num++) { - event = &g_array_index (day_view->events[day], EDayViewEvent, - event_num); - - e_day_view_layout_day_event (day_view, day, event, - grid, group_starts); - } - - /* Recalculate the number of columns needed in each row. */ - e_day_view_recalc_cols_per_row (day_view, day, group_starts); - - /* Iterate over the events again, trying to expand events horizontally - if there is enough space. */ - for (event_num = 0; event_num < day_view->events[day]->len; - event_num++) { - event = &g_array_index (day_view->events[day], EDayViewEvent, - event_num); - e_day_view_expand_day_event (day_view, day, event, grid); - } - - /* Free the grid. */ - g_free (grid); -} - - -/* Finds the first free position to place the event in. - Increments the number of events in each of the rows it covers, and makes - sure they are all in one group. */ -static void -e_day_view_layout_day_event (EDayView *day_view, - gint day, - EDayViewEvent *event, - guint8 *grid, - guint16 *group_starts) -{ - gint start_row, end_row, free_col, col, row, group_start; - - start_row = event->start_minute / day_view->mins_per_row; - end_row = (event->end_minute - 1) / day_view->mins_per_row; - - event->num_columns = 0; - - /* If the event can't currently be seen, just return. */ - if (start_row >= day_view->rows || end_row < 0) - return; - - /* Make sure we don't go outside the visible times. */ - start_row = CLAMP (start_row, 0, day_view->rows - 1); - end_row = CLAMP (end_row, 0, day_view->rows - 1); - - /* Try each column until we find a free one. */ - for (col = 0; col < E_DAY_VIEW_MAX_COLUMNS; col++) { - free_col = col; - for (row = start_row; row <= end_row; row++) { - if (grid[row * E_DAY_VIEW_MAX_COLUMNS + col]) { - free_col = -1; - break; - } - } - - if (free_col != -1) - break; - } - - /* If we can't find space for the event, just return. */ - if (free_col == -1) - return; - - /* The event is assigned 1 col initially, but may be expanded later. */ - event->start_row_or_col = free_col; - event->num_columns = 1; - - /* Determine the start index of the group. */ - group_start = group_starts[start_row]; - - /* Increment number of events in each of the rows the event covers. - We use the cols_per_row array for this. It will be sorted out after - all the events have been layed out. Also make sure all the rows that - the event covers are in one group. */ - for (row = start_row; row <= end_row; row++) { - grid[row * E_DAY_VIEW_MAX_COLUMNS + free_col] = 1; - day_view->cols_per_row[day][row]++; - group_starts[row] = group_start; - } - - /* If any following rows should be in the same group, add them. */ - for (row = end_row + 1; row < day_view->rows; row++) { - if (group_starts[row] > end_row) - break; - group_starts[row] = group_start; - } -} - - -/* For each group of rows, find the max number of events in all the - rows, and set the number of cols in each of the rows to that. */ -static void -e_day_view_recalc_cols_per_row (EDayView *day_view, - gint day, - guint16 *group_starts) -{ - gint start_row = 0, row, next_start_row, max_events; - - while (start_row < day_view->rows) { - - max_events = 0; - for (row = start_row; row < day_view->rows && group_starts[row] == start_row; row++) - max_events = MAX (max_events, day_view->cols_per_row[day][row]); - - next_start_row = row; - - for (row = start_row; row < next_start_row; row++) - day_view->cols_per_row[day][row] = max_events; - - start_row = next_start_row; - } -} - - -/* Expands the event horizontally to fill any free space. */ -static void -e_day_view_expand_day_event (EDayView *day_view, - gint day, - EDayViewEvent *event, - guint8 *grid) -{ - gint start_row, end_row, col, row; - gboolean clashed; - - start_row = event->start_minute / day_view->mins_per_row; - end_row = (event->end_minute - 1) / day_view->mins_per_row; - - /* Try each column until we find a free one. */ - clashed = FALSE; - for (col = event->start_row_or_col + 1; col < day_view->cols_per_row[day][start_row]; col++) { - for (row = start_row; row <= end_row; row++) { - if (grid[row * E_DAY_VIEW_MAX_COLUMNS + col]) { - clashed = TRUE; - break; - } - } - - if (clashed) - break; - - event->num_columns++; - } -} - - -/* This creates or updates the sizes of the canvas items for one day of the - main canvas. */ -static void -e_day_view_reshape_day_events (EDayView *day_view, - gint day) -{ - gint event_num; - - for (event_num = 0; event_num < day_view->events[day]->len; - event_num++) { - e_day_view_reshape_day_event (day_view, day, event_num); - } -} - - -static void -e_day_view_reshape_day_event (EDayView *day_view, - gint day, - gint event_num) -{ - EDayViewEvent *event; - gint item_x, item_y, item_w, item_h; - gint num_icons, icons_offset; - iCalObject *ico; - - event = &g_array_index (day_view->events[day], EDayViewEvent, - event_num); - ico = event->ico; - - if (!e_day_view_get_event_position (day_view, day, event_num, - &item_x, &item_y, - &item_w, &item_h)) { - if (event->canvas_item) { - gtk_object_destroy (GTK_OBJECT (event->canvas_item)); - event->canvas_item = NULL; - } - } else { - /* Skip the border and padding. */ - item_x += E_DAY_VIEW_BAR_WIDTH + E_DAY_VIEW_EVENT_X_PAD; - item_w -= E_DAY_VIEW_BAR_WIDTH + E_DAY_VIEW_EVENT_X_PAD * 2; - item_y += E_DAY_VIEW_EVENT_BORDER_HEIGHT + E_DAY_VIEW_EVENT_Y_PAD; - item_h -= (E_DAY_VIEW_EVENT_BORDER_HEIGHT + E_DAY_VIEW_EVENT_Y_PAD) * 2; - - /* We don't show the icons while resizing, since we'd have to - draw them on top of the resize rect. */ - num_icons = 0; - if (day_view->resize_drag_pos == E_DAY_VIEW_POS_NONE - || day_view->resize_event_day != day - || day_view->resize_event_num != event_num) { - if (ico->dalarm.enabled || ico->malarm.enabled - || ico->palarm.enabled || ico->aalarm.enabled) - num_icons++; - if (ico->recur) - num_icons++; - } - - if (num_icons > 0) { - if (item_h >= (E_DAY_VIEW_ICON_HEIGHT + E_DAY_VIEW_ICON_Y_PAD) * num_icons) - icons_offset = E_DAY_VIEW_ICON_WIDTH + E_DAY_VIEW_ICON_X_PAD * 2; - else - icons_offset = (E_DAY_VIEW_ICON_WIDTH + E_DAY_VIEW_ICON_X_PAD) * num_icons + E_DAY_VIEW_ICON_X_PAD; - item_x += icons_offset; - item_w -= icons_offset; - } - - if (!event->canvas_item) { - event->canvas_item = - gnome_canvas_item_new (GNOME_CANVAS_GROUP (GNOME_CANVAS (day_view->main_canvas)->root), - e_text_get_type (), - "font_gdk", GTK_WIDGET (day_view)->style->font, - "anchor", GTK_ANCHOR_NW, - "line_wrap", TRUE, - "editable", TRUE, - "clip", TRUE, - NULL); - gtk_signal_connect (GTK_OBJECT (event->canvas_item), - "event", - GTK_SIGNAL_FUNC (e_day_view_on_text_item_event), - day_view); - e_day_view_update_event_label (day_view, day, - event_num); - } - - item_w = MAX (item_w, 0); - gnome_canvas_item_set (event->canvas_item, - "x", (gdouble) item_x, - "y", (gdouble) item_y, - "clip_width", (gdouble) item_w, - "clip_height", (gdouble) item_h, - NULL); - } -} - - -/* This creates or resizes the horizontal bars used to resize events in the - main canvas. */ -static void -e_day_view_reshape_main_canvas_resize_bars (EDayView *day_view) -{ - gint day, event_num; - gint item_x, item_y, item_w, item_h; - gdouble x, y, w, h; - - day = day_view->resize_bars_event_day; - event_num = day_view->resize_bars_event_num; - - /* If we're not editing an event, or the event is not shown, - hide the resize bars. */ - if (day != -1 && day == day_view->drag_event_day - && event_num == day_view->drag_event_num) { - gtk_object_get (GTK_OBJECT (day_view->drag_rect_item), - "x1", &x, - "y1", &y, - "x2", &w, - "y2", &h, - NULL); - w -= x; - x++; - h -= y; - } else if (day != -1 - && e_day_view_get_event_position (day_view, day, event_num, - &item_x, &item_y, - &item_w, &item_h)) { - x = item_x + E_DAY_VIEW_BAR_WIDTH; - y = item_y; - w = item_w - E_DAY_VIEW_BAR_WIDTH; - h = item_h; - } else { - gnome_canvas_item_hide (day_view->main_canvas_top_resize_bar_item); - gnome_canvas_item_hide (day_view->main_canvas_bottom_resize_bar_item); - return; - } - - gnome_canvas_item_set (day_view->main_canvas_top_resize_bar_item, - "x1", x - E_DAY_VIEW_BAR_WIDTH, - "y1", y - E_DAY_VIEW_BAR_HEIGHT, - "x2", x + w - 1, - "y2", y - 1, - NULL); - gnome_canvas_item_show (day_view->main_canvas_top_resize_bar_item); - - gnome_canvas_item_set (day_view->main_canvas_bottom_resize_bar_item, - "x1", x - E_DAY_VIEW_BAR_WIDTH, - "y1", y + h, - "x2", x + w - 1, - "y2", y + h + E_DAY_VIEW_BAR_HEIGHT - 1, - NULL); - gnome_canvas_item_show (day_view->main_canvas_bottom_resize_bar_item); -} - - -static void -e_day_view_ensure_events_sorted (EDayView *day_view) -{ - gint day; - - /* Sort the long events. */ - if (!day_view->long_events_sorted) { - qsort (day_view->long_events->data, - day_view->long_events->len, - sizeof (EDayViewEvent), - e_day_view_event_sort_func); - day_view->long_events_sorted = TRUE; - } - - /* Sort the events for each day. */ - for (day = 0; day < day_view->days_shown; day++) { - if (!day_view->events_sorted[day]) { - qsort (day_view->events[day]->data, - day_view->events[day]->len, - sizeof (EDayViewEvent), - e_day_view_event_sort_func); - day_view->events_sorted[day] = TRUE; - } - } -} - - -static gint -e_day_view_event_sort_func (const void *arg1, - const void *arg2) -{ - EDayViewEvent *event1, *event2; - - event1 = (EDayViewEvent*) arg1; - event2 = (EDayViewEvent*) arg2; - - if (event1->start < event2->start) - return -1; - if (event1->start > event2->start) - return 1; - - if (event1->end > event2->end) - return -1; - if (event1->end < event2->end) - return 1; - - return 0; -} - - -static gint -e_day_view_key_press (GtkWidget *widget, GdkEventKey *event) -{ - EDayView *day_view; - iCalObject *ico; - gint day, event_num; - gchar *initial_text; - - g_return_val_if_fail (widget != NULL, FALSE); - g_return_val_if_fail (E_IS_DAY_VIEW (widget), FALSE); - g_return_val_if_fail (event != NULL, FALSE); - - day_view = E_DAY_VIEW (widget); - - /* The Escape key aborts a resize operation. */ - if (day_view->resize_drag_pos != E_DAY_VIEW_POS_NONE) { - if (event->keyval == GDK_Escape) { - e_day_view_abort_resize (day_view, event->time); - } - return FALSE; - } - - if (day_view->selection_start_day == -1) - return FALSE; - - /* Check if there is room for a new event to be typed in. If there - isn't we don't want to add an event as we will then add a new - event for every key press. */ - if (!e_day_view_check_if_new_event_fits (day_view)) { - g_print ("Skipping new event. No more room\n"); - return FALSE; - } - - /* We only want to start an edit with a return key or a simple - character. */ - if (event->keyval == GDK_Return) { - initial_text = NULL; - } else if ((event->keyval < 0x20) - || (event->keyval > 0xFF) - || (event->length == 0) - || (event->state & (GDK_CONTROL_MASK | GDK_MOD1_MASK))) { - return FALSE; - } else { - initial_text = event->string; - } - - /* Add a new event covering the selected range. - Note that user_name is a global variable. */ - ico = ical_new ("", user_name, ""); - ico->new = 1; - ico->created = time (NULL); - ico->last_mod = ico->created; - - e_day_view_get_selected_time_range (day_view, &ico->dtstart, - &ico->dtend); - - /* We add the event locally and start editing it. When we get the - "update_event" callback from the server, we basically ignore it. - If we were to wait for the "update_event" callback it wouldn't be - as responsive and we may lose a few keystrokes. */ - e_day_view_add_event (ico, ico->dtstart, ico->dtend, day_view); - e_day_view_check_layout (day_view); - gtk_widget_queue_draw (day_view->top_canvas); - gtk_widget_queue_draw (day_view->main_canvas); - - if (e_day_view_find_event_from_uid (day_view, ico->uid, - &day, &event_num)) { - e_day_view_start_editing_event (day_view, day, event_num, - initial_text); - day_view->editing_new_event = TRUE; - } else { - g_warning ("Couldn't find event to start editing.\n"); - } - - gnome_calendar_add_object (day_view->calendar, ico); - - ical_object_unref (ico); - - return TRUE; -} - - -static gboolean -e_day_view_check_if_new_event_fits (EDayView *day_view) -{ - gint day, start_row, end_row, row; - - day = day_view->selection_start_day; - start_row = day_view->selection_start_row; - end_row = day_view->selection_end_row; - - /* Long events always fit, since we keep adding rows to the top - canvas. */ - if (day != day_view->selection_end_day) - return FALSE; - if (start_row == 0 && end_row == day_view->rows) - return FALSE; - - /* If any of the rows already have E_DAY_VIEW_MAX_COLUMNS columns, - return FALSE. */ - for (row = start_row; row <= end_row; row++) { - if (day_view->cols_per_row[day][row] >= E_DAY_VIEW_MAX_COLUMNS) - return FALSE; - } - - return TRUE; -} - - -static void -e_day_view_start_editing_event (EDayView *day_view, - gint day, - gint event_num, - gchar *initial_text) -{ - EDayViewEvent *event; - ETextEventProcessor *event_processor = NULL; - ETextEventProcessorCommand command; - - /* If we are already editing the event, just return. */ - if (day == day_view->editing_event_day - && event_num == day_view->editing_event_num) - return; - - if (day == E_DAY_VIEW_LONG_EVENT) { - event = &g_array_index (day_view->long_events, EDayViewEvent, - event_num); - } else { - event = &g_array_index (day_view->events[day], EDayViewEvent, - event_num); - } - - /* If the event is not shown, don't try to edit it. */ - if (!event->canvas_item) - return; - - /* We must grab the focus before setting the initial text, since - grabbing the focus will result in a call to - e_day_view_on_editing_started(), which will reset the text to get - rid of the start and end times. */ - e_canvas_item_grab_focus (event->canvas_item); - - if (initial_text) { - gnome_canvas_item_set (event->canvas_item, - "text", initial_text, - NULL); - } - - /* Try to move the cursor to the end of the text. */ - gtk_object_get (GTK_OBJECT (event->canvas_item), - "event_processor", &event_processor, - NULL); - if (event_processor) { - command.action = E_TEP_MOVE; - command.position = E_TEP_END_OF_BUFFER; - gtk_signal_emit_by_name (GTK_OBJECT (event_processor), - "command", &command); - } -} - - -/* This stops the current edit. If accept is TRUE the event summary is update, - else the edit is cancelled. */ -static void -e_day_view_stop_editing_event (EDayView *day_view) -{ - GtkWidget *toplevel; - - /* Check we are editing an event. */ - if (day_view->editing_event_day == -1) - return; - - /* Set focus to the toplevel so the item loses focus. */ - toplevel = gtk_widget_get_toplevel (GTK_WIDGET (day_view)); - if (toplevel && GTK_IS_WINDOW (toplevel)) - gtk_window_set_focus (GTK_WINDOW (toplevel), NULL); -} - - -static gboolean -e_day_view_on_text_item_event (GnomeCanvasItem *item, - GdkEvent *event, - EDayView *day_view) -{ - switch (event->type) { - case GDK_KEY_PRESS: - if (event && event->key.keyval == GDK_Return) { - /* We set the keyboard focus to the EDayView, so the - EText item loses it and stops the edit. */ - gtk_widget_grab_focus (GTK_WIDGET (day_view)); - - /* Stop the signal last or we will also stop any - other events getting to the EText item. */ - gtk_signal_emit_stop_by_name (GTK_OBJECT (item), - "event"); - return TRUE; - } - break; - case GDK_BUTTON_PRESS: - case GDK_BUTTON_RELEASE: - /* Only let the EText handle the event while editing. */ - if (!E_TEXT (item)->editing) - gtk_signal_emit_stop_by_name (GTK_OBJECT (item), - "event"); - break; - case GDK_FOCUS_CHANGE: - if (event->focus_change.in) - e_day_view_on_editing_started (day_view, item); - else - e_day_view_on_editing_stopped (day_view, item); - - return FALSE; - default: - break; - } - - return FALSE; -} - - -static void -e_day_view_on_editing_started (EDayView *day_view, - GnomeCanvasItem *item) -{ - gint day, event_num; - - if (!e_day_view_find_event_from_item (day_view, item, - &day, &event_num)) - return; - -#if 0 - g_print ("In e_day_view_on_editing_started Day:%i Event:%i\n", - day, event_num); -#endif - - /* FIXME: This is a temporary workaround for a bug which seems to stop - us getting focus_out signals. It is not a complete fix since if we - don't get focus_out signals we don't save the appointment text so - this may be lost. */ - if (day_view->editing_event_day == day - && day_view->editing_event_num == event_num) - return; - - day_view->editing_event_day = day; - day_view->editing_event_num = event_num; - - if (day == E_DAY_VIEW_LONG_EVENT) { - e_day_view_reshape_long_event (day_view, event_num); - } else { - day_view->resize_bars_event_day = day; - day_view->resize_bars_event_num = event_num; - e_day_view_update_event_label (day_view, day, event_num); - e_day_view_reshape_main_canvas_resize_bars (day_view); - } -} - - -static void -e_day_view_on_editing_stopped (EDayView *day_view, - GnomeCanvasItem *item) -{ - gint day, event_num; - gboolean editing_long_event = FALSE; - EDayViewEvent *event; - gchar *text = NULL; - - /* Note: the item we are passed here isn't reliable, so we just stop - the edit of whatever item was being edited. We also receive this - event twice for some reason. */ - day = day_view->editing_event_day; - event_num = day_view->editing_event_num; - - /* If no item is being edited, just return. */ - if (day == -1) - return; - -#if 0 - g_print ("In e_day_view_on_editing_stopped Day:%i Event:%i\n", - day, event_num); -#endif - - if (day == E_DAY_VIEW_LONG_EVENT) { - editing_long_event = TRUE; - event = &g_array_index (day_view->long_events, EDayViewEvent, - event_num); - } else { - event = &g_array_index (day_view->events[day], EDayViewEvent, - event_num); - - /* Hide the horizontal bars. */ - gnome_canvas_item_hide (day_view->main_canvas_top_resize_bar_item); - gnome_canvas_item_hide (day_view->main_canvas_bottom_resize_bar_item); - } - - /* Reset the edit fields. */ - day_view->editing_event_day = -1; - day_view->editing_event_num = -1; - day_view->editing_new_event = FALSE; - - day_view->resize_bars_event_day = -1; - day_view->resize_bars_event_num = -1; - - /* Check that the event is still valid. */ - if (!event->ico->uid) - return; - - gtk_object_get (GTK_OBJECT (event->canvas_item), - "text", &text, - NULL); - - /* Only update the summary if necessary. */ - if (text && event->ico->summary - && !strcmp (text, event->ico->summary)) { - g_free (text); - - if (day == E_DAY_VIEW_LONG_EVENT) - e_day_view_reshape_long_event (day_view, event_num); - return; - } - - if (event->ico->summary) - g_free (event->ico->summary); - - event->ico->summary = text; - - /* Notify calendar of change. This will result in a call to update, - which will reset the event label as appropriate. */ - gnome_calendar_object_changed (day_view->calendar, event->ico, - CHANGE_SUMMARY); -} - - -/* FIXME: It is possible that we may produce an invalid time due to daylight - saving times (i.e. when clocks go forward there is a range of time which - is not valid). I don't know the best way to handle daylight saving time. */ -static time_t -e_day_view_convert_grid_position_to_time (EDayView *day_view, - gint col, - gint row) -{ - struct tm *tmp_tm; - time_t val; - gint minutes; - - /* Calulate the number of minutes since the start of the day. */ - minutes = day_view->first_hour_shown * 60 - + day_view->first_minute_shown - + row * day_view->mins_per_row; - - /* A special case for midnight, where we can use the start of the - next day. */ - if (minutes == 60 * 24) - return day_view->day_starts[col + 1]; - - /* We convert the start of the day to a struct tm, then set the - hour and minute, then convert it back to a time_t. */ - tmp_tm = localtime (&day_view->day_starts[col]); - - tmp_tm->tm_hour = minutes / 60; - tmp_tm->tm_min = minutes % 60; - tmp_tm->tm_isdst = -1; - - val = mktime (tmp_tm); - return val; -} - - -static gboolean -e_day_view_convert_time_to_grid_position (EDayView *day_view, - time_t time, - gint *col, - gint *row) -{ - struct tm *tmp_tm; - gint day, minutes; - - *col = *row = 0; - - if (time < day_view->lower || time >= day_view->upper) - return FALSE; - - /* We can find the column easily using the day_starts array. */ - for (day = 1; day <= day_view->days_shown; day++) { - if (time < day_view->day_starts[day]) { - *col = day - 1; - break; - } - } - - /* To find the row we need to convert the time to a struct tm, - calculate the offset in minutes from the top of the display and - divide it by the mins per row setting. */ - tmp_tm = localtime (&time); - minutes = tmp_tm->tm_hour * 60 + tmp_tm->tm_min; - minutes -= day_view->first_hour_shown * 60 - + day_view->first_minute_shown; - - *row = minutes / day_view->mins_per_row; - - if (*row < 0 || *row >= day_view->rows) - return FALSE; - - return TRUE; -} - - -/* This starts or stops auto-scrolling when dragging a selection or resizing - an event. */ -void -e_day_view_check_auto_scroll (EDayView *day_view, - gint event_x, - gint event_y) -{ - day_view->last_mouse_x = event_x; - day_view->last_mouse_y = event_y; - - if (event_y < E_DAY_VIEW_AUTO_SCROLL_OFFSET) - e_day_view_start_auto_scroll (day_view, TRUE); - else if (event_y >= day_view->main_canvas->allocation.height - - E_DAY_VIEW_AUTO_SCROLL_OFFSET) - e_day_view_start_auto_scroll (day_view, FALSE); - else - e_day_view_stop_auto_scroll (day_view); -} - - -static void -e_day_view_start_auto_scroll (EDayView *day_view, - gboolean scroll_up) -{ - if (day_view->auto_scroll_timeout_id == 0) { - day_view->auto_scroll_timeout_id = g_timeout_add (E_DAY_VIEW_AUTO_SCROLL_TIMEOUT, e_day_view_auto_scroll_handler, day_view); - day_view->auto_scroll_delay = E_DAY_VIEW_AUTO_SCROLL_DELAY; - } - day_view->auto_scroll_up = scroll_up; -} - - -void -e_day_view_stop_auto_scroll (EDayView *day_view) -{ - if (day_view->auto_scroll_timeout_id != 0) { - gtk_timeout_remove (day_view->auto_scroll_timeout_id); - day_view->auto_scroll_timeout_id = 0; - } -} - - -static gboolean -e_day_view_auto_scroll_handler (gpointer data) -{ - EDayView *day_view; - EDayViewPosition pos; - gint scroll_x, scroll_y, new_scroll_y, canvas_x, canvas_y, row, day; - GtkAdjustment *adj; - - g_return_val_if_fail (E_IS_DAY_VIEW (data), FALSE); - - day_view = E_DAY_VIEW (data); - - GDK_THREADS_ENTER (); - - if (day_view->auto_scroll_delay > 0) { - day_view->auto_scroll_delay--; - GDK_THREADS_LEAVE (); - return TRUE; - } - - gnome_canvas_get_scroll_offsets (GNOME_CANVAS (day_view->main_canvas), - &scroll_x, &scroll_y); - - adj = GTK_LAYOUT (day_view->main_canvas)->vadjustment; - - if (day_view->auto_scroll_up) - new_scroll_y = MAX (scroll_y - adj->step_increment, 0); - else - new_scroll_y = MIN (scroll_y + adj->step_increment, - adj->upper - adj->page_size); - - if (new_scroll_y != scroll_y) { - /* NOTE: This reduces flicker, but only works if we don't use - canvas items which have X windows. */ - gtk_layout_freeze (GTK_LAYOUT (day_view->main_canvas)); - - gnome_canvas_scroll_to (GNOME_CANVAS (day_view->main_canvas), - scroll_x, new_scroll_y); - - gtk_layout_thaw (GTK_LAYOUT (day_view->main_canvas)); - } - - canvas_x = day_view->last_mouse_x + scroll_x; - canvas_y = day_view->last_mouse_y + new_scroll_y; - - /* The last_mouse_x position is set to -1 when we are selecting using - the time column. In this case we set canvas_x to 0 and we ignore - the resulting day. */ - if (day_view->last_mouse_x == -1) - canvas_x = 0; - - /* Update the selection/resize/drag if necessary. */ - pos = e_day_view_convert_position_in_main_canvas (day_view, - canvas_x, canvas_y, - &day, &row, NULL); - - if (day_view->last_mouse_x == -1) - day = -1; - - if (pos != E_DAY_VIEW_POS_OUTSIDE) { - if (day_view->selection_drag_pos != E_DAY_VIEW_DRAG_NONE) { - e_day_view_update_selection (day_view, day, row); - } else if (day_view->resize_drag_pos != E_DAY_VIEW_POS_NONE) { - e_day_view_update_resize (day_view, row); - } else if (day_view->drag_item->object.flags - & GNOME_CANVAS_ITEM_VISIBLE) { - e_day_view_update_main_canvas_drag (day_view, row, - day); - } - } - - GDK_THREADS_LEAVE (); - return TRUE; -} - - -gboolean -e_day_view_get_event_position (EDayView *day_view, - gint day, - gint event_num, - gint *item_x, - gint *item_y, - gint *item_w, - gint *item_h) -{ - EDayViewEvent *event; - gint start_row, end_row, cols_in_row, start_col, num_columns; - - event = &g_array_index (day_view->events[day], EDayViewEvent, - event_num); - - /* If the event is flagged as not displayed, return FALSE. */ - if (event->num_columns == 0) - return FALSE; - - start_row = event->start_minute / day_view->mins_per_row; - end_row = (event->end_minute - 1) / day_view->mins_per_row; - cols_in_row = day_view->cols_per_row[day][start_row]; - start_col = event->start_row_or_col; - num_columns = event->num_columns; - - if (cols_in_row == 0) - return FALSE; - - /* If the event is being resize, use the resize position. */ - if (day_view->resize_drag_pos != E_DAY_VIEW_POS_NONE - && day_view->resize_event_day == day - && day_view->resize_event_num == event_num) { - if (day_view->resize_drag_pos == E_DAY_VIEW_POS_TOP_EDGE) - start_row = day_view->resize_start_row; - else if (day_view->resize_drag_pos == E_DAY_VIEW_POS_BOTTOM_EDGE) - end_row = day_view->resize_end_row; - } - - *item_x = day_view->day_offsets[day] + day_view->day_widths[day] * start_col / cols_in_row; - *item_w = day_view->day_widths[day] * num_columns / cols_in_row - E_DAY_VIEW_GAP_WIDTH; - *item_w = MAX (*item_w, 0); - *item_y = start_row * day_view->row_height; - *item_h = (end_row - start_row + 1) * day_view->row_height; - - return TRUE; -} - - -gboolean -e_day_view_get_long_event_position (EDayView *day_view, - gint event_num, - gint *start_day, - gint *end_day, - gint *item_x, - gint *item_y, - gint *item_w, - gint *item_h) -{ - EDayViewEvent *event; - - event = &g_array_index (day_view->long_events, EDayViewEvent, - event_num); - - /* If the event is flagged as not displayed, return FALSE. */ - if (event->num_columns == 0) - return FALSE; - - if (!e_day_view_find_long_event_days (day_view, event, - start_day, end_day)) - return FALSE; - - /* If the event is being resize, use the resize position. */ - if (day_view->resize_drag_pos != E_DAY_VIEW_POS_NONE - && day_view->resize_event_day == E_DAY_VIEW_LONG_EVENT - && day_view->resize_event_num == event_num) { - if (day_view->resize_drag_pos == E_DAY_VIEW_POS_LEFT_EDGE) - *start_day = day_view->resize_start_row; - else if (day_view->resize_drag_pos == E_DAY_VIEW_POS_RIGHT_EDGE) - *end_day = day_view->resize_end_row; - } - - *item_x = day_view->day_offsets[*start_day] + E_DAY_VIEW_BAR_WIDTH; - *item_w = day_view->day_offsets[*end_day + 1] - *item_x - - E_DAY_VIEW_GAP_WIDTH; - *item_w = MAX (*item_w, 0); - *item_y = (event->start_row_or_col + 1) * day_view->top_row_height; - *item_h = day_view->top_row_height - E_DAY_VIEW_TOP_CANVAS_Y_GAP; - return TRUE; -} - - -/* Converts a position within the entire top canvas to a day & event and - a place within the event if appropriate. If event_num_return is NULL, it - simply returns the grid position without trying to find the event. */ -static EDayViewPosition -e_day_view_convert_position_in_top_canvas (EDayView *day_view, - gint x, - gint y, - gint *day_return, - gint *event_num_return) -{ - EDayViewEvent *event; - gint day, row, col; - gint event_num, start_day, end_day, item_x, item_y, item_w, item_h; - - *day_return = -1; - if (event_num_return) - *event_num_return = -1; - - if (x < 0 || y < 0) - return E_DAY_VIEW_POS_OUTSIDE; - - row = y / day_view->top_row_height - 1; - - day = -1; - for (col = 1; col <= day_view->days_shown; col++) { - if (x < day_view->day_offsets[col]) { - day = col - 1; - break; - } - } - if (day == -1) - return E_DAY_VIEW_POS_OUTSIDE; - - *day_return = day; - - /* If only the grid position is wanted, return. */ - if (event_num_return == NULL) - return E_DAY_VIEW_POS_NONE; - - for (event_num = 0; event_num < day_view->long_events->len; - event_num++) { - event = &g_array_index (day_view->long_events, EDayViewEvent, - event_num); - - if (event->start_row_or_col != row) - continue; - - if (!e_day_view_get_long_event_position (day_view, event_num, - &start_day, &end_day, - &item_x, &item_y, - &item_w, &item_h)) - continue; - - if (x < item_x) - continue; - - if (x >= item_x + item_w) - continue; - - *event_num_return = event_num; - - if (x < item_x + E_DAY_VIEW_LONG_EVENT_BORDER_WIDTH - + E_DAY_VIEW_LONG_EVENT_X_PAD) - return E_DAY_VIEW_POS_LEFT_EDGE; - - if (x >= item_x + item_w - E_DAY_VIEW_LONG_EVENT_BORDER_WIDTH - - E_DAY_VIEW_LONG_EVENT_X_PAD) - return E_DAY_VIEW_POS_RIGHT_EDGE; - - return E_DAY_VIEW_POS_EVENT; - } - - return E_DAY_VIEW_POS_NONE; -} - - -/* Converts a position within the entire main canvas to a day, row, event and - a place within the event if appropriate. If event_num_return is NULL, it - simply returns the grid position without trying to find the event. */ -static EDayViewPosition -e_day_view_convert_position_in_main_canvas (EDayView *day_view, - gint x, - gint y, - gint *day_return, - gint *row_return, - gint *event_num_return) -{ - gint day, row, col, event_num; - gint item_x, item_y, item_w, item_h; - - *day_return = -1; - *row_return = -1; - if (event_num_return) - *event_num_return = -1; - - /* Check the position is inside the canvas, and determine the day - and row. */ - if (x < 0 || y < 0) - return E_DAY_VIEW_POS_OUTSIDE; - - row = y / day_view->row_height; - if (row >= day_view->rows) - return E_DAY_VIEW_POS_OUTSIDE; - - day = -1; - for (col = 1; col <= day_view->days_shown; col++) { - if (x < day_view->day_offsets[col]) { - day = col - 1; - break; - } - } - if (day == -1) - return E_DAY_VIEW_POS_OUTSIDE; - - *day_return = day; - *row_return = row; - - /* If only the grid position is wanted, return. */ - if (event_num_return == NULL) - return E_DAY_VIEW_POS_NONE; - - /* Check the selected item first, since the horizontal resizing bars - may be above other events. */ - if (day_view->resize_bars_event_day == day) { - if (e_day_view_get_event_position (day_view, day, - day_view->resize_bars_event_num, - &item_x, &item_y, - &item_w, &item_h)) { - if (x >= item_x && x < item_x + item_w) { - *event_num_return = day_view->resize_bars_event_num; - if (y >= item_y - E_DAY_VIEW_BAR_HEIGHT - && y < item_y + E_DAY_VIEW_EVENT_BORDER_HEIGHT) - return E_DAY_VIEW_POS_TOP_EDGE; - if (y >= item_y + item_h - E_DAY_VIEW_EVENT_BORDER_HEIGHT - && y < item_y + item_h + E_DAY_VIEW_BAR_HEIGHT) - return E_DAY_VIEW_POS_BOTTOM_EDGE; - } - } - } - - /* Try to find the event at the found position. */ - *event_num_return = -1; - for (event_num = 0; event_num < day_view->events[day]->len; - event_num++) { - if (!e_day_view_get_event_position (day_view, day, event_num, - &item_x, &item_y, - &item_w, &item_h)) - continue; - - if (x < item_x || x >= item_x + item_w - || y < item_y || y >= item_y + item_h) - continue; - - *event_num_return = event_num; - - if (x < item_x + E_DAY_VIEW_BAR_WIDTH) - return E_DAY_VIEW_POS_LEFT_EDGE; - - if (y < item_y + E_DAY_VIEW_EVENT_BORDER_HEIGHT - + E_DAY_VIEW_EVENT_Y_PAD) - return E_DAY_VIEW_POS_TOP_EDGE; - - if (y >= item_y + item_h - E_DAY_VIEW_EVENT_BORDER_HEIGHT - - E_DAY_VIEW_EVENT_Y_PAD) - return E_DAY_VIEW_POS_BOTTOM_EDGE; - - return E_DAY_VIEW_POS_EVENT; - } - - return E_DAY_VIEW_POS_NONE; -} - - -static gint -e_day_view_on_top_canvas_drag_motion (GtkWidget *widget, - GdkDragContext *context, - gint x, - gint y, - guint time, - EDayView *day_view) -{ - gint scroll_x, scroll_y; - - gnome_canvas_get_scroll_offsets (GNOME_CANVAS (widget), - &scroll_x, &scroll_y); - day_view->drag_event_x = x + scroll_x; - day_view->drag_event_y = y + scroll_y; - - e_day_view_reshape_top_canvas_drag_item (day_view); - - return TRUE; -} - - -static void -e_day_view_reshape_top_canvas_drag_item (EDayView *day_view) -{ - EDayViewPosition pos; - gint x, y, day; - - /* Calculate the day & start row of the event being dragged, using - the current mouse position. */ - x = day_view->drag_event_x; - y = day_view->drag_event_y; - pos = e_day_view_convert_position_in_top_canvas (day_view, x, y, - &day, NULL); - /* This shouldn't really happen in a drag. */ - if (pos == E_DAY_VIEW_POS_OUTSIDE) - return; - - if (day_view->drag_event_day == E_DAY_VIEW_LONG_EVENT) - day -= day_view->drag_event_offset; - day = MAX (day, 0); - - e_day_view_update_top_canvas_drag (day_view, day); -} - - -static void -e_day_view_update_top_canvas_drag (EDayView *day_view, - gint day) -{ - EDayViewEvent *event = NULL; - gint row, num_days, start_day, end_day; - gdouble item_x, item_y, item_w, item_h; - GdkFont *font; - gchar *text; - - - /* Calculate the event's position. If the event is in the same - position we started in, we use the same columns. */ - row = day_view->rows_in_top_display + 1; - num_days = 1; - - if (day_view->drag_event_day == E_DAY_VIEW_LONG_EVENT) { - event = &g_array_index (day_view->long_events, EDayViewEvent, - day_view->drag_event_num); - row = event->start_row_or_col + 1; - - if (!e_day_view_find_long_event_days (day_view, event, - &start_day, &end_day)) - return; - - num_days = end_day - start_day + 1; - - /* Make sure we don't go off the screen. */ - day = MIN (day, day_view->days_shown - num_days); - - } else if (day_view->drag_event_day != -1) { - event = &g_array_index (day_view->events[day_view->drag_event_day], - EDayViewEvent, - day_view->drag_event_num); - } - - /* If the position hasn't changed, just return. */ - if (day_view->drag_last_day == day - && (day_view->drag_long_event_item->object.flags - & GNOME_CANVAS_ITEM_VISIBLE)) - return; - - day_view->drag_last_day = day; - - - item_x = day_view->day_offsets[day] + E_DAY_VIEW_BAR_WIDTH; - item_w = day_view->day_offsets[day + num_days] - item_x - - E_DAY_VIEW_GAP_WIDTH; - item_y = row * day_view->top_row_height; - item_h = day_view->top_row_height - E_DAY_VIEW_TOP_CANVAS_Y_GAP; - - - /* Set the positions of the event & associated items. */ - gnome_canvas_item_set (day_view->drag_long_event_rect_item, - "x1", item_x, - "y1", item_y, - "x2", item_x + item_w - 1, - "y2", item_y + item_h - 1, - NULL); - - font = GTK_WIDGET (day_view)->style->font; - gnome_canvas_item_set (day_view->drag_long_event_item, - "font_gdk", font, - "x", item_x + E_DAY_VIEW_LONG_EVENT_BORDER_WIDTH + E_DAY_VIEW_LONG_EVENT_X_PAD, - "y", item_y + E_DAY_VIEW_LONG_EVENT_BORDER_HEIGHT + E_DAY_VIEW_LONG_EVENT_Y_PAD, - "clip_width", item_w - (E_DAY_VIEW_LONG_EVENT_BORDER_WIDTH + E_DAY_VIEW_LONG_EVENT_X_PAD) * 2, - "clip_height", item_h - (E_DAY_VIEW_LONG_EVENT_BORDER_HEIGHT + E_DAY_VIEW_LONG_EVENT_Y_PAD) * 2, - NULL); - - if (!(day_view->drag_long_event_rect_item->object.flags & GNOME_CANVAS_ITEM_VISIBLE)) { - gnome_canvas_item_raise_to_top (day_view->drag_long_event_rect_item); - gnome_canvas_item_show (day_view->drag_long_event_rect_item); - } - - /* Set the text, if necessary. We don't want to set the text every - time it moves, so we check if it is currently invisible and only - set the text then. */ - if (!(day_view->drag_long_event_item->object.flags - & GNOME_CANVAS_ITEM_VISIBLE)) { - if (event) - text = event->ico->summary; - else - text = NULL; - - gnome_canvas_item_set (day_view->drag_long_event_item, - "text", text ? text : "", - NULL); - gnome_canvas_item_raise_to_top (day_view->drag_long_event_item); - gnome_canvas_item_show (day_view->drag_long_event_item); - } -} - - -static gint -e_day_view_on_main_canvas_drag_motion (GtkWidget *widget, - GdkDragContext *context, - gint x, - gint y, - guint time, - EDayView *day_view) -{ - gint scroll_x, scroll_y; - - gnome_canvas_get_scroll_offsets (GNOME_CANVAS (widget), - &scroll_x, &scroll_y); - day_view->drag_event_x = x + scroll_x; - day_view->drag_event_y = y + scroll_y; - - e_day_view_reshape_main_canvas_drag_item (day_view); - e_day_view_reshape_main_canvas_resize_bars (day_view); - - e_day_view_check_auto_scroll (day_view, x, y); - - return TRUE; -} - - -static void -e_day_view_reshape_main_canvas_drag_item (EDayView *day_view) -{ - EDayViewPosition pos; - gint x, y, day, row; - - /* Calculate the day & start row of the event being dragged, using - the current mouse position. */ - x = day_view->drag_event_x; - y = day_view->drag_event_y; - pos = e_day_view_convert_position_in_main_canvas (day_view, x, y, - &day, &row, NULL); - /* This shouldn't really happen in a drag. */ - if (pos == E_DAY_VIEW_POS_OUTSIDE) - return; - - if (day_view->drag_event_day != -1 - && day_view->drag_event_day != E_DAY_VIEW_LONG_EVENT) - row -= day_view->drag_event_offset; - row = MAX (row, 0); - - e_day_view_update_main_canvas_drag (day_view, row, day); -} - - -static void -e_day_view_update_main_canvas_drag (EDayView *day_view, - gint row, - gint day) -{ - EDayViewEvent *event = NULL; - gint cols_in_row, start_col, num_columns, num_rows, start_row, end_row; - gdouble item_x, item_y, item_w, item_h; - GdkFont *font; - gchar *text; - - /* If the position hasn't changed, just return. */ - if (day_view->drag_last_day == day - && day_view->drag_last_row == row - && (day_view->drag_item->object.flags & GNOME_CANVAS_ITEM_VISIBLE)) - return; - - day_view->drag_last_day = day; - day_view->drag_last_row = row; - - /* Calculate the event's position. If the event is in the same - position we started in, we use the same columns. */ - cols_in_row = 1; - start_col = 0; - num_columns = 1; - num_rows = 1; - - if (day_view->drag_event_day == E_DAY_VIEW_LONG_EVENT) { - event = &g_array_index (day_view->long_events, EDayViewEvent, - day_view->drag_event_num); - } else if (day_view->drag_event_day != -1) { - event = &g_array_index (day_view->events[day_view->drag_event_day], - EDayViewEvent, - day_view->drag_event_num); - start_row = event->start_minute / day_view->mins_per_row; - end_row = (event->end_minute - 1) / day_view->mins_per_row; - num_rows = end_row - start_row + 1; - } - - if (day_view->drag_event_day == day && start_row == row) { - cols_in_row = day_view->cols_per_row[day][row]; - start_col = event->start_row_or_col; - num_columns = event->num_columns; - } - - item_x = day_view->day_offsets[day] - + day_view->day_widths[day] * start_col / cols_in_row; - item_w = day_view->day_widths[day] * num_columns / cols_in_row - - E_DAY_VIEW_GAP_WIDTH; - item_y = row * day_view->row_height; - item_h = num_rows * day_view->row_height; - - /* Set the positions of the event & associated items. */ - gnome_canvas_item_set (day_view->drag_rect_item, - "x1", item_x + E_DAY_VIEW_BAR_WIDTH - 1, - "y1", item_y, - "x2", item_x + item_w - 1, - "y2", item_y + item_h - 1, - NULL); - - gnome_canvas_item_set (day_view->drag_bar_item, - "x1", item_x, - "y1", item_y, - "x2", item_x + E_DAY_VIEW_BAR_WIDTH - 1, - "y2", item_y + item_h - 1, - NULL); - - font = GTK_WIDGET (day_view)->style->font; - gnome_canvas_item_set (day_view->drag_item, - "font_gdk", font, - "x", item_x + E_DAY_VIEW_BAR_WIDTH + E_DAY_VIEW_EVENT_X_PAD, - "y", item_y + E_DAY_VIEW_EVENT_BORDER_HEIGHT + E_DAY_VIEW_EVENT_Y_PAD, - "clip_width", item_w - E_DAY_VIEW_BAR_WIDTH - E_DAY_VIEW_EVENT_X_PAD * 2, - "clip_height", item_h - (E_DAY_VIEW_EVENT_BORDER_HEIGHT + E_DAY_VIEW_EVENT_Y_PAD) * 2, - NULL); - - if (!(day_view->drag_bar_item->object.flags & GNOME_CANVAS_ITEM_VISIBLE)) { - gnome_canvas_item_raise_to_top (day_view->drag_bar_item); - gnome_canvas_item_show (day_view->drag_bar_item); - } - - if (!(day_view->drag_rect_item->object.flags & GNOME_CANVAS_ITEM_VISIBLE)) { - gnome_canvas_item_raise_to_top (day_view->drag_rect_item); - gnome_canvas_item_show (day_view->drag_rect_item); - } - - /* Set the text, if necessary. We don't want to set the text every - time it moves, so we check if it is currently invisible and only - set the text then. */ - if (!(day_view->drag_item->object.flags & GNOME_CANVAS_ITEM_VISIBLE)) { - if (event) - text = event->ico->summary; - else - text = NULL; - - gnome_canvas_item_set (day_view->drag_item, - "text", text ? text : "", - NULL); - gnome_canvas_item_raise_to_top (day_view->drag_item); - gnome_canvas_item_show (day_view->drag_item); - } -} - - -static void -e_day_view_on_top_canvas_drag_leave (GtkWidget *widget, - GdkDragContext *context, - guint time, - EDayView *day_view) -{ - day_view->drag_last_day = -1; - - gnome_canvas_item_hide (day_view->drag_long_event_rect_item); - gnome_canvas_item_hide (day_view->drag_long_event_item); -} - - -static void -e_day_view_on_main_canvas_drag_leave (GtkWidget *widget, - GdkDragContext *context, - guint time, - EDayView *day_view) -{ - day_view->drag_last_day = -1; - - e_day_view_stop_auto_scroll (day_view); - - gnome_canvas_item_hide (day_view->drag_rect_item); - gnome_canvas_item_hide (day_view->drag_bar_item); - gnome_canvas_item_hide (day_view->drag_item); - - /* Hide the resize bars if they are being used in the drag. */ - if (day_view->drag_event_day == day_view->resize_bars_event_day - && day_view->drag_event_num == day_view->resize_bars_event_num) { - gnome_canvas_item_hide (day_view->main_canvas_top_resize_bar_item); - gnome_canvas_item_hide (day_view->main_canvas_bottom_resize_bar_item); - } -} - - -static void -e_day_view_on_drag_begin (GtkWidget *widget, - GdkDragContext *context, - EDayView *day_view) -{ - EDayViewEvent *event; - gint day, event_num; - - day = day_view->drag_event_day; - event_num = day_view->drag_event_num; - - /* These should both be set. */ - g_return_if_fail (day != -1); - g_return_if_fail (event_num != -1); - - if (day == E_DAY_VIEW_LONG_EVENT) - event = &g_array_index (day_view->long_events, EDayViewEvent, - event_num); - else - event = &g_array_index (day_view->events[day], EDayViewEvent, - event_num); - - /* Hide the text item, since it will be shown in the special drag - items. */ - gnome_canvas_item_hide (event->canvas_item); -} - - -static void -e_day_view_on_drag_end (GtkWidget *widget, - GdkDragContext *context, - EDayView *day_view) -{ - EDayViewEvent *event; - gint day, event_num; - - day = day_view->drag_event_day; - event_num = day_view->drag_event_num; - - /* If the calendar has already been updated in drag_data_received() - we just return. */ - if (day == -1 || event_num == -1) - return; - - if (day == E_DAY_VIEW_LONG_EVENT) { - event = &g_array_index (day_view->long_events, EDayViewEvent, - event_num); - gtk_widget_queue_draw (day_view->top_canvas); - } else { - event = &g_array_index (day_view->events[day], EDayViewEvent, - event_num); - gtk_widget_queue_draw (day_view->main_canvas); - } - - /* Show the text item again. */ - gnome_canvas_item_show (event->canvas_item); - - day_view->drag_event_day = -1; - day_view->drag_event_num = -1; -} - - -static void -e_day_view_on_drag_data_get (GtkWidget *widget, - GdkDragContext *context, - GtkSelectionData *selection_data, - guint info, - guint time, - EDayView *day_view) -{ - EDayViewEvent *event; - gint day, event_num; - gchar *event_uid; - - day = day_view->drag_event_day; - event_num = day_view->drag_event_num; - - /* These should both be set. */ - g_return_if_fail (day != -1); - g_return_if_fail (event_num != -1); - - if (day == E_DAY_VIEW_LONG_EVENT) - event = &g_array_index (day_view->long_events, - EDayViewEvent, event_num); - else - event = &g_array_index (day_view->events[day], - EDayViewEvent, event_num); - - event_uid = event->ico->uid; - g_return_if_fail (event_uid != NULL); - - if (info == TARGET_CALENDAR_EVENT) { - gtk_selection_data_set (selection_data, selection_data->target, - 8, event_uid, strlen (event_uid)); - } -} - - -static void -e_day_view_on_top_canvas_drag_data_received (GtkWidget *widget, - GdkDragContext *context, - gint x, - gint y, - GtkSelectionData *data, - guint info, - guint time, - EDayView *day_view) -{ - EDayViewEvent *event; - EDayViewPosition pos; - gint day, start_day, end_day, num_days; - gchar *event_uid; - iCalObject ico; - - if ((data->length >= 0) && (data->format == 8)) { - pos = e_day_view_convert_position_in_top_canvas (day_view, - x, y, &day, - NULL); - if (pos != E_DAY_VIEW_POS_OUTSIDE) { - num_days = 1; - if (day_view->drag_event_day == E_DAY_VIEW_LONG_EVENT) { - event = &g_array_index (day_view->long_events, EDayViewEvent, - day_view->drag_event_num); - day -= day_view->drag_event_offset; - day = MAX (day, 0); - - e_day_view_find_long_event_days (day_view, - event, - &start_day, - &end_day); - num_days = end_day - start_day + 1; - /* Make sure we don't go off the screen. */ - day = MIN (day, day_view->days_shown - num_days); - } else if (day_view->drag_event_day != -1) { - event = &g_array_index (day_view->events[day_view->drag_event_day], - EDayViewEvent, - day_view->drag_event_num); - } - - event_uid = data->data; - - if (!event_uid || !event->ico->uid - || strcmp (event_uid, event->ico->uid)) - g_warning ("Unexpected event UID"); - - /* We use a temporary shallow copy of the ico since we - don't want to change the original ico here. - Otherwise we would not detect that the event's time - had changed in the "update_event" callback. */ - ico = *event->ico; - - ico.dtstart = day_view->day_starts[day]; - ico.dtend = day_view->day_starts[day + num_days]; - - gtk_drag_finish (context, TRUE, TRUE, time); - - /* Reset this since it will be invalid. */ - day_view->drag_event_day = -1; - - /* Show the text item again, just in case it hasn't - moved. If we don't do this it may not appear. */ - if (event->canvas_item) - gnome_canvas_item_show (event->canvas_item); - - /* Notify calendar of change */ - gnome_calendar_object_changed (day_view->calendar, - &ico, CHANGE_DATES); - - return; - } - } - - gtk_drag_finish (context, FALSE, FALSE, time); -} - - -static void -e_day_view_on_main_canvas_drag_data_received (GtkWidget *widget, - GdkDragContext *context, - gint x, - gint y, - GtkSelectionData *data, - guint info, - guint time, - EDayView *day_view) -{ - EDayViewEvent *event; - EDayViewPosition pos; - gint day, row, start_row, end_row, num_rows, scroll_x, scroll_y; - gchar *event_uid; - iCalObject ico; - - gnome_canvas_get_scroll_offsets (GNOME_CANVAS (widget), - &scroll_x, &scroll_y); - x += scroll_x; - y += scroll_y; - - if ((data->length >= 0) && (data->format == 8)) { - pos = e_day_view_convert_position_in_main_canvas (day_view, - x, y, &day, - &row, NULL); - if (pos != E_DAY_VIEW_POS_OUTSIDE) { - num_rows = 1; - if (day_view->drag_event_day == E_DAY_VIEW_LONG_EVENT) { - event = &g_array_index (day_view->long_events, EDayViewEvent, - day_view->drag_event_num); - } else if (day_view->drag_event_day != -1) { - event = &g_array_index (day_view->events[day_view->drag_event_day], - EDayViewEvent, - day_view->drag_event_num); - row -= day_view->drag_event_offset; - - /* Calculate time offset from start row. */ - start_row = event->start_minute / day_view->mins_per_row; - end_row = (event->end_minute - 1) / day_view->mins_per_row; - num_rows = end_row - start_row + 1; - } - - event_uid = data->data; - - if (!event_uid || !event->ico->uid - || strcmp (event_uid, event->ico->uid)) - g_warning ("Unexpected event UID"); - - /* We use a temporary shallow copy of the ico since we - don't want to change the original ico here. - Otherwise we would not detect that the event's time - had changed in the "update_event" callback. */ - ico = *event->ico; - - ico.dtstart = e_day_view_convert_grid_position_to_time (day_view, day, row); - ico.dtend = e_day_view_convert_grid_position_to_time (day_view, day, row + num_rows); - - gtk_drag_finish (context, TRUE, TRUE, time); - - /* Reset this since it will be invalid. */ - day_view->drag_event_day = -1; - - /* Show the text item again, just in case it hasn't - moved. If we don't do this it may not appear. */ - if (event->canvas_item) - gnome_canvas_item_show (event->canvas_item); - - /* Notify calendar of change */ - gnome_calendar_object_changed (day_view->calendar, - &ico, CHANGE_DATES); - - return; - } - } - - gtk_drag_finish (context, FALSE, FALSE, time); -} - diff --git a/calendar/gui/e-day-view.h b/calendar/gui/e-day-view.h deleted file mode 100644 index 17bbff6be5..0000000000 --- a/calendar/gui/e-day-view.h +++ /dev/null @@ -1,502 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -/* - * Author : - * Damon Chaplin - * - * Copyright 1999, Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ -#ifndef _E_DAY_VIEW_H_ -#define _E_DAY_VIEW_H_ - -#include -#include -#include - -#include "gnome-cal.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* - * EDayView - displays the Day & Work-Week views of the calendar. - */ - -/* The maximum number of days shown. We use 7 since we only show 1 week max. */ -#define E_DAY_VIEW_MAX_DAYS 7 - -/* This is used as a special code to signify a long event instead of the day - of a normal event. */ -#define E_DAY_VIEW_LONG_EVENT E_DAY_VIEW_MAX_DAYS - -/* The maximum number of columns of appointments within a day. */ -#define E_DAY_VIEW_MAX_COLUMNS 6 - -/* The width of the gap between appointments. This should be at least - E_DAY_VIEW_BAR_WIDTH, since in the top canvas we use this space to draw - the triangle to represent continuing events. */ -#define E_DAY_VIEW_GAP_WIDTH 8 - -/* The width of the bars down the left of each column and appointment. - This includes the borders on each side of it. */ -#define E_DAY_VIEW_BAR_WIDTH 8 - -/* The height of the horizontal bar above & beneath the selected event. - This includes the borders on the top and bottom. */ -#define E_DAY_VIEW_BAR_HEIGHT 6 - -/* The size of the reminder & recurrence icons, and padding around them. */ -#define E_DAY_VIEW_ICON_WIDTH 16 -#define E_DAY_VIEW_ICON_HEIGHT 16 -#define E_DAY_VIEW_ICON_X_PAD 0 -#define E_DAY_VIEW_ICON_Y_PAD 0 - -/* The size of the border around the event. */ -#define E_DAY_VIEW_EVENT_BORDER_WIDTH 1 -#define E_DAY_VIEW_EVENT_BORDER_HEIGHT 1 - -/* The padding on each side of the event text. */ -#define E_DAY_VIEW_EVENT_X_PAD 2 -#define E_DAY_VIEW_EVENT_Y_PAD 1 - -/* The padding on each side of the event text for events in the top canvas. */ -#define E_DAY_VIEW_LONG_EVENT_X_PAD 2 -#define E_DAY_VIEW_LONG_EVENT_Y_PAD 2 - -/* The size of the border around the long events in the top canvas. */ -#define E_DAY_VIEW_LONG_EVENT_BORDER_WIDTH 1 -#define E_DAY_VIEW_LONG_EVENT_BORDER_HEIGHT 1 - -/* The space between the time and the icon/text in the top canvas. */ -#define E_DAY_VIEW_LONG_EVENT_TIME_X_PAD 2 - -/* The gap between rows in the top canvas. */ -#define E_DAY_VIEW_TOP_CANVAS_Y_GAP 2 - - -/* These are used to specify the type of an appointment. They match those - used in EMeetingTimeSelector. */ -typedef enum -{ - E_DAY_VIEW_BUSY_TENTATIVE = 0, - E_DAY_VIEW_BUSY_OUT_OF_OFFICE = 1, - E_DAY_VIEW_BUSY_BUSY = 2, - - E_DAY_VIEW_BUSY_LAST = 3 -} EDayViewBusyType; - -/* This is used to specify the format used when displaying the dates. - The full format is like 'September 12'. The abbreviated format is like - 'Sep 12'. The short format is like '12'. The actual format used is - determined in style_set(), once we know the font being used. */ -typedef enum -{ - E_DAY_VIEW_DATE_FULL, - E_DAY_VIEW_DATE_ABBREVIATED, - E_DAY_VIEW_DATE_SHORT -} EDayViewDateFormat; - -/* These index our colors array. */ -typedef enum -{ - E_DAY_VIEW_COLOR_BG_WORKING, - E_DAY_VIEW_COLOR_BG_NOT_WORKING, - E_DAY_VIEW_COLOR_EVENT_VBAR, - - E_DAY_VIEW_COLOR_EVENT_BACKGROUND, - E_DAY_VIEW_COLOR_EVENT_BORDER, - - E_DAY_VIEW_COLOR_LAST -} EDayViewColors; - -/* These specify which part of the selection we are dragging, if any. */ -typedef enum -{ - E_DAY_VIEW_DRAG_NONE, - E_DAY_VIEW_DRAG_START, - E_DAY_VIEW_DRAG_END -} EDayViewDragPosition; - -/* Specifies the position of the mouse. */ -typedef enum -{ - E_DAY_VIEW_POS_OUTSIDE, - E_DAY_VIEW_POS_NONE, - E_DAY_VIEW_POS_EVENT, - E_DAY_VIEW_POS_LEFT_EDGE, - E_DAY_VIEW_POS_RIGHT_EDGE, - E_DAY_VIEW_POS_TOP_EDGE, - E_DAY_VIEW_POS_BOTTOM_EDGE -} EDayViewPosition; - -typedef struct _EDayViewEvent EDayViewEvent; -struct _EDayViewEvent { - iCalObject *ico; - time_t start; - time_t end; - guint8 start_row_or_col;/* The start column for normal events, or the - start row for long events. */ - guint8 num_columns; /* 0 indicates not displayed. For long events - this is just 1 if the event is shown. */ - guint16 start_minute; /* Offsets from the start of the display. */ - guint16 end_minute; - GnomeCanvasItem *canvas_item; -}; - - -#define E_DAY_VIEW(obj) GTK_CHECK_CAST (obj, e_day_view_get_type (), EDayView) -#define E_DAY_VIEW_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, e_day_view_get_type (), EDayViewClass) -#define E_IS_DAY_VIEW(obj) GTK_CHECK_TYPE (obj, e_day_view_get_type ()) - - -typedef struct _EDayView EDayView; -typedef struct _EDayViewClass EDayViewClass; - -struct _EDayView -{ - GtkTable table; - - /* The top canvas where the dates and long appointments are shown. */ - GtkWidget *top_canvas; - GnomeCanvasItem *top_canvas_item; - - /* The main canvas where the rest of the appointments are shown. */ - GtkWidget *main_canvas; - GnomeCanvasItem *main_canvas_item; - - /* The canvas displaying the times of the day. */ - GtkWidget *time_canvas; - GnomeCanvasItem *time_canvas_item; - - GtkWidget *vscrollbar; - - /* The calendar we are associated with. */ - GnomeCalendar *calendar; - - /* The start and end of the day shown. */ - time_t lower; - time_t upper; - - /* The number of days we are showing. Usually 1 or 5. Maybe 6 or 7. */ - gint days_shown; - - /* The start of each day & an extra element to hold the last time. */ - time_t day_starts[E_DAY_VIEW_MAX_DAYS + 1]; - - - /* An array of EDayViewEvent elements for the top view and each day. */ - GArray *long_events; - GArray *events[E_DAY_VIEW_MAX_DAYS]; - - /* These are set to FALSE whenever an event in the corresponding array - is changed. Any function that needs the events sorted calls - e_day_view_ensure_events_sorted(). */ - gboolean long_events_sorted; - gboolean events_sorted[E_DAY_VIEW_MAX_DAYS]; - - /* This is TRUE if we need to relayout the events before drawing. */ - gboolean long_events_need_layout; - gboolean need_layout[E_DAY_VIEW_MAX_DAYS]; - - /* This is TRUE if we need to reshape the canvas items, but a full - layout is not necessary. */ - gboolean long_events_need_reshape; - gboolean need_reshape[E_DAY_VIEW_MAX_DAYS]; - - /* The number of minutes per row. 5, 10, 15, 30 or 60. */ - gint mins_per_row; - - /* The number of rows needed, depending on the times shown and the - minutes per row. */ - gint rows; - - /* The height of each row. */ - gint row_height; - - /* The number of rows in the top display. */ - gint rows_in_top_display; - - /* The height of each row in the top canvas. */ - gint top_row_height; - - /* The first and last times shown in the display. The last time isn't - included in the range. Default is 0:00-24:00 */ - gint first_hour_shown; - gint first_minute_shown; - gint last_hour_shown; - gint last_minute_shown; - - /* The start and end of the work day, rounded to the nearest row. */ - gint work_day_start_hour; - gint work_day_start_minute; - gint work_day_end_hour; - gint work_day_end_minute; - - /* This is set to TRUE when the widget is created, so it scrolls to - the start of the working day when first shown. */ - gboolean scroll_to_work_day; - - /* This is the width & offset of each of the day columns in the - display. */ - gint day_widths[E_DAY_VIEW_MAX_DAYS]; - gint day_offsets[E_DAY_VIEW_MAX_DAYS + 1]; - - /* An array holding the number of columns in each row, in each day. */ - guint8 cols_per_row[E_DAY_VIEW_MAX_DAYS][12 * 24]; - - /* Sizes of the various time strings. */ - gint large_hour_widths[24]; - gint small_hour_widths[24]; - gint minute_widths[12]; /* intervals of 5 minutes. */ - gint max_small_hour_width; - gint max_large_hour_width; - gint max_minute_width; - gint colon_width; - - /* This specifies how we are displaying the dates at the top. */ - EDayViewDateFormat date_format; - - /* These are the maximum widths of the different types of dates. */ - gint long_format_width; - gint abbreviated_format_width; - - /* The large font use to display the hours. I don't think we need a - fontset since we only display numbers. */ - GdkFont *large_font; - - /* The GC used for painting in different colors. */ - GdkGC *main_gc; - - /* The icons. */ - GdkPixmap *reminder_icon; - GdkBitmap *reminder_mask; - GdkPixmap *recurrence_icon; - GdkBitmap *recurrence_mask; - - /* Colors for drawing. */ - GdkColor colors[E_DAY_VIEW_COLOR_LAST]; - - /* The normal & resizing cursors. */ - GdkCursor *normal_cursor; - GdkCursor *move_cursor; - GdkCursor *resize_width_cursor; - GdkCursor *resize_height_cursor; - - /* This remembers the last cursor set on the window. */ - GdkCursor *last_cursor_set_in_top_canvas; - GdkCursor *last_cursor_set_in_main_canvas; - - /* - * Editing, Selection & Dragging data - */ - - /* The horizontal bars to resize events in the main canvas. */ - GnomeCanvasItem *main_canvas_top_resize_bar_item; - GnomeCanvasItem *main_canvas_bottom_resize_bar_item; - - /* The event currently being edited. The day is -1 if no event is - being edited, or E_DAY_VIEW_LONG_EVENT if a long event is edited. */ - gint editing_event_day; - gint editing_event_num; - - /* This is TRUE if we are editing an event which we have just created. - We ignore the "update_event" callback which we will get from the - server when the event is added. */ - gboolean editing_new_event; - - /* This is a GnomeCanvasRect which is placed around an item while it - is being resized, so we can raise it above all other EText items. */ - GnomeCanvasItem *resize_long_event_rect_item; - GnomeCanvasItem *resize_rect_item; - GnomeCanvasItem *resize_bar_item; - - /* The event for which a popup menu is being displayed, as above. */ - gint popup_event_day; - gint popup_event_num; - - /* The currently selected region. If selection_start_day is -1 there is - no current selection. If start_row or end_row is -1 then the - selection is in the top canvas. */ - gint selection_start_day; - gint selection_end_day; - gint selection_start_row; - gint selection_end_row; - - /* This specifies which end of the selection is being dragged, or is - E_DAY_VIEW_DRAG_NONE if the selection isn't being dragged. */ - EDayViewDragPosition selection_drag_pos; - - /* This is TRUE if the selection is in the top canvas only (i.e. if the - last motion event was in the top canvas). */ - gboolean selection_in_top_canvas; - - /* The last mouse position, relative to the main canvas window. - Used when auto-scrolling to update the selection. */ - gint last_mouse_x; - gint last_mouse_y; - - /* Auto-scroll info for when selecting an area or dragging an item. */ - gint auto_scroll_timeout_id; - gint auto_scroll_delay; - gboolean auto_scroll_up; - - /* These are used for the resize bars. */ - gint resize_bars_event_day; - gint resize_bars_event_num; - - /* These are used when resizing events. */ - gint resize_event_day; - gint resize_event_num; - EDayViewPosition resize_drag_pos; - gint resize_start_row; - gint resize_end_row; - - /* This is the event the mouse button was pressed on. If the button - is released we start editing it, but if the mouse is dragged we set - this to -1. */ - gint pressed_event_day; - gint pressed_event_num; - - /* These are used when dragging events. If drag_event_day is not -1 we - know that we are dragging one of the EDayView events around. */ - gint drag_event_day; - gint drag_event_num; - - /* The last mouse position when dragging, in the entire canvas. */ - gint drag_event_x; - gint drag_event_y; - - /* The offset of the mouse from the top of the event, in rows. - In the top canvas this is the offset from the left, in days. */ - gint drag_event_offset; - - /* The last day & row dragged to, so we know when we need to update - the dragged event's position. */ - gint drag_last_day; - gint drag_last_row; - - /* This is a GnomeCanvasRect which is placed around an item while it - is being resized, so we can raise it above all other EText items. */ - GnomeCanvasItem *drag_long_event_rect_item; - GnomeCanvasItem *drag_long_event_item; - GnomeCanvasItem *drag_rect_item; - GnomeCanvasItem *drag_bar_item; - GnomeCanvasItem *drag_item; -}; - -struct _EDayViewClass -{ - GtkTableClass parent_class; -}; - - -GtkType e_day_view_get_type (void); -GtkWidget* e_day_view_new (void); - -void e_day_view_set_calendar (EDayView *day_view, - GnomeCalendar *calendar); - -/* This sets the selected time range. The EDayView will show the day or week - corresponding to the start time. If the start_time & end_time are not equal - and are both visible in the view, then the selection is set to those times, - otherwise it is set to 1 hour from the start of the working day. */ -void e_day_view_set_selected_time_range (EDayView *day_view, - time_t start_time, - time_t end_time); - -/* Returns the selected time range. */ -void e_day_view_get_selected_time_range (EDayView *day_view, - time_t *start_time, - time_t *end_time); - -/* This reloads all calendar events. */ -void e_day_view_update_all_events (EDayView *day_view); - -/* This is called when one event has been added or updated. */ -void e_day_view_update_event (EDayView *day_view, - const gchar *uid); - -/* This removes all the events associated with the given uid. Note that for - recurring events there may be more than one. If any events are found and - removed we need to layout the events again. */ -void e_day_view_remove_event (EDayView *day_view, - const gchar *uid); - -/* The number of days shown in the EDayView, from 1 to 7. This is normally - either 1 or 5 (for the Work-Week view). */ -gint e_day_view_get_days_shown (EDayView *day_view); -void e_day_view_set_days_shown (EDayView *day_view, - gint days_shown); - -/* This specifies how many minutes are represented by one row in the display. - It can be 60, 30, 15, 10 or 5. The default is 30. */ -gint e_day_view_get_mins_per_row (EDayView *day_view); -void e_day_view_set_mins_per_row (EDayView *day_view, - gint mins_per_row); - - - -/* - * Internal functions called by the associated canvas items. - */ -void e_day_view_check_layout (EDayView *day_view); -gint e_day_view_convert_time_to_row (EDayView *day_view, - gint hour, - gint minute); -gint e_day_view_convert_time_to_position (EDayView *day_view, - gint hour, - gint minute); -gboolean e_day_view_get_event_position (EDayView *day_view, - gint day, - gint event_num, - gint *item_x, - gint *item_y, - gint *item_w, - gint *item_h); -gboolean e_day_view_get_long_event_position (EDayView *day_view, - gint event_num, - gint *start_day, - gint *end_day, - gint *item_x, - gint *item_y, - gint *item_w, - gint *item_h); -gboolean e_day_view_find_long_event_days (EDayView *day_view, - EDayViewEvent *event, - gint *start_day, - gint *end_day); - -void e_day_view_start_selection (EDayView *day_view, - gint day, - gint row); -void e_day_view_update_selection (EDayView *day_view, - gint day, - gint row); -void e_day_view_finish_selection (EDayView *day_view); - -void e_day_view_check_auto_scroll (EDayView *day_view, - gint event_x, - gint event_y); -void e_day_view_stop_auto_scroll (EDayView *day_view); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* _E_DAY_VIEW_H_ */ diff --git a/calendar/gui/e-week-view-event-item.c b/calendar/gui/e-week-view-event-item.c deleted file mode 100644 index c50acabadf..0000000000 --- a/calendar/gui/e-week-view-event-item.c +++ /dev/null @@ -1,748 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -/* - * Author : - * Damon Chaplin - * - * Copyright 1999, Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ - -/* - * EWeekViewEventItem - displays the background, times and icons for an event - * in the week/month views. A separate EText canvas item is used to display & - * edit the text. - */ - -#include -#include "../widgets/e-text/e-text.h" -#include "e-week-view-event-item.h" - -static void e_week_view_event_item_class_init (EWeekViewEventItemClass *class); -static void e_week_view_event_item_init (EWeekViewEventItem *wveitem); - -static void e_week_view_event_item_set_arg (GtkObject *o, - GtkArg *arg, - guint arg_id); -static void e_week_view_event_item_update (GnomeCanvasItem *item, - double *affine, - ArtSVP *clip_path, - int flags); -static void e_week_view_event_item_draw (GnomeCanvasItem *item, - GdkDrawable *drawable, - int x, - int y, - int width, - int height); -static void e_week_view_event_item_draw_icons (EWeekViewEventItem *wveitem, - GdkDrawable *drawable, - gint icon_x, - gint icon_y, - gint x2, - gboolean right_align); -static void e_week_view_event_item_draw_triangle (EWeekViewEventItem *wveitem, - GdkDrawable *drawable, - gint x, - gint y, - gint w, - gint h); -static double e_week_view_event_item_point (GnomeCanvasItem *item, - double x, - double y, - int cx, - int cy, - GnomeCanvasItem **actual_item); -static gint e_week_view_event_item_event (GnomeCanvasItem *item, - GdkEvent *event); -static gboolean e_week_view_event_item_button_press (EWeekViewEventItem *wveitem, - GdkEvent *event); -static gboolean e_week_view_event_item_button_release (EWeekViewEventItem *wveitem, - GdkEvent *event); -static EWeekViewPosition e_week_view_event_item_get_position (EWeekViewEventItem *wveitem, - gdouble x, - gdouble y); - - -static GnomeCanvasItemClass *parent_class; - -/* The arguments we take */ -enum { - ARG_0, - ARG_EVENT_NUM, - ARG_SPAN_NUM -}; - - -GtkType -e_week_view_event_item_get_type (void) -{ - static GtkType e_week_view_event_item_type = 0; - - if (!e_week_view_event_item_type) { - GtkTypeInfo e_week_view_event_item_info = { - "EWeekViewEventItem", - sizeof (EWeekViewEventItem), - sizeof (EWeekViewEventItemClass), - (GtkClassInitFunc) e_week_view_event_item_class_init, - (GtkObjectInitFunc) e_week_view_event_item_init, - NULL, /* reserved_1 */ - NULL, /* reserved_2 */ - (GtkClassInitFunc) NULL - }; - - e_week_view_event_item_type = gtk_type_unique (gnome_canvas_item_get_type (), &e_week_view_event_item_info); - } - - return e_week_view_event_item_type; -} - - -static void -e_week_view_event_item_class_init (EWeekViewEventItemClass *class) -{ - GtkObjectClass *object_class; - GnomeCanvasItemClass *item_class; - - parent_class = gtk_type_class (gnome_canvas_item_get_type()); - - object_class = (GtkObjectClass *) class; - item_class = (GnomeCanvasItemClass *) class; - - gtk_object_add_arg_type ("EWeekViewEventItem::event_num", - GTK_TYPE_INT, GTK_ARG_WRITABLE, - ARG_EVENT_NUM); - gtk_object_add_arg_type ("EWeekViewEventItem::span_num", - GTK_TYPE_INT, GTK_ARG_WRITABLE, - ARG_SPAN_NUM); - - object_class->set_arg = e_week_view_event_item_set_arg; - - /* GnomeCanvasItem method overrides */ - item_class->update = e_week_view_event_item_update; - item_class->draw = e_week_view_event_item_draw; - item_class->point = e_week_view_event_item_point; - item_class->event = e_week_view_event_item_event; -} - - -static void -e_week_view_event_item_init (EWeekViewEventItem *wveitem) -{ - wveitem->event_num = -1; - wveitem->span_num = -1; -} - - -static void -e_week_view_event_item_set_arg (GtkObject *o, GtkArg *arg, guint arg_id) -{ - GnomeCanvasItem *item; - EWeekViewEventItem *wveitem; - gboolean needs_update = FALSE; - - item = GNOME_CANVAS_ITEM (o); - wveitem = E_WEEK_VIEW_EVENT_ITEM (o); - - switch (arg_id){ - case ARG_EVENT_NUM: - wveitem->event_num = GTK_VALUE_INT (*arg); - needs_update = TRUE; - break; - case ARG_SPAN_NUM: - wveitem->span_num = GTK_VALUE_INT (*arg); - needs_update = TRUE; - break; - } - - if (needs_update) - gnome_canvas_item_request_update (item); -} - - -static void -e_week_view_event_item_update (GnomeCanvasItem *item, - double *affine, - ArtSVP *clip_path, - int flags) -{ - EWeekViewEventItem *wveitem; - EWeekView *week_view; - gint span_x, span_y, span_w; - -#if 0 - g_print ("In e_week_view_event_item_update\n"); -#endif - - wveitem = E_WEEK_VIEW_EVENT_ITEM (item); - week_view = E_WEEK_VIEW (GTK_WIDGET (item->canvas)->parent); - g_return_if_fail (E_IS_WEEK_VIEW (week_view)); - - if (GNOME_CANVAS_ITEM_CLASS (parent_class)->update) - (* GNOME_CANVAS_ITEM_CLASS (parent_class)->update) (item, affine, clip_path, flags); - - item->x1 = 0; - item->y1 = 0; - item->x2 = 0; - item->y2 = 0; - - if (wveitem->event_num != -1 && wveitem->span_num != -1) { - if (e_week_view_get_span_position (week_view, - wveitem->event_num, - wveitem->span_num, - &span_x, &span_y, - &span_w)) { -#if 0 - g_print (" Event:%i Span:%i %i,%i W:%i\n", - wveitem->event_num, wveitem->span_num, - span_x, span_y, span_w); -#endif - item->x1 = span_x; - item->y1 = span_y; - item->x2 = span_x + span_w - 1; - item->y2 = span_y + week_view->row_height - 1; - } - } -} - - -/* - * DRAWING ROUTINES - functions to paint the canvas item. - */ - -static void -e_week_view_event_item_draw (GnomeCanvasItem *canvas_item, - GdkDrawable *drawable, - int x, - int y, - int width, - int height) -{ - EWeekViewEventItem *wveitem; - EWeekView *week_view; - EWeekViewEvent *event; - EWeekViewEventSpan *span; - GtkStyle *style; - GdkGC *fg_gc, *gc; - GdkFont *font; - gint x1, y1, x2, y2, time_x, time_y, time_y_small_min; - gint icon_x, icon_y, time_width, min_end_time_x; - gint rect_x, rect_w, rect_x2; - gboolean one_day_event, editing_span = FALSE; - gint start_minute, end_minute; - gchar buffer[128]; - gboolean draw_start_triangle = FALSE, draw_end_triangle = FALSE; - GdkRectangle clip_rect; - -#if 0 - g_print ("In e_week_view_event_item_draw %i,%i %ix%i\n", - x, y, width, height); -#endif - - wveitem = E_WEEK_VIEW_EVENT_ITEM (canvas_item); - week_view = E_WEEK_VIEW (GTK_WIDGET (canvas_item->canvas)->parent); - g_return_if_fail (E_IS_WEEK_VIEW (week_view)); - - if (wveitem->event_num == -1 || wveitem->span_num == -1) - return; - - event = &g_array_index (week_view->events, EWeekViewEvent, - wveitem->event_num); - span = &g_array_index (week_view->spans, EWeekViewEventSpan, - event->spans_index + wveitem->span_num); - - style = GTK_WIDGET (week_view)->style; - font = style->font; - fg_gc = style->fg_gc[GTK_STATE_NORMAL]; - gc = week_view->main_gc; - - x1 = canvas_item->x1 - x; - y1 = canvas_item->y1 - y; - x2 = canvas_item->x2 - x; - y2 = canvas_item->y2 - y; - - if (x1 == x2 || y1 == y2) - return; - - icon_y = y1 + E_WEEK_VIEW_EVENT_BORDER_HEIGHT + E_WEEK_VIEW_ICON_Y_PAD; - start_minute = event->start_minute; - end_minute = event->end_minute; - time_y = y1 + E_WEEK_VIEW_EVENT_BORDER_HEIGHT - + E_WEEK_VIEW_EVENT_TEXT_Y_PAD + font->ascent; - if (week_view->small_font) - time_y_small_min = y1 + E_WEEK_VIEW_EVENT_BORDER_HEIGHT - + E_WEEK_VIEW_EVENT_TEXT_Y_PAD - + week_view->small_font->ascent; - if (week_view->use_small_font && week_view->small_font) - time_width = week_view->digit_width * 2 - + week_view->small_digit_width * 2; - else - time_width = week_view->digit_width * 4 - + week_view->colon_width; - - one_day_event = e_week_view_is_one_day_event (week_view, - wveitem->event_num); - if (one_day_event) { - time_x = x1 + E_WEEK_VIEW_EVENT_L_PAD; - - /* Convert the time into a string. We use different parts of - the string for the different time formats. Notice that the - string is always 11 characters long. */ - sprintf (buffer, "%02i:%02i %02i:%02i", - start_minute / 60, start_minute % 60, - end_minute / 60, end_minute % 60); - - /* Draw the start and end times, as required. */ - switch (week_view->time_format) { - case E_WEEK_VIEW_TIME_BOTH_SMALL_MIN: - gdk_draw_text (drawable, font, fg_gc, - time_x, time_y, buffer, 2); - gdk_draw_text (drawable, week_view->small_font, fg_gc, - time_x + week_view->digit_width * 2, - time_y_small_min, buffer + 3, 2); - gdk_draw_text (drawable, font, fg_gc, - time_x + week_view->digit_width * 4 - 2, - time_y, buffer + 6, 2); - gdk_draw_text (drawable, week_view->small_font, fg_gc, - time_x + week_view->digit_width * 6 - 2, - time_y_small_min, buffer + 9, 2); - - icon_x = x1 + time_width * 2 + week_view->space_width - + E_WEEK_VIEW_EVENT_TEXT_X_PAD; - break; - case E_WEEK_VIEW_TIME_START_SMALL_MIN: - gdk_draw_text (drawable, font, fg_gc, - time_x, time_y, buffer, 2); - gdk_draw_text (drawable, week_view->small_font, fg_gc, - time_x + week_view->digit_width * 2, - time_y_small_min, buffer + 3, 2); - - icon_x = x1 + time_width - + E_WEEK_VIEW_EVENT_TEXT_X_PAD; - break; - case E_WEEK_VIEW_TIME_BOTH: - gdk_draw_text (drawable, font, fg_gc, - time_x, time_y, buffer, 11); - icon_x = x1 + time_width * 2 + week_view->space_width - + E_WEEK_VIEW_EVENT_TEXT_X_PAD; - break; - case E_WEEK_VIEW_TIME_START: - gdk_draw_text (drawable, font, fg_gc, - time_x, time_y, buffer, 5); - icon_x = x1 + time_width - + E_WEEK_VIEW_EVENT_TEXT_X_PAD; - break; - case E_WEEK_VIEW_TIME_NONE: - icon_x = x1 + E_WEEK_VIEW_EVENT_L_PAD; - break; - } - - /* Draw the icons. */ - e_week_view_event_item_draw_icons (wveitem, drawable, - icon_x, icon_y, - x2, FALSE); - - } else { - rect_x = x1 + E_WEEK_VIEW_EVENT_L_PAD; - rect_w = x2 - x1 - E_WEEK_VIEW_EVENT_L_PAD - - E_WEEK_VIEW_EVENT_R_PAD + 1; - - /* Draw the triangles at the start & end, if needed. */ - if (event->start < week_view->day_starts[span->start_day]) { - draw_start_triangle = TRUE; - rect_x += 2; - rect_w -= 2; - } - - if (event->end > week_view->day_starts[span->start_day - + span->num_days]) { - draw_end_triangle = TRUE; - rect_w -= 2; - } - - gdk_gc_set_foreground (gc, &week_view->colors[E_WEEK_VIEW_COLOR_EVENT_BACKGROUND]); - gdk_draw_rectangle (drawable, gc, TRUE, - rect_x, y1 + 1, rect_w, y2 - y1 - 1); - - gdk_gc_set_foreground (gc, &week_view->colors[E_WEEK_VIEW_COLOR_EVENT_BORDER]); - rect_x2 = rect_x + rect_w - 1; - gdk_draw_line (drawable, gc, rect_x, y1, rect_x2, y1); - gdk_draw_line (drawable, gc, rect_x, y2, rect_x2, y2); - - if (draw_start_triangle) { - e_week_view_event_item_draw_triangle (wveitem, drawable, x1 + E_WEEK_VIEW_EVENT_L_PAD + 2, y1, -3, y2 - y1 + 1); - } else { - gdk_draw_line (drawable, gc, rect_x, y1, rect_x, y2); - } - - if (draw_end_triangle) { - e_week_view_event_item_draw_triangle (wveitem, drawable, x2 - E_WEEK_VIEW_EVENT_R_PAD - 2, y1, 3, y2 - y1 + 1); - } else { - gdk_draw_line (drawable, gc, rect_x2, y1, rect_x2, y2); - } - - if (span->text_item && E_TEXT (span->text_item)->editing) - editing_span = TRUE; - - /* Draw the start & end times, if necessary. */ - min_end_time_x = x1 + E_WEEK_VIEW_EVENT_L_PAD - + E_WEEK_VIEW_EVENT_BORDER_WIDTH - + E_WEEK_VIEW_EVENT_TEXT_X_PAD; - if (!editing_span - && event->start > week_view->day_starts[span->start_day]) { - sprintf (buffer, "%02i:%02i", - start_minute / 60, start_minute % 60); - time_x = x1 + E_WEEK_VIEW_EVENT_L_PAD - + E_WEEK_VIEW_EVENT_BORDER_WIDTH - + E_WEEK_VIEW_EVENT_TEXT_X_PAD; - - clip_rect.x = x1; - clip_rect.y = y1; - clip_rect.width = x2 - x1 - E_WEEK_VIEW_EVENT_R_PAD - - E_WEEK_VIEW_EVENT_BORDER_WIDTH + 1; - clip_rect.height = y2 - y1 + 1; - gdk_gc_set_clip_rectangle (fg_gc, &clip_rect); - - if (week_view->use_small_font - && week_view->small_font) { - gdk_draw_text (drawable, font, fg_gc, - time_x, time_y, buffer, 2); - gdk_draw_text (drawable, week_view->small_font, - fg_gc, - time_x + week_view->digit_width * 2, - time_y_small_min, - buffer + 3, 2); - } else { - gdk_draw_text (drawable, font, fg_gc, - time_x, time_y, buffer, 5); - } - - gdk_gc_set_clip_rectangle (fg_gc, NULL); - - min_end_time_x += time_width + 2; - } - - if (!editing_span - && event->end < week_view->day_starts[span->start_day - + span->num_days]) { - sprintf (buffer, "%02i:%02i", - end_minute / 60, end_minute % 60); - time_x = x2 - E_WEEK_VIEW_EVENT_R_PAD - - E_WEEK_VIEW_EVENT_BORDER_WIDTH - - E_WEEK_VIEW_EVENT_TEXT_X_PAD - 1 - - time_width; - - if (time_x >= min_end_time_x) { - if (week_view->use_small_font - && week_view->small_font) { - gdk_draw_text (drawable, font, fg_gc, - time_x, time_y, - buffer, 2); - gdk_draw_text (drawable, - week_view->small_font, - fg_gc, - time_x + week_view->digit_width * 2, - time_y_small_min, - buffer + 3, 2); - } else { - gdk_draw_text (drawable, font, fg_gc, - time_x, time_y, - buffer, 5); - } - } - } - - /* Draw the icons. */ - if (span->text_item) { - icon_x = span->text_item->x1 - x; - e_week_view_event_item_draw_icons (wveitem, drawable, - icon_x, icon_y, - x2, TRUE); - } - } -} - - -static void -e_week_view_event_item_draw_icons (EWeekViewEventItem *wveitem, - GdkDrawable *drawable, - gint icon_x, - gint icon_y, - gint x2, - gboolean right_align) -{ - EWeekView *week_view; - EWeekViewEvent *event; - EWeekViewEventSpan *span; - iCalObject *ico; - GdkGC *gc; - gint num_icons = 0, icon_x_inc; - gboolean draw_reminder_icon = FALSE, draw_recurrence_icon = FALSE; - - week_view = E_WEEK_VIEW (GTK_WIDGET (GNOME_CANVAS_ITEM (wveitem)->canvas)->parent); - - event = &g_array_index (week_view->events, EWeekViewEvent, - wveitem->event_num); - span = &g_array_index (week_view->spans, EWeekViewEventSpan, - event->spans_index + wveitem->span_num); - ico = event->ico; - - gc = week_view->main_gc; - - if (ico->dalarm.enabled || ico->malarm.enabled - || ico->palarm.enabled || ico->aalarm.enabled) { - draw_reminder_icon = TRUE; - num_icons++; - } - - if (ico->recur) { - draw_recurrence_icon = TRUE; - num_icons++; - } - - icon_x_inc = E_WEEK_VIEW_ICON_WIDTH + E_WEEK_VIEW_ICON_X_PAD; - - if (right_align) - icon_x -= icon_x_inc * num_icons; - - if (draw_reminder_icon && icon_x + E_WEEK_VIEW_ICON_WIDTH <= x2) { - gdk_gc_set_clip_origin (gc, icon_x, icon_y); - gdk_gc_set_clip_mask (gc, week_view->reminder_mask); - gdk_draw_pixmap (drawable, gc, - week_view->reminder_icon, - 0, 0, icon_x, icon_y, - E_WEEK_VIEW_ICON_WIDTH, - E_WEEK_VIEW_ICON_HEIGHT); - icon_x += icon_x_inc; - } - - if (draw_recurrence_icon && icon_x + E_WEEK_VIEW_ICON_WIDTH <= x2) { - gdk_gc_set_clip_origin (gc, icon_x, icon_y); - gdk_gc_set_clip_mask (gc, week_view->recurrence_mask); - gdk_draw_pixmap (drawable, gc, - week_view->recurrence_icon, - 0, 0, icon_x, icon_y, - E_WEEK_VIEW_ICON_WIDTH, - E_WEEK_VIEW_ICON_HEIGHT); - icon_x += icon_x_inc; - } - - gdk_gc_set_clip_mask (gc, NULL); -} - - -/* This draws a little triangle to indicate that an event extends past - the days visible on screen. */ -static void -e_week_view_event_item_draw_triangle (EWeekViewEventItem *wveitem, - GdkDrawable *drawable, - gint x, - gint y, - gint w, - gint h) -{ - EWeekView *week_view; - GdkGC *gc; - GdkPoint points[3]; - gint c1, c2; - - week_view = E_WEEK_VIEW (GTK_WIDGET (GNOME_CANVAS_ITEM (wveitem)->canvas)->parent); - - gc = week_view->main_gc; - - points[0].x = x; - points[0].y = y; - points[1].x = x + w; - points[1].y = y + (h / 2) - 1; - points[2].x = x; - points[2].y = y + h - 1; - - gdk_gc_set_foreground (gc, &week_view->colors[E_WEEK_VIEW_COLOR_EVENT_BACKGROUND]); - gdk_draw_polygon (drawable, gc, TRUE, points, 3); - - gdk_gc_set_foreground (gc, &week_view->colors[E_WEEK_VIEW_COLOR_EVENT_BORDER]); - - /* If the height is odd we can use the same central point for both - lines. If it is even we use different end-points. */ - c1 = c2 = y + (h / 2); - if (h % 2 == 0) - c1--; - - gdk_draw_line (drawable, gc, x, y, x + w, c1); - gdk_draw_line (drawable, gc, x, y + h - 1, x + w, c2); -} - - -/* This is supposed to return the nearest item the the point and the distance. - Since we are the only item we just return ourself and 0 for the distance. - This is needed so that we get button/motion events. */ -static double -e_week_view_event_item_point (GnomeCanvasItem *item, double x, double y, - int cx, int cy, - GnomeCanvasItem **actual_item) -{ - *actual_item = item; - return 0.0; -} - - -static gint -e_week_view_event_item_event (GnomeCanvasItem *item, GdkEvent *event) -{ - EWeekViewEventItem *wveitem; - - wveitem = E_WEEK_VIEW_EVENT_ITEM (item); - - switch (event->type) { - case GDK_BUTTON_PRESS: - return e_week_view_event_item_button_press (wveitem, event); - case GDK_BUTTON_RELEASE: - return e_week_view_event_item_button_release (wveitem, event); - case GDK_MOTION_NOTIFY: - break; - default: - break; - } - - return FALSE; -} - - -static gboolean -e_week_view_event_item_button_press (EWeekViewEventItem *wveitem, - GdkEvent *bevent) -{ - EWeekView *week_view; - EWeekViewPosition pos; - EWeekViewEvent *event; - EWeekViewEventSpan *span; - GnomeCanvasItem *item; - - item = GNOME_CANVAS_ITEM (wveitem); - - week_view = E_WEEK_VIEW (GTK_WIDGET (item->canvas)->parent); - g_return_val_if_fail (E_IS_WEEK_VIEW (week_view), FALSE); - - event = &g_array_index (week_view->events, EWeekViewEvent, - wveitem->event_num); - span = &g_array_index (week_view->spans, EWeekViewEventSpan, - event->spans_index + wveitem->span_num); - -#if 0 - g_print ("In e_week_view_event_item_button_press\n"); -#endif - - pos = e_week_view_event_item_get_position (wveitem, bevent->button.x, - bevent->button.y); - if (pos == E_WEEK_VIEW_POS_NONE) - return FALSE; - - week_view->pressed_event_num = wveitem->event_num; - week_view->pressed_span_num = wveitem->span_num; - - /* Ignore clicks on the event while editing. */ - if (E_TEXT (span->text_item)->editing) - return FALSE; - - if (bevent->button.button == 1) { - /* Remember the item clicked and the mouse position, - so we can start a drag if the mouse moves. */ - week_view->drag_event_x = bevent->button.x; - week_view->drag_event_y = bevent->button.y; - - /* FIXME: Remember the day offset from the start of the event. - */ - } else if (bevent->button.button == 3) { - e_week_view_show_popup_menu (week_view, - (GdkEventButton*) bevent, - wveitem->event_num); - gtk_signal_emit_stop_by_name (GTK_OBJECT (item->canvas), - "button_press_event"); - } - - return TRUE; -} - - -static gboolean -e_week_view_event_item_button_release (EWeekViewEventItem *wveitem, - GdkEvent *event) -{ - EWeekView *week_view; - GnomeCanvasItem *item; - - item = GNOME_CANVAS_ITEM (wveitem); - - week_view = E_WEEK_VIEW (GTK_WIDGET (item->canvas)->parent); - g_return_val_if_fail (E_IS_WEEK_VIEW (week_view), FALSE); - -#if 0 - g_print ("In e_week_view_event_item_button_release\n"); -#endif - - if (week_view->pressed_event_num != -1 - && week_view->pressed_event_num == wveitem->event_num - && week_view->pressed_span_num == wveitem->span_num) { - e_week_view_start_editing_event (week_view, - wveitem->event_num, - wveitem->span_num, - NULL); - week_view->pressed_event_num = -1; - return TRUE; - } - - week_view->pressed_event_num = -1; - - return FALSE; -} - - -static EWeekViewPosition -e_week_view_event_item_get_position (EWeekViewEventItem *wveitem, - gdouble x, - gdouble y) -{ - EWeekView *week_view; - GnomeCanvasItem *item; - - item = GNOME_CANVAS_ITEM (wveitem); - - week_view = E_WEEK_VIEW (GTK_WIDGET (item->canvas)->parent); - g_return_val_if_fail (E_IS_WEEK_VIEW (week_view), E_WEEK_VIEW_POS_NONE); - -#if 0 - g_print ("In e_week_view_event_item_get_position item: %g,%g %g,%g point: %g,%g\n", item->x1, item->y1, item->x2, item->y2, x, y); -#endif - - if (x < item->x1 + E_WEEK_VIEW_EVENT_L_PAD - || x >= item->x2 - E_WEEK_VIEW_EVENT_R_PAD) - return E_WEEK_VIEW_POS_NONE; - - /* Support left/right edge for long events only. */ - if (!e_week_view_is_one_day_event (week_view, wveitem->event_num)) { - if (x < item->x1 + E_WEEK_VIEW_EVENT_L_PAD - + E_WEEK_VIEW_EVENT_BORDER_WIDTH - + E_WEEK_VIEW_EVENT_TEXT_X_PAD) - return E_WEEK_VIEW_POS_LEFT_EDGE; - - if (x >= item->x2 - E_WEEK_VIEW_EVENT_R_PAD - - E_WEEK_VIEW_EVENT_BORDER_WIDTH - - E_WEEK_VIEW_EVENT_TEXT_X_PAD) - return E_WEEK_VIEW_POS_RIGHT_EDGE; - } - - return E_WEEK_VIEW_POS_EVENT; -} diff --git a/calendar/gui/e-week-view-event-item.h b/calendar/gui/e-week-view-event-item.h deleted file mode 100644 index cfe58699b0..0000000000 --- a/calendar/gui/e-week-view-event-item.h +++ /dev/null @@ -1,70 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -/* - * Author : - * Damon Chaplin - * - * Copyright 1999, Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ -#ifndef _E_WEEK_VIEW_EVENT_ITEM_H_ -#define _E_WEEK_VIEW_EVENT_ITEM_H_ - -#include "e-week-view.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* - * EWeekViewEventItem - displays the background, times and icons for an event - * in the week/month views. A separate EText canvas item is used to display & - * edit the text. - */ - -#define E_WEEK_VIEW_EVENT_ITEM(obj) (GTK_CHECK_CAST((obj), \ - e_week_view_event_item_get_type (), EWeekViewEventItem)) -#define E_WEEK_VIEW_EVENT_ITEM_CLASS(k) (GTK_CHECK_CLASS_CAST ((k),\ - e_week_view_event_item_get_type ())) -#define E_IS_WEEK_VIEW_EVENT_ITEM(o) (GTK_CHECK_TYPE((o), \ - e_week_view_event_item_get_type ())) - -typedef struct { - GnomeCanvasItem canvas_item; - - /* The event index in the EWeekView events array. */ - gint event_num; - - /* The span index within the event. */ - gint span_num; -} EWeekViewEventItem; - -typedef struct { - GnomeCanvasItemClass parent_class; - -} EWeekViewEventItemClass; - - -GtkType e_week_view_event_item_get_type (void); - - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* _E_WEEK_VIEW_EVENT_ITEM_H_ */ diff --git a/calendar/gui/e-week-view-main-item.c b/calendar/gui/e-week-view-main-item.c deleted file mode 100644 index 49c2ca3d7d..0000000000 --- a/calendar/gui/e-week-view-main-item.c +++ /dev/null @@ -1,367 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -/* - * Author : - * Damon Chaplin - * - * Copyright 1999, Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ - -/* - * EWeekViewMainItem - displays the background grid and dates for the Week and - * Month calendar views. - */ - -#include -#include "e-week-view-main-item.h" - -static void e_week_view_main_item_class_init (EWeekViewMainItemClass *class); -static void e_week_view_main_item_init (EWeekViewMainItem *wvmitem); - -static void e_week_view_main_item_set_arg (GtkObject *o, - GtkArg *arg, - guint arg_id); -static void e_week_view_main_item_update (GnomeCanvasItem *item, - double *affine, - ArtSVP *clip_path, - int flags); -static void e_week_view_main_item_draw (GnomeCanvasItem *item, - GdkDrawable *drawable, - int x, - int y, - int width, - int height); -static void e_week_view_main_item_draw_day (EWeekViewMainItem *wvmitem, - gint day, - GDate *date, - GdkDrawable *drawable, - gint x, - gint y, - gint width, - gint height); -static double e_week_view_main_item_point (GnomeCanvasItem *item, - double x, - double y, - int cx, - int cy, - GnomeCanvasItem **actual_item); - - -static GnomeCanvasItemClass *parent_class; - -/* The arguments we take */ -enum { - ARG_0, - ARG_WEEK_VIEW -}; - - -GtkType -e_week_view_main_item_get_type (void) -{ - static GtkType e_week_view_main_item_type = 0; - - if (!e_week_view_main_item_type) { - GtkTypeInfo e_week_view_main_item_info = { - "EWeekViewMainItem", - sizeof (EWeekViewMainItem), - sizeof (EWeekViewMainItemClass), - (GtkClassInitFunc) e_week_view_main_item_class_init, - (GtkObjectInitFunc) e_week_view_main_item_init, - NULL, /* reserved_1 */ - NULL, /* reserved_2 */ - (GtkClassInitFunc) NULL - }; - - e_week_view_main_item_type = gtk_type_unique (gnome_canvas_item_get_type (), &e_week_view_main_item_info); - } - - return e_week_view_main_item_type; -} - - -static void -e_week_view_main_item_class_init (EWeekViewMainItemClass *class) -{ - GtkObjectClass *object_class; - GnomeCanvasItemClass *item_class; - - parent_class = gtk_type_class (gnome_canvas_item_get_type()); - - object_class = (GtkObjectClass *) class; - item_class = (GnomeCanvasItemClass *) class; - - gtk_object_add_arg_type ("EWeekViewMainItem::week_view", - GTK_TYPE_POINTER, GTK_ARG_WRITABLE, - ARG_WEEK_VIEW); - - object_class->set_arg = e_week_view_main_item_set_arg; - - /* GnomeCanvasItem method overrides */ - item_class->update = e_week_view_main_item_update; - item_class->draw = e_week_view_main_item_draw; - item_class->point = e_week_view_main_item_point; -} - - -static void -e_week_view_main_item_init (EWeekViewMainItem *wvmitem) -{ - wvmitem->week_view = NULL; -} - - -static void -e_week_view_main_item_set_arg (GtkObject *o, GtkArg *arg, guint arg_id) -{ - GnomeCanvasItem *item; - EWeekViewMainItem *wvmitem; - - item = GNOME_CANVAS_ITEM (o); - wvmitem = E_WEEK_VIEW_MAIN_ITEM (o); - - switch (arg_id){ - case ARG_WEEK_VIEW: - wvmitem->week_view = GTK_VALUE_POINTER (*arg); - break; - } -} - - -static void -e_week_view_main_item_update (GnomeCanvasItem *item, - double *affine, - ArtSVP *clip_path, - int flags) -{ - if (GNOME_CANVAS_ITEM_CLASS (parent_class)->update) - (* GNOME_CANVAS_ITEM_CLASS (parent_class)->update) (item, affine, clip_path, flags); - - /* The item covers the entire canvas area. */ - item->x1 = 0; - item->y1 = 0; - item->x2 = INT_MAX; - item->y2 = INT_MAX; -} - - -/* - * DRAWING ROUTINES - functions to paint the canvas item. - */ - -static void -e_week_view_main_item_draw (GnomeCanvasItem *canvas_item, - GdkDrawable *drawable, - int x, - int y, - int width, - int height) -{ - EWeekViewMainItem *wvmitem; - EWeekView *week_view; - GDate date; - gint num_days, day, day_x, day_y, day_w, day_h; - -#if 0 - g_print ("In e_week_view_main_item_draw %i,%i %ix%i\n", - x, y, width, height); -#endif - - wvmitem = E_WEEK_VIEW_MAIN_ITEM (canvas_item); - week_view = wvmitem->week_view; - g_return_if_fail (week_view != NULL); - - /* Step through each of the days. */ - date = week_view->first_day_shown; - - /* If no date has been set, we just use Dec 1999/January 2000. */ - if (!g_date_valid (&date)) - g_date_set_dmy (&date, 27, 12, 1999); - - num_days = week_view->display_month ? E_WEEK_VIEW_MAX_WEEKS * 7 : 7; - for (day = 0; day < num_days; day++) { - e_week_view_get_day_position (week_view, day, - &day_x, &day_y, - &day_w, &day_h); - /* Skip any days which are outside the area. */ - if (day_x < x + width && day_x + day_w >= x - && day_y < y + height && day_y + day_h >= y) { - e_week_view_main_item_draw_day (wvmitem, day, &date, - drawable, - day_x - x, day_y - y, - day_w, day_h); - } - g_date_add_days (&date, 1); - } -} - - -static void -e_week_view_main_item_draw_day (EWeekViewMainItem *wvmitem, - gint day, - GDate *date, - GdkDrawable *drawable, - gint x, - gint y, - gint width, - gint height) -{ - EWeekView *week_view; - GtkStyle *style; - GdkGC *fg_gc, *bg_gc, *light_gc, *dark_gc, *gc, *date_gc; - GdkGC *selected_fg_gc, *selected_bg_gc; - GdkFont *font; - gint right_edge, bottom_edge, date_width, date_x, line_y; - gboolean show_day_name, show_month_name, selected; - gchar buffer[128], *format_string; - gint month, day_of_month, max_width; - GdkColor *bg_color; - -#if 0 - g_print ("Drawing Day:%i at %i,%i\n", day, x, y); -#endif - week_view = wvmitem->week_view; - style = GTK_WIDGET (week_view)->style; - font = style->font; - fg_gc = style->fg_gc[GTK_STATE_NORMAL]; - bg_gc = style->bg_gc[GTK_STATE_PRELIGHT]; - light_gc = style->light_gc[GTK_STATE_NORMAL]; - dark_gc = style->dark_gc[GTK_STATE_NORMAL]; - selected_fg_gc = style->fg_gc[GTK_STATE_SELECTED]; - selected_bg_gc = style->bg_gc[GTK_STATE_SELECTED]; - gc = week_view->main_gc; - - month = g_date_month (date); - day_of_month = g_date_day (date); - line_y = y + E_WEEK_VIEW_DATE_T_PAD + font->ascent - + font->descent + E_WEEK_VIEW_DATE_LINE_T_PAD; - - /* Draw the background of the day. In the month view odd months are - one color and even months another, so you can easily see when each - month starts (defaults are white for odd - January, March, ... and - light gray for even). In the week view the background is always the - same color, the color used for the odd months in the month view. */ - if (week_view->display_month && (month % 2 == 0)) - bg_color = &week_view->colors[E_WEEK_VIEW_COLOR_EVEN_MONTHS]; - else - bg_color = &week_view->colors[E_WEEK_VIEW_COLOR_ODD_MONTHS]; - - gdk_gc_set_foreground (gc, bg_color); - gdk_draw_rectangle (drawable, gc, TRUE, x, y, width, height); - - /* Draw the lines on the right and bottom of the cell. The canvas is - sized so that the lines on the right & bottom edges will be off the - edge of the canvas, so we don't have to worry about them. */ - right_edge = x + width - 1; - bottom_edge = y + height - 1; - - gdk_draw_line (drawable, fg_gc, - right_edge, y, right_edge, bottom_edge); - gdk_draw_line (drawable, fg_gc, - x, bottom_edge, right_edge, bottom_edge); - - /* If the day is selected, draw the blue background. */ - selected = TRUE; - if (!GTK_WIDGET_HAS_FOCUS (week_view) - || week_view->selection_start_day == -1 - || week_view->selection_start_day > day - || week_view->selection_end_day < day) - selected = FALSE; - if (selected) { - if (week_view->display_month) - gdk_draw_rectangle (drawable, selected_bg_gc, TRUE, - x + 2, y + 1, - width - 5, - E_WEEK_VIEW_DATE_T_PAD - 1 - + font->ascent + font->descent); - else - gdk_draw_rectangle (drawable, selected_bg_gc, TRUE, - x + 2, y + 1, - width - 5, line_y - y); - } - - /* Display the date in the top of the cell. - In the week view, display the long format "10 January" in all cells, - or abbreviate it to "10 Jan" or "10" if that doesn't fit. - In the month view, only use the long format for the first cell and - the 1st of each month, otherwise use "10". */ - show_day_name = FALSE; - show_month_name = FALSE; - if (!week_view->display_month) { - show_day_name = TRUE; - show_month_name = TRUE; - } else if (day == 0 || day_of_month == 1) { - show_month_name = TRUE; - } - - /* Now find the longest form of the date that will fit. */ - max_width = width - 4; - format_string = NULL; - if (show_day_name) { - if (week_view->max_abbr_day_width + - week_view->digit_width * 2 + week_view->space_width * 2 - + week_view->month_widths[month - 1] < max_width) - format_string = "%a %d %B"; - } - if (!format_string && show_month_name) { - if (week_view->digit_width * 2 + week_view->space_width - + week_view->month_widths[month - 1] < max_width) - format_string = "%d %B"; - else if (week_view->digit_width * 2 + week_view->space_width - + week_view->abbr_month_widths[month - 1] < max_width) - format_string = "%d %b"; - } - - g_date_strftime (buffer, 128, format_string ? format_string : "%d", - date); - date_width = gdk_string_width (font, buffer); - date_x = x + width - date_width - E_WEEK_VIEW_DATE_R_PAD; - date_x = MAX (date_x, x + 1); - - if (selected) - date_gc = selected_fg_gc; - else - date_gc = fg_gc; - gdk_draw_string (drawable, font, date_gc, - date_x, y + E_WEEK_VIEW_DATE_T_PAD + font->ascent, - buffer); - - /* Draw the line under the date. */ - if (!week_view->display_month) { - gdk_draw_line (drawable, fg_gc, - x + E_WEEK_VIEW_DATE_LINE_L_PAD, line_y, - right_edge, line_y); - } -} - - - - -/* This is supposed to return the nearest item the the point and the distance. - Since we are the only item we just return ourself and 0 for the distance. - This is needed so that we get button/motion events. */ -static double -e_week_view_main_item_point (GnomeCanvasItem *item, double x, double y, - int cx, int cy, - GnomeCanvasItem **actual_item) -{ - *actual_item = item; - return 0.0; -} - - diff --git a/calendar/gui/e-week-view-main-item.h b/calendar/gui/e-week-view-main-item.h deleted file mode 100644 index f75dcb0ec9..0000000000 --- a/calendar/gui/e-week-view-main-item.h +++ /dev/null @@ -1,66 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -/* - * Author : - * Damon Chaplin - * - * Copyright 1999, Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ -#ifndef _E_WEEK_VIEW_MAIN_ITEM_H_ -#define _E_WEEK_VIEW_MAIN_ITEM_H_ - -#include "e-week-view.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* - * EWeekViewMainItem - displays the background grid and dates for the Week and - * Month calendar views. - */ - -#define E_WEEK_VIEW_MAIN_ITEM(obj) (GTK_CHECK_CAST((obj), \ - e_week_view_main_item_get_type (), EWeekViewMainItem)) -#define E_WEEK_VIEW_MAIN_ITEM_CLASS(k) (GTK_CHECK_CLASS_CAST ((k),\ - e_week_view_main_item_get_type ())) -#define E_IS_WEEK_VIEW_MAIN_ITEM(o) (GTK_CHECK_TYPE((o), \ - e_week_view_main_item_get_type ())) - -typedef struct { - GnomeCanvasItem canvas_item; - - /* The parent EWeekView widget. */ - EWeekView *week_view; -} EWeekViewMainItem; - -typedef struct { - GnomeCanvasItemClass parent_class; - -} EWeekViewMainItemClass; - - -GtkType e_week_view_main_item_get_type (void); - - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* _E_WEEK_VIEW_MAIN_ITEM_H_ */ diff --git a/calendar/gui/e-week-view-titles-item.c b/calendar/gui/e-week-view-titles-item.c deleted file mode 100644 index 14f47e4bcf..0000000000 --- a/calendar/gui/e-week-view-titles-item.c +++ /dev/null @@ -1,300 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -/* - * Author : - * Damon Chaplin - * - * Copyright 1999, Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ - -/* - * EWeekViewTitlesItem - displays the 'Monday', 'Tuesday' etc. at the top of - * the Month calendar view. - */ - -#include -#include "e-week-view-titles-item.h" - -static void e_week_view_titles_item_class_init (EWeekViewTitlesItemClass *class); -static void e_week_view_titles_item_init (EWeekViewTitlesItem *wvtitem); - -static void e_week_view_titles_item_set_arg (GtkObject *o, - GtkArg *arg, - guint arg_id); -static void e_week_view_titles_item_update (GnomeCanvasItem *item, - double *affine, - ArtSVP *clip_path, - int flags); -static void e_week_view_titles_item_draw (GnomeCanvasItem *item, - GdkDrawable *drawable, - int x, - int y, - int width, - int height); -static double e_week_view_titles_item_point (GnomeCanvasItem *item, - double x, - double y, - int cx, - int cy, - GnomeCanvasItem **actual_item); - - -static GnomeCanvasItemClass *parent_class; - -/* The arguments we take */ -enum { - ARG_0, - ARG_WEEK_VIEW -}; - - -GtkType -e_week_view_titles_item_get_type (void) -{ - static GtkType e_week_view_titles_item_type = 0; - - if (!e_week_view_titles_item_type) { - GtkTypeInfo e_week_view_titles_item_info = { - "EWeekViewTitlesItem", - sizeof (EWeekViewTitlesItem), - sizeof (EWeekViewTitlesItemClass), - (GtkClassInitFunc) e_week_view_titles_item_class_init, - (GtkObjectInitFunc) e_week_view_titles_item_init, - NULL, /* reserved_1 */ - NULL, /* reserved_2 */ - (GtkClassInitFunc) NULL - }; - - e_week_view_titles_item_type = gtk_type_unique (gnome_canvas_item_get_type (), &e_week_view_titles_item_info); - } - - return e_week_view_titles_item_type; -} - - -static void -e_week_view_titles_item_class_init (EWeekViewTitlesItemClass *class) -{ - GtkObjectClass *object_class; - GnomeCanvasItemClass *item_class; - - parent_class = gtk_type_class (gnome_canvas_item_get_type()); - - object_class = (GtkObjectClass *) class; - item_class = (GnomeCanvasItemClass *) class; - - gtk_object_add_arg_type ("EWeekViewTitlesItem::week_view", - GTK_TYPE_POINTER, GTK_ARG_WRITABLE, - ARG_WEEK_VIEW); - - object_class->set_arg = e_week_view_titles_item_set_arg; - - /* GnomeCanvasItem method overrides */ - item_class->update = e_week_view_titles_item_update; - item_class->draw = e_week_view_titles_item_draw; - item_class->point = e_week_view_titles_item_point; -} - - -static void -e_week_view_titles_item_init (EWeekViewTitlesItem *wvtitem) -{ - wvtitem->week_view = NULL; -} - - -static void -e_week_view_titles_item_set_arg (GtkObject *o, GtkArg *arg, guint arg_id) -{ - GnomeCanvasItem *item; - EWeekViewTitlesItem *wvtitem; - - item = GNOME_CANVAS_ITEM (o); - wvtitem = E_WEEK_VIEW_TITLES_ITEM (o); - - switch (arg_id){ - case ARG_WEEK_VIEW: - wvtitem->week_view = GTK_VALUE_POINTER (*arg); - break; - } -} - - -static void -e_week_view_titles_item_update (GnomeCanvasItem *item, - double *affine, - ArtSVP *clip_path, - int flags) -{ - if (GNOME_CANVAS_ITEM_CLASS (parent_class)->update) - (* GNOME_CANVAS_ITEM_CLASS (parent_class)->update) (item, affine, clip_path, flags); - - /* The item covers the entire canvas area. */ - item->x1 = 0; - item->y1 = 0; - item->x2 = INT_MAX; - item->y2 = INT_MAX; -} - - -/* - * DRAWING ROUTINES - functions to paint the canvas item. - */ - -static void -e_week_view_titles_item_draw (GnomeCanvasItem *canvas_item, - GdkDrawable *drawable, - int x, - int y, - int width, - int height) -{ - EWeekViewTitlesItem *wvtitem; - EWeekView *week_view; - GtkStyle *style; - GdkGC *fg_gc, *bg_gc, *light_gc, *dark_gc; - GdkFont *font; - gint canvas_width, canvas_height, col_width, col, date_width, date_x; - gchar buffer[128], *date_format; - GDate date; - GdkRectangle clip_rect; - gboolean long_format; - -#if 0 - g_print ("In e_week_view_titles_item_draw %i,%i %ix%i\n", - x, y, width, height); -#endif - - wvtitem = E_WEEK_VIEW_TITLES_ITEM (canvas_item); - week_view = wvtitem->week_view; - g_return_if_fail (week_view != NULL); - - style = GTK_WIDGET (week_view)->style; - font = style->font; - fg_gc = style->fg_gc[GTK_STATE_NORMAL]; - bg_gc = style->bg_gc[GTK_STATE_NORMAL]; - light_gc = style->light_gc[GTK_STATE_NORMAL]; - dark_gc = style->dark_gc[GTK_STATE_NORMAL]; - canvas_width = GTK_WIDGET (canvas_item->canvas)->allocation.width; - canvas_height = GTK_WIDGET (canvas_item->canvas)->allocation.height; - - /* Draw the shadow around the dates. */ - gdk_draw_line (drawable, light_gc, - 1 - x, 1 - y, - canvas_width - 2 - x, 1 - y); - gdk_draw_line (drawable, light_gc, - 1 - x, 2 - y, - 1 - x, canvas_height - 1 - y); - - gdk_draw_rectangle (drawable, dark_gc, FALSE, - 0 - x, 0 - y, - canvas_width - 1, canvas_height); - - /* Determine the format to use. */ - col_width = canvas_width / week_view->columns; - if (col_width > week_view->max_day_width + 2) { - date_format = "%A"; - long_format = TRUE; - } else { - date_format = "%a"; - long_format = FALSE; - } - - /* Shift right one pixel to account for the shadow around the main - canvas. */ - x--; - - /* Draw the date. Set a clipping rectangle so we don't draw over the - next day. */ - g_date_clear (&date, 1); - g_date_set_dmy (&date, 27, 3, 2000); /* Must be a Monday. */ - for (col = 0; col < week_view->columns; col++) { - if (col == 5 && week_view->compress_weekend) { - g_date_strftime (buffer, 128, "%a/", &date); - g_date_add_days (&date, 1); - g_date_strftime (buffer + strlen (buffer), 100, - "%a", &date); - } else { - g_date_strftime (buffer, 128, date_format, &date); - } - - clip_rect.x = week_view->col_offsets[col] - x; - clip_rect.y = 2 - y; - clip_rect.width = week_view->col_widths[col]; - clip_rect.height = canvas_height - 2; - gdk_gc_set_clip_rectangle (fg_gc, &clip_rect); - - if (col == 5 && week_view->compress_weekend) - date_width = week_view->abbr_day_widths[5] - + week_view->slash_width - + week_view->abbr_day_widths[6]; - else if (long_format) - date_width = week_view->day_widths[col]; - else - date_width = week_view->abbr_day_widths[col]; - - date_x = week_view->col_offsets[col] - + (week_view->col_widths[col] - date_width) / 2; - date_x = MAX (date_x, week_view->col_offsets[col]); - gdk_draw_string (drawable, font, fg_gc, - date_x - x, 3 + font->ascent - y, buffer); - - gdk_gc_set_clip_rectangle (fg_gc, NULL); - - /* Draw the lines down the left and right of the date cols. */ - if (col != 0) { - gdk_draw_line (drawable, light_gc, - week_view->col_offsets[col] - x, - 4 - y, - week_view->col_offsets[col] - x, - canvas_height - 4 - y); - - gdk_draw_line (drawable, dark_gc, - week_view->col_offsets[col] - 1 - x, - 4 - y, - week_view->col_offsets[col] - 1 - x, - canvas_height - 4 - y); - } - - /* Draw the lines between each column. */ - if (col != 0) { - gdk_draw_line (drawable, style->black_gc, - week_view->col_offsets[col] - x, - canvas_height - y, - week_view->col_offsets[col] - x, - canvas_height - y); - } - - g_date_add_days (&date, 1); - } -} - - -/* This is supposed to return the nearest item the the point and the distance. - Since we are the only item we just return ourself and 0 for the distance. - This is needed so that we get button/motion events. */ -static double -e_week_view_titles_item_point (GnomeCanvasItem *item, double x, double y, - int cx, int cy, - GnomeCanvasItem **actual_item) -{ - *actual_item = item; - return 0.0; -} - - diff --git a/calendar/gui/e-week-view-titles-item.h b/calendar/gui/e-week-view-titles-item.h deleted file mode 100644 index 7ce1ccd386..0000000000 --- a/calendar/gui/e-week-view-titles-item.h +++ /dev/null @@ -1,66 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -/* - * Author : - * Damon Chaplin - * - * Copyright 1999, Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ -#ifndef _E_WEEK_VIEW_TITLES_ITEM_H_ -#define _E_WEEK_VIEW_TITLES_ITEM_H_ - -#include "e-week-view.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* - * EWeekViewTitlesItem - displays the 'Monday', 'Tuesday' etc. at the top of - * the Month calendar view. - */ - -#define E_WEEK_VIEW_TITLES_ITEM(obj) (GTK_CHECK_CAST((obj), \ - e_week_view_titles_item_get_type (), EWeekViewTitlesItem)) -#define E_WEEK_VIEW_TITLES_ITEM_CLASS(k) (GTK_CHECK_CLASS_CAST ((k),\ - e_week_view_titles_item_get_type ())) -#define E_IS_WEEK_VIEW_TITLES_ITEM(o) (GTK_CHECK_TYPE((o), \ - e_week_view_titles_item_get_type ())) - -typedef struct { - GnomeCanvasItem canvas_item; - - /* The parent EWeekView widget. */ - EWeekView *week_view; -} EWeekViewTitlesItem; - -typedef struct { - GnomeCanvasItemClass parent_class; - -} EWeekViewTitlesItemClass; - - -GtkType e_week_view_titles_item_get_type (void); - - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* _E_WEEK_VIEW_TITLES_ITEM_H_ */ diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c deleted file mode 100644 index a233d2a66d..0000000000 --- a/calendar/gui/e-week-view.c +++ /dev/null @@ -1,2738 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -/* - * Author : - * Damon Chaplin - * - * Copyright 1999, Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ - -/* - * EWeekView - displays the Week & Month views of the calendar. - */ - -#include -#include -#include -#include "calendar-commands.h" -#include "e-week-view.h" -#include "e-week-view-event-item.h" -#include "e-week-view-main-item.h" -#include "e-week-view-titles-item.h" -#include -#include "popup-menu.h" -#include "eventedit.h" -#include "../e-util/e-canvas.h" -#include "../widgets/e-text/e-text.h" - -/* Images */ -#include "bell.xpm" -#include "recur.xpm" - -#define E_WEEK_VIEW_SMALL_FONT \ - "-adobe-utopia-regular-r-normal-*-*-100-*-*-p-*-iso8859-*" -#define E_WEEK_VIEW_SMALL_FONT_FALLBACK \ - "-adobe-helvetica-medium-r-normal-*-*-80-*-*-p-*-iso8859-*" - -/* We use a 7-bit field to store row numbers in EWeekViewEventSpan, so the - maximum number or rows we can allow is 127. It is very unlikely to be - reached anyway. */ -#define E_WEEK_VIEW_MAX_ROWS_PER_CELL 127 - -static void e_week_view_class_init (EWeekViewClass *class); -static void e_week_view_init (EWeekView *week_view); -static void e_week_view_destroy (GtkObject *object); -static void e_week_view_realize (GtkWidget *widget); -static void e_week_view_unrealize (GtkWidget *widget); -static void e_week_view_style_set (GtkWidget *widget, - GtkStyle *previous_style); -static void e_week_view_size_allocate (GtkWidget *widget, - GtkAllocation *allocation); -static void e_week_view_recalc_cell_sizes (EWeekView *week_view); -static gint e_week_view_focus_in (GtkWidget *widget, - GdkEventFocus *event); -static gint e_week_view_focus_out (GtkWidget *widget, - GdkEventFocus *event); -static gint e_week_view_expose_event (GtkWidget *widget, - GdkEventExpose *event); -static void e_week_view_draw (GtkWidget *widget, - GdkRectangle *area); -static void e_week_view_draw_shadow (EWeekView *week_view); - -static gboolean e_week_view_on_button_press (GtkWidget *widget, - GdkEventButton *event, - EWeekView *week_view); -static gboolean e_week_view_on_button_release (GtkWidget *widget, - GdkEventButton *event, - EWeekView *week_view); -static gboolean e_week_view_on_motion (GtkWidget *widget, - GdkEventMotion *event, - EWeekView *week_view); -static gint e_week_view_convert_position_to_day (EWeekView *week_view, - gint x, - gint y); -static void e_week_view_update_selection (EWeekView *week_view, - gint day); - -static void e_week_view_reload_events (EWeekView *week_view); -static void e_week_view_free_events (EWeekView *week_view); -static int e_week_view_add_event (iCalObject *ico, - time_t start, - time_t end, - gpointer data); -static void e_week_view_check_layout (EWeekView *week_view); -static void e_week_view_layout_events (EWeekView *week_view); -static void e_week_view_layout_event (EWeekView *week_view, - EWeekViewEvent *event, - guint8 *grid, - GArray *spans); -static void e_week_view_ensure_events_sorted (EWeekView *week_view); -static gint e_week_view_event_sort_func (const void *arg1, - const void *arg2); -static void e_week_view_reshape_events (EWeekView *week_view); -static void e_week_view_reshape_event_span (EWeekView *week_view, - gint event_num, - gint span_num); -static gint e_week_view_find_day (EWeekView *week_view, - time_t time_to_find, - gboolean include_midnight_in_prev_day); -static gint e_week_view_find_span_end (EWeekView *week_view, - gint day); -static void e_week_view_recalc_day_starts (EWeekView *week_view, - time_t lower); -static void e_week_view_on_adjustment_changed (GtkAdjustment *adjustment, - EWeekView *week_view); -static void e_week_view_on_editing_started (EWeekView *week_view, - GnomeCanvasItem *item); -static void e_week_view_on_editing_stopped (EWeekView *week_view, - GnomeCanvasItem *item); -static gboolean e_week_view_find_event_from_item (EWeekView *week_view, - GnomeCanvasItem *item, - gint *event_num, - gint *span_num); -static gboolean e_week_view_find_event_from_uid (EWeekView *week_view, - const gchar *uid, - gint *event_num_return); -typedef gboolean (* EWeekViewForeachEventCallback) (EWeekView *week_view, - gint event_num, - gpointer data); - -static void e_week_view_foreach_event_with_uid (EWeekView *week_view, - const gchar *uid, - EWeekViewForeachEventCallback callback, - gpointer data); -static gboolean e_week_view_on_text_item_event (GnomeCanvasItem *item, - GdkEvent *event, - EWeekView *week_view); -static gint e_week_view_key_press (GtkWidget *widget, GdkEventKey *event); -static void e_week_view_on_new_appointment (GtkWidget *widget, - gpointer data); -static void e_week_view_on_edit_appointment (GtkWidget *widget, - gpointer data); -static void e_week_view_on_delete_occurrence (GtkWidget *widget, - gpointer data); -static void e_week_view_on_delete_appointment (GtkWidget *widget, - gpointer data); -static void e_week_view_on_unrecur_appointment (GtkWidget *widget, - gpointer data); - -static gboolean e_week_view_update_event_cb (EWeekView *week_view, - gint event_num, - gpointer data); -static gboolean e_week_view_remove_event_cb (EWeekView *week_view, - gint event_num, - gpointer data); - -static GtkTableClass *parent_class; - - -GtkType -e_week_view_get_type (void) -{ - static GtkType e_week_view_type = 0; - - if (!e_week_view_type){ - GtkTypeInfo e_week_view_info = { - "EWeekView", - sizeof (EWeekView), - sizeof (EWeekViewClass), - (GtkClassInitFunc) e_week_view_class_init, - (GtkObjectInitFunc) e_week_view_init, - NULL, /* reserved 1 */ - NULL, /* reserved 2 */ - (GtkClassInitFunc) NULL - }; - - parent_class = gtk_type_class (GTK_TYPE_TABLE); - e_week_view_type = gtk_type_unique (GTK_TYPE_TABLE, - &e_week_view_info); - } - - return e_week_view_type; -} - - -static void -e_week_view_class_init (EWeekViewClass *class) -{ - GtkObjectClass *object_class; - GtkWidgetClass *widget_class; - - object_class = (GtkObjectClass *) class; - widget_class = (GtkWidgetClass *) class; - - /* Method override */ - object_class->destroy = e_week_view_destroy; - - widget_class->realize = e_week_view_realize; - widget_class->unrealize = e_week_view_unrealize; - widget_class->style_set = e_week_view_style_set; - widget_class->size_allocate = e_week_view_size_allocate; - widget_class->focus_in_event = e_week_view_focus_in; - widget_class->focus_out_event = e_week_view_focus_out; - widget_class->key_press_event = e_week_view_key_press; - widget_class->expose_event = e_week_view_expose_event; - widget_class->draw = e_week_view_draw; -} - - -static void -e_week_view_init (EWeekView *week_view) -{ - GdkColormap *colormap; - gboolean success[E_WEEK_VIEW_COLOR_LAST]; - gint nfailed; - GnomeCanvasGroup *canvas_group; - GtkObject *adjustment; - - GTK_WIDGET_SET_FLAGS (week_view, GTK_CAN_FOCUS); - - colormap = gtk_widget_get_colormap (GTK_WIDGET (week_view)); - - week_view->calendar = NULL; - - week_view->events = g_array_new (FALSE, FALSE, - sizeof (EWeekViewEvent)); - week_view->events_sorted = TRUE; - week_view->events_need_layout = FALSE; - week_view->events_need_reshape = FALSE; - - week_view->spans = NULL; - - week_view->display_month = FALSE; - week_view->rows = 6; - week_view->columns = 2; - week_view->compress_weekend = TRUE; - - g_date_clear (&week_view->base_date, 1); - g_date_clear (&week_view->first_day_shown, 1); - - week_view->row_height = 10; - week_view->rows_per_cell = 1; - - week_view->selection_start_day = -1; - week_view->selection_drag_pos = E_WEEK_VIEW_DRAG_NONE; - - week_view->pressed_event_num = -1; - week_view->editing_event_num = -1; - week_view->editing_new_event = FALSE; - - /* Create the small font. */ - week_view->use_small_font = TRUE; - week_view->small_font = gdk_font_load (E_WEEK_VIEW_SMALL_FONT); - if (!week_view->small_font) - week_view->small_font = gdk_font_load (E_WEEK_VIEW_SMALL_FONT_FALLBACK); - if (!week_view->small_font) - g_warning ("Couldn't load font"); - - /* Allocate the colors. */ - week_view->colors[E_WEEK_VIEW_COLOR_EVEN_MONTHS].red = 0xeded; - week_view->colors[E_WEEK_VIEW_COLOR_EVEN_MONTHS].green = 0xeded; - week_view->colors[E_WEEK_VIEW_COLOR_EVEN_MONTHS].blue = 0xeded; - - week_view->colors[E_WEEK_VIEW_COLOR_ODD_MONTHS].red = 65535; - week_view->colors[E_WEEK_VIEW_COLOR_ODD_MONTHS].green = 65535; - week_view->colors[E_WEEK_VIEW_COLOR_ODD_MONTHS].blue = 65535; - - week_view->colors[E_WEEK_VIEW_COLOR_EVENT_BACKGROUND].red = 0xd6d6; - week_view->colors[E_WEEK_VIEW_COLOR_EVENT_BACKGROUND].green = 0xd6d6; - week_view->colors[E_WEEK_VIEW_COLOR_EVENT_BACKGROUND].blue = 0xd6d6; - - week_view->colors[E_WEEK_VIEW_COLOR_EVENT_BORDER].red = 0; - week_view->colors[E_WEEK_VIEW_COLOR_EVENT_BORDER].green = 0; - week_view->colors[E_WEEK_VIEW_COLOR_EVENT_BORDER].blue = 0; - - nfailed = gdk_colormap_alloc_colors (colormap, week_view->colors, - E_WEEK_VIEW_COLOR_LAST, FALSE, - TRUE, success); - if (nfailed) - g_warning ("Failed to allocate all colors"); - - - /* - * Titles Canvas. Note that we don't show it is only shown in the - * Month view. - */ - week_view->titles_canvas = e_canvas_new (); - gtk_table_attach (GTK_TABLE (week_view), week_view->titles_canvas, - 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0); - - canvas_group = GNOME_CANVAS_GROUP (GNOME_CANVAS (week_view->titles_canvas)->root); - - week_view->titles_canvas_item = - gnome_canvas_item_new (canvas_group, - e_week_view_titles_item_get_type (), - "EWeekViewTitlesItem::week_view", week_view, - NULL); - - /* - * Main Canvas - */ - week_view->main_canvas = e_canvas_new (); - gtk_table_attach (GTK_TABLE (week_view), week_view->main_canvas, - 1, 2, 1, 2, - GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 1, 1); - gtk_widget_show (week_view->main_canvas); - - canvas_group = GNOME_CANVAS_GROUP (GNOME_CANVAS (week_view->main_canvas)->root); - - week_view->main_canvas_item = - gnome_canvas_item_new (canvas_group, - e_week_view_main_item_get_type (), - "EWeekViewMainItem::week_view", week_view, - NULL); - - gtk_signal_connect_after (GTK_OBJECT (week_view->main_canvas), - "button_press_event", - GTK_SIGNAL_FUNC (e_week_view_on_button_press), - week_view); - gtk_signal_connect_after (GTK_OBJECT (week_view->main_canvas), - "button_release_event", - GTK_SIGNAL_FUNC (e_week_view_on_button_release), - week_view); - gtk_signal_connect_after (GTK_OBJECT (week_view->main_canvas), - "motion_notify_event", - GTK_SIGNAL_FUNC (e_week_view_on_motion), - week_view); - - /* - * Scrollbar. - */ - adjustment = gtk_adjustment_new (0, -52, 52, 1, 1, 1); - gtk_signal_connect (adjustment, "value_changed", - GTK_SIGNAL_FUNC (e_week_view_on_adjustment_changed), - week_view); - - week_view->vscrollbar = gtk_vscrollbar_new (GTK_ADJUSTMENT (adjustment)); - gtk_table_attach (GTK_TABLE (week_view), week_view->vscrollbar, - 2, 3, 1, 2, 0, GTK_EXPAND | GTK_FILL, 0, 0); - gtk_widget_show (week_view->vscrollbar); - - - /* Create the pixmaps. */ - week_view->reminder_icon = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap, &week_view->reminder_mask, NULL, bell_xpm); - week_view->recurrence_icon = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap, &week_view->recurrence_mask, NULL, recur_xpm); - - - /* Create the cursors. */ - week_view->normal_cursor = gdk_cursor_new (GDK_TOP_LEFT_ARROW); - week_view->move_cursor = gdk_cursor_new (GDK_FLEUR); - week_view->resize_width_cursor = gdk_cursor_new (GDK_SB_H_DOUBLE_ARROW); - week_view->last_cursor_set = NULL; -} - - -/** - * e_week_view_new: - * @Returns: a new #EWeekView. - * - * Creates a new #EWeekView. - **/ -GtkWidget * -e_week_view_new (void) -{ - GtkWidget *week_view; - - week_view = GTK_WIDGET (gtk_type_new (e_week_view_get_type ())); - - return week_view; -} - - -static void -e_week_view_destroy (GtkObject *object) -{ - EWeekView *week_view; - - week_view = E_WEEK_VIEW (object); - - /* FIXME: free the colors. In EDayView as well. */ - /* FIXME: free the events and the spans. In EDayView as well? */ - - if (week_view->small_font) - gdk_font_unref (week_view->small_font); - - gdk_cursor_destroy (week_view->normal_cursor); - gdk_cursor_destroy (week_view->move_cursor); - gdk_cursor_destroy (week_view->resize_width_cursor); - - GTK_OBJECT_CLASS (parent_class)->destroy (object); -} - - -static void -e_week_view_realize (GtkWidget *widget) -{ - EWeekView *week_view; - - if (GTK_WIDGET_CLASS (parent_class)->realize) - (*GTK_WIDGET_CLASS (parent_class)->realize)(widget); - - week_view = E_WEEK_VIEW (widget); - week_view->main_gc = gdk_gc_new (widget->window); -} - - -static void -e_week_view_unrealize (GtkWidget *widget) -{ - EWeekView *week_view; - - week_view = E_WEEK_VIEW (widget); - - gdk_gc_unref (week_view->main_gc); - week_view->main_gc = NULL; - - if (GTK_WIDGET_CLASS (parent_class)->unrealize) - (*GTK_WIDGET_CLASS (parent_class)->unrealize)(widget); -} - - -static void -e_week_view_style_set (GtkWidget *widget, - GtkStyle *previous_style) -{ - EWeekView *week_view; - GdkFont *font; - gint day, day_width, max_day_width, max_abbr_day_width; - gint month, month_width, max_month_width, max_abbr_month_width; - GDate date; - gchar buffer[128]; - - if (GTK_WIDGET_CLASS (parent_class)->style_set) - (*GTK_WIDGET_CLASS (parent_class)->style_set)(widget, previous_style); - - week_view = E_WEEK_VIEW (widget); - font = widget->style->font; - - /* Recalculate the height of each row based on the font size. */ - week_view->row_height = font->ascent + font->descent + E_WEEK_VIEW_EVENT_BORDER_HEIGHT * 2 + E_WEEK_VIEW_EVENT_TEXT_Y_PAD * 2; - week_view->row_height = MAX (week_view->row_height, E_WEEK_VIEW_ICON_HEIGHT + E_WEEK_VIEW_ICON_Y_PAD + E_WEEK_VIEW_EVENT_BORDER_HEIGHT * 2); - - /* Set the height of the top canvas. */ - gtk_widget_set_usize (week_view->titles_canvas, -1, - font->ascent + font->descent + 5); - - /* Save the sizes of various strings in the font, so we can quickly - decide which date formats to use. */ - g_date_clear (&date, 1); - g_date_set_dmy (&date, 27, 3, 2000); /* Must be a Monday. */ - - max_day_width = 0; - max_abbr_day_width = 0; - for (day = 0; day < 7; day++) { - g_date_strftime (buffer, 128, "%A", &date); - day_width = gdk_string_width (font, buffer); - week_view->day_widths[day] = day_width; - max_day_width = MAX (max_day_width, day_width); - - g_date_strftime (buffer, 128, "%a", &date); - day_width = gdk_string_width (font, buffer); - week_view->abbr_day_widths[day] = day_width; - max_abbr_day_width = MAX (max_abbr_day_width, day_width); - - g_date_add_days (&date, 1); - } - - max_month_width = 0; - max_abbr_month_width = 0; - for (month = 0; month < 12; month++) { - g_date_set_month (&date, month + 1); - - g_date_strftime (buffer, 128, "%B", &date); - month_width = gdk_string_width (font, buffer); - week_view->month_widths[month] = month_width; - max_month_width = MAX (max_month_width, month_width); - - g_date_strftime (buffer, 128, "%b", &date); - month_width = gdk_string_width (font, buffer); - week_view->abbr_month_widths[month] = month_width; - max_abbr_month_width = MAX (max_abbr_month_width, month_width); - } - - week_view->space_width = gdk_string_width (font, " "); - week_view->colon_width = gdk_string_width (font, ":"); - week_view->slash_width = gdk_string_width (font, "/"); - week_view->digit_width = gdk_string_width (font, "5"); - if (week_view->small_font) - week_view->small_digit_width = gdk_string_width (week_view->small_font, "5"); - week_view->max_day_width = max_day_width; - week_view->max_abbr_day_width = max_abbr_day_width; - week_view->max_month_width = max_month_width; - week_view->max_abbr_month_width = max_abbr_month_width; -} - - -/* This recalculates the sizes of each column. */ -static void -e_week_view_size_allocate (GtkWidget *widget, GtkAllocation *allocation) -{ - EWeekView *week_view; - gint width, height, time_width; - gdouble old_x2, old_y2, new_x2, new_y2; - GdkFont *font; - - week_view = E_WEEK_VIEW (widget); - font = widget->style->font; - - (*GTK_WIDGET_CLASS (parent_class)->size_allocate) (widget, allocation); - - e_week_view_recalc_cell_sizes (week_view); - - /* Calculate the number of rows of events in each cell, for the large - cells and the compressed weekend cells. */ - if (week_view->display_month) { - week_view->events_y_offset = E_WEEK_VIEW_DATE_T_PAD - + font->ascent + font->descent - + E_WEEK_VIEW_DATE_B_PAD; - } else { - week_view->events_y_offset = E_WEEK_VIEW_DATE_T_PAD - + font->ascent + font->descent - + E_WEEK_VIEW_DATE_LINE_T_PAD + 1 - + E_WEEK_VIEW_DATE_LINE_B_PAD; - } - - height = week_view->row_heights[0]; - week_view->rows_per_cell = (height * 2 - week_view->events_y_offset) - / (week_view->row_height + E_WEEK_VIEW_EVENT_Y_SPACING); - week_view->rows_per_cell = MIN (week_view->rows_per_cell, - E_WEEK_VIEW_MAX_ROWS_PER_CELL); - - week_view->rows_per_compressed_cell = - (height - week_view->events_y_offset) - / (week_view->row_height + E_WEEK_VIEW_EVENT_Y_SPACING); - week_view->rows_per_compressed_cell = MIN (week_view->rows_per_compressed_cell, - E_WEEK_VIEW_MAX_ROWS_PER_CELL); - - /* Determine which time format to use, based on the width of the cells. - We only allow the time to take up about half of the width. */ - width = week_view->col_widths[0]; - - week_view->time_format = E_WEEK_VIEW_TIME_NONE; - if (week_view->use_small_font && week_view->small_font) { - time_width = week_view->digit_width * 2 - + week_view->small_digit_width * 2; - if (width / 2 > time_width * 2 + week_view->space_width) - week_view->time_format = E_WEEK_VIEW_TIME_BOTH_SMALL_MIN; - else if (width / 2 > time_width) - week_view->time_format = E_WEEK_VIEW_TIME_START_SMALL_MIN; - } else { - time_width = week_view->digit_width * 4 - + week_view->colon_width; - if (width / 2 > time_width * 2 + week_view->space_width) - week_view->time_format = E_WEEK_VIEW_TIME_BOTH; - else if (width / 2 > time_width) - week_view->time_format = E_WEEK_VIEW_TIME_START; - } - - /* Set the scroll region of the top canvas to its allocated size. */ - gnome_canvas_get_scroll_region (GNOME_CANVAS (week_view->titles_canvas), - NULL, NULL, &old_x2, &old_y2); - new_x2 = week_view->titles_canvas->allocation.width - 1; - new_y2 = week_view->titles_canvas->allocation.height - 1; - if (old_x2 != new_x2 || old_y2 != new_y2) - gnome_canvas_set_scroll_region (GNOME_CANVAS (week_view->titles_canvas), - 0, 0, new_x2, new_y2); - - - /* Set the scroll region of the main canvas to its allocated width, - but with the height depending on the number of rows needed. */ - gnome_canvas_get_scroll_region (GNOME_CANVAS (week_view->main_canvas), - NULL, NULL, &old_x2, &old_y2); - new_x2 = week_view->main_canvas->allocation.width - 1; - new_y2 = week_view->main_canvas->allocation.height - 1; - if (old_x2 != new_x2 || old_y2 != new_y2) - gnome_canvas_set_scroll_region (GNOME_CANVAS (week_view->main_canvas), - 0, 0, new_x2, new_y2); - - /* Flag that we need to reshape the events. */ - if (old_x2 != new_x2 || old_y2 != new_y2) { - week_view->events_need_reshape = TRUE; - e_week_view_check_layout (week_view); - } -} - - -static void -e_week_view_recalc_cell_sizes (EWeekView *week_view) -{ - gfloat width, height, offset; - gint row, col; - - if (week_view->display_month) { - week_view->rows = 10; - week_view->columns = 6; - } else { - week_view->rows = 6; - week_view->columns = 2; - } - - /* Calculate the column sizes, using floating point so that pixels - get divided evenly. Note that we use one more element than the - number of columns, to make it easy to get the column widths. - We also add one to the width so that the right border of the last - column is off the edge of the displayed area. */ - width = week_view->main_canvas->allocation.width + 1; - width /= week_view->columns; - offset = 0; - for (col = 0; col <= week_view->columns; col++) { - week_view->col_offsets[col] = floor (offset + 0.5); - offset += width; - } - - /* Calculate the cell widths based on the offsets. */ - for (col = 0; col < week_view->columns; col++) { - week_view->col_widths[col] = week_view->col_offsets[col + 1] - - week_view->col_offsets[col]; - } - - /* Now do the same for the row heights. */ - height = week_view->main_canvas->allocation.height + 1; - height /= week_view->rows; - offset = 0; - for (row = 0; row <= week_view->rows; row++) { - week_view->row_offsets[row] = floor (offset + 0.5); - offset += height; - } - - /* Calculate the cell heights based on the offsets. */ - for (row = 0; row < week_view->rows; row++) { - week_view->row_heights[row] = week_view->row_offsets[row + 1] - - week_view->row_offsets[row]; - } -} - - -static gint -e_week_view_focus_in (GtkWidget *widget, GdkEventFocus *event) -{ - EWeekView *week_view; - - g_return_val_if_fail (widget != NULL, FALSE); - g_return_val_if_fail (E_IS_WEEK_VIEW (widget), FALSE); - g_return_val_if_fail (event != NULL, FALSE); - - week_view = E_WEEK_VIEW (widget); - - GTK_WIDGET_SET_FLAGS (widget, GTK_HAS_FOCUS); - - gtk_widget_queue_draw (week_view->main_canvas); - - return FALSE; -} - - -static gint -e_week_view_focus_out (GtkWidget *widget, GdkEventFocus *event) -{ - EWeekView *week_view; - - g_return_val_if_fail (widget != NULL, FALSE); - g_return_val_if_fail (E_IS_WEEK_VIEW (widget), FALSE); - g_return_val_if_fail (event != NULL, FALSE); - - week_view = E_WEEK_VIEW (widget); - - GTK_WIDGET_UNSET_FLAGS (widget, GTK_HAS_FOCUS); - - gtk_widget_queue_draw (week_view->main_canvas); - - return FALSE; -} - - -/* This draws a shadow around the top display and main display. */ -static gint -e_week_view_expose_event (GtkWidget *widget, - GdkEventExpose *event) -{ - EWeekView *week_view; - - week_view = E_WEEK_VIEW (widget); - - e_week_view_draw_shadow (week_view); - - if (GTK_WIDGET_CLASS (parent_class)->expose_event) - (*GTK_WIDGET_CLASS (parent_class)->expose_event)(widget, event); - - return FALSE; -} - - -static void -e_week_view_draw (GtkWidget *widget, - GdkRectangle *area) -{ - EWeekView *week_view; - - week_view = E_WEEK_VIEW (widget); - - e_week_view_draw_shadow (week_view); - - if (GTK_WIDGET_CLASS (parent_class)->draw) - (*GTK_WIDGET_CLASS (parent_class)->draw)(widget, area); -} - - -static void -e_week_view_draw_shadow (EWeekView *week_view) -{ - gint x1, y1, x2, y2; - GtkStyle *style; - GdkGC *light_gc, *dark_gc; - GdkWindow *window; - - /* Draw the shadow around the graphical displays. */ - x1 = week_view->main_canvas->allocation.x - 1; - y1 = week_view->main_canvas->allocation.y - 1; - x2 = x1 + week_view->main_canvas->allocation.width + 2; - y2 = y1 + week_view->main_canvas->allocation.height + 2; - - style = GTK_WIDGET (week_view)->style; - dark_gc = style->dark_gc[GTK_STATE_NORMAL]; - light_gc = style->light_gc[GTK_STATE_NORMAL]; - - window = GTK_WIDGET (week_view)->window; - gdk_draw_line (window, dark_gc, x1, y1, x1, y2); - gdk_draw_line (window, dark_gc, x1, y1, x2, y1); - gdk_draw_line (window, light_gc, x2, y1, x2, y2); - gdk_draw_line (window, light_gc, x1, y2, x2, y2); -} - - -void -e_week_view_set_calendar (EWeekView *week_view, - GnomeCalendar *calendar) -{ - g_return_if_fail (E_IS_WEEK_VIEW (week_view)); - - week_view->calendar = calendar; - - /* FIXME: free current events? */ -} - - -/* This sets the selected time range. The EWeekView will show the corresponding - month and the days between start_time and end_time will be selected. - To select a single day, use the same value for start_time & end_time. */ -void -e_week_view_set_selected_time_range (EWeekView *week_view, - time_t start_time, - time_t end_time) -{ - GDate date, base_date, end_date; - gint day_offset, num_days; - gboolean update_adjustment_value = FALSE; - - g_return_if_fail (E_IS_WEEK_VIEW (week_view)); - - g_date_clear (&date, 1); - g_date_set_time (&date, start_time); - - if (week_view->display_month) { - /* Find the number of days since the start of the month. */ - day_offset = g_date_day (&date) - 1; - - /* Find the 1st Monday at or before the start of the month. */ - base_date = date; - g_date_set_day (&base_date, 1); - day_offset += g_date_weekday (&base_date) - 1; - } else { - /* Find the 1st Monday at or before the given day. */ - day_offset = g_date_weekday (&date) - 1; - } - - /* Calculate the base date, i.e. the first day shown when the - scrollbar adjustment value is 0. */ - base_date = date; - g_date_subtract_days (&base_date, day_offset); - - /* See if we need to update the base date. */ - if (!g_date_valid (&week_view->base_date) - || g_date_compare (&week_view->base_date, &base_date)) { - week_view->base_date = base_date; - update_adjustment_value = TRUE; - } - - /* See if we need to update the first day shown. */ - if (!g_date_valid (&week_view->first_day_shown) - || g_date_compare (&week_view->first_day_shown, &base_date)) { - week_view->first_day_shown = base_date; - start_time = time_add_day (start_time, -day_offset); - start_time = time_day_begin (start_time); - e_week_view_recalc_day_starts (week_view, start_time); - e_week_view_reload_events (week_view); - } - - /* Set the selection to the given days. */ - week_view->selection_start_day = g_date_julian (&date) - - g_date_julian (&base_date); - if (end_time == start_time - || end_time <= time_add_day (start_time, 1)) - week_view->selection_end_day = week_view->selection_start_day; - else { - g_date_clear (&end_date, 1); - g_date_set_time (&end_date, end_time - 60); - week_view->selection_end_day = g_date_julian (&end_date) - - g_date_julian (&base_date); - } - - /* Make sure the selection is valid. */ - num_days = week_view->display_month ? E_WEEK_VIEW_MAX_WEEKS * 7 : 7; - num_days--; - week_view->selection_start_day = CLAMP (week_view->selection_start_day, - 0, num_days); - week_view->selection_end_day = CLAMP (week_view->selection_end_day, - week_view->selection_start_day, - num_days); - - /* Reset the adjustment value to 0 if the base address has changed. - Note that we do this after updating first_day_shown so that our - signal handler will not try to reload the events. */ - if (update_adjustment_value) - gtk_adjustment_set_value (GTK_RANGE (week_view->vscrollbar)->adjustment, 0); - - - gtk_widget_queue_draw (week_view->main_canvas); -} - - -/* Returns the selected time range. */ -void -e_week_view_get_selected_time_range (EWeekView *week_view, - time_t *start_time, - time_t *end_time) -{ - gint start_day, end_day; - - start_day = week_view->selection_start_day; - end_day = week_view->selection_end_day; - - if (start_day == -1) { - start_day = 0; - end_day = 0; - } - - *start_time = week_view->day_starts[start_day]; - *end_time = week_view->day_starts[end_day + 1]; -} - - -/* Recalculates the time_t corresponding to the start of each day. */ -static void -e_week_view_recalc_day_starts (EWeekView *week_view, - time_t lower) -{ - gint num_days, day; - time_t tmp_time; - - num_days = week_view->display_month ? E_WEEK_VIEW_MAX_WEEKS * 7 : 7; - - tmp_time = lower; - week_view->day_starts[0] = tmp_time; - for (day = 1; day <= num_days; day++) { - /* FIXME: There is a bug in time_add_day(). */ -#if 0 - g_print ("Day:%i - %s\n", day, ctime (&tmp_time)); -#endif - tmp_time = time_add_day (tmp_time, 1); - week_view->day_starts[day] = tmp_time; - } -} - - -gboolean -e_week_view_get_display_month (EWeekView *week_view) -{ - g_return_val_if_fail (E_IS_WEEK_VIEW (week_view), FALSE); - - return week_view->display_month; -} - - -void -e_week_view_set_display_month (EWeekView *week_view, - gboolean display_month) -{ - GtkAdjustment *adjustment; - gint page_increment, page_size; - - g_return_if_fail (E_IS_WEEK_VIEW (week_view)); - - if (week_view->display_month == display_month) - return; - - week_view->display_month = display_month; - - if (display_month) { - gtk_widget_show (week_view->titles_canvas); - page_increment = 4; - page_size = 5; - } else { - gtk_widget_hide (week_view->titles_canvas); - page_increment = page_size = 1; - } - - adjustment = GTK_RANGE (week_view->vscrollbar)->adjustment; - adjustment->page_increment = page_increment; - adjustment->page_size = page_size; - gtk_adjustment_changed (adjustment); - - /* FIXME: Need to change start date and adjustment value? */ - - e_week_view_recalc_day_starts (week_view, week_view->day_starts[0]); - e_week_view_recalc_cell_sizes (week_view); - e_week_view_reload_events (week_view); -} - - -gboolean -e_week_view_get_compress_weekend (EWeekView *week_view) -{ - g_return_val_if_fail (E_IS_WEEK_VIEW (week_view), FALSE); - - return week_view->compress_weekend; -} - - -void -e_week_view_set_compress_weekend (EWeekView *week_view, - gboolean compress) -{ - g_return_if_fail (E_IS_WEEK_VIEW (week_view)); - - if (week_view->compress_weekend == compress) - return; - - week_view->compress_weekend = compress; - - /* The option only affects the month view. */ - if (!week_view->display_month) - return; - - /* FIXME: Need to update layout. */ -} - - -/* This reloads all calendar events. */ -void -e_week_view_update_all_events (EWeekView *week_view) -{ - e_week_view_reload_events (week_view); -} - - -/* This is called when one event has been added or updated. */ -void -e_week_view_update_event (EWeekView *week_view, - const gchar *uid) -{ - EWeekViewEvent *event; - gint event_num, num_days; - gchar *obj_string; - iCalObject *ico; - CalObjFindStatus status; - - g_return_if_fail (E_IS_WEEK_VIEW (week_view)); - -#if 0 - g_print ("In e_week_view_update_event\n"); -#endif - - /* If we don't have a calendar or valid date set yet, just return. */ - if (!week_view->calendar - || !g_date_valid (&week_view->first_day_shown)) - return; - - /* Get the event from the server. */ - obj_string = cal_client_get_object (week_view->calendar->client, uid); - status = ical_object_find_in_string (uid, obj_string, &ico); - g_free (obj_string); - - switch (status) { - case CAL_OBJ_FIND_SUCCESS: - /* Do nothing. */ - break; - case CAL_OBJ_FIND_SYNTAX_ERROR: - g_warning ("syntax error uid=%s\n", uid); - return; - case CAL_OBJ_FIND_NOT_FOUND: - g_warning ("obj not found uid=%s\n", uid); - return; - } - - /* We only care about events. */ - if (ico && ico->type != ICAL_EVENT) { - ical_object_unref (ico); - return; - } - - /* If the event already exists and the dates didn't change, we can - update the event fairly easily without changing the events arrays - or computing a new layout. */ - if (e_week_view_find_event_from_uid (week_view, uid, &event_num)) { - event = &g_array_index (week_view->events, EWeekViewEvent, - event_num); - - if (ical_object_compare_dates (event->ico, ico)) { - e_week_view_foreach_event_with_uid (week_view, uid, e_week_view_update_event_cb, ico); - ical_object_unref (ico); - gtk_widget_queue_draw (week_view->main_canvas); - return; - } - - /* The dates have changed, so we need to remove the - old occurrrences before adding the new ones. */ - e_week_view_foreach_event_with_uid (week_view, uid, - e_week_view_remove_event_cb, - NULL); - } - - /* Add the occurrences of the event. */ - num_days = week_view->display_month ? E_WEEK_VIEW_MAX_WEEKS * 7 : 7; - ical_object_generate_events (ico, - week_view->day_starts[0], - week_view->day_starts[num_days], - e_week_view_add_event, - week_view); - ical_object_unref (ico); - - e_week_view_check_layout (week_view); - - gtk_widget_queue_draw (week_view->main_canvas); -} - - -static gboolean -e_week_view_update_event_cb (EWeekView *week_view, - gint event_num, - gpointer data) -{ - EWeekViewEvent *event; - EWeekViewEventSpan *span; - gint span_num; - gchar *text; - iCalObject *ico; - - ico = data; - - event = &g_array_index (week_view->events, EWeekViewEvent, event_num); - event->ico = ico; - ical_object_ref (ico); - - /* If we are editing an event which we have just created, we will get - an update_event callback from the server. But we need to ignore it - or we will lose the text the user has already typed in. */ - if (week_view->editing_new_event - && week_view->editing_event_num == event_num) { - return TRUE; - } - - for (span_num = 0; span_num < event->num_spans; span_num++) { - span = &g_array_index (week_view->spans, EWeekViewEventSpan, - event->spans_index + span_num); - - if (span->text_item) { - text = event->ico->summary; - gnome_canvas_item_set (span->text_item, - "text", text ? text : "", - NULL); - - e_week_view_reshape_event_span (week_view, event_num, - span_num); - } - } - - return TRUE; -} - - -/* This calls a given function for each event instance that matches the given - uid. Note that it is safe for the callback to remove the event (since we - step backwards through the arrays). */ -static void -e_week_view_foreach_event_with_uid (EWeekView *week_view, - const gchar *uid, - EWeekViewForeachEventCallback callback, - gpointer data) -{ - EWeekViewEvent *event; - gint event_num; - - for (event_num = week_view->events->len - 1; - event_num >= 0; - event_num--) { - event = &g_array_index (week_view->events, EWeekViewEvent, - event_num); - if (event->ico->uid - && !strcmp (uid, event->ico->uid)) { - if (!(*callback) (week_view, event_num, data)) - return; - } - } -} - - -/* This removes all the events associated with the given uid. Note that for - recurring events there may be more than one. If any events are found and - removed we need to layout the events again. */ -void -e_week_view_remove_event (EWeekView *week_view, - const gchar *uid) -{ - g_return_if_fail (E_IS_WEEK_VIEW (week_view)); - - e_week_view_foreach_event_with_uid (week_view, uid, - e_week_view_remove_event_cb, NULL); - - e_week_view_check_layout (week_view); - gtk_widget_queue_draw (week_view->main_canvas); -} - - -static gboolean -e_week_view_remove_event_cb (EWeekView *week_view, - gint event_num, - gpointer data) -{ - EWeekViewEvent *event; - EWeekViewEventSpan *span; - gint span_num; - - event = &g_array_index (week_view->events, EWeekViewEvent, event_num); - - /* If we were editing this event, set editing_event_num to -1 so - on_editing_stopped doesn't try to update the event. */ - if (week_view->editing_event_num == event_num) - week_view->editing_event_num = -1; - - /* We leave the span elements in the array, but set the canvas item - pointers to NULL. */ - for (span_num = 0; span_num < event->num_spans; span_num++) { - span = &g_array_index (week_view->spans, EWeekViewEventSpan, - event->spans_index + span_num); - - if (span->text_item) { - gtk_object_destroy (GTK_OBJECT (span->text_item)); - span->text_item = NULL; - } - if (span->background_item) { - gtk_object_destroy (GTK_OBJECT (span->background_item)); - span->background_item = NULL; - } - } - - ical_object_unref (event->ico); - - g_array_remove_index (week_view->events, event_num); - week_view->events_need_layout = TRUE; - - return TRUE; -} - - -void -e_week_view_get_day_position (EWeekView *week_view, - gint day, - gint *day_x, - gint *day_y, - gint *day_w, - gint *day_h) -{ - gint week, day_of_week, row; - - *day_x = *day_y = *day_w = *day_h = 0; - g_return_if_fail (day >= 0); - - if (week_view->display_month) { - g_return_if_fail (day < E_WEEK_VIEW_MAX_WEEKS * 7); - - week = day / 7; - day_of_week = day % 7; - if (week_view->compress_weekend && day_of_week >= 5) { - /* In the compressed view Saturday is above Sunday and - both have just one row as opposed to 2 for all the - other days. */ - if (day_of_week == 5) { - *day_y = week_view->row_offsets[week * 2]; - *day_h = week_view->row_heights[week * 2]; - } else { - *day_y = week_view->row_offsets[week * 2 + 1]; - *day_h = week_view->row_heights[week * 2 + 1]; - } - /* Both Saturday and Sunday are in the 6th column. */ - *day_x = week_view->col_offsets[5]; - *day_w = week_view->col_widths[5]; - } else { - *day_y = week_view->row_offsets[week * 2]; - *day_h = week_view->row_heights[week * 2] - + week_view->row_heights[week * 2 + 1]; - *day_x = week_view->col_offsets[day_of_week]; - *day_w = week_view->col_widths[day_of_week]; - } - } else { - g_return_if_fail (day < 7); - - /* The week view has Mon, Tue & Wed down the left column and - Thu, Fri & Sat/Sun down the right. */ - if (day < 3) { - *day_x = week_view->col_offsets[0]; - *day_w = week_view->col_widths[0]; - } else { - *day_x = week_view->col_offsets[1]; - *day_w = week_view->col_widths[1]; - } - - if (day < 5) { - row = (day % 3) * 2; - *day_y = week_view->row_offsets[row]; - *day_h = week_view->row_heights[row] - + week_view->row_heights[row + 1]; - } else { - /* Saturday & Sunday. */ - *day_y = week_view->row_offsets[day - 1]; - *day_h = week_view->row_heights[day - 1]; - } - } -} - - -/* Returns the bounding box for a span of an event. Usually this can easily - be determined by the start & end days and row of the span, which are set in - e_week_view_layout_event(). Though we need a special case for the weekends - when they are compressed, since the span may not fit. */ -gboolean -e_week_view_get_span_position (EWeekView *week_view, - gint event_num, - gint span_num, - gint *span_x, - gint *span_y, - gint *span_w) -{ - EWeekViewEvent *event; - EWeekViewEventSpan *span; - gint end_day_of_week, num_days; - gint start_x, start_y, start_w, start_h; - gint end_x, end_y, end_w, end_h; - - g_return_val_if_fail (E_IS_WEEK_VIEW (week_view), FALSE); - g_return_val_if_fail (event_num < week_view->events->len, FALSE); - - event = &g_array_index (week_view->events, EWeekViewEvent, event_num); - - g_return_val_if_fail (span_num < event->num_spans, FALSE); - - span = &g_array_index (week_view->spans, EWeekViewEventSpan, - event->spans_index + span_num); - - if (span->row >= week_view->rows_per_cell) - return FALSE; - - end_day_of_week = (span->start_day + span->num_days - 1) % 7; - num_days = span->num_days; - /* Check if the row will not be visible in compressed cells. */ - if (span->row >= week_view->rows_per_compressed_cell) { - if (week_view->display_month) { - if (week_view->compress_weekend) { - /* If it ends on a Saturday and is 1 day long - we skip it, else we shorten it. If it ends - on a Sunday it must be 1 day long and we - skip it. */ - if (end_day_of_week == 5) { /* Sat */ - if (num_days == 1) { - return FALSE; - } else { - num_days--; - } - } else if (end_day_of_week == 6) { /* Sun */ - return FALSE; - } - } - } else { - /* All spans are 1 day long in the week view, so we - just skip it. */ - if (end_day_of_week > 4) - return FALSE; - } - } - - e_week_view_get_day_position (week_view, span->start_day, - &start_x, &start_y, &start_w, &start_h); - *span_y = start_y + week_view->events_y_offset - + span->row * (week_view->row_height - + E_WEEK_VIEW_EVENT_Y_SPACING); - if (num_days == 1) { - *span_x = start_x; - *span_w = start_w; - } else { - e_week_view_get_day_position (week_view, - span->start_day + num_days - 1, - &end_x, &end_y, &end_w, &end_h); - *span_x = start_x; - *span_w = end_x - start_x + end_w; - } - - return TRUE; -} - - - -static gboolean -e_week_view_on_button_press (GtkWidget *widget, - GdkEventButton *event, - EWeekView *week_view) -{ - gint x, y, day; - -#if 0 - g_print ("In e_week_view_on_button_press\n"); -#endif - - /* If an event is pressed just return. */ - if (week_view->pressed_event_num != -1) - return FALSE; - - /* Convert the mouse position to a week & day. */ - x = event->x; - y = event->y; - day = e_week_view_convert_position_to_day (week_view, x, y); - if (day == -1) - return FALSE; - - /* Start the selection drag. */ - if (event->button == 1) { - if (!GTK_WIDGET_HAS_FOCUS (week_view)) - gtk_widget_grab_focus (GTK_WIDGET (week_view)); - - if (gdk_pointer_grab (GTK_LAYOUT (widget)->bin_window, FALSE, - GDK_POINTER_MOTION_MASK - | GDK_BUTTON_RELEASE_MASK, - FALSE, NULL, event->time) == 0) { - week_view->selection_start_day = day; - week_view->selection_end_day = day; - week_view->selection_drag_pos = E_WEEK_VIEW_DRAG_END; - - /* FIXME: Optimise? */ - gtk_widget_queue_draw (week_view->main_canvas); - } - } else if (event->button == 3) { - e_week_view_show_popup_menu (week_view, event, -1); - } - - return FALSE; -} - - -static gboolean -e_week_view_on_button_release (GtkWidget *widget, - GdkEventButton *event, - EWeekView *week_view) -{ - time_t start, end; - -#if 0 - g_print ("In e_week_view_on_button_release\n"); -#endif - - if (week_view->selection_drag_pos != E_WEEK_VIEW_DRAG_NONE) { - week_view->selection_drag_pos = E_WEEK_VIEW_DRAG_NONE; - gdk_pointer_ungrab (event->time); - start = week_view->day_starts[week_view->selection_start_day]; - end = week_view->day_starts[week_view->selection_end_day + 1]; - gnome_calendar_set_selected_time_range (week_view->calendar, - start, end); - } - - return FALSE; -} - - -static gboolean -e_week_view_on_motion (GtkWidget *widget, - GdkEventMotion *mevent, - EWeekView *week_view) -{ - gint x, y, day; - -#if 0 - g_print ("In e_week_view_on_motion\n"); -#endif - - /* Convert the mouse position to a week & day. */ - x = mevent->x; - y = mevent->y; - day = e_week_view_convert_position_to_day (week_view, x, y); - if (day == -1) - return FALSE; - - if (week_view->selection_drag_pos != E_WEEK_VIEW_DRAG_NONE) { - e_week_view_update_selection (week_view, day); - return TRUE; - } - - return FALSE; -} - - -/* Converts a position in the canvas window to a day offset from the first - day displayed. Returns -1 if the position is outside the grid. */ -static gint -e_week_view_convert_position_to_day (EWeekView *week_view, - gint x, - gint y) -{ - gint col, row, grid_x = -1, grid_y = -1, week, day; - - /* First we convert it to a grid position. */ - for (col = 0; col <= week_view->columns; col++) { - if (x < week_view->col_offsets[col]) { - grid_x = col - 1; - break; - } - } - - for (row = 0; row <= week_view->rows; row++) { - if (y < week_view->row_offsets[row]) { - grid_y = row - 1; - break; - } - } - - /* If the mouse is outside the grid return FALSE. */ - if (grid_x == -1 || grid_y == -1) - return -1; - - /* Now convert the grid position to a week and day. */ - if (week_view->display_month) { - week = grid_y / 2; - if (week_view->compress_weekend && grid_x == 5 - && grid_y % 2 == 1) - day = 6; - else - day = grid_x; - } else { - week = 0; - if (grid_x == 0) - day = grid_y / 2; - else if (grid_y == 5) - day = 6; - else - day = grid_y / 2 + 3; - } - - return week * 7 + day; -} - - -static void -e_week_view_update_selection (EWeekView *week_view, - gint day) -{ - gint tmp_day; - gboolean need_redraw = FALSE; - -#if 0 - g_print ("Updating selection %i,%i\n", week, day); -#endif - - if (week_view->selection_drag_pos == E_WEEK_VIEW_DRAG_START) { - if (day != week_view->selection_start_day) { - need_redraw = TRUE; - week_view->selection_start_day = day; - } - } else { - if (day != week_view->selection_end_day) { - need_redraw = TRUE; - week_view->selection_end_day = day; - } - } - - /* Switch the drag position if necessary. */ - if (week_view->selection_start_day > week_view->selection_end_day) { - tmp_day = week_view->selection_start_day; - week_view->selection_start_day = week_view->selection_end_day; - week_view->selection_end_day = tmp_day; - if (week_view->selection_drag_pos == E_WEEK_VIEW_DRAG_START) - week_view->selection_drag_pos = E_WEEK_VIEW_DRAG_END; - else - week_view->selection_drag_pos = E_WEEK_VIEW_DRAG_START; - } - - /* FIXME: Optimise? */ - if (need_redraw) { - gtk_widget_queue_draw (week_view->main_canvas); - } -} - - -static void -e_week_view_reload_events (EWeekView *week_view) -{ - gint num_days; - - e_week_view_free_events (week_view); - - if (week_view->calendar - && g_date_valid (&week_view->first_day_shown)) { - num_days = week_view->display_month - ? E_WEEK_VIEW_MAX_WEEKS * 7 : 7; - calendar_iterate (week_view->calendar, - week_view->day_starts[0], - week_view->day_starts[num_days], - e_week_view_add_event, - week_view); - } - - e_week_view_check_layout (week_view); - - gtk_widget_queue_draw (week_view->main_canvas); -} - - -static void -e_week_view_free_events (EWeekView *week_view) -{ - EWeekViewEvent *event; - EWeekViewEventSpan *span; - gint event_num, span_num; - - for (event_num = 0; event_num < week_view->events->len; event_num++) { - event = &g_array_index (week_view->events, EWeekViewEvent, - event_num); - ical_object_unref (event->ico); - } - - g_array_set_size (week_view->events, 0); - - /* Destroy all the old canvas items. */ - if (week_view->spans) { - for (span_num = 0; span_num < week_view->spans->len; - span_num++) { - span = &g_array_index (week_view->spans, - EWeekViewEventSpan, span_num); - if (span->background_item) - gtk_object_destroy (GTK_OBJECT (span->background_item)); - if (span->text_item) - gtk_object_destroy (GTK_OBJECT (span->text_item)); - } - g_array_free (week_view->spans, TRUE); - week_view->spans = NULL; - } -} - - -/* This adds one event to the view, adding it to the appropriate array. */ -static int -e_week_view_add_event (iCalObject *ico, - time_t start, - time_t end, - gpointer data) - -{ - EWeekView *week_view; - EWeekViewEvent event; - gint num_days; - struct tm start_tm, end_tm; - - week_view = E_WEEK_VIEW (data); - - /* Check that the event times are valid. */ - num_days = week_view->display_month ? E_WEEK_VIEW_MAX_WEEKS * 7 : 7; - -#if 0 - g_print ("View start:%li end:%li Event start:%li end:%li\n", - week_view->day_starts[0], week_view->day_starts[num_days], - start, end); -#endif - - g_return_val_if_fail (start <= end, TRUE); - g_return_val_if_fail (start < week_view->day_starts[num_days], TRUE); - g_return_val_if_fail (end > week_view->day_starts[0], TRUE); - - start_tm = *(localtime (&start)); - end_tm = *(localtime (&end)); - - event.ico = ico; - ical_object_ref (event.ico); - event.start = start; - event.end = end; - event.spans_index = 0; - event.num_spans = 0; - - event.start_minute = start_tm.tm_hour * 60 + start_tm.tm_min; - event.end_minute = end_tm.tm_hour * 60 + end_tm.tm_min; - if (event.end_minute == 0 && start != end) - event.end_minute = 24 * 60; - - g_array_append_val (week_view->events, event); - week_view->events_sorted = FALSE; - week_view->events_need_layout = TRUE; - return TRUE; -} - - -/* This lays out the events, or reshapes them, as necessary. */ -static void -e_week_view_check_layout (EWeekView *week_view) -{ - /* Don't bother if we aren't visible. */ - if (!GTK_WIDGET_VISIBLE (week_view)) - return; - - /* Make sure the events are sorted (by start and size). */ - e_week_view_ensure_events_sorted (week_view); - - if (week_view->events_need_layout) - e_week_view_layout_events (week_view); - - if (week_view->events_need_layout || week_view->events_need_reshape) - e_week_view_reshape_events (week_view); - - week_view->events_need_layout = FALSE; - week_view->events_need_reshape = FALSE; -} - - -static void -e_week_view_layout_events (EWeekView *week_view) -{ - EWeekViewEvent *event; - EWeekViewEventSpan *span; - gint event_num, span_num; - guint8 *grid; - GArray *spans, *old_spans; - - /* This is a temporary 2-d grid which is used to place events. - Each element is 0 if the position is empty, or 1 if occupied. - We allocate the maximum size possible here, assuming that each - event will need its own row. */ - grid = g_new0 (guint8, E_WEEK_VIEW_MAX_ROWS_PER_CELL * 7 - * E_WEEK_VIEW_MAX_WEEKS); - - /* We create a new array of spans, which will replace the old one. */ - spans = g_array_new (FALSE, FALSE, sizeof (EWeekViewEventSpan)); - - /* Iterate over the events, finding which weeks they cover, and putting - them in the first free row available. */ - for (event_num = 0; event_num < week_view->events->len; event_num++) { - event = &g_array_index (week_view->events, EWeekViewEvent, - event_num); - e_week_view_layout_event (week_view, event, grid, spans); - } - - /* Free the grid. */ - g_free (grid); - - /* Replace the spans array. */ - old_spans = week_view->spans; - week_view->spans = spans; - - /* Destroy the old spans array, destroying any unused canvas items. */ - if (old_spans) { - for (span_num = 0; span_num < old_spans->len; span_num++) { - span = &g_array_index (old_spans, EWeekViewEventSpan, - span_num); - if (span->background_item) - gtk_object_destroy (GTK_OBJECT (span->background_item)); - if (span->text_item) - gtk_object_destroy (GTK_OBJECT (span->text_item)); - } - g_array_free (old_spans, TRUE); - } -} - - -static void -e_week_view_layout_event (EWeekView *week_view, - EWeekViewEvent *event, - guint8 *grid, - GArray *spans) -{ - gint start_day, end_day, span_start_day, span_end_day, rows_per_cell; - gint free_row, row, day, span_num, spans_index, num_spans, max_day; - EWeekViewEventSpan span, *old_span; - - start_day = e_week_view_find_day (week_view, event->start, FALSE); - end_day = e_week_view_find_day (week_view, event->end, TRUE); - max_day = week_view->display_month ? E_WEEK_VIEW_MAX_WEEKS * 7 - 1 - : 7 - 1; - start_day = CLAMP (start_day, 0, max_day); - end_day = CLAMP (end_day, 0, max_day); - -#if 0 - g_print ("In e_week_view_layout_event Start:%i End: %i\n", - start_day, end_day); -#endif - - /* Iterate through each of the spans of the event, where each span - is a sequence of 1 or more days displayed next to each other. */ - span_start_day = start_day; - rows_per_cell = E_WEEK_VIEW_MAX_ROWS_PER_CELL; - span_num = 0; - spans_index = spans->len; - num_spans = 0; - while (span_start_day <= end_day) { - span_end_day = e_week_view_find_span_end (week_view, - span_start_day); - span_end_day = MIN (span_end_day, end_day); -#if 0 - g_print (" Span start:%i end:%i\n", span_start_day, - span_end_day); -#endif - /* Try each row until we find a free one or we fall off the - bottom of the available rows. */ - row = 0; - free_row = -1; - while (free_row == -1 && row < rows_per_cell) { - free_row = row; - for (day = span_start_day; day <= span_end_day; - day++) { - if (grid[day * rows_per_cell + row]) { - free_row = -1; - break; - } - } - row++; - }; - - if (free_row != -1) { - /* Mark the cells as full. */ - for (day = span_start_day; day <= span_end_day; - day++) { - grid[day * rows_per_cell + free_row] = 1; - } -#if 0 - g_print (" Span start:%i end:%i row:%i\n", - span_start_day, span_end_day, free_row); -#endif - /* Add the span to the array, and try to reuse any - canvas items from the old spans. */ - span.start_day = span_start_day; - span.num_days = span_end_day - span_start_day + 1; - span.row = free_row; - span.background_item = NULL; - span.text_item = NULL; - if (event->num_spans > span_num) { - old_span = &g_array_index (week_view->spans, EWeekViewEventSpan, event->spans_index + span_num); - span.background_item = old_span->background_item; - span.text_item = old_span->text_item; - old_span->background_item = NULL; - old_span->text_item = NULL; - } - - g_array_append_val (spans, span); - num_spans++; - } - - span_start_day = span_end_day + 1; - span_num++; - } - - /* Set the event's spans. */ - event->spans_index = spans_index; - event->num_spans = num_spans; -} - - -static void -e_week_view_ensure_events_sorted (EWeekView *week_view) -{ - if (!week_view->events_sorted) { - qsort (week_view->events->data, - week_view->events->len, - sizeof (EWeekViewEvent), - e_week_view_event_sort_func); - week_view->events_sorted = TRUE; - } -} - - -static gint -e_week_view_event_sort_func (const void *arg1, - const void *arg2) -{ - EWeekViewEvent *event1, *event2; - - event1 = (EWeekViewEvent*) arg1; - event2 = (EWeekViewEvent*) arg2; - - if (event1->start < event2->start) - return -1; - if (event1->start > event2->start) - return 1; - - if (event1->end > event2->end) - return -1; - if (event1->end < event2->end) - return 1; - - return 0; -} - - -static void -e_week_view_reshape_events (EWeekView *week_view) -{ - EWeekViewEvent *event; - gint event_num, span_num; - - for (event_num = 0; event_num < week_view->events->len; event_num++) { - event = &g_array_index (week_view->events, EWeekViewEvent, - event_num); - for (span_num = 0; span_num < event->num_spans; span_num++) { - e_week_view_reshape_event_span (week_view, event_num, - span_num); - } - } -} - - -static void -e_week_view_reshape_event_span (EWeekView *week_view, - gint event_num, - gint span_num) -{ - EWeekViewEvent *event; - EWeekViewEventSpan *span; - GdkFont *font; - gint span_x, span_y, span_w, num_icons, icons_width, time_width; - gint min_text_x, max_text_w, width; - gboolean show_icons = TRUE, use_max_width = FALSE; - gboolean one_day_event; - iCalObject *ico; - gdouble text_x, text_y, text_w, text_h; - gchar *text, *end_of_line; - gint line_len, text_width; - - event = &g_array_index (week_view->events, EWeekViewEvent, event_num); - span = &g_array_index (week_view->spans, EWeekViewEventSpan, - event->spans_index + span_num); - ico = event->ico; - font = GTK_WIDGET (week_view)->style->font; - - one_day_event = e_week_view_is_one_day_event (week_view, event_num); - - /* If the span will not be visible destroy the canvas items and - return. */ - if (!e_week_view_get_span_position (week_view, event_num, span_num, - &span_x, &span_y, &span_w)) { - if (span->background_item) - gtk_object_destroy (GTK_OBJECT (span->background_item)); - if (span->text_item) - gtk_object_destroy (GTK_OBJECT (span->text_item)); - span->background_item = NULL; - span->text_item = NULL; - return; - } - - if (!one_day_event && week_view->editing_event_num == event_num - && week_view->editing_span_num == span_num) { - show_icons = FALSE; - use_max_width = TRUE; - } - - num_icons = 0; - if (show_icons) { - if (ico->dalarm.enabled || ico->malarm.enabled - || ico->palarm.enabled || ico->aalarm.enabled) - num_icons++; - if (ico->recur) - num_icons++; - } - - /* Create the background canvas item if necessary. */ - if (!span->background_item) { - span->background_item = - gnome_canvas_item_new (GNOME_CANVAS_GROUP (GNOME_CANVAS (week_view->main_canvas)->root), - e_week_view_event_item_get_type (), - NULL); - } - - gnome_canvas_item_set (span->background_item, - "event_num", event_num, - "span_num", span_num, - NULL); - - /* Create the text item if necessary. */ - if (!span->text_item) { - span->text_item = - gnome_canvas_item_new (GNOME_CANVAS_GROUP (GNOME_CANVAS (week_view->main_canvas)->root), - e_text_get_type (), - "font_gdk", GTK_WIDGET (week_view)->style->font, - "anchor", GTK_ANCHOR_NW, - "clip", TRUE, -#if 0 - "max_lines", 1, -#endif - "editable", TRUE, - "text", ico->summary ? ico->summary : "", - NULL); - gtk_signal_connect (GTK_OBJECT (span->text_item), "event", - GTK_SIGNAL_FUNC (e_week_view_on_text_item_event), - week_view); - } - - /* Calculate the position of the text item. - For events < 1 day it starts after the times & icons and ends at the - right edge of the span. - For events > 1 day we need to determine whether times are shown at - the start and end of the span, then try to center the text item with - the icons in the middle, but making sure we don't go over the times. - */ - - - /* Calculate the space necessary to display a time, e.g. "13:00". */ - if (week_view->use_small_font && week_view->small_font) - time_width = week_view->digit_width * 2 - + week_view->small_digit_width * 2; - else - time_width = week_view->digit_width * 4 - + week_view->colon_width; - - /* Calculate the space needed for the icons. */ - icons_width = (E_WEEK_VIEW_ICON_WIDTH + E_WEEK_VIEW_ICON_X_PAD) - * num_icons; - - /* The y position and height are the same for both event types. */ - text_y = span_y + E_WEEK_VIEW_EVENT_BORDER_HEIGHT - + E_WEEK_VIEW_EVENT_TEXT_Y_PAD; - text_h = font->ascent + font->descent; - - if (one_day_event) { - text_x = span_x + E_WEEK_VIEW_EVENT_L_PAD + icons_width; - - switch (week_view->time_format) { - case E_WEEK_VIEW_TIME_BOTH_SMALL_MIN: - case E_WEEK_VIEW_TIME_BOTH: - text_x += time_width * 2 + week_view->space_width - + E_WEEK_VIEW_EVENT_TIME_R_PAD; - break; - case E_WEEK_VIEW_TIME_START_SMALL_MIN: - case E_WEEK_VIEW_TIME_START: - text_x += time_width + E_WEEK_VIEW_EVENT_TIME_R_PAD; - break; - case E_WEEK_VIEW_TIME_NONE: - break; - } - text_w = span_x + span_w - E_WEEK_VIEW_EVENT_BORDER_WIDTH - - E_WEEK_VIEW_EVENT_R_PAD - text_x; - - } else { - if (use_max_width) { - text_x = span_x + E_WEEK_VIEW_EVENT_L_PAD - + E_WEEK_VIEW_EVENT_BORDER_WIDTH - + E_WEEK_VIEW_EVENT_TEXT_X_PAD; - text_w = span_x + span_w - E_WEEK_VIEW_EVENT_R_PAD - - E_WEEK_VIEW_EVENT_BORDER_WIDTH - - E_WEEK_VIEW_EVENT_TEXT_X_PAD - text_x; - } else { - /* Get the requested size of the label. */ - gtk_object_get (GTK_OBJECT (span->text_item), - "text", &text, - NULL); - text_width = 0; - if (text) { - end_of_line = strchr (text, '\n'); - if (end_of_line) - line_len = end_of_line - text; - else - line_len = strlen (text); - text_width = gdk_text_width (font, text, line_len); - g_free (text); - } - - /* Add on the width of the icons and find the default - position. */ - width = text_width + icons_width; - text_x = span_x + (span_w - width) / 2; - - /* Now calculate the left-most valid position, and make - sure we don't go to the left of that. */ - min_text_x = span_x + E_WEEK_VIEW_EVENT_L_PAD - + E_WEEK_VIEW_EVENT_BORDER_WIDTH - + E_WEEK_VIEW_EVENT_TEXT_X_PAD; - if (event->start > week_view->day_starts[span->start_day]) - min_text_x += time_width - + E_WEEK_VIEW_EVENT_TIME_R_PAD; - - text_x = MAX (text_x, min_text_x); - - /* Now calculate the largest valid width, using the - calculated x position, and make sure we don't - exceed that. */ - max_text_w = span_x + span_w - E_WEEK_VIEW_EVENT_R_PAD - - E_WEEK_VIEW_EVENT_BORDER_WIDTH - - E_WEEK_VIEW_EVENT_TEXT_X_PAD - text_x; - if (event->end < week_view->day_starts[span->start_day - + span->num_days]) - max_text_w -= time_width - + E_WEEK_VIEW_EVENT_TIME_R_PAD; - - text_w = MIN (width, max_text_w); - - /* Now take out the space for the icons. */ - text_x += icons_width; - text_w -= icons_width; - } - } - - text_w = MAX (text_w, 0); - gnome_canvas_item_set (span->text_item, - "x", (gdouble) text_x, - "y", (gdouble) text_y, - "clip_width", (gdouble) text_w, - "clip_height", (gdouble) text_h, - NULL); -} - - -/* Finds the day containing the given time. - If include_midnight_in_prev_day is TRUE then if the time exactly - matches the start of a day the previous day is returned. This is useful - when calculating the end day of an event. */ -static gint -e_week_view_find_day (EWeekView *week_view, - time_t time_to_find, - gboolean include_midnight_in_prev_day) -{ - gint num_days, day; - time_t *day_starts; - - num_days = week_view->display_month ? E_WEEK_VIEW_MAX_WEEKS * 7 : 7; - day_starts = week_view->day_starts; - - if (time_to_find < day_starts[0]) - return -1; - if (time_to_find > day_starts[num_days]) - return num_days; - - for (day = 1; day <= num_days; day++) { - if (time_to_find <= day_starts[day]) { - if (time_to_find == day_starts[day] - && !include_midnight_in_prev_day) - return day; - return day - 1; - } - } - - g_assert_not_reached (); - return num_days; -} - - -/* This returns the last day in the same span as the given day. A span is all - the days which are displayed next to each other from left to right. - In the week view all spans are only 1 day, since Tuesday is below Monday - rather than beside it etc. In the month view, if the weekends are not - compressed then each week is a span, otherwise Monday to Saturday of each - week is a span, and the Sundays are separate spans. */ -static gint -e_week_view_find_span_end (EWeekView *week_view, - gint day) -{ - gint week, day_of_week, end_day; - - if (week_view->display_month) { - week = day / 7; - day_of_week = day % 7; - if (week_view->compress_weekend && day_of_week <= 5) - end_day = 5; - else - end_day = 6; - return week * 7 + end_day; - } else { - return day; - } -} - - -static void -e_week_view_on_adjustment_changed (GtkAdjustment *adjustment, - EWeekView *week_view) -{ - GDate date; - gint week_offset; - struct tm tm; - time_t lower, start, end; - guint32 old_first_day_julian, new_first_day_julian; - - /* If we don't have a valid date set yet, just return. */ - if (!g_date_valid (&week_view->first_day_shown)) - return; - - /* Determine the first date shown. */ - date = week_view->base_date; - week_offset = floor (adjustment->value + 0.5); - g_date_add_days (&date, week_offset * 7); - - /* Convert the old & new first days shown to julian values. */ - old_first_day_julian = g_date_julian (&week_view->first_day_shown); - new_first_day_julian = g_date_julian (&date); - - /* If we are already showing the date, just return. */ - if (old_first_day_julian == new_first_day_julian) - return; - - /* Set the new first day shown. */ - week_view->first_day_shown = date; - - /* Convert it to a time_t. */ - g_date_to_struct_tm (&date, &tm); - lower = mktime (&tm); - lower = time_day_begin (lower); - - e_week_view_recalc_day_starts (week_view, lower); - e_week_view_reload_events (week_view); - - /* Update the selection, if needed. */ - if (week_view->selection_start_day != -1) { - start = week_view->day_starts[week_view->selection_start_day]; - end = week_view->day_starts[week_view->selection_end_day + 1]; - gnome_calendar_set_selected_time_range (week_view->calendar, - start, end); - } - - gtk_widget_queue_draw (week_view->main_canvas); -} - - -void -e_week_view_start_editing_event (EWeekView *week_view, - gint event_num, - gint span_num, - gchar *initial_text) -{ - EWeekViewEvent *event; - EWeekViewEventSpan *span; - ETextEventProcessor *event_processor = NULL; - ETextEventProcessorCommand command; - - /* If we are already editing the event, just return. */ - if (event_num == week_view->editing_event_num - && span_num == week_view->editing_span_num) - return; - - event = &g_array_index (week_view->events, EWeekViewEvent, event_num); - span = &g_array_index (week_view->spans, EWeekViewEventSpan, - event->spans_index + span_num); - - /* If the event is not shown, don't try to edit it. */ - if (!span->text_item) - return; - - if (initial_text) { - gnome_canvas_item_set (span->text_item, - "text", initial_text, - NULL); - } - - e_canvas_item_grab_focus (span->text_item); - - /* Try to move the cursor to the end of the text. */ - gtk_object_get (GTK_OBJECT (span->text_item), - "event_processor", &event_processor, - NULL); - if (event_processor) { - command.action = E_TEP_MOVE; - command.position = E_TEP_END_OF_BUFFER; - gtk_signal_emit_by_name (GTK_OBJECT (event_processor), - "command", &command); - } -} - - -/* This stops the current edit. If accept is TRUE the event summary is update, - else the edit is cancelled. */ -void -e_week_view_stop_editing_event (EWeekView *week_view) -{ - GtkWidget *toplevel; - - /* Check we are editing an event. */ - if (week_view->editing_event_num == -1) - return; - - /* Set focus to the toplevel so the item loses focus. */ - toplevel = gtk_widget_get_toplevel (GTK_WIDGET (week_view)); - if (toplevel && GTK_IS_WINDOW (toplevel)) - gtk_window_set_focus (GTK_WINDOW (toplevel), NULL); -} - - -static gboolean -e_week_view_on_text_item_event (GnomeCanvasItem *item, - GdkEvent *event, - EWeekView *week_view) -{ - gint event_num, span_num; - -#if 0 - g_print ("In e_week_view_on_text_item_event\n"); -#endif - - switch (event->type) { - case GDK_KEY_PRESS: - if (event && event->key.keyval == GDK_Return) { - /* We set the keyboard focus to the EDayView, so the - EText item loses it and stops the edit. */ - gtk_widget_grab_focus (GTK_WIDGET (week_view)); - - /* Stop the signal last or we will also stop any - other events getting to the EText item. */ - gtk_signal_emit_stop_by_name (GTK_OBJECT (item), - "event"); - return TRUE; - } - break; - case GDK_BUTTON_PRESS: - if (!e_week_view_find_event_from_item (week_view, item, - &event_num, &span_num)) - return FALSE; - - if (event->button.button == 3) { - e_week_view_show_popup_menu (week_view, - (GdkEventButton*) event, - event_num); - gtk_signal_emit_stop_by_name (GTK_OBJECT (item->canvas), - "button_press_event"); - return TRUE; - } - - week_view->pressed_event_num = event_num; - week_view->pressed_span_num = span_num; - - /* Only let the EText handle the event while editing. */ - if (!E_TEXT (item)->editing) { - gtk_signal_emit_stop_by_name (GTK_OBJECT (item), - "event"); - - if (event) { - week_view->drag_event_x = event->button.x; - week_view->drag_event_y = event->button.y; - } else - g_warning ("No GdkEvent"); - - /* FIXME: Remember the day offset from the start of - the event. */ - - return TRUE; - } - break; - case GDK_BUTTON_RELEASE: - if (!E_TEXT (item)->editing) { - /* This shouldn't ever happen. */ - if (!e_week_view_find_event_from_item (week_view, - item, - &event_num, - &span_num)) - return FALSE; - - if (week_view->pressed_event_num != -1 - && week_view->pressed_event_num == event_num - && week_view->pressed_span_num == span_num) { - e_week_view_start_editing_event (week_view, - event_num, - span_num, - NULL); - week_view->pressed_event_num = -1; - } - - /* Stop the signal last or we will also stop any - other events getting to the EText item. */ - gtk_signal_emit_stop_by_name (GTK_OBJECT (item), - "event"); - return TRUE; - } - week_view->pressed_event_num = -1; - break; - case GDK_FOCUS_CHANGE: - if (event->focus_change.in) { - e_week_view_on_editing_started (week_view, item); - } else { - e_week_view_on_editing_stopped (week_view, item); - } - - return FALSE; - default: - break; - } - - return FALSE; -} - - -static void -e_week_view_on_editing_started (EWeekView *week_view, - GnomeCanvasItem *item) -{ - gint event_num, span_num; - - if (!e_week_view_find_event_from_item (week_view, item, - &event_num, &span_num)) - return; - -#if 0 - g_print ("In e_week_view_on_editing_started event_num:%i span_num:%i\n", event_num, span_num); -#endif - - week_view->editing_event_num = event_num; - week_view->editing_span_num = span_num; - - /* We need to reshape long events so the whole width is used while - editing. */ - if (!e_week_view_is_one_day_event (week_view, event_num)) { - e_week_view_reshape_event_span (week_view, event_num, - span_num); - } -} - - -static void -e_week_view_on_editing_stopped (EWeekView *week_view, - GnomeCanvasItem *item) -{ - gint event_num, span_num; - EWeekViewEvent *event; - EWeekViewEventSpan *span; - gchar *text = NULL; - - /* Note: the item we are passed here isn't reliable, so we just stop - the edit of whatever item was being edited. We also receive this - event twice for some reason. */ - event_num = week_view->editing_event_num; - span_num = week_view->editing_span_num; - - /* If no item is being edited, just return. */ - if (event_num == -1) - return; - - event = &g_array_index (week_view->events, EWeekViewEvent, event_num); - span = &g_array_index (week_view->spans, EWeekViewEventSpan, - event->spans_index + span_num); - - /* Reset the edit fields. */ - week_view->editing_event_num = -1; - week_view->editing_new_event = FALSE; - - /* Check that the event is still valid. */ - if (!event->ico->uid) - return; - - gtk_object_get (GTK_OBJECT (span->text_item), - "text", &text, - NULL); - - /* Only update the summary if necessary. */ - if (text && event->ico->summary - && !strcmp (text, event->ico->summary)) { - g_free (text); - if (!e_week_view_is_one_day_event (week_view, event_num)) - e_week_view_reshape_event_span (week_view, event_num, - span_num); - return; - } - - if (event->ico->summary) - g_free (event->ico->summary); - - event->ico->summary = text; - - /* Notify calendar of change. This will result in a call to update, - which will reset the event label as appropriate. */ - gnome_calendar_object_changed (week_view->calendar, event->ico, - CHANGE_SUMMARY); -} - - -static gboolean -e_week_view_find_event_from_item (EWeekView *week_view, - GnomeCanvasItem *item, - gint *event_num_return, - gint *span_num_return) -{ - EWeekViewEvent *event; - EWeekViewEventSpan *span; - gint event_num, span_num, num_events; - - num_events = week_view->events->len; - for (event_num = 0; event_num < num_events; event_num++) { - event = &g_array_index (week_view->events, EWeekViewEvent, - event_num); - for (span_num = 0; span_num < event->num_spans; span_num++) { - span = &g_array_index (week_view->spans, - EWeekViewEventSpan, - event->spans_index + span_num); - if (span->text_item == item) { - *event_num_return = event_num; - *span_num_return = span_num; - return TRUE; - } - } - } - - return FALSE; -} - - -/* Finds the index of the event with the given uid. - Returns TRUE if an event with the uid was found. - Note that for recurring events there may be several EWeekViewEvents, one - for each instance, all with the same iCalObject and uid. So only use this - function if you know the event doesn't recur or you are just checking to - see if any events with the uid exist. */ -static gboolean -e_week_view_find_event_from_uid (EWeekView *week_view, - const gchar *uid, - gint *event_num_return) -{ - EWeekViewEvent *event; - gint event_num, num_events; - - num_events = week_view->events->len; - for (event_num = 0; event_num < num_events; event_num++) { - event = &g_array_index (week_view->events, EWeekViewEvent, - event_num); - if (event->ico->uid && !strcmp (uid, event->ico->uid)) { - *event_num_return = event_num; - return TRUE; - } - } - - return FALSE; -} - - -gboolean -e_week_view_is_one_day_event (EWeekView *week_view, - gint event_num) -{ - EWeekViewEvent *event; - EWeekViewEventSpan *span; - - event = &g_array_index (week_view->events, EWeekViewEvent, event_num); - if (event->num_spans != 1) - return FALSE; - - span = &g_array_index (week_view->spans, EWeekViewEventSpan, - event->spans_index); - - if (event->start == week_view->day_starts[span->start_day] - && event->end == week_view->day_starts[span->start_day + 1]) - return FALSE; - - if (span->num_days == 1 - && event->start >= week_view->day_starts[span->start_day] - && event->end <= week_view->day_starts[span->start_day + 1]) - return TRUE; - - return FALSE; -} - - -static gint -e_week_view_key_press (GtkWidget *widget, GdkEventKey *event) -{ - EWeekView *week_view; - iCalObject *ico; - gint event_num; - gchar *initial_text; - - g_return_val_if_fail (widget != NULL, FALSE); - g_return_val_if_fail (E_IS_WEEK_VIEW (widget), FALSE); - g_return_val_if_fail (event != NULL, FALSE); - - week_view = E_WEEK_VIEW (widget); - - /* The Escape key aborts a resize operation. */ -#if 0 - if (week_view->resize_drag_pos != E_WEEK_VIEW_POS_NONE) { - if (event->keyval == GDK_Escape) { - e_week_view_abort_resize (week_view, event->time); - } - return FALSE; - } -#endif - - if (week_view->selection_start_day == -1) - return FALSE; - - /* We only want to start an edit with a return key or a simple - character. */ - if (event->keyval == GDK_Return) { - initial_text = NULL; - } else if ((event->keyval < 0x20) - || (event->keyval > 0xFF) - || (event->length == 0) - || (event->state & (GDK_CONTROL_MASK | GDK_MOD1_MASK))) { - return FALSE; - } else { - initial_text = event->string; - } - - /* Add a new event covering the selected range. - Note that user_name is a global variable. */ - ico = ical_new ("", user_name, ""); - ico->new = 1; - ico->created = time (NULL); - ico->last_mod = ico->created; - ico->dtstart = week_view->day_starts[week_view->selection_start_day]; - ico->dtend = week_view->day_starts[week_view->selection_end_day + 1]; - - /* We add the event locally and start editing it. When we get the - "update_event" callback from the server, we basically ignore it. - If we were to wait for the "update_event" callback it wouldn't be - as responsive and we may lose a few keystrokes. */ - e_week_view_add_event (ico, ico->dtstart, ico->dtend, week_view); - e_week_view_check_layout (week_view); - gtk_widget_queue_draw (week_view->main_canvas); - - if (e_week_view_find_event_from_uid (week_view, ico->uid, - &event_num)) { - e_week_view_start_editing_event (week_view, event_num, 0, - initial_text); - week_view->editing_new_event = TRUE; - } else { - g_warning ("Couldn't find event to start editing.\n"); - } - - gnome_calendar_add_object (week_view->calendar, ico); - - ical_object_unref (ico); - - return TRUE; -} - - -void -e_week_view_show_popup_menu (EWeekView *week_view, - GdkEventButton *bevent, - gint event_num) -{ - EWeekViewEvent *event; - int have_selection, not_being_edited, num_items, i; - struct menu_item *context_menu; - - static struct menu_item items[] = { - { N_("New appointment..."), (GtkSignalFunc) e_week_view_on_new_appointment, NULL, TRUE } - }; - - static struct menu_item child_items[] = { - { N_("Edit this appointment..."), (GtkSignalFunc) e_week_view_on_edit_appointment, NULL, TRUE }, - { N_("Delete this appointment"), (GtkSignalFunc) e_week_view_on_delete_appointment, NULL, TRUE }, - { NULL, NULL, NULL, TRUE }, - { N_("New appointment..."), (GtkSignalFunc) e_week_view_on_new_appointment, NULL, TRUE } - }; - - static struct menu_item recur_child_items[] = { - { N_("Edit this appointment..."), (GtkSignalFunc) e_week_view_on_edit_appointment, NULL, TRUE }, - { N_("Make this appointment movable"), (GtkSignalFunc) e_week_view_on_unrecur_appointment, NULL, TRUE }, - { N_("Delete this occurrence"), (GtkSignalFunc) e_week_view_on_delete_occurrence, NULL, TRUE }, - { N_("Delete all occurrences"), (GtkSignalFunc) e_week_view_on_delete_appointment, NULL, TRUE }, - { NULL, NULL, NULL, TRUE }, - { N_("New appointment..."), (GtkSignalFunc) e_week_view_on_new_appointment, NULL, TRUE } - }; - - have_selection = GTK_WIDGET_HAS_FOCUS (week_view) - && week_view->selection_start_day != -1; - - if (event_num == -1) { - num_items = 1; - context_menu = &items[0]; - context_menu[0].sensitive = have_selection; - } else { - event = &g_array_index (week_view->events, - EWeekViewEvent, event_num); - - /* This used to be set only if the event wasn't being edited - in the event editor, but we can't check that at present. - We could possibly set up another method of checking it. */ - not_being_edited = TRUE; - - if (event->ico->recur) { - num_items = 6; - context_menu = &recur_child_items[0]; - context_menu[0].sensitive = not_being_edited; - context_menu[1].sensitive = not_being_edited; - context_menu[2].sensitive = not_being_edited; - context_menu[3].sensitive = not_being_edited; - context_menu[5].sensitive = have_selection; - } else { - num_items = 4; - context_menu = &child_items[0]; - context_menu[0].sensitive = not_being_edited; - context_menu[1].sensitive = not_being_edited; - context_menu[3].sensitive = have_selection; - } - } - - for (i = 0; i < num_items; i++) - context_menu[i].data = week_view; - - week_view->popup_event_num = event_num; - popup_menu (context_menu, num_items, bevent); -} - - -static void -e_week_view_on_new_appointment (GtkWidget *widget, gpointer data) -{ - EWeekView *week_view; - GtkWidget *event_editor; - iCalObject *ico; - - week_view = E_WEEK_VIEW (data); - - ico = ical_new ("", user_name, ""); - ico->new = 1; - ico->dtstart = week_view->day_starts[week_view->selection_start_day]; - ico->dtend = week_view->day_starts[week_view->selection_end_day + 1]; - - event_editor = event_editor_new (week_view->calendar, ico); - ical_object_unref (ico); - gtk_widget_show (event_editor); -} - - -static void -e_week_view_on_edit_appointment (GtkWidget *widget, gpointer data) -{ - EWeekView *week_view; - EWeekViewEvent *event; - GtkWidget *event_editor; - iCalObject *ico; - - week_view = E_WEEK_VIEW (data); - - if (week_view->popup_event_num == -1) - return; - - event = &g_array_index (week_view->events, EWeekViewEvent, - week_view->popup_event_num); - - /* We must duplicate the iCalObject, since the event editor will - change the fields. */ - ico = ical_object_duplicate (event->ico); - - event_editor = event_editor_new (week_view->calendar, ico); - ical_object_unref (ico); - gtk_widget_show (event_editor); -} - - -static void -e_week_view_on_delete_occurrence (GtkWidget *widget, gpointer data) -{ - EWeekView *week_view; - EWeekViewEvent *event; - iCalObject *ico; - - week_view = E_WEEK_VIEW (data); - - if (week_view->popup_event_num == -1) - return; - - event = &g_array_index (week_view->events, EWeekViewEvent, - week_view->popup_event_num); - - /* We must duplicate the iCalObject, or we won't know it has changed - when we get the "update_event" callback. */ - ico = ical_object_duplicate (event->ico); - - ical_object_add_exdate (ico, event->start); - gnome_calendar_object_changed (week_view->calendar, ico, CHANGE_DATES); - ical_object_unref (ico); -} - - -static void -e_week_view_on_delete_appointment (GtkWidget *widget, gpointer data) -{ - EWeekView *week_view; - EWeekViewEvent *event; - - week_view = E_WEEK_VIEW (data); - - if (week_view->popup_event_num == -1) - return; - - event = &g_array_index (week_view->events, EWeekViewEvent, - week_view->popup_event_num); - - gnome_calendar_remove_object (week_view->calendar, event->ico); -} - - -static void -e_week_view_on_unrecur_appointment (GtkWidget *widget, gpointer data) -{ - EWeekView *week_view; - EWeekViewEvent *event; - iCalObject *ico, *new_ico; - - week_view = E_WEEK_VIEW (data); - - if (week_view->popup_event_num == -1) - return; - - event = &g_array_index (week_view->events, EWeekViewEvent, - week_view->popup_event_num); - - /* For the recurring object, we add a exception to get rid of the - instance. */ - ico = ical_object_duplicate (event->ico); - ical_object_add_exdate (ico, event->start); - - /* For the unrecurred instance we duplicate the original object, - create a new uid for it, get rid of the recurrence rules, and set - the start & end times to the instances times. */ - new_ico = ical_object_duplicate (event->ico); - g_free (new_ico->uid); - new_ico->uid = ical_gen_uid (); - ical_object_reset_recurrence (new_ico); - new_ico->dtstart = event->start; - new_ico->dtend = event->end; - - /* Now update both iCalObjects. Note that we do this last since at - present the updates happen synchronously so our event may disappear. - */ - gnome_calendar_object_changed (week_view->calendar, ico, CHANGE_ALL); - ical_object_unref (ico); - - gnome_calendar_add_object (week_view->calendar, new_ico); - ical_object_unref (new_ico); -} diff --git a/calendar/gui/e-week-view.h b/calendar/gui/e-week-view.h deleted file mode 100644 index 86031d2e58..0000000000 --- a/calendar/gui/e-week-view.h +++ /dev/null @@ -1,375 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -/* - * Author : - * Damon Chaplin - * - * Copyright 1999, Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ -#ifndef _E_WEEK_VIEW_H_ -#define _E_WEEK_VIEW_H_ - -#include -#include - -#include "gnome-cal.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* - * EWeekView - displays the Week & Month views of the calendar. - */ - -/* The maximum number of weeks we show. 5 is usually enough for 1 month. */ -#define E_WEEK_VIEW_MAX_WEEKS 5 - -/* The size of the reminder & recurrence icons, and padding around them. */ -#define E_WEEK_VIEW_ICON_WIDTH 16 -#define E_WEEK_VIEW_ICON_HEIGHT 16 -#define E_WEEK_VIEW_ICON_X_PAD 0 -#define E_WEEK_VIEW_ICON_Y_PAD 0 - -/* The space on the left & right of the event. (The triangle to indicate the - event continues is displayed in this space). */ -#define E_WEEK_VIEW_EVENT_L_PAD 2 -#define E_WEEK_VIEW_EVENT_R_PAD 3 - -/* The vertical spacing between rows of events. */ -#define E_WEEK_VIEW_EVENT_Y_SPACING 1 - -/* The size of the border around the event. */ -#define E_WEEK_VIEW_EVENT_BORDER_WIDTH 1 -#define E_WEEK_VIEW_EVENT_BORDER_HEIGHT 1 - -/* The padding on each side of the event text. */ -#define E_WEEK_VIEW_EVENT_TEXT_X_PAD 4 -#define E_WEEK_VIEW_EVENT_TEXT_Y_PAD 1 - -/* The space on the right of the time string, if it is shown. */ -#define E_WEEK_VIEW_EVENT_TIME_R_PAD 2 - -/* The padding above and on the right of the date string at the top of each - cell. */ -#define E_WEEK_VIEW_DATE_T_PAD 2 -#define E_WEEK_VIEW_DATE_R_PAD 4 - -/* The padding above and below the line under the date string, in the Week - view, and also the space on the left of it. */ -#define E_WEEK_VIEW_DATE_LINE_T_PAD 1 -#define E_WEEK_VIEW_DATE_LINE_B_PAD 1 -#define E_WEEK_VIEW_DATE_LINE_L_PAD 10 - -/* The padding below the date string in the Month view. */ -#define E_WEEK_VIEW_DATE_B_PAD 1 - -/* These index our colors array. */ -typedef enum -{ - E_WEEK_VIEW_COLOR_EVEN_MONTHS, - E_WEEK_VIEW_COLOR_ODD_MONTHS, - E_WEEK_VIEW_COLOR_EVENT_BACKGROUND, - E_WEEK_VIEW_COLOR_EVENT_BORDER, - - E_WEEK_VIEW_COLOR_LAST -} EWeekViewColors; - -/* These specify which part of the selection we are dragging, if any. */ -typedef enum -{ - E_WEEK_VIEW_DRAG_NONE, - E_WEEK_VIEW_DRAG_START, - E_WEEK_VIEW_DRAG_END -} EWeekViewDragPosition; - -/* These specify which times are shown for the 1-day events. We use the small - font for the minutes if it can be loaded and the option is on. */ -typedef enum -{ - E_WEEK_VIEW_TIME_NONE, - E_WEEK_VIEW_TIME_START, - E_WEEK_VIEW_TIME_BOTH, - E_WEEK_VIEW_TIME_START_SMALL_MIN, - E_WEEK_VIEW_TIME_BOTH_SMALL_MIN -} EWeekViewTimeFormat; - -/* Specifies the position of the mouse. */ -typedef enum -{ - E_WEEK_VIEW_POS_OUTSIDE, - E_WEEK_VIEW_POS_NONE, - E_WEEK_VIEW_POS_EVENT, - E_WEEK_VIEW_POS_LEFT_EDGE, - E_WEEK_VIEW_POS_RIGHT_EDGE -} EWeekViewPosition; - - -typedef struct _EWeekViewEventSpan EWeekViewEventSpan; -struct _EWeekViewEventSpan { - guint start_day : 6; - guint num_days : 3; - guint row : 7; - GnomeCanvasItem *background_item; - GnomeCanvasItem *text_item; -}; - -typedef struct _EWeekViewEvent EWeekViewEvent; -struct _EWeekViewEvent { - iCalObject *ico; - time_t start; - time_t end; - guint16 start_minute; /* Minutes from the start of the day. */ - guint16 end_minute; - gint spans_index; - guint num_spans; -}; - - -#define E_WEEK_VIEW(obj) GTK_CHECK_CAST (obj, e_week_view_get_type (), EWeekView) -#define E_WEEK_VIEW_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, e_week_view_get_type (), EWeekViewClass) -#define E_IS_WEEK_VIEW(obj) GTK_CHECK_TYPE (obj, e_week_view_get_type ()) - - -typedef struct _EWeekView EWeekView; -typedef struct _EWeekViewClass EWeekViewClass; - -struct _EWeekView -{ - GtkTable table; - - /* The top canvas where the dates are shown. */ - GtkWidget *titles_canvas; - GnomeCanvasItem *titles_canvas_item; - - /* The main canvas where the appointments are shown. */ - GtkWidget *main_canvas; - GnomeCanvasItem *main_canvas_item; - - GtkWidget *vscrollbar; - - /* The calendar we are associated with. */ - GnomeCalendar *calendar; - - /* The array of EWeekViewEvent elements. */ - GArray *events; - gboolean events_sorted; - gboolean events_need_layout; - gboolean events_need_reshape; - - /* An array of EWeekViewEventSpan elements. Each event has its own - space within this array, and uses the spans_index and num_spans - fields of the EWeekViewEvent struct to access it. */ - GArray *spans; - - /* The start of each day displayed. */ - time_t day_starts[E_WEEK_VIEW_MAX_WEEKS * 7 + 1]; - - /* The base date, where the adjustment value is 0. */ - GDate base_date; - - /* The first day shown in the view. */ - GDate first_day_shown; - - /* If we are displaying 1 week or 1 month. */ - gboolean display_month; - - /* If Sat & Sun are compressed. Only applicable in month view, since - they are always compressed into 1 cell in the week view. */ - gboolean compress_weekend; - - /* The vertical offset of the events from the top of the cells. */ - gint events_y_offset; - - /* The height of the events, not including spacing between them. */ - gint row_height; - - /* The number of rows of events in each cell. */ - gint rows_per_cell; - gint rows_per_compressed_cell; - - /* If the small font is used for displaying the minutes. */ - gboolean use_small_font; - - /* Small font to display the minutes. */ - GdkFont *small_font; - - /* The widths of various pieces of text, used to determine which of - several date formats to display, set in e_week_view_style_set(). */ - gint space_width; /* One space character ' '. */ - gint colon_width; /* Size of ':' in the font. */ - gint slash_width; /* Size of '/' in the font. */ - gint digit_width; /* Size of a '0' digit. */ - gint small_digit_width; /* Size of a small_font '0' digit. */ - gint day_widths[7]; /* Monday first. */ - gint max_day_width; - gint abbr_day_widths[7]; - gint max_abbr_day_width; - gint month_widths[12]; - gint max_month_width; - gint abbr_month_widths[12]; - gint max_abbr_month_width; - - /* The size of the main grid of days and of the cells. Note that the - offsets arrays have one more element than the widths/heights arrays - since they also contain the right/bottom edge. */ - gint rows; - gint columns; - gint col_widths[7]; - gint col_offsets[8]; - gint row_heights[10]; - gint row_offsets[11]; - - /* This specifies which times we are showing for the events, depending - on how much room is available. */ - EWeekViewTimeFormat time_format; - - /* The GC used for painting in different colors. */ - GdkGC *main_gc; - - /* The icons. */ - GdkPixmap *reminder_icon; - GdkBitmap *reminder_mask; - GdkPixmap *recurrence_icon; - GdkBitmap *recurrence_mask; - - /* Colors for drawing. */ - GdkColor colors[E_WEEK_VIEW_COLOR_LAST]; - - /* The normal & resizing cursors. */ - GdkCursor *normal_cursor; - GdkCursor *move_cursor; - GdkCursor *resize_width_cursor; - - /* This remembers the last cursor set on the window. */ - GdkCursor *last_cursor_set; - - /* The currently selected region, in days from the first day shown. - If selection_start_day is -1 there is no current selection. */ - gint selection_start_day; - gint selection_end_day; - - /* This specifies which end of the selection is being dragged, or is - E_WEEK_VIEW_DRAG_NONE if the selection isn't being dragged. */ - EWeekViewDragPosition selection_drag_pos; - - /* This is the event the mouse button was pressed on. If the button - is released we start editing it, but if the mouse is dragged we set - this to -1. */ - gint pressed_event_num; - gint pressed_span_num; - - /* The event span currently being edited. The num is -1 if no event is - being edited. */ - gint editing_event_num; - gint editing_span_num; - - /* This is TRUE if we are editing an event which we have just created. - We ignore the "update_event" callback which we will get from the - server when the event is added. */ - gboolean editing_new_event; - - /* The event that the context menu is for. */ - gint popup_event_num; - - /* The last mouse position when dragging, in the entire canvas. */ - gint drag_event_x; - gint drag_event_y; -}; - -struct _EWeekViewClass -{ - GtkTableClass parent_class; -}; - - -GtkType e_week_view_get_type (void); -GtkWidget* e_week_view_new (void); - -void e_week_view_set_calendar (EWeekView *week_view, - GnomeCalendar *calendar); - -/* This sets the selected time range. The EWeekView will show the corresponding - month and the days between start_time and end_time will be selected. - To select a single day, use the same value for start_time & end_time. */ -void e_week_view_set_selected_time_range (EWeekView *week_view, - time_t start_time, - time_t end_time); - -/* Returns the selected time range. */ -void e_week_view_get_selected_time_range (EWeekView *week_view, - time_t *start_time, - time_t *end_time); - -/* Whether to display 1 week or 1 month (5 weeks). It defaults to 1 week. */ -gboolean e_week_view_get_display_month (EWeekView *week_view); -void e_week_view_set_display_month (EWeekView *week_view, - gboolean display_month); - -/* Whether the weekend (Sat/Sun) should be compressed into 1 cell in the Month - view. In the Week view they are always compressed. */ -gboolean e_week_view_get_compress_weekend (EWeekView *week_view); -void e_week_view_set_compress_weekend (EWeekView *week_view, - gboolean compress); - -/* This reloads all calendar events. */ -void e_week_view_update_all_events (EWeekView *week_view); - -/* This is called when one event has been added or updated. */ -void e_week_view_update_event (EWeekView *week_view, - const gchar *uid); - -/* This removes all the events associated with the given uid. Note that for - recurring events there may be more than one. If any events are found and - removed we need to layout the events again. */ -void e_week_view_remove_event (EWeekView *week_view, - const gchar *uid); - - -/* - * Internal functions called by the associated canvas items. - */ -void e_week_view_get_day_position (EWeekView *week_view, - gint day, - gint *day_x, - gint *day_y, - gint *day_w, - gint *day_h); -gboolean e_week_view_get_span_position (EWeekView *week_view, - gint event_num, - gint span_num, - gint *span_x, - gint *span_y, - gint *span_w); -gboolean e_week_view_is_one_day_event (EWeekView *week_view, - gint event_num); -void e_week_view_start_editing_event (EWeekView *week_view, - gint event_num, - gint span_num, - gchar *initial_text); -void e_week_view_stop_editing_event (EWeekView *week_view); - -void e_week_view_show_popup_menu (EWeekView *week_view, - GdkEventButton *event, - gint event_num); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* _E_WEEK_VIEW_H_ */ diff --git a/calendar/gui/event-editor-dialog.glade b/calendar/gui/event-editor-dialog.glade deleted file mode 100644 index 7cd4852d67..0000000000 --- a/calendar/gui/event-editor-dialog.glade +++ /dev/null @@ -1,1918 +0,0 @@ - - - - - event-editor-dialog - event-editor-dialog - - . - pixmaps - C - True - True - False - False - False - True - event-editor-dialog.glade.h - - - - GtkWindow - event-editor-dialog - window1 - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - False - True - False - - - GtkNotebook - dialog-contents - True - True - True - GTK_POS_TOP - False - 2 - 2 - False - - - GtkVBox - vbox2 - False - 0 - - - GtkHBox - hbox4 - False - 0 - - 0 - True - True - - - - GtkLabel - label13 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - 0 - False - False - - - - - GtkEntry - general-owner - True - True - True - 0 - - - 0 - True - True - - - - - - GtkHBox - hbox5 - False - 0 - - 0 - False - False - - - - GtkLabel - label14 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - 0 - False - False - - - - - - GtkScrolledWindow - scrolledwindow1 - GTK_POLICY_NEVER - GTK_POLICY_ALWAYS - GTK_UPDATE_CONTINUOUS - GTK_UPDATE_CONTINUOUS - - 0 - False - False - - - - GtkText - general-summary - True - True - - - - - - GtkFrame - frame4 - - 0 - GTK_SHADOW_ETCHED_IN - - 0 - True - True - - - - GtkTable - table3 - 2 - 3 - False - 0 - 0 - - - GtkLabel - label15 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - 0 - 1 - 0 - 1 - 0 - 0 - False - False - False - False - False - False - - - - - GtkLabel - label16 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - 0 - 1 - 1 - 2 - 0 - 0 - False - False - False - False - False - False - - - - - Custom - start-time - make_date_edit_with_time - - - 0 - 0 - Tue, 16 May 2000 19:11:05 GMT - - 1 - 2 - 0 - 1 - 0 - 0 - True - False - False - False - True - True - - - - - Custom - end-time - make_date_edit_with_time - 0 - 0 - Tue, 16 May 2000 19:11:10 GMT - - 1 - 2 - 1 - 2 - 0 - 0 - False - False - False - False - True - True - - - - - GtkCheckButton - all-day-event - True - - False - True - - 2 - 3 - 0 - 1 - 0 - 0 - False - False - False - False - False - False - - - - - - - GtkFrame - frame6 - - 0 - GTK_SHADOW_ETCHED_IN - - 0 - True - True - - - - GtkTable - table4 - 4 - 5 - False - 0 - 0 - - - GtkSpinButton - alarm-display-amount - True - 1 - 0 - True - GTK_UPDATE_ALWAYS - False - False - 0 - 0 - 100 - 1 - 10 - 10 - - 1 - 2 - 0 - 1 - 0 - 0 - True - False - False - False - True - False - - - - - GtkSpinButton - alarm-audio-amount - True - 1 - 0 - False - GTK_UPDATE_ALWAYS - False - False - 0 - 0 - 100 - 1 - 10 - 10 - - 1 - 2 - 1 - 2 - 0 - 0 - True - False - False - False - True - False - - - - - GtkSpinButton - alarm-program-amount - True - 1 - 0 - False - GTK_UPDATE_ALWAYS - False - False - 0 - 0 - 100 - 1 - 10 - 10 - - 1 - 2 - 2 - 3 - 0 - 0 - True - False - False - False - True - False - - - - - GtkSpinButton - alarm-mail-amount - True - 1 - 0 - False - GTK_UPDATE_ALWAYS - False - False - 0 - 0 - 100 - 1 - 10 - 10 - - 1 - 2 - 3 - 4 - 0 - 0 - True - False - False - False - True - False - - - - - GtkOptionMenu - alarm-display-unit - True - Minutes -Hours -Days - - 0 - - 2 - 3 - 0 - 1 - 0 - 0 - False - False - False - False - False - False - - - - - GtkOptionMenu - alarm-audio-unit - True - Minutes -Hours -Days - - 0 - - 2 - 3 - 1 - 2 - 0 - 0 - False - False - False - False - False - False - - - - - GtkOptionMenu - alarm-program-unit - True - Minutes -Hours -Days - - 0 - - 2 - 3 - 2 - 3 - 0 - 0 - False - False - False - False - False - False - - - - - GtkOptionMenu - alarm-mail-unit - True - Minutes -Hours -Days - - 0 - - 2 - 3 - 3 - 4 - 0 - 0 - False - False - False - False - False - False - - - - - GtkEntry - mail-to - True - True - True - 0 - - - 4 - 5 - 3 - 4 - 0 - 0 - True - False - False - False - True - False - - - - - GnomeFileEntry - run-program-file-entry - 10 - False - False - - 4 - 5 - 2 - 3 - 0 - 0 - True - False - False - False - True - False - - - - GtkEntry - GnomeEntry:entry - run-program - True - True - True - 0 - - - - - - GtkCheckButton - alarm-display - True - - False - True - - 0 - 1 - 0 - 1 - 0 - 0 - False - False - False - False - True - False - - - - - GtkCheckButton - alarm-audio - True - - False - True - - 0 - 1 - 1 - 2 - 0 - 0 - False - False - False - False - True - False - - - - - GtkCheckButton - alarm-program - True - - False - True - - 0 - 1 - 2 - 3 - 0 - 0 - False - False - False - False - True - False - - - - - GtkCheckButton - alarm-mail - True - - False - True - - 0 - 1 - 3 - 4 - 0 - 0 - False - False - False - False - True - False - - - - - GtkLabel - label18 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - 3 - 4 - 3 - 4 - 0 - 0 - False - False - False - False - True - False - - - - - GtkLabel - label17 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - 3 - 4 - 2 - 3 - 0 - 0 - False - False - False - False - True - False - - - - - - - GtkFrame - frame5 - - 0 - GTK_SHADOW_ETCHED_IN - - 0 - True - True - - - - GtkHBox - hbox6 - False - 0 - - - GtkRadioButton - classification-public - True - - True - True - classification_radio_group - - 0 - False - False - - - - - GtkRadioButton - classification-private - True - - False - True - classification_radio_group - - 0 - False - False - - - - - GtkRadioButton - classification-confidential - True - - False - True - classification_radio_group - - 0 - False - False - - - - - - - - GtkLabel - Notebook:tab - label11 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkVBox - vbox3 - 4 - False - 0 - - - GtkFrame - frame8 - - 0 - GTK_SHADOW_ETCHED_IN - - 0 - False - True - - - - GtkHBox - hbox7 - False - 0 - - - GtkVBox - vbox4 - False - 0 - - 0 - False - False - - - - GtkRadioButton - recurrence-rule-none - True - - True - True - recurrence_rule_group - - 0 - False - False - - - - - GtkRadioButton - recurrence-rule-daily - True - - False - True - recurrence_rule_group - - 0 - False - False - - - - - GtkRadioButton - recurrence-rule-weekly - True - - False - True - recurrence_rule_group - - 0 - False - False - - - - - GtkRadioButton - recurrence-rule-monthly - True - - False - True - recurrence_rule_group - - 0 - False - False - - - - - GtkRadioButton - recurrence-rule-yearly - True - - False - True - recurrence_rule_group - - 0 - False - False - - - - - - GtkVSeparator - vseparator1 - - 0 - False - True - - - - - GtkNotebook - recurrence-rule-notebook - False - True - GTK_POS_TOP - False - 2 - 2 - False - - 0 - True - True - - - - Placeholder - - - - GtkLabel - Notebook:tab - label23 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkAlignment - alignment1 - 0.5 - 0.5 - 1 - 1 - - - GtkVBox - vbox7 - False - 0 - - - GtkHBox - hbox13 - False - 0 - - 0 - False - True - - - - GtkLabel - label31 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - 0 - False - False - - - - - GtkSpinButton - recurrence-rule-daily-days - True - 1 - 0 - False - GTK_UPDATE_ALWAYS - False - False - 1 - 0 - 100 - 1 - 10 - 10 - - 0 - False - True - - - - - GtkLabel - label32 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - 0 - False - False - - - - - - - - GtkLabel - Notebook:tab - label24 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkVBox - vbox8 - False - 0 - - - GtkHBox - hbox14 - False - 0 - - 0 - False - True - - - - GtkLabel - label33 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - 0 - False - False - - - - - GtkSpinButton - recurrence-rule-weekly-weeks - True - 1 - 0 - False - GTK_UPDATE_ALWAYS - False - False - 1 - 0 - 100 - 1 - 10 - 10 - - 0 - False - True - - - - - GtkLabel - label34 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - 0 - False - False - - - - - - GtkHBox - hbox15 - False - 0 - - 0 - False - True - - - - GtkCheckButton - recurrence-rule-weekly-mon - True - - False - True - - 0 - False - False - - - - - GtkCheckButton - recurrence-rule-weekly-tue - True - - False - True - - 0 - False - False - - - - - GtkCheckButton - recurrence-rule-weekly-wed - True - - False - True - - 0 - False - False - - - - - GtkCheckButton - recurrence-rule-weekly-thu - True - - False - True - - 0 - False - False - - - - - GtkCheckButton - recurrence-rule-weekly-fri - True - - False - True - - 0 - False - False - - - - - GtkCheckButton - recurrence-rule-weekly-sat - True - - False - True - - 0 - False - False - - - - - GtkCheckButton - recurrence-rule-weekly-sun - True - - False - True - - 0 - False - False - - - - - - - GtkLabel - Notebook:tab - label25 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkHBox - hbox16 - False - 0 - - - GtkVBox - vbox9 - False - 0 - - 0 - True - True - - - - GtkVBox - vbox10 - False - 0 - - 0 - True - True - - - - GtkHBox - hbox17 - False - 0 - - 0 - True - True - - - - GtkRadioButton - recurrence-rule-monthly-on-day - True - - True - True - recurrence_rule_monthly_group - - 0 - False - False - - - - - GtkSpinButton - recurrence-rule-monthly-day - True - 1 - 0 - False - GTK_UPDATE_ALWAYS - False - False - 1 - 0 - 100 - 1 - 10 - 10 - - 0 - False - True - - - - - GtkLabel - label35 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - 0 - False - False - - - - - - GtkHBox - hbox18 - False - 0 - - 0 - False - False - - - - GtkRadioButton - recurrence-rule-monthly-weekday - True - - False - True - recurrence_rule_monthly_group - - 0 - False - False - - - - - GtkOptionMenu - recurrence-rule-monthly-week - True - 1st -2nd -3rd -4th -5th - - 0 - - 0 - False - False - - - - - GtkOptionMenu - recurrence-rule-monthly-day - True - Monday -Tuesday -Wednesday -Thursday -Friday -Saturday -Sunday - - 0 - - 0 - False - False - - - - - - - Placeholder - - - - - GtkHBox - hbox19 - False - 0 - - 0 - False - True - - - - GtkLabel - label36 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - 0 - False - False - - - - - GtkSpinButton - recurrence-rule-monthly-every-n-months - True - 1 - 0 - False - GTK_UPDATE_ALWAYS - False - False - 1 - 1 - 100 - 1 - 10 - 10 - - 0 - False - True - - - - - GtkLabel - label37 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - 0 - False - False - - - - - - - GtkLabel - Notebook:tab - label26 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkVBox - vbox11 - False - 0 - - - GtkHBox - hbox20 - False - 0 - - 0 - False - True - - - - GtkLabel - label38 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - 0 - False - False - - - - - GtkSpinButton - recurrence-rule-yearly-every-n-years - True - 1 - 0 - False - GTK_UPDATE_ALWAYS - False - False - 1 - 0 - 100 - 1 - 10 - 10 - - 0 - False - True - - - - - GtkLabel - label39 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - 0 - False - False - - - - - - - GtkLabel - Notebook:tab - label27 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - - - - GtkHBox - hbox8 - False - 0 - - 0 - False - True - - - - GtkFrame - frame9 - - 0 - GTK_SHADOW_ETCHED_IN - - 0 - False - True - - - - GtkVBox - vbox5 - True - 0 - - - GtkRadioButton - recurrence-ending-date-repeat-forever - True - - False - True - recurrence_ending_date - - 0 - False - False - - - - - GtkHBox - hbox12 - False - 0 - - 0 - False - True - - - - GtkRadioButton - recurrence-ending-date-end-on - True - - False - True - recurrence_ending_date - - 0 - False - False - - - - - Custom - recurrence-ending-date-end-on-date - 100 - make_date_edit - 0 - 0 - Sat, 13 May 2000 18:02:55 GMT - - 0 - False - True - - - - - - GtkHBox - hbox10 - False - 0 - - 0 - True - True - - - - GtkRadioButton - recurrence-ending-date-end-after - True - - False - True - recurrence_ending_date - - 0 - False - False - - - - - GtkSpinButton - recurrence-ending-date-end-after-count - True - 1 - 0 - False - GTK_UPDATE_ALWAYS - False - False - 2 - 0 - 100 - 1 - 10 - 10 - - 0 - False - True - - - - - GtkLabel - label28 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - 0 - False - False - - - - - - - - GtkFrame - frame10 - - 0 - GTK_SHADOW_ETCHED_IN - - 0 - True - True - - - - GtkVBox - vbox12 - False - 0 - - - Custom - recurrence-exceptions-date - make_date_edit - 0 - 0 - Tue, 16 May 2000 01:42:29 GMT - - 0 - True - True - - - - - GtkHBox - hbox21 - False - 0 - - 0 - True - True - - - - GtkVBox - vbox13 - False - 0 - - 0 - False - True - - - - GtkButton - recurrence-exceptions-add - True - - - 0 - False - False - - - - - GtkButton - recurrence-exceptions-change - True - - - 0 - False - False - - - - - GtkButton - recurrence-exceptions-delete - True - - - 0 - False - False - - - - - - GtkScrolledWindow - scrolledwindow2 - GTK_POLICY_ALWAYS - GTK_POLICY_ALWAYS - GTK_UPDATE_CONTINUOUS - GTK_UPDATE_CONTINUOUS - - 0 - True - True - - - - GtkCList - recurrence-exceptions-list - True - 1 - 80 - GTK_SELECTION_SINGLE - False - GTK_SHADOW_IN - - - GtkLabel - CList:title - label40 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - - - - - - - - GtkLabel - Notebook:tab - label12 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - - diff --git a/calendar/gui/event-editor-utils.c b/calendar/gui/event-editor-utils.c deleted file mode 100644 index 8361a493c5..0000000000 --- a/calendar/gui/event-editor-utils.c +++ /dev/null @@ -1,228 +0,0 @@ -#include -#include -#include -#include - - -/***************/ -/*** storing ***/ -/***************/ - -void -store_to_editable (GladeXML *gui, char *widget_name, gchar *content) -{ - GtkWidget *widget = glade_xml_get_widget (gui, widget_name); - GtkEditable *editable = GTK_EDITABLE (widget); - int position = 0; - - if (! content) - return; - - gtk_editable_delete_text (editable, 0, -1); - gtk_editable_insert_text (editable, content, - strlen (content), &position); -} - - -void -store_to_toggle (GladeXML *gui, char *widget_name, gboolean content) -{ - GtkWidget *widget = glade_xml_get_widget (gui, widget_name); - GtkToggleButton *toggle = GTK_TOGGLE_BUTTON (widget); - gtk_toggle_button_set_active (toggle, content); -} - - -void -store_to_spin (GladeXML *gui, char *widget_name, gint content) -{ - GtkWidget *widget; - GtkSpinButton *spin; - - widget = glade_xml_get_widget (gui, widget_name); - spin = GTK_SPIN_BUTTON (widget); - gtk_spin_button_set_value (spin, (gfloat) content); -} - - -void -store_to_alarm_unit (GladeXML *gui, char *widget_name, enum AlarmUnit content) -{ - GtkWidget *widget; - GtkOptionMenu *option; - - widget = glade_xml_get_widget (gui, widget_name); - option = GTK_OPTION_MENU (widget); - - switch (content) { - case ALARM_MINUTES: - gtk_option_menu_set_history (option, 0); break; - case ALARM_HOURS: - gtk_option_menu_set_history (option, 1); break; - case ALARM_DAYS: - gtk_option_menu_set_history (option, 2); break; - } -} - - -void -store_to_option (GladeXML *gui, char *widget_name, gint content) -{ - GtkWidget *widget; - GtkOptionMenu *option; - - widget = glade_xml_get_widget (gui, widget_name); - option = GTK_OPTION_MENU (widget); - - gtk_option_menu_set_history (option, content); -} - - -void -store_to_gnome_dateedit (GladeXML *gui, char *widget_name, time_t content) -{ - GtkWidget *widget; - GnomeDateEdit *gde; - - widget = glade_xml_get_widget (gui, widget_name); - gde = GNOME_DATE_EDIT (widget); - gnome_date_edit_set_time (gde, content); -} - - - -/******************/ -/*** extracting ***/ -/******************/ - - -gchar *extract_from_editable (GladeXML *gui, char *widget_name) -{ - GtkWidget *widget; - GtkEditable *editable; - gchar *content; - - widget = glade_xml_get_widget (gui, widget_name); - editable = GTK_EDITABLE (widget); - content = gtk_editable_get_chars (editable, 0, -1); - return content; -} - - -gboolean extract_from_toggle (GladeXML *gui, char *widget_name) -{ - GtkWidget *widget; - GtkToggleButton *toggle; - gboolean content; - - widget = glade_xml_get_widget (gui, widget_name); - toggle = GTK_TOGGLE_BUTTON (widget); - content = gtk_toggle_button_get_active (toggle); - return content; -} - - -gint extract_from_spin (GladeXML *gui, char *widget_name) -{ - GtkWidget *widget; - GtkSpinButton *spin; - gint content; - - widget = glade_xml_get_widget (gui, widget_name); - spin = GTK_SPIN_BUTTON (widget); - content = gtk_spin_button_get_value_as_int (spin); - return content; -} - - -#if 0 -char *extract_from_option (GladeXML *gui, char *widget_name) -{ - GtkWidget *widget; - GtkOptionMenu *option; - GtkWidget *picked; - GtkMenu *menu; - GtkMenuItem *menu_item; - //GList *children; - GtkLabel *label; - char *content = NULL; - - widget = glade_xml_get_widget (gui, widget_name); - option = GTK_OPTION_MENU (widget); - picked = gtk_option_menu_get_menu (option); - menu = GTK_MENU (picked); - menu_item = GTK_MENU_ITEM (gtk_menu_get_active (menu)); - label = GTK_LABEL (GTK_BIN (menu_item)->child); - gtk_label_get (label, &content); - - return content; -} -#endif /* 0 */ - - -#if 0 -enum AlarmUnit -extract_from_alarm_unit (GladeXML *gui, char *widget_name) -{ - GtkWidget *option; - enum AlarmUnit u; - - option = glade_xml_get_widget (gui, widget_name); - u = (enum AlarmUnit) gtk_object_get_data (GTK_OBJECT (option), "unit"); - return u; -} -#endif /* 0 */ - - -enum AlarmUnit -extract_from_alarm_unit (GladeXML *gui, char *widget_name) -{ - GtkWidget *widget; - GtkOptionMenu *option; - GtkMenu *menu; - GtkMenuShell *menu_shell; - GtkMenuItem *menu_item; - enum AlarmUnit content; - - widget = glade_xml_get_widget (gui, widget_name); - option = GTK_OPTION_MENU (widget); - menu = GTK_MENU (gtk_option_menu_get_menu (option)); - menu_shell = GTK_MENU_SHELL (menu); - menu_item = GTK_MENU_ITEM (gtk_menu_get_active (menu)); - - content = g_list_index (menu_shell->children, (gpointer) menu_item); - return (content >= 0) ? content : ALARM_MINUTES; -} - - -guint -extract_from_option (GladeXML *gui, char *widget_name) -{ - GtkWidget *widget; - GtkOptionMenu *option; - GtkMenu *menu; - GtkMenuShell *menu_shell; - GtkMenuItem *menu_item; - enum AlarmUnit content; - - widget = glade_xml_get_widget (gui, widget_name); - option = GTK_OPTION_MENU (widget); - menu = GTK_MENU (gtk_option_menu_get_menu (option)); - menu_shell = GTK_MENU_SHELL (menu); - menu_item = GTK_MENU_ITEM (gtk_menu_get_active (menu)); - - content = g_list_index (menu_shell->children, (gpointer) menu_item); - return (content >= 0) ? content : 0; -} - - -time_t extract_from_gnome_dateedit (GladeXML *gui, char *widget_name) -{ - GtkWidget *de; - time_t t; - - de = glade_xml_get_widget (gui, widget_name); - t = gnome_date_edit_get_date (GNOME_DATE_EDIT (de)); - return t; -} - diff --git a/calendar/gui/event-editor-utils.h b/calendar/gui/event-editor-utils.h deleted file mode 100644 index 61631028db..0000000000 --- a/calendar/gui/event-editor-utils.h +++ /dev/null @@ -1,22 +0,0 @@ - - -#include "gnome-cal.h" -#include -//#include - -void store_to_editable (GladeXML *gui, char *widget_name, gchar *content); -void store_to_toggle (GladeXML *gui, char *widget_name, gboolean content); -void store_to_spin (GladeXML *gui, char *widget_name, gint content); -void store_to_alarm_unit (GladeXML *gui, char *widget_name, - enum AlarmUnit content); -void store_to_option (GladeXML *gui, char *widget_name, gint content); -void store_to_gnome_dateedit (GladeXML *gui, char *widget_name, - time_t content); - - -gchar *extract_from_editable (GladeXML *gui, char *widget_name); -gboolean extract_from_toggle (GladeXML *gui, char *widget_name); -gint extract_from_spin (GladeXML *gui, char *widget_name); -enum AlarmUnit extract_from_alarm_unit (GladeXML *gui, char *widget_name); -guint extract_from_option (GladeXML *gui, char *widget_name); -time_t extract_from_gnome_dateedit (GladeXML *gui, char *widget_name); diff --git a/calendar/gui/event-editor.c b/calendar/gui/event-editor.c deleted file mode 100644 index c96a6118d6..0000000000 --- a/calendar/gui/event-editor.c +++ /dev/null @@ -1,1208 +0,0 @@ -/* Evolution calendar - Event editor dialog - * - * Copyright (C) 2000 Helix Code, Inc. - * - * Authors: Miguel de Icaza - * Federico Mena-Quintero - * Seth Alves - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. - */ - -#include -#include -#include -#include "event-editor-utils.h" -#include "event-editor.h" - - - -typedef struct { - /* Glade XML data */ - GladeXML *xml; - - /* Calendar this editor is associated to */ - GnomeCalendar *gcal; - - /* UI handler */ - BonoboUIHandler *uih; - - /* Widgets from the Glade file */ - - GtkWidget *general_owner; - - GtkWidget *start_time; - GtkWidget *end_time; - GtkWidget *all_day_checkbox; - - GtkWidget *alarm_display; - GtkWidget *alarm_program; - GtkWidget *alarm_audio; - GtkWidget *alarm_mail; - GtkWidget *alarm_display_amount; - GtkWidget *alarm_display_unit; - GtkWidget *alarm_audio_amount; - GtkWidget *alarm_audio_unit; - GtkWidget *alarm_program_amount; - GtkWidget *alarm_program_unit; - GtkWidget *alarm_program_run_program; - GtkWidget *alarm_mail_amount; - GtkWidget *alarm_mail_unit; - GtkWidget *alarm_mail_mail_to; - - GtkWidget *recurrence_rule_notebook; - GtkWidget *recurrence_rule_none; - GtkWidget *recurrence_rule_daily; - GtkWidget *recurrence_rule_weekly; - GtkWidget *recurrence_rule_monthly; - GtkWidget *recurrence_rule_yearly; - - GtkWidget *recurrence_exception_add; - GtkWidget *recurrence_exception_delete; - GtkWidget *recurrence_exception_change; - - GtkWidget *exception_list; - GtkWidget *exception_date; -} EventEditorPrivate; - -typedef struct { - GladeXML *gui; - GtkWidget *dialog; - GnomeCalendar *gnome_cal; - iCalObject *ical; -} EventEditorDialog; - - - -static void event_editor_class_init (EventEditorClass *class); -static void event_editor_init (EventEditor *ee); -static void event_editor_destroy (GtkObject *object); - -static GnomeAppClass *parent_class; - -extern int day_begin, day_end; -extern char *user_name; -extern int am_pm_flag; -extern int week_starts_on_monday; - - -static void append_exception (EventEditorDialog *dialog, time_t t); -static void check_all_day (EventEditorDialog *dialog); -static void alarm_toggle (GtkToggleButton *toggle, EventEditorDialog *dialog); - - - -/** - * event_editor_get_type: - * @void: - * - * Registers the #EventEditor class if necessary, and returns the type ID - * associated to it. - * - * Return value: The type ID of the #EventEditor class. - **/ -GtkType -event_editor_get_type (void) -{ - static GtkType event_editor_type = 0; - - if (!event_editor_type) { - static const GtkTypeInfo event_editor_info = { - "EventEditor", - sizeof (EventEditor), - sizeof (EventEditorClass), - (GtkClassInitFunc) event_editor_class_init, - (GtkObjectInitFunc) event_editor_init, - NULL, /* reserved_1 */ - NULL, /* reserved_2 */ - (GtkClassInitFunc) NULL - }; - - event_editor_type = gtk_type_unique (gnome_app_get_type (), &event_editor_info); - } - - return event_editor_type; -} - -/* Class initialization function for the event editor */ -static void -event_editor_class_init (EventEditorClass *class) -{ - GtkObjectClass *object_class; - - object_class = (GtkObjectClass *) class; - - parent_class = gtk_type_class (gnome_app_get_type ()); - - object_class->destroy = event_editor_destroy; -} - -/* Object initialization function for the event editor */ -static void -event_editor_init (EventEditor *ee) -{ - EventEditorPrivate *priv; - - priv = g_new0 (EventEditorPrivate, 1); - ee->priv = priv; -} - -/* Destroy handler for the event editor */ -static void -event_editor_destroy (GtkObject *object) -{ - EventEditor *ee; - EventEditorPrivate *priv; - - g_return_if_fail (object != NULL); - g_return_if_fail (IS_EVENT_EDITOR (object)); - - ee = EVENT_EDITOR (object); - priv = ee->priv; - - if (priv->xml) { - gtk_object_unref (GTK_OBJECT (priv->xml)); - priv->xml = NULL; - } - - if (GTK_OBJECT_CLASS (parent_class)->destroy) - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); -} - -/* Creates an appropriate title for the event editor dialog */ -static char * -make_title_from_ico (iCalObject *ico) -{ - const char *summary; - - if (ico->summary) - summary = ico->summary; - else - summary = _("No summary"); - - switch (ico->type) { - case ICAL_EVENT: - return g_strdup_printf (_("Appointment - %s"), summary); - - case ICAL_TODO: - return g_strdup_printf (_("Task - %s"), summary); - - case ICAL_JOURNAL: - return g_strdup_printf (_("Journal entry - %s"), summary); - - default: - g_message ("make_title_from_ico(): Cannot handle object of type %d", (int) ico->type); - return NULL; - } -} - -/* Gets the widgets from the XML file and returns if they are all available */ -static gboolean -get_widgets (EventEditor *ee) -{ - EventEditorPrivate *priv; - - priv = ee->priv; - -#define GW(name) glade_xml_get_widget (priv->xml, name) - - priv->general_owner = GW ("general-owner"); - - priv->start_time = GW ("start-time"); - priv->end_time = GW ("end-time"); - priv->all_day_checkbox = GW ("all-day-event"); - - priv->alarm_display = GW ("alarm-display"); - priv->alarm_program = GW ("alarm-program"); - priv->alarm_audio = GW ("alarm-audio"); - priv->alarm_mail = GW ("alarm-mail"); - priv->alarm_display_amount = GW ("alarm-display-amount"); - priv->alarm_display_unit = GW ("alarm-display-unit"); - priv->alarm_audio_amount = GW ("alarm-audio-amount"); - priv->alarm_audio_unit = GW ("alarm-audio-unit"); - priv->alarm_program_amount = GW ("alarm-program-amount"); - priv->alarm_program_unit = GW ("alarm-program-unit"); - priv->alarm_program_run_program = GW ("run-program-file-entry"); - priv->alarm_mail_amount = GW ("alarm-mail-amount"); - priv->alarm_mail_unit = GW ("alarm-mail-unit"); - priv->alarm_mail_mail_to = GW ("mail-to"); - - priv->recurrence_rule_notebook = GW ("recurrence-rule-notebook"); - priv->recurrence_rule_none = GW ("recurrence-rule-none"); - priv->recurrence_rule_daily = GW ("recurrence-rule-daily"); - priv->recurrence_rule_weekly = GW ("recurrence-rule-weekly"); - priv->recurrence_rule_monthly = GW ("recurrence-rule-monthly"); - priv->recurrence_rule_yearly = GW ("recurrence-rule-yearly"); - - priv->recurrence_exception_add = GW ("recurrence-exceptions-add"); - priv->recurrence_exception_delete = GW ("recurrence-exceptions-delete"); - priv->recurrence_exception_change = GW ("recurrence-exceptions-change"); - - priv->exception_list = GW ("recurrence-exceptions-list"); - priv->exception_date = GW ("recurrence-exceptions-date"); - -#undef GW - - return (priv->general_owner - && priv->start_time - && priv->end_time - && priv->all_day_checkbox - && priv->alarm_display - && priv->alarm_program - && priv->alarm_audio - && priv->alarm_mail - && priv->alarm_display_amount - && priv->alarm_display_unit - && priv->alarm_audio_amount - && priv->alarm_audio_unit - && priv->alarm_program_amount - && priv->alarm_program_unit - && priv->alarm_program_run_program - && priv->alarm_mail_amount - && priv->alarm_mail_unit - && priv->alarm_mail_mail_to - && priv->recurrence_rule_notebook - && priv->recurrence_rule_none - && priv->recurrence_rule_daily - && priv->recurrence_rule_weekly - && priv->recurrence_rule_monthly - && priv->recurrence_rule_yearly - && priv->recurrence_exception_add - && priv->recurrence_exception_delete - && priv->recurrence_exception_change - && priv->exception_list - && priv->exception_date); -} - -static GnomeUIInfo main_menu[] = { - /* FIXME */ - GNOMEUIINFO_END -}; - -/* Creates the menu bar for the event editor */ -static void -create_menu (EventEditor *ee) -{ - EventEditorPrivate *priv; - BonoboUIHandlerMenuItem *list; - - priv = ee->priv; - - bonobo_ui_handler_create_menubar (priv->uih); - - list = bonobo_ui_handler_menu_parse_uiinfo_list_with_data (main_menu, ee); - bonobo_ui_handler_menu_add_list (priv->uih, "/", list); -} - -static GnomeUIInfo toolbar[] = { - /* FIXME */ - GNOMEUIINFO_END -}; - -/* Creates the toolbar for the event editor */ -static void -create_toolbar (EventEditor *ee) -{ - EventEditorPrivate *priv; - BonoboUIHandlerToolbarItem *list; - - priv = ee->priv; - - bonobo_ui_handler_create_toolbar (priv->uih, "Toolbar"); - - list = bonobo_ui_handler_toolbar_parse_uiinfo_list_with_data (toolbar, ee); - bonobo_ui_handler_toolbar_add_list (priv->uih, "/Toolbar", list); -} - -GtkWidget * -event_editor_construct (EventEditor *ee, GnomeCalendar *gcal, iCalObject *ico) -{ - EventEditorPrivate *priv; - char *title; - GtkWidget *toplevel; - GtkWidget *contents; - - g_return_val_if_fail (ee != NULL, NULL); - g_return_val_if_fail (IS_EVENT_EDITOR (ee), NULL); - g_return_val_if_fail (gcal != NULL, NULL); - g_return_val_if_fail (GNOME_IS_CALENDAR (gcal), NULL); - g_return_val_if_fail (ico != NULL, NULL); - g_return_val_if_fail (ico->uid != NULL, NULL); - - priv = ee->priv; - - /* Create the UI handler */ - - priv->uih = bonobo_ui_handler_new (); - if (!priv->uih) { - g_message ("event_editor_construct(): Could not create the UI handler"); - goto error; - } - - bonobo_ui_handler_set_app (priv->uih, GNOME_APP (ee)); - - /* Load the content widgets */ - - priv->xml = glade_xml_new (EVOLUTION_GLADEDIR "/event-editor-dialog.glade", NULL); - if (!priv->xml) { - g_message ("event_editor_construct(): Could not load the Glade XML file!"); - goto error; - } - - toplevel = glade_xml_get_widget (priv->xml, "event-editor-dialog"); - contents = glade_xml_get_widget (priv->xml, "dialog-contents"); - if (!(toplevel && contents)) { - g_message ("event_editor_construct(): Could not find the contents in the XML file!"); - goto error; - } - - if (!get_widgets (ee)) { - g_message ("event_editor_construct(): Could not find all widgets in the XML file!"); - goto error; - } - - gtk_object_ref (GTK_OBJECT (contents)); - gtk_container_remove (GTK_CONTAINER (toplevel), GTK_WIDGET (contents)); - gtk_widget_destroy (GTK_WIDGET (toplevel)); - - /* Construct the app */ - - priv->gcal = gcal; - - title = make_title_from_ico (ico); - gnome_app_construct (GNOME_APP (ee), "event-editor", title); - g_free (title); - - create_menu (ee); - create_toolbar (ee); - - gnome_app_set_contents (GNOME_APP (ee), contents); - gtk_widget_show (contents); - gtk_object_unref (GTK_OBJECT (contents)); - - return GTK_WIDGET (ee); - - error: - - gtk_object_unref (GTK_OBJECT (ee)); - return NULL; -} - -GtkWidget * -event_editor_new (GnomeCalendar *gcal, iCalObject *ico) -{ - EventEditor *ee; - - g_return_val_if_fail (gcal != NULL, NULL); - g_return_val_if_fail (GNOME_IS_CALENDAR (gcal), NULL); - g_return_val_if_fail (ico != NULL, NULL); - g_return_val_if_fail (ico->uid != NULL, NULL); - - ee = EVENT_EDITOR (gtk_type_new (TYPE_EVENT_EDITOR)); - - ee = event_editor_construct (ee, gcal, ico); - - if (ee) - gtk_widget_show (GTK_WIDGET (ee)); - - return GTK_WIDGET (ee); -} - -static void -fill_in_dialog_from_ical (EventEditorDialog *dialog) -{ - iCalObject *ical = dialog->ical; - GladeXML *gui = dialog->gui; - GList *list; - GtkWidget *alarm_display, *alarm_program, *alarm_audio, *alarm_mail; - - store_to_editable (gui, "general-owner", - dialog->ical->organizer->addr ? - dialog->ical->organizer->addr : _("?")); - - store_to_editable (gui, "general-summary", ical->summary); - - /* start and end time */ - store_to_gnome_dateedit (gui, "start-time", ical->dtstart); - store_to_gnome_dateedit (gui, "end-time", ical->dtend); - - check_all_day (dialog); - - /* alarms */ - alarm_display = glade_xml_get_widget (dialog->gui, "alarm-display"); - alarm_program = glade_xml_get_widget (dialog->gui, "alarm-program"); - alarm_audio = glade_xml_get_widget (dialog->gui, "alarm-audio"); - alarm_mail = glade_xml_get_widget (dialog->gui, "alarm-mail"); - - store_to_toggle (gui, "alarm-display", ical->dalarm.enabled); - store_to_toggle (gui, "alarm-program", ical->palarm.enabled); - store_to_toggle (gui, "alarm-audio", ical->aalarm.enabled); - store_to_toggle (gui, "alarm-mail", ical->malarm.enabled); - alarm_toggle (GTK_TOGGLE_BUTTON (alarm_display), dialog); - alarm_toggle (GTK_TOGGLE_BUTTON (alarm_program), dialog); - alarm_toggle (GTK_TOGGLE_BUTTON (alarm_audio), dialog); - alarm_toggle (GTK_TOGGLE_BUTTON (alarm_mail), dialog); - gtk_signal_connect (GTK_OBJECT (alarm_display), "toggled", GTK_SIGNAL_FUNC (alarm_toggle), dialog); - gtk_signal_connect (GTK_OBJECT (alarm_program), "toggled", GTK_SIGNAL_FUNC (alarm_toggle), dialog); - gtk_signal_connect (GTK_OBJECT (alarm_audio), "toggled", GTK_SIGNAL_FUNC (alarm_toggle), dialog); - gtk_signal_connect (GTK_OBJECT (alarm_mail), "toggled", GTK_SIGNAL_FUNC (alarm_toggle), dialog); - - /* alarm counts */ - store_to_spin (gui, "alarm-display-amount", ical->dalarm.count); - store_to_spin (gui, "alarm-audio-amount", ical->aalarm.count); - store_to_spin (gui, "alarm-program-amount", ical->palarm.count); - store_to_spin (gui, "alarm-mail-amount", ical->malarm.count); - - store_to_alarm_unit (gui, "alarm-display-unit", ical->dalarm.units); - store_to_alarm_unit (gui, "alarm-audio-unit", ical->aalarm.units); - store_to_alarm_unit (gui, "alarm-program-unit", ical->palarm.units); - store_to_alarm_unit (gui, "alarm-mail-unit", ical->malarm.units); - - store_to_editable (gui, "run-program", ical->palarm.data); - store_to_editable (gui, "mail-to", ical->malarm.data); - - /* classification */ - if (strcmp (ical->class, "PUBLIC") == 0) - store_to_toggle (gui, "classification-public", TRUE); - if (strcmp (ical->class, "PRIVATE") == 0) - store_to_toggle (gui, "classification-private", TRUE); - if (strcmp (ical->class, "CONFIDENTIAL") == 0) - store_to_toggle (gui, "classification-confidential", TRUE); - - /* recurrence rules */ - - if (! ical->recur) - return; - - switch (ical->recur->type) { - case RECUR_DAILY: - store_to_toggle (gui, "recurrence-rule-daily", TRUE); - store_to_spin (gui, "recurrence-rule-daily-days", ical->recur->interval); - break; - case RECUR_WEEKLY: - store_to_toggle (gui, "recurrence-rule-weekly", TRUE); - store_to_spin (gui, "recurrence-rule-weekly-weeks", ical->recur->interval); - if (ical->recur->weekday & (1 << 0)) - store_to_toggle (gui, "recurrence-rule-weekly-sun", TRUE); - if (ical->recur->weekday & (1 << 1)) - store_to_toggle (gui, "recurrence-rule-weekly-mon", TRUE); - if (ical->recur->weekday & (1 << 2)) - store_to_toggle (gui, "recurrence-rule-weekly-tue", TRUE); - if (ical->recur->weekday & (1 << 3)) - store_to_toggle (gui, "recurrence-rule-weekly-wed", TRUE); - if (ical->recur->weekday & (1 << 4)) - store_to_toggle (gui, "recurrence-rule-weekly-thu", TRUE); - if (ical->recur->weekday & (1 << 5)) - store_to_toggle (gui, "recurrence-rule-weekly-fri", TRUE); - if (ical->recur->weekday & (1 << 6)) - store_to_toggle (gui, "recurrence-rule-weekly-sat", TRUE); - break; - case RECUR_MONTHLY_BY_DAY: - store_to_toggle (gui, "recurrence-rule-monthly", TRUE); - store_to_toggle (gui, "recurrence-rule-monthly-on-day", TRUE); - store_to_spin (gui, "recurrence-rule-monthly-day", ical->recur->u.month_day); - store_to_spin (gui, "recurrence-rule-monthly-every-n-months", ical->recur->interval); - break; - case RECUR_MONTHLY_BY_POS: - store_to_toggle (gui, "recurrence-rule-monthly", TRUE); - store_to_toggle (gui, "recurrence-rule-monthly-weekday", TRUE); - store_to_option (gui, "recurrence-rule-monthly-week", ical->recur->u.month_pos); - store_to_option (gui, "recurrence-rule-monthly-day", ical->recur->weekday); - store_to_spin (gui, "recurrence-rule-monthly-every-n-months", ical->recur->interval); - break; - case RECUR_YEARLY_BY_DAY: - case RECUR_YEARLY_BY_MONTH: - store_to_toggle (gui, "recurrence-rule-yearly", TRUE); - store_to_spin (gui, "recurrence-rule-yearly-every-n-years", ical->recur->interval); - break; - } - - - if (ical->recur->_enddate == 0) { - if (ical->recur->duration == 0) - store_to_toggle (gui, "recurrence-ending-date-repeat-forever", TRUE); - else { - store_to_toggle (gui, "recurrence-ending-date-end-after", TRUE); - store_to_spin (gui, "recurrence-ending-date-end-after-count", ical->recur->duration); - } - } else { - store_to_toggle (gui, "recurrence-ending-date-end-on", TRUE); - /* Shorten by one day, as we store end-on date a day ahead */ - /* FIX ME is this correct? */ - store_to_gnome_dateedit (gui, "recurrence-ending-date-end-on-date", ical->recur->enddate - 86400); - } - - /* fill the exceptions list */ - for (list = ical->exdate; list; list = list->next) - append_exception (dialog, *((time_t *) list->data)); -} - - -static void -fill_in_dialog_from_defaults (EventEditorDialog *dialog) -{ - time_t now = time (NULL); - time_t soon = time_add_minutes (now, 30); - - store_to_editable (dialog->gui, "general-owner", "?"); - - /* start and end time */ - store_to_gnome_dateedit (dialog->gui, "start-time", now); - store_to_gnome_dateedit (dialog->gui, "end-time", soon); -} - - -static void -free_exdate (iCalObject *ical) -{ - GList *list; - - if (!ical->exdate) - return; - - for (list = ical->exdate; list; list = list->next) - g_free (list->data); - - g_list_free (ical->exdate); - ical->exdate = NULL; -} - - -static void -dialog_to_ical (EventEditorDialog *dialog) -{ - iCalObject *ical = dialog->ical; - gboolean all_day_event; - GladeXML *gui = dialog->gui; - - /* general event information */ - - if (ical->summary) - g_free (ical->summary); - ical->summary = extract_from_editable (gui, "general-summary"); - - ical->dtstart = extract_from_gnome_dateedit (gui, "start-time"); - ical->dtend = extract_from_gnome_dateedit (gui, "end-time"); - - all_day_event = extract_from_toggle (gui, "all-day-event"); - - ical->dalarm.enabled = extract_from_toggle (gui, "alarm-display"); - ical->aalarm.enabled = extract_from_toggle (gui, "alarm-program"); - ical->palarm.enabled = extract_from_toggle (gui, "alarm-audio"); - ical->malarm.enabled = extract_from_toggle (gui, "alarm-mail"); - - ical->dalarm.count = extract_from_spin (gui, "alarm-display-amount"); - ical->aalarm.count = extract_from_spin (gui, "alarm-audio-amount"); - ical->palarm.count = extract_from_spin (gui, "alarm-program-amount"); - ical->malarm.count = extract_from_spin (gui, "alarm-mail-amount"); - - ical->dalarm.units = extract_from_alarm_unit (gui, "alarm-display-unit"); - ical->aalarm.units = extract_from_alarm_unit (gui, "alarm-audio-unit"); - ical->palarm.units = extract_from_alarm_unit (gui, "alarm-program-unit"); - ical->malarm.units = extract_from_alarm_unit (gui, "alarm-mail-unit"); - - ical->palarm.data = g_strdup (extract_from_editable (gui, "run-program")); - ical->malarm.data = g_strdup (extract_from_editable (gui, "mail-to")); - - if (extract_from_toggle (gui, "classification-public")) - ical->class = g_strdup ("PUBLIC"); - else if (extract_from_toggle (gui, "classification-private")) - ical->class = g_strdup ("PRIVATE"); - else /* "classification-confidential" */ - ical->class = g_strdup ("CONFIDENTIAL"); - - - /* recurrence information */ - - if (extract_from_toggle (gui, "recurrence-rule-none")) - return; /* done */ - if (!ical->recur) - ical->recur = g_new0 (Recurrence, 1); - - if (extract_from_toggle (gui, "recurrence-rule-daily")) { - ical->recur->type = RECUR_DAILY; - ical->recur->interval = extract_from_spin (gui, "recurrence-rule-daily-days"); - } - if (extract_from_toggle (gui, "recurrence-rule-weekly")) { - ical->recur->type = RECUR_WEEKLY; - ical->recur->interval = extract_from_spin (gui, "recurrence-rule-weekly-weeks"); - ical->recur->weekday = 0; - - if (extract_from_toggle (gui, "recurrence-rule-weekly-sun")) - ical->recur->weekday |= 1 << 0; - if (extract_from_toggle (gui, "recurrence-rule-weekly-mon")) - ical->recur->weekday |= 1 << 1; - if (extract_from_toggle (gui, "recurrence-rule-weekly-tue")) - ical->recur->weekday |= 1 << 2; - if (extract_from_toggle (gui, "recurrence-rule-weekly-wed")) - ical->recur->weekday |= 1 << 3; - if (extract_from_toggle (gui, "recurrence-rule-weekly-thu")) - ical->recur->weekday |= 1 << 4; - if (extract_from_toggle (gui, "recurrence-rule-weekly-fri")) - ical->recur->weekday |= 1 << 5; - if (extract_from_toggle (gui, "recurrence-rule-weekly-sat")) - ical->recur->weekday |= 1 << 6; - } - if (extract_from_toggle (gui, "recurrence-rule-monthly")) { - if (extract_from_toggle (gui, "recurrence-rule-monthly-on-day")) { - /* by day of in the month (ex: the 5th) */ - ical->recur->type = RECUR_MONTHLY_BY_DAY; - ical->recur->u.month_day = extract_from_spin (gui, "recurrence-rule-monthly-day"); - - } - else { /* "recurrence-rule-monthly-weekday" is TRUE */ - /* by position on the calender (ex: 2nd monday) */ - ical->recur->type = RECUR_MONTHLY_BY_POS; - ical->recur->u.month_pos = extract_from_option (gui, "recurrence-rule-monthly-week"); - ical->recur->weekday = extract_from_option (gui, "recurrence-rule-monthly-day"); - } - ical->recur->interval = extract_from_spin (gui, "recurrence-rule-monthly-every-n-months"); - } - if (extract_from_toggle (gui, "recurrence-rule-yearly")) { - ical->recur->type = RECUR_YEARLY_BY_DAY; - ical->recur->interval = extract_from_spin (gui, "recurrence-rule-yearly-every-n-years"); - /* FIXME: need to specify anything else? I am assuming the code will look at the dtstart - * to figure out when to recur. - Federico - */ - } - - /* recurrence ending date */ - if (extract_from_toggle (gui, "recurrence-ending-date-repeat-forever")) { - ical->recur->_enddate = 0; - ical->recur->enddate = 0; - ical->recur->duration = 0; - } - if (extract_from_toggle (gui, "recurrence-ending-date-end-on")) { - /* Also here, to ensure that the event is used, we add 86400 secs to get - get next day, in accordance to the RFC */ - ical->recur->_enddate = extract_from_gnome_dateedit (gui, "recurrence-ending-date-end-on-date") + 86400; - ical->recur->enddate = ical->recur->_enddate; - ical->recur->duration = 0; - } - if (extract_from_toggle (gui, "recurrence-ending-date-end-after")) { - ical->recur->duration = extract_from_spin (gui, "recurrence-ending-date-end-after-count"); - ical_object_compute_end (ical); - } - - - /* get exceptions from clist into ical->exdate */ - { - int i; - time_t *t; - GtkCList *exception_list = GTK_CLIST (glade_xml_get_widget (dialog->gui, "recurrence-exceptions-list")); - - free_exdate (ical); - - for (i = 0; i < exception_list->rows; i++) { - t = gtk_clist_get_row_data (exception_list, i); - ical->exdate = g_list_prepend (ical->exdate, t); - } - } -} - - -static void -ee_ok (GtkWidget *widget, EventEditorDialog *dialog) -{ - dialog_to_ical (dialog); - - if (dialog->ical->new) - gnome_calendar_add_object (dialog->gnome_cal, dialog->ical); - else - gnome_calendar_object_changed (dialog->gnome_cal, - dialog->ical, - CHANGE_ALL); - dialog->ical->new = 0; -} - - -static void -ee_cancel (GtkWidget *widget, EventEditorDialog *dialog) -{ - if (dialog->ical) { - ical_object_unref (dialog->ical); - dialog->ical = NULL; - } -} - - -static void -alarm_toggle (GtkToggleButton *toggle, EventEditorDialog *dialog) -{ - GtkWidget *alarm_display = glade_xml_get_widget (dialog->gui, "alarm-display"); - GtkWidget *alarm_program = glade_xml_get_widget (dialog->gui, "alarm-program"); - GtkWidget *alarm_audio = glade_xml_get_widget (dialog->gui, "alarm-audio"); - GtkWidget *alarm_mail = glade_xml_get_widget (dialog->gui, "alarm-mail"); - GtkWidget *alarm_amount, *alarm_unit; - - if (GTK_WIDGET (toggle) == alarm_display) { - alarm_amount = glade_xml_get_widget (dialog->gui, "alarm-display-amount"); - alarm_unit = glade_xml_get_widget (dialog->gui, "alarm-display-unit"); - } - if (GTK_WIDGET (toggle) == alarm_audio) { - alarm_amount = glade_xml_get_widget (dialog->gui, "alarm-audio-amount"); - alarm_unit = glade_xml_get_widget (dialog->gui, "alarm-audio-unit"); - } - if (GTK_WIDGET (toggle) == alarm_program) { - GtkWidget *run_program; - alarm_amount = glade_xml_get_widget (dialog->gui, "alarm-program-amount"); - alarm_unit = glade_xml_get_widget (dialog->gui, "alarm-program-unit"); - run_program = glade_xml_get_widget (dialog->gui, "run-program-file-entry"); - gtk_widget_set_sensitive (run_program, toggle->active); - } - if (GTK_WIDGET (toggle) == alarm_mail) { - GtkWidget *mail_to; - alarm_amount = glade_xml_get_widget (dialog->gui, "alarm-mail-amount"); - alarm_unit = glade_xml_get_widget (dialog->gui, "alarm-mail-unit"); - mail_to = glade_xml_get_widget (dialog->gui, "mail-to"); - gtk_widget_set_sensitive (mail_to, toggle->active); - } - - gtk_widget_set_sensitive (alarm_amount, toggle->active); - gtk_widget_set_sensitive (alarm_unit, toggle->active); -} - - - -/* - * Checks if the day range occupies all the day, and if so, check the - * box accordingly - */ -static void -check_all_day (EventEditorDialog *dialog) -{ - time_t ev_start = extract_from_gnome_dateedit (dialog->gui, "start-time"); - time_t ev_end = extract_from_gnome_dateedit (dialog->gui, "end-time"); - - /* all day event checkbox */ - if (get_time_t_hour (ev_start) <= day_begin && - get_time_t_hour (ev_end) >= day_end) - store_to_toggle (dialog->gui, "all-day-event", TRUE); - else - store_to_toggle (dialog->gui, "all-day-event", FALSE); -} - - -/* - * Callback: all day event box clicked - */ -static void -set_all_day (GtkToggleButton *toggle, EventEditorDialog *dialog) -{ - struct tm tm; - time_t start_t; - - start_t = extract_from_gnome_dateedit (dialog->gui, "start-time"); - tm = *localtime (&start_t); - tm.tm_hour = day_begin; - tm.tm_min = 0; - tm.tm_sec = 0; - store_to_gnome_dateedit (dialog->gui, "start-time", mktime (&tm)); - - if (toggle->active) - tm.tm_hour = day_end; - else - tm.tm_hour++; - - store_to_gnome_dateedit (dialog->gui, "end-time", mktime (&tm)); -} - - -/* - * Callback: checks that the dates are start < end - */ -static void -check_dates (GnomeDateEdit *gde, EventEditorDialog *dialog) -{ - time_t start, end; - struct tm tm_start, tm_end; - GtkWidget *start_time = glade_xml_get_widget (dialog->gui, "start-time"); - GtkWidget *end_time = glade_xml_get_widget (dialog->gui, "end-time"); - - - //start = gnome_date_edit_get_date (GNOME_DATE_EDIT (ee->start_time)); - start = extract_from_gnome_dateedit (dialog->gui, "start-time"); - //end = gnome_date_edit_get_date (GNOME_DATE_EDIT (ee->end_time)); - end = extract_from_gnome_dateedit (dialog->gui, "end-time"); - - if (start > end) { - tm_start = *localtime (&start); - tm_end = *localtime (&end); - - if (GTK_WIDGET (gde) == start_time) { - tm_end.tm_year = tm_start.tm_year; - tm_end.tm_mon = tm_start.tm_mon; - tm_end.tm_mday = tm_start.tm_mday; - - gnome_date_edit_set_time (GNOME_DATE_EDIT (end_time), mktime (&tm_end)); - } else if (GTK_WIDGET (gde) == end_time) { - tm_start.tm_year = tm_end.tm_year; - tm_start.tm_mon = tm_end.tm_mon; - tm_start.tm_mday = tm_end.tm_mday; - - //gnome_date_edit_set_time (GNOME_DATE_EDIT (ee->start_time), mktime (&tm_start)); - } - } -} - - -/* - * Callback: checks that start_time < end_time and whether the - * selected hour range spans all of the day - */ -static void -check_times (GnomeDateEdit *gde, EventEditorDialog *dialog) -{ - time_t start, end; - struct tm tm_start, tm_end; - GtkWidget *start_time = glade_xml_get_widget (dialog->gui, "start-time"); - GtkWidget *end_time = glade_xml_get_widget (dialog->gui, "end-time"); - - - gdk_pointer_ungrab (GDK_CURRENT_TIME); - gdk_flush (); - - start = gnome_date_edit_get_date (GNOME_DATE_EDIT (start_time)); - end = gnome_date_edit_get_date (GNOME_DATE_EDIT (end_time)); - - if (start >= end) { - tm_start = *localtime (&start); - tm_end = *localtime (&end); - - if (GTK_WIDGET (gde) == start_time) { - tm_end.tm_min = tm_start.tm_min; - tm_end.tm_sec = tm_start.tm_sec; - - tm_end.tm_hour = tm_start.tm_hour + 1; - - if (tm_end.tm_hour >= 24) { - tm_end.tm_hour = 24; /* mktime() will bump the day */ - tm_end.tm_min = 0; - tm_end.tm_sec = 0; - } - - gnome_date_edit_set_time (GNOME_DATE_EDIT (end_time), mktime (&tm_end)); - } else if (GTK_WIDGET (gde) == end_time) { - tm_start.tm_min = tm_end.tm_min; - tm_start.tm_sec = tm_end.tm_sec; - - tm_start.tm_hour = tm_end.tm_hour - 1; - - if (tm_start.tm_hour < 0) { - tm_start.tm_hour = 0; - tm_start.tm_min = 0; - tm_start.tm_min = 0; - } - - gnome_date_edit_set_time (GNOME_DATE_EDIT (start_time), mktime (&tm_start)); - } - } - - /* Check whether the event spans the whole day */ - - check_all_day (dialog); -} - - -static void -recurrence_toggled (GtkWidget *radio, EventEditorDialog *dialog) -{ - GtkWidget *recurrence_rule_notebook = glade_xml_get_widget (dialog->gui, "recurrence-rule-notebook"); - - GtkWidget *recurrence_rule_none = glade_xml_get_widget (dialog->gui, "recurrence-rule-none"); - GtkWidget *recurrence_rule_daily = glade_xml_get_widget (dialog->gui, "recurrence-rule-daily"); - GtkWidget *recurrence_rule_weekly = glade_xml_get_widget (dialog->gui, "recurrence-rule-weekly"); - GtkWidget *recurrence_rule_monthly = glade_xml_get_widget (dialog->gui, "recurrence-rule-monthly"); - GtkWidget *recurrence_rule_yearly = glade_xml_get_widget (dialog->gui, "recurrence-rule-yearly"); - - if (radio == recurrence_rule_none) - gtk_notebook_set_page (GTK_NOTEBOOK (recurrence_rule_notebook), 0); - if (radio == recurrence_rule_daily) - gtk_notebook_set_page (GTK_NOTEBOOK (recurrence_rule_notebook), 1); - if (radio == recurrence_rule_weekly) - gtk_notebook_set_page (GTK_NOTEBOOK (recurrence_rule_notebook), 2); - if (radio == recurrence_rule_monthly) - gtk_notebook_set_page (GTK_NOTEBOOK (recurrence_rule_notebook), 3); - if (radio == recurrence_rule_yearly) - gtk_notebook_set_page (GTK_NOTEBOOK (recurrence_rule_notebook), 4); -} - - -static char * -get_exception_string (time_t t) -{ - static char buf[256]; - - strftime (buf, sizeof(buf), _("%a %b %d %Y"), localtime (&t)); - return buf; -} - - -static void -append_exception (EventEditorDialog *dialog, time_t t) -{ - time_t *tt; - char *c[1]; - int i; - GtkCList *exception_list = GTK_CLIST (glade_xml_get_widget (dialog->gui, "recurrence-exceptions-list")); - - c[0] = get_exception_string (t); - - tt = g_new (time_t, 1); - *tt = t; - - i = gtk_clist_append (exception_list, c); - gtk_clist_set_row_data (exception_list, i, tt); - gtk_clist_select_row (exception_list, i, 0); - - //gtk_widget_set_sensitive (ee->recur_ex_vbox, TRUE); -} - - -static void -recurrence_exception_added (GtkWidget *widget, EventEditorDialog *dialog) -{ - //GtkWidget *exception_date = glade_xml_get_widget (dialog->gui, "recurrence-exceptions-date"); - time_t t = extract_from_gnome_dateedit (dialog->gui, "recurrence-exceptions-date"); - append_exception (dialog, t); -} - - -static void -recurrence_exception_deleted (GtkWidget *widget, EventEditorDialog *dialog) -{ - GtkCList *clist; - int sel, length; - - clist = GTK_CLIST (glade_xml_get_widget (dialog->gui, "recurrence-exceptions-list")); - if (! clist->selection) - return; - sel = GPOINTER_TO_INT(clist->selection->data); - - g_free (gtk_clist_get_row_data (clist, sel)); /* free the time_t stored there */ - - gtk_clist_remove (clist, sel); - length = g_list_length(clist->row_list); - if (sel >= length) - sel--; - gtk_clist_select_row (clist, sel, 0); - - //if (clist->rows == 0) - // gtk_widget_set_sensitive (ee->recur_ex_vbox, FALSE); -} - - -static void -recurrence_exception_changed (GtkWidget *widget, EventEditorDialog *dialog) -{ - GtkCList *clist; - time_t *t; - int sel; - - clist = GTK_CLIST (glade_xml_get_widget (dialog->gui, "recurrence-exceptions-list")); - if (! clist->selection) - return; - - sel = GPOINTER_TO_INT(clist->selection->data); - - t = gtk_clist_get_row_data (clist, sel); - *t = extract_from_gnome_dateedit (dialog->gui, "recurrence-exceptions-date"); - - gtk_clist_set_text (clist, sel, 0, get_exception_string (*t)); -} - - -#if 0 -GtkWidget *event_editor_new (GnomeCalendar *gcal, iCalObject *ical) -{ - EventEditorDialog *dialog = g_new0 (EventEditorDialog, 1); - - dialog->ical = ical; - dialog->gnome_cal = gcal; - - printf ("glade_xml_new (%s, NULL)\n", - EVOLUTION_GLADEDIR "/event-editor-dialog.glade"); - - dialog->gui = glade_xml_new (EVOLUTION_GLADEDIR - "/event-editor-dialog.glade", - NULL); - - dialog->dialog = glade_xml_get_widget (dialog->gui, - "event-editor-dialog"); - - gnome_dialog_button_connect (GNOME_DIALOG (dialog->dialog), - 0, GTK_SIGNAL_FUNC(ee_ok), dialog); - gnome_dialog_button_connect (GNOME_DIALOG (dialog->dialog), - 1, GTK_SIGNAL_FUNC(ee_cancel), dialog); - - - { - GtkWidget *start_time = glade_xml_get_widget (dialog->gui, "start-time"); - GtkWidget *end_time = glade_xml_get_widget (dialog->gui, "end-time"); - - gtk_signal_connect (GTK_OBJECT (start_time), "date_changed", - GTK_SIGNAL_FUNC (check_dates), dialog); - gtk_signal_connect (GTK_OBJECT (start_time), "time_changed", - GTK_SIGNAL_FUNC (check_times), dialog); - - gtk_signal_connect (GTK_OBJECT (end_time), "date_changed", - GTK_SIGNAL_FUNC (check_dates), dialog); - gtk_signal_connect (GTK_OBJECT (end_time), "time_changed", - GTK_SIGNAL_FUNC (check_times), dialog); - } - - - { - GtkWidget *all_day_checkbox = glade_xml_get_widget (dialog->gui, "all-day-event"); - gtk_signal_connect (GTK_OBJECT (all_day_checkbox), "toggled", GTK_SIGNAL_FUNC (set_all_day), dialog); - } - - - { - GtkWidget *recurrence_rule_none = glade_xml_get_widget (dialog->gui, "recurrence-rule-none"); - GtkWidget *recurrence_rule_daily = glade_xml_get_widget (dialog->gui, "recurrence-rule-daily"); - GtkWidget *recurrence_rule_weekly = glade_xml_get_widget (dialog->gui, "recurrence-rule-weekly"); - GtkWidget *recurrence_rule_monthly = glade_xml_get_widget (dialog->gui, "recurrence-rule-monthly"); - GtkWidget *recurrence_rule_yearly = glade_xml_get_widget (dialog->gui, "recurrence-rule-yearly"); - - gtk_signal_connect (GTK_OBJECT (recurrence_rule_none), "toggled", - GTK_SIGNAL_FUNC (recurrence_toggled), dialog); - gtk_signal_connect (GTK_OBJECT (recurrence_rule_daily), "toggled", - GTK_SIGNAL_FUNC (recurrence_toggled), dialog); - gtk_signal_connect (GTK_OBJECT (recurrence_rule_weekly), "toggled", - GTK_SIGNAL_FUNC (recurrence_toggled), dialog); - gtk_signal_connect (GTK_OBJECT (recurrence_rule_monthly), "toggled", - GTK_SIGNAL_FUNC (recurrence_toggled), dialog); - gtk_signal_connect (GTK_OBJECT (recurrence_rule_yearly), "toggled", - GTK_SIGNAL_FUNC (recurrence_toggled), dialog); - - } - - - { - GtkWidget *recurrence_exception_add = glade_xml_get_widget (dialog->gui, "recurrence-exceptions-add"); - GtkWidget *recurrence_exception_delete = glade_xml_get_widget (dialog->gui, "recurrence-exceptions-delete"); - GtkWidget *recurrence_exception_change = glade_xml_get_widget (dialog->gui, "recurrence-exceptions-change"); - - gtk_signal_connect (GTK_OBJECT (recurrence_exception_add), "clicked", - GTK_SIGNAL_FUNC (recurrence_exception_added), dialog); - gtk_signal_connect (GTK_OBJECT (recurrence_exception_delete), "clicked", - GTK_SIGNAL_FUNC (recurrence_exception_deleted), dialog); - gtk_signal_connect (GTK_OBJECT (recurrence_exception_change), "clicked", - GTK_SIGNAL_FUNC (recurrence_exception_changed), dialog); - } - - - - if (ical->new) - fill_in_dialog_from_defaults (dialog); - else - fill_in_dialog_from_ical (dialog); - - - gnome_dialog_run (GNOME_DIALOG(dialog->dialog)); - - gnome_dialog_close (GNOME_DIALOG(dialog->dialog)); - - return dialog->dialog; -} -#endif - -void event_editor_new_whole_day (GnomeCalendar *owner, time_t day) -{ - struct tm tm; - iCalObject *ico; - GtkWidget *ee; - - g_return_if_fail (owner != NULL); - g_return_if_fail (GNOME_IS_CALENDAR (owner)); - - ico = ical_new ("", user_name, ""); - ico->new = TRUE; - - tm = *localtime (&day); - - /* Set the start time of the event to the beginning of the day */ - - tm.tm_hour = day_begin; - tm.tm_min = 0; - tm.tm_sec = 0; - ico->dtstart = mktime (&tm); - - /* Set the end time of the event to the end of the day */ - - tm.tm_hour = day_end; - ico->dtend = mktime (&tm); - - /* Launch the event editor */ - - ee = event_editor_new (owner, ico); -} - - - -GtkWidget *make_date_edit (void) -{ - return date_edit_new (time (NULL), FALSE); -} - - -GtkWidget *make_date_edit_with_time (void) -{ - return date_edit_new (time (NULL), TRUE); -} - - -GtkWidget *date_edit_new (time_t the_time, int show_time) -{ - return gnome_date_edit_new_flags (the_time, - ((show_time ? GNOME_DATE_EDIT_SHOW_TIME : 0) - | (am_pm_flag ? 0 : GNOME_DATE_EDIT_24_HR) - | (week_starts_on_monday - ? GNOME_DATE_EDIT_WEEK_STARTS_ON_MONDAY - : 0))); -} - - - -GtkWidget * -make_spin_button (int val, int low, int high) -{ - GtkAdjustment *adj; - GtkWidget *spin; - - adj = GTK_ADJUSTMENT (gtk_adjustment_new (val, low, high, 1, 10, 10)); - spin = gtk_spin_button_new (adj, 0.5, 0); - gtk_widget_set_usize (spin, 60, 0); - - return spin; -} - - -/* todo - - build some of the recur stuff by hand to take into account - the start-on-monday preference? - - get the apply button to work right - - make the properties stuff unglobal - - figure out why alarm units aren't sticking between edits - - closing the dialog window with the wm caused a crash - Gtk-WARNING **: invalid cast from `(unknown)' to `GnomeDialog' - on line 669: gnome_dialog_close (GNOME_DIALOG(dialog->dialog)); - */ diff --git a/calendar/gui/event-editor.h b/calendar/gui/event-editor.h deleted file mode 100644 index 00646afd75..0000000000 --- a/calendar/gui/event-editor.h +++ /dev/null @@ -1,86 +0,0 @@ -/* Evolution calendar - Event editor dialog - * - * Copyright (C) 2000 Helix Code, Inc. - * - * Authors: Miguel de Icaza - * Federico Mena-Quintero - * Seth Alves - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. - */ - -#ifndef __EVENT_EDITOR_DIALOG_H__ -#define __EVENT_EDITOR_DIALOG_H__ - -#include -#include -#include "gnome-cal.h" - - - -#define TYPE_EVENT_EDITOR (event_editor_get_type ()) -#define EVENT_EDITOR(obj) (GTK_CHECK_CAST ((obj), TYPE_EVENT_EDITOR, EventEditor)) -#define EVENT_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), TYPE_EVENT_EDITOR, \ - EventEditorClass)) -#define IS_EVENT_EDITOR(obj) (GTK_CHECK_TYPE ((obj), TYPE_EVENT_EDITOR)) -#define IS_EVENT_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), TYPE_EVENT_EDITOR)) - -typedef struct _EventEditor EventEditor; -typedef struct _EventEditorClass EventEditorClass; - -struct _EventEditor { - GnomeApp app; - - /* Private data */ - gpointer priv; - - /* The associated ical object */ - iCalObject *ical; - - /* The calendar owner of this event */ - GnomeCalendar *gnome_cal; - - /* - char *description; - char *host; - int port; - char *rootdn; - */ -}; - -struct _EventEditorClass { - GnomeAppClass parent_class; -}; - - -GtkType event_editor_get_type (void); -GtkWidget *event_editor_construct (EventEditor *ee, GnomeCalendar *gcal, iCalObject *ico); - -GtkWidget *event_editor_new (GnomeCalendar *gcal, iCalObject *ico); - -/* Convenience function to create and show a new event editor for an - * event that goes from day_begin to day_end of the specified day. - */ -void event_editor_new_whole_day (GnomeCalendar *owner, time_t day); - -GtkWidget *make_date_edit (void); -GtkWidget *make_date_edit_with_time (void); -GtkWidget *date_edit_new (time_t the_time, int show_time); - -GtkWidget *make_spin_button (int val, int low, int high); - - - -#endif /* __EVENT_EDITOR_DIALOG_H__ */ diff --git a/calendar/gui/eventedit.c b/calendar/gui/eventedit.c deleted file mode 100644 index 517f2f83c8..0000000000 --- a/calendar/gui/eventedit.c +++ /dev/null @@ -1,1576 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -/* - * EventEditor widget - * Copyright (C) 1998 the Free Software Foundation - * - * Authors: Miguel de Icaza (miguel@kernel.org) - * Federico Mena (quartic@gimp.org) - */ -#include -#include -#include -#include -#include "eventedit.h" -#include "calendar-commands.h" - - -static void event_editor_class_init (EventEditorClass *class); -static void event_editor_init (EventEditor *ee); -static void event_editor_destroy (GtkObject *object); - -GtkWidget* make_spin_button (int val, int low, int high); -void ee_create_ae (GtkTable *table, char *str, CalendarAlarm *alarm, enum AlarmType type, - int y, gboolean control_sens, GtkSignalFunc dirty_func); -void ee_store_alarm (CalendarAlarm *alarm, enum AlarmType type); - -/* Note: do not i18n these strings, they are part of the vCalendar protocol */ -static char *class_names [] = { "PUBLIC", "PRIVATE", "CONFIDENTIAL" }; - -static GnomeDialogClass *parent_class; - -struct numbered_item { - char *text; - int num; -}; - - -guint -event_editor_get_type (void) -{ - static guint event_editor_type = 0; - - if(!event_editor_type) { - GtkTypeInfo event_editor_info = { - "EventEditor", - sizeof(EventEditor), - sizeof(EventEditorClass), - (GtkClassInitFunc) event_editor_class_init, - (GtkObjectInitFunc) event_editor_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL, - }; - event_editor_type = gtk_type_unique (gnome_dialog_get_type (), &event_editor_info); - } - return event_editor_type; -} - -static void -event_editor_class_init (EventEditorClass *class) -{ - GtkObjectClass *object_class; - - parent_class = gtk_type_class (gnome_dialog_get_type ()); - object_class = (GtkObjectClass*) class; - object_class->destroy = event_editor_destroy; -} - -GtkWidget * -make_spin_button (int val, int low, int high) -{ - GtkAdjustment *adj; - GtkWidget *spin; - - adj = GTK_ADJUSTMENT (gtk_adjustment_new (val, low, high, 1, 10, 10)); - spin = gtk_spin_button_new (adj, 0.5, 0); - gtk_widget_set_usize (spin, 60, 0); - - return spin; -} - -/* - * Checks if the day range occupies all the day, and if so, check the - * box accordingly - */ -static void -ee_check_all_day (EventEditor *ee) -{ - time_t ev_start, ev_end; - - ev_start = gnome_date_edit_get_date (GNOME_DATE_EDIT (ee->start_time)); - ev_end = gnome_date_edit_get_date (GNOME_DATE_EDIT (ee->end_time)); - - if (get_time_t_hour (ev_start) <= day_begin && get_time_t_hour (ev_end) >= day_end) - gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (ee->general_allday), 1); - else - gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (ee->general_allday), 0); -} - -/* - * Callback: checks that the dates are start < end - */ -static void -check_dates (GnomeDateEdit *gde, EventEditor *ee) -{ - time_t start, end; - struct tm tm_start, tm_end; - - start = gnome_date_edit_get_date (GNOME_DATE_EDIT (ee->start_time)); - end = gnome_date_edit_get_date (GNOME_DATE_EDIT (ee->end_time)); - - if (start > end) { - tm_start = *localtime (&start); - tm_end = *localtime (&end); - - if (GTK_WIDGET (gde) == ee->start_time) { - tm_end.tm_year = tm_start.tm_year; - tm_end.tm_mon = tm_start.tm_mon; - tm_end.tm_mday = tm_start.tm_mday; - - gnome_date_edit_set_time (GNOME_DATE_EDIT (ee->end_time), mktime (&tm_end)); - } else if (GTK_WIDGET (gde) == ee->end_time) { - tm_start.tm_year = tm_end.tm_year; - tm_start.tm_mon = tm_end.tm_mon; - tm_start.tm_mday = tm_end.tm_mday; - - gnome_date_edit_set_time (GNOME_DATE_EDIT (ee->start_time), mktime (&tm_start)); - } - } -} - -/* - * Callback: checks that start_time < end_time and whether the - * selected hour range spans all of the day - */ -static void -check_times (GnomeDateEdit *gde, EventEditor *ee) -{ - time_t start, end; - struct tm tm_start, tm_end; - - gdk_pointer_ungrab (GDK_CURRENT_TIME); - gdk_flush (); - - start = gnome_date_edit_get_date (GNOME_DATE_EDIT (ee->start_time)); - end = gnome_date_edit_get_date (GNOME_DATE_EDIT (ee->end_time)); - - if (start >= end) { - tm_start = *localtime (&start); - tm_end = *localtime (&end); - - if (GTK_WIDGET (gde) == ee->start_time) { - tm_end.tm_min = tm_start.tm_min; - tm_end.tm_sec = tm_start.tm_sec; - - tm_end.tm_hour = tm_start.tm_hour + 1; - - if (tm_end.tm_hour >= 24) { - tm_end.tm_hour = 24; /* mktime() will bump the day */ - tm_end.tm_min = 0; - tm_end.tm_sec = 0; - } - - gnome_date_edit_set_time (GNOME_DATE_EDIT (ee->end_time), mktime (&tm_end)); - } else if (GTK_WIDGET (gde) == ee->end_time) { - tm_start.tm_min = tm_end.tm_min; - tm_start.tm_sec = tm_end.tm_sec; - - tm_start.tm_hour = tm_end.tm_hour - 1; - - if (tm_start.tm_hour < 0) { - tm_start.tm_hour = 0; - tm_start.tm_min = 0; - tm_start.tm_min = 0; - } - - gnome_date_edit_set_time (GNOME_DATE_EDIT (ee->start_time), mktime (&tm_start)); - } - } - - /* Check whether the event spans the whole day */ - - ee_check_all_day (ee); -} - -/* - * Callback: all day event box clicked - */ -static void -set_all_day (GtkToggleButton *toggle, EventEditor *ee) -{ - struct tm tm; - time_t start_t; - - start_t = gnome_date_edit_get_date (GNOME_DATE_EDIT (ee->start_time)); - tm = *localtime (&start_t); - tm.tm_hour = day_begin; - tm.tm_min = 0; - tm.tm_sec = 0; - gnome_date_edit_set_time (GNOME_DATE_EDIT (ee->start_time), mktime (&tm)); - - if (toggle->active) - tm.tm_hour = day_end; - else - tm.tm_hour++; - - gnome_date_edit_set_time (GNOME_DATE_EDIT (ee->end_time), mktime (&tm)); -} - -/* Convenience function to create a properly-configured date editor widget */ -GtkWidget * -date_edit_new (time_t the_time, int show_time) -{ - return gnome_date_edit_new_flags (the_time, - ((show_time ? GNOME_DATE_EDIT_SHOW_TIME : 0) - | (am_pm_flag ? 0 : GNOME_DATE_EDIT_24_HR) - | (week_starts_on_monday - ? GNOME_DATE_EDIT_WEEK_STARTS_ON_MONDAY - : 0))); -} - -static GtkWidget * -event_editor_setup_time_frame (EventEditor *ee) -{ - GtkWidget *frame; - GtkWidget *start_time, *end_time; - GtkTable *t; - - frame = gtk_frame_new (_("Time")); - t = GTK_TABLE (ee->general_time_table = gtk_table_new (1, 1, 0)); - gtk_container_border_width (GTK_CONTAINER (t), 4); - gtk_table_set_row_spacings (t, 4); - gtk_table_set_col_spacings (t, 4); - gtk_container_add (GTK_CONTAINER (frame), ee->general_time_table); - - /* 1. Start time */ - if (ee->ical->dtstart == 0){ - ee->ical->dtstart = time (NULL); - ee->ical->dtend = time_add_minutes (ee->ical->dtstart, 30); - } - ee->start_time = start_time = date_edit_new (ee->ical->dtstart, TRUE); - gnome_date_edit_set_popup_range ((GnomeDateEdit *) start_time, day_begin, day_end); - gtk_signal_connect (GTK_OBJECT (start_time), "date_changed", - GTK_SIGNAL_FUNC (check_dates), ee); - gtk_signal_connect (GTK_OBJECT (start_time), "time_changed", - GTK_SIGNAL_FUNC (check_times), ee); - gtk_table_attach (t, gtk_label_new (_("Start time:")), 1, 2, 1, 2, - GTK_FILL | GTK_SHRINK, - GTK_FILL | GTK_SHRINK, - 0, 0); - gtk_table_attach (t, start_time, 2, 3, 1, 2, - GTK_EXPAND | GTK_FILL | GTK_SHRINK, - GTK_FILL | GTK_SHRINK, - 0, 0); - - /* 2. End time */ - ee->end_time = end_time = date_edit_new (ee->ical->dtend, TRUE); - gnome_date_edit_set_popup_range ((GnomeDateEdit *) end_time, day_begin, day_end); - gtk_signal_connect (GTK_OBJECT (end_time), "date_changed", - GTK_SIGNAL_FUNC (check_dates), ee); - gtk_signal_connect (GTK_OBJECT (end_time), "time_changed", - GTK_SIGNAL_FUNC (check_times), ee); - gtk_table_attach (t, gtk_label_new (_("End time:")), 1, 2, 2, 3, - GTK_FILL | GTK_SHRINK, - GTK_FILL | GTK_SHRINK, - 0, 0); - gtk_table_attach (t, end_time, 2, 3, 2, 3, - GTK_EXPAND | GTK_FILL | GTK_SHRINK, - GTK_FILL | GTK_SHRINK, - 0, 0); - - /* 3. All day checkbox */ - ee->general_allday = gtk_check_button_new_with_label (_("All day event")); - gtk_signal_connect (GTK_OBJECT (ee->general_allday), "toggled", - GTK_SIGNAL_FUNC (set_all_day), ee); - gtk_table_attach (t, ee->general_allday, 3, 4, 1, 2, - GTK_EXPAND | GTK_FILL | GTK_SHRINK, - GTK_FILL | GTK_SHRINK, - 4, 0); - ee_check_all_day (ee); - - return frame; -} - -static GtkWidget * -timesel_new (void) -{ - GtkWidget *menu, *option_menu; - char *items [] = { N_("Minutes"), N_("Hours"), N_("Days") }; - int i; - - option_menu = gtk_option_menu_new (); - menu = gtk_menu_new (); - for (i = 0; i < 3; i++){ - GtkWidget *item; - - item = gtk_menu_item_new_with_label (_(items [i])); - gtk_menu_append (GTK_MENU (menu), item); - gtk_widget_show (item); - } - gtk_option_menu_set_menu (GTK_OPTION_MENU (option_menu), menu); - return option_menu; -} - -/* - * Set the sensitive state depending on whether the alarm enabled flag. - */ -static void -ee_alarm_setting (CalendarAlarm *alarm, int sensitive) -{ - gtk_widget_set_sensitive (GTK_WIDGET (alarm->w_count), sensitive); - gtk_widget_set_sensitive (GTK_WIDGET (alarm->w_timesel), sensitive); - - if (alarm->type == ALARM_PROGRAM || alarm->type == ALARM_MAIL){ - gtk_widget_set_sensitive (GTK_WIDGET (alarm->w_entry), sensitive); - gtk_widget_set_sensitive (GTK_WIDGET (alarm->w_label), sensitive); - } -} - -static void -alarm_toggle (GtkToggleButton *toggle, CalendarAlarm *alarm) -{ - ee_alarm_setting (alarm, toggle->active); -} - -#define FXS (GTK_FILL | GTK_EXPAND | GTK_SHRINK) -#define FS (GTK_FILL | GTK_SHRINK) - -void -ee_create_ae (GtkTable *table, char *str, CalendarAlarm *alarm, enum AlarmType type, int y, gboolean control_sens, GtkSignalFunc dirty_func) -{ - GtkWidget *entry; - - alarm->w_enabled = gtk_check_button_new_with_label (str); - gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (alarm->w_enabled), - alarm->enabled); - if (control_sens) - gtk_signal_connect (GTK_OBJECT (alarm->w_enabled), "toggled", - GTK_SIGNAL_FUNC (alarm_toggle), alarm); - if (dirty_func) - gtk_signal_connect (GTK_OBJECT (alarm->w_enabled), "toggled", - GTK_SIGNAL_FUNC (dirty_func), NULL); - gtk_table_attach (table, alarm->w_enabled, 0, 1, y, y+1, FS, FS, 0, 0); - - alarm->w_count = make_spin_button (alarm->count, 0, 10000); - if (dirty_func) - gtk_signal_connect (GTK_OBJECT (alarm->w_count), "changed", - GTK_SIGNAL_FUNC (dirty_func), NULL); - gtk_table_attach (table, alarm->w_count, 1, 2, y, y+1, FS, FS, 0, 0); - - alarm->w_timesel = timesel_new (); - /* is there a "changed" signal which we can connect to? */ - gtk_option_menu_set_history (GTK_OPTION_MENU (alarm->w_timesel), alarm->units); - gtk_table_attach (table, alarm->w_timesel, 2, 3, y, y+1, FS, FS, 0, 0); - - switch (type){ - case ALARM_MAIL: - alarm->w_label = gtk_label_new (_("Mail to:")); - gtk_misc_set_alignment (GTK_MISC (alarm->w_label), 1.0, 0.5); - gtk_table_attach (table, alarm->w_label, 3, 4, y, y+1, FS, FS, 0, 0); - alarm->w_entry = gtk_entry_new (); - gtk_table_attach (table, alarm->w_entry, 4, 5, y, y+1, FXS, FS, 0, 0); - gtk_entry_set_text (GTK_ENTRY (alarm->w_entry), alarm->data ? alarm->data : ""); - if (dirty_func) - gtk_signal_connect (GTK_OBJECT (alarm->w_entry), - "changed", - GTK_SIGNAL_FUNC (dirty_func), - NULL); - break; - - case ALARM_PROGRAM: - alarm->w_label = gtk_label_new (_("Run program:")); - gtk_misc_set_alignment (GTK_MISC (alarm->w_label), 1.0, 0.5); - gtk_table_attach (table, alarm->w_label, 3, 4, y, y+1, FS, FS, 0, 0); - alarm->w_entry = gnome_file_entry_new ("alarm-program", _("Select program to run at alarm time")); - entry = gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (alarm->w_entry)); - gtk_entry_set_text (GTK_ENTRY (entry), alarm->data ? alarm->data : ""); - gtk_table_attach (table, alarm->w_entry, 4, 5, y, y+1, FXS, FS, 0, 0); - if (dirty_func) - gtk_signal_connect (GTK_OBJECT (entry), - "changed", - GTK_SIGNAL_FUNC (dirty_func), - NULL); - break; - - default: - break; - } - - if (control_sens) - ee_alarm_setting (alarm, alarm->enabled); - else - ee_alarm_setting (alarm, TRUE); -} - -static GtkWidget * -ee_alarm_widgets (EventEditor *ee) -{ - GtkWidget *table, *mailto, *mailte, *l; - - l = gtk_frame_new (_("Alarms")); - - table = gtk_table_new (1, 1, 0); - gtk_container_border_width (GTK_CONTAINER (table), 4); - gtk_table_set_row_spacings (GTK_TABLE (table), 4); - gtk_table_set_col_spacings (GTK_TABLE (table), 4); - gtk_container_add (GTK_CONTAINER (l), table); - - mailto = gtk_label_new (_("Mail to:")); - mailte = gtk_entry_new (); - - ee_create_ae (GTK_TABLE (table), _("Display"), &ee->ical->dalarm, ALARM_DISPLAY, 1, TRUE, NULL); - ee_create_ae (GTK_TABLE (table), _("Audio"), &ee->ical->aalarm, ALARM_AUDIO, 2, TRUE, NULL); - ee_create_ae (GTK_TABLE (table), _("Program"), &ee->ical->palarm, ALARM_PROGRAM, 3, TRUE, NULL); - ee_create_ae (GTK_TABLE (table), _("Mail"), &ee->ical->malarm, ALARM_MAIL, 4, TRUE, NULL); - - return l; -} - -static GtkWidget * -ee_classification_widgets (EventEditor *ee) -{ - GtkWidget *rpub, *rpriv, *rconf; - GtkWidget *frame, *hbox; - - frame = gtk_frame_new (_("Classification")); - - hbox = gtk_hbox_new (TRUE, 0); - gtk_container_border_width (GTK_CONTAINER (hbox), 4); - gtk_container_add (GTK_CONTAINER (frame), hbox); - - rpub = gtk_radio_button_new_with_label (NULL, _("Public")); - rpriv = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON (rpub), _("Private")); - rconf = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON (rpub), _("Confidential")); - - gtk_box_pack_start (GTK_BOX (hbox), rpub, FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (hbox), rpriv, FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (hbox), rconf, FALSE, FALSE, 0); - - if (strcmp (ee->ical->class, class_names[0]) == 0) - gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (rpub), TRUE); - else if (strcmp (ee->ical->class, class_names[1]) == 0) - gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (rpriv), TRUE); - else if (strcmp (ee->ical->class, class_names[2]) == 0) - gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (rconf), TRUE); - - ee->general_radios = rpub; - - return frame; -} - -/* - * Retrieves the information from the CalendarAlarm widgets and stores them - * on the CalendarAlarm generic values - */ -void -ee_store_alarm (CalendarAlarm *alarm, enum AlarmType type) -{ - GtkWidget *item; - GtkMenu *menu; - GList *child; - int idx; - - if (alarm->data){ - g_free (alarm->data); - alarm->data = 0; - } - - alarm->enabled = GTK_TOGGLE_BUTTON (alarm->w_enabled)->active; - - if (!alarm->enabled) - return; - - if (type == ALARM_PROGRAM) - alarm->data = g_strdup (gtk_entry_get_text (GTK_ENTRY (gnome_file_entry_gtk_entry (alarm->w_entry)))); - if (type == ALARM_MAIL) - alarm->data = g_strdup (gtk_entry_get_text (GTK_ENTRY (alarm->w_entry))); - - /* Find out the index */ - menu = GTK_MENU (GTK_OPTION_MENU (alarm->w_timesel)->menu); - - item = gtk_menu_get_active (menu); - - for (idx = 0, child = GTK_MENU_SHELL (menu)->children; child->data != item; child = child->next) - idx++; - - alarm->units = idx; - alarm->count = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (alarm->w_count)); -} - -static void -ee_store_general_values_to_ical (EventEditor *ee) -{ - GtkRadioButton *radio = GTK_RADIO_BUTTON (ee->general_radios); - iCalObject *ical = ee->ical; - GSList *list = radio->group; - int idx; - time_t now; - - now = time (NULL); - ical->dtstart = gnome_date_edit_get_date (GNOME_DATE_EDIT (ee->start_time)); - ical->dtend = gnome_date_edit_get_date (GNOME_DATE_EDIT (ee->end_time)); - - if (ical->summary) - g_free (ical->summary); - - ical->summary = gtk_editable_get_chars (GTK_EDITABLE (ee->general_summary), 0, -1); - - ee_store_alarm (&ical->dalarm, ALARM_DISPLAY); - ee_store_alarm (&ical->aalarm, ALARM_AUDIO); - ee_store_alarm (&ical->palarm, ALARM_PROGRAM); - ee_store_alarm (&ical->malarm, ALARM_MAIL); - - for (idx = 2; list; list = list->next) { - if (GTK_TOGGLE_BUTTON (list->data)->active) - break; - idx--; /* The group is stored in reverse order of insertion */ - } - - g_free (ical->class); - ical->class = g_strdup (class_names [idx]); -} - -static int -option_menu_active_number (GtkWidget *omenu) -{ - GtkWidget *menu; - GtkWidget *item; - struct numbered_item *ni; - - menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (omenu)); - item = gtk_menu_get_active (GTK_MENU (menu)); - - ni = gtk_object_get_user_data (GTK_OBJECT (item)); - - return ni->num; -} - -static int -ee_store_recur_rule_to_ical (EventEditor *ee) -{ - iCalObject *ical; - int i, j; - GSList *list; - - ical = ee->ical; - - for (i = 0, list = ee->recur_rr_group; list; i++, list = list->next) - if (GTK_TOGGLE_BUTTON (list->data)->active) - break; - - i = g_slist_length (ee->recur_rr_group) - i - 1; /* buttons are stored in reverse order of insertion */ - - /* None selected, no rule to be stored */ - if (i == 0) - return 0; - - if (!ical->recur) - ical->recur = g_new0 (Recurrence, 1); - - switch (i) { - case 1: - /* Daily */ - ical->recur->type = RECUR_DAILY; - ical->recur->interval = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (ee->recur_rr_day_period)); - break; - - case 2: - /* Weekly */ - ical->recur->type = RECUR_WEEKLY; - ical->recur->interval = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (ee->recur_rr_week_period)); - ical->recur->weekday = 0; - - for (j = 0; j < 7; j++) - if (GTK_TOGGLE_BUTTON (ee->recur_rr_week_days[j])->active) { - if (j == 6) - ical->recur->weekday |= 1 << 0; /* sunday is at bit 0 */ - else - ical->recur->weekday |= 1 << (j + 1); - } - - break; - - case 3: - /* Monthly */ - - if (GTK_WIDGET_SENSITIVE (ee->recur_rr_month_date)) { - /* by day */ - - ical->recur->type = RECUR_MONTHLY_BY_DAY; - ical->recur->u.month_day = - gtk_spin_button_get_value_as_int ( - GTK_SPIN_BUTTON (ee->recur_rr_month_date)); - ical->recur->interval = - gtk_spin_button_get_value_as_int ( - GTK_SPIN_BUTTON (ee->recur_rr_month_period)); - } else { - /* by position */ - - ical->recur->type = RECUR_MONTHLY_BY_POS; - - ical->recur->u.month_pos = - option_menu_active_number (ee->recur_rr_month_day); - ical->recur->weekday = - option_menu_active_number (ee->recur_rr_month_weekday); - ical->recur->interval = - gtk_spin_button_get_value_as_int ( - GTK_SPIN_BUTTON (ee->recur_rr_month_period)); - } - - break; - - case 4: - /* Yearly */ - ical->recur->type = RECUR_YEARLY_BY_DAY; - ical->recur->interval = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (ee->recur_rr_year_period)); - /* FIXME: need to specify anything else? I am assuming the code will look at the dtstart - * to figure out when to recur. - Federico - */ - break; - - default: - g_assert_not_reached (); - } - return 1; -} - -static void -ee_store_recur_end_to_ical (EventEditor *ee) -{ - iCalObject *ical; - GSList *list; - int i; - - /* Ending date of recurrence */ - - ical = ee->ical; - - for (i = 0, list = ee->recur_ed_group; list; i++, list = list->next) - if (GTK_TOGGLE_BUTTON (list->data)->active) - break; - - i = g_slist_length (ee->recur_ed_group) - i - 1; /* the list is stored in reverse order of insertion */ - - switch (i) { - case 0: - /* repeat forever */ - ical->recur->_enddate = 0; - ical->recur->enddate = 0; - ical->recur->duration = 0; - break; - - case 1: - /* end date */ - /* Also here, to ensure that the event is used, we add 86400 secs to get - get next day, in accordance to the RFC */ - ical->recur->_enddate = gnome_date_edit_get_date (GNOME_DATE_EDIT (ee->recur_ed_end_on)) + 86400; - ical->recur->enddate = ical->recur->_enddate; - ical->recur->duration = 0; - break; - - case 2: - /* end after n occurrences */ - ical->recur->duration = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (ee->recur_ed_end_after)); - ical_object_compute_end (ical); - break; - - default: - g_assert_not_reached (); - break; - } -} - -static void -free_exdate (iCalObject *ical) -{ - GList *list; - - if (!ical->exdate) - return; - - for (list = ical->exdate; list; list = list->next) - g_free (list->data); - - g_list_free (ical->exdate); - ical->exdate = NULL; -} - -static void -ee_store_recur_exceptions_to_ical (EventEditor *ee) -{ - iCalObject *ical; - GtkCList *clist; - int i; - time_t *t; - - ical = ee->ical; - clist = GTK_CLIST (ee->recur_ex_clist); - - free_exdate (ical); - - for (i = 0; i < clist->rows; i++) { - t = gtk_clist_get_row_data (clist, i); - ical->exdate = g_list_prepend (ical->exdate, t); - } -} - -static void -ee_store_recur_values_to_ical (EventEditor *ee) -{ - if (ee_store_recur_rule_to_ical (ee)){ - ee_store_recur_exceptions_to_ical (ee); - ee_store_recur_end_to_ical (ee); - } else if (ee->ical->recur) { - g_free (ee->ical->recur); - ee->ical->recur = NULL; - if (ee->ical->exdate){ - GList *l = ee->ical->exdate; - - for (; l; l = l->next) - g_free (l->data); - g_list_free (l); - } - } -} - -/* - * Retrieves all of the information from the different widgets and updates - * the iCalObject accordingly. - */ -static void -ee_store_dlg_values_to_ical (EventEditor *ee) -{ - time_t now; - - ee_store_general_values_to_ical (ee); - ee_store_recur_values_to_ical (ee); - - now = time (NULL); - - /* FIXME: This is not entirely correct; we should check if the values actually changed */ - ee->ical->last_mod = now; - - if (ee->ical->new) - ee->ical->created = now; -} - -static void -ee_ok (GtkWidget *widget, EventEditor *ee) -{ - ee_store_dlg_values_to_ical (ee); - - if (ee->ical->new) - gnome_calendar_add_object (ee->gnome_cal, ee->ical); - else - gnome_calendar_object_changed (ee->gnome_cal, ee->ical, CHANGE_ALL); - - ee->ical->new = 0; -} - -static void -ee_cancel (GtkWidget *widget, EventEditor *ee) -{ - if (ee->ical) { - ical_object_unref (ee->ical); - ee->ical = NULL; - } -} - -static void -ee_create_buttons (EventEditor *ee) -{ - gnome_dialog_append_buttons(GNOME_DIALOG(ee), - GNOME_STOCK_BUTTON_OK, - GNOME_STOCK_BUTTON_CANCEL, NULL); - gnome_dialog_set_default (GNOME_DIALOG (ee), 0); - gnome_dialog_button_connect (GNOME_DIALOG (ee), 0, GTK_SIGNAL_FUNC(ee_ok), ee); - gnome_dialog_button_connect (GNOME_DIALOG (ee), 1, GTK_SIGNAL_FUNC(ee_cancel), ee); - - return; -} - -enum { - OWNER_LINE, - SUMMARY_LINE, - TIME_LINE, - ALARM_LINE, - CLASS_LINE -}; - -/* Create/setup the general page */ -static void -ee_init_general_page (EventEditor *ee) -{ - GtkWidget *l; - GtkWidget *hbox; - - ee->general_table = gtk_table_new (1, 1, FALSE); - gtk_container_border_width (GTK_CONTAINER (ee->general_table), 4); - gtk_table_set_row_spacings (GTK_TABLE (ee->general_table), 4); - gtk_table_set_col_spacings (GTK_TABLE (ee->general_table), 4); - gtk_notebook_append_page (GTK_NOTEBOOK (ee->notebook), GTK_WIDGET (ee->general_table), - gtk_label_new (_("General"))); - - hbox = gtk_hbox_new (FALSE, 0); - gtk_table_attach (GTK_TABLE (ee->general_table), hbox, - 0, 1, OWNER_LINE, OWNER_LINE + 1, - GTK_EXPAND | GTK_FILL | GTK_SHRINK, - GTK_FILL | GTK_SHRINK, - 0, 4); - - l = gtk_label_new (_("Owner:")); - gtk_box_pack_start (GTK_BOX (hbox), l, FALSE, FALSE, 0); - - ee->general_owner = gtk_label_new (ee->ical->organizer->addr ? - ee->ical->organizer->addr : _("?")); - gtk_misc_set_alignment (GTK_MISC (ee->general_owner), 0.0, 0.5); - gtk_box_pack_start (GTK_BOX (hbox), ee->general_owner, TRUE, TRUE, 4); - - hbox = gtk_hbox_new (FALSE, 0); - gtk_table_attach (GTK_TABLE (ee->general_table), hbox, - 0, 1, SUMMARY_LINE, SUMMARY_LINE + 1, - GTK_EXPAND | GTK_FILL | GTK_SHRINK, - GTK_FILL | GTK_SHRINK, - 0, 4); - - l = gtk_label_new (_("Summary:")); - gtk_misc_set_alignment (GTK_MISC (l), 0.0, 0.5); - gtk_box_pack_start (GTK_BOX (hbox), l, FALSE, FALSE, 0); - - ee->general_summary = gtk_entry_new (); - gtk_entry_set_editable (GTK_ENTRY (ee->general_summary), 1); - gtk_entry_set_text (GTK_ENTRY (ee->general_summary), - ee->ical->summary ? ee->ical->summary : ""); - gtk_box_pack_start (GTK_BOX (hbox), ee->general_summary, - TRUE, TRUE, 4); - - l = ee_alarm_widgets (ee); - gtk_table_attach (GTK_TABLE (ee->general_table), l, - 0, 1, ALARM_LINE, ALARM_LINE + 1, - GTK_EXPAND | GTK_FILL | GTK_SHRINK, - GTK_FILL | GTK_SHRINK, - 0, 0); - - l = event_editor_setup_time_frame (ee); - gtk_table_attach (GTK_TABLE (ee->general_table), l, - 0, 1, TIME_LINE, TIME_LINE + 1, - GTK_EXPAND | GTK_FILL | GTK_SHRINK, - GTK_FILL | GTK_SHRINK, - 0, 0); - - l = ee_classification_widgets (ee); - gtk_table_attach (GTK_TABLE (ee->general_table), l, - 0, 1, CLASS_LINE, CLASS_LINE + 1, - GTK_EXPAND | GTK_SHRINK, - GTK_FILL | GTK_SHRINK, - 0, 0); -} - -static void -ee_init_summary_page (EventEditor *ee) -{ -} - -struct { - char *name; -} recurrence_types [] = { - { N_("None") }, - { N_("Daily") }, - { N_("Weekly") }, - { N_("Monthly") }, - { N_("Yearly") }, - { 0 } -}; - -static void -recurrence_toggled (GtkRadioButton *radio, EventEditor *ee) -{ - GSList *list = ee->recur_rr_group; - int which; - - if (!GTK_TOGGLE_BUTTON (radio)->active) - return; - - for (which = 0; list; list = list->next, which++) { - if (list->data == radio) { - gtk_notebook_set_page (GTK_NOTEBOOK (ee->recur_rr_notebook), 4 - which); - return; - } - } -} - -static struct numbered_item weekday_positions[] = { - { N_("1st"), 1 }, - { N_("2nd"), 2 }, - { N_("3rd"), 3 }, - { N_("4th"), 4 }, - { N_("5th"), 5 }, - { 0 } -}; - -static struct numbered_item weekday_names[] = { - { N_("Monday"), 1 }, - { N_("Tuesday"), 2 }, - { N_("Wednesday"), 3 }, - { N_("Thursday"), 4 }, - { N_("Friday"), 5 }, - { N_("Saturday"), 6 }, - { N_("Sunday"), 0 }, /* on the spec, Sunday is zero */ - { 0 } -}; - -static GtkWidget * -make_numbered_menu (struct numbered_item *items, int sel) -{ - GtkWidget *option_menu, *menu; - int i; - - option_menu = gtk_option_menu_new (); - menu = gtk_menu_new (); - - for (i = 0; items[i].text; i++) { - GtkWidget *item; - - item = gtk_menu_item_new_with_label (_(items[i].text)); - gtk_object_set_user_data (GTK_OBJECT (item), &items[i]); - gtk_menu_append (GTK_MENU (menu), item); - gtk_widget_show (item); - } - - gtk_option_menu_set_menu (GTK_OPTION_MENU (option_menu), menu); - gtk_option_menu_set_history (GTK_OPTION_MENU (option_menu), sel); - - return option_menu; -} - -static void -month_sensitize (EventEditor *ee, int state) -{ - gtk_widget_set_sensitive (ee->recur_rr_month_date, state); - gtk_widget_set_sensitive (ee->recur_rr_month_date_label, state); - - gtk_widget_set_sensitive (ee->recur_rr_month_day, !state); - gtk_widget_set_sensitive (ee->recur_rr_month_weekday, !state); -} - -static void -recur_month_enable_date (GtkToggleButton *button, EventEditor *ee) -{ - month_sensitize (ee, button->active); -} - -static void -desensitize_on_toggle (GtkToggleButton *toggle, gpointer data) -{ - gtk_widget_set_sensitive (GTK_WIDGET (data), !toggle->active); -} - -static void -ee_rp_init_rule (EventEditor *ee) -{ - static char *day_names [] = { N_("Mon"), N_("Tue"), N_("Wed"), N_("Thu"), N_("Fri"), N_("Sat"), N_("Sun") }; - GtkWidget *r, *re, *r1, *f, *vbox, *hbox, *b, *week_hbox, *week_day, *w; - GtkWidget *none, *daily, *weekly, *monthly, *yearly; - GtkNotebook *notebook; - GSList *group; - int i, page, day_period, week_period, month_period, year_period; - int week_vector, default_day, def_pos, def_off; - struct tm tm; - - tm = *localtime (&ee->ical->dtstart); - - f = gtk_frame_new (_("Recurrence rule")); - - hbox = gtk_hbox_new (FALSE, 4); - gtk_container_border_width (GTK_CONTAINER (hbox), 4); - gtk_container_add (GTK_CONTAINER (f), hbox); - - vbox = gtk_vbox_new (FALSE, 4); - gtk_box_pack_start (GTK_BOX (hbox), vbox, FALSE, FALSE, 0); - - gtk_box_pack_start (GTK_BOX (hbox), gtk_vseparator_new (), FALSE, FALSE, 0); - - ee->recur_rr_notebook = gtk_notebook_new (); - notebook = GTK_NOTEBOOK (ee->recur_rr_notebook); - gtk_box_pack_start (GTK_BOX (hbox), ee->recur_rr_notebook, TRUE, TRUE, 0); - - day_period = 1; - week_period = 1; - month_period = 1; - year_period = 1; - - /* Default to today */ - - week_vector = 1 << tm.tm_wday; - default_day = tm.tm_mday; - def_pos = 0; - def_off = 0; - - /* Determine which should be the default selection */ - - page = 0; - if (ee->ical->recur) { - enum RecurType type = ee->ical->recur->type; - int interval = ee->ical->recur->interval; - - switch (type) { - case RECUR_DAILY: - page = 1; - day_period = interval; - break; - - case RECUR_WEEKLY: - page = 2; - week_period = interval; - week_vector = ee->ical->recur->weekday; - break; - - case RECUR_MONTHLY_BY_POS: - page = 3; - month_period = interval; - def_pos = ee->ical->recur->u.month_pos; - default_day = ee->ical->recur->weekday; /* you can't use u.month_pos and u.month_day-- it's a union... */ - break; - - case RECUR_MONTHLY_BY_DAY: - page = 3; - month_period = interval; - default_day = ee->ical->recur->u.month_day; - break; - - case RECUR_YEARLY_BY_MONTH: - page = 4; - year_period = interval; - break; - - case RECUR_YEARLY_BY_DAY: - page = 4; - year_period = interval; - break; - } - } else - page = 0; - - /* The recurrency selector */ - - for (i = 0, group = NULL; recurrence_types [i].name; i++) { - r = gtk_radio_button_new_with_label (group, _(recurrence_types [i].name)); - group = gtk_radio_button_group (GTK_RADIO_BUTTON (r)); - - gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (r), i == page); - gtk_signal_connect (GTK_OBJECT (r), "toggled", GTK_SIGNAL_FUNC (recurrence_toggled), ee); - gtk_box_pack_start (GTK_BOX (vbox), r, FALSE, FALSE, 0); - - if (i == 0) - gtk_signal_connect (GTK_OBJECT (r), "toggled", - (GtkSignalFunc) desensitize_on_toggle, - ee->recur_hbox); - } - - ee->recur_rr_group = group; - - /* 0. No recurrence */ - none = gtk_label_new (""); - - /* 1. The daily recurrence */ - - daily = gtk_vbox_new (FALSE, 0); - - b = gtk_hbox_new (FALSE, 4); - gtk_box_pack_start (GTK_BOX (daily), b, FALSE, FALSE, 0); - - ee->recur_rr_day_period = make_spin_button (day_period, 1, 10000); - /* in some languages "Every" can follow the gender of the word it - refers to (here "day(s)"). leave the two leadin letter "d_" - in the translation they are ther on purpose */ - gtk_box_pack_start (GTK_BOX (b), gtk_label_new (_("d_Every") +2), FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (b), ee->recur_rr_day_period, FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (b), gtk_label_new (_("day(s)")), FALSE, FALSE, 0); - - /* 2. The weekly recurrence */ - - weekly = gtk_vbox_new (FALSE, 4); - - week_hbox = gtk_hbox_new (FALSE, 4); - gtk_box_pack_start (GTK_BOX (weekly), week_hbox, FALSE, FALSE, 0); - - /* 2.1 The week period selector */ - - ee->recur_rr_week_period = make_spin_button (week_period, 1, 10000); - /* in some languages "Every" can follow the gender of the word it - refers to (here "week(s)"). leave the two leadin letter "w_" - in the translation they are ther on purpose */ - gtk_box_pack_start (GTK_BOX (week_hbox), gtk_label_new (_("w_Every") +2), FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (week_hbox), ee->recur_rr_week_period, FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (week_hbox), gtk_label_new (_("week(s)")), FALSE, FALSE, 0); - - /* 2.2 The week day selector */ - - week_day = gtk_hbox_new (FALSE, 4); - gtk_box_pack_start (GTK_BOX (weekly), week_day, FALSE, FALSE, 0); - - for (i = 0; i < 7; i++) { - ee->recur_rr_week_days [i] = gtk_check_button_new_with_label (_(day_names [i])); - gtk_box_pack_start (GTK_BOX (week_day), ee->recur_rr_week_days [i], FALSE, FALSE, 0); - - if (week_vector & (1 << ((i + 1) % 7))) /* on the spec, Sunday is 0 */ - gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (ee->recur_rr_week_days [i]), TRUE); - } - - /* 3. The monthly recurrence */ - - monthly = gtk_table_new (0, 0, FALSE); - gtk_table_set_row_spacings (GTK_TABLE (monthly), 4); - gtk_table_set_col_spacings (GTK_TABLE (monthly), 4); - - re = gtk_radio_button_new_with_label (NULL, _("Recur on the")); - ee->recur_rr_month_date = make_spin_button (default_day, 1, 31); - ee->recur_rr_month_date_label = w = gtk_label_new (_("th day of the month")); - gtk_misc_set_alignment (GTK_MISC (w), 0.0, 0.5); - gtk_table_attach (GTK_TABLE (monthly), re, - 0, 1, 0, 1, FS, FS, 0, 0); - gtk_table_attach (GTK_TABLE (monthly), ee->recur_rr_month_date, - 1, 2, 0, 1, FS, FS, 0, 0); - gtk_table_attach (GTK_TABLE (monthly), w, - 2, 3, 0, 1, FS, FS, 0, 0); - gtk_signal_connect (GTK_OBJECT (re), "toggled", GTK_SIGNAL_FUNC (recur_month_enable_date), ee); - - r1 = gtk_radio_button_new_with_label (gtk_radio_button_group (GTK_RADIO_BUTTON (re)), _("Recur on the")); - ee->recur_rr_month_day = make_numbered_menu (weekday_positions, def_pos); - ee->recur_rr_month_weekday = make_numbered_menu (weekday_names, default_day); - gtk_table_attach (GTK_TABLE (monthly), r1, - 0, 1, 1, 2, FS, FS, 0, 0); - gtk_table_attach (GTK_TABLE (monthly), ee->recur_rr_month_day, - 1, 2, 1, 2, FS, FS, 0, 0); - gtk_table_attach (GTK_TABLE (monthly), ee->recur_rr_month_weekday, - 2, 3, 1, 2, FS, FS, 0, 0); - - /* in some languages "Every" can follow the gender of the word it - refers to (here "month(s)"). leave the two leadin letter "m_" - in the translation they are ther on purpose */ - gtk_table_attach (GTK_TABLE (monthly), gtk_label_new (_("m_Every") +2), - 3, 4, 0, 2, FS, FS, 0, 0); - ee->recur_rr_month_period = make_spin_button (month_period, 1, 10000); - gtk_table_attach (GTK_TABLE (monthly), ee->recur_rr_month_period, - 4, 5, 0, 2, FS, FS, 0, 0); - gtk_table_attach (GTK_TABLE (monthly), gtk_label_new (_("month(s)")), - 5, 6, 0, 2, FS, FS, 0, 0); - - if (ee->ical->recur) { - if (ee->ical->recur->type == RECUR_MONTHLY_BY_POS) - gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (r1), 1); - } else - recur_month_enable_date (GTK_TOGGLE_BUTTON (re), ee); - - /* 4. The yearly recurrence */ - - yearly = gtk_vbox_new (FALSE, 0); - - b = gtk_hbox_new (FALSE, 4); - gtk_box_pack_start (GTK_BOX (yearly), b, FALSE, FALSE, 0); - - ee->recur_rr_year_period = make_spin_button (year_period, 1, 10000); - /* in some languages "Every" can follow the gender of the word it - refers to (here "year(s)"). leave the two leadin letter "y_" - in the translation they are ther on purpose */ - gtk_box_pack_start (GTK_BOX (b), gtk_label_new (_("y_Every") +2), FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (b), ee->recur_rr_year_period, FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (b), gtk_label_new (_("year(s)")), FALSE, FALSE, 0); - - /* Finish setting this up */ - - gtk_notebook_set_show_tabs (notebook, FALSE); - - gtk_notebook_append_page (notebook, none, NULL); - gtk_notebook_append_page (notebook, daily, NULL); - gtk_notebook_append_page (notebook, weekly, NULL); - gtk_notebook_append_page (notebook, monthly, NULL); - gtk_notebook_append_page (notebook, yearly, NULL); - - gtk_notebook_set_show_border (notebook, FALSE); - - gtk_notebook_set_page (notebook, page); - - /* Attach to the main box */ - - gtk_box_pack_start (GTK_BOX (ee->recur_vbox), f, FALSE, FALSE, 0); -} - -static void -sensitize_on_toggle (GtkToggleButton *toggle, gpointer data) -{ - gtk_widget_set_sensitive (GTK_WIDGET (data), toggle->active); -} - -static void -ee_rp_init_ending_date (EventEditor *ee) -{ - GtkWidget *frame; - GtkWidget *vbox; - GSList *group; - GtkWidget *radio0, *radio1, *radio2; - GtkWidget *hbox; - GtkWidget *ihbox; - GtkWidget *widget; - time_t enddate; - int repeat; - - frame = gtk_frame_new (_("Ending date")); - - vbox = gtk_vbox_new (TRUE, 4); - gtk_container_border_width (GTK_CONTAINER (vbox), 4); - gtk_container_add (GTK_CONTAINER (frame), vbox); - - group = NULL; - - /* repeat forever */ - - hbox = gtk_hbox_new (FALSE, 0); - gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); - - radio0 = gtk_radio_button_new_with_label (group, _("Repeat forever")); - group = gtk_radio_button_group (GTK_RADIO_BUTTON (radio0)); - gtk_box_pack_start (GTK_BOX (hbox), radio0, FALSE, FALSE, 0); - - /* end on date */ - - hbox = gtk_hbox_new (FALSE, 0); - gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); - - radio1 = gtk_radio_button_new_with_label (group, _("End on")); - group = gtk_radio_button_group (GTK_RADIO_BUTTON (radio1)); - gtk_box_pack_start (GTK_BOX (hbox), radio1, FALSE, FALSE, 0); - - ihbox = gtk_hbox_new (FALSE, 4); - gtk_widget_set_sensitive (ihbox, FALSE); - gtk_box_pack_start (GTK_BOX (hbox), ihbox, FALSE, FALSE, 0); - - if (ee->ical->recur) { - /* Shorten by one day, as we store end-on date a day ahead */ - enddate = ee->ical->recur->enddate - 86400; - } else - enddate = ee->ical->dtend; - - ee->recur_ed_end_on = widget = date_edit_new (enddate, FALSE); - gtk_box_pack_start (GTK_BOX (ihbox), widget, FALSE, FALSE, 0); - - gtk_signal_connect (GTK_OBJECT (radio1), "toggled", - (GtkSignalFunc) sensitize_on_toggle, - ihbox); - - /* end after n occurrences */ - - hbox = gtk_hbox_new (FALSE, 0); - gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); - - radio2 = gtk_radio_button_new_with_label (group, _("End after")); - group = gtk_radio_button_group (GTK_RADIO_BUTTON (radio2)); - gtk_box_pack_start (GTK_BOX (hbox), radio2, FALSE, FALSE, 0); - - ihbox = gtk_hbox_new (FALSE, 4); - gtk_widget_set_sensitive (ihbox, FALSE); - gtk_box_pack_start (GTK_BOX (hbox), ihbox, FALSE, FALSE, 0); - - if (ee->ical->recur && ee->ical->recur->duration) - repeat = ee->ical->recur->duration; - else - repeat = 2; - - ee->recur_ed_end_after = widget = make_spin_button (repeat, 1, 10000); - gtk_box_pack_start (GTK_BOX (ihbox), widget, FALSE, FALSE, 0); - - widget = gtk_label_new (_("occurrence(s)")); - gtk_box_pack_start (GTK_BOX (ihbox), widget, FALSE, FALSE, 0); - - gtk_signal_connect (GTK_OBJECT (radio2), "toggled", - (GtkSignalFunc) sensitize_on_toggle, - ihbox); - - /* Activate appropriate item */ - - if (ee->ical->recur) { - if (ee->ical->recur->_enddate == 0) { - if (ee->ical->recur->duration == 0) - gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (radio0), TRUE); - else { - gtk_spin_button_set_value (GTK_SPIN_BUTTON (ee->recur_ed_end_after), - ee->ical->recur->duration); - gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (radio2), TRUE); - } - } else { - gnome_date_edit_set_time (GNOME_DATE_EDIT (ee->recur_ed_end_on), ee->ical->recur->enddate); - gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (radio1), TRUE); - } - } - - /* Done, add to main table */ - - ee->recur_ed_group = group; - - gtk_box_pack_start (GTK_BOX (ee->recur_hbox), frame, FALSE, FALSE, 0); -} - -static char * -get_exception_string (time_t t) -{ - static char buf[256]; - - strftime (buf, sizeof(buf), _("%a %b %d %Y"), localtime (&t)); - return buf; -} - -static void -append_exception (EventEditor *ee, time_t t) -{ - time_t *tt; - char *c[1]; - int i; - - c[0] = get_exception_string (t); - - tt = g_new (time_t, 1); - *tt = t; - - i = gtk_clist_append (GTK_CLIST (ee->recur_ex_clist), c); - gtk_clist_set_row_data (GTK_CLIST (ee->recur_ex_clist), i, tt); - gtk_clist_select_row (GTK_CLIST (ee->recur_ex_clist), i, 0); - - gtk_widget_set_sensitive (ee->recur_ex_vbox, TRUE); -} - -static void -fill_exception_clist (EventEditor *ee) -{ - GList *list; - - for (list = ee->ical->exdate; list; list = list->next) - append_exception (ee, *((time_t *) list->data)); -} - -static void -add_exception (GtkWidget *widget, EventEditor *ee) -{ - time_t t; - - t = gnome_date_edit_get_date (GNOME_DATE_EDIT (ee->recur_ex_date)); - append_exception (ee, t); -} - -static void -change_exception (GtkWidget *widget, EventEditor *ee) -{ - GtkCList *clist; - time_t *t; - int sel; - - clist = GTK_CLIST (ee->recur_ex_clist); - sel = GPOINTER_TO_INT(clist->selection->data); - - t = gtk_clist_get_row_data (clist, sel); - *t = gnome_date_edit_get_date (GNOME_DATE_EDIT (ee->recur_ex_date)); - - gtk_clist_set_text (clist, sel, 0, get_exception_string (*t)); -} - -static void -delete_exception (GtkWidget *widget, EventEditor *ee) -{ - GtkCList *clist; - int sel, length; - - clist = GTK_CLIST (ee->recur_ex_clist); - sel = GPOINTER_TO_INT(clist->selection->data); - - g_free (gtk_clist_get_row_data (clist, sel)); /* free the time_t stored there */ - - gtk_clist_remove (clist, sel); - length = g_list_length(clist->row_list); - if (sel >= length) - sel--; - gtk_clist_select_row (GTK_CLIST (ee->recur_ex_clist), sel, 0); - - if (clist->rows == 0) - gtk_widget_set_sensitive (ee->recur_ex_vbox, FALSE); -} - -static void -ee_rp_init_exceptions (EventEditor *ee) -{ - GtkWidget *frame; - GtkWidget *hbox; - GtkWidget *vbox; - GtkWidget *ivbox; - GtkWidget *widget; - GtkWidget *sw; - - frame = gtk_frame_new (_("Exceptions")); - - hbox = gtk_hbox_new (FALSE, 4); - gtk_container_border_width (GTK_CONTAINER (hbox), 4); - gtk_container_add (GTK_CONTAINER (frame), hbox); - - vbox = gtk_vbox_new (FALSE, 4); - gtk_box_pack_start (GTK_BOX (hbox), vbox, FALSE, FALSE, 0); - - ee->recur_ex_date = widget = date_edit_new (time (NULL), FALSE); - gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 0); - - widget = gtk_button_new_with_label (_("Add exception")); - gtk_signal_connect (GTK_OBJECT (widget), "clicked", - (GtkSignalFunc) add_exception, - ee); - gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 0); - - ee->recur_ex_vbox = ivbox = gtk_vbox_new (FALSE, 4); - gtk_widget_set_sensitive (ivbox, FALSE); /* at first there are no items to change or delete */ - gtk_box_pack_start (GTK_BOX (vbox), ivbox, FALSE, FALSE, 0); - - widget = gtk_button_new_with_label (_("Change selected")); - gtk_signal_connect (GTK_OBJECT (widget), "clicked", - (GtkSignalFunc) change_exception, - ee); - gtk_box_pack_start (GTK_BOX (ivbox), widget, FALSE, FALSE, 0); - - widget = gtk_button_new_with_label (_("Delete selected")); - gtk_signal_connect (GTK_OBJECT (widget), "clicked", - (GtkSignalFunc) delete_exception, - ee); - gtk_box_pack_start (GTK_BOX (ivbox), widget, FALSE, FALSE, 0); - - ee->recur_ex_clist = widget = gtk_clist_new (1); - sw = gtk_scrolled_window_new (NULL, NULL); - gtk_container_add (GTK_CONTAINER (sw), widget); - gtk_clist_set_selection_mode (GTK_CLIST (widget), GTK_SELECTION_BROWSE); - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), - GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); - fill_exception_clist (ee); - gtk_box_pack_start (GTK_BOX (hbox), sw, TRUE, TRUE, 0); - - /* Done, add to main table */ - - gtk_box_pack_start (GTK_BOX (ee->recur_hbox), frame, TRUE, TRUE, 0); -} - -static void -ee_init_recurrence_page (EventEditor *ee) -{ - ee->recur_vbox = gtk_vbox_new (FALSE, 4); - gtk_container_border_width (GTK_CONTAINER (ee->recur_vbox), 4); - - ee->recur_hbox = gtk_hbox_new (FALSE, 4); - gtk_widget_set_sensitive (ee->recur_hbox, FALSE); - - ee->recur_page_label = gtk_label_new (_("Recurrence")); - - gtk_notebook_append_page (GTK_NOTEBOOK (ee->notebook), ee->recur_vbox, - ee->recur_page_label); - - - ee_rp_init_rule (ee); - - /* pack here so that the box gets inserted after the recurrence rule frame */ - gtk_box_pack_start (GTK_BOX (ee->recur_vbox), ee->recur_hbox, FALSE, FALSE, 0); - - ee_rp_init_ending_date (ee); - ee_rp_init_exceptions (ee); - -} - -static void -event_editor_init_widgets (EventEditor *ee) -{ - ee->notebook = gtk_notebook_new (); - gtk_box_pack_start (GTK_BOX (GNOME_DIALOG(ee)->vbox), ee->notebook, 1, 1, 0); - - /* Init the various configuration pages */ - ee_init_general_page (ee); - ee_init_summary_page (ee); - ee_init_recurrence_page (ee); - - /* Buttons */ - ee_create_buttons(ee); - - /* We show all of the contained widgets */ - gtk_widget_show_all (GTK_BIN (ee)->child); -} - -static void -event_editor_init (EventEditor *ee) -{ - ee->ical = 0; - gnome_dialog_set_close (GNOME_DIALOG(ee), TRUE); -} - -static void -event_editor_destroy (GtkObject *object) -{ - EventEditor *ee; - - g_return_if_fail (object != NULL); - g_return_if_fail (IS_EVENT_EDITOR (object)); - - ee = EVENT_EDITOR (object); - - if (ee->ical) { - ical_object_unref (ee->ical); - ee->ical = NULL; - } -} - -GtkWidget * -event_editor_new (GnomeCalendar *gcal, iCalObject *ical) -{ - GtkWidget *retval; - EventEditor *ee; - - gdk_pointer_ungrab (GDK_CURRENT_TIME); - gdk_flush (); - - retval = gtk_type_new (event_editor_get_type ()); - ee = EVENT_EDITOR (retval); - - if (ical == 0){ - ical = ical_new ("", user_name, ""); - ical->new = 1; - } else { - ical_object_ref (ical); - } - - if (ical->new){ - gtk_window_set_title (GTK_WINDOW (ee), _("Create new appointment")); - } else { - gtk_window_set_title (GTK_WINDOW (ee), _("Edit appointment")); - } - - ical->user_data = ee; /* so that the world can know we are editing it */ - - ee->ical = ical; - ee->gnome_cal = gcal; - event_editor_init_widgets (ee); - - gtk_widget_show (retval); - - return retval; -} - -void -event_editor_new_whole_day (GnomeCalendar *owner, time_t day) -{ - struct tm tm; - iCalObject *ico; - GtkWidget *ee; - - g_return_if_fail (owner != NULL); - g_return_if_fail (GNOME_IS_CALENDAR (owner)); - - ico = ical_new ("", user_name, ""); - ico->new = TRUE; - - tm = *localtime (&day); - - /* Set the start time of the event to the beginning of the day */ - - tm.tm_hour = day_begin; - tm.tm_min = 0; - tm.tm_sec = 0; - ico->dtstart = mktime (&tm); - - /* Set the end time of the event to the end of the day */ - - tm.tm_hour = day_end; - ico->dtend = mktime (&tm); - - /* Launch the event editor */ - - ee = event_editor_new (owner, ico); -} diff --git a/calendar/gui/eventedit.h b/calendar/gui/eventedit.h deleted file mode 100644 index 4d605892dd..0000000000 --- a/calendar/gui/eventedit.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - * EventEditor widget - * Copyright (C) 1998 the Free Software Foundation - * - * Author: Miguel de Icaza (miguel@kernel.org) - */ - -#ifndef EVENT_EDITOR_H -#define EVENT_EDITOR_H - -#include "gnome-cal.h" -#include - -BEGIN_GNOME_DECLS - - -#define EVENT_EDITOR(obj) GTK_CHECK_CAST(obj, event_editor_get_type(), EventEditor) -#define EVENT_EDITOR_CLASS(class) GTK_CHECK_CAST_CLASS(class, event_editor_get_type(), EventEditorClass) -#define IS_EVENT_EDITOR(obj) GTK_CHECK_TYPE(obj, event_editor_get_type()) - - -typedef struct { - GnomeDialog dialog; - GtkWidget *notebook; - - GtkWidget *general; - GtkWidget *general_table; - GtkWidget *general_time_table; - GtkWidget *general_allday; - GtkWidget *general_owner; - GtkWidget *general_summary; - GtkWidget *start_time, *end_time; - GtkWidget *general_radios; - - GtkWidget *recur_page_label; - GtkWidget *recur_vbox; - GtkWidget *recur_hbox; - - GSList *recur_rr_group; - GtkWidget *recur_rr_notebook; - GtkWidget *recur_rr_day_period; - GtkWidget *recur_rr_week_period; - GtkWidget *recur_rr_week_days [7]; - GtkWidget *recur_rr_month_date; - GtkWidget *recur_rr_month_date_label; - GtkWidget *recur_rr_month_day; - GtkWidget *recur_rr_month_weekday; - GtkWidget *recur_rr_month_period; - GtkWidget *recur_rr_year_period; - - GSList *recur_ed_group; - GtkWidget *recur_ed_end_on; - GtkWidget *recur_ed_end_after; - - GtkWidget *recur_ex_date; - GtkWidget *recur_ex_vbox; - GtkWidget *recur_ex_clist; - - /* The associated ical object */ - iCalObject *ical; - - /* The calendar owner of this event */ - GnomeCalendar *gnome_cal; -} EventEditor; - -typedef struct { - GnomeDialogClass parent_class; -} EventEditorClass; - - -guint event_editor_get_type (void); -GtkWidget *event_editor_new (GnomeCalendar *owner, iCalObject *); - -/* Convenience function to create and show a new event editor for an event that goes from day_begin - * to day_end of the specified day. - */ -void event_editor_new_whole_day (GnomeCalendar *owner, time_t day); - -GtkWidget *date_edit_new (time_t the_time, int show_time); - -END_GNOME_DECLS - -#endif diff --git a/calendar/gui/evolution-calendar-control.c b/calendar/gui/evolution-calendar-control.c deleted file mode 100644 index 90b4f26cd4..0000000000 --- a/calendar/gui/evolution-calendar-control.c +++ /dev/null @@ -1,201 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -#include -#include -#include -#include -#include -#include - -#ifdef USING_OAF -#include -#else -#include -#endif - -#include -#include -#include -#include -#include - -#define PROPERTY_CALENDAR_URI "folder_uri" - -#define PROPERTY_CALENDAR_URI_IDX 1 - -#ifdef USING_OAF -#define CONTROL_FACTORY_ID "OAFIID:control-factory:calendar:f4f90989-0f50-4af2-ad94-8bbdf331f0bc" -#else -#define CONTROL_FACTORY_ID "control-factory:calendar" -#endif - -CORBA_Environment ev; -CORBA_ORB orb; - - -static void -control_activate_cb (BonoboControl *control, - gboolean activate, - gpointer user_data) -{ - if (activate) - calendar_control_activate (control, user_data); - else - calendar_control_deactivate (control); -} - - - -static void -init_bonobo (int *argc, char **argv) -{ -#ifdef USING_OAF - /* FIXME: VERSION instead of "0.0". */ - gnome_init_with_popt_table ("evolution-calendar", "0.0", - *argc, argv, oaf_popt_options, - 0, NULL); - oaf_init (*argc, argv); -#else - gnome_CORBA_init_with_popt_table ( - "evolution-calendar", "0.0", - argc, argv, NULL, 0, NULL, GNORBA_INIT_SERVER_FUNC, &ev); -#endif - - if (bonobo_init (CORBA_OBJECT_NIL, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL) == FALSE) - g_error (_("Could not initialize Bonobo")); - - glade_gnome_init (); -} - - - -static void -get_prop (BonoboPropertyBag *bag, - BonoboArg *arg, - guint arg_id, - gpointer user_data) -{ - /*GnomeCalendar *gcal = user_data;*/ - - switch (arg_id) { - - case PROPERTY_CALENDAR_URI_IDX: - /* - if (fb && fb->uri) - BONOBO_ARG_SET_STRING (arg, fb->uri); - else - BONOBO_ARG_SET_STRING (arg, ""); - */ - break; - - default: - g_warning ("Unhandled arg %d\n", arg_id); - } -} - -static void -set_prop (BonoboPropertyBag *bag, - const BonoboArg *arg, - guint arg_id, - gpointer user_data) -{ - GnomeCalendar *gcal = user_data; - char *filename; - - switch (arg_id) { - - case PROPERTY_CALENDAR_URI_IDX: - printf ("set_prop: '%s'\n", BONOBO_ARG_GET_STRING (arg)); - filename = g_strdup_printf ("%s/calendar.vcf", - BONOBO_ARG_GET_STRING (arg)); - calendar_set_uri (gcal, filename); - g_free (filename); - break; - - default: - g_warning ("Unhandled arg %d\n", arg_id); - break; - } -} - - -static void -calendar_properties_init (GnomeCalendar *gcal) -{ - gcal->properties = bonobo_property_bag_new (get_prop, set_prop, gcal); - - bonobo_property_bag_add (gcal->properties, - PROPERTY_CALENDAR_URI, - PROPERTY_CALENDAR_URI_IDX, - BONOBO_ARG_STRING, - NULL, - _("The URI that the calendar will display"), - 0); - - bonobo_control_set_property_bag (gcal->control, gcal->properties); -} - - - -static BonoboObject * -calendar_control_factory (BonoboGenericFactory *Factory, void *closure) -{ - BonoboControl *control; - - /* Create the control. */ - GnomeCalendar *cal = new_calendar (full_name, NULL, NULL, 0); - - gtk_widget_show (GTK_WIDGET (cal)); - - control = bonobo_control_new (GTK_WIDGET (cal)); - cal->control = control; - - calendar_properties_init (cal); - - gtk_signal_connect (GTK_OBJECT (control), "activate", - control_activate_cb, cal); - - return BONOBO_OBJECT (control); -} - - -static void -calendar_control_factory_init (void) -{ - static BonoboGenericFactory *factory = NULL; - - if (factory != NULL) - return; - - puts ("XXXXXX - initializing calendar factory!!!"); - - factory = bonobo_generic_factory_new (CONTROL_FACTORY_ID, calendar_control_factory, NULL); - - if (factory == NULL) - g_error ("I could not register a Calendar control factory."); -} - - -int -main (int argc, char **argv) -{ - init_bonobo (&argc, argv); - glade_gnome_init (); - alarm_init (); - - init_calendar (); - - //g_log_set_always_fatal ((GLogLevelFlags) 0xFFFF); - g_log_set_always_fatal (G_LOG_LEVEL_ERROR | - G_LOG_LEVEL_CRITICAL | - G_LOG_LEVEL_WARNING); - - CORBA_exception_init (&ev); - - calendar_control_factory_init (); - component_factory_init (); - - bonobo_main (); - - return 0; -} diff --git a/calendar/gui/evolution-calendar.gnorba b/calendar/gui/evolution-calendar.gnorba deleted file mode 100644 index e2f1107926..0000000000 --- a/calendar/gui/evolution-calendar.gnorba +++ /dev/null @@ -1,11 +0,0 @@ -[evolution-shell-component-factory:evolution-calendar] -type=exe -repo_id=IDL:Bonobo/GenericFactory:1.0 -description=Factory for the Evolution calendar component. -location_info=evolution-calendar - -[evolution-shell-component:evolution-calendar] -type=factory -repo_id=IDL:Evolution/ShellComponent:1.0 -description=Evolution component for handling the calendar. -location_info=evolution-shell-component-factory:evolution-calendar diff --git a/calendar/gui/evolution-calendar.oafinfo b/calendar/gui/evolution-calendar.oafinfo deleted file mode 100644 index c8a4907854..0000000000 --- a/calendar/gui/evolution-calendar.oafinfo +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/calendar/gui/getdate.y b/calendar/gui/getdate.y deleted file mode 100644 index 6df71bddda..0000000000 --- a/calendar/gui/getdate.y +++ /dev/null @@ -1,1001 +0,0 @@ -%{ -/* -** Originally) written by Steven M. Bellovin while -** at the University of North Carolina at Chapel Hill. Later tweaked by -** a couple of people on Usenet. Completely overhauled by Rich $alz -** and Jim Berets in August, 1990; -** send any email to Rich. -** -** This grammar has 10 shift/reduce conflicts. -** -** This code is in the public domain and has no copyright. -*/ -/* SUPPRESS 287 on yaccpar_sccsid *//* Unused static variable */ -/* SUPPRESS 288 on yyerrlab *//* Label unused */ - -#include -#include - -/* Since the code of getdate.y is not included in the Emacs executable - itself, there is no need to #define static in this file. Even if - the code were included in the Emacs executable, it probably - wouldn't do any harm to #undef it here; this will only cause - problems if we try to write to a static variable, which I don't - think this code needs to do. */ -#ifdef emacs -#undef static -#endif - -#include -#include - -/* The code at the top of get_date which figures out the offset of the - current time zone checks various CPP symbols to see if special - tricks are need, but defaults to using the gettimeofday system call. - Include if that will be used. */ - -#if defined(vms) - -#include -#include - -#else - -#include - -#ifdef TIME_WITH_SYS_TIME -#include -#include -#else -#ifdef HAVE_SYS_TIME_H -#include -#else -#include -#endif -#endif - -#ifdef timezone -#undef timezone /* needed for sgi */ -#endif - -#if defined(HAVE_SYS_TIMEB_H) -#include -#else -/* -** We use the obsolete `struct timeb' as part of our interface! -** Since the system doesn't have it, we define it here; -** our callers must do likewise. -*/ -struct timeb { - time_t time; /* Seconds since the epoch */ - unsigned short millitm; /* Field not used */ - short timezone; /* Minutes west of GMT */ - short dstflag; /* Field not used */ -}; -#endif /* defined(HAVE_SYS_TIMEB_H) */ - -#endif /* defined(vms) */ - -#if defined (STDC_HEADERS) || defined (USG) -#include -#endif - -/* Some old versions of bison generate parsers that use bcopy. - That loses on systems that don't provide the function, so we have - to redefine it here. */ -#if !defined (HAVE_BCOPY) && defined (HAVE_MEMCPY) && !defined (bcopy) -#define bcopy(from, to, len) memcpy ((to), (from), (len)) -#endif - -#if defined (STDC_HEADERS) -#include -#endif - -/* NOTES on rebuilding getdate.c (particularly for inclusion in CVS - releases): - - We don't want to mess with all the portability hassles of alloca. - In particular, most (all?) versions of bison will use alloca in - their parser. If bison works on your system (e.g. it should work - with gcc), then go ahead and use it, but the more general solution - is to use byacc instead of bison, which should generate a portable - parser. I played with adding "#define alloca dont_use_alloca", to - give an error if the parser generator uses alloca (and thus detect - unportable getdate.c's), but that seems to cause as many problems - as it solves. */ - -extern struct tm *gmtime(); -extern struct tm *localtime(); - -#define yyparse getdate_yyparse -#define yylex getdate_yylex -#define yyerror getdate_yyerror - -static int yylex (); -static int yyerror (); - -#define EPOCH 1970 -#define HOUR(x) ((time_t)(x) * 60) -#define SECSPERDAY (24L * 60L * 60L) - - -/* -** An entry in the lexical lookup table. -*/ -typedef struct _TABLE { - char *name; - int type; - time_t value; -} TABLE; - - -/* -** Daylight-savings mode: on, off, or not yet known. -*/ -typedef enum _DSTMODE { - DSTon, DSToff, DSTmaybe -} DSTMODE; - -/* -** Meridian: am, pm, or 24-hour style. -*/ -typedef enum _MERIDIAN { - MERam, MERpm, MER24 -} MERIDIAN; - - -/* -** Global variables. We could get rid of most of these by using a good -** union as the yacc stack. (This routine was originally written before -** yacc had the %union construct.) Maybe someday; right now we only use -** the %union very rarely. -*/ -static char *yyInput; -static DSTMODE yyDSTmode; -static time_t yyDayOrdinal; -static time_t yyDayNumber; -static int yyHaveDate; -static int yyHaveDay; -static int yyHaveRel; -static int yyHaveTime; -static int yyHaveZone; -static time_t yyTimezone; -static time_t yyDay; -static time_t yyHour; -static time_t yyMinutes; -static time_t yyMonth; -static time_t yySeconds; -static time_t yyYear; -static MERIDIAN yyMeridian; -static time_t yyRelMonth; -static time_t yyRelSeconds; - -%} - -%union { - time_t Number; - enum _MERIDIAN Meridian; -} - -%token tAGO tDAY tDAYZONE tID tMERIDIAN tMINUTE_UNIT tMONTH tMONTH_UNIT -%token tSEC_UNIT tSNUMBER tUNUMBER tZONE tDST - -%type tDAY tDAYZONE tMINUTE_UNIT tMONTH tMONTH_UNIT -%type tSEC_UNIT tSNUMBER tUNUMBER tZONE -%type tMERIDIAN o_merid - -%% - -spec : /* NULL */ - | spec item - ; - -item : time { - yyHaveTime++; - } - | zone { - yyHaveZone++; - } - | date { - yyHaveDate++; - } - | day { - yyHaveDay++; - } - | rel { - yyHaveRel++; - } - | number - ; - -time : tUNUMBER tMERIDIAN { - yyHour = $1; - yyMinutes = 0; - yySeconds = 0; - yyMeridian = $2; - } - | tUNUMBER ':' tUNUMBER o_merid { - yyHour = $1; - yyMinutes = $3; - yySeconds = 0; - yyMeridian = $4; - } - | tUNUMBER ':' tUNUMBER tSNUMBER { - yyHour = $1; - yyMinutes = $3; - yyMeridian = MER24; - yyDSTmode = DSToff; - yyTimezone = - ($4 % 100 + ($4 / 100) * 60); - } - | tUNUMBER ':' tUNUMBER ':' tUNUMBER o_merid { - yyHour = $1; - yyMinutes = $3; - yySeconds = $5; - yyMeridian = $6; - } - | tUNUMBER ':' tUNUMBER ':' tUNUMBER tSNUMBER { - yyHour = $1; - yyMinutes = $3; - yySeconds = $5; - yyMeridian = MER24; - yyDSTmode = DSToff; - yyTimezone = - ($6 % 100 + ($6 / 100) * 60); - } - ; - -zone : tZONE { - yyTimezone = $1; - yyDSTmode = DSToff; - } - | tDAYZONE { - yyTimezone = $1; - yyDSTmode = DSTon; - } - | - tZONE tDST { - yyTimezone = $1; - yyDSTmode = DSTon; - } - ; - -day : tDAY { - yyDayOrdinal = 1; - yyDayNumber = $1; - } - | tDAY ',' { - yyDayOrdinal = 1; - yyDayNumber = $1; - } - | tUNUMBER tDAY { - yyDayOrdinal = $1; - yyDayNumber = $2; - } - ; - -date : tUNUMBER '/' tUNUMBER { - yyMonth = $1; - yyDay = $3; - } - | tUNUMBER '/' tUNUMBER '/' tUNUMBER { - yyMonth = $1; - yyDay = $3; - yyYear = $5; - } - | tUNUMBER tSNUMBER tSNUMBER { - /* ISO 8601 format. yyyy-mm-dd. */ - yyYear = $1; - yyMonth = -$2; - yyDay = -$3; - } - | tUNUMBER tMONTH tSNUMBER { - /* e.g. 17-JUN-1992. */ - yyDay = $1; - yyMonth = $2; - yyYear = -$3; - } - | tMONTH tUNUMBER { - yyMonth = $1; - yyDay = $2; - } - | tMONTH tUNUMBER ',' tUNUMBER { - yyMonth = $1; - yyDay = $2; - yyYear = $4; - } - | tUNUMBER tMONTH { - yyMonth = $2; - yyDay = $1; - } - | tUNUMBER tMONTH tUNUMBER { - yyMonth = $2; - yyDay = $1; - yyYear = $3; - } - ; - -rel : relunit tAGO { - yyRelSeconds = -yyRelSeconds; - yyRelMonth = -yyRelMonth; - } - | relunit - ; - -relunit : tUNUMBER tMINUTE_UNIT { - yyRelSeconds += $1 * $2 * 60L; - } - | tSNUMBER tMINUTE_UNIT { - yyRelSeconds += $1 * $2 * 60L; - } - | tMINUTE_UNIT { - yyRelSeconds += $1 * 60L; - } - | tSNUMBER tSEC_UNIT { - yyRelSeconds += $1; - } - | tUNUMBER tSEC_UNIT { - yyRelSeconds += $1; - } - | tSEC_UNIT { - yyRelSeconds++; - } - | tSNUMBER tMONTH_UNIT { - yyRelMonth += $1 * $2; - } - | tUNUMBER tMONTH_UNIT { - yyRelMonth += $1 * $2; - } - | tMONTH_UNIT { - yyRelMonth += $1; - } - ; - -number : tUNUMBER { - if (yyHaveTime && yyHaveDate && !yyHaveRel) - yyYear = $1; - else { - if($1>10000) { - yyHaveDate++; - yyDay= ($1)%100; - yyMonth= ($1/100)%100; - yyYear = $1/10000; - } - else { - yyHaveTime++; - if ($1 < 100) { - yyHour = $1; - yyMinutes = 0; - } - else { - yyHour = $1 / 100; - yyMinutes = $1 % 100; - } - yySeconds = 0; - yyMeridian = MER24; - } - } - } - ; - -o_merid : /* NULL */ { - $$ = MER24; - } - | tMERIDIAN { - $$ = $1; - } - ; - -%% - -/* Month and day table. */ -static TABLE const MonthDayTable[] = { - { N_("january"), tMONTH, 1 }, - { N_("february"), tMONTH, 2 }, - { N_("march"), tMONTH, 3 }, - { N_("april"), tMONTH, 4 }, - { N_("may"), tMONTH, 5 }, - { N_("june"), tMONTH, 6 }, - { N_("july"), tMONTH, 7 }, - { N_("august"), tMONTH, 8 }, - { N_("september"), tMONTH, 9 }, - { N_("sept"), tMONTH, 9 }, - { N_("october"), tMONTH, 10 }, - { N_("november"), tMONTH, 11 }, - { N_("december"), tMONTH, 12 }, - { N_("sunday"), tDAY, 0 }, - { N_("monday"), tDAY, 1 }, - { N_("tuesday"), tDAY, 2 }, - { N_("tues"), tDAY, 2 }, - { N_("wednesday"), tDAY, 3 }, - { N_("wednes"), tDAY, 3 }, - { N_("thursday"), tDAY, 4 }, - { N_("thur"), tDAY, 4 }, - { N_("thurs"), tDAY, 4 }, - { N_("friday"), tDAY, 5 }, - { N_("saturday"), tDAY, 6 }, - { NULL } -}; - -/* Time units table. */ -static TABLE const UnitsTable[] = { - { N_("year"), tMONTH_UNIT, 12 }, - { N_("month"), tMONTH_UNIT, 1 }, - { N_("fortnight"), tMINUTE_UNIT, 14 * 24 * 60 }, - { N_("week"), tMINUTE_UNIT, 7 * 24 * 60 }, - { N_("day"), tMINUTE_UNIT, 1 * 24 * 60 }, - { N_("hour"), tMINUTE_UNIT, 60 }, - { N_("minute"), tMINUTE_UNIT, 1 }, - { N_("min"), tMINUTE_UNIT, 1 }, - { N_("second"), tSEC_UNIT, 1 }, - { N_("sec"), tSEC_UNIT, 1 }, - { NULL } -}; - -/* Assorted relative-time words. */ -static TABLE const OtherTable[] = { - { N_("tomorrow"), tMINUTE_UNIT, 1 * 24 * 60 }, - { N_("yesterday"), tMINUTE_UNIT, -1 * 24 * 60 }, - { N_("today"), tMINUTE_UNIT, 0 }, - { N_("now"), tMINUTE_UNIT, 0 }, - { N_("last"), tUNUMBER, -1 }, - { N_("this"), tMINUTE_UNIT, 0 }, - { N_("next"), tUNUMBER, 2 }, - { N_("first"), tUNUMBER, 1 }, -/* { N_("second"), tUNUMBER, 2 }, */ - { N_("third"), tUNUMBER, 3 }, - { N_("fourth"), tUNUMBER, 4 }, - { N_("fifth"), tUNUMBER, 5 }, - { N_("sixth"), tUNUMBER, 6 }, - { N_("seventh"), tUNUMBER, 7 }, - { N_("eighth"), tUNUMBER, 8 }, - { N_("ninth"), tUNUMBER, 9 }, - { N_("tenth"), tUNUMBER, 10 }, - { N_("eleventh"), tUNUMBER, 11 }, - { N_("twelfth"), tUNUMBER, 12 }, - { N_("ago"), tAGO, 1 }, - { NULL } -}; - -/* The timezone table. */ -/* Some of these are commented out because a time_t can't store a float. */ -static TABLE const TimezoneTable[] = { - { "gmt", tZONE, HOUR( 0) }, /* Greenwich Mean */ - { "ut", tZONE, HOUR( 0) }, /* Universal (Coordinated) */ - { "utc", tZONE, HOUR( 0) }, - { "wet", tZONE, HOUR( 0) }, /* Western European */ - { "bst", tDAYZONE, HOUR( 0) }, /* British Summer */ - { "wat", tZONE, HOUR( 1) }, /* West Africa */ - { "at", tZONE, HOUR( 2) }, /* Azores */ -#if 0 - /* For completeness. BST is also British Summer, and GST is - * also Guam Standard. */ - { "bst", tZONE, HOUR( 3) }, /* Brazil Standard */ - { "gst", tZONE, HOUR( 3) }, /* Greenland Standard */ -#endif -#if 0 - { "nft", tZONE, HOUR(3.5) }, /* Newfoundland */ - { "nst", tZONE, HOUR(3.5) }, /* Newfoundland Standard */ - { "ndt", tDAYZONE, HOUR(3.5) }, /* Newfoundland Daylight */ -#endif - { "ast", tZONE, HOUR( 4) }, /* Atlantic Standard */ - { "adt", tDAYZONE, HOUR( 4) }, /* Atlantic Daylight */ - { "est", tZONE, HOUR( 5) }, /* Eastern Standard */ - { "edt", tDAYZONE, HOUR( 5) }, /* Eastern Daylight */ - { "cst", tZONE, HOUR( 6) }, /* Central Standard */ - { "cdt", tDAYZONE, HOUR( 6) }, /* Central Daylight */ - { "mst", tZONE, HOUR( 7) }, /* Mountain Standard */ - { "mdt", tDAYZONE, HOUR( 7) }, /* Mountain Daylight */ - { "pst", tZONE, HOUR( 8) }, /* Pacific Standard */ - { "pdt", tDAYZONE, HOUR( 8) }, /* Pacific Daylight */ - { "yst", tZONE, HOUR( 9) }, /* Yukon Standard */ - { "ydt", tDAYZONE, HOUR( 9) }, /* Yukon Daylight */ - { "hst", tZONE, HOUR(10) }, /* Hawaii Standard */ - { "hdt", tDAYZONE, HOUR(10) }, /* Hawaii Daylight */ - { "cat", tZONE, HOUR(10) }, /* Central Alaska */ - { "ahst", tZONE, HOUR(10) }, /* Alaska-Hawaii Standard */ - { "nt", tZONE, HOUR(11) }, /* Nome */ - { "idlw", tZONE, HOUR(12) }, /* International Date Line West */ - { "cet", tZONE, -HOUR(1) }, /* Central European */ - { "met", tZONE, -HOUR(1) }, /* Middle European */ - { "mewt", tZONE, -HOUR(1) }, /* Middle European Winter */ - { "mest", tDAYZONE, -HOUR(1) }, /* Middle European Summer */ - { "swt", tZONE, -HOUR(1) }, /* Swedish Winter */ - { "sst", tDAYZONE, -HOUR(1) }, /* Swedish Summer */ - { "fwt", tZONE, -HOUR(1) }, /* French Winter */ - { "fst", tDAYZONE, -HOUR(1) }, /* French Summer */ - { "eet", tZONE, -HOUR(2) }, /* Eastern Europe, USSR Zone 1 */ - { "bt", tZONE, -HOUR(3) }, /* Baghdad, USSR Zone 2 */ -#if 0 - { "it", tZONE, -HOUR(3.5) },/* Iran */ -#endif - { "zp4", tZONE, -HOUR(4) }, /* USSR Zone 3 */ - { "zp5", tZONE, -HOUR(5) }, /* USSR Zone 4 */ -#if 0 - { "ist", tZONE, -HOUR(5.5) },/* Indian Standard */ -#endif - { "zp6", tZONE, -HOUR(6) }, /* USSR Zone 5 */ -#if 0 - /* For completeness. NST is also Newfoundland Stanard, and SST is - * also Swedish Summer. */ - { "nst", tZONE, -HOUR(6.5) },/* North Sumatra */ - { "sst", tZONE, -HOUR(7) }, /* South Sumatra, USSR Zone 6 */ -#endif /* 0 */ - { "wast", tZONE, -HOUR(7) }, /* West Australian Standard */ - { "wadt", tDAYZONE, -HOUR(7) }, /* West Australian Daylight */ -#if 0 - { "jt", tZONE, -HOUR(7.5) },/* Java (3pm in Cronusland!) */ -#endif - { "cct", tZONE, -HOUR(8) }, /* China Coast, USSR Zone 7 */ - { "jst", tZONE, -HOUR(9) }, /* Japan Standard, USSR Zone 8 */ -#if 0 - { "cast", tZONE, -HOUR(9.5) },/* Central Australian Standard */ - { "cadt", tDAYZONE, -HOUR(9.5) },/* Central Australian Daylight */ -#endif - { "east", tZONE, -HOUR(10) }, /* Eastern Australian Standard */ - { "eadt", tDAYZONE, -HOUR(10) }, /* Eastern Australian Daylight */ - { "gst", tZONE, -HOUR(10) }, /* Guam Standard, USSR Zone 9 */ - { "nzt", tZONE, -HOUR(12) }, /* New Zealand */ - { "nzst", tZONE, -HOUR(12) }, /* New Zealand Standard */ - { "nzdt", tDAYZONE, -HOUR(12) }, /* New Zealand Daylight */ - { "idle", tZONE, -HOUR(12) }, /* International Date Line East */ - { NULL } -}; - -/* Military timezone table. */ -static TABLE const MilitaryTable[] = { - { "a", tZONE, HOUR( 1) }, - { "b", tZONE, HOUR( 2) }, - { "c", tZONE, HOUR( 3) }, - { "d", tZONE, HOUR( 4) }, - { "e", tZONE, HOUR( 5) }, - { "f", tZONE, HOUR( 6) }, - { "g", tZONE, HOUR( 7) }, - { "h", tZONE, HOUR( 8) }, - { "i", tZONE, HOUR( 9) }, - { "k", tZONE, HOUR( 10) }, - { "l", tZONE, HOUR( 11) }, - { "m", tZONE, HOUR( 12) }, - { "n", tZONE, HOUR(- 1) }, - { "o", tZONE, HOUR(- 2) }, - { "p", tZONE, HOUR(- 3) }, - { "q", tZONE, HOUR(- 4) }, - { "r", tZONE, HOUR(- 5) }, - { "s", tZONE, HOUR(- 6) }, - { "t", tZONE, HOUR(- 7) }, - { "u", tZONE, HOUR(- 8) }, - { "v", tZONE, HOUR(- 9) }, - { "w", tZONE, HOUR(-10) }, - { "x", tZONE, HOUR(-11) }, - { "y", tZONE, HOUR(-12) }, - { "z", tZONE, HOUR( 0) }, - { NULL } -}; - - - - -/* ARGSUSED */ -static int -yyerror(s) - char *s; -{ - return 0; -} - - -static time_t -ToSeconds(Hours, Minutes, Seconds, Meridian) - time_t Hours; - time_t Minutes; - time_t Seconds; - MERIDIAN Meridian; -{ - if (Minutes < 0 || Minutes > 59 || Seconds < 0 || Seconds > 59) - return -1; - switch (Meridian) { - case MER24: - if (Hours < 0 || Hours > 23) - return -1; - return (Hours * 60L + Minutes) * 60L + Seconds; - case MERam: - if (Hours < 1 || Hours > 12) - return -1; - return (Hours * 60L + Minutes) * 60L + Seconds; - case MERpm: - if (Hours < 1 || Hours > 12) - return -1; - return ((Hours + 12) * 60L + Minutes) * 60L + Seconds; - default: - abort (); - } - /* NOTREACHED */ -} - - -static time_t -Convert(Month, Day, Year, Hours, Minutes, Seconds, Meridian, DSTmode) - time_t Month; - time_t Day; - time_t Year; - time_t Hours; - time_t Minutes; - time_t Seconds; - MERIDIAN Meridian; - DSTMODE DSTmode; -{ - static int DaysInMonth[12] = { - 31, 0, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 - }; - time_t tod; - time_t Julian; - int i; - - if (Year < 0) - Year = -Year; - if (Year < 100) - Year += 1900; - DaysInMonth[1] = Year % 4 == 0 && (Year % 100 != 0 || Year % 400 == 0) - ? 29 : 28; - if (Year < EPOCH || Year > 1999 - || Month < 1 || Month > 12 - /* Lint fluff: "conversion from long may lose accuracy" */ - || Day < 1 || Day > DaysInMonth[(int)--Month]) - return -1; - - for (Julian = Day - 1, i = 0; i < Month; i++) - Julian += DaysInMonth[i]; - for (i = EPOCH; i < Year; i++) - Julian += 365 + (i % 4 == 0); - Julian *= SECSPERDAY; - Julian += yyTimezone * 60L; - if ((tod = ToSeconds(Hours, Minutes, Seconds, Meridian)) < 0) - return -1; - Julian += tod; - if (DSTmode == DSTon - || (DSTmode == DSTmaybe && localtime(&Julian)->tm_isdst)) - Julian -= 60 * 60; - return Julian; -} - - -static time_t -DSTcorrect(Start, Future) - time_t Start; - time_t Future; -{ - time_t StartDay; - time_t FutureDay; - - StartDay = (localtime(&Start)->tm_hour + 1) % 24; - FutureDay = (localtime(&Future)->tm_hour + 1) % 24; - return (Future - Start) + (StartDay - FutureDay) * 60L * 60L; -} - - -static time_t -RelativeDate(Start, DayOrdinal, DayNumber) - time_t Start; - time_t DayOrdinal; - time_t DayNumber; -{ - struct tm *tm; - time_t now; - - now = Start; - tm = localtime(&now); - now += SECSPERDAY * ((DayNumber - tm->tm_wday + 7) % 7); - now += 7 * SECSPERDAY * (DayOrdinal <= 0 ? DayOrdinal : DayOrdinal - 1); - return DSTcorrect(Start, now); -} - - -static time_t -RelativeMonth(Start, RelMonth) - time_t Start; - time_t RelMonth; -{ - struct tm *tm; - time_t Month; - time_t Year; - - if (RelMonth == 0) - return 0; - tm = localtime(&Start); - Month = 12 * tm->tm_year + tm->tm_mon + RelMonth; - Year = Month / 12; - Month = Month % 12 + 1; - return DSTcorrect(Start, - Convert(Month, (time_t)tm->tm_mday, Year, - (time_t)tm->tm_hour, (time_t)tm->tm_min, (time_t)tm->tm_sec, - MER24, DSTmaybe)); -} - - -static int -LookupWord(buff) - char *buff; -{ - register char *p; - register char *q; - register const TABLE *tp; - int i; - int abbrev; - - /* Make it lowercase. */ - for (p = buff; *p; p++) - if (isupper(*p)) - *p = tolower(*p); - - if (strcmp(buff, "am") == 0 || strcmp(buff, "a.m.") == 0) { - yylval.Meridian = MERam; - return tMERIDIAN; - } - if (strcmp(buff, "pm") == 0 || strcmp(buff, "p.m.") == 0) { - yylval.Meridian = MERpm; - return tMERIDIAN; - } - - /* See if we have an abbreviation for a month. */ - if (strlen(buff) == 3) - abbrev = 1; - else if (strlen(buff) == 4 && buff[3] == '.') { - abbrev = 1; - buff[3] = '\0'; - } - else - abbrev = 0; - - for (tp = MonthDayTable; tp->name; tp++) { - if (abbrev) { - if (strncmp(buff, tp->name, 3) == 0) { - yylval.Number = tp->value; - return tp->type; - } - } - else if (strcmp(buff, tp->name) == 0) { - yylval.Number = tp->value; - return tp->type; - } - } - - for (tp = TimezoneTable; tp->name; tp++) - if (strcmp(buff, tp->name) == 0) { - yylval.Number = tp->value; - return tp->type; - } - - if (strcmp(buff, "dst") == 0) - return tDST; - - for (tp = UnitsTable; tp->name; tp++) - if (strcmp(buff, tp->name) == 0) { - yylval.Number = tp->value; - return tp->type; - } - - /* Strip off any plural and try the units table again. */ - i = strlen(buff) - 1; - if (buff[i] == 's') { - buff[i] = '\0'; - for (tp = UnitsTable; tp->name; tp++) - if (strcmp(buff, tp->name) == 0) { - yylval.Number = tp->value; - return tp->type; - } - buff[i] = 's'; /* Put back for "this" in OtherTable. */ - } - - for (tp = OtherTable; tp->name; tp++) - if (strcmp(buff, tp->name) == 0) { - yylval.Number = tp->value; - return tp->type; - } - - /* Military timezones. */ - if (buff[1] == '\0' && isalpha(*buff)) { - for (tp = MilitaryTable; tp->name; tp++) - if (strcmp(buff, tp->name) == 0) { - yylval.Number = tp->value; - return tp->type; - } - } - - /* Drop out any periods and try the timezone table again. */ - for (i = 0, p = q = buff; *q; q++) - if (*q != '.') - *p++ = *q; - else - i++; - *p = '\0'; - if (i) - for (tp = TimezoneTable; tp->name; tp++) - if (strcmp(buff, tp->name) == 0) { - yylval.Number = tp->value; - return tp->type; - } - - return tID; -} - - -static int -yylex() -{ - register char c; - register char *p; - char buff[20]; - int Count; - int sign; - - for ( ; ; ) { - while (isspace(*yyInput)) - yyInput++; - - if (isdigit(c = *yyInput) || c == '-' || c == '+') { - if (c == '-' || c == '+') { - sign = c == '-' ? -1 : 1; - if (!isdigit(*++yyInput)) - /* skip the '-' sign */ - continue; - } - else - sign = 0; - for (yylval.Number = 0; isdigit(c = *yyInput++); ) - yylval.Number = 10 * yylval.Number + c - '0'; - yyInput--; - if (sign < 0) - yylval.Number = -yylval.Number; - return sign ? tSNUMBER : tUNUMBER; - } - if (isalpha(c)) { - for (p = buff; isalpha(c = *yyInput++) || c == '.'; ) - if (p < &buff[sizeof buff - 1]) - *p++ = c; - *p = '\0'; - yyInput--; - return LookupWord(buff); - } - if (c != '(') - return *yyInput++; - Count = 0; - do { - c = *yyInput++; - if (c == '\0') - return c; - if (c == '(') - Count++; - else if (c == ')') - Count--; - } while (Count > 0); - } -} - -#define TM_YEAR_ORIGIN 1900 - -/* Yield A - B, measured in seconds. */ -static long -difftm (a, b) - struct tm *a, *b; -{ - int ay = a->tm_year + (TM_YEAR_ORIGIN - 1); - int by = b->tm_year + (TM_YEAR_ORIGIN - 1); - int days = ( - /* difference in day of year */ - a->tm_yday - b->tm_yday - /* + intervening leap days */ - + ((ay >> 2) - (by >> 2)) - - (ay/100 - by/100) - + ((ay/100 >> 2) - (by/100 >> 2)) - /* + difference in years * 365 */ - + (long)(ay-by) * 365 - ); - return (60*(60*(24*days + (a->tm_hour - b->tm_hour)) - + (a->tm_min - b->tm_min)) - + (a->tm_sec - b->tm_sec)); -} - -time_t -get_date(p, now) - char *p; - struct timeb *now; -{ - struct tm *tm, gmt; - struct timeb ftz; - time_t Start; - time_t tod; - time_t nowtime; - - yyInput = p; - if (now == NULL) { - now = &ftz; - (void)time (&nowtime); - - if (! (tm = gmtime (&nowtime))) - return -1; - gmt = *tm; /* Make a copy, in case localtime modifies *tm. */ - - if (! (tm = localtime (&nowtime))) - return -1; - - ftz.timezone = difftm (&gmt, tm) / 60; - if(tm->tm_isdst) - ftz.timezone += 60; - } - else - { - nowtime = now->time; - } - - tm = localtime(&nowtime); - yyYear = tm->tm_year; - yyMonth = tm->tm_mon + 1; - yyDay = tm->tm_mday; - yyTimezone = now->timezone; - yyDSTmode = DSTmaybe; - yyHour = 0; - yyMinutes = 0; - yySeconds = 0; - yyMeridian = MER24; - yyRelSeconds = 0; - yyRelMonth = 0; - yyHaveDate = 0; - yyHaveDay = 0; - yyHaveRel = 0; - yyHaveTime = 0; - yyHaveZone = 0; - - if (yyparse() - || yyHaveTime > 1 || yyHaveZone > 1 || yyHaveDate > 1 || yyHaveDay > 1) - return -1; - - if (yyHaveDate || yyHaveTime || yyHaveDay) { - Start = Convert(yyMonth, yyDay, yyYear, yyHour, yyMinutes, yySeconds, - yyMeridian, yyDSTmode); - if (Start < 0) - return -1; - } - else { - Start = nowtime; - if (!yyHaveRel) - Start -= ((tm->tm_hour * 60L + tm->tm_min) * 60L) + tm->tm_sec; - } - - Start += yyRelSeconds; - Start += RelativeMonth(Start, yyRelMonth); - - if (yyHaveDay && !yyHaveDate) { - tod = RelativeDate(Start, yyDayOrdinal, yyDayNumber); - Start += tod; - } - - /* Have to do *something* with a legitimate -1 so it's distinguishable - * from the error return value. (Alternately could set errno on error.) */ - return Start == -1 ? 0 : Start; -} - - -#if defined(TEST) - -/* ARGSUSED */ -int -main(ac, av) - int ac; - char *av[]; -{ - char buff[128]; - time_t d; - - (void)printf("Enter date, or blank line to exit.\n\t> "); - (void)fflush(stdout); - while (gets(buff) && buff[0]) { - d = get_date(buff, (struct timeb *)NULL); - if (d == -1) - (void)printf("Bad format - couldn't convert.\n"); - else - (void)printf("%s", ctime(&d)); - (void)printf("\t> "); - (void)fflush(stdout); - } - exit(0); - /* NOTREACHED */ -} -#endif /* defined(TEST) */ diff --git a/calendar/gui/gncal-todo.c b/calendar/gui/gncal-todo.c deleted file mode 100644 index a7c54e6086..0000000000 --- a/calendar/gui/gncal-todo.c +++ /dev/null @@ -1,904 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* To-do widget for gncal - * - * Copyright (C) 1998 The Free Software Foundation - * - * Author: Federico Mena - */ - -#include -#include -#include -#include "gncal-todo.h" -#include "calendar-commands.h" -#include "popup-menu.h" -#include "eventedit.h" - -int todo_show_due_date = 0; -int todo_show_priority = 0; -int todo_show_time_remaining = 0; - -int todo_item_dstatus_highlight_overdue = 0; -int todo_item_dstatus_highlight_due_today = 0; -int todo_item_dstatus_highlight_not_due_yet = 0; - - -char *todo_overdue_font_text; -gint todo_current_sort_column = 0; -gint todo_current_sort_type = GTK_SORT_ASCENDING; - -gboolean todo_style_changed =0; -gboolean todo_list_autoresize = 1; -gboolean todo_list_redraw_in_progess = 0; -static void gncal_todo_init (GncalTodo *todo); - - -guint -gncal_todo_get_type (void) -{ - static guint todo_type = 0; - - if (!todo_type) { - GtkTypeInfo todo_info = { - "GncalTodo", - sizeof (GncalTodo), - sizeof (GncalTodoClass), - (GtkClassInitFunc) NULL, - (GtkObjectInitFunc) gncal_todo_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL - }; - - todo_type = gtk_type_unique (gtk_vbox_get_type (), &todo_info); - } - - return todo_type; -} - -static void -ok_button (GtkWidget *widget, GnomeDialog *dialog) -{ - iCalObject *ico; - GncalTodo *todo; - GtkEntry *entry; - GnomeDateEdit *due_date; - GtkText *comment; - GtkSpinButton *priority; - - ico = gtk_object_get_user_data (GTK_OBJECT (dialog)); - - todo = GNCAL_TODO (gtk_object_get_data (GTK_OBJECT (dialog), "gncal_todo")); - entry = GTK_ENTRY (gtk_object_get_data (GTK_OBJECT (dialog), "summary_entry")); - due_date = GNOME_DATE_EDIT (gtk_object_get_data(GTK_OBJECT(dialog), "due_date")); - priority = GTK_SPIN_BUTTON (gtk_object_get_data(GTK_OBJECT(dialog), "priority")); - comment = GTK_TEXT(gtk_object_get_data (GTK_OBJECT(dialog), "comment")); - if (ico->summary) - g_free (ico->summary); - if (ico->comment) - g_free (ico->comment); - ico->dtend = gnome_date_edit_get_date (due_date); - ico->summary = g_strdup (gtk_entry_get_text (entry)); - ico->priority = gtk_spin_button_get_value_as_int (priority); - ico->comment = gtk_editable_get_chars( GTK_EDITABLE(comment), 0, -1); - ico->user_data = NULL; - - if (ico->new) { - gnome_calendar_add_object (todo->calendar, ico); - ico->new = FALSE; - } else - gnome_calendar_object_changed (todo->calendar, ico, CHANGE_ALL); /* ok, summary only... */ - - ical_object_unref (ico); - - gtk_widget_destroy (GTK_WIDGET (dialog)); -} - -static void -cancel_button (GtkWidget *widget, GnomeDialog *dialog) -{ - iCalObject *ico; - - ico = gtk_object_get_user_data (GTK_OBJECT (dialog)); - - ico->user_data = NULL; - - ical_object_unref (ico); - - gtk_widget_destroy (GTK_WIDGET (dialog)); - - -} - -static gint -delete_event (GtkWidget *widget, GdkEvent *event, GnomeDialog *dialog) -{ - cancel_button (NULL, dialog); - return TRUE; -} - -static void -simple_todo_editor (GncalTodo *todo, iCalObject *ico) -{ - GtkWidget *dialog; - GtkWidget *hbox; - GtkWidget *due_box; - GtkWidget *due_label; - GtkWidget *due_entry; - GtkWidget *comment_box; - GtkWidget *comment_label; - GtkWidget *comment_text; - GtkWidget *comment_internal_box; - GtkWidget *comment_sep; - GtkWidget *w; - GtkWidget *pri_box; - GtkWidget *pri_label; - GtkWidget *pri_spin; - GtkObject *pri_adj; - - GtkWidget *entry; - - dialog = gnome_dialog_new (ico->new ? _("Create to-do item") : _("Edit to-do item"), - GNOME_STOCK_BUTTON_OK, - GNOME_STOCK_BUTTON_CANCEL, - NULL); - gnome_dialog_set_parent (GNOME_DIALOG (dialog), - GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (todo->calendar)))); - hbox = gtk_hbox_new (FALSE, 4); - gtk_container_border_width (GTK_CONTAINER (hbox), 4); - gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), - hbox, FALSE, FALSE, 0); - gtk_widget_show (hbox); - - - due_box = gtk_hbox_new (FALSE, 4); - gtk_container_border_width (GTK_CONTAINER (due_box), 4); - gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), due_box, FALSE, FALSE, 0); - gtk_widget_show (due_box); - - pri_box = gtk_hbox_new (FALSE, 4); - gtk_container_border_width (GTK_CONTAINER (pri_box), 4); - gtk_box_pack_start(GTK_BOX (GNOME_DIALOG (dialog)->vbox), pri_box, FALSE, FALSE, 0); - gtk_widget_show (pri_box); - - comment_box = gtk_hbox_new (FALSE, 4); - gtk_container_border_width (GTK_CONTAINER (comment_box), 4); - gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), comment_box, FALSE, FALSE, 0); - gtk_widget_show (comment_box); - - comment_internal_box = gtk_vbox_new(FALSE,2); - gtk_container_border_width (GTK_CONTAINER (comment_internal_box), 4); - - gtk_box_pack_start (GTK_BOX (comment_box), comment_internal_box, TRUE, TRUE, 0); - gtk_widget_show (comment_internal_box); - - w = gtk_label_new (_("Summary:")); - gtk_box_pack_start (GTK_BOX (hbox), w, FALSE, FALSE, 0); - gtk_widget_show (w); - - entry = gtk_entry_new (); - gtk_entry_set_text (GTK_ENTRY (entry), ico->summary); - gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 0); - gtk_widget_show (entry); - - - due_label = gtk_label_new (_("Due Date:")); - gtk_box_pack_start (GTK_BOX (due_box), due_label, FALSE, FALSE, 0); - gtk_widget_show (due_label); - - due_entry = gtk_entry_new (); - due_entry = date_edit_new (ico->dtend, TRUE); - gtk_box_pack_start (GTK_BOX (due_box), due_entry, TRUE, TRUE, 0); - gtk_widget_show (due_entry); - - pri_label = gtk_label_new (_("Priority:")); - gtk_box_pack_start (GTK_BOX (pri_box), pri_label, FALSE, FALSE, 0); - gtk_widget_show (pri_label); - - pri_adj = gtk_adjustment_new (5.0, 1.0, 9.0, 1.0, 3.0, 0.0); - pri_spin = gtk_spin_button_new (GTK_ADJUSTMENT(pri_adj), 0.0, 0); - gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (pri_spin), TRUE); - gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (pri_spin), FALSE); - gtk_spin_button_set_snap_to_ticks (GTK_SPIN_BUTTON (pri_spin), FALSE); - gtk_box_pack_start (GTK_BOX (pri_box), pri_spin, FALSE, FALSE, 0); - gtk_widget_show (pri_spin); - - comment_sep = gtk_hseparator_new (); - gtk_box_pack_start (GTK_BOX (comment_box), comment_sep, FALSE, FALSE, 0); - gtk_widget_show(comment_sep); - - comment_label = gtk_label_new (_("Item Comments:")); - gtk_label_set_justify(GTK_LABEL(comment_label), GTK_JUSTIFY_LEFT); - gtk_box_pack_start (GTK_BOX (comment_internal_box), comment_label, TRUE, TRUE, 0); - gtk_widget_show (comment_label); - - - - - comment_text = gtk_text_new (NULL, NULL); - gtk_text_set_editable (GTK_TEXT (comment_text), TRUE); - gtk_text_set_word_wrap( GTK_TEXT(comment_text), TRUE); - gtk_text_freeze(GTK_TEXT(comment_text)); - if(ico->comment) { - gtk_text_insert(GTK_TEXT(comment_text), NULL, NULL, NULL, ico->comment, strlen(ico->comment)); - } - gtk_text_thaw(GTK_TEXT(comment_text)); - gtk_box_pack_start (GTK_BOX (comment_internal_box), comment_text, FALSE, TRUE, 0); - gtk_widget_show (comment_text); - - ico->user_data = dialog; - - gtk_object_set_user_data (GTK_OBJECT (dialog), ico); - ical_object_ref (ico); - - gtk_object_set_data (GTK_OBJECT (dialog), "gncal_todo", todo); - gtk_object_set_data (GTK_OBJECT (dialog), "summary_entry", entry); - gtk_object_set_data (GTK_OBJECT (dialog), "due_date", due_entry); - gtk_object_set_data (GTK_OBJECT (dialog), "priority", pri_spin); - gtk_object_set_data (GTK_OBJECT (dialog), "comment", comment_text); - - gnome_dialog_button_connect (GNOME_DIALOG (dialog), 0, (GtkSignalFunc) ok_button, dialog); - gnome_dialog_button_connect (GNOME_DIALOG (dialog), 1, (GtkSignalFunc) cancel_button, dialog); - - gtk_signal_connect (GTK_OBJECT (dialog), "delete_event", - (GtkSignalFunc) delete_event, - dialog); - - gnome_dialog_set_default (GNOME_DIALOG (dialog), 0); - gnome_dialog_editable_enters (GNOME_DIALOG (dialog), GTK_EDITABLE(entry)); - - gtk_window_position (GTK_WINDOW (dialog), GTK_WIN_POS_MOUSE); - gtk_widget_show (dialog); - gtk_widget_grab_focus (entry); -} - -static iCalObject * -get_clist_selected_ico (GtkCList *clist) -{ - gint sel; - - if (!clist->selection) - return NULL; - - sel = GPOINTER_TO_INT(clist->selection->data); - - return gtk_clist_get_row_data (clist, sel); -} - -static void -add_todo (GncalTodo *todo) -{ - iCalObject *ico; - - ico = ical_new ("", user_name, ""); - ico->type = ICAL_TODO; - ico->new = TRUE; - - simple_todo_editor (todo, ico); - ical_object_unref (ico); -} - -static void -edit_todo (GncalTodo *todo) -{ - simple_todo_editor (todo, get_clist_selected_ico (todo->clist)); -} - -static void -delete_todo (GncalTodo *todo) -{ - gnome_calendar_remove_object (todo->calendar, get_clist_selected_ico (todo->clist)); -} - -static void -add_activated (GtkWidget *widget, GncalTodo *todo) -{ - GtkWidget *w; - - while ((w = gtk_grab_get_current ()) != NULL) - gtk_grab_remove (w); - - add_todo (todo); -} - -static void -edit_activated (GtkWidget *widget, GncalTodo *todo) -{ - GtkWidget *w; - - while ((w = gtk_grab_get_current ()) != NULL) - gtk_grab_remove (w); - - edit_todo (todo); -} - -static void -delete_activated (GtkWidget *widget, GncalTodo *todo) -{ - delete_todo (todo); -} - - -static void -clist_row_selected (GtkCList *clist, gint row, gint column, GdkEventButton *event, GncalTodo *todo) -{ - static struct menu_item items[] = { - { N_("Add to-do item..."), (GtkSignalFunc) add_activated, NULL, TRUE }, - { N_("Edit this item..."), (GtkSignalFunc) edit_activated, NULL, TRUE }, - { N_("Delete this item"), (GtkSignalFunc) delete_activated, NULL, TRUE } - }; - - int i; - - gtk_widget_set_sensitive (todo->edit_button, (todo->clist->selection != NULL)); - gtk_widget_set_sensitive (todo->delete_button, (todo->clist->selection != NULL)); - - if (!event) - return; - - switch (event->button) { - case 1: - if (event->type == GDK_2BUTTON_PRESS) - edit_todo (todo); - break; - - case 3: - for (i = 0; i < (sizeof (items) / sizeof (items[0])); i++) - items[i].data = todo; - - popup_menu (items, sizeof (items) / sizeof (items[0]), event); - break; - - default: - break; - } -} - -/* - * once we get a call back stating that a column - * has been resized never ever automatically resize again - */ -static void -column_resized (GtkWidget *widget, GncalTodo *todo) -{ - /* disabling autoresize of columns */ - if (todo_list_autoresize && !todo_list_redraw_in_progess){ - todo_list_autoresize = 0; - } -} - -/* - * restore the previously set settings for sorting the - * todo list - */ -static void -init_column_sorting (GtkCList *clist) -{ - - /* due date isn't shown so we can't sort by it */ - if (todo_current_sort_column == 1 && ! todo_show_due_date) - todo_current_sort_column = 0; - - clist->sort_type = todo_current_sort_type; - clist->sort_column = todo_current_sort_column; - - gtk_clist_set_sort_column (clist, todo_current_sort_column); - gtk_clist_sort (clist); -} - -static void -todo_click_column (GtkCList *clist, gint column, gpointer data) -{ - if (column == clist->sort_column) - { - if (clist->sort_type == GTK_SORT_ASCENDING) { - clist->sort_type = GTK_SORT_DESCENDING; - todo_current_sort_type = GTK_SORT_DESCENDING; - } else { - clist->sort_type = GTK_SORT_ASCENDING; - todo_current_sort_type = GTK_SORT_ASCENDING; - } - } - else { - gtk_clist_set_sort_column (clist, column); - todo_current_sort_column = column; - } - - gtk_clist_sort (clist); - - /* - * save the sorting preferences cause I hate to have the user - * click twice - */ - - gnome_config_set_int("/calendar/Todo/sort_column", todo_current_sort_column); - gnome_config_set_int("/calendar/Todo/sort_type", todo_current_sort_type); - gnome_config_sync(); -} - -static void -gncal_todo_init (GncalTodo *todo) -{ - GtkWidget *w; - GtkWidget *sw; - GtkWidget *hbox; - gchar *titles[4] = { - N_("Summary"), - N_("Due Date"), - N_("Priority"), - N_("Time Left") - }; - char *tmp[4]; - tmp[0] = _(titles[0]); - tmp[1] = _(titles[1]); - tmp[2] = _(titles[2]); - tmp[3] = _(titles[3]); - - gtk_box_set_spacing (GTK_BOX (todo), 4); - - /* Label */ - - w = gtk_label_new (_("To-do list")); - gtk_misc_set_alignment (GTK_MISC (w), 0.0, 0.5); - gtk_box_pack_start (GTK_BOX (todo), w, FALSE, FALSE, 0); - gtk_widget_show (w); - - /* Clist */ - - sw = gtk_scrolled_window_new (NULL, NULL); - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); - gtk_box_pack_start (GTK_BOX (todo), sw, TRUE, TRUE, 0); - gtk_widget_show (sw); - - - w = gtk_clist_new_with_titles(4, tmp); - - todo->clist = GTK_CLIST (w); - gtk_clist_set_selection_mode (todo->clist, GTK_SELECTION_BROWSE); - - gtk_signal_connect (GTK_OBJECT (todo->clist), "select_row", - (GtkSignalFunc) clist_row_selected, - todo); - gtk_clist_set_button_actions (todo->clist, 2, GTK_BUTTON_SELECTS); - gtk_signal_connect (GTK_OBJECT (todo->clist), "resize_column", - (GtkSignalFunc) column_resized, - todo); - gtk_signal_connect (GTK_OBJECT (todo->clist), "click_column", - (GtkSignalFunc) todo_click_column, NULL); - - gtk_container_add (GTK_CONTAINER (sw), w); - gtk_widget_show (w); - - /* Box for buttons */ - - hbox = gtk_hbox_new (TRUE, 4); - gtk_box_pack_start (GTK_BOX (todo), hbox, FALSE, FALSE, 0); - gtk_widget_show (hbox); - - /* Add */ - - w = gtk_button_new_with_label (_("Add...")); - gtk_signal_connect (GTK_OBJECT (w), "clicked", - (GtkSignalFunc) add_activated, - todo); - gtk_box_pack_start (GTK_BOX (hbox), w, TRUE, TRUE, 0); - gtk_widget_show (w); - - /* Edit */ - - w = gtk_button_new_with_label (_("Edit...")); - todo->edit_button = w; - gtk_widget_set_sensitive (w, FALSE); - gtk_signal_connect (GTK_OBJECT (w), "clicked", - (GtkSignalFunc) edit_activated, - todo); - gtk_box_pack_start (GTK_BOX (hbox), w, TRUE, TRUE, 0); - gtk_widget_show (w); - - /* Delete */ - - w = gtk_button_new_with_label (_("Delete")); - todo->delete_button = w; - gtk_widget_set_sensitive (w, FALSE); - gtk_signal_connect (GTK_OBJECT (w), "clicked", - (GtkSignalFunc) delete_activated, - todo); - gtk_box_pack_start (GTK_BOX (hbox), w, TRUE, TRUE, 0); - gtk_widget_show (w); -} - -GtkWidget * -gncal_todo_new (GnomeCalendar *calendar) -{ - GncalTodo *todo; - - g_return_val_if_fail (calendar != NULL, NULL); - - todo = gtk_type_new (gncal_todo_get_type ()); - - todo->calendar = calendar; - - gncal_todo_update (todo, NULL, 0); - - return GTK_WIDGET (todo); -} - -static char * -convert_time_t_to_char (time_t t) -{ - char buf[100]; - struct tm tm; - - tm = *localtime (&t); - strftime(buf, sizeof (buf), "%m/%d/%Y", &tm); - - return g_strdup (buf); -} - - -enum todo_styles { - TODO_STYLE_OVERDUE, - TODO_STYLE_DUE_TODAY, - TODO_STYLE_NOT_DUE -}; - - -enum todo_status { - TODO_ITEM_DSTATUS_NOT_DUE_YET, - TODO_ITEM_DSTATUS_DUE_TODAY, - TODO_ITEM_DSTATUS_OVERDUE, - TODO_ITEM_DSTATUS_LAST_DUE_STATUS -}; -typedef enum todo_status todo_status; - -static GtkStyle * -make_todo_style(GncalTodo *todo, todo_status style_type) -{ - GtkStyle *style = NULL; - GdkColor style_color; - int color_prop = 0; - switch(style_type) { - case TODO_ITEM_DSTATUS_NOT_DUE_YET: - color_prop = COLOR_PROP_TODO_NOT_DUE_YET; - break; - case TODO_ITEM_DSTATUS_DUE_TODAY: - color_prop = COLOR_PROP_TODO_DUE_TODAY; - break; - case TODO_ITEM_DSTATUS_OVERDUE: - color_prop = COLOR_PROP_TODO_OVERDUE; - break; - case TODO_ITEM_DSTATUS_LAST_DUE_STATUS: - } - - style_color.red = color_props[color_prop].r; - style_color.green = color_props[color_prop].g; - style_color.blue = color_props[color_prop].b; - - style = gtk_style_copy (GTK_WIDGET (todo->clist)->style); - style->base[GTK_STATE_NORMAL] = style_color; - return style; -} - - -static -todo_status todo_item_due_status(time_t *todo_due_time) { - struct tm due_tm_time; - struct tm current_time; - struct tm *temp_tm; - time_t current_time_val = time(NULL); - temp_tm = localtime(todo_due_time); - /* make a copy so it dosen't get over written */ - memcpy(&due_tm_time, temp_tm, sizeof(struct tm)); - - - temp_tm = localtime(¤t_time_val); - memcpy(¤t_time, temp_tm, sizeof(struct tm)); - - if(due_tm_time.tm_mon == current_time.tm_mon && - due_tm_time.tm_mday == current_time.tm_mday && - due_tm_time.tm_year == current_time.tm_year) { - return TODO_ITEM_DSTATUS_DUE_TODAY; - } - - if((*todo_due_time) < current_time_val) { - return TODO_ITEM_DSTATUS_OVERDUE; - } - - return TODO_ITEM_DSTATUS_NOT_DUE_YET; -} - - -enum todo_remaining_time_form { - TODO_ITEM_REMAINING_WEEKS, - TODO_ITEM_REMAINING_DAYS, - TODO_ITEM_REMAINING_HOURS, - TODO_ITEM_REMAINING_MINUTES, - TODO_ITEM_REMAINING_SECONDS -}; -typedef enum todo_remaining_time_form todo_remaining_time_form; - - -static void -insert_in_clist (GncalTodo *todo, iCalObject *ico) -{ - int i; - char *text[4]; - char time_remaining_buffer[100]; - time_t time_remain; - todo_remaining_time_form time_remaining_form; - int sec_in_week = 3600*7*24; - int sec_in_day = 3600*24; - int sec_in_hour = 3600; - int sec_in_minute = 60; - int weeks = 0; - int days = 0; - int hours = 0; - int minutes = 0; - int seconds = 0; - - - /* an array for the styles of items */ - static GtkStyle *dstatus_styles[TODO_ITEM_DSTATUS_LAST_DUE_STATUS]; - /* we want to remake the styles when the status is changed, - also we need to check for the null value in the pointer so we init them - at startup */ - if (todo_style_changed || !dstatus_styles[TODO_ITEM_DSTATUS_NOT_DUE_YET]) { - g_free(dstatus_styles[TODO_ITEM_DSTATUS_NOT_DUE_YET]); - g_free(dstatus_styles[TODO_ITEM_DSTATUS_OVERDUE]); - g_free(dstatus_styles[TODO_ITEM_DSTATUS_DUE_TODAY]); - - dstatus_styles[TODO_ITEM_DSTATUS_NOT_DUE_YET] = make_todo_style(todo, TODO_ITEM_DSTATUS_NOT_DUE_YET); - dstatus_styles[TODO_ITEM_DSTATUS_OVERDUE] = make_todo_style(todo, TODO_ITEM_DSTATUS_OVERDUE); - dstatus_styles[TODO_ITEM_DSTATUS_DUE_TODAY] = make_todo_style(todo, TODO_ITEM_DSTATUS_DUE_TODAY); - - todo_style_changed = 0; - } - - - - - - text[0] = ico->summary; - - if(todo_show_time_remaining) { - memset(time_remaining_buffer, 0, 100); - /* we need to make a string that represents the amount of time remaining - before this task is due */ - - /* for right now all I'll do is up to the hours. */ - time_remain = (ico->dtend - time(NULL)); - if(time_remain < 0) { - text[3] = "Overdue!"; - } - else { - - /* lets determine a decent denomination to display */ - if(time_remain / (sec_in_week)) - { - /* we have weeks available */ - time_remaining_form = TODO_ITEM_REMAINING_WEEKS; - weeks = time_remain / sec_in_week; - days = (time_remain % (sec_in_week))/sec_in_day; - } - else if(time_remain / (sec_in_day)) - { - /* we have days available */ - time_remaining_form = TODO_ITEM_REMAINING_DAYS; - days = time_remain / sec_in_day; - hours = (time_remain % sec_in_day)/sec_in_hour; - } - else if(time_remain / (sec_in_hour)) - { - /* we have hours available */ - time_remaining_form = TODO_ITEM_REMAINING_HOURS; - hours = time_remain /sec_in_hour; - minutes = (time_remain % sec_in_hour) / sec_in_minute; - } - else if(time_remain / sec_in_minute) - { - time_remaining_form = TODO_ITEM_REMAINING_MINUTES; - minutes = time_remain / sec_in_minute; - seconds = time_remain % sec_in_minute; - } - else - { - time_remaining_form = TODO_ITEM_REMAINING_SECONDS; - seconds = time_remain; - } - - switch(time_remaining_form) - { - case TODO_ITEM_REMAINING_WEEKS: - snprintf(time_remaining_buffer, 100, "%d %s %d %s", weeks, - (weeks > 1) ? _("Weeks") : _("Week"), - days, (days > 1) ? _("Days") : _("Day")); - break; - case TODO_ITEM_REMAINING_DAYS: - snprintf(time_remaining_buffer, 100, "%d %s %d %s", days, - (days > 1) ? _("Days") : _("Day"), - hours, (hours > 1) ? _("Hours") : _("Hour")); - break; - case TODO_ITEM_REMAINING_HOURS: - snprintf(time_remaining_buffer, 100, "%d %s %d %s", hours, - (hours > 1) ? _("Hours") : _("Hour"), - minutes, (minutes > 1) ? _("Minutes") : _("Minute")); - break; - case TODO_ITEM_REMAINING_MINUTES: - snprintf(time_remaining_buffer, 100, "%d %s %d %s", minutes, - (minutes > 1) ? _("Minutes") : _("Minute"), - seconds, (seconds > 1) ? _("Seconds") : _("Second")); - break; - case TODO_ITEM_REMAINING_SECONDS: - snprintf(time_remaining_buffer, 100, "%d %s", seconds, - (seconds > 1) ? _("Seconds") : _("Second")); - break; - } - text[3] = g_strdup(time_remaining_buffer); - todo->data_ptrs = g_slist_append(todo->data_ptrs, text[3]); - } - - } - else { - text[3] = "Loose penguini!"; - } - /* - * right now column 0 will be the summary - * and column 1 will be the due date. - * WISH: this should be able to be changed on the fly - */ - - if(ico->dtend && todo_show_due_date) - { - text[1] = convert_time_t_to_char (ico->dtend); - /* Append the data's pointer so later it can be properly freed */ - todo->data_ptrs = g_slist_append (todo->data_ptrs, text[1]); - } - else - text[1] = NULL; - - if(ico->priority && todo_show_priority) - { - text[2] = g_strdup_printf ("%d", ico->priority); - todo->data_ptrs = g_slist_append (todo->data_ptrs, text[2]); - } - else - text[2] = NULL; - - i = gtk_clist_append (todo->clist, text); - - gtk_clist_set_row_data_full (todo->clist, i, ico, - (GtkDestroyNotify) ical_object_unref); - ical_object_ref (ico); - - /* - * determine if the task is overdue.. - * if so mark with the apropriate style - */ - - switch(todo_item_due_status(&ico->dtend)) { - case TODO_ITEM_DSTATUS_NOT_DUE_YET: - if(todo_item_dstatus_highlight_not_due_yet) - { - gtk_clist_set_row_style(todo->clist, i, dstatus_styles[TODO_ITEM_DSTATUS_NOT_DUE_YET]); - } - break; - case TODO_ITEM_DSTATUS_DUE_TODAY: - if(todo_item_dstatus_highlight_due_today) - { - gtk_clist_set_row_style(todo->clist, i, dstatus_styles[TODO_ITEM_DSTATUS_DUE_TODAY]); - } - break; - case TODO_ITEM_DSTATUS_OVERDUE: - if(todo_item_dstatus_highlight_overdue) - { - gtk_clist_set_row_style(todo->clist, i, dstatus_styles[TODO_ITEM_DSTATUS_OVERDUE]); - } - break; - case TODO_ITEM_DSTATUS_LAST_DUE_STATUS: - } - - /* keep the list in order */ - gtk_clist_sort (todo->clist); -} - - -void -gncal_todo_update (GncalTodo *todo, iCalObject *ico, int flags) -{ - GSList *current_list; - - CalObjFindStatus st; - GList *l, *uids; - - g_return_if_fail (todo != NULL); - g_return_if_fail (GNCAL_IS_TODO (todo)); - - /* - * shut down the resize handler cause we are playing with the list. - * In otherwords turn off the event handler - */ - todo_list_redraw_in_progess =1; - - /* freeze the list */ - gtk_clist_freeze (todo->clist); - init_column_sorting (todo->clist); - - /* - * before here we have to free some of the memory that - * stores the due date, or else we have a memory leak. - * luckily all of the pointers are stored in todo->data_ptrs; - */ - - /* check on the columns that we should display */ - /* check for due date */ - - if(todo_show_due_date) { - gtk_clist_set_column_visibility (todo->clist, 1, 1); - } - else { - gtk_clist_set_column_visibility (todo->clist, 1, 0); - } - - if(todo_show_time_remaining) { - gtk_clist_set_column_visibility (todo->clist, 3, 1); - } - else { - gtk_clist_set_column_visibility (todo->clist, 3, 0); - } - - - if(todo_show_priority) - gtk_clist_set_column_visibility (todo->clist, 2, 1); - else - gtk_clist_set_column_visibility (todo->clist, 2, 0); - - /* free the memory locations that were used in the previous display */ - for (current_list = todo->data_ptrs; - current_list != NULL; - current_list = g_slist_next(current_list)){ - g_free(current_list->data); - } - - /* free the list and clear out the pointer */ - g_slist_free(todo->data_ptrs); - todo->data_ptrs = NULL; - - gtk_clist_clear (todo->clist); - - - uids = cal_client_get_uids (todo->calendar->client, - CALOBJ_TYPE_TODO); - for (l = uids; l; l = l->next){ - char *uid = l->data; - char *obj_string = - cal_client_get_object (todo->calendar->client, uid); - iCalObject *obj = NULL; - - st = ical_object_find_in_string (uid, obj_string, &obj); - g_free (obj_string); - - insert_in_clist (todo, obj); - ical_object_unref (obj); - g_free (uid); - } - g_list_free (uids); - - /* if we are autoresizing then do it now */ - if(todo_list_autoresize && todo->clist->rows != 0) - gtk_clist_columns_autosize (todo->clist); - - gtk_clist_thaw (todo->clist); - - gtk_widget_set_sensitive (todo->edit_button, - (todo->clist->selection != NULL)); - gtk_widget_set_sensitive (todo->delete_button, - (todo->clist->selection != NULL)); - todo_list_redraw_in_progess = 0; -} - - - - - - - - diff --git a/calendar/gui/gncal-todo.h b/calendar/gui/gncal-todo.h deleted file mode 100644 index 51cfadea3f..0000000000 --- a/calendar/gui/gncal-todo.h +++ /dev/null @@ -1,55 +0,0 @@ -/* To-do widget for gncal - * - * Copyright (C) 1998 The Free Software Foundation - * - * Author: Federico Mena - */ - -#ifndef GNCAL_TODO_H -#define GNCAL_TODO_H - -#include -#include -#include -#include "gnome-cal.h" - - -BEGIN_GNOME_DECLS - - -#define GNCAL_TODO(obj) GTK_CHECK_CAST (obj, gncal_todo_get_type (), GncalTodo) -#define GNCAL_TODO_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gncal_todo_get_type (), GncalTodoClass) -#define GNCAL_IS_TODO(obj) GTK_CHECK_TYPE (obj, gncal_todo_get_type ()) - - -typedef struct _GncalTodo GncalTodo; -typedef struct _GncalTodoClass GncalTodoClass; - -struct _GncalTodo { - GtkVBox vbox; - - GnomeCalendar *calendar; /* the calendar we are associated to */ - - GtkCList *clist; - - GtkWidget *edit_button; - GtkWidget *delete_button; - GSList *data_ptrs; - - -}; - -struct _GncalTodoClass { - GtkVBoxClass parent_class; -}; - - -guint gncal_todo_get_type (void); -GtkWidget *gncal_todo_new (GnomeCalendar *calendar); - -void gncal_todo_update (GncalTodo *todo, iCalObject *ico, int flags); - - -END_GNOME_DECLS - -#endif diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c deleted file mode 100644 index a38b1ca1cb..0000000000 --- a/calendar/gui/gnome-cal.c +++ /dev/null @@ -1,1406 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * GnomeCalendar widget - * Copyright (C) 1998 the Free Software Foundation - * - * Author: Miguel de Icaza (miguel@kernel.org) - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "dialogs/alarm-notify-dialog.h" -#include "alarm.h" -#include "e-day-view.h" -#include "e-week-view.h" -#include "eventedit.h" -#include "gncal-todo.h" -#include "gnome-cal.h" -#include "calendar-commands.h" - - - -/* An entry in the UID->alarms hash table. The UID key *is* the uid field in - * this structure, so don't free it separately. - */ -typedef struct { - char *uid; - GList *alarm_ids; -} ObjectAlarms; - - - -static void gnome_calendar_class_init (GnomeCalendarClass *class); -static void gnome_calendar_init (GnomeCalendar *gcal); -static void gnome_calendar_destroy (GtkObject *object); - -static void gnome_calendar_update_view_times (GnomeCalendar *gcal, - GtkWidget *page); -static void gnome_calendar_update_gtk_calendar (GnomeCalendar *gcal); -static void gnome_calendar_on_day_selected (GtkCalendar *calendar, - GnomeCalendar *gcal); -static void gnome_calendar_on_month_changed (GtkCalendar *calendar, - GnomeCalendar *gcal); - -static GtkVBoxClass *parent_class; - -static void setup_alarm (GnomeCalendar *cal, CalAlarmInstance *ai); - - - -guint -gnome_calendar_get_type (void) -{ - static guint gnome_calendar_type = 0; - if(!gnome_calendar_type) { - GtkTypeInfo gnome_calendar_info = { - "GnomeCalendar", - sizeof (GnomeCalendar), - sizeof (GnomeCalendarClass), - (GtkClassInitFunc) gnome_calendar_class_init, - (GtkObjectInitFunc) gnome_calendar_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL, - }; - /* - gnome_calendar_type = gtk_type_unique(gnome_app_get_type(), &gnome_calendar_info); - parent_class = gtk_type_class (gnome_app_get_type()); - */ - gnome_calendar_type = gtk_type_unique (gtk_vbox_get_type (), - &gnome_calendar_info); - parent_class = gtk_type_class (gtk_vbox_get_type ()); - } - return gnome_calendar_type; -} - -/* Class initialization function for the gnome calendar */ -static void -gnome_calendar_class_init (GnomeCalendarClass *class) -{ - GtkObjectClass *object_class; - - object_class = (GtkObjectClass *) class; - - object_class->destroy = gnome_calendar_destroy; -} - -/* Object initialization function for the gnome calendar */ -static void -gnome_calendar_init (GnomeCalendar *gcal) -{ - gcal->alarms = g_hash_table_new (g_str_hash, g_str_equal); -} - -/* Used from g_hash_table_foreach(); frees an object alarms entry */ -static void -free_object_alarms (gpointer key, gpointer value, gpointer data) -{ - ObjectAlarms *oa; - - oa = value; - - g_assert (oa->uid != NULL); - g_free (oa->uid); - oa->uid = NULL; - - g_assert (oa->alarm_ids != NULL); - g_list_free (oa->alarm_ids); - oa->alarm_ids = NULL; - - g_free (oa); -} - -static void -gnome_calendar_destroy (GtkObject *object) -{ - GnomeCalendar *gcal; - - g_return_if_fail (object != NULL); - g_return_if_fail (GNOME_IS_CALENDAR (object)); - - gcal = GNOME_CALENDAR (object); - - gtk_object_unref (GTK_OBJECT (gcal->client)); - - g_hash_table_foreach (gcal->alarms, free_object_alarms, NULL); - g_hash_table_destroy (gcal->alarms); - gcal->alarms = NULL; - - if (GTK_OBJECT_CLASS (parent_class)->destroy) - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); -} - - -static void -setup_widgets (GnomeCalendar *gcal) -{ - GtkWidget *vpane, *w; - - /* The Main Notebook. */ - gcal->main_notebook = gtk_notebook_new (); - gtk_notebook_set_show_border (GTK_NOTEBOOK (gcal->main_notebook), - FALSE); - gtk_notebook_set_show_tabs (GTK_NOTEBOOK (gcal->main_notebook), FALSE); - gtk_widget_show (gcal->main_notebook); - gtk_box_pack_start (GTK_BOX (gcal), gcal->main_notebook, - TRUE, TRUE, 0); - - /* The First Page of the Main Notebook, containing a HPaned with the - Sub-Notebook on the left and the GtkCalendar and ToDo list on the - right. */ - gcal->hpane = e_hpaned_new (); - gtk_widget_show (gcal->hpane); - gtk_notebook_append_page (GTK_NOTEBOOK (gcal->main_notebook), - gcal->hpane, gtk_label_new ("")); - - /* The Sub-Notebook, to contain the Day, Work-Week & Week views. */ - gcal->sub_notebook = gtk_notebook_new (); - gtk_notebook_set_show_border (GTK_NOTEBOOK (gcal->sub_notebook), - FALSE); - gtk_notebook_set_show_tabs (GTK_NOTEBOOK (gcal->sub_notebook), FALSE); - gtk_widget_show (gcal->sub_notebook); - e_paned_pack1 (E_PANED (gcal->hpane), gcal->sub_notebook, - TRUE, TRUE); - - /* The VPaned widget, to contain the GtkCalendar & ToDo list. */ - vpane = e_vpaned_new (); - gtk_widget_show (vpane); - e_paned_pack2 (E_PANED (gcal->hpane), vpane, FALSE, TRUE); - - /* The GtkCalendar. */ - w = gtk_calendar_new (); - gcal->gtk_calendar = GTK_CALENDAR (w); - gtk_widget_show (w); - e_paned_pack1 (E_PANED (vpane), w, FALSE, TRUE); - gcal->day_selected_id = gtk_signal_connect (GTK_OBJECT (gcal->gtk_calendar), - "day_selected", - (GtkSignalFunc) gnome_calendar_on_day_selected, - gcal); - gtk_signal_connect (GTK_OBJECT (gcal->gtk_calendar), "month_changed", - GTK_SIGNAL_FUNC (gnome_calendar_on_month_changed), - gcal); - - /* The ToDo list. */ - gcal->todo = gncal_todo_new (gcal); - e_paned_pack2 (E_PANED (vpane), gcal->todo, TRUE, TRUE); - gtk_widget_show (gcal->todo); - - - /* The Day View. */ - gcal->day_view = e_day_view_new (); - e_day_view_set_calendar (E_DAY_VIEW (gcal->day_view), gcal); - gtk_widget_show (gcal->day_view); - gtk_notebook_append_page (GTK_NOTEBOOK (gcal->sub_notebook), - gcal->day_view, gtk_label_new ("")); - - /* The Work Week View. */ - gcal->work_week_view = e_day_view_new (); - e_day_view_set_days_shown (E_DAY_VIEW (gcal->work_week_view), 5); - e_day_view_set_calendar (E_DAY_VIEW (gcal->work_week_view), gcal); - gtk_widget_show (gcal->work_week_view); - gtk_notebook_append_page (GTK_NOTEBOOK (gcal->sub_notebook), - gcal->work_week_view, gtk_label_new ("")); - - /* The Week View. */ - gcal->week_view = e_week_view_new (); - e_week_view_set_calendar (E_WEEK_VIEW (gcal->week_view), gcal); - gtk_widget_show (gcal->week_view); - gtk_notebook_append_page (GTK_NOTEBOOK (gcal->sub_notebook), - gcal->week_view, gtk_label_new ("")); - - /* The Month View. */ - gcal->month_view = e_week_view_new (); - e_week_view_set_calendar (E_WEEK_VIEW (gcal->month_view), gcal); - e_week_view_set_display_month (E_WEEK_VIEW (gcal->month_view), TRUE); - gtk_widget_show (gcal->month_view); - gtk_notebook_append_page (GTK_NOTEBOOK (gcal->main_notebook), - gcal->month_view, gtk_label_new ("")); -} - -static GtkWidget * -get_current_page (GnomeCalendar *gcal) -{ - GtkWidget *page; - - page = GTK_NOTEBOOK (gcal->main_notebook)->cur_page->child; - if (page == gcal->hpane) - return GTK_NOTEBOOK (gcal->sub_notebook)->cur_page->child; - else - return page; -} - -char * -gnome_calendar_get_current_view_name (GnomeCalendar *gcal) -{ - GtkWidget *page; - - g_return_val_if_fail (gcal != NULL, "dayview"); - g_return_val_if_fail (GNOME_IS_CALENDAR (gcal), "dayview"); - - page = get_current_page (gcal); - - if (page == gcal->day_view) - return "dayview"; - else if (page == gcal->work_week_view) - return "workweekview"; - else if (page == gcal->week_view) - return "weekview"; - else if (page == gcal->month_view) - return "monthview"; - else - return "dayview"; -} - -void -gnome_calendar_goto (GnomeCalendar *gcal, time_t new_time) -{ - g_return_if_fail (gcal != NULL); - g_return_if_fail (GNOME_IS_CALENDAR (gcal)); - g_return_if_fail (new_time != -1); - - gcal->selection_start_time = time_day_begin (new_time); - gcal->selection_end_time = time_add_day (gcal->selection_start_time, - 1); - gnome_calendar_update_view_times (gcal, NULL); - gnome_calendar_update_gtk_calendar (gcal); -} - - -static void -gnome_calendar_update_view_times (GnomeCalendar *gcal, - GtkWidget *page) -{ - if (page == NULL) - page = get_current_page (gcal); - - if (page == gcal->day_view - || page == gcal->work_week_view) - e_day_view_set_selected_time_range (E_DAY_VIEW (page), - gcal->selection_start_time, - gcal->selection_end_time); - else if (page == gcal->week_view - || page == gcal->month_view) - e_week_view_set_selected_time_range (E_WEEK_VIEW (page), - gcal->selection_start_time, - gcal->selection_end_time); - else { - g_warning ("My penguin is gone!"); - g_assert_not_reached (); - } -} - -static void -gnome_calendar_direction (GnomeCalendar *gcal, int direction) -{ - GtkWidget *cp = get_current_page (gcal); - time_t current_time, new_time; - - current_time = gcal->selection_start_time; - - if (cp == gcal->day_view) - new_time = time_add_day (current_time, direction); - else if (cp == gcal->work_week_view) - new_time = time_add_week (current_time, direction); - else if (cp == gcal->week_view) - new_time = time_add_week (current_time, direction); - else if (cp == gcal->month_view) - new_time = time_add_month (current_time, direction); - else { - g_warning ("Weee! Where did the penguin go?"); - g_assert_not_reached (); - new_time = 0; - } - - gnome_calendar_goto (gcal, new_time); -} - -void -gnome_calendar_next (GnomeCalendar *gcal) -{ - g_return_if_fail (gcal != NULL); - g_return_if_fail (GNOME_IS_CALENDAR (gcal)); - - gnome_calendar_direction (gcal, 1); -} - -void -gnome_calendar_previous (GnomeCalendar *gcal) -{ - g_return_if_fail (gcal != NULL); - g_return_if_fail (GNOME_IS_CALENDAR (gcal)); - - gnome_calendar_direction (gcal, -1); -} - -void -gnome_calendar_dayjump (GnomeCalendar *gcal, time_t time) -{ - g_return_if_fail (gcal != NULL); - g_return_if_fail (GNOME_IS_CALENDAR (gcal)); - - gnome_calendar_set_view (gcal, "dayview"); - gnome_calendar_goto (gcal, time); -} - -void -gnome_calendar_goto_today (GnomeCalendar *gcal) -{ - g_return_if_fail (gcal != NULL); - g_return_if_fail (GNOME_IS_CALENDAR (gcal)); - - gnome_calendar_goto (gcal, time (NULL)); -} - - -/* This sets which view is currently shown. It also updates the selection time - of the view so it shows the appropriate days. */ -void -gnome_calendar_set_view (GnomeCalendar *gcal, char *page_name) -{ - GtkWidget *page; - int main_page = 0, sub_page = -1; - - g_return_if_fail (gcal != NULL); - g_return_if_fail (GNOME_IS_CALENDAR (gcal)); - g_return_if_fail (page_name != NULL); - - if (strcmp (page_name, "dayview") == 0) { - page = gcal->day_view; - sub_page = 0; - } else if (strcmp (page_name, "workweekview") == 0) { - page = gcal->work_week_view; - sub_page = 1; - } else if (strcmp (page_name, "weekview") == 0) { - page = gcal->week_view; - sub_page = 2; - } else if (strcmp (page_name, "monthview") == 0) { - page = gcal->month_view; - main_page = 1; - } else { - g_warning ("Unknown calendar view: %s", page_name); - return; - } - - gnome_calendar_update_view_times (gcal, page); - - if (sub_page != -1) - gtk_notebook_set_page (GTK_NOTEBOOK (gcal->sub_notebook), - sub_page); - gtk_notebook_set_page (GTK_NOTEBOOK (gcal->main_notebook), main_page); - - gnome_calendar_update_gtk_calendar (gcal); -} - -/* Sends a mail notification of an alarm trigger */ -static void -mail_notification (char *mail_address, char *text, time_t app_time) -{ - pid_t pid; - int p [2]; - char *command; - - pipe (p); - pid = fork (); - if (pid == 0){ - int dev_null; - - dev_null = open ("/dev/null", O_RDWR); - dup2 (p [0], 0); - dup2 (dev_null, 1); - dup2 (dev_null, 2); - execl ("/usr/lib/sendmail", "/usr/lib/sendmail", - mail_address, NULL); - _exit (127); - } - command = g_strconcat ("To: ", mail_address, "\n", - "Subject: ", _("Reminder of your appointment at "), - ctime (&app_time), "\n\n", text, "\n", NULL); - write (p [1], command, strlen (command)); - close (p [1]); - close (p [0]); - g_free (command); -} - -static int -max_open_files (void) -{ - static int files; - - if (files) - return files; - - files = sysconf (_SC_OPEN_MAX); - if (files != -1) - return files; -#ifdef OPEN_MAX - return files = OPEN_MAX; -#else - return files = 256; -#endif -} - -/* Executes a program as a notification of an alarm trigger */ -static void -program_notification (char *command, int close_standard) -{ - struct sigaction ignore, save_intr, save_quit; - int status = 0, i; - pid_t pid; - - ignore.sa_handler = SIG_IGN; - sigemptyset (&ignore.sa_mask); - ignore.sa_flags = 0; - - sigaction (SIGINT, &ignore, &save_intr); - sigaction (SIGQUIT, &ignore, &save_quit); - - if ((pid = fork ()) < 0){ - fprintf (stderr, "\n\nfork () = -1\n"); - return; - } - if (pid == 0){ - pid = fork (); - if (pid == 0){ - const int top = max_open_files (); - sigaction (SIGINT, &save_intr, NULL); - sigaction (SIGQUIT, &save_quit, NULL); - - for (i = (close_standard ? 0 : 3); i < top; i++) - close (i); - - /* FIXME: As an excercise to the reader, copy the - * code from mc to setup shell properly instead of - * /bin/sh. Yes, this comment is larger than a cut and paste. - */ - execl ("/bin/sh", "/bin/sh", "-c", command, (char *) 0); - - _exit (127); - } else { - _exit (127); - } - } - wait (&status); - sigaction (SIGINT, &save_intr, NULL); - sigaction (SIGQUIT, &save_quit, NULL); -} - -/* Queues a snooze alarm */ -static void -snooze (GnomeCalendar *gcal, iCalObject *ico, time_t occur, int snooze_mins, gboolean audio) -{ - time_t now, trigger; - struct tm tm; - CalAlarmInstance ai; - - now = time (NULL); - tm = *localtime (&now); - tm.tm_min += snooze_mins; - - trigger = mktime (&tm); - if (trigger == -1) { - g_message ("snooze(): produced invalid time_t; not queueing alarm!"); - return; - } - - ai.uid = ico->uid; - ai.type = audio ? ALARM_AUDIO : ALARM_DISPLAY; - ai.trigger = trigger; - ai.occur = occur; - - setup_alarm (gcal, &ai); -} - -/* Edits an appointment from the alarm notification dialog */ -static void -edit (GnomeCalendar *gcal, iCalObject *ico) -{ - iCalObject *new_ico; - GtkWidget *event_editor; - - /* We must duplicate the iCalObject, since the event editor will change - * the fields. - */ - new_ico = ical_object_duplicate (ico); - - event_editor = event_editor_new (gcal, new_ico); - gtk_widget_show (event_editor); -} - -struct alarm_notify_closure { - GnomeCalendar *gcal; - iCalObject *ico; - time_t occur; -}; - -/* Callback used for the result of the alarm notification dialog */ -static void -display_notification_cb (AlarmNotifyResult result, int snooze_mins, gpointer data) -{ - struct alarm_notify_closure *c; - - c = data; - - switch (result) { - case ALARM_NOTIFY_CLOSE: - break; - - case ALARM_NOTIFY_SNOOZE: - snooze (c->gcal, c->ico, c->occur, snooze_mins, FALSE); - break; - - case ALARM_NOTIFY_EDIT: - edit (c->gcal, c->ico); - break; - - default: - g_assert_not_reached (); - } - - ical_object_unref (c->ico); - g_free (c); -} - -/* Present a display notification of an alarm trigger */ -static void -display_notification (time_t trigger, time_t occur, iCalObject *ico, GnomeCalendar *gcal) -{ - gboolean result; - struct alarm_notify_closure *c; - - ical_object_ref (ico); - - c = g_new (struct alarm_notify_closure, 1); - c->gcal = gcal; - c->ico = ico; - c->occur = occur; - - result = alarm_notify_dialog (trigger, occur, ico, display_notification_cb, c); - if (!result) { - g_message ("display_notification(): could not display the alarm notification dialog"); - g_free (c); - ical_object_unref (ico); - } -} - -/* Present an audible notification of an alarm trigger */ -static void -audio_notification (time_t trigger, time_t occur, iCalObject *ico, GnomeCalendar *gcal) -{ - g_message ("AUDIO NOTIFICATION!"); - /* FIXME */ -} - -struct trigger_alarm_closure { - GnomeCalendar *gcal; - char *uid; - enum AlarmType type; - time_t occur; -}; - -/* Callback function used when an alarm is triggered */ -static void -trigger_alarm_cb (gpointer alarm_id, time_t trigger, gpointer data) -{ - struct trigger_alarm_closure *c; - char *str_ico; - iCalObject *ico; - CalObjFindStatus status; - ObjectAlarms *oa; - GList *l; - - c = data; - - /* Fetch the object */ - - str_ico = cal_client_get_object (c->gcal->client, c->uid); - if (!str_ico) { - g_message ("trigger_alarm_cb(): could not fetch object `%s'", c->uid); - return; - } - - status = ical_object_find_in_string (c->uid, str_ico, &ico); - g_free (str_ico); - - switch (status) { - case CAL_OBJ_FIND_SUCCESS: - /* Go on */ - break; - - case CAL_OBJ_FIND_SYNTAX_ERROR: - g_message ("trigger_alarm_cb(): syntax error in fetched object"); - return; - - case CAL_OBJ_FIND_NOT_FOUND: - g_message ("trigger_alarm_cb(): could not find fetched object"); - return; - } - - g_assert (ico != NULL); - - /* Present notification */ - - switch (c->type) { - case ALARM_MAIL: - g_assert (ico->malarm.enabled); - mail_notification (ico->malarm.data, ico->summary, c->occur); - break; - - case ALARM_PROGRAM: - g_assert (ico->palarm.enabled); - program_notification (ico->palarm.data, FALSE); - break; - - case ALARM_DISPLAY: - g_assert (ico->dalarm.enabled); - display_notification (trigger, c->occur, ico, c->gcal); - break; - - case ALARM_AUDIO: - g_assert (ico->aalarm.enabled); - audio_notification (trigger, c->occur, ico, c->gcal); - break; - } - - /* Remove the alarm from the hash table */ - - oa = g_hash_table_lookup (c->gcal->alarms, ico->uid); - g_assert (oa != NULL); - - l = g_list_find (oa->alarm_ids, alarm_id); - g_assert (l != NULL); - - oa->alarm_ids = g_list_remove_link (oa->alarm_ids, l); - g_list_free_1 (l); - - if (!oa->alarm_ids) { - g_hash_table_remove (c->gcal->alarms, ico->uid); - g_free (oa->uid); - g_free (oa); - } - - ical_object_unref (ico); -} - -/* Frees a struct trigger_alarm_closure */ -static void -free_trigger_alarm_closure (gpointer data) -{ - struct trigger_alarm_closure *c; - - c = data; - g_free (c->uid); - g_free (c); -} - -/* Queues the specified alarm */ -static void -setup_alarm (GnomeCalendar *cal, CalAlarmInstance *ai) -{ - struct trigger_alarm_closure *c; - gpointer alarm; - ObjectAlarms *oa; - - c = g_new (struct trigger_alarm_closure, 1); - c->gcal = cal; - c->uid = g_strdup (ai->uid); - c->type = ai->type; - c->occur = ai->occur; - - alarm = alarm_add (ai->trigger, trigger_alarm_cb, c, free_trigger_alarm_closure); - if (!alarm) { - g_message ("setup_alarm(): Could not set up alarm"); - g_free (c->uid); - g_free (c); - return; - } - - oa = g_hash_table_lookup (cal->alarms, ai->uid); - if (oa) - oa->alarm_ids = g_list_prepend (oa->alarm_ids, alarm); - else { - oa = g_new (ObjectAlarms, 1); - oa->uid = g_strdup (ai->uid); - oa->alarm_ids = g_list_prepend (NULL, alarm); - - g_hash_table_insert (cal->alarms, oa->uid, oa); - } -} - -static void load_alarms (GnomeCalendar *cal); - -/* Called nightly to refresh the day's alarms */ -static void -midnight_refresh_cb (gpointer alarm_id, time_t trigger, gpointer data) -{ - GnomeCalendar *cal; - - cal = GNOME_CALENDAR (data); - cal->midnight_alarm_refresh_id = NULL; - - load_alarms (cal); -} - -/* Loads and queues the alarms from the current time up to midnight. */ -static void -load_alarms (GnomeCalendar *gcal) -{ - time_t now; - time_t end_of_day; - GList *alarms, *l; - - now = time (NULL); - end_of_day = time_day_end (now); - - /* Queue alarms */ - - alarms = cal_client_get_alarms_in_range (gcal->client, now, end_of_day); - - for (l = alarms; l; l = l->next) - setup_alarm (gcal, l->data); - - cal_alarm_instance_list_free (alarms); - - /* Queue the midnight alarm refresh */ - - gcal->midnight_alarm_refresh_id = alarm_add (end_of_day, midnight_refresh_cb, gcal, NULL); - if (!gcal->midnight_alarm_refresh_id) { - g_message ("load_alarms(): Could not set up the midnight refresh alarm!"); - /* FIXME: what to do? */ - } -} - -/* This tells all components to reload all calendar objects. */ -static void -gnome_calendar_update_all (GnomeCalendar *cal) -{ - load_alarms (cal); - - e_day_view_update_all_events (E_DAY_VIEW (cal->day_view)); - e_day_view_update_all_events (E_DAY_VIEW (cal->work_week_view)); - e_week_view_update_all_events (E_WEEK_VIEW (cal->week_view)); - e_week_view_update_all_events (E_WEEK_VIEW (cal->month_view)); - - gncal_todo_update (GNCAL_TODO (cal->todo), NULL, TRUE); - gnome_calendar_tag_calendar (cal, cal->gtk_calendar); -} - -/* Removes any queued alarms for the specified UID */ -static void -remove_alarms_for_object (GnomeCalendar *gcal, const char *uid) -{ - ObjectAlarms *oa; - GList *l; - - oa = g_hash_table_lookup (gcal->alarms, uid); - if (!oa) - return; - - for (l = oa->alarm_ids; l; l = l->next) { - gpointer alarm_id; - - alarm_id = l->data; - alarm_remove (alarm_id); - } - - g_hash_table_remove (gcal->alarms, uid); - - g_free (oa->uid); - g_list_free (oa->alarm_ids); - g_free (oa); -} - -/* Adds today's alarms for the specified object */ -static void -add_alarms_for_object (GnomeCalendar *gcal, const char *uid) -{ - GList *alarms; - gboolean result; - time_t now, end_of_day; - GList *l; - - now = time (NULL); - end_of_day = time_day_end (now); - - result = cal_client_get_alarms_for_object (gcal->client, uid, now, end_of_day, &alarms); - if (!result) { - /* FIXME: should we warn here, or is it OK if the object - * disappeared in the meantime? - */ - return; - } - - for (l = alarms; l; l = l->next) - setup_alarm (gcal, l->data); - - cal_alarm_instance_list_free (alarms); -} - -static void -gnome_calendar_object_updated_cb (GtkWidget *cal_client, - const char *uid, - GnomeCalendar *gcal) -{ - g_message ("gnome-cal: got object changed_cb, uid='%s'", - uid?uid:""); - - remove_alarms_for_object (gcal, uid); - add_alarms_for_object (gcal, uid); - - /* FIXME: do we really want each view to reload the event itself? - Maybe we should keep track of events globally, maybe with ref - counts. We also need to sort out where they get freed. */ - e_day_view_update_event (E_DAY_VIEW (gcal->day_view), uid); - e_day_view_update_event (E_DAY_VIEW (gcal->work_week_view), uid); - e_week_view_update_event (E_WEEK_VIEW (gcal->week_view), uid); - e_week_view_update_event (E_WEEK_VIEW (gcal->month_view), uid); - - gncal_todo_update (GNCAL_TODO (gcal->todo), NULL, TRUE); - gnome_calendar_tag_calendar (gcal, gcal->gtk_calendar); -} - - -static void -gnome_calendar_object_removed_cb (GtkWidget *cal_client, - const char *uid, - GnomeCalendar *gcal) -{ - g_message ("gnome-cal: got object removed _cb, uid='%s'", - uid?uid:""); - - remove_alarms_for_object (gcal, uid); - - e_day_view_remove_event (E_DAY_VIEW (gcal->day_view), uid); - e_day_view_remove_event (E_DAY_VIEW (gcal->work_week_view), uid); - e_week_view_remove_event (E_WEEK_VIEW (gcal->week_view), uid); - e_week_view_remove_event (E_WEEK_VIEW (gcal->month_view), uid); - - gncal_todo_update (GNCAL_TODO (gcal->todo), NULL, CHANGE_ALL); - gnome_calendar_tag_calendar (gcal, gcal->gtk_calendar); -} - - -GtkWidget * -gnome_calendar_new (char *title) -{ - GtkWidget *retval; - GnomeCalendar *gcal; - - retval = gtk_type_new (gnome_calendar_get_type ()); - - gcal = GNOME_CALENDAR (retval); - - gcal->selection_start_time = time_day_begin (time (NULL)); - gcal->selection_end_time = time_add_day (gcal->selection_start_time, 1); - gcal->client = cal_client_new (); - - setup_widgets (gcal); - - gnome_calendar_set_view (gcal, "dayview"); - - gtk_signal_connect (GTK_OBJECT (gcal->client), "obj_updated", - gnome_calendar_object_updated_cb, gcal); - gtk_signal_connect (GTK_OBJECT (gcal->client), "obj_removed", - gnome_calendar_object_removed_cb, gcal); - - return retval; -} - -typedef struct -{ - GnomeCalendar *gcal; - char *uri; - GnomeCalendarOpenMode gcom; - guint signal_handle; -} load_or_create_data; - - -static void -gnome_calendar_load_cb (GtkWidget *cal_client, - CalClientLoadStatus status, - load_or_create_data *locd) -{ - g_return_if_fail (locd); - g_return_if_fail (GNOME_IS_CALENDAR (locd->gcal)); - - switch (status) { - case CAL_CLIENT_LOAD_SUCCESS: - gnome_calendar_update_all (locd->gcal); - g_message ("gnome_calendar_load_cb: success"); - break; - - case CAL_CLIENT_LOAD_ERROR: - g_message ("gnome_calendar_load_cb: load error"); - if (locd->gcom == CALENDAR_OPEN_OR_CREATE) { - g_message ("gnome_calendar_load_cb: trying create..."); - /* FIXME: connect to the cal_loaded signal of the - * CalClient and get theasynchronous notification - * properly! */ - /*gtk_signal_connect (GTK_OBJECT (gcal->client), - "cal_loaded", - gnome_calendar_create_cb, gcal);*/ - - gtk_signal_disconnect (GTK_OBJECT (locd->gcal->client), - locd->signal_handle); - - cal_client_create_calendar (locd->gcal->client, - locd->uri); - gnome_calendar_update_all (locd->gcal); - } - break; - - case CAL_CLIENT_LOAD_IN_USE: - /* FIXME: what to do? */ - g_message ("gnome_calendar_load_cb: in use"); - break; - - case CAL_CLIENT_LOAD_METHOD_NOT_SUPPORTED: - /* FIXME: what to do? */ - g_message ("gnome_calendar_load_cb(): method not supported"); - break; - - default: - g_message ("gnome_calendar_load_cb(): unhandled result code %d!", (int) status); - g_assert_not_reached (); - } - - g_free (locd->uri); - g_free (locd); -} - - -int -gnome_calendar_open (GnomeCalendar *gcal, - char *file, - GnomeCalendarOpenMode gcom) -{ - load_or_create_data *locd; - - g_return_val_if_fail (gcal != NULL, 0); - g_return_val_if_fail (GNOME_IS_CALENDAR (gcal), 0); - g_return_val_if_fail (file != NULL, 0); - - locd = g_new0 (load_or_create_data, 1); - locd->gcal = gcal; - locd->uri = g_strdup (file); - locd->gcom = gcom; - - locd->signal_handle = gtk_signal_connect (GTK_OBJECT (gcal->client), - "cal_loaded", - gnome_calendar_load_cb, - locd); - - if (cal_client_load_calendar (gcal->client, file) == FALSE){ - g_message ("Error loading calendar: %s", file); - return 0; - } - - return 1; -} - - -void -gnome_calendar_add_object (GnomeCalendar *gcal, iCalObject *obj) -{ - char *obj_string; - g_return_if_fail (gcal != NULL); - g_return_if_fail (GNOME_IS_CALENDAR (gcal)); - g_return_if_fail (obj != NULL); - - obj_string = ical_object_to_string (obj); - cal_client_update_object (gcal->client, obj->uid, obj_string); - g_free (obj_string); -} - -void -gnome_calendar_remove_object (GnomeCalendar *gcal, iCalObject *obj) -{ - gboolean r; - - g_return_if_fail (gcal != NULL); - g_return_if_fail (GNOME_IS_CALENDAR (gcal)); - g_return_if_fail (obj != NULL); - - r = cal_client_remove_object (gcal->client, obj->uid); -} - -void -gnome_calendar_object_changed (GnomeCalendar *gcal, iCalObject *obj, int flags) -{ - char *obj_string; - g_return_if_fail (gcal != NULL); - g_return_if_fail (GNOME_IS_CALENDAR (gcal)); - g_return_if_fail (obj != NULL); - - obj_string = ical_object_to_string (obj); - cal_client_update_object (gcal->client, obj->uid, obj_string); - g_free (obj_string); -} - -static void -stop_beeping (GtkObject* object, gpointer data) -{ - guint timer_tag, beep_tag; - timer_tag = GPOINTER_TO_INT (gtk_object_get_data (object, "timer_tag")); - beep_tag = GPOINTER_TO_INT (gtk_object_get_data (object, "beep_tag")); - - if (beep_tag > 0) { - gtk_timeout_remove (beep_tag); - gtk_object_set_data (object, "beep_tag", GINT_TO_POINTER (0)); - } - if (timer_tag > 0) { - gtk_timeout_remove (timer_tag); - gtk_object_set_data (object, "timer_tag", GINT_TO_POINTER (0)); - } -} - -static gint -start_beeping (gpointer data) -{ - gdk_beep (); - - return TRUE; -} - -static gint -timeout_beep (gpointer data) -{ - stop_beeping (data, NULL); - return FALSE; -} - -#if 0 - -void -calendar_notify (time_t activation_time, CalendarAlarm *which, void *data) -{ - iCalObject *ico = data; - guint beep_tag, timer_tag; - int ret; - gchar* snooze_button = (enable_snooze ? _("Snooze") : NULL); - time_t now, diff; - - if (&ico->aalarm == which){ - time_t app = ico->aalarm.trigger + ico->aalarm.offset; - GtkWidget *w; - char *msg; - - msg = g_strconcat (_("Reminder of your appointment at "), - ctime (&app), "`", - ico->summary, "'", NULL); - - /* Idea: we need Snooze option :-) */ - w = gnome_message_box_new (msg, GNOME_MESSAGE_BOX_INFO, _("Ok"), snooze_button, NULL); - beep_tag = gtk_timeout_add (1000, start_beeping, NULL); - if (enable_aalarm_timeout) - timer_tag = gtk_timeout_add (audio_alarm_timeout*1000, - timeout_beep, w); - else - timer_tag = 0; - gtk_object_set_data (GTK_OBJECT (w), "timer_tag", - GINT_TO_POINTER (timer_tag)); - gtk_object_set_data (GTK_OBJECT (w), "beep_tag", - GINT_TO_POINTER (beep_tag)); - gtk_widget_ref (w); - gtk_window_set_modal (GTK_WINDOW (w), FALSE); - ret = gnome_dialog_run (GNOME_DIALOG (w)); - switch (ret) { - case 1: - stop_beeping (GTK_OBJECT (w), NULL); - now = time (NULL); - diff = now - which->trigger; - which->trigger = which->trigger + diff + snooze_secs; - which->offset = which->offset - diff - snooze_secs; - alarm_add (which, &calendar_notify, data); - break; - default: - stop_beeping (GTK_OBJECT (w), NULL); - break; - } - - gtk_widget_unref (w); - return; - } - - if (&ico->palarm == which){ - execute (ico->palarm.data, 0); - return; - } - - if (&ico->malarm == which){ - time_t app = ico->malarm.trigger + ico->malarm.offset; - - mail_notify (ico->malarm.data, ico->summary, app); - return; - } - - if (&ico->dalarm == which){ - time_t app = ico->dalarm.trigger + ico->dalarm.offset; - GtkWidget *w; - char *msg; - - if (beep_on_display) - gdk_beep (); - msg = g_strconcat (_("Reminder of your appointment at "), - ctime (&app), "`", - ico->summary, "'", NULL); - w = gnome_message_box_new (msg, GNOME_MESSAGE_BOX_INFO, - _("Ok"), snooze_button, NULL); - gtk_window_set_modal (GTK_WINDOW (w), FALSE); - ret = gnome_dialog_run (GNOME_DIALOG (w)); - switch (ret) { - case 1: - now = time (NULL); - diff = now - which->trigger; - which->trigger = which->trigger + diff + snooze_secs; - which->offset = which->offset - diff - snooze_secs; - alarm_add (which, &calendar_notify, data); - break; - default: - break; - } - - return; - } -} - -#endif - -/* Marks the specified range in a GtkCalendar */ -static void -mark_gtk_calendar_day (GtkCalendar *calendar, time_t start, time_t end) -{ - time_t t; - - t = time_day_begin (start); - - do { - struct tm tm; - - tm = *localtime (&t); - gtk_calendar_mark_day (calendar, tm.tm_mday); - - t = time_day_end (t); - } while (t < end); -} - -/* - * Tags the dates with appointments in a GtkCalendar based on the - * GnomeCalendar contents - */ -void -gnome_calendar_tag_calendar (GnomeCalendar *cal, GtkCalendar *gtk_cal) -{ - time_t month_begin, month_end; - GList *cois, *l; - - g_return_if_fail (cal != NULL); - g_return_if_fail (GNOME_IS_CALENDAR (cal)); - g_return_if_fail (gtk_cal != NULL); - g_return_if_fail (GTK_IS_CALENDAR (gtk_cal)); - - /* If the GtkCalendar isn't visible, we just return. */ - if (!GTK_WIDGET_VISIBLE (cal->gtk_calendar)) - return; - - month_begin = time_from_day (gtk_cal->year, gtk_cal->month, 1); - if (month_begin == -1) { - g_message ("gnome_calendar_tag_calendar(): Generated invalid month begin!"); - return; - } - - month_end = time_month_end (month_begin); - if (month_end == -1) { - g_message ("gnome_calendar_tag_calendar(): Generated invalid month end!"); - return; - } - - gtk_calendar_freeze (gtk_cal); - gtk_calendar_clear_marks (gtk_cal); - - cois = cal_client_get_events_in_range (cal->client, month_begin, - month_end); - - for (l = cois; l; l = l->next) { - CalObjInstance *coi = l->data; - time_t start, end; - - start = MAX (coi->start, month_begin); - end = MIN (coi->end, month_end); - - if (start > end) - continue; - - /* Clip the occurrence's start and end times to the month's limits */ - mark_gtk_calendar_day (gtk_cal, start, end); - } - - cal_obj_instance_list_free (cois); - - gtk_calendar_thaw (gtk_cal); -} - -/* This is called when the day begin & end times, the AM/PM flag, or the - week_starts_on_monday flags are changed. - FIXME: Which of these options do we want the new views to support? */ -void -gnome_calendar_time_format_changed (GnomeCalendar *gcal) -{ - g_return_if_fail (gcal != NULL); - g_return_if_fail (GNOME_IS_CALENDAR (gcal)); - - gtk_calendar_display_options (gcal->gtk_calendar, - (week_starts_on_monday - ? (gcal->gtk_calendar->display_flags - | GTK_CALENDAR_WEEK_START_MONDAY) - : (gcal->gtk_calendar->display_flags - & ~GTK_CALENDAR_WEEK_START_MONDAY))); -} - -/* This is called when any of the color settings are changed. - FIXME: Need to update for the new views. */ -void -gnome_calendar_colors_changed (GnomeCalendar *gcal) -{ - g_return_if_fail (gcal != NULL); - g_return_if_fail (GNOME_IS_CALENDAR (gcal)); - - todo_style_changed = 1; - gncal_todo_update (GNCAL_TODO (gcal->todo), NULL, 0); -} - -void -gnome_calendar_todo_properties_changed (GnomeCalendar *gcal) -{ - g_return_if_fail (gcal != NULL); - g_return_if_fail (GNOME_IS_CALENDAR (gcal)); - - todo_style_changed = 1; - gncal_todo_update (GNCAL_TODO (gcal->todo), NULL, 0); -} - - -void -gnome_calendar_set_selected_time_range (GnomeCalendar *gcal, - time_t start_time, - time_t end_time) -{ - gcal->selection_start_time = start_time; - gcal->selection_end_time = end_time; - - gnome_calendar_update_gtk_calendar (gcal); -} - - -/* Returns the selected time range for the current view. Note that this may be - different from the fields in the GnomeCalendar, since the view may clip - this or choose a more appropriate time. */ -void -gnome_calendar_get_current_time_range (GnomeCalendar *gcal, - time_t *start_time, - time_t *end_time) -{ - GtkWidget *page; - - page = get_current_page (gcal); - - if (page == gcal->day_view - || page == gcal->work_week_view) - e_day_view_get_selected_time_range (E_DAY_VIEW (page), - start_time, end_time); - else if (page == gcal->week_view - || page == gcal->month_view) - e_week_view_get_selected_time_range (E_WEEK_VIEW (page), - start_time, end_time); - else { - g_warning ("My penguin is gone!"); - g_assert_not_reached (); - } -} - - - -/* This updates the month shown and the day selected in the calendar, if - necessary. */ -static void -gnome_calendar_update_gtk_calendar (GnomeCalendar *gcal) -{ - GDate date; - guint current_year, current_month, current_day; - guint new_year, new_month, new_day; - gboolean set_day = FALSE; - - /* If the GtkCalendar isn't visible, we just return. */ - if (!GTK_WIDGET_VISIBLE (gcal->gtk_calendar)) - return; - - gtk_calendar_get_date (gcal->gtk_calendar, ¤t_year, - ¤t_month, ¤t_day); - - g_date_clear (&date, 1); - g_date_set_time (&date, gcal->selection_start_time); - new_year = g_date_year (&date); - new_month = g_date_month (&date) - 1; - new_day = g_date_day (&date); - - /* Block the "day_selected" signal while we update the calendar. */ - gtk_signal_handler_block (GTK_OBJECT (gcal->gtk_calendar), - gcal->day_selected_id); - - /* If the year & month don't match, update it. */ - if (new_year != current_year || new_month != current_month) { - /* FIXME: GtkCalendar bug workaround. If we select a month - which has less days than the currently selected day, it - causes a problem next time we set the day. */ - if (current_day > 28) { - gtk_calendar_select_day (gcal->gtk_calendar, 28); - set_day = TRUE; - } - gtk_calendar_select_month (gcal->gtk_calendar, new_month, - new_year); - } - - /* If the day doesn't match, update it. */ - if (new_day != current_day || set_day) - gtk_calendar_select_day (gcal->gtk_calendar, new_day); - - gtk_signal_handler_unblock (GTK_OBJECT (gcal->gtk_calendar), - gcal->day_selected_id); -} - -static void -gnome_calendar_on_day_selected (GtkCalendar *calendar, - GnomeCalendar *gcal) -{ - gint y, m, d; - struct tm tm; - - gtk_calendar_get_date (calendar, &y, &m, &d); - - tm.tm_year = y - 1900; - tm.tm_mon = m; - tm.tm_mday = d; - tm.tm_hour = 5; /* for daylight savings time fix */ - tm.tm_min = 0; - tm.tm_sec = 0; - - gnome_calendar_goto (gcal, mktime (&tm)); -} - - -static void -gnome_calendar_on_month_changed (GtkCalendar *calendar, - GnomeCalendar *gcal) -{ - gnome_calendar_tag_calendar (gcal, gcal->gtk_calendar); -} diff --git a/calendar/gui/gnome-cal.h b/calendar/gui/gnome-cal.h deleted file mode 100644 index 3711e65af0..0000000000 --- a/calendar/gui/gnome-cal.h +++ /dev/null @@ -1,131 +0,0 @@ -/* - * GnomeCalendar widget - * Copyright (C) 1998 the Free Software Foundation - * - * Authors: Miguel de Icaza (miguel@kernel.org) - * Federico Mena-Quintero - */ - -#ifndef GNOME_CALENDAR_APP_H -#define GNOME_CALENDAR_APP_H - -#include -#include -#include -#include -#include -#include - -BEGIN_GNOME_DECLS - - - -#define GNOME_CALENDAR(obj) GTK_CHECK_CAST(obj, gnome_calendar_get_type(), GnomeCalendar) -#define GNOME_CALENDAR_CLASS(class) GTK_CHECK_CAST_CLASS(class, gnome_calendar_get_type(), GnomeCalendarClass) -#define GNOME_IS_CALENDAR(obj) GTK_CHECK_TYPE(obj, gnome_calendar_get_type()) - -typedef struct { - GtkVBox vbox; - - CalClient *client; - - BonoboPropertyBag *properties; - BonoboControl *control; - - time_t selection_start_time; - time_t selection_end_time; - - GtkWidget *main_notebook; - GtkWidget *sub_notebook; - GtkWidget *hpane; - GtkCalendar *gtk_calendar; - GtkWidget *todo; - - GtkWidget *day_view; - GtkWidget *work_week_view; - GtkWidget *week_view; - GtkWidget *month_view; - - void *event_editor; - - /* The signal handler id for our GtkCalendar "day_selected" handler. */ - guint day_selected_id; - - /* Alarm ID for the midnight refresh function */ - gpointer midnight_alarm_refresh_id; - - /* UID->alarms hash */ - GHashTable *alarms; -} GnomeCalendar; - -typedef struct { - GtkVBoxClass parent_class; -} GnomeCalendarClass; - - -typedef enum { - CALENDAR_OPEN, - CALENDAR_OPEN_OR_CREATE -} GnomeCalendarOpenMode; - -guint gnome_calendar_get_type (void); -GtkWidget *gnome_calendar_new (char *title); -int gnome_calendar_open (GnomeCalendar *gcal, - char *file, - GnomeCalendarOpenMode gcom); -/* -int gnome_calendar_create (GnomeCalendar *gcal, - char *file); -*/ -void gnome_calendar_add_object (GnomeCalendar *gcal, - iCalObject *obj); -void gnome_calendar_remove_object (GnomeCalendar *gcal, - iCalObject *obj); -void gnome_calendar_next (GnomeCalendar *gcal); -void gnome_calendar_previous (GnomeCalendar *gcal); -void gnome_calendar_goto (GnomeCalendar *gcal, - time_t new_time); -void gnome_calendar_dayjump (GnomeCalendar *gcal, - time_t time); -/* Jumps to the current day */ -void gnome_calendar_goto_today (GnomeCalendar *gcal); -void gnome_calendar_tag_calendar (GnomeCalendar *cal, - GtkCalendar *gtk_cal); -char *gnome_calendar_get_current_view_name (GnomeCalendar *gcal); -void gnome_calendar_set_view (GnomeCalendar *gcal, - char *page_name); - -void gnome_calendar_set_selected_time_range (GnomeCalendar *gcal, - time_t start_time, - time_t end_time); - -/* Returns the selected time range for the current view. Note that this may be - different from the fields in the GnomeCalendar, since the view may clip - this or choose a more appropriate time. */ -void gnome_calendar_get_current_time_range (GnomeCalendar *gcal, - time_t *start_time, - time_t *end_time); - -/* Flags is a bitmask of CalObjectChange values */ -void gnome_calendar_object_changed (GnomeCalendar *gcal, - iCalObject *obj, - int flags); - -GnomeCalendar *gnome_calendar_locate (const char *pathname); - -/* Notifies the calendar that the time format has changed and it must update all its views */ -void gnome_calendar_time_format_changed (GnomeCalendar *gcal); - -/* Notifies the calendar that the todo list properties have changed and its time to update the views */ -void -gnome_calendar_colors_changed (GnomeCalendar *gcal); - -/* Notifies the calendar that the todo list properties have changed and its time to update the views */ -void -gnome_calendar_todo_properties_changed (GnomeCalendar *gcal); - - - -END_GNOME_DECLS - -#endif diff --git a/calendar/gui/gnome-cal.html b/calendar/gui/gnome-cal.html deleted file mode 100644 index 5a7d0a537f..0000000000 --- a/calendar/gui/gnome-cal.html +++ /dev/null @@ -1,44 +0,0 @@ - - - -

GNOME Calendar Documentation

-

-The GNOME calendar program is the calendaring program of the GNOME -system. It uses the vCalendar standard for transfering calendar -information (and is also the on-disk format used). - -

- - -

Command line options

- -Several options are available on the command line, they are: -
    -
  • --events Displays the events for the date - specified (or today, if no date is specified). - -
  • --from DATE Define the beginning of the range for - the event display, or the startup day on the calenday views. - By default, the event will span the whole day specified in - DATE. - -
  • --to DATE Define the range end for the event - display. If this is not specified, it will default to the end - of the day specified by the --from option. - -
  • --file FILE Set the calendar to the FILE - specified on the command line. - -
  • --todo Dumps the to-do values to standard output. -
- -

- -DATE is interpreted as being in the local time- zone, unless a -specific timezone is specified. Examples of valid date specifications -include: "1 month ago", "2 hours ago", "400000 seconds ago", "last -year", "last Monday", "yesterday", "a fortnight ago", "3/31/92 -10:00:07 PST", "January 23, 1987 10:05pm", "22:00 GMT". - - - diff --git a/calendar/gui/gnome-calendar-conduit.png b/calendar/gui/gnome-calendar-conduit.png deleted file mode 100644 index e867ba90b2..0000000000 Binary files a/calendar/gui/gnome-calendar-conduit.png and /dev/null differ diff --git a/calendar/gui/gnome-month-item.c b/calendar/gui/gnome-month-item.c deleted file mode 100644 index 58e393e4ee..0000000000 --- a/calendar/gui/gnome-month-item.c +++ /dev/null @@ -1,1246 +0,0 @@ -/* General-purpose monthly calendar canvas item for GNOME - * - * Copyright (C) 1998 Red Hat Software, Inc. - * - * Author: Federico Mena - */ - -#include -#include -#include -#include -#include "gnome-month-item.h" - - -#define DEFAULT_FONT "-*-helvetica-medium-r-normal--10-*-*-*-p-*-*-*" - - -/* Number of days in a month, for normal and leap years */ -static const int days_in_month[2][12] = { - { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }, - { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 } -}; - -/* The weird month of September 1752, where 3 Sep through 13 Sep were eliminated due to the - * Gregorian reformation. - */ -static const int sept_1752[42] = { - 0, 0, 1, 2, 14, 15, 16, - 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0 -}; - -#define REFORMATION_DAY 639787 /* First day of the reformation, counted from 1 Jan 1 */ -#define MISSING_DAYS 11 /* They corrected out 11 days */ -#define THURSDAY 4 /* First day of reformation */ -#define SATURDAY 6 /* Offset value; 1 Jan 1 was a Saturday */ -#define SEPT_1752_START 2 /* Start day within month */ -#define SEPT_1752_END 20 /* End day within month */ - - -enum { - ARG_0, - ARG_YEAR, - ARG_MONTH, - ARG_X, - ARG_Y, - ARG_WIDTH, - ARG_HEIGHT, - ARG_ANCHOR, - ARG_HEAD_PADDING, - ARG_DAY_PADDING, - ARG_DAY_NAMES, - ARG_HEADING_HEIGHT, - ARG_HEADING_ANCHOR, - ARG_DAY_ANCHOR, - ARG_START_ON_MONDAY, - ARG_HEAD_FONT, - ARG_HEAD_FONTSET, - ARG_HEAD_FONT_GDK, - ARG_DAY_FONT, - ARG_DAY_FONTSET, - ARG_DAY_FONT_GDK, - ARG_HEAD_COLOR, - ARG_HEAD_COLOR_GDK, - ARG_OUTLINE_COLOR, - ARG_OUTLINE_COLOR_GDK, - ARG_DAY_BOX_COLOR, - ARG_DAY_BOX_COLOR_GDK, - ARG_DAY_COLOR, - ARG_DAY_COLOR_GDK -}; - - -static void gnome_month_item_class_init (GnomeMonthItemClass *class); -static void gnome_month_item_init (GnomeMonthItem *mitem); -static void gnome_month_item_destroy (GtkObject *object); -static void gnome_month_item_set_arg (GtkObject *object, - GtkArg *arg, - guint arg_id); -static void gnome_month_item_get_arg (GtkObject *object, - GtkArg *arg, - guint arg_id); - - - -static GnomeCanvasGroupClass *parent_class; - - -GtkType -gnome_month_item_get_type (void) -{ - static GtkType month_item_type = 0; - - if (!month_item_type) { - GtkTypeInfo month_item_info = { - "GnomeMonthItem", - sizeof (GnomeMonthItem), - sizeof (GnomeMonthItemClass), - (GtkClassInitFunc) gnome_month_item_class_init, - (GtkObjectInitFunc) gnome_month_item_init, - NULL, /* reserved_1 */ - NULL, /* reserved_2 */ - (GtkClassInitFunc) NULL - }; - - month_item_type = gtk_type_unique (gnome_canvas_group_get_type (), &month_item_info); - } - - return month_item_type; -} - -static void -gnome_month_item_class_init (GnomeMonthItemClass *class) -{ - GtkObjectClass *object_class; - GnomeCanvasItemClass *item_class; - - object_class = (GtkObjectClass *) class; - item_class = (GnomeCanvasItemClass *) class; - - parent_class = gtk_type_class (gnome_canvas_group_get_type ()); - - gtk_object_add_arg_type ("GnomeMonthItem::year", GTK_TYPE_UINT, GTK_ARG_READWRITE, ARG_YEAR); - gtk_object_add_arg_type ("GnomeMonthItem::month", GTK_TYPE_UINT, GTK_ARG_READWRITE, ARG_MONTH); - gtk_object_add_arg_type ("GnomeMonthItem::x", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_X); - gtk_object_add_arg_type ("GnomeMonthItem::y", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_Y); - gtk_object_add_arg_type ("GnomeMonthItem::width", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_WIDTH); - gtk_object_add_arg_type ("GnomeMonthItem::height", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_HEIGHT); - gtk_object_add_arg_type ("GnomeMonthItem::anchor", GTK_TYPE_ANCHOR_TYPE, GTK_ARG_READWRITE, ARG_ANCHOR); - gtk_object_add_arg_type ("GnomeMonthItem::heading_padding", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_HEAD_PADDING); - gtk_object_add_arg_type ("GnomeMonthItem::day_padding", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_DAY_PADDING); - gtk_object_add_arg_type ("GnomeMonthItem::day_names", GTK_TYPE_POINTER, GTK_ARG_WRITABLE, ARG_DAY_NAMES); - gtk_object_add_arg_type ("GnomeMonthItem::heading_height", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_HEADING_HEIGHT); - gtk_object_add_arg_type ("GnomeMonthItem::heading_anchor", GTK_TYPE_ANCHOR_TYPE, GTK_ARG_READWRITE, ARG_HEADING_ANCHOR); - gtk_object_add_arg_type ("GnomeMonthItem::day_anchor", GTK_TYPE_ANCHOR_TYPE, GTK_ARG_READWRITE, ARG_DAY_ANCHOR); - gtk_object_add_arg_type ("GnomeMonthItem::start_on_monday", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_START_ON_MONDAY); - gtk_object_add_arg_type ("GnomeMonthItem::heading_font", GTK_TYPE_STRING, GTK_ARG_WRITABLE, ARG_HEAD_FONT); - gtk_object_add_arg_type ("GnomeMonthItem::heading_fontset", GTK_TYPE_STRING, GTK_ARG_WRITABLE, ARG_HEAD_FONTSET); - gtk_object_add_arg_type ("GnomeMonthItem::heading_font_gdk", GTK_TYPE_GDK_FONT, GTK_ARG_READWRITE, ARG_HEAD_FONT_GDK); - gtk_object_add_arg_type ("GnomeMonthItem::day_font", GTK_TYPE_STRING, GTK_ARG_WRITABLE, ARG_DAY_FONT); - gtk_object_add_arg_type ("GnomeMonthItem::day_fontset", GTK_TYPE_STRING, GTK_ARG_WRITABLE, ARG_DAY_FONTSET); - gtk_object_add_arg_type ("GnomeMonthItem::day_font_gdk", GTK_TYPE_GDK_FONT, GTK_ARG_READWRITE, ARG_DAY_FONT_GDK); - gtk_object_add_arg_type ("GnomeMonthItem::heading_color", GTK_TYPE_STRING, GTK_ARG_WRITABLE, ARG_HEAD_COLOR); - gtk_object_add_arg_type ("GnomeMonthItem::heading_color_gdk", GTK_TYPE_GDK_COLOR, GTK_ARG_READWRITE, ARG_HEAD_COLOR_GDK); - gtk_object_add_arg_type ("GnomeMonthItem::outline_color", GTK_TYPE_STRING, GTK_ARG_WRITABLE, ARG_OUTLINE_COLOR); - gtk_object_add_arg_type ("GnomeMonthItem::outline_color_gdk", GTK_TYPE_GDK_COLOR, GTK_ARG_READWRITE, ARG_OUTLINE_COLOR_GDK); - gtk_object_add_arg_type ("GnomeMonthItem::day_box_color", GTK_TYPE_STRING, GTK_ARG_WRITABLE, ARG_DAY_BOX_COLOR); - gtk_object_add_arg_type ("GnomeMonthItem::day_box_color_gdk", GTK_TYPE_GDK_COLOR, GTK_ARG_READWRITE, ARG_DAY_BOX_COLOR_GDK); - gtk_object_add_arg_type ("GnomeMonthItem::day_color", GTK_TYPE_STRING, GTK_ARG_WRITABLE, ARG_DAY_COLOR); - gtk_object_add_arg_type ("GnomeMonthItem::day_color_gdk", GTK_TYPE_GDK_COLOR, GTK_ARG_READWRITE, ARG_DAY_COLOR_GDK); - - object_class->destroy = gnome_month_item_destroy; - object_class->set_arg = gnome_month_item_set_arg; - object_class->get_arg = gnome_month_item_get_arg; -} - -/* Calculates the minimum heading height based on the heading font size and padding. It also - * calculates the minimum width of the month item based on the width of the headings. - */ -static void -check_heading_sizes (GnomeMonthItem *mitem) -{ - double m_height; - double m_width; - int width; - int max_width; - int i; - - /* Calculate minimum height */ - - m_height = mitem->head_font->ascent + mitem->head_font->descent + 2 * mitem->head_padding; - - if (mitem->head_height < m_height) - mitem->head_height = m_height; - - /* Go through each heading and remember the widest one */ - - max_width = 0; - - for (i = 0; i < 7; i++) { - width = gdk_string_width (mitem->head_font, mitem->day_names[i]); - if (max_width < width) - max_width = width; - } - - m_width = 7 * (max_width + 2 * mitem->head_padding); - - if (mitem->width < m_width) - mitem->width = m_width; -} - -/* Calculates the minimum width and height of the month item based on the day font size and padding. - * Assumes that the minimum heading height has already been computed. - */ -static void -check_day_sizes (GnomeMonthItem *mitem) -{ - double m_height; - double m_width; - int width; - int max_width; - char buf[100]; - int i; - - /* Calculate minimum height */ - - m_height = mitem->head_height + 6 * (mitem->day_font->ascent + mitem->day_font->descent + 2 * mitem->day_padding); - - if (mitem->height < m_height) - mitem->height = m_height; - - /* Calculate minimum width */ - - max_width = 0; - - for (i = 1; i < 32; i++) { - sprintf (buf, "%d", i); - width = gdk_string_width (mitem->day_font, buf); - if (max_width < width) - max_width = width; - } - - m_width = 7 * (max_width + 2 * mitem->day_padding); - - if (mitem->width < m_width) - mitem->width = m_width; -} - -/* Calculates the minimum size of the month item based on the font sizes and paddings. If the - * current size of the month item is smaller than the required minimum size, this function will - * change the size to the appropriate values. - */ -static void -check_sizes (GnomeMonthItem *mitem) -{ - check_heading_sizes (mitem); - check_day_sizes (mitem); -} - -/* Recalculates the position of the toplevel calendar group based on the logical position and anchor */ -static void -reanchor (GnomeMonthItem *mitem) -{ - double x, y; - - x = mitem->x; - y = mitem->y; - - switch (mitem->anchor) { - case GTK_ANCHOR_NW: - case GTK_ANCHOR_W: - case GTK_ANCHOR_SW: - break; - - case GTK_ANCHOR_N: - case GTK_ANCHOR_CENTER: - case GTK_ANCHOR_S: - x -= mitem->width / 2; - break; - - case GTK_ANCHOR_NE: - case GTK_ANCHOR_E: - case GTK_ANCHOR_SE: - x -= mitem->width; - break; - } - - switch (mitem->anchor) { - case GTK_ANCHOR_NW: - case GTK_ANCHOR_N: - case GTK_ANCHOR_NE: - break; - - case GTK_ANCHOR_W: - case GTK_ANCHOR_CENTER: - case GTK_ANCHOR_E: - y -= mitem->height / 2; - break; - - case GTK_ANCHOR_SW: - case GTK_ANCHOR_S: - case GTK_ANCHOR_SE: - y -= mitem->height; - break; - } - - /* Explicitly use the canvas group class prefix since the month item class has x and y - * arguments as well. - */ - - gnome_canvas_item_set (GNOME_CANVAS_ITEM (mitem), - "GnomeCanvasGroup::x", x, - "GnomeCanvasGroup::y", y, - NULL); -} - -/* Takes an anchor specification and the corners of a rectangle, and returns an anchored point with - * respect to that rectangle. - */ -static void -get_label_anchor (GtkAnchorType anchor, double x1, double y1, double x2, double y2, double *x, double *y) -{ - switch (anchor) { - case GTK_ANCHOR_NW: - case GTK_ANCHOR_W: - case GTK_ANCHOR_SW: - *x = x1; - break; - - case GTK_ANCHOR_N: - case GTK_ANCHOR_CENTER: - case GTK_ANCHOR_S: - *x = (x1 + x2) / 2.0; - break; - - case GTK_ANCHOR_NE: - case GTK_ANCHOR_E: - case GTK_ANCHOR_SE: - *x = x2; - break; - } - - switch (anchor) { - case GTK_ANCHOR_NW: - case GTK_ANCHOR_N: - case GTK_ANCHOR_NE: - *y = y1; - break; - - case GTK_ANCHOR_W: - case GTK_ANCHOR_CENTER: - case GTK_ANCHOR_E: - *y = (y1 + y2) / 2.0; - break; - - case GTK_ANCHOR_SW: - case GTK_ANCHOR_S: - case GTK_ANCHOR_SE: - *y = y2; - break; - } -} - -/* Resets the position of the day name headings in the calendar */ -static void -reshape_headings (GnomeMonthItem *mitem) -{ - double width; - int i; - double x, y; - - width = mitem->width / 7; - - for (i = 0; i < 7; i++) { - /* Group */ - gnome_canvas_item_set (mitem->items[GNOME_MONTH_ITEM_HEAD_GROUP + i], - "x", width * i, - "y", 0.0, - NULL); - - /* Box */ - gnome_canvas_item_set (mitem->items[GNOME_MONTH_ITEM_HEAD_BOX + i], - "x1", 0.0, - "y1", 0.0, - "x2", width, - "y2", mitem->head_height, - NULL); - - /* Label */ - get_label_anchor (mitem->head_anchor, - mitem->head_padding, - mitem->head_padding, - width - mitem->head_padding, - mitem->head_height - mitem->head_padding, - &x, &y); - - gnome_canvas_item_set (mitem->items[GNOME_MONTH_ITEM_HEAD_LABEL + i], - "x", x, - "y", y, - "anchor", mitem->head_anchor, - NULL); - } -} - -/* Resets the position of the days in the calendar */ -static void -reshape_days (GnomeMonthItem *mitem) -{ - double width, height; - double x, y; - int row, col; - int i; - - width = mitem->width / 7; - height = (mitem->height - mitem->head_height) / 6; - - i = 0; - - for (row = 0; row < 6; row++) - for (col = 0; col < 7; col++) { - /* Group */ - gnome_canvas_item_set (mitem->items[GNOME_MONTH_ITEM_DAY_GROUP + i], - "x", width * col, - "y", mitem->head_height + height * row, - NULL); - - /* Box */ - gnome_canvas_item_set (mitem->items[GNOME_MONTH_ITEM_DAY_BOX + i], - "x1", 0.0, - "y1", 0.0, - "x2", width, - "y2", height, - NULL); - - /* Label */ - get_label_anchor (mitem->day_anchor, - mitem->day_padding, - mitem->day_padding, - width - mitem->day_padding, - height - mitem->day_padding, - &x, &y); - - gnome_canvas_item_set (mitem->items[GNOME_MONTH_ITEM_DAY_LABEL + i], - "x", x, - "y", y, - "anchor", mitem->day_anchor, - NULL); - - i++; - } -} - -/* Changes the positions and resizes the items in the calendar to match the new size of the - * calendar. - */ -static void -reshape (GnomeMonthItem *mitem) -{ - check_sizes (mitem); - reanchor (mitem); - reshape_headings (mitem); - reshape_days (mitem); -} - -/* Sets the font for all the day headings */ -static void -set_head_font (GnomeMonthItem *mitem) -{ - int i; - - for (i = 0; i < 7; i++) - gnome_canvas_item_set (mitem->items[GNOME_MONTH_ITEM_HEAD_LABEL + i], - "font_gdk", mitem->head_font, - NULL); -} - -/* Sets the color for all the headings */ -static void -set_head_color (GnomeMonthItem *mitem) -{ - int i; - GdkColor outline; - GdkColor head; - - outline.pixel = mitem->outline_pixel; - head.pixel = mitem->head_pixel; - - for (i = 0; i < 7; i++) { - gnome_canvas_item_set (mitem->items[GNOME_MONTH_ITEM_HEAD_BOX + i], - "fill_color_gdk", &outline, - NULL); - - gnome_canvas_item_set (mitem->items[GNOME_MONTH_ITEM_HEAD_LABEL + i], - "fill_color_gdk", &head, - NULL); - } -} - -/* Creates the items for the day name headings */ -static void -create_headings (GnomeMonthItem *mitem) -{ - int i; - - /* Just create the items; they will be positioned and configured by a call to reshape() */ - - for (i = 0; i < 7; i++) { - /* Group */ - mitem->items[GNOME_MONTH_ITEM_HEAD_GROUP + i] = - gnome_canvas_item_new (GNOME_CANVAS_GROUP (mitem), - gnome_canvas_group_get_type (), - NULL); - - /* Box */ - mitem->items[GNOME_MONTH_ITEM_HEAD_BOX + i] = - gnome_canvas_item_new (GNOME_CANVAS_GROUP (mitem->items[GNOME_MONTH_ITEM_HEAD_GROUP + i]), - gnome_canvas_rect_get_type (), - NULL); - - /* Label */ - mitem->items[GNOME_MONTH_ITEM_HEAD_LABEL + i] = - gnome_canvas_item_new (GNOME_CANVAS_GROUP (mitem->items[GNOME_MONTH_ITEM_HEAD_GROUP + i]), - gnome_canvas_text_get_type (), - NULL); - } - - set_head_font (mitem); - set_head_color (mitem); -} - -/* Returns the number of leap years since year 1 up to (but not including) the specified year */ -static int -leap_years_up_to (int year) -{ - return (year / 4 /* trivial leapness */ - - ((year > 1700) ? (year / 100 - 17) : 0) /* minus centuries since 1700 */ - + ((year > 1600) ? ((year - 1600) / 400) : 0)); /* plus centuries since 1700 divisible by 400 */ -} - -/* Returns whether the specified year is a leap year */ -static int -is_leap_year (int year) -{ - if (year <= 1752) - return !(year % 4); - else - return (!(year % 4) && (year % 100)) || !(year % 400); -} - -/* Returns the 1-based day number within the year of the specified date */ -static int -day_in_year (int day, int month, int year) -{ - int is_leap, i; - - is_leap = is_leap_year (year); - - for (i = 0; i < month; i++) - day += days_in_month [is_leap][i]; - - return day; -} - -/* Returns the day of the week (zero-based, zero is Sunday) for the specified date. For the days - * that were removed on the Gregorian reformation, it returns Thursday. - */ -static int -day_in_week (int day, int month, int year) -{ - int n; - - n = (year - 1) * 365 + leap_years_up_to (year - 1) + day_in_year (day, month, year); - - if (n < REFORMATION_DAY) - return (n - 1 + SATURDAY) % 7; - - if (n >= (REFORMATION_DAY + MISSING_DAYS)) - return (n - 1 + SATURDAY - MISSING_DAYS) % 7; - - return THURSDAY; -} - -/* Fills the 42-element days array with the day numbers for the specified month. Slots outside the - * bounds of the month are filled with zeros. The starting and ending indexes of the days are - * returned in the start and end arguments. - */ -static void -build_month (int month, int year, int start_on_monday, int *days, int *start, int *end) -{ - int i; - int d_month, d_week; - - /* Note that months are zero-based, so September is month 8 */ - - if ((year == 1752) && (month == 8)) { - memcpy (days, sept_1752, 42 * sizeof (int)); - - if (start) - *start = SEPT_1752_START; - - if (end) - *end = SEPT_1752_END; - - return; - } - - for (i = 0; i < 42; i++) - days[i] = 0; - - d_month = days_in_month[is_leap_year (year)][month]; - d_week = day_in_week (1, month, year); - - if (start_on_monday) - d_week = (d_week + 6) % 7; - - for (i = 0; i < d_month; i++) - days[d_week + i] = i + 1; - - if (start) - *start = d_week; - - if (end) - *end = d_week + d_month - 1; -} - -/* Set the day numbers in the monthly calendar */ -static void -set_days (GnomeMonthItem *mitem) -{ - int i; - int start, end; - char buf[100]; - - build_month (mitem->month, mitem->year, mitem->start_on_monday, mitem->day_numbers, &start, &end); - - /* Clear days before start of month */ - - for (i = 0; i < start; i++) - gnome_canvas_item_set (mitem->items[GNOME_MONTH_ITEM_DAY_LABEL + i], - "text", NULL, - NULL); - - /* Set days of month */ - - for (; start <= end; start++, i++) { - sprintf (buf, "%d", mitem->day_numbers[start]); - gnome_canvas_item_set (mitem->items[GNOME_MONTH_ITEM_DAY_LABEL + i], - "text", buf, - NULL); - } - - /* Clear days after end of month */ - - for (; i < 42; i++) - gnome_canvas_item_set (mitem->items[GNOME_MONTH_ITEM_DAY_LABEL + i], - "text", NULL, - NULL); -} - -/* Sets the font for all the day numbers */ -static void -set_day_font (GnomeMonthItem *mitem) -{ - int i; - - for (i = 0; i < 42; i++) - gnome_canvas_item_set (mitem->items[GNOME_MONTH_ITEM_DAY_LABEL + i], - "font_gdk", mitem->day_font, - NULL); -} - -/* Sets the color for all the day items */ -static void -set_day_color (GnomeMonthItem *mitem) -{ - int i; - GdkColor outline; - GdkColor day_box; - GdkColor day; - - outline.pixel = mitem->outline_pixel; - day_box.pixel = mitem->day_box_pixel; - day.pixel = mitem->day_pixel; - - for (i = 0; i < 42; i++) { - gnome_canvas_item_set (mitem->items[GNOME_MONTH_ITEM_DAY_BOX + i], - "outline_color_gdk", &outline, - "fill_color_gdk", &day_box, - NULL); - - gnome_canvas_item_set (mitem->items[GNOME_MONTH_ITEM_DAY_LABEL + i], - "fill_color_gdk", &day, - NULL); - } -} - -/* Creates the items for the days */ -static void -create_days (GnomeMonthItem *mitem) -{ - int i; - - /* Just create the items; they will be positioned and configured by a call to reshape() */ - - for (i = 0; i < 42; i++) { - /* Group */ - mitem->items[GNOME_MONTH_ITEM_DAY_GROUP + i] = - gnome_canvas_item_new (GNOME_CANVAS_GROUP (mitem), - gnome_canvas_group_get_type (), - NULL); - - /* Box */ - mitem->items[GNOME_MONTH_ITEM_DAY_BOX + i] = - gnome_canvas_item_new (GNOME_CANVAS_GROUP (mitem->items[GNOME_MONTH_ITEM_DAY_GROUP + i]), - gnome_canvas_rect_get_type (), - NULL); - - /* Label */ - mitem->items[GNOME_MONTH_ITEM_DAY_LABEL + i] = - gnome_canvas_item_new (GNOME_CANVAS_GROUP (mitem->items[GNOME_MONTH_ITEM_DAY_GROUP + i]), - gnome_canvas_text_get_type (), - NULL); - } - - set_day_font (mitem); - set_day_color (mitem); - set_days (mitem); -} - -/* Resets the text of the day name headings */ -static void -set_day_names (GnomeMonthItem *mitem) -{ - int i; - - for (i = 0; i < 7; i++) - gnome_canvas_item_set (mitem->items[GNOME_MONTH_ITEM_HEAD_LABEL + i], - "text", mitem->day_names[mitem->start_on_monday ? ((i + 1) % 7) : i], - NULL); -} - -/* Creates all the canvas items that make up the calendar */ -static void -create_items (GnomeMonthItem *mitem) -{ - mitem->items = g_new (GnomeCanvasItem *, GNOME_MONTH_ITEM_LAST); - - create_headings (mitem); - create_days (mitem); - - /* Initialize by default to three-letter day names */ - - mitem->day_names[0] = g_strdup (_("Sun")); - mitem->day_names[1] = g_strdup (_("Mon")); - mitem->day_names[2] = g_strdup (_("Tue")); - mitem->day_names[3] = g_strdup (_("Wed")); - mitem->day_names[4] = g_strdup (_("Thu")); - mitem->day_names[5] = g_strdup (_("Fri")); - mitem->day_names[6] = g_strdup (_("Sat")); - - set_day_names (mitem); - reshape (mitem); -} - -static void -gnome_month_item_init (GnomeMonthItem *mitem) -{ - time_t t; - struct tm tm; - - /* Initialize to the current month by default */ - - t = time (NULL); - tm = *localtime (&t); - - mitem->year = tm.tm_year + 1900; - mitem->month = tm.tm_mon; - - mitem->x = 0.0; - mitem->y = 0.0; - mitem->width = 150.0; /* not unreasonable defaults, I hope */ - mitem->height = 100.0; - mitem->anchor = GTK_ANCHOR_NW; - mitem->head_padding = 0.0; - mitem->day_padding = 2.0; - mitem->head_height = 14.0; - mitem->head_anchor = GTK_ANCHOR_CENTER; - mitem->day_anchor = GTK_ANCHOR_CENTER; - - /* Load the default fonts */ - - mitem->head_font = gdk_font_load (DEFAULT_FONT); - if (!mitem->head_font) { - mitem->head_font = gdk_font_load ("fixed"); - g_assert (mitem->head_font != NULL); - } - - mitem->day_font = gdk_font_load (DEFAULT_FONT); - if (!mitem->day_font) { - mitem->day_font = gdk_font_load ("fixed"); - g_assert (mitem->day_font != NULL); - } -} - -GnomeCanvasItem * -gnome_month_item_new (GnomeCanvasGroup *parent) -{ - GnomeMonthItem *mitem; - - g_return_val_if_fail (parent != NULL, NULL); - g_return_val_if_fail (GNOME_IS_CANVAS_GROUP (parent), NULL); - - mitem = GNOME_MONTH_ITEM (gnome_canvas_item_new (parent, - gnome_month_item_get_type (), - NULL)); - - gnome_month_item_construct (mitem); - - return GNOME_CANVAS_ITEM (mitem); -} - -void -gnome_month_item_construct (GnomeMonthItem *mitem) -{ - GdkColor color; - - g_return_if_fail (mitem != NULL); - g_return_if_fail (GNOME_IS_MONTH_ITEM (mitem)); - - gnome_canvas_get_color (GNOME_CANVAS_ITEM (mitem)->canvas, "#d6d6d6d6d6d6", &color); - mitem->head_pixel = color.pixel; - mitem->day_box_pixel = color.pixel; - - gnome_canvas_get_color (GNOME_CANVAS_ITEM (mitem)->canvas, "black", &color); - mitem->outline_pixel = color.pixel; - mitem->day_pixel = color.pixel; - - create_items (mitem); -} - -static void -free_day_names (GnomeMonthItem *mitem) -{ - int i; - - if (mitem->day_names[0]) - for (i = 0; i < 7; i++) - g_free (mitem->day_names[i]); -} - -static void -gnome_month_item_destroy (GtkObject *object) -{ - GnomeMonthItem *mitem; - - g_return_if_fail (object != NULL); - g_return_if_fail (GNOME_IS_MONTH_ITEM (object)); - - mitem = GNOME_MONTH_ITEM (object); - - free_day_names (mitem); - - if (GTK_OBJECT_CLASS (parent_class)->destroy) - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); -} - -/* Sets the color of the specified pixel value to that of the specified argument, which must be in - * GdkColor format if format is TRUE, otherwise it must be in string format. - */ -static void -set_color_arg (GnomeMonthItem *mitem, gulong *pixel, GtkArg *arg, int gdk_format, int set_head, int set_day) -{ - GdkColor color; - - if (gdk_format) - *pixel = ((GdkColor *) GTK_VALUE_BOXED (*arg))->pixel; - else { - if (gnome_canvas_get_color (GNOME_CANVAS_ITEM (mitem)->canvas, GTK_VALUE_STRING (*arg), &color)) - *pixel = color.pixel; - else - *pixel = 0; - } - - if (set_head) - set_head_color (mitem); - - if (set_day) - set_day_color (mitem); -} - -static void -gnome_month_item_set_arg (GtkObject *object, GtkArg *arg, guint arg_id) -{ - GnomeMonthItem *mitem; - char **day_names; - int i; - - mitem = GNOME_MONTH_ITEM (object); - - switch (arg_id) { - case ARG_YEAR: - mitem->year = GTK_VALUE_UINT (*arg); - set_days (mitem); - break; - - case ARG_MONTH: - mitem->month = GTK_VALUE_UINT (*arg); - set_days (mitem); - break; - - case ARG_X: - mitem->x = GTK_VALUE_DOUBLE (*arg); - reanchor (mitem); - break; - - case ARG_Y: - mitem->y = GTK_VALUE_DOUBLE (*arg); - reanchor (mitem); - break; - - case ARG_WIDTH: - mitem->width = fabs (GTK_VALUE_DOUBLE (*arg)); - reshape (mitem); - break; - - case ARG_HEIGHT: - mitem->height = fabs (GTK_VALUE_DOUBLE (*arg)); - reshape (mitem); - break; - - case ARG_ANCHOR: - mitem->anchor = GTK_VALUE_ENUM (*arg); - reanchor (mitem); - break; - - case ARG_HEAD_PADDING: - mitem->head_padding = fabs (GTK_VALUE_DOUBLE (*arg)); - reshape (mitem); - break; - - case ARG_DAY_PADDING: - mitem->day_padding = fabs (GTK_VALUE_DOUBLE (*arg)); - reshape (mitem); - break; - - case ARG_DAY_NAMES: - day_names = GTK_VALUE_POINTER (*arg); - - /* First, check that none of the names is null */ - - for (i = 0; i < 7; i++) - if (!day_names[i]) { - g_warning ("Day number %d was NULL; day names cannot be NULL!", i); - return; - } - - /* Set the new names */ - - free_day_names (mitem); - for (i = 0; i < 7; i++) - mitem->day_names[i] = g_strdup (day_names[i]); - - set_day_names (mitem); - reshape (mitem); - break; - - case ARG_HEADING_HEIGHT: - mitem->head_height = fabs (GTK_VALUE_DOUBLE (*arg)); - reshape (mitem); - break; - - case ARG_HEADING_ANCHOR: - mitem->head_anchor = GTK_VALUE_ENUM (*arg); - reshape (mitem); - break; - - case ARG_DAY_ANCHOR: - mitem->day_anchor = GTK_VALUE_ENUM (*arg); - reshape (mitem); - break; - - case ARG_START_ON_MONDAY: - mitem->start_on_monday = GTK_VALUE_BOOL (*arg); - set_day_names (mitem); - set_days (mitem); - break; - - case ARG_HEAD_FONT: - gdk_font_unref (mitem->head_font); - - mitem->head_font = gdk_font_load (GTK_VALUE_STRING (*arg)); - if (!mitem->head_font) { - mitem->head_font = gdk_font_load ("fixed"); - g_assert (mitem->head_font != NULL); - } - - set_head_font (mitem); - reshape (mitem); - break; - - case ARG_HEAD_FONTSET: - gdk_font_unref (mitem->head_font); - - mitem->head_font = gdk_fontset_load (GTK_VALUE_STRING (*arg)); - if (!mitem->head_font) { - mitem->head_font = - gdk_fontset_load ("-*-fixed-medium-r-semicondensed--13-120-75-75-c-60-*-*"); - g_assert (mitem->head_font != NULL); - } - - set_head_font (mitem); - reshape (mitem); - break; - - case ARG_HEAD_FONT_GDK: - gdk_font_unref (mitem->head_font); - - mitem->head_font = GTK_VALUE_BOXED (*arg); - gdk_font_ref (mitem->head_font); - set_head_font (mitem); - reshape (mitem); - break; - - case ARG_DAY_FONT: - gdk_font_unref (mitem->day_font); - - mitem->day_font = gdk_font_load (GTK_VALUE_STRING (*arg)); - if (!mitem->day_font) { - mitem->day_font = gdk_font_load ("fixed"); - g_assert (mitem->day_font != NULL); - } - - set_day_font (mitem); - reshape (mitem); - break; - - case ARG_DAY_FONTSET: - gdk_font_unref (mitem->day_font); - - mitem->day_font = gdk_fontset_load (GTK_VALUE_STRING (*arg)); - if (!mitem->day_font) { - mitem->day_font = - gdk_fontset_load ("-*-fixed-medium-r-semicondensed--13-120-75-75-c-60-*-*"); - g_assert (mitem->day_font != NULL); - } - - set_day_font (mitem); - reshape (mitem); - break; - - case ARG_DAY_FONT_GDK: - gdk_font_unref (mitem->day_font); - - mitem->day_font = GTK_VALUE_BOXED (*arg); - gdk_font_ref (mitem->day_font); - set_day_font (mitem); - reshape (mitem); - break; - - case ARG_HEAD_COLOR: - set_color_arg (mitem, &mitem->head_pixel, arg, FALSE, TRUE, FALSE); - break; - - case ARG_HEAD_COLOR_GDK: - set_color_arg (mitem, &mitem->head_pixel, arg, TRUE, TRUE, FALSE); - break; - - case ARG_OUTLINE_COLOR: - set_color_arg (mitem, &mitem->outline_pixel, arg, FALSE, TRUE, TRUE); - break; - - case ARG_OUTLINE_COLOR_GDK: - set_color_arg (mitem, &mitem->outline_pixel, arg, TRUE, TRUE, TRUE); - break; - - case ARG_DAY_BOX_COLOR: - set_color_arg (mitem, &mitem->day_box_pixel, arg, FALSE, FALSE, TRUE); - break; - - case ARG_DAY_BOX_COLOR_GDK: - set_color_arg (mitem, &mitem->day_box_pixel, arg, TRUE, FALSE, TRUE); - break; - - case ARG_DAY_COLOR: - set_color_arg (mitem, &mitem->day_pixel, arg, FALSE, FALSE, TRUE); - break; - - case ARG_DAY_COLOR_GDK: - set_color_arg (mitem, &mitem->day_pixel, arg, TRUE, FALSE, TRUE); - break; - - default: - break; - } -} - -/* Allocates a GdkColor structure filled with the specified pixel, and puts it into the specified - * arg for returning it in the get_arg method. - */ -static void -get_color_arg (GnomeMonthItem *mitem, gulong pixel, GtkArg *arg) -{ - GdkColor *color; - - color = g_new (GdkColor, 1); - color->pixel = pixel; - gdk_color_context_query_color (GNOME_CANVAS_ITEM (mitem)->canvas->cc, color); - GTK_VALUE_BOXED (*arg) = color; -} - -static void -gnome_month_item_get_arg (GtkObject *object, GtkArg *arg, guint arg_id) -{ - GnomeMonthItem *mitem; - - mitem = GNOME_MONTH_ITEM (object); - - switch (arg_id) { - case ARG_YEAR: - GTK_VALUE_UINT (*arg) = mitem->year; - break; - - case ARG_MONTH: - GTK_VALUE_UINT (*arg) = mitem->month; - break; - - case ARG_X: - GTK_VALUE_DOUBLE (*arg) = mitem->x; - break; - - case ARG_Y: - GTK_VALUE_DOUBLE (*arg) = mitem->y; - break; - - case ARG_WIDTH: - GTK_VALUE_DOUBLE (*arg) = mitem->width; - break; - - case ARG_HEIGHT: - GTK_VALUE_DOUBLE (*arg) = mitem->height; - break; - - case ARG_ANCHOR: - GTK_VALUE_ENUM (*arg) = mitem->anchor; - break; - - case ARG_HEAD_PADDING: - GTK_VALUE_DOUBLE (*arg) = mitem->head_padding; - break; - - case ARG_DAY_PADDING: - GTK_VALUE_DOUBLE (*arg) = mitem->day_padding; - break; - - case ARG_HEADING_HEIGHT: - GTK_VALUE_DOUBLE (*arg) = mitem->head_height; - break; - - case ARG_HEADING_ANCHOR: - GTK_VALUE_ENUM (*arg) = mitem->head_anchor; - break; - - case ARG_DAY_ANCHOR: - GTK_VALUE_ENUM (*arg) = mitem->day_anchor; - break; - - case ARG_START_ON_MONDAY: - GTK_VALUE_BOOL (*arg) = mitem->start_on_monday; - break; - - case ARG_HEAD_FONT_GDK: - GTK_VALUE_BOXED (*arg) = mitem->head_font; - break; - - case ARG_DAY_FONT_GDK: - GTK_VALUE_BOXED (*arg) = mitem->day_font; - break; - - case ARG_HEAD_COLOR_GDK: - get_color_arg (mitem, mitem->head_pixel, arg); - break; - - case ARG_OUTLINE_COLOR_GDK: - get_color_arg (mitem, mitem->outline_pixel, arg); - break; - - case ARG_DAY_BOX_COLOR_GDK: - get_color_arg (mitem, mitem->day_box_pixel, arg); - break; - - case ARG_DAY_COLOR_GDK: - get_color_arg (mitem, mitem->day_pixel, arg); - break; - - default: - arg->type = GTK_TYPE_INVALID; - break; - } -} - -GnomeCanvasItem * -gnome_month_item_num2child (GnomeMonthItem *mitem, int child_num) -{ - g_return_val_if_fail (mitem != NULL, NULL); - g_return_val_if_fail (GNOME_IS_MONTH_ITEM (mitem), NULL); - - return mitem->items[child_num]; -} - -int -gnome_month_item_child2num (GnomeMonthItem *mitem, GnomeCanvasItem *child) -{ - int i; - - g_return_val_if_fail (mitem != NULL, -1); - g_return_val_if_fail (GNOME_IS_MONTH_ITEM (mitem), -1); - g_return_val_if_fail (child != NULL, -1); - g_return_val_if_fail (GNOME_IS_CANVAS_ITEM (child), -1); - - for (i = 0; i < GNOME_MONTH_ITEM_LAST; i++) - if (mitem->items[i] == child) - return i; - - return -1; -} - -int -gnome_month_item_num2day (GnomeMonthItem *mitem, int child_num) -{ - g_return_val_if_fail (mitem != NULL, 0); - g_return_val_if_fail (GNOME_IS_MONTH_ITEM (mitem), 0); - - if ((child_num >= GNOME_MONTH_ITEM_DAY_GROUP) && (child_num < GNOME_MONTH_ITEM_LAST)) { - child_num = (child_num - GNOME_MONTH_ITEM_DAY_GROUP) % 42; - return mitem->day_numbers[child_num]; - } else - return 0; -} - -int -gnome_month_item_day2index (GnomeMonthItem *mitem, int day_num) -{ - int i; - - g_return_val_if_fail (mitem != NULL, -1); - g_return_val_if_fail (GNOME_IS_MONTH_ITEM (mitem), -1); - g_return_val_if_fail (day_num >= 1, -1); - - /* Find first day of month */ - - for (i = 0; mitem->day_numbers[i] == 0; i++) - ; - - /* Find the specified day */ - - for (; (mitem->day_numbers[i] != 0) && (i < 42); i++) - if (mitem->day_numbers[i] == day_num) - return i; - - /* Bail out */ - - return -1; -} diff --git a/calendar/gui/gnome-month-item.h b/calendar/gui/gnome-month-item.h deleted file mode 100644 index 0ec4fd484c..0000000000 --- a/calendar/gui/gnome-month-item.h +++ /dev/null @@ -1,165 +0,0 @@ -/* General-purpose monthly calendar canvas item for GNOME - * - * Copyright (C) 1998 Red Hat Software, Inc. - * - * Author: Federico Mena - */ - -#ifndef GNOME_MONTH_ITEM_H -#define GNOME_MONTH_ITEM_H - -#include -#include /* why the hell is GtkAnchorType here and not in gtkenums.h? */ -#include - - -BEGIN_GNOME_DECLS - - -/* These values are used to identify the canvas items that make up a complete GnomeMonthItem, which - * is made up of the following "pieces": - * - * Headings line: - * - 7 GnomeCanvasGroups: - * Each group contains one box (GnomeCanvasRectangle) and one label - * (GnomeCanvasText) - * - * Day slots: - * - 42 GnomeCanvasGroups: - * Each group contains one box (GnomeCanvasRectangle) and one label - * (GnomeCanvasText) - * - * The headings are organized from left to right. The day slots are organized as a table in - * row-major order. - * - * If you want to access the individual items of the GnomeMonthItem, you can use these numbers with - * the gnome_month_item_num2child() function. If you want to convert a number into the - * corresponding GnomeCanvasItem, you can use the gnome_month_item_child2num() function. - */ -typedef enum { - GNOME_MONTH_ITEM_HEAD_GROUP = 0, /* 7 groups for headings */ - GNOME_MONTH_ITEM_HEAD_BOX = 7, /* 7 boxes for headings */ - GNOME_MONTH_ITEM_HEAD_LABEL = 14, /* 7 labels for headings */ - GNOME_MONTH_ITEM_DAY_GROUP = 21, /* 42 groups for days */ - GNOME_MONTH_ITEM_DAY_BOX = 63, /* 42 boxes for days */ - GNOME_MONTH_ITEM_DAY_LABEL = 105, /* 42 labels for days */ - GNOME_MONTH_ITEM_LAST = 147 /* total number of items */ -} GnomeMonthItemChild; - -/* The MonthItem canvas item defines a simple monthly calendar. It is made out of a number of - * canvas items, which can be accessed using the functions provided. The monthly calendar is - * anchored with respect to a point. The following arguments are available: - * - * name type read/write description - * ------------------------------------------------------------------------------------------ - * year uint RW Full year (1-9999) - * month uint RW Number of month (0-11) - * x double RW X position of anchor point - * y double RW Y position of anchor point - * width double RW Width of calendar in canvas units - * height double RW Height of calendar in canvas units - * anchor GtkAnchorType RW Anchor side for calendar - * heading_padding double RW Padding inside heading boxes - * day_padding double RW Padding inside day boxes - * day_names char ** W Array of strings corresponding to the day names (sun-sat) - * heading_height double RW Height of headings bar in canvas units - * heading_anchor GtkAnchorType RW Anchor side for headings inside heading boxes - * day_anchor GtkAnchorType RW Anchor side for day numbers inside day boxes - * start_on_monday boolean RW Specifies whether the week starts on Monday or Sunday - * heading_font string W X logical font descriptor for the headings - * heading_fontset string W X logical fontset descriptor for the headings - * heading_font_gdk GdkFont * RW Pointer to GdkFont for the headings - * day_font string W X logical font descriptor for the day numbers - * day_fontset string W X logical fontset descriptor for the day numbers - * day_font_gdk GdkFont * RW Pointer to GdkFont for the day numbers - * heading_color string W X color specification for heading labels - * heading_color_gdk GdkColor * RW Pointer to an allocated GdkColor for heading labels - * outline_color string W X color specification for outline (lines and fill of heading boxes) - * outline_color_gdk GdkColor * RW Pointer to an allocated GdkColor for outline - * day_box_color string W X color specification for day boxes - * day_box_color_gdk GdkColor * RW Pointer to an allocated GdkColor for day boxes - * day_color string W X color specification for day number labels - * day_color_gdk GdkColor * RW Pointer to an allocated GdkColor for day number labels - */ - -#define GNOME_TYPE_MONTH_ITEM (gnome_month_item_get_type ()) -#define GNOME_MONTH_ITEM(obj) (GTK_CHECK_CAST ((obj), GNOME_TYPE_MONTH_ITEM, GnomeMonthItem)) -#define GNOME_MONTH_ITEM_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GNOME_TYPE_MONTH_ITEM, GnomeMonthItemClass)) -#define GNOME_IS_MONTH_ITEM(obj) (GTK_CHECK_TYPE ((obj), GNOME_TYPE_MONTH_ITEM)) -#define GNOME_IS_MONTH_ITEM_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_MONTH_ITEM)) - - -typedef struct _GnomeMonthItem GnomeMonthItem; -typedef struct _GnomeMonthItemClass GnomeMonthItemClass; - -struct _GnomeMonthItem { - GnomeCanvasGroup group; - - int year; /* Year to show (full, no two-digit crap) */ - int month; /* Month to show (0-11) */ - - double x, y; /* Position at anchor */ - double width, height; /* Size of calendar */ - GtkAnchorType anchor; /* Anchor side for calendar */ - - double head_padding; /* Padding to use between heading lines and text */ - double day_padding; /* Padding to use between day number lines and text */ - - char *day_names[7]; /* Names to use for the day labels, starting from Sunday */ - - double head_height; /* Height of the headings row */ - GtkAnchorType head_anchor; /* Anchor side for the heading labels */ - GtkAnchorType day_anchor; /* Anchor side for the day number labels */ - - GnomeCanvasItem **items; /* All the items that make up the calendar */ - int day_numbers[42]; /* The numbers of the days, as they are shown in the display */ - - GdkFont *head_font; /* Font for the headings */ - GdkFont *day_font; /* Font for the day numbers */ - - gulong head_pixel; /* Color for heading labels */ - gulong outline_pixel; /* Color for the outline (lines and heading boxes) */ - gulong day_box_pixel; /* Color for the day boxes */ - gulong day_pixel; /* Color for day number labels */ - - int start_on_monday : 1; /* Start the week on Monday? If false, then start from Sunday */ -}; - -struct _GnomeMonthItemClass { - GnomeCanvasGroupClass parent_class; -}; - - -/* Standard Gtk function */ -GtkType gnome_month_item_get_type (void); - -/* Creates a new month item with the specified group as parent */ -GnomeCanvasItem *gnome_month_item_new (GnomeCanvasGroup *parent); - -/* Constructor function useful for derived classes */ -void gnome_month_item_construct (GnomeMonthItem *mitem); - -/* Returns the child item defined by the child number (as specified on the GnomeMonthItemChild - * enumeration above). - */ -GnomeCanvasItem *gnome_month_item_num2child (GnomeMonthItem *mitem, int child_num); - -/* Returns the number of the specified child item, as defined on the GnomeMonthItemChild enumeration - * above. If the specified object is not found, it returns -1. - */ -int gnome_month_item_child2num (GnomeMonthItem *mitem, GnomeCanvasItem *child); - -/* Returns the number of the day relevant to the specified child item. Day numbers are 1-based. If - * the specified child is outside the range of displayed days, then it returns 0. - */ -int gnome_month_item_num2day (GnomeMonthItem *mitem, int child_num); - -/* Returns the index (0-41) of the specified date within the table of days. If the day number is - * invalid for the current monthly calendar, then -1 is returned. - */ -int gnome_month_item_day2index (GnomeMonthItem *mitem, int day_num); - - -END_GNOME_DECLS - -#endif diff --git a/calendar/gui/gnomecal.gnorba b/calendar/gui/gnomecal.gnorba deleted file mode 100644 index 74df8ecf04..0000000000 --- a/calendar/gui/gnomecal.gnorba +++ /dev/null @@ -1,11 +0,0 @@ -[IDL:GNOME:Calendar:Repository:1.0] -type=factory -repo_id=IDL:Gnome/Calendar/Repository:1.0 -description=Calendar Repository -location_info=IDL:GNOME:Calendar:RepositoryLocator:1.0 - -[IDL:GNOME:Calendar:RepositoryLocator:1.0] -type=exe -repo_id=IDL:GNOME/GenericFactory:1.0 -description=Calendar Server -location_info=gnomecal diff --git a/calendar/gui/gnomecal.oafinfo b/calendar/gui/gnomecal.oafinfo deleted file mode 100644 index c4b91b9dd8..0000000000 --- a/calendar/gui/gnomecal.oafinfo +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/calendar/gui/goto.c b/calendar/gui/goto.c deleted file mode 100644 index d6c69016a1..0000000000 --- a/calendar/gui/goto.c +++ /dev/null @@ -1,326 +0,0 @@ -/* Go to date dialog for gnomecal - * - * Copyright (C) 1998 Red Hat Software, Inc. - * - * Author: Federico Mena - */ - -#include -#include -#include -#include "gnome-cal.h" -#include "gnome-month-item.h" -#include "calendar-commands.h" -#include "mark.h" - - -static GtkWidget *goto_win; /* The goto dialog window */ -static GnomeMonthItem *month_item; /* The month item in the dialog */ -static GnomeCalendar *gnome_calendar; /* The gnome calendar the dialog refers to */ -static int current_index; /* The index of the day marked as current, or -1 if none */ - - -/* Updates the specified month item by marking it appropriately from the calendar the dialog refers - * to. Also marks the current day if appropriate. - */ -static void -update (void) -{ - GnomeCanvasItem *item; - time_t t; - struct tm tm; - - unmark_month_item (month_item); - mark_month_item (month_item, gnome_calendar); - - if (current_index != -1) { - item = gnome_month_item_num2child (month_item, - GNOME_MONTH_ITEM_DAY_LABEL + current_index); - gnome_canvas_item_set (item, - "fill_color", color_spec_from_prop (COLOR_PROP_DAY_FG), - "fontset", NORMAL_DAY_FONTSET, - NULL); - current_index = -1; - } - - t = time (NULL); - tm = *localtime (&t); - - if (((tm.tm_year + 1900) == month_item->year) && (tm.tm_mon == month_item->month)) { - current_index = gnome_month_item_day2index (month_item, tm.tm_mday); - g_assert (current_index != -1); - - item = gnome_month_item_num2child (month_item, - GNOME_MONTH_ITEM_DAY_LABEL + current_index); - gnome_canvas_item_set (item, - "fill_color", color_spec_from_prop (COLOR_PROP_CURRENT_DAY_FG), - "fontset", CURRENT_DAY_FONTSET, - NULL); - } -} - -/* Callback used when the year adjustment is changed */ -static void -year_changed (GtkAdjustment *adj, gpointer data) -{ - gnome_canvas_item_set (GNOME_CANVAS_ITEM (month_item), - "year", (int) adj->value, - NULL); - update (); -} - -/* Creates the year control with its adjustment */ -static GtkWidget * -create_year (int year) -{ - GtkWidget *hbox; - GtkAdjustment *adj; - GtkWidget *w; - - hbox = gtk_hbox_new (FALSE, GNOME_PAD_SMALL); - - w = gtk_label_new (_("Year:")); - gtk_box_pack_start (GTK_BOX (hbox), w, FALSE, FALSE, 0); - gtk_widget_show (w); - - adj = GTK_ADJUSTMENT (gtk_adjustment_new (year, 1900, 9999, 1, 10, 10)); - gtk_signal_connect (GTK_OBJECT (adj), "value_changed", - (GtkSignalFunc) year_changed, - NULL); - - w = gtk_spin_button_new (adj, 1.0, 0); - gtk_widget_set_usize (w, 60, 0); - gtk_box_pack_start (GTK_BOX (hbox), w, FALSE, FALSE, 0); - gtk_widget_show (w); - - return hbox; -} - -/* Callback used when a month button is toggled */ -static void -month_toggled (GtkToggleButton *toggle, gpointer data) -{ - if (!toggle->active) - return; - - gnome_canvas_item_set (GNOME_CANVAS_ITEM (month_item), - "month", GPOINTER_TO_INT (data), - NULL); - update (); -} - -/* Creates the months control */ -static GtkWidget * -create_months (int month) -{ - GtkWidget *table; - GtkWidget *w; - GSList *group; - int i, row, col; - struct tm tm; - char buf[100]; - - tm = *localtime (&gnome_calendar->selection_start_time); - - table = gtk_table_new (2, 6, TRUE); - - group = NULL; - - for (i = 0; i < 12; i++) { - row = i / 6; - col = i % 6; - - tm.tm_mon = i; - strftime (buf, 100, "%b", &tm); - - w = gtk_radio_button_new (group); - group = gtk_radio_button_group (GTK_RADIO_BUTTON (w)); - gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (w), FALSE); - - gtk_container_add (GTK_CONTAINER (w), gtk_label_new (buf)); - - if (i == month) - gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (w), TRUE); - - gtk_signal_connect (GTK_OBJECT (w), "toggled", - (GtkSignalFunc) month_toggled, - GINT_TO_POINTER (i)); - gtk_table_attach (GTK_TABLE (table), w, - col, col + 1, - row, row + 1, - GTK_EXPAND | GTK_FILL, - GTK_EXPAND | GTK_FILL, - 0, 0); - gtk_widget_show_all (w); - } - - return table; -} - -/* Sets the scrolling region of the canvas to the allocation size */ -static void -set_scroll_region (GtkWidget *widget, GtkAllocation *allocation) -{ - gnome_canvas_item_set (GNOME_CANVAS_ITEM (month_item), - "width", (double) (allocation->width - 1), - "height", (double) (allocation->height - 1), - NULL); - - gnome_canvas_set_scroll_region (GNOME_CANVAS (widget), - 0, 0, - allocation->width, allocation->height); -} - -/* Event handler for day groups in the month item. A button press makes the calendar jump to the - * selected day and destroys the Go-to dialog box. - */ -static gint -day_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data) -{ - int child_num, day; - - child_num = gnome_month_item_child2num (month_item, item); - day = gnome_month_item_num2day (month_item, child_num); - - switch (event->type) { - case GDK_BUTTON_PRESS: - if ((event->button.button == 1) && (day != 0)) { - gnome_calendar_goto (gnome_calendar, - time_from_day (month_item->year, month_item->month, day)); - gtk_widget_destroy (goto_win); - } - break; - - default: - break; - } - - return FALSE; -} - -/* Creates the canvas with the month item for selecting days */ -static GtkWidget * -create_days (int day, int month, int year) -{ - GtkWidget *canvas; - int i; - GnomeCanvasItem *day_group; - - canvas = gnome_canvas_new (); - gtk_widget_set_usize (canvas, 150, 120); - - month_item = GNOME_MONTH_ITEM (gnome_month_item_new (gnome_canvas_root (GNOME_CANVAS (canvas)))); - gnome_canvas_item_set (GNOME_CANVAS_ITEM (month_item), - "month", month, - "year", year, - "start_on_monday", week_starts_on_monday, - NULL); - colorify_month_item (month_item, default_color_func, NULL); - month_item_prepare_prelight (month_item, default_color_func, NULL); - update (); - - /* Connect to size_allocate so that we can change the size of the month item and the - * scrolling region appropriately. - */ - - gtk_signal_connect (GTK_OBJECT (canvas), "size_allocate", - (GtkSignalFunc) set_scroll_region, - NULL); - - /* Bind the day groups to our event handler */ - - for (i = 0; i < 42; i++) { - day_group = gnome_month_item_num2child (month_item, i + GNOME_MONTH_ITEM_DAY_GROUP); - gtk_signal_connect (GTK_OBJECT (day_group), "event", - (GtkSignalFunc) day_event, - NULL); - } - - return canvas; -} - -static void -goto_today (GtkWidget *widget, gpointer data) -{ - gnome_calendar_goto_today (gnome_calendar); - gtk_widget_destroy (goto_win); -} - -/* Creates a "goto date" dialog and runs it */ -void -goto_dialog (GnomeCalendar *gcal) -{ - GtkWidget *vbox; - GtkWidget *hbox; - GtkWidget *w; - GtkWidget *days; - struct tm tm; - - gnome_calendar = gcal; - current_index = -1; - - tm = *localtime (&gnome_calendar->selection_start_time); - - goto_win = gnome_dialog_new (_("Go to date"), - GNOME_STOCK_BUTTON_CANCEL, - NULL); - gnome_dialog_set_parent (GNOME_DIALOG (goto_win), - GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gcal)))); - - - vbox = GNOME_DIALOG (goto_win)->vbox; - - /* Instructions */ - - w = gtk_label_new (_("Please select the date you want to go to.\n" - "When you click on a day, you will be taken\n" - "to that date.")); - gtk_label_set_justify (GTK_LABEL (w), GTK_JUSTIFY_LEFT); - gtk_misc_set_alignment (GTK_MISC (w), 0.0, 0.0); - gtk_box_pack_start (GTK_BOX (vbox), w, FALSE, FALSE, 0); - gtk_widget_show (w); - - /* Create month item before creating the year controls, since the - * latter ones need the month_item to be created. - */ - - days = create_days (tm.tm_mday, tm.tm_mon, tm.tm_year + 1900); - - /* Year */ - - w = create_year (tm.tm_year + 1900); - gtk_box_pack_start (GTK_BOX (vbox), w, FALSE, FALSE, 0); - gtk_widget_show (w); - - /* Month */ - - w = create_months (tm.tm_mon); - gtk_box_pack_start (GTK_BOX (vbox), w, FALSE, FALSE, 0); - gtk_widget_show (w); - - /* Days (canvas with month item) */ - - gtk_box_pack_start (GTK_BOX (vbox), days, TRUE, TRUE, 0); - gtk_widget_show (days); - - /* Today button */ - - hbox = gtk_hbox_new (FALSE, 0); - gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); - gtk_widget_show (hbox); - - w = gtk_button_new_with_label (_("Go to today")); - gtk_signal_connect (GTK_OBJECT (w), "clicked", - (GtkSignalFunc) goto_today, - NULL); - gtk_box_pack_start (GTK_BOX (hbox), w, FALSE, FALSE, 0); - gtk_widget_show (w); - - /* Run! */ - - gtk_window_set_modal (GTK_WINDOW (goto_win), TRUE); - gnome_dialog_set_close (GNOME_DIALOG (goto_win), TRUE); - gnome_dialog_set_parent (GNOME_DIALOG (goto_win), - GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gnome_calendar)))); - gtk_widget_show (goto_win); -} diff --git a/calendar/gui/icalendar-types b/calendar/gui/icalendar-types deleted file mode 100644 index e11f4c1789..0000000000 --- a/calendar/gui/icalendar-types +++ /dev/null @@ -1,39 +0,0 @@ -evento todo journal fbrequest fbreply busytime timezone - attach attach attach - attendee attendee attendee attendee attendee attendee - categories categories categories - class class class - comment comment comment comment comment comment comment - completed - contact contact contact - created created created created - description description description - dtstamp dtstamp - dtend/duration due->dtend dtend [duration] dtend dtend - dtstart dtstart dtstart dtstart dtstart dtstart dtstart - exdate exdate exdate - exrule exrule exrule - geo geo - last-mod last-mod last-mod last-mod last-mod - location location - organizer organizer organizer - percent - priority priority - rstatus rstatus rstatus rstatus - related related related - resources resources - rdate rdate rdate [rdate/rrule] - rrule rrule rrule - dtstamp dtstamp dtstamp dtstamp - seq seq seq seq seq - status status - summary summary summary - transp - uid uid uid uid uid - url url url url url - recurid recurid recurid - freebusy freebusy - tzname - tzoffset-to - tzoffset-from - diff --git a/calendar/gui/layout.c b/calendar/gui/layout.c deleted file mode 100644 index c8dfde6bdb..0000000000 --- a/calendar/gui/layout.c +++ /dev/null @@ -1,309 +0,0 @@ -/* Evolution calendar - Event layout engine - * - * Copyright (C) 2000 Helix Code, Inc. - * - * Authors: Miguel de Icaza - * Federico Mena-Quintero - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. - */ - -#include -#include -#include "layout.h" - - - -/* This structure is used to pass around layout information among the internal - * layout functions. - */ -struct layout_info { - GList *events; /* List of events from client */ - int num_events; /* The number of events (length of the list) */ - LayoutQueryTimeFunc func; /* Function to convert a list item to a start/end time pair */ - int num_rows; /* Size of the time partition */ - time_t *partition; /* The time partition containing start and end time values */ - int *array; /* Working array of free and allocated time slots */ - int *allocations; /* Returned array of slot allocations */ - int *slots; /* Returned array of slots used */ - int num_slots; /* Number of slots used */ -}; - - - -/* This defines the maximum number of events to overlap per row. More than that - * number of events will not be displayed. This is not ideal, so sue me. - */ -#define MAX_EVENTS_PER_ROW 32 - - -/* Compares two time_t values, used for qsort() */ -static int -compare_time_t (const void *a, const void *b) -{ - time_t ta, tb; - - ta = *((time_t *) a); - tb = *((time_t *) b); - - if (ta < tb) - return -1; - else if (ta > tb) - return 1; - else - return 0; -} - -/* Builds a partition of the time range occupied by the events in the list. It returns an array - * with the times that define the partition and the number of items in the partition. - */ -static void -build_partition (struct layout_info *li) -{ - time_t *rows, *p, *q; - GList *list; - int i, unique_vals; - - /* This is the maximum number of rows we would need */ - - li->num_rows = li->num_events * 2; - - /* Fill the rows with the times */ - - rows = g_new (time_t, li->num_rows); - - for (list = li->events, p = rows; list; list = list->next) { - (* li->func) (list, &p[0], &p[1]); - p += 2; - } - - /* Do a sort | uniq on the array */ - - qsort (rows, li->num_rows, sizeof (time_t), compare_time_t); - - p = rows; - q = rows + 1; - unique_vals = 1; - - for (i = 1; i < li->num_rows; i++, q++) - if (*q != *p) { - unique_vals++; - p++; - *p = *q; - } - - /* Return the number of unique values in the partition and the partition array itself */ - - li->num_rows = unique_vals; - li->partition = rows; -} - -/* Returns the index of the element in the partition that corresponds to the specified time */ -static int -find_index (struct layout_info *li, time_t t) -{ - int i; - - for (i = 0; ; i++) - if (li->partition[i] == t) - return i; - - g_assert_not_reached (); -} - -#define xy(li, x, y) li->array[(y * MAX_EVENTS_PER_ROW) + (x)] - -/* Checks that all the cells in the slot array at the specified slot column are free to use by an - * event that has the specified range. - */ -static int -range_is_empty (struct layout_info *li, int slot, time_t start, time_t end) -{ - int i; - - for (i = find_index (li, start); li->partition[i] < end; i++) - if (xy (li, slot, i) != -1) - return FALSE; - - return TRUE; -} - -/* Allocates a time in the slot array for the specified event's index */ -static void -range_allocate (struct layout_info *li, int slot, time_t start, time_t end, int ev_num) -{ - int i; - - for (i = find_index (li, start); li->partition[i] < end; i++) - xy (li, slot, i) = ev_num; -} - -/* Performs the initial allocation of slots for events. Each event gets one column; they will be - * expanded in a later stage. Returns the number of columns used. - */ -static void -initial_allocate (struct layout_info *li) -{ - GList *events; - int i; - int slot; - int num_slots; - time_t start, end; - - num_slots = 0; - - for (i = 0, events = li->events; events; events = events->next, i++) { - (* li->func) (events, &start, &end); - - /* Start with no allocation, no columns */ - - li->allocations[i] = -1; - li->slots[i] = 0; - - /* Find a free column for the event */ - - for (slot = 0; slot < MAX_EVENTS_PER_ROW; slot++) - if (range_is_empty (li, slot, start, end)) { - range_allocate (li, slot, start, end, i); - - li->allocations[i] = slot; - li->slots[i] = 1; - - if ((slot + 1) > num_slots) - num_slots = slot + 1; - - break; - } - } - - li->num_slots = num_slots; -} - -/* Returns the maximum number of columns that an event can expanded by in the slot array */ -static int -columns_to_expand (struct layout_info *li, int ev_num, time_t start, time_t end) -{ - int cols; - int slot; - int i_start; - int i; - - cols = 0; - - i_start = find_index (li, start); - - for (slot = li->allocations[ev_num] + 1; slot < li->num_slots; slot++) { - for (i = i_start; li->partition[i] < end; i++) - if (xy (li, slot, i) != -1) - return cols; - - cols++; - } - - return cols; -} - -/* Expands an event by the specified number of columns */ -static void -do_expansion (struct layout_info *li, int ev_num, time_t start, time_t end, int num_cols) -{ - int i, j; - int slot; - - for (i = find_index (li, start); li->partition[i] < end; i++) { - slot = li->allocations[ev_num] + 1; - - for (j = 0; j < num_cols; j++) - xy (li, slot + j, i) = ev_num; - } -} - -/* Expands the events in the slot array to occupy as many columns as possible. This is the second - * pass of the layout algorithm. - */ -static void -expand_events (struct layout_info *li) -{ - GList *events; - time_t start, end; - int i; - int cols; - - for (i = 0, events = li->events; events; events = events->next, i++) { - (* li->func) (events, &start, &end); - - cols = columns_to_expand (li, i, start, end); - - if (cols == 0) - continue; /* We can't expand this event */ - - do_expansion (li, i, start, end, cols); - - li->slots[i] += cols; - } -} - -void -layout_events (GList *events, LayoutQueryTimeFunc func, - int *num_slots, int **allocations, int **slots) -{ - struct layout_info li; - int i; - - g_return_if_fail (num_slots != NULL); - g_return_if_fail (allocations != NULL); - g_return_if_fail (slots != NULL); - - if (!events) { - *num_slots = 0; - *allocations = NULL; - *slots = NULL; - - return; - } - - li.events = events; - li.num_events = g_list_length (events); - li.func = func; - - /* Build the partition of the time range, and then build the array of slots */ - - build_partition (&li); - - li.array = g_new (int, li.num_rows * MAX_EVENTS_PER_ROW); - for (i = 0; i < (li.num_rows * MAX_EVENTS_PER_ROW); i++) - li.array[i] = -1; /* This is our 'empty' value */ - - /* Build the arrays for allocations and columns used */ - - li.allocations = g_new (int, li.num_events); - li.slots = g_new (int, li.num_events); - - /* Perform initial allocation and then expand the events to as many - * slots as they can occupy. - */ - - initial_allocate (&li); - expand_events (&li); - - /* Clean up and return values */ - - g_free (li.partition); - g_free (li.array); - - *num_slots = li.num_slots; - *allocations = li.allocations; - *slots = li.slots; -} diff --git a/calendar/gui/layout.h b/calendar/gui/layout.h deleted file mode 100644 index ed40e40a29..0000000000 --- a/calendar/gui/layout.h +++ /dev/null @@ -1,56 +0,0 @@ -/* Evolution calendar - Event layout engine - * - * Copyright (C) 2000 Helix Code, Inc. - * - * Authors: Miguel de Icaza - * Federico Mena-Quintero - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. - */ - -#ifndef LAYOUT_H -#define LAYOUT_H - -#include -#include - - - -/* Functions of this type must translate the list item into two time_t values - * for the start and end of an event. - */ -typedef void (* LayoutQueryTimeFunc) (GList *event, time_t *start, time_t *end); - - -/* This is the main layout function for overlapping events. You pass in a list - * of (presumably) events and a function that should take a list element and - * return the start and end times for the event corresponding to that list - * element. - * - * It returns the number of slots ("columns") that you need to take into account - * when actually painting the events, the array of the first slot index that - * each event occupies, and the array of number of slots that each event - * occupies. You have to free both arrays. - * - * You will get somewhat better-looking results if the list of events is sorted - * by using the start time as the primary sort key and the end time as the - * secondary sort key -- so that "longer" events go first in the list. - */ -void layout_events (GList *events, LayoutQueryTimeFunc func, - int *num_slots, int **allocations, int **slots); - - - -#endif diff --git a/calendar/gui/main.c b/calendar/gui/main.c deleted file mode 100644 index 2b3f3ac762..0000000000 --- a/calendar/gui/main.c +++ /dev/null @@ -1,95 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* control-factory.c - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include -#include -#include -#include - -#ifdef USING_OAF -#include -#else -#include -#endif - -#include -#include -#include -#include -#include -#include "component-factory.h" -#include "control-factory.h" - - -static void -init_bonobo (int *argc, char **argv) -{ -#ifdef USING_OAF - /* FIXME: VERSION instead of "0.0". */ - gnome_init_with_popt_table ("evolution-calendar", "0.0", - *argc, argv, oaf_popt_options, - 0, NULL); - oaf_init (*argc, argv); -#else - CORBA_Environment ev; - - CORBA_exception_init (&ev); - gnome_CORBA_init_with_popt_table ( - "evolution-calendar", "0.0", - argc, argv, NULL, 0, NULL, GNORBA_INIT_SERVER_FUNC, &ev); - CORBA_exception_free (&ev); -#endif - - if (bonobo_init (CORBA_OBJECT_NIL, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL) == FALSE) - g_error (_("Could not initialize Bonobo")); -} - - -int -main (int argc, char **argv) -{ - init_bonobo (&argc, argv); - glade_gnome_init (); - alarm_init (); - - init_calendar (); - -#if 0 - //g_log_set_always_fatal ((GLogLevelFlags) 0xFFFF); - g_log_set_always_fatal (G_LOG_LEVEL_ERROR | - G_LOG_LEVEL_CRITICAL | - G_LOG_LEVEL_WARNING); -#endif - - control_factory_init (); - component_factory_init (); - - bonobo_main (); - - return 0; -} diff --git a/calendar/gui/mark.c b/calendar/gui/mark.c deleted file mode 100644 index ea83845b2a..0000000000 --- a/calendar/gui/mark.c +++ /dev/null @@ -1,289 +0,0 @@ -/* Evolution calendar - Functions to mark calendars - * - * Copyright (C) 1998 Red Hat Software, Inc. - * - * Author: Federico Mena-Quintero - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. - */ - -#include -#include -#include "gnome-cal.h" -#include "calendar-commands.h" -#include "mark.h" - - - -/* Frees the specified data when an object is destroyed */ -static void -free_data (GtkObject *object, gpointer data) -{ - g_free (data); -} - -/* If the array of "marked" attributes for the days in a a month item has not been created yet, this - * function creates the array and clears it. Otherwise, it just returns the existing array. - */ -static char * -get_attributes (GnomeMonthItem *mitem) -{ - char *attrs; - - attrs = gtk_object_get_data (GTK_OBJECT (mitem), "day_mark_attributes"); - - if (!attrs) { - attrs = g_new0 (char, 42); - gtk_object_set_data (GTK_OBJECT (mitem), "day_mark_attributes", attrs); - gtk_signal_connect (GTK_OBJECT (mitem), "destroy", - (GtkSignalFunc) free_data, - attrs); - } - - return attrs; -} - -void -colorify_month_item (GnomeMonthItem *mitem, GetColorFunc func, gpointer func_data) -{ - g_return_if_fail (mitem != NULL); - g_return_if_fail (GNOME_IS_MONTH_ITEM (mitem)); - g_return_if_fail (func != NULL); - - unmark_month_item (mitem); - - /* We have to do this in several calls to gnome_canvas_item_set(), as color_spec_from_prop() - * returns a pointer to a static string -- and we need several values. - */ - - gnome_canvas_item_set (GNOME_CANVAS_ITEM (mitem), - "heading_color", (* func) (COLOR_PROP_HEADING_COLOR, func_data), - NULL); - - gnome_canvas_item_set (GNOME_CANVAS_ITEM (mitem), - "outline_color", (* func) (COLOR_PROP_OUTLINE_COLOR, func_data), - NULL); - - gnome_canvas_item_set (GNOME_CANVAS_ITEM (mitem), - "day_box_color", (* func) (COLOR_PROP_EMPTY_DAY_BG, func_data), - NULL); - - gnome_canvas_item_set (GNOME_CANVAS_ITEM (mitem), - "day_color", (* func) (COLOR_PROP_DAY_FG, func_data), - NULL); -} - -/* In the month item, marks all the days that are touched by the specified time span. Assumes that - * the time span is completely contained within the month. The array of day attributes is modified - * accordingly. - */ -static void -mark_event_in_month (GnomeMonthItem *mitem, time_t start, time_t end) -{ - struct tm tm; - int day_index; - - tm = *localtime (&start); - - for (; start <= end; start += 60 * 60 * 24) { - mktime (&tm); /* normalize the time */ - - /* Figure out the day index that corresponds to this time */ - - day_index = gnome_month_item_day2index (mitem, tm.tm_mday); - g_assert (day_index >= 0); - - /* Mark the day box */ - - mark_month_item_index (mitem, day_index, default_color_func, NULL); - - /* Next day */ - - tm.tm_mday++; - } -} - -void -mark_month_item (GnomeMonthItem *mitem, GnomeCalendar *gcal) -{ - time_t month_begin, month_end; - GList *events; - GList *l; - - g_return_if_fail (mitem != NULL); - g_return_if_fail (GNOME_IS_MONTH_ITEM (mitem)); - g_return_if_fail (gcal != NULL); - g_return_if_fail (GNOME_IS_CALENDAR (gcal)); - - month_begin = time_month_begin (time_from_day (mitem->year, mitem->month, 1)); - month_end = time_month_end (month_begin); - - events = cal_client_get_events_in_range (gcal->client, month_begin, month_end); - - for (l = events; l; l = l->next) { - CalObjInstance *coi; - - coi = l->data; - - /* We clip the event's start and end times to the month's limits */ - - mark_event_in_month (mitem, - MAX (coi->start, month_begin), - MIN (coi->end, month_end)); - } - - cal_obj_instance_list_free (events); -} - -void -mark_month_item_index (GnomeMonthItem *mitem, int index, GetColorFunc func, gpointer func_data) -{ - char *attrs; - GnomeCanvasItem *item; - - g_return_if_fail (mitem != NULL); - g_return_if_fail (GNOME_IS_MONTH_ITEM (mitem)); - g_return_if_fail ((index >= 0) && (index < 42)); - g_return_if_fail (func != NULL); - - attrs = get_attributes (mitem); - - attrs[index] = TRUE; - - item = gnome_month_item_num2child (mitem, GNOME_MONTH_ITEM_DAY_BOX + index); - gnome_canvas_item_set (item, - "fill_color", (* func) (COLOR_PROP_MARK_DAY_BG, func_data), - NULL); -} - -void -unmark_month_item (GnomeMonthItem *mitem) -{ - int i; - char *attrs; - GnomeCanvasItem *item; - - g_return_if_fail (mitem != NULL); - g_return_if_fail (GNOME_IS_MONTH_ITEM (mitem)); - - attrs = get_attributes (mitem); - - /* Find marked days and unmark them by turning off their marked attribute flag and changing - * the color. - */ - - for (i = 0; i < 42; i++) - if (attrs[i]) { - attrs[i] = FALSE; - - item = gnome_month_item_num2child (mitem, GNOME_MONTH_ITEM_DAY_BOX + i); - gnome_canvas_item_set (item, - "fill_color", color_spec_from_prop (COLOR_PROP_EMPTY_DAY_BG), - NULL); - } -} - -/* Handles EnterNotify and LeaveNotify events from the month item's day groups, and performs - * appropriate prelighting. - */ -static gint -day_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data) -{ - GnomeMonthItem *mitem; - GnomeCanvasItem *box; - int child_num, day; - GetColorFunc func; - gpointer func_data; - char *color; - char *attrs; - - /* We only accept enters and leaves */ - - if (!((event->type == GDK_ENTER_NOTIFY) || (event->type == GDK_LEAVE_NOTIFY))) - return FALSE; - - /* Get index information */ - - mitem = GNOME_MONTH_ITEM (data); - child_num = gnome_month_item_child2num (mitem, item); - day = gnome_month_item_num2day (mitem, child_num); - - if (day == 0) - return FALSE; /* it was a day outside the month's range */ - - child_num -= GNOME_MONTH_ITEM_DAY_GROUP; - box = gnome_month_item_num2child (mitem, GNOME_MONTH_ITEM_DAY_BOX + child_num); - - /* Get colors */ - - func = gtk_object_get_data (GTK_OBJECT (mitem), "prelight_color_func"); - func_data = gtk_object_get_data (GTK_OBJECT (mitem), "prelight_color_data"); - - /* Now actually set the proper color in the item */ - - switch (event->type) { - case GDK_ENTER_NOTIFY: - color = (* func) (COLOR_PROP_PRELIGHT_DAY_BG, func_data); - gnome_canvas_item_set (box, - "fill_color", color, - NULL); - break; - - case GDK_LEAVE_NOTIFY: - attrs = get_attributes (mitem); - color = (* func) (attrs[child_num] ? COLOR_PROP_MARK_DAY_BG : COLOR_PROP_EMPTY_DAY_BG, - func_data); - gnome_canvas_item_set (box, - "fill_color", color, - NULL); - break; - - default: - g_assert_not_reached (); - } - - return TRUE; -} - -void -month_item_prepare_prelight (GnomeMonthItem *mitem, GetColorFunc func, gpointer func_data) -{ - GnomeCanvasItem *day_group; - int i; - - g_return_if_fail (mitem != NULL); - g_return_if_fail (GNOME_IS_MONTH_ITEM (mitem)); - g_return_if_fail (func != NULL); - - /* Store the function in the object data */ - - gtk_object_set_data (GTK_OBJECT (mitem), "prelight_color_func", func); - gtk_object_set_data (GTK_OBJECT (mitem), "prelight_color_data", func_data); - - /* Connect the appropriate signals to perform prelighting */ - - for (i = 0; i < 42; i++) { - day_group = gnome_month_item_num2child (GNOME_MONTH_ITEM (mitem), GNOME_MONTH_ITEM_DAY_GROUP + i); - gtk_signal_connect (GTK_OBJECT (day_group), "event", - (GtkSignalFunc) day_event, - mitem); - } -} - -char * -default_color_func (ColorProp propnum, gpointer data) -{ - return color_spec_from_prop (propnum); -} diff --git a/calendar/gui/mark.h b/calendar/gui/mark.h deleted file mode 100644 index 76c82c580d..0000000000 --- a/calendar/gui/mark.h +++ /dev/null @@ -1,75 +0,0 @@ -/* Evolution calendar - Functions to mark calendars - * - * Copyright (C) 1998 Red Hat Software, Inc. - * - * Author: Federico Mena-Quintero - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. - */ - -#ifndef MARK_H -#define MARK_H - -/*#include "calendar.h"*/ -#include "gnome-month-item.h" - - - -/* These are the fonts used for the montly calendars */ - -#define HEADING_FONTSET "-adobe-helvetica-medium-r-*-*-14-*-*-*-p-*-*-*,-cronyx-helvetica-medium-r-normal-*-17-*-*-*-p-*-koi8-r,-*-*-medium-r-*-*-14-*-*-*-*-*-ksc5601.1987-0,*" -#define TITLE_FONTSET "-adobe-helvetica-bold-r-normal--12-*-*-*-p-*-*-*,-cronyx-helvetica-medium-r-normal-*-14-*-*-*-p-*-koi8-r,-*-*-bold-r-normal--12-*-*-*-*-*-ksc5601.1987-0,*" -#define DAY_HEADING_FONTSET "-adobe-helvetica-medium-r-normal--10-*-*-*-p-*-*-*,-cronyx-helvetica-medium-r-normal-*-11-*-*-*-p-*-koi8-r,-*-*-medium-r-normal--10-*-*-*-*-*-ksc5601.1987-0,*" -#define NORMAL_DAY_FONTSET "-adobe-helvetica-medium-r-normal--10-*-*-*-p-*-*-*,-cronyx-helvetica-medium-r-normal-*-11-*-*-*-p-*-koi8-r,-*-*-medium-r-normal--10-*-*-*-*-*-ksc5601.1987-0,*" -#define CURRENT_DAY_FONTSET "-adobe-helvetica-bold-r-normal--12-*-*-*-p-*-*-*,-cronyx-helvetica-medium-r-normal-*-14-*-*-*-p-*-koi8-r,-*-*-bold-r-normal--12-*-*-*-*-*-ksc5601.1987-0,*" -#define BIG_DAY_HEADING_FONTSET "-adobe-helvetica-bold-r-normal--14-*-*-*-p-*-*-*,-cronyx-helvetica-bold-r-normal-*-17-*-*-*-p-*-koi8-r,-*-*-bold-r-normal--14-*-*-*-*-*-ksc5601.1987-0,*" -#define BIG_NORMAL_DAY_FONTSET "-adobe-helvetica-medium-r-normal--14-*-*-*-p-*-*-*,-cronyx-helvetica-medium-r-normal-*-17-*-*-*-p-*-koi8-r,-*-*-medium-r-normal--14-*-*-*-*-*-ksc5601.1987-0,*" -#define BIG_CURRENT_DAY_FONTSET "-adobe-helvetica-bold-r-normal--14-*-*-*-p-*-*-*,-cronyx-helvetica-bold-r-normal-*-17-*-*-*-p-*-koi8-r,-*-*-bold-r-normal--14-*-*-*-*-*-ksc5601.1987-0,*" -#define EVENT_FONTSET "-adobe-helvetica-medium-r-*-*-10-*-*-*-p-*-*-*,-cronyx-helvetica-medium-r-normal-*-11-*-*-*-p-*-koi8-r,-*-*-medium-r-normal--10-*-*-*-*-*-ksc5601.1987-0,*" - - -/* Functions of this type are used by the marking functions to fetch color specifications. Such - * a function must return a color spec based on the property passed to it. - */ -typedef char * (* GetColorFunc) (ColorProp propnum, gpointer data); - - -/* Sets the user-configured colors and font for a month item. It also tags the days as unmarked. */ -void colorify_month_item (GnomeMonthItem *month, GetColorFunc func, gpointer func_data); - -/* Takes a monthly calendar item and marks the days that have events - * scheduled for them in the specified calendar. It also highlights - * the current day. - */ -void mark_month_item (GnomeMonthItem *mitem, GnomeCalendar *cal); - -/* Marks a day specified by index, not by day number */ -void mark_month_item_index (GnomeMonthItem *mitem, int index, GetColorFunc func, gpointer func_data); - -/* Unmarks all the days in the specified month item */ -void unmark_month_item (GnomeMonthItem *mitem); - -/* Prepares a monthly calendar item to prelight when the mouse goes over the days. */ - -void month_item_prepare_prelight (GnomeMonthItem *mitem, GetColorFunc func, gpointer func_data); - -/* This is the default prelight function you can use for most puposes. You can use NULL as the - * func_data. - */ -char *default_color_func (ColorProp prop_num, gpointer data); - - - -#endif diff --git a/calendar/gui/monthview.xpm b/calendar/gui/monthview.xpm deleted file mode 100644 index 1a1b1d936a..0000000000 --- a/calendar/gui/monthview.xpm +++ /dev/null @@ -1,46 +0,0 @@ -/* XPM */ -static char * monthview_xpm[] = { -"24 24 19 1", -" c None", -". c #000000", -"+ c #FFFFFF", -"@ c #D1D1D1", -"# c #BABBCC", -"$ c #AAAFE2", -"% c #8B90C3", -"& c #E3E4F5", -"* c #A3A6C7", -"= c #5D66BA", -"- c #3945BB", -"; c #555FC5", -"> c #2E3BB1", -", c #727ACE", -"' c #C7CAEB", -") c #0010A8", -"! c #4550B5", -"~ c #1725AC", -"{ c #8E95D8", -" ", -" ", -" ", -" ", -" ...................... ", -" .............+.++.++.. ", -" .++@++@++@++@++@++@++. ", -" .++@++@++@++@++@++@++. ", -" .@@@@@@@@@@@@@@@@@@@@. ", -" .++@++#$$%&+@+$*++@++. ", -" .++@+&=-;>,+@')!++@++. ", -" .@@@@%)%@%)@*~)!@@@@@. ", -" .++@++@'$=-+@+)!++@++. ", -" .++@++@{;>,+@+)!++@++. ", -" .@@@@@@@@%)@@@)!@@@@@. ", -" .++@+$)$+%)+@+)!++@++. ", -" .++@+'>,$=-+#$)>$+@++. ", -" .@@@@@#%%%#@#%%%%@@@@. ", -" .++@++@++@++@++@++@++. ", -" .++@++@++@++@++@++@++. ", -" ...................... ", -" ", -" ", -" "}; diff --git a/calendar/gui/popup-menu.c b/calendar/gui/popup-menu.c deleted file mode 100644 index a90c38d490..0000000000 --- a/calendar/gui/popup-menu.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Popup menu utilities for gncal - * - * Copyright (C) 1998 The Free Software Foundation - * - * Author: Federico Mena - */ - -#include -#include -#include "popup-menu.h" -#include "../../e-util/e-gui-utils.h" - - -void -popup_menu (struct menu_item *items, int nitems, GdkEventButton *event) -{ - GtkWidget *menu; - GtkWidget *item; - int i; - - menu = gtk_menu_new (); - - /* Make sure the menu is destroyed when it disappears. */ - e_auto_kill_popup_menu_on_hide (GTK_MENU (menu)); - - for (i = 0; i < nitems; i++) { - if (items[i].text) { - item = gtk_menu_item_new_with_label (_(items[i].text)); - gtk_signal_connect (GTK_OBJECT (item), "activate", - items[i].callback, - items[i].data); - gtk_widget_set_sensitive (item, items[i].sensitive); - } else - item = gtk_menu_item_new (); - - gtk_widget_show (item); - gtk_menu_append (GTK_MENU (menu), item); - } - - gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, event->button, event->time); -} diff --git a/calendar/gui/popup-menu.h b/calendar/gui/popup-menu.h deleted file mode 100644 index a4590dbb98..0000000000 --- a/calendar/gui/popup-menu.h +++ /dev/null @@ -1,25 +0,0 @@ -/* Popup menu utilities for gncal - * - * Copyright (C) 1998 The Free Software Foundation - * - * Author: Federico Mena - */ - -#ifndef POPUP_MENU_H -#define POPUP_MENU_H - -#include -#include - - -struct menu_item { - char *text; - GtkSignalFunc callback; - gpointer data; - int sensitive; -}; - -void popup_menu (struct menu_item *items, int nitems, GdkEventButton *event); - - -#endif diff --git a/calendar/gui/print.c b/calendar/gui/print.c deleted file mode 100644 index d3cf5015cf..0000000000 --- a/calendar/gui/print.c +++ /dev/null @@ -1,1338 +0,0 @@ -/* Evolution calendar - Print support - * - * Copyright (C) 2000 Helix Code, Inc. - * - * Authors: Michael Zucchi - * Federico Mena-Quintero - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "calendar-commands.h" -#include "gnome-cal.h" -#include "layout.h" - - - -static void show_print_dialogue(void); - -/* copied from gnome-month-item.c this should be shared?? */ - -/* Number of days in a month, for normal and leap years */ -static const int days_in_month[2][12] = { - { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }, - { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 } -}; - -/* The weird month of September 1752, where 3 Sep through 13 Sep were eliminated due to the - * Gregorian reformation. - */ -static const int sept_1752[42] = { - 0, 0, 1, 2, 14, 15, 16, - 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0 -}; - -#define REFORMATION_DAY 639787 /* First day of the reformation, counted from 1 Jan 1 */ -#define MISSING_DAYS 11 /* They corrected out 11 days */ -#define THURSDAY 4 /* First day of reformation */ -#define SATURDAY 6 /* Offset value; 1 Jan 1 was a Saturday */ -#define SEPT_1752_START 2 /* Start day within month */ -#define SEPT_1752_END 20 /* End day within month */ - -/* Returns the number of leap years since year 1 up to (but not including) the specified year */ -static int -leap_years_up_to (int year) -{ - return (year / 4 /* trivial leapness */ - - ((year > 1700) ? (year / 100 - 17) : 0) /* minus centuries since 1700 */ - + ((year > 1600) ? ((year - 1600) / 400) : 0)); /* plus centuries since 1700 divisible by 400 */ -} - -/* Returns whether the specified year is a leap year */ -static int -is_leap_year (int year) -{ - if (year <= 1752) - return !(year % 4); - else - return (!(year % 4) && (year % 100)) || !(year % 400); -} - -/* Returns the 1-based day number within the year of the specified date */ -static int -day_in_year (int day, int month, int year) -{ - int is_leap, i; - - is_leap = is_leap_year (year); - - for (i = 0; i < month; i++) - day += days_in_month [is_leap][i]; - - return day; -} - -/* Returns the day of the week (zero-based, zero is Sunday) for the specified date. For the days - * that were removed on the Gregorian reformation, it returns Thursday. - */ -static int -day_in_week (int day, int month, int year) -{ - int n; - - n = (year - 1) * 365 + leap_years_up_to (year - 1) + day_in_year (day, month, year); - - if (n < REFORMATION_DAY) - return (n - 1 + SATURDAY) % 7; - - if (n >= (REFORMATION_DAY + MISSING_DAYS)) - return (n - 1 + SATURDAY - MISSING_DAYS) % 7; - - return THURSDAY; -} - -/* Fills the 42-element days array with the day numbers for the specified month. Slots outside the - * bounds of the month are filled with zeros. The starting and ending indexes of the days are - * returned in the start and end arguments. - */ -static void -build_month (int month, int year, int start_on_monday, int *days, int *start, int *end) -{ - int i; - int d_month, d_week; - - /* Note that months are zero-based, so September is month 8 */ - - if ((year == 1752) && (month == 8)) { - memcpy (days, sept_1752, 42 * sizeof (int)); - - if (start) - *start = SEPT_1752_START; - - if (end) - *end = SEPT_1752_END; - - return; - } - - for (i = 0; i < 42; i++) - days[i] = 0; - - d_month = days_in_month[is_leap_year (year)][month]; - d_week = day_in_week (1, month, year); - - if (start_on_monday) - d_week = (d_week + 6) % 7; - - for (i = 0; i < d_month; i++) - days[d_week + i] = i + 1; - - if (start) - *start = d_week; - - if (end) - *end = d_week + d_month - 1; -} - - -enum align_box { - ALIGN_LEFT=1, - ALIGN_RIGHT, - ALIGN_CENTRE, - ALIGN_BORDER= 1<<8 -}; - -/* width = width of border, -'ve is no border - fillcolour = shade of fill, -'ve is no fill */ -static void -print_border(GnomePrintContext *pc, double l, double r, double t, double b, double width, double fillcolour) -{ - int i; - gnome_print_gsave (pc); - if (fillcolour<0.0) - i=1; - else - i=0; - for (;i<2;i++) { - gnome_print_moveto(pc, l, t); - gnome_print_lineto(pc, l, b); - gnome_print_lineto(pc, r, b); - gnome_print_lineto(pc, r, t); - gnome_print_lineto(pc, l, t); - if (i==0) { - gnome_print_setrgbcolor(pc, fillcolour, fillcolour, fillcolour); - gnome_print_fill(pc); - if (width<0.0) - i=2; - } else { - gnome_print_setrgbcolor(pc, 0, 0, 0); - gnome_print_setlinewidth(pc, width); - gnome_print_stroke(pc); - } - } - gnome_print_grestore (pc); -} - -/* outputs 1 line of aligned text in a box */ -static void -print_text(GnomePrintContext *pc, GnomeFont *font, const char *text, enum align_box align, double l, double r, double t, double b) -{ - double w, x; - gnome_print_gsave (pc); - w = gnome_font_get_width_string(font, text); - switch (align&3) { - default: - case ALIGN_LEFT: - x = l; - break; - case ALIGN_RIGHT: - x = l+(r-l)-w-2; - break; - case ALIGN_CENTRE: - x = l+((r-l)-w)/2; - break; - } - gnome_print_moveto(pc, x, t-font->size); - gnome_print_setfont(pc, font); - gnome_print_setrgbcolor (pc, 0,0,0); - gnome_print_show(pc, text); - gnome_print_grestore (pc); -} - -/* gets/frees the font for you, as a bold font */ -static void -print_text_size(GnomePrintContext *pc, double size, const char *text, enum align_box align, double l, double r, double t, double b) -{ - GnomeFont *font; - - font = gnome_font_new_closest ("Times", GNOME_FONT_BOLD, 0, size); - print_text(pc, font, text, align, l, r, t, b); - gtk_object_unref (GTK_OBJECT (font)); -} - -static void -titled_box(GnomePrintContext *pc, const char *text, GnomeFont *font, enum align_box align, double *l, double *r, double *t, double *b, double linewidth) -{ - if (align&ALIGN_BORDER) { - gnome_print_gsave(pc); - print_border(pc, *l, *r, *t, *t-font->size-font->size*0.4, linewidth, 0.9); - print_border(pc, *l, *r, *t-font->size-font->size*0.4, *b, linewidth, -1.0); - gnome_print_grestore(pc); - *l+=2; - *r-=2; - *b+=2; - } - print_text(pc, font, text, align, *l, *r, *t, *b); - *t-=font->size*1.4; -} - -enum datefmt { - DATE_MONTH = 1 << 0, - DATE_DAY = 1 << 1, - DATE_DAYNAME = 1 << 2, - DATE_YEAR = 1 << 3 -}; - -static char *days[] = { - N_("1st"), N_("2nd"), N_("3rd"), N_("4th"), N_("5th"), - N_("6th"), N_("7th"), N_("8th"), N_("9th"), N_("10th"), - N_("11th"), N_("12th"), N_("13th"), N_("14th"), N_("15th"), - N_("16th"), N_("17th"), N_("18th"), N_("19th"), N_("20th"), - N_("21st"), N_("22nd"), N_("23rd"), N_("24th"), N_("25th"), - N_("26th"), N_("27th"), N_("28th"), N_("29th"), N_("30th"), - N_("31st") -}; - -/* - format the date 'nicely' and consistently for various headers -*/ -static char * -format_date(time_t time, int flags, char *buffer, int bufflen) -{ - char fmt[64]; - struct tm tm; - - tm = *localtime(&time); - fmt[0] = 0; - if (flags & DATE_DAYNAME) { - strcat(fmt, "%A"); - } - if (flags & DATE_DAY) { - if (flags & DATE_DAYNAME) - strcat(fmt, " "); - strcat(fmt, gettext(days[tm.tm_mday-1])); - } - if (flags & DATE_MONTH) { - if (flags & (DATE_DAY|DATE_DAYNAME)) - strcat(fmt, " "); - strcat(fmt, "%B"); - if ((flags & (DATE_DAY|DATE_YEAR)) == (DATE_DAY|DATE_YEAR)) - strcat(fmt, ","); - } - if (flags & DATE_YEAR) { - if (flags & (DATE_DAY|DATE_DAYNAME|DATE_MONTH)) - strcat(fmt, " "); - strcat(fmt, "%Y"); - } - strftime(buffer, bufflen, fmt, &tm); - return buffer; -} - - -/* - print out the month small, embolden any days with events. -*/ -static void -print_month_small (GnomePrintContext *pc, GnomeCalendar *gcal, - time_t month, double left, double right, double top, double bottom, - int titleflags, time_t greystart, time_t greyend, int bordertitle) -{ - GnomeFont *font, *font_bold, *font_normal; - time_t now, next; - int x, y; - int days[42]; - int day; - char buf[100]; - struct tm tm; - double xpad, ypad, size; - char *daynames[] = { _("Su"), _("Mo"), _("Tu"), _("We"), _("Th"), _("Fr"), _("Sa") }; - - xpad = (right-left)/7; - ypad = (top-bottom)/8.3; - if (xpad>ypad) - size=ypad; - else - size=xpad; - - size = (xpad+ypad)/3.0; - - tm = *localtime (&month); - - /* get month days */ - build_month(tm.tm_mon, tm.tm_year+1900, week_starts_on_monday, days, 0, 0); - - /* build day-busy bits */ - now = time_month_begin(month); - - /* get title */ - format_date(month, titleflags, buf, 100); - font = gnome_font_new_closest ("Times", GNOME_FONT_BOLD, 1, size*1.2); /* title font */ - if (bordertitle) - print_border(pc, - left, left+7*xpad, top, top-font->size*1.3, - 1.0, 0.9); - print_text(pc, font, buf, ALIGN_CENTRE, - left, left+7*xpad, top, top - font->size); - gtk_object_unref (GTK_OBJECT (font)); - - font_normal = gnome_font_new_closest ("Times", GNOME_FONT_BOOK, 0, size); - font_bold = gnome_font_new_closest ("Times", GNOME_FONT_BOLD, 0, size); - - gnome_print_setrgbcolor (pc, 0,0,0); - for (x=0;x<7;x++) { - print_text(pc, font_bold, daynames[(week_starts_on_monday?x+1:x)%7], ALIGN_CENTRE, - left+x*xpad, left+(x+1)*xpad, bottom+7*ypad, bottom+7*ypad-font_bold->size); - } - - for (y=0;y<6;y++) { - for (x=0;x<7;x++) { - day = days[y*7+x]; - if (day!=0) { - GList *events; - - sprintf(buf, "%d", day); - - /* this is a slow messy way to do this ... but easy ... */ - events = cal_client_get_events_in_range (gcal->client, - now, - time_day_end (now)); - font = events ? font_bold : font_normal; - cal_obj_instance_list_free (events); - - next = time_add_day(now, 1); - if ((now>=greystart && now=now && greystartsize-ypad*0.15, - bottom+(5-y)*ypad-ypad*0.15, - -1.0, 0.75); - } - print_text(pc, font, buf, ALIGN_RIGHT, - left+x*xpad, left+(x+1)*xpad, bottom+(5-y)*ypad+font->size, bottom+(5-y)*ypad); - now = next; - } - } - } - gtk_object_unref (GTK_OBJECT (font_normal)); - gtk_object_unref (GTK_OBJECT (font_bold)); -} - - - -/* wraps text into the print context, not taking up more than its allowed space */ -static double -bound_text(GnomePrintContext *pc, GnomeFont *font, char *text, double left, double right, double top, double bottom, double indent) -{ - double maxwidth = right-left; - double width; - char *p; - char *wordstart; - int c; - char *outbuffer, *o, *outbuffendmarker; - int outbufflen; - int dump=0; - int first=1; - - g_return_val_if_fail(text!=NULL, top); - - if (topsize; - gnome_print_setfont (pc, font); - - width=0; - p = text; - wordstart = outbuffer; - o = outbuffer; - while ((c=*p)) { - if (c=='\n') { - wordstart=o; - dump=1; - } else { - /* grow output buffer if required */ - if (o>=outbuffendmarker) { - char *newbuf; - outbufflen*=2; - newbuf = g_realloc(outbuffer, outbufflen); - o = newbuf+(o-outbuffer); - wordstart = newbuf+(o-outbuffer); - outbuffer = newbuf; - outbuffendmarker = outbuffer+outbufflen-2; - } - *o++=c; - if (c==' ') - wordstart = o; - width+=gnome_font_get_width(font, c); - if (width>maxwidth) - dump=1; - else - dump=0; - } - if (dump) { - if (wordstart==outbuffer) - wordstart=o; - c=*wordstart; - *wordstart=0; - gnome_print_moveto(pc, left, top); - gnome_print_show(pc, outbuffer); - *wordstart=c; - memcpy(outbuffer, wordstart, o-wordstart); - width = gnome_font_get_width_string_n(font, outbuffer, o-wordstart); - o=outbuffer+(o-wordstart); - wordstart = outbuffer; - top -= font->size; - if (topsize; - } - g_free(outbuffer); - return top; -} - -/* Used with layout_events(), takes in a list element and returns the start and - * end times for the event corresponding to that element. - */ -static void -event_layout_query_func (GList *instance, time_t *start, time_t *end) -{ - CalObjInstance *coi = instance->data; - - *start = coi->start; - *end = coi->end; -} - -static void -print_day_details (GnomePrintContext *pc, GnomeCalendar *gcal, time_t whence, - double left, double right, double top, double bottom) -{ - time_t start, end; - GList *l, *events; - int num_slots, *allocations, *slots; - int i; - GnomeFont *font_hour, *font_minute, *font_summary; - double yinc, y, yend, x, xend; - double width=40, slot_width; - char buf[20]; - - yinc = (top-bottom)/24; - - /* fill static detail */ - font_hour = gnome_font_new_closest ("Times", GNOME_FONT_BOLD, 0, yinc/2); - font_minute = gnome_font_new_closest ("Times", GNOME_FONT_BOLD, 0, yinc/3); - font_summary = gnome_font_new_closest ("Times", GNOME_FONT_BOOK, 0, yinc/3); - - gnome_print_setrgbcolor (pc, 0, 0, 0); - - /* internal lines */ - gnome_print_setlinewidth(pc, 0.0); - gnome_print_moveto(pc, left+width, bottom); - gnome_print_lineto(pc, left+width, top); - gnome_print_stroke (pc); - - for (i=0;i<24;i++) { - y = top - yinc*(i+1); - print_border(pc, left+1, left+width-1, y, y+yinc-1, -1.0, 0.9); - gnome_print_setrgbcolor (pc, 0, 0, 0); - - /* the hour label/minute */ - sprintf(buf, "%d", i); - print_text(pc, font_hour, buf, ALIGN_RIGHT, left, left+width/2, y+yinc, y); - switch(i) { - case 12: sprintf(buf, _("pm")); break; - case 0: sprintf(buf, _("am")); break; - default: sprintf(buf, "00"); break; - } - print_text(pc, font_minute, buf, ALIGN_LEFT, left+width/2, left+width/2, y+yinc, y); - - /* internal lines */ - gnome_print_moveto(pc, left+width, y); - gnome_print_lineto(pc, right, y); - gnome_print_stroke (pc); - gnome_print_moveto(pc, left+width/2, y+yinc/2); - gnome_print_lineto(pc, right, y+yinc/2); - gnome_print_stroke (pc); - - } - - start = time_day_begin(whence); - end = time_day_end(start); - - events = cal_client_get_events_in_range (gcal->client, start, end); - - layout_events (events, event_layout_query_func, &num_slots, &allocations, &slots); - - slot_width = (right-left-width)/num_slots; - - for (i = 0, l = events; l != NULL; l = l->next, i++) { - CalObjInstance *coi; - char *str_ico; - iCalObject *ico; - CalObjFindStatus status; - - coi = l->data; - str_ico = cal_client_get_object (gcal->client, coi->uid); - - if (!str_ico) { - /* The object could have disappeared from the server */ - continue; - } - - status = ical_object_find_in_string (coi->uid, str_ico, &ico); - g_free (str_ico); - - switch (status) { - case CAL_OBJ_FIND_SUCCESS: - /* Go on */ - break; - - case CAL_OBJ_FIND_SYNTAX_ERROR: - g_message ("print_day_details(): syntax error in fetched object"); - continue; - - case CAL_OBJ_FIND_NOT_FOUND: - g_message ("print_day_details(): could not find fetched object"); - continue; - } - - y = top - (top - bottom) * (coi->start - start) / (end - start) - 1; - yend = top - (top - bottom) * (coi->end - start) / (end - start) + 1; - x = left + width + slot_width * allocations[i]; - - if (num_slots > 0) - x++; - - xend = x + slots[i] * slot_width - 2; - - print_border (pc, x, xend, y, yend, 0.0, 0.9); - - bound_text (pc, font_summary, ico->summary, x, xend, y, yend, 0); - ical_object_unref (ico); - } - - cal_obj_instance_list_free (events); - g_free (allocations); - g_free (slots); - - print_border (pc, left, right, top, bottom, 1.0, -1.0); - - gtk_object_unref (GTK_OBJECT (font_hour)); - gtk_object_unref (GTK_OBJECT (font_minute)); - gtk_object_unref (GTK_OBJECT (font_summary)); -} - -#if 0 -#define TIME_FMT "%X" -#else -#define TIME_FMT "%l:%M%p" -#endif - -static void -print_day_summary (GnomePrintContext *pc, GnomeCalendar *gcal, time_t whence, - double left, double right, double top, double bottom, - double size, int totime, int titleformat) -{ - time_t start, end; - GList *l, *events; - int i; - GnomeFont *font_summary; - double y, yend, x, xend, inc, incsmall; - char buf[100]; - double margin; - struct tm tm; - - /* fill static detail */ - font_summary = gnome_font_new_closest ("Times", GNOME_FONT_BOOK, 0, size); - - gnome_print_setfont (pc, font_summary); - - start = time_day_begin(whence); - end = time_day_end(start); - - tm = *localtime(&start); - - format_date(start, titleformat, buf, 100); - titled_box (pc, buf, font_summary, ALIGN_RIGHT | ALIGN_BORDER, - &left, &right, &top, &bottom, 0.0); - - events = cal_client_get_events_in_range (gcal->client, start, end); - - inc = size*0.3; - incsmall = size*0.2; - - y = top-inc; - yend = bottom-incsmall; - - /* do a good rough approximation of the 'widest' time */ - tm.tm_year = 2000; - tm.tm_mon = 12; - tm.tm_mday = 22; - tm.tm_sec = 22; - tm.tm_min = 22; - tm.tm_hour = 23; - strftime(buf, 100, TIME_FMT, &tm); - margin = gnome_font_get_width_string(font_summary, buf); - - for (i=0, l = events; l != NULL; l = l->next, i++) { - CalObjInstance *coi; - char *str_ico; - iCalObject *ico; - CalObjFindStatus status; - - coi = l->data; - str_ico = cal_client_get_object (gcal->client, coi->uid); - - if (!str_ico) { - /* The object could have disappeared from the server */ - continue; - } - - status = ical_object_find_in_string (coi->uid, str_ico, &ico); - g_free (str_ico); - - switch (status) { - case CAL_OBJ_FIND_SUCCESS: - /* Go on */ - break; - - case CAL_OBJ_FIND_SYNTAX_ERROR: - g_message ("print_day_summary(): syntax error in fetched object"); - continue; - - case CAL_OBJ_FIND_NOT_FOUND: - g_message ("print_day_summary(): could not find fetched object"); - continue; - } - - x = left + incsmall; - xend = right - inc; - - if (y - font_summary->size < bottom) - break; - - tm = *localtime (&coi->start); - strftime (buf, 100, TIME_FMT, &tm); - gnome_print_moveto (pc, x + (margin - - gnome_font_get_width_string (font_summary, buf)), - y - font_summary->size); - gnome_print_show (pc, buf); - - if (totime) { - tm = *localtime (&coi->end); - strftime (buf, 100, TIME_FMT, &tm); - gnome_print_moveto (pc, - (x + margin + inc - + (margin - - gnome_font_get_width_string (font_summary, buf))), - y - font_summary->size); - gnome_print_show (pc, buf); - - y = bound_text (pc, font_summary, ico->summary, - x + margin * 2 + inc * 2, xend, - y, yend, 0); - } else { - /* we also indent back after each time is printed */ - y = bound_text (pc, font_summary, ico->summary, - x + margin + inc, xend, - y, yend, -margin + inc); - } - - y += font_summary->size - inc; - - ical_object_unref (ico); - } - - cal_obj_instance_list_free (events); - - gtk_object_unref (GTK_OBJECT (font_summary)); -} - -static void -print_week_summary (GnomePrintContext *pc, GnomeCalendar *gcal, time_t whence, - double left, double right, double top, double bottom) -{ - double y, l, r, t, b; - time_t now; - int i; - - l = left; - r = (right-left)/2+left; - t = top; - y = (top-bottom)/3; - b = top-y; - now = time_week_begin(whence); /* returns sunday, we need monday */ - now = time_add_day(now, 1); - for (i = 0; i < 7; i++) { - print_day_summary (pc, gcal, now, l, r, t, b, - 10, TRUE, DATE_DAY | DATE_DAYNAME | DATE_MONTH); - now = time_add_day (now, 1); - switch (i) { - case 5: - y /= 2.0; - b += y; - case 0: - case 1: - case 3: - case 4: - t -= y; - b -= y; - break; - case 2: - l = r; - r = right; - t = top; - b = t-y; - break; - case 6: - break; - } - } -} - -static void -print_year_summary (GnomePrintContext *pc, GnomeCalendar *gcal, time_t whence, - double left, double right, double top, double bottom, int morerows) -{ - double y, x, l, r, t, b; - time_t now; - int xx, yy, rows, cols; - - l = left; - t = top; - if (morerows) { - rows=4; - cols=3; - } else { - rows=3; - cols=4; - } - y = (top-bottom)/rows; - x = (right-left)/cols; - r = l+x; - b = top-y; - now = time_year_begin(whence); - for (yy = 0; yy < rows; yy++) { - t = top - y * yy; - b = t - y; - for (xx = 0; xx < cols; xx++) { - l = left + x * xx; - r = l + x; - print_month_small (pc, gcal, now, - l + 8, r - 8, t - 8, b + 8, DATE_MONTH, 0, 0, TRUE); - now = time_add_month (now, 1); - } - } -} - -static void -print_month_summary (GnomePrintContext *pc, GnomeCalendar *gcal, time_t whence, - double left, double right, double top, double bottom) -{ - time_t now, today; - int days[42]; - int day; - struct tm tm; - int x, y; - char buf[100]; - GnomeFont *font_days; - - now = time_month_begin(whence); - tm = *localtime (&now); - - /* get month days */ - build_month(tm.tm_mon, tm.tm_year+1900, week_starts_on_monday, days, 0, 0); - - /* a little margin */ - top -= 4; - - /* do day names ... */ - font_days = gnome_font_new_closest ("Times", GNOME_FONT_BOLD, 0, 10); - gnome_print_setfont(pc, font_days); - for (x=0;x<7;x++) { - today = time_add_day(now, days[6+x]); - format_date(today, DATE_DAYNAME, buf, 100); - print_text(pc, font_days, buf, ALIGN_CENTRE, - (right-left)*x/7+left, (right-left)*(x+1)/7+left, - top, top-font_days->size); - } - top -= font_days->size*1.5; - gtk_object_unref (GTK_OBJECT (font_days)); - - for (y=0;y<6;y++) { - for (x=0;x<7;x++) { - day = days[y*7+x]; - if (day!=0) { - print_day_summary (pc, gcal, now, - (right-left)*x/7+left, - (right-left)*(x+1)/7+left, - top - (top-bottom)*y/6, - top - (top-bottom)*(y+1)/6, 6, FALSE, - day==1?(DATE_DAY|DATE_MONTH):DATE_DAY); - now = time_add_day(now, 1); - } - } - } -} - -static void -print_todo_details (GnomePrintContext *pc, GnomeCalendar *gcal, time_t start, time_t end, - double left, double right, double top, double bottom) -{ - GList *l, *todos; - int i; - GnomeFont *font_summary; - double y, yend, x, xend; - - todos = cal_client_get_uids (gcal->client, CALOBJ_TYPE_TODO); - - font_summary = gnome_font_new_closest ("Times", GNOME_FONT_BOOK, 0, 10); - - gnome_print_setrgbcolor (pc, 0, 0, 0); - gnome_print_setlinewidth (pc, 0.0); - - titled_box (pc, _("TODO Items"), font_summary, - ALIGN_CENTRE | ALIGN_BORDER, &left, &right, &top, &bottom, 1.0); - - y = top - 3; - yend = bottom - 2; - - for (i = 0, l = todos; l != NULL; l = l->next, i++) { - char *str_ico; - iCalObject *ico; - CalObjFindStatus status; - - str_ico = cal_client_get_object (gcal->client, l->data); - - if (!str_ico) { - /* The object could have disappeared from the server */ - continue; - } - - status = ical_object_find_in_string (l->data, str_ico, &ico); - g_free (str_ico); - - switch (status) { - case CAL_OBJ_FIND_SUCCESS: - /* Go on */ - break; - - case CAL_OBJ_FIND_SYNTAX_ERROR: - g_message ("print_todo_details(): syntax error in fetched object"); - continue; - - case CAL_OBJ_FIND_NOT_FOUND: - g_message ("print_todo_details(): could not find fetched object"); - continue; - } - - x = left; - xend = right-2; - - if (y < bottom) - break; - - y = bound_text (pc, font_summary, ico->summary, x + 2, xend, y, yend, 0); - y += font_summary->size; - gnome_print_moveto (pc, x, y - 3); - gnome_print_lineto (pc, xend, y - 3); - gnome_print_stroke (pc); - y -= 3; - - ical_object_unref (ico); - } - - cal_obj_uid_list_free (todos); - - gtk_object_unref (GTK_OBJECT (font_summary)); -} - -#if 0 - -static GnomePrintContext * -print_context (int preview, char *paper) -{ - GtkWidget *toplevel, *canvas, *sw; - GnomePrinter *printer; - GnomePrintContext *pc; - - if (preview) { - gtk_widget_push_colormap (gdk_rgb_get_cmap ()); - gtk_widget_push_visual (gdk_rgb_get_visual ()); - - toplevel = gtk_window_new (GTK_WINDOW_TOPLEVEL); - gtk_widget_set_usize (toplevel, 700, 700); - sw = gtk_scrolled_window_new (NULL, NULL); - canvas = gnome_canvas_new_aa (); - gtk_container_add (GTK_CONTAINER (toplevel), sw); - gtk_container_add (GTK_CONTAINER (sw), canvas); - - gnome_canvas_set_pixels_per_unit((GnomeCanvas *)canvas, 1); - - pc = gnome_print_preview_new ((GnomeCanvas *)canvas, paper); - - gtk_widget_show_all (toplevel); - - gtk_widget_pop_visual (); - gtk_widget_pop_colormap (); - } else { - printer = gnome_printer_dialog_new_modal (); - - if (!printer) - return NULL; - - pc = gnome_print_context_new_with_paper_size (printer, paper); - } - - return pc; -} - -#endif - -/* Value for the PrintView enum */ -static const int print_view_map[] = { - PRINT_VIEW_DAY, - PRINT_VIEW_WEEK, - PRINT_VIEW_MONTH, - PRINT_VIEW_YEAR, - -1 -}; - -/* Creates the range selector widget for printing a calendar */ -static GtkWidget * -range_selector_new (GtkWidget *dialog, time_t at, int *view) -{ - GtkWidget *box; - GtkWidge *radio; - GSList *group; - char text[1024]; - struct tm tm; - time_t week_begin, week_end; - struct tm week_begin_tm, week_end_tm; - - box = gtk_vbox_new (FALSE, GNOME_PAD_SMALL); - - tm = *localtime (&at); - - /* Day */ - - strftime (text, sizeof (text), _("Current day (%a %b %d %Y)"), &tm); - radio = gtk_radio_button_new_with_label (NULL, text); - group = gtk_radio_button_group (GTK_RADIO_BUTTON (radio)); - gtk_box_pack_start (GTK_BOX (box), radio, FALSE, FALSE, 0); - - /* Week */ - - week_begin = time_week_begin (at); - week_end = time_add_day (time_time_week_end (at), -1); - - week_begin_tm = *localtime (&week_begin); - week_end_tm = *localtime (&week_end); - - /* FIXME: how to make this localization-friendly? */ - - if (week_begin_tm.tm_mon == week_end_tm.tm_mon) { - char month[128]; - char day1[128]; - char day2[128]; - - strftime (month, sizeof (month), _("%a"), &week_begin_tm); - strftime (day1, sizeof (day1), _("%b"), &week_begin_tm); - strftime (day2, sizeof (day2), _("%b"), &week_end_tm); - - g_snprintf (text, sizeof (text), _("Current week (%s %s %d - %s %d %d)"), - day1, month, week_begin_tm.tm_mday, - day2, week_end_tm.tm_mday, - week_begin_tm.tm_year + 1900); - } else { - char month1[128]; - char month2[128]; - char day1[128]; - char day2[128]; - - strftime (month1, sizeof (month1), _("%a"), &week_begin_tm); - strftime (month2, sizeof (month2), _("%a"), &week_end_tm); - strftime (day1, sizeof (day1), _("%b"), &week_begin_tm); - strftime (day2, sizeof (day2), _("%b"), &week_end_tm); - - if (week_begin_tm.tm_year == week_end_tm.tm_year) - g_snprintf (text, sizeof (text), - _("Current week (%s %s %d - %s %s %d %d)"), - day1, month1, week_begin_tm.tm_mday, - day2, month2, week_end_tm.tm_mday, - week_begin_tm.tm_year + 1900); - else - g_snprintf (text, sizeof (text), - _("Current week (%s %s %d %d - %s %s %d %d)"), - day1, month1, week_begin_tm.tm_mday, - week_begin_tm.tm_year + 1900, - day2, month2, week_end_tm.tm_mday, - week_end_tm.tm_year + 1900); - } - - radio = gtk_radio_button_new_with_label (group, text); - gtk_box_pack_start (GTK_BOX (box), radio, FALSE, FALSE, 0); - - /* Month */ - - strftime (text, sizeof (text), _("Current month (%a %Y)"), &tm); - radio = gtk_radio_button_new_with_label (group, text); - gtk_box_pack_start (GTK_BOX (box), radio, FALSE, FALSE, 0); - - /* Year */ - - strftime (text, sizeof (text), _("Current year (%Y)"), &tm); - radio = gtk_radio_button_new_with_label (group, text); - gtk_box_pack_start (GTK_BOX (box), radio, FALSE, FALSE, 0); - - /* Select default */ - - e_dialog_widget_hook_value (dialog, radio, view, print_view_map); -} - -/* Shows the print dialog. The new values are returned in the at and view - * variables. - */ -static enum GnomePrintButtons -print_dialog (GnomeCalendar *gcal, time_t *at, PrintView *view, GnomePrinter **printer) -{ - GnomePrintDialog *pd; - GtkWidget *range; - int int_view; - enum GnomePrintButtons retval; - - pd = gnome_print_dialog_new (_("Print Calendar"), - GNOME_PRINT_DIALOG_RANGE | GNOME_PRINT_DIALOG_COPIES); - - int_view = *view; - - range = range_selector_new (GTK_WIDGET (pd), *at, &int_view); - gnome_print_dialog_construct_range_custom (pd, range); - - gnome_dialog_set_default (GNOME_DIALOG (pd), GNOME_PRINT_PRINT); - - /* Run! */ - - retval = gnome_dialog_run (GNOME_DIALOG (pd)); - - switch (retval) { - case GNOME_PRINT_PRINT: - case GNOME_PRINT_PREVIEW: - e_dialog_get_values (GTK_WIDGET (pd)); - *view = int_view; - - *printer = gnome_print_dialog_get_printer (pd); - break; - - default: - retval = GNOME_PRINT_CANCEL; - break; - } - - gnome_dialog_close (GNOME_DIALOG (pd)); - return retval; -} - -void -print_calendar (GnomeCalendar *gcal, time_t at, PrintView default_view) -{ - GnomePrinter *printer; - GnomePrintMaster *gpm; - GnomePrintContext *pc; - - switch (print_dialog (gcal, &at, &default_view, &printer)) { - case GNOME_PRINT_PRINT: - break; - - case GNOME_PRINT_PREVIEW: - /* FIXME */ - break; - - default: - return; - } - - g_assert (printer != NULL); - - gpm = gnome_print_master_new (); - gnome_print_master_set_printer (gpm, printer); - - const GnomePaper *paper_info; - double l, r, t, b, todo, header; - char buf[100]; - time_t when; - char *paper = "A4"; - GnomePrintMaster *gpm = gnome_print_master_new (); - - pc = gnome_print_master_get_context (gpm); - paper_info = gnome_paper_with_name (paper); - gnome_print_master_set_paper (gpm, paper_info); - - l = gnome_paper_lmargin (paper_info); - r = gnome_paper_pswidth (paper_info) - gnome_paper_rmargin (paper_info); - t = gnome_paper_psheight (paper_info) - gnome_paper_tmargin (paper_info); - b = gnome_paper_bmargin (paper_info); - - /* depending on the view, do a different output */ - switch (default_view) { - case VIEW_DAY: { - int i, days = 1; - - for (i = 0; i < days; i++) { - todo = ((r - l) / 5) * 4 + l; - header = t - 70; - print_todo_details (pc, gcal, 0, INT_MAX, todo, r, header, b); - print_day_details (pc, gcal, at, l, todo - 2.0, header, b); - - print_border (pc, l, r, t, header + 2.0, 1.0, 0.9); - - print_month_small (pc, gcal, at, r - 190, r - 104, t - 4, - header + 8, DATE_MONTH | DATE_YEAR, at, at, FALSE); - print_month_small (pc, gcal, time_add_month (at, 1), r - 90, r - 4, t - 4, - header + 8, DATE_MONTH | DATE_YEAR, 0, 0, FALSE); - - format_date (at, DATE_DAY | DATE_MONTH | DATE_YEAR, buf, 100); - print_text_size (pc, 24, buf, ALIGN_LEFT, l + 3, todo, t - 3, header); - - format_date (at, DATE_DAYNAME, buf, 100); - print_text_size (pc, 18, buf, ALIGN_LEFT, l + 3, todo, t - 27 - 4, header); - gnome_print_showpage (pc); - at = time_add_day (at, 1); - } - break; - } - case VIEW_WEEK: - header = t - 70; - print_week_summary (pc, gcal, at, l, r, header, b); - - /* more solid total outline */ - print_border (pc, l, r, header, b, 1.0, -1.0); - - /* header border */ - print_border (pc, l, r, t, header + 2.0, 1.0, 0.9); - - when = time_week_begin (at); - when = time_add_day (when, 1); - - print_month_small (pc, gcal, at, r - 90, r - 4, t - 4, - header + 8, DATE_MONTH | DATE_YEAR, when, time_add_week (when, 1), - FALSE); - print_month_small (pc, gcal, time_add_month (at, -1), r - 190, r - 104, t - 4, - header + 8, DATE_MONTH | DATE_YEAR, when, time_add_week (when, 1), - FALSE); - - format_date (when, DATE_DAY | DATE_MONTH | DATE_YEAR, buf, 100); - print_text_size (pc, 24, buf, ALIGN_LEFT, l + 3, r, t - 4, header); - - when = time_add_day (when, 6); - format_date (when, DATE_DAY | DATE_MONTH | DATE_YEAR, buf, 100); - print_text_size (pc, 24, buf, ALIGN_LEFT, l + 3, r, t - 24 - 3, header); - gnome_print_showpage (pc); - break; - - case VIEW_MONTH: - header = t - 70; - gnome_print_rotate (pc, 90); - gnome_print_translate (pc, 0, -gnome_paper_pswidth (paper_info)); - /*print_month_summary(pc, cal, at, l, r, header, b);*/ - print_month_summary (pc, gcal, at, b, t, r - 70, l); - - print_border (pc, b, t, r, r - 72.0, 1.0, 0.9); - - print_month_small (pc, gcal, time_add_month (at, 1), - t - (t - b) / 7 + 2, t - 8, r - 4, r - 68, - DATE_MONTH | DATE_YEAR, 0, 0, FALSE); - print_month_small (pc, gcal, time_add_month (at, -1), - b + 8, b + (t - b) / 7 - 2, r - 4, r - 68, - DATE_MONTH | DATE_YEAR, 0, 0, FALSE); - - /* centered title */ - format_date (at, DATE_MONTH | DATE_YEAR, buf, 100); - print_text_size (pc, 24, buf, ALIGN_CENTRE, b + 3, t, r - 3, l); - gnome_print_showpage (pc); - break; - - case VIEW_YEAR: -#if 0 - /* landscape */ - gnome_print_rotate(pc, 90); - gnome_print_translate(pc, 0, -gnome_paper_pswidth(paper_info)); - print_year_summary(pc, gcal, at, b, t, r-50, l, FALSE); - - /* centered title */ - format_date(at, DATE_YEAR, buf, 100); - print_text_size(pc, 24, buf, ALIGN_CENTRE, b+3, t, r-3, l); -#else - /* portrait */ - print_year_summary(pc, gcal, at, l, r, t-50, b, TRUE); - - /* centered title */ - format_date(at, DATE_YEAR, buf, 100); - print_text_size(pc, 24, buf, ALIGN_CENTRE, l+3, r, t-3, b); -#endif - gnome_print_showpage(pc); - break; - - default: - g_assert_not_reached (); - } - - gnome_print_master_close (gpm); - gnome_print_master_print (gpm); -} - -#if 0 - -/* - Load the printing dialogue box -*/ -static void -show_print_dialogue(void) -{ - GtkWidget *print_dialogue; - GtkWidget *printer_widget; - GtkWidget *paper_widget; - GtkWidget *print_copies; - GtkWidget *table; - - print_dialogue = - gnome_dialog_new(_("Print Calendar"), - GNOME_STOCK_BUTTON_OK, - _("Preview"), - GNOME_STOCK_BUTTON_CANCEL, - NULL); - - table = gtk_table_new(2, 2, FALSE); - gtk_container_add(GTK_CONTAINER(GNOME_DIALOG (print_dialogue)->vbox), GTK_WIDGET (table)); - gtk_widget_show(table); - - printer_widget = gnome_printer_widget_new (); - gtk_table_attach((GtkTable *)table, printer_widget, 1, 2, 0, 2, 0, 0, 4, 4); - gtk_widget_show(printer_widget); - -#if 0 - frame = gtk_frame_new("Select Paper"); - paper_widget = gnome_paper_selector_new (); - gtk_table_attach(table, frame, 0, 1, 0, 1, 0, 0, 4, 4); - gtk_container_add(frame, GTK_WIDGET (paper_widget)); - gtk_widget_show(paper_widget); - gtk_widget_show(frame); -#else - paper_widget = gnome_paper_selector_new (); - gtk_table_attach((GtkTable *)table, paper_widget, 0, 1, 0, 1, GTK_SHRINK, GTK_SHRINK, 4, 4); - gtk_widget_show(paper_widget); -#endif - print_copies = gnome_print_copies_new (); - gtk_table_attach((GtkTable *)table, print_copies, 0, 1, 1, 2, 0, 0, 4, 4); - gtk_widget_show(print_copies); - -#if 0 - frame = gtk_frame_new("Print Range"); - gtk_table_attach_defaults(table, frame, 0, 1, 1, 2); - gtk_widget_show(frame); -#endif - - gnome_dialog_run_and_close (GNOME_DIALOG (print_dialogue)); -} - -#endif diff --git a/calendar/gui/print.h b/calendar/gui/print.h deleted file mode 100644 index bae337225a..0000000000 --- a/calendar/gui/print.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Evolution calendar - Print support - * - * Copyright (C) 2000 Helix Code, Inc. - * - * Authors: Michael Zucchi - * Federico Mena-Quintero - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. - */ - -#ifndef PRINT_H -#define PRINT_H - -#include "gnome-cal.h" - - - -typedef enum { - PRINT_VIEW_DAY, - PRINT_VIEW_WEEK, - PRINT_VIEW_MONTH, - PRINT_VIEW_YEAR -} PrintView; - -void print_calendar (GnomeCalendar *gcal, time_t at, printview_t default_view); - - - -#endif diff --git a/calendar/gui/prop.c b/calendar/gui/prop.c deleted file mode 100644 index 6bf56c7c57..0000000000 --- a/calendar/gui/prop.c +++ /dev/null @@ -1,932 +0,0 @@ -/* Calendar properties dialog box - * - * Copyright (C) 1998 the Free Software Foundation - * - * Authors: Miguel de Icaza - * Federico Mena - */ -#include -#ifdef HAVE_LANGINGO_H -#include -#else -#include -#endif -#include -#include "gnome-cal.h" -#include "gnome-month-item.h" -#include "calendar-commands.h" -#include "mark.h" - -/* These specify the page numbers in the preferences notebook */ -enum { - PROP_TIME_DISPLAY, - PROP_COLORS, - PROP_TODO, - PROP_ALARMS -}; - -static GtkWidget *prop_win; /* The preferences dialog */ - -/* Widgets for the time display page */ - -static GtkWidget *time_format_12; /* Radio button for 12-hour format */ -static GtkWidget *time_format_24; /* Radio button for 24-hour format */ -static GtkWidget *start_on_sunday; /* Check button for weeks starting on Sunday */ -static GtkWidget *start_on_monday; /* Check button for weeks starting on Monday */ -static GtkWidget *start_omenu; /* Option menu for start of day */ -static GtkWidget *end_omenu; /* Option menu for end of day */ -static GtkWidget *start_items[24]; /* Menu items for start of day menu */ -static GtkWidget *end_items[24]; /* Menu items for end of day menu */ - -/* Widgets for the colors page */ - -static GtkWidget *color_pickers[COLOR_PROP_LAST]; -static GnomeCanvasItem *month_item; - -/* Widgets for the todo page */ -static GtkWidget *due_date_show_button; - -static GtkWidget *todo_item_time_remaining_show_button; - -static GtkWidget *todo_item_highlight_overdue; -static GtkWidget *todo_item_highlight_not_due_yet; -static GtkWidget *todo_item_highlight_due_today; - -static GtkWidget *priority_show_button; - -/* Widgets for the alarm page */ -static GtkWidget *enable_display_beep; -static GtkWidget *to_cb; -static GtkWidget *to_spin; -static GtkWidget *snooze_cb; -static GtkWidget *snooze_spin; - -/* prototypes */ -static void prop_apply_alarms (void); -static void create_alarm_page (void); -static void to_cb_changed (GtkWidget* object, gpointer data); -static void snooze_cb_changed (GtkWidget* object, gpointer data); - -GtkWidget* make_spin_button (int val, int low, int high); -void ee_create_ae (GtkTable *table, char *str, CalendarAlarm *alarm, - enum AlarmType type, int y, gboolean sens, - GtkSignalFunc dirty_func); -void ee_store_alarm (CalendarAlarm *alarm, enum AlarmType type); - -/* Callback used when the property box is closed -- just sets the prop_win variable to null. */ -static int -prop_cancel (void) -{ - prop_win = NULL; - return FALSE; -} - -/* Returns the index of the active item in a menu */ -static int -get_active_index (GtkWidget *menu) -{ - GtkWidget *active; - - active = gtk_menu_get_active (GTK_MENU (menu)); - return GPOINTER_TO_INT (gtk_object_get_user_data (GTK_OBJECT (active))); -} - -/* Applies the settings in the time display page */ -static void -prop_apply_time_display (void) -{ - /* Day begin/end */ - - day_begin = get_active_index (gtk_option_menu_get_menu (GTK_OPTION_MENU (start_omenu))); - day_end = get_active_index (gtk_option_menu_get_menu (GTK_OPTION_MENU (end_omenu))); - gnome_config_set_int ("/calendar/Calendar/Day start", day_begin); - gnome_config_set_int ("/calendar/Calendar/Day end", day_end); - - /* Time format */ - - am_pm_flag = GTK_TOGGLE_BUTTON (time_format_12)->active; - gnome_config_set_bool ("/calendar/Calendar/AM PM flag", am_pm_flag); - - /* Week start */ - - week_starts_on_monday = GTK_TOGGLE_BUTTON (start_on_monday)->active; - gnome_config_set_bool ("/calendar/Calendar/Week starts on Monday", week_starts_on_monday); - - gnome_config_sync (); - time_format_changed (); -} - -/* Applies the settings in the colors page */ -static void -prop_apply_colors (void) -{ - int i; - char *cspec; - gushort r, g, b; - - for (i = 0; i < COLOR_PROP_LAST; i++) { - gnome_color_picker_get_i16 (GNOME_COLOR_PICKER (color_pickers[i]), &r, &g, &b, NULL); - color_props[i].r = r; - color_props[i].g = g; - color_props[i].b = b; - - cspec = build_color_spec (color_props[i].r, color_props[i].g, color_props[i].b); - gnome_config_set_string (color_props[i].key, cspec); - } - - gnome_config_sync (); - colors_changed (); -} -/* Applies the settings in the todo page (FIX THIS IF ITS NOT WRITTEN) */ -static void -prop_apply_todo(void) -{ - todo_show_due_date = GTK_TOGGLE_BUTTON (due_date_show_button)->active; - - todo_item_dstatus_highlight_overdue = GTK_TOGGLE_BUTTON(todo_item_highlight_overdue)->active; - todo_item_dstatus_highlight_not_due_yet = GTK_TOGGLE_BUTTON(todo_item_highlight_not_due_yet)->active; - todo_item_dstatus_highlight_due_today = GTK_TOGGLE_BUTTON(todo_item_highlight_due_today)->active; - - todo_show_priority = GTK_TOGGLE_BUTTON (priority_show_button)->active; - - todo_show_time_remaining = GTK_TOGGLE_BUTTON (todo_item_time_remaining_show_button)->active; - - /* storing the values */ - - gnome_config_set_bool("/calendar/Todo/show_time_remain", todo_show_time_remaining); - gnome_config_set_bool("/calendar/Todo/highlight_overdue", todo_item_dstatus_highlight_overdue); - - gnome_config_set_bool("/calendar/Todo/highlight_due_today", todo_item_dstatus_highlight_due_today); - - gnome_config_set_bool("/calendar/Todo/highlight_not_due_yet", todo_item_dstatus_highlight_not_due_yet); - gnome_config_set_bool("/calendar/Todo/show_due_date", todo_show_due_date); - gnome_config_set_bool("/calendar/Todo/show_priority", todo_show_priority); - /* need to sync our config changes. */ - gnome_config_sync (); - - /* apply the current changes */ - todo_properties_changed(); -} - - -/* Callback used when the Apply button is clicked. */ -static void -prop_apply (GtkWidget *w, int page) -{ - switch (page) { - case PROP_TIME_DISPLAY: - prop_apply_time_display (); - break; - - case PROP_COLORS: - prop_apply_colors (); - break; - - case PROP_TODO: - prop_apply_todo (); - break; - - case PROP_ALARMS: - prop_apply_alarms (); - break; - - case -1: - break; - - default: - g_warning ("We have a loose penguin!"); - g_assert_not_reached (); - } -} - -/* Notifies the property box that the data has changed */ -static void -prop_changed (void) -{ - gnome_property_box_changed (GNOME_PROPERTY_BOX (prop_win)); -} - -/* Builds and returns a two-element radio button group surrounded by a frame. The radio buttons are - * stored in the specified variables, and the first radio button's state is set according to the - * specified flag value. The buttons are connected to the prop_changed() function to update the property - * box's dirty state. - */ -static GtkWidget * -build_two_radio_group (char *title, - char *radio_1_title, GtkWidget **radio_1_widget, - char *radio_2_title, GtkWidget **radio_2_widget, - int radio_1_value) -{ - GtkWidget *frame; - GtkWidget *vbox; - - frame = gtk_frame_new (title); - - vbox = gtk_vbox_new (FALSE, 0); - gtk_container_add (GTK_CONTAINER (frame), vbox); - - *radio_1_widget = gtk_radio_button_new_with_label (NULL, radio_1_title); - gtk_box_pack_start (GTK_BOX (vbox), *radio_1_widget, FALSE, FALSE, 0); - - *radio_2_widget = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON (*radio_1_widget), - radio_2_title); - gtk_box_pack_start (GTK_BOX (vbox), *radio_2_widget, FALSE, FALSE, 0); - - gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (*radio_1_widget), radio_1_value); - gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (*radio_2_widget), !radio_1_value); - - gtk_signal_connect (GTK_OBJECT (*radio_1_widget), "toggled", - (GtkSignalFunc) prop_changed, - NULL); - - return frame; -} - -/* Callback invoked when a menu item from the start/end time option menus is selected. It adjusts - * the other menu to the proper time, if needed. - */ -static void -hour_activated (GtkWidget *widget, gpointer data) -{ - int start, end; - - if (data == start_omenu) { - /* Adjust the end menu */ - - start = GPOINTER_TO_INT (gtk_object_get_user_data (GTK_OBJECT (widget))); - end = get_active_index (gtk_option_menu_get_menu (GTK_OPTION_MENU (end_omenu))); - - if (end < start) - gtk_option_menu_set_history (GTK_OPTION_MENU (end_omenu), start); - } else if (data == end_omenu) { - /* Adjust the start menu */ - - end = GPOINTER_TO_INT (gtk_object_get_user_data (GTK_OBJECT (widget))); - start = get_active_index (gtk_option_menu_get_menu (GTK_OPTION_MENU (start_omenu))); - - if (start > end) - gtk_option_menu_set_history (GTK_OPTION_MENU (start_omenu), end); - } else - g_assert_not_reached (); - - gnome_property_box_changed (GNOME_PROPERTY_BOX (prop_win)); -} - -/* Builds an option menu of 24 hours */ -static GtkWidget * -build_hours_menu (GtkWidget **items, int active) -{ - GtkWidget *omenu; - GtkWidget *menu; - int i; - char buf[100]; - struct tm tm; - int am_pm_flag; - - omenu = gtk_option_menu_new (); - menu = gtk_menu_new (); - am_pm_flag = GTK_TOGGLE_BUTTON (time_format_12)->active; - - memset (&tm, 0, sizeof (tm)); - - for (i = 0; i < 24; i++) { - tm.tm_hour = i; - if (am_pm_flag) - strftime (buf, 100, "%I:%M %p", &tm); - else - strftime (buf, 100, "%H:%M", &tm); - - items[i] = gtk_menu_item_new_with_label (buf); - gtk_object_set_user_data (GTK_OBJECT (items[i]), GINT_TO_POINTER (i)); - gtk_signal_connect (GTK_OBJECT (items[i]), "activate", - (GtkSignalFunc) hour_activated, - omenu); - - gtk_menu_append (GTK_MENU (menu), items[i]); - gtk_widget_show (items[i]); - } - - gtk_option_menu_set_menu (GTK_OPTION_MENU (omenu), menu); - gtk_option_menu_set_history (GTK_OPTION_MENU (omenu), active); - return omenu; -} - -/* Creates the time display page in the preferences dialog */ -static void -create_time_display_page (void) -{ - GtkWidget *table; - GtkWidget *vbox; - GtkWidget *frame; - GtkWidget *hbox2; - GtkWidget *hbox3; - GtkWidget *w; - - table = gtk_table_new (2, 2, FALSE); - gtk_container_set_border_width (GTK_CONTAINER (table), GNOME_PAD_SMALL); - gtk_table_set_row_spacings (GTK_TABLE (table), GNOME_PAD_SMALL); - gtk_table_set_col_spacings (GTK_TABLE (table), GNOME_PAD_SMALL); - gnome_property_box_append_page (GNOME_PROPERTY_BOX (prop_win), table, - gtk_label_new (_("Time display"))); - - /* Time format */ - - w = build_two_radio_group (_("Time format"), - _("12-hour (AM/PM)"), &time_format_12, - _("24-hour"), &time_format_24, - am_pm_flag); - gtk_table_attach (GTK_TABLE (table), w, - 0, 1, 0, 1, - GTK_EXPAND | GTK_FILL, - GTK_EXPAND | GTK_FILL, - 0, 0); - - /* Weeks start on */ - - w = build_two_radio_group (_("Weeks start on"), - _("Sunday"), &start_on_sunday, - _("Monday"), &start_on_monday, - !week_starts_on_monday); - gtk_table_attach (GTK_TABLE (table), w, - 0, 1, 1, 2, - GTK_EXPAND | GTK_FILL, - GTK_EXPAND | GTK_FILL, - 0, 0); - - /* Day range */ - - frame = gtk_frame_new (_("Day range")); - gtk_table_attach (GTK_TABLE (table), frame, - 1, 2, 0, 2, - GTK_EXPAND | GTK_FILL, - GTK_EXPAND | GTK_FILL, - 0, 0); - - vbox = gtk_vbox_new (FALSE, GNOME_PAD_SMALL); - gtk_container_set_border_width (GTK_CONTAINER (vbox), GNOME_PAD_SMALL); - gtk_container_add (GTK_CONTAINER (frame), vbox); - - w = gtk_label_new (_("Please select the start and end hours you want\n" - "to be displayed in the day view and week view.\n" - "Times outside this range will not be displayed\n" - "by default.")); - gtk_label_set_justify (GTK_LABEL (w), GTK_JUSTIFY_LEFT); - gtk_misc_set_alignment (GTK_MISC (w), 0.0, 0.0); - gtk_box_pack_start (GTK_BOX (vbox), w, FALSE, FALSE, 0); - - hbox2 = gtk_hbox_new (FALSE, GNOME_PAD); - gtk_box_pack_start (GTK_BOX (vbox), hbox2, FALSE, FALSE, 0); - - /* Day start */ - - hbox3 = gtk_hbox_new (FALSE, GNOME_PAD_SMALL); - gtk_box_pack_start (GTK_BOX (hbox2), hbox3, FALSE, FALSE, 0); - - w = gtk_label_new (_("Day start:")); - gtk_box_pack_start (GTK_BOX (hbox3), w, FALSE, FALSE, 0); - - start_omenu = build_hours_menu (start_items, day_begin); - gtk_box_pack_start (GTK_BOX (hbox3), start_omenu, FALSE, FALSE, 0); - - /* Day end */ - - hbox3 = gtk_hbox_new (FALSE, GNOME_PAD_SMALL); - gtk_box_pack_start (GTK_BOX (hbox2), hbox3, FALSE, FALSE, 0); - - w = gtk_label_new (_("Day end:")); - gtk_box_pack_start (GTK_BOX (hbox3), w, FALSE, FALSE, 0); - - end_omenu = build_hours_menu (end_items, day_end); - gtk_box_pack_start (GTK_BOX (hbox3), end_omenu, FALSE, FALSE, 0); -} - -/* Called when the canvas for the month item is size allocated. We use this to change the canvas' - * scrolling region and the month item's size. - */ -static void -canvas_size_allocate (GtkWidget *widget, GtkAllocation *allocation, gpointer data) -{ - gnome_canvas_item_set (month_item, - "width", (double) (allocation->width - 1), - "height", (double) (allocation->height - 1), - NULL); - - gnome_canvas_set_scroll_region (GNOME_CANVAS (widget), - 0, 0, - allocation->width, allocation->height); -} - -/* Returns a color spec based on the color pickers */ -static char * -color_spec_from_picker (int num) -{ - gushort r, g, b; - - gnome_color_picker_get_i16 (GNOME_COLOR_PICKER (color_pickers[num]), &r, &g, &b, NULL); - - return build_color_spec (r, g, b); -} - -/* Callback used to query color information for the properties box */ -static char * -fetch_color_spec (ColorProp propnum, gpointer data) -{ - return color_spec_from_picker (propnum); -} - -/* Marks fake event days in the month item sample */ -static void -fake_mark_days (void) -{ - static int day_nums[] = { 1, 4, 8, 16, 17, 18, 20, 25, 28 }; /* some random days */ - int first_day_index; - int i; - - first_day_index = gnome_month_item_day2index (GNOME_MONTH_ITEM (month_item), 1); - - for (i = 0; i < (sizeof (day_nums) / sizeof (day_nums[0])); i++) - mark_month_item_index (GNOME_MONTH_ITEM (month_item), first_day_index + day_nums[i] - 1, - fetch_color_spec, NULL); -} - -/* Switches the month item to the current date and highlights the current day's number */ -static void -set_current_day (void) -{ - struct tm tm; - time_t t; - GnomeCanvasItem *item; - int day_index; - - /* Set the date */ - - t = time (NULL); - tm = *localtime (&t); - - gnome_canvas_item_set (month_item, - "year", tm.tm_year + 1900, - "month", tm.tm_mon, - NULL); - - /* Highlight current day */ - - day_index = gnome_month_item_day2index (GNOME_MONTH_ITEM (month_item), tm.tm_mday); - item = gnome_month_item_num2child (GNOME_MONTH_ITEM (month_item), GNOME_MONTH_ITEM_DAY_LABEL + day_index); - gnome_canvas_item_set (item, - "fill_color", color_spec_from_picker (COLOR_PROP_CURRENT_DAY_FG), - "fontset", CURRENT_DAY_FONTSET, - NULL); -} - -/* This is the version of a color spec query function that is appropriate for the preferences dialog */ -static char * -prop_color_func (ColorProp propnum, gpointer data) -{ - return color_spec_from_picker (propnum); -} - -/* Sets the colors of the month item to the current prerences */ -static void -reconfigure_month (void) -{ - colorify_month_item (GNOME_MONTH_ITEM (month_item), prop_color_func, NULL); - fake_mark_days (); - set_current_day (); - - /* Reset prelighting information */ - - month_item_prepare_prelight (GNOME_MONTH_ITEM (month_item), fetch_color_spec, NULL); -} - -/* Callback used when a color is changed */ -static void -color_set (void) -{ - reconfigure_month (); - prop_changed (); -} - -/* Creates the colors page in the preferences dialog */ -static void -create_colors_page (void) -{ - GtkWidget *frame; - GtkWidget *hbox; - GtkWidget *table; - GtkWidget *w; - int i; - - frame = gtk_frame_new (_("Colors for display")); - gtk_container_set_border_width (GTK_CONTAINER (frame), GNOME_PAD_SMALL); - gnome_property_box_append_page (GNOME_PROPERTY_BOX (prop_win), frame, - gtk_label_new (_("Colors"))); - - hbox = gtk_hbox_new (FALSE, GNOME_PAD); - gtk_container_set_border_width (GTK_CONTAINER (hbox), GNOME_PAD_SMALL); - gtk_container_add (GTK_CONTAINER (frame), hbox); - - table = gtk_table_new (COLOR_PROP_LAST, 2, FALSE); - gtk_table_set_col_spacings (GTK_TABLE (table), GNOME_PAD_SMALL); - gtk_box_pack_start (GTK_BOX (hbox), table, FALSE, FALSE, 0); - - /* Create the color pickers */ - - for (i = 0; i < COLOR_PROP_LAST; i++) { - /* Label */ - - w = gtk_label_new (_(color_props[i].label)); - gtk_misc_set_alignment (GTK_MISC (w), 0.0, 0.5); - gtk_table_attach (GTK_TABLE (table), w, - 0, 1, i, i + 1, - GTK_FILL, 0, - 0, 0); - - /* Color picker */ - - color_pickers[i] = gnome_color_picker_new (); - gnome_color_picker_set_title (GNOME_COLOR_PICKER (color_pickers[i]), _(color_props[i].label)); - gnome_color_picker_set_i16 (GNOME_COLOR_PICKER (color_pickers[i]), - color_props[i].r, color_props[i].g, color_props[i].b, 0); - gtk_table_attach (GTK_TABLE (table), color_pickers[i], - 1, 2, i, i + 1, - 0, 0, - 0, 0); - gtk_signal_connect (GTK_OBJECT (color_pickers[i]), "color_set", - (GtkSignalFunc) color_set, - NULL); - } - - /* Create the sample calendar */ - - w = gnome_canvas_new (); - gtk_box_pack_start (GTK_BOX (hbox), w, TRUE, TRUE, 0); - - month_item = gnome_month_item_new (gnome_canvas_root (GNOME_CANVAS (w))); - gnome_canvas_item_set (month_item, - "start_on_monday", week_starts_on_monday, - NULL); - reconfigure_month (); - - gtk_signal_connect (GTK_OBJECT (w), "size_allocate", - canvas_size_allocate, - NULL); - -} - - -static void -set_todo_page_options(void) -{ - - - while (gtk_events_pending ()) - gtk_main_iteration (); -} - -static void -todo_option_set (void) -{ - prop_changed (); - set_todo_page_options (); -} - -/* Creates the colors page in the preferences dialog */ -static GtkWidget * -build_list_options_frame(void) -{ - GtkWidget *frame; - GtkWidget *vbox; - frame = gtk_frame_new (_("Show on TODO List:")); - - vbox = gtk_vbox_new (FALSE, 0); - gtk_container_add (GTK_CONTAINER (frame), vbox); - - due_date_show_button = gtk_check_button_new_with_label (_("Due Date")); - priority_show_button = gtk_check_button_new_with_label (_("Priority")); - todo_item_time_remaining_show_button = gtk_check_button_new_with_label (_("Time Until Due")); - - gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON(due_date_show_button), todo_show_due_date); - gtk_signal_connect (GTK_OBJECT(due_date_show_button), - "clicked", - (GtkSignalFunc) todo_option_set, - NULL); - gtk_box_pack_start (GTK_BOX (vbox), due_date_show_button, FALSE, FALSE, 0); - - gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON(todo_item_time_remaining_show_button), todo_show_time_remaining); - gtk_signal_connect (GTK_OBJECT(todo_item_time_remaining_show_button), - "clicked", - (GtkSignalFunc) todo_option_set, - NULL); - gtk_box_pack_start (GTK_BOX (vbox), todo_item_time_remaining_show_button, FALSE, FALSE, 0); - - - gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON(priority_show_button), todo_show_priority); - gtk_signal_connect (GTK_OBJECT(priority_show_button), - "clicked", - (GtkSignalFunc) todo_option_set, - NULL); - gtk_box_pack_start (GTK_BOX (vbox), priority_show_button, FALSE, FALSE, 0); - return frame; -} -static GtkWidget * -build_style_list_options_frame(void) -{ - GtkWidget *frame; - GtkWidget *vbox; - - frame = gtk_frame_new (_("To Do List style options:")); - - vbox = gtk_vbox_new (FALSE, 0); - gtk_container_add (GTK_CONTAINER (frame), vbox); - - todo_item_highlight_overdue = gtk_check_button_new_with_label (_("Highlight overdue items")); - gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON(todo_item_highlight_overdue), - todo_item_dstatus_highlight_overdue); - todo_item_highlight_not_due_yet = gtk_check_button_new_with_label (_("Highlight not yet due items")); - gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON(todo_item_highlight_not_due_yet), - todo_item_dstatus_highlight_overdue); - todo_item_highlight_due_today = gtk_check_button_new_with_label (_("Highlight items due today")); - gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON(todo_item_highlight_due_today), - todo_item_dstatus_highlight_overdue); - - gtk_signal_connect (GTK_OBJECT(todo_item_highlight_overdue), - "clicked", - (GtkSignalFunc) todo_option_set, - NULL); - gtk_signal_connect (GTK_OBJECT(todo_item_highlight_not_due_yet), - "clicked", - (GtkSignalFunc) todo_option_set, - NULL); - gtk_signal_connect (GTK_OBJECT(todo_item_highlight_due_today), - "clicked", - (GtkSignalFunc) todo_option_set, - NULL); - - gtk_box_pack_start (GTK_BOX (vbox), todo_item_highlight_overdue, FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (vbox), todo_item_highlight_due_today, FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (vbox), todo_item_highlight_not_due_yet, FALSE, FALSE, 0); - return frame; -} -static void -create_todo_page (void) -{ - GtkWidget *frame; - GtkWidget *main_box; - GtkWidget *hbox; - - - frame = gtk_frame_new (_("To Do List Properties")); - gtk_container_set_border_width (GTK_CONTAINER (frame), GNOME_PAD_SMALL); - gnome_property_box_append_page (GNOME_PROPERTY_BOX (prop_win), frame, - gtk_label_new (_("To Do List"))); - - /* first vbox*/ - main_box = gtk_vbox_new(FALSE, GNOME_PAD); - gtk_container_set_border_width (GTK_CONTAINER (main_box), GNOME_PAD_SMALL); - gtk_container_add (GTK_CONTAINER (frame), main_box); - - - /* first hbox*/ - hbox = gtk_hbox_new (FALSE, GNOME_PAD); - gtk_container_set_border_width (GTK_CONTAINER (hbox), GNOME_PAD_SMALL); - gtk_container_add (GTK_CONTAINER (main_box), hbox); - - gtk_box_pack_start (GTK_BOX(hbox), build_list_options_frame(), FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX(hbox), build_style_list_options_frame(), FALSE, FALSE, 0); - - set_todo_page_options(); -} - -/* Creates and displays the preferences dialog for the whole application */ -void -properties (GtkWidget *toplevel) -{ - static GnomeHelpMenuEntry help_entry = { NULL, "properties" }; - - help_entry.name = gnome_app_id; - - if (prop_win) - return; - - prop_win = gnome_property_box_new (); - gtk_window_set_title (GTK_WINDOW (prop_win), _("Preferences")); - gnome_dialog_set_parent (GNOME_DIALOG (prop_win), - GTK_WINDOW (gtk_widget_get_toplevel (toplevel))); - - create_time_display_page (); - create_colors_page (); - create_todo_page (); - create_alarm_page (); - - gtk_signal_connect (GTK_OBJECT (prop_win), "destroy", - (GtkSignalFunc) prop_cancel, NULL); - - gtk_signal_connect (GTK_OBJECT (prop_win), "delete_event", - (GtkSignalFunc) prop_cancel, NULL); - - gtk_signal_connect (GTK_OBJECT (prop_win), "apply", - (GtkSignalFunc) prop_apply, NULL); - - gtk_signal_connect (GTK_OBJECT (prop_win), "help", - GTK_SIGNAL_FUNC (gnome_help_pbox_display), - &help_entry); - - gtk_widget_show_all (prop_win); -} - -char * -build_color_spec (int r, int g, int b) -{ - static char spec[100]; - - sprintf (spec, "#%04x%04x%04x", r, g, b); - return spec; -} - -void -parse_color_spec (char *spec, int *r, int *g, int *b) -{ - g_return_if_fail (spec != NULL); - g_return_if_fail (r != NULL); - g_return_if_fail (r != NULL); - g_return_if_fail (r != NULL); - - if (sscanf (spec, "#%04x%04x%04x", r, g, b) != 3) { - g_warning ("Invalid color specification %s, returning black", spec); - - *r = *g = *b = 0; - } -} - -char * -color_spec_from_prop (ColorProp propnum) -{ - return build_color_spec (color_props[propnum].r, color_props[propnum].g, color_props[propnum].b); -} - -static void -create_alarm_page (void) -{ - GtkWidget *main_box; - GtkWidget *default_frame; - GtkWidget *default_table; - GtkWidget *misc_frame; - GtkWidget *misc_box; - GtkWidget *box, *l; - - main_box = gtk_vbox_new (FALSE, GNOME_PAD); - gtk_container_set_border_width (GTK_CONTAINER (main_box), GNOME_PAD_SMALL); - gnome_property_box_append_page (GNOME_PROPERTY_BOX (prop_win), - main_box, gtk_label_new (_("Alarms"))); - - /* build miscellaneous box */ - misc_frame = gtk_frame_new (_("Alarm Properties")); - gtk_container_set_border_width (GTK_CONTAINER (misc_frame), - GNOME_PAD_SMALL); - misc_box = gtk_vbox_new (FALSE, GNOME_PAD); - - gtk_container_set_border_width (GTK_CONTAINER (misc_frame), GNOME_PAD_SMALL); - gtk_container_add (GTK_CONTAINER (misc_frame), misc_box); - - gtk_box_pack_start (GTK_BOX (main_box), misc_frame, FALSE, FALSE, 0); - - enable_display_beep = gtk_check_button_new_with_label (_("Beep on display alarms")); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (enable_display_beep), - beep_on_display); - gtk_box_pack_start (GTK_BOX (misc_box), enable_display_beep, FALSE, FALSE, 0); - gtk_signal_connect (GTK_OBJECT (enable_display_beep), "toggled", - (GtkSignalFunc) prop_changed, - NULL); - - /* audio timeout widgets */ - box = gtk_hbox_new (FALSE, GNOME_PAD); - to_cb = gtk_check_button_new_with_label (_("Audio alarms timeout after")); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (to_cb), - enable_aalarm_timeout); - gtk_signal_connect (GTK_OBJECT (to_cb), "toggled", - (GtkSignalFunc) to_cb_changed, NULL); - gtk_box_pack_start (GTK_BOX (box), to_cb, FALSE, FALSE, 0); - to_spin = make_spin_button (audio_alarm_timeout, 1, MAX_AALARM_TIMEOUT); - gtk_widget_set_sensitive (to_spin, enable_aalarm_timeout); - gtk_signal_connect (GTK_OBJECT (to_spin), "changed", - (GtkSignalFunc) prop_changed, NULL); - gtk_box_pack_start (GTK_BOX (box), to_spin, FALSE, FALSE, 0); - l = gtk_label_new (_(" seconds")); - gtk_box_pack_start (GTK_BOX (box), l, FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (misc_box), box, FALSE, FALSE, 0); - - /* snooze widgets */ - box = gtk_hbox_new (FALSE, GNOME_PAD); - snooze_cb = gtk_check_button_new_with_label (_("Enable snoozing for ")); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (snooze_cb), - enable_snooze); - gtk_signal_connect (GTK_OBJECT (snooze_cb), "toggled", - (GtkSignalFunc) snooze_cb_changed, NULL); - gtk_box_pack_start (GTK_BOX (box), snooze_cb, FALSE, FALSE, 0); - snooze_spin = make_spin_button (snooze_secs, 1, MAX_SNOOZE_SECS); - gtk_widget_set_sensitive (snooze_spin, enable_snooze); - gtk_signal_connect (GTK_OBJECT (snooze_spin), "changed", - (GtkSignalFunc) prop_changed, NULL); - gtk_box_pack_start (GTK_BOX (box), snooze_spin, FALSE, FALSE, 0); - l = gtk_label_new (_(" seconds")); - gtk_box_pack_start (GTK_BOX (box), l, FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (misc_box), box, FALSE, FALSE, 0); - - /* populate default frame/box */ - default_frame = gtk_frame_new (_("Defaults")); - gtk_container_set_border_width (GTK_CONTAINER (default_frame), GNOME_PAD_SMALL); - gtk_box_pack_start (GTK_BOX (main_box), default_frame, FALSE, FALSE, 0); - default_table = gtk_table_new (1, 1, 0); - gtk_container_set_border_width (GTK_CONTAINER (default_table), 4); - gtk_table_set_row_spacings (GTK_TABLE (default_table), 4); - gtk_table_set_col_spacings (GTK_TABLE (default_table), 4); - gtk_container_add (GTK_CONTAINER (default_frame), default_table); - -#warning "FIX ME" - /* - ee_create_ae (GTK_TABLE (default_table), _("Display"), - &alarm_defaults [ALARM_DISPLAY], ALARM_DISPLAY, 1, - FALSE, prop_changed); - ee_create_ae (GTK_TABLE (default_table), _("Audio"), - &alarm_defaults [ALARM_AUDIO], ALARM_AUDIO, 2, - FALSE, prop_changed); - ee_create_ae (GTK_TABLE (default_table), _("Program"), - &alarm_defaults [ALARM_PROGRAM], ALARM_PROGRAM, 3, - FALSE, prop_changed); - ee_create_ae (GTK_TABLE (default_table), _("Mail"), - &alarm_defaults [ALARM_MAIL], ALARM_MAIL, 4, - FALSE, prop_changed); - */ -} - -static void -prop_store_alarm_default_values (CalendarAlarm* alarm) -{ -#warning "FIX ME" - // ee_store_alarm (alarm, alarm->type); - - switch (alarm->type) { - case ALARM_DISPLAY: - gnome_config_push_prefix ("/calendar/alarms/def_disp_"); - break; - case ALARM_AUDIO: - gnome_config_push_prefix ("/calendar/alarms/def_audio_"); - break; - case ALARM_PROGRAM: - gnome_config_push_prefix ("/calendar/alarms/def_prog_"); - break; - case ALARM_MAIL: - gnome_config_push_prefix ("/calendar/alarms/def_mail_"); - break; - } - - gnome_config_set_int ("enabled", alarm->enabled); - gnome_config_set_int ("count", alarm->count); - gnome_config_set_int ("units", alarm->units); - if (alarm->data) - gnome_config_set_string ("data", alarm->data); - - gnome_config_pop_prefix (); - gnome_config_sync (); -} - -static void -prop_apply_alarms () -{ - int i; - for (i=0; i < 4; i++) - prop_store_alarm_default_values (&alarm_defaults [i]); - - beep_on_display = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (enable_display_beep)); - gnome_config_set_bool ("/calendar/alarms/beep_on_display", beep_on_display); - enable_aalarm_timeout = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (to_cb)); - gnome_config_set_bool ("/calendar/alarms/enable_audio_timeout", enable_aalarm_timeout); - audio_alarm_timeout = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (to_spin)); - gnome_config_set_int ("/calendar/alarms/audio_alarm_timeout", audio_alarm_timeout); - enable_snooze = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (snooze_cb)); - gnome_config_set_bool ("/calendar/alarms/enable_snooze", enable_snooze); - snooze_secs = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (snooze_spin)); - gnome_config_set_int ("/calendar/alarms/snooze_secs", snooze_secs); - - gnome_config_sync(); -} - -static void -to_cb_changed (GtkWidget *object, gpointer data) -{ - gboolean active = - gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (to_cb)); - gtk_widget_set_sensitive (to_spin, active); - prop_changed (); -} - -static void -snooze_cb_changed (GtkWidget *object, gpointer data) -{ - gboolean active = - gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (snooze_cb)); - gtk_widget_set_sensitive (snooze_spin, active); - prop_changed (); -} - - diff --git a/calendar/gui/recur.xpm b/calendar/gui/recur.xpm deleted file mode 100644 index 49836b62e7..0000000000 --- a/calendar/gui/recur.xpm +++ /dev/null @@ -1,83 +0,0 @@ -/* XPM */ -static char * recur_xpm[] = { -"16 16 64 1", -" c None", -". c #350000", -"+ c #2A0000", -"@ c #1B0000", -"# c #280000", -"$ c #430000", -"% c #090000", -"& c #160000", -"* c #250000", -"= c #460000", -"- c #550000", -"; c #610000", -"> c #0D0000", -", c #1F0000", -"' c #4B0000", -") c #5E0000", -"! c #6B0000", -"~ c #750000", -"{ c #790000", -"] c #810000", -"^ c #FFFF83", -"/ c #FFFF89", -"( c #FFFF93", -"_ c #8B0000", -": c #900000", -"< c #930000", -"[ c #FFFF62", -"} c #A10000", -"| c #FFFF41", -"1 c #FFFF3B", -"2 c #FFFF31", -"3 c #B70000", -"4 c #B20000", -"5 c #AE0000", -"6 c #FFFF22", -"7 c #FFFF16", -"8 c #FFFF06", -"9 c #C90000", -"0 c #C10000", -"a c #BB0000", -"b c #FFF600", -"c c #FFE100", -"d c #FFC500", -"e c #E40000", -"f c #D70000", -"g c #CD0000", -"h c #FFDB00", -"i c #FFA900", -"j c #FF8500", -"k c #FF5900", -"l c #FF2800", -"m c #FC0000", -"n c #ED0000", -"o c #E10000", -"p c #FFAF00", -"q c #FF9400", -"r c #FF7400", -"s c #FF5000", -"t c #FF0100", -"u c #F30000", -"v c #E80000", -"w c #FF6900", -"x c #FF4900", -"y c #FF0800", -" ", -" . ", -" +. ", -" @#.$ ", -" %&*.=-; ", -" >,.')!~ ", -" &. !{] ", -" ^/( . _:< ", -" [[[ }}} ", -" |12 345 ", -" 678 90a ", -" bcd efg ", -" hdijklmnof ", -" pqrsltuv ", -" wxly ", -" "}; diff --git a/calendar/gui/test.vcf b/calendar/gui/test.vcf deleted file mode 100644 index bfe93b3c14..0000000000 --- a/calendar/gui/test.vcf +++ /dev/null @@ -1,133 +0,0 @@ -BEGIN:VCALENDAR -PRODID:-//GNOME//NONSGML GnomeCalendar//EN -TZ:MST -VERSION:0.13 -BEGIN:VEVENT -UID:KOrganizer - 846930886 -SEQUENCE:1 -DTSTART:19980601T150000 -DTEND:19980601T150000 -DCREATED:19980402T023558 -LAST-MODIFIED:19980402T023558 -SUMMARY:Cada dos dias de 06/01 al 07/01 -STATUS:NEEDS ACTION -CLASS:PUBLIC -PRIORITY:0 -TRANSP:0 -RELATED-TO:0 -RRULE:D2 19980701T140000 -END:VEVENT - -BEGIN:VEVENT -UID:KOrganizer - 846930886 -SEQUENCE:1 -DTSTART:19980501T140000 -DTEND:19980501T140000 -DCREATED:19980402T023558 -LAST-MODIFIED:19980402T023558 -SUMMARY:5 dias. -STATUS:NEEDS ACTION -CLASS:PUBLIC -PRIORITY:0 -TRANSP:0 -RELATED-TO:0 -RRULE:D1 #5 -END:VEVENT - -BEGIN:VEVENT -UID:KOrganizer - 846930886 -SEQUENCE:1 -DTSTART:19980501T140000 -DTEND:19980501T150000 -DCREATED:19980402T023558 -LAST-MODIFIED:19980429T004635 -SUMMARY:Diariamente de 05/01 al 06/01 -STATUS:NEEDS ACTION -CLASS:PRIVATE -PRIORITY:0 -TRANSP:0 -RELATED-TO:0 -RRULE:D1 19980601T000000 -END:VEVENT - -BEGIN:VEVENT -UID:KOrganizer - 1804289383 -SEQUENCE:1 -DTSTART:19980415T010000 -DTEND:19980415T013000 -DCREATED:19980402T023552 -LAST-MODIFIED:19980330T225948 -SUMMARY:Diario durante 5 dias -STATUS:NEEDS ACTION -CLASS:PUBLIC -PRIORITY:0 -TRANSP:0 -RELATED-TO:0 -RRULE:D1 #5 -END:VEVENT - -BEGIN:VEVENT -UID:KOrganizer - 1804289383 -SEQUENCE:1 -DTSTART:19980415T010000 -DTEND:19980415T013000 -DCREATED:19980402T023552 -LAST-MODIFIED:19980330T225948 -SUMMARY:Diario durante 5 dias -STATUS:NEEDS ACTION -CLASS:PUBLIC -PRIORITY:0 -TRANSP:0 -RELATED-TO:0 -RRULE:D1 #5 -END:VEVENT - -BEGIN:VTODO -UID:KOrganizer - 846930886 -SEQUENCE:1 -DTSTART:19980415T140000 -DUE:19691231T180000 -DCREATED:19980402T023558 -LAST-MODIFIED:19980402T023558 -SUMMARY:Normal -STATUS:NEEDS ACTION -CLASS:PUBLIC -PRIORITY:0 -TRANSP:0 -RELATED-TO:0 -END:VTODO - -BEGIN:VTODO -UID:KOrganizer - 1804289383 -SEQUENCE:1 -DTSTART:19980415T120000 -DUE:19691231T180000 -DCREATED:19980402T023552 -LAST-MODIFIED:19980330T225948 -SUMMARY:Semanal -- 4 semanas -STATUS:NEEDS ACTION -CLASS:PUBLIC -PRIORITY:0 -TRANSP:0 -RELATED-TO:0 -RRULE:W1 WE #4 -END:VTODO - -BEGIN:VTODO -UID:KOrganizer - 1804289383 -SEQUENCE:1 -DTSTART:19980415T003000 -DUE:19691231T180000 -DCREATED:19980402T023552 -LAST-MODIFIED:19980330T225948 -SUMMARY:Semana: Mi, Ju, Vi, Dom (10 veces) -STATUS:NEEDS ACTION -CLASS:PUBLIC -PRIORITY:0 -TRANSP:0 -RELATED-TO:0 -RRULE:W1 SU WE TH FR #10 -END:VTODO - -END:VCALENDAR - diff --git a/calendar/gui/test2.vcf b/calendar/gui/test2.vcf deleted file mode 100644 index 6446507989..0000000000 --- a/calendar/gui/test2.vcf +++ /dev/null @@ -1,133 +0,0 @@ -BEGIN:VCALENDAR -PRODID:-//GNOME//NONSGML GnomeCalendar//EN -TZ:MST -VERSION:0.13 -BEGIN:VEVENT -UID:KOrganizer - 8469308861 -SEQUENCE:1 -DTSTART:19980601T150000 -DTEND:19980601T150000 -DCREATED:19980402T023558 -LAST-MODIFIED:19980402T023558 -SUMMARY:Cada dos dias de 06/01 al 07/01 -STATUS:NEEDS ACTION -CLASS:PUBLIC -PRIORITY:0 -TRANSP:0 -RELATED-TO:0 -RRULE:D2 19980701T140000 -END:VEVENT - -BEGIN:VEVENT -UID:KOrganizer - 8469308862 -SEQUENCE:1 -DTSTART:19980501T140000 -DTEND:19980501T140000 -DCREATED:19980402T023558 -LAST-MODIFIED:19980402T023558 -SUMMARY:5 dias. -STATUS:NEEDS ACTION -CLASS:PUBLIC -PRIORITY:0 -TRANSP:0 -RELATED-TO:0 -RRULE:D1 #5 -END:VEVENT - -BEGIN:VEVENT -UID:KOrganizer - 8469308863 -SEQUENCE:1 -DTSTART:19980501T140000 -DTEND:19980501T150000 -DCREATED:19980402T023558 -LAST-MODIFIED:19980429T004635 -SUMMARY:Diariamente de 05/01 al 06/01 -STATUS:NEEDS ACTION -CLASS:PRIVATE -PRIORITY:0 -TRANSP:0 -RELATED-TO:0 -RRULE:D1 19980601T000000 -END:VEVENT - -BEGIN:VEVENT -UID:KOrganizer - 18042893834 -SEQUENCE:1 -DTSTART:19980415T010000 -DTEND:19980415T013000 -DCREATED:19980402T023552 -LAST-MODIFIED:19980330T225948 -SUMMARY:Diario durante 5 dias -STATUS:NEEDS ACTION -CLASS:PUBLIC -PRIORITY:0 -TRANSP:0 -RELATED-TO:0 -RRULE:D1 #5 -END:VEVENT - -BEGIN:VEVENT -UID:KOrganizer - 18042893835 -SEQUENCE:1 -DTSTART:19980415T010000 -DTEND:19980415T013000 -DCREATED:19980402T023552 -LAST-MODIFIED:19980330T225948 -SUMMARY:Diario durante 5 dias -STATUS:NEEDS ACTION -CLASS:PUBLIC -PRIORITY:0 -TRANSP:0 -RELATED-TO:0 -RRULE:D1 #5 -END:VEVENT - -BEGIN:VTODO -UID:KOrganizer - 8469308866 -SEQUENCE:1 -DTSTART:19980415T140000 -DUE:19691231T180000 -DCREATED:19980402T023558 -LAST-MODIFIED:19980402T023558 -SUMMARY:Normal -STATUS:NEEDS ACTION -CLASS:PUBLIC -PRIORITY:0 -TRANSP:0 -RELATED-TO:0 -END:VTODO - -BEGIN:VTODO -UID:KOrganizer - 18042893837 -SEQUENCE:1 -DTSTART:19980415T120000 -DUE:19691231T180000 -DCREATED:19980402T023552 -LAST-MODIFIED:19980330T225948 -SUMMARY:Semanal -- 4 semanas -STATUS:NEEDS ACTION -CLASS:PUBLIC -PRIORITY:0 -TRANSP:0 -RELATED-TO:0 -RRULE:W1 WE #4 -END:VTODO - -BEGIN:VTODO -UID:KOrganizer - 18042893838 -SEQUENCE:1 -DTSTART:19980415T003000 -DUE:19691231T180000 -DCREATED:19980402T023552 -LAST-MODIFIED:19980330T225948 -SUMMARY:Semana: Mi, Ju, Vi, Dom (10 veces) -STATUS:NEEDS ACTION -CLASS:PUBLIC -PRIORITY:0 -TRANSP:0 -RELATED-TO:0 -RRULE:W1 SU WE TH FR #10 -END:VTODO - -END:VCALENDAR - diff --git a/calendar/gui/todo-conduit-control-applet.c b/calendar/gui/todo-conduit-control-applet.c deleted file mode 100644 index 54a26715ef..0000000000 --- a/calendar/gui/todo-conduit-control-applet.c +++ /dev/null @@ -1,287 +0,0 @@ -/* Control applet ("capplet") for the gnome-pilot todo conduit, */ -/* based on */ -/* gpilotd control applet ('capplet') for use with the GNOME control center */ -/* $Id$ */ - -#include -#include -#include -#include - -#include -#include - -#include -#include -#include - -#include "todo-conduit.h" - -/* tell changes callbacks to ignore changes or not */ -static gboolean ignore_changes=FALSE; - -/* capplet widget */ -static GtkWidget *capplet=NULL; - -/* host/device/pilot configuration windows */ -GtkWidget *cfgOptionsWindow=NULL; -GtkWidget *cfgStateWindow=NULL; -GtkWidget *dialogWindow=NULL; - -gboolean activated,org_activation_state; -GnomePilotConduitMgmt *conduit; - -static void doTrySettings(GtkWidget *widget, ConduitCfg *conduitCfg); -static void doRevertSettings(GtkWidget *widget, ConduitCfg *conduitCfg); -static void doSaveSettings(GtkWidget *widget, ConduitCfg *conduitCfg); - -static void readStateCfg(GtkWidget *w); -static void setStateCfg(GtkWidget *w); - -gint pilotId; -CORBA_Environment ev; - -static void -doTrySettings(GtkWidget *widget, ConduitCfg *conduitCfg) -{ - readStateCfg(cfgStateWindow); - if(activated) - gpilotd_conduit_mgmt_enable(conduit,pilotId,GnomePilotConduitSyncTypeSynchronize); - else - gpilotd_conduit_mgmt_disable(conduit,pilotId); -} - -static void -doSaveSettings(GtkWidget *widget, ConduitCfg *conduitCfg) -{ - doTrySettings(widget, conduitCfg); - save_configuration(NULL); -} - - -static void -doRevertSettings(GtkWidget *widget, ConduitCfg *conduitCfg) -{ - activated = org_activation_state; - setStateCfg(cfgStateWindow); -} - -static void -insert_dir_callback (GtkEditable *editable, const gchar *text, - gint len, gint *position, void *data) -{ - gint i; - gchar *curname; - - curname = gtk_entry_get_text(GTK_ENTRY(editable)); - if (*curname == '\0' && len > 0) { - if (isspace(text[0])) { - gtk_signal_emit_stop_by_name(GTK_OBJECT(editable), "insert_text"); - return; - } - } else { - for (i=0; i"),NULL}; - - about = gnome_about_new(_("Gpilotd todo conduit"), VERSION, - _("(C) 1998 the Free Software Foundation"), - authors, - _("Configuration utility for the todo conduit.\n"), - _("gnome-unknown.xpm")); - gtk_widget_show (about); - - return; -} - -static void toggled_cb(GtkWidget *widget, gpointer data) { - gtk_widget_set_sensitive(cfgOptionsWindow,GTK_TOGGLE_BUTTON(widget)->active); - capplet_widget_state_changed(CAPPLET_WIDGET(capplet), TRUE); -} - -static GtkWidget -*createStateCfgWindow(void) -{ - GtkWidget *vbox, *table; - GtkWidget *entry, *label; - GtkWidget *button; - - vbox = gtk_vbox_new(FALSE, GNOME_PAD); - - table = gtk_table_new(2, 2, FALSE); - gtk_table_set_row_spacings(GTK_TABLE(table), 4); - gtk_table_set_col_spacings(GTK_TABLE(table), 10); - gtk_box_pack_start(GTK_BOX(vbox), table, FALSE, FALSE, GNOME_PAD); - - label = gtk_label_new(_("Enabled")); - gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 1,2); - - button = gtk_check_button_new(); - gtk_object_set_data(GTK_OBJECT(vbox), "conduit_on_off", button); - gtk_signal_connect(GTK_OBJECT(button), "toggled", - GTK_SIGNAL_FUNC(toggled_cb), - NULL); - gtk_table_attach_defaults(GTK_TABLE(table), button, 1, 2, 1,2); - - return vbox; -} - -static void -setStateCfg(GtkWidget *cfg) -{ - GtkWidget *button; - gchar num[40]; - - button = gtk_object_get_data(GTK_OBJECT(cfg), "conduit_on_off"); - - g_assert(button!=NULL); - - ignore_changes = TRUE; - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button),activated); - gtk_widget_set_sensitive(cfgOptionsWindow,GTK_TOGGLE_BUTTON(button)->active); - ignore_changes = FALSE; -} - - -static void -readStateCfg(GtkWidget *cfg) -{ - GtkWidget *button; - - button = gtk_object_get_data(GTK_OBJECT(cfg), "conduit_on_off"); - - g_assert(button!=NULL); - - activated = GTK_TOGGLE_BUTTON(button)->active; -} - -static void -pilot_capplet_setup(void) -{ - GtkWidget *frame, *table; - - capplet = capplet_widget_new(); - - table = gtk_table_new(1, 2, FALSE); - gtk_container_border_width(GTK_CONTAINER(table), GNOME_PAD); - gtk_container_add(GTK_CONTAINER(capplet), table); - - frame = gtk_frame_new(_("Conduit state")); - gtk_container_border_width(GTK_CONTAINER(frame), GNOME_PAD_SMALL); - gtk_table_attach_defaults(GTK_TABLE(table), frame, 0, 1, 0, 1); - cfgStateWindow = createStateCfgWindow(); - gtk_container_add(GTK_CONTAINER(frame), cfgStateWindow); - - gtk_signal_connect(GTK_OBJECT(capplet), "try", - GTK_SIGNAL_FUNC(doTrySettings), NULL); - gtk_signal_connect(GTK_OBJECT(capplet), "revert", - GTK_SIGNAL_FUNC(doRevertSettings), NULL); - gtk_signal_connect(GTK_OBJECT(capplet), "ok", - GTK_SIGNAL_FUNC(doSaveSettings), NULL); - gtk_signal_connect(GTK_OBJECT(capplet), "help", - GTK_SIGNAL_FUNC(about_cb), NULL); - - - setStateCfg(cfgStateWindow); - - gtk_widget_show_all(capplet); -} - -void run_error_dialog(gchar *mesg,...) { - char tmp[80]; - va_list ap; - - va_start(ap,mesg); - vsnprintf(tmp,79,mesg,ap); - dialogWindow = gnome_message_box_new(mesg,GNOME_MESSAGE_BOX_ERROR,GNOME_STOCK_BUTTON_OK,NULL); - gnome_dialog_run_and_close(GNOME_DIALOG(dialogWindow)); - va_end(ap); -} - -gint get_pilot_id_from_gpilotd() { - gint *pilots; - int i; - - i=0; - gpilotd_get_pilot_ids(&pilots); - if(pilots) { - while(pilots[i]!=-1) { g_message("pilot %d = \"%d\"",i,pilots[i]); i++; } - if(i==0) { - run_error_dialog(_("No pilot configured, please choose the\n'Pilot Link Properties' capplet first.")); - return -1; - } else { - if(i==1) - return pilots[0]; - else { - g_message("too many pilots..."); - return pilots[0]; - } - } - } else { - run_error_dialog(_("No pilot configured, please choose the\n'Pilot Link Properties' capplet first.")); - return -1; - } -} - -int -main( int argc, char *argv[] ) -{ - /* we're a capplet */ - gnome_capplet_init ("todo conduit control applet", NULL, argc, argv, - NULL, - 0, NULL); - - /* put all code to set things up in here */ - conduit = gpilotd_conduit_mgmt_new("todo_conduit"); - - /* get pilot name from gpilotd */ - /* 1. initialize the gpilotd connection */ - if (gpilotd_init(&argc,argv)!=0) { - run_error_dialog(_("Cannot initialze the GnomePilot Daemon")); - g_error(_("Cannot initialze the GnomePilot Daemon")); - return -1; - } - - /* 2 connect to gpilotd */ - if (gpilotd_connect()!=0) { - run_error_dialog(_("Cannot connect to the GnomePilot Daemon")); - g_error(_("Cannot connect to the GnomePilot Daemon")); - return -1; - } - - pilotId = get_pilot_id_from_gpilotd(); - if(!pilotId) return -1; - org_activation_state = activated = gpilotd_conduit_mgmt_is_enabled(conduit,pilotId); - - pilot_capplet_setup(); - - - /* done setting up, now run main loop */ - capplet_gtk_main(); - return 0; -} diff --git a/calendar/gui/todo-conduit-control-applet.desktop b/calendar/gui/todo-conduit-control-applet.desktop deleted file mode 100644 index a817e16843..0000000000 --- a/calendar/gui/todo-conduit-control-applet.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Name=Todo conduit -Name[da]=Udstående -Name[no]=Oppgaver -Comment=Configure the todo conduit -Comment[da]=Konfigurér Udstående -Comment[no]=Konfigurér oppgavelisten -Exec=todo-conduit-control-applet --cap-id=1 -Terminal=0 -Type=Application diff --git a/calendar/gui/todo-conduit.c b/calendar/gui/todo-conduit.c deleted file mode 100644 index 3a543816af..0000000000 --- a/calendar/gui/todo-conduit.c +++ /dev/null @@ -1,256 +0,0 @@ -/* $Id$ */ - -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "todo-conduit.h" - -static gint -load_records(GnomePilotConduit *c) -{ - return 0; -} - -static gint -pre_sync(GnomePilotConduit *c, GnomePilotDBInfo *dbi) { - int l; - unsigned char *buf; - - gtk_object_set_data(GTK_OBJECT(c),"dbinfo",dbi); - - load_records(c); - - buf = (unsigned char*)g_malloc(0xffff); - if((l=dlp_ReadAppBlock(dbi->pilot_socket,dbi->db_handle,0,(unsigned char *)buf,0xffff))<0) { - return -1; - } - unpack_ToDoAppInfo(&(GET_DATA(c)->ai),buf,l); - g_free(buf); - - return 0; -} - -static gint -post_sync(GnomePilotConduit *c) { - return 0; -} - -static gint -match_record (GnomePilotConduitStandardAbs *pilot_conduit_standard_abs, - LocalRecord **local, - PilotRecord *remote, - gpointer data) -{ - g_print ("in match_record\n"); - return 0; -} -static gint -free_match (GnomePilotConduitStandardAbs *pilot_conduit_standard_abs, - LocalRecord **local, - gpointer data) -{ - g_print ("entering free_match\n"); - *local = NULL; - - return 0; -} -static gint -archive_local (GnomePilotConduitStandardAbs *pilot_conduit_standard_abs, - LocalRecord *local, - gpointer data) -{ - g_print ("entering archive_local\n"); - return 1; - -} -static gint -archive_remote (GnomePilotConduitStandardAbs *pilot_conduit_standard_abs, - LocalRecord *local, - PilotRecord *remote, - gpointer data) -{ - g_print ("entering archive_remote\n"); - return 1; -} -static gint -store_remote (GnomePilotConduitStandardAbs *pilot_conduit_standard_abs, - PilotRecord *remote, - gpointer data) -{ - g_print ("entering store_remote\n"); - g_print ("Rec:%s:\nLength:%d\n", remote->record, remote->length); - return 1; -} -static gint -clear_status_archive_local (GnomePilotConduitStandardAbs *pilot_conduit_standard_abs, - LocalRecord *local, - gpointer data) -{ - g_print ("entering clear_status_archive_local\n"); - return 1; -} -static gint -iterate (GnomePilotConduitStandardAbs *pilot_conduit_standard_abs, - LocalRecord **local, - gpointer data) -{ - g_print ("entering iterate\n"); - return 1; -} -static gint -iterate_specific (GnomePilotConduitStandardAbs *pilot_conduit_standard_abs, - LocalRecord **local, - gint flag, - gint archived, - gpointer data) -{ - g_print ("entering iterate_specific\n"); - return 1; -} -static gint -purge (GnomePilotConduitStandardAbs *pilot_conduit_standard_abs, - gpointer data) -{ - g_print ("entering purge\n"); - return 1; -} -static gint -set_status (GnomePilotConduitStandardAbs *pilot_conduit_standard_abs, - LocalRecord *local, - gint status, - gpointer data) -{ - g_print ("entering set_status\n"); - return 1; -} -static gint -set_archived (GnomePilotConduitStandardAbs *pilot_conduit_standard_abs, - LocalRecord *local, - gint archived, - gpointer data) -{ - g_print ("entering set_archived\n"); - return 1; -} -static gint -set_pilot_id (GnomePilotConduitStandardAbs *pilot_conduit_standard_abs, - LocalRecord *local, - guint32 ID, - gpointer data) -{ - g_print ("entering set_pilot_id\n"); - return 1; -} -static gint -compare (GnomePilotConduitStandardAbs *pilot_conduit_standard_abs, - LocalRecord *local, - PilotRecord *remote, - gpointer data) -{ - g_print ("entering compare\n"); - return 1; -} -static gint -compare_backup (GnomePilotConduitStandardAbs *pilot_conduit_standard_abs, - LocalRecord *local, - PilotRecord *remote, - gpointer data) -{ - g_print ("entering compare_backup\n"); - return 1; -} -static gint -free_transmit (GnomePilotConduitStandardAbs *pilot_conduit_standard_abs, - LocalRecord *local, - PilotRecord *remote, - gpointer data) -{ - g_print ("entering free_transmit\n"); - return 1; -} -static gint -delete_all (GnomePilotConduitStandardAbs *pilot_conduit_standard_abs, - gpointer data) -{ - g_print ("entering delete_all\n"); - return 1; -} -static PilotRecord * -transmit (GnomePilotConduitStandardAbs *pilot_conduit_standard_abs, - LocalRecord *local, - gpointer data) -{ - g_print ("entering transmit\n"); - return NULL; -} - -static GnomePilotConduit * -conduit_get_gpilot_conduit (guint32 pilotId) -{ - GtkObject *retval; - ConduitCfg *cfg; - ConduitData *cdata; - - g_print ("creating our new conduit\n"); - retval = gnome_pilot_conduit_standard_abs_new ("TodoDB", 0x0); - g_assert (retval != NULL); - gnome_pilot_conduit_construct(GNOME_PILOT_CONDUIT(retval),"todo"); - - cfg = g_new0(ConduitCfg,1); - g_assert(cfg != NULL); - gtk_object_set_data(retval,"conduit_cfg",cfg); - - cdata = g_new0(ConduitData,1); - g_assert(cdata != NULL); - gtk_object_set_data(retval,"conduit_data",cdata); - - gtk_signal_connect (retval, "match_record", (GtkSignalFunc) match_record, NULL); - gtk_signal_connect (retval, "free_match", (GtkSignalFunc) free_match, NULL); - gtk_signal_connect (retval, "archive_local", (GtkSignalFunc) archive_local, NULL); - gtk_signal_connect (retval, "archive_remote", (GtkSignalFunc) archive_remote, NULL); - gtk_signal_connect (retval, "store_remote", (GtkSignalFunc) store_remote, NULL); - gtk_signal_connect (retval, "clear_status_archive_local", (GtkSignalFunc) clear_status_archive_local, NULL); - gtk_signal_connect (retval, "iterate", (GtkSignalFunc) iterate, NULL); - gtk_signal_connect (retval, "iterate_specific", (GtkSignalFunc) iterate_specific, NULL); - gtk_signal_connect (retval, "purge", (GtkSignalFunc) purge, NULL); - gtk_signal_connect (retval, "set_status", (GtkSignalFunc) set_status, NULL); - gtk_signal_connect (retval, "set_archived", (GtkSignalFunc) set_archived, NULL); - gtk_signal_connect (retval, "set_pilot_id", (GtkSignalFunc) set_pilot_id, NULL); - gtk_signal_connect (retval, "compare", (GtkSignalFunc) compare, NULL); - gtk_signal_connect (retval, "compare_backup", (GtkSignalFunc) compare_backup, NULL); - gtk_signal_connect (retval, "free_transmit", (GtkSignalFunc) free_transmit, NULL); - gtk_signal_connect (retval, "delete_all", (GtkSignalFunc) delete_all, NULL); - gtk_signal_connect (retval, "transmit", (GtkSignalFunc) transmit, NULL); - gtk_signal_connect (retval, "pre_sync", (GtkSignalFunc) pre_sync, NULL); - gtk_signal_connect (retval, "post_sync", (GtkSignalFunc) post_sync, NULL); - - load_configuration(&cfg,pilotId); - - return GNOME_PILOT_CONDUIT (retval); -} -static void -conduit_destroy_gpilot_conduit (GnomePilotConduit *conduit) -{ - ConduitCfg *cc; - cc = GET_CONFIG(conduit); - destroy_configuration(&cc); - gtk_object_destroy (GTK_OBJECT (conduit)); -} - - diff --git a/calendar/gui/todo-conduit.h b/calendar/gui/todo-conduit.h deleted file mode 100644 index c224b2b1f3..0000000000 --- a/calendar/gui/todo-conduit.h +++ /dev/null @@ -1,59 +0,0 @@ -/* $Id$ */ - -#ifndef __TODO_CONDUIT_H__ -#define __TODO_CONDUIT_H__ - -#include -#include -#include -#include -#include - -typedef struct _ConduitCfg ConduitCfg; - -struct _ConduitCfg { - gboolean open_secret; - guint32 pilotId; -}; - -#define GET_CONFIG(c) ((ConduitCfg*)gtk_object_get_data(GTK_OBJECT(c),"conduit_cfg")) - -typedef struct _ConduitData ConduitData; - -struct _ConduitData { - struct ToDoAppInfo ai; -}; - -#define GET_DATA(c) ((ConduitData*)gtk_object_get_data(GTK_OBJECT(c),"conduit_data")) - -static void load_configuration(ConduitCfg **c,guint32 pilotId) { - gchar prefix[256]; - g_snprintf(prefix,255,"/gnome-pilot.d/todod-conduit/Pilot_%u/",pilotId); - - *c = g_new0(ConduitCfg,1); - gnome_config_push_prefix(prefix); - (*c)->open_secret = gnome_config_get_bool("open secret=FALSE"); - gnome_config_pop_prefix(); - - (*c)->pilotId = pilotId; -} - -static void save_configuration(ConduitCfg *c) { - gchar prefix[256]; - - g_snprintf(prefix,255,"/gnome-pilot.d/todo-conduit/Pilot_%u/",c->pilotId); - - gnome_config_push_prefix(prefix); - gnome_config_set_bool("open secret",c->open_secret); - gnome_config_pop_prefix(); - - gnome_config_sync(); - gnome_config_drop_all(); -} - -static void destroy_configuration(ConduitCfg **c) { - g_free(*c); - *c = NULL; -} - -#endif __TODO_CONDUIT_H__ diff --git a/calendar/gui/topic.dat b/calendar/gui/topic.dat deleted file mode 100644 index edc7813b26..0000000000 --- a/calendar/gui/topic.dat +++ /dev/null @@ -1,2 +0,0 @@ -gnome-cal.html Manual -gnome-cal.html#cmdline Command line options \ No newline at end of file diff --git a/calendar/gui/weekview.xpm b/calendar/gui/weekview.xpm deleted file mode 100644 index f4900856eb..0000000000 --- a/calendar/gui/weekview.xpm +++ /dev/null @@ -1,41 +0,0 @@ -/* XPM */ -static char * weekview_xpm[] = { -"24 24 14 1", -" c None", -". c #000000", -"+ c #FFFFFF", -"@ c #D1D1D1", -"# c #E3E4F5", -"$ c #8B90C3", -"% c #AAAFE2", -"& c #C7CAEB", -"* c #4550B5", -"= c #555FC5", -"- c #2E3BB1", -"; c #0010A8", -"> c #BABBCC", -", c #A3A6C7", -" ", -" ", -" ", -" ", -" ...................... ", -" .............+.++.++.. ", -" .++@++@++@++@++@++@++. ", -" .++@++@++@++@++@++@++. ", -" .@@@@@@@@@@@@@@@@@@@@. ", -" .++@++@+#$%%$%+@++@++. ", -" .++@++@+&*==-;+@++@++. ", -" .@@@@@@@@@@@$;@@@@@@@. ", -" .++@++@++@+%;%+@++@++. ", -" .++@++@++@+%;%+@++@++. ", -" .@@@@@@@@@@-->@@@@@@@. ", -" .++@++@++@+;*++@++@++. ", -" .++@++@++@+;*++@++@++. ", -" .@@@@@@@@@@$,@@@@@@@@. ", -" .++@++@++@++@++@++@++. ", -" .++@++@++@++@++@++@++. ", -" ...................... ", -" ", -" ", -" "}; diff --git a/calendar/gui/workweekview.xpm b/calendar/gui/workweekview.xpm deleted file mode 100644 index f47061589c..0000000000 --- a/calendar/gui/workweekview.xpm +++ /dev/null @@ -1,43 +0,0 @@ -/* XPM */ -static char * workweekview_xpm[] = { -"24 24 16 1", -" c None", -". c #000000", -"+ c #FFFFFF", -"@ c #D1D1D1", -"# c #E3E4F5", -"$ c #8B90C3", -"% c #AAAFE2", -"& c #0010A8", -"* c #3945BB", -"= c #555FC5", -"- c #4550B5", -"; c #727ACE", -"> c #C7CAEB", -", c #2E3BB1", -"' c #5D66BA", -") c #BABBCC", -" ", -" ", -" ", -" ", -" ...................... ", -" .............+.++.++.. ", -" .++@++@++@++@++@++@++. ", -" .++@++@++@++@++@++@++. ", -" .@@@@@@@@@@@@@@@@@@@@. ", -" .++@++@+#$%%$%+@++@++. ", -" .++@++@+%&*=-=+@++@++. ", -" .@@@@@@@$&$@@@@@@@@@@. ", -" .++@++@+%&;%$#+@++@++. ", -" .++@++@+>-==,;+@++@++. ", -" .@@@@@@@@@@@$&@@@@@@@. ", -" .++@++@+#$#+$&+@++@++. ", -" .++@++@+>,;%'*+@++@++. ", -" .@@@@@@@@)$$$)@@@@@@@. ", -" .++@++@++@++@++@++@++. ", -" .++@++@++@++@++@++@++. ", -" ...................... ", -" ", -" ", -" "}; diff --git a/calendar/gui/yearview.xpm b/calendar/gui/yearview.xpm deleted file mode 100644 index 9629150417..0000000000 --- a/calendar/gui/yearview.xpm +++ /dev/null @@ -1,45 +0,0 @@ -/* XPM */ -static char * yearview_xpm[] = { -"24 24 18 1", -" c None", -". c #000000", -"+ c #FFFFFF", -"@ c #D1D1D1", -"# c #BABBCC", -"$ c #AAAFE2", -"% c #8B90C3", -"& c #E3E4F5", -"* c #C7CAEB", -"= c #5D66BA", -"- c #3945BB", -"; c #555FC5", -"> c #2E3BB1", -", c #727ACE", -"' c #4550B5", -") c #0010A8", -"! c #A3A6C7", -"~ c #8E95D8", -" ", -" ", -" ", -" ", -" ...................... ", -" .............+.++.++.. ", -" .++@++@++@++@++@++@++. ", -" .++@++@++@++@++@++@++. ", -" .@@@@@@@@@@@@@@@@@@@@. ", -" .++#$$%&+@*$%&&%$$%$+. ", -" .+&=-;>,+#-;'*$)-;';+. ", -" .@%)%@%)!>=@@@%)%@@@@. ", -" .++@*$=-$),$%&$),$%&+. ", -" .++@~;>,$)-;>,*';;>,+. ", -" .@@@@@%)%)%@%)@@@@%)@. ", -" .+$)$+%)$)$+%)&%&+%)+. ", -" .+*>,$=-*>,$=-*>,$=-+. ", -" .@@#%%%#@#%%%#@#%%%#@. ", -" .++@++@++@++@++@++@++. ", -" .++@++@++@++@++@++@++. ", -" ...................... ", -" ", -" ", -" "}; diff --git a/calendar/idl/.cvsignore b/calendar/idl/.cvsignore deleted file mode 100644 index b840c21800..0000000000 --- a/calendar/idl/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile.in -Makefile \ No newline at end of file diff --git a/calendar/idl/Makefile.am b/calendar/idl/Makefile.am deleted file mode 100644 index ec6b4e45f0..0000000000 --- a/calendar/idl/Makefile.am +++ /dev/null @@ -1,7 +0,0 @@ -idldir = $(datadir)/idl - -idl_DATA = \ - evolution-calendar.idl - -EXTRA_DIST = \ - $(idl_DATA) diff --git a/calendar/idl/evolution-calendar.idl b/calendar/idl/evolution-calendar.idl deleted file mode 100644 index 29d0a79780..0000000000 --- a/calendar/idl/evolution-calendar.idl +++ /dev/null @@ -1,158 +0,0 @@ -/* Evolution calendar interface - * - * Copyright (C) 2000 Eskil Heyn Olsen - * Copyright (C) 2000 Helix Code, Inc. - * - * Authors: Eskil Heyn Olsen - * Federico Mena-Quintero - */ - -#ifndef _EVOLUTION_CALENDAR_IDL_ -#define _EVOLUTION_CALENDAR_IDL_ - -#include - -module Evolution { - -module Calendar { - /* A calendar object (event/todo/journal/etc), represented as an - * iCalendar string. - */ - typedef string CalObj; - - /* An unique identifier for a calendar object */ - typedef string CalObjUID; - - /* Sequence of unique identifiers */ - typedef sequence CalObjUIDSeq; - - /* Flags for getting UID sequences */ - typedef long CalObjType; - const CalObjType TYPE_EVENT = 1 << 0; - const CalObjType TYPE_TODO = 1 << 1; - const CalObjType TYPE_JOURNAL = 1 << 2; - const CalObjType TYPE_OTHER = 1 << 3; - const CalObjType TYPE_ANY = 0x0f; - - /* Types of alarms */ - enum AlarmType { - MAIL, - PROGRAM, - DISPLAY, - AUDIO - }; - - /* Used to store a time_t */ - typedef unsigned long Time_t; - - /* An instance of a calendar object that actually occurs. These are - * "virtual" objects in that they are used to represent instances of - * recurring events and alarms. "Real" objects just contain the - * information required to figure out the times at which they recur or - * trigger. - */ - struct CalObjInstance { - CalObjUID uid; - Time_t start; - Time_t end; - }; - - typedef sequence CalObjInstanceSeq; - - /* An alarm trigger instance */ - struct CalAlarmInstance { - CalObjUID uid; - AlarmType type; - Time_t trigger; - Time_t occur; - }; - - typedef sequence CalAlarmInstanceSeq; - - interface Listener; - - /* Calendar client interface */ - interface Cal : Bonobo::Unknown { - exception NotFound {}; - exception InvalidRange {}; - exception InvalidObject {}; - - /* A calendar is identified by its URI */ - readonly attribute string uri; - - /* Gets an object based on its URI */ - CalObj get_object (in CalObjUID uid) - raises (NotFound); - - /* Gets a list of UIDs based on object type */ - CalObjUIDSeq get_uids (in CalObjType type); - - /* Gets the events that occur or recur in the specified time range */ - CalObjInstanceSeq get_events_in_range (in Time_t start, in Time_t end) - raises (InvalidRange); - - /* Gets the objects whose alarms trigger in the specified time - * range. - */ - CalAlarmInstanceSeq get_alarms_in_range (in Time_t start, in Time_t end) - raises (InvalidRange); - - /* Gets the alarms for the specified object that trigger in the - * specified time range. - */ - CalAlarmInstanceSeq get_alarms_for_object (in CalObjUID uid, - in Time_t start, in Time_t end) - raises (NotFound, InvalidRange); - - /* Updates an object by adding it if it does not exist or by - * changing an existing one. - */ - void update_object (in CalObjUID uid, in CalObj calobj) - raises (InvalidObject); - - /* Removes an object */ - void remove_object (in CalObjUID uid) - raises (NotFound); - }; - - /* Listener for changes in a calendar */ - interface Listener : Bonobo::Unknown { - /* Return status when loading a calendar; we need better error reporting */ - enum LoadStatus { - SUCCESS, /* All OK */ - ERROR, /* Generic error */ - IN_USE, /* Requested create while a calendar - * with the same URI was in use. - */ - METHOD_NOT_SUPPORTED /* A method handler is not registered */ - }; - - /* Called from a CalFactory when a calendar is initially loaded - * or created. The listener must remember the cal object. - */ - void cal_loaded (in LoadStatus status, in Cal cal); - - /* Called from a Calendar when an object is added or changed */ - void obj_updated (in CalObjUID uid); - - /* Called from a Calendar when an object is removed */ - void obj_removed (in CalObjUID uid); - }; - - /* A calendar factory, can load and create calendars */ - interface CalFactory : Bonobo::Unknown { - exception NilListener {}; - - /* Load a calendar from an URI */ - void load (in string uri, in Listener listener) - raises (NilListener); - - /* Create a new calendar at the specified URI */ - void create (in string uri, in Listener listener) - raises (NilListener); - }; -}; - -}; - -#endif diff --git a/calendar/pcs/.cvsignore b/calendar/pcs/.cvsignore deleted file mode 100644 index 7250bfdff6..0000000000 --- a/calendar/pcs/.cvsignore +++ /dev/null @@ -1,12 +0,0 @@ -Makefile -Makefile.in -.deps -.libs -.pure -*.la -*.lo -evolution-calendar-stubs.c -evolution-calendar-skels.c -evolution-calendar-common.c -evolution-calendar.h -icalendar-test diff --git a/calendar/pcs/Makefile.am b/calendar/pcs/Makefile.am deleted file mode 100644 index 919630bb98..0000000000 --- a/calendar/pcs/Makefile.am +++ /dev/null @@ -1,64 +0,0 @@ -INCLUDES = \ - -DG_LOG_DOMAIN=\"wombat-pcs\" \ - -I$(top_srcdir) \ - -I$(top_srcdir)/calendar \ - -I$(top_srcdir)/libical/src/libical \ - -I$(top_builddir)/libical/src/libical \ - $(BONOBO_GNOME_CFLAGS) \ - -DGNOMELOCALEDIR=\""$(datadir)/locale"\" - -CORBA_GENERATED = \ - evolution-calendar.h \ - evolution-calendar-common.c \ - evolution-calendar-skels.c \ - evolution-calendar-stubs.c - -idls = \ - $(srcdir)/../idl/evolution-calendar.idl - -idl_flags = `$(GNOME_CONFIG) --cflags idl` -I $(datadir)/idl - -$(CORBA_GENERATED): $(idls) - $(ORBIT_IDL) $(idl_flags) $(srcdir)/../idl/evolution-calendar.idl - -noinst_LIBRARIES = libpcs.a - -libpcs_a_SOURCES = \ - $(CORBA_GENERATED) \ - cal.c \ - cal.h \ - cal-backend.c \ - cal-backend.h \ - cal-backend-imc.c \ - cal-backend-imc.h \ - cal-common.h \ - cal-factory.c \ - cal-factory.h \ - icalendar.c \ - icalendar.h \ - icalendar-save.c \ - icalendar-save.h \ - job.c \ - job.h - - - -noinst_PROGRAMS = icalendar-test - -icalendar_test_SOURCES = \ - icalendar-test.c \ - icalendar.c \ - icalendar-save.c - -icalendar_test_LDADD = \ - $(EXTRA_GNOME_LIBS) \ - $(top_builddir)/libversit/libversit.la \ - $(top_builddir)/libical/src/libical/libical.la - -# $(top_builddir)/calendar/cal-util/libcal-util.la \ - - - - -BUILT_SOURCES = $(CORBA_GENERATED) -CLEANFILES += $(BUILT_SOURCES) diff --git a/calendar/pcs/cal-backend-imc.c b/calendar/pcs/cal-backend-imc.c deleted file mode 100644 index 3c50078d12..0000000000 --- a/calendar/pcs/cal-backend-imc.c +++ /dev/null @@ -1,1293 +0,0 @@ -/* Evolution calendar - Internet Mail Consortium formats backend - * - * Copyright (C) 2000 Helix Code, Inc. - * - * Authors: Federico Mena-Quintero - * Seth Alves - * Miguel de Icaza - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. - */ - -#include -#include -#include "cal-backend-imc.h" -#include "icalendar.h" - - - -/* Supported calendar formats from the IMC */ -typedef enum { - CAL_FORMAT_UNKNOWN, - CAL_FORMAT_VCALENDAR, - CAL_FORMAT_ICALENDAR -} CalendarFormat; - -/* Private part of the CalBackendIMC structure */ -typedef struct { - /* URI where the calendar data is stored */ - GnomeVFSURI *uri; - - /* Format of this calendar (iCalendar or vCalendar) */ - CalendarFormat format; - - /* List of Cal objects with their listeners */ - GList *clients; - - /* All the iCalObject structures in the calendar, hashed by UID. The - * hash key *is* icalobj->uid; it is not copied, so don't free it when - * you remove an object from the hash table. - */ - GHashTable *object_hash; - - /* All events, TODOs, and journals in the calendar */ - GList *events; - GList *todos; - GList *journals; - - /* Whether a calendar has been loaded */ - guint loaded : 1; - - /* Do we need to sync to permanent storage? */ - gboolean dirty : 1; -} IMCPrivate; - - - -static void cal_backend_imc_class_init (CalBackendIMCClass *class); -static void cal_backend_imc_init (CalBackendIMC *bimc); -static void cal_backend_imc_destroy (GtkObject *object); - -static GnomeVFSURI *cal_backend_imc_get_uri (CalBackend *backend); -static void cal_backend_imc_add_cal (CalBackend *backend, Cal *cal); -static CalBackendLoadStatus cal_backend_imc_load (CalBackend *backend, GnomeVFSURI *uri); -static void cal_backend_imc_create (CalBackend *backend, GnomeVFSURI *uri); -static char *cal_backend_imc_get_object (CalBackend *backend, const char *uid); -static GList *cal_backend_imc_get_uids (CalBackend *backend, CalObjType type); -static GList *cal_backend_imc_get_events_in_range (CalBackend *backend, time_t start, time_t end); -static GList *cal_backend_imc_get_alarms_in_range (CalBackend *backend, time_t start, time_t end); -static gboolean cal_backend_imc_get_alarms_for_object (CalBackend *backend, const char *uid, - time_t start, time_t end, - GList **alarms); -static gboolean cal_backend_imc_update_object (CalBackend *backend, const char *uid, - const char *calobj); -static gboolean cal_backend_imc_remove_object (CalBackend *backend, const char *uid); - -static CalBackendClass *parent_class; - - - -/** - * cal_backend_imc_get_type: - * @void: - * - * Registers the #CalBackendIMC class if necessary, and returns the type ID - * associated to it. - * - * Return value: The type ID of the #CalBackendIMC class. - **/ -GtkType -cal_backend_imc_get_type (void) -{ - static GtkType cal_backend_imc_type = 0; - - if (!cal_backend_imc_type) { - static const GtkTypeInfo cal_backend_imc_info = { - "CalBackendIMC", - sizeof (CalBackendIMC), - sizeof (CalBackendIMCClass), - (GtkClassInitFunc) cal_backend_imc_class_init, - (GtkObjectInitFunc) cal_backend_imc_init, - NULL, /* reserved_1 */ - NULL, /* reserved_2 */ - (GtkClassInitFunc) NULL - }; - - cal_backend_imc_type = gtk_type_unique (CAL_BACKEND_TYPE, &cal_backend_imc_info); - } - - return cal_backend_imc_type; -} - -/* Class initialization function for the IMC backend */ -static void -cal_backend_imc_class_init (CalBackendIMCClass *class) -{ - GtkObjectClass *object_class; - CalBackendClass *backend_class; - - object_class = (GtkObjectClass *) class; - backend_class = (CalBackendClass *) class; - - parent_class = gtk_type_class (CAL_BACKEND_TYPE); - - backend_class->get_uri = cal_backend_imc_get_uri; - backend_class->add_cal = cal_backend_imc_add_cal; - backend_class->load = cal_backend_imc_load; - backend_class->create = cal_backend_imc_create; - backend_class->get_object = cal_backend_imc_get_object; - backend_class->get_uids = cal_backend_imc_get_uids; - backend_class->get_events_in_range = cal_backend_imc_get_events_in_range; - backend_class->get_alarms_in_range = cal_backend_imc_get_alarms_in_range; - backend_class->get_alarms_for_object = cal_backend_imc_get_alarms_for_object; - backend_class->update_object = cal_backend_imc_update_object; - backend_class->remove_object = cal_backend_imc_remove_object; - - object_class->destroy = cal_backend_imc_destroy; -} - -/* Object initialization function for the IMC backend */ -static void -cal_backend_imc_init (CalBackendIMC *cbimc) -{ - IMCPrivate *priv; - - priv = g_new0 (IMCPrivate, 1); - cbimc->priv = priv; - - priv->format = CAL_FORMAT_UNKNOWN; -} - -static void -save_to_vcal (CalBackendIMC *cbimc, char *fname) -{ - FILE *fp; - IMCPrivate *priv; - VObject *vcal; - GList *l; - - priv = cbimc->priv; - - if (g_file_exists (fname)) { - char *backup_name = g_strconcat (fname, "~", NULL); - - /* FIXME: do error checking on system calls!!!! */ - - if (g_file_exists (backup_name)) - unlink (backup_name); - - rename (fname, backup_name); - g_free (backup_name); - } - - vcal = newVObject (VCCalProp); - addPropValue (vcal, VCProdIdProp, - "-//Helix Code//NONSGML Evolution Calendar//EN"); - - /* Per the vCalendar spec, this must be "1.0" */ - addPropValue (vcal, VCVersionProp, "1.0"); - - /* FIXME: this should really iterate over the object hash table instead - * of the lists; that way we won't lose objects if they are of a type - * that we don't support but are in the calendar anyways. - */ - - for (l = priv->events; l; l = l->next) { - iCalObject *ical = l->data; - VObject *vobject = ical_object_to_vobject (ical); - addVObjectProp (vcal, vobject); - } - - for (l = priv->todos; l; l = l->next) { - iCalObject *ical = l->data; - VObject *vobject = ical_object_to_vobject (ical); - addVObjectProp (vcal, vobject); - } - - for (l = priv->journals; l; l = l->next) { - iCalObject *ical = l->data; - VObject *vobject = ical_object_to_vobject (ical); - addVObjectProp (vcal, vobject); - } - - fp = fopen(fname,"w"); - if (fp) { - writeVObject(fp, vcal); - fclose(fp); - } - cleanVObject (vcal); - cleanStrTbl (); -} - -/* Saves a calendar */ -static void -save (CalBackendIMC *cbimc) -{ - char *str_uri; - IMCPrivate *priv = cbimc->priv; - - str_uri = gnome_vfs_uri_to_string (priv->uri, - (GNOME_VFS_URI_HIDE_USER_NAME - | GNOME_VFS_URI_HIDE_PASSWORD - | GNOME_VFS_URI_HIDE_HOST_NAME - | GNOME_VFS_URI_HIDE_HOST_PORT - | GNOME_VFS_URI_HIDE_TOPLEVEL_METHOD)); - - if (!priv->dirty) - return; - - switch (priv->format) { - case CAL_FORMAT_VCALENDAR: - save_to_vcal (cbimc, str_uri); - break; - - case CAL_FORMAT_ICALENDAR: - /*icalendar_calendar_save (cbimc, str_uri);*/ - /* FIX ME */ - break; - - default: - g_message ("save(): Attempt to save a calendar with an unknown format!"); - break; - } - - printf ("cal-backend-imc: '%s' saved\n", str_uri); - - g_free (str_uri); -} - -/* g_hash_table_foreach() callback to destroy an iCalObject */ -static void -free_ical_object (gpointer key, gpointer value, gpointer data) -{ - iCalObject *ico; - - ico = value; - ical_object_destroy (ico); -} - -/* Destroys an IMC backend's data */ -static void -destroy (CalBackendIMC *cbimc) -{ - IMCPrivate *priv; - - priv = cbimc->priv; - - if (priv->uri) { - gnome_vfs_uri_unref (priv->uri); - priv->uri = NULL; - } - - g_assert (priv->clients == NULL); - - if (priv->object_hash) { - g_hash_table_foreach (priv->object_hash, free_ical_object, NULL); - g_hash_table_destroy (priv->object_hash); - priv->object_hash = NULL; - } - - g_list_free (priv->events); - g_list_free (priv->todos); - g_list_free (priv->journals); - - priv->events = NULL; - priv->todos = NULL; - priv->journals = NULL; - - priv->loaded = FALSE; - priv->format = CAL_FORMAT_UNKNOWN; -} - -/* Destroy handler for the IMC backend */ -static void -cal_backend_imc_destroy (GtkObject *object) -{ - CalBackendIMC *cbimc; - IMCPrivate *priv; - - g_return_if_fail (object != NULL); - g_return_if_fail (IS_CAL_BACKEND_IMC (object)); - - cbimc = CAL_BACKEND_IMC (object); - priv = cbimc->priv; - - /* - if (priv->loaded) - save (cbimc); - */ - - destroy (cbimc); - - g_free (priv); - cbimc->priv = NULL; - - if (GTK_OBJECT_CLASS (parent_class)->destroy) - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); -} - - - -/* iCalObject manipulation functions */ - -/* Looks up an object by its UID in the backend's object hash table */ -static iCalObject * -lookup_object (CalBackendIMC *cbimc, const char *uid) -{ - IMCPrivate *priv; - iCalObject *ico; - - priv = cbimc->priv; - ico = g_hash_table_lookup (priv->object_hash, uid); - - return ico; -} - -/* Ensures that an iCalObject has a unique identifier. If it doesn't have one, - * it will create one for it. - */ -static void -ensure_uid (iCalObject *ico) -{ - char *buf; - gulong str_time; - static guint seqno = 0; - - if (ico->uid) - return; - - str_time = (gulong) time (NULL); - - /* Is this good enough? */ - - buf = g_strdup_printf ("Evolution-Calendar-%d-%ld-%u", - (int) getpid(), str_time, seqno++); - ico->uid = buf; -} - -/* Adds an object to the calendar backend. Does *not* perform notification to - * calendar clients. - */ -static void -add_object (CalBackendIMC *cbimc, iCalObject *ico) -{ - IMCPrivate *priv; - - g_assert (ico != NULL); - - priv = cbimc->priv; - -#if 0 - /* FIXME: gnomecal old code */ - ico->new = 0; -#endif - - ensure_uid (ico); - g_hash_table_insert (priv->object_hash, ico->uid, ico); - - priv->dirty = TRUE; - - switch (ico->type) { - case ICAL_EVENT: - priv->events = g_list_prepend (priv->events, ico); -#if 0 - /* FIXME: gnomecal old code */ - ical_object_try_alarms (ico); -# ifdef DEBUGGING_MAIL_ALARM - ico->malarm.trigger = 0; - calendar_notify (0, ico); -# endif -#endif - break; - - case ICAL_TODO: - priv->todos = g_list_prepend (priv->todos, ico); - break; - - case ICAL_JOURNAL: - priv->journals = g_list_prepend (priv->journals, ico); - break; - - default: - g_assert_not_reached (); - } - -#if 0 - /* FIXME: gnomecal old code */ - ico->last_mod = time (NULL); -#endif -} - -/* Removes an object from the backend's hash and lists. Does not perform - * notification on the clients. - */ -static void -remove_object (CalBackendIMC *cbimc, iCalObject *ico) -{ - IMCPrivate *priv; - GList **list, *l; - - priv = cbimc->priv; - - g_assert (ico->uid != NULL); - g_hash_table_remove (priv->object_hash, ico->uid); - - priv->dirty = TRUE; - - switch (ico->type) { - case ICAL_EVENT: - list = &priv->events; - break; - - case ICAL_TODO: - list = &priv->todos; - break; - - case ICAL_JOURNAL: - list = &priv->journals; - break; - - default: - /* Make the compiler shut up. */ - list = NULL; - g_assert_not_reached (); - } - - l = g_list_find (*list, ico); - g_assert (l != NULL); - - *list = g_list_remove_link (*list, l); - g_list_free_1 (l); - - ical_object_destroy (ico); -} - -/* Load a calendar from a VObject */ -static void -load_from_vobject (CalBackendIMC *cbimc, VObject *vobject) -{ - IMCPrivate *priv; - VObjectIterator i; - - priv = cbimc->priv; - - g_assert (!priv->loaded); - g_assert (priv->object_hash == NULL); - priv->object_hash = g_hash_table_new (g_str_hash, g_str_equal); - - initPropIterator (&i, vobject); - - while (moreIteration (&i)) { - VObject *this; - iCalObject *ical; - const char *object_name; - - this = nextVObject (&i); - object_name = vObjectName (this); -#if 0 - /* FIXME? What is this used for in gnomecal? */ - if (strcmp (object_name, VCDCreatedProp) == 0) { - cal->created = time_from_isodate (str_val (this)); - continue; - } -#endif - if (strcmp (object_name, VCLocationProp) == 0) - continue; /* FIXME: imlement */ - - if (strcmp (object_name, VCProdIdProp) == 0) - continue; /* FIXME: implement */ - - if (strcmp (object_name, VCVersionProp) == 0) - continue; /* FIXME: implement */ - - if (strcmp (object_name, VCTimeZoneProp) == 0) - continue; /* FIXME: implement */ - - ical = ical_object_create_from_vobject (this, object_name); - - /* FIXME: some broken files (ahem, old KOrganizer files) may - * have duplicated UIDs. This is Bad(tm). Deal with it by - * creating new UIDs for them and spitting some messages to the - * console. - */ - - if (ical) - add_object (cbimc, ical); - } -} - - - -/* Calendar backend methods */ - -/* Get_uri handler for the IMC backend */ -static GnomeVFSURI * -cal_backend_imc_get_uri (CalBackend *backend) -{ - CalBackendIMC *cbimc; - IMCPrivate *priv; - - cbimc = CAL_BACKEND_IMC (backend); - priv = cbimc->priv; - - g_return_val_if_fail (priv->loaded, NULL); - g_assert (priv->uri != NULL); - - return priv->uri; -} - -/* Callback used when a Cal is destroyed */ -static void -cal_destroy_cb (GtkObject *object, gpointer data) -{ - Cal *cal; - Cal *lcal; - CalBackendIMC *cbimc; - IMCPrivate *priv; - GList *l; - - cal = CAL (object); - - cbimc = CAL_BACKEND_IMC (data); - priv = cbimc->priv; - - /* Find the cal in the list of clients */ - - for (l = priv->clients; l; l = l->next) { - lcal = CAL (l->data); - - if (lcal == cal) - break; - } - - g_assert (l != NULL); - - /* Disconnect */ - - priv->clients = g_list_remove_link (priv->clients, l); - g_list_free_1 (l); - - /* When all clients go away, notify the parent factory about it so that - * it may decide whether to kill the backend or not. - */ - if (!priv->clients) - cal_backend_last_client_gone (CAL_BACKEND (cbimc)); -} - -/* Add_cal handler for the IMC backend */ -static void -cal_backend_imc_add_cal (CalBackend *backend, Cal *cal) -{ - CalBackendIMC *cbimc; - IMCPrivate *priv; - - cbimc = CAL_BACKEND_IMC (backend); - priv = cbimc->priv; - - g_return_if_fail (priv->loaded); - g_return_if_fail (cal != NULL); - g_return_if_fail (IS_CAL (cal)); - - /* We do not keep a reference to the Cal since the calendar user agent - * owns it. - */ - - gtk_signal_connect (GTK_OBJECT (cal), "destroy", - GTK_SIGNAL_FUNC (cal_destroy_cb), - backend); - - priv->clients = g_list_prepend (priv->clients, cal); -} - -static icalcomponent * -icalendar_parse_file (char *fname) -{ - FILE *fp; - icalcomponent *comp = NULL; - char *str; - struct stat st; - int n; - - fp = fopen (fname, "r"); - if (!fp) { - /* FIXME: remove message */ - g_message ("icalendar_parse_file(): Cannot open open calendar file."); - return NULL; - } - - stat (fname, &st); - - str = g_malloc (st.st_size + 2); - - n = fread (str, 1, st.st_size, fp); - if (n != st.st_size) { - /* FIXME: remove message, return error code instead */ - g_message ("icalendar_parse_file(): Read error."); - } - str[n] = '\0'; - - fclose (fp); - - comp = icalparser_parse_string (str); - g_free (str); - - return comp; -} - -static void -icalendar_calendar_load (CalBackendIMC *cbimc, char *fname) -{ - IMCPrivate *priv; - icalcomponent *comp; - icalcomponent *subcomp; - iCalObject *ical; - - priv = cbimc->priv; - - g_assert (!priv->loaded); - g_assert (priv->object_hash == NULL); - - priv->object_hash = g_hash_table_new (g_str_hash, g_str_equal); - - comp = icalendar_parse_file (fname); - subcomp = icalcomponent_get_first_component (comp, - ICAL_ANY_COMPONENT); - while (subcomp) { - ical = ical_object_create_from_icalcomponent (subcomp); - if (ical->type != ICAL_EVENT && - ical->type != ICAL_TODO && - ical->type != ICAL_JOURNAL) { - g_message ("icalendar_calendar_load(): Skipping unsupported " - "iCalendar component."); - } else - add_object (cbimc, ical); - - subcomp = icalcomponent_get_next_component (comp, - ICAL_ANY_COMPONENT); - } -} - -/* ics is to be used to designate a file containing (an arbitrary set of) - * calendaring and scheduling information. - * - * ifb is to be used to designate a file containing free or busy time - * information. - * - * anything else is assumed to be a vcal file. - * - * FIXME: should we return UNKNOWN at some point? - */ -static CalendarFormat -cal_get_type_from_filename (char *str_uri) -{ - int len; - - if (str_uri == NULL) - return CAL_FORMAT_VCALENDAR; - - len = strlen (str_uri); - if (len < 4) - return CAL_FORMAT_VCALENDAR; - - if (str_uri[len - 4] == '.' && str_uri[len - 3] == 'i' && - str_uri[len - 2] == 'c' && str_uri[len - 1] == 's') - return CAL_FORMAT_ICALENDAR; - - if (str_uri[len - 4] == '.' && str_uri[len - 3] == 'i' && - str_uri[len - 2] == 'f' && str_uri[len - 1] == 'b') - return CAL_FORMAT_ICALENDAR; - - if (str_uri[len - 4] == '.' && str_uri[len - 3] == 'i' && - str_uri[len - 2] == 'c' && str_uri[len - 1] == 's') - return CAL_FORMAT_ICALENDAR; - - if (len < 5) - return CAL_FORMAT_VCALENDAR; - - if (str_uri[len - 5] == '.' && str_uri[len - 4] == 'i' && - str_uri[len - 3] == 'c' && str_uri[len - 2] == 'a' && - str_uri[len - 1] == 'l') - return CAL_FORMAT_ICALENDAR; - - return CAL_FORMAT_VCALENDAR; -} - -/* Load handler for the IMC backend */ -static CalBackendLoadStatus -cal_backend_imc_load (CalBackend *backend, GnomeVFSURI *uri) -{ - CalBackendIMC *cbimc; - IMCPrivate *priv; - VObject *vobject; - char *str_uri; - - cbimc = CAL_BACKEND_IMC (backend); - priv = cbimc->priv; - - g_return_val_if_fail (!priv->loaded, CAL_BACKEND_LOAD_ERROR); - g_return_val_if_fail (uri != NULL, CAL_BACKEND_LOAD_ERROR); - - /* FIXME: this looks rather bad; maybe we should check for local files - * and fail if they are remote. - */ - - str_uri = gnome_vfs_uri_to_string (uri, - (GNOME_VFS_URI_HIDE_USER_NAME - | GNOME_VFS_URI_HIDE_PASSWORD - | GNOME_VFS_URI_HIDE_HOST_NAME - | GNOME_VFS_URI_HIDE_HOST_PORT - | GNOME_VFS_URI_HIDE_TOPLEVEL_METHOD)); - - /* look at the extension on the filename and decide if this is a - * iCalendar or vCalendar file. - */ - priv->format = cal_get_type_from_filename (str_uri); - - /* load */ - - switch (priv->format) { - case CAL_FORMAT_VCALENDAR: - vobject = Parse_MIME_FromFileName (str_uri); - - if (!vobject){ - g_free (str_uri); - return CAL_BACKEND_LOAD_ERROR; - } - - load_from_vobject (cbimc, vobject); - cleanVObject (vobject); - cleanStrTbl (); - break; - - case CAL_FORMAT_ICALENDAR: - icalendar_calendar_load (cbimc, str_uri); - break; - - default: - g_free (str_uri); - return CAL_BACKEND_LOAD_ERROR; - } - - g_free (str_uri); - - gnome_vfs_uri_ref (uri); - - priv->uri = uri; - priv->loaded = TRUE; - - return CAL_BACKEND_LOAD_SUCCESS; -} - -/* Create handler for the IMC backend */ -static void -cal_backend_imc_create (CalBackend *backend, GnomeVFSURI *uri) -{ - CalBackendIMC *cbimc; - IMCPrivate *priv; - char *str_uri; - - cbimc = CAL_BACKEND_IMC (backend); - priv = cbimc->priv; - - g_return_if_fail (!priv->loaded); - g_return_if_fail (uri != NULL); - - /* Create the new calendar information */ - - g_assert (priv->object_hash == NULL); - priv->object_hash = g_hash_table_new (g_str_hash, g_str_equal); - - priv->dirty = TRUE; - - /* Done */ - - /* FIXME: this looks rather bad; maybe we should check for local files - * and fail if they are remote. - */ - - str_uri = gnome_vfs_uri_to_string (uri, - (GNOME_VFS_URI_HIDE_USER_NAME - | GNOME_VFS_URI_HIDE_PASSWORD - | GNOME_VFS_URI_HIDE_HOST_NAME - | GNOME_VFS_URI_HIDE_HOST_PORT - | GNOME_VFS_URI_HIDE_TOPLEVEL_METHOD)); - - /* look at the extension on the filename and decide if this is a - * iCalendar or vCalendar file. - */ - priv->format = cal_get_type_from_filename (str_uri); - - g_free (str_uri); - - gnome_vfs_uri_ref (uri); - - priv->uri = uri; - priv->loaded = TRUE; - - save (cbimc); -} - -/* Get_object handler for the IMC backend */ -static char * -cal_backend_imc_get_object (CalBackend *backend, const char *uid) -{ - CalBackendIMC *cbimc; - IMCPrivate *priv; - iCalObject *ico; - char *buf; - - cbimc = CAL_BACKEND_IMC (backend); - priv = cbimc->priv; - - g_return_val_if_fail (uid != NULL, NULL); - - g_return_val_if_fail (priv->loaded, NULL); - g_assert (priv->object_hash != NULL); - - ico = lookup_object (cbimc, uid); - - if (!ico) - return NULL; - - buf = ical_object_to_string (ico); - - return buf; -} - -struct get_uids_closure { - CalObjType type; - GList *uid_list; -}; - -/* Builds a list of UIDs for objects that match the sought type. Called from - * g_hash_table_foreach(). - */ -static void -build_uids_list (gpointer key, gpointer value, gpointer data) -{ - iCalObject *ico; - struct get_uids_closure *c; - gboolean store; - - ico = value; - c = data; - - store = FALSE; - - if (ico->type == ICAL_EVENT) - store = (c->type & CALOBJ_TYPE_EVENT) ? TRUE : FALSE; - else if (ico->type == ICAL_TODO) - store = (c->type & CALOBJ_TYPE_TODO) ? TRUE : FALSE; - else if (ico->type == ICAL_JOURNAL) - store = (c->type & CALOBJ_TYPE_JOURNAL) ? TRUE : FALSE; - else - store = (c->type & CALOBJ_TYPE_OTHER) ? TRUE : FALSE; - - if (store) - c->uid_list = g_list_prepend (c->uid_list, g_strdup (ico->uid)); -} - -/* Get_uids handler for the IMC backend */ -static GList * -cal_backend_imc_get_uids (CalBackend *backend, CalObjType type) -{ - CalBackendIMC *cbimc; - IMCPrivate *priv; - struct get_uids_closure c; - - cbimc = CAL_BACKEND_IMC (backend); - priv = cbimc->priv; - - g_return_val_if_fail (priv->loaded, NULL); - - /* We go through the hash table instead of the lists of particular - * object types so that we can pick up CALOBJ_TYPE_OTHER objects. - */ - c.type = type; - c.uid_list = NULL; - g_hash_table_foreach (priv->object_hash, build_uids_list, &c); - - return c.uid_list; -} - -/* Allocates and fills in a new CalObjInstance structure */ -static CalObjInstance * -build_cal_obj_instance (iCalObject *ico, time_t start, time_t end) -{ - CalObjInstance *icoi; - - g_assert (ico->uid != NULL); - - icoi = g_new (CalObjInstance, 1); - icoi->uid = g_strdup (ico->uid); - icoi->start = start; - icoi->end = end; - - return icoi; -} - -struct build_event_list_closure { - CalBackendIMC *cbimc; - GList *event_list; -}; - -/* Builds a sorted list of event object instances. Used as a callback from - * ical_object_generate_events(). - */ -static int -build_event_list (iCalObject *ico, time_t start, time_t end, void *data) -{ - CalObjInstance *icoi; - struct build_event_list_closure *c; - - c = data; - - icoi = build_cal_obj_instance (ico, start, end); - c->event_list = g_list_prepend (c->event_list, icoi); - - return TRUE; -} - -/* Compares two CalObjInstance structures by their start times. Called from - * g_list_sort(). - */ -static gint -compare_instance_func (gconstpointer a, gconstpointer b) -{ - const CalObjInstance *ca, *cb; - time_t diff; - - ca = a; - cb = b; - - diff = ca->start - cb->start; - return (diff < 0) ? -1 : (diff > 0) ? 1 : 0; -} - -/* Get_events_in_range handler for the IMC backend */ -static GList * -cal_backend_imc_get_events_in_range (CalBackend *backend, time_t start, time_t end) -{ - CalBackendIMC *cbimc; - IMCPrivate *priv; - struct build_event_list_closure c; - GList *l; - - cbimc = CAL_BACKEND_IMC (backend); - priv = cbimc->priv; - - g_return_val_if_fail (priv->loaded, NULL); - - g_return_val_if_fail (start != -1 && end != -1, NULL); - g_return_val_if_fail (start <= end, NULL); - - c.cbimc = cbimc; - c.event_list = NULL; - - for (l = priv->events; l; l = l->next) { - iCalObject *ico; - - ico = l->data; - ical_object_generate_events (ico, start, end, - build_event_list, &c); - } - - c.event_list = g_list_sort (c.event_list, compare_instance_func); - return c.event_list; -} - -struct build_alarm_list_closure { - time_t start; - time_t end; - GList *alarms; -}; - -/* Computes the offset in minutes from an alarm trigger to the actual event */ -static int -compute_alarm_offset (CalendarAlarm *a) -{ - int ofs; - - if (!a->enabled) - return -1; - - switch (a->units) { - case ALARM_MINUTES: - ofs = a->count * 60; - break; - - case ALARM_HOURS: - ofs = a->count * 3600; - break; - - case ALARM_DAYS: - ofs = a->count * 24 * 3600; - break; - - default: - ofs = -1; - g_assert_not_reached (); - } - - return ofs; -} - -/* Allocates and fills in a new CalAlarmInstance structure */ -static CalAlarmInstance * -build_cal_alarm_instance (iCalObject *ico, enum AlarmType type, time_t trigger, time_t occur) -{ - CalAlarmInstance *ai; - - g_assert (ico->uid != NULL); - - ai = g_new (CalAlarmInstance, 1); - ai->uid = g_strdup (ico->uid); - ai->type = type; - ai->trigger = trigger; - ai->occur = occur; - - return ai; -} - -/* Adds the specified alarm to the list if its trigger time falls within the - * requested range. - */ -static void -try_add_alarm (time_t occur_start, iCalObject *ico, CalendarAlarm *alarm, - struct build_alarm_list_closure *c) -{ - int ofs; - time_t trigger; - CalAlarmInstance *ai; - - if (!alarm->enabled) - return; - - ofs = compute_alarm_offset (alarm); - g_assert (ofs != -1); - - trigger = occur_start - ofs; - - if (trigger < c->start || trigger > c->end) - return; - - ai = build_cal_alarm_instance (ico, alarm->type, trigger, occur_start); - c->alarms = g_list_prepend (c->alarms, ai); -} - -/* Builds a list of alarm instances. Used as a callback from - * ical_object_generate_events(). - */ -static int -build_alarm_list (iCalObject *ico, time_t start, time_t end, void *data) -{ - struct build_alarm_list_closure *c; - - c = data; - - try_add_alarm (start, ico, &ico->dalarm, c); - try_add_alarm (start, ico, &ico->aalarm, c); - try_add_alarm (start, ico, &ico->palarm, c); - try_add_alarm (start, ico, &ico->malarm, c); - - return TRUE; -} - -/* Adds all the alarm triggers that occur within the specified time range */ -static GList * -add_alarms_for_object (GList *alarms, iCalObject *ico, time_t start, time_t end) -{ - struct build_alarm_list_closure c; - int dofs, aofs, pofs, mofs; - int max_ofs; - - dofs = compute_alarm_offset (&ico->dalarm); - aofs = compute_alarm_offset (&ico->aalarm); - pofs = compute_alarm_offset (&ico->palarm); - mofs = compute_alarm_offset (&ico->malarm); - - max_ofs = MAX (dofs, MAX (aofs, MAX (pofs, mofs))); - if (max_ofs == -1) - return alarms; - - c.start = start; - c.end = end; - c.alarms = alarms; - - ical_object_generate_events (ico, start, end, build_alarm_list, &c); - return c.alarms; -} - -/* Get_alarms_in_range handler for the IMC backend */ -static GList * -cal_backend_imc_get_alarms_in_range (CalBackend *backend, time_t start, time_t end) -{ - CalBackendIMC *cbimc; - IMCPrivate *priv; - GList *l; - GList *alarms; - - cbimc = CAL_BACKEND_IMC (backend); - priv = cbimc->priv; - - g_return_val_if_fail (priv->loaded, NULL); - - g_return_val_if_fail (start != -1 && end != -1, NULL); - g_return_val_if_fail (start <= end, NULL); - - /* Only VEVENT and VTODO components can have alarms */ - - alarms = NULL; - - for (l = priv->events; l; l = l->next) - alarms = add_alarms_for_object (alarms, (iCalObject *) l->data, start, end); - - for (l = priv->todos; l; l = l->next) - alarms = add_alarms_for_object (alarms, (iCalObject *) l->data, start, end); - - alarms = g_list_sort (alarms, compare_instance_func); - return alarms; -} - -/* Get_alarms_for_object handler for the IMC backend */ -static gboolean -cal_backend_imc_get_alarms_for_object (CalBackend *backend, const char *uid, - time_t start, time_t end, - GList **alarms) -{ - CalBackendIMC *cbimc; - IMCPrivate *priv; - iCalObject *ico; - - cbimc = CAL_BACKEND_IMC (backend); - priv = cbimc->priv; - - g_return_val_if_fail (priv->loaded, FALSE); - g_return_val_if_fail (uid != NULL, FALSE); - g_return_val_if_fail (start != -1 && end != -1, FALSE); - g_return_val_if_fail (start <= end, FALSE); - g_return_val_if_fail (alarms != NULL, FALSE); - - *alarms = NULL; - - ico = lookup_object (cbimc, uid); - if (!ico) - return FALSE; - - /* Only VEVENT and VTODO components can have alarms */ - - if (ico->type != ICAL_EVENT && ico->type != ICAL_TODO) - return TRUE; - - *alarms = add_alarms_for_object (*alarms, ico, start, end); - *alarms = g_list_sort (*alarms, compare_instance_func); - - return TRUE; -} - -/* Notifies a backend's clients that an object was updated */ -static void -notify_update (CalBackendIMC *cbimc, const char *uid) -{ - IMCPrivate *priv; - GList *l; - - priv = cbimc->priv; - - for (l = priv->clients; l; l = l->next) { - Cal *cal; - - cal = CAL (l->data); - cal_notify_update (cal, uid); - } -} - -/* Notifies a backend's clients that an object was removed */ -static void -notify_remove (CalBackendIMC *cbimc, const char *uid) -{ - IMCPrivate *priv; - GList *l; - - priv = cbimc->priv; - - for (l = priv->clients; l; l = l->next) { - Cal *cal; - - cal = CAL (l->data); - cal_notify_remove (cal, uid); - } -} - -/* Update_object handler for the IMC backend */ -static gboolean -cal_backend_imc_update_object (CalBackend *backend, const char *uid, const char *calobj) -{ - CalBackendIMC *cbimc; - IMCPrivate *priv; - iCalObject *ico, *new_ico; - CalObjFindStatus status; - - cbimc = CAL_BACKEND_IMC (backend); - priv = cbimc->priv; - - g_return_val_if_fail (priv->loaded, FALSE); - - g_return_val_if_fail (uid != NULL, FALSE); - g_return_val_if_fail (calobj != NULL, FALSE); - - /* Pull the object from the string */ - - status = ical_object_find_in_string (uid, calobj, &new_ico); - - if (status != CAL_OBJ_FIND_SUCCESS) - return FALSE; - - /* Update the object */ - - ico = lookup_object (cbimc, uid); - - if (ico) - remove_object (cbimc, ico); - - add_object (cbimc, new_ico); - save (cbimc); - - /* FIXME: do the notification asynchronously */ - - notify_update (cbimc, new_ico->uid); - - return TRUE; -} - -/* Remove_object handler for the IMC backend */ -static gboolean -cal_backend_imc_remove_object (CalBackend *backend, const char *uid) -{ - CalBackendIMC *cbimc; - IMCPrivate *priv; - iCalObject *ico; - - cbimc = CAL_BACKEND_IMC (backend); - priv = cbimc->priv; - - g_return_val_if_fail (priv->loaded, FALSE); - - g_return_val_if_fail (uid != NULL, FALSE); - - ico = lookup_object (cbimc, uid); - if (!ico) - return FALSE; - - remove_object (cbimc, ico); - - priv->dirty = TRUE; - save (cbimc); - - /* FIXME: do the notification asynchronously */ - notify_remove (cbimc, uid); - - return TRUE; -} diff --git a/calendar/pcs/cal-backend-imc.h b/calendar/pcs/cal-backend-imc.h deleted file mode 100644 index 954bbc52cc..0000000000 --- a/calendar/pcs/cal-backend-imc.h +++ /dev/null @@ -1,61 +0,0 @@ -/* Evolution calendar - Internet Mail Consortium formats backend - * - * Copyright (C) 2000 Helix Code, Inc. - * - * Authors: Federico Mena-Quintero - * Seth Alves - * Miguel de Icaza - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. - */ - -#ifndef CAL_BACKEND_IMC_H -#define CAL_BACKEND_IMC_H - -#include -#include "cal-backend.h" - -BEGIN_GNOME_DECLS - - - -#define CAL_BACKEND_IMC_TYPE (cal_backend_imc_get_type ()) -#define CAL_BACKEND_IMC(obj) (GTK_CHECK_CAST ((obj), CAL_BACKEND_IMC_TYPE, CalBackendIMC)) -#define CAL_BACKEND_IMC_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), CAL_BACKEND_IMC_TYPE, \ - CalBackendIMCClass)) -#define IS_CAL_BACKEND_IMC(obj) (GTK_CHECK_TYPE ((obj), CAL_BACKEND_IMC_TYPE)) -#define IS_CAL_BACKEND_IMC_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), CAL_BACKEND_IMC_TYPE)) - -typedef struct _CalBackendIMC CalBackendIMC; -typedef struct _CalBackendIMCClass CalBackendIMCClass; - -struct _CalBackendIMC { - CalBackend backend; - - /* Private data */ - gpointer priv; -}; - -struct _CalBackendIMCClass { - CalBackendClass parent_class; -}; - -GtkType cal_backend_imc_get_type (void); - - - -END_GNOME_DECLS - -#endif diff --git a/calendar/pcs/cal-backend.c b/calendar/pcs/cal-backend.c deleted file mode 100644 index 15cfb1e7bc..0000000000 --- a/calendar/pcs/cal-backend.c +++ /dev/null @@ -1,358 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* Evolution calendar - generic backend class - * - * Copyright (C) 2000 Helix Code, Inc. - * - * Author: Federico Mena-Quintero - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. - */ - -#include -#include -#include -#include "cal-backend.h" -#include "libversit/vcc.h" - - - -/* Signal IDs */ -enum { - LAST_CLIENT_GONE, - LAST_SIGNAL -}; - -static void cal_backend_class_init (CalBackendClass *class); - -static GtkObjectClass *parent_class; - -static guint cal_backend_signals[LAST_SIGNAL]; - -#define CLASS(backend) (CAL_BACKEND_CLASS (GTK_OBJECT (backend)->klass)) - - - -/** - * cal_backend_get_type: - * @void: - * - * Registers the #CalBackend class if necessary, and returns the type ID - * associated to it. - * - * Return value: The type ID of the #CalBackend class. - **/ -GtkType -cal_backend_get_type (void) -{ - static GtkType cal_backend_type = 0; - - if (!cal_backend_type) { - static const GtkTypeInfo cal_backend_info = { - "CalBackend", - sizeof (CalBackend), - sizeof (CalBackendClass), - (GtkClassInitFunc) cal_backend_class_init, - (GtkObjectInitFunc) NULL, - NULL, /* reserved_1 */ - NULL, /* reserved_2 */ - (GtkClassInitFunc) NULL - }; - - cal_backend_type = - gtk_type_unique (GTK_TYPE_OBJECT, &cal_backend_info); - } - - return cal_backend_type; -} - -/* Class initialization function for the calendar backend */ -static void -cal_backend_class_init (CalBackendClass *class) -{ - GtkObjectClass *object_class; - - object_class = (GtkObjectClass *) class; - - parent_class = gtk_type_class (GTK_TYPE_OBJECT); - - cal_backend_signals[LAST_CLIENT_GONE] = - gtk_signal_new ("last_client_gone", - GTK_RUN_FIRST, - object_class->type, - GTK_SIGNAL_OFFSET (CalBackendClass, last_client_gone), - gtk_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); - - gtk_object_class_add_signals (object_class, cal_backend_signals, LAST_SIGNAL); -} - - - -/** - * cal_backend_get_uri: - * @backend: A calendar backend. - * - * Queries the URI of a calendar backend, which must already have a loaded - * calendar. - * - * Return value: The URI where the calendar is stored. - **/ -GnomeVFSURI * -cal_backend_get_uri (CalBackend *backend) -{ - g_return_val_if_fail (backend != NULL, NULL); - g_return_val_if_fail (IS_CAL_BACKEND (backend), NULL); - - g_assert (CLASS (backend)->get_uri != NULL); - return (* CLASS (backend)->get_uri) (backend); -} - -/** - * cal_backend_add_cal: - * @backend: A calendar backend. - * @cal: A calendar client interface object. - * - * Adds a calendar client interface object to a calendar @backend. - * The calendar backend must already have a loaded calendar. - **/ -void -cal_backend_add_cal (CalBackend *backend, Cal *cal) -{ - g_return_if_fail (backend != NULL); - g_return_if_fail (IS_CAL_BACKEND (backend)); - - g_assert (CLASS (backend)->add_cal != NULL); - (* CLASS (backend)->add_cal) (backend, cal); -} - -/** - * cal_backend_load: - * @backend: A calendar backend. - * @uri: URI that contains the calendar data. - * - * Loads a calendar backend with data from a calendar stored at the specified - * URI. - * - * Return value: An operation status code. - **/ -CalBackendLoadStatus -cal_backend_load (CalBackend *backend, GnomeVFSURI *uri) -{ - g_return_val_if_fail (backend != NULL, CAL_BACKEND_LOAD_ERROR); - g_return_val_if_fail (IS_CAL_BACKEND (backend), CAL_BACKEND_LOAD_ERROR); - g_return_val_if_fail (uri != NULL, CAL_BACKEND_LOAD_ERROR); - - g_assert (CLASS (backend)->load != NULL); - return (* CLASS (backend)->load) (backend, uri); -} - -/** - * cal_backend_create: - * @backend: A calendar backend. - * @uri: URI that will contain the calendar data. - * - * Creates a new empty calendar in a calendar backend. - **/ -void -cal_backend_create (CalBackend *backend, GnomeVFSURI *uri) -{ - g_return_if_fail (backend != NULL); - g_return_if_fail (IS_CAL_BACKEND (backend)); - g_return_if_fail (uri != NULL); - - g_assert (CLASS (backend)->create != NULL); - (* CLASS (backend)->create) (backend, uri); -} - -/** - * cal_backend_get_object: - * @backend: A calendar backend. - * @uid: Unique identifier for a calendar object. - * - * Queries a calendar backend for a calendar object based on its unique - * identifier. - * - * Return value: The string representation of a complete calendar wrapping the - * the sought object, or NULL if no object had the specified UID. A complete - * calendar is returned because you also need the timezone data. - **/ -char * -cal_backend_get_object (CalBackend *backend, const char *uid) -{ - g_return_val_if_fail (backend != NULL, NULL); - g_return_val_if_fail (IS_CAL_BACKEND (backend), NULL); - g_return_val_if_fail (uid != NULL, NULL); - - g_assert (CLASS (backend)->get_object != NULL); - return (* CLASS (backend)->get_object) (backend, uid); -} - -/** - * cal_backend_get_uids: - * @backend: A calendar backend. - * @type: Bitmask with types of objects to return. - * - * Builds a list of unique identifiers corresponding to calendar objects whose - * type matches one of the types specified in the @type flags. - * - * Return value: A list of strings that are the sought UIDs. - **/ -GList * -cal_backend_get_uids (CalBackend *backend, CalObjType type) -{ - g_return_val_if_fail (backend != NULL, NULL); - g_return_val_if_fail (IS_CAL_BACKEND (backend), NULL); - - g_assert (CLASS (backend)->get_uids != NULL); - return (* CLASS (backend)->get_uids) (backend, type); -} - -/** - * cal_backend_get_events_in_range: - * @backend: A calendar backend. - * @start: Start time for query. - * @end: End time for query. - * - * Builds a sorted list of calendar event object instances that occur or recur - * within the specified time range. Each object instance contains the object - * itself and the start/end times at which it occurs or recurs. - * - * Return value: A list of calendar event object instances, sorted by their - * start times. - **/ -GList * -cal_backend_get_events_in_range (CalBackend *backend, time_t start, time_t end) -{ - g_return_val_if_fail (backend != NULL, NULL); - g_return_val_if_fail (IS_CAL_BACKEND (backend), NULL); - g_return_val_if_fail (start != -1 && end != -1, NULL); - g_return_val_if_fail (start <= end, NULL); - - g_assert (CLASS (backend)->get_events_in_range != NULL); - return (* CLASS (backend)->get_events_in_range) (backend, start, end); -} - -/** - * cal_backend_get_alarms_in_range: - * @backend: A calendar backend. - * @start: Start time for query. - * @end: End time for query. - * - * Builds a sorted list of the alarms that trigger in the specified time range. - * - * Return value: A list of #CalAlarmInstance structures, sorted by trigger time. - **/ -GList * -cal_backend_get_alarms_in_range (CalBackend *backend, time_t start, time_t end) -{ - g_return_val_if_fail (backend != NULL, NULL); - g_return_val_if_fail (IS_CAL_BACKEND (backend), NULL); - g_return_val_if_fail (start != -1 && end != -1, NULL); - g_return_val_if_fail (start <= end, NULL); - - g_assert (CLASS (backend)->get_alarms_in_range != NULL); - return (* CLASS (backend)->get_alarms_in_range) (backend, start, end); -} - -/** - * cal_backend_get_alarms_for_object: - * @backend: A calendar backend. - * @uid: Unique identifier for a calendar object. - * @start: Start time for query. - * @end: End time for query. - * @alarms: Return value for the list of alarm instances. - * - * Builds a sorted list of the alarms of the specified event that trigger in a - * particular time range. - * - * Return value: TRUE on success, FALSE if the object was not found. - **/ -gboolean -cal_backend_get_alarms_for_object (CalBackend *backend, const char *uid, - time_t start, time_t end, - GList **alarms) -{ - g_return_val_if_fail (backend != NULL, FALSE); - g_return_val_if_fail (IS_CAL_BACKEND (backend), FALSE); - g_return_val_if_fail (uid != NULL, FALSE); - g_return_val_if_fail (start != -1 && end != -1, FALSE); - g_return_val_if_fail (start <= end, FALSE); - g_return_val_if_fail (alarms != NULL, FALSE); - - g_assert (CLASS (backend)->get_alarms_for_object != NULL); - return (* CLASS (backend)->get_alarms_for_object) (backend, uid, start, end, alarms); -} - -/** - * cal_backend_update_object: - * @backend: A calendar backend. - * @uid: Unique identifier of the object to update. - * @calobj: String representation of the new calendar object. - * - * Updates an object in a calendar backend. It will replace any existing - * object that has the same UID as the specified one. The backend will in - * turn notify all of its clients about the change. - * - * Return value: TRUE on success, FALSE on being passed an invalid object. - **/ -gboolean -cal_backend_update_object (CalBackend *backend, const char *uid, const char *calobj) -{ - g_return_val_if_fail (backend != NULL, FALSE); - g_return_val_if_fail (IS_CAL_BACKEND (backend), FALSE); - g_return_val_if_fail (uid != NULL, FALSE); - g_return_val_if_fail (calobj != NULL, FALSE); - - g_assert (CLASS (backend)->update_object != NULL); - return (* CLASS (backend)->update_object) (backend, uid, calobj); -} - -/** - * cal_backend_remove_object: - * @backend: A calendar backend. - * @uid: Unique identifier of the object to remove. - * - * Removes an object in a calendar backend. The backend will notify all of its - * clients about the change. - * - * Return value: TRUE on success, FALSE on being passed an UID for an object - * that does not exist in the backend. - **/ -gboolean -cal_backend_remove_object (CalBackend *backend, const char *uid) -{ - g_return_val_if_fail (backend != NULL, FALSE); - g_return_val_if_fail (IS_CAL_BACKEND (backend), FALSE); - g_return_val_if_fail (uid != NULL, FALSE); - - g_assert (CLASS (backend)->remove_object != NULL); - return (* CLASS (backend)->remove_object) (backend, uid); -} - -/** - * cal_backend_last_client_gone: - * @backend: A calendar backend. - * - * Emits the "last_client_gone" signal of a calendar backend. This function is - * to be used only by backend implementations. - **/ -void -cal_backend_last_client_gone (CalBackend *backend) -{ - g_return_if_fail (backend != NULL); - g_return_if_fail (IS_CAL_BACKEND (backend)); - - gtk_signal_emit (GTK_OBJECT (backend), cal_backend_signals[LAST_CLIENT_GONE]); -} diff --git a/calendar/pcs/cal-backend.h b/calendar/pcs/cal-backend.h deleted file mode 100644 index 2bbac4b3d4..0000000000 --- a/calendar/pcs/cal-backend.h +++ /dev/null @@ -1,110 +0,0 @@ -/* Evolution calendar - generic backend class - * - * Copyright (C) 2000 Helix Code, Inc. - * - * Author: Federico Mena-Quintero - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. - */ - -#ifndef CAL_BACKEND_H -#define CAL_BACKEND_H - -#include -#include -#include -#include "calendar/pcs/evolution-calendar.h" -#include "cal-common.h" -#include "cal.h" - -BEGIN_GNOME_DECLS - - - -#define CAL_BACKEND_TYPE (cal_backend_get_type ()) -#define CAL_BACKEND(obj) (GTK_CHECK_CAST ((obj), CAL_BACKEND_TYPE, CalBackend)) -#define CAL_BACKEND_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), CAL_BACKEND_TYPE, \ - CalBackendClass)) -#define IS_CAL_BACKEND(obj) (GTK_CHECK_TYPE ((obj), CAL_BACKEND_TYPE)) -#define IS_CAL_BACKEND_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), CAL_BACKEND_TYPE)) - -/* Load status values */ -typedef enum { - CAL_BACKEND_LOAD_SUCCESS, /* Loading OK */ - CAL_BACKEND_LOAD_ERROR /* We need better error reporting in libversit */ -} CalBackendLoadStatus; - -struct _CalBackend { - GtkObject object; - - /* Private data */ - gpointer priv; -}; - -struct _CalBackendClass { - GtkObjectClass parent_class; - - /* Notification signals */ - void (* last_client_gone) (CalBackend *backend); - - /* Virtual methods */ - GnomeVFSURI *(* get_uri) (CalBackend *backend); - void (* add_cal) (CalBackend *backend, Cal *cal); - CalBackendLoadStatus (* load) (CalBackend *backend, GnomeVFSURI *uri); - void (* create) (CalBackend *backend, GnomeVFSURI *uri); - char *(* get_object) (CalBackend *backend, const char *uid); - GList *(* get_uids) (CalBackend *backend, CalObjType type); - GList *(* get_events_in_range) (CalBackend *backend, time_t start, time_t end); - GList *(* get_alarms_in_range) (CalBackend *backend, time_t start, time_t end); - gboolean (* get_alarms_for_object) (CalBackend *backend, const char *uid, - time_t start, time_t end, - GList **alarms); - gboolean (* update_object) (CalBackend *backend, const char *uid, const char *calobj); - gboolean (* remove_object) (CalBackend *backend, const char *uid); -}; - -GtkType cal_backend_get_type (void); - -GnomeVFSURI *cal_backend_get_uri (CalBackend *backend); - -void cal_backend_add_cal (CalBackend *backend, Cal *cal); - -CalBackendLoadStatus cal_backend_load (CalBackend *backend, GnomeVFSURI *uri); - -void cal_backend_create (CalBackend *backend, GnomeVFSURI *uri); - -char *cal_backend_get_object (CalBackend *backend, const char *uid); - -GList *cal_backend_get_uids (CalBackend *backend, CalObjType type); - -GList *cal_backend_get_events_in_range (CalBackend *backend, time_t start, time_t end); - -GList *cal_backend_get_alarms_in_range (CalBackend *backend, time_t start, time_t end); - -gboolean cal_backend_get_alarms_for_object (CalBackend *backend, const char *uid, - time_t start, time_t end, - GList **alarms); - -gboolean cal_backend_update_object (CalBackend *backend, const char *uid, const char *calobj); - -gboolean cal_backend_remove_object (CalBackend *backend, const char *uid); - -void cal_backend_last_client_gone (CalBackend *backend); - - - -END_GNOME_DECLS - -#endif diff --git a/calendar/pcs/cal-common.h b/calendar/pcs/cal-common.h deleted file mode 100644 index e51ddf1bdd..0000000000 --- a/calendar/pcs/cal-common.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Evolution calendar server - common declarations - * - * Copyright (C) 2000 Helix Code, Inc. - * - * Author: Federico Mena-Quintero - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. - */ - -#ifndef CAL_COMMON_H -#define CAL_COMMON_H - -#include - -BEGIN_GNOME_DECLS - - - -typedef struct _CalBackend CalBackend; -typedef struct _CalBackendClass CalBackendClass; - -typedef struct _Cal Cal; -typedef struct _CalClass CalClass; - - - -END_GNOME_DECLS - -#endif diff --git a/calendar/pcs/cal-factory.c b/calendar/pcs/cal-factory.c deleted file mode 100644 index 9e60815805..0000000000 --- a/calendar/pcs/cal-factory.c +++ /dev/null @@ -1,829 +0,0 @@ -/* Evolution calendar factory - * - * Copyright (C) 2000 Helix Code, Inc. - * - * Author: Federico Mena-Quintero - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. - */ - -#include -#include -#include -#include "cal.h" -#include "cal-backend.h" -#include "cal-factory.h" -#include "job.h" - - - -/* Private part of the CalFactory structure */ -typedef struct { - /* Hash table from URI method strings to GtkType * for backend class types */ - GHashTable *methods; - - /* Hash table from GnomeVFSURI structures to CalBackend objects */ - GHashTable *backends; -} CalFactoryPrivate; - - - -/* Signal IDs */ -enum { - LAST_CALENDAR_GONE, - LAST_SIGNAL -}; - -static void cal_factory_class_init (CalFactoryClass *class); -static void cal_factory_init (CalFactory *factory); -static void cal_factory_destroy (GtkObject *object); - -static POA_Evolution_Calendar_CalFactory__vepv cal_factory_vepv; - -static BonoboObjectClass *parent_class; - -static guint cal_factory_signals[LAST_SIGNAL]; - - - -/** - * cal_factory_get_type: - * @void: - * - * Registers the #CalFactory class if necessary, and returns the type ID - * associated to it. - * - * Return value: The type ID of the #CalFactory class. - **/ -GtkType -cal_factory_get_type (void) -{ - static GtkType cal_factory_type = 0; - - if (!cal_factory_type) { - static const GtkTypeInfo cal_factory_info = { - "CalFactory", - sizeof (CalFactory), - sizeof (CalFactoryClass), - (GtkClassInitFunc) cal_factory_class_init, - (GtkObjectInitFunc) cal_factory_init, - NULL, /* reserved_1 */ - NULL, /* reserved_2 */ - (GtkClassInitFunc) NULL - }; - - cal_factory_type = gtk_type_unique (bonobo_object_get_type (), &cal_factory_info); - } - - return cal_factory_type; -} - -/* CORBA class initialization function for the calendar factory */ -static void -init_cal_factory_corba_class (void) -{ - cal_factory_vepv.Bonobo_Unknown_epv = bonobo_object_get_epv (); - cal_factory_vepv.Evolution_Calendar_CalFactory_epv = cal_factory_get_epv (); -} - -/* Class initialization function for the calendar factory */ -static void -cal_factory_class_init (CalFactoryClass *class) -{ - GtkObjectClass *object_class; - - object_class = (GtkObjectClass *) class; - - parent_class = gtk_type_class (bonobo_object_get_type ()); - - cal_factory_signals[LAST_CALENDAR_GONE] = - gtk_signal_new ("last_calendar_gone", - GTK_RUN_FIRST, - object_class->type, - GTK_SIGNAL_OFFSET (CalFactoryClass, last_calendar_gone), - gtk_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); - - gtk_object_class_add_signals (object_class, cal_factory_signals, LAST_SIGNAL); - - object_class->destroy = cal_factory_destroy; - - init_cal_factory_corba_class (); -} - -/* Object initialization function for the calendar factory */ -static void -cal_factory_init (CalFactory *factory) -{ - CalFactoryPrivate *priv; - - priv = g_new0 (CalFactoryPrivate, 1); - factory->priv = priv; - - priv->methods = g_hash_table_new (g_str_hash, g_str_equal); - priv->backends = g_hash_table_new (gnome_vfs_uri_hash, gnome_vfs_uri_hequal); -} - -/* Frees a method/GtkType * pair from the methods hash table */ -static void -free_method (gpointer key, gpointer value, gpointer data) -{ - char *method; - GtkType *type; - - method = key; - type = value; - - g_free (method); - g_free (type); -} - -/* Frees a uri/backend pair from the backends hash table */ -static void -free_backend (gpointer key, gpointer value, gpointer data) -{ - GnomeVFSURI *uri; - CalBackend *backend; - - uri = key; - backend = value; - - gnome_vfs_uri_unref (uri); - gtk_object_unref (GTK_OBJECT (backend)); -} - -/* Destroy handler for the calendar */ -static void -cal_factory_destroy (GtkObject *object) -{ - CalFactory *factory; - CalFactoryPrivate *priv; - - g_return_if_fail (object != NULL); - g_return_if_fail (IS_CAL_FACTORY (object)); - - factory = CAL_FACTORY (object); - priv = factory->priv; - - g_hash_table_foreach (priv->methods, free_method, NULL); - g_hash_table_destroy (priv->methods); - priv->methods = NULL; - - /* Should we assert that there are no more backends? */ - - g_hash_table_foreach (priv->backends, free_backend, NULL); - g_hash_table_destroy (priv->backends); - priv->backends = NULL; - - g_free (priv); - factory->priv = NULL; - - if (GTK_OBJECT_CLASS (parent_class)->destroy) - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); -} - - - -/* Loading and creating calendars */ - -/* Job data */ -typedef struct { - CalFactory *factory; - char *uri; - Evolution_Calendar_Listener listener; -} LoadCreateJobData; - -/* Queues a load or create request */ -static void -queue_load_create_job (CalFactory *factory, const char *uri, Evolution_Calendar_Listener listener, - JobFunc func) -{ - LoadCreateJobData *jd; - CORBA_Environment ev; - Evolution_Calendar_Listener listener_copy; - gboolean result; - - if ((!uri) || (!*uri)) - return; - - CORBA_exception_init (&ev); - result = CORBA_Object_is_nil (listener, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_message ("queue_load_create_job(): could not see if the listener was NIL"); - CORBA_exception_free (&ev); - return; - } - CORBA_exception_free (&ev); - - if (result) { - g_message ("queue_load_create_job(): cannot operate on a NIL listener!"); - return; - } - - listener_copy = CORBA_Object_duplicate (listener, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_message ("queue_load_create_job(): could not duplicate the listener"); - CORBA_exception_free (&ev); - return; - } - - CORBA_exception_free (&ev); - - jd = g_new (LoadCreateJobData, 1); - jd->factory = factory; - jd->uri = g_strdup (uri); - jd->listener = listener_copy; - - job_add (func, jd); -} - -/* Looks up a calendar backend in a factory's hash table of uri->cal */ -static CalBackend * -lookup_backend (CalFactory *factory, GnomeVFSURI *uri) -{ - CalFactoryPrivate *priv; - CalBackend *backend; - - priv = factory->priv; - - backend = g_hash_table_lookup (priv->backends, uri); - return backend; -} - -/* Callback used when a backend loses its last connected client */ -static void -backend_last_client_gone_cb (CalBackend *backend, gpointer data) -{ - CalFactory *factory; - CalFactoryPrivate *priv; - GnomeVFSURI *uri; - gpointer orig_key; - gboolean result; - GnomeVFSURI *orig_uri; - - factory = CAL_FACTORY (data); - priv = factory->priv; - - /* Remove the backend from the hash table */ - - uri = cal_backend_get_uri (backend); - g_assert (uri != NULL); - - result = g_hash_table_lookup_extended (priv->backends, uri, &orig_key, NULL); - g_assert (result != FALSE); - - orig_uri = orig_key; - - g_hash_table_remove (priv->backends, orig_uri); - gnome_vfs_uri_unref (orig_uri); - - gtk_object_unref (GTK_OBJECT (backend)); - - /* Notify upstream if there are no more backends */ - - if (g_hash_table_size (priv->backends) == 0) - gtk_signal_emit (GTK_OBJECT (factory), cal_factory_signals[LAST_CALENDAR_GONE]); -} - -/* Adds a backend to the calendar factory's hash table */ -static void -add_backend (CalFactory *factory, GnomeVFSURI *uri, CalBackend *backend) -{ - CalFactoryPrivate *priv; - - priv = factory->priv; - - gnome_vfs_uri_ref (uri); - g_hash_table_insert (priv->backends, uri, backend); - - gtk_signal_connect (GTK_OBJECT (backend), "last_client_gone", - GTK_SIGNAL_FUNC (backend_last_client_gone_cb), - factory); -} - -/* Tries to launch a backend for the method of the specified URI. If there is - * no such method registered in the factory, it sends the listener the - * MethodNotSupported error code. - */ -static CalBackend * -launch_backend_for_uri (CalFactory *factory, GnomeVFSURI *uri, Evolution_Calendar_Listener listener) -{ - CalFactoryPrivate *priv; - char *method; - GtkType *type; - CalBackend *backend; - - priv = factory->priv; - - /* FIXME: add an accessor function to gnome-vfs */ - method = uri->method_string; - - type = g_hash_table_lookup (priv->methods, method); - - if (!type) { - CORBA_Environment ev; - - CORBA_exception_init (&ev); - Evolution_Calendar_Listener_cal_loaded ( - listener, - Evolution_Calendar_Listener_METHOD_NOT_SUPPORTED, - CORBA_OBJECT_NIL, - &ev); - - if (ev._major != CORBA_NO_EXCEPTION) - g_message ("launch_backend_for_uri(): could not notify the listener"); - - CORBA_exception_free (&ev); - return NULL; - } - - backend = gtk_type_new (*type); - if (!backend) - g_message ("launch_backend_for_uri(): could not launch the backend"); - - return backend; -} - -/* Loads a calendar backend and puts it in the factory's backend hash table */ -static CalBackend * -load_backend (CalFactory *factory, GnomeVFSURI *uri, Evolution_Calendar_Listener listener) -{ - CalFactoryPrivate *priv; - CalBackend *backend; - CalBackendLoadStatus status; - CORBA_Environment ev; - - priv = factory->priv; - - backend = launch_backend_for_uri (factory, uri, listener); - if (!backend) - return NULL; - - status = cal_backend_load (backend, uri); - - switch (status) { - case CAL_BACKEND_LOAD_SUCCESS: - add_backend (factory, uri, backend); - return backend; - - case CAL_BACKEND_LOAD_ERROR: - gtk_object_unref (GTK_OBJECT (backend)); - - CORBA_exception_init (&ev); - Evolution_Calendar_Listener_cal_loaded (listener, - Evolution_Calendar_Listener_ERROR, - CORBA_OBJECT_NIL, - &ev); - - if (ev._major != CORBA_NO_EXCEPTION) - g_message ("load_backend(): could not notify the listener"); - - CORBA_exception_free (&ev); - return NULL; - - default: - g_assert_not_reached (); - return NULL; - } -} - -/* Creates a calendar backend and puts it in the factory's backend hash table */ -static CalBackend * -create_backend (CalFactory *factory, GnomeVFSURI *uri, Evolution_Calendar_Listener listener) -{ - CalFactoryPrivate *priv; - CalBackend *backend; - - priv = factory->priv; - - backend = launch_backend_for_uri (factory, uri, listener); - if (!backend) - return NULL; - - cal_backend_create (backend, uri); - - /* FIXME: add error reporting to cal_backend_create() */ -#if 0 - { - CORBA_Environment ev; - - CORBA_exception_init (&ev); - Evolution_Calendar_Listener_cal_loaded (listener, - Evolution_Calendar_Listener_ERROR, - CORBA_OBJECT_NIL, - &ev); - - if (ev._major != CORBA_NO_EXCEPTION) - g_message ("create_fn(): could not notify the listener"); - - CORBA_exception_free (&ev); - } -#endif - - add_backend (factory, uri, backend); - - return backend; -} - -/* Adds a listener to a calendar backend by creating a calendar client interface - * object. - */ -static void -add_calendar_client (CalFactory *factory, CalBackend *backend, Evolution_Calendar_Listener listener) -{ - Cal *cal; - CORBA_Environment ev; - - cal = cal_new (backend, listener); - if (!cal) { - g_message ("add_calendar_client(): could not create the calendar client interface"); - - CORBA_exception_init (&ev); - Evolution_Calendar_Listener_cal_loaded (listener, - Evolution_Calendar_Listener_ERROR, - CORBA_OBJECT_NIL, - &ev); - if (ev._major != CORBA_NO_EXCEPTION) - g_message ("add_calendar_client(): could not notify the listener"); - - CORBA_exception_free (&ev); - return; - } - - cal_backend_add_cal (backend, cal); - - CORBA_exception_init (&ev); - Evolution_Calendar_Listener_cal_loaded (listener, - Evolution_Calendar_Listener_SUCCESS, - bonobo_object_corba_objref (BONOBO_OBJECT (cal)), - &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_message ("add_calendar_client(): could not notify the listener"); - bonobo_object_unref (BONOBO_OBJECT (cal)); - } - - CORBA_exception_free (&ev); -} - -/* Job handler for the load calendar command */ -static void -load_fn (gpointer data) -{ - LoadCreateJobData *jd; - CalFactory *factory; - GnomeVFSURI *uri; - Evolution_Calendar_Listener listener; - CalBackend *backend; - CORBA_Environment ev; - - jd = data; - - /* Look up the calendar */ - - uri = gnome_vfs_uri_new (jd->uri); - g_free (jd->uri); - - factory = jd->factory; - listener = jd->listener; - g_free (jd); - - /* Look up the backend and create it if needed */ - - backend = lookup_backend (factory, uri); - - if (!backend) - backend = load_backend (factory, uri, listener); - - if (!backend) - goto out; - - add_calendar_client (factory, backend, listener); - - out: - - gnome_vfs_uri_unref (uri); - - CORBA_exception_init (&ev); - CORBA_Object_release (listener, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) - g_message ("load_fn(): could not release the listener"); - - CORBA_exception_free (&ev); -} - -/* Job handler for the create calendar command */ -static void -create_fn (gpointer data) -{ - LoadCreateJobData *jd; - CalFactory *factory; - GnomeVFSURI *uri; - Evolution_Calendar_Listener listener; - CalBackend *backend; - CORBA_Environment ev; - - jd = data; - factory = jd->factory; - - uri = gnome_vfs_uri_new (jd->uri); - g_free (jd->uri); - - factory = jd->factory; - listener = jd->listener; - g_free (jd); - - /* Check that the backend is not in use */ - - backend = lookup_backend (factory, uri); - - if (backend) { - CORBA_exception_init (&ev); - Evolution_Calendar_Listener_cal_loaded (listener, - Evolution_Calendar_Listener_IN_USE, - CORBA_OBJECT_NIL, - &ev); - - if (ev._major != CORBA_NO_EXCEPTION) - g_message ("create_fn(): could not notify the listener"); - - CORBA_exception_free (&ev); - goto out; - } - - /* Create the backend */ - - backend = create_backend (factory, uri, listener); - - if (!backend) - goto out; - - add_calendar_client (factory, backend, listener); - - out: - - gnome_vfs_uri_unref (uri); - - CORBA_exception_init (&ev); - CORBA_Object_release (listener, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) - g_message ("create_fn(): could not release the listener"); - - CORBA_exception_free (&ev); -} - - - -/* CORBA servant implementation */ - -/* CalFactory::load method */ -static void -CalFactory_load (PortableServer_Servant servant, - const CORBA_char *uri, - Evolution_Calendar_Listener listener, - CORBA_Environment *ev) -{ - CalFactory *factory; - CalFactoryPrivate *priv; - CORBA_Environment ev2; - gboolean result; - - factory = CAL_FACTORY (bonobo_object_from_servant (servant)); - priv = factory->priv; - - CORBA_exception_init (&ev2); - result = CORBA_Object_is_nil (listener, &ev2); - - if (ev2._major != CORBA_NO_EXCEPTION || result) { - CORBA_exception_set (ev, CORBA_USER_EXCEPTION, - ex_Evolution_Calendar_CalFactory_NilListener, - NULL); - - CORBA_exception_free (&ev2); - return; - } - CORBA_exception_free (&ev2); - - queue_load_create_job (factory, uri, listener, load_fn); -} - -/* CalFactory::create method */ -static void -CalFactory_create (PortableServer_Servant servant, - const CORBA_char *uri, - Evolution_Calendar_Listener listener, - CORBA_Environment *ev) -{ - CalFactory *factory; - CalFactoryPrivate *priv; - - factory = CAL_FACTORY (bonobo_object_from_servant (servant)); - priv = factory->priv; - - queue_load_create_job (factory, uri, listener, create_fn); -} - -/** - * cal_factory_get_epv: - * @void: - * - * Creates an EPV for the CalFactory CORBA class. - * - * Return value: A newly-allocated EPV. - **/ -POA_Evolution_Calendar_CalFactory__epv * -cal_factory_get_epv (void) -{ - POA_Evolution_Calendar_CalFactory__epv *epv; - - epv = g_new0 (POA_Evolution_Calendar_CalFactory__epv, 1); - epv->load = CalFactory_load; - epv->create = CalFactory_create; - - return epv; -} - - - -/** - * cal_factory_construct: - * @factory: A calendar factory. - * @corba_factory: CORBA object for the calendar factory. - * - * Constructs a calendar factory by binding the corresponding CORBA object to - * it. - * - * Return value: The same object as the @factory argument. - **/ -CalFactory * -cal_factory_construct (CalFactory *factory, Evolution_Calendar_CalFactory corba_factory) -{ - g_return_val_if_fail (factory != NULL, NULL); - g_return_val_if_fail (IS_CAL_FACTORY (factory), NULL); - - bonobo_object_construct (BONOBO_OBJECT (factory), corba_factory); - return factory; -} - -/** - * cal_factory_corba_object_create: - * @object: #BonoboObject that will wrap the CORBA object. - * - * Creates and activates the CORBA object that is wrapped by the specified - * calendar factory @object. - * - * Return value: An activated object reference or #CORBA_OBJECT_NIL in case of - * failure. - **/ -Evolution_Calendar_CalFactory -cal_factory_corba_object_create (BonoboObject *object) -{ - POA_Evolution_Calendar_CalFactory *servant; - CORBA_Environment ev; - - g_return_val_if_fail (object != NULL, CORBA_OBJECT_NIL); - g_return_val_if_fail (IS_CAL_FACTORY (object), CORBA_OBJECT_NIL); - - servant = (POA_Evolution_Calendar_CalFactory *) g_new0 (BonoboObjectServant, 1); - servant->vepv = &cal_factory_vepv; - - CORBA_exception_init (&ev); - POA_Evolution_Calendar_CalFactory__init ((PortableServer_Servant) servant, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - g_message ("cal_factory_corba_object_create(): could not init the servant"); - g_free (servant); - CORBA_exception_free (&ev); - return CORBA_OBJECT_NIL; - } - - CORBA_exception_free (&ev); - return (Evolution_Calendar_CalFactory) bonobo_object_activate_servant (object, servant); -} - -/** - * cal_factory_new: - * @void: - * - * Creates a new #CalFactory object. - * - * Return value: A newly-created #CalFactory, or NULL if its corresponding CORBA - * object could not be created. - **/ -CalFactory * -cal_factory_new (void) -{ - CalFactory *factory; - CORBA_Environment ev; - Evolution_Calendar_CalFactory corba_factory; - gboolean retval; - - factory = gtk_type_new (CAL_FACTORY_TYPE); - - corba_factory = cal_factory_corba_object_create (BONOBO_OBJECT (factory)); - - CORBA_exception_init (&ev); - retval = CORBA_Object_is_nil (corba_factory, &ev); - - if (ev._major != CORBA_NO_EXCEPTION || retval) { - g_message ("cal_factory_new(): could not create the CORBA factory"); - bonobo_object_unref (BONOBO_OBJECT (factory)); - CORBA_exception_free (&ev); - return NULL; - } - CORBA_exception_free (&ev); - - return cal_factory_construct (factory, corba_factory); -} - -/* Returns the lowercase version of a string */ -static char * -str_tolower (const char *s) -{ - char *str; - char *p; - - str = g_strdup (s); - for (p = str; *p; p++) - if (isalpha (*p)) - *p = tolower (*p); - - return str; -} - -/** - * cal_factory_register_method: - * @factory: A calendar factory. - * @method: Method for the URI, i.e. "http", "file", etc. - * @backend_type: Class type of the backend to create for this @method. - * - * Registers the type of a #CalBackend subclass that will be used to handle URIs - * with a particular method. When the factory is asked to load a particular - * URI, it will look in its list of registered methods and create a backend of - * the appropriate type. - **/ -void -cal_factory_register_method (CalFactory *factory, const char *method, GtkType backend_type) -{ - CalFactoryPrivate *priv; - GtkType *type; - char *method_str; - - g_return_if_fail (factory != NULL); - g_return_if_fail (IS_CAL_FACTORY (factory)); - g_return_if_fail (method != NULL); - g_return_if_fail (backend_type != 0); - g_return_if_fail (gtk_type_is_a (backend_type, CAL_BACKEND_TYPE)); - - priv = factory->priv; - - method_str = str_tolower (method); - - type = g_hash_table_lookup (priv->methods, method_str); - if (type) { - g_message ("cal_factory_register_method(): Method `%s' already registered!", - method_str); - g_free (method_str); - return; - } - - type = g_new (GtkType, 1); - *type = backend_type; - - g_hash_table_insert (priv->methods, method_str, type); -} - -/** - * cal_factory_get_n_backends: - * @factory: A calendar factory. - * - * Queries the number of running calendar backends in a calendar factory. - * - * Return value: Number of running backends. - **/ -int -cal_factory_get_n_backends (CalFactory *factory) -{ - CalFactoryPrivate *priv; - - g_return_val_if_fail (factory != NULL, -1); - g_return_val_if_fail (IS_CAL_FACTORY (factory), -1); - - priv = factory->priv; - return g_hash_table_size (priv->backends); -} diff --git a/calendar/pcs/cal-factory.h b/calendar/pcs/cal-factory.h deleted file mode 100644 index f96ba4ba92..0000000000 --- a/calendar/pcs/cal-factory.h +++ /dev/null @@ -1,75 +0,0 @@ -/* Evolution calendar factory - * - * Copyright (C) 2000 Helix Code, Inc. - * - * Author: Federico Mena-Quintero - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. - */ - -#ifndef CAL_FACTORY_H -#define CAL_FACTORY_H - -#include -#include - -#include "calendar/pcs/evolution-calendar.h" - -BEGIN_GNOME_DECLS - - - -#define CAL_FACTORY_TYPE (cal_factory_get_type ()) -#define CAL_FACTORY(obj) (GTK_CHECK_CAST ((obj), CAL_FACTORY_TYPE, CalFactory)) -#define CAL_FACTORY_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), CAL_FACTORY_TYPE, \ - CalFactoryClass)) -#define IS_CAL_FACTORY(obj) (GTK_CHECK_TYPE ((obj), CAL_FACTORY_TYPE)) -#define IS_CAL_FACTORY_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), CAL_FACTORY_TYPE)) - -typedef struct _CalFactory CalFactory; -typedef struct _CalFactoryClass CalFactoryClass; - -struct _CalFactory { - BonoboObject object; - - /* Private data */ - gpointer priv; -}; - -struct _CalFactoryClass { - BonoboObjectClass parent_class; - - /* Notification signals */ - void (* last_calendar_gone) (CalFactory *factory); -}; - -GtkType cal_factory_get_type (void); - -CalFactory *cal_factory_construct (CalFactory *factory, Evolution_Calendar_CalFactory corba_factory); -Evolution_Calendar_CalFactory cal_factory_corba_object_create (BonoboObject *object); - -CalFactory *cal_factory_new (void); - -void cal_factory_register_method (CalFactory *factory, const char *method, GtkType backend_type); - -int cal_factory_get_n_backends (CalFactory *factory); - -POA_Evolution_Calendar_CalFactory__epv *cal_factory_get_epv (void); - - - -END_GNOME_DECLS - -#endif diff --git a/calendar/pcs/cal.c b/calendar/pcs/cal.c deleted file mode 100644 index 13fab067f8..0000000000 --- a/calendar/pcs/cal.c +++ /dev/null @@ -1,707 +0,0 @@ -/* Evolution calendar client interface object - * - * Copyright (C) 2000 Helix Code, Inc. - * - * Author: Federico Mena-Quintero - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. - */ - -#include -#include "cal.h" -#include "cal-backend.h" - - - -/* Private part of the Cal structure */ -typedef struct { - /* Our backend */ - CalBackend *backend; - - /* Listener on the client we notify */ - Evolution_Calendar_Listener listener; -} CalPrivate; - - - -static void cal_class_init (CalClass *class); -static void cal_init (Cal *cal); -static void cal_destroy (GtkObject *object); - -static POA_Evolution_Calendar_Cal__vepv cal_vepv; - -static BonoboObjectClass *parent_class; - - - -/** - * cal_get_type: - * @void: - * - * Registers the #Cal class if necessary, and returns the type ID associated to - * it. - * - * Return value: The type ID of the #Cal class. - **/ -GtkType -cal_get_type (void) -{ - static GtkType cal_type = 0; - - if (!cal_type) { - static const GtkTypeInfo cal_info = { - "Cal", - sizeof (Cal), - sizeof (CalClass), - (GtkClassInitFunc) cal_class_init, - (GtkObjectInitFunc) cal_init, - NULL, /* reserved_1 */ - NULL, /* reserved_2 */ - (GtkClassInitFunc) NULL - }; - - cal_type = gtk_type_unique (BONOBO_OBJECT_TYPE, &cal_info); - } - - return cal_type; -} - -/* CORBA class initialzation function for the calendar */ -static void -init_cal_corba_class (void) -{ - cal_vepv.Bonobo_Unknown_epv = bonobo_object_get_epv (); - cal_vepv.Evolution_Calendar_Cal_epv = cal_get_epv (); -} - -/* Class initialization function for the calendar */ -static void -cal_class_init (CalClass *class) -{ - GtkObjectClass *object_class; - - object_class = (GtkObjectClass *) class; - - parent_class = gtk_type_class (BONOBO_OBJECT_TYPE); - - object_class->destroy = cal_destroy; - - init_cal_corba_class (); -} - -/* Object initialization function for the calendar */ -static void -cal_init (Cal *cal) -{ - CalPrivate *priv; - - priv = g_new0 (CalPrivate, 1); - cal->priv = priv; - - priv->listener = CORBA_OBJECT_NIL; -} - -/* Destroy handler for the calendar */ -static void -cal_destroy (GtkObject *object) -{ - Cal *cal; - CalPrivate *priv; - CORBA_Environment ev; - - g_return_if_fail (object != NULL); - g_return_if_fail (IS_CAL (object)); - - cal = CAL (object); - priv = cal->priv; - - priv->backend = NULL; - - CORBA_exception_init (&ev); - CORBA_Object_release (priv->listener, &ev); - if (ev._major != CORBA_NO_EXCEPTION) - g_message ("cal_destroy(): could not release the listener"); - - CORBA_exception_free (&ev); - - g_free (priv); - - if (GTK_OBJECT_CLASS (parent_class)->destroy) - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); -} - - - -/* CORBA servant implementation */ - -/* Cal::get_uri method */ -static CORBA_char * -Cal_get_uri (PortableServer_Servant servant, - CORBA_Environment *ev) -{ - Cal *cal; - CalPrivate *priv; - GnomeVFSURI *uri; - char *str_uri; - CORBA_char *str_uri_copy; - - cal = CAL (bonobo_object_from_servant (servant)); - priv = cal->priv; - - uri = cal_backend_get_uri (priv->backend); - str_uri = gnome_vfs_uri_to_string (uri, GNOME_VFS_URI_HIDE_NONE); - str_uri_copy = CORBA_string_dup (str_uri); - g_free (str_uri); - - return str_uri_copy; - -} - -/* Cal::get_object method */ -static Evolution_Calendar_CalObj -Cal_get_object (PortableServer_Servant servant, - const Evolution_Calendar_CalObjUID uid, - CORBA_Environment *ev) -{ - Cal *cal; - CalPrivate *priv; - char *calobj; - - cal = CAL (bonobo_object_from_servant (servant)); - priv = cal->priv; - - calobj = cal_backend_get_object (priv->backend, uid); - - if (calobj) { - CORBA_char *calobj_copy; - - calobj_copy = CORBA_string_dup (calobj); - g_free (calobj); - return calobj_copy; - } else { - CORBA_exception_set (ev, CORBA_USER_EXCEPTION, - ex_Evolution_Calendar_Cal_NotFound, - NULL); - return NULL; - } -} - -/* Cal::get_uids method */ -static Evolution_Calendar_CalObjUIDSeq * -Cal_get_uids (PortableServer_Servant servant, - Evolution_Calendar_CalObjType type, - CORBA_Environment *ev) -{ - Cal *cal; - CalPrivate *priv; - GList *uids, *l; - Evolution_Calendar_CalObjUIDSeq *seq; - int t; - int n, i; - - cal = CAL (bonobo_object_from_servant (servant)); - priv = cal->priv; - - /* Translate the CORBA flags to our own flags */ - - t = (((type & Evolution_Calendar_TYPE_EVENT) ? CALOBJ_TYPE_EVENT : 0) - | ((type & Evolution_Calendar_TYPE_TODO) ? CALOBJ_TYPE_TODO : 0) - | ((type & Evolution_Calendar_TYPE_JOURNAL) ? CALOBJ_TYPE_JOURNAL : 0) - | ((type & Evolution_Calendar_TYPE_OTHER) ? CALOBJ_TYPE_OTHER : 0) - /* - | ((type & Evolution_Calendar_TYPE_ANY) ? CALOBJ_TYPE_ANY : 0) - */ - ); - - uids = cal_backend_get_uids (priv->backend, t); - n = g_list_length (uids); - - seq = Evolution_Calendar_CalObjUIDSeq__alloc (); - CORBA_sequence_set_release (seq, TRUE); - seq->_length = n; - seq->_buffer = CORBA_sequence_Evolution_Calendar_CalObjUID_allocbuf (n); - - /* Fill the sequence */ - - for (i = 0, l = uids; l; i++, l = l->next) { - char *uid; - - uid = l->data; - - seq->_buffer[i] = CORBA_string_dup (uid); - } - - /* Done */ - - cal_obj_uid_list_free (uids); - - return seq; -} - -/* Builds a CORBA sequence of calendar object instances from a CalObjInstance - * list. - */ -static Evolution_Calendar_CalObjInstanceSeq * -build_object_instance_seq (GList *list) -{ - GList *l; - int n, i; - Evolution_Calendar_CalObjInstanceSeq *seq; - - n = g_list_length (list); - - seq = Evolution_Calendar_CalObjInstanceSeq__alloc (); - CORBA_sequence_set_release (seq, TRUE); - seq->_length = n; - seq->_buffer = CORBA_sequence_Evolution_Calendar_CalObjInstance_allocbuf (n); - - /* Fill the sequence */ - - for (i = 0, l = list; l; i++, l = l->next) { - CalObjInstance *icoi; - Evolution_Calendar_CalObjInstance *corba_icoi; - - icoi = l->data; - corba_icoi = &seq->_buffer[i]; - - corba_icoi->uid = CORBA_string_dup (icoi->uid); - corba_icoi->start = icoi->start; - corba_icoi->end = icoi->end; - } - - return seq; -} - -/* Cal::get_events_in_range method */ -static Evolution_Calendar_CalObjInstanceSeq * -Cal_get_events_in_range (PortableServer_Servant servant, - Evolution_Calendar_Time_t start, - Evolution_Calendar_Time_t end, - CORBA_Environment *ev) -{ - Cal *cal; - CalPrivate *priv; - time_t t_start, t_end; - Evolution_Calendar_CalObjInstanceSeq *seq; - GList *elist; - - cal = CAL (bonobo_object_from_servant (servant)); - priv = cal->priv; - - t_start = (time_t) start; - t_end = (time_t) end; - - if (t_start > t_end || t_start == -1 || t_end == -1) { - CORBA_exception_set (ev, CORBA_USER_EXCEPTION, - ex_Evolution_Calendar_Cal_InvalidRange, - NULL); - return NULL; - } - - /* Figure out the list and allocate the sequence */ - - elist = cal_backend_get_events_in_range (priv->backend, t_start, t_end); - seq = build_object_instance_seq (elist); - cal_obj_instance_list_free (elist); - - return seq; -} - -/* Translates an enum AlarmType to its CORBA representation */ -static Evolution_Calendar_AlarmType -corba_alarm_type (enum AlarmType type) -{ - switch (type) { - case ALARM_MAIL: - return Evolution_Calendar_MAIL; - - case ALARM_PROGRAM: - return Evolution_Calendar_PROGRAM; - - case ALARM_DISPLAY: - return Evolution_Calendar_DISPLAY; - - case ALARM_AUDIO: - return Evolution_Calendar_AUDIO; - - default: - g_assert_not_reached (); - return Evolution_Calendar_DISPLAY; - } -} - -/* Builds a CORBA sequence of alarm instances from a CalAlarmInstance list. */ -static Evolution_Calendar_CalAlarmInstanceSeq * -build_alarm_instance_seq (GList *alarms) -{ - GList *l; - int n, i; - Evolution_Calendar_CalAlarmInstanceSeq *seq; - - n = g_list_length (alarms); - - seq = Evolution_Calendar_CalAlarmInstanceSeq__alloc (); - CORBA_sequence_set_release (seq, TRUE); - seq->_length = n; - seq->_buffer = CORBA_sequence_Evolution_Calendar_CalAlarmInstance_allocbuf (n); - - /* Fill the sequence */ - - for (i = 0, l = alarms; l; i++, l = l->next) { - CalAlarmInstance *ai; - Evolution_Calendar_CalAlarmInstance *corba_ai; - - ai = l->data; - corba_ai = &seq->_buffer[i]; - - corba_ai->uid = CORBA_string_dup (ai->uid); - corba_ai->type = corba_alarm_type (ai->type); - corba_ai->trigger = ai->trigger; - corba_ai->occur = ai->occur; - } - - return seq; -} - -/* Cal::get_alarms_in_range method */ -static Evolution_Calendar_CalAlarmInstanceSeq * -Cal_get_alarms_in_range (PortableServer_Servant servant, - Evolution_Calendar_Time_t start, - Evolution_Calendar_Time_t end, - CORBA_Environment *ev) -{ - Cal *cal; - CalPrivate *priv; - time_t t_start, t_end; - Evolution_Calendar_CalAlarmInstanceSeq *seq; - GList *alarms; - - cal = CAL (bonobo_object_from_servant (servant)); - priv = cal->priv; - - t_start = (time_t) start; - t_end = (time_t) end; - - if (t_start > t_end || t_start == -1 || t_end == -1) { - CORBA_exception_set (ev, CORBA_USER_EXCEPTION, - ex_Evolution_Calendar_Cal_InvalidRange, - NULL); - return NULL; - } - - /* Figure out the list and allocate the sequence */ - - alarms = cal_backend_get_alarms_in_range (priv->backend, t_start, t_end); - seq = build_alarm_instance_seq (alarms); - cal_alarm_instance_list_free (alarms); - - return seq; -} - -/* Cal::get_alarms_for_object method */ -static Evolution_Calendar_CalAlarmInstanceSeq * -Cal_get_alarms_for_object (PortableServer_Servant servant, - const Evolution_Calendar_CalObjUID uid, - Evolution_Calendar_Time_t start, - Evolution_Calendar_Time_t end, - CORBA_Environment *ev) -{ - Cal *cal; - CalPrivate *priv; - time_t t_start, t_end; - Evolution_Calendar_CalAlarmInstanceSeq *seq; - GList *alarms; - gboolean result; - - cal = CAL (bonobo_object_from_servant (servant)); - priv = cal->priv; - - t_start = (time_t) start; - t_end = (time_t) end; - - if (t_start > t_end || t_start == -1 || t_end == -1) { - CORBA_exception_set (ev, CORBA_USER_EXCEPTION, - ex_Evolution_Calendar_Cal_InvalidRange, - NULL); - return NULL; - } - - result = cal_backend_get_alarms_for_object (priv->backend, uid, t_start, t_end, &alarms); - if (!result) { - CORBA_exception_set (ev, CORBA_USER_EXCEPTION, - ex_Evolution_Calendar_Cal_NotFound, - NULL); - return NULL; - } - - seq = build_alarm_instance_seq (alarms); - cal_alarm_instance_list_free (alarms); - - return seq; -} - -/* Cal::update_object method */ -static void -Cal_update_object (PortableServer_Servant servant, - const Evolution_Calendar_CalObjUID uid, - const Evolution_Calendar_CalObj calobj, - CORBA_Environment *ev) -{ - Cal *cal; - CalPrivate *priv; - - cal = CAL (bonobo_object_from_servant (servant)); - priv = cal->priv; - - if (!cal_backend_update_object (priv->backend, uid, calobj)) - CORBA_exception_set (ev, CORBA_USER_EXCEPTION, - ex_Evolution_Calendar_Cal_InvalidObject, - NULL); -} - -/* Cal::remove_object method */ -static void -Cal_remove_object (PortableServer_Servant servant, - const Evolution_Calendar_CalObjUID uid, - CORBA_Environment *ev) -{ - Cal *cal; - CalPrivate *priv; - - cal = CAL (bonobo_object_from_servant (servant)); - priv = cal->priv; - - if (!cal_backend_remove_object (priv->backend, uid)) - CORBA_exception_set (ev, CORBA_USER_EXCEPTION, - ex_Evolution_Calendar_Cal_NotFound, - NULL); -} - -/** - * cal_get_epv: - * @void: - * - * Creates an EPV for the Cal CORBA class. - * - * Return value: A newly-allocated EPV. - **/ -POA_Evolution_Calendar_Cal__epv * -cal_get_epv (void) -{ - POA_Evolution_Calendar_Cal__epv *epv; - - epv = g_new0 (POA_Evolution_Calendar_Cal__epv, 1); - epv->_get_uri = Cal_get_uri; - epv->get_object = Cal_get_object; - epv->get_uids = Cal_get_uids; - epv->get_events_in_range = Cal_get_events_in_range; - epv->get_alarms_in_range = Cal_get_alarms_in_range; - epv->get_alarms_for_object = Cal_get_alarms_for_object; - epv->update_object = Cal_update_object; - epv->remove_object = Cal_remove_object; - - return epv; -} - - - -/** - * cal_construct: - * @cal: A calendar client interface. - * @corba_cal: CORBA object for the calendar. - * @backend: Calendar backend that this @cal presents an interface to. - * @listener: Calendar listener for notification. - * - * Constructs a calendar client interface object by binding the corresponding - * CORBA object to it. The calendar interface is bound to the specified - * @backend, and will notify the @listener about changes to the calendar. - * - * Return value: The same object as the @cal argument. - **/ -Cal * -cal_construct (Cal *cal, - Evolution_Calendar_Cal corba_cal, - CalBackend *backend, - Evolution_Calendar_Listener listener) -{ - CalPrivate *priv; - CORBA_Environment ev; - - g_return_val_if_fail (cal != NULL, NULL); - g_return_val_if_fail (IS_CAL (cal), NULL); - g_return_val_if_fail (backend != NULL, NULL); - g_return_val_if_fail (IS_CAL_BACKEND (backend), NULL); - - priv = cal->priv; - - CORBA_exception_init (&ev); - priv->listener = CORBA_Object_duplicate (listener, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_message ("cal_construct: could not duplicate the listener"); - priv->listener = CORBA_OBJECT_NIL; - CORBA_exception_free (&ev); - return NULL; - } - - CORBA_exception_free (&ev); - - priv->backend = backend; - - bonobo_object_construct (BONOBO_OBJECT (cal), corba_cal); - return cal; -} - -/** - * cal_corba_object_create: - * @object: #BonoboObject that will wrap the CORBA object. - * - * Creates and activates the CORBA object that is wrapped by the specified - * calendar client interface @object. - * - * Return value: An activated object reference or #CORBA_OBJECT_NIL in case of - * failure. - **/ -Evolution_Calendar_Cal -cal_corba_object_create (BonoboObject *object) -{ - POA_Evolution_Calendar_Cal *servant; - CORBA_Environment ev; - - g_return_val_if_fail (object != NULL, CORBA_OBJECT_NIL); - g_return_val_if_fail (IS_CAL (object), CORBA_OBJECT_NIL); - - servant = (POA_Evolution_Calendar_Cal *) g_new0 (BonoboObjectServant, 1); - servant->vepv = &cal_vepv; - - CORBA_exception_init (&ev); - POA_Evolution_Calendar_Cal__init ((PortableServer_Servant) servant, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_message ("cal_corba_object_create(): could not init the servant"); - g_free (servant); - CORBA_exception_free (&ev); - return CORBA_OBJECT_NIL; - } - - CORBA_exception_free (&ev); - return (Evolution_Calendar_Cal) bonobo_object_activate_servant (object, servant); -} - -/** - * cal_new: - * @backend: A calendar backend. - * @listener: A calendar listener. - * - * Creates a new calendar client interface object and binds it to the specified - * @backend and @listener objects. - * - * Return value: A newly-created #Cal calendar client interface object, or NULL - * if its corresponding CORBA object could not be created. - **/ -Cal * -cal_new (CalBackend *backend, Evolution_Calendar_Listener listener) -{ - Cal *cal, *retval; - Evolution_Calendar_Cal corba_cal; - CORBA_Environment ev; - gboolean ret; - - g_return_val_if_fail (backend != NULL, NULL); - g_return_val_if_fail (IS_CAL_BACKEND (backend), NULL); - - cal = CAL (gtk_type_new (CAL_TYPE)); - corba_cal = cal_corba_object_create (BONOBO_OBJECT (cal)); - - CORBA_exception_init (&ev); - ret = CORBA_Object_is_nil ((CORBA_Object) corba_cal, &ev); - if (ev._major != CORBA_NO_EXCEPTION || ret) { - g_message ("cal_new(): could not create the CORBA object"); - bonobo_object_unref (BONOBO_OBJECT (cal)); - CORBA_exception_free (&ev); - return NULL; - } - - CORBA_exception_free (&ev); - - retval = cal_construct (cal, corba_cal, backend, listener); - if (!retval) { - g_message ("cal_new(): could not construct the calendar client interface"); - bonobo_object_unref (BONOBO_OBJECT (cal)); - return NULL; - } - - return retval; -} - -/** - * cal_notify_update: - * @cal: A calendar client interface. - * @uid: UID of object that was updated. - * - * Notifies a listener attached to a calendar client interface object about an - * update to a calendar object. - **/ -void -cal_notify_update (Cal *cal, const char *uid) -{ - CalPrivate *priv; - CORBA_Environment ev; - - g_return_if_fail (cal != NULL); - g_return_if_fail (IS_CAL (cal)); - g_return_if_fail (uid != NULL); - - priv = cal->priv; - g_return_if_fail (priv->listener != CORBA_OBJECT_NIL); - - CORBA_exception_init (&ev); - Evolution_Calendar_Listener_obj_updated (priv->listener, uid, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) - g_message ("cal_notify_update(): could not notify the listener " - "about an updated object"); - - CORBA_exception_free (&ev); -} - -/** - * cal_notify_remove: - * @cal: A calendar client interface. - * @uid: UID of object that was removed. - * - * Notifies a listener attached to a calendar client interface object about a - * calendar object that was removed. - **/ -void -cal_notify_remove (Cal *cal, const char *uid) -{ - CalPrivate *priv; - CORBA_Environment ev; - - g_return_if_fail (cal != NULL); - g_return_if_fail (IS_CAL (cal)); - g_return_if_fail (uid != NULL); - - priv = cal->priv; - g_return_if_fail (priv->listener != CORBA_OBJECT_NIL); - - CORBA_exception_init (&ev); - Evolution_Calendar_Listener_obj_removed (priv->listener, uid, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) - g_message ("cal_notify_remove(): could not notify the listener " - "about a removed object"); - - CORBA_exception_free (&ev); -} diff --git a/calendar/pcs/cal.h b/calendar/pcs/cal.h deleted file mode 100644 index a11cedebbb..0000000000 --- a/calendar/pcs/cal.h +++ /dev/null @@ -1,70 +0,0 @@ -/* Evolution calendar client interface object - * - * Copyright (C) 2000 Helix Code, Inc. - * - * Author: Federico Mena-Quintero - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. - */ - -#ifndef CAL_H -#define CAL_H - -#include -#include -#include "calendar/pcs/evolution-calendar.h" -#include "cal-common.h" - -BEGIN_GNOME_DECLS - - - -#define CAL_TYPE (cal_get_type ()) -#define CAL(obj) (GTK_CHECK_CAST ((obj), CAL_TYPE, Cal)) -#define CAL_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), CAL_TYPE, CalClass)) -#define IS_CAL(obj) (GTK_CHECK_TYPE ((obj), CAL_TYPE)) -#define IS_CAL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), CAL_TYPE)) - -struct _Cal { - BonoboObject object; - - /* Private data */ - gpointer priv; -}; - -struct _CalClass { - BonoboObjectClass parent_class; -}; - -GtkType cal_get_type (void); - -Cal *cal_construct (Cal *cal, - Evolution_Calendar_Cal corba_cal, - CalBackend *backend, - Evolution_Calendar_Listener listener); -Evolution_Calendar_Cal cal_corba_object_create (BonoboObject *object); - -Cal *cal_new (CalBackend *backend, Evolution_Calendar_Listener listener); - -void cal_notify_update (Cal *cal, const char *uid); -void cal_notify_remove (Cal *cal, const char *uid); - -POA_Evolution_Calendar_Cal__epv *cal_get_epv (void); - - - -END_GNOME_DECLS - -#endif diff --git a/calendar/pcs/icalendar-save.c b/calendar/pcs/icalendar-save.c deleted file mode 100644 index 8fae9a02f5..0000000000 --- a/calendar/pcs/icalendar-save.c +++ /dev/null @@ -1,509 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -#include -#include -#include -#include "icalendar-save.h" - - -static void unparse_person (iCalPerson *person, icalproperty *person_prop); -static struct icaltimetype timet_to_icaltime (time_t tt); -static icalproperty *unparse_related (iCalRelation *rel); -static icalcomponent *unparse_alarm (CalendarAlarm *alarm); - - -icalcomponent* -icalcomponent_create_from_ical_object (iCalObject *ical) -{ - icalcomponent_kind kind; - icalcomponent *comp; - icalproperty *prop; - - switch (ical->type) { - case ICAL_EVENT: kind = ICAL_VEVENT_COMPONENT; break; - case ICAL_TODO: kind = ICAL_VTODO_COMPONENT; break; - case ICAL_JOURNAL: kind = ICAL_VJOURNAL_COMPONENT; break; - case ICAL_FBREQUEST: kind = ICAL_VFREEBUSY_COMPONENT; break; - case ICAL_TIMEZONE: kind = ICAL_VTIMEZONE_COMPONENT; break; - default: - kind = ICAL_NO_COMPONENT; break; - } - - comp = icalcomponent_new (kind); - - /*** calscale ***/ - prop = icalproperty_new_calscale ("GREGORIAN"); - icalcomponent_add_property (comp, prop); - - /*** catagories ***/ - if (ical->categories) { - /* ical->categories is a GList of (char *) */ - GList *cur; - for (cur = ical->categories; cur; cur = cur->next) { - prop = icalproperty_new_categories ((char *) cur); - icalcomponent_add_property (comp, prop); - } - } - - /*** class ***/ - if (ical->class) { - prop = icalproperty_new_class (ical->class); - icalcomponent_add_property (comp, prop); - } - - /*** comment ***/ - if (ical->comment) { - prop = icalproperty_new_comment (ical->comment); - icalcomponent_add_property (comp, prop); - } - - /*** description ***/ - if (ical->desc) { - prop = icalproperty_new_description (ical->desc); - icalcomponent_add_property (comp, prop); - } - - /*** geo ***/ - if (ical->geo.valid) { - struct icalgeotype v; - v.lat = ical->geo.latitude; - v.lon = ical->geo.longitude; - prop = icalproperty_new_geo (v); - icalcomponent_add_property (comp, prop); - } - - /*** location ***/ - if (ical->location) { - prop = icalproperty_new_location (ical->location); - icalcomponent_add_property (comp, prop); - } - - /*** percentcomplete ***/ - prop = icalproperty_new_percentcomplete (ical->percent); - icalcomponent_add_property (comp, prop); - - /*** priority ***/ - if (ical->priority) { - prop = icalproperty_new_priority (ical->priority); - icalcomponent_add_property (comp, prop); - } - - /*** resources ***/ - if (ical->resources) { - /* ical->resources is a GList of (char *) */ - GList *cur; - for (cur = ical->resources; cur; cur = cur->next) { - prop = icalproperty_new_resources ((char *) cur); - icalcomponent_add_property (comp, prop); - } - } - - /*** status ***/ - if (ical->status) { - prop = icalproperty_new_status (ical->status); - icalcomponent_add_property (comp, prop); - } - - /*** summary ***/ - if (ical->summary) { - prop = icalproperty_new_summary (ical->summary); - icalcomponent_add_property (comp, prop); - } - - /*** completed ***/ - if (ical->completed) { - struct icaltimetype ictime; - ictime = timet_to_icaltime (ical->completed); - prop = icalproperty_new_completed (ictime); - icalcomponent_add_property (comp, prop); - } - - /*** dtend ***/ /*** due ***/ - if (ical->dtend) { - /* FIXME: We should handle timezone specifiers */ - struct icaltimetype ictime; - ictime = timet_to_icaltime (ical->dtend); - if (ical->type == ICAL_TODO) - prop = icalproperty_new_due (ictime); - else - prop = icalproperty_new_dtend (ictime); - if (ical->date_only) { - icalparameter *param; - param = icalparameter_new (ICAL_VALUE_PARAMETER); - icalparameter_set_value (param, ICAL_VALUE_DATE); - icalproperty_add_parameter (prop, param); - } - icalcomponent_add_property (comp, prop); - } - - /*** dtstart ***/ - if (ical->dtstart) { - /* FIXME: We should handle timezone specifiers */ - struct icaltimetype ictime; - ictime = timet_to_icaltime (ical->dtstart); - prop = icalproperty_new_dtstart (ictime); - if (ical->date_only) { - icalparameter *param; - param = icalparameter_new (ICAL_VALUE_PARAMETER); - icalparameter_set_value (param, ICAL_VALUE_DATE); - icalproperty_add_parameter (prop, param); - } - icalcomponent_add_property (comp, prop); - } - - /*** duration ***/ - { - /* FIX ME */ - } - - /*** freebusy ***/ - { - /* FIX ME */ - } - - /*** transp ***/ - { - if (ical->transp == ICAL_TRANSP_PROPERTY) - prop = icalproperty_new_transp ("TRANSPARENT"); - else - prop = icalproperty_new_transp ("OPAQUE"); - icalcomponent_add_property (comp, prop); - } - - /* - ICAL_TZID_PROPERTY: - ICAL_TZNAME_PROPERTY: - ICAL_TZOFFSETFROM_PROPERTY: - ICAL_TZOFFSETTO_PROPERTY: - ICAL_TZURL_PROPERTY: - */ - - /*** attendee ***/ - if (ical->attendee) { - /* a list of (iCalPerson *) */ - GList *cur; - for (cur = ical->attendee; cur; cur = cur->next) { - iCalPerson *person = (iCalPerson *) cur->data; - prop = icalproperty_new_attendee (person->addr); - unparse_person (person, prop); - icalcomponent_add_property (comp, prop); - } - } - - /*** contact ***/ - if (ical->contact) { - /* a list of (iCalPerson *) */ - GList *cur; - for (cur = ical->contact; cur; cur = cur->next) { - iCalPerson *person = (iCalPerson *) cur->data; - prop = icalproperty_new_contact (person->addr); - unparse_person (person, prop); - icalcomponent_add_property (comp, prop); - } - } - - /*** organizer ***/ - if (ical->organizer) { - prop = icalproperty_new_organizer (ical->organizer->addr); - unparse_person (ical->organizer, prop); - icalcomponent_add_property (comp, prop); - } - - /*** recurrenceid ***/ - if (ical->recurid) { - struct icaltimetype ictime; - ictime = timet_to_icaltime (ical->recurid); - prop = icalproperty_new_recurrenceid (ictime); - } - - /*** relatedto ***/ - - if (ical->related) { - /* a list of (iCalPerson *) */ - GList *cur; - for (cur = ical->related; cur; cur = cur->next) { - iCalRelation *related = (iCalRelation *) cur->data; - prop = unparse_related (related); - icalcomponent_add_property (comp, prop); - } - } - - - /*** url ***/ - if (ical->url) { - prop = icalproperty_new_url (ical->url); - icalcomponent_add_property (comp, prop); - } - - /*** uid ***/ - if (ical->uid) { - prop = icalproperty_new_uid (ical->uid); - icalcomponent_add_property (comp, prop); - } - - /*** exdate ***/ - if (ical->exdate) { - struct icaltimetype v; - GList *cur; - for (cur = ical->exdate; cur; cur = cur->next) { - time_t t = (time_t) cur->data; - v = timet_to_icaltime (t); - prop = icalproperty_new_exdate (v); - icalcomponent_add_property (comp, prop); - } - } - - /*** created ***/ - if (ical->created) { - struct icaltimetype v; - v = timet_to_icaltime (ical->created); - prop = icalproperty_new_created (v); - icalcomponent_add_property (comp, prop); - } - - /*** dtstamp ***/ - if (ical->dtstamp) { - struct icaltimetype v; - v = timet_to_icaltime (ical->dtstamp); - prop = icalproperty_new_created (v); - icalcomponent_add_property (comp, prop); - } - - /*** lastmodified ***/ - if (ical->last_mod) { - struct icaltimetype v; - v = timet_to_icaltime (ical->last_mod); - prop = icalproperty_new_created (v); - icalcomponent_add_property (comp, prop); - } - - /*** sequence ***/ - if (ical->seq) { - prop = icalproperty_new_sequence (ical->seq); - icalcomponent_add_property (comp, prop); - } - - /*** requeststatus ***/ - if (ical->rstatus) { - prop = icalproperty_new_requeststatus (ical->rstatus); - icalcomponent_add_property (comp, prop); - } - - /* if there is a VALARM subcomponent, add it here */ - - if (ical->alarms) { - GList *cur; - for (cur = ical->alarms; cur; cur = cur->next) { - CalendarAlarm *alarm = (CalendarAlarm *) cur->data; - icalcomponent *subcomp = unparse_alarm (alarm); - icalcomponent_add_component (comp, subcomp); - } - } - - return comp; -} - - -/* FIX ME -- same as icaltimetype_from_timet in icaltypes.c */ -static -struct icaltimetype timet_to_icaltime (time_t tt) -{ - struct tm *t; - struct icaltimetype i; - - t = gmtime (&tt); - - /*return tt - (i->is_utc ? timezone : 0); */ - i.is_utc = 0; - - i.year = t->tm_year + 1900; - i.month = t->tm_mon + 1; - i.day = t->tm_mday; - - if (t->tm_hour == 0 && t->tm_min == 0 && t->tm_sec == 0) { - i.is_date = 1; - i.hour = 0; - i.minute = 0; - i.second = 0; - } else { - i.is_date = 0; - i.hour = t->tm_hour; - i.minute = t->tm_min; - i.second = t->tm_sec; - } - - return i; -} - - -/* fills in "person_prop" with information from "person" */ - -static -void unparse_person (iCalPerson *person, icalproperty *person_prop) -{ - icalparameter *param; - GList *cur; - - /* convert iCalPerson to an icalproperty */ - - if (person->name) { - param = icalparameter_new_cn (person->name); - icalproperty_add_parameter (person_prop, param); - } - - if (g_strcasecmp (person->role, "CHAIR") == 0) - param = icalparameter_new_role (ICAL_ROLE_CHAIR); - else if (g_strcasecmp (person->role, "REQPARTICIPANT") == 0) - param = icalparameter_new_role (ICAL_ROLE_REQPARTICIPANT); - else if (g_strcasecmp (person->role, "OPTPARTICIPANT") == 0) - param = icalparameter_new_role (ICAL_ROLE_OPTPARTICIPANT); - else if (g_strcasecmp (person->role, "NONPARTICIPANT") == 0) - param = icalparameter_new_role (ICAL_ROLE_NONPARTICIPANT); - else - param = icalparameter_new_role (ICAL_ROLE_XNAME); - icalproperty_add_parameter (person_prop, param); - - if (g_strcasecmp (person->partstat, "NEEDSACTION") == 0) - param = icalparameter_new_partstat (ICAL_PARTSTAT_NEEDSACTION); - else if (g_strcasecmp (person->partstat, "ACCEPTED") == 0) - param = icalparameter_new_partstat (ICAL_PARTSTAT_ACCEPTED); - else if (g_strcasecmp (person->partstat, "DECLINED") == 0) - param = icalparameter_new_partstat (ICAL_PARTSTAT_DECLINED); - else if (g_strcasecmp (person->partstat, "TENTATIVE") == 0) - param = icalparameter_new_partstat (ICAL_PARTSTAT_TENTATIVE); - else if (g_strcasecmp (person->partstat, "DELEGATED") == 0) - param = icalparameter_new_partstat (ICAL_PARTSTAT_DELEGATED); - else if (g_strcasecmp (person->partstat, "COMPLETED") == 0) - param = icalparameter_new_partstat (ICAL_PARTSTAT_COMPLETED); - else if (g_strcasecmp (person->partstat, "INPROCESS") == 0) - param = icalparameter_new_partstat (ICAL_PARTSTAT_INPROCESS); - else /* FIX ME, NEEDSACTION instead? */ - param = icalparameter_new_partstat (ICAL_PARTSTAT_XNAME); - icalproperty_add_parameter (person_prop, param); - - if (person->rsvp != FALSE) { - param = icalparameter_new_rsvp (TRUE); - icalproperty_add_parameter (person_prop, param); - } - - if (g_strcasecmp (person->cutype, "INDIVIDUAL") == 0) - param = icalparameter_new_cutype (ICAL_CUTYPE_INDIVIDUAL); - else if (g_strcasecmp (person->cutype, "GROUP") == 0) - param = icalparameter_new_cutype (ICAL_CUTYPE_GROUP); - else if (g_strcasecmp (person->cutype, "RESOURCE") == 0) - param = icalparameter_new_cutype (ICAL_CUTYPE_RESOURCE); - else if (g_strcasecmp (person->cutype, "ROOM") == 0) - param = icalparameter_new_cutype (ICAL_CUTYPE_ROOM); - else /* FIX ME, INDIVIDUAL instead? */ - param = icalparameter_new_cutype (ICAL_CUTYPE_UNKNOWN); - icalproperty_add_parameter (person_prop, param); - - /* person->member is a list of ICAL_MEMBER_PARAMETER */ - for (cur = person->member; cur; cur = cur->next) { - gchar *member = (gchar *) cur->data; - param = icalparameter_new_member (member); - icalproperty_add_parameter (person_prop, param); - } - - /* person->deleg_to is a list of ICAL_DELEGATEDTO_PARAMETER */ - for (cur = person->deleg_to; cur; cur = cur->next) { - gchar *deleg_to = (gchar *) cur->data; - param = icalparameter_new_delegatedto (deleg_to); - icalproperty_add_parameter (person_prop, param); - } - - /* ret->deleg_from is a list of ICAL_DELEGATEDFROM_PARAMETER */ - for (cur = person->deleg_from; cur; cur = cur->next) { - gchar *deleg_from = (gchar *) cur->data; - param = icalparameter_new_delegatedfrom (deleg_from); - icalproperty_add_parameter (person_prop, param); - } - - if (person->sent_by) { - param = icalparameter_new_sentby (person->sent_by); - icalproperty_add_parameter (person_prop, param); - } - - /* ret->deleg_to is a list of ICAL_DIR_PARAMETER */ - /* FIX ME ... */ -} - - -static -icalproperty *unparse_related (iCalRelation *rel) -{ - icalproperty *prop; - - prop = icalproperty_new_relatedto (rel->reltype); - - icalproperty_set_relatedto (prop, rel->uid); - - /* FIX ME RELTYPE_XNAME ? */ - - return prop; -} - - -static -icalcomponent *unparse_alarm (CalendarAlarm *alarm) -{ - icalcomponent *comp = icalcomponent_new (ICAL_VALARM_COMPONENT); - icalproperty *prop; - - prop = NULL; - switch (alarm->type){ - case ALARM_AUDIO: - prop = icalproperty_new_action ("AUDIO"); - break; - case ALARM_DISPLAY: - prop = icalproperty_new_action ("DISPLAY"); - break; - case ALARM_MAIL: - prop = icalproperty_new_action ("EMAIL"); - break; - case ALARM_PROGRAM: - prop = icalproperty_new_action ("PROCEDURE"); - break; - default: - g_warning ("Unsupported alarm type!"); - break; - } - if (prop) - icalcomponent_add_property (comp, prop); - - if (alarm->snooze_repeat) - prop = icalproperty_new_repeat (alarm->snooze_repeat); - - if (alarm->snooze_secs) { - struct icaldurationtype dur; - dur = icaldurationtype_from_timet (alarm->snooze_secs); - prop = icalproperty_new_duration (dur); - icalcomponent_add_property (comp, prop); - } - - if (alarm->attach) { - struct icalattachtype *attach; - attach = icalattachtype_new (); - icalattachtype_set_url (attach, alarm->attach); - prop = icalproperty_new_attach (*attach); - icalattachtype_free (attach); - icalcomponent_add_property (comp, prop); - } - - if (alarm->desc) { - prop = icalproperty_new_description (alarm->desc); - icalcomponent_add_property (comp, prop); - } - - if (alarm->summary) { - prop = icalproperty_new_summary (alarm->summary); - icalcomponent_add_property (comp, prop); - } - - if (alarm->attendee) { - icalproperty_new_attendee (alarm->attendee); - icalcomponent_add_property (comp, prop); - } - - return comp; -} diff --git a/calendar/pcs/icalendar-save.h b/calendar/pcs/icalendar-save.h deleted file mode 100644 index 1e0ab59e70..0000000000 --- a/calendar/pcs/icalendar-save.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef ICALENDAR_SAVE_H -#define ICALENDAR_SAVE_H - -#include -#include - - - -icalcomponent *icalcomponent_create_from_ical_object (iCalObject *ical); - - - -#endif diff --git a/calendar/pcs/icalendar-test.c b/calendar/pcs/icalendar-test.c deleted file mode 100644 index 921e109a2c..0000000000 --- a/calendar/pcs/icalendar-test.c +++ /dev/null @@ -1,146 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -#include -#include -#include - -#include -#include -#include -#include "libversit/vcc.h" - -#include "icalendar-save.h" -#include "icalendar.h" - - -static icalcomponent* -icalendar_parse_file (char* fname) -{ - FILE* fp; - icalcomponent* comp = NULL; - gchar* str; - struct stat st; - int n; - - fp = fopen (fname, "r"); - if (!fp) { - g_warning ("Cannot open open calendar file."); - return NULL; - } - - stat (fname, &st); - - str = g_malloc (st.st_size + 2); - - n = fread ((gchar*) str, 1, st.st_size, fp); - if (n != st.st_size) { - g_warning ("Read error."); - } - str[n] = '\0'; - - fclose (fp); - - comp = icalparser_parse_string (str); - g_free (str); - - return comp; -} - - -static GList * -icalendar_calendar_load (GList *icals, char *fname) -{ - icalcomponent *comp; - icalcomponent *subcomp; - iCalObject *ical; - - comp = icalendar_parse_file (fname); - subcomp = icalcomponent_get_first_component (comp, - ICAL_ANY_COMPONENT); - while (subcomp) { - ical = ical_object_create_from_icalcomponent (subcomp); - if (ical->type != ICAL_EVENT && - ical->type != ICAL_TODO && - ical->type != ICAL_JOURNAL) { - g_warning ("Skipping unsupported iCalendar component"); - } else { - printf ("prepending %p\n", ical); - icals = g_list_prepend (icals, ical); - } - subcomp = icalcomponent_get_next_component (comp, - ICAL_ANY_COMPONENT); - } - - return icals; -} - - - - -static void -icalendar_calendar_save (GList *icals, char *fname) -{ - GList *cur; - icalcomponent *top = icalcomponent_new (ICAL_VCALENDAR_COMPONENT); - char *out_cal_string; - - for (cur=icals; cur; cur=cur->next) { - iCalObject *ical = (iCalObject *) cur->data; - icalcomponent *comp; - comp = icalcomponent_create_from_ical_object (ical); - icalcomponent_add_component (top, comp); - } - - out_cal_string = icalcomponent_as_ical_string (top); - - printf ("---------------------------------------------------------\n"); - printf ("%s", out_cal_string); -} - - - -int main (int argc, char *argv[]) -{ - GList *icals = NULL; - int i; - long int n0, n1; - struct icaldurationtype dt; - - - /* test icaldurationtype_from_timet */ - srandom (time (0)); - - for (i=0; i<10; i++) { - n0 = random () % ((60 * 60 * 24 * 7) * 4); - dt = icaldurationtype_from_timet (n0); - n1 = icaldurationtype_as_timet (dt); - - printf ("%ld -> (%d %d %d %d %d) -> %ld\n", - n0, - dt.weeks, dt.days, dt.hours, dt.minutes, dt.seconds, - n1); - if (n0 != n1) abort (); - } - - /*****************/ - /* test conversion of icalcomponents to and from iCalObjects */ - /*****************/ - - /* load an ical file */ - - if (argc < 2) { - printf ("give ical file as argument.\n"); - return 1; - } - - icals = icalendar_calendar_load (icals, argv[ 1 ]); - - printf ("loaded %d ical components\n", g_list_length (icals)); - - - /* save it back out */ - - icalendar_calendar_save (icals, "out.ical"); - - return 0; -} diff --git a/calendar/pcs/icalendar.c b/calendar/pcs/icalendar.c deleted file mode 100644 index eedb732617..0000000000 --- a/calendar/pcs/icalendar.c +++ /dev/null @@ -1,674 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * icalendar server for gnomecal - * - * This module interfaces between libical and the gnomecal internal - * representation - * - * Copyright (C) 1999 The Free Software Foundation - * Authors: - * Russell Steinthal (rms39@columbia.edu) - * - */ - -#include -#include -#include -#include "icalendar.h" - -static time_t icaltime_to_timet (struct icaltimetype* i); -static CalendarAlarm* parse_alarm (icalproperty *prop); -static iCalPerson* parse_person (icalproperty *prop, gchar *value); -static iCalRelation* parse_related (icalproperty *prop); - -/* Duplicate a string without memory leaks */ -static gchar* copy_str (gchar** store, gchar* src) -{ - if (*store) - g_free (*store); - return (*store = g_strdup (src)); -} - -static GList* -copy_to_list (GList** store, gchar* src) -{ - *store = g_list_prepend (*store, g_strdup (src)); - return *store; -} - - -iCalObject * -ical_object_create_from_icalcomponent (icalcomponent* comp) -{ - iCalObject *ical = NULL; - iCalPerson *person; - icalcomponent *subcomp; - icalproperty *prop; - icalparameter *param; - struct icaltimetype ictime; - time_t *pt; - CalendarAlarm *alarm = NULL; - icalcomponent_kind compType; - struct icalgeotype geo; - struct icalperiodtype period; - - gboolean root = FALSE; - gboolean attachment = FALSE; - - char *tmpStr; /* this is a library-owned string */ - - ical = g_new0 (iCalObject, 1); - - compType = icalcomponent_isa (comp); - - switch (compType) { - case ICAL_XROOT_COMPONENT: - root = TRUE; - break; - case ICAL_XATTACH_COMPONENT: - attachment = TRUE; - break; - case ICAL_VEVENT_COMPONENT: - ical->type = ICAL_EVENT; - break; - case ICAL_VTODO_COMPONENT: - ical->type = ICAL_TODO; - break; - case ICAL_VJOURNAL_COMPONENT: - ical->type = ICAL_JOURNAL; - break; - case ICAL_VCALENDAR_COMPONENT: - /* FIXME: what does this mean? */ - break; - case ICAL_VFREEBUSY_COMPONENT: - ical->type = ICAL_FBREQUEST; - /* NOTE: This is not conclusive- you need to analyze - properties to determine whether this is an - FBREQUEST or an FBREPLY */ - break; - case ICAL_VTIMEZONE_COMPONENT: - ical->type = ICAL_TIMEZONE; - break; - case ICAL_VALARM_COMPONENT: - case ICAL_XAUDIOALARM_COMPONENT: - case ICAL_XDISPLAYALARM_COMPONENT: - case ICAL_XEMAILALARM_COMPONENT: - case ICAL_XPROCEDUREALARM_COMPONENT: - /* this should not be reached, since this loop should - only be processing first level components */ - break; - case ICAL_XSTANDARD_COMPONENT: - /* FIXME: what does this mean? */ - break; - case ICAL_XDAYLIGHT_COMPONENT: - /* FIXME: what does this mean? */ - break; - case ICAL_X_COMPONENT: - /* FIXME: what does this mean? */ - break; - case ICAL_VSCHEDULE_COMPONENT: - /* FIXME: what does this mean? */ - break; - case ICAL_XLICINVALID_COMPONENT: - /* FIXME: what does this mean? */ - break; - case ICAL_NO_COMPONENT: - case ICAL_ANY_COMPONENT: - /* should not occur */ - break; - case ICAL_VQUERY_COMPONENT: - case ICAL_VCAR_COMPONENT: - case ICAL_VCOMMAND_COMPONENT: - /* FIXME: what does this mean? */ - break; - } - - prop = icalcomponent_get_first_property (comp, ICAL_ANY_PROPERTY); - while (prop) { - switch (icalproperty_isa (prop)) { - case ICAL_CALSCALE_PROPERTY: - if (g_strcasecmp (icalproperty_get_calscale (prop), - "GREGORIAN")) - g_warning ("Unknown calendar format."); - break; - case ICAL_METHOD_PROPERTY: - /* FIXME: implement something here */ - break; - case ICAL_ATTACH_PROPERTY: - /* FIXME: not yet implemented */ - break; - case ICAL_CATEGORIES_PROPERTY: - copy_to_list (&ical->categories, - icalproperty_get_categories (prop)); - break; - case ICAL_CLASS_PROPERTY: - copy_str (&ical->class, icalproperty_get_class (prop)); - break; - case ICAL_COMMENT_PROPERTY: - /*tmpStr = icalproperty_get_comment (prop);*/ - tmpStr = g_strconcat (icalproperty_get_comment (prop), - ical->comment, - NULL); - if (ical->comment) - g_free (ical->comment); - ical->comment = tmpStr; - break; - case ICAL_DESCRIPTION_PROPERTY: - copy_str (&ical->desc, - icalproperty_get_description (prop)); - break; - case ICAL_GEO_PROPERTY: - geo = icalproperty_get_geo (prop); - ical->geo.latitude = geo.lat; - ical->geo.longitude = geo.lon; - ical->geo.valid = TRUE; - break; - case ICAL_LOCATION_PROPERTY: - copy_str (&ical->location, - icalproperty_get_location (prop)); - break; - case ICAL_PERCENTCOMPLETE_PROPERTY: - ical->percent = icalproperty_get_percentcomplete (prop); - break; - case ICAL_PRIORITY_PROPERTY: - ical->priority = icalproperty_get_priority (prop); - if (ical->priority < 0 || ical->priority > 9) - g_warning ("Priority out-of-range (see RFC2445)"); - break; - case ICAL_RESOURCES_PROPERTY: - copy_to_list (&ical->resources, - icalproperty_get_resources (prop)); - break; - case ICAL_STATUS_PROPERTY: - copy_str (&ical->status, - icalproperty_get_status (prop)); - break; - case ICAL_SUMMARY_PROPERTY: - copy_str (&ical->summary, - icalproperty_get_summary (prop)); - break; - case ICAL_COMPLETED_PROPERTY: - ictime = icalproperty_get_completed (prop); - ical->completed = icaltime_to_timet (&ictime); - break; - case ICAL_DTEND_PROPERTY: - ictime = icalproperty_get_dtend (prop); - ical->dtend = icaltime_to_timet (&ictime); - param = icalproperty_get_first_parameter (prop, - ICAL_VALUE_PARAMETER); - if (param) - ical->date_only = (icalparameter_get_value (param) == ICAL_VALUE_DATE); - /* FIXME: We should handle timezone specifiers */ - break; - case ICAL_DUE_PROPERTY: - ictime = icalproperty_get_due (prop); - ical->dtend = icaltime_to_timet (&ictime); - param = icalproperty_get_first_parameter (prop, - ICAL_VALUE_PARAMETER); - ical->date_only = (icalparameter_get_value (param) == - ICAL_VALUE_DATE); - /* FIXME: We should handle timezone specifiers */ - break; - case ICAL_DTSTART_PROPERTY: - ictime = icalproperty_get_dtstart (prop); - ical->dtstart = icaltime_to_timet (&ictime); - param = icalproperty_get_first_parameter (prop, - ICAL_VALUE_PARAMETER); - if (param) - ical->date_only = (icalparameter_get_value (param) == ICAL_VALUE_DATE); - /* FIXME: We should handle timezone specifiers */ - break; - case ICAL_DURATION_PROPERTY: - /* FIXME: I don't see the necessary libical function */ - break; - case ICAL_FREEBUSY_PROPERTY: - period = icalproperty_get_freebusy (prop); - ical->dtstart = icaltime_to_timet (&(period.start)); - /* FIXME: period.end is specified as being relative - to start, so this may not be correct */ - ical->dtend = icaltime_to_timet (&(period.end)); - break; - case ICAL_TRANSP_PROPERTY: - tmpStr = icalproperty_get_transp (prop); - /* do not i18n the following string constant! */ - if (!g_strcasecmp (tmpStr, "TRANSPARENT")) - ical->transp = ICAL_TRANSPARENT; - else - ical->transp = ICAL_OPAQUE; - break; - case ICAL_TZID_PROPERTY: - case ICAL_TZNAME_PROPERTY: - case ICAL_TZOFFSETFROM_PROPERTY: - case ICAL_TZOFFSETTO_PROPERTY: - case ICAL_TZURL_PROPERTY: - /* no implementation for now */ - break; - case ICAL_ATTENDEE_PROPERTY: - tmpStr = icalproperty_get_attendee (prop); - person = parse_person (prop, tmpStr); - ical->attendee = g_list_prepend (ical->attendee, - person); - break; - case ICAL_CONTACT_PROPERTY: - tmpStr = icalproperty_get_contact (prop); - person = parse_person (prop, tmpStr); - ical->contact = g_list_prepend (ical->contact, person); - break; - case ICAL_ORGANIZER_PROPERTY: - tmpStr = icalproperty_get_organizer (prop); - person = parse_person (prop, tmpStr); - if (ical->organizer) - g_free (ical->organizer); - ical->organizer = person; - break; - case ICAL_RECURRENCEID_PROPERTY: - ictime = icalproperty_get_recurrenceid (prop); - ical->recurid = icaltime_to_timet (&ictime); - /* FIXME: Range parameter not implemented */ - break; - case ICAL_RELATEDTO_PROPERTY: - ical->related = g_list_prepend (ical->related, - parse_related (prop)); - break; - case ICAL_URL_PROPERTY: - copy_str (&ical->url, - icalproperty_get_url (prop)); - break; - case ICAL_UID_PROPERTY: - copy_str (&ical->uid, - icalproperty_get_uid (prop)); - break; - case ICAL_EXDATE_PROPERTY: - /* FIXME: This does not appear to parse - multiple exdate values in one property, as - allowed by the RFC; needs a libical fix */ - ictime = icalproperty_get_exdate (prop); - pt = g_new0 (time_t, 1); - *pt = icaltime_to_timet (&ictime); - ical->exdate = g_list_prepend (ical->exdate, pt); - break; - case ICAL_EXRULE_PROPERTY: - case ICAL_RDATE_PROPERTY: - case ICAL_RRULE_PROPERTY: - /* FIXME: need recursion processing */ - break; - case ICAL_ACTION_PROPERTY: - case ICAL_REPEAT_PROPERTY: - case ICAL_TRIGGER_PROPERTY: - /* should only occur in VALARM's, handled below */ - g_assert_not_reached(); - break; - case ICAL_CREATED_PROPERTY: - ictime = icalproperty_get_created (prop); - ical->created = icaltime_to_timet (&ictime); - break; - case ICAL_DTSTAMP_PROPERTY: - ictime = icalproperty_get_dtstamp (prop); - ical->dtstamp = icaltime_to_timet (&ictime); - break; - case ICAL_LASTMODIFIED_PROPERTY: - ictime = icalproperty_get_lastmodified (prop); - ical->last_mod = icaltime_to_timet (&ictime); - break; - case ICAL_SEQUENCE_PROPERTY: - ical->seq = icalproperty_get_sequence (prop); - break; - case ICAL_REQUESTSTATUS_PROPERTY: - copy_str (&ical->rstatus, - icalproperty_get_requeststatus (prop)); - break; - case ICAL_X_PROPERTY: - g_warning ("Unsupported X-property: %s", - icalproperty_as_ical_string (prop)); - break; - case ICAL_XLICERROR_PROPERTY: - g_warning ("Unsupported property: %s", - icalproperty_get_xlicerror (prop)); - break; - case ICAL_PRODID_PROPERTY: - case ICAL_VERSION_PROPERTY: - /* nothing to do for this property */ - break; - default: - g_warning ("Unsupported property: %s", icalproperty_as_ical_string -(prop)); - break; - - } - - prop = icalcomponent_get_next_property (comp, - ICAL_ANY_PROPERTY); - } - - /* now parse subcomponents --- should only be VALARM's */ - subcomp = icalcomponent_get_first_component (comp, - ICAL_ANY_COMPONENT); - while (subcomp) { - compType = icalcomponent_isa (subcomp); - switch (compType) { - case ICAL_VALARM_COMPONENT: - alarm = parse_alarm (subcomp); - if (alarm) - ical->alarms = g_list_prepend (ical->alarms, - alarm); - break; - default: - g_warning ("Only nested VALARM components are supported."); - } - - subcomp = icalcomponent_get_next_component (comp, - ICAL_ANY_COMPONENT); - } - - return ical; -} - - -static time_t icaltime_to_timet (struct icaltimetype* i) -{ - struct tm t; - time_t ret; - - t.tm_year = i->year - 1900; - t.tm_mon = i->month - 1; - t.tm_mday = i->day; - if (!i->is_date) { - t.tm_hour = i->hour; - t.tm_min = i->minute; - t.tm_sec = i->second; - } else { - t.tm_hour = 0; - t.tm_min = 0; - t.tm_sec = 0; - } - - ret = mktime(&t); - - if (i->is_utc) { -#ifdef HAVE_TIMEZONE - extern long timezone; - ret -= timezone; -#else - struct tm *tmp; - time_t tod = time(NULL); - tmp = localtime (&tod); - ret += tmp->tm_gmtoff; -#endif - } - - return ret; -} - -static iCalPerson* -parse_person (icalproperty* prop, gchar* value) -{ - icalparameter* param; - icalparameter_role role; - icalparameter_partstat partstat; - icalparameter_cutype cutype; - - iCalPerson* ret; - - ret = g_new0 (iCalPerson, 1); - - ret->addr = g_strdup (value); - - param = icalproperty_get_first_parameter (prop, - ICAL_CN_PARAMETER); - if (param) - ret->name = g_strdup (icalparameter_get_cn (param)); - else - ret->name = NULL; - - - param = icalproperty_get_first_parameter (prop, - ICAL_ROLE_PARAMETER); - if (param) { - role = icalparameter_get_role (param); - switch (role) { - case ICAL_ROLE_CHAIR: - ret->role = g_strdup ("CHAIR"); - break; - case ICAL_ROLE_REQPARTICIPANT: - ret->role = g_strdup ("REQPARTICIPANT"); - break; - case ICAL_ROLE_OPTPARTICIPANT: - ret->role = g_strdup ("OPTPARTICIPANT"); - break; - case ICAL_ROLE_NONPARTICIPANT: - ret->role = g_strdup ("NONPARTICIPANT"); - break; - case ICAL_ROLE_XNAME: - default: - ret->role = g_strdup ("UNKNOWN"); - break; - } - } else - ret->role = g_strdup ("REQPARTICIPANT"); - - param = icalproperty_get_first_parameter (prop, ICAL_PARTSTAT_PARAMETER); - if (param) { - partstat = icalparameter_get_partstat (param); - switch (partstat) { - case ICAL_PARTSTAT_NEEDSACTION: - ret->partstat = g_strdup ("NEEDSACTION"); - break; - case ICAL_PARTSTAT_ACCEPTED: - ret->partstat = g_strdup ("ACCEPTED"); - break; - case ICAL_PARTSTAT_DECLINED: - ret->partstat = g_strdup ("DECLINED"); - break; - case ICAL_PARTSTAT_TENTATIVE: - ret->partstat = g_strdup ("TENTATIVE"); - break; - case ICAL_PARTSTAT_DELEGATED: - ret->partstat = g_strdup ("DELEGATED"); - break; - case ICAL_PARTSTAT_COMPLETED: - ret->partstat = g_strdup ("COMPLETED"); - break; - case ICAL_PARTSTAT_INPROCESS: - ret->partstat = g_strdup ("INPROCESS"); - break; - case ICAL_PARTSTAT_XNAME: - ret->partstat = g_strdup (icalparameter_get_xvalue (param)); - break; - default: - ret->partstat = g_strdup ("UNKNOWN"); - break; - } - } else - ret->partstat = g_strdup ("NEEDSACTION"); - - param = icalproperty_get_first_parameter (prop, ICAL_RSVP_PARAMETER); - if (param) - ret->rsvp = icalparameter_get_rsvp (param); - else - ret->rsvp = FALSE; - - param = icalproperty_get_first_parameter (prop, ICAL_CUTYPE_PARAMETER -); - if (param) { - cutype = icalparameter_get_cutype (param); - switch (cutype) { - case ICAL_CUTYPE_INDIVIDUAL: - ret->cutype = g_strdup ("INDIVIDUAL"); - break; - case ICAL_CUTYPE_GROUP: - ret->cutype = g_strdup ("GROUP"); - break; - case ICAL_CUTYPE_RESOURCE: - ret->cutype = g_strdup ("RESOURCE"); - break; - case ICAL_CUTYPE_ROOM: - ret->cutype = g_strdup ("ROOM"); - break; - case ICAL_CUTYPE_UNKNOWN: - case ICAL_CUTYPE_XNAME: - default: - ret->cutype = g_strdup ("UNKNOWN"); - break; - } - } else - ret->cutype = g_strdup ("INDIVIDUAL"); - - param = icalproperty_get_first_parameter (prop, ICAL_MEMBER_PARAMETER -); - while (param) { - copy_to_list (&ret->member, icalparameter_get_member (param)); - param = icalproperty_get_next_parameter (prop, - ICAL_MEMBER_PARAMETER); - } - - param = icalproperty_get_first_parameter (prop, ICAL_DELEGATEDTO_PARAMETER); - while (param) { - copy_to_list (&ret->deleg_to, - icalparameter_get_delegatedto (param)); - param = icalproperty_get_next_parameter (prop, - ICAL_DELEGATEDTO_PARAMETER); - } - - param = icalproperty_get_first_parameter (prop, ICAL_DELEGATEDFROM_PARAMETER); - while (param) { - copy_to_list (&ret->deleg_from, - icalparameter_get_delegatedfrom (param)); - param = icalproperty_get_next_parameter (prop, - ICAL_DELEGATEDFROM_PARAMETER); - } - - param = icalproperty_get_first_parameter (prop, ICAL_SENTBY_PARAMETER); - if (param) - copy_str (&ret->sent_by, icalparameter_get_sentby (param)); - else - ret->sent_by = NULL; - - param = icalproperty_get_first_parameter (prop, ICAL_DIR_PARAMETER); - while (param) { - copy_to_list (&ret->deleg_to, - icalparameter_get_delegatedto (param)); - param = icalproperty_get_next_parameter (prop, - ICAL_DIR_PARAMETER); - } - - return ret; -} - -static iCalRelation* -parse_related (icalproperty* prop) -{ - iCalRelation* rel; - icalparameter* param; - icalparameter_reltype type; - - rel = g_new0 (iCalRelation, 1); - rel->uid = g_strdup (icalproperty_get_relatedto (prop)); - - param = icalproperty_get_first_parameter (prop, - ICAL_RELTYPE_PARAMETER); - if (param) { - type = icalparameter_get_reltype (param); - switch (type) { - case ICAL_RELTYPE_PARENT: - rel->reltype = g_strdup ("PARENT"); - break; - case ICAL_RELTYPE_CHILD: - rel->reltype = g_strdup ("CHILD"); - break; - case ICAL_RELTYPE_SIBLING: - rel->reltype = g_strdup ("SIBLING"); - break; - case ICAL_RELTYPE_XNAME: - rel->reltype = g_strdup (icalparameter_get_xvalue (param)); - break; - default: - rel->reltype = g_strdup ("UNKNOWN"); - break; - } - } else - rel->reltype = g_strdup ("PARENT"); - - return rel; -} - -#ifdef TEST - -int main(int argc, char* argv[]) -{ - icalcomponent* comp; - comp = icalendar_parse_file (argv[1]); - printf ("%s\n", icalcomponent_as_ical_string (comp)); - return 0; -} - -#endif - - -static CalendarAlarm* -parse_alarm (icalcomponent* comp) -{ - CalendarAlarm *alarm; - icalproperty *prop; - char *tmpStr; - struct icaldurationtype dur; - struct icalattachtype attach; - - g_return_val_if_fail (comp != NULL, NULL); - - alarm = g_new0 (CalendarAlarm, 1); - - prop = icalcomponent_get_first_property (comp, ICAL_ANY_PROPERTY); - while (prop) { - switch (icalproperty_isa (prop)) { - case ICAL_ACTION_PROPERTY: - tmpStr = icalproperty_get_action (prop); - if (!g_strcasecmp (tmpStr, "AUDIO")) - alarm->type = ALARM_AUDIO; - else if (!g_strcasecmp (tmpStr, "DISPLAY")) - alarm->type = ALARM_DISPLAY; - else if (!g_strcasecmp (tmpStr, "EMAIL")) - alarm->type = ALARM_MAIL; - else if (!g_strcasecmp (tmpStr, "PROCEDURE")) - alarm->type = ALARM_PROGRAM; - else - g_warning ("Unsupported alarm type!"); - break; - case ICAL_TRIGGER_PROPERTY: - /* FIXME: waiting on proper libical support */ - break; - case ICAL_REPEAT_PROPERTY: - alarm->snooze_repeat = icalproperty_get_repeat (prop); - break; - case ICAL_DURATION_PROPERTY: - dur = icalproperty_get_duration (prop); - alarm->snooze_secs = icaldurationtype_as_timet (dur); - break; - case ICAL_ATTACH_PROPERTY: - attach = icalproperty_get_attach (prop); - copy_str (&alarm->attach, - icalattachtype_get_url (&attach)); - break; - case ICAL_DESCRIPTION_PROPERTY: - copy_str (&alarm->desc, - icalproperty_get_description (prop)); - break; - case ICAL_SUMMARY_PROPERTY: - copy_str (&alarm->summary, - icalproperty_get_summary (prop)); - break; - case ICAL_ATTENDEE_PROPERTY: - copy_str (&alarm->attendee, - icalproperty_get_attendee (prop)); - break; - default: - g_warning ("Unsupported alarm property: %s", - icalproperty_as_ical_string (prop)); - break; - } - - prop = icalcomponent_get_next_property (comp, - ICAL_ANY_PROPERTY); - } - - return alarm; -} diff --git a/calendar/pcs/icalendar.h b/calendar/pcs/icalendar.h deleted file mode 100644 index 2a22fbab71..0000000000 --- a/calendar/pcs/icalendar.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef ICALENDAR_H -#define ICALENDAR_H - -#include -#include - - - -iCalObject *ical_object_create_from_icalcomponent (icalcomponent* comp); - - - -#endif diff --git a/calendar/pcs/job.c b/calendar/pcs/job.c deleted file mode 100644 index d97df6d883..0000000000 --- a/calendar/pcs/job.c +++ /dev/null @@ -1,98 +0,0 @@ -/* GNOME personal calendar server - job manager - * - * Copyright (C) 2000 Helix Code, Inc. - * - * Author: Federico Mena-Quintero - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. - */ - -#include -#include "job.h" - - - -/* The job list */ - -typedef struct { - JobFunc func; - gpointer data; -} Job; - -static GSList *jobs_head; -static GSList *jobs_tail; - -static guint jobs_idle_id; - - - -/* Runs a job and dequeues it */ -static gboolean -run_job (gpointer data) -{ - Job *job; - GSList *l; - - g_assert (jobs_head != NULL); - - job = jobs_head->data; - (* job->func) (job->data); - g_free (job); - - l = jobs_head; - jobs_head = g_slist_remove_link (jobs_head, jobs_head); - g_slist_free_1 (l); - - if (!jobs_head) { - jobs_tail = NULL; - jobs_idle_id = 0; - return FALSE; - } else - return TRUE; -} - -/** - * job_add: - * @func: Function to run the job. - * @data: Data to pass to @function. - * - * Adds a job to the queue. The job will automatically be run asynchronously. - **/ -void -job_add (JobFunc func, gpointer data) -{ - Job *job; - - g_return_if_fail (func != NULL); - - job = g_new (Job, 1); - job->func = func; - job->data = data; - - if (!jobs_head) { - g_assert (jobs_tail == NULL); - g_assert (jobs_idle_id == 0); - - jobs_head = g_slist_append (NULL, job); - jobs_tail = jobs_head; - - jobs_idle_id = g_idle_add (run_job, NULL); - } else { - g_assert (jobs_tail != NULL); - g_assert (jobs_idle_id != 0); - - jobs_tail = g_slist_append (jobs_tail, job)->next; - } -} diff --git a/calendar/pcs/job.h b/calendar/pcs/job.h deleted file mode 100644 index c9bce24dd4..0000000000 --- a/calendar/pcs/job.h +++ /dev/null @@ -1,35 +0,0 @@ -/* GNOME personal calendar server - job manager - * - * Copyright (C) 2000 Helix Code, Inc. - * - * Author: Federico Mena-Quintero - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. - */ - -#ifndef JOB_H -#define JOB_H - -#include - - - -typedef void (* JobFunc) (gpointer data); - -void job_add (JobFunc func, gpointer data); - - - -#endif diff --git a/camel/.cvsignore b/camel/.cvsignore deleted file mode 100644 index fd6b811c68..0000000000 --- a/camel/.cvsignore +++ /dev/null @@ -1,7 +0,0 @@ -.deps -Makefile -Makefile.in -.libs -.deps -*.lo -*.la diff --git a/camel/CODING.STYLE b/camel/CODING.STYLE deleted file mode 100644 index 58e9c68bbe..0000000000 --- a/camel/CODING.STYLE +++ /dev/null @@ -1,19 +0,0 @@ -Note to hackers ---------------- - -When hacking on camel (and on the gnome mailer in general), -be sure to follow the same coding style as the initial authors. -Please read the file HACKING in gnumeric and follow the -general guidelines explained in it. - -Please take a look at camel source files and try to exactly -imitate the coding style. We are perfectly aware that this -is not the best and unique style, but it is absolutely -mandatory that Camel is homogeneous. If you find the current -coding style to have some weaknesses, please contact the -authors to discuss this matter. - -Thanks. - - Bertrand. - diff --git a/camel/ChangeLog b/camel/ChangeLog deleted file mode 100644 index 504676950c..0000000000 --- a/camel/ChangeLog +++ /dev/null @@ -1,3149 +0,0 @@ -2000-05-28 Dan Winship - - * camel-provider.h: Add a domain field to CamelProvider, to say - what kind of data it provides. - - * providers/imap/camel-imap-provider.c: - * providers/mbox/camel-mbox-provider.c: - * providers/pop3/camel-pop3-provider.c: - * providers/sendmail/camel-sendmail-provider.c: - * providers/smtp/camel-smtp-provider.c: Set domain to "mail". - - * providers/nntp/camel-nntp-provider.c: Set domain to "news". - - * providers/vee/camel-vee-provider.c: Set domain to "vfolder". (So - it doesn't end up being listed as a potential mail source in the - mail config wizard.) - - * providers/pop3/camel-pop3-store.c: Split apart password and APOP - auth, since some servers seem to do both, but don't really. - (connect_to_server): Renamed from try_connect. Now actually does - the connection up to the point of checking the greeting for APOP - support. - (query_auth_types): Return APOP, if appropriate. Call - pop3_disconnect after connect_to_server since we don't really want - to be connected. - (pop3_connect): Use connect_to_server rather than duplicating - code. Fix a one-byte buffer overrun in the APOP code. - (pop3_disconnect): Make this able to clean up after a partial - connect. - (connect_to_server): Remove port number from error message since - it's not terribly useful and we were getting it from the wrong - place anyway. - - * camel-mime-utils.c (header_address_list_format_append): Use - `foo@bar' rather than `"" ' for email addresses with no - name component. - -2000-05-27 Jeffrey Stedfast - - * providers/imap/camel-imap-store.c: Removed - camel_imap_command_get_additional_data() as it was - completely useless, replaced with - camel_imap_command_extended() which may eventually replace - camel_imap_command() as well. - - * providers/imap/camel-imap-store.h: Modified to reflect - changes made to camel-imap-store.c - - * providers/imap/camel-imap-folder.c: Wrote the first of many - methods: camel_imap_init(), imap_open(), imap_expunge(), - imap_get_message_count(), and imap_get_subfolder_names() - -2000-05-26 Dan Winship - - * camel-multipart.c (camel_multipart_init): Don't set a default - boundary. Require the caller to do that. - (set_boundary): if boundary is NULL, generate a "random" boundary. - - * camel-mime-part-utils.c - (camel_mime_part_construct_content_from_parser): Add a call to - camel_multipart_set_boundary after creating a new multipart. - -2000-05-25 Jeffrey Stedfast - - * providers/imap/camel-imap-store.c (try_connect): Removed - Exception code - Pop doesn't seem to set exceptions - - * providers/imap/camel-imap-folder.c: Initial code, mostly - just a template for future code - - * providers/imap/imap.[c,h]: Source code from my personal - mailer - for reference only! - -2000-05-25 NotZed - - * camel-mime-part-utils.c - (camel_mime_part_construct_content_from_parser): Replace simple - data wrapper here too, oops. - - * Makefile.am (libcamel_la_SOURCES): Removed - camel-simple-data-wrapper again. Less code to maintain == better - code. - - * camel-data-wrapper.c (construct_from_stream): Fixes for bug - where text attachments dont work. Made data-wrapper concrete for - the second time. - -2000-05-23 NotZed - - * providers/vee/camel-vee-folder.c (vee_folder_build_folder): - Update the vfolder details for a single folder. - -2000-05-25 Jeffrey Stedfast - - * providers/smtp/camel-smtp-transport.c (_send_to): Took out code - that had been there to reconnect to the server if it was not - already connected - Mailer code was fixed so that this should not - be needed. - - * providers/imap/camel-imap-store.[c,h]: Initial code. - -2000-05-24 Dan Winship - - * camel.h: Re-add camel-simple-data-wrapper.h, which was removed - for some reason. - -2000-05-24 Jeffrey Stedfast - - * providers/smtp/camel-smtp-transport.[c,h]: Moved global - variables into struct CamelSmtpTransport to make SMTP - thread-safe - - * providers/imap/camel-imap-*.h: Stolen from Mbox. Rough structure - for Imap. - -2000-05-23 Jeffrey Stedfast - - * providers/imap: Added some initial code to the camel tree - for IMAPv4 - - * providers/imap/.cvsignore: Added to repository - - * providers/smtp/camel-smtp-transport.c: Added debug fprintf's - so that testers can provide more information. Tested with simple - messages and a reply to the hello@helixcode.com default message - but should really be tested more. - (smtp_data): Fixed to use data_wrapper_write_to_stream. - - * camel-mime-filter-smtp.c (filter): Modified to escape all lines - beginning with a '.' and to place a \r before each \n if one did - not previously exist. Removed code to escape "From " as it was - found to not be needed for SMTP. - -2000-05-22 Jeffrey Stedfast - - * providers/smtp/camel-smtp-transport.c (smtp_data): Fixed the - filtered stream. Fixes for stream changes, updated to use - camel-mime-filter-smtp. - - * Makefile.am: Added camel-mime-filter-smtp.c - - * camel-mime-filter-smtp.[c,h]: Added to camel tree - Smtp filter used to change \n into \r\n, escape lone dots, - and escape "From "'s. - -2000-05-19 NotZed - - * camel-simple-data-wrapper.c (construct_from_stream): If we - already have been constructed, unref our content. - (write_to_stream): Check we've been constructued, and change for - stream api changes. - - * camel-mime-parser.c: Removed exception stuff. - - * md5-utils.c (md5_get_digest_from_stream): repaired. - - * camel-mime-message.c: Remove exception from write_to_stream, and - fix, and fix formatting. - - * providers/sendmail/camel-sendmail-transport.c (_send_internal): - Fix for stream changes. - - * providers/pop3/camel-pop3-store.c (camel_pop3_command): Fixes - for stream changes. - - * providers/mbox/camel-mbox-folder.c, and elsewhere, fix all - stream api changes. - (mbox_append_message): Use stream_close() now its back. - (mbox_append_message): unref the from filter. - - * camel-stream-mem.c: And here. - - * camel-stream-fs.[ch]: Here too. - - * camel-stream-filter.c: Likewise. This is getting tedious. - - * camel-stream-buffer.c (stream_write): Fix a few little problems. - (stream_close): Reimplement. - (camel_stream_buffer_read_line): Slightly more efficient version, - that also only allocates the right amount of memory for strings. - - * camel-seekable-substream.c: Likewise. - - * camel-seekable-stream.[ch]: Remove exceptions, fix formatting, - changes for stream (re)fixes. set_bounds returns an error. - - * camel-stream.[ch]: Remove exceptions. Make flush and reset return - an error code, repair all the screwed up formatting, and put back - close. - - * camel-mime-part-utils.c - (camel_mime_part_construct_content_from_parser): And here. - - * camel-mime-part.c (camel_mime_part_set_content): And this too. - (write_to_stream): Fixed for stream changes. - - * camel.h: Fixed. - - * providers/vee/camel-vee-folder.c (vee_search_by_expression): - Implement. Performs an intersection of the two searches. - (camel_vee_folder_finalise): Unref search folders. - (vee_append_message): Implement append. - -2000-05-18 Dan Winship - - * camel-folder.c: remove message_number_capability and require uid - capatibility. - (camel_folder_list_subfolders, camel_folder_get_uid_list, - camel_folder_get_subfolder_info, camel_folder_get_message_info): - removed - (camel_folder_get_subfolder_names, - camel_folder_free_subfolder_names): new subfolder interfaces. - (camel_folder_get_uids, camel_folder_free_uids): new uid - interfaces - (camel_folder_get_summary, camel_folder_free_summary): new summary - interfaces - - * providers/mbox/camel-mbox-folder.c, - * providers/nntp/camel-nntp-folder.c: - * providers/vee/camel-vee-folder.c: Update for changes - - * providers/pop3/camel-pop3-folder.c: Implement get_uids, update - for other changes. - -2000-05-18 NotZed - - * providers/vee/camel-vee-folder.c: Guess! - - * camel-folder-search.c (search_user_flag): Implement user_flag - search term. - - * camel-folder-search.h: Added user_flag search capability - (user-flag "blah") - - * providers/mbox/camel-mbox-folder.c (mbox_init): Set USER flag in - permanent flags for the folder. - -2000-05-17 Dan Winship - - * camel-folder.c: Remove unused async open/close and - copy_message_to functions. - Rename functions without initial _. Fix glib preconditions and - gtk-doc comments. - -2000-05-17 Dan Winship - - * camel-data-wrapper.c: remove get/set_output_stream operations. - They're redundant with write_to_stream, and CamelMimePart and - CamelMimeMessage only implement the latter, meaning that trying to - get_output_stream on a CamelMimeMessage that was built from pieces - rather than being parsed from a stream doesn't work. Anything that - uses get_output_stream can be rewritten to use write_to_stream, so - we'll standardize on that. - (camel_data_wrapper_new): remove this: CamelDataWrapper is - supposed to be an abstract class. - (write_to_stream): remove default implementation. (Moved to - CamelSimpleDataWrapper) - - * camel-simple-data-wrapper.c: resurrect, although it's not really - the same thing it was before. A simple data wrapper, which is - backed by a CamelStream. - - * camel-mime-part-utils.c - (simple_data_wrapper_construct_from_parser): Use - construct_from_stream rather than set_output_stream. - (camel_mime_part_construct_content_from_parser): Change - camel_data_wrapper_new to camel_simple_data_wrapper_new. - - * camel-mime-part.c (camel_mime_part_set_content): Change - camel_data_wrapper_new to camel_simple_data_wrapper_new. - - -2000-05-17 Darin Adler - - * camel-folder-summary.c: (message_info_load): - Quick fix to get it to compile. I hope I don't get into trouble. - -2000-05-17 Dan Winship - - * camel.h: Don't include the no-longer-distributed - possibly-to-be-removed headers. - - * providers/smtp/camel-smtp-transport.c - (smtp_get_email_addr_from_text): fix an off-by-one error in - address parsing - (smtp_data): use camel_data_wrapper_get_output_stream rather than - data_wrapper->output_stream - -2000-05-17 NotZed - - * providers/mbox/camel-mbox-folder.c (message_changed): Snoop - changes to user flags on the message into the summary as well. - - * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_init): - Changed version init to include the parent class version info - (i.e. add it not overwrite it). - - * camel-folder-summary.c (message_info_new): Initialise user_flags - to empty. - (message_info_load): And load user flags. - (message_info_save): And save user flags. - (message_info_free): And free them. - (CAMEL_FOLDER_SUMMARY_VERSION): Bumped file revision. - - * camel-folder-summary.h: Added user-flags to summary. - - * camel-mime-message.c (camel_mime_message_set_user_flag): Dont - use a hashtable for user flags. - (camel_mime_message_get_user_flag): And changed here too. - (camel_flag_get): New interface to get a flag from a flag - list. Flag lists are easier to work with than hash tables, and - save memory too. - (camel_flag_set): And set. - (camel_flag_list_free): And free. - (free_key_only): Discard. - (finalize): Remove the flag list. - -2000-05-17 Jeffrey Stedfast - - * providers/smtp/camel-smtp-transport.c: (smtp_helo): Error - checking on gethostbyaddr() eliminating a possible segfault. - -2000-05-16 NotZed - - * providers/mbox/camel-mbox-folder.c (mbox_delete_message_by_uid): - Implement. - -2000-05-12 NotZed - - * camel-movemail.c (camel_movemail): Open the destination with - O_APPEND, so we dont blow away a partially transferred mbox. - (camel_movemail): Loop if we get errno=INTR, and not fail. - -2000-05-11 NotZed - - * providers/mbox/camel-mbox-summary.c (summary_rebuild): Update - the summarised file size, if everything went ok. - (camel_mbox_summary_expunge): Clear header flags after updating. - -2000-05-16 Chris Toshok - - * providers/nntp/camel-nntp-folder.c: - * providers/nntp/camel-nntp-folder.h: - * providers/nntp/camel-nntp-provider.c: - * providers/nntp/camel-nntp-store.c: - * providers/nntp/camel-nntp-utils.c: - * providers/nntp/camel-nntp-utils.h: - get things working with new camel summary stuff. - - * providers/nntp/camel-nntp-summary.c: - * providers/nntp/camel-nntp-summary.h: - removed files since camel-folder-summary does all we need. - -2000-05-15 Jeffrey Stedfast - - * providers/smtp/camel-smtp-transport.c: Added some preliminary - AUTH support. - -2000-05-15 Dan Winship - - * camel-folder.h: Remove camel_folder_get_summary, which no longer - exists. - -2000-05-11 Dan Winship - - * Makefile.am: remove some cruft that we're not currently using. - - * camel-stream-mem.c (camel_stream_mem_new_with_buffer): Change - to match prototype (size_t vs unsigned int) so it works on 64-bit - machines. Noted by msw. - -2000-05-11 NotZed - - * providers/mbox/camel-mbox-folder.c (message_changed): Indicate - the summary changed also. - -2000-05-11 Jeffrey Stedfast - - * providers/smtp/camel-smtp-transport.c: (smtp_helo): - Updated to more closely comply with RFC 821 standards - -2000-05-11 NotZed - - * camel-mime-part.c (write_to_stream): Unref the filter after - adding it to the filtering stream. - - * providers/mbox/camel-mbox-summary.c - (camel_mbox_summary_finalise): Free the folder path. - (camel_mbox_summary_update): Also save summary when done. - (camel_mbox_summary_expunge): Unindex items when deleting them. - (camel_mbox_summary_expunge): Save the index as well as the - summary. - - * camel-folder-summary.c (camel_folder_summary_finalise): Free the - summary path. - (camel_folder_summary_touch): New function, indicate the summary - info changed. - (camel_folder_summary_remove): Dirty here. - - * camel-internet-address.c (internet_decode): Free multiple entry - addresses properly. - - * camel-mime-utils.c (header_decode_mailbox): Plugged another - memleak, free text after converting it. - (header_decode_addrspec): More leaks plugged. - - * camel-mime-message.c (finalize): Free message_uid. - (finalize): Free the recipients hashtable. - -2000-05-11 - - * camel-folder-summary.c (camel_folder_summary_finalise): Free - summary items and charset filters. - -2000-05-10 - - * camel-folder-summary.c (camel_folder_summary_finalise): Don't - free stuff in p, after we've free'd p. - - * providers/mbox/camel-mbox-folder.c (mbox_append_message): Unref - the stream we created for appending. - -2000-05-10 Jeffrey Stedfast - - * providers/smtp/camel-smtp-transport.c: (camel_smtp_transport_class_init): - Added initialization for service_class - -2000-05-10 Dan Winship - - * camel-multipart.c (write_to_stream): fix a stupid typo. Thank - you, C. - - * camel-mime-part.c (write_to_stream): don't ref the stream before - wrapper a filter around it, since nothing will ever unref it. - -2000-05-10 Christopher James Lahey - - * Makefile.am: Added camel-types.h, camel-folder-pt-proxy.h, and - camel-thread-proxy.h. - -2000-05-09 Dan Winship - - * providers/sendmail/camel-sendmail-transport.c (_send_internal): - Bleah. Can't fsync a pipe. As a quick kludge, just don't - stream_flush it. The right fix will require bringing back - stream_close though. - -2000-05-09 Jeffrey Stedfast - * camel-internet-address.[c,h]: Undid my changes (moved - struct _address back into came-internet-address.c) - * providers/smtp/camel-smtp-transport.c: (_send): changed - from using it's own address manipulation (using struct _address) - to using camel_internet_address_get(). Also some format changes - to keep consistant with the rest of Camel - -2000-05-09 Jeffrey Stedfast - - * camel-internet-address.[c,h]: Moved struct _address from - camel-internet-address.c to camel-internet-address.h - (hopefully this doesn't break anything...) - * providers/smtp/camel-smtp-transport.c: (_send): now - populates the recipient list with To, Cc, and Bcc addresses. - Should now be able to use this module. - -2000-05-09 Dan Winship - - * providers/mbox/camel-mbox-folder.c (mbox_get_message_by_uid): - one more refcounting fix I missed before. - -2000-05-08 Jeffrey Stedfast - - * providers/smtp/camel-smtp-transport.c: no longer frees memory it - shouldn't, updated to reflect camel-stream changes involving - CamelException (perhaps it should use a different CamelException - variable than is passed to the camel smtp module?) - -2000-05-08 Dan Winship - - * camel-stream.c (camel_stream_read, camel_stream_write, - camel_stream_flush, camel_stream_reset, camel_stream_printf, - camel_stream_write_to_stream): Use CamelException to signal - failure. - (camel_stream_write_strings): Remove. camel_stream_printf is more - useful in most of the places that used this. - (camel_stream_write_string): Change from macro to function to - prevent problems with double-evaluation. - - * camel-seekable-stream.c (camel_seekable_stream_seek, - camel_seekable_stream_set_bounds): Use CamelException. - (reset): Update. - - * camel-seekable-substream.c, camel-stream-buffer.c, - camel-stream-filter.c, camel-stream-fs.c, camel-stream-mem.c: - Update. - - * camel-stream-fs.c: Remove the virtual init functions and move - the code into the creator functions. Add CamelExceptions to - creation functions that could fail. - - * camel-data-wrapper.c (camel_data_wrapper_write_to_stream): Use - CamelException. - * camel-mime-message.c, camel-mime-part.c, camel-multipart.c - (write_to_stream): Update. - - * camel-mime-parser.c: add an exception to the mime parser private - data and pass that to stream functions as needed. - - * gmime-content-field.c, md5-utils.c: Update (badly) for stream - changes. - - * camel-exception.h (camel_exception_is_set): convenience macro. - - * providers/Makefile.am: disable SMTP for now - - * providers/mbox/camel-mbox-folder.c (mbox_append_message): Pass - CamelException to the functions that now need it. Check the - exception after calling camel_stream_flush, and fail if it fails. - (mbox_get_message_by_uid): More updates. - - * providers/pop/camel-pop3-folder.c, - providers/pop/camel-pop3-store.c, - providers/sendmail/camel-sendmail/transport.c: Update. - - -2000-05-08 NotZed - - * camel-mime-message.c (process_header): Format From and Reply-To - to at least a decoded string. Should probably store them as an - camelinternetaddress. - - * Merged NEW_SUMMARY branch back to trunk, and resolved conflicts. - - * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_update): - Return status. - (camel_mbox_summary_expunge): Force an update of the summary - before we do anything. - (camel_mbox_summary_expunge): Build new xev line in xevnew, and - free that, and consify xev. - (camel_mbox_summary_load): If we are rebuilding from scratch, make - sure we clear the summary content. - - * camel-stream-filter.c (do_close): We NEED a stream close. - -2000-05-07 Dan Winship - - Make camel not leak like a sieve. - - * camel-object.c: New subclass of GtkObject which is now the base - of the Camel object hierarchy. Currently the only difference - between CamelObject and GtkObject is that CamelObjects don't start - out floating. - - * *.h: Move a bunch of typedefs to camel-types.h. Standardize on - using in header files rather than , "foo.h", - or "camel/foo.h". Remove some unneeded includes. - - * camel-address.c, camel-data-wrapper.c, camel-folder-search.c, - camel-folder-summary.c, camel-folder.c, camel-mime-filter.c, - camel-mime-parser.c, camel-service.c, camel-session.c, - camel-stream.c: These are now subclasses of CamelObject. - - * camel-data-wrapper.c (set_output_stream): - * camel-medium.c (set_content_object): - * camel-seekable-substream.c - (init_with_seekable_stream_and_bounds): - * providers/mbox/camel-mbox-folder.c (mbox_get_message_by_uid): - remove gtk_object_sink calls. - - * camel-stream-buffer.c (init_vbuf): - * camel-stream-filter.c (camel_stream_filter_new_with_stream): - ref the original stream. - - * camel-folder-summary.c (camel_folder_summary_finalise): unref - the filters when finalizing. - - * camel-mime-part-utils.c - (simple_data_wrapper_construct_from_parser, - camel_mime_part_construct_content_from_parser): - * camel-mime-part.c (camel_mime_part_set_content): Unref objects - that are created only to be handed off to other objects. If - they're going to be needed later, they will have been additionally - ref'ed by the object that needs them. - - * providers/pop3/camel-pop3-folder.c (get_message_by_number): - unref the message stream after creating the data from it. - - * camel-stream.c, camel-stream-buffer.c, camel-stream-filter.c, - camel-stream-fs.c, camel-stream-mem.c: Remove camel_stream_close, - since its semantics are dubious (what happens when you close a - stream other people still have references on?). - - * providers/nntp/camel-nntp-store.c: - * providers/smtp/camel-smtp-transport.c: - * providers/pop3/camel-pop3-store.c: - replace camel_stream_close calls with gtk_object_unref. - - * providers/mbox/camel-mbox-folder.c: - * providers/nntp/camel-nntp-folder.c: - * providers/sendmail/camel-sendmail-transport.c: - replace camel_stream_close with camel_stream_flush + - gtk_object_unref - -2000-05-06 Dan Winship - - * providers/pop3/camel-pop3-store.c (query_auth_types): A machine - which serves neither POP nor KPOP is not a POP server. - - * providers/smtp/camel-smtp-provider.c: Note in the description - that this provider is not yet tested. - -2000-05-08 - - * camel-mime-part.c (write_to_stream): Free the filter stream when - done. - - * camel-mime-parser.c (folder_seek): Make sure we add the \n - terminal when we seek as well (frob!). - - * camel-mime-utils.c (header_decode_addrspec): Plug minor memleak. - - * camel-mime-part.c (finalize): Free header tables once finished. - - * camel-folder-summary.c (camel_folder_summary_remove): Dont try - to access info after its free'd. - -2000-05-07 NotZed - - * camel-mime-part.c (write_to_stream): Apply encoding to content - part, when writing to a stream *sigh*. - - * camel-stream-filter.c (do_write): implement write for the - filtering stream. Writes shouldn't be mixed with reads. - (do_flush): Implemented flush. Again write/flush shouldn't be - mixed with reads. Only flushes if the last op was write. - (do_close): Force flush on close. - - * camel-mime-filter.c (filter_run): Oops, make sure we include the - backlen in the total length before passing onto the filter. - - * camel-mime-filter-from.c: New filter, munges 'From ' lines into - '>From ', for mbox. - - * camel-mime-parser.c (camel_mime_parser_header_remove): New - function to remove the parser's raw header, rather than - manipulating the header directly (wich doesn't work with - mempools). - - * camel-mime-utils.c (header_address_list_clear): Fixed some - broken(tm) logic, which would leak entries on multivalued lists. - - * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_load): - Use ibex_save() to save the ibex. Makes a big difference to - startup times for very large mailboxes. - (camel_mbox_summary_expunge): Dum de dum, reimplemented. Designed - to be much more robust, and to stop immediately if anything awry - happens. - (copy_block): Utility function to copy n bytes from one fd to - another. - (header_write): Utility function to write out raw headers to an - fd. - (camel_mbox_summary_update): Incremental summary updater. - - * providers/mbox/camel-mbox-folder.c (mbox_get_message_by_uid): - Dont unref the stream, because of the broken(tm) ref model of gtk - widget that for some odd reason is being perpetuated in camel. - (mbox_expunge): Reenable expunge again. - (mbox_append_message): Removed the optimised mbox append. If its - an issue, it can go back later. Cleaned up a lot, checks error - returns, and automagically translates 'From ' into '>From' as - necessary. - -2000-05-07 - - * camel-mime-filter.c (filter_run): Oops, forgot to add the - backlen to the pre-buffer (*poof*). - -2000-05-07 NotZed - - * camel-mime-message.c (construct_from_parser): Allow - HSCAN_FROM_END to terminate the processing of a message. - - * camel-folder-summary.c (perform_content_info_load): Ick, dont - try and append a node onto its own list. - (camel_folder_summary_clear): Actually clear the indexes after - we've removed the messages. - (camel_folder_summary_clear): Set dirty if it changes. - (camel_folder_summary_load): Clear dirty. - (camel_folder_summary_save): Only save if dirty. - - * providers/mbox/camel-mbox-summary.c (summary_header_load): Oops, - remember to call that parent class first ... - (summary_header_save): Here too. - (camel_mbox_summary_load): Do more checking to verify the index - contents as well as teh summary contents, against the mbox - contents. - (camel_mbox_summary_load): Removed some fo that checking, it needs - more code to work reliably. - -2000-05-07 - - * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_load): - Set the size and mtime of the mbox we indexed once done. - - * camel-folder-summary.c (camel_folder_summary_set_index): Dont - write the index if it changes - let the claler fix it (uh, kind of - impacts performance). - (camel_folder_summary_load): close in. - - * camel-folder-summary.c (summary_format_string): Check header - exists before trying to strip its leading spaces. - -2000-05-06 NotZed - - * camel-folder.h: Removed summary info from here, and include - camel-folder-summary.h as well. - - * camel-mime-parser.c (camel_mime_parser_step): Allow it to accept - a NULL databuffer. - - * providers/mbox/camel-mbox-summary.c: Totally new file, now - subclasses camel-folder-summary. - - * camel-folder-summary.c (message_info_load): Load the uid as a - string. - (message_info_save): And save too. - (camel_folder_summary_clear): New function, clears the contents of - the summary. - - * providers/mbox/camel-mbox-folder.c: Fixes for summary changes. - (mbox_get_message_by_uid): Completely redone. Now cross-checks - the summary information to make sure we get a real message. - (mbox_append_message): Disabled the copy version of append for - now. - (mbox_expunge): Temporarily disabled the expunge function, until - it is put back in camel-mbox-summary.c - -2000-05-05 NotZed - - * camel-folder-summary.c: And same here ... - (camel_folder_summary_encode_fixed_int32): Ugh, fwrite doesn't - return -1 on error .. - (camel_folder_summary_decode_fixed_int32): Neither deos fread. - (camel_folder_summary_encode_token): Fix here too. - (summary_build_content_info): Use start-headers to get the pos of - the message, not parser_tell(), which might not be what we - expected because of parser_unstep(). - (camel_folder_summary_encode_token): Use bserch() to tokenise the - values, rather than a linear search. - - * camel-mime-utils.c: Defined out some memory profiling stuff I - left there by mistake. - (header_decode_mailbox): Dont try to append the word part of a - local address if we ran out of words. - - * camel-mime-parser.c (folder_scan_content): Apply the fix from - the header scanner to here too. - (folder_scan_header): Only check for end of header if we have - space for it (didn't end the read with a newline) - (folder_scan_header): inptr is the only real thing we need - registerised for performance. Try to help the compiler be smart - about it .. - (folder_scan_header): Simplified the save header case a tad. - - Commented out some memory profiling stuff. - -2000-05-05 - - * camel-mime-utils.c (header_decode_mailbox): Plug a memory leak. - (header_decode_text): Fixed memory leaks with g_string_append(). - (header_encode_string): And here too, and a few other places. The - glib api is so awful ... - (header_content_type_decode): More memory leaks. - -2000-05-05 - - * camel-mime-parser.c (folder_scan_init_with_fd): Make sure we - init the end of buffer sentinal! - (folder_scan_init_with_stream): And here too ... - -2000-05-04 NotZed - - * providers/mbox/camel-mbox-folder.c (summary_get_message_info): - Maxcount is minimum of the max and the requested count, not the - maximum :) - - * camel-mime-parser.c (folder_scan_content): Properly set midline, - so we dont falsely catch offset boundary markers (i.e. From inside - content). - (folder_read): Set a sentinal on the end of the read data (\n) so - we dont have to check the buffer boundary in the inner loop. - (mempool_*): New experimental memory management routines, speed - up simple structure parsing by about 25% ... not compiled in by - default. Something similar may be needed for camel-mime-utils to - address performance issues with g_malloc and friends. - - * camel-mime-utils.c: Added a macro w(x) used to wrap all warnings - about mime/rfc violations, so they can be turned off. - - * camel-folder-summary.c (summary_build_content_info): Step after - the end of a message ... - Turn into a stand-alone program for testing and profiling. - -2000-05-04 Dan Winship - - * providers/pop3/camel-pop3-store.c (pop3_connect): Don't fall - back to plaintext passwords if APOP fails, since it should also - fail. - -2000-05-04 Dan Winship - - * camel-session.c (camel_session_list_providers): New function to - replace camel_provider_scan. Returns a list of either (a) all - currently-loaded providers, or (b) all available providers. - - * camel-url.[ch]: Add an "empty" flag to CamelURL (indicating that - it contains only a protocol). - - * camel-service.c (camel_service_query_auth_types): Make this take - a CamelException (since it may have to try to connect to the - server, and it might not able to.) - - * providers/pop3/camel-pop3-store.c: add KPOP (Kerberized POP) - support. This is mostly so I have two kinds of authmech to play - with instead of just one. (But it does actually work.) - - * providers/smtp/camel-smtp-transport.c (query_auth_types): update - for prototype change, but disable the functionality, since it - doesn't really support any auth types yet. - (camel_smtp_transport_get_type): add an object init function to - set the service url_flags. - -2000-05-04 NotZed - - * providers/mbox/camel-mbox-summary.c: Yes, and anotherone. - - * camel-mime-utils.c: And another one. - - * camel-mime-part.c: And another one. - - * camel-mime-part-utils.c: And another one. - - * camel-folder-search.c: And another one. - - * camel-mime-parser.c: Reverted a change wihtout a ChangeLog entry. - -2000-05-04 NotZed - - * camel-folder-summary.[hc]: Yes, CamelFolderSummary is back ... - ... re-usable class to summarise and index any stream or message - and to manage/load/save the created summaries. - - * camel-folder.c: Include string.h to kill a warning. - -2000-05-03 Jason Leach - - * Makefile.am (INCLUDES): add $(UNICODE_CFLAGS) to the INCLUDES, - people who installed libunicde in non-standard include paths need - this. - -2000-05-03 NotZed - - * camel-folder.h: Added pos/bodypos/endpos to the basic message - content info object. Size to be removed? Moved the - messageconentinfo and messageinfo back to camel-folder-summary.h. - - * camel-mime-filter-index.c (camel_mime_filter_index_set_ibex): - New function to (re)set the index to use on a filter. - - * camel-mime-parser.c (camel_mime_parser_scan_from): Whole bunch - of inline docs. - (camel_mime_parser_drop_step): New function to drop a state from - the parser. Needs more testing. - - * camel-mime-utils.c (rfc2047_decode_word): If the iconv handle is - -1, then dont try and convert (crashes unicode_iconv?). - (rfc2047_decode_word): Use alloca for variables instead of - g_malloc - by the rfc they should always be short. - (rfc2047_decode_word): If we can't do the charset conversion, undo - the quoted-printable/base64 at least? Should probably convert - unknown characters to the utf-8 unknown character. - -2000-05-02 Larry Ewing - - * camel-mime-utils.c (header_decode_date): fix typo when - dereferencing saveoffset. - -2000-05-02 NotZed - - * camel-folder-search.c: Added some header doco. - - * camel.h: REmove gmime-utils.h from here. - - * providers/mbox/camel-mbox-search.[ch]: Removed. Functionally - redundant. - - * providers/mbox/camel-mbox-folder.c (mbox_search_by_expression): - Use the new CamelFolderSearch class to do the actual searching, - just setup the search here. - - * camel-folder-search.[ch]: A helper class that providers may - subclass to provide their own search functionality, or they can - simply use as is, it supports body searches if an ibex is - supplied, and header searches if a summary is supplied. - -2000-05-02 Matt Loper - - * Makefile.am: set G_LOG_DOMAIN. - * providers/MH/Makefile.am: same. - * providers/maildir/Makefile.am: same. - * providers/mbox/Makefile.am: same. - * providers/nntp/Makefile.am: same. - * providers/pop3/Makefile.am: same. - * providers/sendmail/Makefile.am: same. - * providers/smtp/Makefile.am: same. - -2000-05-02 NotZed - - * providers/mbox/camel-mbox-search.c - (camel_mbox_folder_search_by_expression): Dont store/remove - current search from the search list. - - * providers/mbox/camel-mbox-folder.h: Removed searches list, - searches are all sync now. - - * gmime-utils.[ch]: What the hell, remove it. This will break the - nntp provider. The mime parser can be used instead though. - Removed from all code including it (but none were using it). - - * gmime-utils.c (_store_header_pair_from_string): Removed bizarre - string_dichotomy version of this. This code is somewhat redundant - now, and is headed for death anyway. - - * gstring-util.c (g_string_dichotomy): Same with this one. - (g_string_clone): Removed a memory leak, g_string_new() allocates - its own memory. - (g_string_append_g_string): Allow to append an empty gstring onto - another gstring, dont abort()! - - * string-utils.c (string_dichotomy): Removed this incredibly weird - function. - - * camel-folder.c (_create): Replaced the rather obtuse use of - "string_dichotomy" function with a simple strrchr(). Still not - sure it'll work. - - * camel-folder-summary.c: cvs removed a long-removed file. - - * camel-mime-parser.c (folder_scan_header): Fix the previous - overflow problem properly (can happen in 2 places). - (header_append): A new macro to include the code changed above, so - it only appears in one place. - (folder_scan_step): Change the content type to text/plain if the - multipart is broken. Doesn't actually change the header though. - (header_append): Also move the header-start tracking stuff here. - Could be a static function to save code. - -2000-05-02 - - * camel-mime-part-utils.c - (simple_data_wrapper_construct_from_parser): Dont use autofill on - these fucking long function anmes!!!!!! - -2000-05-02 NotZed - - * providers/mbox/camel-mbox-summary.c - (camel_mbox_summary_expunge): Fix the offset for the summary when - an item is expunged to take account of the From line. - -2000-05-01 NotZed - - * providers/mbox/camel-mbox-folder.h (CamelMboxFolder): Removed - search_id. - - * providers/mbox/camel-mbox-search.c - (camel_mbox_folder_search_cancel): Remove.d - (camel_mbox_folder_search_complete): Removed. - (camel_mbox_folder_search_by_expression): Changed back to sync - api. - (struct _searchcontext): Removed cancelled flag. - (find_context): Removed. - (func_header_contains): Debug out some search stuff. - - * providers/mbox/camel-mbox-search.h - (camel_mbox_folder_search_by_expression): Moved back to sync api. - - * providers/mbox/camel-mbox-summary.c - (camel_mbox_summary_set_flags_by_uid): New function to update the - flags in the summary. - (camel_mbox_summary_expunge): Expunge messages from a folder. - (offset_content): Re-align offsets of summary when messages - added/removed to an existing summary. - (camel_mbox_summary_remove_uid): Remove a message summary entry by - uid. - (index_folder): Restore flags from X-Evolution header, if they are set. - (index_folder): Make sure we index using a decimal uid, since - thats what everything else indexes off (oops). - Upped SUMMARY_VERSION as a result. - (camel_mbox_summary_expunge): Oops, my wrong, use the string uid - to unindex on. - - * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): - Connect to the message_changed signal. - (_init): Set permanent flags to something reasonable. No user - flags yet ... - (message_changed): If the flags of the message change, update the - flags in the summary. - (mbox_expunge): Implement the expunge. - (camel_mbox_folder_class_init): Renamed all leading _'s to mbox_'s - (mbox_expunge): Emit a folder_changed signal on expunge (uh, even - if it didn't ...) - - * camel-folder.c (_finalize): Uh, dont free permanent_flags - anymore (this wouldn't failed anyway, it was a GList !!!) - (camel_folder_search_complete): Removed. - (camel_folder_search_cancel): Removed. - (camel_folder_expunge): Changed to only allow expunge on an open - folder. It doesn't make sense for mbox, otherwise (?) - (camel_folder_class_init): Added a folder_changed signal. - - * camel-folder.h (struct _CamelFolder): Change permanent_flags to - a bitfield. - (list_permanent_flags): Renamed to get_permanent_flags, and - returns a bitfield. - (camel_folder_expunge): Changed expunge to a void type. The - messages would no longer be useful after they have been removed - ... - (CamelFolderClass): New function summary_get_by_uid() to get a single - summary. - (*search*): Moved back to synchronous search api ... *sigh* - - * camel-folder.h: Removed CamelSearchFunc. - - * camel-mime-message.c (set_flag): Removed. - (camel_mime_message_set_flag): Removed. - (get_flag): Removed. - (camel_mime_message_get_flag): Removed. - (add_flag_to_list): Removed. - (get_flag_list): Removed. - (camel_mime_message_get_flag_list): Removed. - (camel_mime_message_get_flags): New interface to get system flags. - (camel_mime_message_set_flags): " to set ". - (camel_mime_message_get_user_flag): To get a user flag. - (camel_mime_message_set_user_flag): To set a user flag. - (finalize): Hmm, the old one free'd the key and data, not good - when the data is a boolean ... - -2000-04-30 Dan Winship - - * camel-provider.h: Tweak the definition of CamelProvider. Among - other things, a provider may now be both a store and a transport. - - * camel-provider.c: Remove a lot of code we had no intention of - using. This now only contains two functions: camel_provider_init - to read the installed .urls files, and camel_provider_load to - load and register a new provider. - - * camel-session.c: Remove more unused code and simplify some of - the remaining code. The list of available provider modules is now - stored in the session, and it handles calling camel_provider_load - to load them as needed. Provider registration is now done by - calling back from the module init routine, which allows a single - module to register providers for multiple URL types. - - * providers/*: Update provider structures and init routines for - the new stuff. Add a .urls file to each provider specifying what - urls it handles, and install that with the library. - - * providers/nntp/camel-nntp-provider.c: Add hints towards - supporting both news: and nntp: URLs, and using nntp as both a - store and a transport. - -2000-04-29 Dan Winship - - * camel-internet-address.c (camel_internet_address_get): const - poison - - * camel-mime-part-utils.c - (simple_data_wrapper_construct_from_parser): - camel_mime_parser_tell() returns an offset from where it started - parsing, not necessarily from the start of data. Since we're - parsing a bounded seekable_stream, we need to add the stream's - starting bound to camel_mime_parser_tell's return value to - create the substream in the right place. - - * camel-seekable-substream.c - (camel_seekable_substream_new_with_seekable_stream_and_bounds): - say CAMEL_STREAM_UNBOUND rather than -1 in doc. - - * camel-seekable-stream.c (camel_seekable_stream_seek): Add more - info to docs. - -2000-04-28 Dan Winship - - * camel-mime-parser.c (folder_scan_header): fix a bug that would - cause corruption with very long headers. - -2000-04-27 Ettore Perazzoli - - * providers/pop3/Makefile.am (INCLUDES): Add `-I$(srcdir)/../../..' - to pick the Camel includes. - * providers/sendmail/Makefile.am (INCLUDES): Likewise. - - * camel.h: Don't #include anymore. - -2000-04-27 NotZed - - * camel-mime-utils.c (check_header): Dont try and check a NULL - header. - - * camel-recipient.[ch]: Dead. Its not pining. - - * camel-mime-message.h: Dont include recipients.h anymore. - - * camel-mime-message.c (camel_mime_message_add_recipient): Accept - name/address separately, and store in an CamelInternetAddress. - (add_recipient): Removed. - (remove_recipient): Removed. - (remove_recipient_address): Renamed from remove_receipient, works - via address. - (camel_mime_message_remove_recipient_name): New function to remove - by name. - (get_recipients): Removed. - (camel_mime_message_get_recipients): Return a camel-internet-address. - (write_to_stream): No longer write receipients directly. - (write_recipients_to_stream): Removed. - (write_one_recipient_to_stream): Removed. - (camel_mime_message_init): Setup recipients hashtable, rather than - usign the recipients stuff. - (set_recipient_list_from_string): Killed, a violent and lengthy - death. - (process_header): Simplified recipient handling code a lot. - (received_date_str, sent_date_str, reply_to_str, subject_str, - from_str): Removed some oddly-defined global statics. - (camel_mime_message_class_init): Dont initialise above variables - anymore. - (init_header_name_table): Removed, use a table to init this, and - do it in class init (2 lines of code ...). - - * camel-news-address.c: Class to represent news addresses - - currently empty, and not built. - - * camel-internet-address.h: Class to represent internet (email) - addresses. - - * camel-address.h: Abstract class to represent (lists of) - addresses. - -2000-04-27 Dan Winship - - * camel-mime-part.c (write_to_stream): Revert previous change. I - was confused. - - * camel-url.[ch] (camel_url_encode, camel_url_decode): expose - these routines. - -2000-04-26 Dan Winship - - * camel-mime-part.c (write_to_stream): Only write a newline - between the headers and the content object if the content object - is not a CamelMedium. (If the content is a medium, it may have its - own headers, which then need to go before the blank line.) - - * camel-mime-body-part.[ch]: Remove. We weren't using the fields - that made this different from camel-mime-part, so it basically - just forced us to do lots of gratuitous typecasting. - - * camel-multipart.[ch]: Use CamelMimePart. Remove the multipart - parent stuff, since we weren't using that either. - - * etc: update for CamelMimeBodyPart -> CamelMimePart - -2000-04-26 Dan Winship - - * camel-medium.c (set_content_object): sink the content object - after referencing it. - - * camel-mime-part.c: fix various little things in the handling - of CamelMedium methods. Change camel_mime_part_set_text to the - more generic camel_mime_part_set_content. - - * camel.h: sync to current reality - - * camel-folder-utils.[ch]: removed - - * camel-mime-utils.c (header_format_date): fix format specifier - for time zone. Fix typo in month names array. - -2000-04-26 NotZed - - * camel-seekable-substream.c (stream_seek): Changed to have - absolute seek semantics, not relative to the bounds. - - * camel-seekable-stream.c (reset): When we reset, seek to the - start of the bound, if there is one. - (stream_tell): Make tell virtual. - - * camel-stream-filter.c (do_available): Removed. - - * camel-stream-buffer.c: Remove leading _'s from static functions. - (stream_read): Renamed from read(). Fancy that conflicting! (my - boo!) Others too. - - * providers/pop3/camel-pop3-folder.c (get_message_by_number): - Changed to stream_mem interface. - - * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): Fixed - for streamfs interface changes, and implement a failure case. - (_append_message): Changed for fs stream interface change. - - * camel-multipart.c (print_part): Iterate rahter than callback. I - hate glists's interface (hence, move this to write_to_stream). - (write_to_stream): Return an error (yuck, this is a royal PITA to - do with the stream write interface). - - * camel-mime-message.c: Removed leading _ from static names. - - * camel-mime-part.h: construct_from_parser() now returns an error - code. - - * camel-mime-part-utils.c - (camel_mime_part_construct_content_from_parser): Changed to use a - camel-data-wrapper instead of a camel-simple-data-wrapper (no - change needed elsewhere?). - (simple_data_wrapper_construct_from_parser): Fixes for stream-mem - interface changes. - - * camel-simple-data-wrapper.[ch], - camel-simple-data-wrapper-stream.[ch], - camel-stream-data-wrapper.[ch], removed. Fixed including of these - files. - - * camel-mime-part.c (camel_mime_part_set_text): Remove the use of - the camel-simple-data-wrapper-stream, just use a mem stream. - (write_to_stream): Renamed from my_* - (construct_from_stream): Return an error on error. - - * camel-stream-mem.c (camel_stream_mem_new*): Remove mode - parameter. - - * camel-stream-mem.h (enum CamelStreamMemMode): Removed. It - wasn't used at all. - - * camel-data-wrapper.h: Add camel_data_wrapper_new() to create - these. - (write_to_stream, construct_from_stream): Return an error - indicator for success. Fixed all methods to match (ICK). - - * Makefile.am (libcamel_la_SOURCES): Remove - camel-simple-data-wrapper.c, camel-simple-data-wrapper-stream.c, - camel-stream-data-wrapper.c. Obsoleted by code re-use! - - * camel-data-wrapper.c (construct_from_stream): Change the default - implementation to just set the output stream == construction - stream. Well, this lets me get rid of both simple-data-wrapper - and stream-data-wrapper (unused anyway), and - simple-data-wrapper-stream in one hit. CamelDataWrapper is now - also a concrete class. - (write_to_stream): Use camel_stream_write_to_stream() to - calculate/return values (and save code). - Include for obvious reasons. - - * camel-stream.c (eos): Provide a default implementation of .eos(). - (camel_stream_write_to_stream): Make it return an error code on - error. - (camel_stream_printf): Changed to return the number of bytes - written/error. - (camel_stream_available): Removed. - - * camel-stream-fs.h (enum CamelStreamFsMode): Removed. Changed to - use unix modes and so forth (wasn't used for anything but new file - creation and didn't work well either). - - * camel-stream-fs.c: Removed leading _'s for names. And removed - some virtual method 'documentation'. - (destroy): Dont try and close a closed/error fd. Only report - error if close returns -1. Moved all the code to finalise(), and - killed this function. - (init_with_fd): Properly setup the seek offset, if it is a - valid and seekable file descriptor. - (init_with_fd_and_bounds): Use off_t for bounds, set bounds on the - seekable stream. - (init_with_name): Return error codes. - (init_with_name_and_bounds): Ditto. - (camel_stream_fs_new_with_name): REturn NULL object if it failed. - (camel_stream_fs_new_with_name_and_bounds): Return NULL object on - failure. Changed with_name* api's to take unix open style args - and flags. - (read): The bounded stream bounds checking seemed off, simplified - code a bit. - (write): Implement bounds checking for writing, the comment was - wrong, it could make sense to bound writing. Cleaned up a little. - (available): Gone. - (eos): Removed. Use CamelStream's implementation now. - (close): Reset the fd to -1, provide a warning for bad usage. - (seek): Cleaned up. Changed the behaviour a little, the returned - offset is the absolute position in the file, even in bounded - streams. - (seek): Seek from end mirrors lseek() behaviour (reverse seeking). - -2000-04-25 NotZed - - * camel-stream-fs.h (struct _CamelStreamFs): Moved bounds and eof - indicator to other parent classes. - - * camel-stream.c (camel_stream_printf): New utility - function. Obvious use. - - * camel-stream-mem.c: Removed leading _'s from static func's. - (camel_stream_mem_new_with_byte_array): Fixed for api changes, set - the owner for the byte array to us. - : Removed A bunch of gtk doc stuff for static (implementation) functions. - (available): Removed. - (write): Fixed the write implementation so that seek() works on a - seekable memory stream, as expected. Seeking past the end of the - buffer has unix semantics (filling with 0). - (available): Removed. - (write): Implement seekable stream bounded stream. - (read): Implement seekable stream bounded stream. - (close): Dont free the stream_mem if we're not the owner. - (seek): Allow to seek beyond the end of memory area, - implement bounds checking. - (seek): Set errno on bad policy. - - * camel-stream-mem.h (struct _CamelStreamMem): Changed position to off_t. - (new_with_buffer): Changed len to be a size_t. - (set_buffer, set_byte_array): New interface functions. - (struct _CamelStreamMem): Removed position, it is stored in the - superclass. - - * camel-stream.h: Removed some of the seemingly random - whitespace. Removed the available method (its not - impelemented/useful enough). - - * camel-seekable-substream.c - (init_with_seekable_stream_and_bounds): Remove the data_available - stuff, it hasn't been properly implemented/finished, and may never - work (unfortunately *sigh). - (reemit_parent_signal): Removed part of the above change. - (set_bounds): Removed (moved to seekable-stream). - : Fixed up some of the generally unreadable indenting (sorry, - wrapping at 80 characters with - camels_really_long_function_names() - just_doesnt_work_very_well_does_it(). - (available): Removed. - (stream_seek): Fixup for object changes. Make sure we return -1 - if the parent stream can't seek. - - * camel-seekable-stream.c (ccamel_seekable_stream_set_bounds): New - function to bound any seekable stream. - : Removed _'s. - (camel_seekable_stream_class_init): Implement an init function, to - setup the stream bounds to unbound. - - * camel-seekable-stream.h (CamelSeekableStreamClass): New virtual - method set_bounds for seekable streams. - (CAMEL_STREAM_UNBOUND): New define for no bound. - - * camel-seekable-substream.h (struct _CamelSeekableSubstream): - Removed sup_bound and inf_bound, moved to CamelSeekableStream (and - renamed, and changed to off_t's). - (new_with_seekable_stream_and_bounds): Use off_t as the bounds. - (CamelSeekableSubstreamClass): Uh, why was the intialiser virtual? - Removed. - - * camel-seekable-stream.[ch] (CamelSeekableStreamClass): Changed seek - to accept an off_t as the offset. - (struct _CamelSeekableStream): Renamed cur_pos to position and - changed it to an off_t type. - (enum CamelStreamSeekPolicy): Set to match the SEEK_* constants - from lseek(). - (get_current_position): Renamed to tell(). - - * camel-stream-buffer.h: Commented out set_vbuf - never implemented. - -2000-04-25 Dan Winship - - * camel-stream-buffer.c (_eos): only return TRUE if the parent is - at eos AND the buffer has been exhausted - - * camel-mime-message.c: fix some incorrect macro usage that - resulted in bogus casts - -2000-04-24 Dan Winship - - * camel-mime-part-utils.c - (simple_data_wrapper_construct_from_parser): fix a cut-and-pasto. - - * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): ref - (and sink) the message stream if we're going to unref it later. - Otherwise it could get destroyed while there are still substreams - attached to it. This needs a cleaner solution. - - * camel.h: remove data-wrapper-repository.h include(s) - -2000-04-24 NotZed - - * camel-mime-message.c (construct_from_parser): Allow MESSAGE_END - _or_ EOF as valid termination conditions. - - * providers/mbox/camel-mbox-summary.c (message_struct_new): Decode - and then re-encode the addresses, so they are consistently - formatted. - - * camel-mime-utils.c (header_decode_mailbox): Store the address in - a _header_address. And try to get a comment-stored name if there - is one. - (header_decode_address): Actually return an address. - (header_to_decode): Renamed to header_address_decode() - (header_mailbox_decode): New function to get a single mailbox. - (header_mime_decode): Return the major/minor value, as - appropriate. - (header_address_new, and friends): Whole bunch of utility - functions for working with the address thingies. - (header_decode_domain): Free the string header, and dont expand - '.' into ' . '. - - * camel.c (camel_init): No longer call - data_wrapper_repository_init. - - * camel-medium.c (write_to_stream): Moved (back) to - camel-mime-part. - (add_header): - (set_header): - (remove_header): - (get_header): Make all these abstract, and spit warnings if - called. I guess it could manage the list, but well, it doesn't. - - * camel-medium.h (struct _CamelMedium): Dont store headers here, - the implementor is the only one who knows their format. - (CamelMediumClass): Changed header values to be void *'s. They - need not be strings? - - * camel-simple-data-wrapper.c (construct_from_stream): And we're - back. Set the output stream. - (construct_from_parser): Moved to camel-mime-part-utils. - - * camel-mime-part-utils.c - (camel_mime_part_construct_content_from_parser): Create the - contents of multipart and simple messages. - (camel_mime_part_construct_content_from_parser): Oops, this was - totally screwed up, try creating the right cotnent on the right - object. - - * camel-multipart.c (construct_from_parser): Moved to - camel-mime-part-utils. - (separate_part): Removed. - - * camel-mime-part.c (construct_from_stream): Back again! This now - switches over to using a mime parser for any mime parts, only. - (my_write_to_stream): Write our headers and so forth here. - (add_header): Add header directly, parent class is abstract. - (remove_header): Ditto. - (set_header): Ditto. - - * camel-data-wrapper.c (camel_data_wrapper_construct_from_stream): - Remade abstract. - (camel_data_wrapper_construct_from_parser): Moved to - camel_mime_part. - - * camel-data-wrapper.h: Put back construct_from_stream. - - * camel-mime-part.h: Put construct_from_parser in here, the - data-wrapper shouldn't know about mime. Ok, so now to undo half - of the last hours changes ... duh. - -2000-04-23 Dan Winship - - * camel-mime-utils.c (header_to_decode, header_mime_decode): fix - some obvious minor bugs noted by -Wall. - -2000-04-23 NotZed - - * providers/pop3/camel-pop3-folder.c (get_message_by_number): Use - construct_from_stream instead of set_input_stream(). - - * camel-simple-data-wrapper-stream.c - (camel_simple_data_wrapper_stream_construct): REmoved the destroy - callback code. - (wrapper_destroy_cb): Removed. - - * camel-simple-data-wrapper.h: Add prototype for _construct() - method. - - * camel.c: Include unicode.h to kill a warning. - - * camel-data-wrapper.h (CameldataWrapperClass): Removed - construct_from_stream virtual method. - Removed get/set input stream. - - * data-wrapper-repository.[ch]: Removed&from build. Obsoleted? - The justification as is follows: It is mixing storage - protocol/format with message architecture. It really just doesn't - serve any purpose, as each medium implementor will have to have its - own type->handler mapping, and the only current implementor, - mimepart has a very simple structure and no need for this. - - * camel-medium.c (write_to_stream): Moved here from most of the - stuff in camel-mime-part. Well, the MEDIUM is the one that knows - what the headers are, and the content is, let it write it out. - - * camel-mime-part-utils.c (camel_mime_part_construct_content): - Copied from camel-mime-part.c, removed handling of message - followon state (moved to camel-mime-message). - (camel_mime_part_construct_content_from_parser): Renamed from - construct_content. - (camel_mime_part_construct_headers_from_stream): - (camel_mime_part_construct_content_from_stream): - (camel_mime_part_store_stream_in_buffer): Removed. Replaced by - the new construct from parser stuff. - - * camel-mime-message.c (construct_from_parser): Do - construct_from_parser for mime-message. - (_write_to_stream): Set the mime-version header for medium to - write out, rather than writing it out ourselves. - - * camel-data-wrapper.c (set_mime_type_field): Ref the - content_field when we get it? - (construct_from_stream): Removed. - (camel_data_wrapper_construct_from_stream): Changed to a helper - function, creates a mime_parser, and constructs from that. - (set_input_stream): Removed. - (camel_data_wrapper_set_input_stream): Removed. - (get_input_stream): Removed. - (camel_data_wrapper_get_input_stream): Removed. - - * camel-mime-parser.c (camel_mime_parser_unstep): New function. - Cause a subsequent call to mime_parser_step() to return the same - state over again. - - * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): - Initial test code using the mime parser to construct the message. - (_get_message_by_uid): Use construct_from_stream() instead of - creating our own parser. - - * camel-mime-part.c (construct_from_parser): part constructor. - (camel_mime_part_construct_content): Basically a simpler - replacement for the datawrapper repository. - (camel_mime_part_init): Set the default type to text/plain. - (camel_mime_part_construct_content): Removed to - camel-mime-part-utils.c - (my_get_output_stream): Removed. The streeam is in the - data-wrapper. - (my_get_content_object): Removed. The content object is stored in - the medium. If none is there, the object wasn't created properly. - (my_write_content_to_stream): Removed. The content object is the - one that knows how to write itself out!!!!!!!! - (my_write_to_stream): Remove the base header writing stuff - has - been moved to camel-medium, where it belongs. This can just be - used to check for mandatory headers. - (my_construct_from_stream): Removed. - (my_set_input_stream): What the hell, i'll remove this too. - Nobody seems to understand how it differs from create from stream, - and they both seem to serve the same purpose ... - - * camel-simple-data-wrapper.c (construct_from_parser): Initial - implementation of a content constructor. - (construct_from_stream): Removed! Job taken over by - construct_from_parser. - - * camel-multipart.c (construct_from_parser): Multipart - construction routine. - (camel_multipart_init): Set the default multipart type to - multipart/mixed. Duh, no subtype is not allowed anyway. - (set_input_stream): REmoved. Replaced by construct_from_parser. - -2000-04-22 Dan Winship - - * camel-multipart.[ch]: clean, document, etc. - (camel_multipart_init): pick a prettier default boundary. Still - need to deal with the larger problem - -2000-04-22 NotZed - - * camel-mime-message.h (struct _CamelMimeMessage): Removed - send_date, and received_date, and replaced it with a time_t - 'date' (this is what the header is called), and date_offset to - store the GMT offset of the date. - - * camel-mime-message.c (camel_mime_message_set_from): Update raw - header as we go. - (_set_from): Removed. - (_get_from): Removed. - (camel_mime_message_get_from): Moved implementation here. - (camel_mime_message_get_subject): Move implementation here. - (_get_subject): Nuked. - (camel_mime_message_set_subject): Handle utf-8 input, and also - update raw header when changed. - (_set_subject): Removed. - (_set_received_date): Removed. - (camel_mime_message_set_received_date): Removed. - (_get_received_date): Removed. - (camel_mime_message_get_received_date): Removed. - (_get_sent_date): Removed. - (camel_mime_message_get_sent_date): Removed. - (camel_mime_message_get_date): New function to get the date as a - time_t/offset. - (camel_mime_message_set_date): Set the date as a time_t/offset. - (camel_mime_message_get_date_string): Get the date as a string. - (camel_mime_message_init): Initialise the current date as - 'CMAEL_MESSAGE_DATE_CURRENT'. - (_set_reply_to): Removed. - (camel_mime_message_set_reply_to): Moved implementation here. - This is still broken, reply-to can have multiple addresses. - (_get_reply_to): Removed. - (_set_field): Removed, no longer used anywhere. - (_get_field): Also removed. - (_init_header_name_table): Add the Date header. - (process_header): Also handle snooping of Date header here. - - * camel-stream-filter.c (finalise): Unref the source stream on - finalise, and also call the parent class (oops). - - * camel-mime-parser.c (camel_mime_parser_state): New function to - get the current parser state. - (camel_mime_parser_stream): Allow you to get the stream back from - the mime_parser. - (camel_mime_parser_fd): Alternative to allow you to get the fd - back from the mime_parser. - (folder_scan_init_with_stream): Properly ref/unref the stream. - (folder_scan_close): Properly unref the stream/close the fd on - exit. - (folder_scan_init_with_fd): Close the old fd if there is one. - - * camel-data-wrapper.c (camel_data_wrapper_construct_from_parser): - New method, construct a data wrapper from an initialised parser. - (construct_from_parser): Empty implementation. - - * providers/mbox/camel-mbox-summary.c (message_struct_new): - Convert subject line to unicode, before storing in the summary. - (strdup_trim): Removed, no longer needed. - - * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): Ref - the folder after setting it in the new message. - - * camel-mime-part.c (my_set_content_object): Have the headers - follow the content-type change here too. - (my_write_to_stream): Dont write content-type here, automatically - stored in the headers ... - (my_write_to_stream): Use header_disposition_format() to format - the content-disposition header. - (my_write_to_stream): Removed old code, all headers are now stored - in the camel-medium level, always. Need to do the same with - camel-mime-message i suppose ... - (my_write_to_stream): Write the content using the parent class, - not some weird function. - (camel_mime_part_class_init): Dont override get_output_stream. - (camel_mime_part_encoding_from_string): Bleh, make it - case-insensitive. - - * camel-mime-utils.c (header_content_type_is): Handle empty types. - (header_encode_string): Start of an implementation of the rfc2047 - encoder. It does iso-8859-1, and us-ascii, and utf-8 (others get - tricky *sigh*) - (rfc2047_encode_word): Convert a single word/string into rfc2047 - encoding. - (quoted_encode): Different quoted-printable encoding for rfc2047 - encoding of headers. - - * gmime-content-field.c (gmime_content_field_write_to_stream): Use - header_content_type_format() to format it. - -2000-04-21 NotZed - - * camel-mime-utils.h: Add prototype for header_param_list_free. - - * camel-recipient.c: New function to remove all the types of a - recipient list. I think this whole object needs a major review. - - * camel-mime-message.c (camel_mime_message_class_init): Removed - parse_header_pair override, override add_header instead. - (_parse_header_pair): Renamed to add_header. - (remove_header): Add this method, to make sure we keep upto date - with removed headers too. - (_set_field): If given a NULL value, clear it out. - (_set_recipient_list_from_string): Constify. - (set_header): Override set_header from camel_medium. - (process_header): Local function to handle set/add/remove of each - header we know about. - - * camel-mime-part.c (camel_mime_part_class_init): Removed - parse_header_pair setup. - (my_parse_header_pair): Moved into add_header(), removed. - (my_set_disposition): Allow a NULL disposition to clear it. - (my_set_content_id): Allow NULL content id to clear it. - (remove_header): Track removed headers. - (my_set_description): Allow NULL description to clear it. - (my_set_content_MD5): Make sure we copy the md5 value, and allow a - NULL value to reset it. - (my_set_filename): Copy the filename. - (my_set_header_lines): Removed. Nothing uses it, it doesn't - actually serve any purpose. - (camel_mime_part_set_header_lines): Ditto. - (my_get_header_lines): Ditto. - (camel_mime_part_get_header_lines): Ditto. - (camel_mime_part_class_init): Remove *_header_lines setup. - (camel_mime_part_init): Remove header_lines init. - (my_finalize): Remove header_lines finalise. - (my_write_to_stream): Write the headers here. This is just WRONG, - camel_medium should be doing this. - (my_get_output_stream): Kill a warning. - (camel_mime_part_encoding_to_string): Ditto. - (camel_mime_part_set_description): Unvirtualiase, use add_header() - to do the processing. - (my_set_description): Removed. - (set_disposition): Renamed from my_set_disposition. - (camel_mime_part_get_description): Get the descriptionf rom the - get_header method. - (my_get_description): Removed. - (my_set_filename): Removed. - (camel_mime_part_get_filename): Get the parameter from the - disposition. - (camel_mime_part_encoding_from_string): Handle NULL string. - (camel_mime_part_init): Remove reference to filename. - (my_finalize): Dont free filename. - - * camel-mime-part.h (CamelMimePartClass): Removed - parse_header_pair() method, it doesn't add anything that - add_header() can't be used for. - (CamelMimePartClass): Remove *_header_lines methods. - (struct _CamelMimePart): Remove header_lines list. - (struct _CamelMimePart): Removed filename attribute. - - * camel-medium.c (camel_medium_init): Init headers to null, not a - hashtable. - (add_header): Append the headers as a list. - (remove_header): Remove headers as a list. - (get_header): Likewise for lookup. - (free_header): Removed, no longer needed. - (finalize): Free headers using header_raw_clear(). - (camel_medium_set_header): New function, to reset and override all - values of a header with a new value. - - * camel-medium.h (struct _CamelMedium): Changed to use a - header_raw struct rather than a hash table, to store headers - (many headers can occur multiple times). - - * camel-mime-utils.c (header_raw_find_next): New function, allows - you to find multi-valued header fields. - (header_disposition_format): New function to format/create - content-disposition header string. - (header_param_list_format_append): Function to format parameter - lists into a GString. - (header_content_type_format): Function to format content-type into - a usable format. - (header_set_param): allow NULL value to remove the parameter. - (decode_token): Renamed from header_decode_token. - (header_decode_token): New interface for external use. - (quoted_decode): Made static to kill annoying warnings. - (g_strdup_len): Killed, replaced with calls to g_strndup(). - (rfc2047_decode_word): Made static to kill warnings. - (decode_coded_string): Terminated. - (g_string_append_len): Made static to kill warnings. - (header_decode_text): Made static to kill warnings. - (header_decode_text): Constify. - (rfc2047_decode_word): Constify. - (header_param): Constify. - (header_content_type_new): Copy the type/subtype strings. - (header_param_list_decode): Made static. - (header_param_list_format_append): Made static. - (quoted_decode): Constify. - (g_string_append_len): Constify. - (header_token_decode): New function to decode a single token. - - * providers/mbox/camel-mbox-summary.c (header_write): Append a - trailing \n when writing headers. - (strdup_trim): Killed a warning. - (camel_mbox_summary_set_uid): Make sure the next uid is at least 1 - higher than any existing one. - (header_evolution_decode): Use header_token_decode to get the - token. - - * camel-mime-parser.c (folder_scan_header): Strip the trailing \n - of the end of all header lines. - -2000-04-20 NotZed - - * providers/mbox/camel-mbox-utils.[ch]: Removed. - - * providers/mbox/camel-mbox-parser.[ch]: Removed. Removed - references to it. - -2000-04-20 Dan Winship - - * camel-mime-utils.c (rfc2047_decode_word): use libunicode iconv - functions rather than libc ones (since libc might not have them). - (header_decode_date): add autoconfiscation on timezone code - - * camel.c (camel_init): call unicode_init () - -2000-04-20 NotZed - - * providers/mbox/camel-mbox-summary.c (message_struct_new): Trim - leading/trailing spaces off the raw headers. - - * MERGE NEW_PARSER branch into HEAD, fixed conflicts. - - * gmime-content-field.c (_print_parameter): Duh, removed again - (@@#$@ cvs merge). - - * camel-mime-utils.c (header_content_type_is): Constify. - (header_content_type_unref): Killed a couple warnings. - - * camel-folder.c (_init): Removed more log crap. - - * providers/Makefile.am (SUBDIRS): Removed nntp, pending fixes for - summary changes. - - * providers/mbox/camel-mbox-folder.c (_get_message_by_number): - Fixed for new summary interface. Added a warning for using this - broken api. - (_get_message_by_uid): Fixed for message new with session - vanishing. - -2000-04-19 Dan Winship - - * camel-simple-data-wrapper-stream.c - (camel_simple_data_wrapper_stream_get_type): This is a subtype of - CamelSeekableStream, not CamelStream. - - * camel-seekable-substream.c: clean up a lot. - (eos): When testing for end-of-stream, reset the parent position - before testing if it is at end-of-stream, since either (a) it may - have been seek'ed to eos by someone else, or (b) we may have been - seek'ed away from eos and it hasn't been synced yet. - - * camel-medium.[ch] (camel_medium_add_header): const poison. - (Belatedly goes with my change of 2000-02-23.) - (camel_medium_init): Use g_strcase_{hash,equal} on the header - array. - -2000-04-18 Dan Winship - - * camel-mime-part.c (my_set_input_stream): - * camel-data-wrapper.c (set_input_stream, set_output_stream): do - better reference counting of streams so they actually go away - when they should. - - * camel-log.[ch], *: Nuke camel log stuff. Replace calls to - CAMEL_LOG_WARNING with calls to g_warning. - - * camel-data-wrapper.[ch]: - * camel-simple-data-wrapper.[ch]: - * camel-medium.[ch]: Clean, polish, document. Most of the gtk-doc - comments added to camel-data-wrapper.c note serious problems that - need to be fixed. - -2000-04-17 Dan Winship - - * camel-mime-message.[ch]: Remove the "session" field from - CamelMimeMessage. Nothing uses it, about half of the existing - calls to camel_mime_message_new_with_session pass NULL, and - there's no obvious reason for it to be there. - - * providers/MH/camel-mh-folder.c: - * providers/maildir/camel-maildir-folder.c: - * providers/mbox/camel-mbox-folder.c: - * providers/mbox/camel-mbox-utils.c: - * providers/nntp/camel-nntp-folder.c: - * providers/pop3/camel-pop3-folder.c: Use camel_mime_message_new - instead of camel_mime_message_new_with_session. - - * camel-session.c (get_store_for_protocol_with_url): Set the - exception if no provider is found. - - * camel-url.c: Add code to encode and decode %-escapes in URLs, - and do some additional correctness-checking on URL syntax. From - Tiago Antào with modifications by me. - -2000-04-14 Chris Toshok - - * providers/Makefile.am (SUBDIRS): add nntp - -2000-04-14 Christopher James Lahey - - * providers/mbox/camel-mbox-folder.c: Fix switch statement. - -2000-04-14 Chris Toshok - - * providers/nntp/camel-nntp-folder.c (_exists): always return TRUE - for now. we need to check the server response to make sure the - group exists. - (_get_message_by_uid): make sure to account for the \n we add to - the string after every line. - - * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): function - to get the headers using the XOVER command. - (get_HEAD_headers): function to get the headers using the HEAD - command on each message. slooooooow. - (camel_nntp_get_headers): make this function use either XOVER or HEAD - versions depending on whether or not the server extension is present. - -2000-04-14 Dan Winship - - * camel-formatter.[ch]: This didn't belong in Camel. Move to mail/ - - * Makefile.am, camel-types.h: remove references to - camel-formatter. - -2000-04-12 Matt Loper - - * camel-folder-pt-proxy.c (_folder_open_cb): Print warning message - for broken function. - (_folder_close_cb): Same. - -2000-04-12 Miguel de Icaza - - * Makefile.am (pthread_SRC): Use correct names for the pthread - source variables. - -2000-04-10 Dan Winship - - * providers/pop3/camel-pop3-store.c (pop3_connect): fix various - bugs in APOP code (still untested) and some of the error cases. - - * camel-provider.h: Clarify what provider.protocol, provider.name, - and provider.description should be. - - * providers/mbox/camel-mbox-provider.c: - * providers/pop3/camel-pop3-provider.c: - * providers/sendmail/camel-sendmail-provider.c: - * providers/smtp/camel-smtp-provider.c: update protocols, names, - and descriptions - - * providers/mbox/camel-mbox-folder.c (_get_message_by_number): - implement get_message_by_number for the mail fetch code. - -2000-04-09 Jeffrey Stedfast - - * providers/smtp/camel-smtp-transport.c: reformatted to fit - the standard indent format used by helix code - -2000-04-09 Dan Winship - - * camel-movemail.c: New file with new function to dot-lock an mbox - file and copy it to a safe private directory. - -2000-04-08 Christopher James Lahey - - * providers/smtp/.cvsignore: Added a .cvsignore file. - -2000-04-08 Dan Winship - - * providers/sendmail/camel-sendmail-transport.c (_send_internal): - actually record the pid returned by fork(). Noticed by clahey. - - * providers/smtp/camel-smtp-transport.c: #include - for MAXHOSTNAMELEN. (This is a stopgap: some of the uses of - MAXHOSTNAMELEN are wrong anyway...) - -2000-04-07 Jeffrey Stedfast - - * providers/smtp/camel-smtp-transport.c: fixes to numerous bugs; - should now build fine. - * providers/Makefile.am: Readded smtp now that smtp builds without - error. - -2000-04-20 NotZed - - * providers/mbox/camel-mbox-summary.c - (camel_mbox_summary_next_uid): Public function to get the next - uid, makes sure its saved to disk too. - - * camel-mime-part.c (my_finalize): Fix disposition crap with a - real disposition. - (my_set_disposition): Likewise. - (my_get_disposition): And here. - (my_write_to_stream): And here, needs more cleanup. - - * providers/mbox/camel-mbox-folder.c (_append_message): Assign a - new uid at this point. - - * gmime-content-field.c (gmime_content_field_write_to_stream): - Make something up if we have an invalid/missing content type - (i.e. text/plain). - -2000-04-19 NotZed - - * providers/mbox/camel-mbox-folder.c (_delete): Fixed completely - broken switch() syntax, only compiled because errno is a macro on - some systems. - (_list_subfolders): Likewise. - -2000-04-18 NotZed - - * camel-mime-parser.c (folder_scan_init): init stream to null. - - * providers/mbox/camel-mbox-summary.c - (CAMEL_MBOX_SUMMARY_VERSION): Moved to .c file, incremented. - (index_folder): Changed to have index passed via the summary. - (decode_string): Do a sanity check on the string size, so we dont - visit g_malloc()'s friendly abort(). - - * camel-folder-pt-proxy.c (camel_folder_pt_proxy_class_init): - Removed reference to set_name. - (_set_name): Removed. - - * providers/mbox/camel-mbox-utils.c - (parsed_information_to_mbox_summary): Removed. Most of this file - is about to be binned. - - * providers/mbox/camel-mbox-search.c (func_header_contains): Fixes - for changes to summary interface. - (struct _searchcontext): Remove pointer to message info, get it - straight from the mboxsummary. - (camel_mbox_folder_search_by_expression): New summary interface. - (camel_mbox_folder_search_by_expression): Uh, the summary is not - an object anymore (well not yet). - - * providers/mbox/camel-mbox-folder.c - (camel_mbox_folder_class_init): Removed set_name init. - (_set_name): Removed. - (_open): Call new summary interface. - (_close): Use new summary interface. - (_create): Removed a summary object leak. - (_get_message_count): New summary interface. - (_get_uid_list): Use new summary interface. FIXME: this is leaky. - (_get_message_by_uid): Use the new summary interface, some - cleanup. - (_append_message): Totally changed, basically just appends the - message directly, ignores the summary (for now), the summary will - fix itself up if it needs to. - (_check_get_or_maybe_generate_summary_file): Bye bye old code. - (summary_get_message_info): Implement get_message_info again, for - folder. - - * camel-folder.c (camel_folder_class_init): Removed set_name - setup. - (_set_name): Moved contents into _init. - (_init): Perform the old functions of set_name here. - - * camel-folder.h: Removed the set_name internal interface. - -2000-04-14 NotZed - - * providers/mbox/camel-mbox-summary.[ch]: Completely replaced with - new code. - - * Makefile.am (libcamel_la_SOURCES): Removed - camel-folder-summary.[ch]. - - * camel-folder.h (struct _CamelFolder): Removed summary. - (struct _CamelFolder): Changed flags to be 1 bit bitfields. - - * camel-folder-summary.[ch]: Class removed entirely. - - * camel-folder.c (camel_folder_get_summary): Removed. - (camel_folder_summary_get_message_info): Moved from - camel-folder-summary.c - (camel_folder_summary_get_subfolder_info): Moved from - camel-folder-summary.c - - * camel-mime-parser.c (folder_scan_step): Store the start of - headers and start of from in the scan state. - (camel_mime_parser_tell_start_headers): Query the start of the - headers. - (camel_mime_parser_tell_start_from): Query the cached start of - from marker. - -2000-04-13 NotZed - - * gmime-content-field.c (gmime_content_field_free): Removed this - function. If its too dangerous to use, it shouldn't be here. - (gmime_content_field_ref): Also ref the embedded content-type. - (gmime_content_field_unref): Ditto to unref it. - - * camel-mime-utils.h: Add a refcount for content-type header. - - * camel-mime-utils.c (header_content_type_unref): Implement unref - for content-type. - (header_content_type_ref): Implement ref for header content type. - -2000-04-12 NotZed - - * gmime-content-field.h: Changed to use a _header_content_type. - Added type/subtype back for compatability with clients. - - * gmime-content-field.c: Basically a total rewrite, and now just a - thin wrapper ontop of header_content_type. - (_free_parameter): Got rid of it. - (gmime_content_field_new): Use header_content_type_* functions. - (gmime_content_field_set_parameter): Likewise. - (_print_parameter): Blow away. - (gmime_content_field_write_to_stream): Get details from the - content_type field. Should check if it needs to escape chars in - the paramter value. - (gmime_content_field_get_mime_type): Likewise. - (___debug_print_parameter): Get rid of this rather annoyingly - named function. - (gmime_content_field_get_parameter): Simplified function. - (gmime_content_field_construct_from_string): Fixed this to use a - real parser. - (gmime_content_field_is_type): New function to test if a type matches. - (gmime_content_field_construct_from_string): Track type/subtype - from subordinate content_type header struct. - - * gmime-rfc2047.[ch]: Removed. Unused. - - * camel-stream-b64.[ch]: Blown away more duplicated code. - - * Makefile.am: Removed camel-stream-b64.[ch], and - gmime-base64.[ch]. - - * camel-mime-part.c (my_get_content_object): Replaced - camel-stream-b64 with camel-stream-filter/camel-mime-filter-basic. - (my_write_content_to_stream): Replaced camel-stream-b64 with the - camel-stream-filter with an encoder. - (my_get_content_object): Also implement quoted-printable decoding. - (my_write_content_to_stream): Also implement quoted-printable - encoding. - (my_get_output_stream): Took out stream-b64 code (nothing's being - executed yet anyway). - - * gmime-base64.[ch]: Blown away. Not used, dont need it. - - * camel-mime-utils.h: Added offset for this header. Records where - it is in the source. - - * camel-mime-utils.c (header_raw_append_parse): Add offset - parameter, to store where the header is stored in the stream. - (header_raw_append): Added offset param. - (header_raw_find): Return offset, if a pointer supplied for it. - (header_raw_replace): Add offset param. - (header_content_type_new): New function, to create an empty - content type. - (header_content_type_set_param): Set a parameter in the - content-type. - (header_set_param): Generic header parameter setting function. - (header_decode_string): Handle NULL input. - - * camel-mime-parser.c (camel_mime_parser_headers_raw): New - function to get access to all the raw headers. - (folder_scan_header): Keep track of the header start position, and - store it when saving the header. - -2000-04-11 NotZed - - * camel-mime-utils.c: Moved a bunch of printf's to debug. - - * camel-mime-parser.c: Moved a bunch of printf's to debug. - (folder_scan_header): Detect end of each header line using the - last scanned char, and not the last scanned position. - - * camel-mime-filter-index.[ch]: Indexing filter. Indexes unicode - sequences into ibex files. - -2000-04-09 NotZed - - * camel-mime-part.c: Dont include gmime-base64.h - - * camel-mime-filter-charset.c (complete): Implement the completion - function. - - * camel-mime-parser.c (folder_scan_step): If we get to the end of - the body data, check any filters for outstanding completion data. - (camel_mime_parser_scan_from): Set whether we scan for "From " - headers or not. - - * camel-stream-filter.c (do_read): If we get to end of stream on - the source, then call the filtering completion function to see if - we have any more data to return. - - * camel-mime-filter-basic.c (filter): Implement quoted printable - encoding and decoding filters. - (complete): And the complete function as well. - - * camel-mime-utils.c (base64_encode_close): Also take an input - buffer, allow closing of filters. - (quoted_encode_step): First cut, simple quoted-printable encoder. - Doesn't handle trailing spaces/tabs on end of line properly yet. - (quoted_encode_close): Complete a quoted-encoding. - (is_qpsafe): New type check, for quoted-printable safe characters - (that do not need encoding). Thats all bits used in the type - table! Rebuilt the types table. - (header_content_type_is): Checks a content type against at - type/subtype match. - (header_content_type_param): Handle NULL content type pointer. - -2000-04-08 NotZed - - * camel-mime-filter-basic.c (filter): Implement the base64 - encoder. Problem is, there is no way to know when to close it. - Close/Reset will have to provide the same args as filter, so it can - flush remaining data *sigh* - - * camel-mime-utils.c (base64_encode_step): A rather complex base64 - encoder, fast? - (base64_step_close): Companion function to finish off the base64 - sequence. - - * camel-mime-part.c (my_write_content_to_stream): Changed to use - camel_stream_write_to_stream(). - - * camel-stream.[ch] (camel_stream_write_to_stream): From - camel_stream_b64_write_to_stream(). Fixed some infinite loop - bugs with error conditions. - - * camel-stream-b64.[ch] (camel_stream_b64_write_to_stream): Removed. - This has nothing to do with stream-b64, so i've moved it to - CamelStream. - - * camel-mime-utils.h: Add a comment about refcounting - header_content_type struct. - - * Makefile.am: Added camel-stream-filter*.[ch]. - - * camel-stream-filter.[ch]: Class to implement a generic - (multipass) filter ontop of a stream. Only implements a read-only - stream. - - * camel-mime-parser.c (camel_mime_parser_filter_add): Ref the - filter we just added. - - * Makefile.am: Added camel-mime-filter*.[ch]. - - * camel-mime-filter-charset.[ch]: A filter to preform character set - conversion (uses unicode_iconv). - - * camel-mime-filter-save.[ch]: A simple filter which will save all - data directly to a file or file descriptor. - - * camel-mime-filter-basic.[ch]: Implements the basic mime filters, - base64 and quoted-printable decoding (encoding not implemented yet). - - * camel-mime-filter.[ch]: A filtering class, which can filter streams - of data without having to copy them. Simpler than stream classes, - and can be plugged into a single stream class (when i write it). - -2000-04-07 Dan Winship - - * providers/pop3/camel-pop3-store.c (pop3_connect): Clarify error - messages. - (finalize): fix a bug in camel_exception usage - (pop3_connect): Remember the password after asking for it the - first time. - -2000-04-07 NotZed - - * Makefile.am: Added camel-mime-parser/camel-mime-utils. - - * camel-mime-parser.c: Fast mime parser. - - * camel-mime-utils.c: Mime utility functions, and email header - parsers. - -2000-04-07 NotZed - - * providers/Makefile.am: Removed smtp for now, its a long way from - building. - * providers/smtp/Makefile.in: Removed file that shouldn't have been - checked in. - -2000-04-06 Matt Loper - - * camel-folder-pt-proxy.c (_get_full_name): Remove exception param - from get_full_name() called, since get_full_name() was changed to - not have an exception in the last param (see dan's notes below). - (_get_name): same. - -2000-04-06 Dan Winship - - * camel-store.[ch]: Reorganize the folder-fetching methods and - implement a folder cache so that multiple requests for the same - folder will yield the same CamelFolder object (as long as it - remains active). Includes some code to remove no-longer-active - folders from the cache, but it doesn't get used since nothing is - ever unref'ed in Camel right now... - - * providers/mbox/camel-mbox-store.c: - * providers/pop3/camel-pop3-store.c: update for CamelStore - changes. - - * camel-folder.[ch]: Remove the (unused) CamelException argument - from camel_folder_get_name and camel_folder_get_full_name. - (camel_folder_set_name): make this go away since changing a - folder's name after it has been created could result in it - conflicting with a separately-issued folder. - -2000-04-05 Dan Winship - - * g_url_new really wanted to take a CamelException. So, rename - Gurl to CamelURL, g_url_* to camel_url_* (with camel_url_new - taking an exception), and url-util.[ch] to camel-url.[ch]. Also - force url->port to be numeric and remove camel_service_getport. (I - was confused before: the URL RFC says the port must be numeric, so - we don't want to do getportbyname.) - -2000-04-01 Dan Winship - - * providers/mbox/camel-mbox-folder.c - (_check_get_or_maybe_generate_summary_file): Compare - mbox_file_size and mbox_modtime to the results of stat()ing the - mbox file, not the summary file. Duh. - (_close): Update the summary's mbox_file_size and mbox_modtime - before writing it to disk. - - * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_save, - camel_mbox_summary_load): Wow. I must have been tired when I wrote - this code. First, the comparison bug above. Second, it was using - ntohs and htons instead of ntohl and htonl. Third, I was reading - the status flag byte in two different places and thus getting out - of sync. Fourth, it was writing out field_length bytes of each - header field after having converted field_length to network byte - order, resulting in lots of random crap being appended, and the - summary files being huge. (Fortunately, since the size/modtime - comparison was biffed, the garbage summary read from disk was - always immediately discarded.) - - * providers/mbox/camel-mbox-parser.c (camel_mbox_parse_file): fix - an off-by-one error that caused the last-used UID to be reused if - the summary file was regenerated. (That one wasn't my fault. :-) - -2000-03-31 Dan Winship - - * camel-stream-mem.c: implement unimplemented methods - - * gmime-content-field.c - (gmime_content_field_construct_from_string): - * data-wrapper-repository.c - (data_wrapper_repository_get_data_wrapper_type): - * camel-simple-data-wrapper.c (my_write_to_stream): - * camel-mime-part.c (my_set_input_stream): - remove debugging printf()s that no longer seem useful. - -2000-03-31 Matt Loper - - * camel-formatter.c (text_to_html): Added "convert_newlines_to_br" - boolean param, to give the option of not converting '\n's to
- tags. This way, when we stick stuff in a

 tag, newlines stay
-	newlines.
-
-2000-03-30  Matt Loper  
-
-	* camel-formatter.c (handle_text_plain): Use 
 tag to force
-	the use of monospaced fonts.
-
-2000-03-30  Dan Winship  
-
-	* camel-service.c (camel_service_getport): Add a htons in the
-	default_number case, and document the fact that the function
-	returns the port in network byte order.
-
-	* providers/pop3/camel-pop3-store.c (pop3_connect): Revert
-	Miguel's change. The port number bug was actually somewhere
-	else, and the IP address copying code was fine already.
-	
-2000-03-29  Miguel de Icaza  
-
-	* providers/pop3/camel-pop3-store.c (pop3_connect): Add htons
-	(port), and only copy 4 bytes for the IP address to prevent a DNS
-	attack. 
-
-2000-03-28  Dan Winship  
-
-	* camel-seekable-substream.c
-	(camel_seekable_substream_new_with_seekable_stream_and_bounds):
-	make this return a CamelStream rather than a
-	CamelSeekableSubstream, because that's the way Gtk objects tend to
-	work.
-
-	* camel-service.c (camel_service_gethost,
-	camel_service_getport): convenience functions to canonicalize
-	the host and port values of a service's URL.
-	* providers/pop3/camel-pop3-store.c: use them
-
-	* providers/mbox/camel-mbox-folder.c
-	(_check_get_or_maybe_generate_summary_file): Make this work when
-	the inbox file doesn't yet exist.
-
-2000-03-27  Dan Winship  
-
-	* providers/mbox/camel-mbox-folder.c (_append_message): uncomment
-	the call to unlink the temp file: there's no way to tell
-	camel_stream_fs to truncate a file, so reusing the same file was
-	resulting in junk at the ends of messages.
-
-	* camel-folder.[ch]: add delete_message_by_{number,uid}.
-
-	* providers/pop3/camel-pop3-folder.[ch]: implement
-	delete_message_by_uid. Add a close method to do expunging
-	of deleted messages if requested.
-
-	* providers/pop3/camel-pop3-store.[ch]: support for
-	CamelPop3Folder::close. (You have to close the connection
-	in order to expunge the folder, thus the store may be
-	connected in the CamelService::is_connected sense when it
-	is not actually connected to the server.) Also some bugfixes.
-
-2000-03-27  NotZed  
-
-	* providers/mbox/camel-mbox-folder.c (_append_message): Unref the
-	output_stream when done, close doesn't do it.
-	(_append_message): Clear all uid's from the appending messages, so
-	they are reassigned proper unique id's.
-
-	* gmime-utils.c (get_header_array_from_stream): Actually free the
-	header, it is copied elsewhere.
-
-2000-03-26  NotZed  
-
-	* providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev): Added
-	folder parameter to function.  Fixed callers.
-	(index_message): Index a message as it is assigned a unique id.
-
-	* camel-mime-part.c (my_set_content_id): Make sure we malloc and
-	copy the content_id, otherwise *poof*
-
-2000-03-25  NotZed  
-
-	* camel-medium.c (_finalize): Another leak, unref the content if
-	finished with it.
-
-	* camel-recipient.c (camel_recipient_table_free): Plug another
-	memory leak - actually free the recipient table.
-
-	* camel-mime-message.c (_finalize): Plugged a memory leak with the
-	flags table.
-
-	* gmime-utils.c (_store_header_pair_from_string): A simpler, more
-	debuggable and functionally identical header extraction function.
-
-2000-03-24  NotZed  
-
-	* gmime-content-field.c (gmime_content_field_set_parameter):
-	Remove the hash table entry before freeing its key and data.
-
-2000-03-27  Dan Winship  
-
-	* providers/Makefile.am (SUBDIRS): Add pop3.
-
-	* providers/pop3/camel-pop3-store.c: keep separate input and
-	output streams so the output doesn't end up being buffered.
-
-	* providers/pop3/camel-pop3-folder.c (get_message_by_number):
-	finish implementing this.
-
-2000-03-27  Michael Meeks  
-
-	* camel-mime-part.c (my_set_disposition): fix so less broken.
-	(my_finalize): remove dodgy disposition free.
-
-	* camel-data-wrapper.c (my_set_mime_type_field): unref instead of
-	free on mime_type.
-
-2000-03-27  Dan Winship  
-
-	* camel-service.c (camel_service_free_auth_types): new routine to
-	free the data allocated by camel_service_query_auth_types.
-
-	* providers/pop3/camel-pop3-store.c (free_auth_types): implement
-
-	* camel-stream-mem.c (camel_stream_mem_new_with_buffer): rename
-	camel_stream_mem_new_with_buffer to ..._with_byte_array and add a
-	new ..._with_buffer that takes a char * rather than a GByteArray.
-
-	* Remove CamelStreamBufferedFs, since CamelStreamBuffer makes it
-	redundant.
-
-2000-03-25  Dan Winship  
-
-	* camel-folder-summary.[ch]: change the CamelFolderSummary
-	interfaces to allow partial summary queries (for dealing
-	with very large folders). Remove the "extended_fields" from
-	CamelFolderInfo and CamelMessageInfo: this is better dealt
-	with by subtyping.
-
-	* providers/mbox/camel-mbox-summary.[ch]: Make CamelMboxSummary a
-	subclass of CamelFolderSummary. Update interfaces for that. Remove
-	the internal/external summary distinction. Remove the (unused) md5
-	checksum in the folder summary. Change the summary file format
-	(primarily to make it no longer byte-order dependent) and add a
-	version number to it so it will be easier to change in the future.
-	
-	* providers/mbox/camel-mbox-folder.[ch]
-	* providers/mbox/camel-mbox-search.c
-	* providers/mbox/camel-mbox-utils.c: update for summary changes
-
-	* camel-exception-list.def: add
-	CAMEL_EXCEPTION_FOLDER_SUMMARY_INVALID
-	
-2000-03-23  NotZed  
-
-	* providers/mbox/camel-mbox-provider.c: Added flag to provider
-	initialisation, to match changed structure.
-
-2000-03-22  NotZed  
-
-	* camel-folder.[ch]: Added async search api.
-
-	* providers/mbox/camel-mbox-search.c
-	(camel_mbox_folder_search_by_expression): Changed to use an
-	asynchronous interface.
-	(camel_mbox_folder_search_cancel): Cancel function for async
-	interface.
-
-2000-03-23  Dan Winship  
-
-	* camel-stream-buffer.c (camel_stream_buffer_read_line): Function
-	to read one line of any size from a stream and return it in
-	allocated memory.
-
-2000-03-22  Dan Winship  
-
-	* camel-service.c (camel_service_query_auth_types): New function
-	to query a service for the authentication protocols it supports.
-	* providers/pop3/camel-pop3-store.c (query_auth_types): implement
-
-	* camel-provider.c (camel_provider_scan): New function to
-	scan the provider dir and return a list of all providers.
-
-	* providers/pop3/camel-pop3-folder.c: fill this in partially
-	* providers/pop3/camel-pop3-store.c: make camel_pop3_command
-	return the text after "+OK"/"-ERR" and add a separate
-	camel_pop3_get_additional_data to get the message body or
-	whatever. Also make them take a CamelPop3Store rather than
-	a CamelStreamBuffer.
-
-2000-03-22  Matt Loper  
-
-	* camel-formatter.c (debug): Disabled some useless debug
-	messaging.
-
-2000-03-21  Dan Winship  
-
-	* providers/pop3: some initial bits of the POP3 provider, to
-	make Matt happy. Incomplete, untested, etc.
-
-2000-03-21  bertrand  
-
-	* providers/mbox/camel-mbox-summary.c 
-	(camel_mbox_summary_append_internal_to_external): copy the size field
-
-	* providers/mbox/camel-mbox-folder.c (_get_message_by_uid): initialize 
-	message_info to NULL
-
-	* camel-folder-summary.h: added the size field.
-
-	* providers/mbox/camel-mbox-summary.h: 
-	added the received_date field.
-
-	* providers/mbox/camel-mbox-summary.c:
-	documented all functions.
-
-	* camel-folder-summary.h: name change and 
-	new fields.
-
-	* providers/mbox/camel-mbox-search.c: update to 
-	conform to name change in the summary fields.
-
-2000-03-10  bertrand  
-
-	* camel-service.h: cosmetic changes.
-
-2000-03-09  Dan Winship  
-
-	* s/HelixCode/Helix Code, Inc./ in the copyrights
-
-2000-03-07  bertrand  
-
-	* camel-formatter.c (handle_mime_part): 
-	plug mem leaks due to bad documentation
-	of camel_content_field_get_mime_type
-	(print_camel_body_part): idem
-	(handle_multipart_alternative): idem
-
-	* gmime-content-field.c (gmime_content_field_get_mime_type): 
-	documentation fix.
-
-
-	* camel-mime-part.c (my_finalize): unref the 
-	content_input_stream if any. 
-
-2000-03-06  bertrand  
-
-	* camel-stream-fs.c (_seek): fix a bogus calculation
-	in the return position.
-
-2000-03-05  bertrand  
-
-	* camel-session.h: cosmetic fixes.
-
-	* camel-stream-fs.c (_read): 
-	(_seek): fixed the current position so that it refers
-	to the current position in the stream, not in its parent.
-
-2000-03-04  NotZed  
-
-	* providers/mbox/camel-mbox-search.c
-	(camel_mbox_folder_search_by_expression): Ref the summary
-	after we have got it.
-
-2000-03-04  bertrand  
-
-	* camel-mime-part.c (my_write_content_to_stream): 
-	stream the raw content instead of nothing if the encoding
-	is not supported.
-
-	* camel-stream-fs.c (_seek): handle eos more
-	properly.
-
-	* camel-formatter.c (get_bonobo_tag_for_object): 
-	bonobo-goad-id is the good key to look for. 
-	(get_bonobo_tag_for_object): close the  tag.
-	(get_bonobo_tag_for_object): the correct syntax for the
-	to set a parameter inside an  tag is :
-	  
-	
-
-2000-03-03  bertrand  
-
-	* providers/mbox/camel-mbox-folder.c (_get_message_by_uid): 
-	use set_input_stream instead of construct_from_stream
-	to feed the message object. 
-
-	* camel-data-wrapper.c (my_write_to_stream): reset output stream.
-	(my_set_input_stream): unref the previous input stream.
-	use the set_output_stream for default behaviour.
-	(my_set_output_stream): unref previous output stream.
-
-	* camel-mime-part.c (my_write_content_to_stream): reset content
-	object output stream.
-
-2000-03-03  NotZed  
-
-	* providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev): Make
-	sure we open with create with a creation mask.
-
-2000-03-01  NotZed  
-
-	* camel-mime-part-utils.c
-	(camel_mime_part_construct_content_from_stream): DO NOT assert on
-	content type, we have fallback code 4 lines below it ... *sigh*
-
-2000-02-29  NotZed  
-
-	* Makefile.am (libcamelinclude_HEADERS): Added camel-stream-buffer
-	to build.
-
-	* camel-stream-buffer.[ch]: Generic buffer which can be applied to
-	any stream.
-
-2000-03-03  bertrand  
-
-	* camel-formatter.c (handle_image): in the case
-	of images, put the content object output stream
-	in the url. This allows the message browser
-	to show inline images.
-
-	* camel-stream-b64.c (my_read_encode): fixed state
-	0 keep value. 
-
-2000-03-02  bertrand  
-
-	* camel-stream-b64.c (my_read_encode): don't forget to 
-	set the state to 0 after 3.
-	(my_read_encode): don't forget to encode, even in state 3.
-
-	* camel-simple-data-wrapper.c: static functions are prefixed 
-	with my_ instead of _
-	* camel-multipart.c: static functions are prefixed 
-	with my_ instead of _
-	(my_write_to_stream): commented.
-	(my_write_to_stream): warning in case the boudary is set
-	but is a zero length string.
-
-	* camel-mime-part.c (camel_mime_part_encoding_from_string): 
-	remove debug trace. 
-	
-	* camel-mime-part.c: Replaced all static functions
-	with name begining with _ by the same name begining
-	with "my_" to prevent the possible conflicts 
-	with system symbols Dan warned us about. 
-	
-	* camel-stream-b64.c (camel_stream_b64_write_to_stream): 
-	use CamelStreamB64 type for the input stream.
-
-	* camel-mime-part.c (_get_content_object): remove 
-	debugging trace
-	(_write_content_to_stream): implement the b64 
-	encoding the new way (that is using camel_stream_b64)
-
-	* camel-data-wrapper.c (my_write_to_stream): 
-	fix implementation so that it writes properly
-	to the output stream even.
-
-	* camel-stream-b64.c (camel_stream_b64_write_to_stream): 
-	fix implementation. 
-
-2000-02-29  bertrand  
-
-	* camel-stream-b64.c (camel_stream_b64_write_to_stream): new
-	utility function. 
-
-	* camel-data-wrapper.c (_write_to_stream): default
-	implementation. 
-
-	* gmime-utils.c (_store_header_pair_from_string): 
-	revert strange changes. 
-
-	* camel-stream-b64.c (my_read_decode): set eos to true when we
-	have read the whole input stream. 
-	(my_reset): set eos to FALSE.
-
-2000-02-28  NotZed  
-
-	* camel-mime-part.c (_parse_header_pair): Dont free this either.
-
-	* camel-medium.c (_remove_header): Ugh, dont free the header
-	before we actually remove it.
-	(_add_header): Ugh, dont free hashtable entries which may be
-	duplicated (hash_insert _will_ reference that memory).
-
-	* string-utils.c (string_trim): Trimming a 0-length string is not
-	an error.
-
-	* camel-mime-message.c (_parse_header_pair): Fixed very broken
-	memory handling of header_name/value.
-
-	* providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev):
-	Initialise end_of_last_message always.
-	(camel_mbox_copy_file_chunk): Stop trying to read if we run out of
-	data, rather than looping forever.
-	(camel_mbox_write_xev): Use an open flag when opening with create.
-
-	* camel-folder.c (camel_folder_search_by_expression): No, its not
-	a fatal error to search on a non-searchable folder, you just dont
-	get any matches.
-	(_open): Dont open an opened folder (i dont see why this is really
-	a bug, but what the hell ...)
-
-	* providers/mbox/camel-mbox-folder.c (_init): Set search cap on.
-	(_open): Call parent class to perform open.  Remove folder-open
-	check to parent instead.
-	(_create): open takes a creation mask, dont use umask to try and
-	set the open mode.
-	(_delete): Dont bother checking folder==NULL, its already been
-	checked on the external interface (changed to an assertion, this
-	would have to be a camel bug).
-	(_delete_messages): Likewise.
-	(_create): Ditto.
-	(_init): Dont go and clear all the paths and shit that the parent
-	open just setup for us.
-	(_delete_messages): Get rid of more umask stuff.
-	(_append_message): Make sure we pass file mode to open with create.
-	(_append_message): Cleaned up some indenting to make it readable.
-
-	* camel-stream-b64.c (my_read_encode): Fixed a typo.
-
-	* providers/mbox/camel-mbox-search.c: Changed to use e-sexp,
-	rather than filter-sexp.
-
-2000-02-28  bertrand  
-
-	* camel-stream-b64.c (my_read_encode): encoding
-	filter.
-
-2000-02-23  bertrand  
-
-	* camel-stream-b64.c: changed the __static 
-	suffix into a my_ prefix. 
-	(camel_stream_b64_set_mode): reset the persistent
-	status. 
-	(my_read_decode): remove superfluous %
-	
-	* providers/mbox/camel-mbox-utils.c (camel_mbox_copy_file_chunk): 
-	fix exception description message.
-
-2000-02-24  Dan Winship  
-
-	* camel-session.c: Add camel_session_get_transport_for_protocol.
-
-	* camel-transport.h:
-	* camel-transport.c: Add an abstract CamelTransport class.
-
-	* providers/sendmail/*: A CamelTransport that uses sendmail
-	to deliver mail.
-
-2000-02-24  Dan Winship  
-
-	* camel-folder.c: use CamelExceptions for run-time errors, not
-	incorrect code. Don't bother validating that an object exists from
-	inside one of its methods, since you couldn't have gotten there if
-	it didn't. Fix some code style bugs.
-
-	(_init): Rename init_with_store to init and add parent_folder,
-	separator, and name arguments.
-	(_set_name): Get separator from self, not parent_store now.
-
-	* camel-store.h:
-	* camel-store.c: Remove get/set_separator.
-
-	* providers/mbox/: Update for above.
-
-2000-02-23  Dan Winship  
-
-	* camel-medium.c (_finalize): Free the data in the headers hash
-	table.
-	(_add_header): g_strdup the header name and value when adding it.
-
-	* camel-mime-part-utils.c
-	(camel_mime_part_construct_headers_from_stream): Free the header
-	data after calling camel_medium_add_header, since it will have
-	g_strdup()ed it itself.
-
-2000-02-22  NotZed  
-
-	* providers/mbox/camel-mbox-search.c: Dont compile by default.
-
-	* providers/mbox/Makefile.am: Fuck off the filter code.
-
-2000-02-22  bertrand  
-
-	* camel-stream-b64.c (read_decode__static): 
-	don't read the char if we reached the length
-	of the output buffer. Hours lost on this
-	%$!@# bug : 3.5
-
-	* camel-folder.c (camel_folder_get_subfolder): 
-	(camel_folder_create): 
-	(camel_folder_delete): 
-	(camel_folder_delete_messages): 
-	(camel_folder_list_subfolders): 
-	(camel_folder_expunge): 
-	(camel_folder_get_message_by_number): 
-	(camel_folder_get_message_count): 
-	(camel_folder_append_message): 
-	(camel_folder_copy_message_to): 
-	(camel_folder_get_summary): 
-	(camel_folder_get_message_uid): 
-	(camel_folder_get_message_by_uid): 
-	(camel_folder_get_uid_list): 
-	Check folder state (open/close) and raise an
-	exception if it is not ok. 
-	
-	* providers/mbox/camel-mbox-folder.c (_create): 
-	create the file and the path with two different
-	names.
-
-	* camel-folder.c (_create): handle the case 
-	when the folder name starts with '/'
-
-	* camel-exception.c (camel_exception_new): use 
-	(void) instead of () in decl.
-
-	* camel-exception.h: cosmetic fixes.
-
-	* camel-exception.c (camel_exception_init): new routine.
-	Fix a bug in mail/message-list.c
-	
-
-	* camel-folder.h: cosmetic changes.
-
-	* camel-stream-b64.c (reset__static): added a
-	reset method. Thanks message-browser to find
-	so much bugs :)
-
-	* providers/mbox/Makefile.am (libcamelmbox_la_LIBADD): readd
-	Unicode libs.
-
-2000-02-21  bertrand  
-
-	* camel-formatter.c (lookup_unique_id): 
-	awful hack to test get_output_stream.
-	* camel-stream-b64.[ch] :
-	b64 encoding/decoding is now implemented as
-	a stream. 
-	
-
-2000-02-21  bertrand  
-
-	* camel-seekable-substream.c (_reemit_parent_signal): 
-	emit "data_available" when parent stream emits it. 
-
-
-2000-02-21  NotZed  
-
-	* providers/mbox/Makefile.am: Uh, fixed LIBADD again.  What was
-	there was never ever going to work, wasn't it tested?
-
-
-2000-02-21  Dan Winship  
-
-	* camel-session.h: (struct _CamelSession): Add authenticator.
-
-	* camel-session.c (camel_session_new): Add authenticator.
-	(camel_session_query_authenticator): New function to query the
-	session authenticator for password, etc, information.
-
-2000-02-21  Dan Winship  
-
-	* camel-session.c: add CamelExceptions to several functions. Use
-	camel_session_new to initialize the session and URL fields of
-	created CamelStores as appropriate.
-
-	* camel-store.h:
-	* camel-store.c
-	* camel-service.h:
-	* camel-service.c: Move the session and url (and associated
-	functions) from CamelStore to CamelService. Add url_flags to
-	CamelService so subclasses can specify which URL components
-	are mandatory for them.	Add camel_session_new for
-	camel_session_get_store* to use.
-
-	* providers/mbox/camel-mbox-folder.c:
-	* providers/mbox/camel-mbox-store.c:
-	* providers/mbox/camel-mbox-store.h: Update for above changes.
-
-	* camel-exception-list.def: Once camel is being used for real,
-	exceptions won't be renumberable. So renumber them now to make
-	more room to add exceptions to the various categories later, and
-	add a big warning message.
-
-2000-02-20  Dan Winship  
-
-	* providers/mbox/Makefile.am: add libibex back to
-	libcamelmbox_la_LIBADD
-
-2000-02-18  NotZed  
-
-	* providers/mbox/camel-mbox-search.h
-	(camel_mbox_folder_search_by_expression): Added exception to call,
-	and fixed caller.
-
-	* providers/mbox/camel-mbox-search.c
-	(camel_mbox_folder_search_by_expression): Major changes, to use
-	the sexp evaluator from filter/filter-sexp.c to implement the
-	searching.
-	(func_body_contains): Changed to support multiple strings in 1
-	command (results or'd together)
-
-	* url-util.c (g_url_new): Fixed a typo (colon == 0 isn't right),
-	and made it so full url's are absolute pathed (Dan, this is how it
-	has to work!).  Also, always include a path part, even if it is an
-	empty string.
-
-2000-02-18  Dan Winship  
-
-	* camel/camel-types.h: New header with the typedefs for all camel
-	classes. Now the class headers can just include this and the
-	header for the parent type. This makes it possible for
-	CamelService to include a CamelSession without creating an
-	#include loop.
-
-	* camel/*:	
-	* composer/e-msg-composer-attachment-bar.h:
-	* mail/folder-browser.c:
-	* mail/message-list.c: frob #includes to match the new reality
-
-2000-02-17  Dan Winship  
-
-	* camel/camel-service.h:
-	* camel/camel-service.c: Make camel-service us a Gurl internally.
-	Remove the login/password interfaces and instead provide
-	camel_service_connect_with_url. Add CamelExceptions
-
-2000-02-17  bertrand  
-
-	* camel/camel-formatter.c (handle_text_plain): 
-	(handle_text_html): use camel_stream_reset instead
-	of seek. The formatter should be able to work 
-	with all streams, not only seekable streams. 
-	In the case where some provider implementation
-	would not be able to provide a reset method 
-	to their stream, implementors would have
-	to find a workaround.
-
-	* camel/camel-session.c (camel_session_new): use
-	(void) instean of () in function decl.
-
-	* camel/camel-folder.c: ifdef async operation 
-	related code. 
-
-	* camel/camel-seekable-stream.c (_seek): added a warning.
-	(_reset): default implementation of reset for seekable
-	stream.
-
-	* camel/camel-mime-message.h: set_received_date declaration fix.
-	cosmetic changes.
-
-	* camel/providers/mbox/camel-mbox-provider.c (camel_provider_module_init): 
-	use (void) instead of ().
-
-	* camel/camel-stream.c (camel_stream_reset): 
-	new method for CamelStream.
-
-2000-02-17  Dan Winship  
-
-	* camel/url-util.c (g_url_to_string): New function to convert
-	a Gurl back into a char *.
-
-2000-02-17  bertrand  
-
-	* camel/camel-formatter.c (handle_text_plain): 
-	revamped so that it uses the output stream
-	of the data wrapper
-	(handle_text_html): ditto.
-	
-	
-	* camel/camel-simple-data-wrapper.h: 
-	* camel/camel-simple-data-wrapper.c (camel_simple_data_wrapper_new): 
-	use (void) instead of ().
-	(_get_output_stream): simple implementation. 
-
-2000-02-16  bertrand  
-
-	* camel/camel-data-wrapper.c (_set_input_stream): ref input stream
-	(_set_output_stream): ref output stream
-	(_finalize): unref input and output streams
-
-	* camel/camel-seekable-substream.c (_set_bounds): don't
-	seek the begining of the substream.
-	(_eos): fix eos condition testing. 
-	(_finalize): unref parent stream
-	(_init_with_seekable_stream_and_bounds): ref parent stream
-
-	* camel/gstring-util.c (g_string_equal_for_hash): 
-	(g_string_equal_for_glist): return type is int.
-
-	* camel/camel.h: 
-	* camel/camel.c (camel_init): use (void) 
-	instead of ().
-	
-2000-02-16  NotZed  
-
-	* providers/mbox/Makefile.am (libcamelmbox_la_LIBADD): Added
-	libfilter to link line (temporarily?).  Required for
-	filter-sexp.
-
-2000-02-15  bertrand  
-
-	* camel/camel-multipart.c (_localize_part): 
-	this routine replaces the _read_part routine
-	and does not store the part in a buffer. 
-	(_set_input_stream): use the set_input_stream
-	instead of the construct_from_stream.
-	each bodypart is given an input stream. 
-
-	* camel/camel-mime-part-utils.c: 
-	include the data-wrapper-repository header. 
-	(camel_mime_part_construct_content_from_stream): 
-	use the set_input_stream instead of the 
-	construct_from_stream method. 
-
-	* camel/camel-seekable-substream.c (_set_bounds): 
-	cur position is set to 0 not to inf_bound.
-
-2000-02-15  bertrand  
-
-	* camel/camel-mime-part.c: include gmime-base64.h
-	various compilation and runtime fixes.
-	(_set_input_stream): store the input substream 
-	for the content object.
-
-	* camel/camel-data-wrapper.h: declare the 
-	set/get function on input/output stream.
-
-	* camel/camel-mime-part.c (_get_content_object): 
-	don't use a temporary mem stream. 	
-
-	* camel/camel-seekable-substream.c (_seek): 
-	(_eos): 
-	(_read): the substream can be unlimited in length
-
-	* camel/camel-data-wrapper.c (camel_data_wrapper_class_init): 
-	set the get/set_input/output_stream methods. 	
-
-	* camel/camel-multipart.c (_construct_from_stream): 
-	camel_stream_seek -> camel_seekable_stream_seek
-
-2000-02-14  Miguel de Icaza  
-
-	* camel/providers/mbox/Makefile.am (libcamelmbox_la_LIBADD): Add
-	the unicode libraries as well.
-
-	* camel/camel-provider.c (camel_provider_register_as_module): Add
-	error reporting here.  Desire to use Solaris increases.  Hair loss
-	in the last two hours: 5,400.
-
-	* camel/providers/mbox/camel-mbox-provider.c
-	(camel_mbox_get_provider): Renamed function.
-
-	* camel/camel.h: All include files use camel/ now here.
-
-	* camel/providers/mbox/Makefile.am: Drop all the dynamism from
-	Camel, and make this a standard library.
-
-2000-02-14  bertrand  
-
-	* camel/gmime-utils.c (get_header_array_from_stream): use the 
-	eos stream method. 
-	(gmime_read_line_from_stream): ditto.
-
-	* camel/camel-stream-fs.h (struct ): add the eof field
-	cosmetics changes. 
-
-	* camel/camel-stream-fs.c (camel_stream_fs_init): set eof.
-	(_read): set eof on end of file.
-	(_eos): implemented.
-
-	* camel/gmime-utils.c (get_header_array_from_stream): 
-	make a blocking version of the header parser. 
-	When the fs stream uses gnome-vfs, this should
-	be changed. 
-	(gmime_read_line_from_stream): ditto. 
-
-2000-02-11  bertrand  
-
-	* camel/camel-stream-fs.c: 
-	everywhere, when using the cur_pos field, do it
-	on the CamelSeekableStream object.
-	(_seek): small fix. 
-
-	* camel/camel-seekable-stream.c (camel_seekable_stream_seek): 
-	s/camel_stream_seek/camel_seekable_stream_seek/g
-
-	* camel/camel-seekable-stream.h: 
-	(struct ): added a field to store the
-	current position.
-
-	* camel/camel-seekable-stream.c (camel_seekable_stream_get_current_position): 
-	New function. Allows to get the current position 
-	of a seekable stream.
-	
-
-2000-02-13  NotZed  
-
-	* providers/mbox/camel-mbox-search.c: New file, implements the
-	search api for mbox folders.
-
-	* providers/mbox/Makefile.am: Link with ibex.
-
-	* camel-folder.c (camel_folder_has_search_capability): Api
-	additions.
-	(camel_folder_search_by_expression): Ditto.
-
-2000-02-12  NotZed  
-
-	* providers/mbox/camel-mbox-folder.c (_set_name): Setup index
-	filename as well.
-	(_init_with_store): Init index filename.  Hmm, none of these
-	names ever seem to get free'd (FIXME?)
-
-	* providers/mbox/camel-mbox-folder.h: Add index file name.
-
-2000-02-12  NotZed  
-
-	* camel-folder.h: Add folder search functions.
-
-	** Created ChangeLog just for camel **
-	 - refer to ../ChangeLog for changes prior to this date.
diff --git a/camel/Makefile.am b/camel/Makefile.am
deleted file mode 100644
index 13351044c2..0000000000
--- a/camel/Makefile.am
+++ /dev/null
@@ -1,131 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-SUBDIRS = providers
-
-libcamelincludedir = $(includedir)/camel
-providerdir = $(libdir)/evolution/camel-providers/$(VERSION)
-
-lib_LTLIBRARIES = libcamel.la
-
-INCLUDES = -I.. -I$(srcdir)/.. -I$(includedir)	\
-	-I$(top_srcdir)/intl			\
-	$(GTK_INCLUDEDIR)			\
-	$(UNICODE_CFLAGS)			\
-	-DCAMEL_PROVIDERDIR=\""$(providerdir)"\" \
-	-DG_LOG_DOMAIN=\"camel\"
-
-libcamel_la_SOURCES = 				\
-	camel.c					\
-	camel-data-wrapper.c			\
-	camel-exception.c			\
-	camel-folder.c				\
-	camel-folder-search.c			\
-	camel-folder-summary.c			\
-	camel-medium.c				\
-	camel-mime-message.c			\
-	camel-mime-part.c			\
-	camel-mime-part-utils.c			\
-	camel-movemail.c			\
-	camel-multipart.c			\
-	camel-object.c				\
-	camel-provider.c			\
-	camel-seekable-stream.c			\
-	camel-seekable-substream.c		\
-	camel-service.c				\
-	camel-session.c				\
-	camel-store.c				\
-	camel-stream.c				\
-	camel-stream-buffer.c			\
-	camel-stream-fs.c			\
-	camel-stream-mem.c			\
-	camel-transport.c			\
-	camel-url.c				\
-	gmime-content-field.c			\
-	gstring-util.c				\
-	hash-table-utils.c			\
-	md5-utils.c				\
-	string-utils.c				\
-	camel-mime-parser.c			\
-	camel-mime-utils.c			\
-	camel-mime-filter.c			\
-	camel-mime-filter-basic.c		\
-	camel-mime-filter-save.c		\
-	camel-mime-filter-charset.c		\
-	camel-mime-filter-index.c		\
-	camel-mime-filter-from.c		\
-	camel-mime-filter-smtp.c		\
-	camel-stream-filter.c			\
-	camel-address.c				\
-	camel-internet-address.c
-
-libcamelinclude_HEADERS =			\
-	camel.h					\
-	camel-data-wrapper.h			\
-	camel-exception.h			\
-	camel-folder.h				\
-	camel-folder-search.h			\
-	camel-folder-summary.h			\
-	camel-medium.h				\
-	camel-mime-message.h			\
-	camel-mime-part.h			\
-	camel-mime-part-utils.h			\
-	camel-movemail.h			\
-	camel-multipart.h			\
-	camel-object.h				\
-	camel-provider.h			\
-	camel-seekable-stream.h			\
-	camel-seekable-substream.h		\
-	camel-service.h				\
-	camel-session.h				\
-	camel-store.h				\
-	camel-stream.h				\
-	camel-stream-buffer.h			\
-	camel-stream-fs.h			\
-	camel-stream-mem.h			\
-	camel-transport.h			\
-	camel-types.h				\
-	camel-url.h				\
-	gmime-content-field.h			\
-	gstring-util.h				\
-	hash-table-utils.h			\
-	md5-utils.h				\
-	string-utils.h				\
-	camel-exception-list.def		\
-	camel-mime-parser.h			\
-	camel-mime-utils.h			\
-	camel-mime-filter.h			\
-	camel-mime-filter-basic.h		\
-	camel-mime-filter-save.h		\
-	camel-mime-filter-charset.h		\
-	camel-mime-filter-index.h		\
-	camel-mime-filter-from.h		\
-	camel-mime-filter-smtp.h		\
-	camel-stream-filter.h			\
-	camel-address.h				\
-	camel-internet-address.h
-
-libcamel_extra_sources =			\
-	camel-arg-collector.c
-
-libcamel_la_LDFLAGS = -version-info 0:0:0 -rpath $(libdir)
-
-EXTRA_DIST =					\
-	$(libcamel_extra_sources)		\
-	README 
-
-#noinst_PROGRAMS =				\
-#	camel-mime-filter-from
-#
-#camel_mime_filter_from_SOURCES = 		\
-#	camel-mime-filter-from.c
-#
-#camel_mime_filter_from_LDADD = 		\
-#	../camel/libcamel.la			\
-#	../e-util/libeutil.la			\
-#	../libibex/libibex.la			\
-#	$(GNOME_LIBDIR)				\
-#	$(GNOMEUI_LIBS)				\
-#	$(INTLLIBS)				\
-#	$(PTHREAD_LIB)				\
-#	$(EXTRA_GNOME_LIBS)
-
diff --git a/camel/README b/camel/README
deleted file mode 100644
index f020174d5e..0000000000
--- a/camel/README
+++ /dev/null
@@ -1,57 +0,0 @@
-
-                                   CAMEL
-     
-
-			A generic Messaging Library
-
-
-                                   ----
-				
-
-Introduction:
--------------
-
-Camel will be a generic messaging library. It will evntually support 
-the standard messaging system for receiving and sending messages.
-It aims at being the backend for the future gnome-mailer system.
-
-The name "camel" stands for ... nothing. Open area of development there.
-You know, that "bazaar" thing. Maybe could we organize a big contest on
-gnome-list to find the best explanation :)
-
-Camel draws heavily from JavaMail and the IMAP4rev1 RFC. People
-wanting to hack on a provider should read the JavaMail API
-specification, but CMC and MAPI are of interest too.
-
-Please, before starting anything, wait for me to finish the abstract
-classes. Some parts are not definitive yet.
-
- 
-Organization:
--------------
-
-The library is roughly a set of abstract classes, some kind of generic
-"interfaces" (idl interfaces, not java interfaces ).
-
-Particular implementations are called providers.
-
-Here are the basic objects:
-
-* CamelService : an abstract class representing an access to a server.
-Handles the connection and authentication to any server.
-
-* CamelStore (CamelService): A hierarchy of folders on a server.
-
-* CamelFolder : An object containing messages. A folder is always
-associated with a store.
-
-* CamelMessage : An object contained in folders. Is defined by a set
-of attributes and a content. (Attributes include: the date it was
-received, the sender address, .....)
-
-* CamelTransport (CamelService): A way to send messages.
-
-....
-...
-
-
diff --git a/camel/README.COPYRIGHT b/camel/README.COPYRIGHT
deleted file mode 100644
index 91774e7339..0000000000
--- a/camel/README.COPYRIGHT
+++ /dev/null
@@ -1,47 +0,0 @@
-Important note for Camel hackers:
----------------------------------
-
-Camel has been a lot of work, and has been conceived to be general
-enough to be used outside the gnome-mailer. It is possible in the
-future that it is used in softwares with licenses incompatible with the
-LGPL. For this reason, the copyright has to be owned by a unique
-person.  Be sure, however, that Camel will always be available under
-the LGPL.  Significant authors will always be consulted before any
-special use of Camel. Moreover, in special situations, they may be
-given the authorization to use Camel with a license different than the
-LGPL.
-
-Thus, when adding code in Camel, always add the following lines at the
-begining of the file:
-
-/* 
- *
- * Copyright 199x, 200x Helix Code, Inc. (http://www.helixcode.com)
- * 
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-You may also want to add your name to the author name list after this
-header.
-
-Please contact me (Bertrand.Guiheneuf@aful.org) if you want to discuss
-this copyright issue.
-
-Happy hacking,
-
-Bertrand.
-
-
diff --git a/camel/README.HACKING b/camel/README.HACKING
deleted file mode 100644
index a4742ee7b8..0000000000
--- a/camel/README.HACKING
+++ /dev/null
@@ -1,14 +0,0 @@
-You want to hack on Camel ?
-
-Thanks. Camel aims at being the best messaging
-library for Linux and your help is welcome. 
-Please be sure to read the following files before
-commiting any change or sending any patch:
-
-CODING.STYLE
-README.COPYRIGHT
-
-
-Thanks.
-
-	Bertrand 
\ No newline at end of file
diff --git a/camel/camel-address.c b/camel/camel-address.c
deleted file mode 100644
index 8056c121c8..0000000000
--- a/camel/camel-address.c
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- *  Copyright (C) 2000 Helix Code Inc.
- *
- *  Authors: Michael Zucchi 
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Library General Public License
- *  as published by the Free Software Foundation; either version 2 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU Library General Public License for more details.
- *
- *  You should have received a copy of the GNU Library General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include "camel-address.h"
-
-
-static void camel_address_class_init (CamelAddressClass *klass);
-static void camel_address_init       (CamelAddress *obj);
-static void camel_address_finalise   (GtkObject *obj);
-
-static CamelObjectClass *camel_address_parent;
-
-enum SIGNALS {
-	LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-guint
-camel_address_get_type (void)
-{
-	static guint type = 0;
-	
-	if (!type) {
-		GtkTypeInfo type_info = {
-			"CamelAddress",
-			sizeof (CamelAddress),
-			sizeof (CamelAddressClass),
-			(GtkClassInitFunc) camel_address_class_init,
-			(GtkObjectInitFunc) camel_address_init,
-			(GtkArgSetFunc) NULL,
-			(GtkArgGetFunc) NULL
-		};
-		
-		type = gtk_type_unique (camel_object_get_type (), &type_info);
-	}
-	
-	return type;
-}
-
-static void
-camel_address_class_init (CamelAddressClass *klass)
-{
-	GtkObjectClass *object_class = (GtkObjectClass *) klass;
-	
-	camel_address_parent = gtk_type_class (camel_object_get_type ());
-
-	object_class->finalize = camel_address_finalise;
-
-	gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
-}
-
-static void
-camel_address_init (CamelAddress *obj)
-{
-	obj->addresses = g_ptr_array_new();
-}
-
-static void
-camel_address_finalise (GtkObject *obj)
-{
-	camel_address_remove((CamelAddress *)obj, -1);
-
-	((GtkObjectClass *)(camel_address_parent))->finalize((GtkObject *)obj);
-}
-
-/**
- * camel_address_new:
- *
- * Create a new CamelAddress object.
- * 
- * Return value: A new CamelAddress widget.
- **/
-CamelAddress *
-camel_address_new (void)
-{
-	CamelAddress *new = CAMEL_ADDRESS ( gtk_type_new (camel_address_get_type ()));
-	return new;
-}
-
-
-/**
- * camel_address_decode:
- * @a: An address.
- * @raw: Raw address description.
- * 
- * Construct a new address from a raw address field.
- * 
- * Return value: Returns the number of addresses found,
- * or -1 if the addresses could not be parsed fully.
- **/
-int
-camel_address_decode	(CamelAddress *a, const char *raw)
-{
-	g_return_val_if_fail(IS_CAMEL_ADDRESS(a), -1);
-
-	return ((CamelAddressClass *)((GtkObject *)a)->klass)->decode(a, raw);
-}
-
-/**
- * camel_address_encode:
- * @a: 
- * 
- * Encode an address in a format suitable for a raw header.
- * 
- * Return value: The encoded address.
- **/
-char *
-camel_address_encode	(CamelAddress *a)
-{
-	g_return_val_if_fail(IS_CAMEL_ADDRESS(a), NULL);
-
-	return ((CamelAddressClass *)((GtkObject *)a)->klass)->encode(a);
-}
-
-/**
- * camel_address_remove:
- * @a: 
- * @index: The address to remove, use -1 to remove all address.
- * 
- * Remove an address by index, or all addresses.
- **/
-void
-camel_address_remove	(CamelAddress *a, int index)
-{
-	g_return_if_fail(IS_CAMEL_ADDRESS(a));
-
-	if (index == -1) {
-		for (index=a->addresses->len; index>-1; index--)
-			((CamelAddressClass *)((GtkObject *)a)->klass)->remove(a, index);
-	} else {
-		((CamelAddressClass *)((GtkObject *)a)->klass)->remove(a, index);
-	}
-}
diff --git a/camel/camel-address.h b/camel/camel-address.h
deleted file mode 100644
index d035f20e00..0000000000
--- a/camel/camel-address.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- *  Copyright (C) 2000 Helix Code Inc.
- *
- *  Authors: Michael Zucchi 
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Library General Public License
- *  as published by the Free Software Foundation; either version 2 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU Library General Public License for more details.
- *
- *  You should have received a copy of the GNU Library General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef _CAMEL_ADDRESS_H
-#define _CAMEL_ADDRESS_H
-
-#include 
-
-#define CAMEL_ADDRESS(obj)         GTK_CHECK_CAST (obj, camel_address_get_type (), CamelAddress)
-#define CAMEL_ADDRESS_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, camel_address_get_type (), CamelAddressClass)
-#define IS_CAMEL_ADDRESS(obj)      GTK_CHECK_TYPE (obj, camel_address_get_type ())
-
-typedef struct _CamelAddressClass CamelAddressClass;
-
-struct _CamelAddress {
-	CamelObject parent;
-
-	GPtrArray *addresses;
-
-	struct _CamelAddressPrivate *priv;
-};
-
-struct _CamelAddressClass {
-	CamelObjectClass parent_class;
-
-	int   (*decode)		(CamelAddress *, const char *raw);
-	char *(*encode)		(CamelAddress *);
-
-	void  (*remove)		(CamelAddress *, int index);
-};
-
-guint		camel_address_get_type	(void);
-CamelAddress   *camel_address_new	(void);
-
-int	        camel_address_decode	(CamelAddress *, const char *);
-char	       *camel_address_encode	(CamelAddress *);
-
-void		camel_address_remove	(CamelAddress *, int index);
-
-#endif /* ! _CAMEL_ADDRESS_H */
diff --git a/camel/camel-arg-collector.c b/camel/camel-arg-collector.c
deleted file mode 100644
index 44b9e2d99b..0000000000
--- a/camel/camel-arg-collector.c
+++ /dev/null
@@ -1,186 +0,0 @@
-/* GTK - The GIMP Toolkit
- * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/*
- * Modified by the GTK+ Team and others 1997-1999.  See the AUTHORS
- * file for a list of people on the GTK+ Team.  See the ChangeLog
- * files for a list of changes.  These files are distributed with
- * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
- */
-
-/*
- * included in camel because it is not exported 
- * by gtk
- *
- * Bertrand Guiheneuf 
- */
-
-/* collect a single argument value from a va_list.
- * this is implemented as a huge macro , because we can't
- * pass va_list variables by reference on some systems.
- * the corresponding prototype would be:
- * static inline gchar*
- * gtk_arg_collect_value (GtkArg  *arg,
- *		          va_list  var_args);
- */
-#define	CAMEL_ARG_COLLECT_VALUE(arg, var_args, _error)	\
-G_STMT_START { \
-  gchar *error_msg; \
-  GtkType fundamental_type; \
-  \
-  fundamental_type = GTK_FUNDAMENTAL_TYPE (arg->type); \
-  if (fundamental_type > GTK_TYPE_FUNDAMENTAL_LAST) \
-    { \
-      fundamental_type = gtk_type_get_varargs_type (fundamental_type); \
-      if (!fundamental_type) \
-        fundamental_type = GTK_FUNDAMENTAL_TYPE (arg->type); \
-    } \
- \
-  error_msg = NULL; \
-  switch (fundamental_type) \
-    { \
-    case GTK_TYPE_INVALID: \
-      error_msg = g_strdup ("invalid untyped argument"); \
-      break; \
- \
-    case GTK_TYPE_NONE: \
-      /* we just ignore this type, since it arithmetically just requires \
-       * us to not move the var_args pointer any further. callers need to \
-       * check for the validity of GTK_TYPE_NONE themselves. \
-       * \
-       * error_msg = g_strdup ("invalid argument type `void'"); \
-       */ \
-      break; \
- \
-      /* everything smaller than an int is guarranteed to be \
-       * passed as an int \
-       */ \
-    case GTK_TYPE_CHAR: \
-      GTK_VALUE_CHAR (*arg) = va_arg (var_args, gint); \
-      break; \
-    case GTK_TYPE_UCHAR: \
-      GTK_VALUE_UCHAR (*arg) = va_arg (var_args, guint); \
-      break; \
-    case GTK_TYPE_BOOL: \
-      GTK_VALUE_BOOL (*arg) = va_arg (var_args, gint); \
-      break; \
-    case GTK_TYPE_INT: \
-      GTK_VALUE_INT (*arg) = va_arg (var_args, gint); \
-      break; \
-    case GTK_TYPE_UINT: \
-      GTK_VALUE_UINT (*arg) = va_arg (var_args, guint); \
-      break; \
-    case GTK_TYPE_ENUM: \
-      GTK_VALUE_ENUM (*arg) = va_arg (var_args, gint); \
-      break; \
-    case GTK_TYPE_FLAGS: \
-      GTK_VALUE_FLAGS (*arg) = va_arg (var_args, guint); \
-      break; \
- \
-      /* we collect longs as glongs since they differ in size with \
-       * integers on some platforms \
-       */ \
-    case GTK_TYPE_LONG: \
-      GTK_VALUE_LONG (*arg) = va_arg (var_args, glong); \
-      break; \
-    case GTK_TYPE_ULONG: \
-      GTK_VALUE_ULONG (*arg) = va_arg (var_args, gulong); \
-      break; \
- \
-      /* floats are always passed as doubles \
-       */ \
-    case GTK_TYPE_FLOAT: \
-      /* GTK_VALUE_FLOAT (*arg) = va_arg (var_args, gfloat); */ \
-      GTK_VALUE_FLOAT (*arg) = va_arg (var_args, gdouble); \
-      break; \
-    case GTK_TYPE_DOUBLE: \
-      GTK_VALUE_DOUBLE (*arg) = va_arg (var_args, gdouble); \
-      break; \
- \
-      /* collect pointer values \
-       */ \
-    case GTK_TYPE_STRING: \
-      GTK_VALUE_STRING (*arg) = va_arg (var_args, gchar*); \
-      break; \
-    case GTK_TYPE_POINTER: \
-      GTK_VALUE_POINTER (*arg) = va_arg (var_args, gpointer); \
-      break; \
-    case GTK_TYPE_BOXED: \
-      GTK_VALUE_BOXED (*arg) = va_arg (var_args, gpointer); \
-      break; \
- \
-      /* structured types \
-       */ \
-    case GTK_TYPE_SIGNAL: \
-      GTK_VALUE_SIGNAL (*arg).f = va_arg (var_args, GtkSignalFunc); \
-      GTK_VALUE_SIGNAL (*arg).d = va_arg (var_args, gpointer); \
-      break; \
-    case GTK_TYPE_ARGS: \
-      GTK_VALUE_ARGS (*arg).n_args = va_arg (var_args, gint); \
-      GTK_VALUE_ARGS (*arg).args = va_arg (var_args, GtkArg*); \
-      break; \
-    case GTK_TYPE_FOREIGN: \
-      GTK_VALUE_FOREIGN (*arg).data = va_arg (var_args, gpointer); \
-      GTK_VALUE_FOREIGN (*arg).notify = va_arg (var_args, GtkDestroyNotify); \
-      break; \
-    case GTK_TYPE_CALLBACK: \
-      GTK_VALUE_CALLBACK (*arg).marshal = va_arg (var_args, GtkCallbackMarshal); \
-      GTK_VALUE_CALLBACK (*arg).data = va_arg (var_args, gpointer); \
-      GTK_VALUE_CALLBACK (*arg).notify = va_arg (var_args, GtkDestroyNotify); \
-      break; \
-    case GTK_TYPE_C_CALLBACK: \
-      GTK_VALUE_C_CALLBACK (*arg).func = va_arg (var_args, GtkFunction); \
-      GTK_VALUE_C_CALLBACK (*arg).func_data = va_arg (var_args, gpointer); \
-      break; \
- \
-      /* we do some extra sanity checking when collecting objects, \
-       * i.e. if the object pointer is not NULL, we check whether we \
-       * actually got an object pointer within the desired class branch. \
-       */ \
-    case GTK_TYPE_OBJECT: \
-      GTK_VALUE_OBJECT (*arg) = va_arg (var_args, GtkObject*); \
-      if (GTK_VALUE_OBJECT (*arg) != NULL) \
-	{ \
-	  register GtkObject *object = GTK_VALUE_OBJECT (*arg); \
-	   \
-	  if (object->klass == NULL) \
-	    error_msg = g_strconcat ("invalid unclassed object pointer for argument type `", \
-				     gtk_type_name (arg->type), \
-				     "'", \
-				     NULL); \
-	  else if (!gtk_type_is_a (GTK_OBJECT_TYPE (object), arg->type)) \
-	    error_msg = g_strconcat ("invalid object `", \
-				     gtk_type_name (GTK_OBJECT_TYPE (object)), \
-				     "' for argument type `", \
-				     gtk_type_name (arg->type), \
-				     "'", \
-				     NULL); \
-	} \
-      break; \
- \
-    default: \
-      error_msg = g_strconcat ("unsupported argument type `", \
-			       gtk_type_name (arg->type), \
-			       "'", \
-			       NULL); \
-      break; \
-    } \
-   \
-  _error = error_msg; /* return error_msg; */ \
-} G_STMT_END
diff --git a/camel/camel-data-wrapper.c b/camel/camel-data-wrapper.c
deleted file mode 100644
index 86be8117bf..0000000000
--- a/camel/camel-data-wrapper.c
+++ /dev/null
@@ -1,285 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; fill-column: 160 -*- */
-/* camel-data-wrapper.c : Abstract class for a data_wrapper */
-
-/*
- *
- * Authors: Bertrand Guiheneuf 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-#include 
-#include "camel-data-wrapper.h"
-#include "camel-exception.h"
-
-#include 
-
-#define d(x)
-
-static CamelObjectClass *parent_class = NULL;
-
-/* Returns the class for a CamelDataWrapper */
-#define CDW_CLASS(so) CAMEL_DATA_WRAPPER_CLASS (GTK_OBJECT (so)->klass)
-
-
-static int construct_from_stream(CamelDataWrapper *, CamelStream *);
-static int write_to_stream (CamelDataWrapper *data_wrapper, CamelStream *stream);
-static void set_mime_type (CamelDataWrapper *data_wrapper, const gchar *mime_type);
-static gchar *get_mime_type (CamelDataWrapper *data_wrapper);
-static GMimeContentField *get_mime_type_field (CamelDataWrapper *data_wrapper);
-static void set_mime_type_field (CamelDataWrapper *data_wrapper, GMimeContentField *mime_type);
-static void finalize (GtkObject *object);
-
-static void
-camel_data_wrapper_class_init (CamelDataWrapperClass *camel_data_wrapper_class)
-{
-	GtkObjectClass *gtk_object_class =
-		GTK_OBJECT_CLASS (camel_data_wrapper_class);
-
-	parent_class = gtk_type_class (camel_object_get_type ());
-
-	/* virtual method definition */
-	camel_data_wrapper_class->write_to_stream = write_to_stream;
-	camel_data_wrapper_class->set_mime_type = set_mime_type;
-	camel_data_wrapper_class->get_mime_type = get_mime_type;
-	camel_data_wrapper_class->get_mime_type_field = get_mime_type_field;
-	camel_data_wrapper_class->set_mime_type_field = set_mime_type_field;
-
-	camel_data_wrapper_class->construct_from_stream = construct_from_stream;
-
-	/* virtual method overload */
-	gtk_object_class->finalize = finalize;
-}
-
-static void
-camel_data_wrapper_init (gpointer object, gpointer klass)
-{
-	CamelDataWrapper *camel_data_wrapper = CAMEL_DATA_WRAPPER (object);
-
-	camel_data_wrapper->mime_type = gmime_content_field_new (NULL, NULL);
-}
-
-
-
-GtkType
-camel_data_wrapper_get_type (void)
-{
-	static GtkType camel_data_wrapper_type = 0;
-
-	if (!camel_data_wrapper_type) {
-		GtkTypeInfo camel_data_wrapper_info =
-		{
-			"CamelDataWrapper",
-			sizeof (CamelDataWrapper),
-			sizeof (CamelDataWrapperClass),
-			(GtkClassInitFunc) camel_data_wrapper_class_init,
-			(GtkObjectInitFunc) camel_data_wrapper_init,
-				/* reserved_1 */ NULL,
-				/* reserved_2 */ NULL,
-			(GtkClassInitFunc) NULL,
-		};
-
-		camel_data_wrapper_type = gtk_type_unique (camel_object_get_type (), &camel_data_wrapper_info);
-	}
-
-	return camel_data_wrapper_type;
-}
-
-
-static void
-finalize (GtkObject *object)
-{
-	CamelDataWrapper *camel_data_wrapper = CAMEL_DATA_WRAPPER (object);
-
-	if (camel_data_wrapper->mime_type)
-		gmime_content_field_unref (camel_data_wrapper->mime_type);
-
-	GTK_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-static int
-write_to_stream (CamelDataWrapper *data_wrapper, CamelStream *stream)
-{
-	if (data_wrapper->stream == NULL) {
-		return -1;
-	}
-
-	if (camel_stream_reset (data_wrapper->stream) == -1)
-		return -1;
-
-	return camel_stream_write_to_stream (data_wrapper->stream, stream);
-}
-
-CamelDataWrapper *
-camel_data_wrapper_new(void)
-{
-	return (CamelDataWrapper *)gtk_type_new(camel_data_wrapper_get_type());
-}
-
-/**
- * camel_data_wrapper_write_to_stream:
- * @data_wrapper: a data wrapper
- * @stream: stream for data to be written to
- * @ex: a CamelException
- *
- * Writes the data content to @stream in a machine-independent format
- * appropriate for the data. It should be possible to construct an
- * equivalent data wrapper object later by passing this stream to
- * camel_data_construct_from_stream().
- *
- * Return value: the number of bytes written, or -1 if an error occurs.
- **/
-int
-camel_data_wrapper_write_to_stream (CamelDataWrapper *data_wrapper,
-				    CamelStream *stream)
-{
-	g_return_val_if_fail (CAMEL_IS_DATA_WRAPPER (data_wrapper), -1);
-	g_return_val_if_fail (CAMEL_IS_STREAM (stream), -1);
-
-	return CDW_CLASS (data_wrapper)->write_to_stream (data_wrapper, stream);
-}
-
-static int
-construct_from_stream (CamelDataWrapper *data_wrapper, CamelStream *stream)
-{
-	if (data_wrapper->stream)
-		gtk_object_unref((GtkObject *)data_wrapper->stream);
-
-	data_wrapper->stream = stream;
-	gtk_object_ref (GTK_OBJECT (stream));
-	return 0;
-}
-
-/**
- * camel_data_wrapper_construct_from_stream:
- * @data_wrapper: a data wrapper
- * @stream: A stream that can be read from.
- *
- * Constructs the content of the data wrapper from the
- * supplied @stream.
- *
- * Return value: -1 on error.
- **/
-int
-camel_data_wrapper_construct_from_stream (CamelDataWrapper *data_wrapper,
-					  CamelStream *stream)
-{
-	g_return_val_if_fail (CAMEL_IS_DATA_WRAPPER (data_wrapper), -1);
-	g_return_val_if_fail (CAMEL_IS_STREAM (stream), -1);
-
-	return CDW_CLASS (data_wrapper)->construct_from_stream (data_wrapper, stream);
-}
-
-
-static void
-set_mime_type (CamelDataWrapper *data_wrapper, const gchar *mime_type)
-{
-	gmime_content_field_construct_from_string (data_wrapper->mime_type,
-						   mime_type);
-}
-
-/**
- * camel_data_wrapper_set_mime_type:
- * @data_wrapper: a data wrapper
- * @mime_type: the text representation of a MIME type
- *
- * This sets the data wrapper's MIME type.
- * It might fail, but you won't know. It will allow you to set
- * Content-Type parameters on the data wrapper, which are meaningless.
- * You should not be allowed to change the MIME type of a data wrapper
- * that contains data, or at least, if you do, it should invalidate the
- * data.
- **/
-void
-camel_data_wrapper_set_mime_type (CamelDataWrapper *data_wrapper,
-				  const gchar *mime_type)
-{
-	g_return_if_fail (CAMEL_IS_DATA_WRAPPER (data_wrapper));
-	g_return_if_fail (mime_type != NULL);
-
-	CDW_CLASS (data_wrapper)->set_mime_type (data_wrapper, mime_type);
-}
-
-static gchar *
-get_mime_type (CamelDataWrapper *data_wrapper)
-{
-	return gmime_content_field_get_mime_type (data_wrapper->mime_type);
-}
-
-/**
- * camel_data_wrapper_get_mime_type:
- * @data_wrapper: a data wrapper
- *
- * Return value: the text form of the data wrapper's MIME type
- **/
-gchar *
-camel_data_wrapper_get_mime_type (CamelDataWrapper *data_wrapper)
-{
-	g_return_val_if_fail (CAMEL_IS_DATA_WRAPPER (data_wrapper), NULL);
-
-	return CDW_CLASS (data_wrapper)->get_mime_type (data_wrapper);
-}
-
-
-static GMimeContentField *
-get_mime_type_field (CamelDataWrapper *data_wrapper)
-{
-	return data_wrapper->mime_type;
-}
-
-/**
- * camel_data_wrapper_get_mime_type_field:
- * @data_wrapper: a data wrapper
- *
- * Return value: the parsed form of the data wrapper's MIME type
- **/
-GMimeContentField *
-camel_data_wrapper_get_mime_type_field (CamelDataWrapper *data_wrapper)
-{
-	g_return_val_if_fail (CAMEL_IS_DATA_WRAPPER (data_wrapper), NULL);
-
-	return CDW_CLASS (data_wrapper)->get_mime_type_field (data_wrapper);
-}
-
-/**
- * camel_data_wrapper_set_mime_type_field:
- * @data_wrapper: a data wrapper
- * @mime_type: the parsed representation of a MIME type
- *
- * This sets the data wrapper's MIME type. It suffers from the same
- * flaws as camel_data_wrapper_set_mime_type.
- **/
-static void
-set_mime_type_field (CamelDataWrapper *data_wrapper,
-		     GMimeContentField *mime_type)
-{
-	g_return_if_fail (CAMEL_IS_DATA_WRAPPER (data_wrapper));
-	g_return_if_fail (mime_type != NULL);
-
-	if (data_wrapper->mime_type)
-		gmime_content_field_unref (data_wrapper->mime_type);
-	data_wrapper->mime_type = mime_type;
-	if (mime_type)
-		gmime_content_field_ref (data_wrapper->mime_type);
-}
-
-void
-camel_data_wrapper_set_mime_type_field (CamelDataWrapper *data_wrapper,
-					GMimeContentField *mime_type)
-{
-	CDW_CLASS (data_wrapper)->set_mime_type_field (data_wrapper, mime_type);
-}
diff --git a/camel/camel-data-wrapper.h b/camel/camel-data-wrapper.h
deleted file mode 100644
index 8df09fa848..0000000000
--- a/camel/camel-data-wrapper.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-data-wrapper.h : Abstract class for a data wrapper */
-
-/*
- *
- * Author :
- *  Bertrand Guiheneuf 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef CAMEL_DATA_WRAPPER_H
-#define CAMEL_DATA_WRAPPER_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include 
-#include 
-
-#define CAMEL_DATA_WRAPPER_TYPE     (camel_data_wrapper_get_type ())
-#define CAMEL_DATA_WRAPPER(obj)     (GTK_CHECK_CAST((obj), CAMEL_DATA_WRAPPER_TYPE, CamelDataWrapper))
-#define CAMEL_DATA_WRAPPER_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_DATA_WRAPPER_TYPE, CamelDataWrapperClass))
-#define CAMEL_IS_DATA_WRAPPER(o)    (GTK_CHECK_TYPE((o), CAMEL_DATA_WRAPPER_TYPE))
-
-struct _CamelDataWrapper
-{
-	CamelObject parent_object;
-
-	GMimeContentField *mime_type;
-	CamelStream *stream;
-};
-
-typedef struct {
-	CamelObjectClass parent_class;
-
-	/* Virtual methods */
-	void                (*set_output_stream)      (CamelDataWrapper *data_wrapper,
-						       CamelStream *stream);
-	CamelStream *       (*get_output_stream)      (CamelDataWrapper *data_wrapper);
-
-	void                (*set_mime_type)          (CamelDataWrapper *data_wrapper,
-						       const gchar * mime_type);
-	gchar *             (*get_mime_type)          (CamelDataWrapper *data_wrapper);
-	GMimeContentField * (*get_mime_type_field)    (CamelDataWrapper *data_wrapper);
-	void                (*set_mime_type_field)    (CamelDataWrapper *data_wrapper,
-						       GMimeContentField *mime_type_field);
-
-	int                 (*write_to_stream)        (CamelDataWrapper *data_wrapper,
-						       CamelStream *stream);
-
-	int                 (*construct_from_stream)  (CamelDataWrapper *data_wrapper,
-						       CamelStream *);
-} CamelDataWrapperClass;
-
-/* Standard Gtk function */
-GtkType camel_data_wrapper_get_type (void);
-
-/* public methods */
-CamelDataWrapper *  camel_data_wrapper_new(void);
-int                 camel_data_wrapper_write_to_stream          (CamelDataWrapper *data_wrapper,
-								 CamelStream *stream);
-void                camel_data_wrapper_set_mime_type            (CamelDataWrapper *data_wrapper,
-								 const gchar *mime_type);
-gchar *             camel_data_wrapper_get_mime_type            (CamelDataWrapper *data_wrapper);
-GMimeContentField * camel_data_wrapper_get_mime_type_field      (CamelDataWrapper *data_wrapper);
-void                camel_data_wrapper_set_mime_type_field      (CamelDataWrapper *data_wrapper,
-								 GMimeContentField *mime_type);
-
-int                 camel_data_wrapper_construct_from_stream    (CamelDataWrapper *data_wrapper,
-								 CamelStream *stream);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_DATA_WRAPPER_H */
diff --git a/camel/camel-exception-list.def b/camel/camel-exception-list.def
deleted file mode 100644
index fcb99e5a52..0000000000
--- a/camel/camel-exception-list.def
+++ /dev/null
@@ -1,35 +0,0 @@
-/* WARNING: Exceptions MUST NOT be renumbered: they need to be
- * consistent across libraries compiled at different times.
- * Categories should be widely separated, old unused exceptions can
- * never be deleted, and new exceptions can be added only to the
- * ends of categories.
- */
-
-CAMEL_EXCEPTION_NONE = 0,
-
-/* Generic exceptions */
-CAMEL_EXCEPTION_INVALID_PARAM,
-CAMEL_EXCEPTION_SYSTEM,
-CAMEL_EXCEPTION_USER_CANCEL,
-
-/* CamelFolderException */
-CAMEL_EXCEPTION_FOLDER_NULL = 100,
-CAMEL_EXCEPTION_FOLDER_INVALID,
-CAMEL_EXCEPTION_FOLDER_INVALID_STATE,
-CAMEL_EXCEPTION_FOLDER_NON_EMPTY,
-CAMEL_EXCEPTION_FOLDER_NON_UID,
-CAMEL_EXCEPTION_FOLDER_INSUFFICIENT_PERMISSION,
-CAMEL_EXCEPTION_FOLDER_INVALID_PATH,
-CAMEL_EXCEPTION_FOLDER_INVALID_UID,
-CAMEL_EXCEPTION_FOLDER_SUMMARY_INVALID,
-
-/* CamelStoreException */
-CAMEL_EXCEPTION_STORE_NULL = 200,
-CAMEL_EXCEPTION_STORE_INVALID,
-
-/* CamelServiceException */
-CAMEL_EXCEPTION_SERVICE_NULL = 300,
-CAMEL_EXCEPTION_SERVICE_INVALID,
-CAMEL_EXCEPTION_SERVICE_URL_INVALID,
-CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
-CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE
diff --git a/camel/camel-exception.c b/camel/camel-exception.c
deleted file mode 100644
index cf5daff9d3..0000000000
--- a/camel/camel-exception.c
+++ /dev/null
@@ -1,279 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-execpetion.c : exception utils */
-
-/* 
- *
- * Author : 
- *  Bertrand Guiheneuf 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#include 
-#include "camel-exception.h"
-
-
-
-/**
- * camel_exception_new: allocate a new exception object. 
- * 
- * Create and returns a new exception object.
- * 
- * 
- * Return value: The newly allocated exception object.
- **/
-CamelException *
-camel_exception_new (void)
-{
-	CamelException *ex;
-
-	ex = g_new (CamelException, 1);
-	ex->desc = NULL;
-
-	/* set the Exception Id to NULL */
-	ex->id = CAMEL_EXCEPTION_NONE;
-
-	return ex;
-}
-
-/**
- * camel_exception_init: init a (statically allocated) exception. 
- * 
- * Init an exception. This routine is mainly
- * useful when using a statically allocated
- * exception. 
- * 
- * 
- **/
-void
-camel_exception_init (CamelException *ex)
-{
-	ex->desc = NULL;
-
-	/* set the Exception Id to NULL */
-	ex->id = CAMEL_EXCEPTION_NONE;
-}
-
-
-/**
- * camel_exception_clear: Clear an exception
- * @exception: the exception object
- * 
- * Clear an exception, that is, set the 
- * exception ID to CAMEL_EXCEPTION_NONE and
- * free the description text.
- * If the exception is NULL, this funtion just
- * returns.
- **/
-void 
-camel_exception_clear (CamelException *exception)
-{
-	if (!exception) return;
-	
-	/* free the description text */
-	if (exception->desc)
-		g_free (exception->desc);
-	exception->desc = NULL;
-
-	/* set the Exception Id to NULL */
-	exception->id = CAMEL_EXCEPTION_NONE;
-}
-
-
-
-
-/**
- * camel_exception_free: Free an exception 
- * @exception: The exception object to free
- * 
- * Free an exception object. If the exception
- * is NULL, nothing is done, the routine simply
- * returns.
- **/
-void 
-camel_exception_free (CamelException *exception)
-{
-	if (!exception) return;
-	
-	/* free the description text */
-	if (exception->desc)
-		g_free (exception->desc);
-       	/* free the exeption itself */
-	g_free (exception);
-}
-
-/**
- * camel_exception_set: set an exception 
- * @ex: exception object 
- * @id: exception id 
- * @desc: textual description of the exception
- * 
- * Set the value of an exception. The exception id is 
- * a unique number representing the exception. The 
- * textual description is a small text explaining 
- * what happened and provoked the exception.
- *
- * When @ex is NULL, nothing is done, this routine
- * simply returns.
- *
- **/
-void
-camel_exception_set (CamelException *ex,
-		     ExceptionId id,
-		     const char *desc)
-{
-	/* if no exception is given, do nothing */
-	if (!ex) return;
-
-	ex->id = id;
-
-	/* remove the previous exception description */
-	if (ex->desc)
-		g_free (ex->desc);
-	ex->desc = g_strdup (desc);
-}
-
-
-/**
- * camel_exception_setv: set an exception 
- * @ex: exception object 
- * @id: exception id 
- * @format: format of the description string. The format string is
- * used as in printf().
- * 
- * Set the value of an exception. The exception id is 
- * a unique number representing the exception. The 
- * textual description is a small text explaining 
- * what happened and provoked the exception. 
- * In this version, the string is created from the format 
- * string and the variable argument list.
- *
- * It is safe to say:
- *   camel_exception_setv (ex, ..., camel_exception_get_description (ex), ...);
- *
- * When @ex is NULL, nothing is done, this routine
- * simply returns.
- *
- **/
-void
-camel_exception_setv (CamelException *ex,
-		      ExceptionId id,
-		      const char *format, 
-		      ...)
-{
-	va_list args;
-	gchar *tmp_desc_string;
-	
-	
-	/* if no exception is given, do nothing */
-	if (!ex) return;
-	
-	
-	/* create the temporary exception string */
-	va_start(args, format);
-	tmp_desc_string = g_strdup_vprintf (format, args);
-	va_end (args);
-	
-	
-	/* now set the exception. We don't call
-	   camel_exception_set because we want to 
-	   avoid a useless strdup () */
-	ex->id = id;
-	
-	/* remove the previous exception description */
-	if (ex->desc)
-		g_free (ex->desc);
-	ex->desc = g_strdup (tmp_desc_string);
-	
-}
-
-
-
-
-
-
-
-/**
- * camel_exception_xfer: transfer an exception
- * @ex_dst: Destination exception object 
- * @ex_src: Source exception object
- * 
- * Transfer the content of an exception from
- * an exception object to another. 
- * The destination exception receives the id and
- * the description text of the source exception. 
- **/
-void 
-camel_exception_xfer (CamelException *ex_dst,
-		      CamelException *ex_src)
-{
-	if (ex_dst->desc)
-		g_free (ex_dst->desc);
-
-	ex_dst->id = ex_src->id;
-	ex_dst->desc = ex_src->desc;
-
-	ex_src->desc = NULL;
-	ex_src->id = CAMEL_EXCEPTION_NONE;
-}
-
-
-
-
-
-
-
-/**
- * camel_exception_get_id: get the exception id
- * @ex: The exception object
- * 
- * Return the id of an exception. 
- * If @ex is NULL, return CAMEL_EXCEPTION_NONE;
- * 
- * Return value: Exception ID.
- **/
-ExceptionId
-camel_exception_get_id (CamelException *ex)
-{
-	if (ex)
-		return ex->id;
-	else 
-		return CAMEL_EXCEPTION_NONE;
-}
-
-
-
-
-/**
- * camel_exception_get_description: get the description of an exception.
- * @ex: The exception object
- * 
- * Return the exception description text. 
- * If @ex is NULL, return NULL;
- * 
- * 
- * Return value: Exception description text.
- **/
-const gchar *
-camel_exception_get_description (CamelException *ex)
-{
-	if (ex)
-		return ex->desc;
-	else 
-		return NULL;
-}
diff --git a/camel/camel-exception.h b/camel/camel-exception.h
deleted file mode 100644
index d5c93e5941..0000000000
--- a/camel/camel-exception.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-execpetion.h : exception utils */
-
-/* 
- *
- * Author : 
- *  Bertrand Guiheneuf 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-
-#ifndef CAMEL_EXCEPTION_H
-#define CAMEL_EXCEPTION_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include 
-#include 
-
-typedef enum {
-#include "camel-exception-list.def"
-
-} ExceptionId;
-
-
-struct _CamelException {
-	/* do not access the fields directly */
-	ExceptionId id;
-	char *desc;
-
-};
-
-
-
-/* creation and destruction functions */
-CamelException *          camel_exception_new           (void);
-void                      camel_exception_free          (CamelException *exception);
-void                      camel_exception_init          (CamelException *ex);
-
-
-/* exception content manipulation */
-void                      camel_exception_clear         (CamelException *exception);
-void                      camel_exception_set           (CamelException *ex,
-							 ExceptionId id,
-							 const char *desc);
-void                      camel_exception_setv          (CamelException *ex,
-							 ExceptionId id,
-							 const char *format,  
-							 ...);
-
-
-/* exception content transfer */
-void                      camel_exception_xfer          (CamelException *ex_dst,
-							 CamelException *ex_src);
-
-
-/* exception content retrieval */
-ExceptionId               camel_exception_get_id        (CamelException *ex);
-const gchar *             camel_exception_get_description (CamelException *ex);
-
-#define camel_exception_is_set(ex) (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE)
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_EXCEPTION_H */
-
diff --git a/camel/camel-folder-pt-proxy.c b/camel/camel-folder-pt-proxy.c
deleted file mode 100644
index 65f74ecc4d..0000000000
--- a/camel/camel-folder-pt-proxy.c
+++ /dev/null
@@ -1,809 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-folder-pt-proxy.c : proxy folder using posix threads */
-
-/* 
- *
- * Author : 
- *  Bertrand Guiheneuf 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-
-#include 
-#include "camel-folder-pt-proxy.h"
-#include "camel-marshal-utils.h"
-#include "camel-exception.h"
-#include 
-#include 
-#include 
-#include 
-
-
-static CamelFolderClass *parent_class = NULL;
-
-/* Returns the class for CamelFolderPtProxy and CamelFolder objects */
-#define CFPP_CLASS(so) CAMEL_FOLDER_PT_PROXY_CLASS (GTK_OBJECT(so)->klass)
-#define CF_CLASS(so) CAMEL_FOLDER_CLASS (GTK_OBJECT(so)->klass)
-
-
-enum CamelFolderFunc {
-	CAMEL_FOLDER_OPEN,
-	CAMEL_FOLDER_CLOSE,
-	CAMEL_FOLDER__LAST_FUNC
-};
-
-static CamelFuncDef _camel_func_def [CAMEL_FOLDER__LAST_FUNC];
-
-
-static void _init (CamelFolder *folder, CamelStore *parent_store, 
-		   CamelFolder *parent_folder, const gchar *name,
-		   gchar separator, CamelException *ex);
-static void _open_async (CamelFolder *folder, 
-			 CamelFolderOpenMode mode, 
-			 CamelFolderAsyncCallback callback, 
-			 gpointer user_data, 
-			 CamelException *ex);
-static void _close_async (CamelFolder *folder, 
-		    gboolean expunge, 
-		    CamelFolderAsyncCallback callback, 
-		    gpointer user_data, 
-		    CamelException *ex);
-static void _open (CamelFolder *folder, 
-		   CamelFolderOpenMode mode, 
-		   CamelException *ex);
-static void _close (CamelFolder *folder, 
-		    gboolean expunge, 
-		    CamelException *ex);
-static void _set_name (CamelFolder *folder, 
-		       const gchar *name, 
-		       CamelException *ex);
-
-static const gchar *_get_name (CamelFolder *folder, CamelException *ex);
-static const gchar *_get_full_name (CamelFolder *folder, CamelException *ex);
-static gboolean _can_hold_folders (CamelFolder *folder);
-static gboolean _can_hold_messages(CamelFolder *folder);
-static gboolean _exists (CamelFolder  *folder, CamelException *ex);
-static gboolean _is_open (CamelFolder *folder);
-static CamelFolder *_get_subfolder (CamelFolder *folder, const gchar *folder_name, CamelException *ex);
-static gboolean _create (CamelFolder *folder, CamelException *ex);
-static gboolean _delete (CamelFolder *folder, gboolean recurse, CamelException *ex);
-static gboolean _delete_messages (CamelFolder *folder, CamelException *ex);
-static CamelFolder *_get_parent_folder (CamelFolder *folder, CamelException *ex);
-static CamelStore *_get_parent_store (CamelFolder *folder, CamelException *ex);
-static CamelFolderOpenMode _get_mode (CamelFolder *folder, CamelException *ex);
-static GList *_list_subfolders (CamelFolder *folder, CamelException *ex);
-static GList *_expunge (CamelFolder *folder, CamelException *ex);
-static CamelMimeMessage *_get_message_by_number (CamelFolder *folder, gint number, CamelException *ex);
-static gint _get_message_count (CamelFolder *folder, CamelException *ex);
-static void _append_message (CamelFolder *folder, CamelMimeMessage *message, CamelException *ex);
-static const GList *_list_permanent_flags (CamelFolder *folder, CamelException *ex);
-static void _copy_message_to (CamelFolder *folder, CamelMimeMessage *message, CamelFolder *dest_folder, CamelException *ex);
-
-static const gchar *_get_message_uid (CamelFolder *folder, CamelMimeMessage *message, CamelException *ex);
-static CamelMimeMessage *_get_message_by_uid (CamelFolder *folder, const gchar *uid, CamelException *ex);
-static GList *_get_uid_list  (CamelFolder *folder, CamelException *ex);
-
-static void _finalize (GtkObject *object);
-
-
-static void
-camel_folder_pt_proxy_class_init (CamelFolderPtProxyClass *camel_folder_pt_proxy_class)
-{
-	GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (camel_folder_pt_proxy_class);
-	CamelFolderClass *camel_folder_class = CAMEL_FOLDER_CLASS (camel_folder_pt_proxy_class);
-	CamelFolderPtProxyClass *proxy_class = camel_folder_pt_proxy_class;
-
-	parent_class = gtk_type_class (camel_folder_get_type ());
-	
-	/* virtual method definition */
-	camel_folder_class->init = _init;
-	camel_folder_class->open = _open;
-	camel_folder_class->close = _close;
-#ifdef FOLDER_ASYNC_TEST
-	camel_folder_class->open_async = _open_async;
-	camel_folder_class->close_async = _close_async;
-#endif
-	camel_folder_class->get_name = _get_name;
-	camel_folder_class->can_hold_folders = _can_hold_folders;
- 	camel_folder_class->can_hold_messages = _can_hold_messages;
-	camel_folder_class->exists = _exists;
-	camel_folder_class->is_open = _is_open;
-	camel_folder_class->get_subfolder = _get_subfolder;
-	camel_folder_class->create = _create;
-	camel_folder_class->delete = _delete;
-	camel_folder_class->delete_messages = _delete_messages;
-	camel_folder_class->get_parent_folder = _get_parent_folder;
-	camel_folder_class->get_parent_store = _get_parent_store;
-	camel_folder_class->get_mode = _get_mode;
-	camel_folder_class->list_subfolders = _list_subfolders;
-	camel_folder_class->expunge = _expunge;
-	camel_folder_class->get_message_by_number = _get_message_by_number;
-	camel_folder_class->get_message_count = _get_message_count;
-	camel_folder_class->append_message = _append_message;
-	camel_folder_class->list_permanent_flags = _list_permanent_flags;
-	camel_folder_class->copy_message_to = _copy_message_to;
-	camel_folder_class->get_message_uid = _get_message_uid;
-	camel_folder_class->get_message_by_uid = _get_message_by_uid;
-	camel_folder_class->get_uid_list = _get_uid_list;
-
-	/* virtual method overload */
-	gtk_object_class->finalize = _finalize;
-
-	/* function definition for proxying */
-	proxy_class->open_func_def = 
-		camel_func_def_new (camel_marshal_NONE__POINTER_INT_POINTER_POINTER, 
-				    4, 
-				    GTK_TYPE_POINTER,
-				    GTK_TYPE_INT,
-				    GTK_TYPE_POINTER,
-				    GTK_TYPE_POINTER);
-	proxy_class->open_cb_def = 
-		camel_func_def_new (camel_marshal_NONE__POINTER_POINTER_POINTER, 
-				    3, 
-				    GTK_TYPE_POINTER,
-				    GTK_TYPE_POINTER,
-				    GTK_TYPE_POINTER);
-
-	proxy_class->close_func_def = 
-		camel_func_def_new (camel_marshal_NONE__POINTER_BOOL_POINTER_POINTER, 
-				    4, 
-				    GTK_TYPE_POINTER,
-				    GTK_TYPE_BOOL,
-				    GTK_TYPE_POINTER,
-				    GTK_TYPE_POINTER);
-	proxy_class->close_cb_def = 
-		camel_func_def_new (camel_marshal_NONE__POINTER_POINTER_POINTER, 
-				    3, 
-				    GTK_TYPE_POINTER,
-				    GTK_TYPE_POINTER,
-				    GTK_TYPE_POINTER);
-
-	proxy_class->set_name_func_def = 
-		camel_func_def_new (camel_marshal_NONE__POINTER_BOOL_POINTER_POINTER, 
-				    4, 
-				    GTK_TYPE_POINTER,
-				    GTK_TYPE_BOOL,
-				    GTK_TYPE_POINTER,
-				    GTK_TYPE_POINTER);
-	proxy_class->set_name_cb_def = 
-		camel_func_def_new (camel_marshal_NONE__POINTER_POINTER_POINTER, 
-				    3, 
-				    GTK_TYPE_POINTER,
-				    GTK_TYPE_POINTER,
-				    GTK_TYPE_POINTER);
-
-}
-
-
-
-
-static void
-camel_folder_pt_proxy_init (CamelFolderPtProxy *folder_pt_proxy)
-{
-	folder_pt_proxy->thread_ex = camel_exception_new ();	
-	folder_pt_proxy->pud = g_new (_ProxyCbUserData, 1);	
-}
-
-
-
-
-GtkType
-camel_folder_pt_proxy_get_type (void)
-{
-	static GtkType camel_folder_pt_proxy_type = 0;
-	
-	if (!camel_folder_pt_proxy_type)	{
-		GtkTypeInfo camel_folder_pt_proxy_info =	
-		{
-			"CamelFolderPtProxy",
-			sizeof (CamelFolderPtProxy),
-			sizeof (CamelFolderPtProxyClass),
-			(GtkClassInitFunc) camel_folder_pt_proxy_class_init,
-			(GtkObjectInitFunc) camel_folder_pt_proxy_init,
-				/* reserved_1 */ NULL,
-				/* reserved_2 */ NULL,
-			(GtkClassInitFunc) NULL,
-		};
-		
-		camel_folder_pt_proxy_type = gtk_type_unique (camel_folder_get_type (), &camel_folder_pt_proxy_info);
-	}
-	
-	return camel_folder_pt_proxy_type;
-}
-
-
-static void           
-_finalize (GtkObject *object)
-{
-	CamelFolder *camel_folder = CAMEL_FOLDER (object);
-	CamelFolderPtProxy *camel_folder_pt_proxy = CAMEL_FOLDER_PT_PROXY (camel_folder);
-
-	camel_exception_free (camel_folder_pt_proxy->thread_ex);
-	g_free (camel_folder_pt_proxy->pud);
-	GTK_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-
-
-
-
-
-/*********/
-
-/**** Operations implementation ****/
-
-
-
-static gpointer
-_proxy_cb_user_data (_ProxyCbUserData *pud,
-		     CamelFolderAsyncCallback real_callback, 
-		     CamelFolderPtProxy *proxy_folder, 
-		     CamelException *ex,
-		     gpointer real_user_data)
-{
-	pud->real_callback = real_callback;
-	pud->proxy_folder = proxy_folder;
-	pud->ex = ex;
-	pud->real_user_data = real_user_data;
-	return (gpointer)pud;
-}
-
-
-/* ******** */
-
-/* thread->init implementation */
-static void
-_init (CamelFolder *folder, CamelStore *parent_store, 
-       CamelFolder *parent_folder, const gchar *name,
-       gchar separator, CamelException *ex)
-{
-
-	parent_class->init (folder, parent_store, parent_folder,
-			    name, separator, ex);
-	if (ex->id != CAMEL_EXCEPTION_NONE)
-		return;
-#warning use proxy store here  
-	CF_CLASS (folder)->init (CAMEL_FOLDER_PT_PROXY (folder)->real_folder, 
-				 parent_store, parent_folder, name,
-				 separator, ex);
-}
-
-
-
-/* a little bit of explanation for the folder_class->open 
- * method implementation : 
- * 
- * the proxy object "open" method is called by the client 
- * program in the main thread. This method creates a 
- * CamelOp object containing all the necessary informations 
- * to call the corresponding "open" method on the real 
- * folder object in the child thread. This CamelOp object 
- * is thus pushed in a queue in the main thread (see the 
- * CamelThreadProxy structure for more details). 
- * The operations in this queue are executed one by one
- * in a child thread. 
- * Once the "open" method of the real object is finished, 
- * it calls a callback. This callback is not the one supplied
- * by the client object. Instead, the _folder_open_cb()
- * function is called (in the child thread) which pushes
- * the real callback function in another operation queue.
- * The real callback is then called in the main thread. 
- */
-
-/* folder->open implementation */
-
-/* 
- * proxy callback. Called in the child thread by the 
- * real folder "open" method when it is completed 
- */
-static void 
-_folder_open_cb (CamelFolder *folder,
-		 gpointer user_data,
-		 CamelException *ex)
-{
-	CamelOp *cb;
-	_ProxyCbUserData *pud;
-	CamelFuncDef *cb_def;
-
-	g_print ("%s: %s(): Bailing. This function is incredibly"
-		 " broken; the \"*pud\" pointer isn't allocated"
-		 " memory anywhere.\n");
-	return;
-	
-	/* transfer the exception information from "ex" to the 
-	 * client supplied exception (kept in pud->ex) */ 	 
-	camel_exception_xfer (pud->ex, ex);
-
-	/* create an operation which will call the real client
-	 * supplied callback in the main thread */
-	cb_def = CAMEL_FOLDER_PT_PROXY_CLASS(pud->proxy_folder)->open_cb_def;
-	cb = camel_marshal_create_op (cb_def,
-				      pud->real_callback, 
-				      pud->proxy_folder, 
-				      pud->real_user_data,
-				      pud->ex);
-	camel_thread_proxy_push_cb (pud->proxy_folder->proxy_object, cb);
-
-}
-
-static void
-_open_async (CamelFolder *folder, 
-	     CamelFolderOpenMode mode, 
-	     CamelFolderAsyncCallback callback, 
-	     gpointer user_data, 
-	     CamelException *ex)
-{
-	CamelFolderPtProxy *proxy_folder;
-	CamelOp *op;
-	CamelFuncDef *func_def;
-
-	proxy_folder = CAMEL_FOLDER_PT_PROXY (folder);
-	
-	/* create an operation corresponding to the "open"
-	 * method of the real object. The operation definition
-	 * is common to all instances of the CamelFolderPtProxy 
-	 * class so it is contained in the CamelFolderPtProxyClass
-	 * structure. */
-	func_def = CAMEL_FOLDER_PT_PROXY_CLASS(proxy_folder)->open_func_def;
-	if (callback)		
-		op = camel_marshal_create_op (func_def, 
-					      CAMEL_FOLDER_CLASS (proxy_folder->real_folder)->open_async,
-					      proxy_folder->real_folder,
-					      mode,
-					      _folder_open_cb,
-					      _proxy_cb_user_data (proxy_folder->pud, callback, proxy_folder, ex, user_data),
-					      proxy_folder->thread_ex);
-	else 
-		op = camel_marshal_create_op (func_def, 
-					      CAMEL_FOLDER_CLASS (proxy_folder->real_folder)->open_async,
-					      proxy_folder->real_folder,
-					      mode,
-					      NULL,
-					      NULL,
-					      NULL);
-	/* push the operation in the operation queue. This operation 
-	 * will be executed in a child thread but only one operation 
-	 * will be executed at a time, so that folder implementations
-	 * don't have to be MultiThread safe. */
-	camel_thread_proxy_push_op (proxy_folder->proxy_object, op);				      	
-}
-
-
-
-static void _open (CamelFolder *folder, 
-		   CamelFolderOpenMode mode, 
-		   CamelException *ex)
-{
-	CamelFolderPtProxy *proxy_folder;
-
-	proxy_folder = CAMEL_FOLDER_PT_PROXY (folder);
-	CF_CLASS (proxy_folder->real_folder)->
-		open (proxy_folder->real_folder, mode, ex);
-}
-
-
-
-/* folder->close implementation */
-
-static void 
-_folder_close_cb (CamelFolder *folder,
-		  gpointer user_data,
-		  CamelException *ex)
-{
-	CamelOp *cb;
-	_ProxyCbUserData *pud;
-	CamelFuncDef *cb_def;
-
-	g_print ("%s: %s(): Bailing. This function is incredibly"
-		 " broken; the \"*pud\" pointer isn't allocated"
-		 " memory anywhere.\n");
-	return;
-
-	camel_exception_xfer (pud->ex, ex);
-	cb_def = CAMEL_FOLDER_PT_PROXY_CLASS(pud->proxy_folder)->close_cb_def;
-	cb = camel_marshal_create_op (cb_def,
-				      pud->real_callback, 
-				      pud->proxy_folder, 
-				      pud->real_user_data,
-				      pud->ex);
-	camel_thread_proxy_push_cb (pud->proxy_folder->proxy_object, cb);
-
-}
-
-static void
-_close_async (CamelFolder *folder, 
-	      gboolean expunge, 
-	      CamelFolderAsyncCallback callback, 
-	      gpointer user_data, 
-	      CamelException *ex)
-{
-	CamelFolderPtProxy *proxy_folder;
-	CamelOp *op;
-	CamelFuncDef *func_def;
-
-	proxy_folder = CAMEL_FOLDER_PT_PROXY (folder);
-	
-	func_def = CAMEL_FOLDER_PT_PROXY_CLASS(proxy_folder)->close_func_def;
-	if (callback)		
-		op = camel_marshal_create_op (func_def, 
-					      CAMEL_FOLDER_CLASS (proxy_folder->real_folder)->close_async,
-					      proxy_folder->real_folder,
-					      expunge,
-					      _folder_close_cb,
-					      _proxy_cb_user_data (proxy_folder->pud, callback, proxy_folder, ex, user_data),
-					      proxy_folder->thread_ex);
-	else 
-		op = camel_marshal_create_op (func_def, 
-					      CAMEL_FOLDER_CLASS (proxy_folder->real_folder)->close_async,
-					      proxy_folder->real_folder,
-					      expunge,
-					      NULL,
-					      NULL,
-					      NULL);
-	camel_thread_proxy_push_op (proxy_folder->proxy_object, op);
-
-}
-
-
-static void _close (CamelFolder *folder, 
-		    gboolean expunge, 
-		    CamelException *ex)
-{
-	CamelFolderPtProxy *proxy_folder;
-
-	proxy_folder = CAMEL_FOLDER_PT_PROXY (folder);
-	CF_CLASS (proxy_folder->real_folder)->
-		close (proxy_folder->real_folder, expunge, ex);
-}
-
-
-/* folder->get_name implementation */
-/* this one is not executed in a thread */
-static const gchar *
-_get_name (CamelFolder *folder, CamelException *ex)
-{
-	CamelFolderPtProxy *proxy_folder;
-
-	proxy_folder = CAMEL_FOLDER_PT_PROXY (folder);
-	return CF_CLASS (proxy_folder->real_folder)->
-		get_name (proxy_folder->real_folder);
-}
-
-
-
-/* folder->get_full_name implementation */
-/* this one is not executed in a thread */
-
-static const gchar *
-_get_full_name (CamelFolder *folder, CamelException *ex)
-{
-	CamelFolderPtProxy *proxy_folder;
-
-	proxy_folder = CAMEL_FOLDER_PT_PROXY (folder);
-	return CF_CLASS (proxy_folder->real_folder)->
-		get_full_name (proxy_folder->real_folder);
-}
-
-
-
-
-static gboolean
-_can_hold_folders (CamelFolder *folder)
-{
-	CamelFolderPtProxy *proxy_folder;
-
-	proxy_folder = CAMEL_FOLDER_PT_PROXY (folder);
-	return CF_CLASS (proxy_folder->real_folder)->
-		can_hold_folders (proxy_folder->real_folder);
-}
-
-
-
-
-static gboolean
-_can_hold_messages (CamelFolder *folder)
-{
-	CamelFolderPtProxy *proxy_folder;
-
-	proxy_folder = CAMEL_FOLDER_PT_PROXY (folder);
-	return CF_CLASS (proxy_folder->real_folder)->
-		can_hold_messages (proxy_folder->real_folder);
-}
-
-
-
-static gboolean
-_exists (CamelFolder *folder, CamelException *ex)
-{
-	CamelFolderPtProxy *proxy_folder;
-
-	proxy_folder = CAMEL_FOLDER_PT_PROXY (folder);
-	return CF_CLASS (proxy_folder->real_folder)->
-		exists (proxy_folder->real_folder, ex);
-}
-
-
-
-
-static gboolean
-_is_open (CamelFolder *folder)
-{
-	CamelFolderPtProxy *proxy_folder;
-
-	proxy_folder = CAMEL_FOLDER_PT_PROXY (folder);
-	return CF_CLASS (proxy_folder->real_folder)->
-		is_open (proxy_folder->real_folder);
-} 
-
-
-
-
-
-static CamelFolder *
-_get_subfolder (CamelFolder *folder, const gchar *folder_name, CamelException *ex)
-{
-	CamelFolderPtProxy *proxy_folder;
-
-	proxy_folder = CAMEL_FOLDER_PT_PROXY (folder);
-	return CF_CLASS (proxy_folder->real_folder)->
-		get_subfolder (proxy_folder->real_folder, folder_name, ex);
-}
-
-
-
-
-
-
-static gboolean
-_create(CamelFolder *folder, CamelException *ex)
-{
-	CamelFolderPtProxy *proxy_folder;
-
-	proxy_folder = CAMEL_FOLDER_PT_PROXY (folder);
-	return CF_CLASS (proxy_folder->real_folder)->
-		create (proxy_folder->real_folder, ex);
-}
-
-
-
-
-
-
-
-
-static gboolean
-_delete (CamelFolder *folder, gboolean recurse, CamelException *ex)
-{
-	CamelFolderPtProxy *proxy_folder;
-
-	proxy_folder = CAMEL_FOLDER_PT_PROXY (folder);
-	return CF_CLASS (proxy_folder->real_folder)->
-		delete (proxy_folder->real_folder, recurse, ex);
-}
-
-
-
-
-
-
-
-static gboolean 
-_delete_messages (CamelFolder *folder, CamelException *ex)
-{
-	CamelFolderPtProxy *proxy_folder;
-
-	proxy_folder = CAMEL_FOLDER_PT_PROXY (folder);
-	return CF_CLASS (proxy_folder->real_folder)->
-		delete_messages (proxy_folder->real_folder, ex);
-}
-
-
-
-
-
-
-static CamelFolder *
-_get_parent_folder (CamelFolder *folder, CamelException *ex)
-{
-	CamelFolderPtProxy *proxy_folder;
-#warning return proxy parent folder if any
-	proxy_folder = CAMEL_FOLDER_PT_PROXY (folder);
-	return CF_CLASS (proxy_folder->real_folder)->
-		get_parent_folder (proxy_folder->real_folder, ex);
-}
-
-
-
-
-
-static CamelStore *
-_get_parent_store (CamelFolder *folder, CamelException *ex)
-{
-	CamelFolderPtProxy *proxy_folder;
-
-	proxy_folder = CAMEL_FOLDER_PT_PROXY (folder);
-	return CF_CLASS (proxy_folder->real_folder)->
-		get_parent_store (proxy_folder->real_folder, ex);
-}
-
-
-
-
-static CamelFolderOpenMode
-_get_mode (CamelFolder *folder, CamelException *ex)
-{
-	CamelFolderPtProxy *proxy_folder;
-
-	proxy_folder = CAMEL_FOLDER_PT_PROXY (folder);
-	return CF_CLASS (proxy_folder->real_folder)->
-		get_mode (proxy_folder->real_folder, ex);
-}
-
-
-
-
-static GList *
-_list_subfolders (CamelFolder *folder, CamelException *ex)
-{
-	CamelFolderPtProxy *proxy_folder;
-
-	proxy_folder = CAMEL_FOLDER_PT_PROXY (folder);
-	return CF_CLASS (proxy_folder->real_folder)->
-		list_subfolders (proxy_folder->real_folder, ex);
-}
-
-
-
-
-static GList *
-_expunge (CamelFolder *folder, CamelException *ex)
-{
-	CamelFolderPtProxy *proxy_folder;
-
-	proxy_folder = CAMEL_FOLDER_PT_PROXY (folder);
-	return CF_CLASS (proxy_folder->real_folder)->
-		expunge (proxy_folder->real_folder, ex);
-}
-
-
-
-
-static CamelMimeMessage *
-_get_message_by_number (CamelFolder *folder, gint number, CamelException *ex)
-{
-	CamelFolderPtProxy *proxy_folder;
-
-	proxy_folder = CAMEL_FOLDER_PT_PROXY (folder);
-	return CF_CLASS (proxy_folder->real_folder)->
-		get_message_by_number (proxy_folder->real_folder, number, ex);
-}
-
-
-
-
-
-static gint
-_get_message_count (CamelFolder *folder, CamelException *ex)
-{
-	CamelFolderPtProxy *proxy_folder;
-
-	proxy_folder = CAMEL_FOLDER_PT_PROXY (folder);
-	return CF_CLASS (proxy_folder->real_folder)->
-		get_message_count (proxy_folder->real_folder, ex);
-}
-
-
-
-
-static void
-_append_message (CamelFolder *folder, CamelMimeMessage *message, CamelException *ex)
-{
-	CamelFolderPtProxy *proxy_folder;
-
-	proxy_folder = CAMEL_FOLDER_PT_PROXY (folder);
-	CF_CLASS (proxy_folder->real_folder)->
-		append_message (proxy_folder->real_folder, message, ex);
-}
-
-
-
-static const GList *
-_list_permanent_flags (CamelFolder *folder, CamelException *ex)
-{
-	CamelFolderPtProxy *proxy_folder;
-
-	proxy_folder = CAMEL_FOLDER_PT_PROXY (folder);
-	return CF_CLASS (proxy_folder->real_folder)->
-		list_permanent_flags (proxy_folder->real_folder, ex);
-}
-
-
-
-static void
-_copy_message_to (CamelFolder *folder, CamelMimeMessage *message, CamelFolder *dest_folder, CamelException *ex)
-{
-	CamelFolderPtProxy *proxy_folder;
-
-	proxy_folder = CAMEL_FOLDER_PT_PROXY (folder);
-	CF_CLASS (proxy_folder->real_folder)->
-		copy_message_to (proxy_folder->real_folder, message, dest_folder, ex);
-}
-
-
-
-
-
-
-/* UIDs stuff */
-
-
-static const gchar *
-_get_message_uid (CamelFolder *folder, CamelMimeMessage *message, CamelException *ex)
-{
-	CamelFolderPtProxy *proxy_folder;
-
-	proxy_folder = CAMEL_FOLDER_PT_PROXY (folder);
-	return CF_CLASS (proxy_folder->real_folder)->
-		get_message_uid (proxy_folder->real_folder, message, ex);
-}
-
-
-/* the next two func are left there temporarily */
-#if 0
-static const gchar *
-_get_message_uid_by_number (CamelFolder *folder, gint message_number, CamelException *ex)
-{
-	CamelFolderPtProxy *proxy_folder;
-
-	proxy_folder = CAMEL_FOLDER_PT_PROXY (folder);
-	return CF_CLASS (proxy_folder->real_folder)->
-		get_message_uid_by_number (proxy_folder->real_folder, message_number, ex);
-}
-
-#endif
-
-static CamelMimeMessage *
-_get_message_by_uid (CamelFolder *folder, const gchar *uid, CamelException *ex)
-{
-	CamelFolderPtProxy *proxy_folder;
-
-	proxy_folder = CAMEL_FOLDER_PT_PROXY (folder);
-	return CF_CLASS (proxy_folder->real_folder)->
-		get_message_by_uid (proxy_folder->real_folder, uid, ex);
-}
-
-
-static GList *
-_get_uid_list  (CamelFolder *folder, CamelException *ex)
-{
-	CamelFolderPtProxy *proxy_folder;
-
-	proxy_folder = CAMEL_FOLDER_PT_PROXY (folder);
-	return CF_CLASS (proxy_folder->real_folder)->
-		get_uid_list (proxy_folder->real_folder, ex);
-}
-
-
-/* **** */
-
-
-
-
-
diff --git a/camel/camel-folder-pt-proxy.h b/camel/camel-folder-pt-proxy.h
deleted file mode 100644
index 7422786170..0000000000
--- a/camel/camel-folder-pt-proxy.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-folder-pt-proxy.h : proxy folder using posix threads */
-
-/* 
- *
- * Author : 
- *  Bertrand Guiheneuf 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-
-
-
-#ifndef CAMEL_FOLDER_PT_PROXY_H
-#define CAMEL_FOLDER_PT_PROXY_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include 
-#include 
-#include 
-
-
-#define CAMEL_FOLDER_PT_PROXY_TYPE     (camel_folder_pt_proxy_get_type ())
-#define CAMEL_FOLDER_PT_PROXY(obj)     (GTK_CHECK_CAST((obj), CAMEL_FOLDER_PT_PROXY_TYPE, CamelFolderPtProxy))
-#define CAMEL_FOLDER_PT_PROXY_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_FOLDER_PT_PROXY_TYPE, CamelFolderPtProxyClass))
-#define CAMEL_IS_FOLDER_PT_PROXY(o)    (GTK_CHECK_TYPE((o), CAMEL_FOLDER_PT_PROXY_TYPE))
-
-typedef struct _CamelFolderPtProxy CamelFolderPtProxy;
-
-typedef struct {
-	CamelFolderAsyncCallback real_callback;
-	CamelFolderPtProxy *proxy_folder;
-	CamelException *ex;
-	gpointer real_user_data;
-} _ProxyCbUserData;
-
-struct _CamelFolderPtProxy {
-	CamelFolder parent;
-	
-	/* private fields */ 
-	CamelFolder *real_folder;
-	CamelThreadProxy *proxy_object;
-	CamelException *thread_ex;
-	_ProxyCbUserData *pud;
-	
-};
-
-
-
-typedef struct {
-	CamelFolderClass parent_class;
-	
-	/* functions and callbacks definition (for marshalling) */
-	CamelFuncDef *open_func_def;
-	CamelFuncDef *open_cb_def;
-	CamelFuncDef *close_func_def;
-	CamelFuncDef *close_cb_def;
-	CamelFuncDef *set_name_func_def;
-	CamelFuncDef *set_name_cb_def;
-
-} CamelFolderPtProxyClass;
-
-
-GtkType       camel_folder_pt_proxy_get_type         (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_FOLDER_PT_PROXY_H */
diff --git a/camel/camel-folder-search.c b/camel/camel-folder-search.c
deleted file mode 100644
index fa07fc819f..0000000000
--- a/camel/camel-folder-search.c
+++ /dev/null
@@ -1,496 +0,0 @@
-/*
- *  Copyright (C) 2000 Helix Code Inc.
- *
- *  Authors: Michael Zucchi 
- *
- *  This program is free software; you can redistribute it and/or 
- *  modify it under the terms of the GNU General Public License as 
- *  published by the Free Software Foundation; either version 2 of the
- *  License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- *  USA
- */
-
-/* This is a helper class for folders to implement the search function.
-   It implements enough to do basic searches on folders that can provide
-   an in-memory summary and a body index. */
-
-#include 
-#include 
-#include 
-
-#include "camel-folder-search.h"
-
-#define d(x)
-#define r(x)
-
-struct _CamelFolderSearchPrivate {
-};
-
-#define _PRIVATE(o) (((CamelFolderSearch *)(o))->priv)
-
-static ESExpResult *search_header_contains(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *search);
-static ESExpResult *search_match_all(struct _ESExp *f, int argc, struct _ESExpTerm **argv, CamelFolderSearch *search);
-static ESExpResult *search_body_contains(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *search);
-static ESExpResult *search_user_flag(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s);
-
-static ESExpResult *search_dummy(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *search);
-
-static void camel_folder_search_class_init (CamelFolderSearchClass *klass);
-static void camel_folder_search_init       (CamelFolderSearch *obj);
-static void camel_folder_search_finalise   (GtkObject *obj);
-
-static CamelObjectClass *camel_folder_search_parent;
-
-enum SIGNALS {
-	LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-guint
-camel_folder_search_get_type (void)
-{
-	static guint type = 0;
-	
-	if (!type) {
-		GtkTypeInfo type_info = {
-			"CamelFolderSearch",
-			sizeof (CamelFolderSearch),
-			sizeof (CamelFolderSearchClass),
-			(GtkClassInitFunc) camel_folder_search_class_init,
-			(GtkObjectInitFunc) camel_folder_search_init,
-			(GtkArgSetFunc) NULL,
-			(GtkArgGetFunc) NULL
-		};
-		
-		type = gtk_type_unique (camel_object_get_type (), &type_info);
-	}
-	
-	return type;
-}
-
-static void
-camel_folder_search_class_init (CamelFolderSearchClass *klass)
-{
-	GtkObjectClass *object_class = (GtkObjectClass *) klass;
-	
-	camel_folder_search_parent = gtk_type_class (camel_object_get_type ());
-
-	object_class->finalize = camel_folder_search_finalise;
-
-	klass->match_all = search_match_all;
-	klass->body_contains = search_body_contains;
-	klass->header_contains = search_header_contains;
-	klass->user_flag = search_user_flag;
-
-	gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
-}
-
-static void
-camel_folder_search_init (CamelFolderSearch *obj)
-{
-	struct _CamelFolderSearchPrivate *p;
-
-	p = _PRIVATE(obj) = g_malloc0(sizeof(*p));
-
-	obj->sexp = e_sexp_new();
-}
-
-static void
-camel_folder_search_finalise (GtkObject *obj)
-{
-	CamelFolderSearch *search = (CamelFolderSearch *)obj;
-	if (search->sexp)
-		gtk_object_unref((GtkObject *)search->sexp);
-
-	g_free(search->last_search);
-
-	((GtkObjectClass *)(camel_folder_search_parent))->finalize((GtkObject *)obj);
-}
-
-struct {
-	char *name;
-	int offset;
-	int flags;		/* 0x02 = immediate, 0x01 = always enter */
-} builtins[] = {
-	/* these have default implementations in e-sexp */
-	{ "and", GTK_STRUCT_OFFSET(CamelFolderSearchClass, and), 2 },
-	{ "or", GTK_STRUCT_OFFSET(CamelFolderSearchClass, or), 2 },
-	{ "not", GTK_STRUCT_OFFSET(CamelFolderSearchClass, not), 2 },
-	{ "<", GTK_STRUCT_OFFSET(CamelFolderSearchClass, lt), 2 },
-	{ ">", GTK_STRUCT_OFFSET(CamelFolderSearchClass, gt), 2 },
-	{ "=", GTK_STRUCT_OFFSET(CamelFolderSearchClass, eq), 2 },
-
-	/* these we have to use our own default if there is none */
-	/* they should all be defined in the language? so it poarses, or should they not?? */
-	{ "match-all", GTK_STRUCT_OFFSET(CamelFolderSearchClass, match_all), 3 },
-	{ "body-contains", GTK_STRUCT_OFFSET(CamelFolderSearchClass, body_contains), 1 },
-	{ "header-contains", GTK_STRUCT_OFFSET(CamelFolderSearchClass, header_contains), 1 },
-	{ "user-flag", GTK_STRUCT_OFFSET(CamelFolderSearchClass, user_flag), 1 },
-};
-
-void
-camel_folder_search_construct (CamelFolderSearch *search)
-{
-	int i;
-	CamelFolderSearchClass *klass = (CamelFolderSearchClass *)GTK_OBJECT(search)->klass;
-
-	for (i=0;iklass->type));
-			func = (void *)search_dummy;
-		}
-		if (func != NULL) {
-			if (builtins[i].flags&2) {
-				e_sexp_add_ifunction(search->sexp, 0, builtins[i].name, (ESExpIFunc *)func, search);
-			} else {
-				e_sexp_add_function(search->sexp, 0, builtins[i].name, (ESExpFunc *)func, search);
-			}
-		}
-	}
-}
-
-/**
- * camel_folder_search_new:
- *
- * Create a new CamelFolderSearch object.
- * 
- * A CamelFolderSearch is a subclassable, extensible s-exp
- * evaluator which enforces a particular set of s-expressions.
- * Particular methods may be overriden by an implementation to
- * implement a search for any sort of backend.
- *
- * Return value: A new CamelFolderSearch widget.
- **/
-CamelFolderSearch *
-camel_folder_search_new (void)
-{
-	CamelFolderSearch *new = CAMEL_FOLDER_SEARCH ( gtk_type_new (camel_folder_search_get_type ()));
-
-	camel_folder_search_construct(new);
-	return new;
-}
-
-/**
- * camel_folder_search_set_folder:
- * @search:
- * @folder: A folder.
- * 
- * Set the folder attribute of the search.  This is currently unused, but
- * could be used to perform a slow-search when indexes and so forth are not
- * available.  Or for use by subclasses.
- **/
-void
-camel_folder_search_set_folder(CamelFolderSearch *search, CamelFolder *folder)
-{
-	search->folder = folder;
-}
-
-/**
- * camel_folder_search_set_summary:
- * @search: 
- * @summary: An array of CamelMessageInfo pointers.
- * 
- * Set the array of summary objects representing the span of the search.
- *
- * If this is not set, then a subclass must provide the functions
- * for searching headers and for the match-all operator.
- **/
-void
-camel_folder_search_set_summary(CamelFolderSearch *search, GPtrArray *summary)
-{
-	search->summary = summary;
-}
-
-/**
- * camel_folder_search_set_body_index:
- * @search: 
- * @index: 
- * 
- * Set the index (ibex) representing the contents of all messages
- * in this folder.  If this is not set, then the folder implementation
- * should sub-class the CamelFolderSearch and provide its own
- * body-contains function.
- **/
-void
-camel_folder_search_set_body_index(CamelFolderSearch *search, ibex *index)
-{
-	search->body_index = index;
-}
-
-/**
- * camel_folder_search_execute_expression:
- * @search: 
- * @expr: 
- * @ex: 
- * 
- * Execute the search expression @expr, returning a list of
- * all matches as a GList of uid's of matching messages.
- *
- * Note that any settings such as set_body_index(), set_folder(),
- * and so on are reset to #NULL once the search has completed.
- *
- * TODO: The interface should probably return a GPtrArray
- * of summary items instead (since they are much more useful
- * to any client).
- * 
- * Return value: A GList of strings of all matching messages.  Once
- * finished with this, the array AND CONTENTS should be free'd
- * by the caller.
- **/
-GList *
-camel_folder_search_execute_expression(CamelFolderSearch *search, const char *expr, CamelException *ex)
-{
-	ESExpResult *r;
-	GList *matches = NULL;
-	int i;
-
-	/* only re-parse if the search has changed */
-	if (search->last_search == NULL
-	    || strcmp(search->last_search, expr)) {
-		e_sexp_input_text(search->sexp, expr, strlen(expr));
-		e_sexp_parse(search->sexp);
-		g_free(search->last_search);
-		search->last_search = g_strdup(expr);
-	}
-	r = e_sexp_eval(search->sexp);
-
-	/* now create a folder summary to return?? */
-	if (r
-	    && r->type == ESEXP_RES_ARRAY_PTR) {
-		d(printf("got result ...\n"));
-		for (i=0;ivalue.ptrarray->len;i++) {
-			d(printf("adding match: %s\n", (char *)g_ptr_array_index(r->value.ptrarray, i)));
-			matches = g_list_prepend(matches, g_strdup(g_ptr_array_index(r->value.ptrarray, i)));
-		}
-		e_sexp_result_free(r);
-	} else {
-		printf("no result!\n");
-	}
-
-	search->folder = NULL;
-	search->summary = NULL;
-	search->current = NULL;
-	search->body_index = NULL;
-
-	return matches;
-}
-
-/* dummy function, returns false always, or an empty match array */
-static ESExpResult *
-search_dummy(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *search)
-{
-	ESExpResult *r;
-
-	if (search->current == NULL) {
-		r = e_sexp_result_new(ESEXP_RES_BOOL);
-		r->value.bool = FALSE;
-	} else {
-		r = e_sexp_result_new(ESEXP_RES_ARRAY_PTR);
-		r->value.ptrarray = g_ptr_array_new();
-	}
-
-	return r;
-}
-
-static ESExpResult *
-search_match_all(struct _ESExp *f, int argc, struct _ESExpTerm **argv, CamelFolderSearch *search)
-{
-	int i;
-	ESExpResult *r, *r1;
-
-	if (argc>1) {
-		g_warning("match-all only takes a single argument, other arguments ignored");
-	}
-	r = e_sexp_result_new(ESEXP_RES_ARRAY_PTR);
-	r->value.ptrarray = g_ptr_array_new();
-
-	if (search->summary == NULL) {
-		/* TODO: make it work - e.g. use the folder and so forth for a slower search */
-		g_warning("No summary supplied, match-all doesn't work with no summary");
-		return r;
-	}
-
-	/* TODO: Could make this a bit faster in the uncommon case (of match-everything) */
-	for (i=0;isummary->len;i++) {
-		search->current = g_ptr_array_index(search->summary, i);
-		if (argc>0) {
-			r1 = e_sexp_term_eval(f, argv[0]);
-			if (r1->type == ESEXP_RES_BOOL) {
-				if (r1->value.bool)
-					g_ptr_array_add(r->value.ptrarray, search->current->uid);
-			} else {
-				g_warning("invalid syntax, matches require a single bool result");
-			}
-			e_sexp_result_free(r1);
-		} else {
-			g_ptr_array_add(r->value.ptrarray, search->current->uid);
-		}
-	}
-	search->current = NULL;
-
-	return r;
-}
-
-static ESExpResult *
-search_header_contains(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *search)
-{
-	ESExpResult *r;
-	int truth = FALSE;
-
-	r(printf("executing header-contains\n"));
-
-	/* are we inside a match-all? */
-	if (search->current && argc>1
-	    && argv[0]->type == ESEXP_RES_STRING) {
-		char *headername, *header = NULL;
-		char strbuf[32];
-		int i;
-
-		/* only a subset of headers are supported .. */
-		headername = argv[0]->value.string;
-		if (!strcasecmp(headername, "subject")) {
-			header = search->current->subject;
-		} else if (!strcasecmp(headername, "date")) {
-			/* FIXME: not a very useful form of the date */
-			sprintf(strbuf, "%d", (int)search->current->date_sent);
-			header = strbuf;
-		} else if (!strcasecmp(headername, "from")) {
-			header = search->current->from;
-		} else if (!strcasecmp(headername, "to")) {
-			header = search->current->from;
-		} else {
-			g_warning("Performing query on unknown header: %s", headername);
-		}
-
-		if (header) {
-			/* performs an OR of all words */
-			for (i=1;itype == ESEXP_RES_STRING
-				    && strstr(header, argv[i]->value.string)) {
-					r(printf("%s got a match with %s of %s\n", search->current->uid, header, argv[i]->value.string));
-					truth = TRUE;
-					break;
-				}
-			}
-		}
-	}
-	/* TODO: else, find all matches */
-
-	r = e_sexp_result_new(ESEXP_RES_BOOL);
-	r->value.bool = truth;
-
-	return r;
-}
-
-/* this is just to OR results together */
-struct _glib_sux_donkeys {
-	int count;
-	GPtrArray *uids;
-};
-
-/* or, store all unique values */
-static void
-g_lib_sux_htor(char *key, int value, struct _glib_sux_donkeys *fuckup)
-{
-	g_ptr_array_add(fuckup->uids, key);
-}
-
-static ESExpResult *
-search_body_contains(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *search)
-{
-	ESExpResult *r;
-	int i, j;
-
-	if (search->current) {
-		int truth = FALSE;
-
-		r = e_sexp_result_new(ESEXP_RES_BOOL);
-		if (search->body_index) {
-			for (i=0;itype == ESEXP_RES_STRING) {
-					truth = ibex_find_name(search->body_index, search->current->uid, argv[i]->value.string);
-				} else {
-					g_warning("Invalid type passed to body-contains match function");
-				}
-			}
-		} else {
-			g_warning("Cannot perform indexed body query with no index");
-		}
-		r->value.bool = truth;
-	} else {
-		r = e_sexp_result_new(ESEXP_RES_ARRAY_PTR);
-
-		if (search->body_index) {
-			if (argc==1) {
-				/* common case */
-				r->value.ptrarray = ibex_find(search->body_index, argv[0]->value.string);
-			} else {
-				GHashTable *ht = g_hash_table_new(g_str_hash, g_str_equal);
-				GPtrArray *pa;
-				struct _glib_sux_donkeys lambdafoo;
-
-				/* this sux, perform an or operation on the result(s) of each word */
-				for (i=0;itype == ESEXP_RES_STRING) {
-						pa = ibex_find(search->body_index, argv[i]->value.string);
-						for (j=0;jlen;j++) {
-							g_hash_table_insert(ht, g_ptr_array_index(pa, j), (void *)1);
-						}
-						g_ptr_array_free(pa, FALSE);
-					} else {
-						g_warning("invalid type passed to body-contains");
-					}
-				}
-				lambdafoo.uids = g_ptr_array_new();
-				g_hash_table_foreach(ht, (GHFunc)g_lib_sux_htor, &lambdafoo);
-				r->value.ptrarray = lambdafoo.uids;
-				g_hash_table_destroy(ht);
-			}
-		} else {
-			r->value.ptrarray = g_ptr_array_new();
-		}
-	}
-
-	return r;
-}
-
-static ESExpResult *search_user_flag(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *search)
-{
-	ESExpResult *r;
-	int i;
-
-	r(printf("executing user-flag\n"));
-
-	/* are we inside a match-all? */
-	if (search->current) {
-		int truth = FALSE;
-		/* performs an OR of all words */
-		for (i=0;itype == ESEXP_RES_STRING
-			    && camel_flag_get(&search->current->user_flags, argv[i]->value.string)) {
-				truth = TRUE;
-				break;
-			}
-		}
-		r = e_sexp_result_new(ESEXP_RES_BOOL);
-		r->value.bool = truth;
-	} else {
-		r = e_sexp_result_new(ESEXP_RES_ARRAY_PTR);
-		r->value.ptrarray = g_ptr_array_new();
-	}
-
-	return r;
-}
diff --git a/camel/camel-folder-search.h b/camel/camel-folder-search.h
deleted file mode 100644
index 87493912f8..0000000000
--- a/camel/camel-folder-search.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- *  Copyright (C) 2000 Helix Code Inc.
- *
- *  Authors: Michael Zucchi 
- *
- *  This program is free software; you can redistribute it and/or 
- *  modify it under the terms of the GNU General Public License as 
- *  published by the Free Software Foundation; either version 2 of the
- *  License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- *  USA
- */
-
-#ifndef _CAMEL_FOLDER_SEARCH_H
-#define _CAMEL_FOLDER_SEARCH_H
-
-#include 
-#include 
-#include 
-#include 
-
-#define CAMEL_FOLDER_SEARCH(obj)         GTK_CHECK_CAST (obj, camel_folder_search_get_type (), CamelFolderSearch)
-#define CAMEL_FOLDER_SEARCH_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, camel_folder_search_get_type (), CamelFolderSearchClass)
-#define IS_CAMEL_FOLDER_SEARCH(obj)      GTK_CHECK_TYPE (obj, camel_folder_search_get_type ())
-
-typedef struct _CamelFolderSearchClass CamelFolderSearchClass;
-
-struct _CamelFolderSearch {
-	CamelObject parent;
-
-	struct _CamelFolderSearchPrivate *priv;
-
-	ESExp *sexp;		/* s-exp evaluator */
-	char *last_search;	/* last searched expression */
-
-	/* these are only valid during the search, and are reset afterwards */
-	CamelFolder *folder;	/* folder for current search */
-	GPtrArray *summary;	/* summary array for current search */
-	CamelMessageInfo *current; /* current message info, when searching one by one */
-	ibex *body_index;
-};
-
-struct _CamelFolderSearchClass {
-	CamelObjectClass parent_class;
-
-	/* general bool/comparison options, usually these wont need to be set, unless it is compiling into another language */
-	ESExpResult * (*and)(struct _ESExp *f, int argc, struct _ESExpTerm **argv, CamelFolderSearch *s);
-	ESExpResult * (*or)(struct _ESExp *f, int argc, struct _ESExpTerm **argv, CamelFolderSearch *s);
-	ESExpResult * (*not)(struct _ESExp *f, int argc, struct _ESExpTerm **argv, CamelFolderSearch *s);
-	ESExpResult * (*lt)(struct _ESExp *f, int argc, struct _ESExpTerm **argv, CamelFolderSearch *s);
-	ESExpResult * (*gt)(struct _ESExp *f, int argc, struct _ESExpTerm **argv, CamelFolderSearch *s);
-	ESExpResult * (*eq)(struct _ESExp *f, int argc, struct _ESExpTerm **argv, CamelFolderSearch *s);
-
-	/* search options */
-	/* (match-all [boolean expression]) Apply match to all messages */
-	ESExpResult * (*match_all)(struct _ESExp *f, int argc, struct _ESExpTerm **argv, CamelFolderSearch *s);
-
-	/* (body-contains "string1" "string2" ...) Returns a list of matches, or true if in single-message mode */
-	ESExpResult * (*body_contains)(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s);
-
-	/* (header-contains "headername" "string1" ...) List of matches, or true if in single-message mode */
-	ESExpResult * (*header_contains)(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s);
-
-	/* (user-flag "flagname" "flagname" ...) If one of user-flag set */
-	ESExpResult * (*user_flag)(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s);
-};
-
-guint		camel_folder_search_get_type	(void);
-CamelFolderSearch      *camel_folder_search_new	(void);
-void camel_folder_search_construct (CamelFolderSearch *search);
-
-void camel_folder_search_set_folder(CamelFolderSearch *search, CamelFolder *folder);
-void camel_folder_search_set_summary(CamelFolderSearch *search, GPtrArray *summary);
-void camel_folder_search_set_body_index(CamelFolderSearch *search, ibex *index);
-GList *camel_folder_search_execute_expression(CamelFolderSearch *search, const char *expr, CamelException *ex);
-
-#endif /* ! _CAMEL_FOLDER_SEARCH_H */
diff --git a/camel/camel-folder-summary.c b/camel/camel-folder-summary.c
deleted file mode 100644
index 9e3b478236..0000000000
--- a/camel/camel-folder-summary.c
+++ /dev/null
@@ -1,1410 +0,0 @@
-/*
- *  Copyright (C) 2000 Helix Code Inc.
- *
- *  Authors: Michael Zucchi 
- *
- *  This program is free software; you can redistribute it and/or 
- *  modify it under the terms of the GNU General Public License as 
- *  published by the Free Software Foundation; either version 2 of the
- *  License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- *  USA
- */
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include "camel-folder-summary.h"
-
-#include 
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include "hash-table-utils.h"
-
-/* this should probably be conditional on it existing */
-#define USE_BSEARCH
-
-#define d(x)
-#define io(x)			/* io debug */
-
-#if 0
-extern int strdup_count, malloc_count, free_count;
-#endif
-
-#define CAMEL_FOLDER_SUMMARY_VERSION (4)
-
-struct _CamelFolderSummaryPrivate {
-	GHashTable *filter_charset;	/* CamelMimeFilterCharset's indexed by source charset */
-
-	CamelMimeFilterIndex *filter_index;
-	CamelMimeFilterBasic *filter_64;
-	CamelMimeFilterBasic *filter_qp;
-	CamelMimeFilterSave *filter_save;
-
-	ibex *index;
-};
-
-#define _PRIVATE(o) (((CamelFolderSummary *)(o))->priv)
-
-/* trivial lists, just because ... */
-struct _node {
-	struct _node *next;
-};
-
-static struct _node *my_list_append(struct _node **list, struct _node *n);
-static int my_list_size(struct _node **list);
-
-static int summary_header_load(CamelFolderSummary *, FILE *);
-static int summary_header_save(CamelFolderSummary *, FILE *);
-
-static CamelMessageInfo * message_info_new(CamelFolderSummary *, struct _header_raw *);
-static CamelMessageInfo * message_info_new_from_parser(CamelFolderSummary *, CamelMimeParser *);
-static CamelMessageInfo * message_info_load(CamelFolderSummary *, FILE *);
-static int		  message_info_save(CamelFolderSummary *, FILE *, CamelMessageInfo *);
-static void		  message_info_free(CamelFolderSummary *, CamelMessageInfo *);
-
-static CamelMessageContentInfo * content_info_new(CamelFolderSummary *, struct _header_raw *);
-static CamelMessageContentInfo * content_info_new_from_parser(CamelFolderSummary *, CamelMimeParser *);
-static CamelMessageContentInfo * content_info_load(CamelFolderSummary *, FILE *);
-static int		         content_info_save(CamelFolderSummary *, FILE *, CamelMessageContentInfo *);
-static void		         content_info_free(CamelFolderSummary *, CamelMessageContentInfo *);
-
-static CamelMessageContentInfo * summary_build_content_info(CamelFolderSummary *s, CamelMimeParser *mp);
-
-static void camel_folder_summary_class_init (CamelFolderSummaryClass *klass);
-static void camel_folder_summary_init       (CamelFolderSummary *obj);
-static void camel_folder_summary_finalise   (GtkObject *obj);
-
-static CamelObjectClass *camel_folder_summary_parent;
-
-enum SIGNALS {
-	LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-guint
-camel_folder_summary_get_type (void)
-{
-	static guint type = 0;
-	
-	if (!type) {
-		GtkTypeInfo type_info = {
-			"CamelFolderSummary",
-			sizeof (CamelFolderSummary),
-			sizeof (CamelFolderSummaryClass),
-			(GtkClassInitFunc) camel_folder_summary_class_init,
-			(GtkObjectInitFunc) camel_folder_summary_init,
-			(GtkArgSetFunc) NULL,
-			(GtkArgGetFunc) NULL
-		};
-		
-		type = gtk_type_unique (camel_object_get_type (), &type_info);
-	}
-	
-	return type;
-}
-
-static void
-camel_folder_summary_class_init (CamelFolderSummaryClass *klass)
-{
-	GtkObjectClass *object_class = (GtkObjectClass *) klass;
-	
-	camel_folder_summary_parent = gtk_type_class (camel_object_get_type ());
-
-	object_class->finalize = camel_folder_summary_finalise;
-
-	klass->summary_header_load = summary_header_load;
-	klass->summary_header_save = summary_header_save;
-
-	klass->message_info_new  = message_info_new;
-	klass->message_info_new_from_parser = message_info_new_from_parser;
-	klass->message_info_load = message_info_load;
-	klass->message_info_save = message_info_save;
-	klass->message_info_free = message_info_free;
-
-	klass->content_info_new  = content_info_new;
-	klass->content_info_new_from_parser = content_info_new_from_parser;
-	klass->content_info_load = content_info_load;
-	klass->content_info_save = content_info_save;
-	klass->content_info_free = content_info_free;
-
-	gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
-}
-
-static void
-camel_folder_summary_init (CamelFolderSummary *s)
-{
-	struct _CamelFolderSummaryPrivate *p;
-
-	p = _PRIVATE(s) = g_malloc0(sizeof(*p));
-
-	p->filter_charset = g_hash_table_new(g_strcase_hash, g_strcase_equal);
-
-	s->message_info_size = sizeof(CamelMessageInfo);
-	s->content_info_size = sizeof(CamelMessageContentInfo);
-
-	s->version = CAMEL_FOLDER_SUMMARY_VERSION;
-	s->flags = 0;
-	s->time = 0;
-	s->nextuid = 1;
-
-	s->messages = g_ptr_array_new();
-	s->messages_uid = g_hash_table_new(g_str_hash, g_str_equal);
-}
-
-static void free_o_name(void *key, void *value, void *data)
-{
-	gtk_object_unref((GtkObject *)value);
-	g_free(key);
-}
-
-static void
-camel_folder_summary_finalise (GtkObject *obj)
-{
-	struct _CamelFolderSummaryPrivate *p;
-	CamelFolderSummary *s = (CamelFolderSummary *)obj;
-
-	p = _PRIVATE(obj);
-
-	camel_folder_summary_clear(s);
-	g_ptr_array_free(s->messages, TRUE);
-	g_hash_table_destroy(s->messages_uid);
-
-	g_hash_table_foreach(p->filter_charset, free_o_name, 0);
-	g_hash_table_destroy(p->filter_charset);
-
-	g_free(s->summary_path);
-
-	if (p->filter_index)
-		gtk_object_unref ((GtkObject *)p->filter_index);
-	if (p->filter_64)
-		gtk_object_unref ((GtkObject *)p->filter_64);
-	if (p->filter_qp)
-		gtk_object_unref ((GtkObject *)p->filter_qp);
-	if (p->filter_save)
-		gtk_object_unref ((GtkObject *)p->filter_save);
-
-	g_free(p);
-
-	((GtkObjectClass *)(camel_folder_summary_parent))->finalize((GtkObject *)obj);
-}
-
-/**
- * camel_folder_summary_new:
- *
- * Create a new CamelFolderSummary object.
- * 
- * Return value: A new CamelFolderSummary widget.
- **/
-CamelFolderSummary *
-camel_folder_summary_new (void)
-{
-	CamelFolderSummary *new = CAMEL_FOLDER_SUMMARY ( gtk_type_new (camel_folder_summary_get_type ()));
-	return new;
-}
-
-
-void camel_folder_summary_set_filename(CamelFolderSummary *s, const char *name)
-{
-	g_free(s->summary_path);
-	s->summary_path = g_strdup(name);
-}
-
-void camel_folder_summary_set_index(CamelFolderSummary *s, ibex *index)
-{
-	struct _CamelFolderSummaryPrivate *p = _PRIVATE(s);
-
-	p->index = index;
-}
-
-void camel_folder_summary_set_build_content(CamelFolderSummary *s, gboolean state)
-{
-	s->build_content = state;
-}
-
-int
-camel_folder_summary_count(CamelFolderSummary *s)
-{
-	return s->messages->len;
-}
-
-CamelMessageInfo *
-camel_folder_summary_index(CamelFolderSummary *s, int i)
-{
-	if (imessages->len)
-		return g_ptr_array_index(s->messages, i);
-	return NULL;
-}
-
-CamelMessageInfo *
-camel_folder_summary_uid(CamelFolderSummary *s, const char *uid)
-{
-	return g_hash_table_lookup(s->messages_uid, uid);
-}
-
-void
-camel_folder_summary_set_uid(CamelFolderSummary *s, guint32 base)
-{
-	if (s->nextuid <= base)
-		s->nextuid = base+1;
-}
-
-guint32 camel_folder_summary_next_uid(CamelFolderSummary *s)
-{
-	guint32 uid = s->nextuid++;
-
-	/* FIXME: sync this to disk */
-/*	summary_header_save(s);*/
-	return uid;
-}
-
-/* loads the content descriptions, recursively */
-static CamelMessageContentInfo *
-perform_content_info_load(CamelFolderSummary *s, FILE *in)
-{
-	int i;
-	guint32 count;
-	CamelMessageContentInfo *ci, *part;
-
-	ci = ((CamelFolderSummaryClass *)((GtkObject *)s)->klass)->content_info_load(s, in);
-	camel_folder_summary_decode_uint32(in, &count);
-	for (i=0;ichilds, (struct _node *)part);
-			part->parent = ci;
-		} else {
-			g_warning("Summary file format messed up?");
-		}
-	}
-	return ci;
-}
-
-int
-camel_folder_summary_load(CamelFolderSummary *s)
-{
-	FILE *in;
-	int i;
-	CamelMessageInfo *mi;
-
-	g_assert(s->summary_path);
-
-	printf("loading summary\n");
-
-	in = fopen(s->summary_path, "r");
-	if ( in == NULL ) {
-		return -1;
-	}
-
-	printf("loading header\n");
-
-	if ( ((CamelFolderSummaryClass *)((GtkObject *)s)->klass)->summary_header_load(s, in) == -1) {
-		fclose(in);
-		return -1;
-	}
-
-	printf("loading content\n");
-
-	/* now read in each message ... */
-	/* FIXME: check returns */
-	for (i=0;isaved_count;i++) {
-		mi = ((CamelFolderSummaryClass *)((GtkObject *)s)->klass)->message_info_load(s, in);
-
-		if (s->build_content) {
-			mi->content = perform_content_info_load(s, in);
-		}
-
-		camel_folder_summary_add(s, mi);
-	}
-	
-	if (fclose(in) == -1)
-		return -1;
-
-	s->flags &= ~CAMEL_SUMMARY_DIRTY;
-
-	return 0;
-}
-
-/* saves the content descriptions, recursively */
-static int
-perform_content_info_save(CamelFolderSummary *s, FILE *out, CamelMessageContentInfo *ci)
-{
-	CamelMessageContentInfo *part;
-
-	((CamelFolderSummaryClass *)((GtkObject *)s)->klass)->content_info_save(s, out, ci);
-	camel_folder_summary_encode_uint32(out, my_list_size((struct _node **)&ci->childs));
-	part = ci->childs;
-	while (part) {
-		perform_content_info_save(s, out, part);
-		part = part->next;
-	}
-	return 0;
-}
-
-int
-camel_folder_summary_save(CamelFolderSummary *s)
-{
-	FILE *out;
-	int fd;
-	int i;
-	guint32 count;
-	CamelMessageInfo *mi;
-
-	g_assert(s->summary_path);
-
-	printf("saving summary? '%s'\n", s->summary_path);
-
-	if ((s->flags & CAMEL_SUMMARY_DIRTY) == 0) {
-		printf("nup\n");
-		return 0;
-	}
-
-	printf("yep\n");
-
-	fd = open(s->summary_path, O_RDWR|O_CREAT, 0600);
-	if (fd == -1)
-		return -1;
-	out = fdopen(fd, "w");
-	if ( out == NULL ) {
-		close(fd);
-		return -1;
-	}
-
-	io(printf("saving header\n"));
-
-	if ( ((CamelFolderSummaryClass *)((GtkObject *)s)->klass)->summary_header_save(s, out) == -1) {
-		fclose(out);
-		return -1;
-	}
-
-	/* now write out each message ... */
-	/* FIXME: check returns */
-	count = camel_folder_summary_count(s);
-	for (i=0;iklass)->message_info_save(s, out, mi);
-
-		if (s->build_content) {
-			perform_content_info_save(s, out, mi->content);
-		}
-	}
-	if (fclose(out) == -1)
-		return -1;
-
-	s->flags &= ~CAMEL_SUMMARY_DIRTY;
-	return 0;
-}
-
-void camel_folder_summary_add(CamelFolderSummary *s, CamelMessageInfo *info)
-{
-	if (info == NULL)
-		return;
-retry:
-	if (info->uid == NULL) {
-		info->uid = g_strdup_printf("%u", s->nextuid++);
-	}
-	if (g_hash_table_lookup(s->messages_uid, info->uid)) {
-		g_warning("Trying to insert message with clashing uid.  new uid re-assigned");
-		g_free(info->uid);
-		info->uid = NULL;
-		goto retry;
-	}
-
-	g_ptr_array_add(s->messages, info);
-	g_hash_table_insert(s->messages_uid, info->uid, info);
-	s->flags |= CAMEL_SUMMARY_DIRTY;
-}
-
-CamelMessageInfo *camel_folder_summary_add_from_header(CamelFolderSummary *s, struct _header_raw *h)
-{
-	CamelMessageInfo *info = NULL;
-
-	info = ((CamelFolderSummaryClass *)((GtkObject *)s)->klass)->message_info_new(s, h);
-	camel_folder_summary_add(s, info);
-
-	return info;
-}
-
-CamelMessageInfo *camel_folder_summary_add_from_parser(CamelFolderSummary *s, CamelMimeParser *mp)
-{
-	CamelMessageInfo *info = NULL;
-	char *buffer;
-	int len;
-	struct _CamelFolderSummaryPrivate *p = _PRIVATE(s);
-
-	/* should this check the parser is in the right state, or assume it is?? */
-
-	if (camel_mime_parser_step(mp, &buffer, &len) != HSCAN_EOF) {
-		info = ((CamelFolderSummaryClass *)((GtkObject *)s)->klass)->message_info_new_from_parser(s, mp);
-
-		camel_mime_parser_unstep(mp);
-
-		/* FIXME: better uid assignment method? */
-		if (info->uid == NULL) {
-			info->uid = g_strdup_printf("%u", s->nextuid++);
-		}
-
-		if (p->index) {
-			if (p->filter_index == NULL)
-				p->filter_index = camel_mime_filter_index_new_ibex(p->index);
-			camel_mime_filter_index_set_name(p->filter_index, info->uid);
-			ibex_unindex(p->index, info->uid);
-		}
-
-		/* build the content info, if we're supposed to */
-		if (s->build_content) {
-			info->content = summary_build_content_info(s, mp);
-			if (info->content->pos != -1)
-				info->size = info->content->endpos - info->content->pos;
-		} else {
-			camel_mime_parser_drop_step(mp);
-		}
-
-		camel_folder_summary_add(s, info);
-	}
-	return info;
-}
-
-static void
-perform_content_info_free(CamelFolderSummary *s, CamelMessageContentInfo *ci)
-{
-	CamelMessageContentInfo *pw, *pn;
-
-	pw = ci->childs;
-	((CamelFolderSummaryClass *)((GtkObject *)s)->klass)->content_info_free(s, ci);
-	while (pw) {
-		pn = pw->next;
-		perform_content_info_free(s, pw);
-		pw = pn;
-	}
-}
-
-void
-camel_folder_summary_touch(CamelFolderSummary *s)
-{
-	s->flags |= CAMEL_SUMMARY_DIRTY;
-}
-
-void
-camel_folder_summary_clear(CamelFolderSummary *s)
-{
-	int i;
-
-	if (camel_folder_summary_count(s) == 0)
-		return;
-
-	for (i=0;icontent;
-
-		((CamelFolderSummaryClass *)((GtkObject *)s)->klass)->message_info_free(s, mi);		
-		if (s->build_content && ci) {
-			perform_content_info_free(s, ci);
-		}
-	}
-
-	g_ptr_array_set_size(s->messages, 0);
-	g_hash_table_destroy(s->messages_uid);
-	s->messages_uid = g_hash_table_new(g_str_hash, g_str_equal);
-	s->flags |= CAMEL_SUMMARY_DIRTY;
-}
-
-void camel_folder_summary_remove(CamelFolderSummary *s, CamelMessageInfo *info)
-{
-	CamelMessageContentInfo *ci = info->content;
-
-	g_hash_table_remove(s->messages_uid, info->uid);
-	g_ptr_array_remove(s->messages, info);
-	((CamelFolderSummaryClass *)((GtkObject *)s)->klass)->message_info_free(s, info);
-	if (s->build_content && ci) {
-		perform_content_info_free(s, ci);
-	}
-	s->flags |= CAMEL_SUMMARY_DIRTY;
-}
-
-void camel_folder_summary_remove_uid(CamelFolderSummary *s, const char *uid)
-{
-        CamelMessageInfo *oldinfo;
-        char *olduid;
-
-        if (g_hash_table_lookup_extended(s->messages_uid, uid, (void *)&olduid, (void *)&oldinfo)) {
-		camel_folder_summary_remove(s, oldinfo);
-		g_free(olduid);
-        }
-}
-
-int
-camel_folder_summary_encode_uint32(FILE *out, guint32 value)
-{
-	int i;
-
-	io(printf("Encoding int %u\n", value));
-
-	for (i=28;i>0;i-=7) {
-		if (value >= (1<>i) & 0x7f;
-			if (fputc(c, out) == -1)
-				return -1;
-		}
-	}
-	return fputc(value | 0x80, out);
-}
-
-int
-camel_folder_summary_decode_uint32(FILE *in, guint32 *dest)
-{
-        gint32 value=0, v;
-
-        /* until we get the last byte, keep decoding 7 bits at a time */
-        while ( ((v = fgetc(in)) & 0x80) == 0 && v!=EOF) {
-                value |= v;
-                value <<= 7;
-        }
-	if (v == EOF) {
-		*dest = value>>7;
-		return 01;
-	}
-	*dest = value | (v&0x7f);
-
-	io(printf("Decoding int %u\n", *dest));
-
-        return 0;
-}
-
-int
-camel_folder_summary_encode_fixed_int32(FILE *out, gint32 value)
-{
-	guint32 save;
-
-	save = htonl(value);
-	if (fwrite(&save, sizeof(save), 1, out) != 1)
-		return -1;
-	return 0;
-}
-
-int
-camel_folder_summary_decode_fixed_int32(FILE *in, gint32 *dest)
-{
-	guint32 save;
-
-	if (fread(&save, sizeof(save), 1, in) == 1) {
-		*dest = ntohl(save);
-		return 0;
-	} else {
-		return -1;
-	}
-}
-
-/* should be sorted, for binary search */
-/* This is a tokenisation mechanism for strings written to the
-   summary - to save space.
-   This list can have at most 31 words. */
-static char * tokens[] = {
-	"7bit",
-	"8bit",
-	"alternative",
-	"application",
-	"base64",
-	"boundary",
-	"charset",
-	"filename",
-	"html",
-	"image",
-	"iso-8859-1",
-	"iso-8859-8",
-	"message",
-	"mixed",
-	"multipart",
-	"name",
-	"octet-stream",
-	"parallel",
-	"plain",
-	"postscript",
-	"quoted-printable",
-	"related",
-	"rfc822",
-	"text",
-	"us-ascii",		/* 25 words */
-};
-
-#define tokens_len (sizeof(tokens)/sizeof(tokens[0]))
-
-/* baiscally ...
-    0 = null
-    1-tokens_len == tokens[id-1]
-    >=32 string, length = n-32
-*/
-
-#ifdef USE_BSEARCH
-static int
-token_search_cmp(char *key, char **index)
-{
-	d(printf("comparing '%s' to '%s'\n", key, *index));
-	return strcmp(key, *index);
-}
-#endif
-
-int
-camel_folder_summary_encode_token(FILE *out, char *str)
-{
-	io(printf("Encoding token: '%s'\n", str));
-
-	if (str == NULL) {
-		return camel_folder_summary_encode_uint32(out, 0);
-	} else {
-		int len = strlen(str);
-		int i, token=-1;
-
-		if (len <= 16) {
-			char lower[32];
-			char **match;
-
-			for (i=0;i 10240) {
-		g_warning("Got broken string header length: %d bytes", len);
-		*str = NULL;
-		return -1;
-	} else {
-		len -= 32;
-		ret = g_malloc(len+1);
-		if (fread(ret, len, 1, in) != 1) {
-			g_free(ret);
-			*str = NULL;
-			return -1;
-		}
-		ret[len]=0;
-	}
-
-	io(printf("Token = '%s'\n", ret));
-
-	*str = ret;
-	return 0;
-}
-
-int
-camel_folder_summary_encode_string(FILE *out, char *str)
-{
-	register int len;
-
-	io(printf("Encoding string: '%s'\n", str));
-
-	if (str == NULL)
-		return camel_folder_summary_encode_uint32(out, 0);
-
-	len = strlen(str);
-	if (camel_folder_summary_encode_uint32(out, len+1) == -1)
-		return -1;
-	if (fwrite(str, len, 1, out) == 1)
-		return 0;
-	return -1;
-}
-
-
-int
-camel_folder_summary_decode_string(FILE *in, char **str)
-{
-	int len;
-	register char *ret;
-
-	io(printf("Decode string ...\n", str));
-
-	if (camel_folder_summary_decode_uint32(in, &len) == -1) {
-		*str = NULL;
-		return -1;
-	}
-
-	len--;
-	if (len < 0) {
-		*str = NULL;
-		io(printf("String = '%s'\n", *str));
-		return -1;
-	}
-
-	ret = g_malloc(len+1);
-	if (fread(ret, len, 1, in) != 1) {
-		g_free(ret);
-		*str = NULL;
-		return -1;
-	}
-
-	io(printf("String = '%s'\n", ret));
-
-	ret[len] = 0;
-	*str = ret;
-	return 0;
-}
-
-void
-camel_folder_summary_offset_content(CamelMessageContentInfo *content, off_t offset)
-{
-	content->pos += offset;
-	content->bodypos += offset;
-	content->endpos += offset;
-	content = content->childs;
-	while (content) {
-		camel_folder_summary_offset_content(content, offset);
-		content = content->next;
-	}
-}
-
-static struct _node *
-my_list_append(struct _node **list, struct _node *n)
-{
-	struct _node *ln = (struct _node *)list;
-	while (ln->next)
-		ln = ln->next;
-	n->next = 0;
-	ln->next = n;
-	return n;
-}
-
-static int
-my_list_size(struct _node **list)
-{
-	int len = 0;
-	struct _node *ln = (struct _node *)list;
-	while (ln->next) {
-		ln = ln->next;
-		len++;
-	}
-	return len;
-}
-
-static int
-summary_header_load(CamelFolderSummary *s, FILE *in)
-{
-	guint32 version, flags, nextuid, count;
-	time_t time;
-
-	fseek(in, 0, SEEK_SET);
-
-	io(printf("Loading header\n"));
-
-	if (camel_folder_summary_decode_fixed_int32(in, &version) == -1
-	    || camel_folder_summary_decode_fixed_int32(in, &flags) == -1
-	    || camel_folder_summary_decode_fixed_int32(in, &nextuid) == -1
-	    || camel_folder_summary_decode_fixed_int32(in, &time) == -1	/* TODO: yes i know this warns, to be fixed later */
-	    || camel_folder_summary_decode_fixed_int32(in, &count) == -1) {
-		return -1;
-	}
-
-	s->nextuid = nextuid;
-	s->flags = flags;
-	s->time = time;
-	s->saved_count = count;
-	if (s->version != version) {
-		g_warning("Summary header version mismatch");
-		return -1;
-	}
-	return 0;
-}
-
-static int
-summary_header_save(CamelFolderSummary *s, FILE *out)
-{
-	fseek(out, 0, SEEK_SET);
-
-	io(printf("Savining header\n"));
-
-	camel_folder_summary_encode_fixed_int32(out, s->version);
-	camel_folder_summary_encode_fixed_int32(out, s->flags);
-	camel_folder_summary_encode_fixed_int32(out, s->nextuid);
-	camel_folder_summary_encode_fixed_int32(out, s->time);
-	return camel_folder_summary_encode_fixed_int32(out, camel_folder_summary_count(s));
-}
-
-/* are these even useful for anything??? */
-static CamelMessageInfo * message_info_new_from_parser(CamelFolderSummary *s, CamelMimeParser *mp)
-{
-	CamelMessageInfo *mi = NULL;
-	int state;
-
-	state = camel_mime_parser_state(mp);
-	switch (state) {
-	case HSCAN_HEADER:
-	case HSCAN_MESSAGE:
-	case HSCAN_MULTIPART:
-		mi = ((CamelFolderSummaryClass *)((GtkObject *)s)->klass)->message_info_new(s, camel_mime_parser_headers_raw(mp));
-		break;
-	default:
-		g_error("Invalid parser state");
-	}
-
-	return mi;
-}
-
-static CamelMessageContentInfo * content_info_new_from_parser(CamelFolderSummary *s, CamelMimeParser *mp)
-{
-	CamelMessageContentInfo *ci = NULL;
-
-	switch (camel_mime_parser_state(mp)) {
-	case HSCAN_HEADER:
-	case HSCAN_MESSAGE:
-	case HSCAN_MULTIPART:
-		ci = ((CamelFolderSummaryClass *)((GtkObject *)s)->klass)->content_info_new(s, camel_mime_parser_headers_raw(mp));
-		if (ci) {
-			ci->type = camel_mime_parser_content_type(mp);
-			header_content_type_ref(ci->type);
-		}
-		break;
-	default:
-		g_error("Invalid parser state");
-	}
-
-	return ci;
-}
-
-static char *
-summary_format_address(struct _header_raw *h, const char *name)
-{
-	struct _header_address *addr;
-	const char *text;
-	char *ret;
-
-	text = header_raw_find(&h, name, NULL);
-	addr = header_address_decode(text);
-	if (addr) {
-		ret = header_address_list_format(addr);
-		header_address_list_clear(&addr);
-	} else {
-		ret = g_strdup(text);
-	}
-	return ret;
-}
-
-static char *
-summary_format_string(struct _header_raw *h, const char *name)
-{
-	const char *text;
-
-	text = header_raw_find(&h, name, NULL);
-	if (text) {
-		while (isspace(*text))
-			text++;
-		return header_decode_string(text);
-	} else {
-		return NULL;
-	}
-}
-
-static CamelMessageInfo *
-message_info_new(CamelFolderSummary *s, struct _header_raw *h)
-{
-	CamelMessageInfo *mi;
-
-	mi = g_malloc0(s->message_info_size);
-
-	mi->subject = summary_format_string(h, "subject");
-	mi->from = summary_format_address(h, "from");
-	mi->to = summary_format_address(h, "to");
-	mi->user_flags = NULL;
-	mi->date_sent = header_decode_date(header_raw_find(&h, "date", NULL), NULL);
-	mi->date_received = 0;
-
-	return mi;
-}
-
-
-static CamelMessageInfo *
-message_info_load(CamelFolderSummary *s, FILE *in)
-{
-	CamelMessageInfo *mi;
-	guint count;
-	int i;
-
-	mi = g_malloc0(s->message_info_size);
-
-	io(printf("Loading message info\n"));
-
-	camel_folder_summary_decode_string(in, &mi->uid);
-	camel_folder_summary_decode_uint32(in, &mi->flags);
-	camel_folder_summary_decode_uint32(in, &mi->date_sent);	/* warnings, leave them here */
-	camel_folder_summary_decode_uint32(in, &mi->date_received);
-/*	ms->xev_offset = camel_folder_summary_decode_uint32(in);*/
-	camel_folder_summary_decode_string(in, &mi->subject);
-	camel_folder_summary_decode_string(in, &mi->from);
-	camel_folder_summary_decode_string(in, &mi->to);
-	mi->content = NULL;
-
-	camel_folder_summary_decode_uint32(in, &count);
-	for (i=0;iuser_flags, name, TRUE);
-		g_free(name);
-	}
-
-	return mi;
-}
-
-static int
-message_info_save(CamelFolderSummary *s, FILE *out, CamelMessageInfo *mi)
-{
-	guint32 count;
-	CamelFlag *flag;
-
-	io(printf("Saving message info\n"));
-
-	camel_folder_summary_encode_string(out, mi->uid);
-	camel_folder_summary_encode_uint32(out, mi->flags);
-	camel_folder_summary_encode_uint32(out, mi->date_sent);
-	camel_folder_summary_encode_uint32(out, mi->date_received);
-/*	camel_folder_summary_encode_uint32(out, ms->xev_offset);*/
-	camel_folder_summary_encode_string(out, mi->subject);
-	camel_folder_summary_encode_string(out, mi->from);
-	camel_folder_summary_encode_string(out, mi->to);
-
-	count = camel_flag_list_size(&mi->user_flags);
-	camel_folder_summary_encode_uint32(out, count);
-	flag = mi->user_flags;
-	while (flag) {
-		camel_folder_summary_encode_string(out, flag->name);
-		flag = flag->next;
-	}
-	return ferror(out);
-}
-
-static void
-message_info_free(CamelFolderSummary *s, CamelMessageInfo *mi)
-{
-	g_free(mi->uid);
-	g_free(mi->subject);
-	g_free(mi->from);
-	g_free(mi->to);
-	camel_flag_list_free(&mi->user_flags);
-	g_free(mi);
-}
-
-static CamelMessageContentInfo *
-content_info_new(CamelFolderSummary *s, struct _header_raw *h)
-{
-	CamelMessageContentInfo *ci;
-
-	ci = g_malloc0(s->content_info_size);
-
-	ci->id = header_msgid_decode(header_raw_find(&h, "content-id", NULL));
-	ci->description = header_decode_string(header_raw_find(&h, "content-description", NULL));
-	ci->encoding = header_content_encoding_decode(header_raw_find(&h, "content-transfer-encoding", NULL));
-
-	ci->pos = -1;
-	ci->bodypos = -1;
-	ci->endpos = -1;
-	return ci;
-}
-
-static CamelMessageContentInfo *
-content_info_load(CamelFolderSummary *s, FILE *in)
-{
-	CamelMessageContentInfo *ci;
-	char *type, *subtype;
-	guint32 count, i;
-	struct _header_content_type *ct;
-
-	io(printf("Loading content info\n"));
-
-	ci = g_malloc0(s->content_info_size);
-
-	camel_folder_summary_decode_uint32(in, &ci->pos);
-	camel_folder_summary_decode_uint32(in, &ci->bodypos);
-	camel_folder_summary_decode_uint32(in, &ci->endpos);
-
-	camel_folder_summary_decode_token(in, &type);
-	camel_folder_summary_decode_token(in, &subtype);
-	ct = header_content_type_new(type, subtype);
-	g_free(type);		/* can this be removed? */
-	g_free(subtype);
-	camel_folder_summary_decode_uint32(in, &count);
-	for (i=0;itype = ct;
-
-	camel_folder_summary_decode_token(in, &ci->id);
-	camel_folder_summary_decode_token(in, &ci->description);
-	camel_folder_summary_decode_token(in, &ci->encoding);
-
-	ci->childs = NULL;
-	return ci;
-}
-
-static int
-content_info_save(CamelFolderSummary *s, FILE *out, CamelMessageContentInfo *ci)
-{
-	struct _header_content_type *ct;
-	struct _header_param *hp;
-
-	io(printf("Saving content info\n"));
-
-	camel_folder_summary_encode_uint32(out, ci->pos);
-	camel_folder_summary_encode_uint32(out, ci->bodypos);
-	camel_folder_summary_encode_uint32(out, ci->endpos);
-
-	ct = ci->type;
-	if (ct) {
-		camel_folder_summary_encode_token(out, ct->type);
-		camel_folder_summary_encode_token(out, ct->subtype);
-		camel_folder_summary_encode_uint32(out, my_list_size((struct _node **)&ct->params));
-		hp = ct->params;
-		while (hp) {
-			camel_folder_summary_encode_token(out, hp->name);
-			camel_folder_summary_encode_token(out, hp->value);
-			hp = hp->next;
-		}
-	} else {
-		camel_folder_summary_encode_token(out, NULL);
-		camel_folder_summary_encode_token(out, NULL);
-		camel_folder_summary_encode_uint32(out, 0);
-	}
-	camel_folder_summary_encode_token(out, ci->id);
-	camel_folder_summary_encode_token(out, ci->description);
-	return camel_folder_summary_encode_token(out, ci->encoding);
-}
-
-static void
-content_info_free(CamelFolderSummary *s, CamelMessageContentInfo *ci)
-{
-	header_content_type_unref(ci->type);
-	g_free(ci->id);
-	g_free(ci->description);
-	g_free(ci->encoding);
-	g_free(ci);
-}
-
-/*
-  OK
-  Now this is where all the "smarts" happen, where the content info is built,
-  and any indexing and what not is performed
-*/
-
-static CamelMessageContentInfo *
-summary_build_content_info(CamelFolderSummary *s, CamelMimeParser *mp)
-{
-	int state, len;
-	char *buffer;
-	CamelMessageContentInfo *info = NULL;
-	struct _header_content_type *ct;
-	int body;
-	int enc_id = -1, chr_id = -1, idx_id = -1;
-	struct _CamelFolderSummaryPrivate *p = _PRIVATE(s);
-	CamelMimeFilterCharset *mfc;
-	CamelMessageContentInfo *part;
-
-	d(printf("building content info\n"));
-
-	/* start of this part */
-	state = camel_mime_parser_step(mp, &buffer, &len);
-	body = camel_mime_parser_tell(mp);
-
-	info = ((CamelFolderSummaryClass *)((GtkObject *)s)->klass)->content_info_new_from_parser(s, mp);
-
-	info->pos = camel_mime_parser_tell_start_headers(mp);
-	info->bodypos = body;
-
-	switch(state) {
-	case HSCAN_HEADER:
-		/* check content type for indexing, then read body */
-		ct = camel_mime_parser_content_type(mp);
-		if (p->index && header_content_type_is(ct, "text", "*")) {
-			char *encoding;
-			const char *charset;
-			
-			d(printf("generating index:\n"));
-			
-			encoding = header_content_encoding_decode(camel_mime_parser_header(mp, "content-transfer-encoding", NULL));
-			if (encoding) {
-				if (!strcasecmp(encoding, "base64")) {
-					d(printf(" decoding base64\n"));
-					if (p->filter_64 == NULL)
-						p->filter_64 = camel_mime_filter_basic_new_type(CAMEL_MIME_FILTER_BASIC_BASE64_DEC);
-					enc_id = camel_mime_parser_filter_add(mp, (CamelMimeFilter *)p->filter_64);
-				} else if (!strcasecmp(encoding, "quoted-printable")) {
-					d(printf(" decoding quoted-printable\n"));
-					if (p->filter_qp == NULL)
-						p->filter_qp = camel_mime_filter_basic_new_type(CAMEL_MIME_FILTER_BASIC_QP_DEC);
-					enc_id = camel_mime_parser_filter_add(mp, (CamelMimeFilter *)p->filter_qp);
-				} else {
-					d(printf(" ignoring encoding %s\n", encoding));
-				}
-				g_free(encoding);
-			}
-				
-			charset = header_content_type_param(ct, "charset");
-			if (charset!=NULL
-			    && !(strcasecmp(charset, "us-ascii")==0
-				 || strcasecmp(charset, "utf-8")==0)) {
-				d(printf(" Adding conversion filter from %s to utf-8\n", charset));
-				mfc = g_hash_table_lookup(p->filter_charset, charset);
-				if (mfc == NULL) {
-					mfc = camel_mime_filter_charset_new_convert(charset, "utf-8");
-					if (mfc)
-						g_hash_table_insert(p->filter_charset, g_strdup(charset), mfc);
-				}
-				if (mfc) {
-					chr_id = camel_mime_parser_filter_add(mp, (CamelMimeFilter *)mfc);
-				} else {
-					g_warning("Cannot convert '%s' to 'utf-8', message index may be corrupt", charset);
-				}
-			}
-
-			/* and this filter actually does the indexing */
-			idx_id = camel_mime_parser_filter_add(mp, (CamelMimeFilter *)p->filter_index);
-		}
-		/* and scan/index everything */
-		while (camel_mime_parser_step(mp, &buffer, &len) != HSCAN_BODY_END)
-			;
-		/* and remove the filters */
-		camel_mime_parser_filter_remove(mp, enc_id);
-		camel_mime_parser_filter_remove(mp, chr_id);
-		camel_mime_parser_filter_remove(mp, idx_id);
-		break;
-	case HSCAN_MULTIPART:
-		d(printf("Summarising multipart\n"));
-		while (camel_mime_parser_step(mp, &buffer, &len) != HSCAN_MULTIPART_END) {
-			camel_mime_parser_unstep(mp);
-			part = summary_build_content_info(s, mp);
-			if (part) {
-				part->parent = info;
-				my_list_append((struct _node **)&info->childs, (struct _node *)part);
-			} else {
-				g_error("Parsing failed: could not build part of a multipart");
-			}
-		}
-		break;
-	case HSCAN_MESSAGE:
-		d(printf("Summarising message\n"));
-		part = summary_build_content_info(s, mp);
-		if (part) {
-			part->parent = info;
-			my_list_append((struct _node **)&info->childs, (struct _node *)part);
-		} else {
-			g_error("Parsing failed: no content of a message?");
-		}
-		state = camel_mime_parser_step(mp, &buffer, &len);
-		if (state != HSCAN_MESSAGE_END) {
-			g_error("Bad parser state: Expecing MESSAGE_END or MESSAGE_EOF, got: %d", state);
-			camel_mime_parser_unstep(mp);
-		}
-		break;
-	}
-
-	info->endpos = camel_mime_parser_tell(mp);
-
-	d(printf("finished building content info\n"));
-
-	return info;
-}
-
-static void
-content_info_dump(CamelMessageContentInfo *ci, int depth)
-{
-	char *p;
-
-	p = alloca(depth*4+1);
-	memset(p, ' ', depth*4);
-	p[depth*4] = 0;
-
-	if (ci == NULL) {
-		printf("%s\n", p);
-		return;
-	}
-
-	printf("%sconent-type: %s/%s\n", p, ci->type->type, ci->type->subtype);
-	printf("%sontent-transfer-encoding: %s\n", p, ci->encoding);
-	printf("%scontent-description: %s\n", p, ci->description);
-	printf("%sbytes: %d %d %d\n", p, (int)ci->pos, (int)ci->bodypos, (int)ci->endpos);
-	ci = ci->childs;
-	while (ci) {
-		content_info_dump(ci, depth+1);
-		ci = ci->next;
-	}
-}
-
-static void
-message_info_dump(CamelMessageInfo *mi)
-{
-	if (mi == NULL) {
-		printf("No message?\n");
-		return;
-	}
-
-	printf("Subject: %s\n", mi->subject);
-	printf("To: %s\n", mi->to);
-	printf("From: %s\n", mi->from);
-	printf("UID: %s\n", mi->uid);
-	printf("Flags: %04x\n", mi->flags & 0xffff);
-	content_info_dump(mi->content, 0);
-}
-
-
-#if 0
-int main(int argc, char **argv)
-{
-	CamelMimeParser *mp;
-	int fd;
-	CamelFolderSummary *s;
-	char *buffer;
-	int len;
-	int i;
-	ibex *index;
-
-	gtk_init(&argc, &argv);
-
-#if 0
-	{
-		int i;
-		char *s;
-		char buf[1024];
-
-		for (i=0;i<434712;i++) {
-			memcpy(buf, "                                                         ", 50);
-			buf[50] = 0;
-#if 0
-			s = g_strdup(buf);
-			g_free(s);
-#endif
-		}
-		return 0;
-	}
-#endif
-
-	if (argc < 2 ) {
-		printf("usage: %s mbox\n", argv[0]);
-		return 1;
-	}
-
-	fd = open(argv[1], O_RDONLY);
-
-	index = ibex_open("index.ibex", O_CREAT|O_RDWR, 0600);
-
-	mp = camel_mime_parser_new();
-	camel_mime_parser_scan_from(mp, TRUE);
-/*	camel_mime_parser_set_header_regex(mp, "^(content-[^:]*|subject|from|to|date):");*/
-	camel_mime_parser_init_with_fd(mp, fd);
-
-	s = camel_folder_summary_new();
-	camel_folder_summary_set_build_content(s, TRUE);
-/*	camel_folder_summary_set_index(s, index);*/
-
-	while (camel_mime_parser_step(mp, &buffer, &len) == HSCAN_FROM) {
-		/*printf("Parsing message ...\n");*/
-		camel_folder_summary_add_from_parser(s, mp);
-		if (camel_mime_parser_step(mp, &buffer, &len) != HSCAN_FROM_END) {
-			g_warning("Uknown state encountered, excpecting %d, got %d\n", HSCAN_FROM_END, camel_mime_parser_state(mp));
-			break;
-		}
-	}
-
-	printf("Printing summary\n");
-	for (i=0;i
- *
- *  This program is free software; you can redistribute it and/or 
- *  modify it under the terms of the GNU General Public License as 
- *  published by the Free Software Foundation; either version 2 of the
- *  License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- *  USA
- */
-
-#ifndef _CAMEL_FOLDER_SUMMARY_H
-#define _CAMEL_FOLDER_SUMMARY_H
-
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#define CAMEL_FOLDER_SUMMARY(obj)         GTK_CHECK_CAST (obj, camel_folder_summary_get_type (), CamelFolderSummary)
-#define CAMEL_FOLDER_SUMMARY_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, camel_folder_summary_get_type (), CamelFolderSummaryClass)
-#define IS_CAMEL_FOLDER_SUMMARY(obj)      GTK_CHECK_TYPE (obj, camel_folder_summary_get_type ())
-
-/*typedef struct _CamelFolderSummary      CamelFolderSummary;*/
-typedef struct _CamelFolderSummaryClass CamelFolderSummaryClass;
-
-/* these structs from camel-folder-summary.h ... (remove comment after cleanup soon) */
-/* TODO: perhaps they should be full-block objects? */
-/* FIXME: rename this to something more suitable */
-typedef struct {
-	gchar *name;
-	gint nb_message;	/* ick, these should be renamed to something better */
-	gint nb_unread_message;
-	gint nb_deleted_message;
-} CamelFolderInfo;
-
-/* A tree of message content info structures
-   describe the content structure of the message (if it has any) */
-typedef struct _CamelMessageContentInfo {
-	struct _CamelMessageContentInfo *next;
-
-	struct _CamelMessageContentInfo *childs;
-	struct _CamelMessageContentInfo *parent;
-
-	struct _header_content_type *type;
-	char *id;
-	char *description;
-	char *encoding;
-
-	/* information about where this object lives in the stream.
-	   if pos is -1 these are all invalid */
-	off_t pos;
-	off_t bodypos;
-	off_t endpos;
-} CamelMessageContentInfo;
-
-/* information about a given object */
-typedef struct {
-	/* public fields */
-	gchar *subject;
-	gchar *to;
-	gchar *from;
-
-	gchar *uid;
-	guint32 flags;
-	guint32 size;
-
-	time_t date_sent;
-	time_t date_received;
-
-	struct _CamelFlag *user_flags;
-
-	/* tree of content description - NULL if it is not available */
-	CamelMessageContentInfo *content;
-} CamelMessageInfo;
-
-enum _CamelFolderSummaryFlags {
-	CAMEL_SUMMARY_DIRTY = 1<<0,
-};
-
-struct _CamelFolderSummary {
-	CamelObject parent;
-
-	struct _CamelFolderSummaryPrivate *priv;
-
-	/* header info */
-	guint32 version;	/* version of file required, should be set by implementors */
-	guint32 flags;		/* flags */
-	guint32 nextuid;	/* next uid? */
-	guint32 saved_count;	/* how many were saved/loaded */
-	time_t time;		/* timestamp for this summary (for implementors to use) */
-
-	/* sizes of memory objects */
-	guint32 message_info_size;
-	guint32 content_info_size;
-
-	char *summary_path;
-	gboolean build_content;	/* do we try and parse/index the content, or not? */
-
-	GPtrArray *messages;	/* CamelMessageInfo's */
-	GHashTable *messages_uid; /* CamelMessageInfo's by uid */
-};
-
-struct _CamelFolderSummaryClass {
-	CamelObjectClass parent_class;
-
-	/* load/save the global info */
-	int (*summary_header_load)(CamelFolderSummary *, FILE *);
-	int (*summary_header_save)(CamelFolderSummary *, FILE *);
-
-	/* create/save/load an individual message info */
-	CamelMessageInfo * (*message_info_new)(CamelFolderSummary *, struct _header_raw *);
-	CamelMessageInfo * (*message_info_new_from_parser)(CamelFolderSummary *, CamelMimeParser *);
-	CamelMessageInfo * (*message_info_load)(CamelFolderSummary *, FILE *);
-	int		   (*message_info_save)(CamelFolderSummary *, FILE *, CamelMessageInfo *);
-	void		   (*message_info_free)(CamelFolderSummary *, CamelMessageInfo *);
-
-	/* save/load individual content info's */
-	CamelMessageContentInfo * (*content_info_new)(CamelFolderSummary *, struct _header_raw *);
-	CamelMessageContentInfo * (*content_info_new_from_parser)(CamelFolderSummary *, CamelMimeParser *);
-	CamelMessageContentInfo * (*content_info_load)(CamelFolderSummary *, FILE *);
-	int		          (*content_info_save)(CamelFolderSummary *, FILE *, CamelMessageContentInfo *);
-	void		          (*content_info_free)(CamelFolderSummary *, CamelMessageContentInfo *);
-};
-
-guint			 camel_folder_summary_get_type	(void);
-CamelFolderSummary      *camel_folder_summary_new	(void);
-
-void camel_folder_summary_set_filename(CamelFolderSummary *, const char *);
-void camel_folder_summary_set_index(CamelFolderSummary *, ibex *);
-void camel_folder_summary_set_uid(CamelFolderSummary *, guint32);
-void camel_folder_summary_set_build_content(CamelFolderSummary *, gboolean state);
-
-guint32 camel_folder_summary_next_uid(CamelFolderSummary *s);
-
-/* load/save the summary in its entirety */
-int camel_folder_summary_load(CamelFolderSummary *);
-int camel_folder_summary_save(CamelFolderSummary *);
-
-/* set the dirty bit on the summary */
-void camel_folder_summary_touch(CamelFolderSummary *s);
-
-/* add a new raw summary item */
-void camel_folder_summary_add(CamelFolderSummary *, CamelMessageInfo *info);
-
-/* build/add raw summary items */
-CamelMessageInfo *camel_folder_summary_add_from_header(CamelFolderSummary *, struct _header_raw *);
-CamelMessageInfo *camel_folder_summary_add_from_parser(CamelFolderSummary *, CamelMimeParser *);
-
-/* removes a summary item, doesn't fix content offsets */
-void camel_folder_summary_remove(CamelFolderSummary *s, CamelMessageInfo *info);
-void camel_folder_summary_remove_uid(CamelFolderSummary *s, const char *uid);
-/* remove all items */
-void camel_folder_summary_clear(CamelFolderSummary *s);
-
-/* lookup functions */
-int camel_folder_summary_count(CamelFolderSummary *);
-CamelMessageInfo *camel_folder_summary_index(CamelFolderSummary *, int);
-CamelMessageInfo *camel_folder_summary_uid(CamelFolderSummary *, const char *uid);
-
-/* utility functions */
-void camel_folder_summary_set_flags_by_uid(CamelFolderSummary *s, const char *uid, guint32 flags);
-/* shift content ... */
-void camel_folder_summary_offset_content(CamelMessageContentInfo *content, off_t offset);
-
-/* summary file loading/saving helper functions */
-int camel_folder_summary_encode_fixed_int32(FILE *, gint32);
-int camel_folder_summary_decode_fixed_int32(FILE *, gint32 *);
-
-int camel_folder_summary_encode_uint32(FILE *, guint32);
-int camel_folder_summary_decode_uint32(FILE *, guint32 *);
-
-int camel_folder_summary_encode_string(FILE *, char *);
-int camel_folder_summary_decode_string(FILE *, char **);
-
-/* basically like strings, but certain keywords can be compressed and de-cased */
-int camel_folder_summary_encode_token(FILE *, char *);
-int camel_folder_summary_decode_token(FILE *, char **);
-
-#endif /* ! _CAMEL_FOLDER_SUMMARY_H */
diff --git a/camel/camel-folder.c b/camel/camel-folder.c
deleted file mode 100644
index 34b830f564..0000000000
--- a/camel/camel-folder.c
+++ /dev/null
@@ -1,1166 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; fill-column: 160 -*- */
-/* camel-folder.c: Abstract class for an email folder */
-
-/*
- * Author:
- *  Bertrand Guiheneuf 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#include 
-#include 
-#include "camel-folder.h"
-#include "camel-exception.h"
-#include "camel-store.h"
-#include "camel-mime-message.h"
-#include "string-utils.h"
-
-static CamelObjectClass *parent_class = NULL;
-
-/* Returns the class for a CamelFolder */
-#define CF_CLASS(so) CAMEL_FOLDER_CLASS (GTK_OBJECT (so)->klass)
-
-
-enum SIGNALS {
-	FOLDER_CHANGED,
-	LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-
-static void init (CamelFolder *folder, CamelStore *parent_store,
-		  CamelFolder *parent_folder, const gchar *name,
-		  gchar separator, CamelException *ex);
-static void finalize (GtkObject *object);
-
-
-static void folder_open (CamelFolder *folder, CamelFolderOpenMode mode,
-			 CamelException *ex);
-static void folder_close (CamelFolder *folder, gboolean expunge,
-			  CamelException *ex);
-
-static const gchar *get_name (CamelFolder *folder);
-static const gchar *get_full_name (CamelFolder *folder);
-
-
-static gboolean can_hold_folders (CamelFolder *folder);
-static gboolean can_hold_messages (CamelFolder *folder);
-static gboolean exists (CamelFolder *folder, CamelException *ex);
-static gboolean is_open (CamelFolder *folder);
-static guint32 get_permanent_flags (CamelFolder *folder, CamelException *ex);
-static CamelFolderOpenMode get_mode (CamelFolder *folder, CamelException *ex);
-
-
-static gboolean create (CamelFolder *folder, CamelException *ex);
-static gboolean delete (CamelFolder *folder, gboolean recurse,
-			CamelException *ex);
-
-
-static GPtrArray *get_subfolder_names (CamelFolder *folder,
-				       CamelException *ex);
-static CamelFolder *get_subfolder     (CamelFolder *folder,
-				       const gchar *folder_name,
-				       CamelException *ex);
-static CamelFolder *get_parent_folder (CamelFolder *folder,
-				       CamelException *ex);
-static CamelStore *get_parent_store   (CamelFolder *folder,
-				       CamelException *ex);
-
-
-static gint get_message_count (CamelFolder *folder, CamelException *ex);
-
-
-static gboolean delete_messages (CamelFolder *folder,
-				 CamelException *ex);
-static void expunge             (CamelFolder *folder,
-				 CamelException *ex);
-
-
-static void append_message (CamelFolder *folder, CamelMimeMessage *message,
-			    CamelException *ex);
-
-
-static GPtrArray        *get_uids            (CamelFolder *folder,
-					      CamelException *ex);
-static void              free_uids           (CamelFolder *folder,
-					      GPtrArray *array);
-static GPtrArray        *get_summary         (CamelFolder *folder,
-					      CamelException *ex);
-static void              free_summary        (CamelFolder *folder,
-					      GPtrArray *array);
-static const gchar      *get_message_uid     (CamelFolder *folder,
-					      CamelMimeMessage *message,
-					      CamelException *ex);
-static CamelMimeMessage *get_message_by_uid  (CamelFolder *folder,
-					      const gchar *uid,
-					      CamelException *ex);
-static void delete_message_by_uid            (CamelFolder *folder,
-					      const gchar *uid,
-					      CamelException *ex);
-
-static const CamelMessageInfo *summary_get_by_uid (CamelFolder *folder,
-						   const char *uid);
-
-static GList *search_by_expression (CamelFolder *folder, const char *exp,
-				    CamelException *ex);
-
-static void
-camel_folder_class_init (CamelFolderClass *camel_folder_class)
-{
-	GtkObjectClass *gtk_object_class =
-		GTK_OBJECT_CLASS (camel_folder_class);
-
-	parent_class = gtk_type_class (camel_object_get_type ());
-
-	/* virtual method definition */
-	camel_folder_class->init = init;
-	camel_folder_class->open = folder_open;
-	camel_folder_class->close = folder_close;
-	camel_folder_class->get_name = get_name;
-	camel_folder_class->get_full_name = get_full_name;
-	camel_folder_class->can_hold_folders = can_hold_folders;
-	camel_folder_class->can_hold_messages = can_hold_messages;
-	camel_folder_class->exists = exists;
-	camel_folder_class->is_open = is_open;
-	camel_folder_class->get_subfolder = get_subfolder;
-	camel_folder_class->create = create;
-	camel_folder_class->delete = delete;
-	camel_folder_class->delete_messages = delete_messages;
-	camel_folder_class->get_parent_folder = get_parent_folder;
-	camel_folder_class->get_parent_store = get_parent_store;
-	camel_folder_class->get_mode = get_mode;
-	camel_folder_class->get_subfolder_names = get_subfolder_names;
-	camel_folder_class->free_subfolder_names = free_uids;
-	camel_folder_class->expunge = expunge;
-	camel_folder_class->get_message_count = get_message_count;
-	camel_folder_class->append_message = append_message;
-	camel_folder_class->get_permanent_flags = get_permanent_flags;
-	camel_folder_class->get_message_uid = get_message_uid;
-	camel_folder_class->get_message_by_uid = get_message_by_uid;
-	camel_folder_class->delete_message_by_uid = delete_message_by_uid;
-	camel_folder_class->get_uids = get_uids;
-	camel_folder_class->free_uids = free_uids;
-	camel_folder_class->get_summary = get_summary;
-	camel_folder_class->free_summary = free_summary;
-	camel_folder_class->search_by_expression = search_by_expression;
-	camel_folder_class->summary_get_by_uid = summary_get_by_uid;
-
-	/* virtual method overload */
-	gtk_object_class->finalize = finalize;
-
-        signals[FOLDER_CHANGED] =
-                gtk_signal_new ("folder_changed",
-                                GTK_RUN_LAST,
-                                gtk_object_class->type,
-                                GTK_SIGNAL_OFFSET (CamelFolderClass,
-						   folder_changed),
-                                gtk_marshal_NONE__INT,
-                                GTK_TYPE_NONE, 1, GTK_TYPE_INT);
-
-        gtk_object_class_add_signals (gtk_object_class, signals, LAST_SIGNAL);
-
-}
-
-
-GtkType
-camel_folder_get_type (void)
-{
-	static GtkType camel_folder_type = 0;
-
-	if (!camel_folder_type)	{
-		GtkTypeInfo camel_folder_info =
-		{
-			"CamelFolder",
-			sizeof (CamelFolder),
-			sizeof (CamelFolderClass),
-			(GtkClassInitFunc) camel_folder_class_init,
-			(GtkObjectInitFunc) NULL,
-				/* reserved_1 */ NULL,
-				/* reserved_2 */ NULL,
-			(GtkClassInitFunc) NULL,
-		};
-
-		camel_folder_type = gtk_type_unique (camel_object_get_type (),
-						     &camel_folder_info);
-	}
-
-	return camel_folder_type;
-}
-
-
-static void
-finalize (GtkObject *object)
-{
-	CamelFolder *camel_folder = CAMEL_FOLDER (object);
-
-	g_free (camel_folder->name);
-	g_free (camel_folder->full_name);
-
-	if (camel_folder->parent_store)
-		gtk_object_unref (GTK_OBJECT (camel_folder->parent_store));
-	if (camel_folder->parent_folder)
-		gtk_object_unref (GTK_OBJECT (camel_folder->parent_folder));
-
-	GTK_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-
-/**
- * init: init the folder
- * @folder: folder object to initialize
- * @parent_store: parent store object of the folder
- * @parent_folder: parent folder of the folder (may be NULL)
- * @name: (short) name of the folder
- * @separator: separator between the parent folder name and this name
- * @ex: a CamelException
- *
- * Initalizes the folder by setting the parent store, parent folder,
- * and name.
- **/
-static void
-init (CamelFolder *folder, CamelStore *parent_store,
-      CamelFolder *parent_folder, const gchar *name,
-      gchar separator, CamelException *ex)
-{
-	gchar *full_name;
-	const gchar *parent_full_name;
-
-	g_return_if_fail (CAMEL_IS_FOLDER (folder));
-	g_return_if_fail (CAMEL_IS_STORE (parent_store));
-	g_return_if_fail (parent_folder == NULL || CAMEL_IS_FOLDER (parent_folder));
-	g_return_if_fail (folder->parent_store == NULL);
-
-	folder->parent_store = parent_store;
-	gtk_object_ref (GTK_OBJECT (parent_store));
-
-	folder->parent_folder = parent_folder;
-	if (parent_folder)
-		gtk_object_ref (GTK_OBJECT (parent_folder));
-
-	folder->open_mode = FOLDER_OPEN_UNKNOWN;
-	folder->open_state = FOLDER_CLOSE;
-	folder->separator = separator;
-
-	/* if the folder already has a name, free it */
-	g_free (folder->name);
-	g_free (folder->full_name);
-
-	/* set those fields to NULL now, so that if an
-	   exception occurs, they will be set anyway */
-	folder->name = NULL;
-	folder->full_name = NULL;
-
-	if (folder->parent_folder) {
-		parent_full_name =
-			camel_folder_get_full_name (folder->parent_folder);
-
-		full_name = g_strdup_printf ("%s%c%s", parent_full_name,
-					     folder->separator, name);
-	} else {
-		full_name = g_strdup_printf ("%c%s", folder->separator, name);
-	}
-
-	folder->name = g_strdup (name);
-	folder->full_name = full_name;
-}
-
-
-static void
-folder_open (CamelFolder *folder, CamelFolderOpenMode mode, CamelException *ex)
-{
-	if (folder->open_state == FOLDER_OPEN) {
-		camel_exception_set (ex,
-				     CAMEL_EXCEPTION_FOLDER_INVALID_STATE,
-				     "folder is already open");
-		return;
-	}
-
-  	folder->open_state = FOLDER_OPEN;
-  	folder->open_mode = mode;
-}
-
-/**
- * camel_folder_open:
- * @folder: The folder object
- * @mode: open mode (R/W/RW ?)
- * @ex: exception object
- *
- * Open a folder in a given mode.
- **/
-void
-camel_folder_open (CamelFolder *folder, CamelFolderOpenMode mode,
-		   CamelException *ex)
-{
-	g_return_if_fail (CAMEL_IS_FOLDER (folder));
-	g_return_if_fail (!camel_folder_is_open (folder));
-
-	CF_CLASS (folder)->open (folder, mode, ex);
-}
-
-
-static void
-folder_close (CamelFolder *folder, gboolean expunge, CamelException *ex)
-{
-	folder->open_state = FOLDER_CLOSE;
-}
-
-/**
- * camel_folder_close:
- * @folder: The folder object
- * @expunge: whether or not to expunge deleted messages
- * @ex: exception object
- *
- * Put a folder in its closed state, and possibly expunge the messages
- * flagged for deletion.
- **/
-void
-camel_folder_close (CamelFolder *folder, gboolean expunge,
-		    CamelException *ex)
-{
-	g_return_if_fail (CAMEL_IS_FOLDER (folder));
-	g_return_if_fail (camel_folder_is_open (folder));
-
-	CF_CLASS (folder)->close (folder, expunge, ex);
-}
-
-
-static const gchar *
-get_name (CamelFolder *folder)
-{
-	return folder->name;
-}
-
-/**
- * camel_folder_get_name:
- * @folder: a folder
- *
- * Get the (short) name of the folder. The fully qualified name
- * can be obtained with the get_full_name method.
- *
- * Return value: name of the folder
- **/
-const gchar *
-camel_folder_get_name (CamelFolder *folder)
-{
-	g_return_val_if_fail (CAMEL_IS_FOLDER (folder), NULL);
-
-	return CF_CLASS (folder)->get_name (folder);
-}
-
-
-static const gchar *
-get_full_name (CamelFolder *folder)
-{
-	return folder->full_name;
-}
-
-/**
- * camel_folder_get_full_name:
- * @folder: a folder
- *
- * Get the (full) name of the folder.
- *
- * Return value: full name of the folder
- **/
-const gchar *
-camel_folder_get_full_name (CamelFolder *folder)
-{
-	g_return_val_if_fail (CAMEL_IS_FOLDER (folder), NULL);
-
-	return CF_CLASS (folder)->get_full_name (folder);
-}
-
-
-static gboolean
-can_hold_folders (CamelFolder *folder)
-{
-	return folder->can_hold_folders;
-}
-
-static gboolean
-can_hold_messages (CamelFolder *folder)
-{
-	return folder->can_hold_messages;
-}
-
-
-static gboolean
-exists (CamelFolder *folder, CamelException *ex)
-{
-	return FALSE;
-}
-
-/**
- * camel_folder_exists:
- * @folder: folder object
- * @ex: a CamelException
- *
- * Test if a folder exists in a store. A CamelFolder can be created
- * without physically existing in a store. In that case, use
- * CamelFolder::create to create it.
- *
- * Return value: whether or not the folder exists
- **/
-gboolean
-camel_folder_exists (CamelFolder *folder, CamelException *ex)
-{
-	g_return_val_if_fail (CAMEL_IS_FOLDER (folder), FALSE);
-
-	return CF_CLASS (folder)->exists (folder, ex);
-}
-
-
-static gboolean
-is_open (CamelFolder *folder)
-{
-	return folder->open_state == FOLDER_OPEN;
-}
-
-/**
- * camel_folder_is_open:
- * @folder: a folder object
- *
- * Tests if a folder is open. If not open it can be opened with
- * CamelFolder::open
- *
- * Return value: whether or not the folder is open
- **/
-gboolean
-camel_folder_is_open (CamelFolder *folder)
-{
-	g_return_val_if_fail (CAMEL_IS_FOLDER (folder), FALSE);
-
-	return CF_CLASS (folder)->is_open (folder);
-}
-
-
-static CamelFolder *
-get_subfolder (CamelFolder *folder, const gchar *folder_name,
-	       CamelException *ex)
-{
-	CamelFolder *new_folder;
-	gchar *full_name;
-	const gchar *current_folder_full_name;
-
-	g_return_val_if_fail (CAMEL_IS_STORE (folder->parent_store), NULL);
-
-	current_folder_full_name = camel_folder_get_full_name (folder);
-
-	full_name = g_strdup_printf ("%s%c%s", current_folder_full_name,
-				     folder->separator, folder_name);
-	new_folder = camel_store_get_folder (folder->parent_store,
-					     full_name, ex);
-	g_free (full_name);
-
-	return new_folder;
-}
-
-/**
- * camel_folder_get_subfolder:
- * @folder: a folder
- * @folder_name: subfolder path
- * @ex: a CamelException
- *
- * This method returns a folder object. This folder is a subfolder of
- * the given folder. It is an error to ask for a folder whose name begins
- * with the folder separator character.
- *
- * Return value: the requested folder, or %NULL if the subfolder object
- * could not be obtained
- **/
-CamelFolder *
-camel_folder_get_subfolder (CamelFolder *folder, const gchar *folder_name,
-			    CamelException *ex)
-{
-	g_return_val_if_fail (CAMEL_IS_FOLDER (folder), NULL);
-	g_return_val_if_fail (camel_folder_is_open (folder), NULL);
-	g_return_val_if_fail (folder_name != NULL, NULL);
-
-	return CF_CLASS (folder)->get_subfolder (folder, folder_name, ex);
-}
-
-
-/**
- * create: creates a folder on its store
- * @folder: a CamelFolder object.
- *
- * this routine handles the recursion mechanism.
- * Children classes have to implement the actual
- * creation mechanism. They must call this method
- * before physically creating the folder in order
- * to be sure the parent folder exists.
- * Calling this routine on an existing folder is
- * not an error, and returns %TRUE.
- *
- * Return value: %TRUE if the folder exists, %FALSE otherwise
- **/
-static gboolean
-create (CamelFolder *folder, CamelException *ex)
-{
-	CamelFolder *parent;
-
-	g_return_val_if_fail (folder->parent_store != NULL, FALSE);
-	g_return_val_if_fail (folder->name != NULL, FALSE);
-
-	/* if the folder already exists on the store, do nothing and return true */
-	if (CF_CLASS (folder)->exists (folder, ex))
-		return TRUE;
-
-	if (folder->parent_folder) {
-		camel_folder_create (folder->parent_folder, ex);
-		if (camel_exception_get_id (ex))
-			return FALSE;
-	} else if (folder->full_name) {
-		char *slash, *prefix;
-
-		slash = strrchr(folder->full_name, folder->separator);
-		if (slash && slash != folder->full_name) {
-			prefix = g_strndup(folder->full_name, slash-folder->full_name);
-			parent = camel_store_get_folder (folder->parent_store, prefix, ex);
-			camel_folder_create (parent, ex);
-			if (camel_exception_get_id (ex))
-				return FALSE;
-		}
-	}
-	return TRUE;
-}
-
-
-/**
- * camel_folder_create: create the folder object on the physical store
- * @folder: folder object to create
- * @ex: a CamelException
- *
- * This routine physically creates the folder on the store. Having
- * created the object does not mean the folder physically exists. If
- * it does not exist, this routine will create it. If the folder full
- * name contains more than one level of hierarchy, all folders between
- * the current folder and the last folder name will be created if not
- * existing.
- *
- * Return value: whether or not the operation succeeded
- **/
-gboolean
-camel_folder_create (CamelFolder *folder, CamelException *ex)
-{
-	g_return_val_if_fail (CAMEL_IS_FOLDER (folder), FALSE);
-	g_return_val_if_fail (!camel_folder_is_open (folder), FALSE);
-
-	return CF_CLASS (folder)->create (folder, ex);
-}
-
-
-/**
- * delete: delete folder
- * @folder: folder to delete
- * @recurse: true is subfolders must also be deleted
- *
- * Delete a folder and its subfolders (if recurse is TRUE).
- * The scheme is the following:
- * 1) delete all messages in the folder
- * 2) if recurse is FALSE, and if there are subfolders
- *    return FALSE, else delete current folder and retuen TRUE
- *    if recurse is TRUE, delete subfolders, delete
- *    current folder and return TRUE
- *
- * subclasses implementing a protocol with a different
- * deletion behaviour must emulate this one or implement
- * empty folders deletion and call  this routine which
- * will do all the works for them.
- * Opertions must be done in the folllowing order:
- *  - call this routine
- *  - delete empty folder
- *
- * Return value: true if the folder has been deleted
- **/
-static gboolean
-delete (CamelFolder *folder, gboolean recurse, CamelException *ex)
-{
-	GPtrArray *subfolders;
-	int i;
-	gboolean ok;
-
-	/* delete all messages in the folder */
-	CF_CLASS (folder)->delete_messages (folder, ex);
-	if (camel_exception_get_id (ex))
-		return FALSE;
-
-	subfolders = camel_folder_get_subfolder_names (folder, ex);
-	if (camel_exception_get_id (ex))
-		return FALSE;
-
-        ok = TRUE;
-	if (recurse) { /* delete subfolders */
-		if (subfolders) {
-			for (i = 0; ok && i < subfolders->len; i++) {
-				CamelFolder *sf;
-
-				sf = camel_folder_get_subfolder (folder, subfolders->pdata[i], ex);
-				camel_folder_delete (sf, TRUE, ex);
-				if (camel_exception_get_id (ex))
-					ok = FALSE;
-			}
-		}
-	} else if (subfolders) {
-		camel_exception_set (ex, CAMEL_EXCEPTION_FOLDER_NON_EMPTY,
-				     "folder has subfolders");
-		ok = FALSE;
-	}
-
-	if (subfolders)
-		camel_folder_free_subfolder_names (folder, subfolders);
-
-	return ok;
-}
-
-/**
- * camel_folder_delete: delete a folder
- * @folder: folder to delete
- * @recurse: %TRUE if subfolders must be deleted
- * @ex: a CamelException
- *
- * Delete a folder. All messages in the folder are deleted before the
- * folder is deleted. When @recurse is %TRUE, all subfolders are
- * deleted too. When @recurse is %FALSE and folder contains
- * subfolders, all messages are deleted, but folder deletion fails.
- *
- * Return value: whether or not deletion was successful
- **/
-gboolean
-camel_folder_delete (CamelFolder *folder, gboolean recurse, CamelException *ex)
-{
-	g_return_val_if_fail (CAMEL_IS_FOLDER (folder), FALSE);
-	g_return_val_if_fail (!camel_folder_is_open (folder), FALSE);
-
-	return CF_CLASS (folder)->delete (folder, recurse, ex);
-}
-
-
-static gboolean
-delete_messages (CamelFolder *folder, CamelException *ex)
-{
-	g_warning ("CamelFolder::delete_messages not implemented for `%s'",
-		   gtk_type_name (GTK_OBJECT_TYPE (folder)));
-	return FALSE;
-}
-
-/**
- * camel_folder_delete_messages: delete all messages in the folder
- * @folder: folder
- * @ex: a CamelException
- *
- * Delete all messages stored in a folder.
- *
- * Return value: whether or not the messages could be deleted
- **/
-gboolean
-camel_folder_delete_messages (CamelFolder *folder, CamelException *ex)
-{
-	g_return_val_if_fail (CAMEL_IS_FOLDER (folder), FALSE);
-	g_return_val_if_fail (!camel_folder_is_open (folder), FALSE);
-
-	return CF_CLASS (folder)->delete_messages (folder, ex);
-}
-
-
-static CamelFolder *
-get_parent_folder (CamelFolder *folder, CamelException *ex)
-{
-	return folder->parent_folder;
-}
-
-/**
- * camel_folder_get_parent_folder:
- * @folder: folder to get the parent of
- * @ex: a CamelException
- *
- * Return value: the folder's parent
- **/
-CamelFolder *
-camel_folder_get_parent_folder (CamelFolder *folder, CamelException *ex)
-{
-	g_return_val_if_fail (CAMEL_IS_FOLDER (folder), NULL);
-
-	return CF_CLASS (folder)->get_parent_folder (folder, ex);
-}
-
-
-static CamelStore *
-get_parent_store (CamelFolder *folder, CamelException *ex)
-{
-	return folder->parent_store;
-}
-
-/**
- * camel_folder_get_parent_store:
- * @folder: folder to get the parent of
- * @ex: a CamelException
- *
- * Return value: the parent store of the folder.
- **/
-CamelStore *
-camel_folder_get_parent_store (CamelFolder *folder, CamelException *ex)
-{
-	g_return_val_if_fail (CAMEL_IS_FOLDER (folder), NULL);
-
-	return CF_CLASS (folder)->get_parent_store (folder, ex);
-}
-
-
-static CamelFolderOpenMode
-get_mode (CamelFolder *folder, CamelException *ex)
-{
-	return folder->open_mode;
-}
-
-/**
- * camel_folder_get_mode:
- * @folder: a folder
- * @ex: a CamelException
- *
- * Return value: the open mode of the folder
- **/
-CamelFolderOpenMode
-camel_folder_get_mode (CamelFolder *folder, CamelException *ex)
-{
-	g_return_val_if_fail (CAMEL_IS_FOLDER (folder), -1);
-
-	return CF_CLASS (folder)->get_mode (folder, ex);
-}
-
-
-static GPtrArray *
-get_subfolder_names (CamelFolder *folder, CamelException *ex)
-{
-	g_warning ("CamelFolder::get_subfolder_names not implemented for `%s'",
-		   gtk_type_name (GTK_OBJECT_TYPE (folder)));
-	return NULL;
-}
-
-/**
- * camel_folder_get_subfolder_names:
- * @folder: the folder
- * @ex: a CamelException
- *
- * Return value: an array containing the names of the folder's
- * subfolders. The array should not be modified and must be freed with
- * camel_folder_free_subfolder_names().
- **/
-GPtrArray *
-camel_folder_get_subfolder_names (CamelFolder *folder, CamelException *ex)
-{
-	g_return_val_if_fail (CAMEL_IS_FOLDER (folder), NULL);
-	g_return_val_if_fail (camel_folder_is_open (folder), NULL);
-
-	return CF_CLASS (folder)->get_subfolder_names (folder, ex);
-}
-
-
-/**
- * camel_folder_free_subfolder_names:
- * @folder: folder object
- * @array: the array of subfolder names to free
- *
- * Frees the array of names returned by camel_folder_get_subfolder_names().
- **/
-void
-camel_folder_free_subfolder_names (CamelFolder *folder, GPtrArray *array)
-{
-	g_return_if_fail (CAMEL_IS_FOLDER (folder));
-	g_return_if_fail (camel_folder_is_open (folder));
-
-	CF_CLASS (folder)->free_subfolder_names (folder, array);
-}
-
-
-static void
-expunge (CamelFolder *folder, CamelException *ex)
-{
-	g_warning ("CamelFolder::expunge not implemented for `%s'",
-		   gtk_type_name (GTK_OBJECT_TYPE (folder)));
-}
-
-
-/**
- * camel_folder_expunge:
- * @folder: the folder
- * @ex: a CamelException
- *
- * Delete messages which have been marked as "DELETED"
- **/
-void
-camel_folder_expunge (CamelFolder *folder, CamelException *ex)
-{
-	g_return_if_fail (CAMEL_IS_FOLDER (folder));
-	g_return_if_fail (camel_folder_is_open (folder));
-
-	return CF_CLASS (folder)->expunge (folder, ex);
-}
-
-
-static gint
-get_message_count (CamelFolder *folder, CamelException *ex)
-{
-	g_warning ("CamelFolder::get_message_count not implemented "
-		   "for `%s'", gtk_type_name (GTK_OBJECT_TYPE (folder)));
-	return -1;
-}
-
-/**
- * camel_folder_get_message_count:
- * @folder: A CamelFolder object
- * @ex: a CamelException
- *
- * Return value: the number of messages in the folder, or -1 if unknown.
- **/
-gint
-camel_folder_get_message_count (CamelFolder *folder, CamelException *ex)
-{
-	g_return_val_if_fail (CAMEL_IS_FOLDER (folder), -1);
-	g_return_val_if_fail (camel_folder_is_open (folder), -1);
-
-	return CF_CLASS (folder)->get_message_count (folder, ex);
-}
-
-
-static void
-append_message (CamelFolder *folder, CamelMimeMessage *message,
-		CamelException *ex)
-{
-	g_warning ("CamelFolder::append_message not implemented for `%s'",
-		   gtk_type_name (GTK_OBJECT_TYPE (folder)));
-	return;
-
-}
-
-/**
- * camel_folder_append_message: add a message to a folder
- * @folder: folder object to add the message to
- * @message: message object
- * @ex: exception object
- *
- * Add a message to a folder.
- **/
-void
-camel_folder_append_message (CamelFolder *folder,
-			     CamelMimeMessage *message,
-			     CamelException *ex)
-{
-	g_return_if_fail (CAMEL_IS_FOLDER (folder));
-	g_return_if_fail (camel_folder_is_open (folder));
-
-	CF_CLASS (folder)->append_message (folder, message, ex);
-}
-
-
-static guint32
-get_permanent_flags (CamelFolder *folder, CamelException *ex)
-{
-	return folder->permanent_flags;
-}
-
-guint32
-camel_folder_get_permanent_flags (CamelFolder *folder, CamelException *ex)
-{
-	g_return_val_if_fail (CAMEL_IS_FOLDER (folder), 0);
-
-	return CF_CLASS (folder)->get_permanent_flags (folder, ex);
-}
-
-
-static const CamelMessageInfo *
-summary_get_by_uid (CamelFolder *folder, const char *uid)
-{
-	g_warning ("CamelFolder::summary_get_by_uid not implemented for `%s'",
-		   gtk_type_name (GTK_OBJECT_TYPE (folder)));
-	return NULL;
-}
-
-/**
- * camel_folder_summary_get_by_uid:
- * @folder: a CamelFolder
- * @uid: the uid of a message
- *
- * Return value: the summary information for the indicated message
- **/
-const CamelMessageInfo *
-camel_folder_summary_get_by_uid (CamelFolder *folder, const char *uid)
-{
-	g_return_val_if_fail (CAMEL_IS_FOLDER (folder), NULL);
-	g_return_val_if_fail (uid != NULL, NULL);
-
-	return CF_CLASS (folder)->summary_get_by_uid (folder, uid);
-}
-
-
-/* TODO: is this function required anyway? */
-gboolean
-camel_folder_has_summary_capability (CamelFolder *folder)
-{
-	g_return_val_if_fail (CAMEL_IS_FOLDER (folder), FALSE);
-
-	return folder->has_summary_capability;
-}
-
-
-/* UIDs stuff */
-
-static const gchar *
-get_message_uid (CamelFolder *folder, CamelMimeMessage *message,
-		 CamelException *ex)
-{
-	g_warning ("CamelFolder::get_message_uid not implemented for `%s'",
-		   gtk_type_name (GTK_OBJECT_TYPE (folder)));
-	return NULL;
-}
-
-/**
- * camel_folder_get_message_uid:
- * @folder: Folder in which the UID must refer to
- * @message: Message object
- * @ex: a CamelException
- *
- * Return the UID of a message relatively to a folder.
- * A message can have different UID, each one corresponding
- * to a different folder, if the message is referenced in
- * several folders.
- *
- * Return value: The UID of the message in the folder
- **/
-const gchar *
-camel_folder_get_message_uid (CamelFolder *folder, CamelMimeMessage *message,
-			      CamelException *ex)
-{
-	g_return_val_if_fail (CAMEL_IS_FOLDER (folder), NULL);
-	g_return_val_if_fail (CAMEL_IS_MIME_MESSAGE (message), NULL);
-	g_return_val_if_fail (camel_folder_is_open (folder), NULL);
-
-	return CF_CLASS (folder)->get_message_uid (folder, message, ex);
-}
-
-
-static CamelMimeMessage *
-get_message_by_uid (CamelFolder *folder, const gchar *uid, CamelException *ex)
-{
-	g_warning ("CamelFolder::get_message_by_uid not implemented for `%s'",
-		   gtk_type_name (GTK_OBJECT_TYPE (folder)));
-	return NULL;
-}
-
-/**
- * camel_folder_get_message_by_uid:
- * @folder: the folder object
- * @uid: the UID
- * @ex: a CamelException
- *
- * Get a message from its UID in the folder. Messages are cached
- * within a folder, that is, asking twice for the same UID returns the
- * same message object. (FIXME: is this true?)
- *
- * Return value: Message corresponding to the UID
- **/
-CamelMimeMessage *
-camel_folder_get_message_by_uid (CamelFolder *folder, const gchar *uid,
-				 CamelException *ex)
-{
-	g_return_val_if_fail (CAMEL_IS_FOLDER (folder), NULL);
-	g_return_val_if_fail (camel_folder_is_open (folder), NULL);
-
-	return CF_CLASS (folder)->get_message_by_uid (folder, uid, ex);
-}
-
-
-static void
-delete_message_by_uid (CamelFolder *folder, const gchar *uid,
-		       CamelException *ex)
-{
-	g_warning ("CamelFolder::delete_message_by_uid not implemented "
-		   "for `%s'", gtk_type_name (GTK_OBJECT_TYPE (folder)));
-}
-
-/**
- * camel_folder_delete_message_by_uid:
- * @folder: the folder object
- * @uid: the UID
- * @ex: a CamelException
- *
- * Delete a message from a folder given its UID.
- **/
-void
-camel_folder_delete_message_by_uid (CamelFolder *folder, const gchar *uid,
-				    CamelException *ex)
-{
-	g_return_if_fail (CAMEL_IS_FOLDER (folder));
-	g_return_if_fail (camel_folder_is_open (folder));
-
-	return CF_CLASS (folder)->delete_message_by_uid (folder, uid, ex);
-}
-
-
-static GPtrArray *
-get_uids (CamelFolder *folder, CamelException *ex)
-{
-	g_warning ("CamelFolder::get_uids not implemented for `%s'",
-		   gtk_type_name (GTK_OBJECT_TYPE (folder)));
-	return NULL;
-}
-
-/**
- * camel_folder_get_uids:
- * @folder: folder object
- * @ex: a CamelException
- *
- * Get the list of UIDs available in a folder. This routine is useful
- * for finding what messages are available when the folder does not
- * support summaries. The returned array shoudl not be modified, and
- * must be freed by passing it to camel_folder_free_uids().
- *
- * Return value: GPtrArray of UIDs corresponding to the messages
- * available in the folder.
- **/
-GPtrArray *
-camel_folder_get_uids (CamelFolder *folder, CamelException *ex)
-{
-	g_return_val_if_fail (CAMEL_IS_FOLDER (folder), NULL);
-	g_return_val_if_fail (camel_folder_is_open (folder), NULL);
-
-	return CF_CLASS (folder)->get_uids (folder, ex);
-}
-
-
-/* This is also the default implementation of free_subfolder_names. */
-static void
-free_uids (CamelFolder *folder, GPtrArray *array)
-{
-	int i;
-
-	/* Default implementation: free all of the strings and
-	 * the array itself.
-	 */
-	for (i = 0; i < array->len; i++)
-		g_free (array->pdata[i]);
-	g_ptr_array_free (array, TRUE);
-}
-
-/**
- * camel_folder_free_uids:
- * @folder: folder object
- * @array: the array of uids to free
- *
- * Frees the array of UIDs returned by camel_folder_get_uids().
- **/
-void
-camel_folder_free_uids (CamelFolder *folder, GPtrArray *array)
-{
-	g_return_if_fail (CAMEL_IS_FOLDER (folder));
-	g_return_if_fail (camel_folder_is_open (folder));
-
-	CF_CLASS (folder)->free_uids (folder, array);
-}
-
-
-static GPtrArray *
-get_summary (CamelFolder *folder, CamelException *ex)
-{
-	g_warning ("CamelFolder::get_summary not implemented for `%s'",
-		   gtk_type_name (GTK_OBJECT_TYPE (folder)));
-	return NULL;
-}
-
-/**
- * camel_folder_get_summary:
- * @folder: a folder object
- * @ex: a CamelException
- *
- * This returns the summary information for the folder. This array
- * should not be modified, and must be freed with
- * camel_folder_free_summary().
- *
- * Return value: an array of CamelMessageInfo
- **/
-GPtrArray *
-camel_folder_get_summary (CamelFolder *folder, CamelException *ex)
-{
-	g_return_val_if_fail (CAMEL_IS_FOLDER (folder), NULL);
-	g_return_val_if_fail (camel_folder_is_open (folder), NULL);
-
-	return CF_CLASS (folder)->get_summary (folder, ex);
-}
-
-
-static void
-free_summary (CamelFolder *folder, GPtrArray *array)
-{
-	g_warning ("CamelFolder::free_summary not implemented for `%s'",
-		   gtk_type_name (GTK_OBJECT_TYPE (folder)));
-}
-
-/**
- * camel_folder_free_summary:
- * @folder: folder object
- * @array: the summary array to free
- *
- * Frees the summary array returned by camel_folder_get_summary().
- **/
-void
-camel_folder_free_summary (CamelFolder *folder, GPtrArray *array)
-{
-	g_return_if_fail (CAMEL_IS_FOLDER (folder));
-	g_return_if_fail (camel_folder_is_open (folder));
-
-	CF_CLASS (folder)->free_summary (folder, array);
-}
-
-
-/**
- * camel_folder_has_search_capability:
- * @folder: Folder object
- *
- * Checks if a folder supports searching.
- *
- * Return value: %TRUE if the folder supports searching
- **/
-gboolean
-camel_folder_has_search_capability (CamelFolder *folder)
-{
-	g_return_val_if_fail (CAMEL_IS_FOLDER (folder), FALSE);
-
-	return folder->has_search_capability;
-}
-
-static GList *
-search_by_expression (CamelFolder *folder, const char *expression,
-		      CamelException *ex)
-{
-	g_warning ("CamelFolder::search_by_expression not implemented for "
-		   "`%s'", gtk_type_name (GTK_OBJECT_TYPE (folder)));
-	return NULL;
-}
-
-GList *camel_folder_search_by_expression (CamelFolder *folder,
-					  const char *expression,
-					  CamelException *ex)
-{
-	g_return_val_if_fail (CAMEL_IS_FOLDER (folder), NULL);
-	g_return_val_if_fail (folder->has_search_capability, NULL);
-
-	return CF_CLASS (folder)->search_by_expression (folder, expression,
-							ex);
-}
diff --git a/camel/camel-folder.h b/camel/camel-folder.h
deleted file mode 100644
index c90802c6c2..0000000000
--- a/camel/camel-folder.h
+++ /dev/null
@@ -1,289 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-folder.h: Abstract class for an email folder */
-
-/* 
- * Author: 
- *  Bertrand Guiheneuf 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef CAMEL_FOLDER_H
-#define CAMEL_FOLDER_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include 
-#include 
-
-#define CAMEL_FOLDER_TYPE     (camel_folder_get_type ())
-#define CAMEL_FOLDER(obj)     (GTK_CHECK_CAST((obj), CAMEL_FOLDER_TYPE, CamelFolder))
-#define CAMEL_FOLDER_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_FOLDER_TYPE, CamelFolderClass))
-#define CAMEL_IS_FOLDER(o)    (GTK_CHECK_TYPE((o), CAMEL_FOLDER_TYPE))
-
-typedef enum {
-	FOLDER_OPEN,
-	FOLDER_CLOSE
-} CamelFolderState;
-
-typedef enum {
-	FOLDER_OPEN_UNKNOWN = 0,   /* folder open mode is unknown */
-	FOLDER_OPEN_READ    = 1,   /* folder is read only         */ 
-	FOLDER_OPEN_WRITE   = 2,   /* folder is write only        */ 
-	FOLDER_OPEN_RW      = 3    /* folder is read/write        */ 
-} CamelFolderOpenMode;
-
-struct _CamelFolder
-{
-	CamelObject parent_object;
-	
-	CamelFolderOpenMode open_mode;
-	CamelFolderState open_state;
-	gchar *name;
-	gchar *full_name;
-	gchar separator;
-	CamelStore *parent_store;
-	CamelFolder *parent_folder;
-	guint32 permanent_flags;
-
-	gboolean can_hold_folders:1;
-	gboolean can_hold_messages:1;
-	gboolean has_summary_capability:1;
-	gboolean has_search_capability:1;
-};
-
-typedef struct {
-	CamelObjectClass parent_class;
-
-	/* signals */
-	void		(*folder_changed)	(CamelFolder *, int type);
-	
-	/* Virtual methods */	
-	void   (*init) (CamelFolder *folder, CamelStore *parent_store,
-			CamelFolder *parent_folder, const gchar *name,
-			gchar separator, CamelException *ex);
-
-	void   (*open) (CamelFolder *folder, 
-			CamelFolderOpenMode mode, 
-			CamelException *ex);
-	
-	void   (*close) (CamelFolder *folder, 
-			 gboolean expunge, 
-			 CamelException *ex);
-
-	const gchar *  (*get_name)  (CamelFolder *folder);
-
-	const gchar *  (*get_full_name)  (CamelFolder *folder);
-
-	gboolean   (*can_hold_folders)   (CamelFolder *folder);
-
-	gboolean   (*can_hold_messages)  (CamelFolder *folder);
-
-	gboolean   (*exists)  (CamelFolder *folder, 
-			       CamelException *ex);
-
-	gboolean   (*is_open) (CamelFolder *folder);
-
-	CamelFolder *  (*get_subfolder)  (CamelFolder *folder, 
-					  const gchar *folder_name, 
-					  CamelException *ex);
-
-	gboolean   (*create)  (CamelFolder *folder,
-			       CamelException *ex);
-
-	gboolean   (*delete)  (CamelFolder *folder, 
-			       gboolean recurse, 
-			       CamelException *ex);
-	
-	gboolean   (*delete_messages) (CamelFolder *folder, 
-				       CamelException *ex);
-
-	CamelFolder *  (*get_parent_folder)   (CamelFolder *folder, 
-					       CamelException *ex);
-
-	CamelStore *  (*get_parent_store) (CamelFolder *folder, 
-					   CamelException *ex);
-
-	CamelFolderOpenMode (*get_mode)   (CamelFolder *folder, 
-					   CamelException *ex);
-
-	void (*expunge)  (CamelFolder *folder, 
-			  CamelException *ex);
-
-	gint   (*get_message_count)   (CamelFolder *folder, 
-				       CamelException *ex);
-
-	void (*append_message)  (CamelFolder *folder, 
-				 CamelMimeMessage *message, 
-				 CamelException *ex);
-	
-	guint32 (*get_permanent_flags) (CamelFolder *folder,
-					CamelException *ex);
-
-	const gchar * (*get_message_uid)  (CamelFolder *folder, 
-					   CamelMimeMessage *message, 
-					   CamelException *ex);
-
-	CamelMimeMessage * (*get_message_by_uid)  (CamelFolder *folder, 
-						   const gchar *uid, 
-						   CamelException *ex);
-
-	void (*delete_message_by_uid)  (CamelFolder *folder, 
-					const gchar *uid, 
-					CamelException *ex);
-
-	GPtrArray * (*get_uids)       (CamelFolder *folder,
-				       CamelException *ex);
-	void (*free_uids)             (CamelFolder *folder,
-				       GPtrArray *array);
-
-	GPtrArray * (*get_summary)    (CamelFolder *folder,
-				       CamelException *ex);
-	void (*free_summary)          (CamelFolder *folder,
-				       GPtrArray *summary);
-
-	GPtrArray * (*get_subfolder_names) (CamelFolder *folder,
-				            CamelException *ex);
-	void (*free_subfolder_names)       (CamelFolder *folder,
-					    GPtrArray *subfolders);
-
-	gboolean (*has_search_capability) (CamelFolder *folder);
-
-	GList * (*search_by_expression) (CamelFolder *folder, const char *expression, CamelException *ex);
-
-	const CamelMessageInfo * (*summary_get_by_uid) (CamelFolder *, const char *uid);
-} CamelFolderClass;
-
-
-
-/* Standard Gtk function */
-GtkType camel_folder_get_type (void);
-
-
-/* public methods */
-
-
-
-CamelFolder *      camel_folder_get_subfolder          (CamelFolder *folder, 
-							const gchar *folder_name, 
-							CamelException *ex);
-
-void               camel_folder_open                   (CamelFolder *folder, 
-							CamelFolderOpenMode mode, 
-							CamelException *ex);
-
-
-void               camel_folder_close                  (CamelFolder *folder, 
-							gboolean expunge, 
-							CamelException *ex);
-
-gboolean           camel_folder_create                 (CamelFolder *folder, 
-							CamelException *ex);
-CamelFolder *      camel_folder_get_parent_folder      (CamelFolder *folder, 
-							CamelException *ex);
-CamelStore *       camel_folder_get_parent_store       (CamelFolder *folder, 
-							CamelException *ex);
-GList *            camel_folder_list_subfolders        (CamelFolder *folder, 
-							CamelException *ex);
-
-
-/* delete operations */
-gboolean           camel_folder_delete                 (CamelFolder *folder, 
-							gboolean recurse, 
-							CamelException *ex);
-gboolean           camel_folder_delete_messages        (CamelFolder *folder, 
-							CamelException *ex);
-void		   camel_folder_expunge                (CamelFolder *folder, 
-							CamelException *ex);
-
-
-/* folder name operations */
-const gchar *      camel_folder_get_name               (CamelFolder *folder);
-const gchar *      camel_folder_get_full_name          (CamelFolder *folder);
-
-
-/* various properties accessors */
-gboolean           camel_folder_exists                 (CamelFolder *folder, 
-							CamelException *ex);
-guint32		   camel_folder_get_permanent_flags    (CamelFolder *folder,
-							CamelException *ex);
-
-CamelFolderOpenMode camel_folder_get_mode              (CamelFolder *folder, 
-							CamelException *ex);
-gboolean           camel_folder_is_open                (CamelFolder *folder);
-
-
-
-/* message manipulation */
-void               camel_folder_append_message         (CamelFolder *folder, 
-							CamelMimeMessage *message, 
-							CamelException *ex);
-
-
-/* summary related operations */
-gboolean           camel_folder_has_summary_capability (CamelFolder *folder);
-
-
-gint               camel_folder_get_message_count     (CamelFolder *folder, 
-						       CamelException *ex);
-
-GPtrArray *        camel_folder_get_summary           (CamelFolder *folder, 
-						       CamelException *ex);
-void               camel_folder_free_summary          (CamelFolder *folder,
-						       GPtrArray *array);
-
-GPtrArray *        camel_folder_get_subfolder_names   (CamelFolder *folder, 
-						       CamelException *ex);
-void               camel_folder_free_subfolder_names  (CamelFolder *folder,
-						       GPtrArray *array);
-
-
-/* uid based access operations */
-const gchar *      camel_folder_get_message_uid       (CamelFolder *folder, 
-						       CamelMimeMessage *message, 
-						       CamelException *ex);
-CamelMimeMessage * camel_folder_get_message_by_uid    (CamelFolder *folder, 
-						       const gchar *uid, 
-						       CamelException *ex);
-void               camel_folder_delete_message_by_uid (CamelFolder *folder, 
-						       const gchar *uid, 
-						       CamelException *ex);
-GPtrArray *        camel_folder_get_uids              (CamelFolder *folder, 
-						       CamelException *ex);
-void               camel_folder_free_uids             (CamelFolder *folder,
-						       GPtrArray *array);
-
-/* search api */
-gboolean           camel_folder_has_search_capability (CamelFolder *folder);
-GList *		   camel_folder_search_by_expression(CamelFolder *folder, const char *expression, CamelException *ex);
-
-/* summary info. FIXME: rename this slightly? */
-const CamelMessageInfo *camel_folder_summary_get_by_uid (CamelFolder *summary,
-							 const char *uid);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_FOLDER_H */
-
diff --git a/camel/camel-internet-address.c b/camel/camel-internet-address.c
deleted file mode 100644
index 003cae5b48..0000000000
--- a/camel/camel-internet-address.c
+++ /dev/null
@@ -1,287 +0,0 @@
-/*
- *  Copyright (C) 2000 Helix Code Inc.
- *
- *  Authors: Michael Zucchi 
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Library General Public License
- *  as published by the Free Software Foundation; either version 2 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU Library General Public License for more details.
- *
- *  You should have received a copy of the GNU Library General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include "camel-mime-utils.h"
-#include "camel-internet-address.h"
-
-static int    internet_decode		(CamelAddress *, const char *raw);
-static char * internet_encode		(CamelAddress *);
-static void   internet_remove		(CamelAddress *, int index);
-
-static void camel_internet_address_class_init (CamelInternetAddressClass *klass);
-static void camel_internet_address_init       (CamelInternetAddress *obj);
-
-static CamelAddressClass *camel_internet_address_parent;
-
-struct _address {
-	char *name;
-	char *address;
-};
-
-enum SIGNALS {
-	LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-guint
-camel_internet_address_get_type (void)
-{
-	static guint type = 0;
-	
-	if (!type) {
-		GtkTypeInfo type_info = {
-			"CamelInternetAddress",
-			sizeof (CamelInternetAddress),
-			sizeof (CamelInternetAddressClass),
-			(GtkClassInitFunc) camel_internet_address_class_init,
-			(GtkObjectInitFunc) camel_internet_address_init,
-			(GtkArgSetFunc) NULL,
-			(GtkArgGetFunc) NULL
-		};
-		
-		type = gtk_type_unique (camel_address_get_type (), &type_info);
-	}
-	
-	return type;
-}
-
-static void
-camel_internet_address_class_init (CamelInternetAddressClass *klass)
-{
-	GtkObjectClass *object_class = (GtkObjectClass *) klass;
-	CamelAddressClass *address = (CamelAddressClass *) klass;
-
-	camel_internet_address_parent = gtk_type_class (camel_address_get_type ());
-
-	address->decode = internet_decode;
-	address->encode = internet_encode;
-	address->remove = internet_remove;
-
-	gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
-}
-
-static void
-camel_internet_address_init (CamelInternetAddress *obj)
-{
-}
-
-static int
-internet_decode	(CamelAddress *a, const char *raw)
-{
-	struct _header_address *ha, *n;
-
-	/* Should probably use its own decoder or something */
-	ha = header_address_decode(raw);
-	if (ha) {
-		n = ha;
-		while (n) {
-			if (n->type == HEADER_ADDRESS_NAME) {
-				camel_internet_address_add((CamelInternetAddress *)a, n->name, n->v.addr);
-			} else if (n->type == HEADER_ADDRESS_GROUP) {
-				struct _header_address *g = n->v.members;
-				while (g) {
-					if (g->type == HEADER_ADDRESS_NAME)
-						camel_internet_address_add((CamelInternetAddress *)a, g->name, g->v.addr);
-					/* otherwise, its an error, infact */
-					g = g->next;
-				}
-			}
-			n = n->next;
-		}
-		header_address_list_clear(&ha);
-	}
-	return 0;
-}
-
-static char * internet_encode		(CamelAddress *a)
-{
-	int i;
-	GString *out;
-	char *ret;
-
-	if (a->addresses->len == 0)
-		return NULL;
-
-	out = g_string_new("");
-
-	for (i=0;iaddresses->len;i++) {
-		struct _address *addr = g_ptr_array_index( a->addresses, i );
-		char *name = header_encode_string(addr->name);
-
-		if (i!=0)
-			g_string_append(out, ", ");
-
-		if (name) {
-			g_string_sprintfa(out, "%s ", name);
-			g_free(name);
-		}
-		g_string_sprintfa(out, "<%s>", addr->address);
-	}
-	ret = out->str;
-	g_string_free(out, FALSE);
-	return ret;
-}
-
-static void   internet_remove		(CamelAddress *a, int index)
-{
-	struct _address *addr;
-
-	if (index <0 || index >= a->addresses->len)
-		return;
-
-	addr = g_ptr_array_index( a->addresses, index);
-	g_free(addr->name);
-	g_free(addr->address);
-	g_free(addr);
-	g_ptr_array_remove_index( a->addresses, index);
-}
-
-/**
- * camel_internet_address_new:
- *
- * Create a new CamelInternetAddress object.
- * 
- * Return value: A new CamelInternetAddress object.
- **/
-CamelInternetAddress *
-camel_internet_address_new (void)
-{
-	CamelInternetAddress *new = CAMEL_INTERNET_ADDRESS ( gtk_type_new (camel_internet_address_get_type ()));
-	return new;
-}
-
-/**
- * camel_internet_address_add:
- * @a: 
- * @name: 
- * @address: 
- * 
- * Add a new internet address to the address object.
- * 
- * Return value: Index of added entry.
- **/
-int
-camel_internet_address_add	(CamelInternetAddress *a, const char *name, const char *address)
-{
-	struct _address *new;
-	int index;
-
-	g_return_val_if_fail(IS_CAMEL_INTERNET_ADDRESS(a), -1);
-
-	new = g_malloc(sizeof(*new));
-	new->name = g_strdup(name);
-	new->address = g_strdup(address);
-	index = ((CamelAddress *)a)->addresses->len;
-	g_ptr_array_add(((CamelAddress *)a)->addresses, new);
-
-	return index;
-}
-
-/**
- * camel_internet_address_get:
- * @a: 
- * @index: 
- * @namep: Holder for the returned name, or NULL, if not required.
- * @addressp: Holder for the returned address, or NULL, if not required.
- * 
- * Get the address at @index.
- * 
- * Return value: TRUE if such an address exists, or FALSE otherwise.
- **/
-gboolean
-camel_internet_address_get	(const CamelInternetAddress *a, int index, const char **namep, const char **addressp)
-{
-	struct _address *addr;
-
-	g_return_val_if_fail(IS_CAMEL_INTERNET_ADDRESS(a), -1);
-	g_return_val_if_fail(index >= 0, -1);
-
-	if (index >= ((CamelAddress *)a)->addresses->len)
-		return FALSE;
-
-	addr = g_ptr_array_index( ((CamelAddress *)a)->addresses, index);
-	if (namep)
-		*namep = addr->name;
-	if (addressp)
-		*addressp = addr->address;
-	return TRUE;
-}
-
-/**
- * camel_internet_address_find_name:
- * @a: 
- * @name: 
- * @addressp: Holder for address part, or NULL, if not required.
- * 
- * Find address by real name.
- * 
- * Return value: The index of the address matching the name, or -1
- * if no match was found.
- **/
-int
-camel_internet_address_find_name(CamelInternetAddress *a, const char *name, const char **addressp)
-{
-	struct _address *addr;
-	int i, len;
-
-	g_return_val_if_fail(IS_CAMEL_INTERNET_ADDRESS(a), -1);
-
-	len = ((CamelAddress *)a)->addresses->len;
-	for (i=0;iaddresses, i );
-		if (!strcmp(addr->name, name)) {
-			if (addressp)
-				*addressp = addr->address;
-			return i;
-		}
-	}
-	return -1;
-}
-
-/**
- * camel_internet_address_find_address:
- * @a: 
- * @address: 
- * @namep: Return for the matching name, or NULL, if not required.
- * 
- * Find an address by address.
- * 
- * Return value: The index of the address, or -1 if not found.
- **/
-int
-camel_internet_address_find_address(CamelInternetAddress *a, const char *address, const char **namep)
-{
-	struct _address *addr;
-	int i, len;
-
-	g_return_val_if_fail(IS_CAMEL_INTERNET_ADDRESS(a), -1);
-
-	len = ((CamelAddress *)a)->addresses->len;
-	for (i=0;iaddresses, i );
-		if (!strcmp(addr->address, address)) {
-			if (namep)
-				*namep = addr->name;
-			return i;
-		}
-	}
-	return -1;
-}
diff --git a/camel/camel-internet-address.h b/camel/camel-internet-address.h
deleted file mode 100644
index 14fbd5436a..0000000000
--- a/camel/camel-internet-address.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- *  Copyright (C) 2000 Helix Code Inc.
- *
- *  Authors: Michael Zucchi 
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Library General Public License
- *  as published by the Free Software Foundation; either version 2 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU Library General Public License for more details.
- *
- *  You should have received a copy of the GNU Library General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef _CAMEL_INTERNET_ADDRESS_H
-#define _CAMEL_INTERNET_ADDRESS_H
-
-#include 
-
-#define CAMEL_INTERNET_ADDRESS(obj)         GTK_CHECK_CAST (obj, camel_internet_address_get_type (), CamelInternetAddress)
-#define CAMEL_INTERNET_ADDRESS_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, camel_internet_address_get_type (), CamelInternetAddressClass)
-#define IS_CAMEL_INTERNET_ADDRESS(obj)      GTK_CHECK_TYPE (obj, camel_internet_address_get_type ())
-
-typedef struct _CamelInternetAddressClass CamelInternetAddressClass;
-
-struct _CamelInternetAddress {
-	CamelAddress parent;
-
-	struct _CamelInternetAddressPrivate *priv;
-};
-
-struct _CamelInternetAddressClass {
-	CamelAddressClass parent_class;
-};
-
-guint			camel_internet_address_get_type	(void);
-CamelInternetAddress   *camel_internet_address_new	(void);
-
-int			camel_internet_address_add	(CamelInternetAddress *, const char *, const char *);
-gboolean		camel_internet_address_get	(const CamelInternetAddress *, int, const char **, const char **);
-
-int			camel_internet_address_find_name(CamelInternetAddress *, const char *, const char **);
-int			camel_internet_address_find_address(CamelInternetAddress *, const char *, const char **);
-
-#endif /* ! _CAMEL_INTERNET_ADDRESS_H */
diff --git a/camel/camel-marshal-utils.c b/camel/camel-marshal-utils.c
deleted file mode 100644
index a743f155d5..0000000000
--- a/camel/camel-marshal-utils.c
+++ /dev/null
@@ -1,343 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-marshal-utils.c : marshal utils */
-
-/* 
- *
- * Author : 
- *  Bertrand Guiheneuf 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-
-
-#include "config.h"
-#include "camel-marshal-utils.h"
-#include "camel-arg-collector.c"
-
-
-#define NB_OP_CHUNKS 20
-static GMemChunk *op_chunk=NULL;
-static GStaticMutex op_chunk_mutex = G_STATIC_MUTEX_INIT;
-
-CamelFuncDef *
-camel_func_def_new (CamelMarshal marshal, guint n_params, ...)
-{	
-	CamelFuncDef *func_def;
-	va_list args;
-	GtkType type;
-	int i;
-	
-	func_def = g_new (CamelFuncDef, 1);
-	func_def->marshal = marshal;
-	func_def->n_params = n_params;
-	func_def->params_type = g_new (GtkType, n_params);
-
-	va_start (args, n_params);	
-	for (i=0; iparams_type [i] = type; 
-	}
-	va_end (args);
-
-	return func_def;
-}
-
-
-
-
-static gboolean
-_collect_params (GtkArg	*params,
-		 CamelFuncDef *func_def,
-		 va_list var_args)
-{
-  int i;
-  gboolean failed = FALSE;
-  
-
-  for (i=0; 
-       in_params; 
-       i++, params++)
-    {
-      gchar *error;
-
-      params->name = NULL;
-      params->type = (func_def->params_type) [i];
-      CAMEL_ARG_COLLECT_VALUE (params,
-			       var_args,
-			       error);
-      if (error)
-	{
-	  failed = TRUE;
-	  g_free (error);
-	}
-    }
-  return (failed);
-}
-
-
-
-/**
- * camel_marshal_create_op: create an operation 
- * @func_def: function definition object
- * @func: function to call
- * 
- * create a function ready to be executed. The 
- * vari
- * 
- * 
- * Return value: operation ready to be executed
- **/
-CamelOp *
-camel_marshal_create_op (CamelFuncDef *func_def, CamelFunc func, ...)
-{
-	gboolean error;
-	CamelOp *op;
-	va_list args;
-
-	g_assert (func_def);
-
-	op = camel_op_new (func_def);
-	op->func = func;
-
-	va_start (args, func);
-	error = _collect_params (op->params, func_def, args);
-	va_end (args);
-	 
-	if (error) {
-		camel_op_free (op);
-		return NULL;
-	} else 
-		return (op);
-}
-
-
-
-
-/**
- * camel_op_new: return a new CamelOp object 
- * 
- * The obtained object must be destroyed with 
- * camel_op_free ()
- * 
- * Return value: the newly allocated CamelOp object
- **/
-CamelOp *
-camel_op_new (CamelFuncDef *func_def)
-{
-	CamelOp *op;
-
-	g_static_mutex_lock (&op_chunk_mutex);
-	if (!op_chunk)
-		op_chunk = g_mem_chunk_create (CamelOp, 
-					       NB_OP_CHUNKS,
-					       G_ALLOC_AND_FREE);
-	g_static_mutex_unlock (&op_chunk_mutex);
-
-	op = g_chunk_new (CamelOp, op_chunk);
-	op->func_def = func_def;
-	op->params = g_new (GtkArg, func_def->n_params);
-	
-	return op;	
-}
-
-/**
- * camel_op_free: free a CamelOp object allocated with camel_op_new
- * @op: CamelOp object to free
- * 
- * Free a CamelOp object allocated with camel_op_new ()
- * this routine won't work with CamelOp objects allocated 
- * with other allocators.
- **/
-void 
-camel_op_free (CamelOp *op)
-{
-	g_free (op->params);
-	g_chunk_free (op, op_chunk);
-}
-
-
-/**
- * camel_op_run: run an operation 
- * @op: the operation object
- * 
- * run an operation 
- * 
- **/
-void
-camel_op_run (CamelOp *op)
-{
-	g_assert (op);
-	g_assert (op->func_def);
-	g_assert (op->params);
-
-	op->func_def->marshal (op->func, op->params);
-}
-
-
-
-
-/**
- * camel_op_set_user_data: set the private field
- * @op: operation 
- * @user_data: private field
- * 
- * associate a field to an operation object
- **/
-void 
-camel_op_set_user_data (CamelOp *op, gpointer user_data)
-{
-	g_assert (op);
-	op->user_data = user_data;
-}
-
-
-/**
- * camel_op_get_user_data: return the private field
- * @op: operation object
- * 
- * return the private field associated to 
- * an operation object.
- * 
- * Return value: 
- **/
-gpointer 
-camel_op_get_user_data (CamelOp *op)
-{
-	g_assert (op);
-	return op->user_data;
-}
-
-
-
-/* misc marshaller */
-
-
-typedef void (*CamelMarshal_NONE__POINTER_INT) (gpointer arg1,
-						gint arg2);
-void camel_marshal_NONE__POINTER_INT (CamelFunc func, 
-				      GtkArg *args)
-{
-	CamelMarshal_NONE__POINTER_INT rfunc;
-
-	rfunc = (CamelMarshal_NONE__POINTER_INT) func;
-	(* rfunc) (GTK_VALUE_POINTER(args[0]),
-		   GTK_VALUE_INT(args[1]));
-}
-
-
-
-
-
-typedef void (*CamelMarshal_NONE__POINTER_INT_POINTER) (gpointer arg1,
-							gint arg2,
-							gpointer arg3);
-void camel_marshal_NONE__POINTER_INT_POINTER (CamelFunc func, 
-					      GtkArg *args)
-{
-	CamelMarshal_NONE__POINTER_INT_POINTER rfunc;
-
-	rfunc = (CamelMarshal_NONE__POINTER_INT_POINTER) func;
-	(* rfunc) (GTK_VALUE_POINTER(args[0]),
-		   GTK_VALUE_INT(args[1]),
-		   GTK_VALUE_POINTER(args[2]));
-}
-
-
-typedef void (*CamelMarshal_NONE__POINTER_BOOL_POINTER) (gpointer arg1,
-							 gboolean arg2,
-							 gpointer arg3);
-void camel_marshal_NONE__POINTER_BOOL_POINTER (CamelFunc func, 
-					      GtkArg *args)
-{
-	CamelMarshal_NONE__POINTER_BOOL_POINTER rfunc;
-
-	rfunc = (CamelMarshal_NONE__POINTER_BOOL_POINTER) func;
-	(* rfunc) (GTK_VALUE_POINTER(args[0]),
-		   GTK_VALUE_BOOL(args[1]),
-		   GTK_VALUE_POINTER(args[2]));
-}
-
-
-typedef void (*CamelMarshal_NONE__POINTER_INT_POINTER_POINTER) (gpointer arg1,
-								gint arg2,
-								gpointer arg3,
-								gpointer arg4);
-void camel_marshal_NONE__POINTER_INT_POINTER_POINTER (CamelFunc func, 
-						      GtkArg *args)
-{
-	CamelMarshal_NONE__POINTER_INT_POINTER_POINTER rfunc;
-
-	rfunc = (CamelMarshal_NONE__POINTER_INT_POINTER_POINTER) func;
-	(* rfunc) (GTK_VALUE_POINTER(args[0]),
-		   GTK_VALUE_INT(args[1]),
-		   GTK_VALUE_POINTER(args[2]),
-		   GTK_VALUE_POINTER(args[3]));
-}
-
-
-
-typedef void (*CamelMarshal_NONE__POINTER_BOOL_POINTER_POINTER) (gpointer arg1,
-								 gboolean arg2,
-								 gpointer arg3,
-								 gpointer arg4);
-void camel_marshal_NONE__POINTER_BOOL_POINTER_POINTER (CamelFunc func, 
-						       GtkArg *args)
-{
-	CamelMarshal_NONE__POINTER_BOOL_POINTER_POINTER rfunc;
-
-	rfunc = (CamelMarshal_NONE__POINTER_BOOL_POINTER_POINTER) func;
-	(* rfunc) (GTK_VALUE_POINTER(args[0]),
-		   GTK_VALUE_BOOL(args[1]),
-		   GTK_VALUE_POINTER(args[2]),
-		   GTK_VALUE_POINTER(args[3]));
-}
-
-
-
-typedef void (*CamelMarshal_NONE__POINTER_POINTER_POINTER) (gpointer arg1,
-							    gpointer arg2,
-							    gpointer arg3);
-void camel_marshal_NONE__POINTER_POINTER_POINTER (CamelFunc func, 
-						  GtkArg *args)
-{
-	CamelMarshal_NONE__POINTER_POINTER_POINTER rfunc;
-
-	rfunc = (CamelMarshal_NONE__POINTER_POINTER_POINTER) func;
-	(* rfunc) (GTK_VALUE_POINTER(args[0]),
-		   GTK_VALUE_POINTER(args[1]),
-		   GTK_VALUE_POINTER(args[2]));
-}
-
-
-typedef void (*CamelMarshal_NONE__INT) (gint arg1);
-void camel_marshal_NONE__INT (CamelFunc func, 
-			      GtkArg *args)
-{
-	CamelMarshal_NONE__INT rfunc;
-
-	rfunc = (CamelMarshal_NONE__INT) func;
-	(* rfunc) (GTK_VALUE_INT (args[0]));
-}
-
-
-
-
-
-
diff --git a/camel/camel-marshal-utils.h b/camel/camel-marshal-utils.h
deleted file mode 100644
index d33489d2a1..0000000000
--- a/camel/camel-marshal-utils.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-maeshal-utils.h : marshal utils */
-
-/* 
- *
- * Author : 
- *  Bertrand Guiheneuf 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-
-#ifndef CAMEL_MARSHAL_UTILS_H
-#define CAMEL_MARSHAL_UTILS_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include 
-
-
-typedef void (*CamelFunc) ();
-
-typedef void ( *CamelMarshal) (CamelFunc func,
-				   GtkArg *args);
-
-
-
-
-
-typedef struct {
-
-	CamelMarshal marshal;
-	guint n_params;
-	GtkType	 *params_type;
-
-} CamelFuncDef;
-
-
-
-typedef struct {
-	CamelFuncDef *func_def;
-	CamelFunc func;
-	GtkArg	*params;
-	gpointer user_data;
-} CamelOp;
-
-
-CamelFuncDef *
-camel_func_def_new (CamelMarshal marshal, 
-		    guint n_params, 
-		    ...);
-
-
-CamelOp *camel_op_new (CamelFuncDef *func_def);
-void camel_op_free (CamelOp *op);
-void camel_op_run (CamelOp *op);
-void camel_op_run_and_free (CamelOp *op);
-void camel_op_set_user_data (CamelOp *op, gpointer user_data);
-gpointer camel_op_get_user_data (CamelOp *op);
-
-CamelOp *camel_marshal_create_op (CamelFuncDef *func_def, CamelFunc func, ...);
-
-/* marshallers */
-void camel_marshal_NONE__POINTER_INT_POINTER (CamelFunc func, 
-					      GtkArg *args);
-void camel_marshal_NONE__POINTER_BOOL_POINTER (CamelFunc func, 
-					      GtkArg *args);
-void camel_marshal_NONE__POINTER_INT_POINTER_POINTER (CamelFunc func, 
-						      GtkArg *args);
-void camel_marshal_NONE__POINTER_BOOL_POINTER_POINTER (CamelFunc func, 
-						       GtkArg *args);
-void camel_marshal_NONE__POINTER_POINTER_POINTER (CamelFunc func, 
-						  GtkArg *args);
-void camel_marshal_NONE__INT (CamelFunc func, 
-			      GtkArg *args);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_MARSHAL_UTILS_H */
-
diff --git a/camel/camel-medium.c b/camel/camel-medium.c
deleted file mode 100644
index dcc5d31d67..0000000000
--- a/camel/camel-medium.c
+++ /dev/null
@@ -1,275 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/* camelMedium.c : Abstract class for a medium
- *
- * Authors: Bertrand Guiheneuf 
- * 	    Michael Zucchi 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-#include 
-#include 
-#include 
-#include "camel-medium.h"
-#include "gmime-content-field.h"
-#include "string-utils.h"
-#include "hash-table-utils.h"
-
-#define d(x)
-
-static CamelDataWrapperClass *parent_class = NULL;
-
-/* Returns the class for a CamelMedium */
-#define CM_CLASS(so) CAMEL_MEDIUM_CLASS (GTK_OBJECT (so)->klass)
-
-static void add_header (CamelMedium *medium, const gchar *header_name,
-			const void *header_value);
-static void set_header (CamelMedium *medium, const gchar *header_name, const void *header_value);
-static void remove_header (CamelMedium *medium, const gchar *header_name);
-static const void *get_header (CamelMedium *medium, const gchar *header_name);
-
-static CamelDataWrapper *get_content_object (CamelMedium *medium);
-static void set_content_object (CamelMedium *medium,
-				CamelDataWrapper *content);
-static void finalize (GtkObject *object);
-
-static void
-camel_medium_class_init (CamelMediumClass *camel_medium_class)
-{
-	CamelDataWrapperClass *camel_data_wrapper_class =
-		CAMEL_DATA_WRAPPER_CLASS (camel_medium_class);
-	GtkObjectClass *gtk_object_class =
-		GTK_OBJECT_CLASS (camel_data_wrapper_class);
-
-	parent_class = gtk_type_class (camel_data_wrapper_get_type ());
-
-	/* virtual method definition */
-	camel_medium_class->add_header = add_header;
-	camel_medium_class->set_header = set_header;
-	camel_medium_class->remove_header = remove_header;
-	camel_medium_class->get_header = get_header;
-
-	camel_medium_class->set_content_object = set_content_object;
-	camel_medium_class->get_content_object = get_content_object;
-
-	gtk_object_class->finalize = finalize;
-}
-
-static void
-camel_medium_init (gpointer object, gpointer klass)
-{
-	CamelMedium *camel_medium = CAMEL_MEDIUM (object);
-
-	camel_medium->content = NULL;
-}
-
-
-GtkType
-camel_medium_get_type (void)
-{
-	static GtkType camel_medium_type = 0;
-
-	if (!camel_medium_type) {
-		GtkTypeInfo camel_medium_info =
-		{
-			"CamelMedium",
-			sizeof (CamelMedium),
-			sizeof (CamelMediumClass),
-			(GtkClassInitFunc) camel_medium_class_init,
-			(GtkObjectInitFunc) camel_medium_init,
-				/* reserved_1 */ NULL,
-				/* reserved_2 */ NULL,
-			(GtkClassInitFunc) NULL,
-		};
-
-		camel_medium_type = gtk_type_unique (camel_data_wrapper_get_type (), &camel_medium_info);
-	}
-
-	return camel_medium_type;
-}
-
-static void
-finalize (GtkObject *object)
-{
-	CamelMedium *medium = CAMEL_MEDIUM (object);
-
-	if (medium->content)
-		gtk_object_unref (GTK_OBJECT (medium->content));
-
-	GTK_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-static void
-add_header (CamelMedium *medium, const gchar *header_name,
-	    const void *header_value)
-{
-	g_warning("No %s::add_header implemented, adding %s", gtk_type_name(((GtkObject *)medium)->klass->type), header_name);
-}
-
-/**
- * camel_medium_add_header:
- * @medium: a CamelMedium
- * @header_name: name of the header
- * @header_value: value of the header
- *
- * Adds a header to a medium.
- *
- * FIXME: Where does it add it? We need to be able to prepend and
- * append headers, and also be able to insert them relative to other
- * headers.   No we dont, order isn't important! Z
- **/
-void
-camel_medium_add_header (CamelMedium *medium, const gchar *header_name,
-			 const void *header_value)
-{
-	g_return_if_fail (CAMEL_IS_MEDIUM (medium));
-	g_return_if_fail (header_name != NULL);
-	g_return_if_fail (header_value != NULL);
-
-	CM_CLASS (medium)->add_header (medium, header_name, header_value);
-}
-
-static void
-set_header (CamelMedium *medium, const gchar *header_name, const void *header_value)
-{
-	g_warning("No %s::set_header implemented, setting %s", gtk_type_name(((GtkObject *)medium)->klass->type), header_name);
-}
-
-/**
- * camel_medium_set_header:
- * @medium: a CamelMedium
- * @header_name: name of the header
- * @header_value: value of the header
- *
- * Sets the value of a header.  Any other occurances of the header
- * will be removed.
- **/
-void
-camel_medium_set_header (CamelMedium *medium, const gchar *header_name, const void *header_value)
-{
-	g_return_if_fail (CAMEL_IS_MEDIUM (medium));
-	g_return_if_fail (header_name != NULL);
-	g_return_if_fail (header_value != NULL);
-
-	CM_CLASS (medium)->add_header (medium, header_name, header_value);
-}
-
-static void
-remove_header (CamelMedium *medium, const gchar *header_name)
-{
-	g_warning("No %s::remove_header implemented, removing %s", gtk_type_name(((GtkObject *)medium)->klass->type), header_name);
-}
-
-/**
- * camel_medium_remove_header:
- * @medium: a medium
- * @header_name: the name of the header
- *
- * Removes the named header from the medium.  All occurances of the
- * header are removed.
- **/
-void
-camel_medium_remove_header (CamelMedium *medium, const gchar *header_name)
-{
-	g_return_if_fail (CAMEL_IS_MEDIUM (medium));
-	g_return_if_fail (header_name != NULL);
-
-	CM_CLASS (medium)->remove_header (medium, header_name);
-}
-
-
-static const void *
-get_header (CamelMedium *medium, const gchar *header_name)
-{
-	g_warning("No %s::get_header implemented, getting %s", gtk_type_name(((GtkObject *)medium)->klass->type), header_name);
-	return NULL;
-}
-
-/**
- * camel_medium_get_header:
- * @medium: a medium
- * @header_name: the name of the header
- *
- * Returns the value of the named header in the medium, or %NULL if
- * it is unset. The caller should not modify or free the data.
- *
- * FIXME: What if the header occurs more than once?
- *
- * Return value: the value of the named header, or %NULL
- **/
-const void *
-camel_medium_get_header (CamelMedium *medium, const gchar *header_name)
-{
-	g_return_val_if_fail (CAMEL_IS_MEDIUM (medium), NULL);
-	g_return_val_if_fail (header_name != NULL, NULL);
-
-#warning No way to get multi-valued headers?
-
-	return CM_CLASS (medium)->get_header (medium, header_name);
-}
-
-
-static CamelDataWrapper *
-get_content_object (CamelMedium *medium)
-{
-	return medium->content;
-}
-
-/**
- * camel_medium_get_content_object:
- * @medium: a medium
- *
- * Returns a data wrapper that represents the content of the medium,
- * without its headers.
- *
- * Return value: the medium's content object.
- **/
-CamelDataWrapper *
-camel_medium_get_content_object (CamelMedium *medium)
-{
-	g_return_val_if_fail (CAMEL_IS_MEDIUM (medium), NULL);
-
-	return CM_CLASS (medium)->get_content_object (medium);
-}
-
-
-static void
-set_content_object (CamelMedium *medium, CamelDataWrapper *content)
-{
-	if (medium->content)
-		gtk_object_unref (GTK_OBJECT (medium->content));
-	gtk_object_ref (GTK_OBJECT (content));
-	medium->content = content;
-}
-
-/**
- * camel_medium_set_content_object:
- * @medium: a medium
- * @content: a data wrapper representing the medium's content
- *
- * Sets the content of @medium to be @content.
- **/
-void
-camel_medium_set_content_object (CamelMedium *medium,
-				 CamelDataWrapper *content)
-{
-	g_return_if_fail (CAMEL_IS_MEDIUM (medium));
-	g_return_if_fail (CAMEL_IS_DATA_WRAPPER (content));
-
-	CM_CLASS (medium)->set_content_object (medium, content);
-}
diff --git a/camel/camel-medium.h b/camel/camel-medium.h
deleted file mode 100644
index 2b6f77f825..0000000000
--- a/camel/camel-medium.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-medium.h : class for a medium object */
-
-/*
- *
- * Authors:  Bertrand Guiheneuf 
- *	     Michael Zucchi 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef CAMEL_MEDIUM_H
-#define CAMEL_MEDIUM_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include 
-
-#define CAMEL_MEDIUM_TYPE     (camel_medium_get_type ())
-#define CAMEL_MEDIUM(obj)     (GTK_CHECK_CAST((obj), CAMEL_MEDIUM_TYPE, CamelMedium))
-#define CAMEL_MEDIUM_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_MEDIUM_TYPE, CamelMediumClass))
-#define CAMEL_IS_MEDIUM(o)    (GTK_CHECK_TYPE((o), CAMEL_MEDIUM_TYPE))
-
-
-struct _CamelMedium
-{
-	CamelDataWrapper parent_object;
-
-	/* The content of the medium, as opposed to our parent
-	 * CamelDataWrapper, which wraps both the headers and the
-	 * content.
-	 */
-	CamelDataWrapper *content;
-
-};
-
-
-
-typedef struct {
-	CamelDataWrapperClass parent_class;
-
-	/* Virtual methods */
-	void  (*add_header) (CamelMedium *medium, const gchar *header_name, const void *header_value);
-	void  (*set_header) (CamelMedium *medium, const gchar *header_name, const void *header_value);
-	void  (*remove_header) (CamelMedium *medium, const gchar *header_name);
-	const void * (*get_header) (CamelMedium *medium,  const gchar *header_name);
-
-	CamelDataWrapper * (*get_content_object) (CamelMedium *medium);
-	void (*set_content_object) (CamelMedium *medium, CamelDataWrapper *content);
-
-} CamelMediumClass;
-
-/* Standard Gtk function */
-GtkType camel_medium_get_type (void);
-
-/* Header get/set interface */
-void camel_medium_add_header (CamelMedium *medium, const gchar *header_name, const void *header_value);
-void camel_medium_set_header (CamelMedium *medium, const gchar *header_name, const void *header_value);
-void camel_medium_remove_header (CamelMedium *medium, const gchar *header_name);
-const void *camel_medium_get_header (CamelMedium *medium, const gchar *header_name);
-
-/* accessor methods */
-CamelDataWrapper *camel_medium_get_content_object (CamelMedium *medium);
-void camel_medium_set_content_object (CamelMedium *medium,
-				      CamelDataWrapper *content);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_MEDIUM_H */
-
diff --git a/camel/camel-mime-filter-basic.c b/camel/camel-mime-filter-basic.c
deleted file mode 100644
index 60566abf4e..0000000000
--- a/camel/camel-mime-filter-basic.c
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- *  Copyright (C) 2000 Helix Code Inc.
- *
- *  Authors: Michael Zucchi 
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Library General Public License
- *  as published by the Free Software Foundation; either version 2 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU Library General Public License for more details.
- *
- *  You should have received a copy of the GNU Library General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include "camel-mime-filter-basic.h"
-
-#include "camel-mime-utils.h"
-
-static void camel_mime_filter_basic_class_init (CamelMimeFilterBasicClass *klass);
-static void camel_mime_filter_basic_init       (CamelMimeFilterBasic *obj);
-
-static CamelMimeFilterClass *camel_mime_filter_basic_parent;
-
-enum SIGNALS {
-	LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-guint
-camel_mime_filter_basic_get_type (void)
-{
-	static guint type = 0;
-	
-	if (!type) {
-		GtkTypeInfo type_info = {
-			"CamelMimeFilterBasic",
-			sizeof (CamelMimeFilterBasic),
-			sizeof (CamelMimeFilterBasicClass),
-			(GtkClassInitFunc) camel_mime_filter_basic_class_init,
-			(GtkObjectInitFunc) camel_mime_filter_basic_init,
-			(GtkArgSetFunc) NULL,
-			(GtkArgGetFunc) NULL
-		};
-		
-		type = gtk_type_unique (camel_mime_filter_get_type (), &type_info);
-	}
-	
-	return type;
-}
-
-static void
-finalise(GtkObject *o)
-{
-	((GtkObjectClass *)camel_mime_filter_basic_parent)->finalize (o);
-}
-
-/* should this 'flush' outstanding state/data bytes? */
-static void
-reset(CamelMimeFilter *mf)
-{
-	CamelMimeFilterBasic *f = (CamelMimeFilterBasic *)mf;
-
-	f->state = 0;
-	f->save = 0;
-}
-
-static void
-complete(CamelMimeFilter *mf, char *in, size_t len, size_t prespace, char **out, size_t *outlen, size_t *outprespace)
-{
-	CamelMimeFilterBasic *f = (CamelMimeFilterBasic *)mf;
-	int newlen;
-
-	switch(f->type) {
-	case CAMEL_MIME_FILTER_BASIC_BASE64_ENC:
-		/* wont go to more than 2x size (overly conservative) */
-		camel_mime_filter_set_size(mf, len*2, FALSE);
-		newlen = base64_encode_close(in, len, mf->outbuf, &f->state, &f->save);
-		break;
-	case CAMEL_MIME_FILTER_BASIC_QP_ENC:
-		/* FIXME: *3 is probably not quite enough ... */
-		camel_mime_filter_set_size(mf, len*3, FALSE);
-		newlen = quoted_encode_close(in, len, mf->outbuf, &f->state, &f->save);
-		break;
-	case CAMEL_MIME_FILTER_BASIC_BASE64_DEC:
-		/* output can't possibly exceed the input size */
-		camel_mime_filter_set_size(mf, len, FALSE);
-		newlen = base64_decode_step(in, len, mf->outbuf, &f->state, &f->save);
-		break;
-	case CAMEL_MIME_FILTER_BASIC_QP_DEC:
-		/* output can't possibly exceed the input size */
-		camel_mime_filter_set_size(mf, len, FALSE);
-		newlen = quoted_decode_step(in, len, mf->outbuf, &f->state, &f->save);
-		break;
-	default:
-		g_warning("unknown type %d in CamelMimeFilterBasic", f->type);
-		goto donothing;
-	}
-
-	*out = mf->outbuf;
-	*outlen = newlen;
-	*outprespace = mf->outpre;
-
-	return;
-donothing:
-	*out = in;
-	*outlen = len;
-	*outprespace = prespace;
-}
-
-/* here we do all of the basic mime filtering */
-static void
-filter(CamelMimeFilter *mf, char *in, size_t len, size_t prespace, char **out, size_t *outlen, size_t *outprespace)
-{
-	CamelMimeFilterBasic *f = (CamelMimeFilterBasic *)mf;
-	int newlen;
-
-	switch(f->type) {
-	case CAMEL_MIME_FILTER_BASIC_BASE64_ENC:
-		/* wont go to more than 2x size (overly conservative) */
-		camel_mime_filter_set_size(mf, len*2, FALSE);
-		newlen = base64_encode_step(in, len, mf->outbuf, &f->state, &f->save);
-		break;
-	case CAMEL_MIME_FILTER_BASIC_QP_ENC:
-		/* FIXME: *3 is probably not quite enough ... */
-		camel_mime_filter_set_size(mf, len*3, FALSE);
-		newlen = quoted_encode_step(in, len, mf->outbuf, &f->state, &f->save);
-		break;
-	case CAMEL_MIME_FILTER_BASIC_BASE64_DEC:
-		/* output can't possibly exceed the input size */
-		camel_mime_filter_set_size(mf, len, FALSE);
-		newlen = base64_decode_step(in, len, mf->outbuf, &f->state, &f->save);
-		break;
-	case CAMEL_MIME_FILTER_BASIC_QP_DEC:
-		/* output can't possibly exceed the input size */
-		camel_mime_filter_set_size(mf, len, FALSE);
-		newlen = quoted_decode_step(in, len, mf->outbuf, &f->state, &f->save);
-		break;
-	default:
-		g_warning("unknown type %d in CamelMimeFilterBasic", f->type);
-		goto donothing;
-	}
-
-	*out = mf->outbuf;
-	*outlen = newlen;
-	*outprespace = mf->outpre;
-
-	return;
-donothing:
-	*out = in;
-	*outlen = len;
-	*outprespace = prespace;
-}
-
-static void
-camel_mime_filter_basic_class_init (CamelMimeFilterBasicClass *klass)
-{
-	GtkObjectClass *object_class = (GtkObjectClass *) klass;
-	CamelMimeFilterClass *filter_class = (CamelMimeFilterClass *) klass;
-	
-	camel_mime_filter_basic_parent = gtk_type_class (camel_mime_filter_get_type ());
-
-	object_class->finalize = finalise;
-
-	filter_class->reset = reset;
-	filter_class->filter = filter;
-	filter_class->complete = complete;
-
-	gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
-}
-
-static void
-camel_mime_filter_basic_init (CamelMimeFilterBasic *obj)
-{
-	obj->state = 0;
-	obj->save = 0;
-}
-
-/**
- * camel_mime_filter_basic_new:
- *
- * Create a new CamelMimeFilterBasic object.
- * 
- * Return value: A new CamelMimeFilterBasic widget.
- **/
-CamelMimeFilterBasic *
-camel_mime_filter_basic_new (void)
-{
-	CamelMimeFilterBasic *new = CAMEL_MIME_FILTER_BASIC ( gtk_type_new (camel_mime_filter_basic_get_type ()));
-	return new;
-}
-
-CamelMimeFilterBasic *
-camel_mime_filter_basic_new_type(CamelMimeFilterBasicType type)
-{
-	CamelMimeFilterBasic *new;
-
-	switch (type) {
-	case CAMEL_MIME_FILTER_BASIC_BASE64_ENC:
-	case CAMEL_MIME_FILTER_BASIC_QP_ENC:
-	case CAMEL_MIME_FILTER_BASIC_BASE64_DEC:
-	case CAMEL_MIME_FILTER_BASIC_QP_DEC:
-		new = camel_mime_filter_basic_new();
-		new->type = type;
-		break;
-	default:
-		g_warning("Invalid type of CamelMimeFilterBasic requested: %d", type);
-		new = NULL;
-		break;
-	}
-	return new;
-}
-
diff --git a/camel/camel-mime-filter-basic.h b/camel/camel-mime-filter-basic.h
deleted file mode 100644
index f700997fd2..0000000000
--- a/camel/camel-mime-filter-basic.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- *  Copyright (C) 2000 Helix Code Inc.
- *
- *  Authors: Michael Zucchi 
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Library General Public License
- *  as published by the Free Software Foundation; either version 2 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU Library General Public License for more details.
- *
- *  You should have received a copy of the GNU Library General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef _CAMEL_MIME_FILTER_BASIC_H
-#define _CAMEL_MIME_FILTER_BASIC_H
-
-#include 
-
-#define CAMEL_MIME_FILTER_BASIC(obj)         GTK_CHECK_CAST (obj, camel_mime_filter_basic_get_type (), CamelMimeFilterBasic)
-#define CAMEL_MIME_FILTER_BASIC_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, camel_mime_filter_basic_get_type (), CamelMimeFilterBasicClass)
-#define IS_CAMEL_MIME_FILTER_BASIC(obj)      GTK_CHECK_TYPE (obj, camel_mime_filter_basic_get_type ())
-
-typedef struct _CamelMimeFilterBasicClass CamelMimeFilterBasicClass;
-
-typedef enum {
-	CAMEL_MIME_FILTER_BASIC_BASE64_ENC = 1,
-	CAMEL_MIME_FILTER_BASIC_BASE64_DEC,
-	CAMEL_MIME_FILTER_BASIC_QP_ENC,
-	CAMEL_MIME_FILTER_BASIC_QP_DEC,
-} CamelMimeFilterBasicType;
-
-struct _CamelMimeFilterBasic {
-	CamelMimeFilter parent;
-
-	struct _CamelMimeFilterBasicPrivate *priv;
-
-	CamelMimeFilterBasicType type;
-
-	int state;
-	int save;
-};
-
-struct _CamelMimeFilterBasicClass {
-	CamelMimeFilterClass parent_class;
-};
-
-guint		camel_mime_filter_basic_get_type	(void);
-CamelMimeFilterBasic      *camel_mime_filter_basic_new	(void);
-CamelMimeFilterBasic      *camel_mime_filter_basic_new_type	(CamelMimeFilterBasicType type);
-
-#endif /* ! _CAMEL_MIME_FILTER_BASIC_H */
diff --git a/camel/camel-mime-filter-charset.c b/camel/camel-mime-filter-charset.c
deleted file mode 100644
index eb9db60802..0000000000
--- a/camel/camel-mime-filter-charset.c
+++ /dev/null
@@ -1,243 +0,0 @@
-/*
- *  Copyright (C) 2000 Helix Code Inc.
- *
- *  Authors: Michael Zucchi 
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Library General Public License
- *  as published by the Free Software Foundation; either version 2 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU Library General Public License for more details.
- *
- *  You should have received a copy of the GNU Library General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-
-#include 
-
-#include 
-#include 
-
-#include "camel-mime-filter-charset.h"
-
-
-static void camel_mime_filter_charset_class_init (CamelMimeFilterCharsetClass *klass);
-static void camel_mime_filter_charset_init       (CamelMimeFilterCharset *obj);
-
-static CamelMimeFilterClass *camel_mime_filter_charset_parent;
-
-enum SIGNALS {
-	LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-guint
-camel_mime_filter_charset_get_type (void)
-{
-	static guint type = 0;
-	
-	if (!type) {
-		GtkTypeInfo type_info = {
-			"CamelMimeFilterCharset",
-			sizeof (CamelMimeFilterCharset),
-			sizeof (CamelMimeFilterCharsetClass),
-			(GtkClassInitFunc) camel_mime_filter_charset_class_init,
-			(GtkObjectInitFunc) camel_mime_filter_charset_init,
-			(GtkArgSetFunc) NULL,
-			(GtkArgGetFunc) NULL
-		};
-		
-		type = gtk_type_unique (camel_mime_filter_get_type (), &type_info);
-	}
-	
-	return type;
-}
-
-static void
-finalise(GtkObject *o)
-{
-	CamelMimeFilterCharset *f = (CamelMimeFilterCharset *)o;
-
-	g_free(f->from);
-	g_free(f->to);
-	if (f->ic != (unicode_iconv_t)-1) {
-		unicode_iconv_close(f->ic);
-		f->ic = (unicode_iconv_t) -1;
-	}
-
-	((GtkObjectClass *)camel_mime_filter_charset_parent)->finalize (o);
-}
-
-static void
-reset(CamelMimeFilter *mf)
-{
-	CamelMimeFilterCharset *f = (CamelMimeFilterCharset *)mf;
-	char buf[16];
-	char *buffer;
-	int outlen = 16;
-
-	/* what happens with the output bytes if this resets the state? */
-	if (f->ic != (unicode_iconv_t) -1) {
-		buffer = buf;
-		unicode_iconv(f->ic, NULL, 0, &buffer, &outlen);
-	}
-}
-
-static void
-complete(CamelMimeFilter *mf, char *in, size_t len, size_t prespace, char **out, size_t *outlenptr, size_t *outprespace)
-{
-	CamelMimeFilterCharset *f = (CamelMimeFilterCharset *)mf;
-	int converted;
-	char *inbuf, *outbuf;
-	int inlen, outlen;
-
-	if (f->ic == (unicode_iconv_t) -1) {
-		goto donothing;
-	}
-
-	/* FIXME: there's probably a safer way to size this ...? */
-	/* We could always resize if we run out of room in outbuf (but it'd be nice not
-	   to have to) */
-	camel_mime_filter_set_size(mf, len*5, FALSE);
-	inbuf = in;
-	inlen = len;
-	outbuf = mf->outbuf;
-	outlen = mf->outsize;
-	if (inlen>0) {
-		converted = unicode_iconv(f->ic, &inbuf, &inlen, &outbuf, &outlen);
-		if (converted == -1) {
-			if (errno != EINVAL) {
-				g_warning("error occured converting: %s", strerror(errno));
-				goto donothing;
-			}
-		}
-
-		if (inlen>0) {
-			g_warning("Output lost in character conversion, invalid sequence encountered?");
-		}
-	}
-
-	/* this 'resets' the output stream, returning back to the initial
-	   shift state for multishift charactersets */
-	converted = unicode_iconv(f->ic, NULL, 0, &outbuf, &outlen);
-	if (converted == -1) {
-		g_warning("Conversion failed to complete: %s", strerror(errno));
-	}
-
-	*out = mf->outbuf;
-	*outlenptr = mf->outsize - outlen;
-	*outprespace = mf->outpre;
-	return;
-
-donothing:
-	*out = in;
-	*outlenptr = len;
-	*outprespace = prespace;
-}
-
-static void
-filter(CamelMimeFilter *mf, char *in, size_t len, size_t prespace, char **out, size_t *outlenptr, size_t *outprespace)
-{
-	CamelMimeFilterCharset *f = (CamelMimeFilterCharset *)mf;
-	int converted;
-	char *inbuf, *outbuf;
-	int inlen, outlen;
-
-	if (f->ic == (unicode_iconv_t) -1) {
-		goto donothing;
-	}
-
-	/* FIXME: there's probably a safer way to size this ...? */
-	camel_mime_filter_set_size(mf, len*5, FALSE);
-	inbuf = in;
-	inlen = len;
-	outbuf = mf->outbuf;
-	outlen = mf->outsize;
-	converted = unicode_iconv(f->ic, &inbuf, &inlen, &outbuf, &outlen);
-	if (converted == -1) {
-		if (errno != EINVAL) {
-			g_warning("error occured converting: %s", strerror(errno));
-			goto donothing;
-		}
-	}
-
-	/*
-	  NOTE: This assumes EINVAL only occurs because we ran out of
-	  bytes for a multibyte sequence, if not, we're in trouble.
-	*/
-
-	if (inlen>0) {
-		camel_mime_filter_backup(mf, inbuf, inlen);
-	}
-
-	*out = mf->outbuf;
-	*outlenptr = mf->outsize - outlen;
-	*outprespace = mf->outpre;
-	return;
-
-donothing:
-	*out = in;
-	*outlenptr = len;
-	*outprespace = prespace;
-}
-
-static void
-camel_mime_filter_charset_class_init (CamelMimeFilterCharsetClass *klass)
-{
-	GtkObjectClass *object_class = (GtkObjectClass *) klass;
-	CamelMimeFilterClass *filter_class = (CamelMimeFilterClass *) klass;
-	
-	camel_mime_filter_charset_parent = gtk_type_class (camel_mime_filter_get_type ());
-
-	object_class->finalize = finalise;
-
-	filter_class->reset = reset;
-	filter_class->filter = filter;
-	filter_class->complete = complete;
-
-	gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
-}
-
-static void
-camel_mime_filter_charset_init (CamelMimeFilterCharset *obj)
-{
-	obj->ic = (unicode_iconv_t)-1;
-}
-
-/**
- * camel_mime_filter_charset_new:
- *
- * Create a new CamelMimeFilterCharset object.
- * 
- * Return value: A new CamelMimeFilterCharset widget.
- **/
-CamelMimeFilterCharset *
-camel_mime_filter_charset_new (void)
-{
-	CamelMimeFilterCharset *new = CAMEL_MIME_FILTER_CHARSET ( gtk_type_new (camel_mime_filter_charset_get_type ()));
-	return new;
-}
-
-CamelMimeFilterCharset *
-camel_mime_filter_charset_new_convert(const char *from_charset, const char *to_charset)
-{
-	CamelMimeFilterCharset *new = CAMEL_MIME_FILTER_CHARSET ( gtk_type_new (camel_mime_filter_charset_get_type ()));
-
-	new->ic = unicode_iconv_open(to_charset, from_charset);
-	if (new->ic == (unicode_iconv_t) -1) {
-		g_warning("Cannot create charset conversion from %s to %s: %s", from_charset, to_charset, strerror(errno));
-		gtk_object_unref((GtkObject *)new);
-		new = NULL;
-	} else {
-		new->from = g_strdup(from_charset);
-		new->to = g_strdup(to_charset);
-	}
-	return new;
-}
diff --git a/camel/camel-mime-filter-charset.h b/camel/camel-mime-filter-charset.h
deleted file mode 100644
index 866a9fd6bf..0000000000
--- a/camel/camel-mime-filter-charset.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- *  Copyright (C) 2000 Helix Code Inc.
- *
- *  Authors: Michael Zucchi 
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Library General Public License
- *  as published by the Free Software Foundation; either version 2 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU Library General Public License for more details.
- *
- *  You should have received a copy of the GNU Library General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef _CAMEL_MIME_FILTER_CHARSET_H
-#define _CAMEL_MIME_FILTER_CHARSET_H
-
-#include 
-#include 
-
-#define CAMEL_MIME_FILTER_CHARSET(obj)         GTK_CHECK_CAST (obj, camel_mime_filter_charset_get_type (), CamelMimeFilterCharset)
-#define CAMEL_MIME_FILTER_CHARSET_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, camel_mime_filter_charset_get_type (), CamelMimeFilterCharsetClass)
-#define IS_CAMEL_MIME_FILTER_CHARSET(obj)      GTK_CHECK_TYPE (obj, camel_mime_filter_charset_get_type ())
-
-typedef struct _CamelMimeFilterCharsetClass CamelMimeFilterCharsetClass;
-
-struct _CamelMimeFilterCharset {
-	CamelMimeFilter parent;
-
-	struct _CamelMimeFilterCharsetPrivate *priv;
-
-	unicode_iconv_t ic;
-	char *from;
-	char *to;
-};
-
-struct _CamelMimeFilterCharsetClass {
-	CamelMimeFilterClass parent_class;
-};
-
-guint		camel_mime_filter_charset_get_type	(void);
-CamelMimeFilterCharset      *camel_mime_filter_charset_new	(void);
-
-CamelMimeFilterCharset      *camel_mime_filter_charset_new_convert	(const char *from_charset, const char *to_charset);
-
-#endif /* ! _CAMEL_MIME_FILTER_CHARSET_H */
diff --git a/camel/camel-mime-filter-from.c b/camel/camel-mime-filter-from.c
deleted file mode 100644
index 719b9d708a..0000000000
--- a/camel/camel-mime-filter-from.c
+++ /dev/null
@@ -1,243 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- *  Copyright (C) 2000 Helix Code Inc.
- *
- *  Authors: Michael Zucchi 
- *
- *  This program is free software; you can redistribute it and/or 
- *  modify it under the terms of the GNU General Public License as 
- *  published by the Free Software Foundation; either version 2 of the
- *  License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- *  USA
- */
-
-#include "camel-mime-filter-from.h"
-#include 
-
-#define d(x)
-
-struct _CamelMimeFilterFromPrivate {
-};
-
-#define _PRIVATE(o) (((CamelMimeFilterFrom *)(o))->priv)
-
-static void camel_mime_filter_from_class_init (CamelMimeFilterFromClass *klass);
-static void camel_mime_filter_from_init       (CamelMimeFilterFrom *obj);
-static void camel_mime_filter_from_finalise   (GtkObject *obj);
-
-static CamelMimeFilterClass *camel_mime_filter_from_parent;
-
-enum SIGNALS {
-	LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-guint
-camel_mime_filter_from_get_type (void)
-{
-	static guint type = 0;
-	
-	if (!type) {
-		GtkTypeInfo type_info = {
-			"CamelMimeFilterFrom",
-			sizeof (CamelMimeFilterFrom),
-			sizeof (CamelMimeFilterFromClass),
-			(GtkClassInitFunc) camel_mime_filter_from_class_init,
-			(GtkObjectInitFunc) camel_mime_filter_from_init,
-			(GtkArgSetFunc) NULL,
-			(GtkArgGetFunc) NULL
-		};
-		
-		type = gtk_type_unique (camel_mime_filter_get_type (), &type_info);
-	}
-	
-	return type;
-}
-
-struct fromnode {
-	struct fromnode *next;
-	char *pointer;
-};
-
-static void
-complete(CamelMimeFilter *mf, char *in, size_t len, size_t prespace, char **out, size_t *outlen, size_t *outprespace)
-{
-	*out = in;
-	*outlen = len;
-	*outprespace = prespace;
-}
-
-/* Yes, it is complicated ... */
-static void
-filter(CamelMimeFilter *mf, char *in, size_t len, size_t prespace, char **out, size_t *outlen, size_t *outprespace)
-{
-	CamelMimeFilterFrom *f = (CamelMimeFilterFrom *)mf;
-	register char *inptr, *inend;
-	int left;
-	int midline = f->midline;
-	int fromcount = 0;
-	struct fromnode *head = NULL, *tail = (struct fromnode *)&head, *node;
-	char *outptr;
-
-	inptr = in;
-	inend = inptr+len;
-
-	d(printf("Filtering '%.*s'\n", len, in));
-
-	/* first, see if we need to escape any from's */
-	while (inptr 0) {
-				midline = TRUE;
-				if (left < 5) {
-					if (inptr[0] == 'F') {
-						camel_mime_filter_backup(mf, inptr, left);
-						midline = FALSE;
-						inend = inptr;
-						break;
-					}
-				} else {
-					if (!strncmp(inptr, "From ", 5)) {
-						fromcount++;
-						/* yes, we do alloc them on the stack ... at most we're going to get
-						   len / 7 of them anyway */
-						node = alloca(sizeof(*node));
-						node->pointer = inptr;
-						node->next = NULL;
-						tail->next = node;
-						tail = node;
-						inptr += 5;
-					}
-				}
-			} else {
-				/* \n is at end of line, check next buffer */
-				midline = FALSE;
-			}
-		}
-	}
-
-	f->midline = midline;
-
-	if (fromcount > 0) {
-		camel_mime_filter_set_size(mf, len + fromcount, FALSE);
-		node = head;
-		inptr = in;
-		outptr = mf->outbuf;
-		while (node) {
-			memcpy(outptr, inptr, node->pointer - inptr);
-			outptr += node->pointer - inptr;
-			*outptr++ = '>';
-			inptr = node->pointer;
-			node = node->next;
-		}
-		memcpy(outptr, inptr, inend - inptr);
-		outptr += inend - inptr;
-		*out = mf->outbuf;
-		*outlen = outptr - mf->outbuf;
-		*outprespace = mf->outbuf - mf->outreal;
-
-		d(printf("Filtered '%.*s'\n", *outlen, *out));
-	} else {
-		*out = in;
-		*outlen = inend - in;
-		*outprespace = prespace;
-		
-		d(printf("Filtered '%.*s'\n", *outlen, *out));
-	}
-}
-
-static void
-camel_mime_filter_from_class_init (CamelMimeFilterFromClass *klass)
-{
-	GtkObjectClass *object_class = (GtkObjectClass *) klass;
-	CamelMimeFilterClass *filter_class = (CamelMimeFilterClass *) klass;
-	
-	camel_mime_filter_from_parent = gtk_type_class (camel_mime_filter_get_type ());
-
-	object_class->finalize = camel_mime_filter_from_finalise;
-
-	filter_class->filter = filter;
-	filter_class->complete = complete;
-
-	gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
-}
-
-static void
-camel_mime_filter_from_init (CamelMimeFilterFrom *obj)
-{
-	struct _CamelMimeFilterFromPrivate *p;
-
-	p = _PRIVATE(obj) = g_malloc0(sizeof(*p));
-	obj->midline = FALSE;
-}
-
-static void
-camel_mime_filter_from_finalise (GtkObject *obj)
-{
-	((GtkObjectClass *)(camel_mime_filter_from_parent))->finalize((GtkObject *)obj);
-}
-
-/**
- * camel_mime_filter_from_new:
- *
- * Create a new CamelMimeFilterFrom object.
- * 
- * Return value: A new CamelMimeFilterFrom widget.
- **/
-CamelMimeFilterFrom *
-camel_mime_filter_from_new (void)
-{
-	CamelMimeFilterFrom *new = CAMEL_MIME_FILTER_FROM ( gtk_type_new (camel_mime_filter_from_get_type ()));
-	return new;
-}
-
-#if 0
-
-#include 
-
-int main(int argc, char **argv)
-{
-	CamelMimeFilterFrom *f;
-	char *buffer;
-	int len, prespace;
-
-	gtk_init(&argc, &argv);
-
-
-	f = camel_mime_filter_from_new();
-
-	buffer = "This is a test\nFrom Someone\nTo someone. From Someone else, From\n From blah\nFromblah\nBye! \nFrom ";
-	len = strlen(buffer);
-	prespace = 0;
-
-	printf("input = '%.*s'\n", len, buffer);
-	camel_mime_filter_filter(f, buffer, len, prespace, &buffer, &len, &prespace);
-	printf("output = '%.*s'\n", len, buffer);
-	buffer = "";
-	len = 0;
-	prespace = 0;
-	camel_mime_filter_complete(f, buffer, len, prespace, &buffer, &len, &prespace);
-	printf("complete = '%.*s'\n", len, buffer);
-	
-
-	return 0;
-}
-
-#endif
diff --git a/camel/camel-mime-filter-from.h b/camel/camel-mime-filter-from.h
deleted file mode 100644
index 2a97bcc0f0..0000000000
--- a/camel/camel-mime-filter-from.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- *  Copyright (C) 2000 Helix Code Inc.
- *
- *  Authors: Michael Zucchi 
- *
- *  This program is free software; you can redistribute it and/or 
- *  modify it under the terms of the GNU General Public License as 
- *  published by the Free Software Foundation; either version 2 of the
- *  License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- *  USA
- */
-
-#ifndef _CAMEL_MIME_FILTER_FROM_H
-#define _CAMEL_MIME_FILTER_FROM_H
-
-#include 
-#include 
-
-#define CAMEL_MIME_FILTER_FROM(obj)         GTK_CHECK_CAST (obj, camel_mime_filter_from_get_type (), CamelMimeFilterFrom)
-#define CAMEL_MIME_FILTER_FROM_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, camel_mime_filter_from_get_type (), CamelMimeFilterFromClass)
-#define IS_CAMEL_MIME_FILTER_FROM(obj)      GTK_CHECK_TYPE (obj, camel_mime_filter_from_get_type ())
-
-typedef struct _CamelMimeFilterFrom      CamelMimeFilterFrom;
-typedef struct _CamelMimeFilterFromClass CamelMimeFilterFromClass;
-
-struct _CamelMimeFilterFrom {
-	CamelMimeFilter parent;
-
-	struct _CamelMimeFilterFromPrivate *priv;
-
-	int midline;		/* are we between lines? */
-};
-
-struct _CamelMimeFilterFromClass {
-	CamelMimeFilterClass parent_class;
-};
-
-guint		camel_mime_filter_from_get_type	(void);
-CamelMimeFilterFrom      *camel_mime_filter_from_new	(void);
-
-#endif /* ! _CAMEL_MIME_FILTER_FROM_H */
diff --git a/camel/camel-mime-filter-index.c b/camel/camel-mime-filter-index.c
deleted file mode 100644
index 53a9f72920..0000000000
--- a/camel/camel-mime-filter-index.c
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- *  Copyright (C) 2000 Helix Code Inc.
- *
- *  Authors: Michael Zucchi 
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Library General Public License
- *  as published by the Free Software Foundation; either version 2 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU Library General Public License for more details.
- *
- *  You should have received a copy of the GNU Library General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include "camel-mime-filter-index.h"
-
-
-static void camel_mime_filter_index_class_init (CamelMimeFilterIndexClass *klass);
-static void camel_mime_filter_index_init       (CamelMimeFilterIndex *obj);
-
-static CamelMimeFilterClass *camel_mime_filter_index_parent;
-
-enum SIGNALS {
-	LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-guint
-camel_mime_filter_index_get_type (void)
-{
-	static guint type = 0;
-	
-	if (!type) {
-		GtkTypeInfo type_info = {
-			"CamelMimeFilterIndex",
-			sizeof (CamelMimeFilterIndex),
-			sizeof (CamelMimeFilterIndexClass),
-			(GtkClassInitFunc) camel_mime_filter_index_class_init,
-			(GtkObjectInitFunc) camel_mime_filter_index_init,
-			(GtkArgSetFunc) NULL,
-			(GtkArgGetFunc) NULL
-		};
-		
-		type = gtk_type_unique (camel_mime_filter_get_type (), &type_info);
-	}
-	
-	return type;
-}
-
-static void
-finalise(GtkObject *o)
-{
-	CamelMimeFilterIndex *f = (CamelMimeFilterIndex *)o;
-
-	g_free(f->name);
-	f->index = NULL;	/* ibex's need refcounting? */
-
-	((GtkObjectClass *)camel_mime_filter_index_parent)->finalize (o);
-}
-
-static void
-complete(CamelMimeFilter *mf, char *in, size_t len, size_t prespace, char **out, size_t *outlenptr, size_t *outprespace)
-{
-	CamelMimeFilterIndex *f = (CamelMimeFilterIndex *)mf;
-
-	if (f->index == NULL || f->name==NULL) {
-		goto donothing;
-	}
-
-	ibex_index_buffer(f->index, f->name, in, len, NULL);
-
-donothing:
-	*out = in;
-	*outlenptr = len;
-	*outprespace = prespace;
-}
-
-static void
-filter(CamelMimeFilter *mf, char *in, size_t len, size_t prespace, char **out, size_t *outlenptr, size_t *outprespace)
-{
-	CamelMimeFilterIndex *f = (CamelMimeFilterIndex *)mf;
-	int inleft = 0;
-
-	if (f->index == NULL || f->name==NULL) {
-		goto donothing;
-	}
-
-	ibex_index_buffer(f->index, f->name, in, len, &inleft);
-
-	if (inleft>0) {
-		camel_mime_filter_backup(mf, in+(len-inleft), inleft);
-	}
-
-	*out = in;
-	*outlenptr = len-inleft;
-	*outprespace = prespace;
-	return;
-
-donothing:
-	*out = in;
-	*outlenptr = len;
-	*outprespace = prespace;
-}
-
-static void
-camel_mime_filter_index_class_init (CamelMimeFilterIndexClass *klass)
-{
-	GtkObjectClass *object_class = (GtkObjectClass *) klass;
-	CamelMimeFilterClass *filter_class = (CamelMimeFilterClass *) klass;
-	
-	camel_mime_filter_index_parent = gtk_type_class (camel_mime_filter_get_type ());
-
-	object_class->finalize = finalise;
-
-	/*filter_class->reset = reset;*/
-	filter_class->filter = filter;
-	filter_class->complete = complete;
-
-	gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
-}
-
-static void
-camel_mime_filter_index_init (CamelMimeFilterIndex *obj)
-{
-}
-
-/**
- * camel_mime_filter_index_new:
- *
- * Create a new CamelMimeFilterIndex object.
- * 
- * Return value: A new CamelMimeFilterIndex widget.
- **/
-CamelMimeFilterIndex *
-camel_mime_filter_index_new (void)
-{
-	CamelMimeFilterIndex *new = CAMEL_MIME_FILTER_INDEX ( gtk_type_new (camel_mime_filter_index_get_type ()));
-	return new;
-}
-
-CamelMimeFilterIndex      *camel_mime_filter_index_new_ibex (ibex *index)
-{
-	CamelMimeFilterIndex *new = camel_mime_filter_index_new();
-
-	if (new) {
-		new->index = index;
-		new->name = g_strdup("");
-	}
-	return new;
-}
-
-/* Set the match name for any indexed words */
-void camel_mime_filter_index_set_name (CamelMimeFilterIndex *mf, char *name)
-{
-	g_free(mf->name);
-	mf->name = g_strdup(name);
-}
-
-void camel_mime_filter_index_set_ibex (CamelMimeFilterIndex *mf, ibex *index)
-{
-	if (mf->index) {
-		char *out;
-		size_t outlen, outspace;
-
-		camel_mime_filter_complete((CamelMimeFilter *)mf, "", 0, 0, &out, &outlen, &outspace);
-	}
-	mf->index = index;
-}
-
-
-
diff --git a/camel/camel-mime-filter-index.h b/camel/camel-mime-filter-index.h
deleted file mode 100644
index 7dcc76b8ea..0000000000
--- a/camel/camel-mime-filter-index.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- *  Copyright (C) 2000 Helix Code Inc.
- *
- *  Authors: Michael Zucchi 
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Library General Public License
- *  as published by the Free Software Foundation; either version 2 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU Library General Public License for more details.
- *
- *  You should have received a copy of the GNU Library General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef _CAMEL_MIME_FILTER_INDEX_H
-#define _CAMEL_MIME_FILTER_INDEX_H
-
-#include 
-#include 
-
-#define CAMEL_MIME_FILTER_INDEX(obj)         GTK_CHECK_CAST (obj, camel_mime_filter_index_get_type (), CamelMimeFilterIndex)
-#define CAMEL_MIME_FILTER_INDEX_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, camel_mime_filter_index_get_type (), CamelMimeFilterIndexClass)
-#define IS_CAMEL_MIME_FILTER_INDEX(obj)      GTK_CHECK_TYPE (obj, camel_mime_filter_index_get_type ())
-
-typedef struct _CamelMimeFilterIndexClass CamelMimeFilterIndexClass;
-
-struct _CamelMimeFilterIndex {
-	CamelMimeFilter parent;
-
-	struct _CamelMimeFilterIndexPrivate *priv;
-
-	ibex *index;
-	char *name;
-};
-
-struct _CamelMimeFilterIndexClass {
-	CamelMimeFilterClass parent_class;
-};
-
-guint		camel_mime_filter_index_get_type	(void);
-CamelMimeFilterIndex      *camel_mime_filter_index_new	(void);
-
-CamelMimeFilterIndex      *camel_mime_filter_index_new_ibex (ibex *);
-
-/* Set the match name for any indexed words */
-void camel_mime_filter_index_set_name (CamelMimeFilterIndex *, char *);
-void camel_mime_filter_index_set_ibex (CamelMimeFilterIndex *mf, ibex *index);
-
-#endif /* ! _CAMEL_MIME_FILTER_INDEX_H */
diff --git a/camel/camel-mime-filter-save.c b/camel/camel-mime-filter-save.c
deleted file mode 100644
index b5b54a2ee6..0000000000
--- a/camel/camel-mime-filter-save.c
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- *  Copyright (C) 2000 Helix Code Inc.
- *
- *  Authors: Michael Zucchi 
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Library General Public License
- *  as published by the Free Software Foundation; either version 2 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU Library General Public License for more details.
- *
- *  You should have received a copy of the GNU Library General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include 
-#include 
-#include 
-#include 
-
-#include 
-#include 
-
-#include "camel-mime-filter-save.h"
-
-static void camel_mime_filter_save_class_init (CamelMimeFilterSaveClass *klass);
-static void camel_mime_filter_save_init       (CamelMimeFilterSave *obj);
-
-static CamelMimeFilterClass *camel_mime_filter_save_parent;
-
-enum SIGNALS {
-	LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-guint
-camel_mime_filter_save_get_type (void)
-{
-	static guint type = 0;
-	
-	if (!type) {
-		GtkTypeInfo type_info = {
-			"CamelMimeFilterSave",
-			sizeof (CamelMimeFilterSave),
-			sizeof (CamelMimeFilterSaveClass),
-			(GtkClassInitFunc) camel_mime_filter_save_class_init,
-			(GtkObjectInitFunc) camel_mime_filter_save_init,
-			(GtkArgSetFunc) NULL,
-			(GtkArgGetFunc) NULL
-		};
-		
-		type = gtk_type_unique (camel_mime_filter_get_type (), &type_info);
-	}
-	
-	return type;
-}
-
-static void
-finalise(GtkObject *o)
-{
-	CamelMimeFilterSave *f = (CamelMimeFilterSave *)o;
-
-	g_free(f->filename);
-	if (f->fd != -1) {
-		/* FIXME: what do we do with failed writes???? */
-		close(f->fd);
-	}
-
-	((GtkObjectClass *)camel_mime_filter_save_parent)->finalize (o);
-}
-
-static void
-reset(CamelMimeFilter *mf)
-{
-	CamelMimeFilterSave *f = (CamelMimeFilterSave *)mf;
-
-	/* i dunno, how do you 'reset' a file?  reopen it? do i care? */
-	if (f->fd != -1){
-		lseek(f->fd, 0, SEEK_SET);
-	}
-}
-
-/* all this code just to support this little trivial filter! */
-static void
-filter(CamelMimeFilter *mf, char *in, size_t len, size_t prespace, char **out, size_t *outlen, size_t *outprespace)
-{
-	CamelMimeFilterSave *f = (CamelMimeFilterSave *)mf;
-
-	if (f->fd != -1) {
-		/* FIXME: check return */
-		int outlen = write(f->fd, in, len);
-		if (outlen != len) {
-			g_warning("could not write to '%s': %s", f->filename?f->filename:"", strerror(errno));
-		}
-	}
-	*out = in;
-	*outlen = len;
-	*outprespace = prespace;
-}
-
-static void
-camel_mime_filter_save_class_init (CamelMimeFilterSaveClass *klass)
-{
-	GtkObjectClass *object_class = (GtkObjectClass *) klass;
-	CamelMimeFilterClass *filter_class = (CamelMimeFilterClass *) klass;
-
-	camel_mime_filter_save_parent = gtk_type_class (camel_mime_filter_get_type ());
-
-	object_class->finalize = finalise;
-
-	filter_class->reset = reset;
-	filter_class->filter = filter;
-
-	gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
-}
-
-static void
-camel_mime_filter_save_init (CamelMimeFilterSave *f)
-{
-	f->fd = -1;
-}
-
-/**
- * camel_mime_filter_save_new:
- *
- * Create a new CamelMimeFilterSave object.
- * 
- * Return value: A new CamelMimeFilterSave widget.
- **/
-CamelMimeFilterSave *
-camel_mime_filter_save_new (void)
-{
-	CamelMimeFilterSave *new = CAMEL_MIME_FILTER_SAVE ( gtk_type_new (camel_mime_filter_save_get_type ()));
-	return new;
-}
-
-CamelMimeFilterSave *
-camel_mime_filter_save_new_name (const char *name, int flags, int mode)
-{
-	CamelMimeFilterSave *new = NULL;
-
-	new = camel_mime_filter_save_new();
-	if (new) {
-		new->fd = open(name, flags, mode);
-		if (new->fd != -1) {
-			new->filename = g_strdup(name);
-		} else {
-			gtk_object_unref((GtkObject *)new);
-			new = NULL;
-		}
-	}
-	return new;
-}
-
diff --git a/camel/camel-mime-filter-save.h b/camel/camel-mime-filter-save.h
deleted file mode 100644
index eb6e448560..0000000000
--- a/camel/camel-mime-filter-save.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- *  Copyright (C) 2000 Helix Code Inc.
- *
- *  Authors: Michael Zucchi 
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Library General Public License
- *  as published by the Free Software Foundation; either version 2 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU Library General Public License for more details.
- *
- *  You should have received a copy of the GNU Library General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef _CAMEL_MIME_FILTER_SAVE_H
-#define _CAMEL_MIME_FILTER_SAVE_H
-
-#include 
-
-#define CAMEL_MIME_FILTER_SAVE(obj)         GTK_CHECK_CAST (obj, camel_mime_filter_save_get_type (), CamelMimeFilterSave)
-#define CAMEL_MIME_FILTER_SAVE_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, camel_mime_filter_save_get_type (), CamelMimeFilterSaveClass)
-#define IS_CAMEL_MIME_FILTER_SAVE(obj)      GTK_CHECK_TYPE (obj, camel_mime_filter_save_get_type ())
-
-typedef struct _CamelMimeFilterSaveClass CamelMimeFilterSaveClass;
-
-struct _CamelMimeFilterSave {
-	CamelMimeFilter parent;
-
-	struct _CamelMimeFilterSavePrivate *priv;
-
-	char *filename;
-	int fd;
-};
-
-struct _CamelMimeFilterSaveClass {
-	CamelMimeFilterClass parent_class;
-};
-
-guint		camel_mime_filter_save_get_type	(void);
-CamelMimeFilterSave      *camel_mime_filter_save_new	(void);
-
-CamelMimeFilterSave *camel_mime_filter_save_new_name (const char *name, int flags, int mode);
-
-#endif /* ! _CAMEL_MIME_FILTER_SAVE_H */
diff --git a/camel/camel-mime-filter-smtp.c b/camel/camel-mime-filter-smtp.c
deleted file mode 100644
index fca4b1684d..0000000000
--- a/camel/camel-mime-filter-smtp.c
+++ /dev/null
@@ -1,286 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- *  Copyright (C) 2000 Helix Code Inc.
- *
- *  Authors: Jeffrey Stedfast 
- *
- *  This program is free software; you can redistribute it and/or 
- *  modify it under the terms of the GNU General Public License as 
- *  published by the Free Software Foundation; either version 2 of the
- *  License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- *  USA
- */
-
-#include "camel-mime-filter-smtp.h"
-#include 
-
-#include 
-
-#define d(x)
-
-struct _CamelMimeFilterSmtpPrivate {
-};
-
-#define _PRIVATE(o) (((CamelMimeFilterSmtp *)(o))->priv)
-
-static void camel_mime_filter_smtp_class_init (CamelMimeFilterSmtpClass *klass);
-static void camel_mime_filter_smtp_init       (CamelMimeFilterSmtp *obj);
-static void camel_mime_filter_smtp_finalise   (GtkObject *obj);
-
-static CamelMimeFilterClass *camel_mime_filter_smtp_parent;
-
-enum SIGNALS {
-	LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-guint
-camel_mime_filter_smtp_get_type (void)
-{
-	static guint type = 0;
-	
-	if (!type) {
-		GtkTypeInfo type_info = {
-			"CamelMimeFilterSmtp",
-			sizeof (CamelMimeFilterSmtp),
-			sizeof (CamelMimeFilterSmtpClass),
-			(GtkClassInitFunc) camel_mime_filter_smtp_class_init,
-			(GtkObjectInitFunc) camel_mime_filter_smtp_init,
-			(GtkArgSetFunc) NULL,
-			(GtkArgGetFunc) NULL
-		};
-		
-		type = gtk_type_unique (camel_mime_filter_get_type (), &type_info);
-	}
-	
-	return type;
-}
-
-typedef enum { EOLN_NODE, DOT_NODE } node_t;
-
-struct smtpnode {
-	struct smtpnode *next;
-	node_t type;
-	char *pointer;
-};
-
-static void
-complete(CamelMimeFilter *mf, char *in, size_t len, size_t prespace, char **out, size_t *outlen, size_t *outprespace)
-{
-	*out = in;
-	*outlen = len;
-	*outprespace = prespace;
-}
-
-
-/* Yes, it is complicated ... */
-static void
-filter(CamelMimeFilter *mf, char *in, size_t len, size_t prespace, char **out, size_t *outlen, size_t *outprespace)
-{
-	CamelMimeFilterSmtp *f = (CamelMimeFilterSmtp *)mf;
-	register gchar *inptr, *inend;
-	guint linecount = 0;
-	guint dotcount = 0;
-	gint left;
-	gint midline = f->midline;
-	struct smtpnode *head = NULL, *tail = (struct smtpnode *)&head, *node;
-	gchar *outptr = NULL;
-
-	inptr = in;
-	inend = inptr + len;
-
-	while (inptr < inend) {
-		register gint c = -1;
-
-		if (midline)
-			while (inptr < inend && (c = *inptr++) != '\n')
-				;
-
-		if (c == '\n' || !midline) {
-			/* if there isn't already a carriage-return before the line-feed, count it */
-			if (*(inptr-1) == '\n' && *(inptr-2) != '\r') {
-				linecount++;
-				node = alloca(sizeof(*node));
-				node->type = EOLN_NODE;
-				node->pointer = inptr - 1;
-				node->next = NULL;
-				tail->next = node;
-				tail = node;
-			}
-
-			left = inend - inptr;
-		        if (left < 2) {
-				if (*inptr == '.') {
-					camel_mime_filter_backup(mf, inptr, left);
-					midline = FALSE;
-					inend = inptr;
-					break;
-				}
-			} else {
-				/* we only need to escape dots if they start the line */
-				if (left > 0 && *inptr == '.' && *(inptr+1) != '.') {
-					midline = TRUE;
-					dotcount++;
-					node = alloca(sizeof(*node));
-					node->type = DOT_NODE;
-					node->pointer = inptr;
-					node->next = NULL;
-					tail->next = node;
-					tail = node;
-					inptr++;
-				} else {
-					midline = TRUE;
-				}
-			}
-		} else {
-			/* \n is at end of line, check next buffer */
-			midline = FALSE;
-		}
-	}
-
-	f->midline = midline;
-
-	if (dotcount > 0 || linecount > 0) {
-		camel_mime_filter_set_size(mf, len + dotcount + linecount, FALSE);
-		node = head;
-		inptr = in;
-		outptr = mf->outbuf;
-		while (node) {
-			if (node->type == EOLN_NODE) {
-				memcpy(outptr, inptr, node->pointer - inptr);
-				outptr += node->pointer - inptr;
-				*outptr++ = '\r';
-			} else {
-				if (node->type == DOT_NODE) {
-					memcpy(outptr, inptr, node->pointer - inptr);
-					outptr += node->pointer - inptr;
-					*outptr++ = '.';
-				}
-			}
-			inptr = node->pointer;
-			node = node->next;
-		}
-		memcpy(outptr, inptr, inend - inptr);
-		outptr += inend - inptr;
-		*out = mf->outbuf;
-		*outlen = outptr - mf->outbuf;
-		*outprespace = mf->outbuf - mf->outreal;
-
-		d(printf("Filtered '%.*s'\n", *outlen, *out));
-	} else {
-		*out = in;
-		*outlen = inend - in;
-		*outprespace = prespace;
-		
-		d(printf("Filtered '%.*s'\n", *outlen, *out));
-	}
-}
-
-static void
-camel_mime_filter_smtp_class_init (CamelMimeFilterSmtpClass *klass)
-{
-	GtkObjectClass *object_class = (GtkObjectClass *) klass;
-	CamelMimeFilterClass *filter_class = (CamelMimeFilterClass *) klass;
-	
-	camel_mime_filter_smtp_parent = gtk_type_class (camel_mime_filter_get_type ());
-
-	object_class->finalize = camel_mime_filter_smtp_finalise;
-
-	filter_class->filter = filter;
-	filter_class->complete = complete;
-
-	gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
-}
-
-static void
-camel_mime_filter_smtp_init (CamelMimeFilterSmtp *obj)
-{
-	struct _CamelMimeFilterSmtpPrivate *p;
-
-	p = _PRIVATE(obj) = g_malloc0(sizeof(*p));
-	obj->midline = FALSE;
-}
-
-static void
-camel_mime_filter_smtp_finalise (GtkObject *obj)
-{
-	((GtkObjectClass *)(camel_mime_filter_smtp_parent))->finalize((GtkObject *)obj);
-}
-
-/**
- * camel_mime_filter_smtp_new:
- *
- * Create a new CamelMimeFilterSmtp object.
- * 
- * Return value: A new CamelMimeFilterSmtp widget.
- **/
-CamelMimeFilterSmtp *
-camel_mime_filter_smtp_new (void)
-{
-	CamelMimeFilterSmtp *new = CAMEL_MIME_FILTER_SMTP (gtk_type_new (camel_mime_filter_smtp_get_type ()));
-	return new;
-}
-
-#ifdef TEST_PROGRAM
-
-#include 
-
-int main(int argc, char **argv)
-{
-	CamelMimeFilterSmtp *f;
-	char *buffer;
-	int len, prespace;
-
-	gtk_init(&argc, &argv);
-
-	f = camel_mime_filter_smtp_new();
-
-	buffer = "This is a test\nFrom Someone\nTo someone. From Someone else, From\n From blah\nFromblah\nBye! \nFrom \n.\n.\r\nprevious 2 lines had .'s\nfrom should also be escaped\n";
-	len = strlen(buffer);
-	prespace = 0;
-
-	printf("input = '%.*s'\n", len, buffer);
-	camel_mime_filter_filter(f, buffer, len, prespace, &buffer, &len, &prespace);
-	printf("output = '%.*s'\n", len, buffer);
-	buffer = "";
-	len = 0;
-	prespace = 0;
-	camel_mime_filter_complete(f, buffer, len, prespace, &buffer, &len, &prespace);
-	printf("complete = '%.*s'\n", len, buffer);
-	
-
-	return 0;
-}
-
-#endif
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/camel/camel-mime-filter-smtp.h b/camel/camel-mime-filter-smtp.h
deleted file mode 100644
index 545b339431..0000000000
--- a/camel/camel-mime-filter-smtp.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- *  Copyright (C) 2000 Helix Code Inc.
- *
- *  Authors: Jeffrey Stedfast 
- *
- *  This program is free software; you can redistribute it and/or 
- *  modify it under the terms of the GNU General Public License as 
- *  published by the Free Software Foundation; either version 2 of the
- *  License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- *  USA
- */
-
-#ifndef _CAMEL_MIME_FILTER_SMTP_H
-#define _CAMEL_MIME_FILTER_SMTP_H
-
-#include 
-#include 
-
-#define CAMEL_MIME_FILTER_SMTP(obj)         GTK_CHECK_CAST (obj, camel_mime_filter_smtp_get_type (), CamelMimeFilterSmtp)
-#define CAMEL_MIME_FILTER_SMTP_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, camel_mime_filter_smtp_get_type (), CamelMimeFilterSmtpClass)
-#define IS_CAMEL_MIME_FILTER_SMTP(obj)      GTK_CHECK_TYPE (obj, camel_mime_filter_smtp_get_type ())
-
-typedef struct _CamelMimeFilterSmtp      CamelMimeFilterSmtp;
-typedef struct _CamelMimeFilterSmtpClass CamelMimeFilterSmtpClass;
-
-struct _CamelMimeFilterSmtp {
-	CamelMimeFilter parent;
-
-	struct _CamelMimeFilterSmtpPrivate *priv;
-
-	int midline;		/* are we between lines? */
-};
-
-struct _CamelMimeFilterSmtpClass {
-	CamelMimeFilterClass parent_class;
-};
-
-guint camel_mime_filter_smtp_get_type (void);
-CamelMimeFilterSmtp *camel_mime_filter_smtp_new (void);
-
-#endif /* ! _CAMEL_MIME_FILTER_SMTP_H */
diff --git a/camel/camel-mime-filter.c b/camel/camel-mime-filter.c
deleted file mode 100644
index 27cee890fe..0000000000
--- a/camel/camel-mime-filter.c
+++ /dev/null
@@ -1,228 +0,0 @@
-/*
- *  Copyright (C) 2000 Helix Code Inc.
- *
- *  Authors: Michael Zucchi 
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Library General Public License
- *  as published by the Free Software Foundation; either version 2 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU Library General Public License for more details.
- *
- *  You should have received a copy of the GNU Library General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include "camel-mime-filter.h"
-
-struct _CamelMimeFilterPrivate {
-	char *inbuf;
-	size_t inlen;
-};
-
-#define PRE_HEAD (64)
-#define BACK_HEAD (64)
-#define _PRIVATE(o) (((CamelMimeFilter *)(o))->priv)
-#define FCLASS(o) ((CamelMimeFilterClass *)((GtkObject *)(o))->klass)
-
-static void camel_mime_filter_class_init (CamelMimeFilterClass *klass);
-static void camel_mime_filter_init       (CamelMimeFilter *obj);
-
-static CamelObjectClass *camel_mime_filter_parent;
-
-enum SIGNALS {
-	LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-guint
-camel_mime_filter_get_type (void)
-{
-	static guint type = 0;
-	
-	if (!type) {
-		GtkTypeInfo type_info = {
-			"CamelMimeFilter",
-			sizeof (CamelMimeFilter),
-			sizeof (CamelMimeFilterClass),
-			(GtkClassInitFunc) camel_mime_filter_class_init,
-			(GtkObjectInitFunc) camel_mime_filter_init,
-			(GtkArgSetFunc) NULL,
-			(GtkArgGetFunc) NULL
-		};
-		
-		type = gtk_type_unique (camel_object_get_type (), &type_info);
-	}
-	
-	return type;
-}
-
-static void
-finalise(GtkObject *o)
-{
-	CamelMimeFilter *f = (CamelMimeFilter *)o;
-	struct _CamelMimeFilterPrivate *p = _PRIVATE(f);
-
-	g_free(f->outreal);
-	g_free(f->backbuf);
-	g_free(p->inbuf);
-	g_free(p);
-
-	((GtkObjectClass *)camel_mime_filter_parent)->finalize (o);
-}
-
-static void
-complete(CamelMimeFilter *mf, char *in, size_t len, size_t prespace, char **out, size_t *outlen, size_t *outprespace)
-{
-	/* default - do nothing */
-}
-
-static void
-camel_mime_filter_class_init (CamelMimeFilterClass *klass)
-{
-	GtkObjectClass *object_class = (GtkObjectClass *) klass;
-	
-	camel_mime_filter_parent = gtk_type_class (camel_object_get_type ());
-
-	object_class->finalize = finalise;
-
-	klass->complete = complete;
-
-	gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
-}
-
-static void
-camel_mime_filter_init (CamelMimeFilter *obj)
-{
-	obj->outreal = NULL;
-	obj->outbuf = NULL;
-	obj->outsize = 0;
-
-	obj->backbuf = NULL;
-	obj->backsize = 0;
-	obj->backlen = 0;
-
-	_PRIVATE(obj) = g_malloc0(sizeof(*obj->priv));
-}
-
-/**
- * camel_mime_filter_new:
- *
- * Create a new CamelMimeFilter object.
- * 
- * Return value: A new CamelMimeFilter widget.
- **/
-CamelMimeFilter *
-camel_mime_filter_new (void)
-{
-	CamelMimeFilter *new = CAMEL_MIME_FILTER ( gtk_type_new (camel_mime_filter_get_type ()));
-	return new;
-}
-
-static void filter_run(CamelMimeFilter *f,
-		       char *in, size_t len, size_t prespace,
-		       char **out, size_t *outlen, size_t *outprespace,
-		       void (*filterfunc)(CamelMimeFilter *f,
-					  char *in, size_t len, size_t prespace,
-					  char **out, size_t *outlen, size_t *outprespace))
-{
-	struct _CamelMimeFilterPrivate *p;
-
-	/*
-	  here we take a performance hit, if the input buffer doesn't
-	  have the pre-space required.  We make a buffer that does ...
-	*/
-	if (prespace < f->backlen) {
-		int newlen = len+prespace+f->backlen;
-		p = _PRIVATE(f);
-		if (p->inlen < newlen) {
-			/* NOTE: g_realloc copies data, we dont need that (slower) */
-			g_free(p->inbuf);
-			p->inbuf = g_malloc(newlen+PRE_HEAD);
-			p->inlen = newlen+PRE_HEAD;
-		}
-		/* copy to end of structure */
-		memcpy(p->inbuf+p->inlen - len, in, len);
-		in = p->inbuf+p->inlen - len;
-		prespace = p->inlen - len;
-	}
-
-	/* preload any backed up data */
-	if (f->backlen > 0) {
-		memcpy(in-f->backlen, f->backbuf, f->backlen);
-		in -= f->backlen;
-		len += f->backlen;
-		prespace -= f->backlen;
-		f->backlen = 0;
-	}
-	
-	filterfunc(f, in, len, prespace, out, outlen, outprespace);
-}
-
-void camel_mime_filter_filter(CamelMimeFilter *f,
-			      char *in, size_t len, size_t prespace,
-			      char **out, size_t *outlen, size_t *outprespace)
-{
-	if (FCLASS(f)->filter)
-		filter_run(f, in, len, prespace, out, outlen, outprespace, FCLASS(f)->filter);
-	else
-		g_error("Filter function unplmenented in class");
-}
-
-void camel_mime_filter_complete(CamelMimeFilter *f,
-				char *in, size_t len, size_t prespace,
-				char **out, size_t *outlen, size_t *outprespace)
-{
-	if (FCLASS(f)->complete)
-		filter_run(f, in, len, prespace, out, outlen, outprespace, FCLASS(f)->complete);
-}
-
-void camel_mime_filter_reset(CamelMimeFilter *f)
-{
-	if (FCLASS(f)->reset) {
-		FCLASS(f)->reset(f);
-	}
-
-	/* could free some buffers, if they are really big? */
-	f->backlen = 0;
-}
-
-/* sets number of bytes backed up on the input, new calls replace previous ones */
-void camel_mime_filter_backup(CamelMimeFilter *f, char *data, size_t length)
-{
-	if (f->backsize < length) {
-		/* g_realloc copies data, unnecessary overhead */
-		g_free(f->backbuf);
-		f->backbuf = g_malloc(length+BACK_HEAD);
-		f->backsize = length+BACK_HEAD;
-	}
-	f->backlen = length;
-	memcpy(f->backbuf, data, length);
-}
-
-/* ensure this much size available for filter output (if required) */
-void camel_mime_filter_set_size(CamelMimeFilter *f, size_t size, int keep)
-{
-	if (f->outsize < size) {
-		int offset = f->outptr - f->outreal;
-		if (keep) {
-			f->outreal = g_realloc(f->outreal, size + PRE_HEAD*4);
-		} else {
-			g_free(f->outreal);
-			f->outreal = g_malloc(size + PRE_HEAD*4);
-		}
-		f->outptr = f->outreal + offset;
-		f->outbuf = f->outreal + PRE_HEAD*4;
-		f->outsize = size;
-		/* this could be offset from the end of the structure, but 
-		   this should be good enough */
-		f->outpre = PRE_HEAD*4;
-	}
-}
-
diff --git a/camel/camel-mime-filter.h b/camel/camel-mime-filter.h
deleted file mode 100644
index 4576596bab..0000000000
--- a/camel/camel-mime-filter.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- *  Copyright (C) 2000 Helix Code Inc.
- *
- *  Authors: Michael Zucchi 
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Library General Public License
- *  as published by the Free Software Foundation; either version 2 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU Library General Public License for more details.
- *
- *  You should have received a copy of the GNU Library General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-/* Abstract class for non-copying filters */
-
-#ifndef _CAMEL_MIME_FILTER_H
-#define _CAMEL_MIME_FILTER_H
-
-#include 
-#include 
-
-#define CAMEL_MIME_FILTER(obj)         GTK_CHECK_CAST (obj, camel_mime_filter_get_type (), CamelMimeFilter)
-#define CAMEL_MIME_FILTER_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, camel_mime_filter_get_type (), CamelMimeFilterClass)
-#define IS_CAMEL_MIME_FILTER(obj)      GTK_CHECK_TYPE (obj, camel_mime_filter_get_type ())
-
-typedef struct _CamelMimeFilterClass CamelMimeFilterClass;
-
-struct _CamelMimeFilter {
-	CamelObject parent;
-
-	struct _CamelMimeFilterPrivate *priv;
-
-	char *outreal;		/* real malloc'd buffer */
-	char *outbuf;		/* first 'writable' position allowed (outreal + outpre) */
-	char *outptr;
-	int outsize;
-	int outpre;		/* prespace of this buffer */
-
-	char *backbuf;
-	int backsize;
-	int backlen;		/* significant data there */
-};
-
-struct _CamelMimeFilterClass {
-	CamelObjectClass parent_class;
-
-	/* virtual functions */
-	void (*filter)(CamelMimeFilter *f,
-		       char *in, size_t len, size_t prespace,
-		       char **out, size_t *outlen, size_t *outprespace);
-	void (*complete)(CamelMimeFilter *f,
-			 char *in, size_t len, size_t prespace,
-			 char **out, size_t *outlen, size_t *outprespace);
-	void (*reset)(CamelMimeFilter *f);
-};
-
-guint		camel_mime_filter_get_type	(void);
-CamelMimeFilter      *camel_mime_filter_new	(void);
-
-void camel_mime_filter_filter(CamelMimeFilter *f,
-			      char *in, size_t len, size_t prespace,
-			      char **out, size_t *outlen, size_t *outprespace);
-
-void camel_mime_filter_complete(CamelMimeFilter *f,
-				char *in, size_t len, size_t prespace,
-				char **out, size_t *outlen, size_t *outprespace);
-
-void camel_mime_filter_reset(CamelMimeFilter *f);
-
-/* sets/returns number of bytes backed up on the input */
-void camel_mime_filter_backup(CamelMimeFilter *f, char *data, size_t length);
-
-/* ensure this much size available for filter output */
-void camel_mime_filter_set_size(CamelMimeFilter *f, size_t size, int keep);
-
-#endif /* ! _CAMEL_MIME_FILTER_H */
diff --git a/camel/camel-mime-message.c b/camel/camel-mime-message.c
deleted file mode 100644
index 8fca516fd0..0000000000
--- a/camel/camel-mime-message.c
+++ /dev/null
@@ -1,704 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; fill-column: 160 -*- */
-/* camelMimeMessage.c : class for a mime_message */
-
-/* 
- * Authors: Bertrand Guiheneuf 
- *	    Michael Zucchi 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#include 
-#include "camel-mime-message.h"
-#include 
-#include "gmime-content-field.h"
-#include "string-utils.h"
-#include "hash-table-utils.h"
-
-#define d(x)
-
-/* these 2 below should be kept in sync */
-typedef enum {
-	HEADER_UNKNOWN,
-	HEADER_FROM,
-	HEADER_REPLY_TO,
-	HEADER_SUBJECT,
-	HEADER_TO,
-	HEADER_CC,
-	HEADER_BCC,
-	HEADER_DATE
-} CamelHeaderType;
-
-static char *header_names[] = {
-	/* dont include HEADER_UNKNOWN string */
-	"From", "Reply-To", "Subject", "To", "Cc", "Bcc", "Date", NULL
-};
-
-static GHashTable *header_name_table;
-
-static CamelMimePartClass *parent_class=NULL;
-
-static char *recipient_names[] = {
-	"To", "Cc", "Bcc", NULL
-};
-
-enum SIGNALS {
-	MESSAGE_CHANGED,
-	LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-static void set_message_number (CamelMimeMessage *mime_message, guint number);
-static guint get_message_number (CamelMimeMessage *mime_message);
-static int write_to_stream (CamelDataWrapper *data_wrapper, CamelStream *stream);
-static void finalize (GtkObject *object);
-static void add_header (CamelMedium *medium, const char *header_name, const void *header_value);
-static void set_header (CamelMedium *medium, const char *header_name, const void *header_value);
-static void remove_header (CamelMedium *medium, const char *header_name);
-static int construct_from_parser (CamelMimePart *, CamelMimeParser *);
-
-/* Returns the class for a CamelMimeMessage */
-#define CMM_CLASS(so) CAMEL_MIME_MESSAGE_CLASS (GTK_OBJECT(so)->klass)
-#define CDW_CLASS(so) CAMEL_DATA_WRAPPER_CLASS (GTK_OBJECT(so)->klass)
-#define CMD_CLASS(so) CAMEL_MEDIUM_CLASS (GTK_OBJECT(so)->klass)
-
-static void
-camel_mime_message_class_init (CamelMimeMessageClass *camel_mime_message_class)
-{
-	CamelDataWrapperClass *camel_data_wrapper_class = CAMEL_DATA_WRAPPER_CLASS (camel_mime_message_class);
-	CamelMimePartClass *camel_mime_part_class = CAMEL_MIME_PART_CLASS (camel_mime_message_class);
-	GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (camel_mime_message_class);
-	CamelMediumClass *camel_medium_class = CAMEL_MEDIUM_CLASS (camel_mime_message_class);
-	int i;
-	
-	parent_class = gtk_type_class (camel_mime_part_get_type ());
-
-	header_name_table = g_hash_table_new (g_str_hash, g_str_equal);
-	for (i=0;header_names[i];i++)
-		g_hash_table_insert (header_name_table, header_names[i], (gpointer)i+1);
-
-	/* virtual method definition */
-	camel_mime_message_class->set_message_number = set_message_number;
-	camel_mime_message_class->get_message_number = get_message_number;
-	
-	/* virtual method overload */
-	camel_data_wrapper_class->write_to_stream = write_to_stream;
-
-	camel_medium_class->add_header = add_header;
-	camel_medium_class->set_header = set_header;
-	camel_medium_class->remove_header = remove_header;
-	
-	camel_mime_part_class->construct_from_parser = construct_from_parser;
-
-        signals[MESSAGE_CHANGED] =
-                gtk_signal_new ("message_changed",
-                                GTK_RUN_LAST,
-                                gtk_object_class->type,
-                                GTK_SIGNAL_OFFSET (CamelMimeMessageClass, message_changed),
-                                gtk_marshal_NONE__INT,
-                                GTK_TYPE_NONE, 1, GTK_TYPE_INT);
-        
-        gtk_object_class_add_signals (gtk_object_class, signals, LAST_SIGNAL);
-
-	gtk_object_class->finalize = finalize;
-}
-
-
-
-
-static void
-camel_mime_message_init (gpointer object, gpointer klass)
-{
-	CamelMimeMessage *mime_message = (CamelMimeMessage *)object;
-	int i;
-	
-	camel_data_wrapper_set_mime_type (CAMEL_DATA_WRAPPER (object), "message/rfc822");
-
-	mime_message->recipients =  g_hash_table_new(g_strcase_hash, g_strcase_equal);
-	for (i=0;recipient_names[i];i++) {
-		g_hash_table_insert(mime_message->recipients, recipient_names[i], camel_internet_address_new());
-	}
-
-	mime_message->user_flags = NULL;
-	mime_message->flags = 0;
-
-	mime_message->subject = NULL;
-	mime_message->reply_to = NULL;
-	mime_message->from = NULL;
-	mime_message->folder = NULL;
-	mime_message->date = CAMEL_MESSAGE_DATE_CURRENT;
-	mime_message->date_offset = 0;
-	mime_message->date_str = NULL;
-}
-
-GtkType
-camel_mime_message_get_type (void)
-{
-	static GtkType camel_mime_message_type = 0;
-	
-	if (!camel_mime_message_type)	{
-		GtkTypeInfo camel_mime_message_info =	
-		{
-			"CamelMimeMessage",
-			sizeof (CamelMimeMessage),
-			sizeof (CamelMimeMessageClass),
-			(GtkClassInitFunc) camel_mime_message_class_init,
-			(GtkObjectInitFunc) camel_mime_message_init,
-				/* reserved_1 */ NULL,
-				/* reserved_2 */ NULL,
-			(GtkClassInitFunc) NULL,
-		};
-		
-		camel_mime_message_type = gtk_type_unique (camel_mime_part_get_type (), &camel_mime_message_info);
-	}
-	
-	return camel_mime_message_type;
-}
-
-/* annoying way to free objects in a hashtable, i mean, its not like anyone
-   would want to store them in a hashtable, really */
-static void g_lib_is_uber_crappy_shit(gpointer whocares, gpointer getlost, gpointer blah)
-{
-	gtk_object_unref((GtkObject *)getlost);
-}
-
-static void           
-finalize (GtkObject *object)
-{
-	CamelMimeMessage *message = CAMEL_MIME_MESSAGE (object);
-	
-	g_free (message->date_str);
-	g_free (message->subject);
-	g_free (message->reply_to);
-	g_free (message->from);
-
-	g_free (message->message_uid);
-	
-	g_hash_table_foreach (message->recipients, g_lib_is_uber_crappy_shit, NULL);
-	g_hash_table_destroy(message->recipients);
-
-	camel_flag_list_free(&message->user_flags);
-
-	if (message->folder)
-		gtk_object_unref (GTK_OBJECT (message->folder));
-
-	GTK_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-
-
-CamelMimeMessage *
-camel_mime_message_new (void) 
-{
-	CamelMimeMessage *mime_message;
-	mime_message = gtk_type_new (CAMEL_MIME_MESSAGE_TYPE);
-	
-	return mime_message;
-}
-
-
-/* **** Date: */
-
-void
-camel_mime_message_set_date(CamelMimeMessage *message,  time_t date, int offset)
-{
-	g_assert(message);
-	if (date == CAMEL_MESSAGE_DATE_CURRENT) {
-		struct tm *local;
-		int tz;
-
-		date = time(0);
-		local = localtime(&date);
-		offset = 0;
-#if defined(HAVE_TIMEZONE)
-		tz = timezone;
-#elif defined(HAVE_TM_GMTOFF)
-		tz = local->tm_gmtoff;
-#endif
-		offset = ((tz/60/60) * 100) + (tz/60 % 60);
-	}
-	message->date = date;
-	message->date_offset = offset;
-	g_free(message->date_str);
-	message->date_str = header_format_date(date, offset);
-
-	CAMEL_MEDIUM_CLASS(parent_class)->set_header((CamelMedium *)message, "Date", message->date_str);
-}
-
-void
-camel_mime_message_get_date(CamelMimeMessage *message,  time_t *date, int *offset)
-{
-	if (message->date == CAMEL_MESSAGE_DATE_CURRENT)
-		camel_mime_message_set_date(message, CAMEL_MESSAGE_DATE_CURRENT, 0);
-	if (date)
-		*date = message->date;
-	if (offset)
-		*offset = message->date_offset;
-}
-
-char *
-camel_mime_message_get_date_string(CamelMimeMessage *message)
-{
-	if (message->date == CAMEL_MESSAGE_DATE_CURRENT)
-		camel_mime_message_set_date(message, CAMEL_MESSAGE_DATE_CURRENT, 0);
-	return message->date_str;
-}
-
-/* **** Reply-To: */
-
-void
-camel_mime_message_set_reply_to (CamelMimeMessage *mime_message, const gchar *reply_to)
-{
-	g_assert (mime_message);
-
-	/* FIXME: check format of string, handle it nicer ... */
-
-	g_free(mime_message->reply_to);
-	mime_message->reply_to = g_strdup(reply_to);
-	CAMEL_MEDIUM_CLASS(parent_class)->set_header((CamelMedium *)mime_message, "Reply-To", reply_to);
-}
-
-const gchar *
-camel_mime_message_get_reply_to (CamelMimeMessage *mime_message)
-{
-	g_assert (mime_message);
-
-	return mime_message->reply_to;
-}
-
-void
-camel_mime_message_set_subject (CamelMimeMessage *mime_message,
-				const gchar *subject)
-{
-	char *text;
-	g_assert (mime_message);
-
-	g_free(mime_message->subject);
-	mime_message->subject = g_strdup(subject);
-	text = header_encode_string(subject);
-	CAMEL_MEDIUM_CLASS(parent_class)->set_header((CamelMedium *)mime_message, "Subject", text);
-	g_free(text);
-}
-
-const gchar *
-camel_mime_message_get_subject (CamelMimeMessage *mime_message)
-{
-	g_assert (mime_message);
-
-	return mime_message->subject;
-}
-
-/* *** From: */
-void
-camel_mime_message_set_from (CamelMimeMessage *mime_message, const gchar *from)
-{
-	g_assert (mime_message);
-
-	g_free(mime_message->from);
-	mime_message->from = g_strdup(from);
-	CAMEL_MEDIUM_CLASS(parent_class)->set_header((CamelMedium *)mime_message, "From", from);
-}
-
-const gchar *
-camel_mime_message_get_from (CamelMimeMessage *mime_message)
-{
-	g_assert (mime_message);
-
-	return mime_message->from;
-}
-
-/*  ****  */
-
-void
-camel_mime_message_add_recipient (CamelMimeMessage *mime_message, 
-				  const gchar *type, 
-				  const gchar *name, const char *address)
-{
-	CamelInternetAddress *addr;
-	char *text;
-
-	g_assert (mime_message);
-
-	addr = g_hash_table_lookup(mime_message->recipients, type);
-	if (addr == NULL) {
-		g_warning("trying to add a non-valid receipient type: %s = %s %s", type, name, address);
-		return;
-	}
-
-	camel_internet_address_add(addr, name, address);
-
-	/* FIXME: maybe this should be delayed till we're ready to write out? */
-	text = camel_address_encode((CamelAddress*)addr);
-	CAMEL_MEDIUM_CLASS(parent_class)->set_header((CamelMedium *)mime_message, type, text);
-	g_free(text);
-}
-
-void
-camel_mime_message_remove_recipient_address (CamelMimeMessage *mime_message,
-					     const gchar *type,
-					     const gchar *address)
-{
-	CamelInternetAddress *addr;
-	int index;
-	char *text;
-
-
-	g_assert (mime_message);
-
-	addr = g_hash_table_lookup(mime_message->recipients, type);
-	if (addr == NULL) {
-		g_warning("trying to remove a non-valid receipient type: %s = %s", type, address);
-		return;
-	}
-	index = camel_internet_address_find_address(addr, address, NULL);
-	if (index == -1) {
-		g_warning("trying to remove address for nonexistand address: %s", address);
-		return;
-	}
-
-	camel_address_remove((CamelAddress *)addr, index);
-
-	/* FIXME: maybe this should be delayed till we're ready to write out? */
-	text = camel_address_encode((CamelAddress *)addr);
-	CAMEL_MEDIUM_CLASS(parent_class)->set_header((CamelMedium *)mime_message, type, text);
-	g_free(text);
-}
-
-void
-camel_mime_message_remove_recipient_name (CamelMimeMessage *mime_message,
-					  const gchar *type,
-					  const gchar *name)
-{
-	CamelInternetAddress *addr;
-	int index;
-	char *text;
-
-	g_assert (mime_message);
-
-	addr = g_hash_table_lookup(mime_message->recipients, type);
-	if (addr == NULL) {
-		g_warning("trying to remove a non-valid receipient type: %s = %s", type, name);
-		return;
-	}
-	index = camel_internet_address_find_name(addr, name, NULL);
-	if (index == -1) {
-		g_warning("trying to remove address for nonexistand name: %s", name);
-		return;
-	}
-
-	camel_address_remove((CamelAddress *)addr, index);
-
-	/* FIXME: maybe this should be delayed till we're ready to write out? */
-	text = camel_address_encode((CamelAddress *)addr);
-	CAMEL_MEDIUM_CLASS(parent_class)->set_header((CamelMedium *)mime_message, type, text);
-	g_free(text);
-}
-
-const CamelInternetAddress *
-camel_mime_message_get_recipients (CamelMimeMessage *mime_message, 
-				   const gchar *type)
-{
-	g_assert (mime_message);
-	
-	return g_hash_table_lookup(mime_message->recipients, type);
-}
-
-
-
-/*  ****  */
-
-
-guint32
-camel_mime_message_get_flags		(CamelMimeMessage *m)
-{
-	return m->flags;
-}
-
-void
-camel_mime_message_set_flags		(CamelMimeMessage *m, guint32 flags, guint32 set)
-{
-	guint32 old;
-
-	printf("%p setting flags %x mask %x\n", m, flags, set);
-
-	old = m->flags;
-	m->flags = (m->flags & ~flags) | (set & flags);
-
-	printf("old = %x new = %x\n", old, m->flags);
-
-	if (old != m->flags)
-		gtk_signal_emit((GtkObject *)m, signals[MESSAGE_CHANGED], MESSAGE_FLAGS_CHANGED);
-}
-
-gboolean
-camel_flag_get(CamelFlag **list, const char *name)
-{
-	CamelFlag *flag;
-	flag = *list;
-	while (flag) {
-		if (!strcmp(flag->name, name))
-			return TRUE;
-		flag = flag->next;
-	}
-	return FALSE;
-}
-
-void
-camel_flag_set(CamelFlag **list, const char *name, gboolean value)
-{
-	CamelFlag *flag, *tmp;
-
-	/* this 'trick' works because flag->next is the first element */
-	flag = (CamelFlag *)list;
-	while (flag->next) {
-		tmp = flag->next;
-		if (!strcmp(flag->next->name, name)) {
-			if (!value) {
-				flag->next = tmp->next;
-				g_free(tmp);
-			}
-			return;
-		}
-		flag = tmp;
-	}
-
-	if (value) {
-		tmp = g_malloc(sizeof(*tmp) + strlen(name));
-		strcpy(tmp->name, name);
-		tmp->next = 0;
-		flag->next = tmp;
-	}
-}
-
-int
-camel_flag_list_size(CamelFlag **list)
-{
-	int count=0;
-	CamelFlag *flag;
-
-	flag = *list;
-	while (flag) {
-		count++;
-		flag = flag->next;
-	}
-	return count;
-}
-
-void
-camel_flag_list_free(CamelFlag **list)
-{
-	CamelFlag *flag, *tmp;
-	flag = *list;
-	while (flag) {
-		tmp = flag->next;
-		g_free(flag);
-		flag = tmp;
-	}
-	*list = NULL;
-}
-
-gboolean
-camel_mime_message_get_user_flag	(CamelMimeMessage *m, const char *name)
-{
-	g_return_val_if_fail(m->flags & CAMEL_MESSAGE_USER, FALSE);
-
-	return camel_flag_get(&m->user_flags, name);
-}
-
-void
-camel_mime_message_set_user_flag	(CamelMimeMessage *m, const char *name, gboolean value)
-{
-	g_return_if_fail(m->flags & CAMEL_MESSAGE_USER);
-
-	camel_flag_set(&m->user_flags, name, value);
-	gtk_signal_emit((GtkObject *)m, signals[MESSAGE_CHANGED], MESSAGE_FLAGS_CHANGED);
-}
-
-
-
-/* FIXME: to be removed??? */
-static void 
-set_message_number (CamelMimeMessage *mime_message, guint number)
-{
-	mime_message->message_number = number;
-}
-
-static guint 
-get_message_number (CamelMimeMessage *mime_message)
-{
-	return mime_message->message_number;
-}
-
-
-
-guint
-camel_mime_message_get_message_number (CamelMimeMessage *mime_message)
-{
-	return CMM_CLASS (mime_message)->get_message_number (mime_message);
-}
-
-/* mime_message */
-static int
-construct_from_parser(CamelMimePart *dw, CamelMimeParser *mp)
-{
-	char *buf;
-	int len;
-	int state;
-	int ret;
-
-	d(printf("constructing mime-message\n"));
-
-	d(printf("mime_message::construct_from_parser()\n"));
-
-	/* let the mime-part construct the guts ... */
-	ret = ((CamelMimePartClass *)parent_class)->construct_from_parser(dw, mp);
-
-	if (ret == -1)
-		return -1;
-
-	/* ... then clean up the follow-on state */
-	state = camel_mime_parser_step(mp, &buf, &len);
-	switch (state) {
-	case HSCAN_EOF: case HSCAN_FROM_END: /* this doesn't belong to us */
-		camel_mime_parser_unstep(mp);
-	case HSCAN_MESSAGE_END:
-		break;
-	default:
-		g_error("Bad parser state: Expecing MESSAGE_END or EOF or ROM, got: %d", camel_mime_parser_state(mp));
-		camel_mime_parser_unstep(mp);
-		return -1;
-	}
-
-	d(printf("mime_message::construct_from_parser() leaving\n"));
-#warning "return a real error code"
-	return 0;
-}
-
-static int
-write_to_stream (CamelDataWrapper *data_wrapper, CamelStream *stream)
-{
-	CamelMimeMessage *mm = CAMEL_MIME_MESSAGE (data_wrapper);
-
-	/* force mandatory headers ... */
-	if (mm->from == NULL) {
-		g_warning("No from set for message");
-		camel_mime_message_set_from(mm, "");
-	}
-	if (mm->date_str == NULL) {
-		g_warning("Application did not set date, using 'now'");
-		camel_mime_message_set_date(mm, CAMEL_MESSAGE_DATE_CURRENT, 0);
-	}
-	if (mm->subject == NULL) {
-		g_warning("Application did not set subject, creating one");
-		camel_mime_message_set_subject(mm, "No Subject");
-	}
-
-	/* FIXME: "To" header needs to be set explicitly as well ... */
-
-	camel_medium_set_header((CamelMedium *)mm, "Mime-Version", "1.0");
-
-	return CAMEL_DATA_WRAPPER_CLASS (parent_class)->write_to_stream (data_wrapper, stream);
-}
-
-static char *
-format_address(const char *text)
-{
-	struct _header_address *addr;
-	char *ret;
-
-	addr = header_address_decode(text);
-	if (addr) {
-		ret = header_address_list_format(addr);
-		header_address_list_clear(&addr);
-	} else {
-		ret = g_strdup(text);
-	}
-	return ret;
-}
-
-/* FIXME: check format of fields. */
-static gboolean
-process_header(CamelMedium *medium, const char *header_name, const char *header_value)
-{
-	CamelHeaderType header_type;
-	CamelMimeMessage *message = CAMEL_MIME_MESSAGE (medium);
-	CamelInternetAddress *addr;
-
-	header_type = (CamelHeaderType) g_hash_table_lookup (header_name_table, header_name);
-	switch (header_type) {
-	case HEADER_FROM:
-		g_free(message->from);
-		message->from = format_address(header_value);
-		break;
-	case HEADER_REPLY_TO:
-		g_free(message->reply_to);
-		message->reply_to = format_address(header_value);
-		break;
-	case HEADER_SUBJECT:
-		g_free(message->subject);
-		message->subject = header_decode_string(header_value);
-		break;
-	case HEADER_TO:
-	case HEADER_CC:
-	case HEADER_BCC:
-		addr = g_hash_table_lookup(message->recipients, header_name);
-		if (header_value)
-			camel_address_decode((CamelAddress *)addr, header_value);
-		else
-			camel_address_remove((CamelAddress *)addr, -1);
-		break;
-	case HEADER_DATE:
-		g_free(message->date_str);
-		message->date_str = g_strdup(header_value);
-		if (header_value) {
-			message->date = header_decode_date(header_value, &message->date_offset);
-		} else {
-			message->date = CAMEL_MESSAGE_DATE_CURRENT;
-		}
-		break;
-	default:
-		return FALSE;
-	}
-	return TRUE;
-}
-
-static void
-set_header(CamelMedium *medium, const char *header_name, const void *header_value)
-{
-	process_header(medium, header_name, header_value);
-	parent_class->parent_class.set_header (medium, header_name, header_value);
-}
-
-static void
-add_header(CamelMedium *medium, const char *header_name, const void *header_value)
-{
-	/* if we process it, then it must be forced unique as well ... */
-	if (process_header(medium, header_name, header_value))
-		parent_class->parent_class.set_header (medium, header_name, header_value);
-	else
-		parent_class->parent_class.add_header (medium, header_name, header_value);
-}
-
-static void
-remove_header(CamelMedium *medium, const char *header_name)
-{
-	process_header(medium, header_name, NULL);
-	parent_class->parent_class.remove_header (medium, header_name);
-}
-
diff --git a/camel/camel-mime-message.h b/camel/camel-mime-message.h
deleted file mode 100644
index 40a170e244..0000000000
--- a/camel/camel-mime-message.h
+++ /dev/null
@@ -1,169 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; fill-column: 160 -*- */
-/* camelMimeMessage.h : class for a mime message
- *
- * Authors: Bertrand Guiheneuf 
- *	    Michael Zucchi 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef CAMEL_MIME_MESSAGE_H
-#define CAMEL_MIME_MESSAGE_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include 
-#include 
-#include 
-
-#define CAMEL_RECIPIENT_TYPE_TO "To"
-#define CAMEL_RECIPIENT_TYPE_CC "Cc"
-#define CAMEL_RECIPIENT_TYPE_BCC "Bcc"
-
-
-#define CAMEL_MIME_MESSAGE_TYPE     (camel_mime_message_get_type ())
-#define CAMEL_MIME_MESSAGE(obj)     (GTK_CHECK_CAST((obj), CAMEL_MIME_MESSAGE_TYPE, CamelMimeMessage))
-#define CAMEL_MIME_MESSAGE_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_MIME_MESSAGE_TYPE, CamelMimeMessageClass))
-#define CAMEL_IS_MIME_MESSAGE(o)    (GTK_CHECK_TYPE((o), CAMEL_MIME_MESSAGE_TYPE))
-
-
-/* specify local time */
-#define CAMEL_MESSAGE_DATE_CURRENT (~0)
-
-/* system flag bits */
-enum _CamelMessageFlags {
-	CAMEL_MESSAGE_ANSWERED = 1<<0,
-	CAMEL_MESSAGE_DELETED = 1<<1,
-	CAMEL_MESSAGE_DRAFT = 1<<2,
-	CAMEL_MESSAGE_FLAGGED = 1<<3,
-	CAMEL_MESSAGE_SEEN = 1<<4,
-	/* following flags are for the folder, and are not really permanent flags */
-	CAMEL_MESSAGE_FOLDER_FLAGGED = 1<<16, /* for use by the folder implementation */
-	CAMEL_MESSAGE_USER = 1<<31 /* supports user flags */
-};
-
-typedef struct _CamelFlag {
-	struct _CamelFlag *next;
-	char name[1];
-} CamelFlag;
-
-struct _CamelMimeMessage
-{
-	CamelMimePart parent_object;
-
-	/* header fields */
-	time_t date;
-	int date_offset;	/* GMT offset */
-	char *date_str;		/* cached copy of date string */
-
-	gchar *subject;
-	gchar *reply_to;
-
-	gchar *from;
-
-	GHashTable *recipients;	/* hash table of CamelInternetAddress's */
-
-	/* other fields */
-	guint32 flags;		/* system flags */
-	struct _CamelFlag *user_flags;
-	gboolean expunged;
-	
-	guint message_number; /* set by folder object when retrieving message */
-	gchar *message_uid;
-
-	CamelFolder *folder;
-};
-
-enum _MessageChangeType {
-	MESSAGE_FLAGS_CHANGED,
-	MESSAGE_ENVELOPE_CHANGED,
-};
-
-typedef struct {
-	CamelMimePartClass parent_class;
-
-	/* signals */
-	void		(*message_changed)	(CamelMimeMessage *, enum _MessageChangeType type);
-
-	/* Virtual methods */	
-	void            (*set_message_number)     (CamelMimeMessage *mime_message, 
-						   guint number);
-	guint           (*get_message_number)     (CamelMimeMessage *mime_message);
-
-} CamelMimeMessageClass;
-
-
-
-/* Standard Gtk function */
-GtkType camel_mime_message_get_type (void);
-
-
-/* public methods */
-CamelMimeMessage * camel_mime_message_new                  (void);
-
-
-void               camel_mime_message_set_date		   (CamelMimeMessage *mime_message,  time_t date, int offset);
-void               camel_mime_message_get_date		   (CamelMimeMessage *mime_message,  time_t *date, int *offset);
-char		  *camel_mime_message_get_date_string	   (CamelMimeMessage *mime_message);
-
-const gchar *      camel_mime_message_get_received_date    (CamelMimeMessage *mime_message);
-const gchar *      camel_mime_message_get_sent_date        (CamelMimeMessage *mime_message);
-void               camel_mime_message_set_reply_to         (CamelMimeMessage *mime_message, 
-							    const gchar *reply_to);
-const gchar *      camel_mime_message_get_reply_to         (CamelMimeMessage *mime_message);
-void               camel_mime_message_set_subject          (CamelMimeMessage *mime_message, 
-							    const gchar *subject);
-const gchar *      camel_mime_message_get_subject          (CamelMimeMessage *mime_message);
-void               camel_mime_message_set_from             (CamelMimeMessage *mime_message, 
-							    const gchar *from);
-const gchar *      camel_mime_message_get_from             (CamelMimeMessage *mime_message);
-
-
-void		camel_mime_message_add_recipient (CamelMimeMessage *mime_message,
-						  const char *type, const char *name, const char *address);
-void		camel_mime_message_remove_recipient_address (CamelMimeMessage *mime_message, 
-							     const char *type, const char *address);
-void		camel_mime_message_remove_recipient_name (CamelMimeMessage *mime_message, 
-							  const char *type, const char *name);
-
-const CamelInternetAddress *camel_mime_message_get_recipients (CamelMimeMessage *mime_message, 
-							       const char *type);
-
-guint32		  camel_mime_message_get_flags		(CamelMimeMessage *m);
-void		  camel_mime_message_set_flags		(CamelMimeMessage *m, guint32 flags, guint32 set);
-gboolean	  camel_mime_message_get_user_flag	(CamelMimeMessage *m, const char *name);
-void		  camel_mime_message_set_user_flag	(CamelMimeMessage *m, const char *name, gboolean value);
-
-guint              camel_mime_message_get_message_number   (CamelMimeMessage *mime_message);
-
-/* message flag operations */
-gboolean	camel_flag_get(CamelFlag **list, const char *name);
-void		camel_flag_set(CamelFlag **list, const char *name, gboolean state);
-int		camel_flag_list_size(CamelFlag **list);
-void		camel_flag_list_free(CamelFlag **list);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_MIME_MESSAGE_H */
diff --git a/camel/camel-mime-parser.c b/camel/camel-mime-parser.c
deleted file mode 100644
index 74c7653df3..0000000000
--- a/camel/camel-mime-parser.c
+++ /dev/null
@@ -1,1774 +0,0 @@
-/*
- *  Copyright (C) 2000 Helix Code Inc.
- *
- *  Authors: Michael Zucchi 
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Library General Public License
- *  as published by the Free Software Foundation; either version 2 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU Library General Public License for more details.
- *
- *  You should have received a copy of the GNU Library General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-/* What should hopefully be a fast mail parser */
-
-#include 
-#include 
-#include 
-#include 
-
-#include 
-
-#include 
-#include 
-
-#include 
-
-#include 
-#include 
-
-#include 
-#include "camel-mime-parser.h"
-#include "camel-mime-utils.h"
-#include "camel-mime-filter.h"
-#include "camel-stream.h"
-#include "camel-seekable-stream.h"
-
-#define r(x)
-#define h(x)
-#define c(x)
-#define d(x)
-
-/*#define PURIFY*/
-
-#define MEMPOOL
-
-#define STRUCT_ALIGN 4
-
-#ifdef PURIFY
-int inend_id = -1,
-  inbuffer_id = -1;
-#endif
-
-#if 0
-extern int strdup_count;
-extern int malloc_count;
-extern int free_count;
-
-#define g_strdup(x) (strdup_count++, g_strdup(x))
-#define g_malloc(x) (malloc_count++, g_malloc(x))
-#define g_free(x) (free_count++, g_free(x))
-#endif
-
-#ifdef MEMPOOL
-typedef struct _MemPoolNode {
-	struct _MemPoolNode *next;
-
-	int free;
-	char data[1];
-} MemPoolNode;
-
-typedef struct _MemPoolThresholdNode {
-	struct _MemPoolThresholdNode *next;
-	char data[1];
-} MemPoolThresholdNode;
-
-typedef struct _MemPool {
-	int blocksize;
-	int threshold;
-	struct _MemPoolNode *blocks;
-	struct _MemPoolThresholdNode *threshold_blocks;
-} MemPool;
-
-MemPool *mempool_new(int blocksize, int threshold);
-void *mempool_alloc(MemPool *pool, int size);
-void mempool_flush(MemPool *pool, int freeall);
-void mempool_free(MemPool *pool);
-
-MemPool *mempool_new(int blocksize, int threshold)
-{
-	MemPool *pool;
-
-	pool = g_malloc(sizeof(*pool));
-	if (threshold >= blocksize)
-		threshold = blocksize * 2 / 3;
-	pool->blocksize = blocksize;
-	pool->threshold = threshold;
-	pool->blocks = NULL;
-	pool->threshold_blocks = NULL;
-	return pool;
-}
-
-void *mempool_alloc(MemPool *pool, int size)
-{
-	size = (size + STRUCT_ALIGN) & (~(STRUCT_ALIGN-1));
-	if (size>=pool->threshold) {
-		MemPoolThresholdNode *n;
-
-		n = g_malloc(sizeof(*n) - sizeof(char) + size);
-		n->next = pool->threshold_blocks;
-		pool->threshold_blocks = n;
-		return &n->data[0];
-	} else {
-		MemPoolNode *n;
-
-		n = pool->blocks;
-		while (n) {
-			if (n->free >= size) {
-				n->free -= size;
-				return &n->data[n->free];
-			}
-			n = n->next;
-		}
-
-		n = g_malloc(sizeof(*n) - sizeof(char) + pool->blocksize);
-		n->next = pool->blocks;
-		pool->blocks = n;
-		n->free = pool->blocksize - size;
-		return &n->data[n->free];
-	}
-}
-
-void mempool_flush(MemPool *pool, int freeall)
-{
-	MemPoolThresholdNode *tn, *tw;
-	MemPoolNode *pw, *pn;
-
-	tw = pool->threshold_blocks;
-	while (tw) {
-		tn = tw->next;
-		g_free(tw);
-		tw = tn;
-	}
-	pool->threshold_blocks = NULL;
-
-	if (freeall) {
-		pw = pool->blocks;
-		while (pw) {
-			pn = pw->next;
-			g_free(pw);
-			pw = pn;
-		}
-		pool->blocks = NULL;
-	} else {
-		pw = pool->blocks;
-		while (pw) {
-			pw->free = pool->blocksize;
-			pw = pw->next;
-		}
-	}
-}
-
-void mempool_free(MemPool *pool)
-{
-	if (pool) {
-		mempool_flush(pool, 1);
-		g_free(pool);
-	}
-}
-
-#endif
-
-
-
-
-
-
-
-
-
-
-
-
-#define SCAN_BUF 4096		/* size of read buffer */
-#define SCAN_HEAD 128		/* headroom guaranteed to be before each read buffer */
-
-/* a little hacky, but i couldn't be bothered renaming everything */
-#define _header_scan_state _CamelMimeParserPrivate
-#define _PRIVATE(o) (((CamelMimeParser *)(o))->priv)
-
-struct _header_scan_state {
-
-    /* global state */
-
-	enum _header_state state;
-
-	/* for building headers during scanning */
-	char *outbuf;
-	char *outptr;
-	char *outend;
-
-	int fd;			/* input for a fd input */
-	CamelStream *stream;	/* or for a stream */
-
-	/* for scanning input buffers */
-	char *realbuf;		/* the real buffer, SCAN_HEAD*2 + SCAN_BUF bytes */
-	char *inbuf;		/* points to a subset of the allocated memory, the underflow */
-	char *inptr;		/* (upto SCAN_HEAD) is for use by filters so they dont copy all data */
-	char *inend;
-
-	int atleast;
-
-	int seek;		/* current offset to start of buffer */
-	int unstep;		/* how many states to 'unstep' (repeat the current state) */
-
-	int midline;		/* are we mid-line interrupted? */
-	int scan_from;		/* do we care about From lines? */
-
-	int start_of_from;	/* where from started */
-	int start_of_headers;	/* where headers started from the last scan */
-
-	int header_start;	/* start of last header, or -1 */
-
-	struct _header_scan_stack *top_part;	/* top of message header */
-	int top_start;		/* offset of start */
-
-	struct _header_scan_stack *pending; /* if we're pending part info, from the wrong part end */
-
-	/* filters to apply to all content before output */
-	int filterid;		/* id of next filter */
-	struct _header_scan_filter *filters;
-
-    /* per message/part info */
-	struct _header_scan_stack *parts;
-
-};
-
-struct _header_scan_stack {
-	struct _header_scan_stack *parent;
-
-	enum _header_state savestate; /* state at invocation of this part */
-
-#ifdef MEMPOOL
-	MemPool *pool;		/* memory pool to keep track of headers/etc at this level */
-#endif
-	struct _header_raw *headers;	/* headers for this part */
-
-	struct _header_content_type *content_type;
-
-	char *boundary;		/* for multipart/ * boundaries, including leading -- and trailing -- for the final part */
-	int boundarylen;	/* length of boundary, including leading -- */
-};
-
-struct _header_scan_filter {
-	struct _header_scan_filter *next;
-	int id;
-	CamelMimeFilter *filter;
-};
-
-static void folder_scan_step(struct _header_scan_state *s, char **databuffer, int *datalength);
-static void folder_scan_drop_step(struct _header_scan_state *s);
-static int folder_scan_init_with_fd(struct _header_scan_state *s, int fd);
-static int folder_scan_init_with_stream(struct _header_scan_state *s, CamelStream *stream);
-static struct _header_scan_state *folder_scan_init(void);
-static void folder_scan_close(struct _header_scan_state *s);
-static struct _header_scan_stack *folder_scan_content(struct _header_scan_state *s, int *lastone, char **data, int *length);
-static struct _header_scan_stack *folder_scan_header(struct _header_scan_state *s, int *lastone);
-static int folder_scan_skip_line(struct _header_scan_state *s);
-static off_t folder_seek(struct _header_scan_state *s, off_t offset, int whence);
-static off_t folder_tell(struct _header_scan_state *s);
-#ifdef MEMPOOL
-static void header_append_mempool(struct _header_scan_state *s, struct _header_scan_stack *h, char *header, int offset);
-#endif
-
-static void camel_mime_parser_class_init (CamelMimeParserClass *klass);
-static void camel_mime_parser_init       (CamelMimeParser *obj);
-
-static char *states[] = {
-	"HSCAN_INITIAL",
-	"HSCAN_FROM",		/* got 'From' line */
-	"HSCAN_HEADER",		/* toplevel header */
-	"HSCAN_BODY",		/* scanning body of message */
-	"HSCAN_MULTIPART",	/* got multipart header */
-	"HSCAN_MESSAGE",		/* rfc822 message */
-
-	"HSCAN_PART",		/* part of a multipart */
-	"",
-
-	"HSCAN_EOF",		/* end of file */
-	"HSCAN_FROM_END",
-	"HSCAN_HEAER_END",
-	"HSCAN_BODY_END",
-	"HSCAN_MULTIPART_END",
-	"HSCAN_MESSAGE_END",
-};
-
-static CamelObjectClass *camel_mime_parser_parent;
-
-enum SIGNALS {
-	LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-guint
-camel_mime_parser_get_type (void)
-{
-	static guint type = 0;
-	
-	if (!type) {
-		GtkTypeInfo type_info = {
-			"CamelMimeParser",
-			sizeof (CamelMimeParser),
-			sizeof (CamelMimeParserClass),
-			(GtkClassInitFunc) camel_mime_parser_class_init,
-			(GtkObjectInitFunc) camel_mime_parser_init,
-			(GtkArgSetFunc) NULL,
-			(GtkArgGetFunc) NULL
-		};
-		
-		type = gtk_type_unique (camel_object_get_type (), &type_info);
-	}
-	
-	return type;
-}
-
-static void
-finalise(GtkObject *o)
-{
-	struct _header_scan_state *s = _PRIVATE(o);
-#ifdef PURIFY
-	purify_watch_remove_all();
-#endif
-	folder_scan_close(s);
-
-	((GtkObjectClass *)camel_mime_parser_parent)->finalize (o);
-}
-
-static void
-camel_mime_parser_class_init (CamelMimeParserClass *klass)
-{
-	GtkObjectClass *object_class = (GtkObjectClass *) klass;
-	
-	camel_mime_parser_parent = gtk_type_class (camel_object_get_type ());
-
-	object_class->finalize = finalise;
-
-	gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
-}
-
-static void
-camel_mime_parser_init (CamelMimeParser *obj)
-{
-	struct _header_scan_state *s;
-
-	s = folder_scan_init();
-	_PRIVATE(obj) = s;
-}
-
-/**
- * camel_mime_parser_new:
- *
- * Create a new CamelMimeParser object.
- * 
- * Return value: A new CamelMimeParser widget.
- **/
-CamelMimeParser *
-camel_mime_parser_new (void)
-{
-	CamelMimeParser *new = CAMEL_MIME_PARSER ( gtk_type_new (camel_mime_parser_get_type ()));
-	return new;
-}
-
-
-/**
- * camel_mime_parser_filter_add:
- * @m: 
- * @mf: 
- * 
- * Add a filter that will be applied to any body content before it is passed
- * to the caller.  Filters may be pipelined to perform multi-pass operations
- * on the content, and are applied in the order they were added.
- *
- * Note that filters are only applied to the body content of messages, and once
- * a filter has been set, all content returned by a filter_step() with a state
- * of HSCAN_BODY will have passed through the filter.
- * 
- * Return value: An id that may be passed to filter_remove() to remove
- * the filter, or -1 if the operation failed.
- **/
-int
-camel_mime_parser_filter_add(CamelMimeParser *m, CamelMimeFilter *mf)
-{
-	struct _header_scan_state *s = _PRIVATE(m);
-	struct _header_scan_filter *f, *new;
-
-	new = g_malloc(sizeof(*new));
-	new->filter = mf;
-	new->id = s->filterid++;
-	if (s->filterid == -1)
-		s->filterid++;
-	new->next = 0;
-	gtk_object_ref((GtkObject *)mf);
-
-	/* yes, this is correct, since 'next' is the first element of the struct */
-	f = (struct _header_scan_filter *)&s->filters;
-	while (f->next)
-		f = f->next;
-	f->next = new;
-	return new->id;
-}
-
-/**
- * camel_mime_parser_filter_remove:
- * @m: 
- * @id: 
- * 
- * Remove a processing filter from the pipeline.  There is no
- * restriction on the order the filters can be removed.
- **/
-void
-camel_mime_parser_filter_remove(CamelMimeParser *m, int id)
-{
-	struct _header_scan_state *s = _PRIVATE(m);
-	struct _header_scan_filter *f, *old;
-	
-	f = (struct _header_scan_filter *)&s->filters;
-	while (f && f->next) {
-		old = f->next;
-		if (old->id == id) {
-			gtk_object_unref((GtkObject *)old->filter);
-			f->next = old->next;
-			g_free(old);
-			/* there should only be a single matching id, but
-			   scan the whole lot anyway */
-		}
-		f = f->next;
-	}
-}
-
-/**
- * camel_mime_parser_header:
- * @m: 
- * @name: Name of header.
- * @offset: Pointer that can receive the offset of the header in
- * the stream from the start of parsing.
- * 
- * Lookup a header by name.
- * 
- * Return value: The header value, or NULL if the header is not
- * defined.
- **/
-const char *
-camel_mime_parser_header(CamelMimeParser *m, const char *name, int *offset)
-{
-	struct _header_scan_state *s = _PRIVATE(m);
-
-	if (s->parts &&
-	    s->parts->headers) {
-		return header_raw_find(&s->parts->headers, name, offset);
-	}
-	return NULL;
-}
-
-/**
- * camel_mime_parser_headers_raw:
- * @m: 
- * 
- * Get the list of the raw headers which are defined for the
- * current state of the parser.  These headers are valid
- * until the next call to parser_step(), or parser_drop_step().
- * 
- * Return value: The raw headers, or NULL if there are no headers
- * defined for the current part or state.  These are READ ONLY.
- **/
-struct _header_raw *
-camel_mime_parser_headers_raw(CamelMimeParser *m)
-{
-	struct _header_scan_state *s = _PRIVATE(m);
-
-	if (s->parts)
-		return s->parts->headers;
-	return NULL;
-}
-
-/**
- * camel_mime_parser_init_with_fd:
- * @m: 
- * @fd: A valid file descriptor.
- * 
- * Initialise the scanner with an fd.  The scanner's offsets
- * will be relative to the current file position of the file
- * descriptor.  As a result, seekable descritors should
- * be seeked using the parser seek functions.
- * 
- * An initial buffer will be read from the file descriptor
- * immediately, although no parsing will occur.
- *
- * Return value: Returns -1 on error.
- **/
-int
-camel_mime_parser_init_with_fd(CamelMimeParser *m, int fd)
-{
-	struct _header_scan_state *s = _PRIVATE(m);
-
-	return folder_scan_init_with_fd(s, fd);
-}
-
-/**
- * camel_mime_parser_init_with_stream:
- * @m: 
- * @stream: 
- * 
- * Initialise the scanner with a source stream.  The scanner's
- * offsets will be relative to the current file position of
- * the stream.  As a result, seekable streams should only
- * be seeked using the parser seek function.
- *
- * An initial buffer will be read from the stream
- * immediately, although no parsing will occur.
- * 
- * Return value: -1 on error.
- **/
-int
-camel_mime_parser_init_with_stream(CamelMimeParser *m, CamelStream *stream)
-{
-	struct _header_scan_state *s = _PRIVATE(m);
-
-	return folder_scan_init_with_stream(s, stream);
-}
-
-/**
- * camel_mime_parser_scan_from:
- * @m: 
- * @scan_from: #TRUE if the scanner should scan From lines.
- * 
- * Tell the scanner if it should scan "^From " lines or not.
- *
- * If the scanner is scanning from lines, two additional
- * states HSCAN_FROM and HSCAN_FROM_END will be returned
- * to the caller during parsing.
- **/
-void
-camel_mime_parser_scan_from(CamelMimeParser *m, int scan_from)
-{
-	struct _header_scan_state *s = _PRIVATE(m);
-	s->scan_from = scan_from;
-}
-
-/**
- * camel_mime_parser_content_type:
- * @m: 
- * 
- * Get the content type defined in the current part.
- * 
- * Return value: A content_type structure, or NULL if there
- * is no content-type defined for this part of state of the
- * parser.
- **/
-struct _header_content_type *
-camel_mime_parser_content_type(CamelMimeParser *m)
-{
-	struct _header_scan_state *s = _PRIVATE(m);
-
-	/* FIXME: should this search up until its found the 'right'
-	   content-type?  can it? */
-	if (s->parts)
-		return s->parts->content_type;
-	return NULL;
-}
-
-/**
- * camel_mime_parser_unstep:
- * @m: 
- * 
- * Cause the last step operation to repeat itself.  If this is 
- * called repeated times, then the same step will be repeated
- * that many times.
- *
- * Note that it is not possible to scan back using this function,
- * only to have a way of peeking the next state.
- **/
-void camel_mime_parser_unstep(CamelMimeParser *m)
-{
-	struct _header_scan_state *s = _PRIVATE(m);
-
-	s->unstep++;
-}
-
-/**
- * camel_mime_parser_drop_step:
- * @m: 
- * 
- * Drop the last step call.  This should only be used
- * in conjunction with seeking of the stream as the
- * stream may be in an undefined state relative to the
- * state of the parser.
- *
- * Use this call with care.
- **/
-void camel_mime_parser_drop_step(CamelMimeParser *m)
-{
-	struct _header_scan_state *s = _PRIVATE(m);
-
-	s->unstep = 0;
-	folder_scan_drop_step(s);
-}
-
-/**
- * camel_mime_parser_step:
- * @m: 
- * @databuffer: Pointer to accept a pointer to the data
- * associated with this step (if any).  May be #NULL,
- * in which case datalength is also ingored.
- * @datalength: Pointer to accept a pointer to the data
- * length associated with this step (if any).
- * 
- * Parse the next part of the MIME message.  If _unstep()
- * has been called, then continue to return the same state
- * for that many calls.
- *
- * If the step is HSCAN_BODY then the databuffer and datalength
- * pointers will be setup to point to the internal data buffer
- * of the scanner and may be processed as required.  Any
- * filters will have already been applied to this data.
- *
- * Refer to the state diagram elsewhere for a full listing of
- * the states an application is gauranteed to get from the
- * scanner.
- *
- * Return value: The current new state of the parser
- * is returned.
- **/
-enum _header_state
-camel_mime_parser_step(CamelMimeParser *m, char **databuffer, int *datalength)
-{
-	struct _header_scan_state *s = _PRIVATE(m);
-
-	d(printf("OLD STATE:  '%s' :\n", states[s->state]));
-
-	if (s->unstep <= 0) {
-		char *dummy;
-		int dummylength;
-
-		if (databuffer == NULL) {
-			databuffer = &dummy;
-			datalength = &dummylength;
-		}
-			
-		folder_scan_step(s, databuffer, datalength);
-	} else
-		s->unstep--;
-
-	d(printf("NEW STATE:  '%s' :\n", states[s->state]));
-
-	return s->state;
-}
-
-/**
- * camel_mime_parser_tell:
- * @m: 
- * 
- * Return the current scanning offset.  The meaning of this
- * value will depend on the current state of the parser.
- *
- * An incomplete listing of the states:
- *
- * HSCAN_INITIAL, The start of the current message.
- * HSCAN_HEADER, HSCAN_MESSAGE, HSCAN_MULTIPART, the character
- * position immediately after the end of the header.
- * HSCAN_BODY, Position within the message of the start
- * of the current data block.
- * HSCAN_*_END, The position of the character starting
- * the next section of the scan (the last position + 1 of
- * the respective current state).
- * 
- * Return value: See above.
- **/
-off_t camel_mime_parser_tell(CamelMimeParser *m)
-{
-	struct _header_scan_state *s = _PRIVATE(m);
-
-	return folder_tell(s);
-}
-
-/**
- * camel_mime_parser_tell_start_headers:
- * @m: 
- * 
- * Find out the position within the file of where the
- * headers started, this is cached by the parser
- * at the time.
- * 
- * Return value: The header start position, or -1 if
- * no headers were scanned in the current state.
- **/
-off_t camel_mime_parser_tell_start_headers(CamelMimeParser *m)
-{
-	struct _header_scan_state *s = _PRIVATE(m);
-
-	return s->start_of_headers;
-}
-
-/**
- * camel_mime_parser_tell_start_from:
- * @m: 
- * 
- * If the parser is scanning From lines, then this returns
- * the position of the start of the From line.
- * 
- * Return value: The start of the from line, or -1 if there
- * was no From line, or From lines are not being scanned.
- **/
-off_t camel_mime_parser_tell_start_from(CamelMimeParser *m)
-{
-	struct _header_scan_state *s = _PRIVATE(m);
-
-	return s->start_of_from;
-}
-
-/**
- * camel_mime_parser_seek:
- * @m: 
- * @off: Number of bytes to offset the seek by.
- * @whence: SEEK_SET, SEEK_CUR, SEEK_END
- * 
- * Reset the source position to a known value.
- *
- * Note that if the source stream/descriptor was not
- * positioned at 0 to begin with, and an absolute seek
- * is specified (whence != SEEK_CUR), then the seek
- * position may not match the desired seek position.
- * 
- * Return value: The new seek offset, or -1 on
- * an error (for example, trying to seek on a non-seekable
- * stream or file descriptor).
- **/
-off_t camel_mime_parser_seek(CamelMimeParser *m, off_t off, int whence)
-{
-	struct _header_scan_state *s = _PRIVATE(m);
-	return folder_seek(s, off, whence);
-}
-
-/**
- * camel_mime_parser_state:
- * @m: 
- * 
- * Get the current parser state.
- * 
- * Return value: The current parser state.
- **/
-enum _header_state camel_mime_parser_state(CamelMimeParser *m)
-{
-	struct _header_scan_state *s = _PRIVATE(m);
-	return s->state;
-}
-
-/**
- * camel_mime_parser_stream:
- * @m: 
- * 
- * Get the stream, if any, the parser has been initialised
- * with.  May be used to setup sub-streams, but should not
- * be read from directly (without saving and restoring
- * the seek position in between).
- * 
- * Return value: The stream from _init_with_stream(), or NULL
- * if the parser is reading from a file descriptor or is
- * uninitialised.
- **/
-CamelStream *camel_mime_parser_stream(CamelMimeParser *m)
-{
-	struct _header_scan_state *s = _PRIVATE(m);
-	return s->stream;
-}
-
-/**
- * camel_mime_parser_fd:
- * @m: 
- * 
- * Return the file descriptor, if any, the parser has been
- * initialised with.
- *
- * Should not be read from unless the parser it to terminate,
- * or the seek offset can be reset before the next parse
- * step.
- * 
- * Return value: The file descriptor or -1 if the parser
- * is reading from a stream or has not been initialised.
- **/
-int camel_mime_parser_fd(CamelMimeParser *m)
-{
-	struct _header_scan_state *s = _PRIVATE(m);
-	return s->fd;
-}
-
-/* ********************************************************************** */
-/*    Implementation							  */
-/* ********************************************************************** */
-
-/* read the next bit of data, ensure there is enough room 'atleast' bytes */
-static int
-folder_read(struct _header_scan_state *s)
-{
-	int len;
-	int inoffset;
-
-	if (s->inptrinend-s->atleast)
-		return s->inend-s->inptr;
-#ifdef PURIFY
-	purify_watch_remove(inend_id);
-	purify_watch_remove(inbuffer_id);
-#endif
-	/* check for any remaning bytes (under the atleast limit( */
-	inoffset = s->inend - s->inptr;
-	if (inoffset>0) {
-		memcpy(s->inbuf, s->inptr, inoffset);
-	}
-	if (s->stream) {
-		len = camel_stream_read(s->stream, s->inbuf+inoffset, SCAN_BUF-inoffset);
-	} else {
-		len = read(s->fd, s->inbuf+inoffset, SCAN_BUF-inoffset);
-	}
-	r(printf("read %d bytes, offset = %d\n", len, inoffset));
-	if (len>=0) {
-		/* add on the last read block */
-		s->seek += s->inptr - s->inbuf;
-		s->inptr = s->inbuf;
-		s->inend = s->inbuf+len+inoffset;
-		r(printf("content = %d '%.*s'\n",s->inend - s->inptr,  s->inend - s->inptr, s->inptr));
-	}
-
-	g_assert(s->inptr<=s->inend);
-#ifdef PURIFY
-	inend_id = purify_watch(&s->inend);
-	inbuffer_id = purify_watch_n(s->inend+1, SCAN_HEAD-1, "rw");
-#endif
-	r(printf("content = %d '%.*s'\n", s->inend - s->inptr,  s->inend - s->inptr, s->inptr));
-	/* set a sentinal, for the inner loops to check against */
-	s->inend[0] = '\n';
-	return s->inend-s->inptr;
-}
-
-/* return the current absolute position of the data pointer */
-static off_t
-folder_tell(struct _header_scan_state *s)
-{
-	return s->seek + (s->inptr - s->inbuf);
-}
-
-/*
-  need some way to prime the parser state, so this actually works for 
-  other than top-level messages
-*/
-static off_t
-folder_seek(struct _header_scan_state *s, off_t offset, int whence)
-{
-	off_t newoffset;
-	int len;
-
-	if (s->stream) {
-		if (CAMEL_IS_SEEKABLE_STREAM(s->stream)) {
-			/* NOTE: assumes whence seekable stream == whence libc, which is probably
-			   the case (or bloody well should've been) */
-			newoffset = camel_seekable_stream_seek((CamelSeekableStream *)s->stream, offset, whence);
-		} else {
-			newoffset = -1;
-			errno = EINVAL;
-		}
-	} else {
-		newoffset = lseek(s->fd, offset, whence);
-	}
-#ifdef PURIFY
-	purify_watch_remove(inend_id);
-	purify_watch_remove(inbuffer_id);
-#endif
-	if (newoffset != -1) {
-		s->seek = newoffset;
-		s->inptr = s->inbuf;
-		s->inend = s->inbuf;
-		if (s->stream)
-			len = camel_stream_read(s->stream, s->inbuf, SCAN_BUF);
-		else
-			len = read(s->fd, s->inbuf, SCAN_BUF);
-		if (len>=0) {
-			s->inend = s->inbuf+len;
-			s->inend[0] = '\n';
-		} else
-			newoffset = -1;
-	}
-#ifdef PURIFY
-	inend_id = purify_watch(&s->inend);
-	inbuffer_id = purify_watch_n(s->inend+1, SCAN_HEAD-1, "rw");
-#endif
-	return newoffset;
-}
-
-static void
-folder_push_part(struct _header_scan_state *s, struct _header_scan_stack *h)
-{
-	h->parent = s->parts;
-	s->parts = h;
-}
-
-static void
-folder_pull_part(struct _header_scan_state *s)
-{
-	struct _header_scan_stack *h;
-
-	h = s->parts;
-	if (h) {
-		s->parts = h->parent;
-		g_free(h->boundary);
-#ifdef MEMPOOL
-		mempool_free(h->pool);
-#else
-		header_raw_clear(&h->headers);
-#endif
-		header_content_type_unref(h->content_type);
-		g_free(h);
-	} else {
-		g_warning("Header stack underflow!\n");
-	}
-}
-
-static int
-folder_scan_skip_line(struct _header_scan_state *s)
-{
-	int atleast = s->atleast;
-	register char *inptr, *inend, c;
-	int len;
-
-	s->atleast = 1;
-
-	while ( (len = folder_read(s)) > 0 && len > s->atleast) { /* ensure we have at least enough room here */
-		inptr = s->inptr;
-		inend = s->inend-1;
-
-		c = -1;
-		while (inptrinptr = inptr;
-
-		if (c=='\n') {
-			s->atleast = atleast;
-			return 0;
-		}
-	}
-
-	s->atleast = atleast;
-
-	return -1;		/* not found */
-}
-
-/* TODO: Is there any way to make this run faster?  It gets called a lot ... */
-static struct _header_scan_stack *
-folder_boundary_check(struct _header_scan_state *s, const char *boundary, int *lastone)
-{
-	struct _header_scan_stack *part;
-	int len = s->atleast-2;	/* make sure we dont access past the buffer */
-
-	h(printf("checking boundary marker upto %d bytes\n", len));
-	part = s->parts;
-	while (part) {
-		h(printf("  boundary: %s\n", part->boundary));
-		h(printf("   against: '%.*s'\n", len, boundary));
-		if (part->boundary
-		    && part->boundarylen <= len
-		    && memcmp(boundary, part->boundary, part->boundarylen)==0) {
-			h(printf("matched boundary: %s\n", part->boundary));
-			/* again, make sure we're in range */
-			if (part->boundarylen <= len+2) {
-				h(printf("checking lastone\n"));
-				*lastone = (boundary[part->boundarylen]=='-'
-					    && boundary[part->boundarylen+1]=='-');
-			} else {
-				h(printf("not enough room to check last one?\n"));
-				*lastone = FALSE;
-			}
-			/*printf("ok, we found it! : %s \n", (*lastone)?"Last one":"More to come?");*/
-			return part;
-		}
-		part = part->parent;
-	}
-	return NULL;
-}
-
-#ifdef MEMPOOL
-static void
-header_append_mempool(struct _header_scan_state *s, struct _header_scan_stack *h, char *header, int offset)
-{
-	struct _header_raw *l, *n;
-	char *content;
-
-	d(printf("Header: %s: %s\n", name, value));
-
-	content = strchr(header, ':');
-	if (content) {
-		register int len;
-		n = mempool_alloc(h->pool, sizeof(*n));
-		n->next = NULL;
-
-		len = content-header;
-		n->name = mempool_alloc(h->pool, len+1);
-		memcpy(n->name, header, len);
-		n->name[len] = 0;
-
-		content++;
-
-		len = s->outptr - content;
-		n->value = mempool_alloc(h->pool, len+1);
-		memcpy(n->value, content, len);
-		n->value[len] = 0;
-
-		n->offset = offset;
-
-		l = (struct _header_raw *)&h->headers;
-		while (l->next) {
-			l = l->next;
-		}
-		l->next = n;
-	}
-
-}
-
-#define header_raw_append_parse(a, b, c) (header_append_mempool(s, h, b, c))
-
-#endif
-
-/* Copy the string start->inptr into the header buffer (s->outbuf),
-   grow if necessary
-   and track the start offset of the header */
-/* Basically an optimised version of g_byte_array_append() */
-#define header_append(s, start, inptr)						\
-{										\
-	register int headerlen = inptr-start;					\
-										\
-	if (headerlen >= (s->outend - s->outptr)) {				\
-		register char *outnew;						\
-		register int len = ((s->outend - s->outbuf)+headerlen)*2+1;	\
-		outnew = g_realloc(s->outbuf, len);				\
-		s->outptr = s->outptr - s->outbuf + outnew;			\
-		s->outbuf = outnew;						\
-		s->outend = outnew + len;					\
-	}									\
-	memcpy(s->outptr, start, headerlen);					\
-	s->outptr += headerlen;							\
-	if (s->header_start == -1)						\
-		s->header_start = (start-s->inbuf) + s->seek;			\
-}
-
-static struct _header_scan_stack *
-folder_scan_header(struct _header_scan_state *s, int *lastone)
-{
-	int atleast = s->atleast;
-	char *start;
-	int len;
-	struct _header_scan_stack *part, *overpart = s->parts;
-	struct _header_scan_stack *h;
-	char *inend;
-	register char *inptr;
-
-	h(printf("scanning first bit\n"));
-
-	h = g_malloc0(sizeof(*h));
-#ifdef MEMPOOL
-	h->pool = mempool_new(8192, 4096);
-#endif
-
-	/* FIXME: this info should be cached ? */
-	part = s->parts;
-	s->atleast = 5;
-	while (part) {
-		if (part->boundary)
-			s->atleast = MAX(s->atleast, part->boundarylen+2);
-		part = part->parent;
-	}
-#if 0
-	s->atleast = MAX(s->atleast, 5);
-	if (s->parts)
-		s->atleast = MAX(s->atleast, s->parts->boundarylen+2);
-#endif
-
-	*lastone = FALSE;
-retry:
-
-	while ((len = folder_read(s))>0 && len >= s->atleast) { /* ensure we have at least enough room here */
-		inptr = s->inptr;
-		inend = s->inend-s->atleast;
-
-		while (inptr<=inend) {
-			/*printf("  '%.20s'\n", inptr);*/
-
-			start = inptr;
-
-			if (!s->midline
-			    && (part = folder_boundary_check(s, inptr, lastone))) {
-				if ((s->outptr>s->outbuf) || (inptr-start))
-					goto header_truncated; /* may not actually be truncated */
-				
-				goto normal_exit;
-			}
-
-			/* goto next line */
-			while ((*inptr++)!='\n')
-				;
-
-			/* check against the real buffer end, not our 'atleast limited' end */
-			/* also make sure we have at least 1 char lookahead, so even if we found a \n at
-			   the end, well, make out we didn't, and re-scan it next pass */
-			if (inptr>=s->inend) {
-				inptr--;
-				s->midline = TRUE;
-			} else {
-				s->midline = FALSE;
-			}
-
-			g_assert(inptr<=s->inend);
-
-			header_append(s, start, inptr);
-
-			h(printf("outbuf[0] = %02x '%c' oubuf[1] = %02x '%c'\n",
-				 s->outbuf[0], isprint(s->outbuf[0])?s->outbuf[0]:'.',
-				 s->outbuf[1], isprint(s->outbuf[1])?s->outbuf[1]:'.'));
-
-			if (!s->midline
-			    && !(inptr[0] == ' ' || inptr[0] == '\t')) {
-				if (s->outbuf[0] == '\n'
-				    || (s->outbuf[0] == '\r' && s->outbuf[1]=='\n')) {
-					goto header_done;
-				}
-
-				/* we always have at least _1_ char here ... */
-				if (s->outptr[-1] == '\n')
-					s->outptr--;
-				s->outptr[0] = 0;
-				
-				d(printf("header %.10s at %d\n", s->outbuf, s->header_start));
-				
-				header_raw_append_parse(&h->headers, s->outbuf, s->header_start);
-				
-				if (inptr[0]=='\n'
-				    || (inptr[0] == '\r' && inptr[1]=='\n')) {
-					inptr++;
-					goto header_done;
-				}
-				s->outptr = s->outbuf;
-				s->header_start = -1;
-			}
-		}
-		s->inptr = inptr;
-	}
-
-	/* ok, we're at the end of the data, just make sure we're not missing out some small
-	   truncated header markers */
-	if (overpart) {
-		overpart = overpart->parent;
-		while (overpart) {
-			if (overpart->boundary && (overpart->boundarylen+2) < s->atleast) {
-				s->atleast = overpart->boundarylen+2;
-				h(printf("Retrying next smaller part ...\n"));
-				goto retry;
-			}
-			overpart = overpart->parent;
-		}
-	}
-
-	if ((s->outptr > s->outbuf) || s->inend > s->inptr) {
-		start = s->inptr;
-		inptr = s->inend;
-		goto header_truncated;
-	}
-
-	s->atleast = atleast;
-
-	return h;
-
-header_truncated:
-
-	header_append(s, start, inptr);
-
-	if (s->outptr>s->outbuf && s->outptr[-1] == '\n')
-		s->outptr--;
-	s->outptr[0] = 0;
-
-	if (s->outbuf[0] == '\n'
-	    || (s->outbuf[0] == '\r' && s->outbuf[1]=='\n')) {
-		goto header_done;
-	}
-
-	header_raw_append_parse(&h->headers, s->outbuf, s->header_start);
-
-header_done:
-	part = s->parts;
-
-	s->outptr = s->outbuf;
-normal_exit:
-	s->inptr = inptr;
-	s->atleast = atleast;
-	s->header_start = -1;
-	return h;
-}
-
-static struct _header_scan_stack *
-folder_scan_content(struct _header_scan_state *s, int *lastone, char **data, int *length)
-{
-	int atleast = s->atleast;
-	register char *inptr;
-	char *inend;
-	char *start;
-	int len;
-	struct _header_scan_stack *part, *overpart = s->parts;
-	int already_packed = FALSE;
-
-	/*printf("scanning content\n");*/
-
-	/* FIXME: this info should be cached ? */
-	part = s->parts;
-	s->atleast = 5;
-	while (part) {
-		if (part->boundary) {
-			c(printf("boundary: %s\n", part->boundary));
-			s->atleast = MAX(s->atleast, part->boundarylen+2);
-		}
-		part = part->parent;
-	}
-/*	s->atleast = MAX(s->atleast, 5);*/
-#if 0
-	if (s->parts)
-		s->atleast = MAX(s->atleast, s->parts->boundarylen+2);
-#endif
-	*lastone = FALSE;
-
-retry:
-	c(printf("atleast = %d\n", s->atleast));
-	
-	while ((len = folder_read(s))>0 && len >= s->atleast) { /* ensure we have at least enough room here */
-		inptr = s->inptr;
-		inend = s->inend-s->atleast;
-		start = inptr;
-
-		c(printf("inptr = %p, inend = %p\n", inptr, inend));
-
-		while (inptr<=inend) {
-			if (!s->midline
-			    && (part = folder_boundary_check(s, inptr, lastone))) {
-				if ( (inptr-start) )
-					goto content;
-				
-				goto normal_exit;
-			}
-
-			/* goto the next line */
-			while ((*inptr++)!='\n')
-				;
-
-			/* check against the real buffer end, not our 'atleast limited' end */
-			if (inptr> s->inend) {
-				inptr--;
-				s->midline = TRUE;
-			} else {
-				s->midline = FALSE;
-			}
-
-			g_assert(inptr<=s->inend);
-		}
-
-		/* *sigh* so much for the beautiful simplicity of the code so far - here we
-		   have the snot to deal with the nasty end-cases that come from the read-ahead
-		   buffers we use */
-		/* what this does, is if we are somewhere near the end of the buffer,
-		   force it to the front, and re-read, ensuring we bunch as much together
-		   as possible, for the final read, without copying too much of the time */
-		/* make sure we dont loop forever, but also make sure we try smaller
-		   boundaries, if there are any, so we dont miss any. */
-		/* this is not needed for the header scanner, since it copies its own
-		   data */
-		c(printf("start offset = %d  atleast = %d\n", start-s->inbuf, s->atleast));
-		if (start > (s->inbuf + s->atleast)) {
-			/* force a re-scan of this data */
-			s->inptr = start;
-			if (already_packed)
-				goto smaller_boundary;
-			c(printf("near the end, try and bunch things up a bit first\n"));
-			already_packed = TRUE;
-		} else {
-			c(printf("dumping what i've got ...\n"));
-			/* what would be nice here, is if that we're at eof, we bunch the last
-			   little bit in the same content, but i dont think this is easy */
-			goto content_mid;
-		}
-	}
-
-	c(printf("length read = %d\n", len));
-smaller_boundary:
-
-	/* ok, we're at the end of the data, just make sure we're not missing out some small
-	   truncated header markers */
-	if (overpart) {
-		overpart = overpart->parent;
-		while (overpart) {
-			if (overpart->boundary && (overpart->boundarylen+2) < s->atleast) {
-				s->atleast = overpart->boundarylen+2;
-				c(printf("Retrying next smaller part ...\n"));
-				goto retry;
-			}
-			overpart = overpart->parent;
-		}
-	}
-
-	if (s->inend > s->inptr) {
-		start = s->inptr;
-		inptr = s->inend;
-		goto content;
-	}
-
-	*length = 0;
-	s->atleast = atleast;
-	return NULL;
-
-content_mid:
-	s->midline = TRUE;
-content:
-	part = s->parts;
-normal_exit:
-	s->atleast = atleast;
-	s->inptr = inptr;
-
-	*data = start;
-	*length = inptr-start;
-
-/*	printf("got %scontent: %.*s", s->midline?"partial ":"", inptr-start, start);*/
-
-	return part;
-}
-
-
-static void
-folder_scan_close(struct _header_scan_state *s)
-{
-	g_free(s->realbuf);
-	g_free(s->outbuf);
-	while (s->parts)
-		folder_pull_part(s);
-	if (s->fd != -1)
-		close(s->fd);
-	if (s->stream) {
-		gtk_object_unref((GtkObject *)s->stream);
-	}
-	g_free(s);
-}
-
-
-static struct _header_scan_state *
-folder_scan_init(void)
-{
-	struct _header_scan_state *s;
-
-	s = g_malloc(sizeof(*s));
-
-	s->fd = -1;
-	s->stream = NULL;
-
-	s->outbuf = g_malloc(1024);
-	s->outptr = s->outbuf;
-	s->outend = s->outbuf+1024;
-
-	s->realbuf = g_malloc(SCAN_BUF + SCAN_HEAD*2);
-	s->inbuf = s->realbuf + SCAN_HEAD;
-	s->inptr = s->inbuf;
-	s->inend = s->inbuf;
-	s->atleast = 0;
-
-	s->seek = 0;		/* current character position in file of the last read block */
-	s->unstep = 0;
-
-	s->header_start = -1;
-
-	s->start_of_from = -1;
-	s->start_of_headers = -1;
-
-	s->midline = FALSE;
-	s->scan_from = FALSE;
-
-	s->filters = NULL;
-	s->filterid = 1;
-
-	s->parts = NULL;
-
-	s->state = HSCAN_INITIAL;
-	return s;
-}
-
-static int
-folder_scan_init_with_fd(struct _header_scan_state *s, int fd)
-{
-	int len;
-
-	len = read(fd, s->inbuf, SCAN_BUF);
-	if (len>=0) {
-		s->inend = s->inbuf+len;
-		s->inptr = s->inbuf;
-		s->inend[0] = '\n';
-		if (s->fd != -1)
-			close(s->fd);
-		s->fd = fd;
-		if (s->stream) {
-			gtk_object_unref((GtkObject *)s->stream);
-			s->stream = NULL;
-		}
-		return 0;
-	} else {
-		return -1;
-	}
-}
-
-static int
-folder_scan_init_with_stream(struct _header_scan_state *s, CamelStream *stream)
-{
-	int len;
-
-	len = camel_stream_read(stream, s->inbuf, SCAN_BUF);
-	if (len >= 0) {
-		s->inend = s->inbuf+len;
-		s->inptr = s->inbuf;
-		s->inend[0] = '\n';
-		if (s->stream)
-			gtk_object_unref((GtkObject *)s->stream);
-		s->stream = stream;
-		gtk_object_ref((GtkObject *)stream);
-		if (s->fd != -1) {
-			close(s->fd);
-			s->fd = -1;
-		}
-		return 0;
-	} else {
-		return -1;
-	}
-}
-
-#define USE_FROM
-
-static void
-folder_scan_step(struct _header_scan_state *s, char **databuffer, int *datalength)
-{
-	struct _header_scan_stack *h, *hb;
-	const char *content;
-	const char *bound;
-	int type;
-	int state;
-	struct _header_content_type *ct = NULL;
-	struct _header_scan_filter *f;
-	size_t presize;
-
-/*	printf("\nSCAN PASS: state = %d '%s'\n", s->state, states[s->state]);*/
-
-tail_recurse:
-	d({
-		printf("\nSCAN STACK:\n");
-		printf("  '%s' :\n", states[s->state]);
-		hb = s->parts;
-		while (hb) {
-			printf("  '%s' : %s\n", states[hb->savestate], hb->boundary);
-			hb = hb->parent;
-		}
-		printf("\n");
-	});
-
-	switch (s->state) {
-
-	case HSCAN_INITIAL:
-#ifdef USE_FROM
-		if (s->scan_from) {
-			/* FIXME: it would be nice not to have to allocate this every pass */
-			h = g_malloc0(sizeof(*h));
-			h->boundary = g_strdup("From ");
-			h->boundarylen = strlen(h->boundary);
-			folder_push_part(s, h);
-			
-			h = s->parts;
-			do {
-				hb = folder_scan_content(s, &state, databuffer, datalength);
-			} while (hb==h && *datalength>0);
-			
-			if (*datalength==0 && hb==h) {
-				d(printf("found 'From '\n"));
-				s->start_of_from = folder_tell(s);
-				folder_scan_skip_line(s);
-				h->savestate = HSCAN_INITIAL;
-				s->state = HSCAN_FROM;
-			} else {
-				folder_pull_part(s);
-				s->state = HSCAN_EOF;
-			}
-			return;
-		} else {
-			s->start_of_from = -1;
-		}
-
-#endif
-	case HSCAN_FROM:
-		s->start_of_headers = folder_tell(s);
-		h = folder_scan_header(s, &state);
-#ifdef USE_FROM
-		if (s->scan_from)
-			h->savestate = HSCAN_FROM_END;
-		else
-#endif
-			h->savestate = HSCAN_EOF;
-
-		/* FIXME: should this check for MIME-Version: 1.0 as well? */
-
-		type = HSCAN_HEADER;
-		if ( (content = header_raw_find(&h->headers, "Content-Type", NULL))
-		     && (ct = header_content_type_decode(content))) {
-			if (!strcasecmp(ct->type, "multipart")) {
-				bound = header_content_type_param(ct, "boundary");
-				if (bound) {
-					d(printf("multipart, boundary = %s\n", bound));
-					h->boundarylen = strlen(bound)+2;
-					h->boundary = g_malloc(h->boundarylen+3);
-					sprintf(h->boundary, "--%s--", bound);
-					type = HSCAN_MULTIPART;
-				} else {
-					header_content_type_unref(ct);
-					ct = header_content_type_decode("text/plain");
-/* We can't quite do this, as it will mess up all the offsets ... */
-/*					header_raw_replace(&h->headers, "Content-Type", "text/plain", offset);*/
-					g_warning("Multipart with no boundary, treating as text/plain");
-				}
-			} else if (!strcasecmp(ct->type, "message")) {
-				if (!strcasecmp(ct->subtype, "rfc822")
-				    /*|| !strcasecmp(ct->subtype, "partial")*/) {
-					type = HSCAN_MESSAGE;
-				}
-			}
-		}
-		h->content_type = ct;
-		folder_push_part(s, h);
-		s->state = type;
-		return;
-
-	case HSCAN_HEADER:
-		s->state = HSCAN_BODY;
-
-	case HSCAN_BODY:
-		h = s->parts;
-		*datalength = 0;
-		presize = SCAN_HEAD;
-		f = s->filters;
-
-		do {
-			hb = folder_scan_content(s, &state, databuffer, datalength);
-			if (*datalength>0) {
-				d(printf("Content raw: '%.*s'\n", *datalength, *databuffer));
-
-				while (f) {
-					camel_mime_filter_filter(f->filter, *databuffer, *datalength, presize,
-								 databuffer, datalength, &presize);
-					f = f->next;
-				}
-				return;
-			}
-		} while (hb==h && *datalength>0);
-
-		/* check for any filter completion data */
-		while (f) {
-			camel_mime_filter_filter(f->filter, *databuffer, *datalength, presize,
-						 databuffer, datalength, &presize);
-			f = f->next;
-		}
-		if (*datalength > 0)
-			return;
-
-		s->state = HSCAN_BODY_END;
-		break;
-
-	case HSCAN_MULTIPART:
-		h = s->parts;
-		do {
-			do {
-				hb = folder_scan_content(s, &state, databuffer, datalength);
-				if (*datalength>0) {
-					/* FIXME: needs a state to return this shit??? */
-					d(printf("Multipart Content: '%.*s'\n", *datalength, *databuffer));
-				}
-			} while (hb==h && *datalength>0);
-			if (*datalength==0 && hb==h) {
-				d(printf("got boundary: %s\n", hb->boundary));
-				folder_scan_skip_line(s);
-				if (!state) {
-					s->state = HSCAN_FROM;
-					folder_scan_step(s, databuffer, datalength);
-					s->parts->savestate = HSCAN_MULTIPART; /* set return state for the new head part */
-					return;
-				}
-			} else {
-				break;
-			}
-		} while (1);
-
-		s->state = HSCAN_MULTIPART_END;
-		break;
-
-	case HSCAN_MESSAGE:
-		s->state = HSCAN_FROM;
-		folder_scan_step(s, databuffer, datalength);
-		s->parts->savestate = HSCAN_MESSAGE_END;
-		break;
-
-	case HSCAN_FROM_END:
-	case HSCAN_BODY_END:
-	case HSCAN_MULTIPART_END:
-	case HSCAN_MESSAGE_END:
-		s->state = s->parts->savestate;
-		folder_pull_part(s);
-		if (s->state & HSCAN_END)
-			return;
-		goto tail_recurse;
-
-	case HSCAN_EOF:
-		return;
-
-	default:
-		g_warning("Invalid state in camel-mime-parser: %d", s->state);
-		break;
-	}
-
-	return;
-}
-
-/* drops the current state back one */
-static void
-folder_scan_drop_step(struct _header_scan_state *s)
-{
-	switch (s->state) {
-	case HSCAN_INITIAL:
-	case HSCAN_EOF:
-		return;
-
-	case HSCAN_FROM:
-		s->state = HSCAN_INITIAL;
-		folder_pull_part(s);
-		return;
-
-	case HSCAN_MESSAGE:
-	case HSCAN_HEADER:
-	case HSCAN_MULTIPART:
-
-	case HSCAN_FROM_END:
-	case HSCAN_BODY_END:
-	case HSCAN_MULTIPART_END:
-	case HSCAN_MESSAGE_END:
-
-		s->state = s->parts->savestate;
-		folder_pull_part(s);
-		if (s->state & HSCAN_END) {
-			s->state &= ~HSCAN_END;
-		}
-		return;
-	}
-}
-
-#ifdef STANDALONE
-int main(int argc, char **argv)
-{
-	int fd;
-	struct _header_scan_state *s;
-	char *data;
-	int len;
-	int state;
-	char *name = "/tmp/evmail/Inbox";
-	struct _header_scan_stack *h;
-	int i;
-	int attach = 0;
-
-	if (argc==2)
-		name = argv[1];
-
-	printf("opening: %s", name);
-
-	for (i=1;iscan_from = FALSE;
-#if 0
-		h = g_malloc0(sizeof(*h));
-		h->savestate = HSCAN_EOF;
-		folder_push_part(s, h);
-#endif	
-		while (s->state != HSCAN_EOF) {
-			folder_scan_step(s, &data, &len);
-			printf("\n -- PARSER STEP RETURN -- %d '%s'\n\n", s->state, states[s->state]);
-			switch (s->state) {
-			case HSCAN_HEADER:
-				if (s->parts->content_type
-				    && (charset = header_content_type_param(s->parts->content_type, "charset"))) {
-					if (strcasecmp(charset, "us-ascii")) {
-						folder_push_filter_charset(s, "UTF-8", charset);
-					} else {
-						charset = NULL;
-					}
-				} else {
-					charset = NULL;
-				}
-
-				encoding = header_raw_find(&s->parts->headers, "Content-transfer-encoding");
-				printf("encoding = '%s'\n", encoding);
-				if (encoding && !strncasecmp(encoding, " base64", 7)) {
-					printf("adding base64 filter\n");
-					attachname = g_strdup_printf("attach.%d.%d", i, attach++);
-					folder_push_filter_save(s, attachname);
-					g_free(attachname);
-					folder_push_filter_mime(s, 0);
-				}
-				if (encoding && !strncasecmp(encoding, " quoted-printable", 17)) {
-					printf("adding quoted-printable filter\n");
-					attachname = g_strdup_printf("attach.%d.%d", i, attach++);
-					folder_push_filter_save(s, attachname);
-					g_free(attachname);
-					folder_push_filter_mime(s, 1);
-				}
-
-				break;
-			case HSCAN_BODY:
-				break;
-			case HSCAN_BODY_END:
-				if (encoding && !strncasecmp(encoding, " base64", 7)) {
-					printf("removing filters\n");
-					folder_filter_pull(s);
-					folder_filter_pull(s);
-				}
-				if (encoding && !strncasecmp(encoding, " quoted-printable", 17)) {
-					printf("removing filters\n");
-					folder_filter_pull(s);
-					folder_filter_pull(s);
-				}
-				if (charset) {
-					folder_filter_pull(s);
-					charset = NULL;
-				}
-				encoding = NULL;
-				break;
-			default:
-				break;
-			}
-		}
-		folder_scan_close(s);
-		close(fd);
-	}
-	return 0;
-}
-
-#endif /* STANDALONE */
-
diff --git a/camel/camel-mime-parser.h b/camel/camel-mime-parser.h
deleted file mode 100644
index 2283ec6f98..0000000000
--- a/camel/camel-mime-parser.h
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- *  Copyright (C) 2000 Helix Code Inc.
- *
- *  Authors: Michael Zucchi 
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Library General Public License
- *  as published by the Free Software Foundation; either version 2 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU Library General Public License for more details.
- *
- *  You should have received a copy of the GNU Library General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef _CAMEL_MIME_PARSER_H
-#define _CAMEL_MIME_PARSER_H
-
-#include 
-
-#include 
-#include 
-#include 
-
-#define CAMEL_MIME_PARSER(obj)         GTK_CHECK_CAST (obj, camel_mime_parser_get_type (), CamelMimeParser)
-#define CAMEL_MIME_PARSER_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, camel_mime_parser_get_type (), CamelMimeParserClass)
-#define IS_CAMEL_MIME_PARSER(obj)      GTK_CHECK_TYPE (obj, camel_mime_parser_get_type ())
-
-typedef struct _CamelMimeParserClass CamelMimeParserClass;
-
-/* NOTE: if you add more states, you may need to bump the
-   start of the END tags to 16 or 32, etc - so they are
-   the same as the matching start tag, with a bit difference */
-enum _header_state {
-	HSCAN_INITIAL,
-	HSCAN_FROM,		/* got 'From' line */
-	HSCAN_HEADER,		/* toplevel header */
-	HSCAN_BODY,		/* scanning body of message */
-	HSCAN_MULTIPART,	/* got multipart header */
-	HSCAN_MESSAGE,		/* rfc822 message */
-
-	HSCAN_PART,		/* part of a multipart */
-
-	HSCAN_END = 8,		/* bit mask for 'end' flags */
-
-	HSCAN_EOF = 8,		/* end of file */
-	HSCAN_FROM_END,		/* end of whole from bracket */
-	HSCAN_HEADER_END,	/* dummy value */
-	HSCAN_BODY_END,		/* end of message */
-	HSCAN_MULTIPART_END,	/* end of multipart  */
-	HSCAN_MESSAGE_END,	/* end of message */
-
-};
-
-struct _CamelMimeParser {
-	CamelObject parent;
-
-	struct _CamelMimeParserPrivate *priv;
-};
-
-struct _CamelMimeParserClass {
-	CamelObjectClass parent_class;
-
-	void (*message)(CamelMimeParser *, void *headers);
-	void (*part)(CamelMimeParser *);
-	void (*content)(CamelMimeParser *);
-};
-
-guint		camel_mime_parser_get_type	(void);
-CamelMimeParser      *camel_mime_parser_new	(void);
-
-/* using an fd will be a little faster, but not much (over a simple stream) */
-int		camel_mime_parser_init_with_fd(CamelMimeParser *, int fd);
-int		camel_mime_parser_init_with_stream(CamelMimeParser *m, CamelStream *stream);
-
-/* get the stream or fd back of the parser */
-CamelStream    *camel_mime_parser_stream(CamelMimeParser *m);
-int		camel_mime_parser_fd(CamelMimeParser *m);
-
-/* scan 'From' separators? */
-void camel_mime_parser_scan_from(CamelMimeParser *, int);
-
-/* what headers to save, MUST include ^Content-Type: */
-int camel_mime_parser_set_header_regex(CamelMimeParser *m, char *matchstr);
-
-/* normal interface */
-enum _header_state camel_mime_parser_step(CamelMimeParser *, char **, int *);
-void camel_mime_parser_unstep(CamelMimeParser *);
-void camel_mime_parser_drop_step(CamelMimeParser *m);
-enum _header_state camel_mime_parser_state(CamelMimeParser *);
-
-/* get content type for the current part/header */
-struct _header_content_type *camel_mime_parser_content_type(CamelMimeParser *);
-
-/* get/change raw header by name */
-const char *camel_mime_parser_header(CamelMimeParser *, const char *, int *offset);
-
-/* get all raw headers. READ ONLY! */
-struct _header_raw *camel_mime_parser_headers_raw(CamelMimeParser *);
-
-/* add a processing filter for body contents */
-int camel_mime_parser_filter_add(CamelMimeParser *, CamelMimeFilter *);
-void camel_mime_parser_filter_remove(CamelMimeParser *, int);
-
-/* these should be used with caution, because the state will not
-   track the seeked position */
-/* FIXME: something to bootstrap the state? */
-off_t camel_mime_parser_tell(CamelMimeParser *);
-off_t camel_mime_parser_seek(CamelMimeParser *, off_t, int);
-
-off_t camel_mime_parser_tell_start_headers(CamelMimeParser *);
-off_t camel_mime_parser_tell_start_from(CamelMimeParser *);
-
-#endif /* ! _CAMEL_MIME_PARSER_H */
diff --git a/camel/camel-mime-part-utils.c b/camel/camel-mime-part-utils.c
deleted file mode 100644
index f2b67416ac..0000000000
--- a/camel/camel-mime-part-utils.c
+++ /dev/null
@@ -1,219 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; fill-column: 160 -*- */
-/* camel-mime-part-utils : Utility for mime parsing and so on
- *
- * Authors: Bertrand Guiheneuf 
- * 	    Michael Zucchi 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-#include 
-#include 
-#include "gmime-content-field.h"
-#include "string-utils.h"
-#include "camel-mime-part-utils.h"
-#include "camel-mime-message.h"
-#include "camel-multipart.h"
-#include "camel-seekable-substream.h"
-#include "camel-stream-filter.h"
-#include "camel-stream-mem.h"
-#include "camel-mime-filter-basic.h"
-#include "camel-mime-filter-charset.h"
-
-#define d(x)
-
-/* simple data wrapper */
-static void
-simple_data_wrapper_construct_from_parser(CamelDataWrapper *dw, CamelMimeParser *mp)
-{
-	GByteArray *buffer;
-	char *buf;
-	int len;
-	off_t start, end;	/* ignore the start may be used unitialised warning */
-	CamelMimeFilter *fdec = NULL, *fch = NULL;
-	struct _header_content_type *ct;
-	int decid=-1, chrid=-1, cache=TRUE;
-	CamelStream *source;
-	CamelSeekableStream *seekable_source; /* and ignore the warning about this one too. */
-	char *encoding;
-
-	d(printf("constructing data-wrapper\n"));
-
-		/* Ok, try and be smart.  If we're storing a small message (typical) convert it,
-		   and store it in memory as we parse it ... if not, throw away the conversion
-		   and scan till the end ... */
-
-		/* if we can't seek, dont have a stream/etc, then we must cache it */
-	source = camel_mime_parser_stream(mp);
-	if (source) {
-		gtk_object_ref((GtkObject *)source);
-		if (CAMEL_IS_SEEKABLE_STREAM (source)) {
-			seekable_source = CAMEL_SEEKABLE_STREAM (source);
-			cache = FALSE;
-		}
-	}
-
-	/* first, work out conversion, if any, required, we dont care about what we dont know about */
-	encoding = header_content_encoding_decode(camel_mime_parser_header(mp, "content-transfer-encoding", NULL));
-	if (encoding) {
-		if (!strcasecmp(encoding, "base64")) {
-			d(printf("Adding base64 decoder ...\n"));
-			fdec = (CamelMimeFilter *)camel_mime_filter_basic_new_type(CAMEL_MIME_FILTER_BASIC_BASE64_DEC);
-			decid = camel_mime_parser_filter_add(mp, fdec);
-		} else if (!strcasecmp(encoding, "quoted-printable")) {
-			d(printf("Adding quoted-printable decoder ...\n"));
-			fdec = (CamelMimeFilter *)camel_mime_filter_basic_new_type(CAMEL_MIME_FILTER_BASIC_QP_DEC);
-			decid = camel_mime_parser_filter_add(mp, fdec);
-		}
-		g_free(encoding);
-	}
-
-	/* if we're doing text, then see if we have to convert it to UTF8 as well */
-	ct = camel_mime_parser_content_type(mp);
-	if (header_content_type_is(ct, "text", "*")) {
-		const char *charset = header_content_type_param(ct, "charset");
-		if (charset!=NULL
-		    && !(strcasecmp(charset, "us-ascii")==0
-			 || strcasecmp(charset, "utf-8")==0)) {
-			d(printf("Adding conversion filter from %s to utf-8\n", charset));
-			fch = (CamelMimeFilter *)camel_mime_filter_charset_new_convert(charset, "utf-8");
-			if (fch) {
-				chrid = camel_mime_parser_filter_add(mp, (CamelMimeFilter *)fch);
-			} else {
-				g_warning("Cannot convert '%s' to 'utf-8', message display may be corrupt", charset);
-			}
-		}
-
-	}
-
-	buffer = g_byte_array_new();
-
-	if (!cache) {
-		start = camel_mime_parser_tell(mp) + seekable_source->bound_start;
-	}
-	while ( camel_mime_parser_step(mp, &buf, &len) != HSCAN_BODY_END ) {
-		if (buffer) {
-			if (buffer->len > 20480 && !cache) {
-				/* is this a 'big' message?  Yes?  We dont want to convert it all then.*/
-				camel_mime_parser_filter_remove(mp, decid);
-				camel_mime_parser_filter_remove(mp, chrid);
-				decid = -1;
-				chrid = -1;
-				g_byte_array_free(buffer, TRUE);
-				buffer = NULL;
-			} else {
-				g_byte_array_append(buffer, buf, len);
-			}
-		}
-	}
-
-	if (buffer) {
-		CamelStream *mem;
-		d(printf("Small message part, kept in memory!\n"));
-		mem = camel_stream_mem_new_with_byte_array(buffer);
-		camel_data_wrapper_construct_from_stream (dw, mem);
-		gtk_object_unref ((GtkObject *)mem);
-	} else {
-		CamelStream *sub;
-		CamelStreamFilter *filter;
-
-		d(printf("Big message part, left on disk ...\n"));
-
-		end = camel_mime_parser_tell(mp) + seekable_source->bound_start;
-		sub = camel_seekable_substream_new_with_seekable_stream_and_bounds (seekable_source, start, end);
-		if (fdec || fch) {
-			filter = camel_stream_filter_new_with_stream(sub);
-			if (fdec) {
-				camel_mime_filter_reset(fdec);
-				camel_stream_filter_add(filter, fdec);
-			}
-			if (fch) {
-				camel_mime_filter_reset(fch);
-				camel_stream_filter_add(filter, fch);
-			}
-			camel_data_wrapper_construct_from_stream (dw, (CamelStream *)filter);
-			gtk_object_unref ((GtkObject *)filter);
-		} else {
-			camel_data_wrapper_construct_from_stream (dw, sub);
-		}
-		gtk_object_unref ((GtkObject *)sub);
-	}
-
-	camel_mime_parser_filter_remove(mp, decid);
-	camel_mime_parser_filter_remove(mp, chrid);
-
-	if (fdec)
-		gtk_object_unref((GtkObject *)fdec);
-	if (fch)
-		gtk_object_unref((GtkObject *)fch);
-	if (source)
-		gtk_object_unref((GtkObject *)source);
-
-}
-
-/* This replaces the data wrapper repository ... and/or could be replaced by it? */
-void
-camel_mime_part_construct_content_from_parser(CamelMimePart *dw, CamelMimeParser *mp)
-{
-	CamelDataWrapper *content = NULL;
-	char *buf;
-	int len;
-
-	switch (camel_mime_parser_state(mp)) {
-	case HSCAN_HEADER:
-		d(printf("Creating body part\n"));
-		content = camel_data_wrapper_new();
-		simple_data_wrapper_construct_from_parser(content, mp);
-		break;
-	case HSCAN_MESSAGE:
-		d(printf("Creating message part\n"));
-		content = (CamelDataWrapper *)camel_mime_message_new();
-		camel_mime_part_construct_from_parser((CamelMimePart *)content, mp);
-		break;
-	case HSCAN_MULTIPART: {
-		CamelDataWrapper *bodypart;
-
-#warning This should use a camel-mime-multipart
-		d(printf("Creating multi-part\n"));
-		content = (CamelDataWrapper *)camel_multipart_new();
-
-		/* FIXME: use the real boundary? */
-		camel_multipart_set_boundary((CamelMultipart *)content, NULL);
-
-		while (camel_mime_parser_step(mp, &buf, &len) != HSCAN_MULTIPART_END) {
-			camel_mime_parser_unstep(mp);
-			bodypart = (CamelDataWrapper *)camel_mime_part_new();
-			camel_mime_part_construct_from_parser((CamelMimePart *)bodypart, mp);
-			camel_multipart_add_part((CamelMultipart *)content, (CamelMimePart *)bodypart);
-			gtk_object_unref ((GtkObject *)bodypart);
-		}
-
-		d(printf("Created multi-part\n"));
-		break; }
-	default:
-		g_warning("Invalid state encountered???: %d", camel_mime_parser_state(mp));
-	}
-	if (content) {
-#warning there just has got to be a better way ... to transfer the mime-type to the datawrapper
-		/* would you believe you have to set this BEFORE you set the content object???  oh my god !!!! */
-		camel_data_wrapper_set_mime_type_field (content, 
-							camel_mime_part_get_content_type ((CamelMimePart *)dw));
-		camel_medium_set_content_object((CamelMedium *)dw, content);
-		gtk_object_unref ((GtkObject *)content);
-	}
-}
-
diff --git a/camel/camel-mime-part-utils.h b/camel/camel-mime-part-utils.h
deleted file mode 100644
index 1e1c3655aa..0000000000
--- a/camel/camel-mime-part-utils.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-mime-part-utils : Utility for mime parsing and so on */
-
-
-/* 
- *
- * Author : 
- *  Bertrand Guiheneuf 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#ifndef CAMEL_MIME_PART_UTILS_H
-#define CAMEL_MIME_PART_UTILS_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include 
-
-void camel_mime_part_construct_content_from_parser(CamelMimePart *, CamelMimeParser *mp);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /*  CAMEL_MIME_PART_UTILS_H  */
-
diff --git a/camel/camel-mime-part.c b/camel/camel-mime-part.c
deleted file mode 100644
index d727c98811..0000000000
--- a/camel/camel-mime-part.c
+++ /dev/null
@@ -1,705 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; fill-column: 160 -*- */
-/* camelMimePart.c : Abstract class for a mime_part */
-
-/* 
- * Authors: Bertrand Guiheneuf 
- *	    Michael Zucchi 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#include 
-#include 
-#include "camel-mime-part.h"
-#include 
-#include "gmime-content-field.h"
-#include "string-utils.h"
-#include "hash-table-utils.h"
-#include "camel-mime-part-utils.h"
-#include 
-#include "camel-mime-parser.h"
-#include "camel-stream-mem.h"
-#include "camel-stream-filter.h"
-#include "camel-mime-filter-basic.h"
-#include "camel-exception.h"
-
-#define d(x)
-
-typedef enum {
-	HEADER_UNKNOWN,
-	HEADER_DESCRIPTION,
-	HEADER_DISPOSITION,
-	HEADER_CONTENT_ID,
-	HEADER_ENCODING,
-	HEADER_CONTENT_MD5,
-	HEADER_CONTENT_LANGUAGES,
-	HEADER_CONTENT_TYPE
-} CamelHeaderType;
-
-
-static GHashTable *header_name_table;
-
-
-static CamelMediumClass *parent_class=NULL;
-
-/* Returns the class for a CamelMimePart */
-#define CMP_CLASS(so) CAMEL_MIME_PART_CLASS (GTK_OBJECT(so)->klass)
-#define CDW_CLASS(so) CAMEL_DATA_WRAPPER_CLASS (GTK_OBJECT(so)->klass)
-#define CMD_CLASS(so) CAMEL_MEDIUM_CLASS (GTK_OBJECT(so)->klass)
-
-/* from GtkObject */
-static void            finalize (GtkObject *object);
-
-/* from CamelDataWrapper */
-static int             write_to_stream                 (CamelDataWrapper *data_wrapper, CamelStream *stream);
-static int	       construct_from_stream	       (CamelDataWrapper *dw, CamelStream *s);
-
-/* from CamelMedia */ 
-static void            add_header                      (CamelMedium *medium, const char *header_name, const void *header_value);
-static void            set_header                      (CamelMedium *medium, const char *header_name, const void *header_value);
-static void            remove_header                   (CamelMedium *medium, const char *header_name);
-static const void     *get_header                      (CamelMedium *medium, const char *header_name);
-
-static void            set_content_object              (CamelMedium *medium, CamelDataWrapper *content);
-
-/* from camel mime parser */
-static int             construct_from_parser           (CamelMimePart *, CamelMimeParser *);
-
-/* forward references */
-static void set_disposition (CamelMimePart *mime_part, const gchar *disposition);
-
-
-/* loads in a hash table the set of header names we */
-/* recognize and associate them with a unique enum  */
-/* identifier (see CamelHeaderType above)           */
-static void
-init_header_name_table()
-{
-	header_name_table = g_hash_table_new (g_strcase_hash, g_strcase_equal);
-	g_hash_table_insert (header_name_table, "Content-Description", (gpointer)HEADER_DESCRIPTION);
-	g_hash_table_insert (header_name_table, "Content-Disposition", (gpointer)HEADER_DISPOSITION);
-	g_hash_table_insert (header_name_table, "Content-id", (gpointer)HEADER_CONTENT_ID);
-	g_hash_table_insert (header_name_table, "Content-Transfer-Encoding", (gpointer)HEADER_ENCODING);
-	g_hash_table_insert (header_name_table, "Content-MD5", (gpointer)HEADER_CONTENT_MD5);
-	g_hash_table_insert (header_name_table, "Content-Type", (gpointer)HEADER_CONTENT_TYPE);
-	
-}
-
-static void
-camel_mime_part_class_init (CamelMimePartClass *camel_mime_part_class)
-{
-	CamelMediumClass *camel_medium_class = CAMEL_MEDIUM_CLASS (camel_mime_part_class);
-	CamelDataWrapperClass *camel_data_wrapper_class = CAMEL_DATA_WRAPPER_CLASS (camel_mime_part_class);
-	GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (camel_data_wrapper_class);
-
-	parent_class = gtk_type_class (camel_medium_get_type ());
-	init_header_name_table();
-
-	camel_mime_part_class->construct_from_parser = construct_from_parser;
-	
-	/* virtual method overload */	
-	camel_medium_class->add_header                = add_header;
-	camel_medium_class->set_header                = set_header;
-	camel_medium_class->get_header                = get_header;
-	camel_medium_class->remove_header             = remove_header;
-	camel_medium_class->set_content_object        = set_content_object;
-
-	camel_data_wrapper_class->write_to_stream     = write_to_stream;
-	camel_data_wrapper_class->construct_from_stream= construct_from_stream;
-
-	gtk_object_class->finalize                    = finalize;
-}
-
-static void
-camel_mime_part_init (gpointer   object,  gpointer   klass)
-{
-	CamelMimePart *camel_mime_part = CAMEL_MIME_PART (object);
-	
-	camel_mime_part->content_type         = gmime_content_field_new ("text", "plain");
-	camel_mime_part->description          = NULL;
-	camel_mime_part->disposition          = NULL;
-	camel_mime_part->content_id           = NULL;
-	camel_mime_part->content_MD5          = NULL;
-	camel_mime_part->content_languages    = NULL;
-	camel_mime_part->encoding             = CAMEL_MIME_PART_ENCODING_DEFAULT;
-
-	camel_mime_part->temp_message_buffer  = NULL;	
-	camel_mime_part->content_input_stream = NULL;
-}
-
-
-
-
-GtkType
-camel_mime_part_get_type (void)
-{
-	static GtkType camel_mime_part_type = 0;
-	
-	if (!camel_mime_part_type)	{
-		GtkTypeInfo camel_mime_part_info =	
-		{
-			"CamelMimePart",
-			sizeof (CamelMimePart),
-			sizeof (CamelMimePartClass),
-			(GtkClassInitFunc) camel_mime_part_class_init,
-			(GtkObjectInitFunc) camel_mime_part_init,
-				/* reserved_1 */ NULL,
-				/* reserved_2 */ NULL,
-			(GtkClassInitFunc) NULL,
-		};
-		
-		camel_mime_part_type = gtk_type_unique (camel_medium_get_type (), &camel_mime_part_info);
-	}
-	
-	return camel_mime_part_type;
-}
-
-
-static void           
-finalize (GtkObject *object)
-{
-	CamelMimePart *mime_part = CAMEL_MIME_PART (object);
-
-	g_free (mime_part->description);
-	g_free (mime_part->content_id);
-	g_free (mime_part->content_MD5);
-	string_list_free (mime_part->content_languages);
-	header_disposition_unref(mime_part->disposition);
-	
-	if (mime_part->content_type) gmime_content_field_unref (mime_part->content_type);
-	if (mime_part->temp_message_buffer) g_byte_array_free (mime_part->temp_message_buffer, TRUE);
-
-	if (mime_part->content_input_stream) gtk_object_unref (GTK_OBJECT (mime_part->content_input_stream));
-
-	header_raw_clear(&mime_part->headers);
-
-	GTK_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-/* **** */
-
-static gboolean
-process_header(CamelMedium *medium, const char *header_name, const char *header_value)
-{
-	CamelMimePart *mime_part = CAMEL_MIME_PART (medium);
-	CamelHeaderType header_type;
-	char *text;
-
-	/* Try to parse the header pair. If it corresponds to something   */
-	/* known, the job is done in the parsing routine. If not,         */
-	/* we simply add the header in a raw fashion                      */
-
-	/* FIXMME: MUST check fields for validity before adding them! */
-
-	header_type = (CamelHeaderType) g_hash_table_lookup (header_name_table, header_name);
-	switch (header_type) {
-	case HEADER_DESCRIPTION: /* raw header->utf8 conversion */
-		text = header_decode_string(header_value);
-		g_free(mime_part->description);
-		mime_part->description = text;
-		break;
-	case HEADER_DISPOSITION:
-		set_disposition (mime_part, header_value);
-		break;
-	case HEADER_CONTENT_ID:
-		text = header_msgid_decode(header_value);
-		g_free(mime_part->content_id);
-		mime_part->content_id = text;
-		break;
-	case HEADER_ENCODING:
-		text = header_token_decode(header_value);
-		mime_part->encoding = camel_mime_part_encoding_from_string (text);
-		g_free(text);
-		break;
-	case HEADER_CONTENT_MD5:
-		g_free(mime_part->content_MD5);
-		mime_part->content_MD5 = g_strdup(header_value);
-		break;
-	case HEADER_CONTENT_TYPE: 
-		gmime_content_field_construct_from_string (mime_part->content_type, header_value);
-		break;
-	default:
-		return FALSE;
-	}
-	return TRUE;
-}
-
-
-static void
-set_header (CamelMedium *medium, const char *header_name, const void *header_value)
-{
-	CamelMimePart *part = (CamelMimePart *)medium;
-
-	process_header(medium, header_name, header_value);
-	header_raw_replace(&part->headers, header_name, header_value, -1);
-}
-
-static void
-add_header (CamelMedium *medium, const char *header_name, const void *header_value)
-{
-	CamelMimePart *part = (CamelMimePart *)medium;
-
-	/* Try to parse the header pair. If it corresponds to something   */
-	/* known, the job is done in the parsing routine. If not,         */
-	/* we simply add the header in a raw fashion                      */
-
-	/* FIXMME: MUST check fields for validity before adding them! */
-
-	/* If it was one of the headers we handled, it must be unique, set it instead of add */
-	if (process_header(medium, header_name, header_value))
-		header_raw_replace(&part->headers, header_name, header_value, -1);
-	else
-		header_raw_append(&part->headers, header_name, header_value, -1);
-}
-
-static void
-remove_header (CamelMedium *medium, const char *header_name)
-{
-	CamelMimePart *part = (CamelMimePart *)medium;
-
-	process_header(medium, header_name, NULL);
-	header_raw_remove(&part->headers, header_name);
-}
-
-static const void *
-get_header (CamelMedium *medium, const char *header_name)
-{
-	CamelMimePart *part = (CamelMimePart *)medium;
-
-	return header_raw_find(&part->headers, header_name, NULL);
-}
-
-
-/* **** Content-Description */
-void
-camel_mime_part_set_description (CamelMimePart *mime_part, const gchar *description)
-{
-	camel_medium_set_header (CAMEL_MEDIUM (mime_part),
-				 "Content-Description", description);
-}
-
-const gchar *
-camel_mime_part_get_description (CamelMimePart *mime_part)
-{
-	return mime_part->description;
-}
-
-/* **** Content-Disposition */
-
-static void
-set_disposition (CamelMimePart *mime_part, const gchar *disposition)
-{
-	header_disposition_unref(mime_part->disposition);
-	if (disposition)
-		mime_part->disposition = header_disposition_decode(disposition);
-	else
-		mime_part->disposition = NULL;
-}
-
-
-void
-camel_mime_part_set_disposition (CamelMimePart *mime_part, const gchar *disposition)
-{
-	char *text;
-
-	/* we poke in a new disposition (so we dont lose 'filename', etc) */
-	if (mime_part->disposition == NULL) {
-		set_disposition(mime_part, disposition);
-	}
-	if (mime_part->disposition != NULL) {
-		g_free(mime_part->disposition->disposition);
-		mime_part->disposition->disposition = g_strdup(disposition);
-	}
-	text = header_disposition_format(mime_part->disposition);
-
-	camel_medium_set_header (CAMEL_MEDIUM (mime_part),
-				 "Content-Description", text);
-
-	g_free(text);
-}
-
-const gchar *
-camel_mime_part_get_disposition (CamelMimePart *mime_part)
-{
-	if (mime_part->disposition)
-		return (mime_part->disposition)->disposition;
-	else
-		return NULL;
-}
-
-
-/* **** Content-Disposition: filename="xxx" */
-
-void
-camel_mime_part_set_filename (CamelMimePart *mime_part, gchar *filename)
-{
-	char *str;
-	if (mime_part->disposition == NULL)
-		mime_part->disposition = header_disposition_decode("attachment");
-
-	header_set_param(&mime_part->disposition->params, "filename", filename);
-	str = header_disposition_format(mime_part->disposition);
-
-	camel_medium_set_header (CAMEL_MEDIUM (mime_part),
-				 "Content-Disposition", str);
-	g_free(str);
-}
-
-const gchar *
-camel_mime_part_get_filename (CamelMimePart *mime_part)
-{
-	if (mime_part->disposition)
-		return header_param(mime_part->disposition->params, "filename");
-	return NULL;
-}
-
-
-/* **** Content-ID: */
-
-void
-camel_mime_part_set_content_id (CamelMimePart *mime_part, const char *contentid)
-{
-	camel_medium_set_header (CAMEL_MEDIUM (mime_part), "Content-ID",
-				 contentid);
-}
-
-const gchar *
-camel_mime_part_get_content_id (CamelMimePart *mime_part)
-{
-	return mime_part->content_id;
-}
-
-/* **** Content-MD5: */
-
-void
-camel_mime_part_set_content_MD5 (CamelMimePart *mime_part, const char *md5)
-{
-	camel_medium_set_header (CAMEL_MEDIUM (mime_part), "Content-MD5", md5);
-}
-
-const gchar *
-camel_mime_part_get_content_MD5 (CamelMimePart *mime_part)
-{
-	return mime_part->content_MD5;
-}
-
-/* **** Content-Transfer-Encoding: */
-
-void
-camel_mime_part_set_encoding (CamelMimePart *mime_part,
-			      CamelMimePartEncodingType encoding)
-{
-	const char *text;
-
-	text = camel_mime_part_encoding_to_string (encoding);
-	camel_medium_set_header (CAMEL_MEDIUM (mime_part),
-				 "Content-Transfer-Encoding", text);
-}
-
-const CamelMimePartEncodingType
-camel_mime_part_get_encoding (CamelMimePart *mime_part)
-{
-	return mime_part->encoding;
-}
-
-/* FIXME: do something with this stuff ... */
-
-void
-camel_mime_part_set_content_languages (CamelMimePart *mime_part, GList *content_languages)
-{
-	if (mime_part->content_languages) string_list_free (mime_part->content_languages);
-	mime_part->content_languages = content_languages;
-
-	/* FIXME: translate to a header and set it */
-}
-
-const GList *
-camel_mime_part_get_content_languages (CamelMimePart *mime_part)
-{
-	return mime_part->content_languages;
-}
-
-
-/* **** */
-
-/* **** Content-Type: */
-
-void 
-camel_mime_part_set_content_type (CamelMimePart *mime_part, gchar *content_type)
-{
-	camel_medium_set_header (CAMEL_MEDIUM (mime_part),
-				 "Content-Type", content_type);
-}
-
-GMimeContentField *
-camel_mime_part_get_content_type (CamelMimePart *mime_part)
-{
-	return mime_part->content_type;
-}
-
-/*********/
-
-
-
-static void
-set_content_object (CamelMedium *medium, CamelDataWrapper *content)
-{
-	CamelMimePart *mime_part = CAMEL_MIME_PART (medium);
-	GMimeContentField *object_content_field;
-
-	parent_class->set_content_object (medium, content);
-
-	object_content_field = camel_data_wrapper_get_mime_type_field (content);
-	if (mime_part->content_type &&
-	    (mime_part->content_type != object_content_field)) {
-		char *txt;
-
-		txt = header_content_type_format(object_content_field?object_content_field->content_type:NULL);
-		camel_medium_set_header (CAMEL_MEDIUM (mime_part),
-					 "Content-Type", txt);
-	}
-}
-
-/**********************************************************************/
-
-static int
-write_to_stream (CamelDataWrapper *data_wrapper, CamelStream *stream)
-{
-	CamelMimePart *mp = CAMEL_MIME_PART (data_wrapper);
-	CamelMedium *medium = CAMEL_MEDIUM (data_wrapper);
-	CamelDataWrapper *content;
-	int total = 0;
-	int count;
-
-	d(printf("mime_part::write_to_stream\n"));
-
-	/* FIXME: something needs to be done about this ... */
-	/* FIXME: need to count these bytes too */
-#warning content-languages should be stored as a header
-
-	if (mp->headers) {
-		struct _header_raw *h = mp->headers;
-		while (h) {
-			count = camel_stream_printf(stream, "%s%s%s\n", h->name, isspace(h->value[0]) ? ":" : ": ", h->value);
-			if (count == -1)
-				return -1;
-			total += count;
-			h = h->next;
-		}
-	}
-
-	count = camel_stream_write (stream, "\n", 1);
-	if (count == -1)
-		return -1;
-	total += count;
-
-	content = camel_medium_get_content_object (medium);
-	if (content) {
-		/* I dont really like this here, but i dont know where else it might go ... */
-#define CAN_THIS_GO_ELSEWHERE
-#ifdef CAN_THIS_GO_ELSEWHERE
-		CamelMimeFilter *filter = NULL;
-		CamelStreamFilter *filter_stream = NULL;
-
-		switch(mp->encoding) {
-		case CAMEL_MIME_PART_ENCODING_BASE64:
-			filter = (CamelMimeFilter *)camel_mime_filter_basic_new_type(CAMEL_MIME_FILTER_BASIC_BASE64_ENC);
-			break;
-		case CAMEL_MIME_PART_ENCODING_QUOTEDPRINTABLE:
-			filter = (CamelMimeFilter *)camel_mime_filter_basic_new_type(CAMEL_MIME_FILTER_BASIC_QP_ENC);
-			break;
-		default:
-			break;
-		}
-		if (filter) {
-			filter_stream = camel_stream_filter_new_with_stream(stream);
-			camel_stream_filter_add(filter_stream, filter);
-			gtk_object_unref((GtkObject *)filter);
-			stream = (CamelStream *)filter_stream;
-		}
-
-#endif
-		count = camel_data_wrapper_write_to_stream (content, stream);
-		if (filter_stream)
-			gtk_object_unref((GtkObject *)filter_stream);
-		if (count == -1)
-			return -1;
-		total += count;
-	} else {
-		g_warning("No content for medium, nothing to write");
-	}
-	return total;
-}
-
-/* mime_part */
-static int
-construct_from_parser(CamelMimePart *dw, CamelMimeParser *mp)
-{
-	struct _header_raw *headers;
-	char *buf;
-	int len;
-
-	d(printf("mime_part::construct_from_parser()\n"));
-
-	switch (camel_mime_parser_step(mp, &buf, &len)) {
-	case HSCAN_HEADER:
-	case HSCAN_MESSAGE:
-	case HSCAN_MULTIPART:
-		/* we have the headers, build them into 'us' */
-		headers = camel_mime_parser_headers_raw(mp);
-		while (headers) {
-			camel_medium_add_header((CamelMedium *)dw, headers->name, headers->value);
-			headers = headers->next;
-		}
-		camel_mime_part_construct_content_from_parser(dw, mp);
-		break;
-	default:
-		g_warning("Invalid state encountered???: %d", camel_mime_parser_state(mp));
-	}
-
-	d(printf("mime_part::construct_from_parser() leaving\n"));
-#warning "Need to work out how to detect a (fatally) bad parse in the parser"
-	return 0;
-}
-
-/**
- * camel_mime_part_construct_from_parser:
- * @mime_part: 
- * @mp: 
- * 
- * 
- * 
- * Return value: 
- **/
-int
-camel_mime_part_construct_from_parser(CamelMimePart *mime_part, CamelMimeParser *mp)
-{
-	return CMP_CLASS (mime_part)->construct_from_parser (mime_part, mp);
-}
-
-static int
-construct_from_stream(CamelDataWrapper *dw, CamelStream *s)
-{
-	CamelMimeParser *mp;
-	int ret;
-
-	d(printf("mime_part::construct_from_stream()\n"));
-
-	mp = camel_mime_parser_new();
-	if (camel_mime_parser_init_with_stream(mp, s) == -1) {
-		g_warning("Cannot create parser for stream");
-		ret = -1;
-	} else {
-		ret = camel_mime_part_construct_from_parser((CamelMimePart *)dw, mp);
-	}
-	gtk_object_unref((GtkObject *)mp);
-	return ret;
-}
-
-
-const gchar *
-camel_mime_part_encoding_to_string (CamelMimePartEncodingType encoding)
-{
-	switch (encoding) {
-	case CAMEL_MIME_PART_ENCODING_DEFAULT:
-	case CAMEL_MIME_PART_ENCODING_7BIT:
-		return "7bit";
-	case CAMEL_MIME_PART_ENCODING_8BIT:
-		return "8bit";
-	case CAMEL_MIME_PART_ENCODING_BASE64:
-		return "base64";
-	case CAMEL_MIME_PART_ENCODING_QUOTEDPRINTABLE:
-		return "quoted-printable";
-	default:
-		break;
-	}
-	return "";
-}
-
-
-
-/* FIXME I am not sure this is the correct way to do this.  */
-CamelMimePartEncodingType
-camel_mime_part_encoding_from_string (const gchar *string)
-{
-	if (string == NULL)
-		return CAMEL_MIME_PART_ENCODING_DEFAULT;
-	else if (strcasecmp (string, "7bit") == 0)
-		return CAMEL_MIME_PART_ENCODING_7BIT;
-	else if (strcasecmp (string, "8bit") == 0)
-		return CAMEL_MIME_PART_ENCODING_8BIT;
-	else if (strcasecmp (string, "base64") == 0)
-		return CAMEL_MIME_PART_ENCODING_BASE64;
-	else if (strcasecmp (string, "quoted-printable") == 0)
-		return CAMEL_MIME_PART_ENCODING_QUOTEDPRINTABLE;
-	else
-		/* FIXME?  Spit a warning?  */
-		return CAMEL_MIME_PART_ENCODING_DEFAULT;
-}
-
-
-/******************************/
-/**  Misc utility functions  **/
-
-/**
- * camel_mime_part_new:
- *
- * Return value: a new CamelMimePart
- **/
-CamelMimePart *
-camel_mime_part_new (void)
-{
-	return (CamelMimePart *)gtk_object_new (CAMEL_MIME_PART_TYPE, NULL);
-}
-
-/**
- * camel_mime_part_set_content:
- * @camel_mime_part: Mime part
- * @data: data to put into the part
- * @length: length of @data
- * @type: Content-Type of the data
- * 
- * Utility function used to set the content of a mime part object to 
- * be the provided data. If @length is 0, this routine can be used as
- * a way to remove old content (in which case @data and @type are
- * ignored and may be %NULL).
- **/
-void 
-camel_mime_part_set_content (CamelMimePart *camel_mime_part,
-			     const char *data, int length,
-			     const char *type) /* why on earth is the type last? */
-{
-	CamelMedium *medium = CAMEL_MEDIUM (camel_mime_part);
-
-	if (length) {
-		CamelDataWrapper *dw;
-		CamelStream *stream;
-
-		dw = camel_data_wrapper_new ();
-		camel_data_wrapper_set_mime_type (dw, type);
-		stream = camel_stream_mem_new_with_buffer (data, length);
-		camel_data_wrapper_construct_from_stream (dw, stream);
-		gtk_object_unref (GTK_OBJECT (stream));
-		camel_medium_set_content_object (medium, dw);
-		gtk_object_unref (GTK_OBJECT (dw));
-	} else {
-		if (medium->content)
-			gtk_object_unref (GTK_OBJECT (medium->content));
-		medium->content = NULL;
-	}
-}
diff --git a/camel/camel-mime-part.h b/camel/camel-mime-part.h
deleted file mode 100644
index 9360a96848..0000000000
--- a/camel/camel-mime-part.h
+++ /dev/null
@@ -1,131 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; fill-column: 160 -*- */
-/* camel-mime-part.h : class for a mime part */
-
-/* 
- *
- * Authors: Bertrand Guiheneuf 
- *	    Michael Zucchi 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef CAMEL_MIME_PART_H
-#define CAMEL_MIME_PART_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include 
-#include 
-#include 
-
-#define CAMEL_MIME_PART_TYPE     (camel_mime_part_get_type ())
-#define CAMEL_MIME_PART(obj)     (GTK_CHECK_CAST((obj), CAMEL_MIME_PART_TYPE, CamelMimePart))
-#define CAMEL_MIME_PART_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_MIME_PART_TYPE, CamelMimePartClass))
-#define CAMEL_IS_MIME_PART(o)    (GTK_CHECK_TYPE((o), CAMEL_MIME_PART_TYPE))
-
-
-enum _CamelMimePartEncodingType {
-        CAMEL_MIME_PART_ENCODING_DEFAULT,
-        CAMEL_MIME_PART_ENCODING_7BIT,
-        CAMEL_MIME_PART_ENCODING_8BIT,
-        CAMEL_MIME_PART_ENCODING_BASE64,
-        CAMEL_MIME_PART_ENCODING_QUOTEDPRINTABLE,
-        CAMEL_MIME_PART_NUM_ENCODINGS
-};
-typedef enum _CamelMimePartEncodingType CamelMimePartEncodingType;
-
-
-/* Do not change these values directly, you would regret it one day */
-struct _CamelMimePart
-{
-	CamelMedium parent_object;
-	
-	/* All fields here are -** PRIVATE **- */ 
-	gchar *description;
-	CamelMimeDisposition *disposition;
-	gchar *content_id;
-	gchar *content_MD5;
-	GList *content_languages;
-	CamelMimePartEncodingType encoding;
-	
-	GByteArray *temp_message_buffer;
-	GMimeContentField *content_type;
-	CamelStream *content_input_stream;
-
-	struct _header_raw *headers; /* mime headers */
-};
-
-typedef struct _CamelMimePartClass {
-	CamelMediumClass parent_class;
-	
-	/* Virtual methods */
-	int (*construct_from_parser) (CamelMimePart *, CamelMimeParser *);
-} CamelMimePartClass;
-
-/* Standard Gtk function */
-GtkType camel_mime_part_get_type (void);
-
-/* public methods */
-CamelMimePart *  camel_mime_part_new                    (void);
-
-void	         camel_mime_part_set_description	(CamelMimePart *mime_part, const gchar *description);
-const     gchar *camel_mime_part_get_description	(CamelMimePart *mime_part);
-
-void	         camel_mime_part_set_disposition	(CamelMimePart *mime_part, const gchar *disposition);
-const     gchar *camel_mime_part_get_disposition	(CamelMimePart *mime_part);
-
-void	         camel_mime_part_set_filename		(CamelMimePart *mime_part, gchar *filename);
-const	  gchar *camel_mime_part_get_filename		(CamelMimePart *mime_part);
-
-void             camel_mime_part_set_content_id		(CamelMimePart *mime_part, const char *contentid);
-const	  gchar *camel_mime_part_get_content_id		(CamelMimePart *mime_part);
-
-void		 camel_mime_part_set_content_MD5	(CamelMimePart *mime_part, const char *);
-const	  gchar *camel_mime_part_get_content_MD5	(CamelMimePart *mime_part);
-
-void	         camel_mime_part_set_encoding		(CamelMimePart *mime_part, CamelMimePartEncodingType type);
-CamelMimePartEncodingType camel_mime_part_get_encoding	(CamelMimePart *mime_part);
-
-void	 	 camel_mime_part_set_content_languages	(CamelMimePart *mime_part, GList *content_languages);
-const	  GList *camel_mime_part_get_content_languages	(CamelMimePart *mime_part);
-
-/* FIXME: what about content-type parameters?   what about major/minor parts? */
-void               camel_mime_part_set_content_type 	(CamelMimePart *mime_part, gchar *content_type);
-GMimeContentField *camel_mime_part_get_content_type	(CamelMimePart *mime_part);
-
-const     gchar *         camel_mime_part_encoding_to_string   (CamelMimePartEncodingType encoding);
-CamelMimePartEncodingType camel_mime_part_encoding_from_string (const gchar *string);
-
-/* construction */
-int		camel_mime_part_construct_from_parser  (CamelMimePart *, CamelMimeParser *);
-
-/* utility functions */
-void      	camel_mime_part_set_content 	       (CamelMimePart *camel_mime_part,
-							const char *content, int length, const char *type);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_MIME_PART_H */
-
diff --git a/camel/camel-mime-utils.c b/camel/camel-mime-utils.c
deleted file mode 100644
index af7e9356e1..0000000000
--- a/camel/camel-mime-utils.c
+++ /dev/null
@@ -1,2371 +0,0 @@
-/*
- *  Copyright (C) 2000 Helix Code Inc.
- *
- *  Authors: Michael Zucchi 
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Library General Public License
- *  as published by the Free Software Foundation; either version 2 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU Library General Public License for more details.
- *
- *  You should have received a copy of the GNU Library General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include 
-
-#include 
-
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include 
-
-#include 
-#include 
-
-#include 
-#include 
-
-#include "camel-mime-utils.h"
-
-#if 0
-int strdup_count = 0;
-int malloc_count = 0;
-int free_count = 0;
-
-#define g_strdup(x) (strdup_count++, g_strdup(x))
-#define g_malloc(x) (malloc_count++, g_malloc(x))
-#define g_free(x) (free_count++, g_free(x))
-#endif
-
-/* for all warnings ... */
-#define w(x) x
-
-#define d(x)
-#define d2(x)
-
-static char *base64_alphabet =
-"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
-
-static unsigned char tohex[16] = {
-	'0', '1', '2', '3', '4', '5', '6', '7',
-	'8', '9', 'A', 'B', 'C', 'D', 'E', 'F'
-};
-
-static unsigned char camel_mime_special_table[256] = {
-	  5,  5,  5,  5,  5,  5,  5,  5,  5,167,  7,  5,  5, 39,  5,  5,
-	  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,
-	178,128,140,128,128,128,128,128,140,140,128,128,140,128,136,132,
-	128,128,128,128,128,128,128,128,128,128,204,140,140,  4,140,132,
-	140,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
-	128,128,128,128,128,128,128,128,128,128,128,172,172,172,128,128,
-	128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
-	128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,  5,
-	  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-	  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-	  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-	  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-	  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-	  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-	  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-	  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-};
-
-static unsigned char camel_mime_base64_rank[256] = {
-	255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-	255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-	255,255,255,255,255,255,255,255,255,255,255, 62,255,255,255, 63,
-	 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,255,255,255,  0,255,255,
-	255,  0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14,
-	 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,255,255,255,255,255,
-	255, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
-	 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,255,255,255,255,255,
-	255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-	255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-	255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-	255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-	255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-	255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-	255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-	255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
-};
-
-/*
-  if any of these change, then the tables above should be regenerated
-  by compiling this with -DBUILD_TABLE, and running.
-
-  gcc -o buildtable `glib-config --cflags --libs` -DBUILD_TABLE camel-mime-utils.c
-  ./buildtable
-
-*/
-enum {
-	IS_CTRL		= 1<<0,
-	IS_LWSP		= 1<<1,
-	IS_TSPECIAL	= 1<<2,
-	IS_SPECIAL	= 1<<3,
-	IS_SPACE	= 1<<4,
-	IS_DSPECIAL	= 1<<5,
-	IS_COLON	= 1<<6,	/* rather wasteful of space ... */
-	IS_QPSAFE	= 1<<7
-};
-
-#define is_ctrl(x) ((camel_mime_special_table[(unsigned char)(x)] & IS_CTRL) != 0)
-#define is_lwsp(x) ((camel_mime_special_table[(unsigned char)(x)] & IS_LWSP) != 0)
-#define is_tspecial(x) ((camel_mime_special_table[(unsigned char)(x)] & IS_TSPECIAL) != 0)
-#define is_type(x, t) ((camel_mime_special_table[(unsigned char)(x)] & (t)) != 0)
-#define is_ttoken(x) ((camel_mime_special_table[(unsigned char)(x)] & (IS_TSPECIAL|IS_LWSP|IS_CTRL)) == 0)
-#define is_atom(x) ((camel_mime_special_table[(unsigned char)(x)] & (IS_SPECIAL|IS_SPACE|IS_CTRL)) == 0)
-#define is_dtext(x) ((camel_mime_special_table[(unsigned char)(x)] & IS_DSPECIAL) == 0)
-#define is_fieldname(x) ((camel_mime_special_table[(unsigned char)(x)] & (IS_CTRL|IS_SPACE|IS_COLON)) == 0)
-#define is_qpsafe(x) ((camel_mime_special_table[(unsigned char)(x)] & IS_QPSAFE) != 0)
-
-/* only needs to be run to rebuild the tables above */
-#ifdef BUILD_TABLE
-
-#define CHARS_LWSP " \t\n\r"
-#define CHARS_TSPECIAL "()<>@,;:\\\"/[]?="
-#define CHARS_SPECIAL "()<>@,;:\\\".[]"
-#define CHARS_CSPECIAL "()\\\r"	/* not in comments */
-#define CHARS_DSPECIAL "[]\\\r \t"	/* not in domains */
-
-static void
-header_init_bits(unsigned char bit, unsigned char bitcopy, int remove, unsigned char *vals, int len)
-{
-	int i;
-
-	if (!remove) {
-		for (i=0;i=33 && i<=60) || (i>=62 && i<=126) || i==32 || i==9) camel_mime_special_table[i] |= IS_QPSAFE;
-}
-
-void
-base64_init(void)
-{
-	int i;
-
-	memset(camel_mime_base64_rank, 0xff, sizeof(camel_mime_base64_rank));
-	for (i=0;i<64;i++) {
-		camel_mime_base64_rank[(unsigned int)base64_alphabet[i]] = i;
-	}
-	camel_mime_base64_rank['='] = 0;
-}
-
-int main(int argc, char **argv)
-{
-	int i;
-	void run_test(void);
-
-	header_decode_init();
-	base64_init();
-
-	printf("static unsigned char camel_mime_special_table[256] = {\n\t");
-	for (i=0;i<256;i++) {
-		printf("%3d,", camel_mime_special_table[i]);
-		if ((i&15) == 15) {
-			printf("\n");
-			if (i!=255) {
-				printf("\t");
-			}
-		}
-	}
-	printf("};\n");
-
-	printf("static unsigned char camel_mime_base64_rank[256] = {\n\t");
-	for (i=0;i<256;i++) {
-		printf("%3d,", camel_mime_base64_rank[i]);
-		if ((i&15) == 15) {
-			printf("\n");
-			if (i!=255) {
-				printf("\t");
-			}
-		}
-	}
-	printf("};\n");
-
-	run_test();
-
-	return 0;
-}
-
-#endif
-
-
-/* call this when finished encoding everything, to
-   flush off the last little bit */
-int
-base64_encode_close(unsigned char *in, int inlen, unsigned char *out, int *state, int *save)
-{
-	int c1, c2;
-	unsigned char *outptr = out;
-
-	if (inlen>0)
-		outptr += base64_encode_step(in, inlen, outptr, state, save);
-
-	c1 = ((char *)save)[1];
-	c2 = ((char *)save)[2];
-
-	switch (((char *)save)[0]) {
-	case 2:
-		outptr[2] = base64_alphabet [ ( (c2 &0x0f) << 2 ) ];
-		goto skip;
-	case 1:
-		outptr[2] = '=';
-	skip:
-		outptr[0] = base64_alphabet [ c1 >> 2 ];
-		outptr[1] = base64_alphabet [ c2 >> 4 | ( (c1&0x3) << 4 )];
-		outptr[3] = '=';
-		outptr += 4;
-		break;
-	}
-	*outptr++ = '\n';
-
-	*save = 0;
-	*state = 0;
-
-	return outptr-out;
-}
-
-/*
-  performs an 'encode step', only encodes blocks of 3 characters to the
-  output at a time, saves left-over state in state and save (initialise to
-  0 on first invocation).
-*/
-int
-base64_encode_step(unsigned char *in, int len, unsigned char *out, int *state, int *save)
-{
-	register unsigned char *inptr, *outptr;
-
-	if (len<=0)
-		return 0;
-
-	inptr = in;
-	outptr = out;
-
-	d(printf("we have %d chars, and %d saved chars\n", len, ((char *)save)[0]));
-
-	if (len + ((char *)save)[0] > 2) {
-		unsigned char *inend = in+len-2;
-		register int c1, c2, c3;
-		register int already;
-
-		already = *state;
-
-		switch (((char *)save)[0]) {
-		case 1:	c1 = ((char *)save)[1];	goto skip1;
-		case 2:	c1 = ((char *)save)[1];
-			c2 = ((char *)save)[2];	goto skip2;
-		}
-		
-		/* yes, we jump into the loop, no i'm not going to change it, its beautiful! */
-		while (inptr < inend) {
-			c1 = *inptr++;
-		skip1:
-			c2 = *inptr++;
-		skip2:
-			c3 = *inptr++;
-			*outptr++ = base64_alphabet [ c1 >> 2 ];
-			*outptr++ = base64_alphabet [ c2 >> 4 | ( (c1&0x3) << 4 ) ];
-			*outptr++ = base64_alphabet [ ( (c2 &0x0f) << 2 ) | (c3 >> 6) ];
-			*outptr++ = base64_alphabet [ c3 & 0x3f ];
-			/* this is a bit ugly ... */
-			if ((++already)>=19) {
-				*outptr++='\n';
-				already = 0;
-			}
-		}
-
-		((char *)save)[0] = 0;
-		len = 2-(inptr-inend);
-		*state = already;
-	}
-
-	d(printf("state = %d, len = %d\n",
-		 (int)((char *)save)[0],
-		 len));
-
-	if (len>0) {
-		register char *saveout;
-
-		/* points to the slot for the next char to save */
-		saveout = & (((char *)save)[1]) + ((char *)save)[0];
-
-		/* len can only be 0 1 or 2 */
-		switch(len) {
-		case 2:	*saveout++ = *inptr++;
-		case 1:	*saveout++ = *inptr++;
-		}
-		((char *)save)[0]+=len;
-	}
-
-	d(printf("mode = %d\nc1 = %c\nc2 = %c\n",
-		 (int)((char *)save)[0],
-		 (int)((char *)save)[1],
-		 (int)((char *)save)[2]));
-
-	return outptr-out;
-}
-
-int
-base64_decode_step(unsigned char *in, int len, unsigned char *out, int *state, unsigned int *save)
-{
-	register unsigned char *inptr, *outptr;
-	unsigned char *inend, c;
-	register unsigned int v;
-	int i;
-
-	inend = in+len;
-	outptr = out;
-
-	/* convert 4 base64 bytes to 3 normal bytes */
-	v=*save;
-	i=*state;
-	inptr = in;
-	while (inptr>16;
-				*outptr++ = v>>8;
-				*outptr++ = v;
-				i=0;
-			}
-		}
-	}
-
-	*save = v;
-	*state = i;
-
-	/* quick scan back for '=' on the end somewhere */
-	/* fortunately we can drop 1 output char for each trailing = (upto 2) */
-	i=2;
-	while (inptr>in && i) {
-		inptr--;
-		if (camel_mime_base64_rank[*inptr] != 0xff) {
-			if (*inptr == '=')
-				outptr--;
-			i--;
-		}
-	}
-
-	/* if i!= 0 then there is a truncation error! */
-	return outptr-out;
-}
-
-int
-quoted_encode_close(unsigned char *in, int len, unsigned char *out, int *state, int *save)
-{
-	register unsigned char *outptr = out;
-
-	if (len>0)
-		outptr += quoted_encode_step(in, len, outptr, state, save);
-
-	/* hmm, not sure if this should really be added here, we dont want
-	   to add it to the content, afterall ...? */
-	*outptr++ = '\n';
-
-	*save = 0;
-	*state = 0;
-
-	return outptr-out;
-}
-
-/*
-  FIXME: does not handle trailing spaces/tabs before end of line
-*/
-int
-quoted_encode_step(unsigned char *in, int len, unsigned char *out, int *state, int *save)
-{
-	register unsigned char *inptr, *outptr, *inend;
-	unsigned char c;
-	register int sofar = *state;
-
-	inptr = in;
-	inend = in+len;
-	outptr = out;
-	while (inptr74) {
-				*outptr++='=';
-				*outptr++='\n';
-				sofar = 1;
-			}
-			*outptr++=c;
-		} else {
-			if ((++sofar)>72) {
-				*outptr++='=';
-				*outptr++='\n';
-				sofar = 3;
-			}
-			*outptr++ = '=';
-			*outptr++ = tohex[(c>>4) & 0xf];
-			*outptr++ = tohex[c & 0xf];
-		}
-	}
-	*state = sofar;
-	return outptr-out;
-}
-
-/*
-  FIXME: this does not strip trailing spaces from lines (as it should, rfc 2045, section 6.7)
-  Should it also canonicalise the end of line to CR LF??
-
-  Note: Trailing rubbish (at the end of input), like = or =x or =\r will be lost.
-*/ 
-
-int
-quoted_decode_step(unsigned char *in, int len, unsigned char *out, int *savestate, int *saveme)
-{
-	register unsigned char *inptr, *outptr;
-	unsigned char *inend, c;
-	int state, save;
-
-	inend = in+len;
-	outptr = out;
-
-	d(printf("quoted-printable, decoding text '%.*s'\n", len, in));
-
-	state = *savestate;
-	save = *saveme;
-	inptr = in;
-	while (inptr='A'?save-'A'+10:save-'0')&0x0f) << 4)
-					| ((c>='A'?c-'A'+10:c-'0')&0x0f);
-			} else if (c=='\n' && save == '\r') {
-				/* soft break ... canonical end of line */
-			} else {
-				/* just output the data */
-				*outptr++ = '=';
-				*outptr++ = save;
-				*outptr++ = c;
-			}
-			state = 0;
-			break;
-#ifdef CANONICALISE_EOL
-		case 3:
-			/* convert \r -> to \r\n, leaves \r\n alone */
-			c = *inptr++;
-			if (c=='\n') {
-				*outptr++ = '\r';
-				*outptr++ = c;
-			} else {
-				*outptr++ = '\r';
-				*outptr++ = '\n';
-				*outptr++ = c;
-			}
-			state = 0;
-			break;
-#endif
-		}
-	}
-
-	*savestate = state;
-	*saveme = save;
-
-	return outptr-out;
-}
-
-/*
-  this is for the "Q" encoding of international words,
-  which is slightly different than plain quoted-printable
-*/
-static int
-quoted_decode(const unsigned char *in, int len, unsigned char *out)
-{
-	register const unsigned char *inptr;
-	register unsigned char *outptr;
-	unsigned const char *inend;
-	unsigned char c, c1;
-	int ret = 0;
-
-	inend = in+len;
-	outptr = out;
-
-	d(printf("decoding text '%.*s'\n", len, in));
-
-	inptr = in;
-	while (inptr=2) {
-				c = toupper(*inptr++);
-				c1 = toupper(*inptr++);
-				*outptr++ = (((c>='A'?c-'A'+10:c-'0')&0x0f) << 4)
-					| ((c1>='A'?c1-'A'+10:c1-'0')&0x0f);
-			} else {
-				ret = -1;
-				break;
-			}
-		} else if (c=='_') {
-			*outptr++ = 0x20;
-		} else if (c==' ' || c==0x09) {
-			/* FIXME: this is an error! ignore for now ... */
-			ret = -1;
-			break;
-		} else {
-			*outptr++ = c;
-		}
-	}
-	if (ret==0) {
-		return outptr-out;
-	}
-	return -1;
-}
-
-/* rfc2047 version of quoted-printable */
-static int
-quoted_encode(const unsigned char *in, int len, unsigned char *out)
-{
-	register const unsigned char *inptr, *inend;
-	unsigned char *outptr;
-	unsigned char c;
-
-	inptr = in;
-	inend = in+len;
-	outptr = out;
-	while (inptr>4) & 0xf];
-			*outptr++ = tohex[c & 0xf];
-		}
-	}
-
-	printf("encoding '%.*s' = '%.*s'\n", len, in, outptr-out, out);
-
-	return outptr-out;
-}
-
-
-static void
-header_decode_lwsp(const char **in)
-{
-	const char *inptr = *in;
-	char c;
-
-	d2(printf("is ws: '%s'\n", *in));
-
-	while (is_lwsp(*inptr) || *inptr =='(') {
-		while (is_lwsp(*inptr)) {
-			d2(printf("(%c)", *inptr));
-			inptr++;
-		}
-		d2(printf("\n"));
-
-		/* check for comments */
-		if (*inptr == '(') {
-			int depth = 1;
-			inptr++;
-			while (depth && (c=*inptr)) {
-				if (c=='\\' && inptr[1]) {
-					inptr++;
-				} else if (c=='(') {
-					depth++;
-				} else if (c==')') {
-					depth--;
-				}
-				inptr++;
-			}
-		}
-	}
-	*in = inptr;
-}
-
-/* decode rfc 2047 encoded string segment */
-static char *
-rfc2047_decode_word(const char *in, int len)
-{
-	const char *inptr = in+2;
-	const char *inend = in+len-2;
-	char *encname;
-	int tmplen;
-	int ret;
-	char *decword = NULL;
-	char *decoded = NULL;
-	char *outbase = NULL;
-	char *inbuf, *outbuf;
-	int inlen, outlen;
-	unicode_iconv_t ic;
-
-	d(printf("decoding '%.*s'\n", len, in));
-
-	/* just make sure we're not passed shit */
-	if (len<7
-	    || !(in[0]=='=' && in[1]=='?' && in[len-1]=='=' && in[len-2]=='?')) {
-		d(printf("invalid\n"));
-		return NULL;
-	}
-
-	inptr = memchr(inptr, '?', inend-inptr);
-	if (inptr!=NULL
-	    && inptr0) {
-			/* yuck, all this snot is to setup iconv! */
-			tmplen = inptr-in-3;
-			encname = alloca(tmplen+1);
-			encname[tmplen]=0;
-			memcpy(encname, in+2, tmplen);
-
-			inbuf = decword;
-
-			outlen = inlen*6;
-			outbase = alloca(outlen);
-			outbuf = outbase;
-
-			/* TODO: Should this cache iconv converters? */
-			ic = unicode_iconv_open("utf-8", encname);
-			if (ic != (unicode_iconv_t)-1) {
-				ret = unicode_iconv(ic, (const char **)&inbuf, &inlen, &outbuf, &outlen);
-				unicode_iconv_close(ic);
-				if (ret>=0) {
-					*outbuf = 0;
-					decoded = g_strdup(outbase);
-				}
-			} else {
-				w(g_warning("Cannot decode charset, header display may be corrupt: %s: %s", encname, strerror(errno)));
-				/* TODO: Should this do this, or just leave the encoded strings? */
-				decword[inlen] = 0;
-				decoded = g_strdup(decword);
-			}
-		}
-	}
-
-	d(printf("decoded '%s'\n", decoded));
-
-	return decoded;
-}
-
-/* grrr, glib should have this ! */
-static GString *
-g_string_append_len(GString *st, const char *s, int l)
-{
-	char *tmp;
-
-	tmp = alloca(l+1);
-	tmp[l]=0;
-	memcpy(tmp, s, l);
-	return g_string_append(st, tmp);
-}
-
-/* decodes a simple text, rfc822 */
-static char *
-header_decode_text(const char *in, int inlen)
-{
-	GString *out;
-	const char *inptr = in;
-	const char *inend = in+inlen;
-	char *encstart, *encend;
-	char *decword;
-
-	out = g_string_new("");
-	while ( (encstart = strstr(inptr, "=?"))
-		&& (encend = strstr(encstart+2, "?=")) ) {
-
-		decword = rfc2047_decode_word(encstart, encend-encstart+2);
-		if (decword) {
-			out = g_string_append_len(out, inptr, encstart-inptr);
-			out = g_string_append_len(out, decword, strlen(decword));
-			free(decword);
-		} else {
-			out = g_string_append_len(out, inptr, encend-inptr+2);
-		}
-		inptr = encend+2;
-	}
-	out = g_string_append_len(out, inptr, inend-inptr);
-
-	encstart = out->str;
-	g_string_free(out, FALSE);
-
-	return encstart;
-}
-
-char *
-header_decode_string(const char *in)
-{
-	if (in == NULL)
-		return NULL;
-	return header_decode_text(in, strlen(in));
-}
-
-static char *encoding_map[] = {
-	"US-ASCII",
-	"ISO-8859-1",
-	"UTF-8"
-};
-
-/* FIXME: needs a way to cache iconv opens for different charsets? */
-static
-char *rfc2047_encode_word(const char *in, int len, char *type)
-{
-	unicode_iconv_t ic;
-	char *buffer, *out, *ascii;
-	size_t inlen, outlen, enclen;
-
-	d(printf("Converting '%.*s' to %s\n", len, in, type));
-
-	/* convert utf8->encoding */
-	outlen = len*6;
-	buffer = alloca(outlen);
-	inlen = len;
-	out = buffer;
-
-	/* if we can't convert from utf-8, just encode as utf-8 */
-	if (!strcasecmp(type, "UTF-8")
-	    || (ic = unicode_iconv_open(type, "UTF-8")) == (unicode_iconv_t)-1) {
-		memcpy(buffer, in, len);
-		out = buffer+len;
-		type = "UTF-8";
-	} else {
-		if (unicode_iconv(ic, &in, &inlen, &out, &outlen) == -1) {
-			w(g_warning("Conversion problem: conversion truncated: %s", strerror(errno)));
-		}
-		unicode_iconv_close(ic);
-	}
-	enclen = out-buffer;
-
-	/* now create qp version */
-	ascii = alloca(enclen*3 + strlen(type) + 8);
-	out = ascii;
-	/* should determine which encoding is smaller, and use that? */
-	out += sprintf(out, "=?%s?Q?", type);
-	out += quoted_encode(buffer, enclen, out);
-	sprintf(out, "?=");
-
-	d(printf("converted = %s\n", ascii));
-	return g_strdup(ascii);
-}
-
-
-/* TODO: Should this worry about quotes?? */
-char *
-header_encode_string(const unsigned char *in)
-{
-	GString *out;
-	const unsigned char *inptr = in, *start;
-	int encoding;
-	char *outstr;
-
-	if (in == NULL)
-		return NULL;
-
-	/* do a quick us-ascii check (the common case?) */
-	while (*inptr) {
-		if (*inptr > 127)
-			break;
-		inptr++;
-	}
-	if (*inptr == 0)
-		return g_strdup(in);
-
-	/* This gets each word out of the input, and checks to see what charset
-	   can be used to encode it. */
-	/* TODO: Work out when to merge subsequent words, or across word-parts */
-	/* FIXME: Make sure a converted word is less than the encoding size */
-	out = g_string_new("");
-	inptr = in;
-	encoding = 0;
-	start = inptr;
-	while (inptr && *inptr) {
-		unicode_char_t c;
-		const char *newinptr;
-		newinptr = unicode_get_utf8(inptr, &c);
-		if (newinptr == NULL) {
-			w(g_warning("Invalid UTF-8 sequence encountered (pos %d, char '%c'): %s", (inptr-in), inptr[0], in));
-			inptr++;
-			continue;
-		}
-		inptr = newinptr;
-		if (unicode_isspace(c)) {
-			if (encoding == 0) {
-				out = g_string_append_len(out, start, inptr-start);
-			} else {
-				char *text = rfc2047_encode_word(start, inptr-start-1, encoding_map[encoding]);
-				out = g_string_append(out, text);
-				out = g_string_append_c(out, c);
-				g_free(text);
-			}
-			start = inptr;
-			encoding = 0;
-		} else if (c>127 && c < 256) {
-			encoding = MAX(encoding, 1);
-		} else if (c >=256) {
-			encoding = MAX(encoding, 2);
-		}
-	}
-	if (inptr-start) {
-		if (encoding == 0) {
-			out = g_string_append_len(out, start, inptr-start);
-		} else {
-			char *text = rfc2047_encode_word(start, inptr-start, encoding_map[encoding]);
-			out = g_string_append(out, text);
-			g_free(text);
-		}
-	}
-	outstr = out->str;
-	g_string_free(out, FALSE);
-	return outstr;
-}
-
-
-/* these are all internal parser functions */
-
-static char *
-decode_token(const char **in)
-{
-	const char *inptr = *in;
-	const char *start;
-
-	header_decode_lwsp(&inptr);
-	start = inptr;
-	while (is_ttoken(*inptr))
-		inptr++;
-	if (inptr>start) {
-		*in = inptr;
-		return g_strndup(start, inptr-start);
-	} else {
-		return NULL;
-	}
-}
-
-char *
-header_token_decode(const char *in)
-{
-	if (in == NULL)
-		return NULL;
-
-	return decode_token(&in);
-}
-
-/*
-   <"> * (  \, cr  /  \  ) <">
-*/
-static char *
-header_decode_quoted_string(const char **in)
-{
-	const char *inptr = *in;
-	char *out = NULL, *outptr;
-	int outlen;
-	int c;
-
-	header_decode_lwsp(&inptr);
-	if (*inptr == '"') {
-		const char *intmp;
-		int skip = 0;
-
-		/* first, calc length */
-		inptr++;
-		intmp = inptr;
-		while ( (c = *intmp++) && c!= '"' ) {
-			if (c=='\\' && *intmp) {
-				intmp++;
-				skip++;
-			}
-		}
-		outlen = intmp-inptr-skip;
-		out = outptr = g_malloc(outlen+1);
-		while ( (c = *inptr++) && c!= '"' ) {
-			if (c=='\\' && *inptr) {
-				c = *inptr++;
-			}
-			*outptr++ = c;
-		}
-		*outptr = 0;
-	}
-	*in = inptr;
-	return out;
-}
-
-static char *
-header_decode_atom(const char **in)
-{
-	const char *inptr = *in, *start;
-
-	header_decode_lwsp(&inptr);
-	start = inptr;
-	while (is_atom(*inptr))
-		inptr++;
-	*in = inptr;
-	if (inptr > start)
-		return g_strndup(start, inptr-start);
-	else
-		return NULL;
-}
-
-static char *
-header_decode_word(const char **in)
-{
-	const char *inptr = *in;
-
-	header_decode_lwsp(&inptr);
-	if (*inptr == '"') {
-		*in = inptr;
-		return header_decode_quoted_string(in);
-	} else {
-		*in = inptr;
-		return header_decode_atom(in);
-	}
-}
-
-static char *
-header_decode_value(const char **in)
-{
-	const char *inptr = *in;
-
-	header_decode_lwsp(&inptr);
-	if (*inptr == '"') {
-		d(printf("decoding quoted string\n"));
-		return header_decode_quoted_string(in);
-	} else if (is_ttoken(*inptr)) {
-		d(printf("decoding token\n"));
-		/* this may not have the right specials for all params? */
-		return decode_token(in);
-	}
-	return NULL;
-}
-
-/* shoudl this return -1 for no int? */
-static int
-header_decode_int(const char **in)
-{
-	const char *inptr = *in;
-	int c, v=0;
-
-	header_decode_lwsp(&inptr);
-	while ( (c=*inptr++ & 0xff)
-		&& isdigit(c) ) {
-		v = v*10+(c-'0');
-	}
-	*in = inptr-1;
-	return v;
-}
-
-static int
-header_decode_param(const char **in, char **paramp, char **valuep)
-{
-	const char *inptr = *in;
-	char *param, *value=NULL;
-
-	param = decode_token(&inptr);
-	header_decode_lwsp(&inptr);
-	if (*inptr == '=') {
-		inptr++;
-		value = header_decode_value(&inptr);
-	}
-
-	if (param && value) {
-		*paramp = param;
-		*valuep = value;
-		*in = inptr;
-		return 0;
-	} else {
-		g_free(param);
-		g_free(value);
-		return 1;
-	}
-}
-
-char *
-header_param(struct _header_param *p, const char *name)
-{
-	while (p && strcasecmp(p->name, name) != 0)
-		p = p->next;
-	if (p)
-		return p->value;
-	return NULL;
-}
-
-struct _header_param *
-header_set_param(struct _header_param **l, const char *name, const char *value)
-{
-	struct _header_param *p = (struct _header_param *)l, *pn;
-
-	while (p->next) {
-		pn = p->next;
-		if (!strcasecmp(pn->name, name)) {
-			g_free(pn->value);
-			if (value) {
-				pn->value = g_strdup(value);
-				return pn;
-			} else {
-				p->next = pn->next;
-				g_free(pn);
-				return NULL;
-			}
-		}
-		p = pn;
-	}
-
-	if (value == NULL)
-		return NULL;
-
-	pn = g_malloc(sizeof(*pn));
-	pn->next = 0;
-	pn->name = g_strdup(name);
-	pn->value = g_strdup(value);
-	p->next = pn;
-
-	return pn;
-}
-
-const char *
-header_content_type_param(struct _header_content_type *t, const char *name)
-{
-	if (t==NULL)
-		return NULL;
-	return header_param(t->params, name);
-}
-
-void header_content_type_set_param(struct _header_content_type *t, const char *name, const char *value)
-{
-	header_set_param(&t->params, name, value);
-}
-
-/**
- * header_content_type_is:
- * @ct: A content type specifier, or #NULL.
- * @type: A type to check against.
- * @subtype: A subtype to check against, or "*" to match any subtype.
- * 
- * Returns #TRUE if the content type @ct is of type @type/@subtype.
- * The subtype of "*" will match any subtype.  If @ct is #NULL, then
- * it will match the type "text/plain".
- * 
- * Return value: #TRUE or #FALSE depending on the matching of the type.
- **/
-int
-header_content_type_is(struct _header_content_type *ct, const char *type, const char *subtype)
-{
-	/* no type == text/plain or text/"*" */
-	if (ct==NULL) {
-		return (!strcasecmp(type, "text")
-			&& (!strcasecmp(subtype, "plain")
-			    || !strcasecmp(subtype, "*")));
-	}
-
-	return (ct->type != NULL
-		&& (!strcasecmp(ct->type, type)
-		    && ((ct->subtype != NULL
-			 && !strcasecmp(ct->subtype, subtype))
-			|| !strcasecmp("*", subtype))));
-}
-
-void
-header_param_list_free(struct _header_param *p)
-{
-	struct _header_param *n;
-
-	while (p) {
-		n = p->next;
-		g_free(p->name);
-		g_free(p->value);
-		g_free(p);
-		p = n;
-	}
-}
-
-struct _header_content_type *
-header_content_type_new(const char *type, const char *subtype)
-{
-	struct _header_content_type *t = g_malloc(sizeof(*t));
-
-	t->type = g_strdup(type);
-	t->subtype = g_strdup(subtype);
-	t->params = NULL;
-	t->refcount = 1;
-	return t;
-}
-
-void
-header_content_type_ref(struct _header_content_type *ct)
-{
-	if (ct)
-		ct->refcount++;
-}
-
-
-void
-header_content_type_unref(struct _header_content_type *ct)
-{
-	if (ct) {
-		if (ct->refcount <= 1) {
-			header_param_list_free(ct->params);
-			g_free(ct->type);
-			g_free(ct->subtype);
-			g_free(ct);
-		} else {
-			ct->refcount--;
-		}
-	}
-}
-
-/* for decoding email addresses, canonically */
-static char *
-header_decode_domain(const char **in)
-{
-	const char *inptr = *in, *start;
-	int go = TRUE;
-	char *ret;
-	GString *domain = g_string_new("");
-
-				/* domain ref | domain literal */
-	header_decode_lwsp(&inptr);
-	while (go) {
-		if (*inptr == '[') { /* domain literal */
-			domain = g_string_append(domain, "[ ");
-			inptr++;
-			header_decode_lwsp(&inptr);
-			start = inptr;
-			while (is_dtext(*inptr)) {
-				domain = g_string_append_c(domain, *inptr);
-				inptr++;
-			}
-			if (*inptr == ']') {
-				domain = g_string_append(domain, " ]");
-				inptr++;
-			} else {
-				w(g_warning("closing ']' not found in domain: %s", *in));
-			}
-		} else {
-			char *a = header_decode_atom(&inptr);
-			if (a) {
-				domain = g_string_append(domain, a);
-				g_free(a);
-			} else {
-				w(g_warning("missing atom from domain-ref"));
-				break;
-			}
-		}
-		header_decode_lwsp(&inptr);
-		if (*inptr == '.') { /* next sub-domain? */
-			domain = g_string_append_c(domain, '.');
-			inptr++;
-			header_decode_lwsp(&inptr);
-		} else
-			go = FALSE;
-	}
-
-	*in = inptr;
-
-	ret = domain->str;
-	g_string_free(domain, FALSE);
-	return ret;
-}
-
-static char *
-header_decode_addrspec(const char **in)
-{
-	const char *inptr = *in;
-	char *word;
-	GString *addr = g_string_new("");
-
-	header_decode_lwsp(&inptr);
-
-	/* addr-spec */
-	word = header_decode_word(&inptr);
-	if (word) {
-		addr = g_string_append(addr, word);
-		header_decode_lwsp(&inptr);
-		g_free(word);
-		while (*inptr == '.' && word) {
-			inptr++;
-			addr = g_string_append_c(addr, '.');
-			word = header_decode_word(&inptr);
-			if (word) {
-				addr = g_string_append(addr, word);
-				header_decode_lwsp(&inptr);
-				g_free(word);
-			} else {
-				w(g_warning("Invalid address spec: %s", *in));
-			}
-		}
-		if (*inptr == '@') {
-			inptr++;
-			addr = g_string_append_c(addr, '@');
-			word = header_decode_domain(&inptr);
-			if (word) {
-				addr = g_string_append(addr, word);
-				g_free(word);
-			} else {
-				w(g_warning("Invalid address, missing domain: %s", *in));
-			}
-		} else {
-			w(g_warning("Invalid addr-spec, missing @: %s", *in));
-		}
-	} else {
-		w(g_warning("invalid addr-spec, no local part"));
-	}
-
-	/* FIXME: return null on error? */
-
-	*in = inptr;
-	word = addr->str;
-	g_string_free(addr, FALSE);
-	return word;
-}
-
-/*
-  address:
-   word *('.' word) @ domain |
-   *(word) '<' [ *('@' domain ) ':' ] word *( '.' word) @ domain |
-
-   1*word ':' [ word ... etc (mailbox, as above) ] ';'
- */
-
-/* mailbox:
-   word *( '.' word ) '@' domain
-   *(word) '<' [ *('@' domain ) ':' ] word *( '.' word) @ domain
-   */
-
-static struct _header_address *
-header_decode_mailbox(const char **in)
-{
-	const char *inptr = *in;
-	char *pre;
-	int closeme = FALSE;
-	GString *addr;
-	GString *name = NULL;
-	struct _header_address *address = NULL;
-
-	addr = g_string_new("");
-
-	/* for each address */
-	pre = header_decode_word(&inptr);
-	header_decode_lwsp(&inptr);
-	if (!(*inptr == '.' || *inptr == '@' || *inptr==',' || *inptr=='\0')) {	/* ',' and '\0' required incase it is a simple address, no @ domain part (buggy writer) */
-		name = g_string_new("");
-		while (pre) {
-			char *text;
-
-			text = header_decode_string(pre);
-			name = g_string_append(name, text);
-			g_free(pre);
-			g_free(text);
-
-			/* rfc_decode(pre) */
-			pre = header_decode_word(&inptr);
-			if (pre)
-				name = g_string_append_c(name, ' ');
-		}
-		header_decode_lwsp(&inptr);
-		if (*inptr == '<') {
-			closeme = TRUE;
-			inptr++;
-			header_decode_lwsp(&inptr);
-			if (*inptr == '@') {
-				while (*inptr == '@') {
-					inptr++;
-					header_decode_domain(&inptr);
-					header_decode_lwsp(&inptr);
-					if (*inptr == ',') {
-						inptr++;
-						header_decode_lwsp(&inptr);
-					}
-				}
-				if (*inptr == ':') {
-					inptr++;
-				} else {
-					w(g_warning("broken route-address, missing ':': %s", *in));
-				}
-			}
-			pre = header_decode_word(&inptr);
-			header_decode_lwsp(&inptr);
-		} else {
-			w(g_warning("broken address? %s", *in));
-		}
-	}
-
-	if (pre) {
-		addr = g_string_append(addr, pre);
-	} else {
-		w(g_warning("No local-part for email address: %s", *in));
-	}
-
-	/* should be at word '.' localpart */
-	while (*inptr == '.' && pre) {
-		inptr++;
-		g_free(pre);
-		pre = header_decode_word(&inptr);
-		if (pre) {
-			addr = g_string_append_c(addr, '.');
-			addr = g_string_append(addr, pre);
-		}
-		header_decode_lwsp(&inptr);
-	}
-	g_free(pre);
-
-	/* now at '@' domain part */
-	if (*inptr == '@') {
-		char *dom;
-
-		inptr++;
-		addr = g_string_append_c(addr, '@');
-		dom = header_decode_domain(&inptr);
-		addr = g_string_append(addr, dom);
-		g_free(dom);
-	} else {
-		w(g_warning("invalid address, no '@' domain part at %c: %s", *inptr, *in));
-	}
-
-	if (closeme) {
-		header_decode_lwsp(&inptr);
-		if (*inptr == '>') {
-			inptr++;
-		} else {
-			w(g_warning("invalid route address, no closing '>': %s", *in));
-		} 
-	} else if (name == NULL) { /* check for comment after address */
-		char *text, *tmp;
-		const char *comment = inptr;
-
-		header_decode_lwsp(&inptr);
-		if (inptr-comment > 3) { /* just guess ... */
-			tmp = g_strndup(comment, inptr-comment);
-			text = header_decode_string(tmp);
-			name = g_string_new(text);
-			g_free(tmp);
-			g_free(text);
-		}
-	}
-
-	*in = inptr;
-
-	if (addr->len > 0) {
-		address = header_address_new_name(name?name->str:"", addr->str);
-	}
-
-	g_string_free(addr, TRUE);
-	if (name)
-		g_string_free(name, TRUE);
-
-	d(printf("got mailbox: %s\n", addr->str));
-	return address;
-}
-
-static struct _header_address *
-header_decode_address(const char **in)
-{
-	const char *inptr = *in;
-	char *pre;
-	GString *group = g_string_new("");
-	struct _header_address *addr = NULL, *member;
-
-	/* pre-scan, trying to work out format, discard results */
-	header_decode_lwsp(&inptr);
-	while ( (pre = header_decode_word(&inptr)) ) {
-		group = g_string_append(group, pre);
-		group = g_string_append(group, " ");
-		g_free(pre);
-	}
-	header_decode_lwsp(&inptr);
-	if (*inptr == ':') {
-		d(printf("group detected: %s\n", group->str));
-		addr = header_address_new_group(group->str);
-		/* that was a group spec, scan mailbox's */
-		inptr++;
-		/* FIXME: check rfc 2047 encodings of words, here or above in the loop */
-		header_decode_lwsp(&inptr);
-		if (*inptr != ';') {
-			int go = TRUE;
-			do {
-				member = header_decode_mailbox(&inptr);
-				if (member)
-					header_address_add_member(addr, member);
-				header_decode_lwsp(&inptr);
-				if (*inptr == ',')
-					inptr++;
-				else
-					go = FALSE;
-			} while (go);
-			if (*inptr == ';') {
-				inptr++;
-			} else {
-				w(g_warning("Invalid group spec, missing closing ';': %s", *in));
-			}
-		} else {
-			inptr++;
-		}
-		*in = inptr;
-	} else {
-		addr = header_decode_mailbox(in);
-	}
-
-	g_string_free(group, TRUE);
-
-	return addr;
-}
-
-char *
-header_msgid_decode(const char *in)
-{
-	const char *inptr = in;
-	char *msgid = NULL;
-
-	d(printf("decoding Message-ID: '%s'\n", in));
-
-	if (in == NULL)
-		return NULL;
-
-	header_decode_lwsp(&inptr);
-	if (*inptr == '<') {
-		inptr++;
-		header_decode_lwsp(&inptr);
-		msgid = header_decode_addrspec(&inptr);
-		if (msgid) {
-			header_decode_lwsp(&inptr);
-			if (*inptr == '>') {
-				inptr++;
-			} else {
-				w(g_warning("Missing closing '>' on message id: %s", in));
-			}
-		} else {
-			w(g_warning("Cannot find message id in: %s", in));
-		}
-	} else {
-		w(g_warning("missing opening '<' on message id: %s", in));
-	}
-
-	return msgid;
-}
-
-struct _header_address *
-header_mailbox_decode(const char *in)
-{
-	if (in == NULL)
-		return NULL;
-
-	return header_decode_mailbox(&in);
-}
-
-struct _header_address *
-header_address_decode(const char *in)
-{
-	const char *inptr = in, *last;
-	struct _header_address *list = NULL, *addr;
-
-	d(printf("decoding To: '%s'\n", in));
-
-#warning header_to_decode needs to return some structure
-
-	if (in == NULL)
-		return NULL;
-
-	do {
-		last = inptr;
-		addr = header_decode_address(&inptr);
-		if (addr)
-			header_address_list_append(&list, addr);
-		header_decode_lwsp(&inptr);
-		if (*inptr == ',')
-			inptr++;
-		else
-			break;
-	} while (inptr != last);
-
-	if (*inptr) {
-		w(g_warning("Invalid input detected at %c (%d): %s\n or at: %s", *inptr, inptr-in, in, inptr));
-	}
-
-	if (inptr == last) {
-		w(g_warning("detected invalid input loop at : %s", last));
-	}
-
-	return list;
-}
-
-void
-header_mime_decode(const char *in, int *maj, int *min)
-{
-	const char *inptr = in;
-	int major=-1, minor=-1;
-
-	d(printf("decoding MIME-Version: '%s'\n", in));
-
-	if (in != NULL) {
-		header_decode_lwsp(&inptr);
-		if (isdigit(*inptr)) {
-			major = header_decode_int(&inptr);
-			header_decode_lwsp(&inptr);
-			if (*inptr == '.') {
-				inptr++;
-				header_decode_lwsp(&inptr);
-				if (isdigit(*inptr))
-					minor = header_decode_int(&inptr);
-			}
-		}
-	}
-
-	if (maj)
-		*maj = major;
-	if (min)
-		*min = minor;
-
-	d(printf("major = %d, minor = %d\n", major, minor));
-}
-
-static struct _header_param *
-header_param_list_decode(const char **in)
-{
-	const char *inptr = *in;
-	struct _header_param *head = NULL, *tail = NULL;
-
-	header_decode_lwsp(&inptr);
-	while (*inptr == ';') {
-		char *param, *value;
-		struct _header_param *p;
-
-		inptr++;
-		/* invalid format? */
-		if (header_decode_param(&inptr, ¶m, &value) != 0)
-			break;
-
-		p = g_malloc(sizeof(*p));
-		p->name = param;
-		p->value = value;
-		p->next = NULL;
-		if (head == NULL)
-			head = p;
-		if (tail)
-			tail->next = p;
-		tail = p;
-		header_decode_lwsp(&inptr);
-	}
-	*in = inptr;
-	return head;
-}
-
-static void
-header_param_list_format_append(GString *out, struct _header_param *p)
-{
-	int len = out->len;
-	while (p) {
-		int here = out->len;
-		if (len+strlen(p->name)+strlen(p->value)>60) {
-			out = g_string_append(out, "\n\t");
-			len = 0;
-		}
-		/* FIXME: format the value properly */
-		g_string_sprintfa(out, " ; %s=\"%s\"", p->name, p->value);
-		len += (out->len - here);
-		p = p->next;
-	}
-}
-
-struct _header_content_type *
-header_content_type_decode(const char *in)
-{
-	const char *inptr = in;
-	char *type, *subtype = NULL;
-	struct _header_content_type *t = NULL;
-
-	if (in==NULL)
-		return NULL;
-
-	type = decode_token(&inptr);
-	header_decode_lwsp(&inptr);
-	if (type) {
-		if  (*inptr == '/') {
-			inptr++;
-			subtype = decode_token(&inptr);
-		}
-		if (subtype == NULL && (!strcasecmp(type, "text"))) {
-			w(g_warning("text type with no subtype, resorting to text/plain: %s", in));
-			subtype = g_strdup("plain");
-		}
-		if (subtype == NULL) {
-			w(g_warning("MIME type with no subtype: %s", in));
-		}
-
-		t = header_content_type_new(type, subtype);
-		t->params = header_param_list_decode(&inptr);
-		g_free(type);
-		g_free(subtype);
-	} else {
-		g_free(type);
-		d(printf("cannot find MIME type in header (2) '%s'", in));
-	}
-	return t;
-}
-
-void
-header_content_type_dump(struct _header_content_type *ct)
-{
-	struct _header_param *p;
-
-	printf("Content-Type: ");
-	if (ct==NULL) {
-		printf("\n");
-		return;
-	}
-	printf("%s / %s", ct->type, ct->subtype);
-	p = ct->params;
-	if (p) {
-		while (p) {
-			printf(";\n\t%s=\"%s\"", p->name, p->value);
-			p = p->next;
-		}
-	}
-	printf("\n");
-}
-
-char *
-header_content_type_format(struct _header_content_type *ct)
-{
-	GString *out;
-	char *ret;
-
-	if (ct==NULL)
-		return NULL;
-
-	out = g_string_new("");
-	if (ct->type == NULL) {
-		g_string_sprintfa(out, "text/plain");
-		w(g_warning("Content-Type with no main type"));
-	} else if (ct->subtype == NULL) {
-		w(g_warning("Content-Type with no sub type: %s", ct->type));
-		if (!strcasecmp(ct->type, "multipart"))
-			g_string_sprintfa(out, "%s/mixed", ct->type);
-		else
-			g_string_sprintfa(out, "%s", ct->type);
-	} else {
-		g_string_sprintfa(out, "%s/%s", ct->type, ct->subtype);
-	}
-	header_param_list_format_append(out, ct->params);
-
-	ret = out->str;
-	g_string_free(out, FALSE);
-	return ret;
-}
-
-char *
-header_content_encoding_decode(const char *in)
-{
-	if (in)
-		return decode_token(&in);
-	return NULL;
-}
-
-CamelMimeDisposition *header_disposition_decode(const char *in)
-{
-	CamelMimeDisposition *d = NULL;
-	const char *inptr = in;
-
-	if (in == NULL)
-		return NULL;
-
-	d = g_malloc(sizeof(*d));
-	d->refcount = 1;
-	d->disposition = decode_token(&inptr);
-	if (d->disposition == NULL)
-		w(g_warning("Empty disposition type"));
-	d->params = header_param_list_decode(&inptr);
-	return d;
-}
-
-void header_disposition_ref(CamelMimeDisposition *d)
-{
-	if (d)
-		d->refcount++;
-}
-void header_disposition_unref(CamelMimeDisposition *d)
-{
-	if (d) {
-		if (d->refcount<=1) {
-			header_param_list_free(d->params);
-			g_free(d->disposition);
-			g_free(d);
-		} else {
-			d->refcount--;
-		}
-	}
-}
-
-char *header_disposition_format(CamelMimeDisposition *d)
-{
-	GString *out;
-	char *ret;
-
-	if (d==NULL)
-		return NULL;
-
-	out = g_string_new("");
-	if (d->disposition)
-		out = g_string_append(out, d->disposition);
-	else
-		out = g_string_append(out, "attachment");
-	header_param_list_format_append(out, d->params);
-
-	ret = out->str;
-	g_string_free(out, FALSE);
-	return ret;
-}
-
-/* hrm, is there a library for this shit? */
-static struct {
-	char *name;
-	int offset;
-} tz_offsets [] = {
-	{ "UT", 0 },
-	{ "GMT", 0 },
-	{ "EST", -500 },	/* these are all US timezones.  bloody yanks */
-	{ "EDT", -400 },
-	{ "CST", -600 },
-	{ "CDT", -500 },
-	{ "MST", -700 },
-	{ "MDT", -600 },
-	{ "PST", -800 },
-	{ "PDT", -700 },
-	{ "Z", 0 },
-	{ "A", -100 },
-	{ "M", -1200 },
-	{ "N", 100 },
-	{ "Y", 1200 },
-};
-
-static char *tz_months [] = {
-	"Jan", "Feb", "Mar", "Apr", "May", "Jun",
-	"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
-};
-
-char *
-header_format_date(time_t time, int offset)
-{
-	struct tm tm;
-
-	d(printf("offset = %d\n", offset));
-
-	d(printf("converting date %s", ctime(&time)));
-
-	time += ((offset / 100) * (60*60)) + (offset % 100)*60;
-
-	d(printf("converting date %s", ctime(&time)));
-
-	memcpy(&tm, gmtime(&time), sizeof(tm));
-
-	return g_strdup_printf("%02d %s %04d %02d:%02d:%02d %+05d",
-			       tm.tm_mday, tz_months[tm.tm_mon],
-			       tm.tm_year + 1900,
-			       tm.tm_hour, tm.tm_min, tm.tm_sec,
-			       offset);
-}
-
-/* convert a date to time_t representation */
-/* this is an awful mess oh well */
-time_t
-header_decode_date(const char *in, int *saveoffset)
-{
-	const char *inptr = in;
-	char *monthname;
-	int year, offset = 0;
-	struct tm tm;
-	int i;
-	time_t t;
-
-	if (in == NULL) {
-		if (saveoffset)
-			*saveoffset = 0;
-		return 0;
-	}
-
-	d(printf("\ndecoding date '%s'\n", inptr));
-
-	memset(&tm, 0, sizeof(tm));
-
-	header_decode_lwsp(&inptr);
-	if (!isdigit(*inptr)) {
-		char *day = decode_token(&inptr);
-		/* we dont really care about the day, its only for display */
-		if (day) {
-			d(printf("got day: %s\n", day));
-			g_free(day);
-			header_decode_lwsp(&inptr);
-			if (*inptr == ',')
-				inptr++;
-			else
-				w(g_warning("day not followed by ','"));
-		}
-	}
-	tm.tm_mday = header_decode_int(&inptr);
-	monthname = decode_token(&inptr);
-	if (monthname) {
-		for (i=0;ivalue;
-	while (p && *p) {
-		if (!isascii(*p)) {
-			w(g_warning("Appending header violates rfc: %s: %s", h->name, h->value));
-			return;
-		}
-		p++;
-	}
-}
-#endif
-
-void
-header_raw_append_parse(struct _header_raw **list, const char *header, int offset)
-{
-	register const char *in;
-	int fieldlen;
-	char *name;
-
-	in = header;
-	while (is_fieldname(*in))
-		in++;
-	fieldlen = in-header;
-	while (is_lwsp(*in))
-		in++;
-	if (fieldlen == 0 || *in != ':') {
-		printf("Invalid header line: '%s'\n", header);
-		return;
-	}
-	in++;
-	name = alloca(fieldlen+1);
-	memcpy(name, header, fieldlen);
-	name[fieldlen] = 0;
-
-	header_raw_append(list, name, in, offset);
-}
-
-void
-header_raw_append(struct _header_raw **list, const char *name, const char *value, int offset)
-{
-	struct _header_raw *l, *n;
-
-	d(printf("Header: %s: %s\n", name, value));
-
-	n = g_malloc(sizeof(*n));
-	n->next = NULL;
-	n->name = g_strdup(name);
-	n->value = g_strdup(value);
-	n->offset = offset;
-#ifdef CHECKS
-	check_header(n);
-#endif
-	l = (struct _header_raw *)list;
-	while (l->next) {
-		l = l->next;
-	}
-	l->next = n;
-
-	/* debug */
-#if 0
-	if (!strcasecmp(name, "To")) {
-		printf("- Decoding To\n");
-		header_to_decode(value);
-	} else if (!strcasecmp(name, "Content-type")) {
-		printf("- Decoding content-type\n");
-		header_content_type_dump(header_content_type_decode(value));		
-	} else if (!strcasecmp(name, "MIME-Version")) {
-		printf("- Decoding mime version\n");
-		header_mime_decode(value);
-	}
-#endif
-}
-
-static struct _header_raw *
-header_raw_find_node(struct _header_raw **list, const char *name)
-{
-	struct _header_raw *l;
-
-	l = *list;
-	while (l) {
-		if (!strcasecmp(l->name, name))
-			break;
-		l = l->next;
-	}
-	return l;
-}
-
-const char *
-header_raw_find(struct _header_raw **list, const char *name, int *offset)
-{
-	struct _header_raw *l;
-
-	l = header_raw_find_node(list, name);
-	if (l) {
-		if (offset)
-			*offset = l->offset;
-		return l->value;
-	} else
-		return NULL;
-}
-
-const char *
-header_raw_find_next(struct _header_raw **list, const char *name, int *offset, const char *last)
-{
-	struct _header_raw *l;
-
-	if (last == NULL || name == NULL)
-		return NULL;
-
-	l = *list;
-	while (l && l->value != last)
-		l = l->next;
-	return header_raw_find(&l, name, offset);
-}
-
-static void
-header_raw_free(struct _header_raw *l)
-{
-	g_free(l->name);
-	g_free(l->value);
-	g_free(l);
-}
-
-void
-header_raw_remove(struct _header_raw **list, const char *name)
-{
-	struct _header_raw *l, *p;
-
-	/* the next pointer is at the head of the structure, so this is safe */
-	p = (struct _header_raw *)list;
-	l = *list;
-	while (l) {
-		if (!strcasecmp(l->name, name)) {
-			p->next = l->next;
-			header_raw_free(l);
-			l = p->next;
-		} else {
-			p = l;
-			l = l->next;
-		}
-	}
-}
-
-void
-header_raw_replace(struct _header_raw **list, const char *name, const char *value, int offset)
-{
-	header_raw_remove(list, name);
-	header_raw_append(list, name, value, offset);
-}
-
-void
-header_raw_clear(struct _header_raw **list)
-{
-	struct _header_raw *l, *n;
-	l = *list;
-	while (l) {
-		n = l->next;
-		header_raw_free(l);
-		l = n;
-	}
-	*list = NULL;
-}
-
-
-/* ok, here's the address stuff, what a mess ... */
-struct _header_address *header_address_new(void)
-{
-	struct _header_address *h;
-	h = g_malloc0(sizeof(*h));
-	h->type = HEADER_ADDRESS_NONE;
-	h->refcount = 1;
-	return h;
-}
-
-struct _header_address *header_address_new_name(const char *name, const char *addr)
-{
-	struct _header_address *h;
-
-	h = header_address_new();
-	h->type = HEADER_ADDRESS_NAME;
-	h->name = g_strdup(name);
-	h->v.addr = g_strdup(addr);
-	return h;
-}
-
-struct _header_address *header_address_new_group(const char *name)
-{
-	struct _header_address *h;
-
-	h = header_address_new();
-	h->type = HEADER_ADDRESS_GROUP;
-	h->name = g_strdup(name);
-	return h;
-}
-
-void header_address_ref(struct _header_address *h)
-{
-	if (h)
-		h->refcount++;
-}
-
-void header_address_unref(struct _header_address *h)
-{
-	if (h) {
-		if (h->refcount <= 1) {
-			if (h->type == HEADER_ADDRESS_GROUP) {
-				header_address_list_clear(&h->v.members);
-			} else if (h->type == HEADER_ADDRESS_NAME) {
-				g_free(h->v.addr);
-			}
-			g_free(h->name);
-			g_free(h);
-		} else {
-			h->refcount--;
-		}
-	}
-}
-
-void header_address_set_name(struct _header_address *h, const char *name)
-{
-	if (h) {
-		g_free(h->name);
-		h->name = g_strdup(name);
-	}
-}
-
-void header_address_set_addr(struct _header_address *h, const char *addr)
-{
-	if (h) {
-		if (h->type == HEADER_ADDRESS_NAME
-		    || h->type == HEADER_ADDRESS_NONE) {
-			h->type = HEADER_ADDRESS_NAME;
-			g_free(h->v.addr);
-			h->v.addr = g_strdup(addr);
-		} else {
-			g_warning("Trying to set the address on a group");
-		}
-	}
-}
-
-void header_address_set_members(struct _header_address *h, struct _header_address *group)
-{
-	if (h) {
-		if (h->type == HEADER_ADDRESS_GROUP
-		    || h->type == HEADER_ADDRESS_NONE) {
-			h->type = HEADER_ADDRESS_GROUP;
-			header_address_list_clear(&h->v.members);
-			/* should this ref them? */
-			h->v.members = group;
-		} else {
-			g_warning("Trying to set the members on a name, not group");
-		}
-	}
-}
-
-void header_address_add_member(struct _header_address *h, struct _header_address *member)
-{
-	if (h) {
-		if (h->type == HEADER_ADDRESS_GROUP
-		    || h->type == HEADER_ADDRESS_NONE) {
-			h->type = HEADER_ADDRESS_GROUP;
-			header_address_list_append(&h->v.members, member);
-		}		    
-	}
-}
-
-void header_address_list_append_list(struct _header_address **l, struct _header_address **h)
-{
-	if (l) {
-		struct _header_address *n = (struct _header_address *)l;
-
-		while (n->next)
-			n = n->next;
-		n->next = *h;
-	}
-}
-
-
-void header_address_list_append(struct _header_address **l, struct _header_address *h)
-{
-	if (h) {
-		header_address_list_append_list(l, &h);
-		h->next = NULL;
-	}
-}
-
-void header_address_list_clear(struct _header_address **l)
-{
-	struct _header_address *a, *n;
-	a = *l;
-	while (a) {
-		n = a->next;
-		header_address_unref(a);
-		a = n;
-	}
-	*l = NULL;
-}
-
-static void
-header_address_list_format_append(GString *out, struct _header_address *a)
-{
-	char *text;
-
-	while (a) {
-		switch (a->type) {
-		case HEADER_ADDRESS_NAME:
-#warning needs to rfc2047 encode address phrase
-			/* FIXME: 2047 encoding?? */
-			if (a->name && *a->name)
-				g_string_sprintfa(out, "\"%s\" <%s>", a->name, a->v.addr);
-			else
-				g_string_append(out, a->v.addr);
-			break;
-		case HEADER_ADDRESS_GROUP:
-			text = header_encode_string(a->name);
-			g_string_sprintfa(out, "%s:\n ", text);
-			header_address_list_format_append(out, a->v.members);
-			g_string_sprintfa(out, ";");
-			break;
-		default:
-			g_warning("Invalid address type");
-			break;
-		}
-		a = a->next;
-	}
-}
-
-/* FIXME: need a 'display friendly' version, as well as a 'rfc friendly' version? */
-char *
-header_address_list_format(struct _header_address *a)
-{
-	GString *out;
-	char *ret;
-
-	if (a == NULL)
-		return NULL;
-
-	out = g_string_new("");
-
-	header_address_list_format_append(out, a);
-	ret = out->str;
-	g_string_free(out, FALSE);
-	return ret;
-}
-
-#ifdef BUILD_TABLE
-
-/* for debugging tests */
-/* should also have some regression tests somewhere */
-
-void run_test(void)
-{
-	char *to = "gnome hacker dudes: license-discuss@opensource.org,
-        \"Richard M. Stallman\" ,
-        Barry Chester ,
-        Michael Zucchi ,
-        Miguel de Icaza ;,
-	zucchi@zedzone.mmc.com.au, \"Foo bar\" ,
-	";
-
-	header_to_decode(to);
-
-	header_mime_decode("1.0");
-	header_mime_decode("1.3 (produced by metasend V1.0)");
-	header_mime_decode("(produced by metasend V1.0) 5.2");
-	header_mime_decode("7(produced by metasend 1.0) . (produced by helix/send/1.0) 9 . 5");
-	header_mime_decode("3.");
-	header_mime_decode(".");
-	header_mime_decode(".5");
-	header_mime_decode("c.d");
-	header_mime_decode("");
-
-	header_msgid_decode(" <\"L3x2i1.0.Nm5.Xd-Wu\"@lists.redhat.com>");
-	header_msgid_decode("<200001180446.PAA02065@beaker.htb.com.au>");
-
-}
-
-#endif /* BUILD_TABLE */
diff --git a/camel/camel-mime-utils.h b/camel/camel-mime-utils.h
deleted file mode 100644
index f95f76363c..0000000000
--- a/camel/camel-mime-utils.h
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- *  Copyright (C) 2000 Helix Code Inc.
- *
- *  Authors: Michael Zucchi 
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Library General Public License
- *  as published by the Free Software Foundation; either version 2 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU Library General Public License for more details.
- *
- *  You should have received a copy of the GNU Library General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef _CAMEL_MIME_UTILS_H
-#define _CAMEL_MIME_UTILS_H
-
-#include 
-
-struct _header_param {
-	struct _header_param *next;
-	char *name;
-	char *value;
-};
-
-/* describes a content-type */
-struct _header_content_type {
-	char *type;
-	char *subtype;
-	struct _header_param *params;
-	unsigned int refcount;
-};
-
-/* a raw rfc822 header */
-/* the value MUST be US-ASCII */
-struct _header_raw {
-	struct _header_raw *next;
-	char *name;
-	char *value;
-	int offset;		/* in file, if known */
-};
-
-typedef struct _CamelMimeDisposition {
-	char *disposition;
-	struct _header_param *params;
-	unsigned int refcount;
-} CamelMimeDisposition;
-
-enum _header_address_type {
-	HEADER_ADDRESS_NONE,	/* uninitialised */
-	HEADER_ADDRESS_NAME,
-	HEADER_ADDRESS_GROUP
-};
-
-struct _header_address {
-	struct _header_address *next;
-	enum _header_address_type type;
-	char *name;
-	union {
-		char *addr;
-		struct _header_address *members;
-	} v;
-	unsigned int refcount;
-};
-
-/* Address lists */
-struct _header_address *header_address_new(void);
-struct _header_address *header_address_new_name(const char *name, const char *addr);
-struct _header_address *header_address_new_group(const char *name);
-void header_address_ref(struct _header_address *);
-void header_address_unref(struct _header_address *);
-void header_address_set_name(struct _header_address *, const char *name);
-void header_address_set_addr(struct _header_address *, const char *addr);
-void header_address_set_members(struct _header_address *, struct _header_address *group);
-void header_address_add_member(struct _header_address *, struct _header_address *member);
-void header_address_list_append_list(struct _header_address **l, struct _header_address **h);
-void header_address_list_append(struct _header_address **, struct _header_address *);
-void header_address_list_clear(struct _header_address **);
-
-struct _header_address *header_address_decode(const char *in);
-struct _header_address *header_mailbox_decode(const char *in);
-char *header_address_list_format(struct _header_address *a);
-
-/* structured header prameters */
-char *header_param(struct _header_param *p, const char *name);
-struct _header_param *header_set_param(struct _header_param **l, const char *name, const char *value);
-void header_param_list_free(struct _header_param *p);
-
-/* Content-Type header */
-struct _header_content_type *header_content_type_new(const char *type, const char *subtype);
-struct _header_content_type *header_content_type_decode(const char *in);
-void header_content_type_unref(struct _header_content_type *ct);
-void header_content_type_ref(struct _header_content_type *ct);
-const char *header_content_type_param(struct _header_content_type *t, const char *name);
-void header_content_type_set_param(struct _header_content_type *t, const char *name, const char *value);
-int header_content_type_is(struct _header_content_type *ct, const char *type, const char *subtype);
-char *header_content_type_format(struct _header_content_type *ct);
-
-/* DEBUGGING function */
-void header_content_type_dump(struct _header_content_type *ct);
-
-/* Content-Disposition header */
-CamelMimeDisposition *header_disposition_decode(const char *in);
-void header_disposition_ref(CamelMimeDisposition *);
-void header_disposition_unref(CamelMimeDisposition *);
-char *header_disposition_format(CamelMimeDisposition *d);
-
-/* decode the contents of a content-encoding header */
-char *header_content_encoding_decode(const char *in);
-
-/* raw headers */
-void header_raw_append(struct _header_raw **list, const char *name, const char *value, int offset);
-void header_raw_append_parse(struct _header_raw **list, const char *header, int offset);
-const char *header_raw_find(struct _header_raw **list, const char *name, int *ofset);
-const char *header_raw_find_next(struct _header_raw **list, const char *name, int *ofset, const char *last);
-void header_raw_replace(struct _header_raw **list, const char *name, const char *value, int offset);
-void header_raw_remove(struct _header_raw **list, const char *name);
-void header_raw_clear(struct _header_raw **list);
-
-/* decode a header which is a simple token */
-char *header_token_decode(const char *in);
-
-/* decode/encode a string type, like a subject line */
-char *header_decode_string(const char *in);
-char *header_encode_string(const unsigned char *in);
-
-/* decode an email date field into a GMT time, + optional offset */
-time_t header_decode_date(const char *in, int *saveoffset);
-char *header_format_date(time_t time, int offset);
-
-/* decode a message id */
-char *header_msgid_decode(const char *in);
-
-/* decode the mime-type header */
-void header_mime_decode(const char *in, int *maj, int *min);
-
-/* do incremental base64/quoted-printable (de/en)coding */
-int base64_decode_step(unsigned char *in, int len, unsigned char *out, int *state, unsigned int *save);
-
-int base64_encode_step(unsigned char *in, int len, unsigned char *out, int *state, int *save);
-int base64_encode_close(unsigned char *in, int inlen, unsigned char *out, int *state, int *save);
-
-int quoted_decode_step(unsigned char *in, int len, unsigned char *out, int *savestate, int *saveme);
-
-int quoted_encode_step(unsigned char *in, int len, unsigned char *out, int *state, int *save);
-int quoted_encode_close(unsigned char *in, int len, unsigned char *out, int *state, int *save);
-
-#endif /* ! _CAMEL_MIME_UTILS_H */
diff --git a/camel/camel-movemail.c b/camel/camel-movemail.c
deleted file mode 100644
index 3ba3ee9efb..0000000000
--- a/camel/camel-movemail.c
+++ /dev/null
@@ -1,500 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-movemail.c: mbox copying function */
-
-/*
- * Author:
- *  Dan Winship 
- *
- * Copyright 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#include 
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include "camel-movemail.h"
-#include "camel-exception.h"
-
-#include "camel-mime-parser.h"
-#include "camel-mime-filter.h"
-#include "camel-mime-filter-from.h"
-
-#define d(x)
-
-/* these could probably be exposed as a utility? (but only mbox needs it) */
-static int camel_movemail_copy_filter(int fromfd, int tofd, off_t start, size_t bytes, CamelMimeFilter *filter);
-static int camel_movemail_copy(int fromfd, int tofd, off_t start, size_t bytes);
-
-/**
- * camel_movemail: Copy an mbox file from a shared spool directory to a
- * new folder in a Camel store
- * @source: source file
- * @dest: destination file
- * @ex: a CamelException
- *
- * This copies an mbox file from a shared directory with multiple
- * readers and writers into a private (presumably Camel-controlled)
- * directory. Dot locking is used on the source file (but not the
- * destination).
- *
- * Return value: 1 if mail was copied, 0 if the source file contained
- * no mail, -1 if an error occurred.
- **/
-int
-camel_movemail (const char *source, const char *dest, CamelException *ex)
-{
-	gboolean locked, error;
-	int sfd, dfd, tmpfd;
-	char *locktmpfile, *lockfile;
-	struct stat st;
-	time_t now, timeout;
-	int nread, nwrote;
-	char buf[BUFSIZ];
-
-	camel_exception_clear (ex);
-
-	/* Stat and then open the spool file. If it doesn't exist or
-	 * is empty, the user has no mail. (There's technically a race
-	 * condition here in that an MDA might have just now locked it
-	 * to deliver a message, but we don't care. In that case,
-	 * assuming it's unlocked is equivalent to pretending we were
-	 * called a fraction earlier.)
-	 */
-	if (stat (source, &st) == -1) {
-		if (errno == ENOENT)
-			return 0;
-
-		camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
-				      "Could not check mail file %s: %s",
-				      source, g_strerror (errno));
-		return -1;
-	}
-	if (st.st_size == 0)
-		return 0;
-
-	sfd = open (source, O_RDWR);
-	if (sfd == -1) {
-		camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
-				      "Could not open mail file %s: %s",
-				      source, g_strerror (errno));
-		return -1;
-	}
-
-	dfd = open (dest, O_WRONLY | O_CREAT | O_APPEND, S_IRUSR | S_IWUSR);
-	if (dfd == -1) {
-		camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
-				      "Could not open temporary mail "
-				      "file %s: %s", dest, g_strerror (errno));
-		close (sfd);
-		return -1;
-	}
-
-	/* Create the unique lock file. */
-	locktmpfile = g_strdup_printf ("%s.lock.XXXXXX", source);
-#ifdef HAVE_MKSTEMP
-	tmpfd = mkstemp (locktmpfile);
-#else
-	if (mktemp (locktmpfile)) {
-		tmpfd = open (locktmpfile, O_RDWR | O_CREAT | O_EXCL,
-			      S_IRUSR | S_IWUSR);
-	} else
-		tmpfd = -1;
-#endif
-	if (tmpfd == -1) {
-		camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
-				      "Could not create lock file "
-				      "for %s: %s", source, g_strerror (errno));
-		close (sfd);
-		close (dfd);
-		unlink (dest);
-		return -1;
-	}
-	close (tmpfd);
-
-	lockfile = g_strdup_printf ("%s.lock", source);
-	locked = FALSE;
-	time (&timeout);
-	timeout += 30;
-
-	/* Loop trying to lock the file for 30 seconds. */
-	while (time (&now) < timeout) {
-		/* Try to make the lock. */
-		if (symlink (locktmpfile, lockfile) == 0) {
-			locked = TRUE;
-			break;
-		}
-
-		/* If we fail for a reason other than that someone
-		 * else has the lock, then abort.
-		 */
-		if (errno != EEXIST) {
-			camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
-					      "Could not create lock "
-					      "file for %s: %s", source,
-					      g_strerror (errno));
-			break;
-		}
-
-		/* Check the modtime on the lock file. */
-		if (stat (lockfile, &st) == -1) {
-			/* If the lockfile disappeared, try again. */
-			if (errno == ENOENT)
-				continue;
-
-			/* Some other error. Abort. */
-			camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
-					      "Could not test lock "
-					      "file for %s: %s", source,
-					      g_strerror (errno));
-			break;
-		}
-
-		/* If the lock file is stale, remove it and try again. */
-		if (st.st_mtime < now - 60) {
-			unlink (lockfile);
-			continue;
-		}
-
-		/* Otherwise, sleep and try again. */
-		sleep (5);
-	}
-
-	if (!locked) {
-		/* Something has gone awry. */
-		if (now >= timeout) {
-			camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
-					      "Timed out trying to get "
-					      "lock file on %s. Try again "
-					      "later.", source);
-		}
-		g_free (lockfile);
-		unlink (locktmpfile);
-		g_free (locktmpfile);
-		close (sfd);
-		close (dfd);
-		unlink (dest);
-		return -1;
-	}
-
-	/* OK. We have the file locked now. */
-
-	/* FIXME: Set a timer to keep the file locked. */
-
-	error = FALSE;
-	while (1) {
-		int written = 0;
-
-		nread = read (sfd, buf, sizeof (buf));
-		if (nread == 0)
-			break;
-		else if (nread == -1) {
-			if (errno == EINTR)
-				continue;
-			camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
-					      "Error reading mail file: %s",
-					      g_strerror (errno));
-			error = TRUE;
-			break;
-		}
-
-		while (nread) {
-			nwrote = write (dfd, buf + written, nread);
-			if (nwrote == -1) {
-				if (errno == EINTR)
-					continue; /* continues inner loop */
-				camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
-						      "Error writing "
-						      "mail temp file: %s",
-						      g_strerror (errno));
-				error = TRUE;
-				break;
-			}
-			written += nwrote;
-			nread -= nwrote;
-		}
-	}
-
-	/* If no errors occurred copying the data, and we successfully
-	 * close the destination file, then truncate the source file.
-	 * If there is some sort of error, delete the destination file.
-	 */
-	if (!error) {
-		if (close (dfd) == 0)
-			ftruncate (sfd, 0);
-		else {
-			camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
-					      "Failed to store mail in "
-					      "temp file %s: %s", dest,
-					      g_strerror (errno));
-			unlink (dest);
-			error = TRUE;
-		}
-	} else {
-		close (dfd);
-		unlink (dest);
-	}
-	close (sfd);
-
-	/* Clean up lock files. */
-	unlink (lockfile);
-	g_free (lockfile);
-	unlink (locktmpfile);
-	g_free (locktmpfile);
-
-	return error ? -1 : 1;
-}
-
-static int
-camel_movemail_copy(int fromfd, int tofd, off_t start, size_t bytes)
-{
-        char buffer[4096];
-        int written = 0;
-
-	d(printf("writing %d bytes ... ", bytes));
-
-	if (lseek(fromfd, start, SEEK_SET) != start)
-		return -1;
-
-        while (bytes>0) {
-                int toread, towrite;
-
-                toread = bytes;
-                if (bytes>4096)
-                        toread = 4096;
-                else
-                        toread = bytes;
-		do {
-			towrite = read(fromfd, buffer, toread);
-		} while (towrite == -1 && errno == EINTR);
-
-		if (towrite == -1)
-			return -1;
-
-                /* check for 'end of file' */
-                if (towrite == 0) {
-			d(printf("end of file?\n"));
-                        break;
-		}
-
-		do {
-			toread = write(tofd, buffer, towrite);
-		} while (toread == -1 && errno == EINTR);
-
-		if (toread == -1)
-			return -1;
-
-                written += toread;
-                bytes -= toread;
-        }
-
-        d(printf("written %d bytes\n", written));
-
-        return written;
-}
-
-#define PRE_SIZE (32)
-
-static int
-camel_movemail_copy_filter(int fromfd, int tofd, off_t start, size_t bytes, CamelMimeFilter *filter)
-{
-        char buffer[4096+PRE_SIZE];
-        int written = 0;
-	char *filterbuffer;
-	int filterlen, filterpre;
-
-	d(printf("writing %d bytes ... ", bytes));
-
-	camel_mime_filter_reset(filter);
-
-	if (lseek(fromfd, start, SEEK_SET) != start)
-		return -1;
-
-        while (bytes>0) {
-                int toread, towrite;
-
-                toread = bytes;
-                if (bytes>4096)
-                        toread = 4096;
-                else
-                        toread = bytes;
-		do {
-			towrite = read(fromfd, buffer+PRE_SIZE, toread);
-		} while (towrite == -1 && errno == EINTR);
-
-		if (towrite == -1)
-			return -1;
-
-                /* check for 'end of file' */
-                if (towrite == 0) {
-			d(printf("end of file?\n"));
-			camel_mime_filter_complete(filter, buffer+PRE_SIZE, towrite, PRE_SIZE,
-						   &filterbuffer, &filterlen, &filterpre);
-			towrite = filterlen;
-			if (towrite == 0)
-				break;
-		} else {
-			camel_mime_filter_filter(filter, buffer+PRE_SIZE, towrite, PRE_SIZE,
-						 &filterbuffer, &filterlen, &filterpre);
-			towrite = filterlen;
-		}
-
-		do {
-			toread = write(tofd, filterbuffer, towrite);
-		} while (toread == -1 && errno == EINTR);
-
-		if (toread == -1)
-			return -1;
-
-                written += toread;
-                bytes -= toread;
-        }
-
-        d(printf("written %d bytes\n", written));
-
-        return written;
-}
-
-/* write the headers back out again, but not he Content-Length header, because we dont
-   want	to maintain it! */
-static int
-solaris_header_write(int fd, struct _header_raw *header)
-{
-        struct iovec iv[4];
-        int outlen = 0, len;
-
-        iv[1].iov_base = ":";
-        iv[1].iov_len = 1;
-        iv[3].iov_base = "\n";
-        iv[3].iov_len = 1;
-
-        while (header) {
-		if (strcasecmp(header->name, "Content-Length")) {
-			iv[0].iov_base = header->name;
-			iv[0].iov_len = strlen(header->name);
-			iv[2].iov_base = header->value;
-			iv[2].iov_len = strlen(header->value);
-		
-			do {
-				len = writev(fd, iv, 4);
-			} while (len == -1 && errno == EINTR);
-			
-			if (len == -1)
-				return -1;
-			outlen += len;
-		}
-                header = header->next;
-        }
-
-	do {
-		len = write(fd, "\n", 1);
-	} while (len == -1 && errno == EINTR);
-
-	if (len == -1)
-		return -1;
-
-	outlen += 1;
-
-	d(printf("Wrote %d bytes of headers\n", outlen));
-
-        return outlen;
-}
-
-/* Well, since Solaris is a tad broken wrt its 'mbox' folder format,
-   we must convert it to a real mbox format.  Thankfully this is
-   mostly pretty easy */
-static int
-camel_movemail_solaris (int sfd, int dfd, CamelException *ex)
-{
-	CamelMimeParser *mp;
-	char *buffer;
-	int len;
-	CamelMimeFilterFrom *ffrom;
-	int ret = 1;
-
-	mp = camel_mime_parser_new();
-	camel_mime_parser_scan_from(mp, TRUE);
-	camel_mime_parser_init_with_fd(mp, sfd);
-
-	ffrom = camel_mime_filter_from_new();
-
-	while (camel_mime_parser_step(mp, &buffer, &len) == HSCAN_FROM) {
-		if (camel_mime_parser_step(mp, &buffer, &len) != HSCAN_FROM_END) {
-			const char *cl;
-			int length;
-			int start, body;
-			off_t newpos;
-
-			ret = 0;
-
-			start = camel_mime_parser_tell_start_from(mp);
-			body = camel_mime_parser_tell(mp);
-
-			/* write out headers, but NOT content-length header */
-			solaris_header_write(dfd, camel_mime_parser_headers_raw(mp));
-
-			cl = camel_mime_parser_header(mp, "content-length", NULL);
-			if (cl == NULL) {
-				g_warning("Required Content-Length header is missing from solaris mail box @ %d", (int)camel_mime_parser_tell(mp));
-				camel_mime_parser_drop_step(mp);
-				camel_mime_parser_drop_step(mp);
-				camel_mime_parser_step(mp, &buffer, &len);
-				camel_mime_parser_unstep(mp);
-				length = camel_mime_parser_tell_start_from(mp) - body;
-				newpos = -1;
-			} else {
-				length = atoi(cl);
-				camel_mime_parser_drop_step(mp);
-				camel_mime_parser_drop_step(mp);
-				newpos = length+body;
-			}
-			/* copy body->length converting From lines */
-			if (camel_movemail_copy_filter(sfd, dfd, body, length, (CamelMimeFilter *)ffrom) == -1)
-				goto fail;
-			if (newpos != -1)
-				camel_mime_parser_seek(mp, newpos, SEEK_SET);
-		} else {
-			g_error("Inalid parser state: %d", camel_mime_parser_state(mp));
-		}
-	}
-
-	gtk_object_unref((GtkObject *)mp);
-	gtk_object_unref((GtkObject *)ffrom);
-
-	return ret;
-
-fail:
-	camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
-			      "Error copying "
-			      "mail temp file: %s",
-			      g_strerror (errno));
-
-
-	gtk_object_unref((GtkObject *)mp);
-	gtk_object_unref((GtkObject *)ffrom);
-
-	return -1;
-}
-
diff --git a/camel/camel-movemail.h b/camel/camel-movemail.h
deleted file mode 100644
index ea75c82603..0000000000
--- a/camel/camel-movemail.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-movemail.h: mbox copy function */
-
-/* 
- * Author: 
- *  Dan Winship 
- *
- * Copyright 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef CAMEL_MOVEMAIL_H
-#define CAMEL_MOVEMAIL_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include 
-
-int camel_movemail (const char *source, const char *dest, CamelException *ex);
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_MOVEMAIL_H */
diff --git a/camel/camel-multipart.c b/camel/camel-multipart.c
deleted file mode 100644
index e28c6542bf..0000000000
--- a/camel/camel-multipart.c
+++ /dev/null
@@ -1,488 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-multipart.c : Abstract class for a multipart */
-
-#warning This should be a mostly abstract class, but it is not!
-
-/*
- *
- * Author :
- *  Bertrand Guiheneuf 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#include 
-#include "gmime-content-field.h"
-#include "camel-stream-mem.h"
-#include "camel-multipart.h"
-#include "camel-mime-part.h"
-#include "camel-exception.h"
-#include "md5-utils.h"
-
-#include  /* for getpid */
-#include    /* for time */
-
-#define d(x)
-
-static void                  add_part          (CamelMultipart *multipart,
-						CamelMimePart *part);
-static void                  add_part_at       (CamelMultipart *multipart,
-						CamelMimePart *part,
-						guint index);
-static void                  remove_part       (CamelMultipart *multipart,
-						CamelMimePart *part);
-static CamelMimePart *       remove_part_at    (CamelMultipart *multipart,
-						guint index);
-static CamelMimePart *       get_part          (CamelMultipart *multipart,
-						guint index);
-static guint                 get_number        (CamelMultipart *multipart);
-static void                  set_boundary      (CamelMultipart *multipart,
-						gchar *boundary);
-static const gchar *         get_boundary      (CamelMultipart *multipart);
-static int                   write_to_stream   (CamelDataWrapper *data_wrapper,
-						CamelStream *stream);
-static void                  finalize          (GtkObject *object);
-
-static CamelDataWrapperClass *parent_class = NULL;
-
-
-
-/* Returns the class for a CamelMultipart */
-#define CMP_CLASS(so) CAMEL_MULTIPART_CLASS (GTK_OBJECT(so)->klass)
-
-/* Returns the class for a CamelDataWrapper */
-#define CDW_CLASS(so) CAMEL_DATA_WRAPPER_CLASS (GTK_OBJECT(so)->klass)
-
-
-static void
-camel_multipart_class_init (CamelMultipartClass *camel_multipart_class)
-{
-	CamelDataWrapperClass *camel_data_wrapper_class =
-		CAMEL_DATA_WRAPPER_CLASS (camel_multipart_class);
-	GtkObjectClass *gtk_object_class =
-		GTK_OBJECT_CLASS (camel_multipart_class);
-
-	parent_class = gtk_type_class (camel_data_wrapper_get_type ());
-
-	/* virtual method definition */
-	camel_multipart_class->add_part = add_part;
-	camel_multipart_class->add_part_at = add_part_at;
-	camel_multipart_class->remove_part = remove_part;
-	camel_multipart_class->remove_part_at = remove_part_at;
-	camel_multipart_class->get_part = get_part;
-	camel_multipart_class->get_number = get_number;
-	camel_multipart_class->set_boundary = set_boundary;
-	camel_multipart_class->get_boundary = get_boundary;
-
-	/* virtual method overload */
-	camel_data_wrapper_class->write_to_stream = write_to_stream;
-
-	gtk_object_class->finalize = finalize;
-}
-
-static void
-camel_multipart_init (gpointer object, gpointer klass)
-{
-	CamelMultipart *multipart = CAMEL_MULTIPART (object);
-
-	camel_data_wrapper_set_mime_type (CAMEL_DATA_WRAPPER (multipart),
-					  "multipart/mixed");
-	multipart->preface = NULL;
-	multipart->postface = NULL;
-}
-
-
-GtkType
-camel_multipart_get_type (void)
-{
-	static GtkType camel_multipart_type = 0;
-
-	if (!camel_multipart_type) {
-		GtkTypeInfo camel_multipart_info =
-		{
-			"CamelMultipart",
-			sizeof (CamelMultipart),
-			sizeof (CamelMultipartClass),
-			(GtkClassInitFunc) camel_multipart_class_init,
-			(GtkObjectInitFunc) camel_multipart_init,
-				/* reserved_1 */ NULL,
-				/* reserved_2 */ NULL,
-			(GtkClassInitFunc) NULL,
-		};
-
-		camel_multipart_type = gtk_type_unique (camel_data_wrapper_get_type (), &camel_multipart_info);
-	}
-
-	return camel_multipart_type;
-}
-
-static void
-unref_part (gpointer data, gpointer user_data)
-{
-	GtkObject *part = GTK_OBJECT (data);
-
-	gtk_object_unref (part);
-}
-
-static void
-finalize (GtkObject *object)
-{
-	CamelMultipart *multipart = CAMEL_MULTIPART (object);
-
-	g_list_foreach (multipart->parts, unref_part, NULL);
-
-	if (multipart->boundary)
-		g_free (multipart->boundary);
-	if (multipart->preface)
-		g_free (multipart->preface);
-	if (multipart->postface)
-		g_free (multipart->postface);
-
-	GTK_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-
-
-/**
- * camel_multipart_new:
- *
- * Create a new CamelMultipart object.
- *
- * Return value: a new CamelMultipart
- **/
-CamelMultipart *
-camel_multipart_new (void)
-{
-	CamelMultipart *multipart;
-
-	multipart = (CamelMultipart *)gtk_type_new (CAMEL_MULTIPART_TYPE);
-	multipart->preface = NULL;
-	multipart->postface = NULL;
-
-	return multipart;
-}
-
-
-static void
-add_part (CamelMultipart *multipart, CamelMimePart *part)
-{
-	multipart->parts = g_list_append (multipart->parts, part);
-	gtk_object_ref (GTK_OBJECT (part));
-}
-
-/**
- * camel_multipart_add_part:
- * @multipart: a CamelMultipart
- * @part: the part to add
- *
- * Appends the part to the multipart object.
- **/
-void
-camel_multipart_add_part (CamelMultipart *multipart, CamelMimePart *part)
-{
-	g_return_if_fail (CAMEL_IS_MULTIPART (multipart));
-	g_return_if_fail (CAMEL_IS_MIME_PART (part));
-
-	CMP_CLASS (multipart)->add_part (multipart, part);
-}
-
-
-static void
-add_part_at (CamelMultipart *multipart, CamelMimePart *part, guint index)
-{
-	multipart->parts = g_list_insert (multipart->parts, part, index);
-	gtk_object_ref (GTK_OBJECT (part));
-}
-
-/**
- * camel_multipart_add_part_at:
- * @multipart: a CamelMultipart
- * @part: the part to add
- * @index: index to add the multipart at
- *
- * Adds the part to the multipart object after the @index'th
- * element. If @index is greater than the number of parts, it is
- * equivalent to camel_multipart_add_part().
- **/
-void
-camel_multipart_add_part_at (CamelMultipart *multipart,
-			     CamelMimePart *part, guint index)
-{
-	g_return_if_fail (CAMEL_IS_MULTIPART (multipart));
-	g_return_if_fail (CAMEL_IS_MIME_PART (part));
-
-	CMP_CLASS (multipart)->add_part_at (multipart, part, index);
-}
-
-
-static void
-remove_part (CamelMultipart *multipart, CamelMimePart *part)
-{
-	if (!multipart->parts)
-		return;
-	multipart->parts = g_list_remove (multipart->parts, part);
-	gtk_object_unref (GTK_OBJECT (part));
-}
-
-/**
- * camel_multipart_remove_part:
- * @multipart: a CamelMultipart
- * @part: the part to remove
- *
- * Removes @part from @multipart.
- **/
-void
-camel_multipart_remove_part (CamelMultipart *multipart,
-			     CamelMimePart *part)
-{
-	g_return_if_fail (CAMEL_IS_MULTIPART (multipart));
-	g_return_if_fail (CAMEL_IS_MIME_PART (part));
-
-	CMP_CLASS (multipart)->remove_part (multipart, part);
-}
-
-
-static CamelMimePart *
-remove_part_at (CamelMultipart *multipart, guint index)
-{
-	GList *parts_list;
-	GList *part_to_remove;
-	CamelMimePart *removed_part;
-
-	if (!(multipart->parts))
-		return NULL;
-
-	parts_list = multipart->parts;
-	part_to_remove = g_list_nth (parts_list, index);
-	if (!part_to_remove) {
-		g_warning ("CamelMultipart::remove_part_at: "
-			   "part to remove is NULL\n");
-		return NULL;
-	}
-	removed_part = CAMEL_MIME_PART (part_to_remove->data);
-
-	multipart->parts = g_list_remove_link (parts_list, part_to_remove);
-	if (part_to_remove->data)
-		gtk_object_unref (GTK_OBJECT (part_to_remove->data));
-	g_list_free_1 (part_to_remove);
-
-	return removed_part;
-}
-
-/**
- * camel_multipart_remove_part_at:
- * @multipart: a CamelMultipart
- * @index: a zero-based index indicating the part to remove
- *
- * Remove the indicated part from the multipart object.
- *
- * Return value: the removed part. Note that it is gtk_object_unref()ed
- * before being returned, which may cause it to be destroyed.
- **/
-CamelMimePart *
-camel_multipart_remove_part_at (CamelMultipart *multipart, guint index)
-{
-	g_return_val_if_fail (CAMEL_IS_MULTIPART (multipart), NULL);
-
-	return CMP_CLASS (multipart)->remove_part_at (multipart, index);
-}
-
-
-static CamelMimePart *
-get_part (CamelMultipart *multipart, guint index)
-{
-	GList *part;
-
-	if (!(multipart->parts))
-		return NULL;
-
-	part = g_list_nth (multipart->parts, index);
-	if (part)
-		return CAMEL_MIME_PART (part->data);
-	else
-		return NULL;
-}
-
-/**
- * camel_multipart_get_part:
- * @multipart: a CamelMultipart
- * @index: a zero-based index indicating the part to get
- *
- * Return value: the indicated subpart, or %NULL
- **/
-CamelMimePart *
-camel_multipart_get_part (CamelMultipart *multipart, guint index)
-{
-	g_return_val_if_fail (CAMEL_IS_MULTIPART (multipart), NULL);
-
-	return CMP_CLASS (multipart)->get_part (multipart, index);
-}
-
-
-static guint
-get_number (CamelMultipart *multipart)
-{
-	return g_list_length (multipart->parts);
-}
-
-/**
- * camel_multipart_get_number:
- * @multipart: a CamelMultipart
- *
- * Return value: the number of subparts in @multipart
- **/
-guint
-camel_multipart_get_number (CamelMultipart *multipart)
-{
-	g_return_val_if_fail (CAMEL_IS_MULTIPART (multipart), 0);
-
-	return CMP_CLASS (multipart)->get_number (multipart);
-}
-
-
-static void
-set_boundary (CamelMultipart *multipart, gchar *boundary)
-{
-	CamelDataWrapper *cdw = CAMEL_DATA_WRAPPER (multipart);
-	char *bgen, digest[16], bbuf[27], *p;
-	int state, save;
-
-	g_return_if_fail (cdw->mime_type != NULL);
-
-	if (!boundary) {
-		/* Generate a fairly random boundary string. */
-		bgen = g_strdup_printf ("%p:%lu:%lu", multipart,
-					(unsigned long) getpid(),
-					(unsigned long) time(0));
-		md5_get_digest (bgen, strlen (bgen), digest);
-		g_free (bgen);
-		strcpy (bbuf, "=-");
-		p = bbuf + 2;
-		state = save = 0;
-		p += base64_encode_step (digest, 16, p, &state, &save);
-		*p = '\0';
-
-		boundary = bbuf;
-	}
-
-	gmime_content_field_set_parameter (cdw->mime_type, "boundary",
-					   boundary);
-}
-
-/**
- * camel_multipart_set_boundary:
- * @multipart: a CamelMultipart
- * @boundary: the message boundary, or %NULL
- *
- * Sets the message boundary for @multipart to @boundary. This should
- * be a string which does not occur anywhere in any of @multipart's
- * subparts. If @boundary is %NULL, a randomly-generated boundary will
- * be used.
- **/
-void
-camel_multipart_set_boundary (CamelMultipart *multipart, gchar *boundary)
-{
-	g_return_if_fail (CAMEL_IS_MULTIPART (multipart));
-
-	CMP_CLASS (multipart)->set_boundary (multipart, boundary);
-}
-
-
-static const gchar *
-get_boundary (CamelMultipart *multipart)
-{
-	CamelDataWrapper *cdw = CAMEL_DATA_WRAPPER (multipart);
-
-	g_return_val_if_fail (cdw->mime_type != NULL, NULL);
-	return gmime_content_field_get_parameter (cdw->mime_type, "boundary");
-}
-
-/**
- * camel_multipart_get_boundary:
- * @multipart: a CamelMultipart
- *
- * Return value: @multipart's message boundary
- **/
-const gchar *
-camel_multipart_get_boundary (CamelMultipart *multipart)
-{
-	return CMP_CLASS (multipart)->get_boundary (multipart);
-}
-
-/* this is MIME specific, doesn't belong here really */
-static int
-write_to_stream (CamelDataWrapper *data_wrapper, CamelStream *stream)
-{
-	CamelMultipart *multipart = CAMEL_MULTIPART (data_wrapper);
-	const gchar *boundary;
-	int total = 0;
-	int count;
-	GList *node;
-
-	/* get the bundary text */
-	boundary = camel_multipart_get_boundary (multipart);
-
-	/* we cannot write a multipart without a boundary string */
-	g_return_val_if_fail (boundary && *boundary, -1);
-
-	/*
-	 * write the preface text (usually something like
-	 *   "This is a mime message, if you see this, then
-	 *    your mail client probably doesn't support ...."
-	 */
-	if (multipart->preface) {
-		count = camel_stream_write_string (stream, multipart->preface);
-		if (count == -1)
-			return -1;
-		total += count;
-	}
-
-	/*
-	 * Now, write all the parts, separated by the boundary
-	 * delimiter
-	 */
-	node = multipart->parts;
-	while (node) {
-		count = camel_stream_printf (stream, "\n--%s\n", boundary);
-		if (count == -1)
-			return -1;
-		total += count;
-
-		count = camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (node->data), stream);
-		if (count == -1)
-			return -1;
-		total += count;
-		node = node->next;
-	}
-
-	/* write the terminating boudary delimiter */
-	count = camel_stream_printf (stream, "\n--%s--\n", boundary);
-	if (count == -1)
-		return -1;
-	total += count;
-
-	/* and finally the postface */
-	if (multipart->postface) {
-		count = camel_stream_write_string (stream, multipart->postface);
-		if (count == -1)
-			return -1;
-		total += count;
-	}
-
-	return total;
-}
diff --git a/camel/camel-multipart.h b/camel/camel-multipart.h
deleted file mode 100644
index 709e73e51d..0000000000
--- a/camel/camel-multipart.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-multipart.h : class for a multipart */
-
-/*
- *
- * Author :
- *  Bertrand Guiheneuf 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef CAMEL_MULTIPART_H
-#define CAMEL_MULTIPART_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include 
-
-#define CAMEL_MULTIPART_TYPE     (camel_multipart_get_type ())
-#define CAMEL_MULTIPART(obj)     (GTK_CHECK_CAST((obj), CAMEL_MULTIPART_TYPE, CamelMultipart))
-#define CAMEL_MULTIPART_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_MULTIPART_TYPE, CamelMultipartClass))
-#define CAMEL_IS_MULTIPART(o)    (GTK_CHECK_TYPE((o), CAMEL_MULTIPART_TYPE))
-
-
-struct _CamelMultipart
-{
-	CamelDataWrapper parent_object;
-
-	CamelMimePart *parent;
-	GList *parts;
-	gchar *boundary;
-	gchar *preface;
-	gchar *postface;
-
-};
-
-
-
-typedef struct {
-	CamelDataWrapperClass parent_class;
-
-	/* Virtual methods */
-	void (*add_part) (CamelMultipart *multipart, CamelMimePart *part);
-	void (*add_part_at) (CamelMultipart *multipart, CamelMimePart *part, guint index);
-	void (*remove_part) (CamelMultipart *multipart, CamelMimePart *part);
-	CamelMimePart * (*remove_part_at) (CamelMultipart *multipart, guint index);
-	CamelMimePart * (*get_part) (CamelMultipart *multipart, guint index);
-	guint (*get_number) (CamelMultipart *multipart);
-	void (*set_boundary) (CamelMultipart *multipart, gchar *boundary);
-	const gchar * (*get_boundary) (CamelMultipart *multipart);
-
-} CamelMultipartClass;
-
-
-/* Standard Gtk function */
-GtkType camel_multipart_get_type (void);
-
-
-/* public methods */
-CamelMultipart *    camel_multipart_new            (void);
-void                camel_multipart_add_part       (CamelMultipart *multipart,
-						    CamelMimePart *part);
-void                camel_multipart_add_part_at    (CamelMultipart *multipart,
-						    CamelMimePart *part,
-						    guint index);
-void                camel_multipart_remove_part    (CamelMultipart *multipart,
-						    CamelMimePart *part);
-CamelMimePart *     camel_multipart_remove_part_at (CamelMultipart *multipart,
-						    guint index);
-CamelMimePart *     camel_multipart_get_part       (CamelMultipart *multipart,
-						    guint index);
-guint               camel_multipart_get_number     (CamelMultipart *multipart);
-void                camel_multipart_set_boundary   (CamelMultipart *multipart,
-						    gchar *boundary);
-const gchar *       camel_multipart_get_boundary   (CamelMultipart *multipart);
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_MULTIPART_H */
-
diff --git a/camel/camel-news-address.c b/camel/camel-news-address.c
deleted file mode 100644
index 671f0a5559..0000000000
--- a/camel/camel-news-address.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- *  Copyright (C) 2000 Helix Code Inc.
- *
- *  Authors:
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Library General Public License
- *  as published by the Free Software Foundation; either version 2 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU Library General Public License for more details.
- *
- *  You should have received a copy of the GNU Library General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include "camel-news-address.h"
-
-
-static void camel_news_address_class_init (CamelNewsAddressClass *klass);
-static void camel_news_address_init       (CamelNewsAddress *obj);
-
-static CamelAddressClass *camel_news_address_parent;
-
-enum SIGNALS {
-	LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-guint
-camel_news_address_get_type (void)
-{
-	static guint type = 0;
-	
-	if (!type) {
-		GtkTypeInfo type_info = {
-			"CamelNewsAddress",
-			sizeof (CamelNewsAddress),
-			sizeof (CamelNewsAddressClass),
-			(GtkClassInitFunc) camel_news_address_class_init,
-			(GtkObjectInitFunc) camel_news_address_init,
-			(GtkArgSetFunc) NULL,
-			(GtkArgGetFunc) NULL
-		};
-		
-		type = gtk_type_unique (camel_address_get_type (), &type_info);
-	}
-	
-	return type;
-}
-
-static void
-camel_news_address_class_init (CamelNewsAddressClass *klass)
-{
-	GtkObjectClass *object_class = (GtkObjectClass *) klass;
-	
-	camel_news_address_parent = gtk_type_class (camel_address_get_type ());
-
-	gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
-}
-
-static void
-camel_news_address_init (CamelNewsAddress *obj)
-{
-}
-
-/**
- * camel_news_address_new:
- *
- * Create a new CamelNewsAddress object.
- * 
- * Return value: A new CamelNewsAddress widget.
- **/
-CamelNewsAddress *
-camel_news_address_new (void)
-{
-	CamelNewsAddress *new = CAMEL_NEWS_ADDRESS ( gtk_type_new (camel_news_address_get_type ()));
-	return new;
-}
diff --git a/camel/camel-news-address.h b/camel/camel-news-address.h
deleted file mode 100644
index e25f907351..0000000000
--- a/camel/camel-news-address.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- *  Copyright (C) 2000 Helix Code Inc.
- *
- *  Authors: 
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Library General Public License
- *  as published by the Free Software Foundation; either version 2 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU Library General Public License for more details.
- *
- *  You should have received a copy of the GNU Library General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef _CAMEL_NEWS_ADDRESS_H
-#define _CAMEL_NEWS_ADDRESS_H
-
-#include 
-
-#define CAMEL_NEWS_ADDRESS(obj)         GTK_CHECK_CAST (obj, camel_news_address_get_type (), CamelNewsAddress)
-#define CAMEL_NEWS_ADDRESS_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, camel_news_address_get_type (), CamelNewsAddressClass)
-#define IS_CAMEL_NEWS_ADDRESS(obj)      GTK_CHECK_TYPE (obj, camel_news_address_get_type ())
-
-typedef struct _CamelNewsAddressClass CamelNewsAddressClass;
-
-struct _CamelNewsAddress {
-	CamelAddress parent;
-
-	struct _CamelNewsAddressPrivate *priv;
-};
-
-struct _CamelNewsAddressClass {
-	CamelAddressClass parent_class;
-};
-
-guint		camel_news_address_get_type	(void);
-CamelNewsAddress      *camel_news_address_new	(void);
-
-#endif /* ! _CAMEL_NEWS_ADDRESS_H */
diff --git a/camel/camel-object.c b/camel/camel-object.c
deleted file mode 100644
index 3edce10d8a..0000000000
--- a/camel/camel-object.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-object.c: Base class for Camel */
-
-/*
- * Author:
- *  Dan Winship 
- *
- * Copyright 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#include 
-#include "camel-object.h"
-
-static void
-camel_object_init (gpointer object, gpointer klass)
-{
-	GTK_OBJECT_UNSET_FLAGS (object, GTK_FLOATING);
-}
-
-GtkType
-camel_object_get_type (void)
-{
-	static GtkType camel_object_type = 0;
-
-	if (!camel_object_type) {
-		GtkTypeInfo camel_object_info =
-		{
-			"CamelObject",
-			sizeof (CamelObject),
-			sizeof (CamelObjectClass),
-			(GtkClassInitFunc) NULL,
-			(GtkObjectInitFunc) camel_object_init,
-				/* reserved_1 */ NULL,
-				/* reserved_2 */ NULL,
-			(GtkClassInitFunc) NULL,
-		};
-
-		camel_object_type = gtk_type_unique (gtk_object_get_type (), &camel_object_info);
-	}
-
-	return camel_object_type;
-}
diff --git a/camel/camel-object.h b/camel/camel-object.h
deleted file mode 100644
index 2c6b4d0d5c..0000000000
--- a/camel/camel-object.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-object.h: Base class for Camel */
-
-/*
- * Author:
- *  Dan Winship 
- *
- * Copyright 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#ifndef CAMEL_OBJECT_H
-#define CAMEL_OBJECT_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include 
-#include 
-
-#define CAMEL_OBJECT_TYPE     (camel_object_get_type ())
-#define CAMEL_OBJECT(obj)     (GTK_CHECK_CAST((obj), CAMEL_OBJECT_TYPE, CamelObject))
-#define CAMEL_OBJECT_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_OBJECT_TYPE, CamelObjectClass))
-#define CAMEL_IS_OBJECT(o)    (GTK_CHECK_TYPE((o), CAMEL_OBJECT_TYPE))
-
-
-struct _CamelObject
-{
-	GtkObject parent_object;
-
-};
-
-
-typedef struct {
-	GtkObjectClass parent_class;
-
-} CamelObjectClass;
-
-
-/* Standard Gtk function */
-GtkType camel_object_get_type (void);
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_OBJECT_H */
diff --git a/camel/camel-op-queue.c b/camel/camel-op-queue.c
deleted file mode 100644
index 3e17222f0a..0000000000
--- a/camel/camel-op-queue.c
+++ /dev/null
@@ -1,166 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/* 
- * Author : 
- *  Bertrand Guiheneuf 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-/* MT safe */
-
- 
-#include 
-#include "camel-op-queue.h"
-
-static GStaticMutex op_queue_mutex = G_STATIC_MUTEX_INIT;
-
-
-
-/**
- * camel_op_queue_new: create a new operation queue
- * 
- * Create a new operation queue. 
- *
- * Return value: the newly allcated object
- **/
-CamelOpQueue *
-camel_op_queue_new ()
-{
-	CamelOpQueue *op_queue;
-
-	op_queue = g_new (CamelOpQueue, 1);
-	op_queue->ops_tail = NULL;
-	op_queue->ops_head = NULL;
-	op_queue->service_available = TRUE;
-
-	return op_queue;
-}
-
-
-void 
-camel_op_queue_free (CamelOpQueue *op_queue)
-{
-	g_list_free (op_queue->ops_head);	
-	g_free (op_queue);
-}
-
-/**
- * camel_op_queue_push_op: Add an operation to the queue
- * @queue: queue object
- * @op: operation to add
- * 
- * Add an operation to an operation queue. 
- * The queue is a FIFO queue. 
- **/
-void
-camel_op_queue_push_op (CamelOpQueue *queue, CamelOp *op)
-{
-	g_assert (queue);
-	g_static_mutex_lock (&op_queue_mutex);
-	if (!queue->ops_tail) {
-		queue->ops_head = g_list_prepend (NULL, op);
-		queue->ops_tail = queue->ops_head;
-	} else 
-		queue->ops_head = g_list_prepend (queue->ops_head, op);	
-	g_static_mutex_unlock (&op_queue_mutex);
-}
-
-
-/**
- * camel_op_queue_pop_op: Pop the next operation pending in the queue
- * @queue: queue object
- * 
- * Pop the next operation pending in the queue.
- * 
- * Return value: 
- **/
-CamelOp *
-camel_op_queue_pop_op (CamelOpQueue *queue)
-{
-	GList *op_list;
-	CamelOp *op;
-
-	g_assert (queue);
-
-	g_static_mutex_lock (&op_queue_mutex);
-	op_list = queue->ops_tail;
-	if (!op_list) return NULL;
-
-	queue->ops_tail = queue->ops_tail->prev;
-	op = (CamelOp *)op_list->data;
-	g_static_mutex_unlock (&op_queue_mutex);
-
-	return op;
-}
-
-
-/**
- * camel_op_queue_run_next_op: run the next pending operation
- * @queue: queue object
- * 
- * Run the next pending operation in the queue.
- * 
- * Return value: TRUE if an operation was launched FALSE if there was no operation pending in the queue.
- **/
-gboolean
-camel_op_queue_run_next_op (CamelOpQueue *queue)
-{
-	CamelOp *op;
-
-	op = camel_op_queue_pop_op (queue);
-	if (!op) return FALSE;
-	
-	return FALSE;
-}
-
-/**
- * camel_op_queue_set_service_availability: set the service availability for an operation queue
- * @queue: queue object
- * @available: availability flag
- * 
- * set the service availability
- **/
-void
-camel_op_queue_set_service_availability (CamelOpQueue *queue, gboolean available)
-{
-	g_static_mutex_lock (&op_queue_mutex);
-	queue->service_available = available;
-	g_static_mutex_unlock (&op_queue_mutex);
-}
-
-/**
- * camel_op_queue_get_service_availability: determine if an operation queue service is available 
- * @queue: queue object
- * 
- * Determine if the service associated to an operation queue is available.
- * 
- * Return value: service availability.
- **/
-gboolean
-camel_op_queue_get_service_availability (CamelOpQueue *queue)
-{
-	gboolean available;
-
-	g_static_mutex_lock (&op_queue_mutex);
-	available = queue->service_available;
-	g_static_mutex_unlock (&op_queue_mutex);
-	return available;
-}
-
diff --git a/camel/camel-op-queue.h b/camel/camel-op-queue.h
deleted file mode 100644
index 49fdc152d3..0000000000
--- a/camel/camel-op-queue.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/* 
- * Author : 
- *  Bertrand Guiheneuf 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef CAMEL_OP_QUEUE_H
-#define CAMEL_OP_QUEUE_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include 
-#include 
-
-
-
-typedef struct 
-{
-	GList *ops_head;
-	GList *ops_tail;
-	gboolean service_available;
-
-} CamelOpQueue;
-
-
-/* public methods */
-CamelOpQueue *camel_op_queue_new ();
-void camel_op_queue_free (CamelOpQueue *op_queue);
-void camel_op_queue_push_op (CamelOpQueue *queue, CamelOp *op);
-CamelOp *camel_op_queue_pop_op (CamelOpQueue *queue);
-gboolean camel_op_queue_run_next_op (CamelOpQueue *queue);
-gboolean camel_op_queue_get_service_availability (CamelOpQueue *queue);
-void camel_op_queue_set_service_availability (CamelOpQueue *queue, gboolean available);
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_OP_QUEUE_H */
-
diff --git a/camel/camel-provider.c b/camel/camel-provider.c
deleted file mode 100644
index 83a51c3579..0000000000
--- a/camel/camel-provider.c
+++ /dev/null
@@ -1,153 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-provider.c: provider framework */
-
-/*
- *
- * Authors:
- *  Bertrand Guiheneuf 
- *  Dan Winship 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-/* FIXME: Shouldn't we add a version number to providers ? */
-
-#include "config.h"
-#include "camel-provider.h"
-#include "camel-exception.h"
-#include "hash-table-utils.h"
-
-#include 
-#include 
-#include 
-#include 
-
-#include 
-
-char *camel_provider_type_name[CAMEL_NUM_PROVIDER_TYPES] = {
-	"store",
-	"transport"
-};
-
-/**
- * camel_provider_init:
- *
- * Initialize the Camel provider system by reading in the .urls
- * files in the provider directory and creating a hash table mapping
- * URLs to module names.
- *
- * A .urls file has the same initial prefix as the shared library it
- * correspond to, and consists of a series of lines containing the URL
- * protocols that that library handles.
- *
- * Return value: a hash table mapping URLs to module names
- **/
-GHashTable *
-camel_provider_init (void)
-{
-	GHashTable *providers;
-	DIR *dir;
-	struct dirent *d;
-	char *p, *name, buf[80];
-	FILE *f;
-
-	providers = g_hash_table_new (g_strcase_hash, g_strcase_equal);
-
-	dir = opendir (CAMEL_PROVIDERDIR);
-	if (!dir) {
-		g_error ("Could not open camel provider directory: %s",
-			 g_strerror (errno));
-		return NULL;
-	}
-
-	while ((d = readdir (dir))) {
-		p = strchr (d->d_name, '.');
-		if (!p || strcmp (p, ".urls") != 0)
-			continue;
-
-		name = g_strdup_printf ("%s/%s", CAMEL_PROVIDERDIR, d->d_name);
-		f = fopen (name, "r");
-		if (!f) {
-			g_warning ("Could not read provider info file %s: %s",
-				   name, g_strerror (errno));
-			g_free (name);
-			continue;
-		}
-
-		p = strrchr (name, '.');
-		strcpy (p, ".so");
-		while ((fgets (buf, sizeof (buf), f))) {
-			buf[sizeof (buf) - 1] = '\0';
-			p = strchr (buf, '\n');
-			if (p)
-				*p = '\0';
-
-			g_hash_table_insert (providers, g_strdup (buf), name);
-		}
-		fclose (f);
-	}
-
-	closedir (dir);
-	return providers;
-}
-
-/**
- * camel_provider_load:
- * @session: the current session
- * @path: the path to a shared library
- * @ex: a CamelException
- *
- * Loads the provider at @path, and calls its initialization function,
- * passing @session as an argument. The provider should then register
- * itself with @session.
- **/ 
-void
-camel_provider_load (CamelSession *session, const char *path,
-		     CamelException *ex)
-{
-	GModule *module;
-	CamelProvider *(*camel_provider_module_init) ();
-
-	if (!g_module_supported ()) {
-		camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
-				      "Could not load %s: Module loading "
-				      "not supported on this system.",
-				      path);
-		return;
-	}
-
-	module = g_module_open (path, 0);
-	if (!module) {
-		camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
-				      "Could not load %s: %s",
-				      path, g_module_error ());
-		return;
-	}
-
-	if (!g_module_symbol (module, "camel_provider_module_init",
-			      (gpointer *)&camel_provider_module_init)) {
-		camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
-				      "Could not load %s: No initialization "
-				      "routine in module.", path);
-		g_module_close (module);
-		return;
-	}
-
-	camel_provider_module_init (session);
-}
diff --git a/camel/camel-provider.h b/camel/camel-provider.h
deleted file mode 100644
index 5f3c3d7c26..0000000000
--- a/camel/camel-provider.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-provider.h :  provider definition  */
-
-/*
- *
- * Author :
- *  Bertrand Guiheneuf 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef CAMEL_PROVIDER_H
-#define CAMEL_PROVIDER_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include 
-#include 
-
-#define CAMEL_PROVIDER(obj) ((CamelProvider *)(obj))
-
-typedef enum {
-	CAMEL_PROVIDER_STORE,
-	CAMEL_PROVIDER_TRANSPORT,
-	CAMEL_NUM_PROVIDER_TYPES
-} CamelProviderType;
-
-extern char *camel_provider_type_name[CAMEL_NUM_PROVIDER_TYPES];
-
-#define CAMEL_PROVIDER_IS_REMOTE	(1 << 0)
-
-typedef struct {
-	/* Provider name used in CamelURLs. */
-	char *protocol;
-
-	/* Provider name as used by people. (May be the same as protocol) */
-	char *name;
-
-	/* Description of the provider. A novice user should be able
-	 * to read this description, and the information provided by
-	 * an ISP, IS department, etc, and determine whether or not
-	 * this provider is relevant to him, and if so, which
-	 * information goes with it.
-	 */
-	char *description;
-
-	/* The category of message that this provider works with.
-	 * (evolution-mail will only list a provider in the store/transport
-	 * config dialogs if its domain is "mail".)
-	 */
-	char *domain;
-
-	int flags;
-
-	GtkType object_types [CAMEL_NUM_PROVIDER_TYPES];
-} CamelProvider;
-
-GHashTable *camel_provider_init (void);
-void camel_provider_load (CamelSession *session, const char *path,
-			  CamelException *ex);
-
-/* This is defined by each module, not by camel-provider.c. */
-void camel_provider_module_init (CamelSession *session);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_PROVIDER_H */
diff --git a/camel/camel-seekable-stream.c b/camel/camel-seekable-stream.c
deleted file mode 100644
index 507c69dd48..0000000000
--- a/camel/camel-seekable-stream.c
+++ /dev/null
@@ -1,206 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author:
- *  Bertrand Guiheneuf 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#include 
-#include "camel-seekable-stream.h"
-
-static CamelStreamClass *parent_class = NULL;
-
-/* Returns the class for a CamelSeekableStream */
-#define CSS_CLASS(so) CAMEL_SEEKABLE_STREAM_CLASS (GTK_OBJECT(so)->klass)
-
-static off_t seek        (CamelSeekableStream *stream, off_t offset,
-			  CamelStreamSeekPolicy policy);
-static off_t stream_tell (CamelSeekableStream *stream);
-static int   reset       (CamelStream *stream);
-static int   set_bounds  (CamelSeekableStream *stream, off_t start, off_t end);
-
-static void
-camel_seekable_stream_class_init (CamelSeekableStreamClass *camel_seekable_stream_class)
-{
-	CamelStreamClass *camel_stream_class =
-		CAMEL_STREAM_CLASS (camel_seekable_stream_class);
-
-	parent_class = gtk_type_class (camel_stream_get_type ());
-
-	/* seekable stream methods */
-	camel_seekable_stream_class->seek = seek;
-	camel_seekable_stream_class->tell = stream_tell;
-	camel_seekable_stream_class->set_bounds = set_bounds;
-
-	/* camel stream methods overload */
-	camel_stream_class->reset = reset;
-}
-
-static void
-camel_seekable_stream_init (void *o)
-{
-	CamelSeekableStream *stream = (CamelSeekableStream *)o;
-
-	stream->bound_start = 0;
-	stream->bound_end = CAMEL_STREAM_UNBOUND;
-}
-
-GtkType
-camel_seekable_stream_get_type (void)
-{
-	static GtkType camel_seekable_stream_type = 0;
-
-	if (!camel_seekable_stream_type) {
-		GtkTypeInfo camel_seekable_stream_info =
-		{
-			"CamelSeekableStream",
-			sizeof (CamelSeekableStream),
-			sizeof (CamelSeekableStreamClass),
-			(GtkClassInitFunc) camel_seekable_stream_class_init,
-			(GtkObjectInitFunc) camel_seekable_stream_init,
-				/* reserved_1 */ NULL,
-				/* reserved_2 */ NULL,
-			(GtkClassInitFunc) NULL,
-		};
-
-		camel_seekable_stream_type = gtk_type_unique (camel_stream_get_type (), &camel_seekable_stream_info);
-	}
-
-	return camel_seekable_stream_type;
-}
-
-
-static off_t
-seek (CamelSeekableStream *stream, off_t offset,
-      CamelStreamSeekPolicy policy)
-{
-	g_warning ("CamelSeekableStream::seek called on default "
-		   "implementation\n");
-	return -1;
-}
-
-/**
- * camel_stream_seek:
- * @stream: a CamelStream object.
- * @offset: offset value
- * @policy: what to do with the offset
- *
- * Seek to the specified position in @stream.
- *
- * If @policy is CAMEL_STREAM_SET, seeks to @offset.
- *
- * If @policy is CAMEL_STREAM_CUR, seeks to the current position plus
- * @offset.
- *
- * If @policy is CAMEL_STREAM_END, seeks to the end of the stream plus
- * @offset.
- *
- * Regardless of @policy, the stream's final position will be clamped
- * to the range specified by its lower and upper bounds, and the
- * stream's eos state will be updated.
- *
- * Return value: new position, -1 if operation failed.
- **/
-off_t
-camel_seekable_stream_seek (CamelSeekableStream *stream, off_t offset,
-			    CamelStreamSeekPolicy policy)
-{
-	g_return_val_if_fail (CAMEL_IS_SEEKABLE_STREAM (stream), -1);
-
-	return CSS_CLASS (stream)->seek (stream, offset, policy);
-}
-
-
-static off_t
-stream_tell (CamelSeekableStream *stream)
-{
-	return stream->position;
-}
-
-/**
- * camel_seekable_stream_tell:
- * @stream: seekable stream object
- *
- * Get the current position of a seekable stream.
- *
- * Return value: the position.
- **/
-off_t
-camel_seekable_stream_tell (CamelSeekableStream *stream)
-{
-	g_return_val_if_fail (CAMEL_IS_SEEKABLE_STREAM (stream), -1);
-
-	return CSS_CLASS (stream)->tell (stream);
-}
-
-static int
-set_bounds (CamelSeekableStream *stream, off_t start, off_t end)
-{
-	/* store the bounds */
-	stream->bound_start = start;
-	stream->bound_end = end;
-
-	if (start > stream->position)
-		return camel_seekable_stream_seek (stream, start, CAMEL_STREAM_SET);
-
-	return 0;
-}
-
-/**
- * camel_seekable_stream_set_bounds:
- * @stream: a seekable stream
- * @start: the first valid position
- * @end: the first invalid position, or CAMEL_STREAM_UNBOUND
- *
- * Set the range of valid data this stream is allowed to cover.  If
- * there is to be no @end value, then @end should be set to
- * #CAMEL_STREAM_UNBOUND.
- *
- * Return value: -1 on error.
- **/
-int
-camel_seekable_stream_set_bounds (CamelSeekableStream *stream,
-				  off_t start, off_t end)
-{
-	g_return_val_if_fail (CAMEL_IS_SEEKABLE_STREAM (stream), -1);
-	g_return_val_if_fail (end == CAMEL_STREAM_UNBOUND || end >= start, -1);
-
-	return CSS_CLASS (stream)->set_bounds (stream, start, end);
-}
-
-/* a default implementation of reset for seekable streams */
-static int
-reset (CamelStream *stream)
-{
-	CamelSeekableStream *seekable_stream;
-
-	seekable_stream = CAMEL_SEEKABLE_STREAM (stream);
-
-	return camel_seekable_stream_seek (seekable_stream,
-					   seekable_stream->bound_start,
-					   CAMEL_STREAM_SET);
-}
-
-
-
-
-
-
diff --git a/camel/camel-seekable-stream.h b/camel/camel-seekable-stream.h
deleted file mode 100644
index f1cd5cdbca..0000000000
--- a/camel/camel-seekable-stream.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-stream-fs.h :stream based on unix filesystem */
-
-/*
- * Author:
- *  Bertrand Guiheneuf 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef CAMEL_SEEKABLE_STREAM_H
-#define CAMEL_SEEKABLE_STREAM_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include 
-#include 
-#include 
-
-#define CAMEL_SEEKABLE_STREAM_TYPE     (camel_seekable_stream_get_type ())
-#define CAMEL_SEEKABLE_STREAM(obj)     (GTK_CHECK_CAST((obj), CAMEL_SEEKABLE_STREAM_TYPE, CamelSeekableStream))
-#define CAMEL_SEEKABLE_STREAM_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_SEEKABLE_STREAM_TYPE, CamelSeekableStreamClass))
-#define CAMEL_IS_SEEKABLE_STREAM(o)    (GTK_CHECK_TYPE((o), CAMEL_SEEKABLE_STREAM_TYPE))
-
-
-typedef enum
-{
-	CAMEL_STREAM_SET = SEEK_SET,
-	CAMEL_STREAM_CUR = SEEK_CUR,
-	CAMEL_STREAM_END = SEEK_END
-} CamelStreamSeekPolicy;
-
-#define CAMEL_STREAM_UNBOUND (~0)
-
-struct _CamelSeekableStream
-{
-	CamelStream parent_object;
-
-	off_t position;		/* current postion in the stream */
-	off_t bound_start;	/* first valid position */
-	off_t bound_end;	/* first invalid position */
-};
-
-typedef struct {
-	CamelStreamClass parent_class;
-
-	/* Virtual methods */
-	off_t (*seek)       (CamelSeekableStream *stream, off_t offset,
-			     CamelStreamSeekPolicy policy);
-	off_t (*tell)	    (CamelSeekableStream *stream);
-	int  (*set_bounds)  (CamelSeekableStream *stream,
-			     off_t start, off_t end);
-} CamelSeekableStreamClass;
-
-/* Standard Gtk function */
-GtkType camel_seekable_stream_get_type (void);
-
-/* public methods */
-off_t    camel_seekable_stream_seek            (CamelSeekableStream *stream, off_t offset,
-						CamelStreamSeekPolicy policy);
-off_t	 camel_seekable_stream_tell    	       (CamelSeekableStream *stream);
-int	 camel_seekable_stream_set_bounds      (CamelSeekableStream *, off_t start, off_t end);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_SEEKABLE_STREAM_H */
diff --git a/camel/camel-seekable-substream.c b/camel/camel-seekable-substream.c
deleted file mode 100644
index 4fc5b5d853..0000000000
--- a/camel/camel-seekable-substream.c
+++ /dev/null
@@ -1,284 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-stream-fs.c : file system based stream
- *
- * Authors: Bertrand Guiheneuf 
- *	    Michael Zucchi 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-#include 
-#include "camel-seekable-substream.h"
-
-static CamelSeekableStreamClass *parent_class = NULL;
-
-/* Returns the class for a CamelSeekableSubStream */
-#define CSS_CLASS(so) CAMEL_SEEKABLE_SUBSTREAM_CLASS (GTK_OBJECT(so)->klass)
-
-static	int	 stream_read  (CamelStream *stream, char *buffer, unsigned int n);
-static	int	 stream_write (CamelStream *stream, const char *buffer, unsigned int n);
-static	int	 stream_flush (CamelStream *stream);
-static	int	 stream_close (CamelStream *stream);
-static	gboolean eos	      (CamelStream *stream);
-static	off_t	 stream_seek  (CamelSeekableStream *stream, off_t offset,
-			       CamelStreamSeekPolicy policy);
-static	void	 finalize     (GtkObject *object);
-
-
-static void
-camel_seekable_substream_class_init (CamelSeekableSubstreamClass *camel_seekable_substream_class)
-{
-	CamelSeekableStreamClass *camel_seekable_stream_class =
-		CAMEL_SEEKABLE_STREAM_CLASS (camel_seekable_substream_class);
-	CamelStreamClass *camel_stream_class =
-		CAMEL_STREAM_CLASS (camel_seekable_substream_class);
-	GtkObjectClass *gtk_object_class =
-		GTK_OBJECT_CLASS (camel_seekable_substream_class);
-
-	parent_class = gtk_type_class (camel_seekable_stream_get_type ());
-
-	/* virtual method definition */
-
-	/* virtual method overload */
-	camel_stream_class->read = stream_read;
-	camel_stream_class->write = stream_write;
-	camel_stream_class->flush = stream_flush;
-	camel_stream_class->close = stream_close;
-	camel_stream_class->eos = eos;
-
-	camel_seekable_stream_class->seek = stream_seek;
-
-	gtk_object_class->finalize = finalize;
-}
-
-
-GtkType
-camel_seekable_substream_get_type (void)
-{
-	static GtkType camel_seekable_substream_type = 0;
-
-	if (!camel_seekable_substream_type) {
-		GtkTypeInfo camel_seekable_substream_info =
-		{
-			"CamelSeekableSubstream",
-			sizeof (CamelSeekableSubstream),
-			sizeof (CamelSeekableSubstreamClass),
-			(GtkClassInitFunc) camel_seekable_substream_class_init,
-			(GtkObjectInitFunc) NULL,
-				/* reserved_1 */ NULL,
-				/* reserved_2 */ NULL,
-			(GtkClassInitFunc) NULL,
-		};
-
-		camel_seekable_substream_type = gtk_type_unique (camel_seekable_stream_get_type (), &camel_seekable_substream_info);
-	}
-
-	return camel_seekable_substream_type;
-}
-
-static void
-finalize (GtkObject *object)
-{
-	CamelSeekableSubstream *seekable_substream =
-		CAMEL_SEEKABLE_SUBSTREAM (object);
-
-	if (seekable_substream->parent_stream)
-		gtk_object_unref (GTK_OBJECT (seekable_substream->parent_stream));
-
-	GTK_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-/**
- * camel_seekable_substream_new_with_seekable_stream_and_bounds:
- * @parent_stream: a seekable parent stream
- * @inf_bound: a lower bound
- * @sup_bound: an upper bound
- *
- * Creates a new CamelSeekableSubstream that references the portion
- * of @parent_stream from @inf_bound to @sup_bound. (If @sup_bound is
- * #CAMEL_STREAM_UNBOUND, it references to the end of stream, even if
- * the stream grows.)
- *
- * While the substream is open, the caller cannot assume anything about
- * the current position of @parent_stream. After the substream has been
- * closed, @parent_stream will stabilize again.
- *
- * Return value: the substream
- **/
-CamelStream *
-camel_seekable_substream_new_with_seekable_stream_and_bounds (CamelSeekableStream *parent_stream,
-							      off_t start, off_t end)
-{
-	CamelSeekableSubstream *seekable_substream;
-
-	g_return_val_if_fail (CAMEL_IS_SEEKABLE_STREAM (parent_stream), NULL);
-
-	/* Create the seekable substream. */
-	seekable_substream = gtk_type_new (camel_seekable_substream_get_type ());
-
-	/* Initialize it. */
-	seekable_substream->parent_stream = parent_stream;
-	gtk_object_ref (GTK_OBJECT (parent_stream));
-
-	/* Set the bound of the substream. We can ignore any possible error
-	 * here, because if we fail to seek now, it will try again later.
-	 */
-	camel_seekable_stream_set_bounds ((CamelSeekableStream *)seekable_substream, start, end);
-
-	return CAMEL_STREAM (seekable_substream);
-}
-
-static gboolean
-parent_reset (CamelSeekableSubstream *seekable_substream, CamelSeekableStream *parent)
-{
-	CamelSeekableStream *seekable_stream =
-		CAMEL_SEEKABLE_STREAM (seekable_substream);
-
-	if (camel_seekable_stream_tell (parent) == seekable_stream->position)
-		return TRUE;
-
-	return camel_seekable_stream_seek (parent, seekable_stream->position, CAMEL_STREAM_SET)
-		== seekable_stream->position;
-}
-
-static int
-stream_read (CamelStream *stream, char *buffer, unsigned int n)
-{
-	CamelSeekableStream *parent;
-	CamelSeekableStream *seekable_stream = CAMEL_SEEKABLE_STREAM (stream);
-	CamelSeekableSubstream *seekable_substream =
-		CAMEL_SEEKABLE_SUBSTREAM (stream);
-	int v;
-
-	if (n == 0)
-		return 0;
-
-	parent = seekable_substream->parent_stream;
-
-	/* Go to our position in the parent stream. */
-	if (!parent_reset (seekable_substream, parent)) {
-		stream->eos = TRUE;
-		return 0;
-	}
-
-	/* Compute how many bytes should be read. */
-	if (seekable_stream->bound_end != CAMEL_STREAM_UNBOUND)
-		n = MIN (seekable_stream->bound_end -  seekable_stream->position, n);
-
-	if (n == 0) {
-		stream->eos = TRUE;
-		return 0;
-	}
-
-	v = camel_stream_read (CAMEL_STREAM (parent), buffer, n);
-
-	/* ignore <0 - its an error, let the caller deal */
-	if (v > 0)
-		seekable_stream->position += v;
-
-	return v;
-}
-
-static int
-stream_write (CamelStream *stream, const char *buffer, unsigned int n)
-{
-	/* NOT VALID ON SEEKABLE SUBSTREAM */
-	/* Well, its entirely valid, just not implemented */
-	g_warning ("CamelSeekableSubstream:: seekable substream doesn't "
-		   "have a write method yet?\n");
-	return -1;
-}
-
-static int
-stream_flush (CamelStream *stream)
-{
-	/* NOT VALID ON SEEKABLE SUBSTREAM */
-	g_warning ("CamelSeekableSubstream:: seekable substream doesn't "
-		   "have a flush method\n");
-	return -1;
-}
-
-static int
-stream_close (CamelStream *stream)
-{
-	/* we dont really want to close the substream ... */
-	return 0;
-}
-
-static gboolean
-eos (CamelStream *stream)
-{
-	CamelSeekableSubstream *seekable_substream =
-		CAMEL_SEEKABLE_SUBSTREAM (stream);
-	CamelSeekableStream *seekable_stream = CAMEL_SEEKABLE_STREAM (stream);
-	CamelSeekableStream *parent;
-	gboolean eos;
-
-	if (stream->eos)
-		eos = TRUE;
-	else {
-		parent = seekable_substream->parent_stream;
-		if (!parent_reset (seekable_substream, parent))
-			return TRUE;
-
-		eos = camel_stream_eos (CAMEL_STREAM (parent));
-		if (!eos && (seekable_stream->bound_end != CAMEL_STREAM_UNBOUND)) {
-			eos = seekable_stream->position >= seekable_stream->bound_end;
-		}
-	}
-
-	return eos;
-}
-
-static off_t
-stream_seek (CamelSeekableStream *seekable_stream, off_t offset,
-	     CamelStreamSeekPolicy policy)
-{
-	CamelSeekableSubstream *seekable_substream =
-		CAMEL_SEEKABLE_SUBSTREAM (seekable_stream);
-	CamelStream *stream = CAMEL_STREAM (seekable_stream);
-	off_t real_offset = 0;
-
-	stream->eos = FALSE;
-
-	switch (policy) {
-	case CAMEL_STREAM_SET:
-		real_offset = offset;
-		break;
-
-	case CAMEL_STREAM_CUR:
-		real_offset = seekable_stream->position + offset;
-		break;
-
-	case CAMEL_STREAM_END:
-		real_offset = camel_seekable_stream_seek (seekable_substream->parent_stream,
-							  offset,
-							  CAMEL_STREAM_END);
-		if (real_offset == -1)
-			return -1;
-		break;
-	}
-
-	if (seekable_stream->bound_end != CAMEL_STREAM_UNBOUND)
-		real_offset = MIN (real_offset, seekable_stream->bound_end);
-
-	if (real_offsetbound_start)
-		real_offset = seekable_stream->bound_start;
-
-	seekable_stream->position = real_offset;
-	return real_offset;
-}
diff --git a/camel/camel-seekable-substream.h b/camel/camel-seekable-substream.h
deleted file mode 100644
index 721d33380a..0000000000
--- a/camel/camel-seekable-substream.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-seekable-substream.h: stream that piggybacks on another stream */
-
-/*
- * Author:
- *  Bertrand Guiheneuf 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef CAMEL_SEEKABLE_SUBSTREAM_H
-#define CAMEL_SEEKABLE_SUBSTREAM_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include 
-
-#define CAMEL_SEEKABLE_SUBSTREAM_TYPE       (camel_seekable_substream_get_type ())
-#define CAMEL_SEEKABLE_SUBSTREAM(obj)       (GTK_CHECK_CAST((obj), CAMEL_SEEKABLE_SUBSTREAM_TYPE, CamelSeekableSubstream))
-#define CAMEL_SEEKABLE_SUBSTREAM_CLASS(k)   (GTK_CHECK_CLASS_CAST ((k), CAMEL_SEEKABLE_SUBSTREAM_TYPE, CamelSeekableSubstreamClass))
-#define CAMEL_IS_SEEKABLE_SUBSTREAM(o)      (GTK_CHECK_TYPE((o), CAMEL_SEEKABLE_SUBSTREAM_TYPE))
-
-struct _CamelSeekableSubstream
-{
-	CamelSeekableStream parent_object;
-
-	/*  --**-- Private fields --**--  */
-	CamelSeekableStream *parent_stream;
-};
-
-typedef struct {
-	CamelSeekableStreamClass parent_class;
-
-} CamelSeekableSubstreamClass;
-
-/* Standard Gtk function */
-GtkType camel_seekable_substream_get_type (void);
-
-/* public methods */
-
-/* obtain a new seekable substream */
-CamelStream *
-camel_seekable_substream_new_with_seekable_stream_and_bounds (CamelSeekableStream    *parent_stream,
-							      off_t start, off_t end);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_SEEKABLE_SUBSTREAM_H */
diff --git a/camel/camel-service.c b/camel/camel-service.c
deleted file mode 100644
index ae3867643f..0000000000
--- a/camel/camel-service.c
+++ /dev/null
@@ -1,466 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-service.c : Abstract class for an email service */
-
-/* 
- *
- * Author : 
- *  Bertrand Guiheneuf 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-#include 
-#include "camel-service.h"
-#include "camel-exception.h"
-
-#include 
-#include 
-
-static CamelObjectClass *parent_class = NULL;
-
-/* Returns the class for a CamelService */
-#define CSERV_CLASS(so) CAMEL_SERVICE_CLASS (GTK_OBJECT(so)->klass)
-
-static gboolean _connect(CamelService *service, CamelException *ex);
-static gboolean _connect_with_url (CamelService *service, CamelURL *url,
-				   CamelException *ex);
-static gboolean _disconnect(CamelService *service, CamelException *ex);
-static gboolean _is_connected (CamelService *service);
-static GList *  _query_auth_types (CamelService *service, CamelException *ex);
-static void     _free_auth_types (CamelService *service, GList *authtypes);
-static void     _finalize (GtkObject *object);
-static gboolean _set_url (CamelService *service, CamelURL *url,
-			  CamelException *ex);
-
-static void
-camel_service_class_init (CamelServiceClass *camel_service_class)
-{
-	GtkObjectClass *gtk_object_class =
-		GTK_OBJECT_CLASS (camel_service_class);
-
-	parent_class = gtk_type_class (camel_object_get_type ());
-	
-	/* virtual method definition */
-	camel_service_class->connect = _connect;
-	camel_service_class->connect_with_url = _connect_with_url;
-	camel_service_class->disconnect = _disconnect;
-	camel_service_class->is_connected = _is_connected;
-	camel_service_class->query_auth_types = _query_auth_types;
-	camel_service_class->free_auth_types = _free_auth_types;
-
-	/* virtual method overload */
-	gtk_object_class->finalize = _finalize;
-}
-
-GtkType
-camel_service_get_type (void)
-{
-	static GtkType camel_service_type = 0;
-	
-	if (!camel_service_type)	{
-		GtkTypeInfo camel_service_info =	
-		{
-			"CamelService",
-			sizeof (CamelService),
-			sizeof (CamelServiceClass),
-			(GtkClassInitFunc) camel_service_class_init,
-			(GtkObjectInitFunc) NULL,
-				/* reserved_1 */ NULL,
-				/* reserved_2 */ NULL,
-			(GtkClassInitFunc) NULL,
-		};
-		
-		camel_service_type = gtk_type_unique (camel_object_get_type (),
-						      &camel_service_info);
-	}
-	
-	return camel_service_type;
-}
-
-
-static void           
-_finalize (GtkObject *object)
-{
-	CamelService *camel_service = CAMEL_SERVICE (object);
-
-	if (camel_service->url)
-		camel_url_free (camel_service->url);
-	if (camel_service->session)
-		gtk_object_unref (GTK_OBJECT (camel_service->session));
-
-	GTK_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-
-/**
- * camel_service_new: create a new CamelService or subtype
- * @type: the GtkType of the class to create
- * @session: the session for the service
- * @url: the default URL for the service (may be NULL)
- * @ex: a CamelException
- *
- * Creates a new CamelService (or one of its subtypes), initialized
- * with the given parameters.
- *
- * Return value: the CamelService, or NULL.
- **/
-CamelService *
-camel_service_new (GtkType type, CamelSession *session, CamelURL *url,
-		   CamelException *ex)
-{
-	CamelService *service;
-
-	g_assert(session);
-
-	service = CAMEL_SERVICE (gtk_object_new (type, NULL));
-	service->session = session;
-	gtk_object_ref (GTK_OBJECT (session));
-	if (!url->empty) {
-		if (!_set_url (service, url, ex))
-			return NULL;
-	}
-
-	return service;
-}
-
-/**
- * _connect : connect to a service 
- * @service: object to connect
- * @ex: a CamelException
- *
- * connect to the service using the parameters 
- * stored in the session it is initialized with
- *
- * Return value: whether or not the connection succeeded
- **/
-static gboolean
-_connect (CamelService *service, CamelException *ex)
-{
-	g_assert (service->session);
-	/* XXX it's possible that this should be an exception
-	 * rather than an assertion... I'm not sure how the code
-	 * is supposed to be used.
-	 */
-	g_assert (service->url);
-
-	service->connected = TRUE;
-	return TRUE;
-}
-
-
-
-/**
- * camel_service_connect:connect to a service 
- * @service: CamelService object
- * @ex: a CamelException
- * 
- * connect to the service using the parameters 
- * stored in the session it is initialized with
- *
- * Return value: whether or not the connection succeeded
- **/
-gboolean
-camel_service_connect (CamelService *service, CamelException *ex)
-{
-	return CSERV_CLASS(service)->connect(service, ex);
-}
-
-
-
-/**
- * _connect_with_url: connect to the specified address
- * @service: object to connect
- * @url: URL describing service to connect to
- * @ex: a CamelException
- *
- * Connect to the service, but do not use the session
- * default parameters to retrieve server's address
- *
- * Return value: whether or not the connection succeeded
- **/
-static gboolean
-_connect_with_url (CamelService *service, CamelURL *url, CamelException *ex)
-{
-	g_assert (service->session);
-
-	if (!_set_url (service, url, ex))
-		return FALSE;
-
-	return CSERV_CLASS(service)->connect (service, ex);
-}
-
-/**
- * camel_service_connect_with_url: connect a service 
- * @service:  the service to connect
- * @url:  URL describing the service to connect to
- * @ex: a CamelException
- * 
- * Connect to a service, but do not use the session
- * default parameters to retrieve server's address
- *
- * Return value: whether or not the connection succeeded
- **/
-gboolean
-camel_service_connect_with_url (CamelService *service, char *url_string,
-				CamelException *ex)
-{
-	CamelURL *url = camel_url_new (url_string, ex);
-
-	if (!url)
-		return FALSE;
-	return CSERV_CLASS(service)->connect_with_url (service, url, ex);
-}
-
-
-
-/**
- * _disconnect : disconnect from a service 
- * @service: object to disconnect
- * @ex: a CamelException
- *
- * disconnect from the service
- *
- * Return value: whether or not the disconnection succeeded without
- * errors. (Consult @ex if FALSE.)
- **/
-static gboolean
-_disconnect (CamelService *service, CamelException *ex)
-{
-	service->connected = FALSE;
-
-	return TRUE;
-}
-
-
-
-/**
- * camel_service_disconnect: disconnect from a service 
- * @service: CamelService object
- * @ex: a CamelException
- *
- * disconnect from the service
- *
- * Return value: whether or not the disconnection succeeded without
- * errors. (Consult @ex if FALSE.)
- **/
-gboolean
-camel_service_disconnect (CamelService *service, CamelException *ex)
-{
-	return CSERV_CLASS(service)->disconnect(service, ex);
-}
-
-
-
-/**
- * _is_connected: test if the service object is connected
- * @service: object to test
- * 
- * Return value: whether or not the service is connected
- **/
-static gboolean
-_is_connected (CamelService *service)
-{
-	return service->connected;
-}
-
-
-/**
- * camel_service_is_connected: test if the service object is connected
- * @service: object to test
- * 
- * Return value: whether or not the service is connected
- **/
-gboolean
-camel_service_is_connected (CamelService *service)
-{
-	return CSERV_CLASS(service)->is_connected(service);
-}
-
-
-/**
- * _set_url: Validate a URL and set it as the default for a service
- * @service: the CamelService
- * @url_string: the URL
- * @ex: a CamelException
- *
- * This converts the URL to a CamelURL, validates it for the service,
- * and sets it as the default URL for the service.
- *
- * Return value: success or failure
- **/
-static gboolean
-_set_url (CamelService *service, CamelURL *url, CamelException *ex)
-{
-	char *url_string;
-
-	if (service->url_flags & CAMEL_SERVICE_URL_NEED_USER &&
-	    (url->user == NULL || url->user[0] == '\0')) {
-		url_string = camel_url_to_string (url, FALSE);
-		camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_URL_INVALID,
-				      "URL '%s' needs a username component",
-				      url_string);
-		g_free (url_string);
-		return FALSE;
-	} else if (service->url_flags & CAMEL_SERVICE_URL_NEED_HOST &&
-		   (url->host == NULL || url->host[0] == '\0')) {
-		url_string = camel_url_to_string (url, FALSE);
-		camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_URL_INVALID,
-				      "URL '%s' needs a host component",
-				      url_string);
-		g_free (url_string);
-		return FALSE;
-	} else if (service->url_flags & CAMEL_SERVICE_URL_NEED_PATH &&
-		   (url->path == NULL || url->path[0] == '\0')) {
-		url_string = camel_url_to_string (url, FALSE);
-		camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_URL_INVALID,
-				      "URL '%s' needs a path component",
-				      url_string);
-		g_free (url_string);
-		return FALSE;
-	}
-
-	if (service->url)
-		camel_url_free (service->url);
-	service->url = url;
-	return TRUE;
-}
-
-/**
- * camel_service_get_url: get the url representing a service
- * @service: the service
- * 
- * returns the URL representing a service. The returned URL must be
- * freed when it is no longer needed. For security reasons, this
- * routine does not return the password.
- * 
- * Return value: the url name
- **/
-char *
-camel_service_get_url (CamelService *service)
-{
-	return camel_url_to_string(service->url, FALSE);
-}
-
-
-/**
- * camel_service_get_session: return the session associated with a service
- * @service: the service
- *
- * returns the CamelSession associated with the service.
- *
- * Return value: the session
- **/
-CamelSession *
-camel_service_get_session (CamelService *service)
-{
-	return service->session;
-}
-
-
-GList *
-_query_auth_types (CamelService *service, CamelException *ex)
-{
-	return NULL;
-}
-
-/**
- * camel_service_query_auth_types: return a list of supported
- * authentication types.
- * @service: a CamelService
- * @ex: a CamelException
- *
- * This is used by the mail source wizard to get the list of
- * authentication types supported by the protocol, and information
- * about them.
- *
- * This may be called on a service with or without an associated URL.
- * If there is no URL, the routine must return a generic answer. If
- * the service does have a URL, the routine SHOULD connect to the
- * server and query what authentication mechanisms it supports. If
- * it cannot do that for any reason, it should set @ex accordingly.
- *
- * Return value: a list of CamelServiceAuthType records. The caller
- * must free the list by calling camel_service_free_auth_types when
- * it is done.
- **/
-GList *
-camel_service_query_auth_types (CamelService *service, CamelException *ex)
-{
-	return CSERV_CLASS (service)->query_auth_types (service, ex);
-}
-
-static void
-_free_auth_types (CamelService *service, GList *authtypes)
-{
-	;
-}
-
-/**
- * camel_service_free_auth_types: free a type list returned by
- * camel_service_query_auth_types.
- * @service: the service
- * @authtypes: the list of authtypes
- *
- * This frees the data allocated by camel_service_query_auth_types.
- **/
-void
-camel_service_free_auth_types (CamelService *service, GList *authtypes)
-{
-	CSERV_CLASS (service)->free_auth_types (service, authtypes);
-}
-
-
-
-/* URL utility routines */
-
-/**
- * camel_service_gethost: get a hostent for a CamelService's host
- * @service: a CamelService
- * @ex: a CamelException
- *
- * This is a convenience function to do a gethostbyname on the host
- * for the service's URL.
- *
- * Return value: a (statically-allocated) hostent.
- **/
-struct hostent *
-camel_service_gethost (CamelService *service, CamelException *ex)
-{
-	struct hostent *h;
-	char *hostname;
-
-	if (service->url->host)
-		hostname = service->url->host;
-	else
-		hostname = "localhost";
-	h = gethostbyname (hostname);
-	if (!h) {
-		extern int h_errno;
-
-		if (h_errno == HOST_NOT_FOUND || h_errno == NO_DATA) {
-			camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_URL_INVALID,
-					      "No such host %s.", hostname);
-		} else {
-			camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
-					      "Temporarily unable to look up "
-					      "hostname %s.", hostname);
-		}
-		return NULL;
-	}
-
-	return h;
-}
diff --git a/camel/camel-service.h b/camel/camel-service.h
deleted file mode 100644
index c2f4f12020..0000000000
--- a/camel/camel-service.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-service.h : Abstract class for an email service */
-
-/* 
- *
- * Author : 
- *  Bertrand Guiheneuf 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef CAMEL_SERVICE_H
-#define CAMEL_SERVICE_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include 
-#include 
-#include 
-
-#define CAMEL_SERVICE_TYPE     (camel_service_get_type ())
-#define CAMEL_SERVICE(obj)     (GTK_CHECK_CAST((obj), CAMEL_SERVICE_TYPE, CamelService))
-#define CAMEL_SERVICE_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_SERVICE_TYPE, CamelServiceClass))
-#define CAMEL_IS_SERVICE(o)    (GTK_CHECK_TYPE((o), CAMEL_SERVICE_TYPE))
-
-
-struct _CamelService {
-	CamelObject parent_object;
-
-	CamelSession *session;
-	gboolean connected;
-	CamelURL *url;
-	int url_flags;
-
-};
-
-
-typedef struct {
-	CamelObjectClass parent_class;
-
-	gboolean  (*connect)           (CamelService *service, 
-					CamelException *ex);
-	gboolean  (*connect_with_url)  (CamelService *service, 
-					CamelURL *url,
-					CamelException *ex);
-	gboolean  (*disconnect)        (CamelService *service, 
-					CamelException *ex);
-
-	gboolean  (*is_connected)      (CamelService *service);
-
-	GList *   (*query_auth_types)  (CamelService *service,
-					CamelException *ex);
-	void      (*free_auth_types)   (CamelService *service,
-					GList *authtypes);
-
-} CamelServiceClass;
-
-
-
-/* flags for url_flags. (others can be added if needed) */
-#define CAMEL_SERVICE_URL_NEED_USER	(1 << 1)
-#define CAMEL_SERVICE_URL_NEED_AUTH	(1 << 2)
-#define CAMEL_SERVICE_URL_NEED_HOST	(1 << 4)
-#define CAMEL_SERVICE_URL_NEED_PATH	(1 << 6)
-
-
-/* query_auth_types returns a GList of these */
-typedef struct {
-	char *name, *description, *authproto;
-	gboolean need_password;
-} CamelServiceAuthType;
-
-
-/* public methods */
-CamelService *      camel_service_new                (GtkType type, 
-						      CamelSession *session,
-						      CamelURL *url, 
-						      CamelException *ex);
-
-gboolean            camel_service_connect            (CamelService *service, 
-						      CamelException *ex);
-gboolean            camel_service_connect_with_url   (CamelService *service, 
-						      char *url,
-						      CamelException *ex);
-gboolean            camel_service_disconnect         (CamelService *service, 
-                                                      CamelException *ex);
-gboolean            camel_service_is_connected       (CamelService *service);
-
-char *              camel_service_get_url            (CamelService *service);
-CamelSession *      camel_service_get_session        (CamelService *service);
-
-GList *             camel_service_query_auth_types   (CamelService *service,
-						      CamelException *ex);
-void                camel_service_free_auth_types    (CamelService *service,
-						      GList *authtypes);
-
-/* convenience functions */
-struct hostent *    camel_service_gethost            (CamelService *service,
-						      CamelException *ex);
-
-
-/* Standard Gtk function */
-GtkType camel_service_get_type (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_SERVICE_H */
-
diff --git a/camel/camel-session.c b/camel/camel-session.c
deleted file mode 100644
index 55a466e404..0000000000
--- a/camel/camel-session.c
+++ /dev/null
@@ -1,234 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-session.c : Abstract class for an email session */
-
-/*
- *
- * Author:
- *  Bertrand Guiheneuf 
- *  Dan Winship 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#include 
-#include "camel-session.h"
-#include "camel-store.h"
-#include "camel-transport.h"
-#include "camel-exception.h"
-#include "string-utils.h"
-#include "camel-url.h"
-#include "hash-table-utils.h"
-
-static void
-camel_session_init (CamelSession *session)
-{
-	session->modules = camel_provider_init ();
-	session->providers = g_hash_table_new (g_strcase_hash,
-					       g_strcase_equal);
-}
-
-GtkType
-camel_session_get_type (void)
-{
-	static GtkType camel_session_type = 0;
-
-	if (!camel_session_type) {
-		GtkTypeInfo camel_session_info =
-		{
-			"CamelSession",
-			sizeof (CamelSession),
-			sizeof (CamelSessionClass),
-			(GtkClassInitFunc) NULL,
-			(GtkObjectInitFunc) camel_session_init,
-				/* reserved_1 */ NULL,
-				/* reserved_2 */ NULL,
-			(GtkClassInitFunc) NULL,
-		};
-
-		camel_session_type = gtk_type_unique (camel_object_get_type (),
-						      &camel_session_info);
-	}
-
-	return camel_session_type;
-}
-
-
-CamelSession *
-camel_session_new (CamelAuthCallback authenticator)
-{
-	CamelSession *session = gtk_type_new (CAMEL_SESSION_TYPE);
-
-	session->authenticator = authenticator;
-	return session;
-}
-
-/**
- * camel_session_register_provider:
- * @session: a session object
- * @protocol: the protocol the provider provides for
- * @provider: provider object
- *
- * Registers a protocol to provider mapping for the session.
- **/
-void
-camel_session_register_provider (CamelSession *session,
-				 CamelProvider *provider)
-{
-	g_return_if_fail (CAMEL_IS_SESSION (session));
-	g_return_if_fail (provider != NULL);
-
-	g_hash_table_insert (session->providers, provider->protocol, provider);
-}
-
-static void
-ensure_loaded (gpointer key, gpointer value, gpointer user_data)
-{
-	CamelSession *session = user_data;
-	char *name = key;
-	char *path = value;
-
-	if (!g_hash_table_lookup (session->providers, name)) {
-		CamelException ex;
-
-		camel_exception_init (&ex);
-		camel_provider_load (session, path, &ex);
-		camel_exception_clear (&ex);
-	}
-}
-
-static gint
-provider_compare (gconstpointer a, gconstpointer b)
-{
-	const CamelProvider *cpa = (const CamelProvider *)a;
-	const CamelProvider *cpb = (const CamelProvider *)b;
-
-	return strcmp (cpa->name, cpb->name);
-}
-
-static void
-add_to_list (gpointer key, gpointer value, gpointer user_data)
-{
-	GList **list = user_data;
-	CamelProvider *prov = value;
-
-	*list = g_list_insert_sorted (*list, prov, provider_compare);
-}
-
-/**
- * camel_session_list_providers:
- * @session: the session
- * @load: whether or not to load in providers that are not already loaded
- *
- * This returns a list of available providers in this session. If @load
- * is %TRUE, it will first load in all available providers that haven't
- * yet been loaded.
- *
- * Return value: a GList of providers, which the caller must free.
- **/
-GList *
-camel_session_list_providers (CamelSession *session, gboolean load)
-{
-	GList *list;
-
-	g_return_val_if_fail (CAMEL_IS_SESSION (session), NULL);
-
-	if (load) {
-		g_hash_table_foreach (session->modules, ensure_loaded,
-				      session);
-	}
-
-	list = NULL;
-	g_hash_table_foreach (session->providers, add_to_list, &list);
-	return list;
-}
-
-
-CamelService *
-camel_session_get_service (CamelSession *session, const char *url_string,
-			   CamelProviderType type, CamelException *ex)
-{
-	CamelURL *url;
-	const CamelProvider *provider;
-
-	url = camel_url_new (url_string, ex);
-	if (!url)
-		return NULL;
-
-	provider = g_hash_table_lookup (session->providers, url->protocol);
-	if (!provider) {
-		/* See if there's one we can load. */
-		char *path;
-
-		path = g_hash_table_lookup (session->modules, url->protocol);
-		if (path) {
-			camel_provider_load (session, path, ex);
-			if (camel_exception_get_id (ex) !=
-			    CAMEL_EXCEPTION_NONE) {
-				camel_url_free (url);
-				return NULL;
-			}
-		}
-		provider = g_hash_table_lookup (session->providers,
-						url->protocol);
-	}
-
-	if (!provider || !provider->object_types[type]) {
-		camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_URL_INVALID,
-				      "No %s available for protocol `%s'",
-				      camel_provider_type_name[type],
-				      url->protocol);
-		camel_url_free (url);
-		return NULL;
-	}
-
-	return camel_service_new (provider->object_types[type], session,
-				  url, ex);
-}
-
-
-/**
- * camel_session_query_authenticator: query the session authenticator
- * @session: session object
- * @prompt: prompt to use if authenticator can query the user
- * @secret: whether or not the data is secret (eg, a password)
- * @service: the service this query is being made by
- * @item: an identifier, unique within this service, for the information
- * @ex: a CamelException
- *
- * This function is used by a CamelService to request authentication
- * information it needs to complete a connection. If the authenticator
- * stores any authentication information in configuration files, it
- * should use @service and @item as keys to find the right piece of
- * information. If it doesn't store authentication information in config
- * files, it should use the given @prompt to ask the user for the
- * information. If @secret is set, the user's input should not be
- * echoed back. The authenticator should set @ex to
- * CAMEL_EXCEPTION_USER_CANCEL if the user did not provide the
- * information. The caller must g_free() the information when it is
- * done with it.
- *
- * Return value: the authentication information or NULL.
- **/
-char *
-camel_session_query_authenticator (CamelSession *session, char *prompt,
-				   gboolean secret,
-				   CamelService *service, char *item,
-				   CamelException *ex)
-{
-	return session->authenticator (prompt, secret, service, item, ex);
-}
diff --git a/camel/camel-session.h b/camel/camel-session.h
deleted file mode 100644
index 81f8a3da85..0000000000
--- a/camel/camel-session.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-session.h : Abstract class for an email session */
-
-/*
- *
- * Author :
- *  Bertrand Guiheneuf 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef CAMEL_SESSION_H
-#define CAMEL_SESSION_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include 
-#include 
-
-#define CAMEL_SESSION_TYPE     (camel_session_get_type ())
-#define CAMEL_SESSION(obj)     (GTK_CHECK_CAST((obj), CAMEL_SESSION_TYPE, CamelSession))
-#define CAMEL_SESSION_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_SESSION_TYPE, CamelSessionClass))
-#define CAMEL_IS_SESSION(o)    (GTK_CHECK_TYPE((o), CAMEL_SESSION_TYPE))
-
-
-typedef char *(*CamelAuthCallback) (char *prompt, gboolean secret,
-				    CamelService *service, char *item,
-				    CamelException *ex);
-
-struct _CamelSession
-{
-	CamelObject parent_object;
-
-	CamelAuthCallback authenticator;
-
-	GHashTable *providers, *modules;
-};
-
-typedef struct {
-	CamelObjectClass parent_class;
-
-} CamelSessionClass;
-
-
-/* public methods */
-
-/* Standard Gtk function */
-GtkType camel_session_get_type (void);
-
-
-CamelSession *  camel_session_new                     (CamelAuthCallback
-						       authenticator);
-
-void            camel_session_register_provider       (CamelSession *session,
-						       CamelProvider *provider);
-GList *         camel_session_list_providers          (CamelSession *session,
-						       gboolean load);
-
-CamelService *  camel_session_get_service             (CamelSession *session,
-						       const char *url_string,
-						       CamelProviderType type,
-						       CamelException *ex);
-#define camel_session_get_store(session, url_string, ex) \
-	((CamelStore *) camel_session_get_service (session, url_string, CAMEL_PROVIDER_STORE, ex))
-#define camel_session_get_transport(session, url_string, ex) \
-	((CamelTransport *) camel_session_get_service (session, url_string, CAMEL_PROVIDER_TRANSPORT, ex))
-
-
-char *          camel_session_query_authenticator     (CamelSession *session,
-						       char *prompt,
-						       gboolean secret,
-						       CamelService *service,
-						       char *item,
-						       CamelException *ex);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_SESSION_H */
diff --git a/camel/camel-store.c b/camel/camel-store.c
deleted file mode 100644
index a303920c4e..0000000000
--- a/camel/camel-store.c
+++ /dev/null
@@ -1,274 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-store.c : Abstract class for an email store */
-
-/* 
- *
- * Authors:
- *  Bertrand Guiheneuf 
- *  Dan Winship 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-#include 
-#include "camel-store.h"
-#include "camel-folder.h"
-#include "camel-exception.h"
-
-static CamelServiceClass *parent_class = NULL;
-
-/* Returns the class for a CamelStore */
-#define CS_CLASS(so) CAMEL_STORE_CLASS (GTK_OBJECT(so)->klass)
-
-static CamelFolder *get_folder (CamelStore *store, const char *folder_name,
-				CamelException *ex);
-
-static char *get_folder_name (CamelStore *store, const char *folder_name,
-			      CamelException *ex);
-static char *get_root_folder_name (CamelStore *store, CamelException *ex);
-static char *get_default_folder_name (CamelStore *store, CamelException *ex);
-
-static CamelFolder *lookup_folder (CamelStore *store, const char *folder_name);
-static void cache_folder (CamelStore *store, const char *folder_name,
-			  CamelFolder *folder);
-static void uncache_folder (CamelStore *store, CamelFolder *folder);
-
-static void finalize (GtkObject *object);
-
-static void
-camel_store_class_init (CamelStoreClass *camel_store_class)
-{
-	GtkObjectClass *gtk_object_class =
-		GTK_OBJECT_CLASS (camel_store_class);
-
-	parent_class = gtk_type_class (camel_service_get_type ());
-
-	/* virtual method definition */
-	camel_store_class->get_folder = get_folder;
-	camel_store_class->get_folder_name = get_folder_name;
-	camel_store_class->get_root_folder_name = get_root_folder_name;
-	camel_store_class->get_default_folder_name = get_default_folder_name;
-	camel_store_class->lookup_folder = lookup_folder;
-	camel_store_class->cache_folder = cache_folder;
-	camel_store_class->uncache_folder = uncache_folder;
-
-	/* virtual method override */
-	gtk_object_class->finalize = finalize;
-}
-
-
-GtkType
-camel_store_get_type (void)
-{
-	static GtkType camel_store_type = 0;
-
-	if (!camel_store_type) {
-		GtkTypeInfo camel_store_info =
-		{
-			"CamelStore",
-			sizeof (CamelStore),
-			sizeof (CamelStoreClass),
-			(GtkClassInitFunc) camel_store_class_init,
-			(GtkObjectInitFunc) NULL,
-				/* reserved_1 */ NULL,
-				/* reserved_2 */ NULL,
-			(GtkClassInitFunc) NULL,
-		};
-
-		camel_store_type = gtk_type_unique (CAMEL_SERVICE_TYPE, &camel_store_info);
-	}
-
-	return camel_store_type;
-}
-
-
-static void
-finalize (GtkObject *object)
-{
-	CamelStore *store = CAMEL_STORE (object);
-
-	if (store->folders) {
-		if (g_hash_table_size (store->folders) != 0) {
-			g_warning ("Folder cache for store %p contains "
-				   "%d folders at destruction.", store,
-				   g_hash_table_size (store->folders));
-		}
-		g_hash_table_destroy (store->folders);
-	}
-}
-
-
-static CamelFolder *
-get_folder (CamelStore *store, const char *folder_name, CamelException *ex)
-{
-	g_warning ("CamelStore::get_folder not implemented for `%s'",
-		   gtk_type_name (GTK_OBJECT_TYPE (store)));
-	return NULL;
-}
-
-static char *
-get_folder_name (CamelStore *store, const char *folder_name,
-		 CamelException *ex)
-{
-	g_warning ("CamelStore::get_folder_name not implemented for `%s'",
-		   gtk_type_name (GTK_OBJECT_TYPE (store)));
-	return NULL;
-}
-
-static char *
-get_root_folder_name (CamelStore *store, CamelException *ex)
-{
-	return g_strdup ("/");
-}
-
-static char *
-get_default_folder_name (CamelStore *store, CamelException *ex)
-{
-	return CS_CLASS (store)->get_root_folder_name (store, ex);
-}
-
-static CamelFolder *
-lookup_folder (CamelStore *store, const char *folder_name)
-{
-	if (store->folders)
-		return g_hash_table_lookup (store->folders, folder_name);
-	return NULL;
-}
-
-static void
-cache_folder (CamelStore *store, const char *folder_name, CamelFolder *folder)
-{
-	if (!store->folders)
-		return;
-
-	if (g_hash_table_lookup (store->folders, folder_name)) {
-		g_warning ("Caching folder %s that already exists.",
-			   folder_name);
-	}
-	g_hash_table_insert (store->folders, (gpointer)folder_name, folder);
-	gtk_signal_connect_object (GTK_OBJECT (folder), "destroy",
-				   GTK_SIGNAL_FUNC (CS_CLASS (store)->uncache_folder),
-				   GTK_OBJECT (store));
-}
-
-static void
-uncache_folder (CamelStore *store, CamelFolder *folder)
-{
-	g_hash_table_remove (store->folders,
-			     camel_folder_get_full_name (folder));
-}
-
-
-static CamelFolder *
-get_folder_internal (CamelStore *store, const char *folder_name,
-		     CamelException *ex)
-{
-	CamelFolder *folder = NULL;
-
-	/* Try cache first. */
-	folder = CS_CLASS (store)->lookup_folder (store, folder_name);
-
-	if (!folder) {
-		folder = CS_CLASS (store)->get_folder (store, folder_name, ex);
-		if (!folder)
-			return NULL;
-
-		CS_CLASS (store)->cache_folder (store, folder_name, folder);
-	}
-
-	gtk_object_ref (GTK_OBJECT (folder));
-	return folder;
-}
-
-
-
-/** 
- * camel_store_get_folder: Return the folder corresponding to a path.
- * @store: a CamelStore
- * @folder_name: name of the folder to get
- * @ex: a CamelException
- * 
- * Returns the folder corresponding to the path "name". If the path
- * begins with the separator character, it is relative to the root
- * folder. Otherwise, it is relative to the default folder. The folder
- * does not necessarily already exist on the store. To test if it
- * already exists, use its "exists" method. If it does not exist, you
- * can create it with its "create" method.
- *
- * Return value: the folder
- **/
-CamelFolder *
-camel_store_get_folder (CamelStore *store, const char *folder_name,
-			CamelException *ex)
-{
-	char *name;
-	CamelFolder *folder = NULL;
-
-	name = CS_CLASS (store)->get_folder_name (store, folder_name, ex);
-	if (name) {
-		folder = get_folder_internal (store, name, ex);
-		g_free (name);
-	}
-	return folder;
-}
-
-
-/**
- * camel_store_get_root_folder: return the top-level folder
- * 
- * Returns the folder which is at the top of the folder hierarchy.
- * This folder may or may not be the same as the default folder.
- * 
- * Return value: the top-level folder.
- **/
-CamelFolder *
-camel_store_get_root_folder (CamelStore *store, CamelException *ex)
-{
-	char *name;
-	CamelFolder *folder = NULL;
-
-	name = CS_CLASS (store)->get_root_folder_name (store, ex);
-	if (name) {
-		folder = get_folder_internal (store, name, ex);
-		g_free (name);
-	}
-	return folder;
-}
-
-/** 
- * camel_store_get_default_folder: return the store default folder
- *
- * The default folder is the folder which is presented to the user in
- * the default configuration. This defaults to the root folder if
- * the store doesn't override it.
- *
- * Return value: the default folder.
- **/
-CamelFolder *
-camel_store_get_default_folder (CamelStore *store, CamelException *ex)
-{
-	char *name;
-	CamelFolder *folder = NULL;
-
-	name = CS_CLASS (store)->get_default_folder_name (store, ex);
-	if (name) {
-		folder = get_folder_internal (store, name, ex);
-		g_free (name);
-	}
-	return folder;
-}
-
diff --git a/camel/camel-store.h b/camel/camel-store.h
deleted file mode 100644
index 7f1aa89d59..0000000000
--- a/camel/camel-store.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-store.h : Abstract class for an email store */
-
-/* 
- *
- * Author : 
- *  Bertrand Guiheneuf 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef CAMEL_STORE_H
-#define CAMEL_STORE_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include 
-
-#define CAMEL_STORE_TYPE     (camel_store_get_type ())
-#define CAMEL_STORE(obj)     (GTK_CHECK_CAST((obj), CAMEL_STORE_TYPE, CamelStore))
-#define CAMEL_STORE_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_STORE_TYPE, CamelStoreClass))
-#define CAMEL_IS_STORE(o)    (GTK_CHECK_TYPE((o), CAMEL_STORE_TYPE))
-
-
-struct _CamelStore
-{
-	CamelService parent_object;
-
-	GHashTable *folders;
-
-};
-
-
-
-typedef struct {
-	CamelServiceClass parent_class;
-
-	CamelFolder *   (*get_folder)               (CamelStore *store,
-						     const char *folder_name,
-						     CamelException *ex);
-
-	char *          (*get_folder_name)          (CamelStore *store,
-						     const char *folder_name,
-						     CamelException *ex);
-	char *          (*get_root_folder_name)     (CamelStore *store,
-						     CamelException *ex);
-	char *          (*get_default_folder_name)  (CamelStore *store,
-						     CamelException *ex);
-
-        CamelFolder *   (*lookup_folder)            (CamelStore *store,
-						     const char *folder_name);
-	void            (*cache_folder)             (CamelStore *store,
-						     const char *folder_name,
-						     CamelFolder *folder);
-        void            (*uncache_folder)           (CamelStore *store,
-						     CamelFolder *folder);
-
-} CamelStoreClass;
-
-
-/* Standard Gtk function */
-GtkType camel_store_get_type (void);
-
-/* public methods */
-CamelFolder *    camel_store_get_folder         (CamelStore *store,
-					         const char *folder_name,
-					         CamelException *ex);
-CamelFolder *    camel_store_get_root_folder    (CamelStore *store,
-					         CamelException *ex);
-CamelFolder *    camel_store_get_default_folder (CamelStore *store,
-						 CamelException *ex);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_STORE_H */
diff --git a/camel/camel-stream-buffer.c b/camel/camel-stream-buffer.c
deleted file mode 100644
index 68dcc7ad21..0000000000
--- a/camel/camel-stream-buffer.c
+++ /dev/null
@@ -1,475 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; fill-column: 160 -*- */
-
-/* camel-stream-buffer.c : Buffer any other other stream
- *
- * Authors: Michael Zucchi 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#include 
-#include "camel-stream-buffer.h"
-#include 
-#include 
-#include 
-#include 
-
-static CamelStreamBufferClass *parent_class = NULL;
-
-enum {
-	BUF_USER = 1<<0,	/* user-supplied buffer, do not free */
-};
-
-#define BUF_SIZE 1024
-
-static int stream_read (CamelStream *stream, char *buffer, unsigned int n);
-static int stream_write (CamelStream *stream, const char *buffer, unsigned int n);
-static int stream_flush (CamelStream *stream);
-static int stream_close (CamelStream *stream);
-static gboolean stream_eos (CamelStream *stream);
-
-static void finalize (GtkObject *object);
-static void destroy (GtkObject *object);
-
-static void init_vbuf(CamelStreamBuffer *sbf, CamelStream *s, CamelStreamBufferMode mode, char *buf, guint32 size);
-static void init(CamelStreamBuffer *sbuf, CamelStream *s, CamelStreamBufferMode mode);
-
-static void
-camel_stream_buffer_class_init (CamelStreamBufferClass *camel_stream_buffer_class)
-{
-	CamelStreamClass *camel_stream_class = CAMEL_STREAM_CLASS (camel_stream_buffer_class);
-	GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (camel_stream_buffer_class);
-
-	parent_class = gtk_type_class (camel_stream_get_type ());
-
-	/* virtual method definition */
-	camel_stream_buffer_class->init = init;
-	camel_stream_buffer_class->init_vbuf = init_vbuf;
-
-	/* virtual method overload */
-	camel_stream_class->read = stream_read;
-	camel_stream_class->write = stream_write;
-	camel_stream_class->flush = stream_flush;
-	camel_stream_class->close = stream_close;
-	camel_stream_class->eos = stream_eos;
-
-	gtk_object_class->finalize = finalize;
-	gtk_object_class->destroy = destroy;
-
-}
-
-static void
-camel_stream_buffer_init (gpointer   object,  gpointer   klass)
-{
-	CamelStreamBuffer *sbf = CAMEL_STREAM_BUFFER (object);
-
-	sbf->flags = 0;
-	sbf->size = BUF_SIZE;
-	sbf->buf = g_malloc(BUF_SIZE);
-	sbf->ptr = sbf->buf;
-	sbf->end = sbf->buf;
-	sbf->mode = CAMEL_STREAM_BUFFER_READ | CAMEL_STREAM_BUFFER_BUFFER;
-	sbf->stream = 0;
-	sbf->linesize = 80;
-	sbf->linebuf = g_malloc(sbf->linesize);
-}
-
-GtkType
-camel_stream_buffer_get_type (void)
-{
-	static GtkType camel_stream_buffer_type = 0;
-
-	gdk_threads_enter ();
-	if (!camel_stream_buffer_type)	{
-		GtkTypeInfo camel_stream_buffer_info =
-		{
-			"CamelStreamBuffer",
-			sizeof (CamelStreamBuffer),
-			sizeof (CamelStreamBufferClass),
-			(GtkClassInitFunc) camel_stream_buffer_class_init,
-			(GtkObjectInitFunc) camel_stream_buffer_init,
-				/* reserved_1 */ NULL,
-				/* reserved_2 */ NULL,
-			(GtkClassInitFunc) NULL,
-		};
-
-		camel_stream_buffer_type = gtk_type_unique (camel_stream_get_type (), &camel_stream_buffer_info);
-	}
-	gdk_threads_leave ();
-	return camel_stream_buffer_type;
-}
-
-
-static void
-destroy (GtkObject *object)
-{
-	CamelStreamBuffer *stream_buffer = CAMEL_STREAM_BUFFER (object);
-
-	/* NOP to remove warnings */
-	stream_buffer->buf = stream_buffer->buf;
-
-	GTK_OBJECT_CLASS (parent_class)->destroy (object);
-}
-
-
-static void
-finalize (GtkObject *object)
-{
-	CamelStreamBuffer *sbf = CAMEL_STREAM_BUFFER (object);
-
-	if (!(sbf->flags & BUF_USER)) {
-		g_free(sbf->buf);
-	}
-	if (sbf->stream)
-		gtk_object_unref(GTK_OBJECT(sbf->stream));
-
-	g_free(sbf->linebuf);
-
-	GTK_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-static void
-set_vbuf(CamelStreamBuffer *sbf, char *buf, CamelStreamBufferMode mode, int size)
-{
-	if (sbf->buf && !(sbf->flags & BUF_USER)) {
-		g_free(sbf->buf);
-	}
-	if (buf) {
-		sbf->buf = buf;
-		sbf->flags |= BUF_USER;
-	} else {
-		sbf->buf = g_malloc(size);
-		sbf->flags &= ~BUF_USER;
-	}
-	sbf->size = size;
-	sbf->mode = mode;
-}
-
-static void
-init_vbuf(CamelStreamBuffer *sbf, CamelStream *s, CamelStreamBufferMode mode, char *buf, guint32 size)
-{
-	set_vbuf(sbf, buf, mode, size);
-	if (sbf->stream)
-		gtk_object_unref(GTK_OBJECT(sbf->stream));
-	sbf->stream = s;
-	gtk_object_ref(GTK_OBJECT(sbf->stream));
-}
-
-static void
-init(CamelStreamBuffer *sbuf, CamelStream *s, CamelStreamBufferMode mode)
-{
-	init_vbuf(sbuf, s, mode, NULL, BUF_SIZE);
-}
-
-
-/**
- * camel_stream_buffer_new:
- * @stream: Existing stream to buffer.
- * @mode: Operational mode of buffered stream.
- *
- * Create a new buffered stream of another stream.  A default
- * buffer size (1024 bytes), automatically managed will be used
- * for buffering.
- *
- * See camel_stream_buffer_new_with_vbuf() for details on the
- * @mode parameter.
- *
- * Return value: A newly created buffered stream.
- **/
-CamelStream *
-camel_stream_buffer_new (CamelStream *stream, CamelStreamBufferMode mode)
-{
-	CamelStreamBuffer *sbf;
-	sbf = gtk_type_new (camel_stream_buffer_get_type ());
-	CAMEL_STREAM_BUFFER_CLASS (GTK_OBJECT(sbf)->klass)->init (sbf, stream, mode);
-
-	return CAMEL_STREAM (sbf);
-}
-
-/**
- * camel_stream_buffer_new_with_vbuf:
- * @stream: An existing stream to buffer.
- * @mode: Mode to buffer in.
- * @buf: Memory to use for buffering.
- * @size: Size of buffer to use.
- *
- * Create a new stream which buffers another stream, @stream.
- *
- * The following values are available for @mode:
- *
- * CAMEL_STREAM_BUFFER_BUFFER, Buffer the input/output in blocks.
- * CAMEL_STREAM_BUFFER_NEWLINE, Buffer on newlines (for output).
- * CAMEL_STREAM_BUFFER_NONE, Perform no buffering.
- *
- * Note that currently this is ignored and CAMEL_STREAM_BUFFER_BUFFER
- * is always used.
- *
- * In addition, one of the following mode options should be or'd
- * together with the buffering mode:
- *
- * CAMEL_STREAM_BUFFER_WRITE, Buffer in write mode.
- * CAMEL_STREAM_BUFFER_READ, Buffer in read mode.
- *
- * Buffering can only be done in one direction for any
- * buffer instance.
- *
- * If @buf is non-NULL, then use the memory pointed to
- * (for upto @size bytes) as the buffer for all buffering
- * operations.  It is upto the application to free this buffer.
- * If @buf is NULL, then allocate and manage @size bytes
- * for all buffering.
- *
- * Return value: A new stream with buffering applied.
- **/
-CamelStream *camel_stream_buffer_new_with_vbuf (CamelStream *stream, CamelStreamBufferMode mode, char *buf, guint32 size)
-{
-	CamelStreamBuffer *sbf;
-	sbf = gtk_type_new (camel_stream_buffer_get_type ());
-	CAMEL_STREAM_BUFFER_CLASS (GTK_OBJECT(sbf)->klass)->init_vbuf (sbf, stream, mode, buf, size);
-
-	return CAMEL_STREAM (sbf);
-}
-
-static int
-stream_read (CamelStream *stream, char *buffer, unsigned int n)
-{
-	CamelStreamBuffer *sbf = CAMEL_STREAM_BUFFER (stream);
-	int bytes_read = 1;
-	int bytes_left;
-	char *bptr = buffer;
-
-	g_return_val_if_fail( (sbf->mode & CAMEL_STREAM_BUFFER_MODE) == CAMEL_STREAM_BUFFER_READ, 0);
-
-	while (n && bytes_read > 0) {
-		bytes_left = sbf->end - sbf->ptr;
-		if (bytes_left < n) {
-			if (bytes_left > 0) {
-				memcpy(bptr, sbf->ptr, bytes_left);
-				n -= bytes_left;
-				bptr += bytes_left;
-				sbf->ptr += bytes_left;
-			}
-			/* if we are reading a lot, then read directly to the destination buffer */
-			if (n >= sbf->size/3) {
-				bytes_read = camel_stream_read(sbf->stream, bptr, n);
-				if (bytes_read>0) {
-					n -= bytes_read;
-					bptr += bytes_read;
-				}
-			} else {
-				bytes_read = camel_stream_read(sbf->stream, sbf->buf, sbf->size);
-				if (bytes_read>0) {
-					sbf->ptr = sbf->buf;
-					sbf->end = sbf->buf+bytes_read;
-					memcpy(bptr, sbf->ptr, n);
-					sbf->ptr += n;
-					bptr += n;
-					n -= bytes_read;
-				}
-			}
-		} else {
-			memcpy(bptr, sbf->ptr, bytes_left);
-			sbf->ptr += n;
-			bptr += n;
-			n = 0;
-		}
-	}
-
-	return bptr-buffer;
-}
-
-static int
-stream_write (CamelStream *stream, const char *buffer, unsigned int n)
-{
-	CamelStreamBuffer *sbf = CAMEL_STREAM_BUFFER (stream);
-	const char *bptr = buffer;
-	int bytes_written = 1;
-	int bytes_left;
-	int total = n;
-
-	g_return_val_if_fail( (sbf->mode & CAMEL_STREAM_BUFFER_MODE) == CAMEL_STREAM_BUFFER_WRITE, 0);
-
-	while (n && bytes_written > 0) {
-		bytes_left = sbf->size - (sbf->ptr-sbf->buf);
-		if (bytes_leftptr, bptr, bytes_left);
-			n -= bytes_left;
-			bptr += bytes_left;
-			bytes_written = camel_stream_write(sbf->stream, sbf->buf, sbf->size);
-			sbf->ptr = sbf->buf;
-			/* if we are writing a lot, write directly to the stream */
-			if (n >= sbf->size/3) {
-				bytes_written = camel_stream_write(sbf->stream, bptr, n);
-				if (bytes_written >0) {
-					bytes_written = n;
-					n -= bytes_written;
-					bptr += bytes_written;
-				}
-			} else {
-				memcpy(sbf->ptr, bptr, n);
-				sbf->ptr += n;
-				bptr += n;
-				n = 0;
-			}
-		} else {
-			memcpy(sbf->ptr, bptr, n);
-			sbf->ptr += n;
-			bptr += n;
-			n = 0;
-		}
-	}
-	if (bytes_written == -1)
-		return -1;
-	return total;
-}
-
-static int
-stream_flush (CamelStream *stream)
-{
-	CamelStreamBuffer *sbf = CAMEL_STREAM_BUFFER (stream);
-
-	if ((sbf->mode & CAMEL_STREAM_BUFFER_MODE) == CAMEL_STREAM_BUFFER_WRITE) {
-		int len = sbf->ptr-sbf->buf;
-		int written = camel_stream_write(sbf->stream, sbf->buf, len);
-		if (written > 0)
-			sbf->ptr += written;
-		if (written != len)
-			return -1;
-	} else {
-		/* nothing to do for read mode 'flush' */
-	}
-
-	return camel_stream_flush(sbf->stream);
-}
-
-static int
-stream_close (CamelStream *stream)
-{
-	CamelStreamBuffer *sbf = CAMEL_STREAM_BUFFER (stream);
-
-	if (stream_flush(stream) == -1)
-		return -1;
-	return camel_stream_close(sbf->stream);
-}
-
-static gboolean
-stream_eos (CamelStream *stream)
-{
-	CamelStreamBuffer *sbf = CAMEL_STREAM_BUFFER (stream);
-
-	return camel_stream_eos(sbf->stream) && sbf->ptr == sbf->end;
-}
-
-/**
- * camel_stream_buffer_gets:
- * @sbf: A CamelStreamBuffer.
- * @buf: Memory to write the string to.
- * @max: Maxmimum number of characters to store.
- *
- * Read a line of characters up to the next newline character or
- * @max characters.
- *
- * If the newline character is encountered, then it will be
- * included in the buffer @buf.  The buffer will be #NUL terminated.
- *
- * Return value: The number of characters read, or 0 for end of file,
- * and -1 on error.
- **/
-int camel_stream_buffer_gets(CamelStreamBuffer *sbf, char *buf, unsigned int max)
-{
-	register char *outptr, *inptr, *inend, c, *outend;
-	int bytes_read;
-
-	outptr = buf;
-	inptr = sbf->ptr;
-	inend = sbf->end;
-	outend = buf+max-1;	/* room for NUL */
-
-	do {
-		while (inptrptr = inptr;
-				return outptr-buf;
-			}
-		}
-		if (outptr == outend)
-			break;
-
-		bytes_read = camel_stream_read(sbf->stream, sbf->buf, sbf->size);
-		if (bytes_read == -1)
-			return -1;
-		inptr = sbf->ptr = sbf->buf;
-		inend = sbf->end = sbf->buf + bytes_read;
-	} while (bytes_read>0);
-
-	sbf->ptr = inptr;
-	if (outptr<=outend)
-		*outptr = 0;
-
-	return outptr-buf;
-}
-
-/**
- * camel_stream_buffer_read_line: read a complete line from the stream
- * @sbf: A CamelStreamBuffer
- *
- * This function reads a complete newline-terminated line from the stream
- * and returns it in allocated memory. The trailing newline (and carriage
- * return if any) are not included in the returned string.
- *
- * Return value: the line read, which the caller must free when done with,
- * or NULL on eof. If an error occurs, @ex will be set.
- **/
-char *
-camel_stream_buffer_read_line (CamelStreamBuffer *sbf)
-{
-	unsigned char *p;
-	int nread;
-
-	p = sbf->linebuf;
-
-	while (1) {
-		nread = camel_stream_buffer_gets (sbf, p, sbf->linesize - (p - sbf->linebuf));
-		if (nread <=0) {
-			if (p > sbf->linebuf)
-				break;
-			return NULL;
-		}
-
-		p += nread;
-		if (p[-1] == '\n')
-			break;
-
-		nread = p - sbf->linebuf;
-		sbf->linesize *= 2;
-		sbf->linebuf = g_realloc (sbf->linebuf, sbf->linesize);
-		p = sbf->linebuf + nread;
-	}
-
-	p--;
-	if (p[-1] == '\r')
-		p--;
-	p[0] = 0;
-
-	return g_strdup(sbf->linebuf);
-}
-
diff --git a/camel/camel-stream-buffer.h b/camel/camel-stream-buffer.h
deleted file mode 100644
index 367735e4e1..0000000000
--- a/camel/camel-stream-buffer.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-stream-buffer.h :stream which buffers another stream */
-
-/*
- *
- * Author :
- *  Michael Zucchi 
- *
- * Copyright 2000 Helix Code Inc. (http://www.helixcode.com) .
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef CAMEL_STREAM_BUFFER_H
-#define CAMEL_STREAM_BUFFER_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include 
-#include 
-
-#define CAMEL_STREAM_BUFFER_TYPE     (camel_stream_buffer_get_type ())
-#define CAMEL_STREAM_BUFFER(obj)     (GTK_CHECK_CAST((obj), CAMEL_STREAM_BUFFER_TYPE, CamelStreamBuffer))
-#define CAMEL_STREAM_BUFFER_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_STREAM_BUFFER_TYPE, CamelStreamBufferClass))
-#define CAMEL_IS_STREAM_BUFFER(o)    (GTK_CHECK_TYPE((o), CAMEL_STREAM_BUFFER_TYPE))
-
-typedef enum
-{
-	CAMEL_STREAM_BUFFER_BUFFER = 0,
-	CAMEL_STREAM_BUFFER_NEWLINE,
-	CAMEL_STREAM_BUFFER_NONE,
-	CAMEL_STREAM_BUFFER_READ = 0x00,
-	CAMEL_STREAM_BUFFER_WRITE = 0x80,
-	CAMEL_STREAM_BUFFER_MODE = 0x80
-} CamelStreamBufferMode;
-
-struct _CamelStreamBuffer
-{
-	CamelStream parent_object;
-
-	/* these are all of course, private */
-	CamelStream *stream;
-
-	unsigned char *buf, *ptr, *end;
-	int size;
-
-	unsigned char *linebuf;	/* for reading lines at a time */
-	int linesize;
-
-	CamelStreamBufferMode mode;
-	unsigned int flags;	/* internal flags */
-};
-
-
-typedef struct {
-	CamelStreamClass parent_class;
-
-	/* Virtual methods */
-	void (*init) (CamelStreamBuffer *stream_buffer, CamelStream *stream,
-		      CamelStreamBufferMode mode);
-	void (*init_vbuf) (CamelStreamBuffer *stream_buffer,
-			   CamelStream *stream, CamelStreamBufferMode mode,
-			   char *buf, guint32 size);
-
-} CamelStreamBufferClass;
-
-
-/* Standard Gtk function */
-GtkType camel_stream_buffer_get_type (void);
-
-
-/* public methods */
-CamelStream *camel_stream_buffer_new (CamelStream *s,
-				      CamelStreamBufferMode mode);
-CamelStream *camel_stream_buffer_new_with_vbuf (CamelStream *s,
-						CamelStreamBufferMode mode,
-						char *buf, guint32 size);
-
-/* unimplemented
-   CamelStream *camel_stream_buffer_set_vbuf (CamelStreamBuffer *b, CamelStreamBufferMode mode, char *buf, guint32 size); */
-
-/* read a line of characters */
-int camel_stream_buffer_gets (CamelStreamBuffer *b, char *buf, unsigned int max);
-
-char *camel_stream_buffer_read_line (CamelStreamBuffer *sbf);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_STREAM_BUFFER_H */
diff --git a/camel/camel-stream-filter.c b/camel/camel-stream-filter.c
deleted file mode 100644
index 3aaa1a20ed..0000000000
--- a/camel/camel-stream-filter.c
+++ /dev/null
@@ -1,355 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; fill-column: 160 -*- */
-/*
- *  Copyright (C) 2000 Helix Code Inc.
- *
- *  Authors: Michael Zucchi 
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Library General Public License
- *  as published by the Free Software Foundation; either version 2 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU Library General Public License for more details.
- *
- *  You should have received a copy of the GNU Library General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include "camel-stream-filter.h"
-
-struct _filter {
-	struct _filter *next;
-	int id;
-	CamelMimeFilter *filter;
-};
-
-struct _CamelStreamFilterPrivate {
-	struct _filter *filters;
-	int filterid;		/* next filter id */
-	
-	char *realbuffer;	/* buffer - READ_PAD */
-	char *buffer;		/* READ_SIZE bytes */
-
-	char *filtered;		/* the filtered data */
-	size_t filteredlen;
-
-	int last_was_read;	/* was the last op read or write? */
-};
-
-#define READ_PAD (64)		/* bytes padded before buffer */
-#define READ_SIZE (4096)
-
-#define _PRIVATE(o) (((CamelStreamFilter *)(o))->priv)
-
-static void camel_stream_filter_class_init (CamelStreamFilterClass *klass);
-static void camel_stream_filter_init       (CamelStreamFilter *obj);
-
-static	int       do_read       (CamelStream *stream, char *buffer, unsigned int n);
-static	int       do_write      (CamelStream *stream, const char *buffer, unsigned int n);
-static	int       do_flush      (CamelStream *stream);
-static	int       do_close      (CamelStream *stream);
-static	gboolean  do_eos        (CamelStream *stream);
-static	int       do_reset      (CamelStream *stream);
-
-static CamelStreamClass *camel_stream_filter_parent;
-
-enum SIGNALS {
-	LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-guint
-camel_stream_filter_get_type (void)
-{
-	static guint type = 0;
-	
-	if (!type) {
-		GtkTypeInfo type_info = {
-			"CamelStreamFilter",
-			sizeof (CamelStreamFilter),
-			sizeof (CamelStreamFilterClass),
-			(GtkClassInitFunc) camel_stream_filter_class_init,
-			(GtkObjectInitFunc) camel_stream_filter_init,
-			(GtkArgSetFunc) NULL,
-			(GtkArgGetFunc) NULL
-		};
-		
-		type = gtk_type_unique (camel_stream_get_type (), &type_info);
-	}
-	
-	return type;
-}
-
-static void
-finalise(GtkObject *o)
-{
-	CamelStreamFilter *filter = (CamelStreamFilter *)o;
-	struct _CamelStreamFilterPrivate *p = _PRIVATE(filter);
-	struct _filter *fn, *f;
-
-	f = p->filters;
-	while (f) {
-		fn = f->next;
-		gtk_object_unref((GtkObject *)f->filter);
-		g_free(f);
-		f = fn;
-	}
-	g_free(p->realbuffer);
-	g_free(p);
-	gtk_object_unref((GtkObject *)filter->source);
-
-	GTK_OBJECT_CLASS (camel_stream_filter_parent)->finalize (o);
-}
-
-
-static void
-camel_stream_filter_class_init (CamelStreamFilterClass *klass)
-{
-	GtkObjectClass *object_class = (GtkObjectClass *) klass;
-	CamelStreamClass *camel_stream_class = (CamelStreamClass *) klass;
-
-	camel_stream_filter_parent = gtk_type_class (camel_stream_get_type ());
-
-	object_class->finalize = finalise;
-
-	camel_stream_class->read = do_read;
-	camel_stream_class->write = do_write;
-	camel_stream_class->flush = do_flush;
-	camel_stream_class->flush = do_close;
-	camel_stream_class->eos = do_eos; 
-	camel_stream_class->reset = do_reset;
-
-	gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
-}
-
-static void
-camel_stream_filter_init (CamelStreamFilter *obj)
-{
-	struct _CamelStreamFilterPrivate *p;
-	
-	_PRIVATE(obj) = p = g_malloc0(sizeof(*p));
-	p->realbuffer = g_malloc(READ_SIZE + READ_PAD);
-	p->buffer = p->realbuffer + READ_PAD;
-	p->last_was_read = TRUE;
-}
-
-/**
- * camel_stream_filter_new:
- *
- * Create a new CamelStreamFilter object.
- * 
- * Return value: A new CamelStreamFilter object.
- **/
-CamelStreamFilter *
-camel_stream_filter_new_with_stream(CamelStream *stream)
-{
-	CamelStreamFilter *new = CAMEL_STREAM_FILTER ( gtk_type_new (camel_stream_filter_get_type ()));
-
-	new->source = stream;
-	gtk_object_ref ((GtkObject *)stream);
-
-	return new;
-}
-
-
-/**
- * camel_stream_filter_add:
- * @filter: Initialised CamelStreamFilter.
- * @mf:  Filter to perform processing on stream.
- * 
- * Add a new CamelMimeFilter to execute during the processing of this
- * stream.  Each filter added is processed after the previous one.
- *
- * Note that a filter should only be added to a single stream
- * at a time, otherwise unpredictable results may occur.
- * 
- * Return value: A filter id for this CamelStreamFilter.
- **/
-int
-camel_stream_filter_add(CamelStreamFilter *filter, CamelMimeFilter *mf)
-{
-	struct _CamelStreamFilterPrivate *p = _PRIVATE(filter);
-	struct _filter *fn, *f;
-
-	fn = g_malloc(sizeof(*fn));
-	fn->id = p->filterid++;
-	fn->filter = mf;
-	gtk_object_ref((GtkObject *)mf);
-
-	/* sure, we could use a GList, but we wouldn't save much */
-	f = (struct _filter *)&p->filters;
-	while (f->next)
-		f = f->next;
-	f->next = fn;
-	fn->next = NULL;
-	return fn->id;
-}
-
-/**
- * camel_stream_filter_remove:
- * @filter: Initialised CamelStreamFilter.
- * @id: Filter id, as returned from camel_stream_filter_add().
- * 
- * Remove a processing filter from the stream, by id.
- **/
-void
-camel_stream_filter_remove(CamelStreamFilter *filter, int id)
-{
-	struct _CamelStreamFilterPrivate *p = _PRIVATE(filter);
-	struct _filter *fn, *f;
-
-	f = (struct _filter *)&p->filters;
-	while (f && f->next) {
-		fn = f->next;
-		if (fn->id == id) {
-			f->next = fn->next;
-			gtk_object_unref((GtkObject *)fn->filter);
-			g_free(fn);
-		}
-		f = f->next;
-	}
-}
-
-static int
-do_read (CamelStream *stream, char *buffer, unsigned int n)
-{
-	CamelStreamFilter *filter = (CamelStreamFilter *)stream;
-	struct _CamelStreamFilterPrivate *p = _PRIVATE(filter);
-	int size;
-	struct _filter *f;
-
-	p->last_was_read = TRUE;
-
-	if (p->filteredlen<=0) {
-		int presize = READ_SIZE;
-
-		size = camel_stream_read(filter->source, p->buffer, READ_SIZE);
-		if (size<=0) {
-			/* this is somewhat untested */
-			if (camel_stream_eos(filter->source)) {
-				f = p->filters;
-				p->filtered = p->buffer;
-				p->filteredlen = 0;
-				while (f) {
-					camel_mime_filter_complete(f->filter, p->filtered, p->filteredlen, presize, &p->filtered, &p->filteredlen, &presize);
-					f = f->next;
-				}
-				size = p->filteredlen;
-			}
-			if (size<=0)
-				return size;
-		} else {
-			f = p->filters;
-			p->filtered = p->buffer;
-			p->filteredlen = size;
-			while (f) {
-				camel_mime_filter_filter(f->filter, p->filtered, p->filteredlen, presize, &p->filtered, &p->filteredlen, &presize);
-				f = f->next;
-			}
-		}
-	}
-
-	size = MIN(n, p->filteredlen);
-	memcpy(buffer, p->filtered, size);
-	p->filteredlen -= size;
-	p->filtered += size;
-
-	return size;
-}
-
-static int
-do_write (CamelStream *stream, const char *buf, unsigned int n)
-{
-	CamelStreamFilter *filter = (CamelStreamFilter *)stream;
-	struct _CamelStreamFilterPrivate *p = _PRIVATE(filter);
-	struct _filter *f;
-	int presize;
-	char *buffer = (char *)buf;
-
-	p->last_was_read = FALSE;
-
-	f = p->filters;
-	presize = 0;
-	while (f) {
-		camel_mime_filter_filter(f->filter, buffer, n, presize, &buffer, &n, &presize);
-		f = f->next;
-	}
-
-	return camel_stream_write(filter->source, buffer, n);
-}
-
-static int
-do_flush (CamelStream *stream)
-{
-	CamelStreamFilter *filter = (CamelStreamFilter *)stream;
-	struct _CamelStreamFilterPrivate *p = _PRIVATE(filter);
-	struct _filter *f;
-	char *buffer;
-	int len, presize;
-
-	if (p->last_was_read) {
-		g_warning("Flushing a filter stream without writing to it");
-		return 0;
-	}
-
-	buffer = "";
-	len = 0;
-	presize = 0;
-	f = p->filters;
-	while (f) {
-		camel_mime_filter_complete(f->filter, buffer, len, presize, &buffer, &len, &presize);
-		f = f->next;
-	}
-	if (len>0 && camel_stream_write(filter->source, buffer, len) == -1)
-		return -1;
-	return camel_stream_flush(filter->source);
-}
-
-static int
-do_close (CamelStream *stream)
-{
-	CamelStreamFilter *filter = (CamelStreamFilter *)stream;
-	struct _CamelStreamFilterPrivate *p = _PRIVATE(filter);
-
-	if (!p->last_was_read) {
-		do_flush(stream);
-	}
-	return camel_stream_close(filter->source);
-}
-
-static gboolean
-do_eos (CamelStream *stream)
-{
-	CamelStreamFilter *filter = (CamelStreamFilter *)stream;
-	struct _CamelStreamFilterPrivate *p = _PRIVATE(filter);
-
-	if (p->filteredlen >0)
-		return FALSE;
-
-	return camel_stream_eos(filter->source);
-}
-
-static int
-do_reset (CamelStream *stream)
-{
-	CamelStreamFilter *filter = (CamelStreamFilter *)stream;
-	struct _CamelStreamFilterPrivate *p = _PRIVATE(filter);
-	struct _filter *f;
-
-	p->filteredlen = 0;
-
-	/* and reset filters */
-	f = p->filters;
-	while (f) {
-		camel_mime_filter_reset(f->filter);
-		f = f->next;
-	}
-
-	return camel_stream_reset(filter->source);
-}
-
diff --git a/camel/camel-stream-filter.h b/camel/camel-stream-filter.h
deleted file mode 100644
index 0bc73732ec..0000000000
--- a/camel/camel-stream-filter.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- *  Copyright (C) 2000 Helix Code Inc.
- *
- *  Authors: Michael Zucchi 
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Library General Public License
- *  as published by the Free Software Foundation; either version 2 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU Library General Public License for more details.
- *
- *  You should have received a copy of the GNU Library General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef _CAMEL_STREAM_FILTER_H
-#define _CAMEL_STREAM_FILTER_H
-
-#include 
-#include 
-
-#define CAMEL_STREAM_FILTER(obj)         GTK_CHECK_CAST (obj, camel_stream_filter_get_type (), CamelStreamFilter)
-#define CAMEL_STREAM_FILTER_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, camel_stream_filter_get_type (), CamelStreamFilterClass)
-#define IS_CAMEL_STREAM_FILTER(obj)      GTK_CHECK_TYPE (obj, camel_stream_filter_get_type ())
-
-typedef struct _CamelStreamFilterClass CamelStreamFilterClass;
-
-struct _CamelStreamFilter {
-	CamelStream parent;
-
-	CamelStream *source;
-
-	struct _CamelStreamFilterPrivate *priv;
-};
-
-struct _CamelStreamFilterClass {
-	CamelStreamClass parent_class;
-};
-
-guint			camel_stream_filter_get_type	(void);
-
-CamelStreamFilter      *camel_stream_filter_new_with_stream	(CamelStream *stream);
-
-int camel_stream_filter_add	(CamelStreamFilter *filter, CamelMimeFilter *);
-void camel_stream_filter_remove	(CamelStreamFilter *filter, int id);
-
-#endif /* ! _CAMEL_STREAM_FILTER_H */
diff --git a/camel/camel-stream-fs.c b/camel/camel-stream-fs.c
deleted file mode 100644
index 4b5a6015a4..0000000000
--- a/camel/camel-stream-fs.c
+++ /dev/null
@@ -1,310 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; fill-column: 160 -*- */
-/* camel-stream-fs.c : file system based stream */
-
-/*
- * Authors: Bertrand Guiheneuf 
- *	    Michael Zucchi 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#include 
-#include "camel-stream-fs.h"
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-static CamelSeekableStreamClass *parent_class = NULL;
-
-/* Returns the class for a CamelStreamFS */
-#define CSFS_CLASS(so) CAMEL_STREAM_FS_CLASS (GTK_OBJECT(so)->klass)
-
-static int stream_read   (CamelStream *stream, char *buffer, unsigned int n);
-static int stream_write  (CamelStream *stream, const char *buffer, unsigned int n);
-static int stream_flush  (CamelStream *stream);
-static int stream_close  (CamelStream *stream);
-static off_t stream_seek (CamelSeekableStream *stream, off_t offset,
-			  CamelStreamSeekPolicy policy);
-static void finalize (GtkObject *object);
-
-static void
-camel_stream_fs_class_init (CamelStreamFsClass *camel_stream_fs_class)
-{
-	CamelSeekableStreamClass *camel_seekable_stream_class =
-		CAMEL_SEEKABLE_STREAM_CLASS (camel_stream_fs_class);
-	CamelStreamClass *camel_stream_class =
-		CAMEL_STREAM_CLASS (camel_stream_fs_class);
-	GtkObjectClass *gtk_object_class =
-		GTK_OBJECT_CLASS (camel_stream_fs_class);
-
-	parent_class = gtk_type_class (camel_seekable_stream_get_type ());
-
-	/* virtual method overload */
-	camel_stream_class->read = stream_read;
-	camel_stream_class->write = stream_write;
-	camel_stream_class->flush = stream_flush;
-	camel_stream_class->close = stream_close;
-
-	camel_seekable_stream_class->seek = stream_seek;
-
-	gtk_object_class->finalize = finalize;
-}
-
-static void
-camel_stream_fs_init (gpointer object, gpointer klass)
-{
-	CamelStreamFs *stream = CAMEL_STREAM_FS (object);
-
-	stream->fd = -1;
-}
-
-GtkType
-camel_stream_fs_get_type (void)
-{
-	static GtkType camel_stream_fs_type = 0;
-
-	if (!camel_stream_fs_type) {
-		GtkTypeInfo camel_stream_fs_info =
-		{
-			"CamelStreamFs",
-			sizeof (CamelStreamFs),
-			sizeof (CamelStreamFsClass),
-			(GtkClassInitFunc) camel_stream_fs_class_init,
-			(GtkObjectInitFunc) camel_stream_fs_init,
-				/* reserved_1 */ NULL,
-				/* reserved_2 */ NULL,
-			(GtkClassInitFunc) NULL,
-		};
-
-		camel_stream_fs_type = gtk_type_unique (camel_seekable_stream_get_type (), &camel_stream_fs_info);
-	}
-
-	return camel_stream_fs_type;
-}
-
-static void
-finalize (GtkObject *object)
-{
-	CamelStreamFs *stream_fs = CAMEL_STREAM_FS (object);
-
-	if (stream_fs->fd != -1)
-		close (stream_fs->fd);
-
-	GTK_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-/**
- * camel_stream_fs_new_with_fd:
- * @fd: a file descriptor
- *
- * Returns a stream associated with the given file descriptor.
- * When the stream is destroyed, the file descriptor will be closed.
- *
- * Return value: the stream
- **/
-CamelStream *
-camel_stream_fs_new_with_fd (int fd)
-{
-	CamelStreamFs *stream_fs;
-	off_t offset;
-
-	stream_fs = gtk_type_new (camel_stream_fs_get_type ());
-	stream_fs->fd = fd;
-	offset = lseek (fd, 0, SEEK_CUR);
-	if (offset == -1)
-		offset = 0;
-	CAMEL_SEEKABLE_STREAM (stream_fs)->position = offset;
-
-	return CAMEL_STREAM (stream_fs);
-}
-
-/**
- * camel_stream_fs_new_with_fd_and_bounds:
- * @fd: a file descriptor
- * @start: the first valid position in the file
- * @end: the first invalid position in the file, or CAMEL_STREAM_UNBOUND
- *
- * Returns a stream associated with the given file descriptor and bounds.
- * When the stream is destroyed, the file descriptor will be closed.
- *
- * Return value: the stream
- **/
-CamelStream *
-camel_stream_fs_new_with_fd_and_bounds (int fd, off_t start, off_t end)
-{
-	CamelStream *stream;
-
-	stream = camel_stream_fs_new_with_fd (fd);
-	camel_seekable_stream_set_bounds (CAMEL_SEEKABLE_STREAM (stream), start, end);
-
-	return stream;
-}
-
-/**
- * camel_stream_fs_new_with_name:
- * @name: a local filename
- * @flags: flags as in open(2)
- * @mode: a file mode
- *
- * Creates a new CamelStream corresponding to the named file, flags,
- * and mode.
- *
- * Return value: the stream, or #NULL on error.
- **/
-CamelStream *
-camel_stream_fs_new_with_name (const char *name, int flags, mode_t mode)
-{
-	int fd;
-
-	fd = open (name, flags, mode);
-	if (fd == -1) {
-		return NULL;
-	}
-
-	return camel_stream_fs_new_with_fd (fd);
-}
-
-/**
- * camel_stream_fs_new_with_name_and_bounds:
- * @name: a local filename
- * @flags: flags as in open(2)
- * @mode: a file mode
- * @start: the first valid position in the file
- * @end: the first invalid position in the file, or CAMEL_STREAM_UNBOUND
- *
- * Creates a new CamelStream corresponding to the given arguments.
- *
- * Return value: the stream, or NULL on error.
- **/
-CamelStream *
-camel_stream_fs_new_with_name_and_bounds (const char *name, int flags,
-					  mode_t mode, off_t start, off_t end)
-{
-	CamelStream *stream;
-
-	stream = camel_stream_fs_new_with_name (name, flags, mode);
-	if (stream == NULL)
-		return NULL;
-
-	camel_seekable_stream_set_bounds (CAMEL_SEEKABLE_STREAM (stream),
-					  start, end);
-
-	return stream;
-}
-
-
-static int
-stream_read (CamelStream *stream, char *buffer, unsigned int n)
-{
-	CamelStreamFs *stream_fs = CAMEL_STREAM_FS (stream);
-	CamelSeekableStream *seekable = CAMEL_SEEKABLE_STREAM (stream);
-	int nread;
-
-	if (seekable->bound_end != CAMEL_STREAM_UNBOUND)
-		n = MIN (seekable->bound_end - seekable->position, n);
-
-	do {
-		nread = read (stream_fs->fd, buffer, n);
-	} while (nread == -1 && errno == EINTR);
-
-	if (nread > 0)
-		seekable->position += nread;
-	else if (nread == 0)
-		stream->eos = TRUE;
-
-	return nread;
-}
-
-static int
-stream_write (CamelStream *stream, const char *buffer, unsigned int n)
-{
-	CamelStreamFs *stream_fs = CAMEL_STREAM_FS (stream);
-	CamelSeekableStream *seekable = CAMEL_SEEKABLE_STREAM (stream);
-	int v, written = 0;
-
-	if (seekable->bound_end != CAMEL_STREAM_UNBOUND)
-		n = MIN (seekable->bound_end - seekable->position, n);
-
-	do {
-		v = write (stream_fs->fd, buffer, n);
-		if (v > 0)
-			written += v;
-	} while (v == -1 && errno == EINTR);
-
-	if (written > 0)
-		seekable->position += written;
-	else if (v == -1)
-		return -1;
-
-	return written;
-}
-
-static int
-stream_flush (CamelStream *stream)
-{
-	return fsync(((CamelStreamFs *)stream)->fd);
-}
-
-static int
-stream_close (CamelStream *stream)
-{
-	return close(((CamelStreamFs *)stream)->fd);
-}
-
-static off_t
-stream_seek (CamelSeekableStream *stream, off_t offset, CamelStreamSeekPolicy policy)
-{
-	CamelStreamFs *stream_fs = CAMEL_STREAM_FS (stream);
-	off_t real = 0;
-
-	switch (policy) {
-	case CAMEL_STREAM_SET:
-		real = offset;
-		break;
-	case CAMEL_STREAM_CUR:
-		real = stream->position + offset;
-		break;
-	case CAMEL_STREAM_END:
-		if (stream->bound_end != CAMEL_STREAM_UNBOUND) {
-			real = lseek(stream_fs->fd, offset, SEEK_END);
-			if (real != -1)
-				stream->position = real;
-			return real;
-		}
-		real = stream->bound_end + offset;
-		break;
-	}
-
-	if (stream->bound_end != CAMEL_STREAM_UNBOUND)
-		real = MIN (real, stream->bound_end);
-	real = MAX (real, stream->bound_start);
-
-	real = lseek(stream_fs->fd, real, SEEK_SET);
-	if (real == -1)
-		return -1;
-
-	if (real != stream->position && ((CamelStream *)stream)->eos)
-		((CamelStream *)stream)->eos = FALSE;
-
-	stream->position = real;
-
-	return real;
-}
diff --git a/camel/camel-stream-fs.h b/camel/camel-stream-fs.h
deleted file mode 100644
index 08ae49bddf..0000000000
--- a/camel/camel-stream-fs.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-stream-fs.h :stream based on unix filesystem */
-
-/*
- * Author:
- *  Bertrand Guiheneuf 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef CAMEL_STREAM_FS_H
-#define CAMEL_STREAM_FS_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include 
-
-/* for open flags */
-#include 
-#include 
-#include 
-
-#define CAMEL_STREAM_FS_TYPE     (camel_stream_fs_get_type ())
-#define CAMEL_STREAM_FS(obj)     (GTK_CHECK_CAST((obj), CAMEL_STREAM_FS_TYPE, CamelStreamFs))
-#define CAMEL_STREAM_FS_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_STREAM_FS_TYPE, CamelStreamFsClass))
-#define CAMEL_IS_STREAM_FS(o)    (GTK_CHECK_TYPE((o), CAMEL_STREAM_FS_TYPE))
-
-struct _CamelStreamFs
-{
-	CamelSeekableStream parent_object;
-
-	int fd;             /* file descriptor on the underlying file */
-};
-
-typedef struct {
-	CamelSeekableStreamClass parent_class;
-
-} CamelStreamFsClass;
-
-/* Standard Gtk function */
-GtkType camel_stream_fs_get_type (void);
-
-/* public methods */
-CamelStream * camel_stream_fs_new_with_name            (const char *name, int flags, mode_t mode);
-CamelStream * camel_stream_fs_new_with_name_and_bounds (const char *name, int flags, mode_t mode,
-							off_t start, off_t end);
-
-CamelStream * camel_stream_fs_new_with_fd              (int fd);
-CamelStream * camel_stream_fs_new_with_fd_and_bounds   (int fd, off_t start, off_t end);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_STREAM_FS_H */
diff --git a/camel/camel-stream-mem.c b/camel/camel-stream-mem.c
deleted file mode 100644
index ca384485b6..0000000000
--- a/camel/camel-stream-mem.c
+++ /dev/null
@@ -1,248 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-stream-mem.c: memory buffer based stream */
-
-/*
- * Authors: Bertrand Guiheneuf 
- *	    Michael Zucchi 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#include 
-#include "camel-stream-mem.h"
-#include 
-#include 
-#include 
-#include 
-
-static CamelStreamClass *parent_class = NULL;
-
-/* Returns the class for a CamelStreamMem */
-#define CSM_CLASS(so) CAMEL_STREAM_MEM_CLASS (GTK_OBJECT(so)->klass)
-
-static int stream_read (CamelStream *stream, char *buffer, unsigned int n);
-static int stream_write (CamelStream *stream, const char *buffer, unsigned int n);
-static gboolean stream_eos (CamelStream *stream);
-static off_t stream_seek (CamelSeekableStream *stream, off_t offset,
-			  CamelStreamSeekPolicy policy);
-
-static void finalize (GtkObject *object);
-
-static void
-camel_stream_mem_class_init (CamelStreamMemClass *camel_stream_mem_class)
-{
-	CamelSeekableStreamClass *camel_seekable_stream_class =
-		CAMEL_SEEKABLE_STREAM_CLASS (camel_stream_mem_class);
-	CamelStreamClass *camel_stream_class =
-		CAMEL_STREAM_CLASS (camel_stream_mem_class);
-	GtkObjectClass *gtk_object_class =
-		GTK_OBJECT_CLASS (camel_stream_mem_class);
-
-	parent_class = gtk_type_class (camel_stream_get_type ());
-
-	/* virtual method overload */
-	camel_stream_class->read = stream_read;
-	camel_stream_class->write = stream_write;
-	camel_stream_class->eos = stream_eos;
-
-	camel_seekable_stream_class->seek = stream_seek;
-
-	gtk_object_class->finalize = finalize;
-}
-
-static void
-camel_stream_mem_init (gpointer object, gpointer klass)
-{
-	CamelStreamMem *stream_mem = CAMEL_STREAM_MEM (object);
-
-	stream_mem->owner = FALSE;
-	stream_mem->buffer = 0;
-}
-
-GtkType
-camel_stream_mem_get_type (void)
-{
-	static GtkType camel_stream_mem_type = 0;
-
-	if (!camel_stream_mem_type) {
-		GtkTypeInfo camel_stream_mem_info =
-		{
-			"CamelStreamMem",
-			sizeof (CamelStreamMem),
-			sizeof (CamelStreamMemClass),
-			(GtkClassInitFunc) camel_stream_mem_class_init,
-			(GtkObjectInitFunc) camel_stream_mem_init,
-				/* reserved_1 */ NULL,
-				/* reserved_2 */ NULL,
-			(GtkClassInitFunc) NULL,
-		};
-
-		camel_stream_mem_type = gtk_type_unique (camel_seekable_stream_get_type (), &camel_stream_mem_info);
-	}
-
-	return camel_stream_mem_type;
-}
-
-
-CamelStream *
-camel_stream_mem_new (void)
-{
-	return camel_stream_mem_new_with_byte_array (g_byte_array_new ());
-}
-
-CamelStream *
-camel_stream_mem_new_with_buffer (const char *buffer, size_t len)
-{
-	GByteArray *ba;
-
-	ba = g_byte_array_new ();
-	g_byte_array_append (ba, (const guint8 *)buffer, len);
-	return camel_stream_mem_new_with_byte_array (ba);
-}
-
-CamelStream *
-camel_stream_mem_new_with_byte_array (GByteArray *byte_array)
-{
-	CamelStreamMem *stream_mem;
-
-	stream_mem = gtk_type_new (camel_stream_mem_get_type ());
-	stream_mem->buffer = byte_array;
-	stream_mem->owner = TRUE;
-
-	return CAMEL_STREAM (stream_mem);
-}
-
-/* note: with these functions the caller is the 'owner' of the buffer */
-void camel_stream_mem_set_byte_array (CamelStreamMem *s, GByteArray *buffer)
-{
-	if (s->buffer && s->owner)
-		g_byte_array_free(s->buffer, TRUE);
-	s->owner = FALSE;
-	s->buffer = buffer;
-}
-
-void camel_stream_mem_set_buffer (CamelStreamMem *s, const char *buffer,
-				  size_t len)
-{
-	GByteArray *ba;
-
-	ba = g_byte_array_new ();
-	g_byte_array_append (ba, (const guint8 *)buffer, len);
-	camel_stream_mem_set_byte_array(s, ba);
-}
-
-static void
-finalize (GtkObject *object)
-{
-	CamelStreamMem *stream_mem = CAMEL_STREAM_MEM (object);
-
-	if (stream_mem->buffer && stream_mem->owner)
-		g_byte_array_free (stream_mem->buffer, TRUE);
-
-	GTK_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-static int
-stream_read (CamelStream *stream, char *buffer, unsigned int n)
-{
-	CamelStreamMem *camel_stream_mem = CAMEL_STREAM_MEM (stream);
-	CamelSeekableStream *seekable = CAMEL_SEEKABLE_STREAM (stream);
-
-	if (seekable->bound_end != CAMEL_STREAM_UNBOUND)
-		n = MIN(seekable->bound_end - seekable->position, n);
-
-	n = MIN (n, camel_stream_mem->buffer->len - seekable->position);
-	if (n > 0) {
-		memcpy (buffer, camel_stream_mem->buffer->data +
-			seekable->position, n);
-		seekable->position += n;
-	} else
-		n = -1;
-
-	return n;
-}
-
-static int
-stream_write (CamelStream *stream, const char *buffer, unsigned int n)
-{
-	CamelStreamMem *stream_mem = CAMEL_STREAM_MEM (stream);
-	CamelSeekableStream *seekable = CAMEL_SEEKABLE_STREAM (stream);
-
-	if (seekable->bound_end != CAMEL_STREAM_UNBOUND)
-		n = MIN(seekable->bound_end - seekable->position, n);
-
-#warning "g_byte_arrays use g_malloc and so are totally unsuitable for this object"
-	if (seekable->position == stream_mem->buffer->len) {
-		stream_mem->buffer =
-			g_byte_array_append (stream_mem->buffer, (const guint8 *)buffer, n);
-	} else {
-		g_byte_array_set_size (stream_mem->buffer,
-				       n+stream_mem->buffer->len);
-		memcpy (stream_mem->buffer->data + seekable->position, buffer, n);
-	}
-	seekable->position += n;
-
-	return n;
-}
-
-static gboolean
-stream_eos (CamelStream *stream)
-{
-	CamelStreamMem *stream_mem = CAMEL_STREAM_MEM (stream);
-	CamelSeekableStream *seekable_stream = CAMEL_SEEKABLE_STREAM (stream);
-
-	return stream_mem->buffer->len <= seekable_stream->position;
-}
-
-static off_t
-stream_seek (CamelSeekableStream *stream, off_t offset,
-	     CamelStreamSeekPolicy policy)
-{
-	off_t position;
-	CamelStreamMem *stream_mem = CAMEL_STREAM_MEM (stream);
-
-	switch  (policy) {
-	case CAMEL_STREAM_SET:
-		position = offset;
-		break;
-	case CAMEL_STREAM_CUR:
-		position = stream->position + offset;
-		break;
-	case CAMEL_STREAM_END:
-		position = (stream_mem->buffer)->len + offset;
-		break;
-	}
-
-	if (stream->bound_end == CAMEL_STREAM_UNBOUND)
-		position = MIN (position, stream->bound_end);
-	if (stream->bound_start == CAMEL_STREAM_UNBOUND)
-		position = MAX (position, 0);
-	else
-		position = MAX (position, stream->bound_start);
-
-	if (position > stream_mem->buffer->len) {
-		int oldlen = stream_mem->buffer->len;
-		g_byte_array_set_size (stream_mem->buffer, position);
-		memset (stream_mem->buffer->data + oldlen, 0,
-			position - oldlen);
-	}
-
-	stream->position = position;
-
-	return position;
-}
diff --git a/camel/camel-stream-mem.h b/camel/camel-stream-mem.h
deleted file mode 100644
index e508644e6b..0000000000
--- a/camel/camel-stream-mem.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-stream-mem.h: stream based on memory buffer */
-
-/*
- * Authors: Bertrand Guiheneuf 
- *	    Michael Zucchi 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef CAMEL_STREAM_MEM_H
-#define CAMEL_STREAM_MEM_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include 
-#include 
-
-#define CAMEL_STREAM_MEM_TYPE     (camel_stream_mem_get_type ())
-#define CAMEL_STREAM_MEM(obj)     (GTK_CHECK_CAST((obj), CAMEL_STREAM_MEM_TYPE, CamelStreamMem))
-#define CAMEL_STREAM_MEM_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_STREAM_MEM_TYPE, CamelStreamMemClass))
-#define CAMEL_IS_STREAM_MEM(o)    (GTK_CHECK_TYPE((o), CAMEL_STREAM_MEM_TYPE))
-
-struct _CamelStreamMem
-{
-	CamelSeekableStream parent_object;
-
-	gboolean owner;		/* do we own the buffer? */
-	GByteArray *buffer;
-};
-
-typedef struct {
-	CamelSeekableStreamClass parent_class;
-
-	/* Virtual methods */
-} CamelStreamMemClass;
-
-/* Standard Gtk function */
-GtkType camel_stream_mem_get_type (void);
-
-/* public methods */
-CamelStream *camel_stream_mem_new (void);
-CamelStream *camel_stream_mem_new_with_byte_array (GByteArray *buffer);
-CamelStream *camel_stream_mem_new_with_buffer (const char *buffer, size_t len);
-
-/* these are really only here for implementing classes */
-void camel_stream_mem_set_byte_array (CamelStreamMem *, GByteArray *buffer);
-void camel_stream_mem_set_buffer (CamelStreamMem *, const char *buffer, size_t len);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_STREAM_MEM_H */
diff --git a/camel/camel-stream.c b/camel/camel-stream.c
deleted file mode 100644
index 244b6cf9d8..0000000000
--- a/camel/camel-stream.c
+++ /dev/null
@@ -1,294 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; fill-column: 160 -*- */
-/* camel-stream.c : abstract class for a stream */
-
-/*
- * Author:
- *  Bertrand Guiheneuf 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#include 
-#include "camel-stream.h"
-
-static CamelObjectClass *parent_class = NULL;
-
-/* Returns the class for a CamelStream */
-#define CS_CLASS(so) CAMEL_STREAM_CLASS (GTK_OBJECT(so)->klass)
-
-static int stream_flush   (CamelStream *stream);
-static int stream_close   (CamelStream *stream);
-static gboolean stream_eos (CamelStream *stream);
-
-
-static void
-camel_stream_class_init (CamelStreamClass *camel_stream_class)
-{
-	parent_class = gtk_type_class (camel_object_get_type ());
-
-	/* virtual method definition */
-	camel_stream_class->flush = stream_flush;
-	camel_stream_class->close = stream_close;
-	camel_stream_class->eos = stream_eos;
-}
-
-GtkType
-camel_stream_get_type (void)
-{
-	static GtkType camel_stream_type = 0;
-
-	if (!camel_stream_type)	{
-		GtkTypeInfo camel_stream_info =
-		{
-			"CamelStream",
-			sizeof (CamelStream),
-			sizeof (CamelStreamClass),
-			(GtkClassInitFunc) camel_stream_class_init,
-			(GtkObjectInitFunc) NULL,
-				/* reserved_1 */ NULL,
-				/* reserved_2 */ NULL,
-			(GtkClassInitFunc) NULL,
-		};
-
-		camel_stream_type = gtk_type_unique (camel_object_get_type (),
-						     &camel_stream_info);
-	}
-
-	return camel_stream_type;
-}
-
-/**
- * camel_stream_read:
- * @stream: a CamelStream.
- * @buffer: buffer where bytes pulled from the stream are stored.
- * @n: max number of bytes to read.
- *
- * Read at most @n bytes from the @stream object and stores them
- * in the buffer pointed at by @buffer.
- *
- * Return value: number of bytes actually read, or -1 on error and
- * set errno.
- **/
-int
-camel_stream_read (CamelStream *stream, char *buffer, unsigned int n)
-{
-	g_return_val_if_fail (CAMEL_IS_STREAM (stream), -1);
-	g_return_val_if_fail (n == 0 || buffer, -1);
-
-	return CS_CLASS (stream)->read (stream, buffer, n);
-}
-
-/**
- * camel_stream_write:
- * @stream: a CamelStream object.
- * @buffer: buffer to write.
- * @n: number of bytes to write
- *
- * Write @n bytes from the buffer pointed at by @buffer into @stream.
- *
- * Return value: the number of bytes actually written to the stream,
- * or -1 on error.
- **/
-int
-camel_stream_write (CamelStream *stream, const char *buffer, unsigned int n)
-{
-	g_return_val_if_fail (CAMEL_IS_STREAM (stream), -1);
-	g_return_val_if_fail (n == 0 || buffer, -1);
-
-	return CS_CLASS (stream)->write (stream, buffer, n);
-}
-
-
-static int
-stream_flush (CamelStream *stream)
-{
-	/* nothing */
-	return 0;
-}
-
-/**
- * camel_stream_flush:
- * @stream: a CamelStream object
- *
- * Flushes the contents of the stream to its backing store. Only meaningful
- * on writable streams.
- *
- * Return value: -1 on error.
- **/
-int
-camel_stream_flush (CamelStream *stream)
-{
-	g_return_val_if_fail (CAMEL_IS_STREAM (stream), -1);
-
-	return CS_CLASS (stream)->flush (stream);
-}
-
-
-static int
-stream_close (CamelStream *stream)
-{
-	/* nothing */
-	return 0;
-}
-
-/**
- * camel_stream_close:
- * @stream: 
- * 
- * Close a stream.
- * 
- * Return value: -1 on error.
- **/
-int
-camel_stream_close (CamelStream *stream)
-{
-	g_return_val_if_fail (CAMEL_IS_STREAM (stream), -1);
-
-	return CS_CLASS (stream)->close (stream);
-}
-
-
-static gboolean
-stream_eos (CamelStream *stream)
-{
-	return stream->eos;
-}
-
-/**
- * camel_stream_eos:
- * @stream: a CamelStream object
- *
- * Test if there are bytes left to read on the @stream object.
- *
- * Return value: %TRUE if all the contents on the stream has been read, or
- * %FALSE if information is still available.
- **/
-gboolean
-camel_stream_eos (CamelStream *stream)
-{
-	g_return_val_if_fail (CAMEL_IS_STREAM (stream), TRUE);
-
-	return CS_CLASS (stream)->eos (stream);
-}
-
-
-/**
- * camel_stream_reset: reset a stream
- * @stream: the stream object
- *
- * Reset a stream. That is, put it in a state where it can be read
- * from the beginning again. Not all streams in Camel are seekable,
- * but they must all be resettable.
- *
- * Return value: -1 on error.
- **/
-int
-camel_stream_reset (CamelStream *stream)
-{
-	g_return_val_if_fail (CAMEL_IS_STREAM (stream), -1);
-
-	return CS_CLASS (stream)->reset (stream);
-}
-
-/***************** Utility functions ********************/
-
-/**
- * camel_stream_write_string:
- * @stream: a stream object
- * @string: a string
- *
- * Writes the string to the stream.
- *
- * Return value: the number of characters output, -1 on error.
- **/
-int
-camel_stream_write_string (CamelStream *stream, const char *string)
-{
-	return camel_stream_write (stream, string, strlen (string));
-}
-
-/**
- * camel_stream_printf:
- * @stream: a stream object
- * @fmt: a printf-style format string
- *
- * This printfs the given data to @stream.
- *
- * Return value: the number of characters output, -1 on error.
- **/
-int
-camel_stream_printf (CamelStream *stream, const char *fmt, ... )
-{
-	va_list args;
-	char *string;
-	int ret;
-
-	g_return_val_if_fail (CAMEL_IS_STREAM (stream), -1);
-
-	va_start (args, fmt);
-	string = g_strdup_vprintf (fmt, args);
-	va_end (args);
-
-	if (!string)
-		return -1;
-
-	ret = camel_stream_write (stream, string, strlen (string));
-	g_free (string);
-	return ret;
-}
-
-/**
- * camel_stream_write_to_stream:
- * @stream: Source CamelStream.
- * @output_stream: Destination CamelStream.
- *
- * Write all of a stream (until eos) into another stream, in a blocking
- * fashion.
- *
- * Return value: Returns -1 on error, or the number of bytes succesfully
- * copied across streams.
- **/
-int
-camel_stream_write_to_stream (CamelStream *stream, CamelStream *output_stream)
-{
-	char tmp_buf[4096];
-	int total = 0;
-	int nb_read;
-	int nb_written;
-
-	g_return_val_if_fail (CAMEL_IS_STREAM (stream), -1);
-	g_return_val_if_fail (CAMEL_IS_STREAM (output_stream), -1);
-
-	while (!camel_stream_eos (stream)) {
-		nb_read = camel_stream_read (stream, tmp_buf, sizeof (tmp_buf));
-		if (nb_read < 0)
-			return -1;
-		else if (nb_read > 0) {
-			nb_written = 0;
-
-			while (nb_written < nb_read) {
-				int len = camel_stream_write (output_stream, tmp_buf + nb_written, nb_read - nb_written);
-				if (len < 0)
-					return -1;
-				nb_written += len;
-			}
-			total += nb_written;
-		}
-	}
-	return total;
-}
diff --git a/camel/camel-stream.h b/camel/camel-stream.h
deleted file mode 100644
index 44562b3321..0000000000
--- a/camel/camel-stream.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; fill-column: 160 -*- */
-/* camel-stream.h : class for an abstract stream */
-
-/*
- * Author:
- *  Bertrand Guiheneuf 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef CAMEL_STREAM_H
-#define CAMEL_STREAM_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include 
-#include 
-
-#define CAMEL_STREAM_TYPE     (camel_stream_get_type ())
-#define CAMEL_STREAM(obj)     (GTK_CHECK_CAST((obj), CAMEL_STREAM_TYPE, CamelStream))
-#define CAMEL_STREAM_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_STREAM_TYPE, CamelStreamClass))
-#define CAMEL_IS_STREAM(o)    (GTK_CHECK_TYPE((o), CAMEL_STREAM_TYPE))
-
-struct _CamelStream
-{
-	CamelObject parent_object;
-
-	gboolean eos;
-};
-
-typedef struct {
-	CamelObjectClass parent_class;
-
-	/* Virtual methods */
-
-	int       (*read)       (CamelStream *stream, char *buffer, unsigned int n);
-	int       (*write)      (CamelStream *stream, const char *buffer, unsigned int n);
-	int       (*close)      (CamelStream *stream);
-	int       (*flush)      (CamelStream *stream);
-	gboolean  (*eos)        (CamelStream *stream);
-	int       (*reset)      (CamelStream *stream);
-
-} CamelStreamClass;
-
-/* Standard Gtk function */
-GtkType camel_stream_get_type (void);
-
-/* public methods */
-int        camel_stream_read       (CamelStream *stream, char *buffer, unsigned int n);
-int        camel_stream_write      (CamelStream *stream, const char *buffer, unsigned int n);
-int        camel_stream_flush      (CamelStream *stream);
-int        camel_stream_close      (CamelStream *stream);
-gboolean   camel_stream_eos        (CamelStream *stream);
-int        camel_stream_reset      (CamelStream *stream);
-
-/* utility macros and funcs */
-int camel_stream_write_string (CamelStream *stream, const char *string);
-int camel_stream_printf (CamelStream *stream, const char *fmt, ... ) G_GNUC_PRINTF (2, 3);
-int camel_stream_vprintf (CamelStream *stream, const char *fmt, va_list ap);
-
-/* Write a whole stream to another stream, until eof or error on
- * either stream.
- */
-int camel_stream_write_to_stream (CamelStream *stream, CamelStream *output_stream);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_STREAM_H */
diff --git a/camel/camel-thread-proxy.c b/camel/camel-thread-proxy.c
deleted file mode 100644
index 9553499e8f..0000000000
--- a/camel/camel-thread-proxy.c
+++ /dev/null
@@ -1,514 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-folder-pt-proxy.c : proxy folder using posix threads */
-
-/* 
- *
- * Author : 
- *  Bertrand Guiheneuf 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-
-#include 
-#include "camel-marshal-utils.h"
-#include "camel-thread-proxy.h"
-#include 
-#include 
-#include 
-#include 
-
-
-
-/* vocabulary: 
- *  operation: commanded by the main thread, executed by the child thread
- *  callback: commanded by the child thread, generally when an operation is 
- *    completed. Executed in the main thread, 
- */
-
-/* needed for proper casts of async funcs when 
- * calling pthreads_create
- */
-typedef void * (*thread_call_func) (void *);
-
-/* forward declarations */
-static gboolean  
-_thread_notification_catch (GIOChannel *source,
-			    GIOCondition condition,
-			    gpointer data);
-
-static void
-_notify_availability (CamelThreadProxy *proxy, gchar op_name);
-
-static int
-_init_notify_system (CamelThreadProxy *proxy);
-
-
-
-/**
- * camel_thread_proxy_new: create a new proxy object
- *  
- * Create a new proxy object. This proxy object can be used 
- * to run async operations and this operations can trigger 
- * callbacks. It can also be used to proxy signals.
- * 
- * Return value: The newly created proxy object
- **/
-CamelThreadProxy *
-camel_thread_proxy_new (void)
-{
-	CamelThreadProxy *proxy;
-	
-	proxy = g_new (CamelThreadProxy, 1);
-	if (!proxy)
-		return NULL;
-
-	proxy->server_op_queue = camel_op_queue_new ();
-	proxy->client_op_queue = camel_op_queue_new ();
-	proxy->signal_data_cond = g_cond_new();
-	proxy->signal_data_mutex = g_mutex_new();
-	if (_init_notify_system (proxy) < 0) {
-		g_free (proxy);
-		return NULL;
-	}
-	return proxy;
-}
-
-
-/**
- * camel_thread_proxy_free: free a proxy object
- * @proxy: proxy object to free
- * 
- * free a proxy object
- **/
-void 
-camel_thread_proxy_free (CamelThreadProxy *proxy)
-{
-	g_cond_free (proxy->signal_data_cond);
-	g_mutex_free (proxy->signal_data_mutex);
-	camel_op_queue_free (proxy->server_op_queue);
-	camel_op_queue_free (proxy->client_op_queue);
-}
-
-
-
-
-
-/* Operations handling */
-
-
-/**
- * _op_run_free_notify:
- * @folder: folder to notify when the operation is completed. 
- * @op: operation to run. 
- * 
- * run an operation, free the operation field
- * and then notify the main thread of the op
- * completion.
- * 
- * this routine is intended to be called 
- * in a new thread (in _run_next_op_in_thread)
- * 
- **/
-void
-_op_run_free_and_notify (CamelOp *op)
-{
-	CamelThreadProxy *th_proxy;
-	
-	camel_op_run (op);
-	camel_op_free (op);
-	th_proxy = camel_op_get_user_data (op);
-	_notify_availability (th_proxy, 'a');
-}
-
-
-/**
- * _run_next_op_in_thread:  
- * @proxy_object: 
- * 
- * run the next operation pending in the proxy 
- * operation queue
- **/
-static void 
-_run_next_op_in_thread (CamelThreadProxy *proxy)
-{
-	CamelOp *op;
-	CamelOpQueue *server_op_queue;
-	pthread_t thread;
-
-	server_op_queue = proxy->server_op_queue;
-	/* get the next pending operation */
-	op = camel_op_queue_pop_op (server_op_queue);
-	if (!op) {
-		camel_op_queue_set_service_availability (server_op_queue, TRUE);
-		return;
-	}
-	
-	/* run the operation in a child thread */
-	pthread_create (&thread, NULL, (thread_call_func) _op_run_free_and_notify, op);
-}
-
-
-
-/**
- * camel_thread_proxy_push_op: push an operation in the proxy operation queue
- * @proxy: proxy object 
- * @op: operation to push in the execution queue
- * 
- * if no thread is currently running, executes the 
- * operation directly, otherwise push the operation 
- * in the proxy operation queue.
- **/
-void 
-camel_thread_proxy_push_op (CamelThreadProxy *proxy, CamelOp *op)
-{
-	CamelOpQueue *server_op_queue;
-	
-	g_assert (proxy);
-	server_op_queue = proxy->server_op_queue;
-	
-	/* put the proxy object in the user data
-	   so that it can be notified when the 
-	   operation is completed */
-	camel_op_set_user_data (op, (gpointer)proxy);
-	
-	/* get next operation */
-	camel_op_queue_push_op (server_op_queue, op);
-	
-	if (camel_op_queue_get_service_availability (server_op_queue)) {
-		/* no thread is currently running, run 
-		 * the next operation. */
-		camel_op_queue_set_service_availability (server_op_queue, FALSE);
-		/* when the operation is completed in the 
-		   child thread the main thread gets 
-		   notified and executes next operation 
-		   (see _thread_notification_catch, case 'a')
-		   so there is no need to set the service
-		   availability to FALSE except here 
-		*/
-		_run_next_op_in_thread (proxy);		
-	}
-}
-/**
- * _op_run_and_free: Run an operation and free it
- * @op: Operation object
- * 
- * Run an operation object in the current thread 
- * and free it.
- **/
-static void
-_op_run_and_free (CamelOp *op)
-{
-	camel_op_run (op);
-	camel_op_free (op);
-}
-
-
-
-
-
-
-/* Callbacks handling */
-
-/**
- * _run_next_cb: Run next callback pending in a proxy object 
- * @proxy: Proxy object 
- * 
- * Run next callback in the callback queue of a proxy object 
- **/
-static void 
-_run_next_cb (CamelThreadProxy *proxy)
-{
-	CamelOp *op;
-	CamelOpQueue *client_op_queue;
-
-	client_op_queue = proxy->client_op_queue;
-
-	/* get the next pending operation */
-	op = camel_op_queue_pop_op (client_op_queue);
-	if (!op) return;
-	
-	/* run the operation in the main thread */
-	_op_run_and_free (op);
-}
-
-
-/**
- * camel_thread_proxy_push_cb: push a callback in the client queue
- * @proxy: proxy object concerned by the callback
- * @cb: callback to push
- * 
- * Push an operation in the client queue, ie the queue 
- * containing the operations (callbacks) intended to be
- * executed in the main thread.
- **/
-void 
-camel_thread_proxy_push_cb (CamelThreadProxy *proxy, CamelOp *cb)
-{
-	CamelOpQueue *client_op_queue;
-	
-	client_op_queue = proxy->client_op_queue;
-
-	/* put the proxy object in the user data
-	   so that it can be notified when the 
-	   operation is completed */
-	camel_op_set_user_data (cb, (gpointer)proxy);
-	
-	/* push the callback in the client queue */
-	camel_op_queue_push_op (client_op_queue, cb);
-	
-	/* tell the main thread a new callback is there */
-	_notify_availability (proxy, 'c');
-}  
-
-
-
-/**
- * _init_notify_system: set the notify channel up
- * @proxy: proxy object 
- * 
- * called once to set the notification channel up
- **/
-static int
-_init_notify_system (CamelThreadProxy *proxy)
-{
-	int filedes[2];
-
-	/* set up the notification channel */
-	if (pipe (filedes) < 0) {
-		g_warning ("could not create pipe in "
-			   "CamelThreadProxy::_init_notify_system\n");
-		return -1;
-	}
-	
-	
-	proxy->pipe_client_fd = filedes [0];
-	proxy->pipe_server_fd = filedes [1];
-	proxy->notify_source =  g_io_channel_unix_new (filedes [0]);
-	proxy->notify_channel =  g_io_channel_unix_new (filedes [1]);
-	
-	/* the _thread_notification_catch function 
-	* will be called in the main thread when the 
-	* child thread writes some data in the channel */ 
-	g_io_add_watch (proxy->notify_source, G_IO_IN,
-			_thread_notification_catch, 
-			proxy);
-	
-	return 1;
-}
-
-/**
- * _notify_availability: notify the main thread from an event
- * @proxy: proxy object
- * @op_name: operation name
- *
- * called by child thread  to notify the main 
- * thread  something is available for him.
- * What this thing is depends on  @op_name:
- *
- * 'a' : thread available. That means the thread is ready 
- *       to process an operation. 
- * 's' : a signal is available. Used by the signal proxy.
- *
- */
-static void
-_notify_availability (CamelThreadProxy *proxy, gchar op_name)
-{
-	GIOChannel *notification_channel;
-	guint bytes_written;
-
-	notification_channel = proxy->notify_channel;	
-
-	do {
-		/* the write operation will trigger the
-		 * watch on the main thread side */
-		g_io_channel_write  (notification_channel,
-				     &op_name,
-				     1,
-				     &bytes_written);	
-	} while (bytes_written < 1);
-}
-
-
-
-/* signal proxying */
-
-
-
-/**
- * _signal_marshaller_server_side: called in the child thread to proxy a signal    
- * @object: 
- * @data: 
- * @n_args: 
- * @args: 
- * 
- * 
- **/
-static void
-_signal_marshaller_server_side (GtkObject *object,
-				gpointer data,
-				guint n_args,
-				GtkArg *args)
-{
-	CamelThreadProxy *proxy;
-	guint signal_id;
-	
-	proxy = CAMEL_THREAD_PROXY (gtk_object_get_data (object, "__proxy__"));
-	signal_id = (guint)data;
-	g_assert (proxy);
-
-	g_mutex_lock (proxy->signal_data_mutex);
-	
-	/* we are going to wait for the main client thread 
-	 * to have emitted the last signal we asked him
-	 * to proxy.
-	 */
-	while (proxy->signal_data.args)
-		g_cond_wait (proxy->signal_data_cond,
-			     proxy->signal_data_mutex);
-
-	proxy->signal_data.signal_id = signal_id;
-	proxy->signal_data.args = args;
-
-	
-	g_mutex_unlock (proxy->signal_data_mutex);
-
-	/* tell the main thread there is a signal pending */
-	_notify_availability (proxy, 's');
-}
-
-
-static void
-_signal_marshaller_client_side (CamelThreadProxy *proxy)
-{
-	g_mutex_lock (proxy->signal_data_mutex);
-	g_assert (proxy->signal_data.args);
-	
-	/* emit the pending signal */
-	gtk_signal_emitv (GTK_OBJECT (proxy), 
-			  proxy->signal_data.signal_id,
-			  proxy->signal_data.args);
-
-	proxy->signal_data.args = NULL;
-
-	/* if waiting for the signal to be treated,
-	 * awake the client thread up 
-	 */ 
-	g_cond_signal (proxy->signal_data_cond);
-	g_mutex_unlock (proxy->signal_data_mutex);	
-}
-
-
-/**
- * camel_thread_proxy_add_signals: init the signal proxy
- * @proxy: proxy 
- * @proxy_object: Proxy Gtk Object 
- * @real_object: Real Gtk Object 
- * @signal_to_proxy: NULL terminated array of signal name 
- * 
- * Add some signals to the list of signals to be 
- * proxied by the proxy object.
- * The signals emitted by the real object in the child
- * thread are reemited by the proxy object in the 
- * main thread.
- **/
-void 
-camel_thread_proxy_add_signals (CamelThreadProxy *proxy, 
-				GtkObject *proxy_object,
-				GtkObject *real_object,
-				char *signal_to_proxy[])
-{
-	guint i;
- 
-	for (i=0; signal_to_proxy[i]; i++) {
-		/* connect the signal to the signal marshaller
-		 * user_data is the signal id */
-		gtk_signal_connect_full (GTK_OBJECT (real_object),
-					 signal_to_proxy[i],
-					 NULL,
-					 _signal_marshaller_server_side,
-					 (gpointer)gtk_signal_lookup (signal_to_proxy[i], 
-								      GTK_OBJECT_CLASS (real_object)->type),
-					 NULL,
-					 TRUE,
-					 FALSE);
-	}
-}
-
-/****   catch notification from child thread ****/
-/**
- * _thread_notification_catch: call by glib loop when data is available on the thread io channel
- * @source: 
- * @condition: 
- * @data: 
- * 
- * called by watch set on the IO channel
- * 
- * Return value: TRUE because we don't want the watch to be removed
- **/
-static gboolean  
-_thread_notification_catch (GIOChannel *source,
-			    GIOCondition condition,
-			    gpointer data)
-{
-	CamelThreadProxy *proxy = CAMEL_THREAD_PROXY (data);	
-	gchar op_name;
-	guint bytes_read;
-	GIOError error;
-
-	error = g_io_channel_read (source,
-				   &op_name,
-				   1,
-				   &bytes_read);
-	
-	while ((!error) && (bytes_read == 1)) {
-		
-		switch (op_name) { 		
-		case 'a': /* the thread is OK for a new operation */
-			_run_next_op_in_thread (proxy);		
-			break;
-		case 's': /* there is a pending signal to proxy */
-			_signal_marshaller_client_side (proxy);
-			break;
-		case 'c': /* there is a cb pending in the main thread */
-			_run_next_cb (proxy);
-			break;
-		}
-		
-		error = g_io_channel_read (source,
-					   &op_name,
-					   1,
-					   &bytes_read);
-
-	}
-
-	/* do not remove the io watch */
-	return TRUE;
-}
-
-
-
-
-
-
-
-
-
-
-
diff --git a/camel/camel-thread-proxy.h b/camel/camel-thread-proxy.h
deleted file mode 100644
index 050d8ed598..0000000000
--- a/camel/camel-thread-proxy.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-folder-pt-proxy.h : proxy folder using posix threads */
-
-/* 
- *
- * Author : 
- *  Bertrand Guiheneuf 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-
-
-
-#ifndef CAMEL_THREAD_PROXY_H
-#define CAMEL_THREAD_PROXY_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include 
-
-#define CAMEL_THREAD_PROXY(o)  (CamelThreadProxy *)(o)
-
-
-typedef struct {
-	guint signal_id;
-	GtkArg *args;
-} CamelThreadProxySignalData;
-
-
-typedef struct {
-
-	GtkObject *real_object;
-	GtkObject *proxy_object;
-	
-	CamelOpQueue *server_op_queue;
-	CamelOpQueue *client_op_queue;
-
-  
-	gint pipe_client_fd;
-	gint pipe_server_fd;
-	GIOChannel *notify_source;
-	GIOChannel *notify_channel;
-
-	/* signal proxy */
-	GMutex *signal_data_mutex;
-	GCond *signal_data_cond;
-	CamelThreadProxySignalData signal_data;
-
-} CamelThreadProxy;
-
-
-CamelThreadProxy *camel_thread_proxy_new (void);
-void camel_thread_proxy_free (CamelThreadProxy *proxy);
-
-void camel_thread_proxy_push_op (CamelThreadProxy *proxy, CamelOp *op);
-void camel_thread_proxy_push_cb (CamelThreadProxy *proxy, CamelOp *cb);
-
-void camel_thread_proxy_add_signals (CamelThreadProxy *proxy, 
-				     GtkObject *proxy_object,
-				     GtkObject *real_object,
-				     char *signal_to_proxy[]);
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_THREAD_PROXY_H */
-
-
diff --git a/camel/camel-transport.c b/camel/camel-transport.c
deleted file mode 100644
index 849248a6e7..0000000000
--- a/camel/camel-transport.c
+++ /dev/null
@@ -1,110 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-transport.c : Abstract class for an email transport */
-
-/* 
- *
- * Author : 
- *  Dan Winship 
- *
- * Copyright 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-#include 
-#include "camel-transport.h"
-#include "camel-exception.h"
-
-/* Returns the class for a CamelTransport */
-#define CT_CLASS(so) CAMEL_TRANSPORT_CLASS (GTK_OBJECT(so)->klass)
-
-GtkType
-camel_transport_get_type (void)
-{
-	static GtkType camel_transport_type = 0;
-	
-	if (!camel_transport_type)	{
-		GtkTypeInfo camel_transport_info =	
-		{
-			"CamelTransport",
-			sizeof (CamelTransport),
-			sizeof (CamelTransportClass),
-			(GtkClassInitFunc) NULL,
-			(GtkObjectInitFunc) NULL,
-				/* reserved_1 */ NULL,
-				/* reserved_2 */ NULL,
-			(GtkClassInitFunc) NULL,
-		};
-		
-		camel_transport_type = gtk_type_unique (CAMEL_SERVICE_TYPE, &camel_transport_info);
-	}
-	
-	return camel_transport_type;
-}
-
-
-/**
- * camel_transport_can_send: Determine if a message is send-able on a transport
- * @transport: the transport
- * @message: the message
- *
- * Determines if a CamelMedium is of an appropriate subclass to send
- * via the given @transport. (Mail transports are not able to send
- * netnews articles, and vice versa.)
- *
- * Return value: TRUE or FALSE
- **/
-gboolean
-camel_transport_can_send (CamelTransport *transport, CamelMedium *message)
-{
-	return CT_CLASS (transport)->can_send (transport, message);
-}
-
-/**
- * camel_transport_send: Send a message via a transport
- * @transport: the transport
- * @message: the message
- * @ex: a CamelException
- *
- * Sends the message to the recipients indicated in the message.
- *
- * Return value: success or failure.
- **/
-gboolean
-camel_transport_send (CamelTransport *transport, CamelMedium *message,
-		      CamelException *ex)
-{
-	return CT_CLASS (transport)->send (transport, message, ex);
-}
-
-/**
- * camel_transport_send_to: Send a message non-standard recipients
- * @transport: the transport
- * @message: the message
- * @recipients: the recipients
- * @ex: a CamelException
- *
- * Sends the message to the given recipients, rather than to the
- * recipients indicated in the message.
- *
- * Return value: success or failure.
- **/
-gboolean
-camel_transport_send_to (CamelTransport *transport, CamelMedium *message,
-			 GList *recipients, CamelException *ex)
-{
-	return CT_CLASS (transport)->send_to (transport, message,
-					      recipients, ex);
-}
diff --git a/camel/camel-transport.h b/camel/camel-transport.h
deleted file mode 100644
index fc8f0e3076..0000000000
--- a/camel/camel-transport.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-transport.h : Abstract class for an email transport */
-
-/* 
- *
- * Author : 
- *  Dan Winship 
- *
- * Copyright 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef CAMEL_TRANSPORT_H
-#define CAMEL_TRANSPORT_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include 
-
-#define CAMEL_TRANSPORT_TYPE     (camel_transport_get_type ())
-#define CAMEL_TRANSPORT(obj)     (GTK_CHECK_CAST((obj), CAMEL_TRANSPORT_TYPE, CamelTransport))
-#define CAMEL_TRANSPORT_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_TRANSPORT_TYPE, CamelTransportClass))
-#define CAMEL_IS_TRANSPORT(o)    (GTK_CHECK_TYPE((o), CAMEL_TRANSPORT_TYPE))
-
-
-struct _CamelTransport
-{
-	CamelService parent_object;
-
-};
-
-
-
-typedef struct {
-	CamelServiceClass parent_class;
-
-	gboolean (*can_send) (CamelTransport *transport, CamelMedium *message);
-	gboolean (*send) (CamelTransport *transport, CamelMedium *message,
-			  CamelException *ex);
-	gboolean (*send_to) (CamelTransport *transport,
-			     CamelMedium *message, GList *recipients,
-			     CamelException *ex);
-} CamelTransportClass;
-
-
-/* public methods */
-gboolean camel_transport_can_send (CamelTransport *transport,
-				   CamelMedium *message);
-
-gboolean camel_transport_send (CamelTransport *transport,
-			       CamelMedium *message,
-			       CamelException *ex);
-
-gboolean camel_transport_send_to (CamelTransport *transport,
-				  CamelMedium *message,
-				  GList *recipients,
-				  CamelException *ex);
-
-/* Standard Gtk function */
-GtkType camel_transport_get_type (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_TRANSPORT_H */
diff --git a/camel/camel-types.h b/camel/camel-types.h
deleted file mode 100644
index 706440b64d..0000000000
--- a/camel/camel-types.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/* 
- * Copyright 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#ifndef CAMEL_TYPES_H
-#define CAMEL_TYPES_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-typedef struct _CamelAddress CamelAddress;
-typedef struct _CamelDataWrapper CamelDataWrapper;
-typedef struct _CamelException CamelException;
-typedef struct _CamelFolder CamelFolder;
-typedef struct _CamelFolderSearch CamelFolderSearch;
-typedef struct _CamelFolderSummary CamelFolderSummary;
-typedef struct _CamelInternetAddress CamelInternetAddress;
-typedef struct _CamelMedium CamelMedium;
-typedef struct _CamelMimeFilter CamelMimeFilter;
-typedef struct _CamelMimeFilterBasic CamelMimeFilterBasic;
-typedef struct _CamelMimeFilterCharset CamelMimeFilterCharset;
-typedef struct _CamelMimeFilterIndex CamelMimeFilterIndex;
-typedef struct _CamelMimeFilterSave CamelMimeFilterSave;
-typedef struct _CamelMimeMessage CamelMimeMessage;
-typedef struct _CamelMimeParser CamelMimeParser;
-typedef struct _CamelMimePart CamelMimePart;
-typedef struct _CamelMultipart CamelMultipart;
-typedef struct _CamelNewsAddress CamelNewsAddress;
-typedef struct _CamelObject CamelObject;
-typedef struct _CamelSeekableStream CamelSeekableStream;
-typedef struct _CamelSeekableSubstream CamelSeekableSubstream;
-typedef struct _CamelService CamelService;
-typedef struct _CamelSession CamelSession;
-typedef struct _CamelSimpleDataWrapper CamelSimpleDataWrapper;
-typedef struct _CamelStore CamelStore;
-typedef struct _CamelStream CamelStream;
-typedef struct _CamelStreamBuffer CamelStreamBuffer;
-typedef struct _CamelStreamDataWrapper CamelStreamDataWrapper;
-typedef struct _CamelStreamFilter CamelStreamFilter;
-typedef struct _CamelStreamFs CamelStreamFs;
-typedef struct _CamelStreamMem CamelStreamMem;
-typedef struct _CamelTransport CamelTransport;
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_TYPES_H */
diff --git a/camel/camel-url.c b/camel/camel-url.c
deleted file mode 100644
index 96721bda24..0000000000
--- a/camel/camel-url.c
+++ /dev/null
@@ -1,294 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-url.c : utility functions to parse URLs */
-
-
-/* 
- * Authors:
- *  Bertrand Guiheneuf 
- *  Dan Winship 
- *  Tiago Antào 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#include 
-
-#include 
-#include 
-#include 
-#include 
-#include "camel-url.h"
-#include "camel-exception.h"
-
-/**
- * camel_url_new: create a CamelURL object from a string
- * @url_string: The string containing the URL to scan
- * 
- * This routine takes a string and parses it as a URL of the form:
- *
- *   protocol://user;AUTH=mech:password@host:port/path
- *
- * The protocol, followed by a ":" is required. If it is followed by
- * "//", there must be an "authority" containing at least a host,
- * which ends at the end of the string or at the next "/". If there
- * is an "@" in the authority, there must be a username before it,
- * and the host comes after it. The authmech, password, and port are
- * optional, and the punctuation that preceeds them is omitted if
- * they are. Everything after the authority (or everything after the
- * protocol if there was no authority) is the path. We consider the
- * "/" between the authority and the path to be part of the path,
- * although this is incorrect according to RFC 1738.
- *
- * The port, if present, must be numeric.
- * 
- * If nothing but the protocol (and the ":") is present, the "empty"
- * flag will be set on the returned URL.
- *
- * Return value: a CamelURL structure containing the URL items.
- **/
-CamelURL *
-camel_url_new (const char *url_string, CamelException *ex)
-{
-	CamelURL *url;
-	char *semi, *colon, *at, *slash;
-	char *p;
-
-	/* Find protocol: initial substring until ":" */
-	colon = strchr (url_string, ':');
-	if (!colon) {
-		camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_URL_INVALID,
-				      "URL string `%s' contains no protocol",
-				      url_string);
-		return NULL;
-	}
-
-	url = g_new0 (CamelURL, 1);
-	url->protocol = g_strndup (url_string, colon - url_string);
-	g_strdown (url->protocol);
-
-	/* Check protocol */
-	p = url->protocol;
-	while (*p) {
-		if (!((*p >= 'a' && *p <= 'z') ||
-		      (*p == '-') || (*p == '+') || (*p == '.'))) {
-			camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_URL_INVALID,
-					      "URL string `%s' contains an invalid protocol",
-					      url_string);
-			return NULL;
-		}
-		p++;
-	}
-
-	if (strncmp (colon, "://", 3) != 0) {
-		if (*(colon + 1)) {
-			url->path = g_strdup (colon + 1);
-			camel_url_decode (url->path);
-		} else
-			url->empty = TRUE;
-		return url;
-	}
-
-	url_string = colon + 3;
-
-	/* If there is an @ sign in the authority, look for user,
-	 * authmech, and password before it.
-	 */
-	slash = strchr (url_string, '/');
-	at = strchr (url_string, '@');
-	if (at && (!slash || at < slash)) {
-		colon = strchr (url_string, ':');
-		if (colon && colon < at) {
-			url->passwd = g_strndup (colon + 1, at - colon - 1);
-			camel_url_decode (url->passwd);
-		} else {
-			url->passwd = NULL;
-			colon = at;
-		}
-
-		semi = strchr(url_string, ';');
-		if (semi && (semi < colon || (!colon && semi < at)) &&
-		    !strncasecmp (semi, ";auth=", 6)) {
-			url->authmech = g_strndup (semi + 6,
-						     colon - semi - 6);
-			camel_url_decode (url->authmech);
-		} else {
-			url->authmech = NULL;
-			semi = colon;
-		}
-
-		url->user = g_strndup (url_string, semi - url_string);
-		camel_url_decode (url->user);
-		url_string = at + 1;
-	} else
-		url->user = url->passwd = url->authmech = NULL;
-
-	/* Find host and port. */
-	slash = strchr (url_string, '/');
-	colon = strchr (url_string, ':');
-	if (slash && colon > slash)
-		colon = NULL;
-
-	if (colon) {
-		url->host = g_strndup (url_string, colon - url_string);
-		url->port = strtoul (colon + 1, &colon, 10);
-		if (*colon && colon != slash) {
-			camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_URL_INVALID,
-					      "Port number in URL `%s' is non-"
-					      "numeric", url_string);
-			camel_url_free (url);
-			return NULL;
-		}
-	} else if (slash) {
-		url->host = g_strndup (url_string, slash - url_string);
-		camel_url_decode (url->host);
-		url->port = 0;
-	} else {
-		url->host = g_strdup (url_string);
-		camel_url_decode (url->host);
-		url->port = 0;
-	}
-
-	if (!slash)
-		slash = "/";
-	url->path = g_strdup (slash);
-	camel_url_decode (url->path);
-
-	return url;
-}
-
-char *
-camel_url_to_string (CamelURL *url, gboolean show_passwd)
-{
-	char *return_result;
-	char *user = NULL, *authmech = NULL, *passwd = NULL;
-	char *host = NULL, *path = NULL;
-	char port[20];
-
-	if (url->user)
-		user = camel_url_encode (url->user, TRUE, ":;@/");
-	if (url->authmech)
-		authmech = camel_url_encode (url->authmech, TRUE, ":@/");
-	if (show_passwd && url->passwd)
-		passwd = camel_url_encode (url->passwd, TRUE, "@/");
-	if (url->host)
-		host = camel_url_encode (url->host, TRUE, ":/");
-	if (url->port)
-		g_snprintf (port, sizeof (port), "%d", url->port);
-	else
-		*port = '\0';
-	if (url->path)
-		path = camel_url_encode (url->path, FALSE, NULL);
-
-	return_result = g_strdup_printf ("%s:%s%s%s%s%s%s%s%s%s%s%s",
-				url->protocol,
-				host ? "//" : "",
-				user ? user : "",
-				authmech ? ";auth=" : "",
-				authmech ? authmech : "",
-				passwd ? ":" : "",
-				passwd ? passwd : "",
-				user ? "@" : "",
-				host ? host : "",
-				*port ? ":" : "",
-				port,
-				path ? path : "");
-	g_free (user);
-	g_free (authmech);
-	g_free (passwd);
-	g_free (host);
-	g_free (path);
-
-	return return_result;
-}
-
-void
-camel_url_free (CamelURL *url)
-{
-	g_assert (url);
-
-	g_free (url->protocol);
-	g_free (url->user);
-	g_free (url->authmech);
-	g_free (url->passwd);
-	g_free (url->host);
-	g_free (url->path);
-
-	g_free (url);
-}
-
-
-/**
- * camel_url_encode:
- * @part: a URL part
- * @escape_unsafe: whether or not to %-escape "unsafe" characters.
- * ("%#<>{}|\^~[]`)
- * @escape_extra: additional characters to escape.
- *
- * This %-encodes the given URL part and returns the escaped version
- * in allocated memory, which the caller must free when it is done.
- **/
-char *
-camel_url_encode (char *part, gboolean escape_unsafe, char *escape_extra)
-{
-	char *work, *p;
-
-	/* worst case scenario = 3 times the initial */
-	p = work = g_malloc (3 * strlen (part) + 1);
-
-	while (*part) {
-		if (((guchar) *part >= 127) || ((guchar) *part <= ' ') ||
-		    (escape_unsafe && strchr ("\"%#<>{}|\\^~[]`", *part)) ||
-		    (escape_extra && strchr (escape_extra, *part))) {
-			sprintf (p, "%%%.02hX", (guchar) *part++);
-			p += 3;
-		} else
-			*p++ = *part++;
-	}
-	*p = '\0';
-
-	return work;
-}
-
-#define HEXVAL(c) (isdigit (c) ? (c) - '0' : tolower (c) - 'a' + 10)
-
-/**
- * camel_url_decode:
- * @part: a URL part
- *
- * %-decodes the passed-in URL *in place*. The decoded version is
- * never longer than the encoded version, so there does not need to
- * be any additional space at the end of the string.
- */
-void
-camel_url_decode (char *part)
-{
-	guchar *s, *d;
-
-	s = d = (guchar *)part;
-	while (*s) {
-		if (*s == '%') {
-			if (isxdigit (s[1]) && isxdigit (s[2])) {
-				*d++ = HEXVAL (s[1]) * 16 + HEXVAL (s[2]);
-				s += 3;
-			} else
-				*d++ = *s++;
-		} else
-			*d++ = *s++;
-	}
-	*d = '\0';
-}
diff --git a/camel/camel-url.h b/camel/camel-url.h
deleted file mode 100644
index f2a4c645f5..0000000000
--- a/camel/camel-url.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-url.h : utility functions to parse URLs */
-
-/* 
- * Authors:
- *  Bertrand Guiheneuf 
- *  Dan Winship 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef CAMEL_URL_H
-#define CAMEL_URL_H 1
-
-#include 
-#include 
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-typedef struct {
-	char *protocol;
-	char *user;
-	char *authmech;
-	char *passwd;
-	char *host;
-	int   port;
-	char *path;
-
-	/* This is set if the URL contained only a protocol. */
-	gboolean empty;
-} CamelURL;
-
-CamelURL *camel_url_new (const char *url_string, CamelException *ex);
-char *camel_url_to_string (CamelURL *url, gboolean show_password);
-void camel_url_free (CamelURL *url);
-
-char *camel_url_encode (char *part, gboolean escape_unsafe,
-			char *escape_extra);
-void camel_url_decode (char *part);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-#endif /* URL_UTIL_H */
diff --git a/camel/camel.c b/camel/camel.c
deleted file mode 100644
index 0121c1082f..0000000000
--- a/camel/camel.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/* 
- *
- * Author : 
- *  Bertrand Guiheneuf 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#include 
-#include "camel.h"
-#include 
-
-gint
-camel_init(void)
-{
-
-
-#ifdef ENABLE_THREADS
-#ifdef G_THREADS_ENABLED	
-	g_thread_init (NULL);
-#else  /* G_THREADS_ENABLED */
-	printf ("Threads are not supported by your version of glib\n");
-#endif /* G_THREADS_ENABLED */
-#endif /* ENABLE_THREADS */
-
-	unicode_init ();
-
-	return 0;
-}
diff --git a/camel/camel.h b/camel/camel.h
deleted file mode 100644
index d3a65b1312..0000000000
--- a/camel/camel.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/* 
- *
- * Author : 
- *  Bertrand Guiheneuf 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef CAMEL_H
-#define CAMEL_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-gint camel_init (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_H */
diff --git a/camel/devel-docs/camel_stream.dia b/camel/devel-docs/camel_stream.dia
deleted file mode 100644
index d91d1bb153..0000000000
Binary files a/camel/devel-docs/camel_stream.dia and /dev/null differ
diff --git a/camel/gmime-content-field.c b/camel/gmime-content-field.c
deleted file mode 100644
index 4d38314873..0000000000
--- a/camel/gmime-content-field.c
+++ /dev/null
@@ -1,237 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* mime-content_field.c : mime content type field utilities  */
-
-/* 
- *
- * Author : 
- *  Bertrand Guiheneuf 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#include 
-#include "gmime-content-field.h"
-#include "string-utils.h"
-#include 
-#include "camel-mime-utils.h"
-
-/**
- * gmime_content_field_new: Creates a new GMimeContentField object
- * @type: mime type
- * @subtype: mime subtype 
- * 
- * Creates a GMimeContentField object and initialize it with
- * a mime type and a mime subtype. For example, 
- * gmime_content_field_new ("application", "postcript");
- * will create a content field with complete mime type 
- * "application/postscript"
- * 
- * Return value: The newly created GMimeContentField object
- **/
-GMimeContentField *
-gmime_content_field_new (const gchar *type, const gchar *subtype)
-{
-	GMimeContentField *ctf;
-
-	ctf = g_new (GMimeContentField, 1);
-	ctf->content_type = header_content_type_new(type, subtype);
-	ctf->type = ctf->content_type->type;
-	ctf->subtype = ctf->content_type->subtype;
-	ctf->ref = 1;
-	return ctf;
-} 
-
-/**
- * gmime_content_field_ref: add a reference to a GMimeContentField object
- * @content_field: GMimeContentField object
- * 
- * Tell a GMimeContentField object that something holds a reference
- * on him. This, coupled with the corresponding 
- * gmime_content_field_unref() method allow several 
- * objects to use the same GMimeContentField object.
- **/
-void 
-gmime_content_field_ref (GMimeContentField *content_field)
-{
-	content_field->ref += 1;
-	header_content_type_ref (content_field->content_type);
-}
-
-/**
- * gmime_content_field_unref: remove a reference to a GMimeContentField object
- * @content_field: GMimeContentField object
- * 
- * Tell a GMimeContentField object that something which 
- * was holding a reference to him does not need it anymore.
- * When no more reference exist, the GMimeContentField object
- * is freed using gmime_content_field_free().
- *
- **/
-void 
-gmime_content_field_unref (GMimeContentField *content_field)
-{
-	if (!content_field) return;
-	
-	content_field->ref -= 1;
-	header_content_type_unref (content_field->content_type);
-	if (content_field->ref <= 0)
-		g_free (content_field);
-}
-
-
-
-/**
- * gmime_content_field_set_parameter: set a parameter for a GMimeContentField object
- * @content_field: content field
- * @attribute: parameter name 
- * @value: paramteter value
- * 
- * set a parameter (called attribute in RFC 2045) of a content field. Meaningfull
- * or valid parameters name depend on the content type object. For example, 
- * gmime_content_field_set_parameter (cf, "charset", "us-ascii");
- * will make sense for a "text/plain" content field but not for a 
- * "image/gif". This routine does not check parameter validity.
- **/
-void 
-gmime_content_field_set_parameter (GMimeContentField *content_field, const gchar *attribute, const gchar *value)
-{
-	header_content_type_set_param(content_field->content_type, attribute, value);
-}
-
-/**
- * gmime_content_field_write_to_stream: write a mime content type to a stream
- * @content_field: content type object
- * @stream: the stream
- * 
- * 
- **/
-void
-gmime_content_field_write_to_stream (GMimeContentField *content_field, CamelStream *stream)
-{
-	char *txt;
-
-	if (!content_field)
-		return;
-
-	txt = header_content_type_format(content_field->content_type);
-	if (txt) {
-		camel_stream_printf (stream, "Content-Type: %s\n", txt);
-		g_free(txt);
-	}
-}
-
-/**
- * gmime_content_field_get_mime_type: return the mime type of the content field object
- * @content_field: content field object
- * 
- * A RFC 2045 content type field contains the mime type in the
- * form "type/subtype" (example : "application/postscript") and some
- * parameters (attribute/value pairs). This routine returns the mime type 
- * in a gchar object. THIS OBJECT MUST BE FREED BY THE CALLER.
- * 
- * Return value: the mime type in the form "type/subtype" or NULL if not defined.
- **/
-gchar * 
-gmime_content_field_get_mime_type (GMimeContentField *content_field)
-{
-	gchar *mime_type;
-
-	if (!content_field->content_type->type) return NULL;
-
-	if (content_field->content_type->subtype) 
-		mime_type = g_strdup_printf ("%s/%s", content_field->content_type->type, content_field->content_type->subtype);
-	else 
-		mime_type = g_strdup (content_field->content_type->type);
-	return mime_type;
-}
-
-/**
- * gmime_content_field_get_parameter: return the value of a mime type parameter
- * @content_field: content field object
- * @name: name of the parameter
- * 
- * Returns the value of a parameter contained in the content field 
- * object. The content type is formed of a mime type, a mime subtype,
- * and a parameter list. Each parameter is a name/value pair. This 
- * routine returns the value assiciated to a given name. 
- * When the parameter does not exist, NULL is returned. 
- * 
- * Return value: parameter value, or NULL if not found.
- **/
-const gchar *
-gmime_content_field_get_parameter (GMimeContentField *content_field, const gchar *name)
-{
-	g_assert (content_field);
-
-	g_assert (name);
-	return header_content_type_param(content_field->content_type, name);
-}
-
-
-
-
-/**
- * gmime_content_field_construct_from_string: construct a ContentType object by parsing a string.
- *
- * @content_field: content type object to construct 
- * @string: string containing the content type field 
- * 
- * Parse a string containing a content type field as defined in
- * RFC 2045, and construct the corresponding ContentType object.
- * The string is not modified and not used in the ContentType 
- * object. It can and must be freed by the calling part.
- **/
-void
-gmime_content_field_construct_from_string (GMimeContentField *content_field, const gchar *string)
-{
-	struct _header_content_type *new;
-
-	g_assert (string);
-	g_assert (content_field);
-
-	new = header_content_type_decode(string);
-	if (content_field->content_type)
-		header_content_type_unref(content_field->content_type);
-
-	if (new == NULL) {
-		new = header_content_type_new(NULL, NULL);
-		g_warning("Cannot parse content-type string: %s", string);
-	}
-	content_field->content_type = new;
-	content_field->type = new->type;
-	content_field->subtype = new->subtype;
-}
-
-/**
- * gmime_content_field_is_type:
- * @content_field: An initialised GMimeContentField.
- * @type: MIME Major type name.
- * @subtype: MIME subtype.
- * 
- * Returns true if the content_field is of the type @type and subtype @subtype.
- * If @subtype is the special wildcard "*", then it will match any type.
- *
- * If the @content_field is empty, then it will match "text/plain", or "text/ *".
- * 
- * Return value: 
- **/
-int
-gmime_content_field_is_type (GMimeContentField *content_field, const char *type, const char *subtype)
-{
-	return header_content_type_is(content_field->content_type, type, subtype);
-}
diff --git a/camel/gmime-content-field.h b/camel/gmime-content-field.h
deleted file mode 100644
index 5a28d0fedb..0000000000
--- a/camel/gmime-content-field.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* mime-content_field.h : mime content type field utilities  */
-
-/* 
- *
- * Author : 
- *  Bertrand Guiheneuf 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef GMIME_CONTENT_FIELD_H
-#define GMIME_CONTENT_FIELD_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include 
-#include 
-#include 
-#include 
-
-typedef struct {
-	struct _header_content_type *content_type;
-
-	/* these should be deprecated (use the accessors) */
-	char *type;		/* these are only copies of the ones in content_type */
-	char *subtype;
-
-	gint ref;
-
-} GMimeContentField;
-
-GMimeContentField *gmime_content_field_new (const gchar *type, const gchar *subtype);
-void gmime_content_field_ref (GMimeContentField *content_field);
-void gmime_content_field_unref (GMimeContentField *content_field);
-
-void gmime_content_field_set_parameter (GMimeContentField *content_field, const gchar *attribute, const gchar *value);
-void gmime_content_field_write_to_stream (GMimeContentField *content_field, CamelStream *stream);
-void gmime_content_field_construct_from_string (GMimeContentField *content_field, const gchar *string);
-void gmime_content_field_free (GMimeContentField *content_field);
-gchar * gmime_content_field_get_mime_type (GMimeContentField *content_field);
-const gchar *gmime_content_field_get_parameter (GMimeContentField *content_field, const gchar *name);
-
-int gmime_content_field_is_type (GMimeContentField *content_field, const char *type, const char *subtype);
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* GMIME_CONTENT_FIELD_H */
diff --git a/camel/gstring-util.c b/camel/gstring-util.c
deleted file mode 100644
index a0c1345b71..0000000000
--- a/camel/gstring-util.c
+++ /dev/null
@@ -1,216 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* gstring-util : utilities for gstring object  */
-
-/* 
- *
- * Author : 
- *  Bertrand Guiheneuf 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-
-#include 
-#include "gstring-util.h"
-#include 
-
-/**
- * g_string_equals : test if two string are equal
- *
- * @string1 : first string
- * @string2 : second string
- *
- * @Return Value : true if the strings equal, false otherwise
- **/
-gboolean
-g_string_equals (GString *string1, GString *string2)
-{
-	g_assert (string1);
-	g_assert (string2);
-	return !strcmp (string1->str, string2->str);
-}
-
-
-
-
-/**
- * g_string_clone : clone a GString
- *
- * @string : the string to clone
- *
- * @Return Value : the clone ...
- **/
-GString *
-g_string_clone (GString *string)
-{
-	return g_string_new (string->str);
-}
-
-/**
- * g_string_append_g_string : append a GString to another  GString
- *
- * @dest_string : string which will be appended
- * @other_string : string to append
- *
- **/
-void 
-g_string_append_g_string(GString *dest_string, GString *other_string)
-{
-	g_assert(other_string);
-	g_assert(dest_string);
-
-	if (other_string->len)
-		g_string_append(dest_string, other_string->str);
-}
-
-/**
- * g_string_equal_for_hash: test equality of two GStrings for hash tables
- * @v: string 1
- * @v2: string 2
- * 
- * 
- * 
- * Return value: 
- **/
-gint
-g_string_equal_for_hash (gconstpointer v, gconstpointer v2)
-{
-  return strcmp ( ((const GString*)v)->str, ((const GString*)v2)->str) == 0;
-}
-
-gint
-g_string_equal_for_glist (gconstpointer v, gconstpointer v2)
-{
-  return !strcmp ( ((const GString*)v)->str, ((const GString*)v2)->str) == 0;
-}
-
-
-/**
- * g_string_hash: computes a hash value for a Gstring
- * @v: Gstring object
- * 
- * 
- * 
- * Return value: 
- **/
-guint 
-g_string_hash (gconstpointer v)
-{
-	return g_str_hash(((const GString*)v)->str);
-}
-
-
-
-
-/* utility func : frees a GString element in a GList */
-static void 
-__g_string_list_free_string (gpointer data, gpointer user_data)
-{
-	GString *string = (GString *)data;
-	g_string_free(string, TRUE);
-}
-
-
-void 
-g_string_list_free (GList *string_list)
-{
-	g_list_foreach(string_list, __g_string_list_free_string, NULL);
-	g_list_free(string_list);
-}
-
-
-
-
-
-
-GList *
-g_string_split (GString *string, char sep, gchar *trim_chars, GStringTrimOption trim_options)
-{
-	GList *result = NULL;
-	gint first, last, pos;
-	gchar *str;
-	gchar *new_str;
-	GString *new_gstring;
-
-	g_assert (string);
-	str = string->str;
-	if (!str) return NULL;
-
-	first = 0;
-	last = strlen(str) - 1;
-	
-	/* strip leading and trailing separators */
-	while ( (first<=last) && (str[first]==sep) )
-		first++;
-	while ( (first<=last) && (str[last]==sep) )
-		last--;
-
-	
-	while (first<=last)  {
-		pos = first;
-		/* find next separator */
-		while ((pos<=last) && (str[pos]!=sep)) pos++;
-		if (first != pos) {
-			new_str = g_strndup (str+first, pos-first);
-			new_gstring = g_string_new (new_str);
-			g_free (new_str);
-			/* could do trimming in line to speed up this code */
-			if (trim_chars) g_string_trim (new_gstring, trim_chars, trim_options);
-			result = g_list_append (result, new_gstring);
-		}	
-		first = pos + 1;
-	}
-
-	return result;
-}
-
-
-void 
-g_string_trim (GString *string, gchar *chars, GStringTrimOption options)
-{
-	gint first_ok;
-	gint last_ok;
-	guint length;
-	gchar *str;
-
-	if ((!string) || (!string->str))
-		return; 
-	str = string->str;
-	length = strlen (str);
-	if (!length)
-		return;
-
-	first_ok = 0;
-	last_ok = length - 1;
-	
-	if (options & GSTRING_TRIM_STRIP_LEADING)
-		while  ( (first_ok <= last_ok) && (strchr (chars, str[first_ok])) )
-			first_ok++;
-
-	if (options & GSTRING_TRIM_STRIP_TRAILING)
-		while  ( (first_ok <= last_ok) && (strchr (chars, str[last_ok])) )
-			last_ok++;
-
-	if (first_ok > 0)
-		g_string_erase (string, 0, first_ok);
-
-	if (last_ok < length-1)
-		g_string_truncate (string, last_ok - first_ok +1);
-	
-}
diff --git a/camel/gstring-util.h b/camel/gstring-util.h
deleted file mode 100644
index 487bbc8a3b..0000000000
--- a/camel/gstring-util.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* gstring-util : utilities for gstring object  */
-
-/* 
- *
- * Author : 
- *  Bertrand Guiheneuf 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-
-#ifndef GSTRING_UTIL_H
-#define GSTRING_UTIL_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include 
-
-typedef enum {
-    GSTRING_TRIM_NONE            =     0,
-    GSTRING_TRIM_STRIP_TRAILING  =     1,
-    GSTRING_TRIM_STRIP_LEADING   =     2
-} GStringTrimOption;
-
-
-gboolean g_string_equals          (GString *string1, GString *string2);
-GString *g_string_clone           (GString *string);
-void     g_string_append_g_string (GString *dest_string,
-				   GString *other_string);
-
-gboolean g_string_equal_for_hash  (gconstpointer v, gconstpointer v2);
-gboolean g_string_equal_for_glist (gconstpointer v, gconstpointer v2);
-guint    g_string_hash            (gconstpointer v);
-void     g_string_list_free       (GList *string_list);
-
-GList   *g_string_split           (GString *string, char sep,
-				   gchar *trim_chars, GStringTrimOption trim_options);
-void     g_string_trim            (GString *string, gchar *chars,
-				   GStringTrimOption options);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* GSTRING_UTIL_H */
diff --git a/camel/hash-table-utils.c b/camel/hash-table-utils.c
deleted file mode 100644
index b04eaa3ce7..0000000000
--- a/camel/hash-table-utils.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* generic utilities for hash tables */
-
-/* 
- *
- * Author : 
- *  Bertrand Guiheneuf 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#include 
-#include "glib.h"
-#include "hash-table-utils.h"
-
-
-/* 
- * free a (key/value) hash table pair.
- * to be called in a g_hash_table_foreach()
- * before g_hash_table_destroy().
- */
-void
-g_hash_table_generic_free (gpointer key, gpointer value, gpointer user_data)
-{
-	g_free (key);
-	g_free (value);
-}
-
-
-
-/***/
-/* use these two funcs for case insensitive hash table */
-
-gint 
-g_strcase_equal (gconstpointer a, gconstpointer b)
-{
-	return (g_strcasecmp ((gchar *)a, (gchar *)b) == 0);
-}
-
-
-/* modified g_str_hash from glib/gstring.c
-   because it would have been too slow to
-   us g_strdown() on the string */
-/* a char* hash function from ASU */
-guint
-g_strcase_hash (gconstpointer v)
-{
-	const char *s = (char*)v;
-	const char *p;
-	guint h=0, g;
-	
-	for(p = s; *p != '\0'; p += 1) {
-		h = ( h << 4 ) + toupper(*p);
-		if ( ( g = h & 0xf0000000 ) ) {
-			h = h ^ (g >> 24);
-			h = h ^ g;
-		}
-  }
-
-  return h /* % M */;
-}
-
-
-
-/***/
diff --git a/camel/hash-table-utils.h b/camel/hash-table-utils.h
deleted file mode 100644
index 2904991848..0000000000
--- a/camel/hash-table-utils.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* generic utilities for hash tables */
-
-/* 
- *
- * Author : 
- *  Bertrand Guiheneuf 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef HASH_TABLE_UTILS_H
-#define HASH_TABLE_UTILS_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-void g_hash_table_generic_free (gpointer key, gpointer value, gpointer user_data);
-
-gint g_strcase_equal (gconstpointer a, gconstpointer b);
-guint g_strcase_hash (gconstpointer v);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* HASH_TABLE_UTILS_H */
diff --git a/camel/md5-utils.c b/camel/md5-utils.c
deleted file mode 100644
index 7363eaec40..0000000000
--- a/camel/md5-utils.c
+++ /dev/null
@@ -1,391 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * This code implements the MD5 message-digest algorithm.
- * The algorithm is due to Ron Rivest.  This code was
- * written by Colin Plumb in 1993, no copyright is claimed.
- * This code is in the public domain; do with it what you wish.
- *
- * Equivalent code is available from RSA Data Security, Inc.
- * This code has been tested against that, and is equivalent,
- * except that you don't need to include two pages of legalese
- * with every copy.
- *
- * To compute the message digest of a chunk of bytes, declare an
- * MD5Context structure, pass it to md5_init, call md5_update as
- * needed on buffers full of bytes, and then call md5_Final, which
- * will fill a supplied 16-byte array with the digest.
- */
-
-/* parts of this file are :
- * Written March 1993 by Branko Lankester
- * Modified June 1993 by Colin Plumb for altered md5.c.
- * Modified October 1995 by Erik Troan for RPM
- */
-
-
-#include "md5-utils.h"
-#include 
-
-static void md5_transform (guint32 buf[4], const guint32 in[16]);
-
-static gint _ie = 0x44332211;
-static union _endian { gint i; gchar b[4]; } *_endian = (union _endian *)&_ie;
-#define	IS_BIG_ENDIAN()		(_endian->b[0] == '\x44')
-#define	IS_LITTLE_ENDIAN()	(_endian->b[0] == '\x11')
-
-
-/*
- * Note: this code is harmless on little-endian machines.
- */
-static void 
-_byte_reverse (guchar *buf, guint32 longs)
-{
-	guint32 t;
-	do {
-		t = (guint32) ((guint32) buf[3] << 8 | buf[2]) << 16 |
-			((guint32) buf[1] << 8 | buf[0]);
-		*(guint32 *) buf = t;
-		buf += 4;
-	} while (--longs);
-}
-
-/**
- * md5_init: Initialise an md5 context object
- * @ctx: md5 context 
- * 
- * Initialise an md5 buffer. 
- *
- **/
-void 
-md5_init (MD5Context *ctx)
-{
-	ctx->buf[0] = 0x67452301;
-	ctx->buf[1] = 0xefcdab89;
-	ctx->buf[2] = 0x98badcfe;
-	ctx->buf[3] = 0x10325476;
-	
-	ctx->bits[0] = 0;
-	ctx->bits[1] = 0;
-	
-	if (IS_BIG_ENDIAN())	
-		ctx->doByteReverse = 1;		
-	else 
-		ctx->doByteReverse = 0;	
-}
-
-
-
-/**
- * md5_update: add a buffer to md5 hash computation
- * @ctx: conetxt object used for md5 computaion
- * @buf: buffer to add
- * @len: buffer length
- * 
- * Update context to reflect the concatenation of another buffer full
- * of bytes. Use this to progressively construct an md5 hash.
- **/
-void 
-md5_update (MD5Context *ctx, const guchar *buf, guint32 len)
-{
-	guint32 t;
-	
-	/* Update bitcount */
-	
-	t = ctx->bits[0];
-	if ((ctx->bits[0] = t + ((guint32) len << 3)) < t)
-		ctx->bits[1]++;		/* Carry from low to high */
-	ctx->bits[1] += len >> 29;
-	
-	t = (t >> 3) & 0x3f;	/* Bytes already in shsInfo->data */
-	
-	/* Handle any leading odd-sized chunks */
-	
-	if (t) {
-		guchar *p = (guchar *) ctx->in + t;
-		
-		t = 64 - t;
-		if (len < t) {
-			memcpy (p, buf, len);
-			return;
-		}
-		memcpy (p, buf, t);
-		if (ctx->doByteReverse)
-			_byte_reverse (ctx->in, 16);
-		md5_transform (ctx->buf, (guint32 *) ctx->in);
-		buf += t;
-		len -= t;
-	}
-	/* Process data in 64-byte chunks */
-	
-	while (len >= 64) {
-		memcpy (ctx->in, buf, 64);
-		if (ctx->doByteReverse)
-			_byte_reverse (ctx->in, 16);
-		md5_transform (ctx->buf, (guint32 *) ctx->in);
-		buf += 64;
-		len -= 64;
-	}
-	
-	/* Handle any remaining bytes of data. */
-	
-	memcpy (ctx->in, buf, len);
-}
-
-
-
-
-
-/*
- * Final wrapup - pad to 64-byte boundary with the bit pattern 
- * 1 0* (64-bit count of bits processed, MSB-first)
- */
-/**
- * md5_final: copy the final md5 hash to a bufer
- * @digest: 16 bytes buffer
- * @ctx: context containing the calculated md5
- * 
- * copy the final md5 hash to a bufer
- **/
-void 
-md5_final (MD5Context *ctx, guchar digest[16])
-{
-	guint32 count;
-	guchar *p;
-	
-	/* Compute number of bytes mod 64 */
-	count = (ctx->bits[0] >> 3) & 0x3F;
-	
-	/* Set the first char of padding to 0x80.  This is safe since there is
-	   always at least one byte free */
-	p = ctx->in + count;
-	*p++ = 0x80;
-	
-	/* Bytes of padding needed to make 64 bytes */
-	count = 64 - 1 - count;
-	
-	/* Pad out to 56 mod 64 */
-	if (count < 8) {
-		/* Two lots of padding:  Pad the first block to 64 bytes */
-		memset (p, 0, count);
-		if (ctx->doByteReverse)
-			_byte_reverse (ctx->in, 16);
-		md5_transform (ctx->buf, (guint32 *) ctx->in);
-		
-		/* Now fill the next block with 56 bytes */
-		memset (ctx->in, 0, 56);
-	} else {
-		/* Pad block to 56 bytes */
-		memset (p, 0, count - 8);
-	}
-	if (ctx->doByteReverse)
-		_byte_reverse (ctx->in, 14);
-	
-	/* Append length in bits and transform */
-	((guint32 *) ctx->in)[14] = ctx->bits[0];
-	((guint32 *) ctx->in)[15] = ctx->bits[1];
-	
-	md5_transform (ctx->buf, (guint32 *) ctx->in);
-	if (ctx->doByteReverse)
-		_byte_reverse ((guchar *) ctx->buf, 4);
-	memcpy (digest, ctx->buf, 16);
-}
-
-
-
-
-/* The four core functions - F1 is optimized somewhat */
-
-/* #define F1(x, y, z) (x & y | ~x & z) */
-#define F1(x, y, z) (z ^ (x & (y ^ z)))
-#define F2(x, y, z) F1(z, x, y)
-#define F3(x, y, z) (x ^ y ^ z)
-#define F4(x, y, z) (y ^ (x | ~z))
-
-/* This is the central step in the MD5 algorithm. */
-#define MD5STEP(f, w, x, y, z, data, s) \
-	( w += f(x, y, z) + data,  w = w<>(32-s),  w += x )
-
-/*
- * The core of the MD5 algorithm, this alters an existing MD5 hash to
- * reflect the addition of 16 longwords of new data.  md5_Update blocks
- * the data and converts bytes into longwords for this routine.
- */
-static void 
-md5_transform (guint32 buf[4], const guint32 in[16])
-{
-	register guint32 a, b, c, d;
-	
-	a = buf[0];
-	b = buf[1];
-	c = buf[2];
-	d = buf[3];
-	
-	MD5STEP (F1, a, b, c, d, in[0] + 0xd76aa478, 7);
-	MD5STEP (F1, d, a, b, c, in[1] + 0xe8c7b756, 12);
-	MD5STEP (F1, c, d, a, b, in[2] + 0x242070db, 17);
-	MD5STEP (F1, b, c, d, a, in[3] + 0xc1bdceee, 22);
-	MD5STEP (F1, a, b, c, d, in[4] + 0xf57c0faf, 7);
-	MD5STEP (F1, d, a, b, c, in[5] + 0x4787c62a, 12);
-	MD5STEP (F1, c, d, a, b, in[6] + 0xa8304613, 17);
-	MD5STEP (F1, b, c, d, a, in[7] + 0xfd469501, 22);
-	MD5STEP (F1, a, b, c, d, in[8] + 0x698098d8, 7);
-	MD5STEP (F1, d, a, b, c, in[9] + 0x8b44f7af, 12);
-	MD5STEP (F1, c, d, a, b, in[10] + 0xffff5bb1, 17);
-	MD5STEP (F1, b, c, d, a, in[11] + 0x895cd7be, 22);
-	MD5STEP (F1, a, b, c, d, in[12] + 0x6b901122, 7);
-	MD5STEP (F1, d, a, b, c, in[13] + 0xfd987193, 12);
-	MD5STEP (F1, c, d, a, b, in[14] + 0xa679438e, 17);
-	MD5STEP (F1, b, c, d, a, in[15] + 0x49b40821, 22);
-	
-	MD5STEP (F2, a, b, c, d, in[1] + 0xf61e2562, 5);
-	MD5STEP (F2, d, a, b, c, in[6] + 0xc040b340, 9);
-	MD5STEP (F2, c, d, a, b, in[11] + 0x265e5a51, 14);
-	MD5STEP (F2, b, c, d, a, in[0] + 0xe9b6c7aa, 20);
-	MD5STEP (F2, a, b, c, d, in[5] + 0xd62f105d, 5);
-	MD5STEP (F2, d, a, b, c, in[10] + 0x02441453, 9);
-	MD5STEP (F2, c, d, a, b, in[15] + 0xd8a1e681, 14);
-	MD5STEP (F2, b, c, d, a, in[4] + 0xe7d3fbc8, 20);
-	MD5STEP (F2, a, b, c, d, in[9] + 0x21e1cde6, 5);
-	MD5STEP (F2, d, a, b, c, in[14] + 0xc33707d6, 9);
-	MD5STEP (F2, c, d, a, b, in[3] + 0xf4d50d87, 14);
-	MD5STEP (F2, b, c, d, a, in[8] + 0x455a14ed, 20);
-	MD5STEP (F2, a, b, c, d, in[13] + 0xa9e3e905, 5);
-	MD5STEP (F2, d, a, b, c, in[2] + 0xfcefa3f8, 9);
-	MD5STEP (F2, c, d, a, b, in[7] + 0x676f02d9, 14);
-	MD5STEP (F2, b, c, d, a, in[12] + 0x8d2a4c8a, 20);
-	
-	MD5STEP (F3, a, b, c, d, in[5] + 0xfffa3942, 4);
-	MD5STEP (F3, d, a, b, c, in[8] + 0x8771f681, 11);
-	MD5STEP (F3, c, d, a, b, in[11] + 0x6d9d6122, 16);
-	MD5STEP (F3, b, c, d, a, in[14] + 0xfde5380c, 23);
-	MD5STEP (F3, a, b, c, d, in[1] + 0xa4beea44, 4);
-	MD5STEP (F3, d, a, b, c, in[4] + 0x4bdecfa9, 11);
-	MD5STEP (F3, c, d, a, b, in[7] + 0xf6bb4b60, 16);
-	MD5STEP (F3, b, c, d, a, in[10] + 0xbebfbc70, 23);
-	MD5STEP (F3, a, b, c, d, in[13] + 0x289b7ec6, 4);
-	MD5STEP (F3, d, a, b, c, in[0] + 0xeaa127fa, 11);
-	MD5STEP (F3, c, d, a, b, in[3] + 0xd4ef3085, 16);
-	MD5STEP (F3, b, c, d, a, in[6] + 0x04881d05, 23);
-	MD5STEP (F3, a, b, c, d, in[9] + 0xd9d4d039, 4);
-	MD5STEP (F3, d, a, b, c, in[12] + 0xe6db99e5, 11);
-	MD5STEP (F3, c, d, a, b, in[15] + 0x1fa27cf8, 16);
-	MD5STEP (F3, b, c, d, a, in[2] + 0xc4ac5665, 23);
-	
-	MD5STEP (F4, a, b, c, d, in[0] + 0xf4292244, 6);
-	MD5STEP (F4, d, a, b, c, in[7] + 0x432aff97, 10);
-	MD5STEP (F4, c, d, a, b, in[14] + 0xab9423a7, 15);
-	MD5STEP (F4, b, c, d, a, in[5] + 0xfc93a039, 21);
-	MD5STEP (F4, a, b, c, d, in[12] + 0x655b59c3, 6);
-	MD5STEP (F4, d, a, b, c, in[3] + 0x8f0ccc92, 10);
-	MD5STEP (F4, c, d, a, b, in[10] + 0xffeff47d, 15);
-	MD5STEP (F4, b, c, d, a, in[1] + 0x85845dd1, 21);
-	MD5STEP (F4, a, b, c, d, in[8] + 0x6fa87e4f, 6);
-	MD5STEP (F4, d, a, b, c, in[15] + 0xfe2ce6e0, 10);
-	MD5STEP (F4, c, d, a, b, in[6] + 0xa3014314, 15);
-	MD5STEP (F4, b, c, d, a, in[13] + 0x4e0811a1, 21);
-	MD5STEP (F4, a, b, c, d, in[4] + 0xf7537e82, 6);
-	MD5STEP (F4, d, a, b, c, in[11] + 0xbd3af235, 10);
-	MD5STEP (F4, c, d, a, b, in[2] + 0x2ad7d2bb, 15);
-	MD5STEP (F4, b, c, d, a, in[9] + 0xeb86d391, 21);
-	
-	buf[0] += a;
-	buf[1] += b;
-	buf[2] += c;
-	buf[3] += d;
-}
-
-
-
-
-/**
- * md5_get_digest: get the md5 hash of a buffer
- * @buffer: byte buffer
- * @buffer_size: buffer size (in bytes)
- * @digest: 16 bytes buffer receiving the hash code.
- * 
- * Get the md5 hash of a buffer. The result is put in 
- * the 16 bytes buffer @digest .
- **/
-void
-md5_get_digest (const gchar *buffer, gint buffer_size, guchar digest[16])
-{	
-	MD5Context ctx;
-
-	md5_init (&ctx);
-	md5_update (&ctx, buffer, buffer_size);
-	md5_final (&ctx, digest);
-	
-}
-
-
-/**
- * md5_get_digest_from_stream: get the md5 hash of a stream
- * @stream: stream
- * @digest: 16 bytes buffer receiving the hash code.
- * 
- * Get the md5 hash of a stream. The result is put in 
- * the 16 bytes buffer @digest .
- **/
-void
-md5_get_digest_from_stream (CamelStream *stream, guchar digest[16])
-{	
-	MD5Context ctx;
-	guchar tmp_buf[1024];
-	gint nb_bytes_read;
-
-	md5_init (&ctx);
-	
-	nb_bytes_read = camel_stream_read (stream, tmp_buf, 1024);
-	while (nb_bytes_read) {
-		md5_update (&ctx, tmp_buf, nb_bytes_read);
-		nb_bytes_read = camel_stream_read (stream, tmp_buf, 1024);
-	}
-	
-	md5_final (&ctx, digest);
-	
-}
-
-
-
-
-/**
- * md5_get_digest_from_file: get the md5 hash of a file
- * @filename: file name
- * @digest: 16 bytes buffer receiving the hash code.
- * 
- * Get the md5 hash of a file. The result is put in 
- * the 16 bytes buffer @digest .
- **/
-void
-md5_get_digest_from_file (const gchar *filename, guchar digest[16])
-{	
-	MD5Context ctx;
-	guchar tmp_buf[1024];
-	gint nb_bytes_read;
-	FILE *fp;
-
-	printf("generating checksum\n");
-
-	md5_init (&ctx);
-	fp = fopen(filename, "r");
-	if (!fp) {
-	return;
-	}
-	
-	while ((nb_bytes_read = fread (tmp_buf, sizeof (guchar), 1024, fp)) > 0)
-		md5_update (&ctx, tmp_buf, nb_bytes_read);
-	
-	if (ferror(fp)) {
-		fclose(fp);
-		return;
-	}
-
-	
-	md5_final (&ctx, digest);
-	
-	printf("checksum done\n");
-}
-
-
-
-
diff --git a/camel/md5-utils.h b/camel/md5-utils.h
deleted file mode 100644
index c911250d56..0000000000
--- a/camel/md5-utils.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * This code implements the MD5 message-digest algorithm.
- * The algorithm is due to Ron Rivest.  This code was
- * written by Colin Plumb in 1993, no copyright is claimed.
- * This code is in the public domain; do with it what you wish.
- *
- * Equivalent code is available from RSA Data Security, Inc.
- * This code has been tested against that, and is equivalent,
- * except that you don't need to include two pages of legalese
- * with every copy.
- *
- * To compute the message digest of a chunk of bytes, declare an
- * MD5Context structure, pass it to rpmMD5Init, call rpmMD5Update as
- * needed on buffers full of bytes, and then call rpmMD5Final, which
- * will fill a supplied 16-byte array with the digest.
- */
-
-/* parts of this file are :
- * Written March 1993 by Branko Lankester
- * Modified June 1993 by Colin Plumb for altered md5.c.
- * Modified October 1995 by Erik Troan for RPM
- */
-
-
-#ifndef MD5_UTILS_H
-#define MD5_UTILS_H
-
-#include 
-#include 
-
-typedef struct {
-	guint32 buf[4];
-	guint32 bits[2];
-	guchar in[64];
-	gint doByteReverse;
-
-} MD5Context ;
-
-
-void md5_get_digest (const gchar *buffer, gint buffer_size, guchar digest[16]);
-void md5_get_digest_from_stream (CamelStream *stream, guchar digest[16]);
-
-/* use this one when speed is needed */
-/* for use in provider code only */
-void md5_get_digest_from_file (const gchar *filename, guchar digest[16]);
-
-/* raw routines */
-void md5_init (MD5Context *ctx);
-void md5_update (MD5Context *ctx, const guchar *buf, guint32 len);
-void md5_final (MD5Context *ctx, guchar digest[16]);
-
-
-#endif	/* MD5_UTILS_H */
diff --git a/camel/providers/.cvsignore b/camel/providers/.cvsignore
deleted file mode 100644
index 3dda72986f..0000000000
--- a/camel/providers/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile.in
-Makefile
diff --git a/camel/providers/MH/.cvsignore b/camel/providers/MH/.cvsignore
deleted file mode 100644
index 2e7b174532..0000000000
--- a/camel/providers/MH/.cvsignore
+++ /dev/null
@@ -1,6 +0,0 @@
-Makefile.in
-Makefile
-.deps
-*.lo
-*.la
-.libs
diff --git a/camel/providers/MH/Makefile.am b/camel/providers/MH/Makefile.am
deleted file mode 100644
index 59662a07dd..0000000000
--- a/camel/providers/MH/Makefile.am
+++ /dev/null
@@ -1,34 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-SUBDIRS = 
-
-libcamelmhincludedir = $(includedir)/camel
-
-
-lib_LTLIBRARIES = libcamelmh.la
-
-INCLUDES = -I.. -I$(srcdir)/.. -I$(includedir)	\
-	-I$(top_srcdir)/intl			\
-	$(GTK_INCLUDEDIR) -I$(top_srcdir)/camel	\
-	-DG_LOG_DOMAIN=\"camel-mh-provider\"	
-
-libcamelmh_la_SOURCES = 			\
-	camel-mh-folder.c			\
-	camel-mh-provider.c			\
-	camel-mh-store.c			\
-	mh-summary.c				\
-	mh-uid.c				\
-	mh-utils.c
-
-libcamelmhinclude_HEADERS =			\
-	camel-mh-folder.h			\
-	camel-mh-store.h			\
-	mh-summary.c				\
-	mh-uid.h				\
-	mh-utils.h
-
-
-libcamelmh_la_LDFLAGS = -version-info 0:0:0 -rpath $(libdir)
-
-
-EXTRA_DIST = 
diff --git a/camel/providers/MH/camel-mh-folder.c b/camel/providers/MH/camel-mh-folder.c
deleted file mode 100644
index f4ff8f305a..0000000000
--- a/camel/providers/MH/camel-mh-folder.c
+++ /dev/null
@@ -1,1022 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-mh-folder.c : Abstract class for an email folder */
-
-/* 
- *
- * Copyright (C) 1999 Bertrand Guiheneuf  .
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-#include  
-#include  
-#include  
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include "camel-mh-folder.h"
-#include "camel-mh-store.h"
-#include "gstring-util.h"
-#include "camel-log.h"
-#include "camel-stream-fs.h"
-#include "camel-stream-buffered-fs.h"
-#include "camel-folder-summary.h"
-#include "gmime-utils.h"
-#include "mh-utils.h"
-#include "mh-uid.h"
-#include "mh-summary.h"
-
-
-static CamelFolderClass *parent_class=NULL;
-
-/* Returns the class for a CamelMhFolder */
-#define CMHF_CLASS(so) CAMEL_MH_FOLDER_CLASS (GTK_OBJECT(so)->klass)
-#define CF_CLASS(so) CAMEL_FOLDER_CLASS (GTK_OBJECT(so)->klass)
-#define CMHS_CLASS(so) CAMEL_STORE_CLASS (GTK_OBJECT(so)->klass)
-
-
-static void _set_name(CamelFolder *folder, const gchar *name, CamelException *ex);
-static void _init_with_store (CamelFolder *folder, CamelStore *parent_store, CamelException *ex);
-static gboolean _exists (CamelFolder *folder, CamelException *ex);
-static gboolean _create(CamelFolder *folder, CamelException *ex);
-static gboolean _delete (CamelFolder *folder, gboolean recurse, CamelException *ex);
-static gboolean _delete_messages (CamelFolder *folder, CamelException *ex);
-static GList *_list_subfolders (CamelFolder *folder, CamelException *ex);
-static CamelMimeMessage *_get_message (CamelFolder *folder, gint number, CamelException *ex);
-static gint _get_message_count (CamelFolder *folder, CamelException *ex);
-static gint _append_message (CamelFolder *folder, CamelMimeMessage *message, CamelException *ex);
-static void _expunge (CamelFolder *folder, CamelException *ex);
-static void _copy_message_to (CamelFolder *folder, CamelMimeMessage *message, CamelFolder *dest_folder, CamelException *ex);
-static void _open (CamelFolder *folder, CamelFolderOpenMode mode, CamelException *ex);
-static void _close (CamelFolder *folder, gboolean expunge, CamelException *ex);
-
-static const gchar *_get_message_uid (CamelFolder *folder, CamelMimeMessage *message, CamelException *ex);
-static CamelMimeMessage *_get_message_by_uid (CamelFolder *folder, const gchar *uid, CamelException *ex);
-static GList *_get_uid_list  (CamelFolder *folder, CamelException *ex);
-
-/* some utility functions */
-static int copy_reg (const char *src_path, const char *dst_path, CamelException *ex);
-
-static void
-camel_mh_folder_class_init (CamelMhFolderClass *camel_mh_folder_class)
-{
-	CamelFolderClass *camel_folder_class = CAMEL_FOLDER_CLASS (camel_mh_folder_class);
-
-	parent_class = gtk_type_class (camel_folder_get_type ());
-		
-	/* virtual method definition */
-	/* virtual method overload */
-	camel_folder_class->init_with_store = _init_with_store;
-	camel_folder_class->set_name = _set_name;
-	camel_folder_class->exists = _exists;
-	camel_folder_class->delete = _delete;
-	camel_folder_class->delete_messages = _delete_messages;
-	camel_folder_class->list_subfolders = _list_subfolders;
-	camel_folder_class->get_message = _get_message;
-	camel_folder_class->get_message_count = _get_message_count;
-	camel_folder_class->append_message = _append_message;
-	camel_folder_class->expunge = _expunge;
-	camel_folder_class->copy_message_to = _copy_message_to;
-	camel_folder_class->open = _open;
-	camel_folder_class->close = _close;
-	camel_folder_class->get_message_uid = _get_message_uid;
-	camel_folder_class->get_message_by_uid = _get_message_by_uid;
-	camel_folder_class->get_uid_list = _get_uid_list;
-
-}
-
-
-
-
-
-
-
-GtkType
-camel_mh_folder_get_type (void)
-{
-	static GtkType camel_mh_folder_type = 0;
-	
-	if (!camel_mh_folder_type)	{
-		GtkTypeInfo camel_mh_folder_info =	
-		{
-			"CamelMhFolder",
-			sizeof (CamelMhFolder),
-			sizeof (CamelMhFolderClass),
-			(GtkClassInitFunc) camel_mh_folder_class_init,
-			(GtkObjectInitFunc) NULL,
-				/* reserved_1 */ NULL,
-				/* reserved_2 */ NULL,
-			(GtkClassInitFunc) NULL,
-		};
-		
-		camel_mh_folder_type = gtk_type_unique (CAMEL_FOLDER_TYPE, &camel_mh_folder_info);
-	}
-	
-	return camel_mh_folder_type;
-}
-
-
-
-static gint
-_message_name_compare (gconstpointer a, gconstpointer b)
-{
-	gchar *m1 = (gchar *)a;
-	gchar *m2 = (gchar *)b;
-	gint len_diff;
-
-	return (atoi (m1) - atoi (m2));
-}
-
-
-static void 
-_init_with_store (CamelFolder *folder, CamelStore *parent_store, CamelException *ex)
-{
-	/* call parent method */
-	parent_class->init_with_store (folder, parent_store, ex);
-	
-	folder->can_hold_messages = TRUE;
-	folder->can_hold_folders = TRUE;
-	folder->has_summary_capability = TRUE;
-	folder->has_uid_capability = TRUE;
- 
-	folder->summary = NULL;
-	
-}
-
-
-
-static void
-_open (CamelFolder *folder, CamelFolderOpenMode mode, CamelException *ex)
-{
-	CamelMhFolder *mh_folder = CAMEL_MH_FOLDER (folder);
-	struct dirent *dir_entry;
-	DIR *dir_handle;
-	
-	
-	if (folder->open_state == FOLDER_OPEN) return;
-
-	
-	/* create message list */
-	/* read the whole folder and sort message names */
-	dir_handle = opendir (mh_folder->directory_path);
-	/* read first entry in the directory */
-	dir_entry = readdir (dir_handle);
-	while (dir_entry != NULL) {
-		/* tests if the entry correspond to a message file */
-		if (mh_is_a_message_file (dir_entry->d_name, mh_folder->directory_path))
-			/* add the file name to the list */
-			mh_folder->file_name_list = g_list_insert_sorted (mh_folder->file_name_list, 
-									  g_strdup (dir_entry->d_name), 
-									  _message_name_compare);
-	/* read next entry */
-		dir_entry = readdir (dir_handle);
-	}		
-
-	closedir (dir_handle);
-	
-	/* get (or create) uid list */
-	if (!(mh_load_uid_list (mh_folder) > 0))
-		mh_generate_uid_list (mh_folder);
-
-	/* get or create summary */
-	/* it is important that it comes after uid list reading/generation */
-	if (!(mh_load_summary (mh_folder) > 0))
-		mh_generate_summary (folder);
-	printf ("**** summary = %p\n", folder->summary);
-
-}
-
-
-
-static void
-_close (CamelFolder *folder, gboolean expunge, CamelException *ex)
-{
-	CamelMhFolder *mh_folder = CAMEL_MH_FOLDER (folder);
-
-	/* save uid list, if any */
-	if (mh_folder->uid_array)
-		mh_save_uid_list (mh_folder);
-	
-	/* save summary, if any */
-	if (folder->summary)
-		mh_save_summary (mh_folder);
-	
-	/* call parent implementation */
-	parent_class->close (folder, expunge, ex);
-}
-
-
-
-
-
-/**
- * camel_mh_folder_set_name: set the name of an MH folder
- * @folder: the folder to set the name
- * @name: a string representing the (short) name
- * 
- * 
- * 
- **/
-static void
-_set_name (CamelFolder *folder, const gchar *name, CamelException *ex)
-{
-	CamelMhFolder *mh_folder = CAMEL_MH_FOLDER (folder);
-	const gchar *root_dir_path;
-	gchar *full_name;
-	const gchar *parent_full_name;
-	gchar separator;
-	
-	CAMEL_LOG_FULL_DEBUG ("Entering CamelMhFolder::set_name\n");
-	g_assert (folder);
-	g_assert (name);
-	g_assert (folder->parent_store);
-
-	/* call default implementation */
-	parent_class->set_name (folder, name, ex);
-	
-	if (mh_folder->directory_path) g_free (mh_folder->directory_path);
-	
-	separator = camel_store_get_separator (folder->parent_store);
-	root_dir_path = camel_mh_store_get_toplevel_dir (CAMEL_MH_STORE(folder->parent_store));
-
-	CAMEL_LOG_FULL_DEBUG ("CamelMhFolder::set_name full_name is %s\n", folder->full_name);
-	CAMEL_LOG_FULL_DEBUG ("CamelMhFolder::set_name root_dir_path is %s\n", root_dir_path);
-	CAMEL_LOG_FULL_DEBUG ("CamelMhFolder::separator is %c\n", separator);
-
-	mh_folder->directory_path = g_strdup_printf ("%s%c%s", root_dir_path, separator, folder->full_name);
-	
-	if (!camel_folder_exists (folder, ex)) return;
-	
-	
-	CAMEL_LOG_FULL_DEBUG ("CamelMhFolder::set_name mh_folder->directory_path is %s\n", 
-			      mh_folder->directory_path);
-	CAMEL_LOG_FULL_DEBUG ("Leaving CamelMhFolder::set_name\n");
-}
-
-
-
-static gboolean
-_exists (CamelFolder *folder, CamelException *ex)
-{
-	CamelMhFolder *mh_folder = CAMEL_MH_FOLDER(folder);
-	struct stat stat_buf;
-	gint stat_error;
-	gboolean exists;
-
-	CAMEL_LOG_FULL_DEBUG ("Entering CamelMhFolder::exists\n");
-	g_assert (folder);
-	
-	if (!mh_folder->directory_path)  return FALSE;
-	
-	stat_error = stat (mh_folder->directory_path, &stat_buf);
-	if (stat_error == -1)  {
-		CAMEL_LOG_FULL_DEBUG ("CamelMhFolder::exists when executing stat on %s, stat_error = %d\n", 
-				      mh_folder->directory_path, stat_error);
-		CAMEL_LOG_FULL_DEBUG ("  Full error text is : %s\n", strerror(errno));
-		return FALSE;
-	}
-	exists = S_ISDIR (stat_buf.st_mode);
-
-	CAMEL_LOG_FULL_DEBUG ("Leaving CamelMhFolder::exists\n");
-	return exists;
-}
-
-
-static gboolean
-_create (CamelFolder *folder, CamelException *ex)
-{
-	CamelMhFolder *mh_folder = CAMEL_MH_FOLDER(folder);
-	const gchar *directory_path;
-	mode_t dir_mode = S_IRWXU;
-	gint mkdir_error;
-
-	g_assert(folder);
-
-	/* call default implementation */
-	parent_class->create (folder, ex);
-
-	directory_path = mh_folder->directory_path;
-	if (!directory_path) return FALSE;
-	
-	if (camel_folder_exists (folder, ex)) return TRUE;
-	
-	mkdir_error = mkdir (directory_path, dir_mode);
-	return (mkdir_error == -1);
-}
-
-
-
-static gboolean
-_delete (CamelFolder *folder, gboolean recurse, CamelException *ex)
-{
-
-	CamelMhFolder *mh_folder = CAMEL_MH_FOLDER(folder);
-	const gchar *directory_path;
-	gint rmdir_error = 0;
-
-	g_assert(folder);
-
-	/* call default implementation */
-	parent_class->delete (folder, recurse, ex);
-	/* the default implementation will care about deleting 
-	   messages first and recursing the operation if 
-	   necessary */
-	
-	directory_path = mh_folder->directory_path;
-	if (!directory_path) return FALSE;
-	
-	if (!camel_folder_exists (folder, ex)) return TRUE;
-	
-	/* physically delete the directory */
-	CAMEL_LOG_FULL_DEBUG ("CamelMhFolder::delete removing directory %s\n", directory_path);
-	rmdir_error = rmdir (directory_path);
-	if (rmdir_error == -1) {
-		CAMEL_LOG_WARNING ("CamelMhFolder::delete Error when removing directory %s\n", directory_path);
-		CAMEL_LOG_FULL_DEBUG ( "  Full error text is : %s\n", strerror(errno));
-	}
-
-	return (rmdir_error != -1);
-}
-
-
-static gboolean 
-_delete_messages (CamelFolder *folder, CamelException *ex)
-{
-	
-	CamelMhFolder *mh_folder = CAMEL_MH_FOLDER(folder);
-	const gchar *directory_path;
-	struct stat stat_buf;
-	gint stat_error = 0;
-	gchar *entry_name;
-	struct dirent *dir_entry;
-	gint unlink_error = 0;
-	DIR *dir_handle;
-
-	g_assert(folder);
-
-	/* call default implementation */
-	parent_class->delete_messages (folder, ex);
-
-	directory_path = mh_folder->directory_path;
-	if (!directory_path) return FALSE;
-	
-	if (!camel_folder_exists (folder, ex)) return TRUE;
-	
-	dir_handle = opendir (directory_path);
-	
-	/* read first entry in the directory */
-	dir_entry = readdir (dir_handle);
-	while ((stat_error != -1) && (unlink_error != -1) && (dir_entry != NULL)) {
-
-		/* get the name of the next entry in the dir */
-		entry_name = dir_entry->d_name;
-		stat_error = stat (mh_folder->directory_path, &stat_buf);
-
-		/* is it a regular file ? */
-		if ((stat_error != -1) && S_ISREG(stat_buf.st_mode)) {
-			/* yes, delete it */
-			CAMEL_LOG_FULL_DEBUG ("CamelMhFolder::delete_messages removing file %s\n", entry_name);
-			unlink_error = unlink(entry_name);
-
-			if (unlink_error == -1) {
-				CAMEL_LOG_WARNING ("CamelMhFolder::delete_messages Error when deleting file %s\n", 
-						   entry_name);
-				CAMEL_LOG_FULL_DEBUG ( "  Full error text is : %s\n", strerror(errno));
-			}
-		}
-		/* read next entry */
-		dir_entry = readdir (dir_handle);
-	}
-
-	closedir (dir_handle);
-
-	return ((stat_error != -1) && (unlink_error != -1));
-
-}
-
-
-
-static GList *
-_list_subfolders (CamelFolder *folder, CamelException *ex)
-{
-	GList *subfolder_name_list = NULL;
-
-	CamelMhFolder *mh_folder = CAMEL_MH_FOLDER(folder);
-	const gchar *directory_path;
-	struct stat stat_buf;
-	gint stat_error = 0;
-	GList *file_list;
-	gchar *entry_name;
-	gchar *full_entry_name;
-	struct dirent *dir_entry;
-	DIR *dir_handle;
-
-	g_assert(folder);
-
-	/* call default implementation */
-	parent_class->delete_messages (folder, ex);
-
-	directory_path = mh_folder->directory_path;
-	if (!directory_path) return NULL;
-	
-	if (!camel_folder_exists (folder, ex)) return NULL;
-	
-	dir_handle = opendir (directory_path);
-	
-	/* read first entry in the directory */
-	dir_entry = readdir (dir_handle);
-	while ((stat_error != -1) && (dir_entry != NULL)) {
-
-		/* get the name of the next entry in the dir */
-		entry_name = dir_entry->d_name;
-		full_entry_name = g_strdup_printf ("%s/%s", mh_folder->directory_path, entry_name);
-		stat_error = stat (full_entry_name, &stat_buf);
-		g_free (full_entry_name);
-
-		/* is it a directory ? */
-		if ((stat_error != -1) && S_ISDIR (stat_buf.st_mode)) {
-			/* yes, add it to the list */
-			if (entry_name[0] != '.') {
-				CAMEL_LOG_FULL_DEBUG ("CamelMhFolder::list_subfolders adding  %s\n", entry_name);
-				subfolder_name_list = g_list_append (subfolder_name_list, g_strdup (entry_name));
-			}
-		}
-		/* read next entry */
-		dir_entry = readdir (dir_handle);
-	}
-
-	closedir (dir_handle);
-
-	return subfolder_name_list;
-}
-
-
-
-
-
-static void
-_filename_free (gpointer data)
-{
-	g_free ((gchar *)data);
-}
-
-
-/* slow routine, may be optimixed, or we should use
-   caches if users complain */
-static CamelMimeMessage *
-_get_message (CamelFolder *folder, gint number, CamelException *ex)
-{
-	CamelMhFolder *mh_folder = CAMEL_MH_FOLDER(folder);
-	const gchar *directory_path;
-	gchar *message_name;
-	gchar *message_file_name;
-	CamelStream *input_stream = NULL;
-	CamelMimeMessage *message = NULL;
-	GList *message_list = NULL;
-	
-	g_assert(folder);
-	
-	
-	directory_path = mh_folder->directory_path;
-	if (!directory_path) return NULL;	
-
-		
-	
-	message_name = g_list_nth_data (mh_folder->file_name_list, number);
-	
-	if (message_name != NULL) {
-		CAMEL_LOG_FULL_DEBUG  ("CanelMhFolder::get_message message number = %d, name = %s\n", 
-				       number, message_name);
-		message_file_name = g_strdup_printf ("%s/%s", directory_path, message_name);
-		input_stream = camel_stream_buffered_fs_new_with_name (message_file_name, CAMEL_STREAM_BUFFERED_FS_READ);
-		
-		if (input_stream != NULL) {
-#warning use session field here
-			message = camel_mime_message_new ();
-			camel_data_wrapper_construct_from_stream ( CAMEL_DATA_WRAPPER (message), input_stream);
-			gtk_object_unref (GTK_OBJECT (input_stream));
-			message->message_number = number;
-			gtk_object_set_data_full (GTK_OBJECT (message), "filename", 
-						  g_strdup (message_name), _filename_free);
-			
-#warning Set flags and all this stuff here
-		}
-		g_free (message_file_name);
-	} else 
-		CAMEL_LOG_FULL_DEBUG  ("CanelMhFolder::get_message message number = %d, not found\n", number);
-	
-	
-	return message;   
-}
-
-
-
-static gint
-_get_message_count (CamelFolder *folder, CamelException *ex)
-{
-	
-	CamelMhFolder *mh_folder = CAMEL_MH_FOLDER(folder);
-	const gchar *directory_path;
-	struct dirent *dir_entry;
-	DIR *dir_handle;
-	guint message_count = 0;
-
-	g_assert(folder);
-
-	directory_path = mh_folder->directory_path;
-	if (!directory_path) return -1;
-	
-	if (!camel_folder_exists (folder, ex)) return 0;
-	
-	dir_handle = opendir (directory_path);
-	
-	/* read first entry in the directory */
-	dir_entry = readdir (dir_handle);
-	while (dir_entry != NULL) {
-		/* tests if the entry correspond to a message file */
-		if (mh_is_a_message_file (dir_entry->d_name, directory_path)) 
-			message_count++;	
-		/* read next entry */
-		dir_entry = readdir (dir_handle);
-	}
-
-	closedir (dir_handle);
-	CAMEL_LOG_FULL_DEBUG ("CamelMhFolder::get_message_count found %d messages\n", message_count);
-	return message_count;
-}
-
-
-
-static gboolean
-_find_next_free_message_file (CamelFolder *folder, gint *new_msg_number, gchar **new_msg_filename, CamelException *ex)
-{
-	CamelMhFolder *mh_folder = CAMEL_MH_FOLDER(folder);
-	const gchar *directory_path;
-	struct dirent *dir_entry;
-	DIR *dir_handle;
-	gint last_max_message_number = 0;
-	gint current_message_number;
-
-	g_assert(folder);
-
-	directory_path = mh_folder->directory_path;
-	if (!directory_path) return FALSE;
-	
-	if (!camel_folder_exists (folder, ex)) return FALSE;
-	
-	dir_handle = opendir (directory_path);
-	
-	/* read first entry in the directory */
-	dir_entry = readdir (dir_handle);
-	while (dir_entry != NULL) {
-		/* tests if the entry correspond to a message file */
-		if (mh_is_a_message_file (dir_entry->d_name, directory_path)) {
-			/* see if the message number is the biggest found */
-			current_message_number = atoi (dir_entry->d_name);
-			if (current_message_number > last_max_message_number)
-				last_max_message_number = current_message_number;
-		}
-		/* read next entry */
-		dir_entry = readdir (dir_handle);
-	}
-	closedir (dir_handle);
-	
-	*new_msg_number = last_max_message_number + 1;
-	*new_msg_filename = g_strdup_printf ("%s/%d", directory_path, *new_msg_number);
-	CAMEL_LOG_FULL_DEBUG ("CamelMhFolder::find_next_free_message_file new message path is %s\n", 
-			      *new_msg_filename);
-	return TRUE;
-	
-	
-}
-static gint
-_append_message (CamelFolder *folder, CamelMimeMessage *message, CamelException *ex)
-{
-	guint new_msg_number;
-	gchar *new_msg_filename;
-	CamelStream *output_stream;
-	gboolean error;
-
-	CAMEL_LOG_FULL_DEBUG ("Entering CamelMhFolder::append_message\n");
-	if (!_find_next_free_message_file (folder, &new_msg_number, &new_msg_filename, ex))
-		return -1;
-
-	output_stream = camel_stream_fs_new_with_name (new_msg_filename, CAMEL_STREAM_FS_WRITE);
-	if (output_stream != NULL) {
-		camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (message), output_stream);
-		camel_stream_close (output_stream);
-	} else {
-		CAMEL_LOG_WARNING ("CamelMhFolder::append_message could not open %s for writing\n", 
-				   new_msg_filename);
-		CAMEL_LOG_FULL_DEBUG ("  Full error text is : %s\n", strerror(errno));
-		error = TRUE;
-	}
-
-	g_free (new_msg_filename);
-	CAMEL_LOG_FULL_DEBUG ("Leaving CamelMhFolder::append_message\n");
-	if (error) return -1;
-	else return new_msg_number;
-}
-
-
-
-
-
-static void
-_expunge (CamelFolder *folder, CamelException *ex)
-{
-	/* For the moment, we look in the folder active message
-	 * list. I did not make my mind for the moment, should 
-	 * the gtk_object->destroy signal be used to expunge
-	 * freed messages objects marked DELETED ? 
-	 */
-	CamelMhFolder *mh_folder = CAMEL_MH_FOLDER(folder);
-	CamelMimeMessage *message;
-	GList *message_node;
-	gchar *fullpath;
-	gchar *filename;
-	gint unlink_error;
-	const gchar *directory_path;
-
-	CAMEL_LOG_FULL_DEBUG ("Entering CamelFolder::expunge\n");
-	
-	message_node = folder->message_list;
-
-	directory_path = mh_folder->directory_path;
-	if (!directory_path) return;
-
-	/* look in folder message list which messages
-	 * need to be expunged  */
-	while ( message_node) {
-		message = CAMEL_MIME_MESSAGE (message_node->data);
-		
-		if (message && camel_mime_message_get_flag (message, "DELETED")) {
-			CAMEL_LOG_FULL_DEBUG ("CamelMhFolder::expunge, expunging  message %d\n", message->message_number);
-			/* expunge the message */
-			filename = gtk_object_get_data (GTK_OBJECT (message), "filename");
-			fullpath = g_strdup_printf ("%s/%s", directory_path, filename);
-			CAMEL_LOG_FULL_DEBUG ("CamelMhFolder::expunge, message fullpath is %s\n", 
-					      fullpath);
-			unlink_error = unlink(fullpath);
-			if (unlink_error != -1) {
-				message->expunged = TRUE;
-			} else {
-				CAMEL_LOG_WARNING ("CamelMhFolder:: could not unlink %s (message %d)\n", 
-						   fullpath, message->message_number);
-				CAMEL_LOG_FULL_DEBUG ("  Full error text is : %s\n", strerror(errno));
-			}
-		}
-		message_node = message_node->next;
-		CAMEL_LOG_FULL_DEBUG ("CamelFolder::expunge, examined message node %p\n", message_node);
-	}
-	
-	CAMEL_LOG_FULL_DEBUG ("Leaving CamelFolder::expunge\n");
-}
-
-
-static void
-_copy_message_to (CamelFolder *folder, CamelMimeMessage *message, CamelFolder *dest_folder, CamelException *ex)
-{
-	gchar *src_msg_filename;
-	guint dest_msg_number;
-	gchar *dest_msg_filename;
-
-	if (IS_CAMEL_MH_FOLDER (dest_folder)) {
-		/*g_return_if_fail (message->parent_folder == folder);*/
-		
-		if (!_find_next_free_message_file (dest_folder, &dest_msg_number, &dest_msg_filename, ex))
-			return;
-		src_msg_filename = gtk_object_get_data (GTK_OBJECT (message), "fullpath");
-		CAMEL_LOG_FULL_DEBUG ("CamelMhFolder::copy_to copy file %s to %s\n", src_msg_filename, dest_msg_filename);
-		copy_reg (src_msg_filename, dest_msg_filename, ex);
-		
-	} else 
-		parent_class->copy_message_to (folder, message, dest_folder, ex);
-}
-
-
-
-/** UID **/
-
-static const gchar *
-_get_message_uid (CamelFolder *folder, CamelMimeMessage *message, CamelException *ex)
-{
-	CamelMhFolder *mh_folder = CAMEL_MH_FOLDER (folder);
-	GArray *uid_array;
-	gboolean found = FALSE;
-	MhUidCouple *uid_couple;
-	gchar *filename;
-	guint file_number;
-	gint i;
-
-	/* if the message already has its uid stored, 
-	   return it */
-	if (message->message_uid)
-		return (message->message_uid);
-
-	/* else, it has a filename associated to it */
-	filename = gtk_object_get_data (GTK_OBJECT (message), "filename");
-	file_number = atoi (file_number);
-	
-	uid_array = mh_folder->uid_array;
-	uid_couple = (MhUidCouple *)uid_array->data;
-	
-	/* look in the uid array for the file number */
-	found = (uid_couple->file_number == file_number);
-	for (i=0; (ilen) && (!found); i++) {		
-		uid_couple++;
-		found = (uid_couple->file_number == file_number);
-	}
-	
-	if (found) return uid_couple->uid;
-	else return NULL;
-
-}
-
-
-static CamelMimeMessage *
-_get_message_by_uid (CamelFolder *folder, const gchar *uid, CamelException *ex)
-{
-	CamelMhFolder *mh_folder = CAMEL_MH_FOLDER (folder);
-	GArray *uid_array;
-	gboolean found = FALSE;
-	MhUidCouple *uid_couple;
-	gint file_number;
-	gchar *filename;
-	CamelMimeMessage *message = NULL;
-	CamelStream *input_stream;
-	int i;
-
-	/* 
-	 * because they are constructed with md5
-	 * signatures, all MH uids are 16 bytes long
-	 */
-	if (strlen (uid) != 16) return NULL;
-
-	uid_array = mh_folder->uid_array;
-	uid_couple = (MhUidCouple *)uid_array->data;
-	
-	found = !strncmp (uid, uid_couple->uid, 16 * sizeof (guchar));
-	for (i=0; (ilen) && (!found); i++) {		
-		uid_couple++;
-		found = !strncmp (uid, uid_couple->uid, 16 * sizeof (guchar));
-	}
-	if (found) {
-		/* physically retrieve the message */
-		file_number = uid_couple->file_number;
-		filename = g_strdup_printf ("%d", file_number);
-		input_stream = camel_stream_buffered_fs_new_with_name (filename, CAMEL_STREAM_BUFFERED_FS_READ);
-		
-		if (input_stream != NULL) {
-#warning use session field here
-			message = camel_mime_message_new ();
-			camel_data_wrapper_construct_from_stream ( CAMEL_DATA_WRAPPER (message), input_stream);
-			gtk_object_unref (GTK_OBJECT (input_stream));
-
-			/* set message UID in CamelMimeMessage */			 
-			message->message_uid = g_strdup (uid);
-			
-		}
-		g_free (filename);
-	}
-
-	return message;
-
-}
-
-static GList *
-_get_uid_list  (CamelFolder *folder, CamelException *ex)
-{
-	CamelMhFolder *mh_folder = CAMEL_MH_FOLDER (folder);
-	GList *uid_list;
-	GArray *uid_array;
-	MhUidCouple *uid_couple;
-	int i;
-	
-	uid_array = mh_folder->uid_array;
-	uid_couple = (MhUidCouple *)uid_array->data;
-
-	for (i=0; ilen; i++) {
-		uid_list = g_list_prepend (uid_list, uid_couple->uid);
-		uid_couple++;
-	}
-
-	return uid_list;
-}
-
-
-
-
-
-
-
-
-/************************************************************************/
-
-/*** Took directly from GNU fileutils-4.0                             ***/
-/* Copyright (C) 89, 90, 91, 95, 96, 97, 1998 Free Software Foundation. */
-/* This may be rwritten soon. -Bertrand                                 */               
-
-    
-/* Write LEN bytes at PTR to descriptor DESC, retrying if interrupted.
-   Return LEN upon success, write's (negative) error code otherwise.  */
-int
-full_write (int desc, const char *ptr, size_t len)
-{
-  int total_written;
-
-  total_written = 0;
-  while (len > 0)
-    {
-      int written = write (desc, ptr, len);
-      if (written < 0)
-	{
-	  if (errno == EINTR)
-	    continue;
-	  return written;
-	}
-      total_written += written;
-      ptr += written;
-      len -= written;
-    }
-  return total_written;
-}
-
-
-
-
-static int
-copy_reg (const char *src_path, const char *dst_path, CamelException *ex)
-{
-  char *buf;
-  int buf_size;
-  int dest_desc;
-  int source_desc;
-  int n_read;
-  struct stat sb;
-  char *cp;
-  int *ip;
-  int return_val = 0;
-  off_t n_read_total = 0;
-  int last_write_made_hole = 0;
-  int make_holes = TRUE;
-
-  source_desc = open (src_path, O_RDONLY);
-  if (source_desc < 0)
-    {
-      /* If SRC_PATH doesn't exist, then chances are good that the
-	 user did something like this `cp --backup foo foo': and foo
-	 existed to start with, but copy_internal renamed DST_PATH
-	 with the backup suffix, thus also renaming SRC_PATH.  */
-      if (errno == ENOENT)
-	error (0, 0, "`%s' and `%s' are the same file",
-	       src_path, dst_path);
-      else
-	error (0, errno, "%s", src_path);
-
-      return -1;
-    }
-
-  /* Create the new regular file with small permissions initially,
-     to not create a security hole.  */
-
-  dest_desc = open (dst_path, O_WRONLY | O_CREAT | O_TRUNC, 0600);
-  if (dest_desc < 0)
-    {
-      error (0, errno, "cannot create regular file `%s'", dst_path);
-      return_val = -1;
-      goto ret2;
-    }
-
-  /* Find out the optimal buffer size.  */
-
-  if (fstat (dest_desc, &sb))
-    {
-      error (0, errno, "%s", dst_path);
-      return_val = -1;
-      goto ret;
-    }
-
-  buf_size = 8192;
-
-
-
-  /* Make a buffer with space for a sentinel at the end.  */
-
-  buf = (char *) alloca (buf_size + sizeof (int));
-
-  for (;;)
-    {
-      n_read = read (source_desc, buf, buf_size);
-      if (n_read < 0)
-	{
-	  if (errno == EINTR)
-	    continue;
-	  error (0, errno, "%s", src_path);
-	  return_val = -1;
-	  goto ret;
-	}
-      if (n_read == 0)
-	break;
-
-      n_read_total += n_read;
-
-      ip = 0;
-      if (make_holes)
-	{
-	  buf[n_read] = 1;	/* Sentinel to stop loop.  */
-
-	  /* Find first nonzero *word*, or the word with the sentinel.  */
-
-	  ip = (int *) buf;
-	  while (*ip++ == 0)
-	    ;
-
-	  /* Find the first nonzero *byte*, or the sentinel.  */
-
-	  cp = (char *) (ip - 1);
-	  while (*cp++ == 0)
-	    ;
-
-	  /* If we found the sentinel, the whole input block was zero,
-	     and we can make a hole.  */
-
-	  if (cp > buf + n_read)
-	    {
-	      /* Make a hole.  */
-	      if (lseek (dest_desc, (off_t) n_read, SEEK_CUR) < 0L)
-		{
-		  error (0, errno, "%s", dst_path);
-		  return_val = -1;
-		  goto ret;
-		}
-	      last_write_made_hole = 1;
-	    }
-	  else
-	    /* Clear to indicate that a normal write is needed. */
-	    ip = 0;
-	}
-      if (ip == 0)
-	{
-	  if (full_write (dest_desc, buf, n_read) < 0)
-	    {
-	      error (0, errno, "%s", dst_path);
-	      return_val = -1;
-	      goto ret;
-	    }
-	  last_write_made_hole = 0;
-	}
-    }
-
-  /* If the file ends with a `hole', something needs to be written at
-     the end.  Otherwise the kernel would truncate the file at the end
-     of the last write operation.  */
-
-  if (last_write_made_hole)
-    {
-#if HAVE_FTRUNCATE
-      /* Write a null character and truncate it again.  */
-      if (full_write (dest_desc, "", 1) < 0
-	  || ftruncate (dest_desc, n_read_total) < 0)
-#else
-      /* Seek backwards one character and write a null.  */
-      if (lseek (dest_desc, (off_t) -1, SEEK_CUR) < 0L
-	  || full_write (dest_desc, "", 1) < 0)
-#endif
-	{
-	  error (0, errno, "%s", dst_path);
-	  return_val = -1;
-	}
-    }
-
-ret:
-  if (close (dest_desc) < 0)
-    {
-      error (0, errno, "%s", dst_path);
-      return_val = -1;
-    }
-ret2:
-  if (close (source_desc) < 0)
-    {
-      error (0, errno, "%s", src_path);
-      return_val = -1;
-    }
-
-  return return_val;
-}
diff --git a/camel/providers/MH/camel-mh-folder.h b/camel/providers/MH/camel-mh-folder.h
deleted file mode 100644
index 40800375eb..0000000000
--- a/camel/providers/MH/camel-mh-folder.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-mh-folder.h : Abstract class for an email folder */
-
-/* 
- *
- * Copyright (C) 1999 Bertrand Guiheneuf  .
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef CAMEL_MH_FOLDER_H
-#define CAMEL_MH_FOLDER_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include 
-#include "camel-folder.h"
-/*  #include "camel-store.h" */
-
-#define CAMEL_MH_FOLDER_TYPE     (camel_mh_folder_get_type ())
-#define CAMEL_MH_FOLDER(obj)     (GTK_CHECK_CAST((obj), CAMEL_MH_FOLDER_TYPE, CamelMhFolder))
-#define CAMEL_MH_FOLDER_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_MH_FOLDER_TYPE, CamelMhFolderClass))
-#define IS_CAMEL_MH_FOLDER(o)    (GTK_CHECK_TYPE((o), CAMEL_MH_FOLDER_TYPE))
-
-
-typedef struct {
-	CamelFolder parent_object;
-	
-	gchar *directory_path;
-	GList *file_name_list;
-	GArray *uid_array;
-
-} CamelMhFolder;
-
-
-
-typedef struct {
-	CamelFolderClass parent_class;
-
-	/* Virtual methods */	
-	
-} CamelMhFolderClass;
-
-
-/* public methods */
-
-/* Standard Gtk function */
-GtkType camel_mh_folder_get_type (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_MH_FOLDER_H */
diff --git a/camel/providers/MH/camel-mh-provider.c b/camel/providers/MH/camel-mh-provider.c
deleted file mode 100644
index 316b8a0797..0000000000
--- a/camel/providers/MH/camel-mh-provider.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-mh-provider.c: mh provider registration code */
-
-/* 
- *
- * Copyright (C) 1999 Bertrand Guiheneuf  .
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#include "config.h"
-#include "camel-mh-store.h"
-#include "camel-provider.h"
-#include "camel-log.h"
-
-
-static CamelProvider _mh_provider = {
-	(GtkType) 0,
-	PROVIDER_STORE,
-	"mh",
-	"Camel default mh provider",
-	"This is a very simple provider, mh is a bad protocol anyway",
-	(GModule *) NULL
-};
-
-
-
-CamelProvider *
-camel_provider_module_init ()
-{
-	_mh_provider.object_type = camel_mh_store_get_type();
-	return &_mh_provider;
-}
diff --git a/camel/providers/MH/camel-mh-store.c b/camel/providers/MH/camel-mh-store.c
deleted file mode 100644
index 60ba07f47b..0000000000
--- a/camel/providers/MH/camel-mh-store.c
+++ /dev/null
@@ -1,153 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-mh-store.c : class for an mh store */
-
-/* 
- *
- * Copyright (C) 1999 Bertrand Guiheneuf  .
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#include "camel-mh-store.h"
-#include "camel-mh-folder.h"
-#include "url-util.h"
-
-static CamelStoreClass *parent_class=NULL;
-
-/* Returns the class for a CamelMhStore */
-#define CMHS_CLASS(so) CAMEL_MH_STORE_CLASS (GTK_OBJECT(so)->klass)
-#define CF_CLASS(so) CAMEL_FOLDER_CLASS (GTK_OBJECT(so)->klass)
-#define CMHF_CLASS(so) CAMEL_MH_FOLDER_CLASS (GTK_OBJECT(so)->klass)
-
-static void _init (CamelStore *store, CamelSession *session, const gchar *url_name);
-static CamelFolder *_get_folder (CamelStore *store, const gchar *folder_name);
-
-
-static void
-camel_mh_store_class_init (CamelMhStoreClass *camel_mh_store_class)
-{
-	CamelStoreClass *camel_store_class = CAMEL_STORE_CLASS (camel_mh_store_class);
-
-	parent_class = gtk_type_class (camel_store_get_type ());
-	
-	/* virtual method definition */
-	/* virtual method overload */
-	camel_store_class->init = _init;
-	camel_store_class->get_folder = _get_folder;
-}
-
-
-
-static void
-camel_mh_store_init (gpointer object, gpointer klass)
-{
-	CamelMhStore *mh_store = CAMEL_MH_STORE (object);
-	CamelStore *store = CAMEL_STORE (object);
-	
-	store->separator = '/';
-}
-
-
-
-
-GtkType
-camel_mh_store_get_type (void)
-{
-	static GtkType camel_mh_store_type = 0;
-	
-	if (!camel_mh_store_type)	{
-		GtkTypeInfo camel_mh_store_info =	
-		{
-			"CamelMhStore",
-			sizeof (CamelMhStore),
-			sizeof (CamelMhStoreClass),
-			(GtkClassInitFunc) camel_mh_store_class_init,
-			(GtkObjectInitFunc) camel_mh_store_init,
-				/* reserved_1 */ NULL,
-				/* reserved_2 */ NULL,
-			(GtkClassInitFunc) NULL,
-		};
-		
-		camel_mh_store_type = gtk_type_unique (CAMEL_STORE_TYPE, &camel_mh_store_info);
-	}
-	
-	return camel_mh_store_type;
-}
-
-
-
-
-/* These evil public functions are here for test only */
-void 
-camel_mh_store_set_toplevel_dir (CamelMhStore *store, const gchar *toplevel)
-{
-	store->toplevel_dir = g_strdup (toplevel);
-	CAMEL_STORE(store)->separator = '/';
-}
-
-
-const gchar *
-camel_mh_store_get_toplevel_dir (CamelMhStore *store)
-{
-	return store->toplevel_dir;
-}
-
-
-
-static void 
-_init (CamelStore *store, CamelSession *session, const gchar *url_name)
-{
-	CamelMhStore *mh_store = CAMEL_MH_STORE (store);
-	Gurl *store_url;
-	
-	g_assert (url_name);
-	/* call parent implementation */
-	parent_class->init (store, session, url_name);
-	
-	
-	/* find the path in the URL*/
-	store_url = g_url_new (url_name);
-
-	g_return_if_fail (store_url);
-	g_return_if_fail (store_url->path); 
-	
-	mh_store->toplevel_dir = g_strdup (store_url->path); 
-	g_url_free (store_url);
-
-	
-	
-}
-
-
-static CamelFolder *
-_get_folder (CamelStore *store, const gchar *folder_name)
-{
-	CamelMhFolder *new_mh_folder;
-	CamelFolder *new_folder;
-
-	/* check if folder has already been created */
-	/* call the standard routine for that when  */
-	/* it is done ... */
-
-	new_mh_folder =  gtk_type_new (CAMEL_MH_FOLDER_TYPE);
-	new_folder = CAMEL_FOLDER (new_mh_folder);
-
-	CF_CLASS (new_folder)->init_with_store (new_folder, store, NULL);
-	CF_CLASS (new_folder)->set_name (new_folder, folder_name, NULL);
-	
-	
-	return new_folder;
-}
diff --git a/camel/providers/MH/camel-mh-store.h b/camel/providers/MH/camel-mh-store.h
deleted file mode 100644
index 924a5a6fc5..0000000000
--- a/camel/providers/MH/camel-mh-store.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-mhstore.h : class for an mh store */
-
-/* 
- *
- * Copyright (C) 1999 Bertrand Guiheneuf  .
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef CAMEL_MH_STORE_H
-#define CAMEL_MH_STORE_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include 
-#include "camel-store.h"
-
-#define CAMEL_MH_STORE_TYPE     (camel_mh_store_get_type ())
-#define CAMEL_MH_STORE(obj)     (GTK_CHECK_CAST((obj), CAMEL_MH_STORE_TYPE, CamelMhStore))
-#define CAMEL_MH_STORE_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_MH_STORE_TYPE, CamelMhStoreClass))
-#define IS_CAMEL_MH_STORE(o)    (GTK_CHECK_TYPE((o), CAMEL_MH_STORE_TYPE))
-
-
-typedef struct {
-	CamelStore parent_object;	
-	
-	gchar *toplevel_dir;	
-} CamelMhStore;
-
-
-
-typedef struct {
-	CamelStoreClass parent_class;
-
-
-} CamelMhStoreClass;
-
-
-/* public methods */
-
-/* Standard Gtk function */
-GtkType camel_mh_store_get_type (void);
-
-void camel_mh_store_set_toplevel_dir (CamelMhStore *store, const gchar *toplevel);
-const gchar *camel_mh_store_get_toplevel_dir (CamelMhStore *store);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_MH_STORE_H */
-
-
diff --git a/camel/providers/MH/mh-summary.c b/camel/providers/MH/mh-summary.c
deleted file mode 100644
index 5a964696e0..0000000000
--- a/camel/providers/MH/mh-summary.c
+++ /dev/null
@@ -1,290 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/* 
- *
- * Copyright (C) 1999 Bertrand Guiheneuf  .
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#include  
-
-#include "mh-uid.h"
-#include "camel-log.h"
-#include "camel-stream.h"
-#include "camel-stream-fs.h"
-#include "camel-stream-buffered-fs.h"
-#include "gmime-utils.h"
-#include "mh-utils.h"
-
-#include  
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-void 
-mh_generate_summary (CamelFolder *folder)
-{
-	CamelMhFolder *mh_folder = CAMEL_MH_FOLDER (folder);
-	CamelFolderSummary *summary;
-	CamelMessageInfo *message_info;
-	CamelFolderInfo *subfolder_info;
-	CamelStream *message_stream;
-	guint file_number;
-	gchar *message_fullpath;
-	gchar *directory_path;
-	GArray *header_array;
-	MhUidCouple *uid_couple;
-	Rfc822Header *cur_header;
-	int i;
-	int n_file;
-	GArray *uid_array;
-
-	CAMEL_LOG_FULL_DEBUG ("CamelMhFolder::generate_summary entering \n");
-
-	g_assert (folder);
-
-	directory_path = mh_folder->directory_path;
-	if (!directory_path) {
-		CAMEL_LOG_FULL_DEBUG ("CamelMhFolder::generate_summary folder has no directory path\n");
-		return;
-	}
-
-	summary = camel_folder_summary_new ();
-	folder->summary = summary;
-
-	uid_array = mh_folder->uid_array;
-	
-	if (!uid_array) {
-		CAMEL_LOG_FULL_DEBUG ("CamelMhFolder::generate_summary "
-				      "no uid list, that probably means there is "
-				      "no message in this folder, exiting \n");
-		return;
-	}
-	uid_couple = (MhUidCouple *)uid_array->data;
-
-	for (n_file=0; n_filelen; n_file++) {
-
-		file_number = uid_couple->file_number;
-
-		message_info = g_new0 (CamelMessageInfo, 1);
-		message_info->uid = g_new0 (guchar, 17);
-		strncpy (message_info->uid, uid_couple->uid, 16);
-
-
-		message_fullpath = g_strdup_printf ("%s/%d", directory_path, file_number);
-		message_stream = camel_stream_buffered_fs_new_with_name (message_fullpath, 
-									 CAMEL_STREAM_BUFFERED_FS_READ);
-		if (!message_stream) {
-			CAMEL_LOG_FULL_DEBUG ("CamelMhFolder::generate_summary "
-					      "could not open %d for reading\n", message_fullpath);
-			g_free (message_fullpath);
-			return;
-		}
-		g_free (message_fullpath);
-		
-		header_array = get_header_array_from_stream (message_stream);
-		gtk_object_unref (GTK_OBJECT (message_stream));
-		
-		for (i=0; ilen; i++) {
-			cur_header = (Rfc822Header *)header_array->data + i;
-			if (!g_strcasecmp (cur_header->name, "subject")) {
-				message_info->subject = cur_header->value;
-				g_free (cur_header->name);
-			} else if (!g_strcasecmp (cur_header->name, "sender")) {
-				message_info->date = cur_header->value;
-				g_free (cur_header->name);
-			} else if (!g_strcasecmp (cur_header->name, "date")) {
-				message_info->date = cur_header->value;
-				g_free (cur_header->name);
-			} else {
-				g_free (cur_header->name);
-				g_free (cur_header->value);
-			}
-		}		
-		g_array_free (header_array, TRUE);
-
-		summary->message_info_list = g_list_append (summary->message_info_list, message_info);
-
-		/* next message in the uid list */
-		uid_couple++;
-	}	
-	CAMEL_LOG_FULL_DEBUG ("CamelMhFolder::generate_summary leaving \n");
-
-}
-
-
-void 
-mh_save_summary (CamelMhFolder *mh_folder)
-{
-	GArray *uid_array;
-	MhUidCouple *first_uid_couple;
-	CamelFolderSummary *summary;
-	GList *msg_info_list;
-	CamelMessageInfo *msg_info;
-	gchar *directory_path = mh_folder->directory_path;
-	gchar *summary_file_path;
-	gint fd;
-	gint i;
-	gint field_lgth;
-	
-	CAMEL_LOG_FULL_DEBUG ("CamelMhFolder::save_summary entering \n");
-
-	summary = CAMEL_FOLDER (mh_folder)->summary;
-	if (!summary) return;
-	
-	summary_file_path = g_strdup_printf ("%s/%s", directory_path, ".camel-summary");
-	CAMEL_LOG_FULL_DEBUG ("In the process of writing %s\n", summary_file_path);
-	fd = open (summary_file_path, O_WRONLY | O_CREAT );
-	
-	if (!fd) {
-		CAMEL_LOG_FULL_DEBUG ("could not open file %s for writing. Exiting.\n", summary_file_path);
-		g_free (summary_file_path);
-		return;
-	}
-	g_free (summary_file_path);
-
-	msg_info_list = summary->message_info_list;
-	while (msg_info_list) {
-		msg_info = msg_info_list->data;
-		/* write subject */
-		field_lgth = msg_info->subject ? strlen (msg_info->subject) : 0;
-		write (fd, &field_lgth, sizeof (gint));
-		if (field_lgth)
-			write (fd, msg_info->subject, field_lgth);
-
-		/* write uid */
-		field_lgth = msg_info->uid ? strlen (msg_info->uid) : 0;
-		write (fd, &field_lgth, sizeof (gint));
-		if (field_lgth)
-			write (fd, msg_info->uid, field_lgth);
-
-		/* write date */
-		field_lgth = msg_info->date ? strlen (msg_info->date) : 0;
-		write (fd, &field_lgth, sizeof (gint));
-		if (field_lgth)
-			write (fd, msg_info->date, field_lgth);
-
-		/* write sender */
-		field_lgth = msg_info->sender ? strlen (msg_info->sender) : 0;
-		write (fd, &field_lgth, sizeof (gint));
-		if (field_lgth)
-			write (fd, msg_info->sender, field_lgth);
-
-		msg_info_list = msg_info_list->next;
-		
-	}
-			
-	close (fd);
-
-	CAMEL_LOG_FULL_DEBUG ("CamelMhFolder::save_summary leaving \n");
-		
-}
-
-
-
-
-
-gint
-mh_load_summary (CamelMhFolder *mh_folder)
-{
-	GArray *uid_array;
-	MhUidCouple *first_uid_couple;
-	CamelFolderSummary *summary;
-	CamelMessageInfo *msg_info;
-	gchar *directory_path = mh_folder->directory_path;
-	gchar *summary_file_path;
-	gint fd;
-	gint i;
-	gint field_lgth;
-	gboolean file_eof;
-	gint stat_error;
-	struct stat stat_buf;
-
-	summary = CAMEL_FOLDER (mh_folder)->summary;
-	if (summary) return 1; /* should we regenerate it ? */
-	
-	summary_file_path = g_strdup_printf ("%s/%s", directory_path, ".camel-summary");
-	CAMEL_LOG_FULL_DEBUG ("In the process of reading %s\n", summary_file_path);
-	fd = open (summary_file_path, O_RDONLY);
-	/* tests if file exists */
-	stat_error = stat (summary_file_path, &stat_buf);
-
-	if (!((stat_error != -1) && S_ISREG (stat_buf.st_mode))) {		
-		CAMEL_LOG_FULL_DEBUG ("could not open file %s for reading. Exiting.\n", summary_file_path);
-		g_free (summary_file_path);
-		return -1;
-	}
-	g_free (summary_file_path);
-	
-	for (;;)  {
-		/* read subject */
-		file_eof = (read (fd, &field_lgth, sizeof (gint)) <= 0);
-		if (file_eof) break;
-		
-		
-		/* allcate a summary if needed */
-		if (!summary) 
-			summary = camel_folder_summary_new ();
-		/* allocate a message info struct */
-		msg_info = g_new0 (CamelMessageInfo, 1);	
-	
-		if (!file_eof && (field_lgth > 0)) {			
-			msg_info->subject = g_new0 (gchar, field_lgth + 1);
-			read (fd, msg_info->subject, field_lgth);
-		} else 
-			msg_info->subject = NULL;
-		
-		/* read uid */
-		if (!file_eof) file_eof = (read (fd, &field_lgth, sizeof (gint)) <= 0);
-		if (!file_eof && (field_lgth > 0)) {		
-			msg_info->uid = g_new0 (gchar, field_lgth + 1);
-			read (fd, msg_info->uid, field_lgth);
-		} else 
-			msg_info->uid = NULL;
-		
-		/* read date */
-		if (!file_eof) file_eof = (read (fd, &field_lgth, sizeof (gint)) <= 0);
-		if (!file_eof && (field_lgth > 0)) {			
-			msg_info->date = g_new0 (gchar, field_lgth + 1);
-			read (fd, msg_info->date, field_lgth);
-		} else 
-			msg_info->date = NULL;
-		
-		/* read sender */
-		if (!file_eof) file_eof = (read (fd, &field_lgth, sizeof (gint)) <= 0);
-		if (!file_eof && (field_lgth > 0)) {			
-			msg_info->sender = g_new0 (gchar, field_lgth + 1);
-			read (fd, msg_info->sender, field_lgth);
-		} else 
-			msg_info->sender = NULL;
-
-		summary->message_info_list = g_list_prepend (summary->message_info_list, 
-							     msg_info);
-	}		
-	
-	CAMEL_FOLDER (mh_folder)->summary = summary;
-			
-	close (fd);
-	return 1;
-}
-
-
diff --git a/camel/providers/MH/mh-summary.h b/camel/providers/MH/mh-summary.h
deleted file mode 100644
index 27c9a21f60..0000000000
--- a/camel/providers/MH/mh-summary.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/* 
- *
- * Copyright (C) 1999 Bertrand Guiheneuf  .
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#ifndef MH_SUMMARY_H
-#define MH_SUMMARY_H 1
-
-#include 
-#include "camel-mh-folder.h"
-
-void mh_generate_summary (CamelFolder *folder);
-void mh_save_summary (CamelMhFolder *mh_folder);
-gint mh_load_summary (CamelMhFolder *mh_folder);
-
-#endif /* MH_SUMMARY_H */
diff --git a/camel/providers/MH/mh-uid.c b/camel/providers/MH/mh-uid.c
deleted file mode 100644
index ebcccacd23..0000000000
--- a/camel/providers/MH/mh-uid.c
+++ /dev/null
@@ -1,220 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/* 
- *
- * Copyright (C) 1999 Bertrand Guiheneuf  .
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#include  
-
-#include "mh-uid.h"
-#include "camel-log.h"
-#include "camel-stream.h"
-#include "camel-stream-fs.h"
-#include "camel-stream-buffered-fs.h"
-#include "gmime-utils.h"
-#include "md5-utils.h"
-#include "mh-utils.h"
-
-#include  
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-void
-mh_uid_get_for_file (gchar *filename, guchar uid[16])
-{
-	CamelStream *message_stream;
-	GArray *header_array;
-	Rfc822Header *cur_header;
-	int i;
-	MD5Context ctx;
-
-
-	message_stream = camel_stream_buffered_fs_new_with_name (filename, 
-								 CAMEL_STREAM_BUFFERED_FS_READ);
-	header_array = get_header_array_from_stream (message_stream);
-	gtk_object_unref (GTK_OBJECT (message_stream));
-	
-	md5_init (&ctx);
-	for (i=0; ilen; i++) {
-		cur_header = (Rfc822Header *)header_array->data + i;
-		if (!g_strcasecmp (cur_header->name, "subject")) {
-			md5_update (&ctx, cur_header->value, strlen (cur_header->value));
-		} else if (!g_strcasecmp (cur_header->name, "sender")) {
-			md5_update (&ctx, cur_header->value, strlen (cur_header->value));
-		} else if (!g_strcasecmp (cur_header->name, "date")) {
-			md5_update (&ctx, cur_header->value, strlen (cur_header->value));			
-		}
-		
-		g_free (cur_header->name);
-		g_free (cur_header->value);
-		
-	}
-	
-	g_array_free (header_array, TRUE);
-	
-	md5_final (&ctx, uid);
-}
-
-
-
-
-void 
-mh_save_uid_list (CamelMhFolder *mh_folder)
-{
-	GArray *uid_array;
-	MhUidCouple *first_uid_couple;
-	gchar *directory_path = mh_folder->directory_path;
-	gchar *uidfile_path;
-	int fd;
-	int i;
-	
-	
-	uidfile_path = g_strdup_printf ("%s/%s", directory_path, ".camel-uid-list");
-	CAMEL_LOG_FULL_DEBUG ("In the process of writing %s\n", uidfile_path);
-	fd = open (uidfile_path, O_WRONLY | O_CREAT );
-	
-	if (!fd) {
-		CAMEL_LOG_FULL_DEBUG ("could not open file %s for writing. Exiting.\n", uidfile_path);
-		g_free (uidfile_path);
-		return;
-	}
-	g_free (uidfile_path);
-
-	uid_array = mh_folder->uid_array;
-	first_uid_couple = (MhUidCouple *)uid_array->data;
-
-	/* write the number of uid contained in the file */
-	write (fd, &(uid_array->len), sizeof (guint));
-	CAMEL_LOG_FULL_DEBUG ("%d entrie present in the list\n", uid_array->len);
-	/* now write the array of uid self */
-	write (fd, first_uid_couple, sizeof (MhUidCouple) * uid_array->len);
-	
-	close (fd);
-}
-
-
-gint 
-mh_load_uid_list (CamelMhFolder *mh_folder)
-{
-	GArray *new_uid_array;
-	MhUidCouple *first_uid_couple;
-	gchar *directory_path = mh_folder->directory_path;
-	gchar *uidfile_path;
-	int fd;
-	guint uid_nb;
-	struct stat stat_buf;
-	gint stat_error = 0;
-	
-	uidfile_path = g_strdup_printf ("%s/%s", directory_path, ".camel-uid-list");
-
-	/* tests if file exists */
-	stat_error = stat (uidfile_path, &stat_buf);
-	
-
-	if (!((stat_error != -1) && S_ISREG (stat_buf.st_mode))) {
-		CAMEL_LOG_FULL_DEBUG ("CamelMhFolder::load_uid_list "
-				      "file %s does not exist. Exiting.\n", uidfile_path);
-		g_free (uidfile_path);
-		return -1;
-	}
-
-	fd = open (uidfile_path, O_RDONLY);
-	g_free (uidfile_path);
-	if (!fd) return -1;
-	
-	if (mh_folder->uid_array) g_array_free (mh_folder->uid_array, FALSE);
-
-	/* read the number of uids in the file */
-	read (fd, &uid_nb, sizeof (guint));
-	CAMEL_LOG_FULL_DEBUG ("reading %d uid_entries\n", uid_nb);
-	new_uid_array = g_array_new (FALSE, FALSE, sizeof (MhUidCouple));
-	new_uid_array = g_array_set_size (new_uid_array, uid_nb);
-	first_uid_couple = (MhUidCouple *)new_uid_array->data;
-	
-	
-	read (fd, first_uid_couple, sizeof (MhUidCouple) * uid_nb);
-	
-	mh_folder->uid_array = new_uid_array;		
-
-	return 1;
-}
-
-
-gint 
-mh_generate_uid_list (CamelMhFolder *mh_folder)
-{	
-	GArray *new_uid_array;
-	const gchar *directory_path;
-	struct dirent *dir_entry;
-	DIR *dir_handle;
-	gchar *msg_path;
-	guint msg_count;	
-	MhUidCouple *uid_couple;
-	guint file_number;
-
-	g_assert (mh_folder);
-	CAMEL_LOG_FULL_DEBUG ("in the process of creating uid list \n");
-	directory_path = mh_folder->directory_path;
-	if (!directory_path) {
-		CAMEL_LOG_FULL_DEBUG ("folder has no directory path. Exiting\n");
-		return -1;
-	}
-		
-	msg_count = camel_folder_get_message_count (CAMEL_FOLDER (mh_folder), NULL);
-	if (!msg_count) {
-		CAMEL_LOG_FULL_DEBUG ("no message in %s. Exiting\n", directory_path);
-		return -1;
-	}
-	
-	new_uid_array = g_array_new (FALSE, FALSE, sizeof (MhUidCouple));
-	new_uid_array = g_array_set_size (new_uid_array, msg_count);
-	uid_couple = (MhUidCouple *)new_uid_array->data;
-
-	dir_handle = opendir (directory_path);
-	
-	/* read first entry in the directory */
-	dir_entry = readdir (dir_handle);
-	while (dir_entry != NULL) {
-
-		/* tests if the entry correspond to a message file */
-		if (mh_is_a_message_file (dir_entry->d_name, directory_path)) {
-						
-			/* get the uid for this message */
-			msg_path = g_strdup_printf ("%s/%s", directory_path, dir_entry->d_name);
-			mh_uid_get_for_file (msg_path, uid_couple->uid);
-			g_free (msg_path);
-
-			/* convert filename into file number */
-			uid_couple->file_number = atoi (dir_entry->d_name);
-			uid_couple++;
-		}
-			
-		/* read next entry */
-		dir_entry = readdir (dir_handle);
-	}
-
-	closedir (dir_handle);
-	mh_folder->uid_array = new_uid_array;
-}
diff --git a/camel/providers/MH/mh-uid.h b/camel/providers/MH/mh-uid.h
deleted file mode 100644
index 63dfe5b159..0000000000
--- a/camel/providers/MH/mh-uid.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/* 
- *
- * Copyright (C) 1999 Bertrand Guiheneuf  .
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#ifndef MH_UID_H
-#define MH_UID_H 1
-
-#include 
-#include "camel-mh-folder.h"
-
-
-typedef struct {
-	gchar uid[16];
-	guint file_number;
-} MhUidCouple;
-
-void mh_uid_get_for_file (gchar *filename, guchar uid[16]);
-void mh_save_uid_list (CamelMhFolder *mh_folder);
-gint mh_load_uid_list (CamelMhFolder *mh_folder);
-gint mh_generate_uid_list (CamelMhFolder *mh_folder);
-
-#endif /* MH_UID_H */
diff --git a/camel/providers/MH/mh-utils.c b/camel/providers/MH/mh-utils.c
deleted file mode 100644
index 51bb84bc65..0000000000
--- a/camel/providers/MH/mh-utils.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/* 
- *
- * Copyright (C) 1999 Bertrand Guiheneuf  .
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#include 
-#include "mh-utils.h"
-
-#include  
-
-gboolean
-mh_is_a_message_file (const gchar *file_name, const gchar *file_path)
-{
-	struct stat stat_buf;
-	gint stat_error = 0;
-	gboolean ok;
-	gchar *full_file_name;
-	int i;
-	
-	/* test if the name is a number */
-	i=0;
-	while ((file_name[i] != '\0') && (file_name[i] >= '0') && (file_name[i] <= '9'))
-		i++;
-	if ((i==0) || (file_name[i] != '\0')) return FALSE;
-	
-	/* is it a regular file ? */
-	full_file_name = g_strdup_printf ("%s/%s", file_path, file_name);
-	stat_error = stat (full_file_name, &stat_buf);
-	g_free (full_file_name);
-
-	return  ((stat_error != -1) && S_ISREG (stat_buf.st_mode));
-}
-
diff --git a/camel/providers/MH/mh-utils.h b/camel/providers/MH/mh-utils.h
deleted file mode 100644
index 968228b0a3..0000000000
--- a/camel/providers/MH/mh-utils.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/* 
- *
- * Copyright (C) 1999 Bertrand Guiheneuf  .
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#ifndef MH_UTILS_H
-#define MH_UTILS_H 1
-
-#include 
-
-gboolean mh_is_a_message_file (const gchar *file_name, const gchar *file_path);
-
-#endif /* MH_UTILS_H */
diff --git a/camel/providers/Makefile.am b/camel/providers/Makefile.am
deleted file mode 100644
index 964104adba..0000000000
--- a/camel/providers/Makefile.am
+++ /dev/null
@@ -1,6 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-SUBDIRS = mbox pop3 sendmail smtp vee
-
-# these ones are disabled for the moment.
-# MH maildir nntp smtp
diff --git a/camel/providers/imap/.cvsignore b/camel/providers/imap/.cvsignore
deleted file mode 100644
index fd6b811c68..0000000000
--- a/camel/providers/imap/.cvsignore
+++ /dev/null
@@ -1,7 +0,0 @@
-.deps
-Makefile
-Makefile.in
-.libs
-.deps
-*.lo
-*.la
diff --git a/camel/providers/imap/Makefile.am b/camel/providers/imap/Makefile.am
deleted file mode 100644
index 00cad46ec2..0000000000
--- a/camel/providers/imap/Makefile.am
+++ /dev/null
@@ -1,41 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-SUBDIRS = 
-
-libcamelmboxincludedir = $(includedir)/camel
-
-
-providerdir = $(pkglibdir)/camel-providers/$(VERSION)
-
-provider_LTLIBRARIES = libcamelimap.la
-provider_DATA = libcamelimap.urls
-
-INCLUDES = -I.. \
-	-I$(srcdir)/..				\
-	-I$(top_srcdir)/camel			\
-	-I$(top_srcdir)/intl			\
-	-I$(top_srcdir)/libibex			\
-	-I$(top_srcdir)/e-util			\
-	-I$(top_srcdir)				\
-	-I$(includedir)				\
-	$(GTK_INCLUDEDIR)			\
-	-DG_LOG_DOMAIN=\"camel-imap-provider\"	
-
-libcamelimap_la_SOURCES = 			\
-	camel-imap-folder.c			\
-	camel-imap-provider.c			\
-	camel-imap-store.c			\
-	camel-imap-summary.c
-
-libcamelimapinclude_HEADERS =			\
-	camel-imap-folder.h			\
-	camel-imap-store.h			\
-	camel-imap-summary.h
-
-libcamelimap_la_LDFLAGS = -version-info 0:0:0 -rpath $(libdir) 
-
-libcamelimap_la_LIBADD = $(top_builddir)/e-util/libeutil.la $(top_builddir)/libibex/libibex.la $(UNICODE_LIBS)
-#libcamelimap_la_LIBADD = $(top_builddir)/libibex/libibex.la $(UNICODE_LIBS)
-
-EXTRA_DIST = libcamelimap.urls
-
diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c
deleted file mode 100644
index e4ad9699fb..0000000000
--- a/camel/providers/imap/camel-imap-folder.c
+++ /dev/null
@@ -1,689 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; fill-column: 160 -*- */
-/* camel-imap-folder.c : Abstract class for an email folder */
-
-/* 
- * Authors: Jeffrey Stedfast  
- *
- * Copyright (C) 2000 Helix Code, Inc.
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#include  
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include "camel-imap-folder.h"
-#include "camel-imap-store.h"
-#include "string-utils.h"
-#include "camel-stream-fs.h"
-#include "camel-data-wrapper.h"
-#include "camel-mime-message.h"
-#include "camel-stream-filter.h"
-#include "camel-mime-filter-from.h"
-#include "camel-exception.h"
-
-#define d(x)
-
-static CamelFolderClass *parent_class = NULL;
-
-static void imap_init (CamelFolder *folder, CamelStore *parent_store,
-		   CamelFolder *parent_folder, const gchar *name,
-		   gchar separator, CamelException *ex);
-
-static void imap_open (CamelFolder *folder, CamelFolderOpenMode mode, CamelException *ex);
-static void imap_close (CamelFolder *folder, gboolean expunge, CamelException *ex);
-static gboolean imap_exists (CamelFolder *folder, CamelException *ex);
-static gboolean imap_create(CamelFolder *folder, CamelException *ex);
-static gboolean imap_delete (CamelFolder *folder, gboolean recurse, CamelException *ex);
-static gboolean imap_delete_messages (CamelFolder *folder, CamelException *ex);
-static gint imap_get_message_count (CamelFolder *folder, CamelException *ex);
-static void imap_append_message (CamelFolder *folder, CamelMimeMessage *message, CamelException *ex);
-static GPtrArray *imap_get_uids (CamelFolder *folder, CamelException *ex);
-static GPtrArray *imap_get_subfolder_names (CamelFolder *folder, CamelException *ex);
-static GPtrArray *imap_get_summary (CamelFolder *folder, CamelException *ex);
-static void imap_free_summary (CamelFolder *folder, GPtrArray *array);
-static CamelMimeMessage *imap_get_message_by_uid (CamelFolder *folder, const gchar *uid, 
-						  CamelException *ex);
-
-static void imap_expunge (CamelFolder *folder, CamelException *ex);
-
-#if 0
-static void _copy_message_to (CamelFolder *folder, CamelMimeMessage *message, 
-			      CamelFolder *dest_folder, CamelException *ex);
-static const gchar *_get_message_uid (CamelFolder *folder, CamelMimeMessage *message, 
-				      CamelException *ex);
-#endif
-
-static void imap_delete_message_by_uid(CamelFolder *folder, const gchar *uid, CamelException *ex);
-
-static const CamelMessageInfo *imap_summary_get_by_uid(CamelFolder *f, const char *uid);
-
-static GList *imap_search_by_expression(CamelFolder *folder, const char *expression, CamelException *ex);
-
-static void imap_finalize (GtkObject *object);
-
-static void
-camel_imap_folder_class_init (CamelImapFolderClass *camel_imap_folder_class)
-{
-	CamelFolderClass *camel_folder_class = CAMEL_FOLDER_CLASS (camel_imap_folder_class);
-	GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (camel_folder_class);
-
-	parent_class = gtk_type_class (camel_folder_get_type ());
-		
-	/* virtual method definition */
-
-	/* virtual method overload */
-	camel_folder_class->init = imap_init;
-
-	camel_folder_class->open = imap_open;
-	camel_folder_class->close = imap_close;
-
-	camel_folder_class->exists = imap_exists;
-	camel_folder_class->create = imap_create;
-	camel_folder_class->delete = imap_delete;
-
-	camel_folder_class->delete_messages = imap_delete_messages;
-	camel_folder_class->get_message_count = imap_get_message_count;
-	camel_folder_class->append_message = imap_append_message;
-	camel_folder_class->get_uids = imap_get_uids;
-	camel_folder_class->get_subfolder_names = imap_get_subfolder_names;
-	camel_folder_class->get_summary = imap_get_summary;
-	camel_folder_class->free_summary = imap_free_summary;
-	camel_folder_class->expunge = imap_expunge;
-
-	camel_folder_class->get_message_by_uid = imap_get_message_by_uid;
-	camel_folder_class->delete_message_by_uid = imap_delete_message_by_uid;
-
-	camel_folder_class->search_by_expression = imap_search_by_expression;
-
-	camel_folder_class->summary_get_by_uid = imap_summary_get_by_uid;
-
-	gtk_object_class->finalize = imap_finalize;
-	
-}
-
-static void
-camel_imap_folder_init (gpointer object, gpointer klass)
-{
-	CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER (object);
-	CamelFolder *folder = CAMEL_FOLDER (object);
-
-	folder->can_hold_messages = TRUE;
-	folder->can_hold_folders = TRUE;
-	folder->has_summary_capability = FALSE;
-	folder->has_search_capability = FALSE;
-
-	imap_folder->count = -1;
-}
-
-GtkType
-camel_imap_folder_get_type (void)
-{
-	static GtkType camel_imap_folder_type = 0;
-	
-	if (!camel_imap_folder_type)	{
-		GtkTypeInfo camel_imap_folder_info =	
-		{
-			"CamelImapFolder",
-			sizeof (CamelImapFolder),
-			sizeof (CamelImapFolderClass),
-			(GtkClassInitFunc) camel_imap_folder_class_init,
-			(GtkObjectInitFunc) NULL,
-				/* reserved_1 */ NULL,
-				/* reserved_2 */ NULL,
-			(GtkClassInitFunc) NULL,
-		};
-		
-		camel_imap_folder_type = gtk_type_unique (CAMEL_FOLDER_TYPE, &camel_imap_folder_info);
-	}
-	
-	return camel_imap_folder_type;
-}
-
-CamelFolder *
-camel_imap_folder_new (CamelStore *parent, CamelException *ex)
-{
-	/* TODO: code this */
-	CamelFolder *folder = CAMEL_FOLDER (gtk_object_new (camel_imap_folder_get_type (), NULL));
-
-	CF_CLASS (folder)->init (folder, parent, NULL, "inbox", '/', ex);
-	return folder;
-}
-
-static void           
-imap_finalize (GtkObject *object)
-{
-	CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER (object);
-
-	g_free (imap_folder->folder_file_path);
-	g_free (imap_folder->folder_dir_path);
-
-	GTK_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-static void 
-imap_init (CamelFolder *folder, CamelStore *parent_store, CamelFolder *parent_folder,
-	   const gchar *name, gchar separator, CamelException *ex)
-{
-	CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER (folder);
-	const gchar *root_dir_path;
-
-	/* call parent method */
-	parent_class->init (folder, parent_store, parent_folder, name, separator, ex);
-	if (camel_exception_get_id (ex))
-		return;
-
-	/* we assume that the parent init
-	   method checks for the existance of @folder */
-	folder->can_hold_messages = TRUE;
-	folder->can_hold_folders = TRUE;
-	folder->has_summary_capability = FALSE;  /* TODO: double-check this */
-	folder->has_search_capability = TRUE;
-
-	folder->permanent_flags = CAMEL_MESSAGE_SEEN |
-		CAMEL_MESSAGE_ANSWERED |
-		CAMEL_MESSAGE_FLAGGED |
-		CAMEL_MESSAGE_DELETED |
-		CAMEL_MESSAGE_DRAFT |
-		CAMEL_MESSAGE_USER;  /* some IMAP daemons support user-flags */
-
- 	imap_folder->summary = NULL;
- 	imap_folder->search = NULL;
-
-	/* now set the name info */
-	g_free (imap_folder->folder_file_path);
-	g_free (imap_folder->folder_dir_path);
-	g_free (imap_folder->index_file_path);
-
-	root_dir_path = camel_imap_store_get_toplevel_dir (CAMEL_IMAP_STORE(folder->parent_store));
-
-	imap_folder->folder_file_path = g_strdup_printf ("%s/%s", root_dir_path, folder->full_name);
-	imap_folder->folder_dir_path = g_strdup_printf ("%s/%s.sdb", root_dir_path, folder->full_name);
-	imap_folder->index_file_path = g_strdup_printf ("%s/%s.ibex", root_dir_path, folder->full_name);
-}
-
-static void
-imap_open (CamelFolder *folder, CamelFolderOpenMode mode, CamelException *ex)
-{
-	CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER (folder);
-	gchar *result;
-	gint status;
-
-	camel_imap_store_open (CAMEL_IMAP_STORE (folder->parent_store), ex);
-	if (camel_exception_get_id (ex) == CAMEL_EXCEPTION_NONE) {
-		/* do we actually want to do this? probably not */
-		parent_class->open (folder, mode, ex);
-
-		/* SELECT the IMAP mail spool */
-		status = camel_imap_command_extended (CAMEL_IMAP_STORE (folder->parent_store), &result,
-				     "SELECT %s", imap_folder->folder_file_path);
-
-		if (status != CAMEL_IMAP_OK) {
-			CamelService *service = CAMEL_SERVICE (folder->parent_store);
-			camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
-					      "Could not SELECT %s on IMAP "
-					      "server %s: %s.", imap_folder->folder_file_path, 
-					      service->url->host, 
-					      status == CAMEL_IMAP_ERR ? result :
-					      "Unknown error");
-			g_free (result);
-			return -1;
-		}
-
-		g_free(result);
-	}
-}
-
-static void
-imap_close (CamelFolder *folder, gboolean expunge, CamelException *ex)
-{
-	camel_imap_store_close (CAMEL_IMAP_STORE (folder->parent_store), expunge, ex);
-	if (camel_exception_get_id (ex) == CAMEL_EXCEPTION_NONE) 
-		parent_class->close (folder, expunge, ex);
-}
-
-static void
-imap_expunge (CamelFolder *folder, CamelException *ex)
-{
-	CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER (folder);
-	gchar *result;
-	gint status;
-
-	status = camel_imap_command_extended (CAMEL_IMAP_STORE (folder->parent_store), &result,
-					      "EXPUNGE");
-	
-	if (status != CAMEL_IMAP_OK) {
-		CamelService *service = CAMEL_SERVICE (folder->parent_store);
-		camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
-				      "Could not EXPUNGE from IMAP "
-				      "server %s: %s.", service->url->host,
-				      status == CAMEL_IMAP_ERR ? result :
-				      "Unknown error");
-		g_free (result);
-		return -1;
-	}
-	
-	g_free(result);
-}
-
-static gboolean
-imap_exists (CamelFolder *folder, CamelException *ex)
-{
-	/* TODO: look at Mbox code and figure out exactly what needs to be done here */
-	CamelImapFolder *imap_folder;
-	struct stat stat_buf;
-	gint stat_error;
-	gboolean exists;
-
-	g_assert(folder != NULL);
-
-	imap_folder = CAMEL_IMAP_FOLDER (folder);
-
-	/* check if the imap file path is determined */
-	if (!imap_folder->folder_file_path) {
-		camel_exception_set (ex, CAMEL_EXCEPTION_FOLDER_INVALID,
-				     "undetermined folder file path. Maybe use set_name ?");
-		return FALSE;
-	}
-
-	/* check if the imap dir path is determined */
-	if (!imap_folder->folder_dir_path) {
-		camel_exception_set (ex, CAMEL_EXCEPTION_FOLDER_INVALID,
-				     "undetermined folder directory path. Maybe use set_name ?");
-		return FALSE;
-	}
-
-	/* TODO: Finish coding this. */
-}
-
-static gboolean
-imap_create (CamelFolder *folder, CamelException *ex)
-{
-        /* NOTE: this should probably be pretty easy to code... */
-	CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER (folder);
-	const gchar *folder_file_path, *folder_dir_path;
-	gboolean folder_already_exists;
-
-	g_assert(folder != NULL);
-
-	/* call default implementation */
-	parent_class->create (folder, ex);
-
-	/* get the paths of what we need to create */
-	folder_file_path = imap_folder->folder_file_path;
-	folder_dir_path = imap_folder->folder_dir_path;
-	
-	if (!(folder_file_path || folder_dir_path)) {
-		camel_exception_set (ex, CAMEL_EXCEPTION_FOLDER_INVALID,
-				     "invalid folder path. Use set_name ?");
-		return FALSE;
-	}
-
-	
-	/* if the folder already exists, simply return */
-	folder_already_exists = camel_folder_exists (folder, ex);
-	if (camel_exception_get_id (ex))
-		return FALSE;
-
-	if (folder_already_exists)
-		return TRUE;
-
-
-	/* create the directory for the subfolder */
-	/* TODO: actually code this */
-}
-
-
-static gboolean
-imap_delete (CamelFolder *folder, gboolean recurse, CamelException *ex)
-{
-	/* NOTE: should be pretty simple as well, just needa break out the RFC ;-) */
-	CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER (folder);
-
-	return TRUE;
-}
-
-/* TODO: remove this */
-gboolean
-imap_delete_messages (CamelFolder *folder, CamelException *ex)
-{
-	/* TODO: delete the messages (mark as deleted/whatever) */
-	CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER (folder);
-	gchar *result;
-	gint status;
-
-	g_return_val_if_fail (folder != NULL, FALSE);
-
-
-	return TRUE;
-}
-
-static gint
-imap_get_message_count (CamelFolder *folder, CamelException *ex)
-{
-	CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER (folder);
-	gint status;
-	gchar *result, *msg_count;
-
-	g_return_val_if_fail (folder != NULL, -1);
-
-	if (imap_folder->count != -1)
-		imap_folder->count;
-
-	status = camel_imap_command_extended (CAMEL_IMAP_STORE (folder->parent_store), &result,
-				     "STATUS %s (MESSAGES)", imap_folder->folder_file_path);
-
-	if (status != CAMEL_IMAP_OK) {
-		CamelService *service = CAMEL_SERVICE (folder->parent_store);
-		camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
-				      "Could not get message count from IMAP "
-				      "server %s: %s.", service->url->host,
-				      status == CAMEL_IMAP_ERR ? result :
-				      "Unknown error");
-		g_free (result);
-		return -1;
-	}
-
-	/* parse out the message count - should come in the form: "* STATUS  (MESSAGES )\r\n" */
-	if (result && *result == '*' ) {
-		if (msg_count = strstr(result, "MESSAGES")) {
-			msg_count += strlen("MESSAGES") + 1;
-
-			/* we should now be pointing to the message count */
-			imap_folder->count = atoi(msg_count);
-		}
-	}
-	g_free(result);
-
-	return imap_folder->count;
-}
-
-static void
-imap_append_message (CamelFolder *folder, CamelMimeMessage *message, CamelException *ex)
-{
-	g_warning("CamelImapFolder::imap_append_message(): This feature not supported by IMAP\n");
-	
-	camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
-			      "This feature not supported by IMAP");
-}
-
-static GPtrArray *
-imap_get_uids (CamelFolder *folder, CamelException *ex) 
-{
-	/* TODO: Find out what this is actually supposed to do */
-	GPtrArray *array;
-	CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER (folder);
-	gint i, count;
-
-	count = camel_folder_summary_count((CamelFolderSummary *)imap_folder->summary);
-	array = g_ptr_array_new ();
-	g_ptr_array_set_size (array, count);
-	for (i = 0; i < count; i++) {
-		CamelImapMessageInfo *info = 
-			(CamelImapMessageInfo *)camel_folder_summary_index((CamelFolderSummary *)imap_folder->summary, i);
-		array->pdata[i] = g_strdup(info->info.uid);
-	}
-	
-	return array;
-}
-
-static GPtrArray *
-imap_get_subfolder_names (CamelFolder *folder, CamelException *ex)
-{
-	/* NOTE: use LSUB or LIST - preferably LSUB but I managed with LIST in Spruce */
-	CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER (folder);
-	GPtrArray *listing;
-	gint status;
-	gchar *result;
-
-	g_return_val_if_fail (folder != NULL, g_ptr_array_new());
-
-	if (imap_folder->count != -1)
-		imap_folder->count;
-
-	status = camel_imap_command_extended (CAMEL_IMAP_STORE (folder->parent_store), &result,
-				     "LSUB \"\" \"%s\"", imap_folder->folder_file_path);
-
-	if (status != CAMEL_IMAP_OK) {
-		CamelService *service = CAMEL_SERVICE (folder->parent_store);
-		camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
-				      "Could not get subfolder listing from IMAP "
-				      "server %s: %s.", service->url->host,
-				      status == CAMEL_IMAP_ERR ? result :
-				      "Unknown error");
-		g_free (result);
-		return g_ptr_array_new ();
-	}
-
-	/* parse out the subfolders */
-	listing = g_ptr_array_new ();
-	if (result) {
-		ptr = result;
-		while (*ptr == '*') {
-			gchar *flags, *param, *end, *dir_sep;
-
-			ptr = flags = strchr(ptr, '(') + 1;    /* jump to the flags section */
-			end = strchr(flags, ')');              /* locate end of flags */
-			flags = strndup(flags, (gint)(end - flags));
-
-			if (strstr(flags, "\\NoSelect")) {
-				g_free(flags);
-				continue;
-			}
-			g_free(flags);
-
-			ptr = dir_sep = strchr(ptr, '"') + 1;  /* jump to the first param */
-			end = strchr(param, '"');              /* locate the end of the param */
-			dir_sep = g_strndup(dir_sep, (gint)(end - param));
-
-			/* skip to the actual directory parameter */
-			for (ptr = end++; *ptr == ' '; ptr++);
-                        for (end = ptr; *end && *end != '\n'; end++);
-			param = g_strndup(ptr, (gint)(end - ptr));
-
-			g_ptr_array_add (listing, param);
-
-			g_free(dir_sep);  /* TODO: decide if we really need dir_sep */
-
-			if (*end)
-				ptr = end + 1;
-			else
-				ptr = end;
-		}
-	}
-	g_free(result);
-
-	return listing;
-}
-
-static void
-imap_delete_message_by_uid(CamelFolder *folder, const gchar *uid, CamelException *ex)
-{
-	/* NOTE: should be as easy as marking as deleted - which should be easy in IMAP */
-	CamelImapFolder *mf = (CamelImapFolder *)folder;
-
-	info = camel_folder_summary_uid((CamelFolderSummary *)mf->summary, uid);
-	if (info) {
-		info->flags |=  CAMEL_MESSAGE_DELETED | CAMEL_MESSAGE_FOLDER_FLAGGED;
-		camel_folder_summary_touch((CamelFolderSummary *)mf->summary);
-	}
-}
-
-/* track flag changes in the summary */
-static void
-message_changed(CamelMimeMessage *m, int type, CamelImapFolder *mf)
-{
-	/* TODO: find a way to do this in IMAP - will probably not be easy */
-	CamelMessageInfo *info;
-	CamelFlag *flag;
-
-	printf("Message changed: %s: %d\n", m->message_uid, type);
-	switch (type) {
-	case MESSAGE_FLAGS_CHANGED:
-		info = camel_folder_summary_uid((CamelFolderSummary *)mf->summary, m->message_uid);
-		if (info) {
-			info->flags = m->flags | CAMEL_MESSAGE_FOLDER_FLAGGED;
-			camel_flag_list_free(&info->user_flags);
-			flag = m->user_flags;
-			while (flag) {
-				camel_flag_set(&info->user_flags, flag->name, TRUE);
-				flag = flag->next;
-			}
-			camel_folder_summary_touch((CamelFolderSummary *)mf->summary);
-		} else
-			g_warning("Message changed event on message not in summary: %s", m->message_uid);
-		break;
-	default:
-		printf("Unhandled message change event: %d\n", type);
-		break;
-	}
-}
-
-static CamelMimeMessage *
-imap_get_message_by_uid (CamelFolder *folder, const gchar *uid, CamelException *ex)
-{
-	/* NOTE: extremely easy to do in IMAP - just needa code it ;-) */
-	CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER (folder);
-	CamelStream *message_stream = NULL;
-	CamelMimeMessage *message = NULL;
-	CamelImapMessageInfo *info;
-	CamelMimeParser *parser = NULL;
-	char *buffer;
-	int len;
-
-	/* get the message summary info */
-	info = (CamelImapMessageInfo *)camel_folder_summary_uid((CamelFolderSummary *)imap_folder->summary, uid);
-
-	if (info == NULL) {
-		errno = ENOENT;
-		goto fail;
-	}
-
-	/* if this has no content, its an error in the library */
-	g_assert(info->info.content);
-	g_assert(info->frompos != -1);
-
-	/* where we read from */
-	message_stream = camel_stream_fs_new_with_name (imap_folder->folder_file_path, O_RDONLY, 0);
-	if (message_stream == NULL)
-		goto fail;
-
-	/* we use a parser to verify the message is correct, and in the correct position */
-	parser = camel_mime_parser_new();
-	camel_mime_parser_init_with_stream(parser, message_stream);
-	gtk_object_unref((GtkObject *)message_stream);
-	camel_mime_parser_scan_from(parser, TRUE);
-
-	camel_mime_parser_seek(parser, info->frompos, SEEK_SET);
-	if (camel_mime_parser_step(parser, &buffer, &len) != HSCAN_FROM) {
-		g_warning("File appears truncated");
-		goto fail;
-	}
-
-	if (camel_mime_parser_tell_start_from(parser) != info->frompos) {
-		g_warning("Summary doesn't match the folder contents!  eek!");
-		errno = EINVAL;
-		goto fail;
-	}
-
-	message = camel_mime_message_new();
-	if (camel_mime_part_construct_from_parser((CamelMimePart *)message, parser) == -1) {
-		g_warning("Construction failed");
-		goto fail;
-	}
-
-	/* we're constructed, finish setup and clean up */
-	message->folder = folder;
-	gtk_object_ref((GtkObject *)folder);
-	message->message_uid = g_strdup(uid);
-	message->flags = info->info.flags;
-	gtk_signal_connect((GtkObject *)message, "message_changed", message_changed, folder);
-
-	gtk_object_unref((GtkObject *)parser);
-
-	return message;
-
-fail:
-	camel_exception_setv (ex, CAMEL_EXCEPTION_FOLDER_INVALID_UID,
-			      "Cannot get message: %s",
-			      g_strerror(errno));
-
-	if (parser)
-		gtk_object_unref((GtkObject *)parser);
-	if (message)
-		gtk_object_unref((GtkObject *)message);
-
-	return NULL;
-}
-
-GPtrArray *
-imap_get_summary (CamelFolder *folder, CamelException *ex)
-{
-	/* TODO: what should we do here?? */
-	CamelImapFolder *imap_folder = (CamelImapFolder *)folder;
-
-	return ((CamelFolderSummary *)imap_folder->summary)->messages;
-}
-
-void
-imap_free_summary (CamelFolder *folder, GPtrArray *array)
-{
-	/* This is IMAP dude, no need to free a summary */
-	return;
-}
-
-/* get a single message info, by uid */
-static const CamelMessageInfo *
-imap_summary_get_by_uid(CamelFolder *f, const char *uid)
-{
-	/* TODO: what do we do here? */
-	CamelImapFolder *imap_folder = (CamelImapFolder *)f;
-
-	return camel_folder_summary_uid((CamelFolderSummary *)imap_folder->summary, uid);
-}
-
-static GList *
-imap_search_by_expression(CamelFolder *folder, const char *expression, CamelException *ex)
-{
-	/* TODO: find a good way of doing this */
-	CamelImapFolder *imap_folder = (CamelImapFolder *)folder;
-
-	if (imap_folder->search == NULL) {
-		imap_folder->search = camel_folder_search_new();
-	}
-
-	camel_folder_search_set_folder(imap_folder->search, folder);
-	if (imap_folder->summary)
-		/* FIXME: dont access summary array directly? */
-		camel_folder_search_set_summary(imap_folder->search, ((CamelFolderSummary *)imap_folder->summary)->messages);
-	camel_folder_search_set_body_index(imap_folder->search, imap_folder->index);
-
-	return camel_folder_search_execute_expression(imap_folder->search, expression, ex);
-}
-
-
-
-
-
diff --git a/camel/providers/imap/camel-imap-folder.h b/camel/providers/imap/camel-imap-folder.h
deleted file mode 100644
index 54605cfb35..0000000000
--- a/camel/providers/imap/camel-imap-folder.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-imap-folder.h : Abstract class for an imap folder */
-
-/* 
- * Author: 
- *   Jeffrey Stedfast  
- *
- * Copyright (C) 2000 Helix Code, Inc. (www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef CAMEL_IMAP_FOLDER_H
-#define CAMEL_IMAP_FOLDER_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include 
-#include "camel-folder.h"
-
-#define CAMEL_IMAP_FOLDER_TYPE     (camel_imap_folder_get_type ())
-#define CAMEL_IMAP_FOLDER(obj)     (GTK_CHECK_CAST((obj), CAMEL_IMAP_FOLDER_TYPE, CamelImapFolder))
-#define CAMEL_IMAP_FOLDER_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_IMAP_FOLDER_TYPE, CamelImapFolderClass))
-#define IS_CAMEL_IMAP_FOLDER(o)    (GTK_CHECK_TYPE((o), CAMEL_IMAP_FOLDER_TYPE))
-
-typedef struct {
-	CamelFolder parent_object;
-
-	gchar *folder_file_path;   /* contains the messages */
-	gchar *folder_dir_path;    /* contains the subfolders */
-	gchar *index_file_path;	   /* index of body contents */
-
-	ibex *index;		   /* index for this folder */
-	CamelImapSummary *summary;
-	CamelFolderSearch *search; /* used to run searches, we just use the real thing (tm) */
-} CamelImapFolder;
-
-
-typedef struct {
-	CamelFolderClass parent_class;
-
-	/* Virtual methods */	
-	
-} CamelImapFolderClass;
-
-
-/* public methods */
-CamelFolder *camel_imap_folder_new (CamelStore *parent, CamelException *ex);
-
-/* Standard Gtk function */
-GtkType camel_imap_folder_get_type (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_IMAP_FOLDER_H */
diff --git a/camel/providers/imap/camel-imap-provider.c b/camel/providers/imap/camel-imap-provider.c
deleted file mode 100644
index 92013a9643..0000000000
--- a/camel/providers/imap/camel-imap-provider.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-imap-provider.c: imap provider registration code */
-
-/* 
- * Authors :
- *   Jeffrey Stedfast 
- *
- * Copyright (C) 2000 HelixCode (www.helixcode.com).
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#include "config.h"
-#include "camel-imap-store.h"
-#include "camel-provider.h"
-#include "camel-session.h"
-
-static CamelProvider imap_provider = {
-	"imap",
-	"IMAPv4",
-
-	"For reading and storing mail on IMAP servers.",
-
-	"mail",
-
-	0,
-
-	{ 0, 0 }
-};
-
-void
-camel_provider_module_init (CamelSession *session)
-{
-	imap_provider.object_types[CAMEL_PROVIDER_STORE] =
-		camel_imap_store_get_type();
-
-	camel_session_register_provider (session, &imap_provider);
-}
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c
deleted file mode 100644
index 0d35e971b2..0000000000
--- a/camel/providers/imap/camel-imap-store.c
+++ /dev/null
@@ -1,531 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-imap-store.c : class for an imap store */
-
-/*
- * Authors: Jeffrey Stedfast 
- *          Ross Golder 
- *
- * Copyright (C) 2000 Helix Code, Inc.
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#include 
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-
-#include "camel-imap-store.h"
-#include "camel-imap-folder.h"
-#include "camel-exception.h"
-#include "camel-session.h"
-#include "camel-stream.h"
-#include "camel-stream-buffer.h"
-#include "camel-stream-fs.h"
-#include "camel-url.h"
-
-/* Specified in RFC 2060 */
-#define IMAP_PORT 143
-
-static CamelServiceClass *service_class = NULL;
-
-static void finalize (GtkObject *object);
-
-static gboolean imap_connect (CamelService *service, CamelException *ex);
-static gboolean imap_disconnect (CamelService *service, CamelException *ex);
-static GList *query_auth_types (CamelService *service, CamelException *ex);
-static void free_auth_types (CamelService *service, GList *authtypes);
-
-static CamelFolder *get_folder (CamelStore *store, const char *folder_name,
-				CamelException *ex);
-static char *get_folder_name (CamelStore *store, const char *folder_name,
-			      CamelException *ex);
-
-static void
-camel_imap_store_class_init (CamelImapStoreClass *camel_imap_store_class)
-{
-	/* virtual method overload */
-	GtkObjectClass *object_class =
-		GTK_OBJECT_CLASS (camel_imap_store_class);
-	CamelServiceClass *camel_service_class =
-		CAMEL_SERVICE_CLASS (camel_imap_store_class);
-	CamelStoreClass *camel_store_class =
-		CAMEL_STORE_CLASS (camel_imap_store_class);
-	
-	service_class = gtk_type_class (camel_service_get_type ());
-
-	/* virtual method overload */
-	object_class->finalize = finalize;
-
-	camel_service_class->connect = imap_connect;
-	camel_service_class->disconnect = imap_disconnect;
-	camel_service_class->query_auth_types = query_auth_types;
-	camel_service_class->free_auth_types = free_auth_types;
-
-	camel_store_class->get_folder = get_folder;
-	camel_store_class->get_folder_name = get_folder_name;
-}
-
-
-static void
-camel_imap_store_init (gpointer object, gpointer klass)
-{
-	CamelService *service = CAMEL_SERVICE (object);
-	CamelStore *store = CAMEL_STORE (object);
-
-	service->url_flags = ( CAMEL_SERVICE_URL_NEED_USER |
-			       CAMEL_SERVICE_URL_NEED_HOST );
-
-	store->folders = g_hash_table_new (g_str_hash, g_str_equal);
-}
-
-
-GtkType
-camel_imap_store_get_type (void)
-{
-	static GtkType camel_imap_store_type = 0;
-	
-	if (!camel_imap_store_type)	{
-		GtkTypeInfo camel_imap_store_info =	
-		{
-			"CamelImapStore",
-			sizeof (CamelImapStore),
-			sizeof (CamelImapStoreClass),
-			(GtkClassInitFunc) camel_imap_store_class_init,
-			(GtkObjectInitFunc) camel_imap_store_init,
-				/* reserved_1 */ NULL,
-				/* reserved_2 */ NULL,
-			(GtkClassInitFunc) NULL,
-		};
-		
-		camel_imap_store_type = gtk_type_unique (CAMEL_STORE_TYPE, &camel_imap_store_info);
-	}
-	
-	return camel_imap_store_type;
-}
-
-static void
-finalize (GtkObject *object)
-{
-	CamelException ex;
-
-	camel_exception_init (&ex);
-	imap_disconnect (CAMEL_SERVICE (object), &ex);
-	camel_exception_clear (&ex);
-}
-
-static CamelServiceAuthType password_authtype = {
-	"Password",
-
-	"This option will connect to the IMAP server using a "
-	"plaintext password.",
-
-	"",
-	TRUE
-};
-
-static gboolean
-try_connect (CamelService *service, CamelException *ex)
-{
-	struct hostent *h;
-	struct sockaddr_in sin;
-	gint fd;
-
-	h = camel_service_gethost (service, ex);
-	if (!h)
-		return FALSE;
-
-	sin.sin_family = h->h_addrtype;
-	sin.sin_port = htons (service->url->port ? service->url->port : IMAP_PORT);
-	memcpy (&sin.sin_addr, h->h_addr, sizeof (sin.sin_addr));
-
-	fd = socket (h->h_addrtype, SOCK_STREAM, 0);
-	if (fd == -1 || connect (fd, (struct sockaddr *)&sin, sizeof(sin)) == -1) {
-
-		/* We don't want to set a CamelException here */
-
-		if (fd > -1)
-			close (fd);
-
-		return FALSE;
-	}
-
-	close (fd);
-	return TRUE;
-}
-
-static GList *
-query_auth_types (CamelService *service, CamelException *ex)
-{
-	GList *ret = NULL;
-	gboolean passwd = TRUE;
-
-
-	if (service->url) {
-		passwd = try_connect (service, ex);
-		if (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE)
-			return NULL;
-	}
-
-	if (passwd)
-		ret = g_list_append (ret, &password_authtype);
-
-	if (!ret) {
-		camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
-				      "Could not connect to IMAP server on "
-				      "%s.", service->url->host);
-	}				      
-
-	return ret;
-}
-
-static void
-free_auth_types (CamelService *service, GList *authtypes)
-{
-	g_list_free (authtypes);
-}
-
-static gboolean
-imap_connect (CamelService *service, CamelException *ex)
-{
-	struct hostent *h;
-	struct sockaddr_in sin;
-	gint fd, status;
-	gchar *buf, *msg;
-	CamelImapStore *store = CAMEL_IMAP_STORE (service);
-
-
-	h = camel_service_gethost (service, ex);
-	if (!h)
-		return FALSE;
-
-	if (!service->url->authmech && !service->url->passwd) {
-		gchar *prompt = g_strdup_printf ("Please enter the IMAP password for %s@%s",
-						service->url->user, h->h_name);
-		service->url->passwd =
-			camel_session_query_authenticator (camel_service_get_session (service),
-							   prompt, TRUE,
-							   service, "password",
-							   ex);
-		g_free (prompt);
-		if (!service->url->passwd)
-			return FALSE;
-	}
-
-	sin.sin_family = h->h_addrtype;
-	if (service->url->port)
-		sin.sin_port = htons(service->url->port);
-	else
-		sin.sin_port = htons(IMAP_PORT);
-
-	memcpy (&sin.sin_addr, h->h_addr, sizeof (sin.sin_addr));
-
-	fd = socket (h->h_addrtype, SOCK_STREAM, 0);
-	if (fd == -1 || connect (fd, (struct sockaddr *)&sin, sizeof(sin)) == -1) {
-		camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
-				      "Could not connect to %s (port %s): %s",
-				      service->url->host, service->url->port,
-				      strerror(errno));
-		if (fd > -1)
-			close (fd);
-
-		return FALSE;
-	}
-
-
-	store->ostream = camel_stream_fs_new_with_fd (fd);
-	store->istream = camel_stream_buffer_new (store->ostream,
-						  CAMEL_STREAM_BUFFER_READ);
-	store->command = 0;
-
-	/* Read the greeting, if any. */
-	buf = camel_stream_buffer_read_line (CAMEL_STREAM_BUFFER (store->istream));
-	if (!buf) {
-		camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
-				      "Could not read greeting from IMAP "
-				      "server: %s",
-				      camel_exception_get_description (ex));
-		gtk_object_unref (GTK_OBJECT (store->ostream));
-		gtk_object_unref (GTK_OBJECT (store->istream));
-		return FALSE;
-	}
-	g_free (buf);
-
-	status = camel_imap_command (store, &msg, "LOGIN \"%s\" \"%s\"",
-				     service->url->user,
-				     service->url->passwd);
-
-	if (status != CAMEL_IMAP_OK) {
-		camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
-				      "Unable to authenticate to IMAP "
-				      "server. Error sending password:"
-				      " %s", msg ? msg : "(Unknown)");
-		g_free (msg);
-		gtk_object_unref (GTK_OBJECT (store->ostream));
-		gtk_object_unref (GTK_OBJECT (store->istream));
-		return FALSE;
-	}
-
-	service_class->connect (service, ex);
-	return TRUE;
-}
-
-static gboolean
-imap_disconnect (CamelService *service, CamelException *ex)
-{
-	CamelImapStore *store = CAMEL_IMAP_STORE (service);
-
-	if (!service->connected)
-		return TRUE;
-
-	if (!service_class->disconnect (service, ex))
-		return FALSE;
-
-	gtk_object_unref (GTK_OBJECT (store->ostream));
-	gtk_object_unref (GTK_OBJECT (store->istream));
-	store->ostream = NULL;
-	store->istream = NULL;
-
-	return TRUE;
-}
-
-const gchar *
-camel_imap_store_get_toplevel_dir (CamelImapStore *store)
-{
-	CamelURL *url = CAMEL_SERVICE (store)->url;
-
-	g_assert(url != NULL);
-	return url->path;
-}
-
-
-static CamelFolder
-*get_folder (CamelStore *store, const char *folder_name, CamelException *ex)
-{
-	CamelImapFolder *new_imap_folder;
-	CamelFolder *new_folder;
-
-	new_imap_folder =  gtk_type_new (CAMEL_IMAP_FOLDER_TYPE);
-	new_folder = CAMEL_FOLDER (new_imap_folder);
-	
-	/* XXX We shouldn't be passing NULL here, but it's equivalent to
-	 * what was there before, and there's no
-	 * CamelImapFolder::get_subfolder yet anyway...
-	 */
-	CF_CLASS (new_folder)->init (new_folder, store, NULL,
-				     folder_name, '/', ex);
-	
-	return new_folder;
-}
-
-static gchar
-*get_folder_name (CamelStore *store, const char *folder_name,
-		 CamelException *ex)
-{
-	return g_strdup (folder_name);
-}
-
-/**
- * camel_imap_command: Send a command to a IMAP server.
- * @store: the IMAP store
- * @ret: a pointer to return the full server response in
- * @fmt: a printf-style format string, followed by arguments
- *
- * This command sends the command specified by @fmt and the following
- * arguments to the connected IMAP store specified by @store. It then
- * reads the server's response and parses out the status code. If
- * the caller passed a non-NULL pointer for @ret, camel_imap_command
- * will set it to point to an buffer containing the rest of the
- * response from the IMAP server. (If @ret was passed but there was
- * no extended response, @ret will be set to NULL.) The caller must
- * free this buffer when it is done with it.
- *
- * Return value: one of CAMEL_IMAP_OK (command executed successfully),
- * CAMEL_IMAP_ERR (command encounted an error), or CAMEL_IMAP_FAIL
- * (a protocol-level error occurred, and Camel is uncertain of the
- * result of the command.)
- **/
-gint
-camel_imap_command (CamelImapStore *store, char **ret, char *fmt, ...)
-{
-	gchar *cmdbuf, *respbuf;
-	gchar *cmdid;
-	va_list ap;
-	gint status;
-
-	/* create the command */
-	cmdid = g_strdup_printf("A%.5d", store->command++);
-	va_start (ap, fmt);
-	cmdbuf = g_strdup_vprintf (fmt, ap);
-	va_end (ap);
-
-	fprintf(stderr, "sending : %s %s\r\n", cmdid, cmdbuf);
-
-	if (camel_stream_printf (store->ostream, "%s %s\r\n", cmdid, cmdbuf) == -1) {
-		g_free(cmdbuf);
-		g_free(cmdid);
-		if (*ret)
-			*ret = g_strdup(strerror(errno));
-		return CAMEL_IMAP_FAIL;
-	}
-	g_free(cmdbuf);
-	g_free(cmdid);
-
-	/* Read the response */
-	respbuf = camel_stream_buffer_read_line (CAMEL_STREAM_BUFFER (store->istream));
-	if (respbuf == NULL) {
-		if (*ret)
-			*ret = g_strdup(strerror(errno));
-		return CAMEL_IMAP_FAIL;
-	}
-
-	fprintf(stderr, "received: %s\n", respbuf);
-
-        /* TODO: We should really check the command id, da? */
-	if (!strncmp (respbuf + 11, "OK", 2))
-		status = CAMEL_IMAP_OK;
-	else if (!strncmp (respbuf + 11, "NO", 2))
-		status = CAMEL_IMAP_ERR;
-	else
-		status = CAMEL_IMAP_FAIL;
-
-	if (ret) {
-		if (status != CAMEL_IMAP_FAIL) {
-			*ret = strchr (respbuf, ' ');
-			if (*ret)
-				*ret = g_strdup (*ret + 1);
-		} else
-			*ret = NULL;
-	}
-	g_free (respbuf);
-
-	return status;
-}
-
-/**
- * camel_imap_command_extended: Send a command to a IMAP server and get
- * a multi-line response.
- * @store: the IMAP store
- * @ret: a pointer to return the full server response in
- * @fmt: a printf-style format string, followed by arguments
- *
- * This command sends the command specified by @fmt and the following
- * arguments to the connected IMAP store specified by @store. It then
- * reads the server's response and parses out the status code.
- * Camel_imap_command_extended will set it to point to a buffer containing the
- * response from the IMAP server. (If @ret was passed but there was The caller
- * must free this buffer when it is done with it.
- *
- * This command gets the additional data returned by "multi-line" IMAP
- * commands, such as SELECT, LIST, LSUB, and various other commands.
- * The returned data is un-byte-stuffed, and has lines termined by
- * newlines rather than CR/LF pairs.
- *
- * Return value: one of CAMEL_IMAP_OK (command executed successfully),
- * CAMEL_IMAP_ERR (command encounted an error), or CAMEL_IMAP_FAIL
- * (a protocol-level error occurred, and Camel is uncertain of the
- * result of the command.)
- **/
-
-gint
-camel_imap_command_extended (CamelImapStore *store, char **ret, char *fmt, ...)
-{
-	CamelStreamBuffer *stream = CAMEL_STREAM_BUFFER (store->istream);
-	GPtrArray *data;
-	gchar *cmdid, *cmdbuf, *respbuf, *code;
-	va_list app;
-	gint i, status = CAMEL_IMAP_OK;
-
-	/* Create the command */
-	cmdid = g_strdup_printf("A%.5d", store->command++);
-	va_start (ap, fmt);
-	cmdbuf = g_strdup_vprintf (fmt, ap);
-	va_end (ap);
-
-	fprintf(stderr, "sending : %s %s\r\n", cmdid, cmdbuf);
-
-	if (camel_stream_printf (store->ostream, "%s %s\r\n", cmdid, cmdbuf) == -1) {
-		g_free(cmdbuf);
-		g_free(cmdid);
-
-		*ret = g_strdup(strerror(errno));
-
-		return CAMEL_IMAP_FAIL;
-	}
-	g_free(cmdbuf);
-	g_free(cmdid);
-
-	data = g_ptr_array_new ();
-	while (1) {
-		respbuf = camel_stream_buffer_read_line (stream);
-		if (!respbuf || !strncmp(respbuf, cmdid, strlen(cmdid)) ) {
-			/* IMAP's last response starts with our command id */
-			break;
-		}
-
-		fprintf(stderr, "received: %s\n", respbuf);
-
-		g_ptr_array_add (data, respbuf);
-	}
-
-	if (respbuf) {
-		code = respbuf + strlen(cmdid) + 1;
-		if (!strncmp(code, "OK", 2))
-			status = CAMEL_IMAP_OK;
-		else if (!strncmp(code, "NO", 2))
-			status = CAMEL_IMAP_ERR;
-		else
-			status = CAMEL_IMAP_FAIL;
-	} else {
-		status = CAMEL_IMAP_FAIL;
-	}
-
-	if (status == CAMEL_IMAP_OK) {
-		/* Append an empty string to the end of the array
-		 * so when we g_strjoinv it, we get a "\n" after
-		 * the last real line.
-		 */
-		g_ptr_array_add (data, "");
-		g_ptr_array_add (data, NULL);
-		*ret = g_strjoinv ("\n", (gchar **)data->pdata);
-	} else {
-		if (status != CAMEL_IMAP_FAIL)
-		        *ret = g_strdup (strchr (respbuf, ' ' + 1);
-		else
-			*ret = NULL;
-	}
-
-	for (i = 0; i < data->len - 2; i++)
-		g_free (data->pdata[i]);
-	g_ptr_array_free (data, TRUE);
-
-	return status;
-}
-
-
-
-
-
-
diff --git a/camel/providers/imap/camel-imap-store.h b/camel/providers/imap/camel-imap-store.h
deleted file mode 100644
index fc6ac9b61c..0000000000
--- a/camel/providers/imap/camel-imap-store.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-imap-store.h : class for an imap store */
-
-/* 
- * Authors: Jeffrey Stedfast 
- *          Ross Golder 
- *
- * Copyright (C) 2000 Helix Code, Inc.
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef CAMEL_IMAP_STORE_H
-#define CAMEL_IMAP_STORE_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include 
-#include "camel-store.h"
-
-#define CAMEL_IMAP_STORE_TYPE     (camel_imap_store_get_type ())
-#define CAMEL_IMAP_STORE(obj)     (GTK_CHECK_CAST((obj), CAMEL_IMAP_STORE_TYPE, CamelImapStore))
-#define CAMEL_IMAP_STORE_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_IMAP_STORE_TYPE, CamelImapStoreClass))
-#define IS_CAMEL_IMAP_STORE(o)    (GTK_CHECK_TYPE((o), CAMEL_IMAP_STORE_TYPE))
-
-
-typedef struct {
-	CamelStore parent_object;	
-
-	CamelStream *istream, *ostream;
-	guint32 command;
-
-} CamelImapStore;
-
-
-
-typedef struct {
-	CamelStoreClass parent_class;
-
-} CamelImapStoreClass;
-
-
-/* public methods */
-void camel_imap_store_open (CamelImapStore *store, CamelException *ex);
-void camel_imap_store_close (CamelImapStore *store, gboolean expunge,
-			     CamelException *ex);
-
-/* support functions */
-
-enum { CAMEL_IMAP_OK, CAMEL_IMAP_ERR, CAMEL_IMAP_FAIL };
-
-gint camel_imap_command (CamelImapStore *store, char **ret, char *fmt, ...);
-gchar *camel_imap_command_extended (CamelImapStore *store, char **ret, char *fmt, ...);
-
-/* Standard Gtk function */
-GtkType camel_imap_store_get_type (void);
-
-const gchar *camel_imap_store_get_toplevel_dir (CamelImapStore *store);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_IMAP_STORE_H */
-
-
diff --git a/camel/providers/imap/camel-imap-summary.h b/camel/providers/imap/camel-imap-summary.h
deleted file mode 100644
index 437331ce30..0000000000
--- a/camel/providers/imap/camel-imap-summary.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- *  Copyright (C) 2000 Helix Code Inc.
- *
- *  Authors: Jeffrey Stedfast 
- *
- *  This program is free software; you can redistribute it and/or 
- *  modify it under the terms of the GNU General Public License as 
- *  published by the Free Software Foundation; either version 2 of the
- *  License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- *  USA
- */
-
-#ifndef _CAMEL_IMAP_SUMMARY_H
-#define _CAMEL_IMAP_SUMMARY_H
-
-#include 
-#include 
-#include 
-
-#define CAMEL_IMAP_SUMMARY(obj)         GTK_CHECK_CAST (obj, camel_imap_summary_get_type (), CamelImapSummary)
-#define CAMEL_IMAP_SUMMARY_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, camel_imap_summary_get_type (), CamelImapSummaryClass)
-#define IS_CAMEL_IMAP_SUMMARY(obj)      GTK_CHECK_TYPE (obj, camel_imap_summary_get_type ())
-
-typedef struct _CamelImapSummary      CamelImapSummary;
-typedef struct _CamelImapSummaryClass CamelImapSummaryClass;
-
-/* extra summary flags */
-enum {
-	CAMEL_MESSAGE_FOLDER_NOXEV = 1<<16,
-/*	CAMEL_MESSAGE_FOLDER_FLAGGED = 1<<17,*/
-};
-
-typedef struct _CamelImapMessageContentInfo {
-	CamelMessageContentInfo info;
-} CamelImapMessageContentInfo;
-
-typedef struct _CamelImapMessageInfo {
-	CamelMessageInfo info;
-
-	off_t frompos;
-} CamelImapMessageInfo;
-
-struct _CamelImapSummary {
-	CamelFolderSummary parent;
-
-	struct _CamelImapSummaryPrivate *priv;
-
-	char *folder_path;	/* name of matching folder */
-	size_t folder_size;	/* size of the imap file, last sync */
-
-	ibex *index;
-	int index_force;	/* do we force index during creation? */
-};
-
-struct _CamelImapSummaryClass {
-	CamelFolderSummaryClass parent_class;
-};
-
-guint camel_imap_summary_get_type (void);
-
-CamelImapSummary *camel_imap_summary_new (const char *filename, const char *imap_name, ibex *index);
-
-/* load/check the summary */
-int camel_imap_summary_load(CamelImapSummary *mbs, int forceindex);
-
-/* incremental update */
-int camel_imap_summary_update(CamelImapSummary *mbs, off_t offset);
-
-/* perform a folder expunge */
-int camel_imap_summary_expunge(CamelImapSummary *mbs);
-
-#endif /* ! _CAMEL_IMAP_SUMMARY_H */
diff --git a/camel/providers/imap/imap.c b/camel/providers/imap/imap.c
deleted file mode 100644
index 3a4109ed47..0000000000
--- a/camel/providers/imap/imap.c
+++ /dev/null
@@ -1,835 +0,0 @@
-/*  Spruce
- *  Copyright (C) 1999-2000 Jeffrey Stedfast
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#ifdef HAVE_CONFIG_H
-#	include 
-#endif
-
-#include "imap.h"
-
-#define IMAP_LOGGING
-
-/* this is used in the tag before each command */
-static guint32 imap_commands = 0;
-
-extern gint timeout;
-extern GList *mime_parts;
-
-
-gint imap_ok (gint tag, gchar *line)
-{
-   /* returns 1 if  OK was found */
-   gchar find[64];
-   gint ret;
-
-   g_snprintf(find, sizeof(find)-1, "A%.5d OK", tag);
-
-   ret = find_string (line, find);
-   
-   if (ret < 0)
-      return 0;
-      
-   return 1;
-}
-
-gint imap_login_cram_md5 (gint socket, gchar *username, gchar *password)
-{
-   /* Log in to server using CRAM-MD5 keyed hash. */ 
-   gchar buffer[512];
-   gchar *retstr;
-   gint pos;
-
-   if (username == NULL || password == NULL) 
-      return ERROR;
-
-   memset(buffer, 0, sizeof(buffer));
-   if (recvline(socket, buffer, sizeof(buffer)-1) < 0)
-      return ERROR; /* Fetch the OK line from the server */
-
-   if (find_string(buffer, "OK") == -1)
-      return ERROR;
-
-   g_snprintf(buffer, sizeof(buffer)-1, "A%.5d AUTHENTICATE CRAM-MD5\r\n", imap_commands);
-
-   if (send(socket, buffer, strlen(buffer), 0) < 0)
-      return ERROR;
-
-   memset(buffer, 0, sizeof(buffer));
-   if (recvline(socket, buffer, sizeof(buffer)-1) < 0)
-      return ERROR;
-
-   pos = find_string(buffer, "\r\n");
-   if (pos != -1)
-      buffer[pos] = '\0';
-   retstr = cram_md5(username, password, buffer);
-
-   if (retstr[strlen(retstr)-1] == '\n')
-      retstr[strlen(retstr)-1] = '\0';
-
-   g_snprintf(buffer, sizeof(buffer)-1, "%s\r\n", retstr);
-   g_free(retstr);
-
-   if (send (socket, buffer, strlen(buffer), 0) < 0) 
-      return ERROR;
-
-   if (recvline(socket, buffer, sizeof(buffer)-1) < 0)
-      return ERROR;
-
-   if (!imap_ok(imap_commands, buffer))
-      return ERROR;
-
-   imap_commands++;
-
-   return SUCCESS;
-}
-      
-gint imap_login (gint socket, gchar *username, gchar *password)
-{
-   /* this logs us in to the server */
-   gchar buffer[512];
-   gchar temp[64];
-   
-   if (username == NULL || password == NULL)
-      return ERROR;
-
-   g_snprintf(buffer, sizeof(buffer)-1, "A%.5d LOGIN \"%s\" \"%s\"\r\n", imap_commands, username, password);
-#ifdef IMAP_LOGGING
-   fprintf(stderr, "%s", buffer);
-#endif
-
-   if (send (socket, buffer, strlen(buffer), 0) < 0)
-   {
-      return ERROR;
-   }
-      
-   g_snprintf(temp, sizeof(temp)-1, "A%.5d", imap_commands);
-
-   memset(buffer, 0, sizeof(buffer));
-   recvline_timeo(socket, buffer, sizeof(buffer)-1, timeout);
-   while (!strstr(buffer, temp))
-   {
-      memset(buffer, 0, sizeof(buffer));
-      recvline_timeo(socket, buffer, sizeof(buffer)-1, timeout);
-   }
-
-   if (!imap_ok(imap_commands, buffer))
-      return ERROR;
-
-   imap_commands++;
-   
-   return SUCCESS;   
-}
-
-GList *imap_list (gint socket, gchar *namespace)
-{
-   /* this gets the names of all the mailboxes */
-   gchar buffer[512];
-   gchar flags[256];
-   gchar temp[64], *ptr = NULL, *flagptr = NULL;
-   gchar slashdot = '\0';
-   GList *list = NULL;
-   gint ret, size = 0, flaglen = 0;
-
-   if (namespace && *namespace)
-   {
-      if (*namespace && namespace[strlen(namespace)-1] != '/' && namespace[strlen(namespace)-1] != '.')
-         slashdot = '/';
-      g_snprintf(buffer, sizeof(buffer)-1, "A%.5d LIST \"\" %s%c*\r\n", imap_commands, namespace, slashdot);
-   }
-   else
-      g_snprintf(buffer, sizeof(buffer)-1, "A%.5d LIST \"\" INBOX.*\r\n", imap_commands);
-#ifdef IMAP_LOGGING
-   fprintf(stderr, "%s", buffer);
-#endif
-
-   if (send(socket, buffer, strlen(buffer), 0) < 0)
-   {
-      return NULL;
-   }
-
-   do
-   {
-      memset(buffer, 0, sizeof(buffer));
-      ret = recvline(socket, buffer, sizeof(buffer)-1);
-      if (ret > 0)
-      {
-#ifdef IMAP_LOGGING
-         fprintf(stderr, "received: %s", buffer);
-#endif
-         if (buffer[0] == '*')
-         {
-            strip(buffer, '\r');
-            strip(buffer, '\n');
-
-            /* skip ahead to the flag section */
-            ptr = strstr(buffer, "(");
-
-            /* find the end of the flags section */
-            flagptr = ptr + 1;
-            ptr = strstr(ptr, ")") + 1;
-
-            /* eventually we will need to parse this */
-            memset(flags, 0, sizeof(flags));
-            flaglen = (gint)(ptr - flagptr) - 1;
-            size = sizeof(flags);
-            strncpy(flags, flagptr, flaglen > size ? size : flaglen);
-            if (!strstrcase(flags, "\\NoSelect")) /* is this a selectable mailbox? */
-            {
-               /* skip the reference name */
-               ptr += imap_get_string (ptr, temp, sizeof(temp)-1, "");
-
-               /* the rest of the return string is fair play... */
-               g_strstrip(ptr);       /* trim off any extra white space */
-               unquote(ptr);           /* unquote the mailbox name if it is quoted */
-               if (slashdot)
-                  strcut(ptr, 0, strlen(namespace)+1); /* cut out the namespace and the '/' */
-               else
-                  strcut(ptr, 0, strlen(namespace));   /* cut out the namespace */
-					
-
-               list = g_list_append (list, g_strdup(ptr));
-            }
-         }
-         else 
-	         break;
-      }
-   } while (ret > 0);
-
-   imap_commands++;
-
-   return list;
-}
-
-gint imap_select_mailbox (gint socket, gchar *mailbox, gchar *namespace)
-{
-   /* selects a mailbox, returns the number of messages in that mailbox
-    * or -1 on error */
-   gchar *cmdbuf, buffer[512], temp[64], *index, mesgs[16];
-   gchar slashdot = '\0';
-   gint ret, i;
-
-   if (mailbox == NULL)
-      return ERROR;
-
-   if (namespace && strcmp(mailbox, "INBOX"))
-   {
-      if (*namespace && namespace[strlen(namespace)-1] != '/' && namespace[strlen(namespace)-1] != '.')
-         slashdot = '/';
-
-      cmdbuf = g_strdup_printf("A%.5d SELECT %s%c%s\r\n", imap_commands, namespace, slashdot, mailbox);
-   }
-   else
-      cmdbuf = g_strdup_printf("A%.5d SELECT %s\r\n", imap_commands, mailbox);
-#ifdef IMAP_LOGGING
-   fprintf(stderr, "%s", cmdbuf);
-#endif
-
-   if (send(socket, cmdbuf, strlen(cmdbuf), 0) < 0)
-   {
-      g_free(cmdbuf);
-      return -1;
-   }
-   g_free(cmdbuf);
-   
-   g_snprintf(temp, sizeof(temp)-1, "A%.5d", imap_commands);
-
-   memset(buffer, 0, sizeof(buffer));
-   ret = recvline(socket, buffer, sizeof(buffer)-1);
-   while (ret > 0)
-   {
-#ifdef IMAP_LOGGING
-      fprintf(stderr, "received: %s", buffer);
-#endif
-      if (strstr(buffer, temp))
-         break;
-      if (buffer[0] == '*')
-      {
-         if (strstr(buffer, "EXISTS"))
-         {
-            index = buffer;
-            while (*index != ' ')
-               index++;
-            index++;
-            
-            i = 0;
-            memset(mesgs, 0, sizeof(mesgs));
-            while (*index != ' ' && i < sizeof(mesgs)-1)
-            {
-               mesgs[i] = *index;
-               index++;
-               i++;
-            }
-         }
-      }
-      memset(buffer, 0, sizeof(buffer));
-      ret = recvline(socket, buffer, sizeof(buffer)-1);   
-   }
-   
-   if (!imap_ok(imap_commands, buffer))
-      return -1;
-   
-   imap_commands++;
-
-   return atoi(mesgs);
-}
-
-gint imap_logout (gint socket)
-{
-   /* logs out */
-   gchar buffer[256];
-
-   g_snprintf(buffer, sizeof(buffer)-1, "A%.5d LOGOUT\r\n", imap_commands);
-#ifdef IMAP_LOGGING
-   fprintf(stderr, "%s", buffer);
-#endif
-
-   if (send(socket, buffer, strlen(buffer), 0) < 0)
-   {
-      return ERROR;
-   }
-
-   return SUCCESS;
-}
-
-gint imap_mailbox_create (gint socket, gchar *mailbox)
-{
-   /* creates a new mailbox */
-   gchar buffer[256];
-
-   if (mailbox == NULL)
-      return ERROR;
-
-   g_snprintf(buffer, sizeof(buffer)-1, "A%.5d CREATE %s\r\n", imap_commands, mailbox);
-#ifdef IMAP_LOGGING
-   fprintf(stderr, "%s", buffer);
-#endif
-
-   if (send(socket, buffer, strlen(buffer), 0) < 0)
-   {
-      return ERROR;
-   }
-
-   memset(buffer, 0, sizeof(buffer));
-   if (recvline(socket, buffer, sizeof(buffer)-1) < 0 || !imap_ok(imap_commands, buffer))
-   {
-      return ERROR;
-   }
-
-   imap_commands++;
-
-   return SUCCESS;
-}
-
-gint imap_mailbox_delete (gint socket, gchar *mailbox)
-{
-   /* deletes a mailbox */
-   gchar buffer[256];
-
-   if (mailbox == NULL)
-      return ERROR;
-
-   g_snprintf(buffer, sizeof(buffer)-1, "A%.5d DELETE %s\r\n", imap_commands, mailbox);
-#ifdef IMAP_LOGGING
-   fprintf(stderr, "%s", buffer);
-#endif
-
-   if (send(socket, buffer, strlen(buffer), 0) < 0)
-   {
-      return ERROR;
-   }
-
-   memset(buffer, 0, sizeof(buffer));
-   if (recvline(socket, buffer, sizeof(buffer)-1) < 0 ||
-      !imap_ok(imap_commands, buffer))
-   {
-      return ERROR;
-   }
-
-   imap_commands++;
-
-   return SUCCESS;
-}
-
-/* fetches the specified part of a message, which can be alot of 
- * if you use peek the \Seen flag is not set */
-gchar *imap_fetch (gint socket, gint mesgnum, gchar *part, gint *seen)
-{
-   /* fetches the specified part of the mesg. */
-   gchar *mesg = NULL;
-   gchar buffer[512], *index;
-   gchar flags[128], size[16], temp[64];
-   gint i, n, msgsize = 1000;
-
-   if (mesgnum < 0)
-      return (gchar *)NULL;
-
-   g_snprintf(buffer, sizeof(buffer)-1, "A%.5d FETCH %d (FLAGS %s)\r\n", imap_commands, mesgnum, part);
-#ifdef IMAP_LOGGING
-   fprintf(stderr, "%s", buffer);
-#endif
-
-   if (send(socket, buffer, strlen(buffer), 0) < 0)
-   {
-      return (gchar *)NULL;
-   }   
-
-
-   memset(buffer, 0, sizeof(buffer));
-   n = recvline(socket, buffer, sizeof(buffer)-1);
-
-   if (buffer[0] != '*' && imap_ok(imap_commands, buffer))
-   {
-       memset(buffer, 0, sizeof(buffer));
-       n = recvline(socket, buffer, sizeof(buffer)-1);
-   }
-     
-   if (buffer[0] == '*')
-   /*if (imap_ok(imap_commands, buffer))*/
-   {
-      index = strstrcase(buffer, "FLAGS");
-      if (index == NULL) /* hmm */
-      {
-         fprintf(stderr, _("IMAP server replied using unknown tokens.\n"));
-         return (gchar *)NULL;
-      }
-      else
-      {
-#ifdef IMAP_LOGGING
-         fprintf(stderr, "received: %s", buffer);
-#endif
-         /* skip to the FLAGS token */
-         for ( ; *index && *index != '('; index++);
-         index++;
-
-         i = 0;
-         memset(flags, 0, sizeof(flags));
-         while (*index != ')' && i < sizeof(flags)-1)
-         {
-            flags[i] = *index;
-            index++;
-            i++;
-         }
-         flags[i] = '\0';
-
-         /* skip to the next significant token */
-         for (index++; *index && *index != '{'; index++);
-         index++;
-         
-         i = 0;
-         memset(size, 0, sizeof(size));
-         while (*index != '}' && i < sizeof(size)-1)
-         {
-            size[i] = *index;
-            index++;
-            i++;
-         }
-         size[i] = '\0';
-         msgsize = atoi(size);
-      }
-   }
-   else
-   {
-      g_snprintf(temp, sizeof(temp)-1, "A%.5d", imap_commands);
-      if (strstr(buffer, temp)) /* this means there's no such message */
-      {
-         fprintf(stderr, _("IMAP responded with \"no such message\".\n"));
-         return (gchar *)NULL;
-      }
-   }
-   
-
-   mesg = g_malloc0(msgsize + 50); /* just to be safe */
-   n = recvline(socket, buffer, sizeof(buffer)-1);
-   
-   while (!(n <= 0) && !imap_ok(imap_commands, buffer))
-   {
-      strip(buffer, '\r');  /* strip all the \r's */
-      strcat(mesg, buffer);
-      memset(buffer, 0, sizeof(buffer));
-      n = recvline(socket, buffer, sizeof(buffer)-1);
-   }
-
-   if (mesg)
-      mesg[strlen(mesg)-3] = '\0';   /* strip the ending ) */
-
-   if (seen != NULL)
-   {
-      if (strstrcase(flags, "\\Seen"))
-         *seen = 1;
-      else
-         *seen = 0;
-   }
-   
-   imap_commands++;
-
-   return (gchar*)mesg;
-}
-
-gboolean imap_delete(const ImapAccount_t *imap, GList *sorted)
-{
-   GList *p = sorted;
-   gchar buffer[256];
-   gchar temp[16];
-   gint ret;
-
-   do
-   {
-      gint id = GPOINTER_TO_INT(p->data);
-      g_snprintf(buffer, sizeof(buffer)-1, "A%.5d STORE %d +FLAGS (\\Deleted)\r\n", imap_commands, id);
-#ifdef IMAP_LOGGING
-      fprintf(stderr, "%s", buffer);
-#endif
-      if (send(imap->socket, buffer, strlen(buffer), 0) < 0)
-      {
-         return FALSE;
-      }
-      g_snprintf(temp, sizeof(temp)-1, "A%.5d", imap_commands);
-
-      memset(buffer, 0, sizeof(buffer));
-      ret = recvline(imap->socket, buffer, sizeof(buffer)-1);
-      while (ret > 0)
-      {
-         if (find_string(buffer, temp) >= 0)
-            break;
-
-         memset(buffer, 0, sizeof(buffer));
-         ret = recvline(imap->socket, buffer, sizeof(buffer)-1);
-      }
-
-      if (!imap_ok(imap_commands, buffer))
-      {
-         return FALSE;
-      }
-      imap_commands++;
-   } while ((p = g_list_next(p)));
-
-   g_snprintf(buffer, 255, "A%.5d EXPUNGE\r\n", imap_commands);
-#ifdef IMAP_LOGGING
-   fprintf(stderr, "%s", buffer);
-#endif
-   if (send(imap->socket, buffer, strlen(buffer), 0) < 0)
-   {
-      return FALSE;
-   }   
-
-   g_snprintf (temp, 15, "A%.5d", imap_commands);
-
-   memset(buffer, 0, sizeof(buffer));
-   ret = recvline(imap->socket, buffer, sizeof(buffer)-1);
-   while (ret > 0)
-   {
-      if (find_string(buffer, temp) >= 0)
-        break;
-
-     memset(buffer, 0, sizeof(buffer));
-     ret = recvline(imap->socket, buffer, sizeof(buffer)-1);
-   }
-    
-   if (!imap_ok(imap_commands, buffer))
-   {
-      return FALSE;
-   }
-
-   imap_commands++;
-
-   return TRUE;
-}
-
-gint imap_connect (Server *server)
-{
-   /* connects to the server and returns the socket or -1 on error */
-   gchar buffer[512];
-   gint sock;
-
-   if (!Resolve(server))
-      return -1;
-
-   sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
-   if (sock < 0)
-      return -1;
-
-   server->sin.sin_family = AF_INET;
-   server->sin.sin_port = htons(server->port);
-
-#ifdef IMAP_LOGGING
-   fprintf(stderr, _("Connecting to IMAP server (%s)..."), server->ip);
-#endif
-   if (connect_timeo(sock, (struct sockaddr*)&server->sin, sizeof(server->sin), timeout) < 0)
-   {
-      fprintf(stderr, _("failed.\n"));
-      close(sock);
-      return -1;
-   }
-   fprintf(stderr, _("success.\n"));
-
-   {
-      /* read the connect responce */
-      memset(buffer, 0, sizeof(buffer));
-      recvline_timeo(sock, buffer, sizeof(buffer)-1, timeout);
-   }
-
-   return sock;
-}
-
-gint imap_add_part(gchar *c)
-{
-   gchar name[64], value[64];
-   gchar temp[64];
-   gchar *start = c;
-   struct mime_part *part;
-
-   part = g_malloc0(sizeof(struct mime_part));
-
-   c += imap_get_string (c, part->type, sizeof(part->type)-1, "text");
-   c += imap_get_string (c, part->subtype, sizeof(part->subtype)-1, "plain");
-
-   /* seek to the beginning of the parameter... */
-   for ( ; *c && *c == ' '; c++);
-
-   if (*c)
-   {
-      gchar *p = part->parameter;
-      if (*c == '(')
-      {
-         c++;
-         while (*c && *c != ')')
-         {
-            c += imap_get_string (c, name, sizeof(name)-1, "");
-            c += imap_get_string (c, value, sizeof(value)-1, "");
-            /* don't buffer overrun */
-            g_snprintf(p, sizeof(part->parameter)-1, "%s=\"%s\"; ", name, value);
-            p += strlen(p);
-   
-            while (*c && *c == ' ') /* skip any spaces */
-               c++;
-         }
-      }
-      else
-      {
-         c += imap_get_string (c, name, sizeof(name)-1, "");
-         strcpy(value, name);
-         *p++ = '\0';
-      }
-
-      c++; /* skip over the ')' belonging to the parameter values */
-      if (*c)
-      {
-         /* ignore id and description */
-         c += imap_get_string (c, temp, sizeof(temp)-1, "");	   
-         c += imap_get_string (c, temp, sizeof(temp)-1, "");
-
-         /* encoding */
-         c += imap_get_string (c, part->encoding, sizeof(part->encoding)-1, "");
-
-         /* size */
-         c += imap_get_number (c, &part->len);
-
-         /* skip the optional info */
-         c += imap_skip_section(c);
-
-         part->pos = 0; /* isn't useful in imap */
-#ifdef IMAP_LOGGING
-         fprintf(stderr, "type = %s/%s\n", part->type, part->subtype);
-			fprintf(stderr, "encoding = %s\n", part->encoding);
-			fprintf(stderr, "param = %s\n", part->parameter);
-#endif
-         mime_parts = g_list_append (mime_parts, part);
-
-         return (c - start);
-      }
-   }
-   return -1;
-}
-
-gint imap_parts (gint socket, gint mesg_num)
-{
-   GList *tmp;
-   gchar *buffer = NULL, *c;
-   gint res = 1, cnt;
-
-   tmp = mime_parts;
-   while (tmp != NULL)
-   {
-      g_free(tmp->data);
-      tmp = tmp->next;
-   }
-
-   if (mime_parts != NULL)
-   {
-      g_list_free(mime_parts);
-      mime_parts = NULL;
-   }
-  
-   buffer = g_malloc0(sizeof(gchar)*2048);   
-  
-   g_snprintf(buffer, 2047, "A%.5d FETCH %d (BODYSTRUCTURE)\r\n", imap_commands, mesg_num);
-#ifdef IMAP_LOGGING
-   fprintf(stderr, "%s", buffer);
-#endif
-
-   if (send(socket, buffer, strlen(buffer), 0) < 0)
-   {
-      g_free(buffer);
-      return 0;
-   }
-  
-   /* get the structure of the body */
-   memset (buffer, 0, sizeof(gchar)*2048);
-   recvline (socket, buffer, sizeof(gchar)*2048);
-#ifdef IMAP_LOGGING
-   fprintf(stderr, "received: %s", buffer);
-#endif
-
-   c = buffer;
-   /* skip to the BODYSTRUCTURE */
-   c = strstr(c, "BODYSTRUCTURE");
-   if (c == NULL)
-      return 0;
-
-   c += strlen("BODYSTRUCTURE");
-   if (*c)
-   {
-      /* looks good so far, skip to the parts */
-      for ( ; *c && *c != '('; c++);
-
-      if (*c && *(c+1) == '(')
-      {
-         c++;
-#ifdef IMAP_LOGGING
-         fprintf(stderr, "message is multipart\n");
-#endif
-         /* multipart */
-         while (*c == '(')
-         {
-            cnt = imap_skip_section(c);
-            if (cnt > 1)
-            {
-               c[cnt-1] = '\0';
-               cnt = imap_add_part(c);
-               if (cnt == -1)
-               {
-                  res = 0;
-                  break;
-               }
-               c += cnt;
-            }
-            else
-            {
-               res = 0;
-               break;
-            }
-            /* skip to the next mime part */
-            for ( ; *c && *c == ' '; c++);
-         }
-      }
-      else
-         if (*c)
-         {
-            /* one part */
-            cnt = imap_add_part(c);
-            res = res != -1;
-         }
-         /* just forget the rest, who cares?? */
-   }
-  
-   g_free(buffer);
-
-   return res;
-}
-
-gint imap_get_string (gchar *index, gchar *dest, gint destlen, gchar *def)
-{
-   /* gets a string ("data" or NIL) , if NIL it copies def instead */
-   gint i;
-   gchar *start = index;
-
-   while (*index && *index == ' ') /* skip white space */
-     index++;
-
-   if (strncmp(index, "NIL", 3))
-   {
-      /* progress to the first quote (we should already be there but just in case) */
-      while (*index && *index != '"')
-         index++;
-
-      index++;
-   
-      i = 0;
-      while (*index && *index != '"')
-      {
-         if (i < destlen-1)
-         {
-            dest[i] = *index;
-            i++;
-         }
-         index++;
-      }
-      dest[i] = '\0';
-   }
-   else
-   {
-      /* if there were no data we just copy def */
-      index += 3;
-      strncpy (dest, def, destlen);
-   }
-
-   return index - start + 1;
-}
-
-gint imap_get_number (gchar *index, gint *dest)
-{
-   /* gets a number */
-   gchar number[32];
-   gchar *start = index;
-   gint i;
-
-   /* skip white space **/
-   while (*index == ' ')
-     index++;
-
-   i = 0;
-   while (*index != ' ' && i < sizeof(number)-1)
-   {
-      number[i] = *index;
-      index++;
-      i++;
-   }
-   number[i] = '\0';
-
-   *dest = atoi(number);
-
-   return index - start;
-}
-
-gint imap_skip_section(gchar *index)
-{
-   gint depth = 1;
-   gchar *start = index;
-
-   while (depth != 0 && *index)
-   {
-      if (*index == '(')
-         depth++;
-      else if ( *index == ')' )
-         depth--;
-      index++;
-   }
-
-   return index - start;
-}
-
diff --git a/camel/providers/imap/imap.h b/camel/providers/imap/imap.h
deleted file mode 100644
index 3884651c42..0000000000
--- a/camel/providers/imap/imap.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/*  Spruce
- *  Copyright (C) 1999-2000 Jeffrey Stedfast
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#ifndef __IMAP_H__
-#define __IMAP_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#include 
-#undef MIN
-#undef MAX
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include "parse.h"
-#include "server.h"
-#include "mime.h"
-#include "cram-md5.h"
-
-struct imap_account
-{
-	Server server;
-	gchar *username;
-	gchar *password;
-	gint socket;
-};
-
-gint imap_ok (gint tag, gchar *line);
-
-gint imap_login_cram_md5(gint socket, gchar *username, gchar *password);
-
-gint imap_login (gint socket, gchar *username, gchar *password);
-
-GList *imap_list (gint socket, gchar *namespace);
-
-gint imap_select_mailbox (gint socket, gchar *mailbox, gchar *namespace);
-
-gint imap_logout (gint socket);
-
-gint imap_mailbox_create (gint socket, gchar *mailbox);
-
-gint imap_mailbox_delete (gint socket, gchar *mailbox);
-
-gchar *imap_fetch (gint socket, gint mesgnum, gchar *part, gint *seen);
-
-gboolean imap_delete (const ImapAccount_t *imap, GList *sorted);
-
-gint imap_connect(Server *server);
-
-gint imap_add_part(gchar *c);
-
-gint imap_parts (gint socket, gint mesg_num);
-
-gint imap_get_string (gchar *index, gchar *dest, gint destlen, gchar *def);
-
-gint imap_get_number (gchar *index, gint *dest);
-
-gint imap_skip_section(gchar *index);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
-
diff --git a/camel/providers/imap/libcamelimap.urls b/camel/providers/imap/libcamelimap.urls
deleted file mode 100644
index c301c0ffac..0000000000
--- a/camel/providers/imap/libcamelimap.urls
+++ /dev/null
@@ -1 +0,0 @@
-imap
diff --git a/camel/providers/maildir/.cvsignore b/camel/providers/maildir/.cvsignore
deleted file mode 100644
index 2e7b174532..0000000000
--- a/camel/providers/maildir/.cvsignore
+++ /dev/null
@@ -1,6 +0,0 @@
-Makefile.in
-Makefile
-.deps
-*.lo
-*.la
-.libs
diff --git a/camel/providers/maildir/Makefile.am b/camel/providers/maildir/Makefile.am
deleted file mode 100644
index 07f05d443b..0000000000
--- a/camel/providers/maildir/Makefile.am
+++ /dev/null
@@ -1,24 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-SUBDIRS = 
-
-libcamelmaildirincludedir = $(includedir)/camel
-
-lib_LTLIBRARIES = libcamelmaildir.la
-
-INCLUDES = -I.. -I$(srcdir)/.. -I$(top_srcdir)/intl -I$(top_srcdir)/camel \
-	$(GTK_INCLUDEDIR) -I$(includedir)		\
-	-DG_LOG_DOMAIN=\"camel-maildir-provider\"		
-
-libcamelmaildir_la_SOURCES = \
-	camel-maildir-folder.c \
-	camel-maildir-provider.c \
-	camel-maildir-store.c
-
-libcamelmaildirinclude_HEADERS = \
-	camel-maildir-folder.h \
-	camel-maildir-store.h
-
-libcamelmaildir_la_LDFLAGS = -version-info 0:0:0 -rpath $(libdir)
-
-EXTRA_DIST = 
diff --git a/camel/providers/maildir/camel-maildir-folder.c b/camel/providers/maildir/camel-maildir-folder.c
deleted file mode 100644
index 2cb81f3e81..0000000000
--- a/camel/providers/maildir/camel-maildir-folder.c
+++ /dev/null
@@ -1,802 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-maildir-folder.c : camel-folder subclass for maildir folders */
-
-/* 
- *
- * Copyright (C) 1999 Bertrand Guiheneuf  .
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-/*
- * AUTHORS : Jukka Zitting 
- *  
- */
-
-
-#include  
-#include  
-#include  
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include "camel-maildir-folder.h"
-#include "camel-maildir-store.h"
-#include "camel-stream-fs.h"
-#include "camel-log.h"
-
-static CamelFolderClass *parent_class=NULL;
-
-/* Returns the class for a CamelMaildirFolder */
-#define CMAILDIRF_CLASS(so) CAMEL_MAILDIR_FOLDER_CLASS (GTK_OBJECT(so)->klass)
-#define CF_CLASS(so) CAMEL_FOLDER_CLASS (GTK_OBJECT(so)->klass)
-#define CMAILDIRS_CLASS(so) CAMEL_STORE_CLASS (GTK_OBJECT(so)->klass)
-
-static void _init_with_store (CamelFolder *folder, CamelStore *parent_store, CamelException *ex);
-static void _set_name (CamelFolder *folder, const gchar *name, CamelException *ex);
-static gboolean _exists (CamelFolder *folder, CamelException *ex);
-static gboolean _create (CamelFolder *folder, CamelException *ex);
-static gboolean _delete (CamelFolder *folder, gboolean recurse, CamelException *ex);
-static gboolean _delete_messages (CamelFolder *folder, CamelException *ex);
-static CamelMimeMessage *_get_message (CamelFolder *folder, gint number, CamelException *ex);
-static gint _get_message_count (CamelFolder *folder, CamelException *ex);
-static void _expunge (CamelFolder *folder, CamelException *ex);
-static GList *_list_subfolders (CamelFolder *folder, CamelException *ex);
-
-/* fs utility functions */
-static DIR * _xopendir (const gchar *path);
-static gboolean _xstat (const gchar *path, struct stat *buf);
-static gboolean _xmkdir (const gchar *path);
-static gboolean _xrename (const gchar *from, const gchar *to);
-static gboolean _xunlink (const gchar *path);
-static gboolean _xrmdir (const gchar *path);
-/* ** */
-
-static void
-camel_maildir_folder_class_init (CamelMaildirFolderClass *camel_maildir_folder_class)
-{
-	CamelFolderClass *camel_folder_class =
-		CAMEL_FOLDER_CLASS (camel_maildir_folder_class);
-
-	parent_class = gtk_type_class (camel_folder_get_type ());
-
-	/* virtual method definition */
-	/* virtual method overload */
-	camel_folder_class->init_with_store   = _init_with_store;
-	camel_folder_class->set_name          = _set_name;
-	camel_folder_class->exists            = _exists;
-	camel_folder_class->create            = _create;
-	camel_folder_class->delete            = _delete;
-	camel_folder_class->delete_messages   = _delete_messages;
-	camel_folder_class->expunge           = _expunge;
-	camel_folder_class->get_message       = _get_message;
-	camel_folder_class->get_message_count = _get_message_count;
-	camel_folder_class->list_subfolders   = _list_subfolders;
-}
-
-GtkType
-camel_maildir_folder_get_type (void)
-{
-	static GtkType camel_maildir_folder_type = 0;
-	
-	if (!camel_maildir_folder_type)	{
-		GtkTypeInfo camel_maildir_folder_info =	
-		{
-			"CamelMaildirFolder",
-			sizeof (CamelMaildirFolder),
-			sizeof (CamelMaildirFolderClass),
-			(GtkClassInitFunc) camel_maildir_folder_class_init,
-			(GtkObjectInitFunc) NULL,
-				/* reserved_1 */ NULL,
-				/* reserved_2 */ NULL,
-			(GtkClassInitFunc) NULL,
-		};
-		
-		camel_maildir_folder_type =
-			gtk_type_unique (CAMEL_FOLDER_TYPE, &camel_maildir_folder_info);
-	}
-	
-	return camel_maildir_folder_type;
-}
-
-
-
-
-
-
-/**
- * CamelMaildirFolder::init_with_store: initializes the folder object
- * @folder:       folder object to initialize
- * @parent_store: parent store object of the folder
- *
- * Simply tells that the folder can contain messages but not subfolders.
- * Perhaps we'll later implement subfolders too...
- */
-static void 
-_init_with_store (CamelFolder *folder, CamelStore *parent_store, CamelException *ex)
-{
-	CAMEL_LOG_FULL_DEBUG ("Entering CamelMaildirFolder::init_with_store\n");
-	g_assert (folder);
-	g_assert (parent_store);
-	
-	/* call parent method */
-	parent_class->init_with_store (folder, parent_store, ex);
-	
-	folder->can_hold_messages = TRUE;
-	folder->can_hold_folders = TRUE;
-	folder->has_summary_capability = FALSE;
-
-	CAMEL_LOG_FULL_DEBUG ("Leaving CamelMaildirFolder::init_with_store\n");
-}
-
-/**
- * CamelMaildirFolder::set_name: sets the name of the folder
- * @folder: folder object
- * @name:   name of the folder
- *
- * Sets the name of the folder object. The existence of a folder with
- * the given name is not checked in this function.
- */
-static void
-_set_name (CamelFolder *folder, const gchar *name, CamelException *ex)
-{
-	CamelMaildirFolder *maildir_folder;
-	CamelMaildirStore *maildir_store;
-	
-	CAMEL_LOG_FULL_DEBUG ("Entering CamelMaildirFolder::set_name\n");
-	g_assert (folder);
-	g_assert (name);
-	g_assert (folder->parent_store);
-
-	maildir_folder = CAMEL_MAILDIR_FOLDER (folder);
-	maildir_store = CAMEL_MAILDIR_STORE (folder->parent_store);
-
-	/* call default implementation */
-	parent_class->set_name (folder, name, ex);
-	
-	if (maildir_folder->directory_path)
-		g_free (maildir_folder->directory_path);
-
-	CAMEL_LOG_FULL_DEBUG ("CamelMaildirFolder::set_name full_name is %s\n", folder->full_name);
-	CAMEL_LOG_FULL_DEBUG ("CamelMaildirFolder::set_name toplevel_dir is %s\n", maildir_store->toplevel_dir);
-	CAMEL_LOG_FULL_DEBUG ("CamelMaildirFolder::set_name separator is %c\n", camel_store_get_separator (folder->parent_store));
-
-	if (folder->full_name && folder->full_name[0])
-		maildir_folder->directory_path =
-			g_strconcat (maildir_store->toplevel_dir, G_DIR_SEPARATOR_S,
-				     folder->full_name, NULL);
-	else
-		maildir_folder->directory_path = g_strdup (maildir_store->toplevel_dir);
-
-	CAMEL_LOG_FULL_DEBUG ("CamelMaildirFolder::set_name: name set to %s\n", name);
-	CAMEL_LOG_FULL_DEBUG ("Leaving CamelMaildirFolder::set_name\n");
-}
-
-/**
- * CamelMaildirFolder::exists: tests whether the named maildir exists
- * @folder: folder object
- *
- * A created maildir folder object doesn't necessarily exist yet in the
- * filesystem. This function checks whether the maildir exists.
- * The structure of the maildir is stated in the maildir.5 manpage.
- *
- * maildir.5:
- *     A directory in maildir format  has  three  subdirectories,
- *     all on the same filesystem: tmp, new, and cur.
- *
- * Return value: TRUE if the maildir exists, FALSE otherwise
- */
-static gboolean
-_exists (CamelFolder *folder, CamelException *ex)
-{
-	CamelMaildirFolder *maildir_folder = CAMEL_MAILDIR_FOLDER (folder);
-	static const gchar *dir[3] = { "new", "cur", "tmp" };
-	gint i;
-	struct stat statbuf;
-	const gchar *maildir;
-	gchar *path;
-	gboolean rv = TRUE;
-
-	CAMEL_LOG_FULL_DEBUG ("Entering CamelMaildirFolder::exists\n");
-	g_assert (folder);
-	g_return_val_if_fail (maildir_folder->directory_path, FALSE);
-
-	maildir = maildir_folder->directory_path;
-
-	CAMEL_LOG_FULL_DEBUG ("CamelMailFolder::exists: checking maildir %s\n",
-			      maildir);
-
-	/* check whether the toplevel directory exists */
-	rv = _xstat (maildir, &statbuf) && S_ISDIR (statbuf.st_mode);
-
-	/* check whether the maildir subdirectories exist */
-	for (i = 0; rv && i < 3; i++) {
-		path = g_strconcat (maildir, G_DIR_SEPARATOR_S, dir[i], NULL);
-
-		rv = _xstat (path, &statbuf) && S_ISDIR (statbuf.st_mode);
-
-		g_free (path);
-	}
-
-	CAMEL_LOG_FULL_DEBUG ("CamelMaildirFolder::exists: %s\n",
-			      (rv) ? "maildir found" : "maildir not found");
-	CAMEL_LOG_FULL_DEBUG ("Leaving CamelMaildirFolder::exists\n");
-	return rv;
-}
-
-/**
- * CamelMaildirFolder::create: creates the named maildir
- * @folder: folder object
- *
- * A created maildir folder object doesn't necessarily exist yet in the
- * filesystem. This function creates the maildir if it doesn't yet exist.
- * The structure of the maildir is stated in the maildir.5 manpage.
- *
- * maildir.5:
- *     A directory in maildir format  has  three  subdirectories,
- *     all on the same filesystem: tmp, new, and cur.
- *
- * Return value: TRUE if the maildir existed already or was created,
- *               FALSE otherwise
- */
-static gboolean
-_create (CamelFolder *folder, CamelException *ex)
-{
-	CamelMaildirFolder *maildir_folder = CAMEL_MAILDIR_FOLDER (folder);
-	static const gchar *dir[3] = { "new", "cur", "tmp" };
-	gint i;
-	const gchar *maildir;
-	gchar *path;
-	gboolean rv = TRUE;
-
-	CAMEL_LOG_FULL_DEBUG ("Entering CamelMaildirFolder::create\n");
-	g_assert (folder);
-
-	/* check whether the maildir already exists */
-	if (camel_folder_exists (folder, ex)) return TRUE;
-
-	maildir = maildir_folder->directory_path;
-
-	CAMEL_LOG_FULL_DEBUG ("CamelMailFolder::create: creating maildir %s\n",
-			      maildir);
-
-	/* create the toplevel directory */
-	rv = _xmkdir (maildir);
-
-	/* create the maildir subdirectories */
-	for (i = 0; rv && i < 3; i++) {
-		path = g_strconcat (maildir, G_DIR_SEPARATOR_S, dir[i], NULL);
-
-		rv = _xmkdir (path);
-
-		g_free (path);
-	}
-
-	CAMEL_LOG_FULL_DEBUG ("CamelMaildirFolder::create: %s\n",
-			      rv ? "maildir created" : "an error occurred");
-	CAMEL_LOG_FULL_DEBUG ("Leaving CamelMaildirFolder::create\n");
-	return rv;
-}
-
-/**
- * CamelMaildirFolder::delete: delete the maildir folder
- * @folder: the folder object
- * @recurse:
- *
- * This function empties and deletes the maildir folder. The subdirectories
- * "tmp", "cur", and "new" are removed first and then the toplevel maildir
- * directory is deleted. All files from the directories are deleted as well, 
- * so you should be careful when using this function. If a subdirectory cannot
- * be deleted, then the operation it is stopped. Thus if an error occurs, the
- * maildir directory won't be removed, but it might no longer be a valid maildir.
- */
-static gboolean
-_delete (CamelFolder *folder, gboolean recurse, CamelException *ex)
-{
-	CamelMaildirFolder *maildir_folder = CAMEL_MAILDIR_FOLDER (folder);
-	static const gchar *dir[3] = { "new", "cur", "tmp" };
-	gint i;
-	const gchar *maildir;
-	gchar *path;
-	gboolean rv = TRUE;
-
-	CAMEL_LOG_FULL_DEBUG ("Entering CamelMaildirFolder::create\n");
-	g_assert (folder);
-
-	/* check whether the maildir already exists */
-	if (!camel_folder_exists (folder, ex)) return TRUE;
-
-	maildir = maildir_folder->directory_path;
-
-	CAMEL_LOG_FULL_DEBUG ("CamelMailFolder::delete: deleting maildir %s\n",
-			      maildir);
-
-	/* delete the maildir subdirectories */
-	for (i = 0; rv && i < 3; i++) {
-		path = g_strconcat (maildir, G_DIR_SEPARATOR_S, dir[i], NULL);
-
-		rv = _xrmdir (path);
-
-		g_free (path);
-	}
-
-	/* create the toplevel directory */
-	if (rv)
-		rv = _xrmdir (maildir);
-
-	CAMEL_LOG_FULL_DEBUG ("CamelMaildirFolder::delete: %s\n",
-			      rv ? "maildir deleted" : "an error occurred");
-	CAMEL_LOG_FULL_DEBUG ("Leaving CamelMaildirFolder::delete\n");
-	return rv;
-}
-
-/**
- * CamelMaildirFolder::delete_messages: empty the maildir folder
- * @folder:  the folder object
- *
- * This function empties the maildir folder. All messages from the
- * "cur" subdirectory are deleted. If a message cannot be deleted, then
- * it is just skipped and the rest of the messages are still deleted.
- * Files with names starting with a dot are skipped as described in the
- * maildir.5 manpage.
- *
- * maildir.5:
- *     It is a good idea for readers to skip all filenames in new
- *     and cur starting with a dot. Other than this, readers
- *     should not attempt to parse filenames.
- *
- * Return value: FALSE on error and if some messages could not be deleted.
- *               TRUE otherwise.
- */
-static gboolean 
-_delete_messages (CamelFolder *folder, CamelException *ex)
-{
-	CamelMaildirFolder *maildir_folder = CAMEL_MAILDIR_FOLDER (folder);
-	const gchar *maildir;
-	gchar *curdir, *file;
-	DIR *dir_handle;
-	struct dirent *dir_entry;
-	gboolean rv = TRUE;
-
-	CAMEL_LOG_FULL_DEBUG ("Entering CamelMaildirFolder::delete_messages\n");
-	g_assert (folder);
-
-	/* call default implementation */
-	parent_class->delete_messages (folder, ex);
-
-	/* Check if the folder didn't exist */
-	if (!camel_folder_exists (folder, ex)) return TRUE;
-
-	maildir = maildir_folder->directory_path;
-
-	CAMEL_LOG_FULL_DEBUG ("CamelMaildirFolder::delete_messages: "
-			      "deleting messages from %s\n", maildir);
-
-	/* delete messages from the maildir subdirectory "cur" */
-	curdir = g_strconcat (maildir, G_DIR_SEPARATOR_S, "cur", NULL);
-
-	dir_handle = _xopendir (curdir);
-	if (dir_handle) {
-		while ((dir_entry = readdir (dir_handle))) {
-			if (dir_entry->d_name[0] == '.') continue;
-			file = g_strconcat (curdir, G_DIR_SEPARATOR_S,
-					    dir_entry->d_name, NULL);
-
-			if (!_xunlink (file)) rv = FALSE;
-
-			g_free (file);
-		}
-		closedir (dir_handle);
-	} else
-		rv = FALSE;
-
-	g_free (curdir);
-	
-	CAMEL_LOG_FULL_DEBUG ("CamelMaildirFolder::delete_messages: %s\n",
-			      rv ? "messages deleted" : "an error occurred");
-	CAMEL_LOG_FULL_DEBUG ("Leaving CamelMaildirFolder::delete_messages\n");
-	return rv;
-}
-
-/**
- * CamelMaildirFolder::get_message: get a message from maildir
- * @folder: the folder object
- * @number: number of the message within the folder
- *
- * Return value: the message, NULL on error
- */
-static CamelMimeMessage *
-_get_message (CamelFolder *folder, gint number, CamelException *ex)
-{
-	CamelMaildirFolder *maildir_folder = CAMEL_MAILDIR_FOLDER(folder);
-	DIR *dir_handle;
-	struct dirent *dir_entry;
-	CamelStream *stream;
-	CamelMimeMessage *message = NULL;
-	const gchar *maildir;
-	gchar *curdir, *file = NULL;
-	gint count = -1;
-
-	CAMEL_LOG_FULL_DEBUG ("Entering CamelMaildirFolder::get_message\n");
-	g_assert(folder);
-
-	/* Check if the folder exists */
-	if (!camel_folder_exists (folder, ex)) return NULL;
-
-	maildir = maildir_folder->directory_path;
-
-	CAMEL_LOG_FULL_DEBUG ("CamelMaildirFolder::get_message: "
-			      "getting message #%d from %s\n", number, maildir);
-
-	/* Count until the desired message is reached */
-	curdir = g_strconcat (maildir, G_DIR_SEPARATOR_S, "cur", NULL);
-	if ((dir_handle = _xopendir (curdir))) {
-		while ((count < number) && (dir_entry = readdir (dir_handle)))
-			if (dir_entry->d_name[0] != '.') count++;
-
-		if (count == number)
-			file = g_strconcat (curdir, G_DIR_SEPARATOR_S,
-					    dir_entry->d_name, NULL);
-
-		closedir (dir_handle);
-	}
-	g_free (curdir);
-	if (!file) return NULL;
-
-	/* Create the message object */
-	message = camel_mime_message_new ();
-	stream = camel_stream_fs_new_with_name (file, CAMEL_STREAM_FS_READ);
-
-	if (!message || !stream) {
-		g_free (file);
-		if (stream) gtk_object_unref (GTK_OBJECT (stream));
-		if (message) gtk_object_unref (GTK_OBJECT (message));
-		return NULL;
-	}
-
-	camel_data_wrapper_construct_from_stream (CAMEL_DATA_WRAPPER (message),
-						  stream);
-	gtk_object_unref (GTK_OBJECT (stream));
-	gtk_object_set_data_full (GTK_OBJECT (message),
-				  "fullpath", file, g_free);
-
-	CAMEL_LOG_FULL_DEBUG ("CamelMaildirFolder::get_message: "
-			      "message %p created from %s\n", message, file);
-	CAMEL_LOG_FULL_DEBUG ("Leaving CamelMaildirFolder::get_message\n");
-	return message;
-}
-
-/**
- * CamelMaildirFolder::get_message_count: count messages in maildir
- * @folder:  the folder object
- *
- * Returns the number of messages in the maildir folder. New messages
- * are included in this count. 
- *
- * Return value: number of messages in the maildir, -1 on error
- */
-static gint
-_get_message_count (CamelFolder *folder, CamelException *ex)
-{
-	CamelMaildirFolder *maildir_folder = CAMEL_MAILDIR_FOLDER(folder);
-	const gchar *maildir;
-	gchar *newdir, *curdir, *newfile, *curfile;
-	DIR *dir_handle;
-	struct dirent *dir_entry;
-	guint count = 0;
-
-	CAMEL_LOG_FULL_DEBUG ("Entering "
-			      "CamelMaildirFolder::get_message_count\n");
-	g_assert(folder);
-
-	/* check if the maildir exists */
-	if (!camel_folder_exists (folder, ex)) return -1;
-
-	maildir = maildir_folder->directory_path;
-
-	newdir = g_strconcat (maildir, G_DIR_SEPARATOR_S, "new", NULL);
-	curdir = g_strconcat (maildir, G_DIR_SEPARATOR_S, "cur", NULL);
-
-	/* Check new messages */
-	CAMEL_LOG_FULL_DEBUG ("CamelMaildirFolder::get_message_count: "
-			      "getting new messages from %s\n", newdir);
-	if ((dir_handle = _xopendir (newdir))) {
-		while ((dir_entry = readdir (dir_handle))) {
-			if (dir_entry->d_name[0] == '.') continue;
-			newfile = g_strconcat (newdir, G_DIR_SEPARATOR_S,
-					       dir_entry->d_name, NULL);
-			curfile = g_strconcat (curdir, G_DIR_SEPARATOR_S,
-					       dir_entry->d_name, ":2,", NULL);
-			
-			_xrename (newfile, curfile);
-			
-			g_free (curfile);
-			g_free (newfile);
-		}
-		closedir (dir_handle);
-	}
-
-	/* Count messages */
-	CAMEL_LOG_FULL_DEBUG ("CamelMaildirFolder::get_message_count: "
-			      "counting messages in %s\n", curdir);
-	if ((dir_handle = _xopendir (curdir))) {
-		while ((dir_entry = readdir (dir_handle)))
-			if (dir_entry->d_name[0] != '.') count++;
-		closedir (dir_handle);
-	}
-
-	g_free (curdir);
-	g_free (newdir);
-
-	CAMEL_LOG_FULL_DEBUG ("CamelMaildirFolder::get_message_count: "
-			      " found %d messages\n", count);
-	CAMEL_LOG_FULL_DEBUG ("Leaving "
-			      "CamelMaildirFolder::get_message_count\n");
-	return count;
-}
-
-
-
-
-/**
- * CamelMaildirFolder::expunge: expunge messages marked as deleted
- * @folder:  the folder object
- *
- * Physically deletes the messages marked as deleted in the folder.
- */
-static void
-_expunge (CamelFolder *folder, CamelException *ex)
-{
-	CamelMimeMessage *message;
-	GList *node;
-	gchar *fullpath;
-
-	CAMEL_LOG_FULL_DEBUG ("Entering CamelMaildirFolder::expunge\n");
-	g_assert(folder);
-
-	/* expunge messages marked for deletion */
-	for (node = folder->message_list; node; node = g_list_next(node)) {
-		message = CAMEL_MIME_MESSAGE (node->data);
-		if (!message) {
-			CAMEL_LOG_WARNING ("CamelMaildirFolder::expunge: "
-					   "null message in node %p\n", node);
-			continue;
-		}
-				
-		if (camel_mime_message_get_flag (message, "DELETED")) {
-			CAMEL_LOG_FULL_DEBUG ("CamelMaildirFolder::expunge: "
-					      "expunging message #%d\n",
-					      message->message_number);
-
-			/* expunge the message */
-			fullpath = gtk_object_get_data (GTK_OBJECT (message),
-							"fullpath");
-			CAMEL_LOG_FULL_DEBUG ("CamelMaildirFolder::expunge: "
-					      "message fullpath is %s\n",
-					      fullpath);
-
-			if (_xunlink (fullpath))
-				message->expunged = TRUE;
-		} else {
-			CAMEL_LOG_FULL_DEBUG ("CamelMaildirFolder::expunge: "
-					      "skipping message #%d\n",
-					      message->message_number);
-		}
-	}
-	
-	CAMEL_LOG_FULL_DEBUG ("Leaving CamelMaildirFolder::expunge\n");
-}
-
-
-
-
-/**
- * CamelMaildirFolder::list_subfolders: return a list of subfolders
- * @folder:  the folder object
- *
- * Returns the names of the maildir subfolders in a list.
- *
- * Return value: list of subfolder names
- */
-static GList *
-_list_subfolders (CamelFolder *folder, CamelException *ex)
-{
-	CamelMaildirFolder *maildir_folder = CAMEL_MAILDIR_FOLDER (folder);
-	const gchar *maildir;
-	gchar *subdir;
-	struct stat statbuf;
-	struct dirent *dir_entry;
-	DIR *dir_handle;
-	GList *subfolders = NULL;
-
-	CAMEL_LOG_FULL_DEBUG ("Entering CamelMaildirFolder::list_subfolders\n");
-	g_assert (folder);
-
-	/* check if the maildir exists */
-	if (!camel_folder_exists (folder, ex)) return NULL;
-
-	/* scan through the maildir toplevel directory */
-	maildir = maildir_folder->directory_path;
-	if ((dir_handle = _xopendir (maildir))) {
-		while ((dir_entry = readdir (dir_handle))) {
-			if (dir_entry->d_name[0] == '.') continue;
-			if (strcmp (dir_entry->d_name, "new") == 0) continue;
-			if (strcmp (dir_entry->d_name, "cur") == 0) continue;
-			if (strcmp (dir_entry->d_name, "tmp") == 0) continue;
-
-			subdir = g_strconcat (maildir, G_DIR_SEPARATOR_S,
-					      dir_entry->d_name, NULL);
-			
-			if (_xstat (subdir, &statbuf)
-			    && S_ISDIR (statbuf.st_mode))
-				subfolders =
-					g_list_append (
-						subfolders,
-						g_strdup (dir_entry->d_name));
-			
-			g_free (subdir);
-		}
-		closedir (dir_handle);
-	}
-
-	CAMEL_LOG_FULL_DEBUG ("Leaving CamelMaildirFolder::list_subfolders\n");
-	return subfolders;
-}
-
-
-
-
-
-
-
-/*
- * fs utility function 
- *
- */
-
-static DIR *
-_xopendir (const gchar *path)
-{
-	DIR *handle;
-	g_assert (path);
-
-	handle = opendir (path);
-	if (!handle) {
-		CAMEL_LOG_WARNING ("ERROR: opendir (%s);\n", path);
-		CAMEL_LOG_FULL_DEBUG ("  Full error text is: (%d) %s\n",
-				      errno, strerror(errno));
-	}
-
-	return handle;
-}
-
-static gboolean
-_xstat (const gchar *path, struct stat *buf)
-{
-	gint stat_error;
-	g_assert (path);
-	g_assert (buf);
-
-	stat_error = stat (path, buf);
-	if (stat_error == 0) {
-		return TRUE;
-	} else if (errno == ENOENT) {
-		buf->st_mode = 0;
-		return TRUE;
-	} else {
-		CAMEL_LOG_WARNING ("ERROR: stat (%s, %p);\n", path, buf);
-		CAMEL_LOG_FULL_DEBUG ("  Full error text is: (%d) %s\n",
-				      errno, strerror(errno));
-		return FALSE;
-	}
-}
-
-static gboolean
-_xmkdir (const gchar *path)
-{
-	g_assert (path);
-
-	if (mkdir (path, S_IRWXU) == -1) {
-		CAMEL_LOG_WARNING ("ERROR: mkdir (%s, S_IRWXU);\n", path);
-		CAMEL_LOG_FULL_DEBUG ("  Full error text is: (%d) %s\n",
-				      errno, strerror(errno));
-		return FALSE;
-	} 
-
-	return TRUE;
-}
-
-static gboolean
-_xrename (const gchar *from, const gchar *to)
-{
-	g_assert (from);
-	g_assert (to);
-
-	if (rename (from, to) == 0) {
-		return TRUE;
-	} else {
-		CAMEL_LOG_WARNING ("ERROR: rename (%s, %s);\n", from, to);
-		CAMEL_LOG_FULL_DEBUG ("  Full error text is: (%d) %s\n",
-				      errno, strerror(errno));
-		return FALSE;
-	}
-}
-
-static gboolean
-_xunlink (const gchar *path)
-{
-	g_assert (path);
-
-	if (unlink (path) == 0) {
-		return TRUE;
-	} else if (errno == ENOENT) {
-		return TRUE;
-	} else {
-		CAMEL_LOG_WARNING ("ERROR: unlink (%s);\n", path);
-		CAMEL_LOG_FULL_DEBUG ("  Full error text is: (%d) %s\n",
-				      errno, strerror(errno));
-		return FALSE;
-	}
-}
-
-static gboolean
-_xrmdir (const gchar *path)
-{
-	DIR *dir_handle;
-	struct dirent *dir_entry;
-	gchar *file;
-	struct stat statbuf;
-	g_assert (path);
-
-	dir_handle = opendir (path);
-	if (!dir_handle && errno == ENOENT) {
-		return TRUE;
-	} else if (!dir_handle) {
-		CAMEL_LOG_WARNING ("ERROR: opendir (%s);\n", path);
-		CAMEL_LOG_FULL_DEBUG ("  Full error text is: (%d) %s\n",
-				      errno, strerror(errno));
-		return FALSE;
-	}
-
-	while ((dir_entry = readdir (dir_handle))) {
-		file = g_strconcat (path, G_DIR_SEPARATOR_S, dir_entry->d_name,
-				    NULL);
-		if (_xstat (file, &statbuf) && S_ISREG (statbuf.st_mode))
-			_xunlink (file);
-		g_free (file);
-	}
-
-	closedir (dir_handle);
-
-	if (rmdir (path) == 0) {
-		return TRUE;
-	} else if (errno == ENOENT) {
-		return TRUE;
-	} else {
-		CAMEL_LOG_WARNING ("ERROR: rmdir (%s);\n", path);
-		CAMEL_LOG_FULL_DEBUG ("  Full error text is: (%d) %s\n",
-				      errno, strerror(errno));
-		return FALSE;
-	} 
-}
-
-/** *** **/
-
diff --git a/camel/providers/maildir/camel-maildir-folder.h b/camel/providers/maildir/camel-maildir-folder.h
deleted file mode 100644
index 5997da2011..0000000000
--- a/camel/providers/maildir/camel-maildir-folder.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-maildir-folder.h : Abstract class for an email folder */
-
-/* 
- *
- * Copyright (C) 1999 Bertrand Guiheneuf  .
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-#ifndef CAMEL_MAILDIR_FOLDER_H
-#define CAMEL_MAILDIR_FOLDER_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include 
-#include "camel-folder.h"
-/*  #include "camel-store.h" */
-
-#define CAMEL_MAILDIR_FOLDER_TYPE     (camel_maildir_folder_get_type ())
-#define CAMEL_MAILDIR_FOLDER(obj)     (GTK_CHECK_CAST((obj), CAMEL_MAILDIR_FOLDER_TYPE, CamelMaildirFolder))
-#define CAMEL_MAILDIR_FOLDER_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_MAILDIR_FOLDER_TYPE, CamelMaildirFolderClass))
-#define IS_CAMEL_MAILDIR_FOLDER(o)    (GTK_CHECK_TYPE((o), CAMEL_MAILDIR_FOLDER_TYPE))
-
-
-typedef struct {
-	CamelFolder parent_object;
-	
-	gchar *directory_path;
-} CamelMaildirFolder;
-
-
-
-typedef struct {
-	CamelFolderClass parent_class;
-
-	/* Virtual methods */	
-
-} CamelMaildirFolderClass;
-
-
-/* public methods */
-
-/* Standard Gtk function */
-GtkType camel_maildir_folder_get_type (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_MAILDIR_FOLDER_H */
diff --git a/camel/providers/maildir/camel-maildir-provider.c b/camel/providers/maildir/camel-maildir-provider.c
deleted file mode 100644
index cd5521adc0..0000000000
--- a/camel/providers/maildir/camel-maildir-provider.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-maildir-provider.c: maildir provider registration code */
-
-/* 
- *
- * Copyright (C) 1999 Bertrand Guiheneuf  .
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#include "config.h"
-#include "camel-maildir-store.h"
-#include "camel-provider.h"
-#include "camel-log.h"
-
-
-static CamelProvider _maildir_provider = {
-	(GtkType) 0,
-	PROVIDER_STORE,
-	"maildir",
-	"Maildir provider for Camel",
-	"This maildir provider is based on the default MH provider of Camel",
-	(GModule *) NULL
-};
-
-
-
-CamelProvider *
-camel_provider_module_init ()
-{
-	_maildir_provider.object_type = camel_maildir_store_get_type();
-	return &_maildir_provider;
-}
diff --git a/camel/providers/maildir/camel-maildir-store.c b/camel/providers/maildir/camel-maildir-store.c
deleted file mode 100644
index 8f37494003..0000000000
--- a/camel/providers/maildir/camel-maildir-store.c
+++ /dev/null
@@ -1,124 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-maildir-store.c : class for an maildir store */
-
-/* 
- *
- * Copyright (C) 1999 Bertrand Guiheneuf  .
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#include "camel-maildir-store.h"
-#include "camel-maildir-folder.h"
-#include "url-util.h"
-
-static CamelStoreClass *parent_class=NULL;
-
-/* Returns the class for a CamelMaildirStore */
-#define CMAILDIRS_CLASS(so) CAMEL_MAILDIR_STORE_CLASS (GTK_OBJECT(so)->klass)
-#define CF_CLASS(so) CAMEL_FOLDER_CLASS (GTK_OBJECT(so)->klass)
-#define CMAILDIRF_CLASS(so) CAMEL_MAILDIR_FOLDER_CLASS (GTK_OBJECT(so)->klass)
-
-static void _init (CamelStore *store, CamelSession *session,
-		   const gchar *url_name);
-static CamelFolder *_get_folder (CamelStore *store, const gchar *folder_name);
-
-static void
-camel_maildir_store_class_init (
-	CamelMaildirStoreClass *camel_maildir_store_class)
-{
-	CamelStoreClass *camel_store_class =
-		CAMEL_STORE_CLASS (camel_maildir_store_class);
-
-	parent_class = gtk_type_class (camel_store_get_type ());
-	
-	/* virtual method definition */
-	/* virtual method overload */
-	camel_store_class->init = _init;
-	camel_store_class->get_folder = _get_folder;
-}
-
-static void
-camel_maildir_store_init (gpointer object, gpointer klass)
-{
-	CamelMaildirStore *maildir_store = CAMEL_MAILDIR_STORE (object);
-	CamelStore *store = CAMEL_STORE (object);
-	
-	store->separator = G_DIR_SEPARATOR;
-}
-
-GtkType
-camel_maildir_store_get_type (void)
-{
-	static GtkType camel_maildir_store_type = 0;
-	
-	if (!camel_maildir_store_type)	{
-		GtkTypeInfo camel_maildir_store_info =	
-		{
-			"CamelMaildirStore",
-			sizeof (CamelMaildirStore),
-			sizeof (CamelMaildirStoreClass),
-			(GtkClassInitFunc) camel_maildir_store_class_init,
-			(GtkObjectInitFunc) camel_maildir_store_init,
-				/* reserved_1 */ NULL,
-				/* reserved_2 */ NULL,
-			(GtkClassInitFunc) NULL,
-		};
-		
-		camel_maildir_store_type =
-			gtk_type_unique (CAMEL_STORE_TYPE,
-					 &camel_maildir_store_info);
-	}
-	
-	return camel_maildir_store_type;
-}
-
-static void 
-_init (CamelStore *store, CamelSession *session, const gchar *url_name)
-{
-	CamelMaildirStore *maildir_store = CAMEL_MAILDIR_STORE (store);
-	Gurl *store_url;
-	g_assert (url_name);
-
-	/* call parent implementation */
-	parent_class->init (store, session, url_name);
-	
-	/* find the path in the URL*/
-	store_url = g_url_new (url_name);
-
-	g_return_if_fail (store_url);
-	g_return_if_fail (store_url->path); 
-	
-	maildir_store->toplevel_dir = g_strdup (store_url->path); 
-
-	g_url_free (store_url);
-}
-
-static CamelFolder *
-_get_folder (CamelStore *store, const gchar *folder_name)
-{
-	CamelMaildirStore *maildir_store = CAMEL_MAILDIR_STORE (store);
-	CamelMaildirFolder *new_maildir_folder;
-	CamelFolder *new_folder;
-
-	new_maildir_folder = gtk_type_new (CAMEL_MAILDIR_FOLDER_TYPE);
-	new_folder = CAMEL_FOLDER (new_maildir_folder);
-
-	CF_CLASS (new_folder)->init_with_store (new_folder, store, NULL);
-	CF_CLASS (new_folder)->set_name (new_folder, folder_name, NULL);
-	
-	return new_folder;
-}
diff --git a/camel/providers/maildir/camel-maildir-store.h b/camel/providers/maildir/camel-maildir-store.h
deleted file mode 100644
index 1a95ed1436..0000000000
--- a/camel/providers/maildir/camel-maildir-store.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-maildirstore.h : class for an maildir store */
-
-/* 
- *
- * Copyright (C) 1999 Bertrand Guiheneuf  .
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef CAMEL_MAILDIR_STORE_H
-#define CAMEL_MAILDIR_STORE_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include 
-#include "camel-store.h"
-
-#define CAMEL_MAILDIR_STORE_TYPE     (camel_maildir_store_get_type ())
-#define CAMEL_MAILDIR_STORE(obj)     (GTK_CHECK_CAST((obj), CAMEL_MAILDIR_STORE_TYPE, CamelMaildirStore))
-#define CAMEL_MAILDIR_STORE_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_MAILDIR_STORE_TYPE, CamelMaildirStoreClass))
-#define IS_CAMEL_MAILDIR_STORE(o)    (GTK_CHECK_TYPE((o), CAMEL_MAILDIR_STORE_TYPE))
-
-
-typedef struct {
-	CamelStore parent_object;	
-	
-	gchar *toplevel_dir;	
-} CamelMaildirStore;
-
-
-
-typedef struct {
-	CamelStoreClass parent_class;
-
-
-} CamelMaildirStoreClass;
-
-
-/* public methods */
-
-/* Standard Gtk function */
-GtkType camel_maildir_store_get_type (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_MAILDIR_STORE_H */
-
-
diff --git a/camel/providers/mbox/.cvsignore b/camel/providers/mbox/.cvsignore
deleted file mode 100644
index fd6b811c68..0000000000
--- a/camel/providers/mbox/.cvsignore
+++ /dev/null
@@ -1,7 +0,0 @@
-.deps
-Makefile
-Makefile.in
-.libs
-.deps
-*.lo
-*.la
diff --git a/camel/providers/mbox/Makefile.am b/camel/providers/mbox/Makefile.am
deleted file mode 100644
index defd6925cc..0000000000
--- a/camel/providers/mbox/Makefile.am
+++ /dev/null
@@ -1,41 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-SUBDIRS = 
-
-libcamelmboxincludedir = $(includedir)/camel
-
-
-providerdir = $(pkglibdir)/camel-providers/$(VERSION)
-
-provider_LTLIBRARIES = libcamelmbox.la
-provider_DATA = libcamelmbox.urls
-
-INCLUDES = -I.. \
-	-I$(srcdir)/..				\
-	-I$(top_srcdir)/camel			\
-	-I$(top_srcdir)/intl			\
-	-I$(top_srcdir)/libibex			\
-	-I$(top_srcdir)/e-util			\
-	-I$(top_srcdir)				\
-	-I$(includedir)				\
-	$(GTK_INCLUDEDIR)			\
-	-DG_LOG_DOMAIN=\"camel-mbox-provider\"	
-
-libcamelmbox_la_SOURCES = 			\
-	camel-mbox-folder.c			\
-	camel-mbox-provider.c			\
-	camel-mbox-store.c			\
-	camel-mbox-summary.c
-
-libcamelmboxinclude_HEADERS =			\
-	camel-mbox-folder.h			\
-	camel-mbox-store.h			\
-	camel-mbox-summary.h
-
-libcamelmbox_la_LDFLAGS = -version-info 0:0:0 -rpath $(libdir) 
-
-libcamelmbox_la_LIBADD = $(top_builddir)/e-util/libeutil.la $(top_builddir)/libibex/libibex.la $(UNICODE_LIBS)
-#libcamelmbox_la_LIBADD = $(top_builddir)/libibex/libibex.la $(UNICODE_LIBS)
-
-EXTRA_DIST = libcamelmbox.urls
-
diff --git a/camel/providers/mbox/camel-mbox-folder.c b/camel/providers/mbox/camel-mbox-folder.c
deleted file mode 100644
index ccf57f02b7..0000000000
--- a/camel/providers/mbox/camel-mbox-folder.c
+++ /dev/null
@@ -1,855 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; fill-column: 160 -*- */
-/* camel-mbox-folder.c : Abstract class for an email folder */
-
-/* 
- * Authors: Bertrand Guiheneuf  
- *          Michael Zucchi 
- *
- * Copyright (C) 1999, 2000 Helix Code Inc.
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#include  
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include "camel-mbox-folder.h"
-#include "camel-mbox-store.h"
-#include "string-utils.h"
-#include "camel-stream-fs.h"
-#include "camel-mbox-summary.h"
-#include "camel-data-wrapper.h"
-#include "camel-mime-message.h"
-#include "camel-stream-filter.h"
-#include "camel-mime-filter-from.h"
-#include "camel-exception.h"
-
-#define d(x)
-
-static CamelFolderClass *parent_class=NULL;
-
-/* Returns the class for a CamelMboxFolder */
-#define CMBOXF_CLASS(so) CAMEL_MBOX_FOLDER_CLASS (GTK_OBJECT(so)->klass)
-#define CF_CLASS(so) CAMEL_FOLDER_CLASS (GTK_OBJECT(so)->klass)
-#define CMBOXS_CLASS(so) CAMEL_STORE_CLASS (GTK_OBJECT(so)->klass)
-
-
-static void mbox_init (CamelFolder *folder, CamelStore *parent_store,
-		   CamelFolder *parent_folder, const gchar *name,
-		   gchar separator, CamelException *ex);
-
-static void mbox_open (CamelFolder *folder, CamelFolderOpenMode mode, CamelException *ex);
-static void mbox_close (CamelFolder *folder, gboolean expunge, CamelException *ex);
-static gboolean mbox_exists (CamelFolder *folder, CamelException *ex);
-static gboolean mbox_create(CamelFolder *folder, CamelException *ex);
-static gboolean mbox_delete (CamelFolder *folder, gboolean recurse, CamelException *ex);
-static gboolean mbox_delete_messages (CamelFolder *folder, CamelException *ex);
-static gint mbox_get_message_count (CamelFolder *folder, CamelException *ex);
-static void mbox_append_message (CamelFolder *folder, CamelMimeMessage *message, CamelException *ex);
-static GPtrArray *mbox_get_uids (CamelFolder *folder, CamelException *ex);
-static GPtrArray *mbox_get_subfolder_names (CamelFolder *folder, CamelException *ex);
-static GPtrArray *mbox_get_summary (CamelFolder *folder, CamelException *ex);
-static void mbox_free_summary (CamelFolder *folder, GPtrArray *array);
-static CamelMimeMessage *mbox_get_message_by_uid (CamelFolder *folder, const gchar *uid, CamelException *ex);
-
-static void mbox_expunge (CamelFolder *folder, CamelException *ex);
-#if 0
-static void _copy_message_to (CamelFolder *folder, CamelMimeMessage *message, CamelFolder *dest_folder, CamelException *ex);
-static const gchar *_get_message_uid (CamelFolder *folder, CamelMimeMessage *message, CamelException *ex);
-#endif
-
-static void mbox_delete_message_by_uid(CamelFolder *folder, const gchar *uid, CamelException *ex);
-
-static const CamelMessageInfo *mbox_summary_get_by_uid(CamelFolder *f, const char *uid);
-
-static GList *mbox_search_by_expression(CamelFolder *folder, const char *expression, CamelException *ex);
-
-static void mbox_finalize (GtkObject *object);
-
-static void
-camel_mbox_folder_class_init (CamelMboxFolderClass *camel_mbox_folder_class)
-{
-	CamelFolderClass *camel_folder_class = CAMEL_FOLDER_CLASS (camel_mbox_folder_class);
-	GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (camel_folder_class);
-
-	parent_class = gtk_type_class (camel_folder_get_type ());
-		
-	/* virtual method definition */
-
-	/* virtual method overload */
-	camel_folder_class->init = mbox_init;
-	camel_folder_class->open = mbox_open;
-	camel_folder_class->close = mbox_close;
-	camel_folder_class->exists = mbox_exists;
-	camel_folder_class->create = mbox_create;
-	camel_folder_class->delete = mbox_delete;
-	camel_folder_class->delete_messages = mbox_delete_messages;
-	camel_folder_class->get_message_count = mbox_get_message_count;
-	camel_folder_class->append_message = mbox_append_message;
-	camel_folder_class->get_uids = mbox_get_uids;
-	camel_folder_class->get_subfolder_names = mbox_get_subfolder_names;
-	camel_folder_class->get_summary = mbox_get_summary;
-	camel_folder_class->free_summary = mbox_free_summary;
-	camel_folder_class->expunge = mbox_expunge;
-
-	camel_folder_class->get_message_by_uid = mbox_get_message_by_uid;
-	camel_folder_class->delete_message_by_uid = mbox_delete_message_by_uid;
-
-	camel_folder_class->search_by_expression = mbox_search_by_expression;
-
-	camel_folder_class->summary_get_by_uid = mbox_summary_get_by_uid;
-
-	gtk_object_class->finalize = mbox_finalize;
-	
-}
-
-static void           
-mbox_finalize (GtkObject *object)
-{
-	CamelMboxFolder *mbox_folder = CAMEL_MBOX_FOLDER (object);
-
-	g_free (mbox_folder->folder_file_path);
-	g_free (mbox_folder->folder_dir_path);
-
-	GTK_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-GtkType
-camel_mbox_folder_get_type (void)
-{
-	static GtkType camel_mbox_folder_type = 0;
-	
-	if (!camel_mbox_folder_type)	{
-		GtkTypeInfo camel_mbox_folder_info =	
-		{
-			"CamelMboxFolder",
-			sizeof (CamelMboxFolder),
-			sizeof (CamelMboxFolderClass),
-			(GtkClassInitFunc) camel_mbox_folder_class_init,
-			(GtkObjectInitFunc) NULL,
-				/* reserved_1 */ NULL,
-				/* reserved_2 */ NULL,
-			(GtkClassInitFunc) NULL,
-		};
-		
-		camel_mbox_folder_type = gtk_type_unique (CAMEL_FOLDER_TYPE, &camel_mbox_folder_info);
-	}
-	
-	return camel_mbox_folder_type;
-}
-
-static void 
-mbox_init (CamelFolder *folder, CamelStore *parent_store,
-       CamelFolder *parent_folder, const gchar *name, gchar separator,
-       CamelException *ex)
-{
-	CamelMboxFolder *mbox_folder = (CamelMboxFolder *)folder;
-	const gchar *root_dir_path;
-
-	/* call parent method */
-	parent_class->init (folder, parent_store, parent_folder,
-			    name, separator, ex);
-	if (camel_exception_get_id (ex))
-		return;
-
-	/* we assume that the parent init
-	   method checks for the existance of @folder */
-	folder->can_hold_messages = TRUE;
-	folder->can_hold_folders = TRUE;
-	folder->has_summary_capability = TRUE;
-	folder->has_search_capability = TRUE;
-
-	folder->permanent_flags = CAMEL_MESSAGE_ANSWERED |
-		CAMEL_MESSAGE_DELETED |
-		CAMEL_MESSAGE_DRAFT |
-		CAMEL_MESSAGE_FLAGGED |
-		CAMEL_MESSAGE_SEEN |
-		CAMEL_MESSAGE_USER;
-
- 	mbox_folder->summary = NULL;
- 	mbox_folder->search = NULL;
-
-	/* now set the name info */
-	g_free (mbox_folder->folder_file_path);
-	g_free (mbox_folder->folder_dir_path);
-	g_free (mbox_folder->index_file_path);
-
-	root_dir_path = camel_mbox_store_get_toplevel_dir (CAMEL_MBOX_STORE(folder->parent_store));
-
-	mbox_folder->folder_file_path = g_strdup_printf ("%s/%s", root_dir_path, folder->full_name);
-	mbox_folder->summary_file_path = g_strdup_printf ("%s/%s-ev-summary", root_dir_path, folder->full_name);
-	mbox_folder->folder_dir_path = g_strdup_printf ("%s/%s.sdb", root_dir_path, folder->full_name);
-	mbox_folder->index_file_path = g_strdup_printf ("%s/%s.ibex", root_dir_path, folder->full_name);
-}
-
-static void
-mbox_open (CamelFolder *folder, CamelFolderOpenMode mode, CamelException *ex)
-{
-	CamelMboxFolder *mbox_folder = CAMEL_MBOX_FOLDER (folder);
-	int forceindex;
-	struct stat st;
-
-	/* call parent class */
-	parent_class->open (folder, mode, ex);
-	if (camel_exception_get_id(ex))
-		return;
-
-	/* if we have no index file, force it */
-	forceindex = stat(mbox_folder->index_file_path, &st) == -1;
-
-	printf("loading ibex\n");
-	mbox_folder->index = ibex_open(mbox_folder->index_file_path, O_CREAT|O_RDWR, 0600);
-	printf("loaded ibex\n");
-	if (mbox_folder->index == NULL) {
-		/* yes, this isn't fatal at all */
-		g_warning("Could not open/create index file: %s: indexing not performed",
-			  strerror(errno));
-	}
-
-	/* no summary (disk or memory), and we're proverbially screwed */
-	printf("loading summary\n");
-	mbox_folder->summary = camel_mbox_summary_new(mbox_folder->summary_file_path, mbox_folder->folder_file_path, mbox_folder->index);
-	if (mbox_folder->summary == NULL
-	    || camel_mbox_summary_load(mbox_folder->summary, forceindex) == -1) {
-		camel_exception_set (ex, 
-				     CAMEL_EXCEPTION_FOLDER_INVALID, /* FIXME: right error code */
-				     "Could not create summary");
-		return;
-	}
-	printf("summary loaded\n");
-}
-
-static void
-mbox_close (CamelFolder *folder, gboolean expunge, CamelException *ex)
-{
-	CamelMboxFolder *mbox_folder = CAMEL_MBOX_FOLDER (folder);
-
-	/* call parent implementation */
-	parent_class->close (folder, expunge, ex);
-
-	if (expunge) {
-		mbox_expunge(folder, ex);
-	}
-
-	/* save index */
-	if (mbox_folder->index) {
-		ibex_close(mbox_folder->index);
-		mbox_folder->index = NULL;
-	}
-	if (mbox_folder->summary) {
-		camel_folder_summary_save ((CamelFolderSummary *)mbox_folder->summary);
-		gtk_object_unref((GtkObject *)mbox_folder->summary);
-		mbox_folder->summary = NULL;
-	}
-	if (mbox_folder->search) {
-		gtk_object_unref((GtkObject *)mbox_folder->search);
-		mbox_folder->search = NULL;
-	}
-}
-
-static void
-mbox_expunge (CamelFolder *folder, CamelException *ex)
-{
-	CamelMboxFolder *mbox = (CamelMboxFolder *)folder;
-
-	if (camel_mbox_summary_expunge(mbox->summary) == -1) {
-		camel_exception_setv (ex, CAMEL_EXCEPTION_FOLDER_INVALID, /* FIXME: right error code */
-				      "Could not expunge: %s", strerror(errno));
-	}
-
-	/* TODO: check it actually changed */
-	gtk_signal_emit_by_name((GtkObject *)folder, "folder_changed", 0);
-}
-
-/* FIXME: clean up this snot */
-static gboolean
-mbox_exists (CamelFolder *folder, CamelException *ex)
-{
-	CamelMboxFolder *mbox_folder;
-	struct stat stat_buf;
-	gint stat_error;
-	gboolean exists;
-
-	g_assert(folder != NULL);
-
-	mbox_folder = CAMEL_MBOX_FOLDER (folder);
-
-	/* check if the mbox file path is determined */
-	if (!mbox_folder->folder_file_path) {
-		camel_exception_set (ex, 
-				     CAMEL_EXCEPTION_FOLDER_INVALID,
-				     "undetermined folder file path. Maybe use set_name ?");
-		return FALSE;
-	}
-
-	/* check if the mbox dir path is determined */
-	if (!mbox_folder->folder_dir_path) {
-		camel_exception_set (ex, 
-				     CAMEL_EXCEPTION_FOLDER_INVALID,
-				     "undetermined folder directory path. Maybe use set_name ?");
-		return FALSE;
-	}
-
-
-	/* we should not check for that here */
-#if 0
-	/* check if the mbox directory exists */
-	access_result = access (mbox_folder->folder_dir_path, F_OK);
-	if (access_result < 0) {
-		camel_exception_set (ex, 
-				     CAMEL_EXCEPTION_SYSTEM,
-				     strerror(errno));
-		return FALSE;
-	}
-	stat_error = stat (mbox_folder->folder_dir_path, &stat_buf);
-	if (stat_error == -1)  {
-		camel_exception_set (ex, 
-				     CAMEL_EXCEPTION_SYSTEM,
-				     strerror(errno));
-		return FALSE;
-	}
-	exists = S_ISDIR (stat_buf.st_mode);
-	if (!exists) return FALSE;
-#endif 
-
-
-	/* check if the mbox file exists */
-	stat_error = stat (mbox_folder->folder_file_path, &stat_buf);
-	if (stat_error == -1)
-		return FALSE;
-	
-	exists = S_ISREG (stat_buf.st_mode);
-	/* we should  check the rights here  */
-	
-	return exists;
-}
-
-/* FIXME: clean up this snot */
-static gboolean
-mbox_create (CamelFolder *folder, CamelException *ex)
-{
-	CamelMboxFolder *mbox_folder = CAMEL_MBOX_FOLDER (folder);
-	const gchar *folder_file_path, *folder_dir_path;
-	mode_t dir_mode = S_IRWXU;
-	gint mkdir_error;
-	gboolean folder_already_exists;
-	int creat_fd;
-
-	g_assert(folder != NULL);
-
-	/* call default implementation */
-	parent_class->create (folder, ex);
-
-	/* get the paths of what we need to create */
-	folder_file_path = mbox_folder->folder_file_path;
-	folder_dir_path = mbox_folder->folder_dir_path;
-	
-	if (!(folder_file_path || folder_dir_path)) {
-		camel_exception_set (ex, 
-				     CAMEL_EXCEPTION_FOLDER_INVALID,
-				     "invalid folder path. Use set_name ?");
-		return FALSE;
-	}
-
-	
-	/* if the folder already exists, simply return */
-	folder_already_exists = camel_folder_exists (folder,ex);
-	if (camel_exception_get_id (ex))
-		return FALSE;
-
-	if (folder_already_exists)
-		return TRUE;
-
-
-	/* create the directory for the subfolders */
-	mkdir_error = mkdir (folder_dir_path, dir_mode);
-	if (mkdir_error == -1)
-		goto io_error;
-	
-
-	/* create the mbox file */ 
-	/* it must be rw for the user and none for the others */
-	creat_fd = open (folder_file_path, 
-			 O_WRONLY | O_CREAT | O_APPEND,
-			 0600);
-	if (creat_fd == -1)
-		goto io_error;
-
-	close (creat_fd);
-
-	return TRUE;
-
-	/* exception handling for io errors */
-	io_error :
-		if (errno == EACCES) {
-			camel_exception_set (ex, 
-					     CAMEL_EXCEPTION_FOLDER_INSUFFICIENT_PERMISSION,
-					     "You don't have the permission to create the mbox file.");
-			return FALSE;
-		} else {
-			camel_exception_set (ex, 
-					     CAMEL_EXCEPTION_SYSTEM,
-					     "Unable to create the mbox file.");
-			return FALSE;
-		}
-}
-
-
-/* FIXME: cleanup */
-static gboolean
-mbox_delete (CamelFolder *folder, gboolean recurse, CamelException *ex)
-{
-	CamelMboxFolder *mbox_folder = CAMEL_MBOX_FOLDER (folder);
-	const gchar *folder_file_path, *folder_dir_path;
-	gint rmdir_error = 0;
-	gint unlink_error = 0;
-	gboolean folder_already_exists;
-
-	g_assert(folder != NULL);
-
-	/* check if the folder object exists */
-
-	/* in the case where the folder does not exist, 
-	   return immediatly */
-	folder_already_exists = camel_folder_exists (folder, ex);
-	if (camel_exception_get_id (ex))
-		return FALSE;
-
-	if (!folder_already_exists)
-		return TRUE;
-
-
-	/* call default implementation.
-	   It should delete the messages in the folder
-	   and recurse the operation to subfolders */
-	parent_class->delete (folder, recurse, ex);
-	
-
-	/* get the paths of what we need to be deleted */
-	folder_file_path = mbox_folder->folder_file_path;
-	folder_dir_path = mbox_folder->folder_file_path;
-	
-	if (!(folder_file_path || folder_dir_path)) {
-		camel_exception_set (ex, 
-				     CAMEL_EXCEPTION_FOLDER_INVALID,
-				     "invalid folder path. Use set_name ?");
-		return FALSE;
-	}
-
-	
-	/* physically delete the directory */
-	rmdir_error = rmdir (folder_dir_path);
-	if (rmdir_error == -1) 
-		switch (errno) { 
-		case EACCES :
-			camel_exception_set (ex, 
-					     CAMEL_EXCEPTION_FOLDER_INSUFFICIENT_PERMISSION,
-					     "Not enough permission to delete the mbox folder");
-			return FALSE;			
-			break;
-			
-		case ENOTEMPTY :
-				camel_exception_set (ex, 
-					     CAMEL_EXCEPTION_FOLDER_NON_EMPTY,
-						     "mbox folder not empty. Cannot delete it. Maybe use recurse flag ?");
-				return FALSE;		
-				break;
-		default :
-			camel_exception_set (ex, 
-					     CAMEL_EXCEPTION_SYSTEM,
-					     "Unable to delete the mbox folder.");
-			return FALSE;
-	}
-	
-	/* physically delete the file */
-	unlink_error = unlink (folder_dir_path);
-	if (unlink_error == -1) 
-		switch (errno) { 
-		case EACCES :
-		case EPERM :
-		case EROFS :
-			camel_exception_set (ex, 
-					     CAMEL_EXCEPTION_FOLDER_INSUFFICIENT_PERMISSION,
-					     "Not enough permission to delete the mbox file");
-			return FALSE;			
-			break;
-			
-		case EFAULT :
-		case ENOENT :
-		case ENOTDIR :
-		case EISDIR :
-			camel_exception_set (ex, 
-					     CAMEL_EXCEPTION_FOLDER_INVALID_PATH,
-					     "Invalid mbox file");
-			return FALSE;			
-			break;
-
-		default :
-			camel_exception_set (ex, 
-					     CAMEL_EXCEPTION_SYSTEM,
-					     "Unable to delete the mbox folder.");
-			return FALSE;
-	}
-
-
-	return TRUE;
-}
-
-/* TODO: remove this */
-gboolean
-mbox_delete_messages (CamelFolder *folder, CamelException *ex)
-{
-	
-	CamelMboxFolder *mbox_folder = CAMEL_MBOX_FOLDER (folder);
-	const gchar *folder_file_path;
-	gboolean folder_already_exists;
-	int creat_fd;
-	g_assert(folder!=NULL);
-	
-	/* in the case where the folder does not exist, 
-	   return immediatly */
-	folder_already_exists = camel_folder_exists (folder, ex);
-	if (camel_exception_get_id (ex)) return FALSE;
-
-	if (!folder_already_exists) return TRUE;
-
-
-
-	/* get the paths of the mbox file we need to delete */
-	folder_file_path = mbox_folder->folder_file_path;
-	
-	if (!folder_file_path) {
-		camel_exception_set (ex, 
-				     CAMEL_EXCEPTION_FOLDER_INVALID,
-				     "invalid folder path. Use set_name ?");
-		return FALSE;
-	}
-
-		
-	/* create the mbox file */ 
-	/* it must be rw for the user and none for the others */
-	creat_fd = open (folder_file_path, 
-			 O_WRONLY | O_TRUNC,
-			 0600); 
-	if (creat_fd == -1)
-		goto io_error;
-	close (creat_fd);
-	
-	return TRUE;
-
-	/* exception handling for io errors */
-	io_error :
-		if (errno == EACCES) {
-			camel_exception_set (ex, 
-					     CAMEL_EXCEPTION_FOLDER_INSUFFICIENT_PERMISSION,
-					     "You don't have the permission to write in the mbox file.");
-			return FALSE;
-		} else {
-			camel_exception_set (ex, 
-					     CAMEL_EXCEPTION_SYSTEM,
-					     "Unable to write in the mbox file.");
-			return FALSE;
-		}
-	
-
-}
-
-static gint
-mbox_get_message_count (CamelFolder *folder, CamelException *ex)
-{
-	CamelMboxFolder *mbox_folder = (CamelMboxFolder *)folder;
-
-	g_assert (folder);
-	g_assert (mbox_folder->summary);
-	
-	return camel_folder_summary_count((CamelFolderSummary *)mbox_folder->summary);
-}
-
-/* FIXME: this may need some tweaking for performance? */
-static void
-mbox_append_message (CamelFolder *folder, CamelMimeMessage *message, CamelException *ex)
-{
-	CamelMboxFolder *mbox_folder = CAMEL_MBOX_FOLDER (folder);
-	CamelStream *output_stream = NULL, *filter_stream = NULL;
-	CamelMimeFilter *filter_from;
-	struct stat st;
-	off_t seek = -1;
-	char *xev;
-	guint32 uid;
-
-	if (stat(mbox_folder->folder_file_path, &st) != 0)
-		goto fail;
-
-	output_stream = camel_stream_fs_new_with_name (mbox_folder->folder_file_path, O_RDWR, 0600);
-	if (output_stream == NULL)
-		goto fail;
-
-	seek = camel_seekable_stream_seek((CamelSeekableStream *)output_stream, st.st_size, SEEK_SET);
-	if (seek != st.st_size)
-		goto fail;
-
-	/* assign a new x-evolution header/uid */
-	camel_medium_remove_header((CamelMedium *)message, "X-Evolution");
-	uid = camel_folder_summary_next_uid((CamelFolderSummary *)mbox_folder->summary);
-	xev = g_strdup_printf("%08x-%04x", uid, message->flags & 0xffff);
-	camel_medium_add_header((CamelMedium *)message, "X-Evolution", xev);
-	g_free(xev);
-
-	/* we must write this to the non-filtered stream ... */
-	if (camel_stream_write_string (output_stream, "From - \n") == -1)
-		goto fail;
-
-	/* and write the content to the filtering stream, that translated '\nFrom' into '\n>From' */
-	filter_stream = (CamelStream *)camel_stream_filter_new_with_stream(output_stream);
-	filter_from = (CamelMimeFilter *)camel_mime_filter_from_new();
-	camel_stream_filter_add((CamelStreamFilter *)filter_stream, filter_from);
-	if (camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (message), filter_stream) == -1)
-		goto fail;
-
-	if (camel_stream_close (filter_stream) == -1)
-		goto fail;
-
-	/* filter stream ref's the output stream itself, so we need to unref it too */
-	gtk_object_unref (GTK_OBJECT (filter_from));
-	gtk_object_unref (GTK_OBJECT (filter_stream));
-	gtk_object_unref (GTK_OBJECT (output_stream));
-
-	/* force a summary update - will only update from the new position, if it can */
-	camel_mbox_summary_update(mbox_folder->summary, seek);
-	return;
-
-fail:
-	if (camel_exception_is_set (ex)) {
-		camel_exception_setv (ex, camel_exception_get_id (ex),
-				      "Cannot append message to mbox file: %s",
-				      camel_exception_get_description (ex));
-	} else {
-		camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
-				      "Cannot append message to mbox file: %s",
-				      g_strerror (errno));
-	}
-	if (filter_stream) {
-		/*camel_stream_close (filter_stream);*/
-		gtk_object_unref ((GtkObject *)filter_stream);
-	}
-	if (output_stream)
-		gtk_object_unref ((GtkObject *)output_stream);
-
-	if (filter_from)
-		gtk_object_unref ((GtkObject *)filter_from);
-
-	/* make sure the file isn't munged by us */
-	if (seek != -1) {
-		int fd = open(mbox_folder->folder_file_path, O_WRONLY, 0600);
-		if (fd != -1) {
-			ftruncate(fd, st.st_size);
-			close(fd);
-		}
-	}
-}
-
-static GPtrArray *
-mbox_get_uids (CamelFolder *folder, CamelException *ex) 
-{
-	GPtrArray *array;
-	CamelMboxFolder *mbox_folder = (CamelMboxFolder *)folder;
-	int i, count;
-
-	count = camel_folder_summary_count((CamelFolderSummary *)mbox_folder->summary);
-	array = g_ptr_array_new ();
-	g_ptr_array_set_size (array, count);
-	for (i=0;isummary, i);
-		array->pdata[i] = g_strdup(info->info.uid);
-	}
-	
-	return array;
-}
-
-static GPtrArray *
-mbox_get_subfolder_names (CamelFolder *folder, CamelException *ex)
-{
-	/* No subfolders. */
-	return g_ptr_array_new ();
-}
-
-static void
-mbox_delete_message_by_uid(CamelFolder *folder, const gchar *uid, CamelException *ex)
-{
-	CamelMessageInfo *info;
-	CamelMboxFolder *mf = (CamelMboxFolder *)folder;
-
-	info = camel_folder_summary_uid((CamelFolderSummary *)mf->summary, uid);
-	if (info) {
-		info->flags |=  CAMEL_MESSAGE_DELETED | CAMEL_MESSAGE_FOLDER_FLAGGED;
-		camel_folder_summary_touch((CamelFolderSummary *)mf->summary);
-	}
-}
-
-/* track flag changes in the summary */
-static void
-message_changed(CamelMimeMessage *m, int type, CamelMboxFolder *mf)
-{
-	CamelMessageInfo *info;
-	CamelFlag *flag;
-
-	printf("Message changed: %s: %d\n", m->message_uid, type);
-	switch (type) {
-	case MESSAGE_FLAGS_CHANGED:
-		info = camel_folder_summary_uid((CamelFolderSummary *)mf->summary, m->message_uid);
-		if (info) {
-			info->flags = m->flags | CAMEL_MESSAGE_FOLDER_FLAGGED;
-			camel_flag_list_free(&info->user_flags);
-			flag = m->user_flags;
-			while (flag) {
-				camel_flag_set(&info->user_flags, flag->name, TRUE);
-				flag = flag->next;
-			}
-			camel_folder_summary_touch((CamelFolderSummary *)mf->summary);
-		} else
-			g_warning("Message changed event on message not in summary: %s", m->message_uid);
-		break;
-	default:
-		printf("Unhandled message change event: %d\n", type);
-		break;
-	}
-}
-
-static CamelMimeMessage *
-mbox_get_message_by_uid (CamelFolder *folder, const gchar *uid, CamelException *ex)
-{
-	CamelMboxFolder *mbox_folder = CAMEL_MBOX_FOLDER (folder);
-	CamelStream *message_stream = NULL;
-	CamelMimeMessage *message = NULL;
-	CamelMboxMessageInfo *info;
-	CamelMimeParser *parser = NULL;
-	char *buffer;
-	int len;
-
-	/* get the message summary info */
-	info = (CamelMboxMessageInfo *)camel_folder_summary_uid((CamelFolderSummary *)mbox_folder->summary, uid);
-
-	if (info == NULL) {
-		errno = ENOENT;
-		goto fail;
-	}
-
-	/* if this has no content, its an error in the library */
-	g_assert(info->info.content);
-	g_assert(info->frompos != -1);
-
-	/* where we read from */
-	message_stream = camel_stream_fs_new_with_name (mbox_folder->folder_file_path, O_RDONLY, 0);
-	if (message_stream == NULL)
-		goto fail;
-
-	/* we use a parser to verify the message is correct, and in the correct position */
-	parser = camel_mime_parser_new();
-	camel_mime_parser_init_with_stream(parser, message_stream);
-	gtk_object_unref((GtkObject *)message_stream);
-	camel_mime_parser_scan_from(parser, TRUE);
-
-	camel_mime_parser_seek(parser, info->frompos, SEEK_SET);
-	if (camel_mime_parser_step(parser, &buffer, &len) != HSCAN_FROM) {
-		g_warning("File appears truncated");
-		goto fail;
-	}
-
-	if (camel_mime_parser_tell_start_from(parser) != info->frompos) {
-		g_warning("Summary doesn't match the folder contents!  eek!");
-		errno = EINVAL;
-		goto fail;
-	}
-
-	message = camel_mime_message_new();
-	if (camel_mime_part_construct_from_parser((CamelMimePart *)message, parser) == -1) {
-		g_warning("Construction failed");
-		goto fail;
-	}
-
-	/* we're constructed, finish setup and clean up */
-	message->folder = folder;
-	gtk_object_ref((GtkObject *)folder);
-	message->message_uid = g_strdup(uid);
-	message->flags = info->info.flags;
-	gtk_signal_connect((GtkObject *)message, "message_changed", message_changed, folder);
-
-	gtk_object_unref((GtkObject *)parser);
-
-	return message;
-
-fail:
-	camel_exception_setv (ex, CAMEL_EXCEPTION_FOLDER_INVALID_UID,
-			      "Cannot get message: %s",
-			      g_strerror(errno));
-
-	if (parser)
-		gtk_object_unref((GtkObject *)parser);
-	if (message)
-		gtk_object_unref((GtkObject *)message);
-
-	return NULL;
-}
-
-GPtrArray *
-mbox_get_summary (CamelFolder *folder, CamelException *ex)
-{
-	CamelMboxFolder *mbox_folder = (CamelMboxFolder *)folder;
-
-	return ((CamelFolderSummary *)mbox_folder->summary)->messages;
-}
-
-void
-mbox_free_summary (CamelFolder *folder, GPtrArray *array)
-{
-	/* no-op */
-}
-
-/* get a single message info, by uid */
-static const CamelMessageInfo *
-mbox_summary_get_by_uid(CamelFolder *f, const char *uid)
-{
-	CamelMboxFolder *mbox_folder = (CamelMboxFolder *)f;
-
-	return camel_folder_summary_uid((CamelFolderSummary *)mbox_folder->summary, uid);
-}
-
-static GList *
-mbox_search_by_expression(CamelFolder *folder, const char *expression, CamelException *ex)
-{
-	CamelMboxFolder *mbox_folder = (CamelMboxFolder *)folder;
-
-	if (mbox_folder->search == NULL) {
-		mbox_folder->search = camel_folder_search_new();
-	}
-
-	camel_folder_search_set_folder(mbox_folder->search, folder);
-	if (mbox_folder->summary)
-		/* FIXME: dont access summary array directly? */
-		camel_folder_search_set_summary(mbox_folder->search, ((CamelFolderSummary *)mbox_folder->summary)->messages);
-	camel_folder_search_set_body_index(mbox_folder->search, mbox_folder->index);
-
-	return camel_folder_search_execute_expression(mbox_folder->search, expression, ex);
-}
diff --git a/camel/providers/mbox/camel-mbox-folder.h b/camel/providers/mbox/camel-mbox-folder.h
deleted file mode 100644
index d7dc361f14..0000000000
--- a/camel/providers/mbox/camel-mbox-folder.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-mbox-folder.h : Abstract class for an email folder */
-
-/* 
- *
- * Author : Bertrand Guiheneuf  
- *
- * Copyright (C) 1999 Helix Code .
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef CAMEL_MBOX_FOLDER_H
-#define CAMEL_MBOX_FOLDER_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include 
-#include 
-#include 
-#include 
-#include "camel-mbox-summary.h"
-
-/*  #include "camel-store.h" */
-
-#define CAMEL_MBOX_FOLDER_TYPE     (camel_mbox_folder_get_type ())
-#define CAMEL_MBOX_FOLDER(obj)     (GTK_CHECK_CAST((obj), CAMEL_MBOX_FOLDER_TYPE, CamelMboxFolder))
-#define CAMEL_MBOX_FOLDER_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_MBOX_FOLDER_TYPE, CamelMboxFolderClass))
-#define IS_CAMEL_MBOX_FOLDER(o)    (GTK_CHECK_TYPE((o), CAMEL_MBOX_FOLDER_TYPE))
-
-typedef struct {
-	CamelFolder parent_object;
-
-	gchar *folder_file_path;   /* contains the messages */
-	gchar *summary_file_path;  /* contains the messages summary */
-	gchar *folder_dir_path;    /* contains the subfolders */
-	gchar *index_file_path;	   /* index of body contents */
-
-	ibex *index;		   /* index for this folder */
-	CamelMboxSummary *summary;
-	CamelFolderSearch *search; /* used to run searches, we just use the real thing (tm) */
-} CamelMboxFolder;
-
-
-
-typedef struct {
-	CamelFolderClass parent_class;
-
-	/* Virtual methods */	
-	
-} CamelMboxFolderClass;
-
-
-/* public methods */
-
-/* Standard Gtk function */
-GtkType camel_mbox_folder_get_type (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_MBOX_FOLDER_H */
diff --git a/camel/providers/mbox/camel-mbox-provider.c b/camel/providers/mbox/camel-mbox-provider.c
deleted file mode 100644
index ade04aa20d..0000000000
--- a/camel/providers/mbox/camel-mbox-provider.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-mbox-provider.c: mbox provider registration code */
-
-/* 
- * Authors :
- *   Bertrand Guiheneuf 
- *
- * Copyright (C) 2000 HelixCode (www.helixcode.com).
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#include "config.h"
-#include "camel-mbox-store.h"
-#include "camel-provider.h"
-#include "camel-session.h"
-
-static CamelProvider mbox_provider = {
-	"mbox",
-	"UNIX mbox-format mail files",
-
-	"For reading mail delivered by the local system, and for "
-	"storing mail on local disk.",
-
-	"mail",
-
-	0,
-
-	{ 0, 0 }
-};
-
-void
-camel_provider_module_init (CamelSession *session)
-{
-	mbox_provider.object_types[CAMEL_PROVIDER_STORE] =
-		camel_mbox_store_get_type();
-
-	camel_session_register_provider (session, &mbox_provider);
-}
diff --git a/camel/providers/mbox/camel-mbox-store.c b/camel/providers/mbox/camel-mbox-store.c
deleted file mode 100644
index 8db2f9338e..0000000000
--- a/camel/providers/mbox/camel-mbox-store.c
+++ /dev/null
@@ -1,129 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-mbox-store.c : class for an mbox store */
-
-/* 
- *
- * Copyright (C) 2000 Helix Code, Inc. 
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#include 
-
-#include "camel-mbox-store.h"
-#include "camel-mbox-folder.h"
-#include "camel-exception.h"
-#include "camel-url.h"
-
-/* Returns the class for a CamelMboxStore */
-#define CMBOXS_CLASS(so) CAMEL_MBOX_STORE_CLASS (GTK_OBJECT(so)->klass)
-#define CF_CLASS(so) CAMEL_FOLDER_CLASS (GTK_OBJECT(so)->klass)
-#define CMBOXF_CLASS(so) CAMEL_MBOX_FOLDER_CLASS (GTK_OBJECT(so)->klass)
-
-static CamelFolder *get_folder (CamelStore *store, const char *folder_name,
-				CamelException *ex);
-static char *get_folder_name (CamelStore *store, const char *folder_name,
-			      CamelException *ex);
-
-static void
-camel_mbox_store_class_init (CamelMboxStoreClass *camel_mbox_store_class)
-{
-	CamelStoreClass *camel_store_class = CAMEL_STORE_CLASS (camel_mbox_store_class);
-	
-	/* virtual method overload */
-	camel_store_class->get_folder = get_folder;
-	camel_store_class->get_folder_name = get_folder_name;
-}
-
-
-
-static void
-camel_mbox_store_init (gpointer object, gpointer klass)
-{
-	CamelService *service = CAMEL_SERVICE (object);
-	CamelStore *store = CAMEL_STORE (object);
-
-	service->url_flags = CAMEL_SERVICE_URL_NEED_PATH;
-
-	/* mbox names are filenames, so they are case-sensitive. */
-	store->folders = g_hash_table_new (g_str_hash, g_str_equal);
-}
-
-
-
-
-GtkType
-camel_mbox_store_get_type (void)
-{
-	static GtkType camel_mbox_store_type = 0;
-	
-	if (!camel_mbox_store_type)	{
-		GtkTypeInfo camel_mbox_store_info =	
-		{
-			"CamelMboxStore",
-			sizeof (CamelMboxStore),
-			sizeof (CamelMboxStoreClass),
-			(GtkClassInitFunc) camel_mbox_store_class_init,
-			(GtkObjectInitFunc) camel_mbox_store_init,
-				/* reserved_1 */ NULL,
-				/* reserved_2 */ NULL,
-			(GtkClassInitFunc) NULL,
-		};
-		
-		camel_mbox_store_type = gtk_type_unique (CAMEL_STORE_TYPE, &camel_mbox_store_info);
-	}
-	
-	return camel_mbox_store_type;
-}
-
-
-const gchar *
-camel_mbox_store_get_toplevel_dir (CamelMboxStore *store)
-{
-	CamelURL *url = CAMEL_SERVICE (store)->url;
-
-	g_assert(url != NULL);
-	return url->path;
-}
-
-
-
-static CamelFolder *
-get_folder (CamelStore *store, const char *folder_name, CamelException *ex)
-{
-	CamelMboxFolder *new_mbox_folder;
-	CamelFolder *new_folder;
-
-	new_mbox_folder =  gtk_type_new (CAMEL_MBOX_FOLDER_TYPE);
-	new_folder = CAMEL_FOLDER (new_mbox_folder);
-	
-	/* XXX We shouldn't be passing NULL here, but it's equivalent to
-	 * what was there before, and there's no
-	 * CamelMboxFolder::get_subfolder yet anyway...
-	 */
-	CF_CLASS (new_folder)->init (new_folder, store, NULL,
-				     folder_name, '/', ex);
-	
-	return new_folder;
-}
-
-static char *
-get_folder_name (CamelStore *store, const char *folder_name,
-		 CamelException *ex)
-{
-	return g_strdup (folder_name);
-}
diff --git a/camel/providers/mbox/camel-mbox-store.h b/camel/providers/mbox/camel-mbox-store.h
deleted file mode 100644
index 06a971ada4..0000000000
--- a/camel/providers/mbox/camel-mbox-store.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-mbox-store.h : class for an mbox store */
-
-/* 
- *
- * Copyright (C) 2000 Helix Code, Inc. 
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef CAMEL_MBOX_STORE_H
-#define CAMEL_MBOX_STORE_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include 
-#include "camel-store.h"
-
-#define CAMEL_MBOX_STORE_TYPE     (camel_mbox_store_get_type ())
-#define CAMEL_MBOX_STORE(obj)     (GTK_CHECK_CAST((obj), CAMEL_MBOX_STORE_TYPE, CamelMboxStore))
-#define CAMEL_MBOX_STORE_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_MBOX_STORE_TYPE, CamelMboxStoreClass))
-#define IS_CAMEL_MBOX_STORE(o)    (GTK_CHECK_TYPE((o), CAMEL_MBOX_STORE_TYPE))
-
-
-typedef struct {
-	CamelStore parent_object;	
-	
-} CamelMboxStore;
-
-
-
-typedef struct {
-	CamelStoreClass parent_class;
-
-} CamelMboxStoreClass;
-
-
-/* public methods */
-
-/* Standard Gtk function */
-GtkType camel_mbox_store_get_type (void);
-
-const gchar *camel_mbox_store_get_toplevel_dir (CamelMboxStore *store);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_MBOX_STORE_H */
-
-
diff --git a/camel/providers/mbox/camel-mbox-summary.c b/camel/providers/mbox/camel-mbox-summary.c
deleted file mode 100644
index 46b180e999..0000000000
--- a/camel/providers/mbox/camel-mbox-summary.c
+++ /dev/null
@@ -1,740 +0,0 @@
-/*
- *  Copyright (C) 2000 Helix Code Inc.
- *
- *  Authors: Michael Zucchi 
- *
- *  This program is free software; you can redistribute it and/or 
- *  modify it under the terms of the GNU General Public License as 
- *  published by the Free Software Foundation; either version 2 of the
- *  License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- *  USA
- */
-
-#include "camel-mbox-summary.h"
-#include 
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#define io(x)
-#define d(x)
-
-#define CAMEL_MBOX_SUMMARY_VERSION (0x1000)
-
-struct _CamelMboxSummaryPrivate {
-};
-
-#define _PRIVATE(o) (((CamelMboxSummary *)(o))->priv)
-
-static int summary_header_load(CamelFolderSummary *, FILE *);
-static int summary_header_save(CamelFolderSummary *, FILE *);
-
-static CamelMessageInfo * message_info_new(CamelFolderSummary *, struct _header_raw *);
-static CamelMessageInfo * message_info_new_from_parser(CamelFolderSummary *, CamelMimeParser *);
-static CamelMessageInfo * message_info_load(CamelFolderSummary *, FILE *);
-static int		  message_info_save(CamelFolderSummary *, FILE *, CamelMessageInfo *);
-/*static void		  message_info_free(CamelFolderSummary *, CamelMessageInfo *);*/
-
-static void camel_mbox_summary_class_init (CamelMboxSummaryClass *klass);
-static void camel_mbox_summary_init       (CamelMboxSummary *obj);
-static void camel_mbox_summary_finalise   (GtkObject *obj);
-
-static CamelFolderSummaryClass *camel_mbox_summary_parent;
-
-enum SIGNALS {
-	LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-guint
-camel_mbox_summary_get_type (void)
-{
-	static guint type = 0;
-	
-	if (!type) {
-		GtkTypeInfo type_info = {
-			"CamelMboxSummary",
-			sizeof (CamelMboxSummary),
-			sizeof (CamelMboxSummaryClass),
-			(GtkClassInitFunc) camel_mbox_summary_class_init,
-			(GtkObjectInitFunc) camel_mbox_summary_init,
-			(GtkArgSetFunc) NULL,
-			(GtkArgGetFunc) NULL
-		};
-		
-		type = gtk_type_unique (camel_folder_summary_get_type (), &type_info);
-	}
-	
-	return type;
-}
-
-static void
-camel_mbox_summary_class_init (CamelMboxSummaryClass *klass)
-{
-	GtkObjectClass *object_class = (GtkObjectClass *) klass;
-	CamelFolderSummaryClass *sklass = (CamelFolderSummaryClass *) klass;
-	
-	camel_mbox_summary_parent = gtk_type_class (camel_folder_summary_get_type ());
-
-	object_class->finalize = camel_mbox_summary_finalise;
-
-	sklass->summary_header_load = summary_header_load;
-	sklass->summary_header_save = summary_header_save;
-
-	sklass->message_info_new  = message_info_new;
-	sklass->message_info_new_from_parser = message_info_new_from_parser;
-	sklass->message_info_load = message_info_load;
-	sklass->message_info_save = message_info_save;
-	/*sklass->message_info_free = message_info_free;*/
-
-	gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
-}
-
-static void
-camel_mbox_summary_init (CamelMboxSummary *obj)
-{
-	struct _CamelMboxSummaryPrivate *p;
-	struct _CamelFolderSummary *s = (CamelFolderSummary *)obj;
-
-	p = _PRIVATE(obj) = g_malloc0(sizeof(*p));
-
-	/* subclasses need to set the right instance data sizes */
-	s->message_info_size = sizeof(CamelMboxMessageInfo);
-	s->content_info_size = sizeof(CamelMboxMessageContentInfo);
-
-	/* and a unique file version */
-	s->version += CAMEL_MBOX_SUMMARY_VERSION;
-}
-
-static void
-camel_mbox_summary_finalise (GtkObject *obj)
-{
-	CamelMboxSummary *mbs = (CamelMboxSummary *)obj;
-
-	g_free(mbs->folder_path);
-
-	((GtkObjectClass *)(camel_mbox_summary_parent))->finalize((GtkObject *)obj);
-}
-
-/**
- * camel_mbox_summary_new:
- *
- * Create a new CamelMboxSummary object.
- * 
- * Return value: A new CamelMboxSummary widget.
- **/
-CamelMboxSummary *
-camel_mbox_summary_new (const char *filename, const char *mbox_name, ibex *index)
-{
-	CamelMboxSummary *new = CAMEL_MBOX_SUMMARY ( gtk_type_new (camel_mbox_summary_get_type ()));
-	if (new) {
-		/* ?? */
-		camel_folder_summary_set_build_content((CamelFolderSummary *)new, TRUE);
-		camel_folder_summary_set_filename((CamelFolderSummary *)new, filename);
-		new->folder_path = g_strdup(mbox_name);
-		new->index = index;
-	}
-	return new;
-}
-
-
-static int summary_header_load(CamelFolderSummary *s, FILE *in)
-{
-	CamelMboxSummary *mbs = (CamelMboxSummary *)s;
-
-	if (((CamelFolderSummaryClass *)camel_mbox_summary_parent)->summary_header_load(s, in) == -1)
-		return -1;
-
-	return camel_folder_summary_decode_uint32(in, &mbs->folder_size);
-}
-
-static int summary_header_save(CamelFolderSummary *s, FILE *out)
-{
-	CamelMboxSummary *mbs = (CamelMboxSummary *)s;
-
-	if (((CamelFolderSummaryClass *)camel_mbox_summary_parent)->summary_header_save(s, out) == -1)
-		return -1;
-
-	return camel_folder_summary_encode_uint32(out, mbs->folder_size);
-}
-
-static int
-header_evolution_decode(const char *in, guint32 *uid, guint32 *flags)
-{
-        char *header;
-        if (in
-            && (header = header_token_decode(in))) {
-                if (strlen(header) == strlen("00000000-0000")
-                    && sscanf(header, "%08x-%04x", uid, flags) == 2) {
-                        g_free(header);
-                        return *uid;
-                }
-                g_free(header);
-        }
-
-        return -1;
-}
-
-static char *
-header_evolution_encode(guint32 uid, guint32 flags)
-{
-	return g_strdup_printf("%08x-%04x", uid, flags & 0xffff);
-}
-
-static CamelMessageInfo * message_info_new(CamelFolderSummary *s, struct _header_raw *h)
-{
-	CamelMessageInfo *mi;
-
-	mi = ((CamelFolderSummaryClass *)camel_mbox_summary_parent)->message_info_new(s, h);
-	if (mi) {
-		const char *xev;
-		guint32 uid, flags;
-		CamelMboxMessageInfo *mbi = (CamelMboxMessageInfo *)mi;
-
-		xev = header_raw_find(&h, "X-Evolution", NULL);
-		if (xev
-		    && header_evolution_decode(xev, &uid, &flags) != -1) {
-			g_free(mi->uid);
-			mi->uid = g_strdup_printf("%u", uid);
-			mi->flags = flags;
-		} else {
-			/* to indicate it has no xev header? */
-			mi->flags |= CAMEL_MESSAGE_FOLDER_FLAGGED|CAMEL_MESSAGE_FOLDER_NOXEV;
-			mi->uid = g_strdup_printf("%u", camel_folder_summary_next_uid(s));
-		}
-		mbi->frompos = -1;
-	}
-	return mi;
-}
-
-static CamelMessageInfo * message_info_new_from_parser(CamelFolderSummary *s, CamelMimeParser *mp)
-{
-	CamelMessageInfo *mi;
-	CamelMboxSummary *mbs = (CamelMboxSummary *)s;
-
-	mi = ((CamelFolderSummaryClass *)camel_mbox_summary_parent)->message_info_new_from_parser(s, mp);
-	if (mi) {
-		CamelMboxMessageInfo *mbi = (CamelMboxMessageInfo *)mi;
-
-		mbi->frompos = camel_mime_parser_tell_start_from(mp);
-
-		/* do we want to index this message as we add it, as well? */
-		if (mbs->index_force
-		    || (mi->flags & CAMEL_MESSAGE_FOLDER_FLAGGED) != 0
-		    || !ibex_contains_name(mbs->index, mi->uid)) {
-			camel_folder_summary_set_index(s, mbs->index);
-		} else {
-			camel_folder_summary_set_index(s, NULL);
-		}
-	}
-	return mi;
-}
-
-static CamelMessageInfo * message_info_load(CamelFolderSummary *s, FILE *in)
-{
-	CamelMessageInfo *mi;
-
-	io(printf("loading mbox message info\n"));
-
-	mi = ((CamelFolderSummaryClass *)camel_mbox_summary_parent)->message_info_load(s, in);
-	if (mi) {
-		CamelMboxMessageInfo *mbi = (CamelMboxMessageInfo *)mi;
-
-		camel_folder_summary_decode_uint32(in, &mbi->frompos);
-	}
-	return mi;
-}
-
-static int		  message_info_save(CamelFolderSummary *s, FILE *out, CamelMessageInfo *mi)
-{
-	CamelMboxMessageInfo *mbi = (CamelMboxMessageInfo *)mi;
-
-	io(printf("saving mbox message info\n"));
-
-	((CamelFolderSummaryClass *)camel_mbox_summary_parent)->message_info_save(s, out, mi);
-
-	return camel_folder_summary_encode_uint32(out, mbi->frompos);
-}
-
-static int
-summary_rebuild(CamelMboxSummary *mbs, off_t offset)
-{
-	CamelMimeParser *mp;
-	int fd;
-	int ok = 0;
-
-	printf("(re)Building summary from %d (%s)\n", (int)offset, mbs->folder_path);
-
-	fd = open(mbs->folder_path, O_RDONLY);
-	mp = camel_mime_parser_new();
-	camel_mime_parser_init_with_fd(mp, fd);
-	camel_mime_parser_scan_from(mp, TRUE);
-	camel_mime_parser_seek(mp, offset, SEEK_SET);
-
-	if (offset > 0) {
-		if (camel_mime_parser_step(mp, NULL, NULL) == HSCAN_FROM) {
-			if (camel_mime_parser_tell_start_from(mp) != offset) {
-				g_warning("The next message didn't start where I expected\nbuilding summary from start");
-				camel_mime_parser_drop_step(mp);
-				offset = 0;
-				camel_mime_parser_seek(mp, offset, SEEK_SET);
-				camel_folder_summary_clear((CamelFolderSummary *)mbs);
-			} else {
-				camel_mime_parser_unstep(mp);
-			}
-		} else {
-			gtk_object_unref((GtkObject *)mp);
-			/* end of file - no content? */
-			printf("We radn out of file?\n");
-			return 0;
-		}
-	}
-
-	while (camel_mime_parser_step(mp, NULL, NULL) == HSCAN_FROM) {
-		CamelMessageInfo *info;
-
-		info = camel_folder_summary_add_from_parser((CamelFolderSummary *)mbs, mp);
-		if (info == NULL) {
-			printf("Could not build info from file?\n");
-			ok = -1;
-			break;
-		}
-
-		g_assert(camel_mime_parser_step(mp, NULL, NULL) == HSCAN_FROM_END);
-	}
-
-	/* update the file size in the summary */
-	if (ok != -1)
-		mbs->folder_size = camel_mime_parser_seek(mp, 0, SEEK_CUR);
-	printf("updating folder size = %d\n", mbs->folder_size);
-	gtk_object_unref((GtkObject *)mp);
-
-	return ok;
-}
-
-int
-camel_mbox_summary_update(CamelMboxSummary *mbs, off_t offset)
-{
-	int ret;
-
-	mbs->index_force = FALSE;
-	ret = summary_rebuild(mbs, offset);
-
-#if 0
-#warning "Saving full summary and index after every summarisation is slow ..."
-	if (ret != -1) {
-		if (camel_folder_summary_save((CamelFolderSummary *)mbs) == -1)
-			g_warning("Could not save summary: %s", strerror(errno));
-		printf("summary saved\n");
-		if (mbs->index)
-			ibex_save(mbs->index);
-		printf("ibex saved\n");
-	}
-#endif
-	return ret;
-}
-
-int
-camel_mbox_summary_load(CamelMboxSummary *mbs, int forceindex)
-{
-	CamelFolderSummary *s = (CamelFolderSummary *)mbs;
-	struct stat st;
-	int ret = 0;
-	off_t minstart;
-
-	mbs->index_force = forceindex;
-
-	/* is the summary out of date? */
-	if (stat(mbs->folder_path, &st) == -1) {
-		camel_folder_summary_clear(s);
-		printf("Cannot summarise folder: '%s': %s\n", mbs->folder_path, strerror(errno));
-		return -1;
-	}
-
-	if (forceindex || camel_folder_summary_load(s) == -1) {
-		camel_folder_summary_clear(s);
-		ret = summary_rebuild(mbs, 0);
-	} else {
-		minstart = st.st_size;
-#if 0
-		/* find out the first unindexed message ... */
-		/* TODO: For this to work, it has to check that the message is
-		   indexable, and contains content ... maybe it cannot be done 
-		   properly? */
-		for (i=0;iindex, mi->uid)) {
-				minstart = ((CamelMboxMessageInfo *)mi)->frompos;
-				printf("Found unindexed message: %s\n", mi->uid);
-				break;
-			}
-		}
-#endif
-		/* is the summary uptodate? */
-		if (st.st_size == mbs->folder_size && st.st_mtime == s->time) {
-			printf("Summary time and date match mbox\n");
-			if (minstart < st.st_size) {
-				/* FIXME: Only clear the messages and reindex from this point forward */
-				camel_folder_summary_clear(s);
-				ret = summary_rebuild(mbs, 0);
-			}
-		} else {
-			if (mbs->folder_size < st.st_size) {
-				printf("Index is for a smaller mbox\n");
-				if (minstart < mbs->folder_size) {
-					/* FIXME: only make it rebuild as necessary */
-					camel_folder_summary_clear(s);
-					ret = summary_rebuild(mbs, 0);
-				} else {
-					ret = summary_rebuild(mbs, mbs->folder_size);
-				}
-			} else {
-				printf("index is for a bigger mbox\n");
-				camel_folder_summary_clear(s);
-				ret = summary_rebuild(mbs, 0);
-			}
-		}
-	}
-
-	if (ret != -1) {
-		mbs->folder_size = st.st_size;
-		s->time = st.st_mtime;
-		printf("saving summary\n");
-		if (camel_folder_summary_save(s) == -1)
-			g_warning("Could not save summary: %s", strerror(errno));
-		printf("summary saved\n");
-		if (mbs->index)
-			ibex_save(mbs->index);
-		printf("ibex saved\n");
-	}
-
-	return ret;
-}
-
-static int
-header_write(int fd, struct _header_raw *header, char *xevline)
-{
-        struct iovec iv[4];
-        int outlen = 0, len;
-
-        iv[1].iov_base = ":";
-        iv[1].iov_len = 1;
-        iv[3].iov_base = "\n";
-        iv[3].iov_len = 1;
-
-        while (header) {
-		if (strcasecmp(header->name, "X-Evolution")) {
-			iv[0].iov_base = header->name;
-			iv[0].iov_len = strlen(header->name);
-			iv[2].iov_base = header->value;
-			iv[2].iov_len = strlen(header->value);
-		
-			do {
-				len = writev(fd, iv, 4);
-			} while (len == -1 && errno == EINTR);
-			
-			if (len == -1)
-				return -1;
-			outlen += len;
-		}
-                header = header->next;
-        }
-
-        iv[0].iov_base = "X-Evolution: ";
-        iv[0].iov_len = strlen(iv[0].iov_base);
-        iv[1].iov_base = xevline;
-        iv[1].iov_len = strlen(xevline);
-        iv[2].iov_base = "\n\n";
-        iv[2].iov_len = 2;
-
-	do {
-		len = writev(fd, iv, 3);
-	} while (len == -1 && errno == EINTR);
-
-	if (len == -1)
-		return -1;
-
-	outlen += 1;
-
-	d(printf("Wrote %d bytes of headers\n", outlen));
-
-        return outlen;
-}
-
-static int
-copy_block(int fromfd, int tofd, off_t start, size_t bytes)
-{
-        char buffer[4096];
-        int written = 0;
-
-	d(printf("writing %d bytes ... ", bytes));
-
-	if (lseek(fromfd, start, SEEK_SET) != start)
-		return -1;
-
-        while (bytes>0) {
-                int toread, towrite;
-
-                toread = bytes;
-                if (bytes>4096)
-                        toread = 4096;
-                else
-                        toread = bytes;
-		do {
-			towrite = read(fromfd, buffer, toread);
-		} while (towrite == -1 && errno == EINTR);
-
-		if (towrite == -1)
-			return -1;
-
-                /* check for 'end of file' */
-                if (towrite == 0) {
-			d(printf("end of file?\n"));
-                        break;
-		}
-
-		do {
-			toread = write(tofd, buffer, towrite);
-		} while (toread == -1 && errno == EINTR);
-
-		if (toread == -1)
-			return -1;
-
-                written += toread;
-                bytes -= toread;
-        }
-
-        d(printf("written %d bytes\n", written));
-
-        return written;
-}
-
-int
-camel_mbox_summary_expunge(CamelMboxSummary *mbs)
-{
-	CamelMimeParser *mp=NULL;
-	int i, count;
-	CamelMboxMessageInfo *info;
-	CamelFolderSummary *s = (CamelFolderSummary *)mbs;
-
-	int fd=-1, fdout=-1;
-	off_t offset = 0;
-	char *tmpname=0;
-	char *buffer, *xevnew = NULL;
-	const char *xev;
-	int len;
-	guint32 uid, flags;
-	int quick = TRUE, work = FALSE;
-
-	/* make sure we're in sync */
-	count = camel_folder_summary_count(s);
-	if (count>0) {
-		CamelMessageInfo *mi = camel_folder_summary_index(s, count-1);
-		camel_mbox_summary_update(mbs, mi->content->endpos);
-	} else {
-		camel_mbox_summary_update(mbs, 0);
-	}
-
-	/* check if we have any work to do */
-	d(printf("Performing expunge, %d messages in inbox\n", count));
-	for (i=0;quick && iinfo.flags & (CAMEL_MESSAGE_DELETED|CAMEL_MESSAGE_FOLDER_NOXEV))
-			quick = FALSE;
-		else
-			work |= (info->info.flags & CAMEL_MESSAGE_FOLDER_FLAGGED) != 0;
-	}
-
-	d(printf("Options: %s %s\n", quick?"quick":"", work?"Work":""));
-
-	if (quick && !work)
-		return 0;
-
-	fd = open(mbs->folder_path, O_RDWR);
-	if (fd == -1)
-		return -1;
-
-	mp = camel_mime_parser_new();
-	camel_mime_parser_scan_from(mp, TRUE);
-	camel_mime_parser_init_with_fd(mp, fd);
-
-	if (!quick) {
-		tmpname = alloca(strlen(mbs->folder_path)+5);
-		sprintf(tmpname, "%s.tmp", mbs->folder_path);
-		d(printf("Writing tmp file to %s\n", tmpname));
-	retry_out:
-		fdout = open(tmpname, O_WRONLY|O_CREAT|O_EXCL, 0600);
-		if (fdout == -1) {
-			if (errno == EEXIST)
-				if (unlink(tmpname) != -1)
-					goto retry_out;
-			tmpname = 0;
-			goto error;
-		}
-	}
-
-	for (i=0;iinfo.uid));
-
-		if (info->info.flags & CAMEL_MESSAGE_DELETED) {
-			d(printf("Deleting %s\n", info->info.uid));
-
-			g_assert(!quick);
-			offset -= (info->info.content->endpos - info->frompos);
-			if (mbs->index)
-				ibex_unindex(mbs->index, info->info.uid);
-			camel_folder_summary_remove(s, (CamelMessageInfo *)info);
-			count--;
-			i--;
-			info = NULL;
-		} else if (info->info.flags & (CAMEL_MESSAGE_FOLDER_NOXEV|CAMEL_MESSAGE_FOLDER_FLAGGED)) {
-			int xevok = FALSE;
-
-			d(printf("Updating header for %s flags = %08x\n", info->info.uid, info->info.flags));
-
-			/* find the next message, header parts */
-			camel_mime_parser_seek(mp, info->frompos, SEEK_SET);
-			if (camel_mime_parser_step(mp, &buffer, &len) != HSCAN_FROM)
-				goto error;
-
-			if (camel_mime_parser_tell_start_from(mp) != info->frompos) {
-				g_error("Summary/mbox mismatch, aborting expunge");
-				goto error;
-			}
-			
-			if (camel_mime_parser_step(mp, &buffer, &len) == HSCAN_FROM_END)
-				goto error;
-
-			xev = camel_mime_parser_header(mp, "X-Evolution", (int *)&xevoffset);
-			if (xev && header_evolution_decode(xev, &uid, &flags) != -1) {
-				char name[64];
-
-				sprintf(name, "%u", uid);
-				if (strcmp(name, info->info.uid)) {
-					d(printf("Summary mismatch, aborting leaving mailbox intact\n"));
-					goto error;
-				}
-				xevok = TRUE;
-			}
-			xevnew = header_evolution_encode(strtoul(info->info.uid, NULL, 10), info->info.flags & 0xffff);
-			if (quick) {
-				if (!xevok) {
-					g_error("The summary told me I had an X-Evolution header, but i dont!");
-					goto error;
-				}
-				buffer = g_strdup_printf("X-Evolution: %s", xevnew);
-				do {
-					len = write(fd, buffer, strlen(buffer));
-				} while (len == -1 && errno == EINTR);
-				g_free(buffer);
-				if (len == -1) {
-					goto error;
-				}
-			} else {
-				frompos = lseek(fdout, 0, SEEK_CUR);
-				write(fdout, "From -\n", strlen("From -\n"));
-				if (header_write(fdout, camel_mime_parser_headers_raw(mp), xevnew) == -1) {
-					d(printf("Error writing to tmp mailbox\n"));
-					goto error;
-				}
-				bodypos = lseek(fdout, 0, SEEK_CUR);
-				d(printf("pos = %d, endpos = %d, bodypos = %d\n",
-					 info->info.content->pos,
-					 info->info.content->endpos,
-					 info->info.content->bodypos));
-				if (copy_block(fd, fdout, info->info.content->bodypos, info->info.content->endpos - info->info.content->bodypos) == -1) {
-					g_warning("Cannot copy data to output fd");
-					goto error;
-				}
-				info->frompos = frompos;
-				offset = bodypos - info->info.content->bodypos;
-			}
-			info->info.flags &= 0xffff;
-			g_free(xevnew); xevnew = NULL;
-			camel_mime_parser_drop_step(mp);
-			camel_mime_parser_drop_step(mp);
-		} else {
-			d(printf("Nothing to do for this message\n"));
-		}
-		if (!quick && info!=NULL && offset!=0) {
-			camel_folder_summary_offset_content(info->info.content, offset);
-			d(printf("pos = %d, endpos = %d, bodypos = %d\n",
-				 info->info.content->pos,
-				 info->info.content->endpos,
-				 info->info.content->bodypos));
-		}
-	}
-
-	d(printf("Closing folders\n"));
-
-	if (close(fd) == -1) {
-		g_warning("Cannot close source folder: %s", strerror(errno));
-		goto error;
-	}
-
-	if (!quick) {
-		struct stat st;
-
-		if (close(fdout) == -1) {
-			g_warning("Cannot close tmp folder: %s", strerror(errno));
-			goto error;
-		}
-
-		if (rename(tmpname, mbs->folder_path) == -1) {
-			g_warning("Cannot rename folder: %s", strerror(errno));
-			goto error;
-		}
-		tmpname = 0;
-
-		if (stat(mbs->folder_path, &st) == -1)
-			goto error;
-
-		camel_folder_summary_touch(s);
-		s->time = st.st_mtime;
-		mbs->folder_size = st.st_size;
-		camel_folder_summary_save(s);
-		if (mbs->index)
-			ibex_save(mbs->index);
-	}
-
-	gtk_object_unref((GtkObject *)mp);
-
-	return 0;
-error:
-	d(printf("Error occured: %s\n", strerror(errno)));
-	count = errno;
-
-	close(fd);
-	close(fdout);
-
-	g_free(xevnew);
-
-	if (tmpname)
-		unlink(tmpname);
-	if (mp)
-		gtk_object_unref((GtkObject *)mp);
-
-	errno = count;
-	return -1;
-}
diff --git a/camel/providers/mbox/camel-mbox-summary.h b/camel/providers/mbox/camel-mbox-summary.h
deleted file mode 100644
index 6d98fd051d..0000000000
--- a/camel/providers/mbox/camel-mbox-summary.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- *  Copyright (C) 2000 Helix Code Inc.
- *
- *  Authors: Michael Zucchi 
- *
- *  This program is free software; you can redistribute it and/or 
- *  modify it under the terms of the GNU General Public License as 
- *  published by the Free Software Foundation; either version 2 of the
- *  License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- *  USA
- */
-
-#ifndef _CAMEL_MBOX_SUMMARY_H
-#define _CAMEL_MBOX_SUMMARY_H
-
-#include 
-#include 
-#include 
-
-#define CAMEL_MBOX_SUMMARY(obj)         GTK_CHECK_CAST (obj, camel_mbox_summary_get_type (), CamelMboxSummary)
-#define CAMEL_MBOX_SUMMARY_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, camel_mbox_summary_get_type (), CamelMboxSummaryClass)
-#define IS_CAMEL_MBOX_SUMMARY(obj)      GTK_CHECK_TYPE (obj, camel_mbox_summary_get_type ())
-
-typedef struct _CamelMboxSummary      CamelMboxSummary;
-typedef struct _CamelMboxSummaryClass CamelMboxSummaryClass;
-
-/* extra summary flags */
-enum {
-	CAMEL_MESSAGE_FOLDER_NOXEV = 1<<16,
-/*	CAMEL_MESSAGE_FOLDER_FLAGGED = 1<<17,*/
-};
-
-typedef struct _CamelMboxMessageContentInfo {
-	CamelMessageContentInfo info;
-} CamelMboxMessageContentInfo;
-
-typedef struct _CamelMboxMessageInfo {
-	CamelMessageInfo info;
-
-	off_t frompos;
-} CamelMboxMessageInfo;
-
-struct _CamelMboxSummary {
-	CamelFolderSummary parent;
-
-	struct _CamelMboxSummaryPrivate *priv;
-
-	char *folder_path;	/* name of matching folder */
-	size_t folder_size;	/* size of the mbox file, last sync */
-
-	ibex *index;
-	int index_force;	/* do we force index during creation? */
-};
-
-struct _CamelMboxSummaryClass {
-	CamelFolderSummaryClass parent_class;
-};
-
-guint		camel_mbox_summary_get_type	(void);
-CamelMboxSummary      *camel_mbox_summary_new	(const char *filename, const char *mbox_name, ibex *index);
-
-/* load/check the summary */
-int camel_mbox_summary_load(CamelMboxSummary *mbs, int forceindex);
-/* incremental update */
-int camel_mbox_summary_update(CamelMboxSummary *mbs, off_t offset);
-/* perform a folder expunge */
-int camel_mbox_summary_expunge(CamelMboxSummary *mbs);
-
-#endif /* ! _CAMEL_MBOX_SUMMARY_H */
diff --git a/camel/providers/mbox/libcamelmbox.urls b/camel/providers/mbox/libcamelmbox.urls
deleted file mode 100644
index e021190356..0000000000
--- a/camel/providers/mbox/libcamelmbox.urls
+++ /dev/null
@@ -1 +0,0 @@
-mbox
diff --git a/camel/providers/nntp/.cvsignore b/camel/providers/nntp/.cvsignore
deleted file mode 100644
index fd6b811c68..0000000000
--- a/camel/providers/nntp/.cvsignore
+++ /dev/null
@@ -1,7 +0,0 @@
-.deps
-Makefile
-Makefile.in
-.libs
-.deps
-*.lo
-*.la
diff --git a/camel/providers/nntp/Makefile.am b/camel/providers/nntp/Makefile.am
deleted file mode 100644
index 6c37e2112f..0000000000
--- a/camel/providers/nntp/Makefile.am
+++ /dev/null
@@ -1,31 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-SUBDIRS = 
-
-libcamelnntpincludedir = $(includedir)/camel
-
-providerdir = $(pkglibdir)/camel-providers/$(VERSION)
-
-provider_LTLIBRARIES = libcamelnntp.la
-provider_DATA = libcamelnntp.urls
-
-INCLUDES = -I.. -I$(srcdir)/.. -I$(includedir)	\
-	-I$(top_srcdir)/intl			\
-	$(GTK_INCLUDEDIR) -I$(top_srcdir)/camel	\
-	-I$(srcdir)/../mbox			\
-	-DG_LOG_DOMAIN=\"camel-nntp-provider\"
-
-libcamelnntp_la_SOURCES = 			\
-	camel-nntp-folder.c			\
-	camel-nntp-provider.c			\
-	camel-nntp-store.c			\
-	camel-nntp-utils.c
-
-libcamelnntpinclude_HEADERS =			\
-	camel-nntp-folder.h			\
-	camel-nntp-store.h
-
-
-libcamelnntp_la_LDFLAGS = -version-info 0:0:0 -rpath $(libdir) 
-
-EXTRA_DIST = libcamelnntp.urls
diff --git a/camel/providers/nntp/camel-nntp-folder.c b/camel/providers/nntp/camel-nntp-folder.c
deleted file mode 100644
index 8bc623add7..0000000000
--- a/camel/providers/nntp/camel-nntp-folder.c
+++ /dev/null
@@ -1,617 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-nntp-folder.c : Abstract class for an email folder */
-
-/* 
- * Author : Chris Toshok  
- *
- * Copyright (C) 2000 Helix Code .
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#include  
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include "camel-folder-summary.h"
-#include "camel-nntp-store.h"
-#include "camel-nntp-folder.h"
-#include "camel-nntp-store.h"
-#include "camel-nntp-utils.h"
-
-#include "string-utils.h"
-#include "camel-stream-mem.h"
-#include "camel-stream-buffer.h"
-#include "camel-data-wrapper.h"
-#include "camel-mime-message.h"
-#include "camel-folder-summary.h"
-
-#include "camel-exception.h"
-
-static CamelFolderClass *parent_class=NULL;
-
-/* Returns the class for a CamelNNTPFolder */
-#define CNNTPF_CLASS(so) CAMEL_NNTP_FOLDER_CLASS (GTK_OBJECT(so)->klass)
-#define CF_CLASS(so) CAMEL_FOLDER_CLASS (GTK_OBJECT(so)->klass)
-#define CNNTPS_CLASS(so) CAMEL_STORE_CLASS (GTK_OBJECT(so)->klass)
-
-
-static void _init (CamelFolder *folder, CamelStore *parent_store,
-		   CamelFolder *parent_folder, const gchar *name,
-		   gchar separator, CamelException *ex);
-
-static void _open (CamelFolder *folder, CamelFolderOpenMode mode, CamelException *ex);
-static void _close (CamelFolder *folder, gboolean expunge, CamelException *ex);
-static gboolean _exists (CamelFolder *folder, CamelException *ex);
-static gboolean _create(CamelFolder *folder, CamelException *ex);
-static gboolean _delete (CamelFolder *folder, gboolean recurse, CamelException *ex);
-static gboolean _delete_messages (CamelFolder *folder, CamelException *ex);
-static GList *_list_subfolders (CamelFolder *folder, CamelException *ex);
-static CamelMimeMessage *_get_message_by_number (CamelFolder *folder, gint number, CamelException *ex);
-static gint _get_message_count (CamelFolder *folder, CamelException *ex);
-static void _append_message (CamelFolder *folder, CamelMimeMessage *message, CamelException *ex);
-static GPtrArray *_get_uid_array  (CamelFolder *folder, CamelException *ex);
-static CamelMimeMessage *_get_message_by_uid (CamelFolder *folder, const gchar *uid, CamelException *ex);
-#if 0
-static void _expunge (CamelFolder *folder, CamelException *ex);
-static void _copy_message_to (CamelFolder *folder, CamelMimeMessage *message, CamelFolder *dest_folder, CamelException *ex);
-#endif
-static const gchar *_get_message_uid (CamelFolder *folder, CamelMimeMessage *message, CamelException *ex);
-
-static void _finalize (GtkObject *object);
-
-static void
-camel_nntp_folder_class_init (CamelNNTPFolderClass *camel_nntp_folder_class)
-{
-	CamelFolderClass *camel_folder_class = CAMEL_FOLDER_CLASS (camel_nntp_folder_class);
-	GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (camel_folder_class);
-
-	parent_class = gtk_type_class (camel_folder_get_type ());
-		
-	/* virtual method definition */
-
-	/* virtual method overload */
-	camel_folder_class->init = _init;
-	camel_folder_class->open = _open;
-	camel_folder_class->close = _close;
-	camel_folder_class->exists = _exists;
-	camel_folder_class->create = _create;
-	camel_folder_class->delete = _delete;
-	camel_folder_class->delete_messages = _delete_messages;
-	camel_folder_class->list_subfolders = _list_subfolders;
-	camel_folder_class->get_message_count = _get_message_count;
-	camel_folder_class->get_uid_array = _get_uid_array;
-	camel_folder_class->get_message_by_uid = _get_message_by_uid;
-#if 0 
-	camel_folder_class->append_message = _append_message;
-	camel_folder_class->expunge = _expunge;
-	camel_folder_class->copy_message_to = _copy_message_to;
-	camel_folder_class->get_message_uid = _get_message_uid;
-#endif
-
-	gtk_object_class->finalize = _finalize;
-	
-}
-
-static void           
-_finalize (GtkObject *object)
-{
-	CamelNNTPFolder *nntp_folder = CAMEL_NNTP_FOLDER (object);
-
-	g_free (nntp_folder->summary_file_path);
-
-	GTK_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-GtkType
-camel_nntp_folder_get_type (void)
-{
-	static GtkType camel_nntp_folder_type = 0;
-	
-	if (!camel_nntp_folder_type)	{
-		GtkTypeInfo camel_nntp_folder_info =	
-		{
-			"CamelNNTPFolder",
-			sizeof (CamelNNTPFolder),
-			sizeof (CamelNNTPFolderClass),
-			(GtkClassInitFunc) camel_nntp_folder_class_init,
-			(GtkObjectInitFunc) NULL,
-				/* reserved_1 */ NULL,
-				/* reserved_2 */ NULL,
-			(GtkClassInitFunc) NULL,
-		};
-		
-		camel_nntp_folder_type = gtk_type_unique (CAMEL_FOLDER_TYPE, &camel_nntp_folder_info);
-	}
-	
-	return camel_nntp_folder_type;
-}
-
-static void 
-_init (CamelFolder *folder, CamelStore *parent_store,
-       CamelFolder *parent_folder, const gchar *name, gchar separator,
-       CamelException *ex)
-{
-	/* call parent method */
-	parent_class->init (folder, parent_store, parent_folder,
-			    name, separator, ex);
-	if (camel_exception_get_id (ex)) return;
-
-	/* we assume that the parent init
-	   method checks for the existance of @folder */
-
-	if (!strcmp(name, "/"))
-	  {
-	    folder->has_summary_capability = FALSE;
-	    folder->can_hold_messages = FALSE;
-	    folder->can_hold_folders = TRUE;
-	  }
-	else
-	  {
-	    folder->has_summary_capability = TRUE;
-	    folder->can_hold_messages = TRUE;
-	    folder->can_hold_folders = TRUE;
-	  }
-
-	folder->has_uid_capability = TRUE;
-	folder->has_search_capability = FALSE;
-}
-
-/* internal method used to : 
-   - test for the existence of a summary file 
-   - test the sync between the summary and the newsgroup
-   - load the summary or create it if necessary 
-*/ 
-static void
-_check_get_or_maybe_generate_summary_file (CamelNNTPFolder *nntp_folder,
-					   CamelException *ex)
-{
-	CamelFolder *folder = CAMEL_FOLDER (nntp_folder);
-
-	nntp_folder->summary = camel_folder_summary_new ();
-	camel_folder_summary_set_filename (nntp_folder->summary, nntp_folder->summary_file_path);
-
-	if (-1 == camel_folder_summary_load (nntp_folder->summary)) {
-		/* Bad or nonexistant summary file */
-		camel_nntp_get_headers (CAMEL_FOLDER( folder )->parent_store, nntp_folder, ex);
-		if (camel_exception_get_id (ex))
-			return;
-
-		/* XXX check return value */
-		camel_folder_summary_save (nntp_folder->summary);
-	}
-}
-
-
-static void
-_open (CamelFolder *folder, CamelFolderOpenMode mode, CamelException *ex)
-{
-	CamelNNTPFolder *nntp_folder = CAMEL_NNTP_FOLDER (folder);
-	const gchar *root_dir_path;
-
-	/* call parent class */
-	parent_class->open (folder, mode, ex);
-	if (camel_exception_get_id(ex))
-		return;
-
-#if 0
-	/* get (or create) uid list */
-	if (!(nntp_load_uid_list (nntp_folder) > 0))
-		nntp_generate_uid_list (nntp_folder);
-#endif
-
-	root_dir_path = camel_nntp_store_get_toplevel_dir (CAMEL_NNTP_STORE(folder->parent_store));
-
-	nntp_folder->summary_file_path = g_strdup_printf ("%s/%s-ev-summary", root_dir_path, folder->name);
-
-	_check_get_or_maybe_generate_summary_file (nntp_folder, ex);
-}
-
-
-static void
-_close (CamelFolder *folder, gboolean expunge, CamelException *ex)
-{
-	CamelNNTPFolder *nntp_folder = CAMEL_NNTP_FOLDER (folder);
-	CamelFolderSummary *summary = nntp_folder->summary;
-
-	/* call parent implementation */
-	parent_class->close (folder, expunge, ex);
-
-	/* XXX only if dirty? */
-	camel_folder_summary_save (summary);
-}
-
-static gboolean
-_exists (CamelFolder *folder, CamelException *ex)
-{
-#if 0
-	CamelNNTPFolder *nntp_folder;
-	struct stat stat_buf;
-	gint stat_error;
-	gboolean exists;
-
-	g_assert(folder != NULL);
-
-	nntp_folder = CAMEL_NNTP_FOLDER (folder);
-
-	/* check if the nntp summary path is determined */
-	if (!nntp_folder->summary_file_path) {
-		camel_exception_set (ex, 
-				     CAMEL_EXCEPTION_FOLDER_INVALID,
-				     "undetermined folder summary path. Maybe use set_name ?");
-		return FALSE;
-	}
-
-	/* check if the nntp file exists */
-	stat_error = stat (nntp_folder->summary_file_path, &stat_buf);
-	if (stat_error == -1)
-		return FALSE;
-	
-	exists = S_ISREG (stat_buf.st_mode);
-	/* we should  check the rights here  */
-	
-	return exists;
-#endif
-	return TRUE;
-}
-
-static gboolean
-_create (CamelFolder *folder, CamelException *ex)
-{
-#if 0
-	CamelNNTPSummary *summary;
-	g_assert(folder != NULL);
-
-	/* call default implementation */
-	parent_class->create (folder, ex);
-
-	/* create the summary object */
-	summary = CAMEL_NNTP_SUMMARY (gtk_object_new (camel_nntp_summary_get_type (), NULL));
-	summary->nb_message = 0;
-	summary->next_uid = 1;
-	summary->nntp_file_size = 0;
-	summary->message_info = g_array_new (FALSE, FALSE, sizeof (CamelNNTPSummaryInformation));
-#endif
-	
-	return TRUE;
-}
-
-static gboolean
-_delete (CamelFolder *folder, gboolean recurse, CamelException *ex)
-{
-#if 0
-	gboolean folder_already_exists;
-
-	g_assert(folder != NULL);
-
-	/* check if the folder object exists */
-
-	/* in the case where the folder does not exist, 
-	   return immediatly */
-	folder_already_exists = camel_folder_exists (folder, ex);
-	if (camel_exception_get_id (ex))
-		return FALSE;
-
-	if (!folder_already_exists)
-		return TRUE;
-
-
-	/* call default implementation.
-	   It should delete the messages in the folder
-	   and recurse the operation to subfolders */
-	parent_class->delete (folder, recurse, ex);
-#endif
-	return TRUE;
-}
-
-gboolean
-_delete_messages (CamelFolder *folder, CamelException *ex)
-{
-	
-	gboolean folder_already_exists;
-
-	g_assert(folder!=NULL);
-	
-	/* in the case where the folder does not exist, 
-	   return immediatly */
-	folder_already_exists = camel_folder_exists (folder, ex);
-	if (camel_exception_get_id (ex)) return FALSE;
-
-	if (!folder_already_exists) return TRUE;
-
-	return TRUE;
-}
-
-static GList *
-_list_subfolders (CamelFolder *folder, CamelException *ex)
-{
-	/* newsgroups don't have subfolders */
-	return NULL;
-}
-
-static gint
-_get_message_count (CamelFolder *folder, CamelException *ex)
-{
-	CamelNNTPFolder *nntp_folder = CAMEL_NNTP_FOLDER(folder);
-
-	g_assert (folder);
-	g_assert (nntp_folder->summary);
-
-        return camel_folder_summary_count(nntp_folder->summary);
-}
-
-#if 0
-static void
-_append_message (CamelFolder *folder, CamelMimeMessage *message, CamelException *ex)
-{
-	CamelNNTPFolder *nntp_folder = CAMEL_NNTP_FOLDER (folder);
-#if 0
-	CamelNNTPSummary *summary = CAMEL_NNTP_SUMMARY (folder->summary);
-#endif
-	CamelStream *output_stream;
-	guint32 tmp_file_size;
-	guint32 next_uid;
-	gint tmp_file_fd;
-	GArray *message_info_array;
-#if 0
-	GArray *nntp_summary_info;
-#endif
-	gchar *tmp_message_filename;
-	gint fd1, fd2;
-	int i;
-
-	/* write the message itself */
-	output_stream = camel_stream_fs_new_with_name (tmp_message_filename,
-						       CAMEL_STREAM_FS_WRITE);
-	if (output_stream != NULL) {
-		camel_stream_write_string (output_stream, "From - \n");
-		camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (message), output_stream);
-	}
-	camel_stream_flush (output_stream);
-	gtk_object_unref (GTK_OBJECT (output_stream));
-
-	/* at this point we have saved the message to a
-	   temporary file, now, we have to add the x-evolution 
-	   field and also update the main summary */
-
-	/* 
-	   First : parse the nntp file, but only from the 
-	   position where the message has been added, 
-	   wich happens to be the last postion in the 
-	   nntp file before we added the message.
-	   This position is still stored in the summary 
-	   for the moment 
-	*/
-	next_uid = summary->next_uid;
-	tmp_file_fd = open (tmp_message_filename, O_RDONLY);
-	message_info_array =
-		camel_nntp_parse_file (tmp_file_fd, "From - ", 0,
-				       &tmp_file_size, &next_uid, TRUE,
-				       NULL, 0, ex); 
-	
-	close (tmp_file_fd);
-
-	/* get the value of the last available UID
-	   as saved in the summary file, again */
-	next_uid = summary->next_uid;
-
-	/* make sure all our of message info's have 0 uid - ignore any
-	   set elsewhere */
-	for (i=0;ilen;i++) {
-		g_array_index(message_info_array, CamelNNTPParserMessageInfo, i).uid = 0;
-	}
-
-	/* 
-	   OK, this is not very efficient, we should not use the same
-	   method as for parsing an entire mail file, 
-	   but I have no time to write a simpler parser 
-	*/
-#if 0
-	next_uid = camel_nntp_write_xev (nntp_folder, tmp_message_filename, 
-					 message_info_array, &tmp_file_size, next_uid, ex);
-	
-#endif
-	if (camel_exception_get_id (ex)) { 
-		/* ** FIXME : free the preparsed information */
-		return;
-	}
-
-#if 0
-	nntp_summary_info =
-		parsed_information_to_nntp_summary (message_info_array);
-#endif
-
-	/* store the number of messages as well as the summary array */
-	summary->nb_message += 1;		
-	summary->next_uid = next_uid;	
-
-	((CamelNNTPSummaryInformation *)(nntp_summary_info->data))->position +=
-		summary->nntp_file_size;
-	summary->nntp_file_size += tmp_file_size;		
-
-	camel_nntp_summary_append_entries (summary, nntp_summary_info);
-	g_array_free (nntp_summary_info, TRUE); 
-	
-
-	/* append the temporary file message to the nntp file */
-	fd1 = open (tmp_message_filename, O_RDONLY);
-	fd2 = open (nntp_folder->folder_file_path, 
-		    O_WRONLY | O_CREAT | O_APPEND,
-		    0600);
-
-	if (fd2 == -1) {
-		camel_exception_setv (ex, 
-				      CAMEL_EXCEPTION_FOLDER_INSUFFICIENT_PERMISSION,
-				      "could not open the nntp folder file for appending the message\n"
-				      "\t%s\n"
-				      "Full error is : %s\n",
-				      nntp_folder->folder_file_path,
-				      strerror (errno));
-		return;
-	}
-
-	camel_nntp_copy_file_chunk (fd1,
-				    fd2, 
-				    tmp_file_size, 
-				    ex);
-	close (fd1);
-	close (fd2);
-
-	/* remove the temporary file */
-	unlink (tmp_message_filename);
-
-	g_free (tmp_message_filename);
-}
-#endif
-
-
-
-static GPtrArray *
-_get_uid_array (CamelFolder *folder, CamelException *ex) 
-{
-	CamelNNTPFolder *nntp_folder = CAMEL_NNTP_FOLDER (folder);
-	GPtrArray *message_info_array, *out;
-	CamelMessageInfo *message_info;
-	int i;
-
-	message_info_array = nntp_folder->summary->messages;
-
-	out = g_ptr_array_new ();
-	g_ptr_array_set_size (out, message_info_array->len);
-	
-	for (i=0; ilen; i++) {
-		message_info = (CamelMessageInfo *)(message_info_array->pdata) + i;
-		out->pdata[i] = g_strdup (message_info->uid);
-	}
-	
-	return out;
-}
-
-static CamelMimeMessage *
-_get_message_by_uid (CamelFolder *folder, const gchar *uid, CamelException *ex)
-{
-	CamelStream *nntp_istream;
-	CamelStream *message_stream;
-	CamelMimeMessage *message = NULL;
-	CamelStore *parent_store;
-	char *buf;
-	int buf_len;
-	int buf_alloc;
-	int status;
-	gboolean done;
-
-	/* get the parent store */
-	parent_store = camel_folder_get_parent_store (folder, ex);
-	if (camel_exception_get_id (ex)) {
-		return NULL;
-	}
-
-	status = camel_nntp_command (CAMEL_NNTP_STORE( parent_store ), NULL, "ARTICLE %s", uid);
-
-	nntp_istream = CAMEL_NNTP_STORE (parent_store)->istream;
-
-	/* if the uid was not found, raise an exception and return */
-	if (status != CAMEL_NNTP_OK) {
-		camel_exception_setv (ex, 
-				     CAMEL_EXCEPTION_FOLDER_INVALID_UID,
-				     "message %s not found.",
-				      uid);
-		return NULL;
-	}
-
-	/* XXX ick ick ick.  read the entire message into a buffer and
-	   then create a stream_mem for it. */
-	buf_alloc = 2048;
-	buf_len = 0;
-	buf = malloc(buf_alloc);
-	done = FALSE;
-
-	buf[0] = 0;
-
-	while (!done) {
-		char *line = camel_stream_buffer_read_line ( CAMEL_STREAM_BUFFER ( nntp_istream ), ex);
-		int line_length;
-
-		/* XXX check exception */
-
-		line_length = strlen ( line );
-
-		if (!strcmp(line, ".")) {
-			done = TRUE;
-			g_free (line);
-		}
-		else {
-			if (buf_len + line_length > buf_alloc) {
-				buf_alloc *= 2;
-				buf = realloc (buf, buf_alloc);
-			}
-			strcat(buf, line);
-			strcat(buf, "\n");
-			buf_len += strlen(line) + 1;
-			g_free (line);
-		}
-	}
-
-	/* create a stream bound to the message */
-	message_stream = camel_stream_mem_new_with_buffer(buf, buf_len);
-
-	message = camel_mime_message_new ();
-	if (camel_data_wrapper_construct_from_stream ((CamelDataWrapper *)message, message_stream) == -1) {
-		gtk_object_unref ((GtkObject *)message);
-		gtk_object_unref ((GtkObject *)message_stream);
-		camel_exception_setv (ex,
-				      CAMEL_EXCEPTION_FOLDER_INVALID_UID, /* XXX */
-				      "Could not create message for uid %s.", uid);
-
-		return NULL;
-	}
-	gtk_object_unref ((GtkObject *)message_stream);
-
-	/* init other fields? */
-	message->folder = folder;
-	gtk_object_ref((GtkObject *)folder);
-	message->message_uid = g_strdup(uid);
-
-#if 0
-	gtk_signal_connect((GtkObject *)message, "message_changed", message_changed, folder);
-#endif
-
-	return message;
-}
-
-/* get message info for a range of messages */
-static GPtrArray *
-summary_get_message_info (CamelFolder *folder, int first, int count)
-{
-	GPtrArray *array = g_ptr_array_new();
-	int i, maxcount;
-	CamelNNTPFolder *nntp_folder = (CamelNNTPFolder *)folder;
-
-        maxcount = camel_folder_summary_count(nntp_folder->summary);
-	maxcount = MIN(first + count, maxcount);
-	for (i=first;isummary->messages, i));
-
-	return array;
-}
diff --git a/camel/providers/nntp/camel-nntp-folder.h b/camel/providers/nntp/camel-nntp-folder.h
deleted file mode 100644
index 7a445d697f..0000000000
--- a/camel/providers/nntp/camel-nntp-folder.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-nntp-folder.h : NNTP group (folder) support. */
-
-/* 
- *
- * Author : Chris Toshok  
- *
- * Copyright (C) 2000 Helix Code .
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef CAMEL_NNTP_FOLDER_H
-#define CAMEL_NNTP_FOLDER_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include 
-#include "camel-folder.h"
-
-/*  #include "camel-store.h" */
-
-#define CAMEL_NNTP_FOLDER_TYPE     (camel_nntp_folder_get_type ())
-#define CAMEL_NNTP_FOLDER(obj)     (GTK_CHECK_CAST((obj), CAMEL_NNTP_FOLDER_TYPE, CamelNNTPFolder))
-#define CAMEL_NNTP_FOLDER_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_NNTP_FOLDER_TYPE, CamelNNTPFolderClass))
-#define IS_CAMEL_NNTP_FOLDER(o)    (GTK_CHECK_TYPE((o), CAMEL_NNTP_FOLDER_TYPE))
-
-
-typedef struct {
-	CamelFolder parent_object;
-
-	gchar *summary_file_path;  /* contains the messages summary */
-	CamelFolderSummary *summary;
-} CamelNNTPFolder;
-
-
-
-typedef struct {
-	CamelFolderClass parent_class;
-
-	/* Virtual methods */	
-	
-} CamelNNTPFolderClass;
-
-
-/* public methods */
-
-/* Standard Gtk function */
-GtkType camel_nntp_folder_get_type (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_NNTP_FOLDER_H */
diff --git a/camel/providers/nntp/camel-nntp-provider.c b/camel/providers/nntp/camel-nntp-provider.c
deleted file mode 100644
index 4afc8c7c97..0000000000
--- a/camel/providers/nntp/camel-nntp-provider.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-nntp-provider.c: nntp provider registration code */
-
-/* 
- * Authors :
- *   Chris Toshok 
- *
- * Copyright (C) 2000 Helix Code, Inc. (www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#include "config.h"
-#include "camel-nntp-store.h"
-#include "camel-provider.h"
-#include "camel-session.h"
-
-static CamelProvider news_provider = {
-	"news",
-	"USENET news",
-
-	"This is a read-only provider for USENET newsgroups.",
-
-	"news",
-
-	CAMEL_PROVIDER_IS_REMOTE,
-
-	{ 0, 0 }
-};
-
-static CamelProvider nntp_provider = {
-	"nntp",
-	"USENET news via NNTP",
-
-	"This is a provider for reading from and posting to"
-	"USENET newsgroups.",
-
-	"news",
-
-	CAMEL_PROVIDER_IS_REMOTE,
-
-	{ 0, 0 }
-};
-
-void
-camel_provider_module_init (CamelSession *session)
-{
-	news_provider.object_types[CAMEL_PROVIDER_STORE] =
-		camel_nntp_store_get_type();
-#ifdef NOTYET
-	nntp_provider.object_types[CAMEL_PROVIDER_TRANSPORT] =
-		camel_nntp_transport_get_type();
-#endif
-
-	camel_session_register_provider (session, &news_provider);
-	camel_session_register_provider (session, &nntp_provider);
-}
-
-
-
diff --git a/camel/providers/nntp/camel-nntp-store.c b/camel/providers/nntp/camel-nntp-store.c
deleted file mode 100644
index 2a0084eee2..0000000000
--- a/camel/providers/nntp/camel-nntp-store.c
+++ /dev/null
@@ -1,486 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-nntp-store.c : class for an nntp store */
-
-/* 
- *
- * Copyright (C) 2000 Helix Code, Inc. 
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#include 
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include "libgnome/libgnome.h"
-
-#include "camel-folder-summary.h"
-#include "camel-nntp-store.h"
-#include "camel-nntp-folder.h"
-#include "camel-stream-buffer.h"
-#include "camel-stream-fs.h"
-#include "camel-exception.h"
-#include "camel-url.h"
-#include "string-utils.h"
-
-#define NNTP_PORT 119
-
-static CamelServiceClass *service_class = NULL;
-
-/* Returns the class for a CamelNNTPStore */
-#define CNNTPS_CLASS(so) CAMEL_NNTP_STORE_CLASS (GTK_OBJECT(so)->klass)
-#define CF_CLASS(so) CAMEL_FOLDER_CLASS (GTK_OBJECT(so)->klass)
-#define CNNTPF_CLASS(so) CAMEL_NNTP_FOLDER_CLASS (GTK_OBJECT(so)->klass)
-
-static CamelFolder *_get_folder (CamelStore *store, const gchar *folder_name, CamelException *ex);
-static char *_get_folder_name (CamelStore *store, const char *folder_name,
-			       CamelException *ex);
-
-static gboolean nntp_connect (CamelService *service, CamelException *ex);
-static gboolean nntp_disconnect (CamelService *service, CamelException *ex);
-
-static void
-camel_nntp_store_class_init (CamelNNTPStoreClass *camel_nntp_store_class)
-{
-	CamelStoreClass *camel_store_class = CAMEL_STORE_CLASS (camel_nntp_store_class);
-
-	service_class = gtk_type_class (camel_service_get_type ());
-	
-	/* virtual method overload */
-	camel_store_class->get_folder = _get_folder;
-	camel_store_class->get_folder_name = _get_folder_name;
-}
-
-
-
-static void
-camel_nntp_store_init (gpointer object, gpointer klass)
-{
-	CamelService *service = CAMEL_SERVICE (object);
-
-	service->url_flags = CAMEL_SERVICE_URL_NEED_HOST;
-}
-
-GtkType
-camel_nntp_store_get_type (void)
-{
-	static GtkType camel_nntp_store_type = 0;
-	
-	if (!camel_nntp_store_type)	{
-		GtkTypeInfo camel_nntp_store_info =	
-		{
-			"CamelNNTPStore",
-			sizeof (CamelNNTPStore),
-			sizeof (CamelNNTPStoreClass),
-			(GtkClassInitFunc) camel_nntp_store_class_init,
-			(GtkObjectInitFunc) camel_nntp_store_init,
-				/* reserved_1 */ NULL,
-				/* reserved_2 */ NULL,
-			(GtkClassInitFunc) NULL,
-		};
-		
-		camel_nntp_store_type = gtk_type_unique (CAMEL_STORE_TYPE, &camel_nntp_store_info);
-	}
-	
-	return camel_nntp_store_type;
-}
-
-static CamelFolder *
-_get_folder (CamelStore *store, const gchar *folder_name, CamelException *ex)
-{
-	CamelNNTPFolder *new_nntp_folder;
-	CamelFolder *new_folder;
-
-	/* check if folder has already been created */
-	/* call the standard routine for that when  */
-	/* it is done ... */
-
-	new_nntp_folder =  gtk_type_new (CAMEL_NNTP_FOLDER_TYPE);
-	new_folder = CAMEL_FOLDER (new_nntp_folder);
-	
-	/* XXX We shouldn't be passing NULL here, but it's equivalent to
-	 * what was there before, and there's no
-	 * CamelNNTPFolder::get_subfolder yet anyway...
-	 */
-	CF_CLASS (new_folder)->init (new_folder, store, NULL,
-				     folder_name, '/', ex);
-	
-	return new_folder;
-}
-
-
-static char *
-_get_folder_name (CamelStore *store, const char *folder_name,
-		  CamelException *ex)
-{
-	return g_strdup (folder_name);
-}
-
-/**
- * camel_nntp_store_open: Connect to the server if we are currently
- * disconnected.
- * @store: the store
- * @ex: a CamelException
- *
- **/
-void
-camel_nntp_store_open (CamelNNTPStore *store, CamelException *ex)
-{
-	CamelService *service = CAMEL_SERVICE (store);
-	if (!camel_service_is_connected (service))
-		nntp_connect (service, ex);
-}
-
-/**
- * camel_nntp_store_close: Close the connection to the server
- * @store: the store
- * @ex: a CamelException
- *
- **/
-void
-camel_nntp_store_close (CamelNNTPStore *store, gboolean expunge,
-			CamelException *ex)
-{
-	camel_nntp_command (store, NULL, "QUIT");
-
-	nntp_disconnect (CAMEL_SERVICE (store), ex);
-}
-
-static gboolean
-nntp_connect (CamelService *service, CamelException *ex)
-{
-	struct hostent *h;
-	struct sockaddr_in sin;
-	int fd;
-	char *buf;
-	CamelNNTPStore *store = CAMEL_NNTP_STORE (service);
-
-	if (!service_class->connect (service, ex))
-		return FALSE;
-
-	h = camel_service_gethost (service, ex);
-	if (!h)
-		return FALSE;
-
-	sin.sin_family = h->h_addrtype;
-	sin.sin_port = htons (service->url->port ? service->url->port : NNTP_PORT);
-	memcpy (&sin.sin_addr, h->h_addr, sizeof (sin.sin_addr));
-
-	fd = socket (h->h_addrtype, SOCK_STREAM, 0);
-	if (fd == -1 ||
-	    connect (fd, (struct sockaddr *)&sin, sizeof(sin)) == -1) {
-		camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
-				      "Could not connect to %s (port %s): %s",
-				      service->url->host, service->url->port,
-				      strerror(errno));
-		if (fd > -1)
-			close (fd);
-		return FALSE;
-	}
-
-	store->ostream = camel_stream_fs_new_with_fd (fd);
-	store->istream = camel_stream_buffer_new (store->ostream,
-						  CAMEL_STREAM_BUFFER_READ);
-
-	/* Read the greeting */
-	buf = camel_stream_buffer_read_line (CAMEL_STREAM_BUFFER (store->istream), ex /* XX check this */);
-	if (!buf) {
-		return -1;
-	}
-
-	g_free (buf);
-
-	/* get a list of extensions that the server supports */
-	if (CAMEL_NNTP_OK == camel_nntp_command (store, NULL, "LIST EXTENSIONS")) {
-		char *ext_response = camel_nntp_command_get_additional_data(store);
-
-		g_free (ext_response);
-	}
-
-	return TRUE;
-}
-
-static gboolean
-nntp_disconnect (CamelService *service, CamelException *ex)
-{
-	CamelNNTPStore *store = CAMEL_NNTP_STORE (service);
-
-	if (!service->connected)
-		return TRUE;
-
-	if (!service_class->disconnect (service, ex))
-		return FALSE;
-
-	gtk_object_unref (GTK_OBJECT (store->ostream));
-	gtk_object_unref (GTK_OBJECT (store->istream));
-	store->ostream = NULL;
-	store->istream = NULL;
-	return TRUE;
-}
-
-/**
- * camel_nntp_command: Send a command to a NNTP server.
- * @store: the NNTP store
- * @ret: a pointer to return the full server response in
- * @fmt: a printf-style format string, followed by arguments
- *
- * This command sends the command specified by @fmt and the following
- * arguments to the connected NNTP store specified by @store. It then
- * reads the server's response and parses out the status code. If
- * the caller passed a non-NULL pointer for @ret, camel_nntp_command
- * will set it to point to an buffer containing the rest of the
- * response from the NNTP server. (If @ret was passed but there was
- * no extended response, @ret will be set to NULL.) The caller must
- * free this buffer when it is done with it.
- *
- * Return value: one of CAMEL_NNTP_OK (command executed successfully),
- * CAMEL_NNTP_ERR (command encounted an error), or CAMEL_NNTP_FAIL
- * (a protocol-level error occurred, and Camel is uncertain of the
- * result of the command.)
- **/
-int
-camel_nntp_command (CamelNNTPStore *store, char **ret, char *fmt, ...)
-{
-	char *cmdbuf, *respbuf;
-	va_list ap;
-	int status;
-	int resp_code;
-	CamelException *ex;
-
-	va_start (ap, fmt);
-	cmdbuf = g_strdup_vprintf (fmt, ap);
-	va_end (ap);
-
-	ex = camel_exception_new();
-
-	/* make sure we're connected */
-	if (store->ostream == NULL)
-		nntp_connect (CAMEL_SERVICE (store), ex);
-
-	if (camel_exception_get_id (ex)) {
-		camel_exception_free (ex);
-		return CAMEL_NNTP_FAIL;
-	}
-
-	/* Send the command */
-	camel_stream_write (store->ostream, cmdbuf, strlen (cmdbuf), ex /* XXX */);
-	g_free (cmdbuf);
-	camel_stream_write (store->ostream, "\r\n", 2, ex /* XXX */);
-
-	/* Read the response */
-	respbuf = camel_stream_buffer_read_line (CAMEL_STREAM_BUFFER (store->istream), ex /* XXX */);
-	resp_code = atoi (respbuf);
-
-	if (resp_code < 400)
-		status = CAMEL_NNTP_OK;
-	else if (resp_code < 500)
-		status = CAMEL_NNTP_ERR;
-	else
-		status = CAMEL_NNTP_FAIL;
-
-	if (ret) {
-		*ret = strchr (respbuf, ' ');
-		if (*ret)
-			*ret = g_strdup (*ret + 1);
-	}
-	g_free (respbuf);
-
-	return status;
-}
-
-/**
- * camel_nntp_command_get_additional_data: get "additional data" from
- * a NNTP command.
- * @store: the NNTP store
- *
- * This command gets the additional data returned by
- * This command gets the additional data returned by "multi-line" POP
- * commands, such as LIST, RETR, TOP, and UIDL. This command _must_
- * be called after a successful (CAMEL_NNTP_OK) call to
- * camel_nntp_command for a command that has a multi-line response.
- * The returned data is un-byte-stuffed, and has lines termined by
- * newlines rather than CR/LF pairs.
- *
- * Return value: the data, which the caller must free.
- **/
-char *
-camel_nntp_command_get_additional_data (CamelNNTPStore *store)
-{
-	CamelStreamBuffer *stream = CAMEL_STREAM_BUFFER (store->istream);
-	GPtrArray *data;
-	char *buf;
-	int i, status = CAMEL_NNTP_OK;
-	CamelException *ex = camel_exception_new();
-
-	data = g_ptr_array_new ();
-	while (1) {
-		buf = camel_stream_buffer_read_line (stream, ex /* XXX */);
-		if (!buf) {
-			status = CAMEL_NNTP_FAIL;
-			break;
-		}
-
-		if (!strcmp (buf, "."))
-			break;
-		if (*buf == '.')
-			memmove (buf, buf + 1, strlen (buf));
-		g_ptr_array_add (data, buf);
-	}
-
-	if (status == CAMEL_NNTP_OK) {
-		/* Append an empty string to the end of the array
-		 * so when we g_strjoinv it, we get a "\n" after
-		 * the last real line.
-		 */
-		g_ptr_array_add (data, "");
-		g_ptr_array_add (data, NULL);
-		buf = g_strjoinv ("\n", (char **)data->pdata);
-	} else
-		buf = NULL;
-
-	for (i = 0; i < data->len - 2; i++)
-		g_free (data->pdata[i]);
-	g_ptr_array_free (data, TRUE);
-
-	return buf;
-}
-
-void
-camel_nntp_store_subscribe_group (CamelStore *store,
-				  const gchar *group_name)
-{
-	gchar *root_dir = camel_nntp_store_get_toplevel_dir(CAMEL_NNTP_STORE(store));
-	char *ret = NULL;
-	CamelException *ex = camel_exception_new();
-
-	camel_nntp_store_open(CAMEL_NNTP_STORE(store), ex);
-
-	if (camel_exception_get_id (ex)) {
-		g_free (root_dir);
-		camel_exception_free (ex);
-		return;
-	}
-
-	if (CAMEL_NNTP_OK  == camel_nntp_command ( CAMEL_NNTP_STORE (store),
-						   &ret, "GROUP %s", group_name)) {
-		/* we create an empty summary file here, so that when
-                   the group is opened we'll know we need to build it. */
-		gchar *summary_file;
-		int fd;
-		summary_file = g_strdup_printf ("%s/%s-ev-summary", root_dir, group_name);
-		
-		fd = open (summary_file, O_CREAT | O_RDWR, 0666);
-		close (fd);
-
-		g_free (summary_file);
-	}
-	if (ret) g_free (ret);
-
-	g_free (root_dir);
-	camel_exception_free (ex);
-}
-
-void
-camel_nntp_store_unsubscribe_group (CamelStore *store,
-				    const gchar *group_name)
-{
-	gchar *root_dir = camel_nntp_store_get_toplevel_dir(CAMEL_NNTP_STORE(store));
-	gchar *summary_file;
-
-	summary_file = g_strdup_printf ("%s/%s-ev-summary", root_dir, group_name);
-	if (g_file_exists (summary_file))
-		unlink (summary_file);
-	g_free (summary_file);
-
-	g_free (root_dir);
-}
-
-GList *
-camel_nntp_store_list_subscribed_groups(CamelStore *store)
-{
-	GList *group_name_list = NULL;
-	struct stat stat_buf;
-	gint stat_error = 0;
-	gchar *entry_name;
-	gchar *full_entry_name;
-	gchar *real_group_name;
-	struct dirent *dir_entry;
-	DIR *dir_handle;
-	gchar *root_dir = camel_nntp_store_get_toplevel_dir(CAMEL_NNTP_STORE(store));
-
-	dir_handle = opendir (root_dir);
-	g_return_val_if_fail (dir_handle, NULL);
-
-	/* read the first entry in the directory */
-	dir_entry = readdir (dir_handle);
-	while ((stat_error != -1) && (dir_entry != NULL)) {
-
-		/* get the name of the next entry in the dir */
-		entry_name = dir_entry->d_name;
-		full_entry_name = g_strdup_printf ("%s/%s", root_dir, entry_name);
-		stat_error = stat (full_entry_name, &stat_buf);
-		g_free (full_entry_name);
-
-		/* is it a normal file ending in -ev-summary ? */
-		if ((stat_error != -1) && S_ISREG (stat_buf.st_mode)) {
-			gboolean summary_suffix_found;
-
-			real_group_name = string_prefix (entry_name, "-ev-summary",
-							 &summary_suffix_found);
-
-			if (summary_suffix_found)
-				/* add the folder name to the list */
-				group_name_list = g_list_append (group_name_list, 
-								 real_group_name);
-		}
-		/* read next entry */
-		dir_entry = readdir (dir_handle);
-	}
-
-	closedir (dir_handle);
-
-	return group_name_list;
-}
-
-gchar *
-camel_nntp_store_get_toplevel_dir (CamelNNTPStore *store)
-{
-	CamelURL *url = CAMEL_SERVICE (store)->url;
-	char *news_dir;
-	char *top_dir;
-
-	g_assert(url != NULL);
-
-	news_dir = gnome_util_prepend_user_home ("evolution/news");
-
-	top_dir = g_strdup_printf( "%s/%s",
-				   news_dir,
-				   url->host );
-
-	g_free (news_dir);
-
-	return top_dir;
-}
diff --git a/camel/providers/nntp/camel-nntp-store.h b/camel/providers/nntp/camel-nntp-store.h
deleted file mode 100644
index 257772d7cb..0000000000
--- a/camel/providers/nntp/camel-nntp-store.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-nntp-store.h : class for an nntp store */
-
-/* 
- *
- * Copyright (C) 2000 Helix Code, Inc. 
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef CAMEL_NNTP_STORE_H
-#define CAMEL_NNTP_STORE_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include 
-#include "camel-store.h"
-
-#define CAMEL_NNTP_STORE_TYPE     (camel_nntp_store_get_type ())
-#define CAMEL_NNTP_STORE(obj)     (GTK_CHECK_CAST((obj), CAMEL_NNTP_STORE_TYPE, CamelNNTPStore))
-#define CAMEL_NNTP_STORE_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_NNTP_STORE_TYPE, CamelNNTPStoreClass))
-#define IS_CAMEL_NNTP_STORE(o)    (GTK_CHECK_TYPE((o), CAMEL_NNTP_STORE_TYPE))
-
-
-typedef struct {
-	CamelStore parent_object;	
-
-#define CAMEL_NNTP_EXT_XOVER 0x01
-	guint32 extensions;
-
-	CamelStream *istream, *ostream;
-} CamelNNTPStore;
-
-
-
-typedef struct {
-	CamelStoreClass parent_class;
-
-} CamelNNTPStoreClass;
-
-
-/* public methods */
-void camel_nntp_store_open (CamelNNTPStore *store, CamelException *ex);
-void camel_nntp_store_close (CamelNNTPStore *store, gboolean expunge,
-			     CamelException *ex);
-
-void camel_nntp_store_subscribe_group (CamelStore *store, const gchar *group_name);
-void camel_nntp_store_unsubscribe_group (CamelStore *store, const gchar *group_name);
-GList *camel_nntp_store_list_subscribed_groups(CamelStore *store);
-
-gchar *camel_nntp_store_get_toplevel_dir (CamelNNTPStore *store);
-
-/* support functions */
-enum { CAMEL_NNTP_OK, CAMEL_NNTP_ERR, CAMEL_NNTP_FAIL };
-int camel_nntp_command (CamelNNTPStore *store, char **ret, char *fmt, ...);
-char *camel_nntp_command_get_additional_data (CamelNNTPStore *store);
-
-/* Standard Gtk function */
-GtkType camel_nntp_store_get_type (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_NNTP_STORE_H */
-
-
diff --git a/camel/providers/nntp/camel-nntp-utils.c b/camel/providers/nntp/camel-nntp-utils.c
deleted file mode 100644
index 7100be0aed..0000000000
--- a/camel/providers/nntp/camel-nntp-utils.c
+++ /dev/null
@@ -1,211 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-nntp-utils.c : utilities used by the nntp code. */
-
-/* 
- * Author : Chris Toshok  
- *
- * Copyright (C) 2000 Helix Code .
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#include "camel-folder-summary.h"
-#include "camel-nntp-folder.h"
-#include "camel-nntp-store.h"
-#include "camel-nntp-utils.h"
-#include "camel-stream-buffer.h"
-#include "camel-stream-mem.h"
-
-#include 
-#include 
-
-static void
-get_XOVER_headers(CamelNNTPStore *nntp_store, CamelFolder *folder,
-		  int first_message, int last_message, CamelException *ex)
-{
-	int status;
-	CamelNNTPFolder *nntp_folder = CAMEL_NNTP_FOLDER (folder);
-
-	status = camel_nntp_command (nntp_store, NULL,
-				     "XOVER %d-%d",
-				     first_message,
-				     last_message);
-		
-	if (status == CAMEL_NNTP_OK) {
-		CamelStream *nntp_istream = nntp_store->istream;
-		gboolean done = FALSE;
-
-		while (!done) {
-			char *line;
-
-			line = camel_stream_buffer_read_line ( 
-					      CAMEL_STREAM_BUFFER ( nntp_istream ), ex /* XXX */);
-
-			if (*line == '.') {
-				done = TRUE;
-			}
-			else {
-				CamelMessageInfo *new_info = g_new0(CamelMessageInfo, 1);
-				char **split_line = g_strsplit (line, "\t", 7);
-
-				new_info->subject = g_strdup(split_line[1]);
-				new_info->from = g_strdup(split_line[2]);
-				new_info->to = g_strdup(folder->name);
-#if 0
-				new_info->date_sent = g_strdup(split_line[3]);
-				/* XXX do we need to fill in both dates? */
-				new_info->headers.date_received = g_strdup(split_line[3]);
-#endif
-				new_info->size = atoi(split_line[5]);
-				new_info->uid = g_strdup(split_line[4]);
-				g_strfreev (split_line);
-
-				camel_folder_summary_add (nntp_folder->summary, new_info);
-			}
-			g_free (line);
-		}
-	}
-}
-
-#if 0
-static GArray*
-get_HEAD_headers(CamelNNTPStore *nntp_store, CamelFolder *folder,
-		 int first_message, int last_message, CamelException *ex)
-{
-	int i;
-	int status;
-	GArray *array;
-	CamelMessageInfo info;
-
-	array = g_array_new(FALSE, FALSE, sizeof(CamelMessageInfo));
-
-	for (i = first_message; i < last_message; i ++) {
-		status = camel_nntp_command (nntp_store, NULL,
-					     "HEAD %d", i);
-
-		if (status == CAMEL_NNTP_OK) {
-			gboolean done = FALSE;
-			char *buf;
-			int buf_len;
-			int buf_alloc;
-			int h;
-			CamelStream *header_stream;
-			GArray *header_array;
-			CamelStream *nntp_istream;
-
-			buf_alloc = 2048;
-			buf_len = 0;
-			buf = malloc(buf_alloc);
-			done = FALSE;
-
-			buf[0] = 0;
-
-			nntp_istream = nntp_store->istream;
-
-			while (!done) {
-				char *line;
-				int line_length;
-
-				line = camel_stream_buffer_read_line ( 
-						      CAMEL_STREAM_BUFFER ( nntp_istream ));
-				line_length = strlen ( line );
-
-				if (*line == '.') {
-					done = TRUE;
-				}
-				else {
-					if (buf_len + line_length > buf_alloc) {
-						buf_alloc *= 2;
-						buf = realloc (buf, buf_alloc);
-					}
-					strcat(buf, line);
-					strcat(buf, "\n");
-					buf_len += strlen(line);
-					g_free (line);
-				}
-			}
-
-			/* create a stream from which to parse the headers */
-			header_stream = camel_stream_mem_new_with_buffer(buf,
-								 buf_len,
-								 CAMEL_STREAM_MEM_READ);
-
-			header_array = get_header_array_from_stream (header_stream);
-
-			memset (&info, 0, sizeof(info));
-
-			for (h = 0; h < header_array->len; h ++) {
-				Rfc822Header *header = &((Rfc822Header*)header_array->data)[h];
-				if (!g_strcasecmp(header->name, "From"))
-					info.from = g_strdup(header->value);
-				else if (!g_strcasecmp(header->name, "To"))
-					info.to = g_strdup(header->value);
-				else if (!g_strcasecmp(header->name, "Subject"))
-					info.subject = g_strdup(header->value);
-				else if (!g_strcasecmp(header->name, "Message-ID"))
-					info.uid = g_strdup(header->value);
-				else if (!g_strcasecmp(header->name, "Date")) {
-#if 0
-					info.date_sent = g_strdup(header->value);
-					info.date_received = g_strdup(header->value);
-#endif
-				}
-			}
-			g_array_append_val(array, info);
-		}
-		else if (status == CAMEL_NNTP_FAIL) {
-			/* nasty things are afoot */
-			g_warning ("failure doing HEAD\n");
-			break;
-		}
-	}
-	return array;
-}
-#endif
-
-void
-camel_nntp_get_headers (CamelStore *store,
-			CamelNNTPFolder *nntp_folder,
-			CamelException *ex)
-{
-	CamelNNTPStore *nntp_store = CAMEL_NNTP_STORE (store);
-	CamelFolder *folder = CAMEL_FOLDER (nntp_folder);
-	char *ret;
-	int first_message, nb_message, last_message;
-	int status;
-
-	status = camel_nntp_command (nntp_store, &ret,
-				     "GROUP %s", folder->name);
-
-	sscanf (ret, "%d %d %d", &nb_message, &first_message, &last_message);
-	g_free (ret);
-
-	if (status != CAMEL_NNTP_OK) {
-		/* XXX throw invalid group exception */
-		printf ("invalid group\n");
-		return;
-	}
-
-	if (nntp_store->extensions & CAMEL_NNTP_EXT_XOVER) {
-		get_XOVER_headers (nntp_store, folder, first_message, last_message, ex);
-	}
-	else {
-#if 0
-		get_HEAD_headers (nntp_store, folder, first_message, last_message, ex);
-#endif
-	}
-}
-
diff --git a/camel/providers/nntp/camel-nntp-utils.h b/camel/providers/nntp/camel-nntp-utils.h
deleted file mode 100644
index f28697c744..0000000000
--- a/camel/providers/nntp/camel-nntp-utils.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-nntp-utils.h : Utilities for the NNTP provider */
-
-/* 
- *
- * Author : Chris Toshok  
- *
- * Copyright (C) 1999 Helix Code .
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef CAMEL_NNTP_UTILS_H
-#define CAMEL_NNTP_UTILS_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-void camel_nntp_get_headers (CamelStore *store, CamelNNTPFolder *nntp_folder, CamelException *ex);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_NNTP_UTILS_H */
diff --git a/camel/providers/nntp/libcamelnntp.urls b/camel/providers/nntp/libcamelnntp.urls
deleted file mode 100644
index dee2e70f14..0000000000
--- a/camel/providers/nntp/libcamelnntp.urls
+++ /dev/null
@@ -1,2 +0,0 @@
-news
-nntp
diff --git a/camel/providers/pop3/.cvsignore b/camel/providers/pop3/.cvsignore
deleted file mode 100644
index 7d926a5545..0000000000
--- a/camel/providers/pop3/.cvsignore
+++ /dev/null
@@ -1,6 +0,0 @@
-Makefile
-Makefile.in
-.libs
-.deps
-*.lo
-*.la
diff --git a/camel/providers/pop3/Makefile.am b/camel/providers/pop3/Makefile.am
deleted file mode 100644
index f30d73e736..0000000000
--- a/camel/providers/pop3/Makefile.am
+++ /dev/null
@@ -1,35 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-SUBDIRS = 
-
-libcamelpop3includedir = $(includedir)/camel
-
-providerdir = $(pkglibdir)/camel-providers/$(VERSION)
-
-provider_LTLIBRARIES = libcamelpop3.la
-provider_DATA = libcamelpop3.urls
-
-INCLUDES =					\
-	-I..					\
-	-I$(srcdir)/..				\
-	-I$(srcdir)/../../..			\
-        -I$(includedir)				\
-	-I$(top_srcdir)/intl			\
-	$(GTK_INCLUDEDIR)			\
-	-I$(top_srcdir)/camel			\
-	$(KRB4_CFLAGS)				\
-	-DG_LOG_DOMAIN=\"camel-pop3-provider\"
-
-libcamelpop3_la_SOURCES = 			\
-	camel-pop3-folder.c			\
-	camel-pop3-provider.c			\
-	camel-pop3-store.c
-
-libcamelpop3include_HEADERS =			\
-	camel-pop3-folder.h			\
-	camel-pop3-store.h
-
-
-libcamelpop3_la_LDFLAGS = $(KRB4_LDFLAGS) -version-info 0:0:0 -rpath $(libdir) 
-
-EXTRA_DIST = libcamelpop3.urls
diff --git a/camel/providers/pop3/camel-pop3-folder.c b/camel/providers/pop3/camel-pop3-folder.c
deleted file mode 100644
index 45687e4f33..0000000000
--- a/camel/providers/pop3/camel-pop3-folder.c
+++ /dev/null
@@ -1,271 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-pop3-folder.c : class for a pop3 folder */
-
-/* 
- * Authors:
- *   Dan Winship 
- *
- * Copyright (C) 2000 Helix Code, Inc. (www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#include "camel-pop3-folder.h"
-#include "camel-pop3-store.h"
-#include "camel-exception.h"
-#include "camel-stream-mem.h"
-#include "camel-mime-message.h"
-
-#include 
-#include 
-
-#define CF_CLASS(o) (CAMEL_FOLDER_CLASS (GTK_OBJECT (o)->klass))
-static CamelFolderClass *parent_class;
-
-static void pop3_open (CamelFolder *folder, CamelFolderOpenMode mode,
-		       CamelException *ex);
-static void pop3_close (CamelFolder *folder, gboolean expunge,
-			CamelException *ex);
-static gboolean delete_messages (CamelFolder *folder, CamelException *ex);
-
-static gint get_message_count (CamelFolder *folder, CamelException *ex);
-static GPtrArray *get_uids (CamelFolder *folder, CamelException *ex);
-static CamelMimeMessage *get_message_by_uid (CamelFolder *folder, 
-					     const char *uid,
-					     CamelException *ex);
-static void delete_message_by_uid (CamelFolder *folder, const char *uid,
-				   CamelException *ex);
-
-
-static void
-camel_pop3_folder_class_init (CamelPop3FolderClass *camel_pop3_folder_class)
-{
-	CamelFolderClass *camel_folder_class =
-		CAMEL_FOLDER_CLASS (camel_pop3_folder_class);
-
-	parent_class = gtk_type_class (camel_folder_get_type ());
-
-	/* virtual method overload */
-	camel_folder_class->open = pop3_open;
-	camel_folder_class->close = pop3_close;
-	camel_folder_class->delete_messages = delete_messages;
-
-	camel_folder_class->get_message_count = get_message_count;
-	camel_folder_class->get_uids = get_uids;
-
-	camel_folder_class->get_message_by_uid = get_message_by_uid;
-	camel_folder_class->delete_message_by_uid = delete_message_by_uid;
-}
-
-
-static void
-camel_pop3_folder_init (gpointer object, gpointer klass)
-{
-	CamelPop3Folder *pop3_folder = CAMEL_POP3_FOLDER (object);
-	CamelFolder *folder = CAMEL_FOLDER (object);
-
-	folder->can_hold_messages = TRUE;
-	folder->can_hold_folders = FALSE;
-	folder->has_summary_capability = FALSE;
-	folder->has_search_capability = FALSE;
-
-	pop3_folder->count = -1;
-}
-
-
-GtkType
-camel_pop3_folder_get_type (void)
-{
-	static GtkType camel_pop3_folder_type = 0;
-
-	if (!camel_pop3_folder_type) {
-		GtkTypeInfo camel_pop3_folder_info =	
-		{
-			"CamelPop3Folder",
-			sizeof (CamelPop3Folder),
-			sizeof (CamelPop3FolderClass),
-			(GtkClassInitFunc) camel_pop3_folder_class_init,
-			(GtkObjectInitFunc) camel_pop3_folder_init,
-				/* reserved_1 */ NULL,
-				/* reserved_2 */ NULL,
-			(GtkClassInitFunc) NULL,
-		};
-
-		camel_pop3_folder_type = gtk_type_unique (CAMEL_FOLDER_TYPE, &camel_pop3_folder_info);
-	}
-
-	return camel_pop3_folder_type;
-}
-
-
-CamelFolder *camel_pop3_folder_new (CamelStore *parent, CamelException *ex)
-{
-	CamelFolder *folder =
-		CAMEL_FOLDER (gtk_object_new (camel_pop3_folder_get_type (),
-					      NULL));
-
-	CF_CLASS (folder)->init (folder, parent, NULL, "inbox", '/', ex);
-	return folder;
-}
-
-static void
-pop3_open (CamelFolder *folder, CamelFolderOpenMode mode, CamelException *ex)
-{
-	camel_pop3_store_open (CAMEL_POP3_STORE (folder->parent_store), ex);
-	if (camel_exception_get_id (ex) == CAMEL_EXCEPTION_NONE)
-		parent_class->open (folder, mode, ex);
-}
-
-static void
-pop3_close (CamelFolder *folder, gboolean expunge, CamelException *ex)
-{
-	camel_pop3_store_close (CAMEL_POP3_STORE (folder->parent_store),
-				expunge, ex);
-	if (camel_exception_get_id (ex) == CAMEL_EXCEPTION_NONE)
-		parent_class->close (folder, expunge, ex);
-}
-				
-static gboolean
-delete_messages (CamelFolder *folder, CamelException *ex)
-{
-	int msgs;
-	gboolean status;
-
-	msgs = get_message_count (folder, ex);
-	if (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE)
-		return FALSE;
-
-	status = TRUE;
-	for (; msgs > 0; msgs--) {
-		status = status &&
-			(camel_pop3_command (CAMEL_POP3_STORE (folder->parent_store),
-					     NULL, "DELE %d", msgs) ==
-			 CAMEL_POP3_OK);
-	}
-
-	if (!status) {
-		camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
-				      "Unable to delete all messages.");
-	}
-
-	return status;
-}
-
-
-static CamelMimeMessage *
-get_message_by_uid (CamelFolder *folder, const char *uid, CamelException *ex)
-{
-	int status;
-	char *result, *body;
-	CamelStream *msgstream;
-	CamelMimeMessage *msg;
-
-	status = camel_pop3_command (CAMEL_POP3_STORE (folder->parent_store),
-				     &result, "RETR %d", atoi (uid));
-	if (status != CAMEL_POP3_OK) {
-		CamelService *service = CAMEL_SERVICE (folder->parent_store);
-		camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
-				      "Could not retrieve message from POP "
-				      "server %s: %s.", service->url->host,
-				      status == CAMEL_POP3_ERR ? result :
-				      "Unknown error");
-		g_free (result);
-		return NULL;
-	}
-	g_free (result);
-
-	body = camel_pop3_command_get_additional_data (CAMEL_POP3_STORE (folder->parent_store), ex);
-	if (!body) {
-		CamelService *service = CAMEL_SERVICE (folder->parent_store);
-		camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
-				      "Could not retrieve message from POP "
-				      "server %s: %s", service->url->host,
-				      camel_exception_get_description (ex));
-		return NULL;
-	}
-
-	msgstream = camel_stream_mem_new_with_buffer (body, strlen (body));
-	msg = camel_mime_message_new ();
-	camel_data_wrapper_construct_from_stream (CAMEL_DATA_WRAPPER (msg),
-						  msgstream);
-	gtk_object_unref (GTK_OBJECT (msgstream));
-
-	return msg;
-}
-
-static void
-delete_message_by_uid (CamelFolder *folder, const char *uid,
-		       CamelException *ex)
-{
-	int status;
-	char *resp;
-
-	status = camel_pop3_command (CAMEL_POP3_STORE (folder->parent_store),
-				     &resp, "DELE %d", atoi (uid));
-	if (status != CAMEL_POP3_OK) {
-		camel_exception_setv (ex, CAMEL_EXCEPTION_FOLDER_INVALID_UID,
-				      "Unable to delete message %s%s%s",
-				      uid, resp ? ": " : "",
-				      resp ? resp : "");
-	}
-	g_free (resp);
-}
-
-static gint
-get_message_count (CamelFolder *folder, CamelException *ex)
-{
-	CamelPop3Folder *pop3_folder = CAMEL_POP3_FOLDER (folder);
-	int status;
-	char *result;
-
-	if (pop3_folder->count != -1)
-		return pop3_folder->count;
-
-	status = camel_pop3_command (CAMEL_POP3_STORE (folder->parent_store),
-				     &result, "STAT");
-	if (status != CAMEL_POP3_OK) {
-		CamelService *service = CAMEL_SERVICE (folder->parent_store);
-		camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
-				      "Could not get message count from POP "
-				      "server %s: %s.", service->url->host,
-				      status == CAMEL_POP3_ERR ? result :
-				      "Unknown error");
-		g_free (result);
-		return -1;
-	}
-
-	pop3_folder->count = atoi (result);
-	g_free (result);
-	return pop3_folder->count;
-}
-
-static GPtrArray *
-get_uids (CamelFolder *folder, CamelException *ex)
-{
-	int count, i;
-	GPtrArray *array;
-
-	count = get_message_count (folder, ex);
-	if (count == -1)
-		return NULL;
-
-	array = g_ptr_array_new ();
-	g_ptr_array_set_size (array, count);
-	for (i = 0; i < count; i++)
-		array->pdata[i] = g_strdup_printf ("%d", i + 1);
-
-	return array;
-}
diff --git a/camel/providers/pop3/camel-pop3-folder.h b/camel/providers/pop3/camel-pop3-folder.h
deleted file mode 100644
index 2a478dc283..0000000000
--- a/camel/providers/pop3/camel-pop3-folder.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-pop3-folder.h : Class for a POP3 folder */
-
-/* 
- * Author:
- *   Dan Winship 
- *
- * Copyright (C) 2000 Helix Code, Inc. (www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef CAMEL_POP3_FOLDER_H
-#define CAMEL_POP3_FOLDER_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include 
-#include "camel-folder.h"
-
-#define CAMEL_POP3_FOLDER_TYPE     (camel_pop3_folder_get_type ())
-#define CAMEL_POP3_FOLDER(obj)     (GTK_CHECK_CAST((obj), CAMEL_POP3_FOLDER_TYPE, CamelPop3Folder))
-#define CAMEL_POP3_FOLDER_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_POP3_FOLDER_TYPE, CamelPop3FolderClass))
-#define IS_CAMEL_POP3_FOLDER(o)    (GTK_CHECK_TYPE((o), CAMEL_POP3_FOLDER_TYPE))
-
-
-typedef struct {
-	CamelFolder parent_object;
-
-	CamelMessageInfo *msg_info;
-	int count;
-
-} CamelPop3Folder;
-
-
-
-typedef struct {
-	CamelFolderClass parent_class;
-
-	/* Virtual methods */	
-	
-} CamelPop3FolderClass;
-
-
-/* public methods */
-CamelFolder *camel_pop3_folder_new (CamelStore *parent, CamelException *ex);
-
-/* Standard Gtk function */
-GtkType camel_pop3_folder_get_type (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_POP3_FOLDER_H */
diff --git a/camel/providers/pop3/camel-pop3-provider.c b/camel/providers/pop3/camel-pop3-provider.c
deleted file mode 100644
index 40514ad60a..0000000000
--- a/camel/providers/pop3/camel-pop3-provider.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-pop3-provider.c: pop3 provider registration code */
-
-/* 
- * Authors :
- *   Dan Winship 
- *
- * Copyright (C) 2000 Helix Code, Inc. (www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#include "config.h"
-#include "camel-pop3-store.h"
-#include "camel-provider.h"
-#include "camel-session.h"
-
-static CamelProvider pop3_provider = {
-	"pop",
-	"POP",
-
-	"For connecting to POP servers. The POP protocol can also be used "
-	"to retrieve mail from certain web mail providers and proprietary "
-	"email systems.",
-
-	"mail",
-
-	CAMEL_PROVIDER_IS_REMOTE,
-
-	{ 0, 0 }
-};
-
-void
-camel_provider_module_init (CamelSession *session)
-{
-	pop3_provider.object_types[CAMEL_PROVIDER_STORE] =
-		camel_pop3_store_get_type();
-
-	camel_session_register_provider (session, &pop3_provider);
-}
diff --git a/camel/providers/pop3/camel-pop3-store.c b/camel/providers/pop3/camel-pop3-store.c
deleted file mode 100644
index 9cbe666eec..0000000000
--- a/camel/providers/pop3/camel-pop3-store.c
+++ /dev/null
@@ -1,634 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-pop3-store.c : class for a pop3 store */
-
-/* 
- * Authors:
- *   Dan Winship 
- *
- * Copyright (C) 2000 Helix Code, Inc. (www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#include "config.h"
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include "camel-pop3-store.h"
-#include "camel-pop3-folder.h"
-#include "camel-stream-buffer.h"
-#include "camel-stream-fs.h"
-#include "camel-session.h"
-#include "camel-exception.h"
-#include "camel-url.h"
-#include "md5-utils.h"
-
-/* Specified in RFC 1939 */
-#define POP3_PORT 110
-
-#ifdef HAVE_KRB4
-/* Specified nowhere */
-#define KPOP_PORT 1109
-
-#include 
-#endif
-
-static CamelServiceClass *service_class = NULL;
-
-static void finalize (GtkObject *object);
-
-static gboolean pop3_connect (CamelService *service, CamelException *ex);
-static gboolean pop3_disconnect (CamelService *service, CamelException *ex);
-static GList *query_auth_types (CamelService *service, CamelException *ex);
-static void free_auth_types (CamelService *service, GList *authtypes);
-
-static CamelFolder *get_folder (CamelStore *store, const char *folder_name, 
-				CamelException *ex);
-static char *get_folder_name (CamelStore *store, const char *folder_name, 
-			      CamelException *ex);
-static char *get_root_folder_name (CamelStore *store, CamelException *ex);
-
-
-static void
-camel_pop3_store_class_init (CamelPop3StoreClass *camel_pop3_store_class)
-{
-	GtkObjectClass *object_class =
-		GTK_OBJECT_CLASS (camel_pop3_store_class);
-	CamelServiceClass *camel_service_class =
-		CAMEL_SERVICE_CLASS (camel_pop3_store_class);
-	CamelStoreClass *camel_store_class =
-		CAMEL_STORE_CLASS (camel_pop3_store_class);
-	
-	service_class = gtk_type_class (camel_service_get_type ());
-
-	/* virtual method overload */
-	object_class->finalize = finalize;
-
-	camel_service_class->connect = pop3_connect;
-	camel_service_class->disconnect = pop3_disconnect;
-	camel_service_class->query_auth_types = query_auth_types;
-	camel_service_class->free_auth_types = free_auth_types;
-
-	camel_store_class->get_folder = get_folder;
-	camel_store_class->get_folder_name = get_folder_name;
-	camel_store_class->get_root_folder_name = get_root_folder_name;
-}
-
-
-
-static void
-camel_pop3_store_init (gpointer object, gpointer klass)
-{
-	CamelService *service = CAMEL_SERVICE (object);
-	CamelStore *store = CAMEL_STORE (object);
-
-	service->url_flags = ( CAMEL_SERVICE_URL_NEED_USER |
-			       CAMEL_SERVICE_URL_NEED_HOST );
-	store->folders = g_hash_table_new (g_str_hash, g_str_equal);
-}
-
-
-
-
-GtkType
-camel_pop3_store_get_type (void)
-{
-	static GtkType camel_pop3_store_type = 0;
-
-	if (!camel_pop3_store_type) {
-		GtkTypeInfo camel_pop3_store_info =	
-		{
-			"CamelPop3Store",
-			sizeof (CamelPop3Store),
-			sizeof (CamelPop3StoreClass),
-			(GtkClassInitFunc) camel_pop3_store_class_init,
-			(GtkObjectInitFunc) camel_pop3_store_init,
-				/* reserved_1 */ NULL,
-				/* reserved_2 */ NULL,
-			(GtkClassInitFunc) NULL,
-		};
-
-		camel_pop3_store_type = gtk_type_unique (CAMEL_STORE_TYPE, &camel_pop3_store_info);
-	}
-
-	return camel_pop3_store_type;
-}
-
-static void
-finalize (GtkObject *object)
-{
-	CamelException ex;
-
-	camel_exception_init (&ex);
-	pop3_disconnect (CAMEL_SERVICE (object), &ex);
-	camel_exception_clear (&ex);
-}
-
-
-static CamelServiceAuthType password_authtype = {
-	"Password",
-
-	"This option will connect to the POP server using a plaintext "
-	"password. This is the only option supported by many POP servers.",
-
-	"",
-	TRUE
-};
-
-static CamelServiceAuthType apop_authtype = {
-	"APOP",
-
-	"This option will connect to the POP server using an encrypted "
-	"password via the APOP protocol. This may not work for all users "
-	"even on servers that claim to support it.",
-
-	"+APOP",
-	TRUE
-};
-
-#ifdef HAVE_KRB4
-static CamelServiceAuthType kpop_authtype = {
-	"Kerberos 4 (KPOP)",
-
-	"This will connect to the POP server and use Kerberos 4 "
-	"to authenticate to it.",
-
-	"+KPOP",
-	FALSE
-};
-#endif
-
-static gboolean
-connect_to_server (CamelService *service, gboolean real, CamelException *ex)
-{
-	CamelPop3Store *store = CAMEL_POP3_STORE (service);
-	struct hostent *h;
-	struct sockaddr_in sin;
-	int fd;
-	char *buf, *apoptime, *apopend;
-#ifdef HAVE_KRB4
-	gboolean kpop = (service->url->port == KPOP_PORT);
-#endif
-
-	h = camel_service_gethost (service, ex);
-	if (!h)
-		return FALSE;
-
-	sin.sin_family = h->h_addrtype;
-	if (service->url->port)
-		sin.sin_port = htons (service->url->port);
-	else
-		sin.sin_port = htons (POP3_PORT);
-	memcpy (&sin.sin_addr, h->h_addr, sizeof (sin.sin_addr));
-
-	fd = socket (h->h_addrtype, SOCK_STREAM, 0);
-	if (fd == -1 ||
-	    connect (fd, (struct sockaddr *)&sin, sizeof(sin)) == -1) {
-		if (real) {
-			camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
-					      "Could not connect to %s: %s",
-					      h->h_name, g_strerror(errno));
-		}
-		if (fd > -1)
-			close (fd);
-		return FALSE;
-	}
-
-#ifdef HAVE_KRB4
-	if (kpop) {
-		KTEXT_ST ticket_st;
-		MSG_DAT msg_data;
-		CREDENTIALS cred;
-		Key_schedule schedule;
-		char *hostname;
-
-		/* Need to copy hostname, because krb_realmofhost will
-		 * call gethostbyname as well, and gethostbyname uses
-		 * static storage.
-		 */
-		hostname = g_strdup (h->h_name);
-		status = krb_sendauth (0, fd, &ticket_st, "pop", hostname,
-				       krb_realmofhost (hostname), 0,
-				       &msg_data, &cred, schedule,
-				       NULL, NULL, "KPOPV0.1");
-		g_free (hostname);
-		if (status != KSUCCESS) {
-			if (real) {
-				camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
-						      "Could not authenticate "
-						      "to KPOP server: %s",
-						      krb_err_txt[status]);
-			}
-			close (fd);
-			return FALSE;
-		}
-
-		if (!service->url->passwd)
-			service->url->passwd = g_strdup (service->url->user);
-	}
-#endif /* HAVE_KRB4 */
-
-	store->ostream = camel_stream_fs_new_with_fd (fd);
-	store->istream = camel_stream_buffer_new (store->ostream,
-						  CAMEL_STREAM_BUFFER_READ);
-
-	/* Read the greeting, note APOP timestamp, if any. */
-	buf = camel_stream_buffer_read_line (CAMEL_STREAM_BUFFER (store->istream));
-	if (!buf) {
-		camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
-				      "Could not read greeting from POP "
-				      "server: %s",
-				      camel_exception_get_description (ex));
-		pop3_disconnect (service, ex);
-		return FALSE;
-	}
-	apoptime = strchr (buf, '<');
-	apopend = apoptime ? strchr (apoptime, '>') : NULL;
-	if (apoptime && apopend) {
-		store->apop_timestamp = g_strndup (apoptime,
-						   apopend - apoptime + 1);
-	}
-	g_free (buf);
-
-	return TRUE;
-}
-
-static GList *
-query_auth_types (CamelService *service, CamelException *ex)
-{
-	CamelPop3Store *store = CAMEL_POP3_STORE (service);
-	GList *ret = NULL;
-	gboolean passwd = TRUE, apop = TRUE;
-#ifdef HAVE_KRB4
-	gboolean kpop = TRUE;
-	int saved_port;
-#endif
-
-	if (service->url) {
-		passwd = connect_to_server (service, FALSE, ex);
-		if (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE)
-			return NULL;
-		apop = store->apop_timestamp != NULL;
-		if (passwd)
-			pop3_disconnect (service, ex);
-#ifdef HAVE_KRB4
-		saved_port = service->url->port;
-		service->url->port = KPOP_PORT;
-		kpop = connect_to_server (service, FALSE, ex);
-		service->url->port = saved_port;
-		if (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE)
-			return NULL;
-		if (kpop)
-			pop3_disconnect (service, ex);
-#endif
-	}
-
-	if (passwd)
-		ret = g_list_append (ret, &password_authtype);
-	if (apop)
-		ret = g_list_append (ret, &apop_authtype);
-#ifdef HAVE_KRB4
-	if (kpop)
-		ret = g_list_append (ret, &kpop_authtype);
-#endif
-
-	if (!ret) {
-		camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
-				      "Could not connect to POP server on "
-				      "%s.", service->url->host);
-	}				      
-
-	return ret;
-}
-
-static void
-free_auth_types (CamelService *service, GList *authtypes)
-{
-	g_list_free (authtypes);
-}
-
-/**
- * camel_pop3_store_open: Connect to the server if we are currently
- * disconnected.
- * @store: the store
- * @ex: a CamelException
- *
- * The POP protocol does not allow deleted messages to be expunged
- * except by closing the connection. Thus, camel_pop3_folder_{open,close}
- * sometimes need to connect to or disconnect from the server. This
- * routine reconnects to the server if we have disconnected.
- *
- **/
-void
-camel_pop3_store_open (CamelPop3Store *store, CamelException *ex)
-{
-	CamelService *service = CAMEL_SERVICE (store);
-
-	if (!camel_service_is_connected (service))
-		pop3_connect (service, ex);
-}
-
-/**
- * camel_pop3_store_close: Close the connection to the server and
- * possibly expunge deleted messages.
- * @store: the store
- * @expunge: whether or not to expunge deleted messages
- * @ex: a CamelException
- *
- * See camel_pop3_store_open for an explanation of why this is needed.
- *
- **/
-void
-camel_pop3_store_close (CamelPop3Store *store, gboolean expunge,
-			CamelException *ex)
-{
-	if (expunge)
-		camel_pop3_command (store, NULL, "QUIT");
-	else
-		camel_pop3_command (store, NULL, "RSET");
-	pop3_disconnect (CAMEL_SERVICE (store), ex);
-}
-
-static gboolean
-pop3_connect (CamelService *service, CamelException *ex)
-{
-	CamelPop3Store *store = CAMEL_POP3_STORE (service);
-	int status;
-	char *msg;
-#ifdef HAVE_KRB4
-	gboolean kpop = (service->url->authmech &&
-			 !strcmp (service->url->authmech, "+KPOP"));
-
-	if (kpop && service->url->port == 0)
-		service->url->port = KPOP_PORT;
-#endif
-
-	if (!connect_to_server (service, TRUE, ex))
-		return FALSE;
-
-	/* The KPOP code will have set the password to be the username
-	 * in connect_to_server. Password and APOP are the only other
-	 * cases, and they both need a password.
-	 */
-	if (!service->url->passwd) {
-		char *prompt = g_strdup_printf ("Please enter the POP3 password for %s@%s",
-						service->url->user,
-						service->url->host);
-		service->url->passwd =
-			camel_session_query_authenticator (camel_service_get_session (service),
-							   prompt, TRUE,
-							   service, "password",
-							   ex);
-		g_free (prompt);
-		if (!service->url->passwd) {
-			pop3_disconnect (service, ex);
-			return FALSE;
-		}
-	}
-
-	if (!service->url->authmech ||
-	    !strcmp (service->url->authmech, "+KPOP")) {
-		status = camel_pop3_command (store, &msg, "USER %s",
-					     service->url->user);
-		if (status != CAMEL_POP3_OK) {
-			camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
-					      "Unable to connect to POP "
-					      "server. Error sending username:"
-					      " %s", msg ? msg : "(Unknown)");
-			g_free (msg);
-			pop3_disconnect (service, ex);
-		}
-
-		status = camel_pop3_command (store, &msg, "PASS %s",
-					     service->url->passwd);
-	} else if (!strcmp (service->url->authmech, "+APOP")
-		   && store->apop_timestamp) {
-		char *secret, md5asc[33], *d;
-		unsigned char md5sum[16], *s;
-
-		secret = g_strdup_printf ("%s%s", store->apop_timestamp,
-					  service->url->passwd);
-		md5_get_digest (secret, strlen (secret), md5sum);
-		g_free (secret);
-
-		for (s = md5sum, d = md5asc; d < md5asc + 32; s++, d += 2)
-			sprintf (d, "%.2x", *s);
-
-		status = camel_pop3_command (store, &msg, "APOP %s %s",
-					     service->url->user, md5asc);
-	} else {
-		camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
-				     "No support for requested "
-				     "authentication mechanism.");
-		pop3_disconnect (service, ex);
-		return FALSE;
-	}
-
-	if (status != CAMEL_POP3_OK) {
-		camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
-				      "Unable to authenticate to POP "
-				      "server. Error sending password:"
-				      " %s", msg ? msg : "(Unknown)");
-		g_free (msg);
-		pop3_disconnect (service, ex);
-		return FALSE;
-	}
-
-	service_class->connect (service, ex);
-	return TRUE;
-}
-
-static gboolean
-pop3_disconnect (CamelService *service, CamelException *ex)
-{
-	CamelPop3Store *store = CAMEL_POP3_STORE (service);
-
-	if (!service_class->disconnect (service, ex))
-		return FALSE;
-
-	if (store->ostream) {
-		gtk_object_unref (GTK_OBJECT (store->ostream));
-		store->ostream = NULL;
-	}
-	if (store->istream) {
-		gtk_object_unref (GTK_OBJECT (store->istream));
-		store->istream = NULL;
-	}
-
-	if (store->apop_timestamp) {
-		g_free (store->apop_timestamp);
-		store->apop_timestamp = NULL;
-	}
-
-	return TRUE;
-}
-
-static CamelFolder *
-get_folder (CamelStore *store, const char *folder_name, CamelException *ex)
-{
-	return camel_pop3_folder_new (store, ex);
-}
-
-static char *
-get_folder_name (CamelStore *store, const char *folder_name,
-		 CamelException *ex)
-{
-	if (!g_strcasecmp (folder_name, "inbox"))
-		return g_strdup ("inbox");
-	else {
-		camel_exception_setv (ex, CAMEL_EXCEPTION_FOLDER_INVALID,
-				      "No such folder `%s'.", folder_name);
-		return NULL;
-	}
-}
-
-static char *
-get_root_folder_name (CamelStore *store, CamelException *ex)
-{
-	return g_strdup ("inbox");
-}
-
-
-/**
- * camel_pop3_command: Send a command to a POP3 server.
- * @store: the POP3 store
- * @ret: a pointer to return the full server response in
- * @fmt: a printf-style format string, followed by arguments
- *
- * This command sends the command specified by @fmt and the following
- * arguments to the connected POP3 store specified by @store. It then
- * reads the server's response and parses out the status code. If
- * the caller passed a non-NULL pointer for @ret, camel_pop3_command
- * will set it to point to an buffer containing the rest of the
- * response from the POP3 server. (If @ret was passed but there was
- * no extended response, @ret will be set to NULL.) The caller must
- * free this buffer when it is done with it.
- *
- * Return value: one of CAMEL_POP3_OK (command executed successfully),
- * CAMEL_POP3_ERR (command encounted an error), or CAMEL_POP3_FAIL
- * (a protocol-level error occurred, and Camel is uncertain of the
- * result of the command.)
- **/
-int
-camel_pop3_command (CamelPop3Store *store, char **ret, char *fmt, ...)
-{
-	char *cmdbuf, *respbuf;
-	va_list ap;
-	int status;
-
-	va_start (ap, fmt);
-	cmdbuf = g_strdup_vprintf (fmt, ap);
-	va_end (ap);
-
-	/* Send the command */
-	if (camel_stream_printf (store->ostream, "%s\r\n", cmdbuf) == -1) {
-		g_free (cmdbuf);
-		if (*ret)
-			*ret = g_strdup(strerror(errno));
-		return CAMEL_POP3_FAIL;
-	}
-	g_free (cmdbuf);
-
-	/* Read the response */
-	respbuf = camel_stream_buffer_read_line (CAMEL_STREAM_BUFFER (store->istream));
-	if (respbuf == NULL) {
-		if (*ret)
-			*ret = g_strdup(strerror(errno));
-		return CAMEL_POP3_FAIL;
-	}
-	if (!strncmp (respbuf, "+OK", 3))
-		status = CAMEL_POP3_OK;
-	else if (!strncmp (respbuf, "-ERR", 4))
-		status = CAMEL_POP3_ERR;
-	else
-		status = CAMEL_POP3_FAIL;
-
-	if (ret) {
-		if (status != CAMEL_POP3_FAIL) {
-			*ret = strchr (respbuf, ' ');
-			if (*ret)
-				*ret = g_strdup (*ret + 1);
-		} else
-			*ret = NULL;
-	}
-	g_free (respbuf);
-
-	return status;
-}
-
-/**
- * camel_pop3_command_get_additional_data: get "additional data" from
- * a POP3 command.
- * @store: the POP3 store
- *
- * This command gets the additional data returned by "multi-line" POP
- * commands, such as LIST, RETR, TOP, and UIDL. This command _must_
- * be called after a successful (CAMEL_POP3_OK) call to
- * camel_pop3_command for a command that has a multi-line response.
- * The returned data is un-byte-stuffed, and has lines termined by
- * newlines rather than CR/LF pairs.
- *
- * Return value: the data, which the caller must free.
- **/
-char *
-camel_pop3_command_get_additional_data (CamelPop3Store *store,
-					CamelException *ex)
-{
-	CamelStreamBuffer *stream = CAMEL_STREAM_BUFFER (store->istream);
-	GPtrArray *data;
-	char *buf;
-	int i, status = CAMEL_POP3_OK;
-
-	data = g_ptr_array_new ();
-	while (1) {
-		buf = camel_stream_buffer_read_line (stream);
-		if (!buf) {
-			status = CAMEL_POP3_FAIL;
-			break;
-		}
-
-		if (!strcmp (buf, "."))
-			break;
-		if (*buf == '.')
-			memmove (buf, buf + 1, strlen (buf));
-		g_ptr_array_add (data, buf);
-	}
-
-	if (status == CAMEL_POP3_OK) {
-		/* Append an empty string to the end of the array
-		 * so when we g_strjoinv it, we get a "\n" after
-		 * the last real line.
-		 */
-		g_ptr_array_add (data, "");
-		g_ptr_array_add (data, NULL);
-		buf = g_strjoinv ("\n", (char **)data->pdata);
-	} else
-		buf = NULL;
-
-	for (i = 0; i < data->len - 2; i++)
-		g_free (data->pdata[i]);
-	g_ptr_array_free (data, TRUE);
-
-	return buf;
-}
diff --git a/camel/providers/pop3/camel-pop3-store.h b/camel/providers/pop3/camel-pop3-store.h
deleted file mode 100644
index 41bc069ff9..0000000000
--- a/camel/providers/pop3/camel-pop3-store.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-pop3-store.h : class for an pop3 store */
-
-/* 
- * Authors:
- *   Dan Winship 
- *
- * Copyright (C) 2000 Helix Code, Inc. (www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef CAMEL_POP3_STORE_H
-#define CAMEL_POP3_STORE_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include 
-#include "camel-types.h"
-#include "camel-store.h"
-
-#define CAMEL_POP3_STORE_TYPE     (camel_pop3_store_get_type ())
-#define CAMEL_POP3_STORE(obj)     (GTK_CHECK_CAST((obj), CAMEL_POP3_STORE_TYPE, CamelPop3Store))
-#define CAMEL_POP3_STORE_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_POP3_STORE_TYPE, CamelPop3StoreClass))
-#define IS_CAMEL_POP3_STORE(o)    (GTK_CHECK_TYPE((o), CAMEL_POP3_STORE_TYPE))
-
-
-typedef struct {
-	CamelStore parent_object;
-
-	CamelStream *istream, *ostream;
-	char *apop_timestamp;
-
-} CamelPop3Store;
-
-
-
-typedef struct {
-	CamelStoreClass parent_class;
-
-} CamelPop3StoreClass;
-
-
-/* public methods */
-void camel_pop3_store_open (CamelPop3Store *store, CamelException *ex);
-void camel_pop3_store_close (CamelPop3Store *store, gboolean expunge,
-			     CamelException *ex);
-
-/* support functions */
-enum { CAMEL_POP3_OK, CAMEL_POP3_ERR, CAMEL_POP3_FAIL };
-int camel_pop3_command (CamelPop3Store *store, char **ret, char *fmt, ...);
-char *camel_pop3_command_get_additional_data (CamelPop3Store *store,
-					      CamelException *ex);
-
-/* Standard Gtk function */
-GtkType camel_pop3_store_get_type (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_POP3_STORE_H */
-
-
diff --git a/camel/providers/pop3/libcamelpop3.urls b/camel/providers/pop3/libcamelpop3.urls
deleted file mode 100644
index 7fffa4d861..0000000000
--- a/camel/providers/pop3/libcamelpop3.urls
+++ /dev/null
@@ -1 +0,0 @@
-pop
diff --git a/camel/providers/sendmail/.cvsignore b/camel/providers/sendmail/.cvsignore
deleted file mode 100644
index cacc3c5d5f..0000000000
--- a/camel/providers/sendmail/.cvsignore
+++ /dev/null
@@ -1,7 +0,0 @@
-Makefile
-Makefile.in
-.deps
-.libs
-*.lo
-*.la
-*.o
diff --git a/camel/providers/sendmail/Makefile.am b/camel/providers/sendmail/Makefile.am
deleted file mode 100644
index 511c860315..0000000000
--- a/camel/providers/sendmail/Makefile.am
+++ /dev/null
@@ -1,31 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-SUBDIRS = 
-
-libcamelsendmailincludedir = $(includedir)/camel
-
-
-providerdir = $(pkglibdir)/camel-providers/$(VERSION)
-
-provider_LTLIBRARIES = libcamelsendmail.la
-provider_DATA = libcamelsendmail.urls
-
-INCLUDES =					\
-	-I..					\
-	-I$(srcdir)/..				\
-	-I$(srcdir)/../../..			\
-	-I$(includedir)				\
-	-I$(top_srcdir)/intl			\
-	$(GTK_INCLUDEDIR) -I$(top_srcdir)/camel \
-        -DG_LOG_DOMAIN=\"camel-sendmail-provider\"
-
-libcamelsendmail_la_SOURCES = 			\
-	camel-sendmail-provider.c		\
-	camel-sendmail-transport.c
-
-libcamelsendmailinclude_HEADERS =		\
-	camel-sendmail-transport.h
-
-libcamelsendmail_la_LDFLAGS = -version-info 0:0:0 -rpath $(libdir) 
-
-EXTRA_DIST = libcamelsendmail.urls
diff --git a/camel/providers/sendmail/camel-sendmail-provider.c b/camel/providers/sendmail/camel-sendmail-provider.c
deleted file mode 100644
index dce20e4041..0000000000
--- a/camel/providers/sendmail/camel-sendmail-provider.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-sendmail-provider.c: sendmail provider registration code */
-
-/* 
- * Authors :
- *   Dan Winship 
- *
- * Copyright (C) 2000 Helix Code, Inc. (www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#include "config.h"
-#include "camel-provider.h"
-#include "camel-sendmail-transport.h"
-#include "camel-session.h"
-
-static CamelProvider sendmail_provider = {
-	"sendmail",
-	"Sendmail",
-
-	"For delivering mail by passing it to the \"sendmail\" program "
-	"on the local system.",
-
-	"mail",
-
-	0,
-
-	{ 0, 0 }
-};
-
-void
-camel_provider_module_init (CamelSession *session)
-{
-	sendmail_provider.object_types[CAMEL_PROVIDER_TRANSPORT] =
-		camel_sendmail_transport_get_type();
-
-	camel_session_register_provider (session, &sendmail_provider);
-}
-
-
-
diff --git a/camel/providers/sendmail/camel-sendmail-transport.c b/camel/providers/sendmail/camel-sendmail-transport.c
deleted file mode 100644
index 3b84d5cb90..0000000000
--- a/camel/providers/sendmail/camel-sendmail-transport.c
+++ /dev/null
@@ -1,212 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-sendmail-transport.c: Sendmail-based transport class. */
-
-/* 
- *
- * Author : 
- *  Dan Winship 
- *
- * Copyright 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#include 
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include "camel-sendmail-transport.h"
-#include "camel-mime-message.h"
-#include "camel-data-wrapper.h"
-#include "camel-stream-fs.h"
-#include "camel-exception.h"
-
-static gboolean _can_send (CamelTransport *transport, CamelMedium *message);
-static gboolean _send (CamelTransport *transport, CamelMedium *message,
-		       CamelException *ex);
-static gboolean _send_to (CamelTransport *transport, CamelMedium *message,
-			  GList *recipients, CamelException *ex);
-
-
-static void
-camel_sendmail_transport_class_init (CamelSendmailTransportClass *camel_sendmail_transport_class)
-{
-	CamelTransportClass *camel_transport_class =
-		CAMEL_TRANSPORT_CLASS (camel_sendmail_transport_class);
-
-	/* virtual method overload */
-	camel_transport_class->can_send = _can_send;
-	camel_transport_class->send = _send;
-	camel_transport_class->send_to = _send_to;
-}
-
-GtkType
-camel_sendmail_transport_get_type (void)
-{
-	static GtkType camel_sendmail_transport_type = 0;
-	
-	if (!camel_sendmail_transport_type)	{
-		GtkTypeInfo camel_sendmail_transport_info =	
-		{
-			"CamelSendmailTransport",
-			sizeof (CamelSendmailTransport),
-			sizeof (CamelSendmailTransportClass),
-			(GtkClassInitFunc) camel_sendmail_transport_class_init,
-			(GtkObjectInitFunc) NULL,
-				/* reserved_1 */ NULL,
-				/* reserved_2 */ NULL,
-			(GtkClassInitFunc) NULL,
-		};
-		
-		camel_sendmail_transport_type = gtk_type_unique (CAMEL_TRANSPORT_TYPE, &camel_sendmail_transport_info);
-	}
-	
-	return camel_sendmail_transport_type;
-}
-
-
-static gboolean
-_can_send (CamelTransport *transport, CamelMedium *message)
-{
-	return CAMEL_IS_MIME_MESSAGE (message);
-}
-
-
-static gboolean
-_send_internal (CamelMedium *message, char **argv, CamelException *ex)
-{
-	int fd[2], nullfd, wstat;
-	sigset_t mask, omask;
-	CamelStream *out;
-	pid_t pid;
-
-	g_assert (CAMEL_IS_MIME_MESSAGE (message));
-
-	if (pipe (fd) == -1) {
-		camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
-				      "Could not create pipe to sendmail: "
-				      "%s: mail not sent",
-				      g_strerror (errno));
-		return FALSE;
-	}
-
-	/* Block SIGCHLD so the calling application doesn't notice
-	 * sendmail exiting before we do.
-	 */
-	sigemptyset (&mask);
-	sigaddset (&mask, SIGCHLD);
-	sigprocmask (SIG_BLOCK, &mask, &omask);
-
-	pid = fork ();
-	switch (pid) {
-	case -1:
-		camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
-				      "Could not fork sendmail: "
-				      "%s: mail not sent", g_strerror (errno));
-		sigprocmask (SIG_SETMASK, &omask, NULL);
-		return FALSE;
-
-	case 0:
-		/* Child process */
-		nullfd = open ("/dev/null", O_RDWR);
-		dup2 (fd[0], STDIN_FILENO);
-		dup2 (nullfd, STDOUT_FILENO);
-		dup2 (nullfd, STDERR_FILENO);
-		close (nullfd);
-		close (fd[1]);
-
-		execv (SENDMAIL_PATH, argv);
-		_exit (255);
-	}
-
-	/* Parent process. Write the message out. */
-	close (fd[0]);
-	out = camel_stream_fs_new_with_fd (fd[1]);
-	if (camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (message), out) == -1
-	    || camel_stream_close(out) == -1) {
-		gtk_object_unref (GTK_OBJECT (out));
-		camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
-				      "Could not send message: %s",
-				      strerror(errno));
-		return FALSE;
-	}
-	gtk_object_unref (GTK_OBJECT (out));
-
-	/* Wait for sendmail to exit. */
-	while (waitpid (pid, &wstat, 0) == -1 && errno == EINTR)
-		;
-	sigprocmask (SIG_SETMASK, &omask, NULL);
-
-	if (!WIFEXITED (wstat)) {
-		camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
-				      "sendmail exited with signal %s: "
-				      "mail not sent.",
-				      g_strsignal (WTERMSIG (wstat)));
-		return FALSE;
-	} else if (WEXITSTATUS (wstat) != 0) {
-		if (WEXITSTATUS (wstat) == 255) {
-			camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
-					     "Could not execute "
-					     SENDMAIL_PATH ": mail not sent.");
-		} else {
-			camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
-					      "sendmail exited with status "
-					      "%d: mail not sent.",
-					      WEXITSTATUS (wstat));
-		}
-		return FALSE;
-	}
-
-	return TRUE;
-}
-
-static gboolean
-_send_to (CamelTransport *transport, CamelMedium *message,
-	  GList *recipients, CamelException *ex)
-{
-	GList *r;
-	char **argv;
-	int i, len;
-	gboolean status;
-
-	len = g_list_length (recipients);
-	argv = g_malloc ((len + 4) * sizeof (char *));
-	argv[0] = "sendmail";
-	argv[1] = "-i";
-	argv[2] = "--";
-
-	for (i = 1, r = recipients; i <= len; i++, r = r->next)
-		argv[i + 2] = r->data;
-	argv[i + 2] = NULL;
-
-	status = _send_internal (message, argv, ex);
-	g_free (argv);
-	return status;
-}
-
-static gboolean
-_send (CamelTransport *transport, CamelMedium *message,
-       CamelException *ex)
-{
-	char *argv[4] = { "sendmail", "-t", "-i", NULL };
-
-	return _send_internal (message, argv, ex);
-}
diff --git a/camel/providers/sendmail/camel-sendmail-transport.h b/camel/providers/sendmail/camel-sendmail-transport.h
deleted file mode 100644
index 3f3714584a..0000000000
--- a/camel/providers/sendmail/camel-sendmail-transport.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-sendmail-transport.h: Sendmail-based transport class */
-
-/* 
- *
- * Author : 
- *  Dan Winship 
- *
- * Copyright 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef CAMEL_SENDMAIL_TRANSPORT_H
-#define CAMEL_SENDMAIL_TRANSPORT_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include "camel-transport.h"
-
-#define CAMEL_SENDMAIL_TRANSPORT_TYPE     (camel_sendmail_transport_get_type ())
-#define CAMEL_SENDMAIL_TRANSPORT(obj)     (GTK_CHECK_CAST((obj), CAMEL_SENDMAIL_TRANSPORT_TYPE, CamelSendmailTransport))
-#define CAMEL_SENDMAIL_TRANSPORT_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_SENDMAIL_TRANSPORT_TYPE, CamelSendmailTransportClass))
-#define CAMEL_IS_SENDMAIL_TRANSPORT(o)    (GTK_CHECK_TYPE((o), CAMEL_SENDMAIL_TRANSPORT_TYPE))
-
-
-typedef struct {
-	CamelTransport parent_object;
-
-} CamelSendmailTransport;
-
-
-typedef struct {
-	CamelTransportClass parent_class;
-
-} CamelSendmailTransportClass;
-
-
-/* Standard Gtk function */
-GtkType camel_sendmail_transport_get_type (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_SENDMAIL_TRANSPORT_H */
diff --git a/camel/providers/sendmail/libcamelsendmail.urls b/camel/providers/sendmail/libcamelsendmail.urls
deleted file mode 100644
index ccad52828e..0000000000
--- a/camel/providers/sendmail/libcamelsendmail.urls
+++ /dev/null
@@ -1 +0,0 @@
-sendmail
diff --git a/camel/providers/smtp/.cvsignore b/camel/providers/smtp/.cvsignore
deleted file mode 100644
index 09980ae6ba..0000000000
--- a/camel/providers/smtp/.cvsignore
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-*.lo
-*.la
diff --git a/camel/providers/smtp/Makefile.am b/camel/providers/smtp/Makefile.am
deleted file mode 100644
index b14375bfc0..0000000000
--- a/camel/providers/smtp/Makefile.am
+++ /dev/null
@@ -1,32 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-SUBDIRS = 
-
-libcamelsmtpincludedir = $(includedir)/camel
-
-providerdir = $(pkglibdir)/camel-providers/$(VERSION)
-
-provider_LTLIBRARIES = libcamelsmtp.la
-provider_DATA = libcamelsmtp.urls
-
-INCLUDES =					\
-	-I..					\
-	-I$(srcdir)/..				\
-	-I$(srcdir)/../../..			\
-	-I$(includedir)				\
-	-I$(top_srcdir)/intl			\
-	$(GTK_INCLUDEDIR)			\
-	-I$(top_srcdir)/camel			\
-        -DG_LOG_DOMAIN=\"camel-smtp-provider\"
-
-libcamelsmtp_la_SOURCES = 			\
-	camel-smtp-provider.c			\
-	camel-smtp-transport.c
-
-libcamelsmtpinclude_HEADERS =			\
-	camel-smtp-transport.h
-
-
-libcamelsmtp_la_LDFLAGS = -version-info 0:0:0 -rpath $(libdir) 
-
-EXTRA_DIST = libcamelsmtp.urls
diff --git a/camel/providers/smtp/camel-smtp-provider.c b/camel/providers/smtp/camel-smtp-provider.c
deleted file mode 100644
index 9e6f571498..0000000000
--- a/camel/providers/smtp/camel-smtp-provider.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-smtp-provider.c: smtp provider registration code */
-
-/* 
- * Authors :
- *   Jeffrey Stedfast 
- *
- * Copyright (C) 2000 Helix Code, Inc. (www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#include "config.h"
-#include "camel-smtp-transport.h"
-#include "camel-provider.h"
-#include "camel-session.h"
-
-static CamelProvider smtp_provider = {
-	"smtp",
-	"SMTP",
-
-	"For delivering mail by connecting to a remote mailhub using SMTP.",
-
-	"mail",
-
-	0,
-
-	{ 0, 0 }
-};
-
-void
-camel_provider_module_init (CamelSession *session)
-{
-	smtp_provider.object_types[CAMEL_PROVIDER_TRANSPORT] =
-		camel_smtp_transport_get_type();
-
-	camel_session_register_provider (session, &smtp_provider);
-}
-
-
-
diff --git a/camel/providers/smtp/camel-smtp-transport.c b/camel/providers/smtp/camel-smtp-transport.c
deleted file mode 100644
index 3387257015..0000000000
--- a/camel/providers/smtp/camel-smtp-transport.c
+++ /dev/null
@@ -1,774 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-smtp-transport.c : class for a smtp transport */
-
-/* 
- * Authors:
- *   Jeffrey Stedfast 
- *
- * Copyright (C) 2000 Helix Code, Inc. (www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#include "config.h"
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#undef MIN
-#undef MAX
-#include "camel-mime-filter-smtp.h"
-#include "camel-stream-filter.h"
-#include "camel-smtp-transport.h"
-#include "camel-mime-message.h"
-#include "camel-stream-buffer.h"
-#include "camel-stream-fs.h"
-#include "camel-session.h"
-#include "camel-exception.h"
-#include "md5-utils.h"
-
-/* Specified in RFC 821 */
-#define SMTP_PORT 25
-
-/* camel smtp transport class prototypes */
-static gboolean _can_send (CamelTransport *transport, CamelMedium *message);
-static gboolean _send (CamelTransport *transport, CamelMedium *message, CamelException *ex);
-static gboolean _send_to (CamelTransport *transport, CamelMedium *message, GList *recipients, CamelException *ex);
-
-/* support prototypes */
-static gboolean smtp_connect (CamelService *service, CamelException *ex);
-static gboolean smtp_disconnect (CamelService *service, CamelException *ex);
-static GList *esmtp_get_authtypes(gchar *buffer);
-static GList *query_auth_types (CamelService *service, CamelException *ex);
-static void free_auth_types (CamelService *service, GList *authtypes);
-static gchar *smtp_get_email_addr_from_text (gchar *text);
-static gboolean smtp_helo (CamelSmtpTransport *transport, CamelException *ex);
-static gboolean smtp_mail (CamelSmtpTransport *transport, gchar *sender, CamelException *ex);
-static gboolean smtp_rcpt (CamelSmtpTransport *transport, gchar *recipient, CamelException *ex);
-static gboolean smtp_data (CamelSmtpTransport *transport, CamelMedium *message, CamelException *ex);
-static gboolean smtp_rset (CamelSmtpTransport *transport, CamelException *ex);
-static gboolean smtp_quit (CamelSmtpTransport *transport, CamelException *ex);
-
-/* private data members */
-static CamelServiceClass *service_class = NULL;
-
-static void
-camel_smtp_transport_class_init (CamelSmtpTransportClass *camel_smtp_transport_class)
-{
-	CamelTransportClass *camel_transport_class =
-		CAMEL_TRANSPORT_CLASS (camel_smtp_transport_class);
-	CamelServiceClass *camel_service_class =
-		CAMEL_SERVICE_CLASS (camel_smtp_transport_class);
-	
-	service_class = gtk_type_class (camel_service_get_type ());
-
-	/* virtual method overload */
-	camel_service_class->connect = smtp_connect;
-	camel_service_class->disconnect = smtp_disconnect;
-	camel_service_class->query_auth_types = query_auth_types;
-	camel_service_class->free_auth_types = free_auth_types;
-
-	camel_transport_class->can_send = _can_send;
-	camel_transport_class->send = _send;
-	camel_transport_class->send_to = _send_to;
-}
-
-static void
-camel_smtp_transport_init (gpointer object, gpointer klass)
-{
-	CamelService *service = CAMEL_SERVICE (object);
-
-	service->url_flags = CAMEL_SERVICE_URL_NEED_HOST;
-}
-
-GtkType
-camel_smtp_transport_get_type (void)
-{
-	static GtkType camel_smtp_transport_type = 0;
-
-	if (!camel_smtp_transport_type) {
-		GtkTypeInfo camel_smtp_transport_info =	
-		{
-			"CamelSmtpTransport",
-			sizeof (CamelSmtpTransport),
-			sizeof (CamelSmtpTransportClass),
-			(GtkClassInitFunc) camel_smtp_transport_class_init,
-			(GtkObjectInitFunc) camel_smtp_transport_init,
-			/* reserved_1 */ NULL,
-			/* reserved_2 */ NULL,
-			(GtkClassInitFunc) NULL,
-		};
-
-		camel_smtp_transport_type = gtk_type_unique (CAMEL_TRANSPORT_TYPE, &camel_smtp_transport_info);
-	}
-
-	return camel_smtp_transport_type;
-}
-
-static gboolean
-smtp_connect (CamelService *service, CamelException *ex)
-{
-	struct hostent *h;
-	struct sockaddr_in sin;
-	gint fd, num, i;
-	guint32 addrlen;
-	gchar *pass = NULL, *respbuf = NULL;
-	CamelSmtpTransport *transport = CAMEL_SMTP_TRANSPORT (service);
-
-	if (!service_class->connect (service, ex))
-		return FALSE;
-
-	h = camel_service_gethost (service, ex);
-	if (!h)
-		return FALSE;
-
-	/* set some smtp transport defaults */
-	transport->smtp_is_esmtp = FALSE;
-	transport->esmtp_supported_authtypes = NULL;
-
-	sin.sin_family = h->h_addrtype;
-	sin.sin_port = htons (service->url->port ? service->url->port : SMTP_PORT);
-	memcpy (&sin.sin_addr, h->h_addr, sizeof (sin.sin_addr));
-
-	fd = socket (h->h_addrtype, SOCK_STREAM, 0);
-	if (fd == -1 || connect (fd, (struct sockaddr *)&sin, sizeof(sin)) == -1) {
-		camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
-				      "Could not connect to %s (port %s): %s",
-				      service->url->host, service->url->port,
-				      strerror(errno));
-		if (fd > -1)
-			close (fd);
-		g_free (pass);
-		return FALSE;
-	}
-
-	/* get the localaddr - needed later by smtp_helo */
-	addrlen = sizeof(transport->localaddr);
-	getsockname(fd, (struct sockaddr*)&transport->localaddr, &addrlen);
-
-	transport->ostream = camel_stream_fs_new_with_fd (fd);
-	transport->istream = camel_stream_buffer_new (transport->ostream, 
-						      CAMEL_STREAM_BUFFER_READ);
-
-	/* Read the greeting, note whether the server is ESMTP and if it requests AUTH. */
-	do {
-		/* Check for "220" */
-		g_free(respbuf);
-		respbuf = camel_stream_buffer_read_line (CAMEL_STREAM_BUFFER (transport->istream));
-		if ( !respbuf || strncmp(respbuf, "220", 3) ) {
-			camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
-					      "Welcome response error: "
-					      "%s: possibly non-fatal",
-					      g_strerror (errno));
-			return FALSE;
-		}
-		if (strstr(respbuf, "ESMTP"))
-			transport->smtp_is_esmtp = TRUE;
-	} while ( *(respbuf+3) == '-' ); /* if we got "220-" then loop again */
-	g_free(respbuf);
-
-	/* send HELO (or EHLO, depending on the service type) */
-	smtp_helo(transport, ex);
-
-	/* check to see if AUTH is required, if so...then AUTH ourselves */
-	if (transport->smtp_is_esmtp && transport->esmtp_supported_authtypes) {
-		/* not really supported yet, but we can at least show what auth types are supported */
-		fprintf(stderr, "camel-smtp-transport::connect(): %s requires AUTH\n", service->url->host);
-		num = g_list_length(transport->esmtp_supported_authtypes);
-
-		for (i = 0; i < num; i++)
-			fprintf(stderr, "\nSupported AUTH: %s\n\n", 
-				(gchar *) g_list_nth_data(transport->esmtp_supported_authtypes, i));
-
-		g_list_free(transport->esmtp_supported_authtypes);
-		transport->esmtp_supported_authtypes = NULL;
-	} else {
-		fprintf(stderr, "\ncamel-smtp-transport::connect(): provider does not use AUTH\n\n");
-	}
-
-	return TRUE;
-}
-
-static gboolean
-smtp_disconnect (CamelService *service, CamelException *ex)
-{
-	CamelSmtpTransport *transport = CAMEL_SMTP_TRANSPORT (service);
-
-	if (!service->connected)
-		return TRUE;
-
-	/* send the QUIT command to the SMTP server */
-	smtp_quit(transport, ex);
-
-	if (!service_class->disconnect (service, ex))
-		return FALSE;
-
-	g_free(transport->esmtp_supported_authtypes);
-	transport->esmtp_supported_authtypes = NULL;
-	gtk_object_unref (GTK_OBJECT (transport->ostream));
-	gtk_object_unref (GTK_OBJECT (transport->istream));
-	transport->ostream = NULL;
-	transport->istream = NULL;
-
-	return TRUE;
-}
-
-static GList
-*esmtp_get_authtypes(gchar *buffer)
-{
-	GList *ret = NULL;
-	gchar *start, *end;
-
-	if (!(start = strstr(buffer, " AUTH ")))
-		return NULL;
-
-	/* advance to the first token */
-	for (start += 6; *start && *start != ' '; start++);
-
-	for ( ; *start; ) {
-		/* advance to the end of the token */
-		for (end = start; *end && *end != ' '; end++);
-
-		ret = g_list_append(ret, g_strndup(start, end - start));
-
-		/* advance to the next token */
-		for (start = end; *start && *start != ' '; start++);
-	}
-
-	return ret;
-}
-
-static CamelServiceAuthType no_authtype = {
-	"No authentication required",
-
-	"This option will connect to the SMTP server without using any "
-	"kind of authentication. This should be fine for connecting to "
-	"most SMTP servers."
-
-	"",
-	FALSE
-};
-
-static CamelServiceAuthType cram_md5_authtype = {
-	"CRAM-MD5",
-
-	"This option will connect to the SMTP server using CRAM-MD5 "
-	"authentication.",
-
-	"CRAM-MD5",
-	TRUE
-};
-
-static GList
-*query_auth_types (CamelService *service, CamelException *ex)
-{
-	/* FIXME: Re-enable this when auth types are actually
-	 * implemented.
-	 */
-
-	return NULL;
-}
-
-static void
-free_auth_types (CamelService *service, GList *authtypes)
-{
-	g_list_free (authtypes);
-}
-
-static gboolean
-_can_send (CamelTransport *transport, CamelMedium *message)
-{
-	return CAMEL_IS_MIME_MESSAGE (message);
-}
-
-static gboolean
-_send_to (CamelTransport *transport, CamelMedium *message,
-	  GList *recipients, CamelException *ex)
-{
-	GList *r;
-	gchar *recipient, *s, *sender;
-	guint i, len;
-	CamelSmtpTransport *smtp_transport = CAMEL_SMTP_TRANSPORT(transport);
-
-	s = g_strdup(camel_mime_message_get_from (CAMEL_MIME_MESSAGE(message)));
-	if (!s) {
-		camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
-				      "Cannot send message: "
-				      "sender address not defined.");
-		return FALSE;
-	}
-
-	sender = smtp_get_email_addr_from_text(s);
-	smtp_mail(smtp_transport, sender, ex);
-	g_free(sender);
-	g_free(s);
-
-	if (!(len = g_list_length(recipients))) {
-		camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
-				      "Cannot send message: "
-				      "no recipients defined.");
-		return FALSE;
-	}
-	for (i = 0, r = recipients; i < len; i++, r = r->next) {
-		recipient = smtp_get_email_addr_from_text(r->data);
-		if (!smtp_rcpt(smtp_transport, recipient, ex)) {
-			g_free(recipient);
-			return FALSE;
-		}
-		g_free(recipient);
-	}
-
-	if (!smtp_data(smtp_transport, message, ex))
-		return FALSE;
-
-	/* reset the service for our next transfer session */
-	smtp_rset(smtp_transport, ex);
-
-	return TRUE;
-}
-
-static gboolean
-_send (CamelTransport *transport, CamelMedium *message,
-       CamelException *ex)
-{
-	const CamelInternetAddress *to, *cc, *bcc;
-	GList *recipients = NULL;
-	guint index, len;
-
-	to = camel_mime_message_get_recipients ((CamelMimeMessage *) message, CAMEL_RECIPIENT_TYPE_TO);
-	cc = camel_mime_message_get_recipients ((CamelMimeMessage *) message, CAMEL_RECIPIENT_TYPE_CC);
-	bcc = camel_mime_message_get_recipients ((CamelMimeMessage *) message, CAMEL_RECIPIENT_TYPE_BCC);
-
-	/* get all of the To addresses into our recipient list */
-	len = ((CamelAddress *)to)->addresses->len;
-	for (index = 0; index < len; index++) {
-		const char *addr;
-
-		if (camel_internet_address_get(to, index, NULL, &addr))
-			recipients = g_list_append(recipients, g_strdup(addr));
-	}
-
-	/* get all of the Cc addresses into our recipient list */
-	len = ((CamelAddress *)cc)->addresses->len;
-	for (index = 0; index < len; index++) {
-		const char *addr;
-
-		if (camel_internet_address_get(cc, index, NULL, &addr))
-			recipients = g_list_append(recipients, g_strdup(addr));
-	}
-
-	/* get all of the Bcc addresses into our recipient list */
-	len = ((CamelAddress *)bcc)->addresses->len;
-	for (index = 0; index < len; index++) {
-		const char *addr;
-
-		if (camel_internet_address_get(bcc, index, NULL, &addr))
-			recipients = g_list_append(recipients, g_strdup(addr));
-	}
-
-	return _send_to (transport, message, recipients, ex);
-}
-
-static gchar
-*smtp_get_email_addr_from_text (gchar *text)
-{
-	/* get the actual email address from the string passed and place it in addr
-	 * we can assume the address will be in one of the following forms:
-	 * 1) The Name 
-	 * 2) 
-	 * 3) person@host.com
-	 * 4) person@host.com (The Name)
-	 */
-
-	gchar *tmp, *addr = NULL;
-	gchar *addr_strt;         /* points to start of addr */
-	gchar *addr_end;          /* points to end of addr */
-	gchar *ptr1;
-   
-   
-	/* check the incoming args */
-	if (!text || !*text)
-		return NULL;
-
-	/* scan the string for an open brace */
-	for (addr_strt = text; *addr_strt; addr_strt++) 
-		if (*addr_strt == '<')
-			break;
-
-	if (*addr_strt) {
-		/* we found an open brace, let's look for it's counterpart */
-		for (addr_end = addr_strt; *addr_end; addr_end++)
-			if (*addr_end == '>') 
-				break;
-
-		/* if we didn't find it, or braces are empty... */
-		if (!(*addr_end) || (addr_strt == addr_end - 1))
-			return NULL;
-			
-		/* addr_strt points to '<' and addr_end points to '>'.
-		 * Now let's adjust 'em slightly to point to the beginning
-		 * and ending of the email addy
-		 */
-		addr_strt++;
-		addr_end--;
-	} else {
-		/* no open brace...assume type 3 or 4? */
-		addr_strt = text;
-			
-		/* find the end of the email addr/string */
-		for (addr_end = addr_strt; *addr_end || *addr_end == ' '; addr_end++);
- 
-		addr_end--;       /* points to NULL, move it back one char */
-	}
-
-	/* now addr_strt & addr_end point to the beginning & ending of the email addy */
-
-	/* copy the string into addr */
-	addr = g_strndup(addr_strt, (gint)(addr_end - addr_strt + 1));
-
-	for (ptr1 = addr_strt; ptr1 <= addr_end; ptr1++)    /* look for an '@' sign */
-		if (*ptr1 == '@')
-			break;
-
-	if (*ptr1 != '@') {
-		/* here we found out the name doesn't have an '@' part
-		 * let's figure out what machine we're on & stick it on the end
-		 */
-		gchar hostname[MAXHOSTNAMELEN];
-
-		if (gethostname(hostname, MAXHOSTNAMELEN)) {
-			g_free(addr);
-			return NULL;
-		}
-		tmp = addr;
-		addr = g_strconcat(tmp, "@", hostname, NULL);
-		g_free(tmp);
-	}
-
-	return addr;
-}
-
-static gboolean
-smtp_helo (CamelSmtpTransport *transport, CamelException *ex)
-{
-	/* say hello to the server */
-	gchar *cmdbuf, *respbuf = NULL;
-	struct hostent *host;
-
-	/* get the local host name */
-	host = gethostbyaddr((gchar *)&transport->localaddr.sin_addr, sizeof(transport->localaddr.sin_addr), AF_INET);
-
-	/* hiya server! how are you today? */
-	if (transport->smtp_is_esmtp)
-		cmdbuf = g_strdup_printf ("EHLO %s\r\n", host && host->h_name ? host->h_name : 
-					  inet_ntoa(transport->localaddr.sin_addr));
-	else
-		cmdbuf = g_strdup_printf ("HELO %s\r\n", host && host->h_name ? host->h_name : 
-					  inet_ntoa(transport->localaddr.sin_addr));
-
-	fprintf(stderr, "sending : %s", cmdbuf);
-	if ( camel_stream_write (transport->ostream, cmdbuf, strlen(cmdbuf)) == -1) {
-		g_free(cmdbuf);
-		camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
-				      "HELO request timed out: "
-				      "%s: non-fatal",
-				      g_strerror (errno));
-		return FALSE;
-	}
-	g_free(cmdbuf);
-
-	do {
-		/* Check for "250" */
-		g_free(respbuf);
-		respbuf = camel_stream_buffer_read_line (CAMEL_STREAM_BUFFER (transport->istream));
-		if ( !respbuf || strncmp(respbuf, "250", 3) ) {
-			camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
-					      "HELO response error: "
-					      "%s: non-fatal",
-					      g_strerror (errno));
-			return FALSE;
-		}
-
-		fprintf(stderr, "received: %s\n", respbuf);
-
-		if (transport->smtp_is_esmtp && strstr(respbuf, "AUTH")) {
-			/* parse for supported AUTH types */
-			g_strchomp(respbuf);
-			transport->esmtp_supported_authtypes = esmtp_get_authtypes(respbuf);
-		}
-	} while ( *(respbuf+3) == '-' ); /* if we got "250-" then loop again */
-	g_free(respbuf);
-
-	return TRUE;
-}
-
-static gboolean
-smtp_mail (CamelSmtpTransport *transport, gchar *sender, CamelException *ex)
-{
-	/* we gotta tell the smtp server who we are. (our email addy) */
-	gchar *cmdbuf, *respbuf = NULL;
-
-	/* enclose address in <>'s since some SMTP daemons *require* that */
-	cmdbuf = g_strdup_printf("MAIL FROM: <%s>\r\n", sender);
-
-	fprintf(stderr, "sending : %s", cmdbuf);
-
-	if ( camel_stream_write (transport->ostream, cmdbuf, strlen(cmdbuf)) == -1) {
-		g_free(cmdbuf);
-		camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
-				      "MAIL FROM request timed out: "
-				      "%s: mail not sent",
-				      g_strerror (errno));
-		return FALSE;
-	}
-	g_free(cmdbuf);
-
-	do {
-		/* Check for "250 Sender OK..." */
-		g_free(respbuf);
-		respbuf = camel_stream_buffer_read_line (CAMEL_STREAM_BUFFER (transport->istream));
-		if ( !respbuf || strncmp(respbuf, "250", 3) ) {
-			camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
-					      "MAIL FROM response error: "
-					      "%s: mail not sent",
-					      g_strerror (errno));
-			return FALSE;
-		}
-
-		fprintf(stderr, "received: %s\n", respbuf);
-
-	} while ( *(respbuf+3) == '-' ); /* if we got "250-" then loop again */
-	g_free(respbuf);
-
-	return TRUE;
-}
-
-static gboolean
-smtp_rcpt (CamelSmtpTransport *transport, gchar *recipient, CamelException *ex)
-{
-	/* we gotta tell the smtp server who we are going to be sending
-	 * our email to */
-	gchar *cmdbuf, *respbuf = NULL;
-
-	/* enclose address in <>'s since some SMTP daemons *require* that */
-	cmdbuf = g_strdup_printf("RCPT TO: <%s>\r\n", recipient);
-
-	fprintf(stderr, "sending : %s", cmdbuf);
-
-	if ( camel_stream_write (transport->ostream, cmdbuf, strlen(cmdbuf)) == -1) {
-		g_free(cmdbuf);
-		camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
-				      "RCPT TO request timed out: "
-				      "%s: mail not sent",
-				      g_strerror (errno));
-		return FALSE;
-	}
-	g_free(cmdbuf);
-
-	do {
-		/* Check for "250 Sender OK..." */
-		g_free(respbuf);
-		respbuf = camel_stream_buffer_read_line (CAMEL_STREAM_BUFFER (transport->istream));
-		if ( !respbuf || strncmp(respbuf, "250", 3) ) {
-			camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
-					      "RCPT TO response error: "
-					      "%s: mail not sent",
-					      g_strerror (errno));
-			return FALSE;
-		}
-
-		fprintf(stderr, "received: %s\n", respbuf);
-
-	} while ( *(respbuf+3) == '-' ); /* if we got "250-" then loop again */
-	g_free(respbuf);
-  
-	return TRUE;
-}
-
-static gboolean
-smtp_data (CamelSmtpTransport *transport, CamelMedium *message, CamelException *ex)
-{
-	/* now we can actually send what's important :p */
-	gchar *cmdbuf, *respbuf = NULL;
-	CamelStreamFilter *filtered_stream;
-	CamelMimeFilterSmtp *mimefilter;
-	gint id;
-
-	/* enclose address in <>'s since some SMTP daemons *require* that */
-	cmdbuf = g_strdup("DATA\r\n");
-
-	fprintf(stderr, "sending : %s", cmdbuf);
-
-	if ( camel_stream_write (transport->ostream, cmdbuf, strlen(cmdbuf)) == -1) {
-		g_free(cmdbuf);
-		camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
-				      "DATA request timed out: "
-				      "%s: mail not sent",
-				      g_strerror (errno));
-		return FALSE;
-	}
-	g_free(cmdbuf);
-
-	respbuf = camel_stream_buffer_read_line (CAMEL_STREAM_BUFFER (transport->istream));
-	if ( !respbuf || strncmp(respbuf, "354", 3) ) {
-		/* we should have gotten instructions on how to use the DATA command:
-		 * 354 Enter mail, end with "." on a line by itself
-		 */
-		g_free(respbuf);
-		camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
-				      "DATA response error: "
-				      "%s: mail not sent",
-				      g_strerror (errno));
-		return FALSE;
-	}
-
-	fprintf(stderr, "received: %s\n", respbuf);
-	
-	/* setup stream filtering */
-	mimefilter = camel_mime_filter_smtp_new();
-        filtered_stream = camel_stream_filter_new_with_stream(transport->ostream);
-	id = camel_stream_filter_add(filtered_stream, CAMEL_MIME_FILTER(mimefilter));
-
-	if (camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER(message), CAMEL_STREAM(filtered_stream)) == -1) {
-		camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
-				      "DATA send timed out: message termination: "
-				      "%s: mail not sent",
-				      g_strerror (errno));
-		return FALSE;
-	}
-        
-	camel_stream_filter_remove(filtered_stream, id);
-	camel_stream_close(CAMEL_STREAM(filtered_stream));
-	gtk_object_unref(GTK_OBJECT(filtered_stream));
-
-	/* terminate the message body */
-
-	fprintf(stderr, "sending : \\r\\n.\\r\\n\n");
-
-	if ( camel_stream_write (transport->ostream, "\r\n.\r\n", 5) == -1) {
-		camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
-				      "DATA send timed out: message termination: "
-				      "%s: mail not sent",
-				      g_strerror (errno));
-		return FALSE;
-	}
-
-	do {
-		/* Check for "250 Sender OK..." */
-		g_free(respbuf);
-		respbuf = camel_stream_buffer_read_line (CAMEL_STREAM_BUFFER (transport->istream));
-		if ( !respbuf || strncmp(respbuf, "250", 3) ) {
-			camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
-					      "DATA response error: message termination: "
-					      "%s: mail not sent",
-					      g_strerror (errno));
-			return FALSE;
-		}
-
-		fprintf(stderr, "received: %s\n", respbuf);
-
-	} while ( *(respbuf+3) == '-' ); /* if we got "250-" then loop again */
-	g_free(respbuf);
-
-	return TRUE;
-}
-
-static gboolean
-smtp_rset (CamelSmtpTransport *transport, CamelException *ex)
-{
-	/* we are going to reset the smtp server (just to be nice) */
-	gchar *cmdbuf, *respbuf = NULL;
-
-	cmdbuf = g_strdup ("RSET\r\n");
-
-	fprintf(stderr, "sending : %s", cmdbuf);
-
-	if ( camel_stream_write (transport->ostream, cmdbuf, strlen(cmdbuf)) == -1) {
-		g_free(cmdbuf);
-		camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
-				      "RSET request timed out: "
-				      "%s",
-				      g_strerror (errno));
-		return FALSE;
-	}
-	g_free(cmdbuf);
-
-	do {
-		/* Check for "250" */
-		g_free(respbuf);
-		respbuf = camel_stream_buffer_read_line (CAMEL_STREAM_BUFFER (transport->istream));
-		if ( !respbuf || strncmp(respbuf, "250", 3) ) {
-			camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
-					      "RSET response error: "
-					      "%s",
-					      g_strerror (errno));
-			return FALSE;
-		}
-
-		fprintf(stderr, "received: %s\n", respbuf);
-
-	} while ( *(respbuf+3) == '-' ); /* if we got "250-" then loop again */
-	g_free(respbuf);
-
-	return TRUE;
-}
-
-static gboolean
-smtp_quit (CamelSmtpTransport *transport, CamelException *ex)
-{
-	/* we are going to reset the smtp server (just to be nice) */
-	gchar *cmdbuf, *respbuf = NULL;
-
-	cmdbuf = g_strdup ("QUIT\r\n");
-
-	fprintf(stderr, "sending : %s", cmdbuf);
-
-	if ( camel_stream_write (transport->ostream, cmdbuf, strlen(cmdbuf)) == -1) {
-		g_free(cmdbuf);
-		camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
-				      "QUIT request timed out: "
-				      "%s: non-fatal",
-				      g_strerror (errno));
-		return FALSE;
-	}
-	g_free(cmdbuf);
-
-	do {
-		/* Check for "221" */
-		g_free(respbuf);
-		respbuf = camel_stream_buffer_read_line (CAMEL_STREAM_BUFFER (transport->istream));
-		if ( !respbuf || strncmp(respbuf, "221", 3) ) {
-			camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
-					      "QUIT response error: "
-					      "%s: non-fatal",
-					      g_strerror (errno));
-			return FALSE;
-		}
-
-		fprintf(stderr, "received: %s\n", respbuf);
-
-	} while ( *(respbuf+3) == '-' ); /* if we got "221-" then loop again */
-	g_free(respbuf);
-
-	return TRUE;
-}
diff --git a/camel/providers/smtp/camel-smtp-transport.h b/camel/providers/smtp/camel-smtp-transport.h
deleted file mode 100644
index c11b8b4738..0000000000
--- a/camel/providers/smtp/camel-smtp-transport.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-smtp-transport.h : class for an smtp transfer */
-
-/* 
- * Authors:
- *   Jeffrey Stedfast 
- *
- * Copyright (C) 2000 Helix Code, Inc. (www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef CAMEL_SMTP_TRANSPORT_H
-#define CAMEL_SMTP_TRANSPORT_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include "camel-transport.h"
-
-#define CAMEL_SMTP_TRANSPORT_TYPE     (camel_smtp_transport_get_type ())
-#define CAMEL_SMTP_TRANSPORT(obj)     (GTK_CHECK_CAST((obj), CAMEL_SMTP_TRANSPORT_TYPE, CamelSmtpTransport))
-#define CAMEL_SMTP_TRANSPORT_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_SMTP_TRANSPORT_TYPE, CamelSmtpTransportClass))
-#define IS_CAMEL_SMTP_TRANSPORT(o)    (GTK_CHECK_TYPE((o), CAMEL_SMTP_TRANSPORT_TYPE))
-
-
-typedef struct {
-	CamelTransport parent_object;
-
-	CamelStream *istream, *ostream;
-
-	gboolean smtp_is_esmtp;
-
-	struct sockaddr_in localaddr;
-
-	GList *esmtp_supported_authtypes;
-	
-} CamelSmtpTransport;
-
-
-
-typedef struct {
-	CamelTransportClass parent_class;
-
-} CamelSmtpTransportClass;
-
-
-/* Standard Gtk function */
-GtkType camel_smtp_transport_get_type (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_SMTP_TRANSPORT_H */
-
-
diff --git a/camel/providers/smtp/libcamelsmtp.urls b/camel/providers/smtp/libcamelsmtp.urls
deleted file mode 100644
index ec2fc0fc16..0000000000
--- a/camel/providers/smtp/libcamelsmtp.urls
+++ /dev/null
@@ -1 +0,0 @@
-smtp
diff --git a/camel/providers/vee/.cvsignore b/camel/providers/vee/.cvsignore
deleted file mode 100644
index fd6b811c68..0000000000
--- a/camel/providers/vee/.cvsignore
+++ /dev/null
@@ -1,7 +0,0 @@
-.deps
-Makefile
-Makefile.in
-.libs
-.deps
-*.lo
-*.la
diff --git a/camel/providers/vee/Makefile.am b/camel/providers/vee/Makefile.am
deleted file mode 100644
index 601defcb80..0000000000
--- a/camel/providers/vee/Makefile.am
+++ /dev/null
@@ -1,39 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-SUBDIRS = 
-
-libcamelveeincludedir = $(includedir)/camel
-
-
-providerdir = $(pkglibdir)/camel-providers/$(VERSION)
-
-provider_LTLIBRARIES = libcamelvee.la
-provider_DATA = libcamelvee.urls
-
-INCLUDES = -I.. \
-	-I$(srcdir)/..				\
-	-I$(top_srcdir)/camel			\
-	-I$(top_srcdir)/intl			\
-	-I$(top_srcdir)/libibex			\
-	-I$(top_srcdir)/e-util			\
-	-I$(top_srcdir)				\
-	-I$(includedir)				\
-	$(GTK_INCLUDEDIR)			\
-	-DG_LOG_DOMAIN=\"camel-vee-provider\"	
-
-libcamelvee_la_SOURCES = 			\
-	camel-vee-folder.c			\
-	camel-vee-provider.c			\
-	camel-vee-store.c
-
-libcamelveeinclude_HEADERS =			\
-	camel-vee-folder.h			\
-	camel-vee-store.h
-
-libcamelvee_la_LDFLAGS = -version-info 0:0:0 -rpath $(libdir) 
-
-libcamelvee_la_LIBADD = $(top_builddir)/e-util/libeutil.la $(top_builddir)/libibex/libibex.la $(UNICODE_LIBS)
-#libcamelvee_la_LIBADD = $(top_builddir)/libibex/libibex.la $(UNICODE_LIBS)
-
-EXTRA_DIST = libcamelvee.urls
-
diff --git a/camel/providers/vee/camel-vee-folder.c b/camel/providers/vee/camel-vee-folder.c
deleted file mode 100644
index 25922ed13f..0000000000
--- a/camel/providers/vee/camel-vee-folder.c
+++ /dev/null
@@ -1,493 +0,0 @@
-/*
- *  Copyright (C) 2000 Helix Code Inc.
- *
- *  Authors: Michael Zucchi 
- *
- *  This program is free software; you can redistribute it and/or 
- *  modify it under the terms of the GNU General Public License as 
- *  published by the Free Software Foundation; either version 2 of the
- *  License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- *  USA
- */
-
-#include "camel-exception.h"
-#include "camel-vee-folder.h"
-#include "camel-folder-summary.h"
-#include "camel-mime-message.h"
-
-#include 
-
-/* our message info includes the parent folder */
-typedef struct _CamelVeeMessageInfo {
-	CamelMessageInfo info;
-	CamelFolder *folder;
-} CamelVeeMessageInfo;
-
-struct _CamelVeeFolderPrivate {
-	GList *folders;
-};
-
-#define _PRIVATE(o) (((CamelVeeFolder *)(o))->priv)
-
-static void vee_init (CamelFolder *folder, CamelStore *parent_store,
-		   CamelFolder *parent_folder, const gchar *name,
-		   gchar separator, CamelException *ex);
-
-static void vee_open (CamelFolder *folder, CamelFolderOpenMode mode, CamelException *ex);
-static void vee_close (CamelFolder *folder, gboolean expunge, CamelException *ex);
-static gboolean vee_exists (CamelFolder *folder, CamelException *ex);
-
-static GPtrArray *vee_get_uids  (CamelFolder *folder, CamelException *ex);
-GPtrArray *vee_get_summary (CamelFolder *folder, CamelException *ex);
-void vee_free_summary (CamelFolder *folder, GPtrArray *array);
-
-static gint vee_get_message_count (CamelFolder *folder, CamelException *ex);
-static CamelMimeMessage *vee_get_message_by_uid (CamelFolder *folder, const gchar *uid, CamelException *ex);
-
-static void vee_append_message (CamelFolder *folder, CamelMimeMessage *message, CamelException *ex);
-
-static const CamelMessageInfo *vee_summary_get_by_uid(CamelFolder *f, const char *uid);
-static GList *vee_search_by_expression(CamelFolder *folder, const char *expression, CamelException *ex);
-
-
-static void camel_vee_folder_class_init (CamelVeeFolderClass *klass);
-static void camel_vee_folder_init       (CamelVeeFolder *obj);
-static void camel_vee_folder_finalise   (GtkObject *obj);
-
-static void vee_folder_build(CamelVeeFolder *vf, CamelException *ex);
-
-static CamelFolderClass *camel_vee_folder_parent;
-
-enum SIGNALS {
-	LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-guint
-camel_vee_folder_get_type (void)
-{
-	static guint type = 0;
-	
-	if (!type) {
-		GtkTypeInfo type_info = {
-			"CamelVeeFolder",
-			sizeof (CamelVeeFolder),
-			sizeof (CamelVeeFolderClass),
-			(GtkClassInitFunc) camel_vee_folder_class_init,
-			(GtkObjectInitFunc) camel_vee_folder_init,
-			(GtkArgSetFunc) NULL,
-			(GtkArgGetFunc) NULL
-		};
-		
-		type = gtk_type_unique (camel_folder_get_type (), &type_info);
-	}
-	
-	return type;
-}
-
-static void
-camel_vee_folder_class_init (CamelVeeFolderClass *klass)
-{
-	GtkObjectClass *object_class = (GtkObjectClass *) klass;
-	CamelFolderClass *folder_class = (CamelFolderClass *) klass;
-
-	camel_vee_folder_parent = gtk_type_class (camel_folder_get_type ());
-
-	printf("vfolder class init\n");
-	
-	folder_class->init = vee_init;
-	folder_class->open = vee_open;
-	folder_class->close = vee_close;
-	folder_class->exists = vee_exists;
-
-	folder_class->get_uids = vee_get_uids;
-	folder_class->get_summary = vee_get_summary;
-	folder_class->free_summary = vee_free_summary;
-	folder_class->get_message_by_uid = vee_get_message_by_uid;
-	folder_class->append_message = vee_append_message;
-
-	folder_class->summary_get_by_uid = vee_summary_get_by_uid;
-
-	folder_class->get_message_count = vee_get_message_count;
-	folder_class->search_by_expression = vee_search_by_expression;
-
-	object_class->finalize = camel_vee_folder_finalise;
-
-	gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
-}
-
-static void
-camel_vee_folder_init (CamelVeeFolder *obj)
-{
-	struct _CamelVeeFolderPrivate *p;
-
-	printf("vfolder init\n");
-
-	p = _PRIVATE(obj) = g_malloc0(sizeof(*p));
-}
-
-static void
-camel_vee_folder_finalise (GtkObject *obj)
-{
-	CamelVeeFolder *vf = (CamelVeeFolder *)obj;
-	struct _CamelVeeFolderPrivate *p = _PRIVATE(vf);
-	GList *node;
-
-	node = p->folders;
-	while (node) {
-		CamelFolder *f = node->data;
-		gtk_object_unref((GtkObject *)f);
-		node = g_list_next(node);
-	}
-	
-	((GtkObjectClass *)(camel_vee_folder_parent))->finalize((GtkObject *)obj);
-}
-
-/**
- * camel_vee_folder_new:
- *
- * Create a new CamelVeeFolder object.
- * 
- * Return value: A new CamelVeeFolder widget.
- **/
-CamelVeeFolder *
-camel_vee_folder_new (void)
-{
-	CamelVeeFolder *new = CAMEL_VEE_FOLDER ( gtk_type_new (camel_vee_folder_get_type ()));
-	return new;
-}
-
-
-void
-camel_vee_folder_add_folder(CamelVeeFolder *vf, CamelFolder *sub)
-{
-	struct _CamelVeeFolderPrivate *p = _PRIVATE(vf);
-
-	gtk_object_ref((GtkObject *)sub);
-	p->folders = g_list_append(p->folders, sub);
-}
-
-
-static void vee_init (CamelFolder *folder, CamelStore *parent_store,
-		   CamelFolder *parent_folder, const gchar *name,
-		   gchar separator, CamelException *ex)
-{
-	CamelVeeFolder *vf = (CamelVeeFolder *)folder;
-	char *namepart, *searchpart;
-
-	namepart = g_strdup(name);
-	searchpart = strchr(namepart, '?');
-	if (searchpart == NULL) {
-		/* no search, no result! */
-		searchpart = "(body-contains \"=some-invalid_string-sequence=xx\")";
-	} else {
-		*searchpart++ = 0;
-	}
-
-	camel_vee_folder_parent->init (folder, parent_store, parent_folder, name, separator, ex);
-	if (camel_exception_get_id (ex))
-		return;
-
-	folder->can_hold_messages = TRUE;
-	folder->can_hold_folders = FALSE;
-	folder->has_summary_capability = TRUE;
-	folder->has_search_capability = TRUE;
-
-	/* FIXME: what to do about user flags if the subfolder doesn't support them? */
-	folder->permanent_flags = CAMEL_MESSAGE_ANSWERED |
-		CAMEL_MESSAGE_DELETED |
-		CAMEL_MESSAGE_DRAFT |
-		CAMEL_MESSAGE_FLAGGED |
-		CAMEL_MESSAGE_SEEN;
-
-	vf->messages = g_ptr_array_new();
-	vf->messages_uid = g_hash_table_new(g_str_hash, g_str_equal);
-
-	vf->expression = g_strdup_printf("(or\n (match-all (user-flag \"%s\"))\n %s\n)", namepart, searchpart);
-	vf->vname = g_strdup(namepart);
-
-	printf("VFolder expression is %s\n", vf->expression);
-	printf("VFolder full name = %s\n", camel_folder_get_full_name(folder));
-
-	g_free(namepart);
-}
-
-static void vee_open (CamelFolder *folder, CamelFolderOpenMode mode, CamelException *ex)
-{
-	CamelVeeFolder *vf = (CamelVeeFolder *)folder;
-
-	camel_vee_folder_parent->open (folder, mode, ex);
-	if (camel_exception_get_id(ex))
-		return;
-
-	/* perform search on folders to be searched ... */
-	vee_folder_build(vf, ex);
-}
-
-static void vee_close (CamelFolder *folder, gboolean expunge, CamelException *ex)
-{
-	camel_vee_folder_parent->close (folder, expunge, ex);
-
-	/* FIXME: close vfolder? */
-}
-
-/* vfolders always exist? */
-static gboolean vee_exists (CamelFolder *folder, CamelException *ex)
-{
-	return TRUE;
-}
-
-static void vee_append_message (CamelFolder *folder, CamelMimeMessage *message, CamelException *ex)
-{
-	CamelVeeFolder *vf = (CamelVeeFolder *)folder;
-
-	if (message->folder && message->folder->permanent_flags & CAMEL_MESSAGE_USER) {
-		/* set the flag on the message ... */
-		camel_mime_message_set_user_flag(message, vf->vname, TRUE);
-	} else {
-		/* FIXME: error code */
-		camel_exception_setv(ex, 1, "Cannot append this message to virtual folder");
-	}
-}
-
-static gint vee_get_message_count (CamelFolder *folder, CamelException *ex)
-{
-	CamelVeeFolder *vf = (CamelVeeFolder *)folder;
-
-	return vf->messages->len;
-}
-
-static CamelMimeMessage *vee_get_message_by_uid (CamelFolder *folder, const gchar *uid, CamelException *ex)
-{
-	CamelVeeMessageInfo *mi;
-
-	mi = (CamelVeeMessageInfo *)vee_summary_get_by_uid(folder, uid);
-	if (mi == NULL) {
-		camel_exception_setv(ex, 1, "Failed");
-		return NULL;
-	}
-	return camel_folder_get_message_by_uid(mi->folder, strchr(mi->info.uid, ':')+1, ex);
-}
-
-GPtrArray *vee_get_summary (CamelFolder *folder, CamelException *ex)
-{
-	CamelVeeFolder *vf = (CamelVeeFolder *)folder;
-
-	return vf->messages;
-}
-
-void vee_free_summary (CamelFolder *folder, GPtrArray *array)
-{
-	/* no op */
-}
-
-static const CamelMessageInfo *vee_summary_get_by_uid(CamelFolder *f, const char *uid)
-{
-	CamelVeeFolder *vf = (CamelVeeFolder *)f;
-
-	return g_hash_table_lookup(vf->messages_uid, uid);
-}
-
-static GPtrArray *vee_get_uids (CamelFolder *folder, CamelException *ex)
-{
-	GPtrArray *result;
-	int i;
-	CamelVeeFolder *vf = (CamelVeeFolder *)folder;
-
-	result = g_ptr_array_new ();
-	g_ptr_array_set_size (result, vf->messages->len);
-	for (i=0;imessages->len;i++) {
-		CamelMessageInfo *mi = g_ptr_array_index(vf->messages, i);
-		result->pdata[i] = g_strdup(mi->uid);
-	}
-
-	return result;
-}
-
-static GList *
-vee_search_by_expression(CamelFolder *folder, const char *expression, CamelException *ex)
-{
-	GList *result = NULL, *node;
-	char *expr;
-	CamelVeeFolder *vf = (CamelVeeFolder *)folder;
-	struct _CamelVeeFolderPrivate *p = _PRIVATE(vf);
-
-	expr = g_strdup_printf("(and %s %s)", vf->expression, expression);
-	node = p->folders;
-	while (node) {
-		CamelFolder *f = node->data;
-		GList *matches, *match;
-		matches = camel_folder_search_by_expression(f, vf->expression, ex);
-		match = matches;
-		while (match) {
-			char *uid = match->data;
-			result = g_list_prepend(result, g_strdup_printf("%p:%s", f, uid));
-			match = g_list_next(match);
-		}
-		g_list_free(matches);
-		node = g_list_next(node);
-	}
-	return result;
-}
-
-/*
-  need incremental update, based on folder.
-  Need to watch folders for changes and update accordingly.
-*/
-
-/* this does most of the vfolder magic */
-static void
-vee_folder_build(CamelVeeFolder *vf, CamelException *ex)
-{
-	struct _CamelVeeFolderPrivate *p = _PRIVATE(vf);
-	GList *node;
-
-	GPtrArray *messages;
-	GHashTable *messages_uid;
-
-	{
-		int i;
-
-		for (i=0;imessages->len;i++) {
-			CamelVeeMessageInfo *mi = g_ptr_array_index(vf->messages, i);
-			g_free(mi->info.subject);
-			g_free(mi->info.to);
-			g_free(mi->info.from);
-			g_free(mi->info.uid);
-			camel_flag_list_free(&mi->info.user_flags);
-			g_free(mi);
-		}
-	}
-
-	messages = g_ptr_array_new();
-	messages_uid = g_hash_table_new(g_str_hash, g_str_equal);
-
-	node = p->folders;
-	while (node) {
-		GList *matches, *match;
-		CamelFolder *f = node->data;
-		CamelVeeMessageInfo *mi;
-		const CamelMessageInfo *info;
-		CamelFlag *flag;
-
-		matches = camel_folder_search_by_expression(f, vf->expression, ex);
-		match = matches;
-		while (match) {
-			info = camel_folder_summary_get_by_uid(f, match->data);
-			if (info) {
-				mi = g_malloc0(sizeof(*mi));
-				mi->info.subject = g_strdup(info->subject);
-				mi->info.to = g_strdup(info->to);
-				mi->info.from = g_strdup(info->from);
-				mi->info.uid = g_strdup_printf("%p:%s", f, info->uid);
-				mi->info.flags = info->flags;
-				mi->info.size = info->size;
-				mi->info.date_sent = info->date_sent;
-				mi->info.date_received = info->date_received;
-				flag = info->user_flags;
-				while (flag) {
-					camel_flag_set(&mi->info.user_flags, flag->name, TRUE);
-					flag = flag->next;
-				}
-				mi->info.content = NULL;
-				mi->folder = f;
-				g_ptr_array_add(messages, mi);
-				g_hash_table_insert(messages_uid, mi->info.uid, mi);
-			}
-			match = g_list_next(match);
-		}
-		g_list_free(matches);
-		node = g_list_next(node);
-	}
-
-	g_ptr_array_free(vf->messages, TRUE);
-	vf->messages = messages;
-	g_hash_table_destroy(vf->messages_uid);
-	vf->messages_uid = messages_uid;
-}
-
-
-/* build query contents for a single folder */
-static void
-vee_folder_build_folder(CamelVeeFolder *vf, CamelFolder *source, CamelException *ex)
-{
-	struct _CamelVeeFolderPrivate *p = _PRIVATE(vf);
-	GList *node;
-
-	GList *matches, *match;
-	CamelFolder *f = source;
-	CamelVeeMessageInfo *mi;
-	const CamelMessageInfo *info;
-	CamelFlag *flag;
-
-	GPtrArray *messages;
-	GHashTable *messages_uid;
-
-	{
-		int i;
-
-		for (i=0;imessages->len;i++) {
-			CamelVeeMessageInfo *mi = g_ptr_array_index(vf->messages, i);
-			if (mi->folder == source) {
-				g_hash_table_remove(vf->messages_uid, mi->info.uid);
-				g_ptr_array_remove_index_fast(vf->messages, i);
-
-				g_free(mi->info.subject);
-				g_free(mi->info.to);
-				g_free(mi->info.from);
-				g_free(mi->info.uid);
-				camel_flag_list_free(&mi->info.user_flags);
-				g_free(mi);
-				i--;
-			}
-		}
-	}
-
-	messages = vf->messages;
-	messages_uid = vf->messages_uid;
-	
-	matches = camel_folder_search_by_expression(f, vf->expression, ex);
-	match = matches;
-	while (match) {
-		info = camel_folder_summary_get_by_uid(f, match->data);
-		if (info) {
-			mi = g_malloc0(sizeof(*mi));
-			mi->info.subject = g_strdup(info->subject);
-			mi->info.to = g_strdup(info->to);
-			mi->info.from = g_strdup(info->from);
-			mi->info.uid = g_strdup_printf("%p:%s", f, info->uid);
-			mi->info.flags = info->flags;
-			mi->info.size = info->size;
-			mi->info.date_sent = info->date_sent;
-			mi->info.date_received = info->date_received;
-			flag = info->user_flags;
-			while (flag) {
-				camel_flag_set(&mi->info.user_flags, flag->name, TRUE);
-				flag = flag->next;
-			}
-			mi->info.content = NULL;
-			mi->folder = f;
-			g_ptr_array_add(messages, mi);
-			g_hash_table_insert(messages_uid, mi->info.uid, mi);
-		}
-		match = g_list_next(match);
-	}
-	g_list_free(matches);
-}
-
-
-/*
-
-  (match-folder "folder1" "folder2")
-
- */
diff --git a/camel/providers/vee/camel-vee-folder.h b/camel/providers/vee/camel-vee-folder.h
deleted file mode 100644
index ea2a82a25b..0000000000
--- a/camel/providers/vee/camel-vee-folder.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- *  Copyright (C) 2000 Helix Code Inc.
- *
- *  Authors: Michael Zucchi 
- *
- *  This program is free software; you can redistribute it and/or 
- *  modify it under the terms of the GNU General Public License as 
- *  published by the Free Software Foundation; either version 2 of the
- *  License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- *  USA
- */
-
-#ifndef _CAMEL_VEE_FOLDER_H
-#define _CAMEL_VEE_FOLDER_H
-
-#include 
-#include 
-
-#define CAMEL_VEE_FOLDER(obj)         GTK_CHECK_CAST (obj, camel_vee_folder_get_type (), CamelVeeFolder)
-#define CAMEL_VEE_FOLDER_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, camel_vee_folder_get_type (), CamelVeeFolderClass)
-#define IS_CAMEL_VEE_FOLDER(obj)      GTK_CHECK_TYPE (obj, camel_vee_folder_get_type ())
-
-typedef struct _CamelVeeFolder      CamelVeeFolder;
-typedef struct _CamelVeeFolderClass CamelVeeFolderClass;
-
-struct _CamelVeeFolder {
-	CamelFolder parent;
-
-	struct _CamelVeeFolderPrivate *priv;
-
-	char *expression;	/* query expression */
-	char *vname;		/* local name */
-	CamelFolder *local;	/* local storage for folder */
-
-	/* FIXME: Move this to a summary object??? */
-	GPtrArray *messages; /* message info's */
-	GHashTable *messages_uid;
-};
-
-struct _CamelVeeFolderClass {
-	CamelFolderClass parent_class;
-};
-
-guint		camel_vee_folder_get_type	(void);
-CamelVeeFolder      *camel_vee_folder_new	(void);
-
-void camel_vee_folder_add_folder(CamelVeeFolder *vf, CamelFolder *sub);
-
-#endif /* ! _CAMEL_VEE_FOLDER_H */
diff --git a/camel/providers/vee/camel-vee-provider.c b/camel/providers/vee/camel-vee-provider.c
deleted file mode 100644
index 3d0063b55c..0000000000
--- a/camel/providers/vee/camel-vee-provider.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- *  Copyright (C) 2000 Helix Code Inc.
- *
- *  Authors: Michael Zucchi 
- *
- *  This program is free software; you can redistribute it and/or 
- *  modify it under the terms of the GNU General Public License as 
- *  published by the Free Software Foundation; either version 2 of the
- *  License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- *  USA
- */
-
-#include "config.h"
-#include "camel-vee-store.h"
-#include "camel-provider.h"
-#include "camel-session.h"
-
-static CamelProvider vee_provider = {
-	"vfolder",
-	"Virtual folder email provider",
-
-	"For reading mail as a query of another set of folders",
-
-	"vfolder",
-
-	0,
-
-	{ 0, 0 }
-};
-
-void
-camel_provider_module_init (CamelSession *session)
-{
-	vee_provider.object_types[CAMEL_PROVIDER_STORE] =
-		camel_vee_store_get_type();
-
-	camel_session_register_provider (session, &vee_provider);
-}
diff --git a/camel/providers/vee/camel-vee-store.c b/camel/providers/vee/camel-vee-store.c
deleted file mode 100644
index b62a6b9fab..0000000000
--- a/camel/providers/vee/camel-vee-store.c
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- *  Copyright (C) 2000 Helix Code Inc.
- *
- *  Authors: Michael Zucchi 
- *
- *  This program is free software; you can redistribute it and/or 
- *  modify it under the terms of the GNU General Public License as 
- *  published by the Free Software Foundation; either version 2 of the
- *  License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- *  USA
- */
-
-#include "camel-vee-store.h"
-#include "camel-vee-folder.h"
-
-static CamelFolder *vee_get_folder (CamelStore *store, const char *folder_name, CamelException *ex);
-static char *vee_get_folder_name (CamelStore *store, const char *folder_name, CamelException *ex);
-
-struct _CamelVeeStorePrivate {
-};
-
-#define _PRIVATE(o) (((CamelVeeStore *)(o))->priv)
-
-static void camel_vee_store_class_init (CamelVeeStoreClass *klass);
-static void camel_vee_store_init       (CamelVeeStore *obj);
-static void camel_vee_store_finalise   (GtkObject *obj);
-
-static CamelStoreClass *camel_vee_store_parent;
-
-enum SIGNALS {
-	LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-guint
-camel_vee_store_get_type (void)
-{
-	static guint type = 0;
-	
-	if (!type) {
-		GtkTypeInfo type_info = {
-			"CamelVeeStore",
-			sizeof (CamelVeeStore),
-			sizeof (CamelVeeStoreClass),
-			(GtkClassInitFunc) camel_vee_store_class_init,
-			(GtkObjectInitFunc) camel_vee_store_init,
-			(GtkArgSetFunc) NULL,
-			(GtkArgGetFunc) NULL
-		};
-		
-		type = gtk_type_unique (camel_store_get_type (), &type_info);
-	}
-	
-	return type;
-}
-
-static void
-
-camel_vee_store_class_init (CamelVeeStoreClass *klass)
-{
-	GtkObjectClass *object_class = (GtkObjectClass *) klass;
-	CamelStoreClass *store_class = (CamelStoreClass *) klass;
-	
-	camel_vee_store_parent = gtk_type_class (camel_store_get_type ());
-
-	/* virtual method overload */
-	store_class->get_folder = vee_get_folder;
-	store_class->get_folder_name = vee_get_folder_name;
-
-	object_class->finalize = camel_vee_store_finalise;
-
-	gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
-}
-
-static void
-camel_vee_store_init (CamelVeeStore *obj)
-{
-	struct _CamelVeeStorePrivate *p;
-
-	p = _PRIVATE(obj) = g_malloc0(sizeof(*p));
-}
-
-static void
-camel_vee_store_finalise (GtkObject *obj)
-{
-	((GtkObjectClass *)(camel_vee_store_parent))->finalize((GtkObject *)obj);
-}
-
-/**
- * camel_vee_store_new:
- *
- * Create a new CamelVeeStore object.
- * 
- * Return value: A new CamelVeeStore widget.
- **/
-CamelVeeStore *
-camel_vee_store_new (void)
-{
-	CamelVeeStore *new = CAMEL_VEE_STORE ( gtk_type_new (camel_vee_store_get_type ()));
-	return new;
-}
-
-static CamelFolder *
-vee_get_folder (CamelStore *store, const char *folder_name, CamelException *ex)
-{
-	CamelFolder *folder;
-
-	folder =  gtk_type_new (camel_vee_folder_get_type());
-
-	printf("my type is: %s\n", gtk_type_name(((GtkObject *)folder)->klass->type));
-
-	((CamelFolderClass *)((GtkObject *)folder)->klass)->init (folder, store, NULL, folder_name, '/', ex);
-	return folder;
-}
-
-static char *
-vee_get_folder_name (CamelStore *store, const char *folder_name, CamelException *ex)
-{
-#warning "What purpose does this function serve?"
-	return g_strdup(folder_name);
-}
-
diff --git a/camel/providers/vee/camel-vee-store.h b/camel/providers/vee/camel-vee-store.h
deleted file mode 100644
index 848769296a..0000000000
--- a/camel/providers/vee/camel-vee-store.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- *  Copyright (C) 2000 Helix Code Inc.
- *
- *  Authors: Michael Zucchi 
- *
- *  This program is free software; you can redistribute it and/or 
- *  modify it under the terms of the GNU General Public License as 
- *  published by the Free Software Foundation; either version 2 of the
- *  License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- *  USA
- */
-
-#ifndef _CAMEL_VEE_STORE_H
-#define _CAMEL_VEE_STORE_H
-
-#include 
-#include 
-
-#define CAMEL_VEE_STORE(obj)         GTK_CHECK_CAST (obj, camel_vee_store_get_type (), CamelVeeStore)
-#define CAMEL_VEE_STORE_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, camel_vee_store_get_type (), CamelVeeStoreClass)
-#define IS_CAMEL_VEE_STORE(obj)      GTK_CHECK_TYPE (obj, camel_vee_store_get_type ())
-
-typedef struct _CamelVeeStore      CamelVeeStore;
-typedef struct _CamelVeeStoreClass CamelVeeStoreClass;
-
-struct _CamelVeeStore {
-	CamelStore parent;
-
-	struct _CamelVeeStorePrivate *priv;
-};
-
-struct _CamelVeeStoreClass {
-	CamelStoreClass parent_class;
-};
-
-guint		camel_vee_store_get_type	(void);
-CamelVeeStore      *camel_vee_store_new	(void);
-
-#endif /* ! _CAMEL_VEE_STORE_H */
diff --git a/camel/providers/vee/libcamelvee.urls b/camel/providers/vee/libcamelvee.urls
deleted file mode 100644
index 6fa58dadb5..0000000000
--- a/camel/providers/vee/libcamelvee.urls
+++ /dev/null
@@ -1 +0,0 @@
-vfolder
diff --git a/camel/string-utils.c b/camel/string-utils.c
deleted file mode 100644
index 42fb93538a..0000000000
--- a/camel/string-utils.c
+++ /dev/null
@@ -1,185 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* string-util : utilities for gchar* strings  */
-
-/* 
- *
- * Author : 
- *  Bertrand Guiheneuf 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#include 
-#include "string-utils.h"
-#include "string.h"
-
-gboolean
-string_equal_for_glist (gconstpointer v, gconstpointer v2)
-{
-  return (!strcmp ( ((const gchar *)v), ((const gchar*)v2))) == 0;
-}
-
-/* utility func : frees a gchar element in a GList */
-static void 
-__string_list_free_string (gpointer data, gpointer user_data)
-{
-	gchar *string = (gchar *)data;
-	g_free (string);
-}
-
-void 
-string_list_free (GList *string_list)
-{
-	if (string_list == NULL) return; 
-
-	g_list_foreach (string_list, __string_list_free_string, NULL);
-	g_list_free (string_list);
-}
-
-
-
-
-
-
-GList *
-string_split (const gchar *string, char sep, const gchar *trim_chars, StringTrimOption trim_options)
-{
-	GList *result = NULL;
-	gint first, last, pos;
-	gchar *new_string;
-
-	g_assert (string);
-	
-	first = 0;
-	last = strlen(string) - 1;
-	
-	/* strip leading and trailing separators */
-	while ( (first<=last) && (string[first]==sep) )
-		first++;
-	while ( (first<=last) && (string[last]==sep) )
-		last--;
-
-	
-	while (first<=last)  {
-		pos = first;
-		/* find next separator */
-		while ((pos<=last) && (string[pos]!=sep)) pos++;
-		if (first != pos) {
-			new_string = g_strndup (string+first, pos-first);
-			/* could do trimming in line to speed up this code */
-			if (trim_chars) string_trim (new_string, trim_chars, trim_options);
-			result = g_list_append (result, new_string);
-		}	
-		first = pos + 1;
-	}
-
-	return result;
-}
-
-
-void 
-string_trim (gchar *string, const gchar *trim_chars, StringTrimOption options)
-{
-	gint first_ok;
-	gint last_ok;
-	guint length;
-
-	g_return_if_fail (string);
-	length = strlen (string);
-	if (length==0)
-		return;
-	
-	first_ok = 0;
-	last_ok = length - 1;
-
-	if (options & STRING_TRIM_STRIP_LEADING)
-		while  ( (first_ok <= last_ok) && (strchr (trim_chars, string[first_ok])!=NULL) )
-			first_ok++;
-	
-	if (options & STRING_TRIM_STRIP_TRAILING)
-		while  ( (first_ok <= last_ok) && (strchr (trim_chars, string[last_ok])!=NULL) )
-			last_ok--;
-	
-	if (first_ok > 0)
-		memmove (string, string+first_ok, last_ok - first_ok + 1);
-	string[last_ok - first_ok +1] = '\0';
-	
-}
-
-
-
-
-
-/**
- * remove_suffix: remove a suffix from a string
- * @s: the string to remove the suffix from. 
- * @suffix: the suffix to remove
- * @suffix_found : suffix found flag
- *
- * Remove a suffix from a string. If the 
- * string ends with the full suffix, a copy 
- * of the string without the suffix is returned and
- * @suffix_found is set to %TRUE. 
- * Otherwise, NULL is returned and
- * @suffix_found is set to %FALSE. 
- * 
- * Return value: an allocated copy of the string without the suffix or NULL if the suffix was not found.
- **/
-gchar *
-string_prefix (const gchar *s, const gchar *suffix, gboolean *suffix_found)
-{
-	guint s_len, suf_len;
-	guint suffix_pos;
-	char *result_string;
-
-	g_assert (s);
-	g_assert (suffix);
-	g_assert (suffix_found);
-
-	s_len = strlen (s);
-	suf_len = strlen (suffix);
-
-	/* if the string is shorter than the suffix, do nothing */
-	if (s_len < suf_len) {
-		*suffix_found = FALSE;
-		return NULL;
-	}
-	
-	/* theoretical position of the prefix */
-	suffix_pos = s_len - suf_len;
-
-	/* compare the right hand side of the string with the suffix */
-	if (!strncmp (s+suffix_pos, suffix, suf_len)) {
-
-		/* if the suffix matches, check that there are 
-		   characters before */
-		if (suffix_pos == 0) {
-			result_string = NULL;
-			*suffix_found = TRUE;
-		} else { 
-			result_string = g_strndup (s, suffix_pos);
-			*suffix_found = TRUE;
-		}
-
-	} else { 
-		result_string = NULL;
-		*suffix_found = FALSE;
-	}
-
-	return result_string;
-}
diff --git a/camel/string-utils.h b/camel/string-utils.h
deleted file mode 100644
index 665aafc01e..0000000000
--- a/camel/string-utils.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* string-util : utilities for normal gchar * strings  */
-
-/* 
- *
- * Author : 
- *  Bertrand Guiheneuf 
- *
- * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-
-#ifndef STRING_UTIL_H
-#define STRING_UTIL_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include 
-
-typedef enum {
-	STRING_TRIM_NONE            =     0,
-	STRING_TRIM_STRIP_TRAILING  =     1,
-	STRING_TRIM_STRIP_LEADING   =     2
-} StringTrimOption;
-
-
-
-gboolean string_equal_for_glist (gconstpointer v, gconstpointer v2);
-
-void     string_list_free       (GList *string_list);
-
-GList   *string_split           (const gchar *string, char sep,
-				 const gchar *trim_chars, StringTrimOption trim_options);
-void     string_trim            (gchar *string, const gchar *chars,
-				 StringTrimOption options);
-
-gchar   *string_prefix (const gchar *s, const gchar *suffix, gboolean *suffix_found);
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* STRING_UTIL_H */
diff --git a/composer/.cvsignore b/composer/.cvsignore
deleted file mode 100644
index bca1932d07..0000000000
--- a/composer/.cvsignore
+++ /dev/null
@@ -1,7 +0,0 @@
-.deps
-.libs
-evolution-msg-composer
-Makefile
-Makefile.in
-*.lo
-*.la
diff --git a/composer/ChangeLog b/composer/ChangeLog
deleted file mode 100644
index 55b5871178..0000000000
--- a/composer/ChangeLog
+++ /dev/null
@@ -1,225 +0,0 @@
-2000-05-28  Dan Winship  
-
-	* e-msg-composer.c: #include 
-
-2000-05-26  Dan Winship  
-
-	* e-msg-composer.c (get_editor_text, set_editor_text): Update for
-	PersistStream changes
-	(build_message): Update for CamelMultipart changes.
-
-	* e-msg-composer.c (get_signature): routine to read the user's
-	signature file.
-	(set_editor_text): If the user has configured a signature, append
-	it to the set text.
-	(e_msg_composer_new): Call set_editor_text with "" to load the
-	signature (if any).
-	
-2000-05-25  Not Zed  
-
-	* e-msg-composer.c (build_message): Use camel_data_wrapper_new
-	instead of camel_simple_data_wrapper_new.
-
-2000-05-17  Dan Winship  
-
-	* e-msg-composer.c (build_message): Use
-	camel_simple_data_wrapper_new rather than camel_data_wrapper_new.
-
-2000-05-13  Valek Filippov  
-
-	* e-msg-composer-attachment.glade: save translatable strings
-	* e-msg-composer-attachment.glade.h: file with strings
-	* e-msg-composer-address-dialog.glade: save translatable strings
-	* e-msg-composer-address-dialog.glade.h: file with strings
-
-2000-05-12  Dan Winship  
-
-	* e-msg-composer.c (get_editor_text): NUL-terminate the data
-	extracted from the BonoboStream.
-
-2000-05-10  Dan Winship  
-
-	* e-msg-composer-attachment-bar.c (attach_to_multipart): deal with
-	Content-Transfer-Encoding a little bit at least.
-
-2000-05-07  Mathieu Lacage 
-
-	* e-msg-composer.c (create_editor): remove FIXME and hardcoded 
-	string. You can write mails with OAF now.
-	
-2000-05-07  Dan Winship  
-
-	* e-msg-composer.c (build_message): unref content, etc. after
-	attaching it to message.
-
-	* e-msg-composer-attachment-bar.c (attach_to_multipart): unref
-	part after attaching it.
-
-2000-05-06  Christopher James Lahey  
-
-	* e-msg-composer-hdrs.c: Turned off focus in the To, Cc, and Bcc
-	buttons.
-
-2000-05-02  Matt Loper  
-
-	* Makefile.am: set G_LOG_DOMAIN.
-
-2000-04-28  Dan Winship  
-
-	* e-msg-composer-hdrs.c (set_recipients): Update (minimally) for
-	Camel recipient changes.
-
-2000-04-27  Dan Winship  
-
-	* e-msg-composer.c (e_msg_composer_new_from_url): New routine, to
-	process mailto URLs.
-
-2000-04-26  Dan Winship  
-
-	* e-msg-composer.c (build_message): Only generate a multipart
-	message if there are attachments. Otherwise generate a single
-	part.
-
-	* Update for CamelMimeBodyPart -> CamelMimePart
-
-2000-04-26  Dan Winship  
-
-	* e-msg-composer-attachment-bar.c (attach_to_multipart): add a
-	s/SIMPLE_// that notzed missed. Update to use
-	camel_mime_part_set_content.
-	* e-msg-composer.c (build_message): remove a now-unused variable.
-	Update for camel_mime_part_set_content.
-
-2000-04-26  NotZed  
-
-	* e-msg-composer.c (build_message): Use camel_mime_part_set_text()
-	to set the text rather than messing with data wrappers.
-
-	* e-msg-composer-attachment-bar.c (attach_to_multipart): Change
-	for new camel-stream interfaces.
-	(attach_to_multipart): Also set base64 encoding by default.
-
-2000-04-25  Radek Doulik  
-
-	* e-msg-composer.c (create_editor): use uih here
-	(e_msg_composer_construct): create menubar/toolbar before creating
-	editor control
-
-2000-04-23  Dan Winship  
-
-	* Makefile.am: build libcomposer static and don't install it.
-
-	* e-msg-composer-attachment-bar.c (attach_to_multipart): This was
-	only half-implemented. Finish it, mostly.
-
-2000-04-22  Dan Winship  
-
-	* e-msg-composer.c (e_msg_composer_add_header): new function to
-	make the composer record additional headers it should output.
-	(In-Reply-To), etc.
-	(build_message): output them
-
-2000-04-21  Dan Winship  
-
-	* e-msg-composer.c (e_msg_composer_set_headers): 
-	(e_msg_composer_set_body_text): new functions
-	(exit_cb): Connect "Exit" menu item finally.
-
-	* e-msg-composer-hdrs.c: const poisoning
-	(e_msg_composer_hdrs_set_subject): 
-	(e_msg_composer_hdrs_get_subject): new functions
-
-	* e-msg-composer-address-entry.c: const poisoning
-
-2000-04-20  Dan Winship  
-
-	* e-msg-composer.c (get_editor_text, set_editor_text): new
-	functions to get and set the contents of the HTML editor via
-	Bonobo::PersistStream.
-	(build_message): use get_editor_text. This works again.
-
-2000-04-17  Dan Winship  
-
-	* e-msg-composer.c (build_message): Change
-	camel_mime_message_new_with_session to camel_mime_message_new
-
-2000-03-17  bertrand  
-
-	* e-msg-composer.c (create_menubar): Pass the composer as the data
-	for the menubar callbacks.
-
-2000-03-12  Matt Loper  
-
-	* Makefile.am: Modified to make the composer into a library, to be
-	used by the mail component.
-
-2000-03-07  Ettore Perazzoli  
-
-	* e-msg-composer.c (create_toolbar): Pass the composer as the data
-	for the toolbar callbacks.
-	(e_msg_composer_construct): Connect the "changed" signal of the
-	attachment bar to `attachment_bar_changed()'.
-	(attachment_bar_changed): Renamed to `attachment_bar_changed_cb'.
-
-2000-03-02  Ettore Perazzoli  
-
-	* e-msg-composer.c (e_msg_composer_new): Precondition:
-	gtk_main_level() greater than zero.
-	(e_msg_composer_construct): Likewise.
-	(create_menus): New function.  Set up menus through
-	BonoboUIHandler.
-	(e_msg_composer_construct): Use it.
-
-	* main.c (main): Initialize Bonobo.
-
-	* e-msg-composer.c (init): Initialize `uih' and `editor' to NULL.
-	Do not init `text' and `text_scrolled_window' anymore.
-	(destroy): Unref `uih'.
-	(e_msg_composer_construct): Create a new BonoboUIHandler and put
-	it into `uih'.
-	(create_editor): New helper function.
-	(e_msg_composer_construct): Use it to set up the editor.
-
-	* e-msg-composer.h: New member `uih' in `EMsgComposer'.  Removed
-	members `text', `text_scrolled_window'.  New member `editor'.
-
-	* Makefile.am (INCLUDES): Add `$(BONOBO_GNOME_CFLAGS)'.
-	(evolution_msg_composer_LDADD): Add `$(BONOBO_GNOME_LIBS)'.
-
-	* e-msg-composer.c (glade_connect): Removed.
-	(setup_signals): Removed.
-	(e_msg_composer_construct): Do not use libglade to set the toolbar
-	and menubar up.
-	(destroy): Removed libglade stuff.
-	(init): Likewise.
-
-	* e-msg-composer.h: Removed `menubar_gui', `toolbar_gui',
-	`appbar_gui'.
-
-	* e-msg-composer.glade: Removed.
-
-2000-01-12  bertrand  
-
-	* Makefile.am (evolution_msg_composer_LDADD): 
-	use $(EXTRA_GNOME_LIBS_THREADS) to link with gthread
-
-1999-11-17  Ettore Perazzoli  
-
-	* Makefile.am: New Makefile to compile the message composer
-	executable.
-
-	* main.c: New file.
-
-	* e-msg-composer-hdrs.c (e_msg_composer_hdrs_to_message): Use
-	`CAMEL_RECIPIENT*' macros instead of the old `RECIPIENT*' ones
-	that do not exist anymore.
-
-	* e-msg-composer-address-dialog.c
-	(e_msg_composer_address_dialog_construct): Use `E_GLADEDIR'
-	instead of `E_GUIDIR'.
-	* e-msg-composer-attachment.c (e_msg_composer_attachment_edit):
-	Likewise.
-	* e-msg-composer.c (e_msg_composer_construct): Likewise.
-
-(See `$(top_srcdir)/widgets/ChangeLog' for previous changes to the
-message composer.)
diff --git a/composer/Makefile.am b/composer/Makefile.am
deleted file mode 100644
index eda4c74696..0000000000
--- a/composer/Makefile.am
+++ /dev/null
@@ -1,56 +0,0 @@
-gladedir = $(datadir)/evolution/glade
-
-glade_DATA =					\
-	e-msg-composer-address-dialog.glade	\
-	e-msg-composer-address-dialog.glade.h	\
-	e-msg-composer-attachment.glade		\
-	e-msg-composer-attachment.glade.h
-
-libcomposerincludedir = $(includedir)/composer
-
-noinst_LTLIBRARIES = libcomposer.la
-libcomposer_la_LDFLAGS = -static
-
-INCLUDES =					\
-	-I$(top_srcdir)				\
-	-I$(top_builddir)			\
-	-I$(top_srcdir)/camel			\
-	-I$(top_builddir)/camel			\
-	$(GNOME_INCLUDEDIR)			\
-	$(BONOBO_GNOME_CFLAGS)			\
-	-DG_LOG_DOMAIN=\"composer\"
-
-CPPFLAGS =					\
-	-DE_GLADEDIR=\"$(gladedir)\"
-
-libcomposer_la_SOURCES = 			\
-	e-msg-composer-address-dialog.c		\
-	e-msg-composer-address-entry.c		\
-	e-msg-composer-attachment-bar.c		\
-	e-msg-composer-attachment.c		\
-	e-msg-composer-hdrs.c			\
-	e-msg-composer.c			
-
-libcomposerinclude_HEADERS = 			\
-	e-msg-composer-address-dialog.h		\
-	e-msg-composer-address-entry.h		\
-	e-msg-composer-attachment-bar.h		\
-	e-msg-composer-attachment.h		\
-	e-msg-composer-hdrs.h			\
-	e-msg-composer.h			
-
-## libcomposer_LDADD =	 			\
-	$(top_builddir)/camel/libcamel.la	\
-	$(BONOBO_GNOME_LIBS)			\
-	$(GNOME_LIBDIR)				\
-	$(GNOMEUI_LIBS)				\
-	$(INTLLIBS)				\
-	$(PTHREAD_LIB)				\
-	$(EXTRA_GNOME_LIBS)
-
-
-EXTRA_DIST =					\
-	$(glade_DATA)				\
-	ChangeLog
-
-
diff --git a/composer/e-msg-composer-address-dialog.c b/composer/e-msg-composer-address-dialog.c
deleted file mode 100644
index 42a594756d..0000000000
--- a/composer/e-msg-composer-address-dialog.c
+++ /dev/null
@@ -1,660 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-msg-composer-address-dialog.c
- *
- * Copyright (C) 1999  Helix Code, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * 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., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Author: Ettore Perazzoli
- */
-
-#include 
-#include "e-msg-composer-address-dialog.h"
-
-
-enum {
-	APPLY,
-	LAST_SIGNAL
-};
-static guint signals[LAST_SIGNAL] = { 0 };
-
-static GnomeDialogClass *parent_class = NULL;
-
-
-/* This function should load the addresses we know of into the dialog.  We
-   don't have a precise setup for the addressbook yet, so we will just put some
-   fake entries in.  */
-static void
-load_addresses (EMsgComposerAddressDialog *dialog)
-{
-	gchar *text[][3] = {
-		{ "Bertrand Guiheneuf", "Bertrand.Guiheneuf@aful.org", NULL },
-		{ "Ettore Perazzoli", "ettore@gnu.org", NULL },
-		{ "Miguel de Icaza", "miguel@gnu.org", NULL },
-		{ "Nat Friedman", "nat@nat.org", NULL },
-		{ NULL, NULL, NULL }
-	};
-	GtkCList *clist;
-	guint i;
-
-	clist = GTK_CLIST (glade_xml_get_widget (dialog->gui, "address_clist"));
-
-	for (i = 0; text[i][0] != NULL; i++)
-		gtk_clist_append (clist, text[i]);
-}
-
-/* Combine name and email into an address, e.g. "Ettore Perazzoli
-   ".  FIXME FIXME FIXME this does not handle quoting (commas
-   will cause troubles), but it should.  */
-static gchar *
-make_full_address (const gchar *name,
-		   const gchar *email)
-{
-	return g_strconcat (name, " <", email, ">", NULL);
-}
-
-/* This loads the selected address in the address GtkCList into the requested
-   GtkList.  */
-static void
-add_address (EMsgComposerAddressDialog *dialog,
-	     const gchar *list_name)
-{
-	GtkCList *src_clist;
-	GtkCList *dest_clist;
-	gchar *name, *email;
-	gchar *text[2];
-	guint row;
-
-	src_clist = GTK_CLIST (glade_xml_get_widget (dialog->gui,
-						     "address_clist"));
-	if (src_clist->selection == NULL)
-		return;
-
-	dest_clist = GTK_CLIST (glade_xml_get_widget (dialog->gui, list_name));
-	row = GPOINTER_TO_INT (src_clist->selection->data);
-
-	gtk_clist_get_text (src_clist, row, 0, &name);
-	gtk_clist_get_text (src_clist, row, 1, &email);
-
-	text[0] = make_full_address (name, email);
-	text[1] = NULL;
-
-	gtk_clist_append (dest_clist, text);
-
-	g_free (text[0]);
-}
-
-static void
-apply (EMsgComposerAddressDialog *dialog)
-{
-	gtk_signal_emit (GTK_OBJECT (dialog), signals[APPLY]);
-}
-
-
-/* Recipient list popup menu.  */
-
-struct _RecipientListInfo {
-	EMsgComposerAddressDialog *dialog;
-	GtkCList *clist;
-	gint row;		/* -1 if menu was popped up in an empty
-				   area.  */
-};
-typedef struct _RecipientListInfo RecipientListInfo;
-
-static void
-copy_recipient (RecipientListInfo *info,
-		gboolean remove)
-{
-	gchar *text;
-	gint row;
-
-	if (info->clist->selection == NULL)
-		return;
-
-	row = GPOINTER_TO_INT (info->clist->selection->data);
-	gtk_clist_get_text (info->clist, row, 0, &text);
-
-	g_free (info->dialog->cut_buffer);
-	info->dialog->cut_buffer = g_strdup (text);
-
-	if (remove)
-		gtk_clist_remove (info->clist, row);
-
-	gtk_selection_owner_set (GTK_WIDGET (info->clist),
-				 GDK_SELECTION_PRIMARY,
-				 GDK_CURRENT_TIME);
-}
-
-static void
-copy_recipient_cb (GtkWidget *widget,
-		   gpointer data)
-{
-	RecipientListInfo *info;
-
-	info = (RecipientListInfo *) data;
-	copy_recipient (info, FALSE);
-	g_free (info);
-}
-
-static void
-cut_recipient_cb (GtkWidget *widget,
-		  gpointer data)
-{
-	RecipientListInfo *info;
-
-	info = (RecipientListInfo *) data;
-	copy_recipient (info, TRUE);
-	g_free (info);
-}
-
-static void
-paste_recipient_cb (GtkWidget *widget,
-		    gpointer data)
-{
-	RecipientListInfo *info;
-	GdkAtom atom;
-	gchar *text[2];
-
-	info = (RecipientListInfo *) data;
-
-	atom = gdk_atom_intern ("STRING", FALSE);
-	gtk_selection_convert (GTK_WIDGET (info->clist),
-			       GDK_SELECTION_PRIMARY,
-			       atom,
-			       GDK_CURRENT_TIME);
-
-	g_free (info);
-}
-
-static GnomeUIInfo recipient_list_item_popup_info[] = {
-	GNOMEUIINFO_ITEM_STOCK (N_("Cut"),
-				N_("Cut selected item into clipboard"),
-				cut_recipient_cb,
-				GNOME_STOCK_MENU_CUT),
-	GNOMEUIINFO_ITEM_STOCK (N_("Copy"),
-				N_("Copy selected item into clipboard"),
-				copy_recipient_cb,
-				GNOME_STOCK_MENU_COPY),
-	GNOMEUIINFO_ITEM_STOCK (N_("Paste"),
-				N_("Paste item from clipboard"),
-				paste_recipient_cb,
-				GNOME_STOCK_MENU_PASTE),
-	GNOMEUIINFO_END
-};
-
-static GnomeUIInfo recipient_list_popup_info[] = {
-	GNOMEUIINFO_ITEM_STOCK (N_("Paste"),
-				N_("Paste item from clipboard"),
-				paste_recipient_cb,
-				GNOME_STOCK_MENU_PASTE),
-	GNOMEUIINFO_END
-};
-
-
-/* Signals.  */
-
-static void
-add_to_cb (GtkWidget *widget,
-	   gpointer data)
-{
-	add_address (E_MSG_COMPOSER_ADDRESS_DIALOG (data), "to_clist");
-}
-
-static void
-add_cc_cb (GtkWidget *widget,
-	   gpointer data)
-{
-	add_address (E_MSG_COMPOSER_ADDRESS_DIALOG (data), "cc_clist");
-}
-
-static void
-add_bcc_cb (GtkWidget *widget,
-	   gpointer data)
-{
-	add_address (E_MSG_COMPOSER_ADDRESS_DIALOG (data), "bcc_clist");
-}
-
-static void
-glade_connect (GladeXML *gui,
-	       const gchar *widget_name,
-	       const gchar *signal_name,
-	       GtkSignalFunc callback,
-	       gpointer callback_data)
-{
-	GtkWidget *widget;
-
-	widget = glade_xml_get_widget (gui, widget_name);
-	if (widget == NULL)
-		g_warning ("Widget `%s' was not found.", widget_name);
-	else
-		gtk_signal_connect (GTK_OBJECT (widget), signal_name,
-				    GTK_SIGNAL_FUNC (callback), callback_data);
-}
-
-static gint
-recipient_clist_button_press_cb (GtkWidget *widget,
-				 GdkEventButton *event,
-				 gpointer data)
-{
-	EMsgComposerAddressDialog *dialog;
-	RecipientListInfo *info;
-	GtkWidget *popup;
-	GtkCList *clist;
-	gboolean on_row;
-	gint row, column;
-
-	dialog = E_MSG_COMPOSER_ADDRESS_DIALOG (data);
-
-	clist = GTK_CLIST (widget);
-
-	if (event->window != clist->clist_window || event->button != 3)
-		return FALSE;
-
-	on_row = gtk_clist_get_selection_info (clist, event->x, event->y,
-					       &row, &column);
-
-	info = g_new (RecipientListInfo, 1);
-	info->dialog = dialog;
-	info->clist = clist;
-
-	if (on_row) {
-		gtk_clist_unselect_all (clist);
-		gtk_clist_select_row (clist, row, 0);
-		info->row = row;
-		popup = gnome_popup_menu_new (recipient_list_item_popup_info);
-	} else {
-		info->row = -1;
-		popup = gnome_popup_menu_new (recipient_list_popup_info);
-	}
-
-	gnome_popup_menu_do_popup_modal (popup, NULL, NULL, event, info);
-
-	gtk_widget_destroy (popup);
-
-	return TRUE;
-}
-
-/* FIXME needs more work.  */
-static void
-recipient_clist_selection_received_cb (GtkWidget *widget,
-				       GtkSelectionData *selection_data,
-				       guint time,
-				       gpointer data)
-{
-	GtkCList *clist;
-	gchar *text[2];
-	gchar *p;
-
-	puts (__FUNCTION__);
-
-	if (selection_data->length < 0)
-		return;
-
-	clist = GTK_CLIST (widget);
-
-	/* FIXME quoting.  */
-	text[0] = g_strdup (selection_data->data);
-	text[1] = NULL;
-
-	/* It is a common mistake to paste `\n's, let's work around that.  */
-	for (p = text[0]; *p != '\0'; p++) {
-		if (*p == '\n') {
-			*p = '\0';
-			break;
-		}
-	}
-
-	if (clist->selection != NULL) {
-		gint row;
-
-		row = GPOINTER_TO_INT (clist->selection->data);
-		gtk_clist_insert (clist, row, text);
-	} else {
-		gtk_clist_append (clist, text);
-	}
-
-	g_free (text[0]);
-}
-
-static void
-recipient_clist_selection_get_cb (GtkWidget *widget, 
-				  GtkSelectionData *selection_data,
-				  guint info,
-				  guint time,
-				  gpointer data)
-{
-	EMsgComposerAddressDialog *dialog;
-	GdkAtom atom;
-
-	puts (__FUNCTION__);
-
-	dialog = E_MSG_COMPOSER_ADDRESS_DIALOG (data);
-	if (dialog->cut_buffer == NULL)
-		return;		/* FIXME should I do something special?  */
-
-	atom = gdk_atom_intern ("STRING", FALSE);
-	gtk_selection_data_set (selection_data, atom, 8,
-				dialog->cut_buffer,
-				strlen (dialog->cut_buffer));
-}
-
-static void
-recipient_clist_selection_clear_event_cb (GtkWidget *widget,
-					  GdkEventSelection *selection,
-					  gpointer data)
-{
-	EMsgComposerAddressDialog *dialog;
-
-	dialog = E_MSG_COMPOSER_ADDRESS_DIALOG (data);
-	g_free (dialog->cut_buffer);
-	dialog->cut_buffer = NULL;
-}
-
-static void
-setup_recipient_list_signals (EMsgComposerAddressDialog *dialog,
-			      const gchar *name)
-{
-	glade_connect (dialog->gui, name, "button_press_event",
-		       GTK_SIGNAL_FUNC (recipient_clist_button_press_cb),
-		       dialog);
-	glade_connect (dialog->gui, name, "selection_received",
-		       GTK_SIGNAL_FUNC (recipient_clist_selection_received_cb),
-		       dialog);
-	glade_connect (dialog->gui, name, "selection_get",
-		       GTK_SIGNAL_FUNC (recipient_clist_selection_get_cb),
-		       dialog);
-	glade_connect (dialog->gui, name, "selection_clear_event",
-		       GTK_SIGNAL_FUNC (recipient_clist_selection_clear_event_cb),
-		       dialog);
-}
-
-static void
-setup_signals (EMsgComposerAddressDialog *dialog)
-{
-	glade_connect (dialog->gui, "to_add_button", "clicked",
-		       GTK_SIGNAL_FUNC (add_to_cb), dialog);
-	glade_connect (dialog->gui, "cc_add_button", "clicked",
-		       GTK_SIGNAL_FUNC (add_cc_cb), dialog);
-	glade_connect (dialog->gui, "bcc_add_button", "clicked",
-		       GTK_SIGNAL_FUNC (add_bcc_cb), dialog);
-
-	setup_recipient_list_signals (dialog, "to_clist");
-	setup_recipient_list_signals (dialog, "cc_clist");
-	setup_recipient_list_signals (dialog, "bcc_clist");
-}
-
-
-static void
-setup_selection_targets (EMsgComposerAddressDialog *dialog)
-{
-	gtk_selection_add_target (glade_xml_get_widget (dialog->gui, "to_clist"),
-				  GDK_SELECTION_PRIMARY,
-				  GDK_SELECTION_TYPE_STRING, 0);
-	gtk_selection_add_target (glade_xml_get_widget (dialog->gui, "cc_clist"),
-				  GDK_SELECTION_PRIMARY,
-				  GDK_SELECTION_TYPE_STRING, 0);
-	gtk_selection_add_target (glade_xml_get_widget (dialog->gui, "bcc_clist"),
-				  GDK_SELECTION_PRIMARY,
-				  GDK_SELECTION_TYPE_STRING, 0);
-}
-
-
-/* GnomeDialog methods.  */
-
-static void
-clicked (GnomeDialog *dialog,
-	 gint button_number)
-{
-	switch (button_number) {
-	case 0:			/* OK */
-		apply (E_MSG_COMPOSER_ADDRESS_DIALOG (dialog));
-		gnome_dialog_close (dialog);
-		break;
-	case 1:			/* Apply */
-		apply (E_MSG_COMPOSER_ADDRESS_DIALOG (dialog));
-		break;
-	case 2:			/* Cancel */
-		gnome_dialog_close (dialog);
-		break;
-	}
-}
-
-
-/* GtkObject methods.  */
-
-static void
-destroy (GtkObject *object)
-{
-	EMsgComposerAddressDialog *dialog;
-	GtkCList *address_clist;
-	GList *p;
-
-	dialog = E_MSG_COMPOSER_ADDRESS_DIALOG (object);
-
-	gtk_object_unref (GTK_OBJECT (dialog->gui));
-	g_free (dialog->cut_buffer);
-
-	if (GTK_OBJECT_CLASS (parent_class)->destroy != NULL)
-		(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-
-/* Initialization.  */
-
-static void
-class_init (EMsgComposerAddressDialogClass *class)
-{
-	GtkObjectClass *object_class;
-	GnomeDialogClass *gnome_dialog_class;
-
-	object_class = GTK_OBJECT_CLASS (class);
-	object_class->destroy = destroy;
-
-	gnome_dialog_class = GNOME_DIALOG_CLASS (class);
-	gnome_dialog_class->clicked = clicked;
-
-	parent_class = gtk_type_class (gnome_dialog_get_type ());
-
-	signals[APPLY]
-		= gtk_signal_new ("apply",
-				  GTK_RUN_FIRST,
-				  object_class->type,
-				  GTK_SIGNAL_OFFSET (EMsgComposerAddressDialogClass,
-						     apply),
-				  gtk_marshal_NONE__NONE,
-				  GTK_TYPE_NONE, 0);
-
-	gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
-}
-
-static void
-init (EMsgComposerAddressDialog *dialog)
-{
-	dialog->gui = NULL;
-	dialog->cut_buffer = NULL;
-}
-
-
-GtkType
-e_msg_composer_address_dialog_get_type (void)
-{
-	static GtkType type = 0;
-
-	if (type == 0) {
-		static const GtkTypeInfo info = {
-			"EMsgComposerAddressDialog",
-			sizeof (EMsgComposerAddressDialog),
-			sizeof (EMsgComposerAddressDialogClass),
-			(GtkClassInitFunc) class_init,
-			(GtkObjectInitFunc) init,
-			/* reserved_1 */ NULL,
-			/* reserved_2 */ NULL,
-			(GtkClassInitFunc) NULL,
-		};
-
-		type = gtk_type_unique (gnome_dialog_get_type (), &info);
-	}
-
-	return type;
-}
-
-void
-e_msg_composer_address_dialog_construct (EMsgComposerAddressDialog *dialog)
-{
-	static const gchar *buttons[] = {
-		GNOME_STOCK_BUTTON_OK,
-		GNOME_STOCK_BUTTON_APPLY,
-		GNOME_STOCK_BUTTON_CANCEL,
-		NULL
-	};
-
-	g_return_if_fail (dialog != NULL);
-	g_return_if_fail (E_IS_MSG_COMPOSER_ADDRESS_DIALOG (dialog));
-
-	gnome_dialog_constructv (GNOME_DIALOG (dialog),
-				 _("Select recipients' addresses"),
-				 buttons);
-
-	dialog->gui = glade_xml_new
-		(E_GLADEDIR "/e-msg-composer-address-dialog.glade",
-		 "main_table");
-	if (dialog->gui == NULL) {
-		g_warning ("Cannot load `e-msg-composer-address-dialog.glade");
-		return;
-	}
-
-	gtk_container_add (GTK_CONTAINER (GNOME_DIALOG (dialog)->vbox),
-			   glade_xml_get_widget (dialog->gui, "main_table"));
-
-	setup_selection_targets (dialog);
-	load_addresses (dialog);
-	setup_signals (dialog);
-}
-
-GtkWidget *
-e_msg_composer_address_dialog_new (void)
-{
-	EMsgComposerAddressDialog *new;
-
-	new = gtk_type_new (e_msg_composer_address_dialog_get_type ());
-	e_msg_composer_address_dialog_construct (new);
-
-	return GTK_WIDGET (new);
-}
-
-
-static void
-set_list (EMsgComposerAddressDialog *dialog,
-	  const gchar *list_name,
-	  GList *list)
-{
-	GtkCList *clist;
-	GList *p;
-	gchar *text[2];
-
-	clist = GTK_CLIST (glade_xml_get_widget (dialog->gui, list_name));
-
-	gtk_clist_freeze (clist);
-	gtk_clist_clear (clist);
-
-	text[1] = NULL;
-	for (p = list; p != NULL; p = p->next) {
-		text[0] = (gchar *) p->data;
-		gtk_clist_append (clist, text);
-	}
-
-	gtk_clist_thaw (clist);
-}
-
-void
-e_msg_composer_address_dialog_set_to_list (EMsgComposerAddressDialog *dialog, 
-					   GList *to_list)
-{
-	g_return_if_fail (dialog != NULL);
-	g_return_if_fail (E_IS_MSG_COMPOSER_ADDRESS_DIALOG (dialog));
-
-	set_list (dialog, "to_clist", to_list);
-}
-
-void
-e_msg_composer_address_dialog_set_cc_list (EMsgComposerAddressDialog *dialog, 
-					   GList *cc_list)
-{
-	g_return_if_fail (dialog != NULL);
-	g_return_if_fail (E_IS_MSG_COMPOSER_ADDRESS_DIALOG (dialog));
-
-	set_list (dialog, "cc_clist", cc_list);
-}
-
-void
-e_msg_composer_address_dialog_set_bcc_list (EMsgComposerAddressDialog *dialog, 
-					    GList *bcc_list)
-{
-	g_return_if_fail (dialog != NULL);
-	g_return_if_fail (E_IS_MSG_COMPOSER_ADDRESS_DIALOG (dialog));
-
-	set_list (dialog, "bcc_clist", bcc_list);
-}
-
-
-static GList *
-get_list (EMsgComposerAddressDialog *dialog,
-	  const gchar *clist_name)
-{
-	GtkCList *address_clist;
-	GtkCList *clist;
-	GList *list;
-	guint i;
-
-	clist = GTK_CLIST (glade_xml_get_widget (dialog->gui, clist_name));
-
-	list = NULL;
-	for (i = 0; i < clist->rows; i++) {
-		gchar *addr;
-
-		gtk_clist_get_text (clist, i, 0, &addr);
-		list = g_list_prepend (list, g_strdup (addr));
-	}
-
-	return g_list_reverse (list);
-}
-
-GList *
-e_msg_composer_address_dialog_get_to_list (EMsgComposerAddressDialog *dialog)
-{
-	g_return_val_if_fail (dialog != NULL, NULL);
-	g_return_val_if_fail (E_IS_MSG_COMPOSER_ADDRESS_DIALOG (dialog), NULL);
-
-	return get_list (dialog, "to_clist");
-}
-
-GList *
-e_msg_composer_address_dialog_get_cc_list (EMsgComposerAddressDialog *dialog)
-{
-	g_return_val_if_fail (dialog != NULL, NULL);
-	g_return_val_if_fail (E_IS_MSG_COMPOSER_ADDRESS_DIALOG (dialog), NULL);
-
-	return get_list (dialog, "cc_clist");
-}
-
-GList *
-e_msg_composer_address_dialog_get_bcc_list (EMsgComposerAddressDialog *dialog)
-{
-	g_return_val_if_fail (dialog != NULL, NULL);
-	g_return_val_if_fail (E_IS_MSG_COMPOSER_ADDRESS_DIALOG (dialog), NULL);
-
-	return get_list (dialog, "bcc_clist");
-}
diff --git a/composer/e-msg-composer-address-dialog.glade b/composer/e-msg-composer-address-dialog.glade
deleted file mode 100644
index c90ef3f245..0000000000
--- a/composer/e-msg-composer-address-dialog.glade
+++ /dev/null
@@ -1,576 +0,0 @@
-
-
-
-
-  address-composer
-  address-composer
-  
-  src
-  pixmaps
-  C
-  True
-  True
-  False
-  True
-  True
-  True
-  True
-  interface.c
-  interface.h
-  callbacks.c
-  callbacks.h
-  support.c
-  support.h
-  True
-  e-msg-composer-address-dialog.glade.h
-
-
-
-  GnomeDialog
-  dialog1
-  GTK_WINDOW_TOPLEVEL
-  GTK_WIN_POS_NONE
-  False
-  False
-  False
-  False
-  False
-  False
-
-  
-    GtkVBox
-    GnomeDialog:vbox
-    dialog-vbox1
-    False
-    8
-    
-      4
-      True
-      True
-    
-
-    
-      GtkTable
-      main_table
-      3
-      2
-      False
-      0
-      2
-      
-	0
-	True
-	True
-      
-
-      
-	GtkLabel
-	label3
-	
-	GTK_JUSTIFY_CENTER
-	False
-	0.5
-	0.5
-	0
-	0
-	
-	  1
-	  2
-	  2
-	  3
-	  0
-	  0
-	  False
-	  False
-	  False
-	  False
-	  False
-	  False
-	
-      
-
-      
-	GtkLabel
-	label1
-	
-	GTK_JUSTIFY_CENTER
-	False
-	0.5
-	0.5
-	0
-	0
-	
-	  1
-	  2
-	  0
-	  1
-	  0
-	  0
-	  True
-	  True
-	  False
-	  False
-	  True
-	  True
-	
-      
-
-      
-	GtkHBox
-	hbox1
-	False
-	5
-	
-	  0
-	  1
-	  0
-	  1
-	  0
-	  0
-	  False
-	  False
-	  False
-	  False
-	  False
-	  False
-	
-
-	
-	  GtkLabel
-	  label2
-	  
-	  GTK_JUSTIFY_CENTER
-	  False
-	  0.5
-	  0.5
-	  0
-	  0
-	  
-	    0
-	    False
-	    False
-	  
-	
-
-	
-	  GtkEntry
-	  name_entry
-	  True
-	  True
-	  True
-	  0
-	  
-	  
-	    5
-	    True
-	    True
-	  
-	
-
-	
-	  GtkButton
-	  search_button
-	  65
-	  True
-	  
-	  
-	    0
-	    False
-	    False
-	  
-	
-      
-
-      
-	GtkScrolledWindow
-	scrolledwindow1
-	GTK_POLICY_AUTOMATIC
-	GTK_POLICY_AUTOMATIC
-	GTK_UPDATE_CONTINUOUS
-	GTK_UPDATE_CONTINUOUS
-	
-	  0
-	  1
-	  1
-	  2
-	  0
-	  5
-	  True
-	  True
-	  False
-	  False
-	  True
-	  True
-	
-
-	
-	  GtkCList
-	  address_clist
-	  180
-	  200
-	  True
-	  2
-	  128,107
-	  GTK_SELECTION_BROWSE
-	  True
-	  GTK_SHADOW_IN
-
-	  
-	    GtkLabel
-	    CList:title
-	    label5
-	    50
-	    
-	    GTK_JUSTIFY_LEFT
-	    False
-	    0.5
-	    0.5
-	    0
-	    0
-	  
-
-	  
-	    GtkLabel
-	    CList:title
-	    label6
-	    100
-	    
-	    GTK_JUSTIFY_LEFT
-	    False
-	    0.5
-	    0.5
-	    0
-	    0
-	  
-	
-      
-
-      
-	GtkHBox
-	hbox2
-	True
-	10
-	
-	  0
-	  1
-	  2
-	  3
-	  0
-	  0
-	  False
-	  False
-	  False
-	  False
-	  True
-	  True
-	
-
-	
-	  GtkButton
-	  button5
-	  True
-	  
-	  
-	    0
-	    True
-	    True
-	  
-	
-
-	
-	  GtkButton
-	  button6
-	  True
-	  
-	  
-	    0
-	    True
-	    True
-	  
-	
-      
-
-      
-	GtkTable
-	table2
-	3
-	2
-	False
-	0
-	0
-	
-	  1
-	  2
-	  1
-	  2
-	  0
-	  5
-	  False
-	  False
-	  False
-	  False
-	  True
-	  True
-	
-
-	
-	  GtkButton
-	  to_add_button
-	  60
-	  True
-	  
-	  
-	    0
-	    1
-	    0
-	    1
-	    5
-	    0
-	    True
-	    True
-	    False
-	    False
-	    True
-	    False
-	  
-	
-
-	
-	  GtkButton
-	  cc_add_button
-	  60
-	  True
-	  
-	  
-	    0
-	    1
-	    1
-	    2
-	    5
-	    0
-	    True
-	    True
-	    False
-	    False
-	    True
-	    False
-	  
-	
-
-	
-	  GtkButton
-	  bcc_add_button
-	  60
-	  True
-	  
-	  
-	    0
-	    1
-	    2
-	    3
-	    5
-	    0
-	    True
-	    True
-	    False
-	    False
-	    True
-	    False
-	  
-	
-
-	
-	  GtkScrolledWindow
-	  scrolledwindow4
-	  GTK_POLICY_AUTOMATIC
-	  GTK_POLICY_AUTOMATIC
-	  GTK_UPDATE_CONTINUOUS
-	  GTK_UPDATE_CONTINUOUS
-	  
-	    1
-	    2
-	    2
-	    3
-	    2
-	    0
-	    True
-	    True
-	    False
-	    False
-	    True
-	    True
-	  
-
-	  
-	    GtkCList
-	    bcc_clist
-	    180
-	    100
-	    True
-	    1
-	    80
-	    GTK_SELECTION_BROWSE
-	    False
-	    GTK_SHADOW_IN
-
-	    
-	      GtkLabel
-	      CList:title
-	      label9
-	      
-	      GTK_JUSTIFY_CENTER
-	      False
-	      0.5
-	      0.5
-	      0
-	      0
-	    
-	  
-	
-
-	
-	  GtkScrolledWindow
-	  scrolledwindow2
-	  GTK_POLICY_AUTOMATIC
-	  GTK_POLICY_AUTOMATIC
-	  GTK_UPDATE_CONTINUOUS
-	  GTK_UPDATE_CONTINUOUS
-	  
-	    1
-	    2
-	    0
-	    1
-	    2
-	    0
-	    True
-	    True
-	    False
-	    False
-	    True
-	    True
-	  
-
-	  
-	    GtkCList
-	    to_clist
-	    180
-	    100
-	    True
-	    1
-	    80
-	    GTK_SELECTION_BROWSE
-	    False
-	    GTK_SHADOW_IN
-
-	    
-	      GtkLabel
-	      CList:title
-	      label7
-	      
-	      GTK_JUSTIFY_CENTER
-	      False
-	      0.5
-	      0.5
-	      0
-	      0
-	    
-	  
-	
-
-	
-	  GtkScrolledWindow
-	  scrolledwindow3
-	  GTK_POLICY_AUTOMATIC
-	  GTK_POLICY_AUTOMATIC
-	  GTK_UPDATE_CONTINUOUS
-	  GTK_UPDATE_CONTINUOUS
-	  
-	    1
-	    2
-	    1
-	    2
-	    2
-	    4
-	    True
-	    True
-	    False
-	    False
-	    True
-	    True
-	  
-
-	  
-	    GtkCList
-	    cc_clist
-	    180
-	    100
-	    True
-	    1
-	    80
-	    GTK_SELECTION_BROWSE
-	    False
-	    GTK_SHADOW_IN
-
-	    
-	      GtkLabel
-	      CList:title
-	      label8
-	      
-	      GTK_JUSTIFY_CENTER
-	      False
-	      0.5
-	      0.5
-	      0
-	      0
-	    
-	  
-	
-      
-    
-
-    
-      GtkHButtonBox
-      GnomeDialog:action_area
-      dialog-action_area1
-      GTK_BUTTONBOX_END
-      8
-      85
-      27
-      7
-      0
-      
-	0
-	False
-	True
-	GTK_PACK_END
-      
-
-      
-	GtkButton
-	button1
-	True
-	True
-	True
-	GNOME_STOCK_BUTTON_OK
-      
-
-      
-	GtkButton
-	button2
-	True
-	True
-	GNOME_STOCK_BUTTON_APPLY
-      
-
-      
-	GtkButton
-	button3
-	True
-	True
-	GNOME_STOCK_BUTTON_CANCEL
-      
-    
-  
-
-
-
diff --git a/composer/e-msg-composer-address-dialog.glade.h b/composer/e-msg-composer-address-dialog.glade.h
deleted file mode 100644
index a5d48ec275..0000000000
--- a/composer/e-msg-composer-address-dialog.glade.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Translatable strings file generated by Glade.
- * Add this file to your project's POTFILES.in.
- * DO NOT compile it as part of your application.
- */
-
-gchar *s = N_("Recipient list:");
-gchar *s = N_("Name:");
-gchar *s = N_("Search...");
-gchar *s = N_("Name");
-gchar *s = N_("Address");
-gchar *s = N_("Properties...");
-gchar *s = N_("Add...");
-gchar *s = N_("To: >>");
-gchar *s = N_("Cc: >>");
-gchar *s = N_("Bcc: >>");
-gchar *s = N_("label9");
-gchar *s = N_("label7");
-gchar *s = N_("label8");
diff --git a/composer/e-msg-composer-address-dialog.h b/composer/e-msg-composer-address-dialog.h
deleted file mode 100644
index 19ffeda703..0000000000
--- a/composer/e-msg-composer-address-dialog.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-msg-composer-address-dialog.h
- *
- * Copyright (C) 1999  Helix Code, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * 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., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Author: Ettore Perazzoli
- */
-#ifndef __E_MSG_COMPOSER_ADDRESS_DIALOG_H__
-#define __E_MSG_COMPOSER_ADDRESS_DIALOG_H__
-
-#include 
-#include 
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-
-#define E_TYPE_MSG_COMPOSER_ADDRESS_DIALOG			(e_msg_composer_address_dialog_get_type ())
-#define E_MSG_COMPOSER_ADDRESS_DIALOG(obj)			(GTK_CHECK_CAST ((obj), E_TYPE_MSG_COMPOSER_ADDRESS_DIALOG, EMsgComposerAddressDialog))
-#define E_MSG_COMPOSER_ADDRESS_DIALOG_CLASS(klass)		(GTK_CHECK_CLASS_CAST ((klass), E_TYPE_MSG_COMPOSER_ADDRESS_DIALOG, EMsgComposerAddressDialogClass))
-#define E_IS_MSG_COMPOSER_ADDRESS_DIALOG(obj)			(GTK_CHECK_TYPE ((obj), E_TYPE_MSG_COMPOSER_ADDRESS_DIALOG))
-#define E_IS_MSG_COMPOSER_ADDRESS_DIALOG_CLASS(klass)		(GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_MSG_COMPOSER_ADDRESS_DIALOG))
-
-
-typedef struct _EMsgComposerAddressDialog       EMsgComposerAddressDialog;
-typedef struct _EMsgComposerAddressDialogClass  EMsgComposerAddressDialogClass;
-
-struct _EMsgComposerAddressDialog {
-	GnomeDialog parent;
-
-	GladeXML *gui;
-
-	gchar *cut_buffer;
-};
-
-struct _EMsgComposerAddressDialogClass {
-	GnomeDialogClass parent_class;
-
-	void (* apply) (EMsgComposerAddressDialog *dialog);
-};
-
-
-GtkType e_msg_composer_address_dialog_get_type (void);
-GtkWidget *e_msg_composer_address_dialog_new (void);
-void e_msg_composer_address_dialog_construct (EMsgComposerAddressDialog *dialog);
-void e_msg_composer_address_dialog_set_to_list (EMsgComposerAddressDialog *dialog, GList *to_list);
-void e_msg_composer_address_dialog_set_cc_list (EMsgComposerAddressDialog *dialog, GList *cc_list);
-void e_msg_composer_address_dialog_set_bcc_list (EMsgComposerAddressDialog *dialog, GList *bcc_list);
-GList *e_msg_composer_address_dialog_get_to_list (EMsgComposerAddressDialog *dialog);
-GList *e_msg_composer_address_dialog_get_cc_list (EMsgComposerAddressDialog *dialog);
-GList *e_msg_composer_address_dialog_get_bcc_list (EMsgComposerAddressDialog *dialog);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-#endif /* __E_MSG_COMPOSER_ADDRESS_DIALOG_H__ */
diff --git a/composer/e-msg-composer-address-entry.c b/composer/e-msg-composer-address-entry.c
deleted file mode 100644
index ce946d203e..0000000000
--- a/composer/e-msg-composer-address-entry.c
+++ /dev/null
@@ -1,175 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-msg-composer-address-entry.c
- *
- * Copyright (C) 1999  Helix Code, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * 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., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Author: Ettore Perazzoli
- */
-
-/* This is a custom GtkEntry for entering address lists.  For now, it does not
-   have any fancy features, but in the future we might want to make it
-   cooler.  */
-
-#include 
-
-#include "e-msg-composer-address-entry.h"
-
-
-static GtkEntryClass *parent_class = NULL;
-
-
-/* Initialization.  */
-
-static void
-class_init (EMsgComposerAddressEntryClass *klass)
-{
-	GtkObjectClass *object_class;
-
-	object_class = (GtkObjectClass*) klass;
-
-	parent_class = gtk_type_class (gtk_entry_get_type ());
-}
-
-static void
-init (EMsgComposerAddressEntry *msg_composer_address_entry)
-{
-}
-
-GtkType
-e_msg_composer_address_entry_get_type (void)
-{
-	static GtkType type = 0;
-
-	if (type == 0) {
-		static const GtkTypeInfo info = {
-			"EMsgComposerAddressEntry",
-			sizeof (EMsgComposerAddressEntry),
-			sizeof (EMsgComposerAddressEntryClass),
-			(GtkClassInitFunc) class_init,
-			(GtkObjectInitFunc) init,
-			/* reserved_1 */ NULL,
-			/* reserved_2 */ NULL,
-			(GtkClassInitFunc) NULL,
-		};
-
-		type = gtk_type_unique (gtk_entry_get_type (), &info);
-	}
-
-	return type;
-}
-
-
-GtkWidget *
-e_msg_composer_address_entry_new (void)
-{
-	GtkWidget *new;
-
-	new = gtk_type_new (e_msg_composer_address_entry_get_type ());
-
-	return new;
-}
-
-
-/**
- * e_msg_composer_address_entry_get_addresses:
- * @entry: An address entry widget
- * 
- * Retrieve the list of addresses stored in @entry.
- * 
- * Return value: A GList of pointers to strings representing the addresses.
- * Notice that the strings must be freed by the caller when not needed anymore.
- **/
-GList *
-e_msg_composer_address_entry_get_addresses (EMsgComposerAddressEntry *entry)
-{
-	GList *list;
-	const gchar *s;
-	const gchar *p, *oldp;
-	gboolean in_quotes;
-
-	s = gtk_entry_get_text (GTK_ENTRY (entry));
-
-	in_quotes = FALSE;
-	list = NULL;
-
-	p = s;
-	oldp = s;
-
-	while (1) {
-		if (*p == '"') {
-			in_quotes = ! in_quotes;
-			p++;
-		} else if ((! in_quotes && *p == ',') || *p == 0) {
-			if (p != oldp) {
-				gchar *new_addr;
-
-				new_addr = g_strndup (oldp, p - oldp);
-				new_addr = g_strstrip (new_addr);
-				if (*new_addr != '\0')
-					list = g_list_prepend (list, new_addr);
-				else
-					g_free (new_addr);
-			}
-
-			while (*p == ',' || *p == ' ' || *p == '\t')
-				p++;
-
-			if (*p == 0)
-				break;
-
-			oldp = p;
-		} else {
-			p++;
-		}
-	}
-
-	return g_list_reverse (list);
-}
-
-/**
- * e_msg_composer_address_entry_set_list:
- * @entry: An address entry
- * @list: List of pointers to strings representing the addresses that must
- * appear in the entry
- * 
- * Set the address list from @list.
- **/
-void
-e_msg_composer_address_entry_set_list (EMsgComposerAddressEntry *entry,
-				       const GList *list)
-{
-	GString *string;
-	const GList *p;
-
-	g_return_if_fail (entry != NULL);
-
-	if (list == NULL) {
-		gtk_editable_delete_text (GTK_EDITABLE (entry), -1, -1);
-		return;
-	}
-
-	string = g_string_new (NULL);
-	for (p = list; p != NULL; p = p->next) {
-		if (string->str[0] != '\0')
-			g_string_append (string, ", ");
-		g_string_append (string, p->data);
-	}
-
-	gtk_entry_set_text (GTK_ENTRY (entry), string->str);
-	g_string_free (string, TRUE);
-}
diff --git a/composer/e-msg-composer-address-entry.h b/composer/e-msg-composer-address-entry.h
deleted file mode 100644
index f2b671bde4..0000000000
--- a/composer/e-msg-composer-address-entry.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-msg-composer-address-entry.h
- *
- * Copyright (C) 1999  Helix Code, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * 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., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Author: Ettore Perazzoli
- */
-
-#ifndef __E_MSG_COMPOSER_ADDRESS_ENTRY_H__
-#define __E_MSG_COMPOSER_ADDRESS_ENTRY_H__
-
-#include 
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#define E_TYPE_MSG_COMPOSER_ADDRESS_ENTRY			(e_msg_composer_address_entry_get_type ())
-#define E_MSG_COMPOSER_ADDRESS_ENTRY(obj)			(GTK_CHECK_CAST ((obj), E_TYPE_MSG_COMPOSER_ADDRESS_ENTRY, EMsgComposerAddressEntry))
-#define E_MSG_COMPOSER_ADDRESS_ENTRY_CLASS(klass)		(GTK_CHECK_CLASS_CAST ((klass), E_TYPE_MSG_COMPOSER_ADDRESS_ENTRY, EMsgComposerAddressEntryClass))
-#define E_IS_MSG_COMPOSER_ADDRESS_ENTRY(obj)			(GTK_CHECK_TYPE ((obj), E_TYPE_MSG_COMPOSER_ADDRESS_ENTRY))
-#define E_IS_MSG_COMPOSER_ADDRESS_ENTRY_CLASS(klass)		(GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_MSG_COMPOSER_ADDRESS_ENTRY))
-
-
-typedef struct _EMsgComposerAddressEntry       EMsgComposerAddressEntry;
-typedef struct _EMsgComposerAddressEntryClass  EMsgComposerAddressEntryClass;
-
-struct _EMsgComposerAddressEntry {
-	GtkEntry parent;
-};
-
-struct _EMsgComposerAddressEntryClass {
-	GtkEntryClass parent_class;
-};
-
-
-GtkType    e_msg_composer_address_entry_get_type      (void);
-GtkWidget *e_msg_composer_address_entry_new           (void);
-GList     *e_msg_composer_address_entry_get_addresses (EMsgComposerAddressEntry *entry);
-void	   e_msg_composer_address_entry_set_list      (EMsgComposerAddressEntry *entry,
-						       const GList *list);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __E_MSG_COMPOSER_ADDRESS_ENTRY_H__ */
diff --git a/composer/e-msg-composer-attachment-bar.c b/composer/e-msg-composer-attachment-bar.c
deleted file mode 100644
index 5041164d9b..0000000000
--- a/composer/e-msg-composer-attachment-bar.c
+++ /dev/null
@@ -1,691 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-msg-composer-attachment-bar.c
- *
- * Copyright (C) 1999  Helix Code, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * 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., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Author: Ettore Perazzoli
- */
-
-#include 
-#include 
-
-#include "e-msg-composer-attachment.h"
-#include "e-msg-composer-attachment-bar.h"
-#include "camel/camel-data-wrapper.h"
-#include "camel/camel-stream-fs.h"
-#include "camel/camel-mime-part.h"
-
-
-#define ICON_WIDTH 64
-#define ICON_SEPARATORS " /-_"
-#define ICON_SPACING 2
-#define ICON_ROW_SPACING ICON_SPACING
-#define ICON_COL_SPACING ICON_SPACING
-#define ICON_BORDER 2
-#define ICON_TEXT_SPACING 2
-
-
-static GnomeIconListClass *parent_class = NULL;
-
-struct _EMsgComposerAttachmentBarPrivate {
-	GList *attachments;
-	guint num_attachments;
-
-	GtkWidget *context_menu;
-	GtkWidget *icon_context_menu;
-};
-
-
-enum {
-	CHANGED,
-	LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-
-static void update (EMsgComposerAttachmentBar *bar);
-
-
-static gchar *
-size_to_string (gulong size)
-{
-	gchar *size_string;
-
-	/* FIXME: The following should probably go into a separate module, as
-           we might have to do the same thing in other places as well.  Also,
-	   I am not sure this will be OK for all the languages.  */
-
-	if (size < 1e3L) {
-		if (size == 1)
-			size_string = g_strdup (_("1 byte"));
-		else
-			size_string = g_strdup_printf (_("%u bytes"),
-						       (guint) size);
-	} else {
-		gdouble displayed_size;
-
-		if (size < 1e6L) {
-			displayed_size = (gdouble) size / 1.0e3;
-			size_string = g_strdup_printf (_("%.1fK"),
-						       displayed_size);
-		} else if (size < 1e9L) {
-			displayed_size = (gdouble) size / 1.0e6;
-			size_string = g_strdup_printf (_("%.1fM"),
-						       displayed_size);
-		} else {
-			displayed_size = (gdouble) size / 1.0e9;
-			size_string = g_strdup_printf (_("%.1fG"),
-						       displayed_size);
-		}
-	}
-
-	return size_string;
-}
-
-
-/* Sorting.  */
-
-static gint
-attachment_sort_func (gconstpointer a, gconstpointer b)
-{
-	const EMsgComposerAttachment *attachment_a, *attachment_b;
-
-	attachment_a = (EMsgComposerAttachment *) a;
-	attachment_b = (EMsgComposerAttachment *) b;
-
-	return strcmp (attachment_a->description, attachment_b->description);
-}
-
-static void
-sort (EMsgComposerAttachmentBar *bar)
-{
-	EMsgComposerAttachmentBarPrivate *priv;
-
-	priv = bar->priv;
-
-	priv->attachments = g_list_sort (priv->attachments,
-					 attachment_sort_func);
-}
-
-
-/* Attachment handling functions.  */
-
-static void
-free_attachment_list (EMsgComposerAttachmentBar *bar)
-{
-	EMsgComposerAttachmentBarPrivate *priv;
-	GList *p;
-
-	priv = bar->priv;
-
-	for (p = priv->attachments; p != NULL; p = p->next)
-		gtk_object_unref (GTK_OBJECT (p->data));
-}
-
-static void
-attachment_changed_cb (EMsgComposerAttachment *attachment,
-		       gpointer data)
-{
-	update (E_MSG_COMPOSER_ATTACHMENT_BAR (data));
-}
-
-static void
-add_from_file (EMsgComposerAttachmentBar *bar,
-	       const gchar *file_name)
-{
-	EMsgComposerAttachment *attachment;
-
-	attachment = e_msg_composer_attachment_new (file_name);
-
-	gtk_signal_connect (GTK_OBJECT (attachment), "changed",
-			    GTK_SIGNAL_FUNC (attachment_changed_cb),
-			    bar);
-
-	bar->priv->attachments = g_list_append (bar->priv->attachments,
-						attachment);
-	bar->priv->num_attachments++;
-
-	sort (bar);
-	update (bar);
-
-	gtk_signal_emit (GTK_OBJECT (bar), signals[CHANGED]);
-}
-
-static void
-remove_attachment (EMsgComposerAttachmentBar *bar,
-		   EMsgComposerAttachment *attachment)
-{
-	bar->priv->attachments = g_list_remove (bar->priv->attachments,
-						attachment);
-	bar->priv->num_attachments--;
-
-	gtk_object_unref (GTK_OBJECT (attachment));
-
-	gtk_signal_emit (GTK_OBJECT (bar), signals[CHANGED]);
-}
-
-
-/* Icon list contents handling.  */
-
-static void
-update (EMsgComposerAttachmentBar *bar)
-{
-	EMsgComposerAttachmentBarPrivate *priv;
-	GnomeIconList *icon_list;
-	GList *p;
-
-	priv = bar->priv;
-	icon_list = GNOME_ICON_LIST (bar);
-
-	gnome_icon_list_freeze (icon_list);
-
-	gnome_icon_list_clear (icon_list);
-
-	/* FIXME could be faster, but we don't care.  */
-
-	for (p = priv->attachments; p != NULL; p = p->next) {
-		EMsgComposerAttachment *attachment;
-		const gchar *icon_name;
-		gchar *size_string;
-		gchar *label;
-
-		attachment = p->data;
-		icon_name = gnome_mime_get_value (attachment->mime_type,
-						  "icon-filename");
-
-		/* FIXME we need some better default icon.  */
-		if (icon_name == NULL)
-			icon_name = gnome_mime_get_value ("text/plain",
-							  "icon-filename");
-
-		size_string = size_to_string (attachment->size);
-
-		/* FIXME: If GnomeIconList honoured "\n", the result would be a
-                   lot better.  */
-		label = g_strconcat (attachment->description, "\n(",
-				     size_string, ")", NULL);
-
-		gnome_icon_list_append (icon_list, icon_name, label);
-
-		g_free (label);
-		g_free (size_string);
-	}
-
-	gnome_icon_list_thaw (icon_list);
-}
-
-static void
-remove_selected (EMsgComposerAttachmentBar *bar)
-{
-	GnomeIconList *icon_list;
-	EMsgComposerAttachment *attachment;
-	GList *attachment_list;
-	GList *p;
-	gint num;
-
-	icon_list = GNOME_ICON_LIST (bar);
-
-	/* Weee!  I am especially proud of this piece of cheesy code: it is
-           truly awful.  But unless one attaches a huge number of files, it
-           will not be as greedy as intended.  FIXME of course.  */
-
-	attachment_list = NULL;
-	for (p = icon_list->selection; p != NULL; p = p->next) {
-		num = GPOINTER_TO_INT (p->data);
-		attachment = E_MSG_COMPOSER_ATTACHMENT
-			(g_list_nth (bar->priv->attachments, num)->data);
-		attachment_list = g_list_prepend (attachment_list, attachment);
-	}
-
-	for (p = attachment_list; p != NULL; p = p->next)
-		remove_attachment (bar, E_MSG_COMPOSER_ATTACHMENT (p->data));
-
-	g_list_free (attachment_list);
-
-	update (bar);
-}
-
-static void
-edit_selected (EMsgComposerAttachmentBar *bar)
-{
-	GnomeIconList *icon_list;
-	EMsgComposerAttachment *attachment;
-	gint num;
-
-	icon_list = GNOME_ICON_LIST (bar);
-
-	num = GPOINTER_TO_INT (icon_list->selection->data);
-	attachment = g_list_nth (bar->priv->attachments, num)->data;
-
-	e_msg_composer_attachment_edit (attachment, GTK_WIDGET (bar));
-}
-
-
-/* "Attach" dialog.  */
-
-static void
-attach_cb (GtkWidget *widget,
-	   gpointer data)
-{
-	EMsgComposerAttachmentBar *bar;
-	GtkWidget *file_selection;
-	const gchar *file_name;
-
-	file_selection = gtk_widget_get_toplevel (widget);
-	bar = E_MSG_COMPOSER_ATTACHMENT_BAR (data);
-
-	file_name = gtk_file_selection_get_filename
-		                          (GTK_FILE_SELECTION (file_selection));
-	add_from_file (bar, file_name);
-
-	gtk_widget_hide (file_selection);
-}
-
-static void
-add_from_user (EMsgComposerAttachmentBar *bar)
-{
-	GtkWidget *file_selection;
-	GtkWidget *cancel_button;
-	GtkWidget *ok_button;
-
-	file_selection = gtk_file_selection_new (_("Add attachment"));
-	gtk_window_set_position (GTK_WINDOW (file_selection),
-				 GTK_WIN_POS_MOUSE);
-
-	ok_button = GTK_FILE_SELECTION (file_selection)->ok_button;
-	gtk_signal_connect (GTK_OBJECT (ok_button),
-			    "clicked", GTK_SIGNAL_FUNC (attach_cb), bar);
-
-	cancel_button = GTK_FILE_SELECTION (file_selection)->cancel_button;
-	gtk_signal_connect_object (GTK_OBJECT (cancel_button),
-				   "clicked",
-				   GTK_SIGNAL_FUNC (gtk_widget_hide),
-				   GTK_OBJECT (file_selection));
-
-	gtk_widget_show (GTK_WIDGET (file_selection));
-}
-
-
-/* Callbacks.  */
-
-static void
-add_cb (GtkWidget *widget,
-	gpointer data)
-{
-	g_return_if_fail (E_IS_MSG_COMPOSER_ATTACHMENT_BAR (data));
-
-	add_from_user (E_MSG_COMPOSER_ATTACHMENT_BAR (data));
-}
-
-static void
-properties_cb (GtkWidget *widget,
-	       gpointer data)
-{
-	EMsgComposerAttachmentBar *bar;
-
-	g_return_if_fail (E_IS_MSG_COMPOSER_ATTACHMENT_BAR (data));
-
-	bar = E_MSG_COMPOSER_ATTACHMENT_BAR (data);
-	edit_selected (data);
-}
-
-static void
-remove_cb (GtkWidget *widget,
-	   gpointer data)
-{
-	EMsgComposerAttachmentBar *bar;
-
-	g_return_if_fail (E_IS_MSG_COMPOSER_ATTACHMENT_BAR (data));
-
-	bar = E_MSG_COMPOSER_ATTACHMENT_BAR (data);
-	remove_selected (bar);
-}
-
-
-/* Popup menu handling.  */
-
-static GnomeUIInfo icon_context_menu_info[] = {
-	GNOMEUIINFO_ITEM (N_("Remove"),
-			  N_("Remove selected items from the attachment list"),
-			  remove_cb, NULL),
-	GNOMEUIINFO_MENU_PROPERTIES_ITEM (properties_cb, NULL),
-	GNOMEUIINFO_END
-};
-
-static GtkWidget *
-get_icon_context_menu (EMsgComposerAttachmentBar *bar)
-{
-	EMsgComposerAttachmentBarPrivate *priv;
-
-	priv = bar->priv;
-	if (priv->icon_context_menu == NULL)
-		priv->icon_context_menu = gnome_popup_menu_new
-						       (icon_context_menu_info);
-
-	return priv->icon_context_menu;
-}
-
-static void
-popup_icon_context_menu (EMsgComposerAttachmentBar *bar,
-			 gint num,
-			 GdkEventButton *event)
-{
-	GtkWidget *menu;
-
-	menu = get_icon_context_menu (bar);
-	gnome_popup_menu_do_popup (menu, NULL, NULL, event, bar);
-}
-
-static GnomeUIInfo context_menu_info[] = {
-	GNOMEUIINFO_ITEM (N_("Add attachment..."),
-			  N_("Attach a file to the message"),
-			  add_cb, NULL),
-	GNOMEUIINFO_END
-};
-
-static GtkWidget *
-get_context_menu (EMsgComposerAttachmentBar *bar)
-{
-	EMsgComposerAttachmentBarPrivate *priv;
-
-	priv = bar->priv;
-	if (priv->context_menu == NULL)
-		priv->context_menu = gnome_popup_menu_new (context_menu_info);
-
-	return priv->context_menu;
-}
-
-static void
-popup_context_menu (EMsgComposerAttachmentBar *bar,
-		    GdkEventButton *event)
-{
-	GtkWidget *menu;
-
-	menu = get_context_menu (bar);
-	gnome_popup_menu_do_popup (menu, NULL, NULL, event, bar);
-}
-
-
-/* GtkObject methods.  */
-
-static void
-destroy (GtkObject *object)
-{
-	EMsgComposerAttachmentBar *bar;
-
-	bar = E_MSG_COMPOSER_ATTACHMENT_BAR (object);
-
-	free_attachment_list (bar);
-
-	if (GTK_OBJECT_CLASS (parent_class)->destroy != NULL)
-		(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-
-/* GtkWidget methods.  */
-
-static gint
-button_press_event (GtkWidget *widget,
-		    GdkEventButton *event)
-{
-	EMsgComposerAttachmentBar *bar;
-	GnomeIconList *icon_list;
-	gint icon_number;
-
-	bar = E_MSG_COMPOSER_ATTACHMENT_BAR (widget);
-	icon_list = GNOME_ICON_LIST (widget);
-
-	if (event->button != 3)
-		return GTK_WIDGET_CLASS (parent_class)->button_press_event
-							        (widget, event);
-
-	icon_number = gnome_icon_list_get_icon_at (icon_list,
-						   event->x, event->y);
-
-	if (icon_number >= 0) {
-		gnome_icon_list_select_icon (icon_list, icon_number);
-		popup_icon_context_menu (bar, icon_number, event);
-	} else {
-		popup_context_menu (bar, event);
-	}
-
-	return TRUE;
-}
-
-
-/* GnomeIconList methods.  */
-
-static gboolean
-text_changed (GnomeIconList *gil,
-	      gint num,
-	      const gchar *new_text)
-{
-	EMsgComposerAttachmentBar *bar;
-	EMsgComposerAttachment *attachment;
-	GList *p;
-
-	bar = E_MSG_COMPOSER_ATTACHMENT_BAR (gil);
-	p = g_list_nth (bar->priv->attachments, num);
-	attachment =  p->data;
-
-	g_free (attachment->description);
-	attachment->description = g_strdup (new_text);
-
-	return TRUE;
-}
-
-
-/* Initialization.  */
-
-static void
-class_init (EMsgComposerAttachmentBarClass *class)
-{
-	GtkObjectClass *object_class;
-	GtkWidgetClass *widget_class;
-	GnomeIconListClass *icon_list_class;
-
-	object_class = GTK_OBJECT_CLASS (class);
-	widget_class = GTK_WIDGET_CLASS (class);
-	icon_list_class = GNOME_ICON_LIST_CLASS (class);
-
-	parent_class = gtk_type_class (gnome_icon_list_get_type ());
-
-	object_class->destroy = destroy;
-
-	widget_class->button_press_event = button_press_event;
-
-	icon_list_class->text_changed = text_changed;
-
-	/* Setup signals.  */
-
-	signals[CHANGED] =
-		gtk_signal_new ("changed",
-				GTK_RUN_LAST,
-				object_class->type,
-				GTK_SIGNAL_OFFSET (EMsgComposerAttachmentBarClass,
-						   changed),
-				gtk_marshal_NONE__NONE,
-				GTK_TYPE_NONE, 0);
-
-	gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
-}
-
-static void
-init (EMsgComposerAttachmentBar *bar)
-{
-	EMsgComposerAttachmentBarPrivate *priv;
-	guint icon_size;
-
-	priv = g_new (EMsgComposerAttachmentBarPrivate, 1);
-
-	priv->attachments = NULL;
-	priv->context_menu = NULL;
-	priv->icon_context_menu = NULL;
-
-	priv->num_attachments = 0;
-
-	bar->priv = priv;
-
-	/* FIXME partly hardcoded.  We should compute height from the font, and
-           allow at least 2 lines for every item.  */
-	icon_size = ICON_WIDTH + ICON_SPACING + ICON_BORDER + ICON_TEXT_SPACING;
-	icon_size += 24;
-
-	gtk_widget_set_usize (GTK_WIDGET (bar), icon_size * 4, icon_size);
-}
-
-
-GtkType
-e_msg_composer_attachment_bar_get_type (void)
-{
-	static GtkType type = 0;
-
-	if (type == 0) {
-		static const GtkTypeInfo info = {
-			"EMsgComposerAttachmentBar",
-			sizeof (EMsgComposerAttachmentBar),
-			sizeof (EMsgComposerAttachmentBarClass),
-			(GtkClassInitFunc) class_init,
-			(GtkObjectInitFunc) init,
-			/* reserved_1 */ NULL,
-			/* reserved_2 */ NULL,
-			(GtkClassInitFunc) NULL,
-		};
-
-		type = gtk_type_unique (gnome_icon_list_get_type (), &info);
-	}
-
-	return type;
-}
-
-GtkWidget *
-e_msg_composer_attachment_bar_new (GtkAdjustment *adj)
-{
-	EMsgComposerAttachmentBar *new;
-	GnomeIconList *icon_list;
-
-	gtk_widget_push_visual (gdk_imlib_get_visual ());
-	gtk_widget_push_colormap (gdk_imlib_get_colormap ());
-	new = gtk_type_new (e_msg_composer_attachment_bar_get_type ());
-	gtk_widget_pop_visual ();
-	gtk_widget_pop_colormap ();
-
-	icon_list = GNOME_ICON_LIST (new);
-
-	gnome_icon_list_construct (icon_list, ICON_WIDTH, adj, 0);
-
-	gnome_icon_list_set_separators (icon_list, ICON_SEPARATORS);
-	gnome_icon_list_set_row_spacing (icon_list, ICON_ROW_SPACING);
-	gnome_icon_list_set_col_spacing (icon_list, ICON_COL_SPACING);
-	gnome_icon_list_set_icon_border (icon_list, ICON_BORDER);
-	gnome_icon_list_set_text_spacing (icon_list, ICON_TEXT_SPACING);
-	gnome_icon_list_set_selection_mode (icon_list, GTK_SELECTION_MULTIPLE);
-
-	return GTK_WIDGET (new);
-}
-
-
-static void
-attach_to_multipart (CamelMultipart *multipart,
-		     EMsgComposerAttachment *attachment)
-{
-	CamelMimePart *part;
-	struct stat st;
-	int fd;
-	char *data;
-
-	part = camel_mime_part_new ();
-	fd = open (attachment->file_name, O_RDONLY);
-	if (fd != -1 && fstat (fd, &st) != -1) {
-		data = g_malloc (st.st_size);
-		read (fd, data, st.st_size);
-		close (fd);
-
-		camel_mime_part_set_content (part, data, st.st_size,
-					     attachment->mime_type);
-	} else {
-		g_warning ("couldn't open %s", attachment->file_name);
-		gtk_object_sink (GTK_OBJECT (part));
-		return;
-	}
-
-	camel_mime_part_set_disposition (part, "attachment");
-	camel_mime_part_set_filename (part,
-				      g_basename (attachment->file_name));
-	camel_mime_part_set_description (part, attachment->description);
-
-	/* Kludge a bit on CTE. For now, we set QP for text/ and message/
-	 * and B64 for all else. FIXME.
-	 */
-
-	if (!strncasecmp (attachment->mime_type, "text/", 5) ||
-	    !strncasecmp (attachment->mime_type, "message/", 8))
-		camel_mime_part_set_encoding (part, CAMEL_MIME_PART_ENCODING_QUOTEDPRINTABLE);
-	else
-		camel_mime_part_set_encoding (part, CAMEL_MIME_PART_ENCODING_BASE64);
-
-	camel_multipart_add_part (multipart, part);
-	gtk_object_unref (GTK_OBJECT (part));
-}
-
-void
-e_msg_composer_attachment_bar_to_multipart (EMsgComposerAttachmentBar *bar,
-					    CamelMultipart *multipart)
-{
-	EMsgComposerAttachmentBarPrivate *priv;
-	GList *p;
-
-	g_return_if_fail (bar != NULL);
-	g_return_if_fail (E_IS_MSG_COMPOSER_ATTACHMENT_BAR (bar));
-	g_return_if_fail (multipart != NULL);
-	g_return_if_fail (CAMEL_IS_MULTIPART (multipart));
-
-	priv = bar->priv;
-
-	for (p = priv->attachments; p != NULL; p = p->next) {
-		EMsgComposerAttachment *attachment;
-
-		attachment = E_MSG_COMPOSER_ATTACHMENT (p->data);
-		attach_to_multipart (multipart, attachment);
-	}
-}
-
-
-guint
-e_msg_composer_attachment_bar_get_num_attachments (EMsgComposerAttachmentBar *bar)
-{
-	g_return_val_if_fail (bar != NULL, 0);
-	g_return_val_if_fail (E_IS_MSG_COMPOSER_ATTACHMENT_BAR (bar), 0);
-
-	return bar->priv->num_attachments;
-}
-
-
-void
-e_msg_composer_attachment_bar_attach (EMsgComposerAttachmentBar *bar,
-				      const gchar *file_name)
-{
-	g_return_if_fail (bar != NULL);
-	g_return_if_fail (E_IS_MSG_COMPOSER_ATTACHMENT_BAR (bar));
-
-	if (file_name == NULL)
-		add_from_user (bar);
-	else
-		add_from_file (bar, file_name);
-}
diff --git a/composer/e-msg-composer-attachment-bar.h b/composer/e-msg-composer-attachment-bar.h
deleted file mode 100644
index 803b51a954..0000000000
--- a/composer/e-msg-composer-attachment-bar.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* msg-composer-attachment-bar.h
- *
- * Copyright (C) 1999  Helix Code, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * 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., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Author: Ettore Perazzoli
- */
-
-#ifndef __E_MSG_COMPOSER_ATTACHMENT_BAR_H__
-#define __E_MSG_COMPOSER_ATTACHMENT_BAR_H__
-
-#include 
-#include 
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#define E_TYPE_MSG_COMPOSER_ATTACHMENT_BAR \
-	(e_msg_composer_attachment_bar_get_type ())
-#define E_MSG_COMPOSER_ATTACHMENT_BAR(obj) \
-	(GTK_CHECK_CAST ((obj), E_TYPE_MSG_COMPOSER_ATTACHMENT_BAR, EMsgComposerAttachmentBar))
-#define E_MSG_COMPOSER_ATTACHMENT_BAR_CLASS(klass) \
-	(GTK_CHECK_CLASS_CAST ((klass), E_TYPE_MSG_COMPOSER_ATTACHMENT_BAR, EMsgComposerAttachmentBarClass))
-#define E_IS_MSG_COMPOSER_ATTACHMENT_BAR(obj) \
-	(GTK_CHECK_TYPE ((obj), E_TYPE_MSG_COMPOSER_ATTACHMENT_BAR))
-#define E_IS_MSG_COMPOSER_ATTACHMENT_BAR_CLASS(klass) \
-	(GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_MSG_COMPOSER_ATTACHMENT_BAR))
-
-
-typedef struct _EMsgComposerAttachmentBarPrivate EMsgComposerAttachmentBarPrivate;
-
-struct _EMsgComposerAttachmentBar {
-	GnomeIconList parent;
-
-	EMsgComposerAttachmentBarPrivate *priv;
-};
-typedef struct _EMsgComposerAttachmentBar       EMsgComposerAttachmentBar;
-
-struct _EMsgComposerAttachmentBarClass {
-	GnomeIconListClass parent_class;
-
-	void (* changed) (EMsgComposerAttachmentBar *bar);
-};
-typedef struct _EMsgComposerAttachmentBarClass  EMsgComposerAttachmentBarClass;
-
-
-GtkType e_msg_composer_attachment_bar_get_type (void);
-GtkWidget *e_msg_composer_attachment_bar_new (GtkAdjustment *adj);
-void e_msg_composer_attachment_bar_to_multipart (EMsgComposerAttachmentBar *bar, CamelMultipart *multipart);
-guint e_msg_composer_attachment_bar_get_num_attachments (EMsgComposerAttachmentBar *bar);
-void e_msg_composer_attachment_bar_attach (EMsgComposerAttachmentBar *bar, const gchar *file_name);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __E_MSG_COMPOSER_ATTACHMENT_BAR_H__ */
diff --git a/composer/e-msg-composer-attachment.c b/composer/e-msg-composer-attachment.c
deleted file mode 100644
index f4741d987f..0000000000
--- a/composer/e-msg-composer-attachment.c
+++ /dev/null
@@ -1,480 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-msg-composer-attachment.c
- *
- * Copyright (C) 1999  Helix Code, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * 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., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Author: Ettore Perazzoli
- */
-
-/* This is the object representing an email attachment.  It is implemented as a
-   GtkObject to make it easier for the application to handle it.  For example,
-   the "changed" signal is emitted whenever something changes in the
-   attachment.  Also, this contains the code to let users edit the
-   attachment manually. */
-
-#include 
-
-#include 
-
-#include "e-msg-composer-attachment.h"
-
-
-enum {
-	CHANGED,
-	LAST_SIGNAL
-};
-static guint signals[LAST_SIGNAL] = { 0 };
-
-static GtkObjectClass *parent_class = NULL;
-
-
-/* Utility functions.  */
-
-static const gchar *
-get_mime_type (const gchar *file_name)
-{
-	const gchar *mime_type;
-
-	mime_type = gnome_mime_type_of_file (file_name);
-	if (mime_type == NULL)
-		mime_type = "application/octet-stream";
-
-	return mime_type;
-}
-
-static void
-init_mime_type (EMsgComposerAttachment *attachment)
-{
-	attachment->mime_type = g_strdup (get_mime_type (attachment->file_name));
-}
-
-static void
-set_mime_type (EMsgComposerAttachment *attachment)
-{
-	g_free (attachment->mime_type);
-	init_mime_type (attachment);
-}
-
-static void
-changed (EMsgComposerAttachment *attachment)
-{
-	gtk_signal_emit (GTK_OBJECT (attachment), signals[CHANGED]);
-}
-
-
-/* GtkObject methods.  */
-
-static void
-destroy (GtkObject *object)
-{
-	EMsgComposerAttachment *attachment;
-
-	attachment = E_MSG_COMPOSER_ATTACHMENT (object);
-
-	g_free (attachment->file_name);
-	g_free (attachment->description);
-	g_free (attachment->mime_type);
-}
-
-
-/* Signals.  */
-
-static void
-real_changed (EMsgComposerAttachment *msg_composer_attachment)
-{
-	g_return_if_fail (msg_composer_attachment != NULL);
-	g_return_if_fail (E_IS_MSG_COMPOSER_ATTACHMENT (msg_composer_attachment));
-}
-
-
-static void
-class_init (EMsgComposerAttachmentClass *klass)
-{
-	GtkObjectClass *object_class;
-
-	object_class = (GtkObjectClass*) klass;
-
-	parent_class = gtk_type_class (gtk_object_get_type ());
-
-	object_class->destroy = destroy;
-
-	signals[CHANGED] = gtk_signal_new ("changed",
-					   GTK_RUN_FIRST,
-					   object_class->type,
-					   GTK_SIGNAL_OFFSET
-					   	(EMsgComposerAttachmentClass,
-						 changed),
-					   gtk_marshal_NONE__NONE,
-					   GTK_TYPE_NONE, 0);
-
-
-	gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
-
-	klass->changed = real_changed;
-}
-
-static void
-init (EMsgComposerAttachment *msg_composer_attachment)
-{
-	msg_composer_attachment->editor_gui = NULL;
-	msg_composer_attachment->file_name = NULL;
-	msg_composer_attachment->description = NULL;
-	msg_composer_attachment->mime_type = NULL;
-	msg_composer_attachment->size = 0;
-}
-
-GtkType
-e_msg_composer_attachment_get_type (void)
-{
-	static GtkType type = 0;
-
-	if (type == 0) {
-		static const GtkTypeInfo info = {
-			"EMsgComposerAttachment",
-			sizeof (EMsgComposerAttachment),
-			sizeof (EMsgComposerAttachmentClass),
-			(GtkClassInitFunc) class_init,
-			(GtkObjectInitFunc) init,
-			/* reserved_1 */ NULL,
-			/* reserved_2 */ NULL,
-			(GtkClassInitFunc) NULL,
-		};
-
-		type = gtk_type_unique (gtk_object_get_type (), &info);
-	}
-
-	return type;
-}
-
-
-/**
- * e_msg_composer_attachment_new:
- * @file_name: 
- * 
- * Return value: 
- **/
-EMsgComposerAttachment *
-e_msg_composer_attachment_new (const gchar *file_name)
-{
-	EMsgComposerAttachment *new;
-	struct stat statbuf;
-
-	g_return_val_if_fail (file_name != NULL, NULL);
-
-	new = gtk_type_new (e_msg_composer_attachment_get_type ());
-
-	new->editor_gui = NULL;
-
-	new->file_name = g_strdup (file_name);
-	new->description = g_strdup (g_basename (new->file_name));
-
-	if (stat (file_name, &statbuf) < 0)
-		new->size = 0;
-	else
-		new->size = statbuf.st_size;
-
-	init_mime_type (new);
-
-	return new;
-}
-
-
-/* The attachment property dialog.  */
-
-struct _DialogData {
-	GtkWidget *dialog;
-	GtkEntry *file_name_entry;
-	GtkEntry *description_entry;
-	GtkEntry *mime_type_entry;
-	GtkWidget *browse_widget;
-	EMsgComposerAttachment *attachment;
-};
-typedef struct _DialogData DialogData;
-
-static void
-destroy_dialog_data (DialogData *data)
-{
-	if (data->browse_widget != NULL)
-		gtk_widget_destroy (data->browse_widget);
-	g_free (data);
-}
-
-static void
-update_mime_type (DialogData *data)
-{
-	const gchar *mime_type;
-	const gchar *file_name;
-
-	file_name = gtk_entry_get_text (data->file_name_entry);
-	mime_type = get_mime_type (file_name);
-
-	gtk_entry_set_text (data->mime_type_entry, mime_type);
-}
-
-static void
-browse_ok_cb (GtkWidget *widget,
-	      gpointer data)
-{
-	GtkWidget *file_selection;
-	DialogData *dialog_data;
-	const gchar *file_name;
-
-	dialog_data = (DialogData *) data;
-	file_selection = gtk_widget_get_toplevel (widget);
-
-	file_name = gtk_file_selection_get_filename
-					(GTK_FILE_SELECTION (file_selection));
-
-	gtk_entry_set_text (dialog_data->file_name_entry, file_name);
-
-	update_mime_type (dialog_data);
-
-	gtk_widget_hide (file_selection);
-}
-
-static void
-browse (DialogData *data)
-{
-	if (data->browse_widget == NULL) {
-		GtkWidget *file_selection;
-		GtkWidget *cancel_button;
-		GtkWidget *ok_button;
-
-		file_selection
-			= gtk_file_selection_new (_("Select attachment"));
-		gtk_window_set_position (GTK_WINDOW (file_selection),
-					 GTK_WIN_POS_MOUSE);
-		gtk_window_set_transient_for (GTK_WINDOW (file_selection),
-					      GTK_WINDOW (data->dialog));
-
-		ok_button = GTK_FILE_SELECTION (file_selection)->ok_button;
-		gtk_signal_connect (GTK_OBJECT (ok_button),
-				    "clicked", GTK_SIGNAL_FUNC (browse_ok_cb),
-				    data);
-
-		cancel_button
-			= GTK_FILE_SELECTION (file_selection)->cancel_button;
-		gtk_signal_connect_object (GTK_OBJECT (cancel_button),
-					   "clicked",
-					   GTK_SIGNAL_FUNC (gtk_widget_hide),
-					   GTK_OBJECT (file_selection));
-
-		data->browse_widget = file_selection;
-	}
-
-	gtk_widget_show (GTK_WIDGET (data->browse_widget));
-}
-
-static void
-set_entry (GladeXML *xml,
-	   const gchar *widget_name,
-	   const gchar *value)
-{
-	GtkEntry *entry;
-
-	entry = GTK_ENTRY (glade_xml_get_widget (xml, widget_name));
-	if (entry == NULL)
-		g_warning ("Entry for `%s' not found.", widget_name);
-	gtk_entry_set_text (entry, value);
-}
-
-static void
-connect_entry_changed (GladeXML *gui,
-		       const gchar *name,
-		       GtkSignalFunc func,
-		       gpointer data)
-{
-	GtkWidget *widget;
-
-	widget = glade_xml_get_widget (gui, name);
-	gtk_signal_connect (GTK_OBJECT (widget), "changed", func, data);
-}
-
-static void
-connect_widget (GladeXML *gui,
-		const gchar *name,
-		const gchar *signal_name,
-		GtkSignalFunc func,
-		gpointer data)
-{
-	GtkWidget *widget;
-
-	widget = glade_xml_get_widget (gui, name);
-	gtk_signal_connect (GTK_OBJECT (widget), signal_name, func, data);
-}
-
-static void
-apply (DialogData *data)
-{
-	EMsgComposerAttachment *attachment;
-
-	attachment = data->attachment;
-
-	g_free (attachment->file_name);
-	attachment->file_name = g_strdup (gtk_entry_get_text
-					  (data->file_name_entry));
-
-	g_free (attachment->description);
-	attachment->description = g_strdup (gtk_entry_get_text
-					    (data->description_entry));
-
-	g_free (attachment->mime_type);
-	attachment->mime_type = g_strdup (gtk_entry_get_text
-					  (data->mime_type_entry));
-
-	changed (attachment);
-}
-
-static void
-entry_changed_cb (GtkWidget *widget, gpointer data)
-{
-	DialogData *dialog_data;
-	GladeXML *gui;
-	GtkWidget *apply_button;
-
-	dialog_data = (DialogData *) data;
-	gui = dialog_data->attachment->editor_gui;
-
-	apply_button = glade_xml_get_widget (gui, "apply_button");
-	gtk_widget_set_sensitive (apply_button, TRUE);
-}
-
-static void
-close_cb (GtkWidget *widget,
-	  gpointer data)
-{
-	EMsgComposerAttachment *attachment;
-	DialogData *dialog_data;
-
-	dialog_data = (DialogData *) data;
-	attachment = dialog_data->attachment;
-
-	gtk_widget_destroy (glade_xml_get_widget (attachment->editor_gui,
-						  "dialog"));
-	gtk_object_unref (GTK_OBJECT (attachment->editor_gui));
-	attachment->editor_gui = NULL;
-
-	destroy_dialog_data (dialog_data);
-}
-
-static void
-apply_cb (GtkWidget *widget,
-	  gpointer data)
-{
-	DialogData *dialog_data;
-
-	dialog_data = (DialogData *) data;
-	apply (dialog_data);
-}
-
-static void
-ok_cb (GtkWidget *widget,
-       gpointer data)
-{
-	apply_cb (widget, data);
-	close_cb (widget, data);
-}
-
-static void
-browse_cb (GtkWidget *widget,
-	   gpointer data)
-{
-	DialogData *dialog_data;
-
-	dialog_data = (DialogData *) data;
-	browse (dialog_data);
-}
-
-static void
-file_name_focus_out_cb (GtkWidget *widget,
-			GdkEventFocus *event,
-			gpointer data)
-{
-	DialogData *dialog_data;
-
-	dialog_data = (DialogData *) data;
-	update_mime_type (dialog_data);
-}
-
-
-void
-e_msg_composer_attachment_edit (EMsgComposerAttachment *attachment,
-				GtkWidget *parent)
-{
-	DialogData *dialog_data;
-	GladeXML *editor_gui;
-
-	g_return_if_fail (attachment != NULL);
-	g_return_if_fail (E_IS_MSG_COMPOSER_ATTACHMENT (attachment));
-
-	if (attachment->editor_gui != NULL) {
-		GtkWidget *window;
-
-		window = glade_xml_get_widget (attachment->editor_gui,
-					       "dialog");
-		gdk_window_show (window->window);
-		return;
-	}
-
-	editor_gui = glade_xml_new (E_GLADEDIR "/e-msg-composer-attachment.glade",
-				    NULL);
-	if (editor_gui == NULL) {
-		g_warning ("Cannot load `e-msg-composer-attachment.glade'");
-		return;
-	}
-
-	attachment->editor_gui = editor_gui;
-
-	gtk_window_set_transient_for
-		(GTK_WINDOW (glade_xml_get_widget (editor_gui, "dialog")),
-		 GTK_WINDOW (gtk_widget_get_toplevel (parent)));
-
-	dialog_data = g_new (DialogData, 1);
-	dialog_data->browse_widget = NULL;
-	dialog_data->attachment = attachment;
-	dialog_data->dialog = glade_xml_get_widget (editor_gui, "dialog");
-	dialog_data->file_name_entry = GTK_ENTRY (glade_xml_get_widget
-						  (editor_gui,
-						   "file_name_entry"));
-	dialog_data->description_entry = GTK_ENTRY (glade_xml_get_widget
-						    (editor_gui,
-						     "description_entry"));
-	dialog_data->mime_type_entry = GTK_ENTRY (glade_xml_get_widget
-						  (editor_gui,
-						   "mime_type_entry"));
-
-	if (attachment != NULL) {
-		set_entry (editor_gui, "file_name_entry", attachment->file_name);
-		set_entry (editor_gui, "description_entry", attachment->description);
-		set_entry (editor_gui, "mime_type_entry", attachment->mime_type);
-	}
-
-	connect_entry_changed (editor_gui, "file_name_entry",
-			       entry_changed_cb, dialog_data);
-	connect_entry_changed (editor_gui, "description_entry",
-			       entry_changed_cb, dialog_data);
-
-	connect_widget (editor_gui, "ok_button", "clicked", ok_cb, dialog_data);
-	connect_widget (editor_gui, "apply_button", "clicked", apply_cb, dialog_data);
-	connect_widget (editor_gui, "close_button", "clicked", close_cb, dialog_data);
-
-	connect_widget (editor_gui, "browse_button", "clicked", browse_cb, dialog_data);
-
-	connect_widget (editor_gui, "file_name_entry", "focus_out_event",
-			file_name_focus_out_cb, dialog_data);
-}
diff --git a/composer/e-msg-composer-attachment.glade b/composer/e-msg-composer-attachment.glade
deleted file mode 100644
index 43b38e2e47..0000000000
--- a/composer/e-msg-composer-attachment.glade
+++ /dev/null
@@ -1,291 +0,0 @@
-
-
-
-
-  e-msg-composer-attachment
-  e-msg-composer-attachment
-  
-  src
-  pixmaps
-  C
-  True
-  True
-  False
-  True
-  True
-  True
-  True
-  interface.c
-  interface.h
-  callbacks.c
-  callbacks.h
-  support.c
-  support.h
-  True
-  e-msg-composer-attachment.glade.h
-
-
-
-  GnomeDialog
-  dialog
-  Attachment properties
-  GTK_WINDOW_TOPLEVEL
-  GTK_WIN_POS_NONE
-  False
-  False
-  False
-  False
-  False
-  False
-
-  
-    GtkVBox
-    GnomeDialog:vbox
-    dialog-vbox1
-    False
-    8
-    
-      4
-      True
-      True
-    
-
-    
-      GtkTable
-      table1
-      3
-      2
-      False
-      10
-      5
-      
-	0
-	True
-	True
-      
-
-      
-	GtkLabel
-	label1
-	
-	GTK_JUSTIFY_CENTER
-	False
-	0.5
-	0.5
-	0
-	0
-	
-	  0
-	  1
-	  1
-	  2
-	  0
-	  0
-	  False
-	  False
-	  False
-	  False
-	  False
-	  False
-	
-      
-
-      
-	GtkLabel
-	label3
-	
-	GTK_JUSTIFY_CENTER
-	False
-	0.5
-	0.5
-	0
-	0
-	
-	  0
-	  1
-	  2
-	  3
-	  0
-	  0
-	  False
-	  False
-	  False
-	  False
-	  False
-	  False
-	
-      
-
-      
-	GtkEntry
-	description_entry
-	True
-	True
-	True
-	0
-	
-	
-	  1
-	  2
-	  1
-	  2
-	  0
-	  0
-	  True
-	  False
-	  False
-	  False
-	  True
-	  False
-	
-      
-
-      
-	GtkLabel
-	label2
-	
-	GTK_JUSTIFY_CENTER
-	False
-	0.5
-	0.5
-	0
-	0
-	
-	  0
-	  1
-	  0
-	  1
-	  0
-	  0
-	  False
-	  False
-	  False
-	  False
-	  False
-	  False
-	
-      
-
-      
-	GtkHBox
-	hbox3
-	False
-	10
-	
-	  1
-	  2
-	  0
-	  1
-	  0
-	  0
-	  True
-	  True
-	  True
-	  True
-	  True
-	  True
-	
-
-	
-	  GtkEntry
-	  file_name_entry
-	  290
-	  True
-	  True
-	  True
-	  0
-	  
-	  
-	    0
-	    True
-	    True
-	  
-	
-
-	
-	  GtkButton
-	  browse_button
-	  80
-	  True
-	  
-	  
-	    0
-	    False
-	    False
-	  
-	
-      
-
-      
-	GtkEntry
-	mime_type_entry
-	False
-	True
-	False
-	True
-	0
-	
-	
-	  1
-	  2
-	  2
-	  3
-	  0
-	  0
-	  True
-	  False
-	  False
-	  False
-	  True
-	  False
-	
-      
-    
-
-    
-      GtkHButtonBox
-      GnomeDialog:action_area
-      dialog-action_area1
-      GTK_BUTTONBOX_END
-      8
-      85
-      27
-      7
-      0
-      
-	0
-	False
-	True
-	GTK_PACK_END
-      
-
-      
-	GtkButton
-	ok_button
-	True
-	True
-	True
-	GNOME_STOCK_BUTTON_OK
-      
-
-      
-	GtkButton
-	apply_button
-	False
-	True
-	True
-	GNOME_STOCK_BUTTON_APPLY
-      
-
-      
-	GtkButton
-	close_button
-	True
-	True
-	GNOME_STOCK_BUTTON_CLOSE
-      
-    
-  
-
-
-
diff --git a/composer/e-msg-composer-attachment.glade.h b/composer/e-msg-composer-attachment.glade.h
deleted file mode 100644
index 965ce1b6d5..0000000000
--- a/composer/e-msg-composer-attachment.glade.h
+++ /dev/null
@@ -1,11 +0,0 @@
-/*
- * Translatable strings file generated by Glade.
- * Add this file to your project's POTFILES.in.
- * DO NOT compile it as part of your application.
- */
-
-gchar *s = N_("Attachment properties");
-gchar *s = N_("Description:");
-gchar *s = N_("MIME type:");
-gchar *s = N_("File name:");
-gchar *s = N_("Browse...");
diff --git a/composer/e-msg-composer-attachment.h b/composer/e-msg-composer-attachment.h
deleted file mode 100644
index 7e3c88238b..0000000000
--- a/composer/e-msg-composer-attachment.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-msg-composer-attachment.h
- *
- * Copyright (C) 1999  Helix Code, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * 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., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Author: Ettore Perazzoli
- */
-#ifndef __E_MSG_COMPOSER_ATTACHMENT_H__
-#define __E_MSG_COMPOSER_ATTACHMENT_H__
-
-#include 
-#include 
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#define E_TYPE_MSG_COMPOSER_ATTACHMENT			(e_msg_composer_attachment_get_type ())
-#define E_MSG_COMPOSER_ATTACHMENT(obj)			(GTK_CHECK_CAST ((obj), E_TYPE_MSG_COMPOSER_ATTACHMENT, EMsgComposerAttachment))
-#define E_MSG_COMPOSER_ATTACHMENT_CLASS(klass)		(GTK_CHECK_CLASS_CAST ((klass), E_TYPE_MSG_COMPOSER_ATTACHMENT, EMsgComposerAttachmentClass))
-#define E_IS_MSG_COMPOSER_ATTACHMENT(obj)		(GTK_CHECK_TYPE ((obj), E_TYPE_MSG_COMPOSER_ATTACHMENT))
-#define E_IS_MSG_COMPOSER_ATTACHMENT_CLASS(klass)	(GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_MSG_COMPOSER_ATTACHMENT))
-
-
-typedef struct _EMsgComposerAttachment       EMsgComposerAttachment;
-typedef struct _EMsgComposerAttachmentClass  EMsgComposerAttachmentClass;
-
-struct _EMsgComposerAttachment {
-	GtkObject parent;
-
-	GladeXML *editor_gui;
-
-	gchar *file_name;
-	gchar *description;
-	gchar *mime_type;
-
-	gulong size;
-};
-
-struct _EMsgComposerAttachmentClass {
-	GtkObjectClass parent_class;
-
-	void (*changed)	(EMsgComposerAttachment *msg_composer_attachment);
-};
-
-
-GtkType e_msg_composer_attachment_get_type (void);
-EMsgComposerAttachment *e_msg_composer_attachment_new (const gchar *file_name);
-void e_msg_composer_attachment_edit (EMsgComposerAttachment *attachment,
-				     GtkWidget *parent);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __E_MSG_COMPOSER_ATTACHMENT_H__ */
diff --git a/composer/e-msg-composer-hdrs.c b/composer/e-msg-composer-hdrs.c
deleted file mode 100644
index 0295426b8a..0000000000
--- a/composer/e-msg-composer-hdrs.c
+++ /dev/null
@@ -1,382 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* msg-composer-hdrs.c
- *
- * Copyright (C) 1999 Helix Code, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * 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., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Author: Ettore Perazzoli
- */
-
-#ifdef _HAVE_CONFIG_H
-#include 
-#endif
-
-#include 
-#include 
-
-#include "e-msg-composer-address-entry.h"
-#include "e-msg-composer-hdrs.h"
-
-
-struct _EMsgComposerHdrsPrivate {
-	/* Total number of headers that we have.  */
-	guint num_hdrs;
-
-	/* The tooltips.  */
-	GtkTooltips *tooltips;
-
-	/* Standard headers.  */
-	GtkWidget *to_entry;
-	GtkWidget *cc_entry;
-	GtkWidget *bcc_entry;
-	GtkWidget *subject_entry;
-};
-
-
-static GtkTableClass *parent_class = NULL;
-
-enum {
-	SHOW_ADDRESS_DIALOG,
-	LAST_SIGNAL
-};
-
-static gint signals[LAST_SIGNAL];
-
-
-static void
-address_button_clicked_cb (GtkButton *button,
-			   gpointer data)
-{
-	gtk_signal_emit (GTK_OBJECT (data), signals[SHOW_ADDRESS_DIALOG]);
-}
-
-static GtkWidget *
-add_header (EMsgComposerHdrs *hdrs,
-	    const gchar *name,
-	    const gchar *tip,
-	    const gchar *tip_private,
-	    gboolean addrbook_button)
-{
-	EMsgComposerHdrsPrivate *priv;
-	GtkWidget *label;
-	GtkWidget *entry;
-	guint pad;
-
-	priv = hdrs->priv;
-
-	if (addrbook_button) {
-		label = gtk_button_new_with_label (name);
-		GTK_OBJECT_UNSET_FLAGS(label, GTK_CAN_FOCUS);
-		gtk_signal_connect (GTK_OBJECT (label), "clicked",
-				    GTK_SIGNAL_FUNC (address_button_clicked_cb),
-				    hdrs);
-		pad = 2;
-		gtk_tooltips_set_tip (hdrs->priv->tooltips, label,
-				      _("Click here for the address book"),
-				      NULL);
-	} else {
-		label = gtk_label_new (name);
-		pad = GNOME_PAD;
-	}
-
-	gtk_table_attach (GTK_TABLE (hdrs), label,
-			  0, 1, priv->num_hdrs, priv->num_hdrs + 1,
-			  GTK_FILL, GTK_FILL,
-			  pad, pad);
-	gtk_widget_show (label);
-
-	entry = e_msg_composer_address_entry_new ();
-	gtk_table_attach (GTK_TABLE (hdrs), entry,
-			  1, 2, priv->num_hdrs, priv->num_hdrs + 1,
-			  GTK_FILL | GTK_EXPAND, GTK_FILL,
-			  2, 2);
-	gtk_widget_show (entry);
-
-	gtk_tooltips_set_tip (hdrs->priv->tooltips, entry, tip, tip_private);
-
-	priv->num_hdrs++;
-
-	return entry;
-}
-
-static void
-setup_headers (EMsgComposerHdrs *hdrs)
-{
-	EMsgComposerHdrsPrivate *priv;
-
-	priv = hdrs->priv;
-
-	priv->to_entry = add_header
-		(hdrs, _("To:"), 
-		 _("Enter the recipients of the message"),
-		 NULL,
-		 TRUE);
-	priv->cc_entry = add_header
-		(hdrs, _("Cc:"),
-		 _("Enter the addresses that will receive a carbon copy of "
-		   "the message"),
-		 NULL,
-		 TRUE);
-	priv->bcc_entry = add_header
-		(hdrs, _("Bcc:"),
-		 _("Enter the addresses that will receive a carbon copy of "
-		   "the message without appearing in the recipient list of "
-		   "the message."),
-		 NULL,
-		 TRUE);
-	priv->subject_entry = add_header
-		(hdrs, _("Subject:"),
-		 _("Enter the subject of the mail"),
-		 NULL,
-		 FALSE);
-}
-
-
-/* GtkObject methods.  */
-
-static void
-destroy (GtkObject *object)
-{
-	EMsgComposerHdrs *hdrs;
-	EMsgComposerHdrsPrivate *priv;
-
-	hdrs = E_MSG_COMPOSER_HDRS (object);
-	priv = hdrs->priv;
-
-	gtk_object_destroy (GTK_OBJECT (priv->tooltips));
-
-	if (GTK_OBJECT_CLASS (parent_class)->destroy != NULL)
-		(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-
-static void
-class_init (EMsgComposerHdrsClass *class)
-{
-	GtkObjectClass *object_class;
-
-	object_class = GTK_OBJECT_CLASS (class);
-	object_class->destroy = destroy;
-
-	parent_class = gtk_type_class (gtk_table_get_type ());
-
-	signals[SHOW_ADDRESS_DIALOG] =
-		gtk_signal_new ("show_address_dialog",
-				GTK_RUN_LAST,
-				object_class->type,
-				GTK_SIGNAL_OFFSET (EMsgComposerHdrsClass,
-						   show_address_dialog),
-				gtk_marshal_NONE__NONE,
-				GTK_TYPE_NONE, 0);
-
-	gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
-}
-
-static void
-init (EMsgComposerHdrs *hdrs)
-{
-	EMsgComposerHdrsPrivate *priv;
-
-	priv = g_new (EMsgComposerHdrsPrivate, 1);
-
-	priv->to_entry = NULL;
-	priv->cc_entry = NULL;
-	priv->bcc_entry = NULL;
-	priv->subject_entry = NULL;
-
-	priv->tooltips = gtk_tooltips_new ();
-
-	priv->num_hdrs = 0;
-
-	hdrs->priv = priv;
-}
-
-
-GtkType
-e_msg_composer_hdrs_get_type (void)
-{
-	static GtkType type = 0;
-
-	if (type == 0) {
-		static const GtkTypeInfo info = {
-			"EMsgComposerHdrs",
-			sizeof (EMsgComposerHdrs),
-			sizeof (EMsgComposerHdrsClass),
-			(GtkClassInitFunc) class_init,
-			(GtkObjectInitFunc) init,
-			/* reserved_1 */ NULL,
-			/* reserved_2 */ NULL,
-			(GtkClassInitFunc) NULL,
-		};
-
-		type = gtk_type_unique (gtk_table_get_type (), &info);
-	}
-
-	return type;
-}
-
-GtkWidget *
-e_msg_composer_hdrs_new (void)
-{
-	EMsgComposerHdrs *new;
-
-	new = gtk_type_new (e_msg_composer_hdrs_get_type ());
-
-	setup_headers (E_MSG_COMPOSER_HDRS (new));
-
-	return GTK_WIDGET (new);
-}
-
-
-static void
-set_recipients (CamelMimeMessage *msg,
-		GtkWidget *entry_widget,
-		const gchar *type)
-{
-	EMsgComposerAddressEntry *entry;
-	GList *list;
-	GList *p;
-	struct _header_address *addr;
-
-	entry = E_MSG_COMPOSER_ADDRESS_ENTRY (entry_widget);
-	list = e_msg_composer_address_entry_get_addresses (entry);
-
-	/* FIXME leak?  */
-
-	for (p = list; p != NULL; p = p->next) {
-		addr = header_address_decode (p->data);
-		camel_mime_message_add_recipient (msg, type, addr->name,
-						  addr->v.addr);
-		header_address_unref (addr);
-	}
-
-	g_list_free (list);
-}
-
-void
-e_msg_composer_hdrs_to_message (EMsgComposerHdrs *hdrs,
-				CamelMimeMessage *msg)
-{
-	const gchar *s;
-
-	g_return_if_fail (hdrs != NULL);
-	g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
-	g_return_if_fail (msg != NULL);
-	g_return_if_fail (CAMEL_IS_MIME_MESSAGE (msg));
-
-	s = gtk_entry_get_text (GTK_ENTRY (hdrs->priv->subject_entry));
-	camel_mime_message_set_subject (msg, g_strdup (s));
-
-	set_recipients (msg, hdrs->priv->to_entry, CAMEL_RECIPIENT_TYPE_TO);
-	set_recipients (msg, hdrs->priv->cc_entry, CAMEL_RECIPIENT_TYPE_CC);
-	set_recipients (msg, hdrs->priv->bcc_entry, CAMEL_RECIPIENT_TYPE_BCC);
-}
-
-
-void
-e_msg_composer_hdrs_set_to (EMsgComposerHdrs *hdrs,
-			    const GList *to_list)
-{
-	EMsgComposerAddressEntry *entry;
-
-	g_return_if_fail (hdrs != NULL);
-	g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
-
-	entry = E_MSG_COMPOSER_ADDRESS_ENTRY (hdrs->priv->to_entry);
-	e_msg_composer_address_entry_set_list (entry, to_list);
-}
-
-void
-e_msg_composer_hdrs_set_cc (EMsgComposerHdrs *hdrs,
-			    const GList *cc_list)
-{
-	EMsgComposerAddressEntry *entry;
-
-	g_return_if_fail (hdrs != NULL);
-	g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
-
-	entry = E_MSG_COMPOSER_ADDRESS_ENTRY (hdrs->priv->cc_entry);
-	e_msg_composer_address_entry_set_list (entry, cc_list);
-}
-
-void
-e_msg_composer_hdrs_set_bcc (EMsgComposerHdrs *hdrs,
-			     const GList *bcc_list)
-{
-	EMsgComposerAddressEntry *entry;
-
-	g_return_if_fail (hdrs != NULL);
-	g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
-
-	entry = E_MSG_COMPOSER_ADDRESS_ENTRY (hdrs->priv->bcc_entry);
-	e_msg_composer_address_entry_set_list (entry, bcc_list);
-}
-
-void
-e_msg_composer_hdrs_set_subject (EMsgComposerHdrs *hdrs,
-				 const char *subject)
-{
-	GtkEntry *entry;
-
-	g_return_if_fail (hdrs != NULL);
-	g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
-	g_return_if_fail (subject != NULL);
-
-	entry = GTK_ENTRY (hdrs->priv->subject_entry);
-	gtk_entry_set_text (entry, subject);
-}
-
-
-GList *
-e_msg_composer_hdrs_get_to (EMsgComposerHdrs *hdrs)
-{
-	g_return_val_if_fail (hdrs != NULL, NULL);
-	g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
-	return e_msg_composer_address_entry_get_addresses
-		(E_MSG_COMPOSER_ADDRESS_ENTRY (hdrs->priv->to_entry));
-}
-
-GList *
-e_msg_composer_hdrs_get_cc (EMsgComposerHdrs *hdrs)
-{
-	g_return_val_if_fail (hdrs != NULL, NULL);
-	g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
-	return e_msg_composer_address_entry_get_addresses
-		(E_MSG_COMPOSER_ADDRESS_ENTRY (hdrs->priv->cc_entry));
-}
-
-GList *
-e_msg_composer_hdrs_get_bcc (EMsgComposerHdrs *hdrs)
-{
-	g_return_val_if_fail (hdrs != NULL, NULL);
-	g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
-	return e_msg_composer_address_entry_get_addresses
-		(E_MSG_COMPOSER_ADDRESS_ENTRY (hdrs->priv->bcc_entry));
-}
-
-const char *
-e_msg_composer_hdrs_get_subject (EMsgComposerHdrs *hdrs)
-{
-	g_return_val_if_fail (hdrs != NULL, NULL);
-	g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
-	return gtk_entry_get_text
-		(GTK_ENTRY (hdrs->priv->subject_entry));
-}
diff --git a/composer/e-msg-composer-hdrs.h b/composer/e-msg-composer-hdrs.h
deleted file mode 100644
index edff75518a..0000000000
--- a/composer/e-msg-composer-hdrs.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* msg-composer-hdrs.h
- *
- * Copyright (C) 1999 Helix Code, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * 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., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Author: Ettore Perazzoli
- */
-
-#ifndef ___E_MSG_COMPOSER_HDRS_H__
-#define ___E_MSG_COMPOSER_HDRS_H__
-
-#include 
-#include 
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#define E_TYPE_MSG_COMPOSER_HDRS		(e_msg_composer_hdrs_get_type ())
-#define E_MSG_COMPOSER_HDRS(obj)		(GTK_CHECK_CAST ((obj), E_TYPE_MSG_COMPOSER_HDRS, EMsgComposerHdrs))
-#define E_MSG_COMPOSER_HDRS_CLASS(klass)	(GTK_CHECK_CLASS_CAST ((klass), E_TYPE_MSG_COMPOSER_HDRS, EMsgComposerHdrsClass))
-#define E_IS_MSG_COMPOSER_HDRS(obj)		(GTK_CHECK_TYPE ((obj), E_TYPE_MSG_COMPOSER_HDRS))
-#define E_IS_MSG_COMPOSER_HDRS_CLASS(klass)	(GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_MSG_COMPOSER_HDRS))
-
-
-typedef struct _EMsgComposerHdrs        EMsgComposerHdrs;
-typedef struct _EMsgComposerHdrsClass   EMsgComposerHdrsClass;
-typedef struct _EMsgComposerHdrsPrivate EMsgComposerHdrsPrivate;
-
-struct _EMsgComposerHdrs {
-	GtkTable parent;
-
-	EMsgComposerHdrsPrivate *priv;
-};
-
-struct _EMsgComposerHdrsClass {
-	GtkTableClass parent_class;
-
-	void (* show_address_dialog) (EMsgComposerHdrs *hdrs);
-};
-
-
-GtkType    e_msg_composer_hdrs_get_type    (void);
-GtkWidget *e_msg_composer_hdrs_new         (void);
-void       e_msg_composer_hdrs_to_message  (EMsgComposerHdrs *hdrs,
-					    CamelMimeMessage *msg);
-
-void	   e_msg_composer_hdrs_set_to      (EMsgComposerHdrs *hdrs,
-					    const GList *to_list);
-void	   e_msg_composer_hdrs_set_cc      (EMsgComposerHdrs *hdrs,
-					    const GList *cc_list);
-void	   e_msg_composer_hdrs_set_bcc     (EMsgComposerHdrs *hdrs,
-					    const GList *bcc_list);
-void       e_msg_composer_hdrs_set_subject (EMsgComposerHdrs *hdrs,
-					    const char *subject);
-
-GList	  *e_msg_composer_hdrs_get_to      (EMsgComposerHdrs *hdrs);
-GList	  *e_msg_composer_hdrs_get_cc      (EMsgComposerHdrs *hdrs);
-GList	  *e_msg_composer_hdrs_get_bcc     (EMsgComposerHdrs *hdrs);
-const char*e_msg_composer_hdrs_get_subject (EMsgComposerHdrs *hdrs);
-
-#ifdef _cplusplus
-}
-#endif /* _cplusplus */
-
-
-#endif /* __E_MSG_COMPOSER_HDRS_H__ */
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
deleted file mode 100644
index 2130f71f41..0000000000
--- a/composer/e-msg-composer.c
+++ /dev/null
@@ -1,979 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-msg-composer.c
- *
- * Copyright (C) 1999  Helix Code, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * 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., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Author: Ettore Perazzoli
- */
-
-/*
-
-   TODO
-
-   - Somehow users should be able to see if any file(s) are attached even when
-     the attachment bar is not shown.
-
-*/
-
-#ifdef HAVE_CONFIG_H
-#include 
-#endif
-#include 
-
-#include 
-#include 
-#include 
-#include 
-#include "e-util/e-html-utils.h"
-#include "e-util/e-setup.h"
-
-#include 
-
-#include 
-
-#include "e-msg-composer.h"
-#include "e-msg-composer-address-dialog.h"
-#include "e-msg-composer-attachment-bar.h"
-#include "e-msg-composer-hdrs.h"
-
-#ifdef USING_OAF
-#define HTML_EDITOR_CONTROL_ID "OAFIID:control:html-editor:63c5499b-8b0c-475a-9948-81ec96a9662c"
-#else
-#define HTML_EDITOR_CONTROL_ID "control:html-editor"
-#endif
-
-
-
-#define DEFAULT_WIDTH 600
-#define DEFAULT_HEIGHT 500
-
-
-enum {
-	SEND,
-	POSTPONE,
-	LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-static GnomeAppClass *parent_class = NULL;
-
-
-static GtkWidget *
-create_editor (EMsgComposer *composer)
-{
-	GtkWidget *control;
-
-	control = bonobo_widget_new_control (HTML_EDITOR_CONTROL_ID,
-					     bonobo_object_corba_objref (BONOBO_OBJECT (composer->uih)));
-	if (control == NULL) {
-		g_error ("Cannot get `%s'.", HTML_EDITOR_CONTROL_ID);
-		return NULL;
-	}
-
-	return control;
-}
-
-
-static void
-free_string_list (GList *list)
-{
-	GList *p;
-
-	if (list == NULL)
-		return;
-
-	for (p = list; p != NULL; p = p->next)
-		g_free (p->data);
-
-	g_list_free (list);
-}
-
-static char *
-get_editor_text (BonoboWidget *editor)
-{
-	Bonobo_PersistStream persist;
-	BonoboStream *stream;
-	BonoboStreamMem *stream_mem;
-	CORBA_Environment ev;
-	char *text;
-
-	CORBA_exception_init (&ev);
-	persist = (Bonobo_PersistStream)
-		bonobo_object_client_query_interface (
-			bonobo_widget_get_server (editor),
-			"IDL:Bonobo/PersistStream:1.0",
-			&ev);
-	g_assert (persist != CORBA_OBJECT_NIL);
-
-	stream = bonobo_stream_mem_create (NULL, 0, FALSE, TRUE);
-	Bonobo_PersistStream_save (persist, (Bonobo_Stream)bonobo_object_corba_objref (BONOBO_OBJECT (stream)), "text/html", &ev);
-	if (ev._major != CORBA_NO_EXCEPTION) {
-		/* FIXME. Some error message. */
-		return NULL;
-	}
-	if (ev._major != CORBA_SYSTEM_EXCEPTION)
-		CORBA_Object_release (persist, &ev);
-
-	Bonobo_Unknown_unref (persist, &ev);
-	CORBA_exception_free (&ev);
-
-	stream_mem = BONOBO_STREAM_MEM (stream);
-	text = g_malloc (stream_mem->pos + 1);
-	memcpy (text, stream_mem->buffer, stream_mem->pos);
-	text[stream_mem->pos] = 0;
-	bonobo_object_unref (BONOBO_OBJECT(stream));
-	return text;
-}
-
-
-/* This functions builds a CamelMimeMessage for the message that the user has
-   composed in `composer'.  */
-static CamelMimeMessage *
-build_message (EMsgComposer *composer)
-{
-	CamelMimeMessage *new;
-	char *text;
-	int i;
-	
-	new = camel_mime_message_new ();
-
-	e_msg_composer_hdrs_to_message (E_MSG_COMPOSER_HDRS (composer->hdrs),
-					new);
-	for (i = 0; i < composer->extra_hdr_names->len; i++) {
-		camel_medium_add_header (CAMEL_MEDIUM (new),
-					 composer->extra_hdr_names->pdata[i],
-					 composer->extra_hdr_values->pdata[i]);
-	}
-
-	text = get_editor_text (BONOBO_WIDGET (composer->editor));
-
-	if (e_msg_composer_attachment_bar_get_num_attachments (E_MSG_COMPOSER_ATTACHMENT_BAR (composer->attachment_bar))) {
-		CamelMultipart *multipart = camel_multipart_new ();
-		CamelMimePart *part;
-
-		/* Generate a random boundary. */
-		camel_multipart_set_boundary (multipart, NULL);
-
-		part = camel_mime_part_new ();
-		camel_mime_part_set_content (part, text,
-					     strlen (text), "text/html");
-		camel_multipart_add_part (multipart, part);
-		gtk_object_unref (GTK_OBJECT (part));
-
-		e_msg_composer_attachment_bar_to_multipart (E_MSG_COMPOSER_ATTACHMENT_BAR (composer->attachment_bar), multipart);
-
-		camel_medium_set_content_object (CAMEL_MEDIUM (new),
-						 CAMEL_DATA_WRAPPER (multipart));
-		gtk_object_unref (GTK_OBJECT (multipart));
-	} else {
-		CamelDataWrapper *cdw;
-		CamelStream *stream;
-
-		stream = camel_stream_mem_new_with_buffer (text,
-							   strlen (text));
-		cdw = camel_data_wrapper_new ();
-		camel_data_wrapper_construct_from_stream (cdw, stream);
-		gtk_object_unref (GTK_OBJECT (stream));
-		camel_data_wrapper_set_mime_type (cdw, "text/html");
-
-		camel_medium_set_content_object (CAMEL_MEDIUM (new),
-						 CAMEL_DATA_WRAPPER (cdw));
-		gtk_object_unref (GTK_OBJECT (cdw));
-	}
-	g_free (text);
-
-	/* FIXME refcounting is most certainly wrong.  We want all the stuff to
-           be destroyed when we unref() the message.  */
-
-	return new;
-}
-
-static char *
-get_signature ()
-{
-	char *path, *sigfile, *rawsig;
-	static char *htmlsig = NULL;
-	static time_t sigmodtime = -1;
-	struct stat st;
-	int fd;
-
-	path = g_strdup_printf ("=%s/config=/mail/id_sig", evolution_dir);
-	sigfile = gnome_config_get_string (path);
-	g_free (path);
-	if (!sigfile || !*sigfile) {
-		return NULL;
-	}
-
-	if (stat (sigfile, &st) == -1) {
-		char *msg;
-
-		msg = g_strdup_printf ("Could not open signature file %s:\n%s",
-				       sigfile, g_strerror (errno));
-		gnome_error_dialog (msg);
-		g_free (msg);
-
-		return NULL;
-	}
-
-	if (st.st_mtime == sigmodtime)
-		return htmlsig;
-
-	rawsig = g_malloc (st.st_size + 1);
-	fd = open (sigfile, O_RDONLY);
-	if (fd == -1) {
-		char *msg;
-
-		msg = g_strdup_printf ("Could not open signature file %s:\n%s",
-				       sigfile, g_strerror (errno));
-		gnome_error_dialog (msg);
-		g_free (msg);
-
-		return NULL;
-	}
-
-	read (fd, rawsig, st.st_size);
-	rawsig[st.st_size] = '\0';
-	close (fd);
-
-	htmlsig = e_text_to_html (rawsig, 0);
-	sigmodtime = st.st_mtime;
-
-	return htmlsig;
-}
-
-static void
-set_editor_text (BonoboWidget *editor, const char *text)
-{
-	Bonobo_PersistStream persist;
-	BonoboStream *stream;
-	CORBA_Environment ev;
-	char *sig, *fulltext;
-
-	sig = get_signature ();
-	if (sig) {
-		fulltext = g_strdup_printf ("%s
\n
\n--\n%s
",
-					    text, sig);
-	} else
-		fulltext = (char*)text;
-
-	CORBA_exception_init (&ev);
-	persist = (Bonobo_PersistStream)
-		bonobo_object_client_query_interface (
-			bonobo_widget_get_server (editor),
-			"IDL:Bonobo/PersistStream:1.0",
-			&ev);
-	g_assert (persist != CORBA_OBJECT_NIL);
-
-	stream = bonobo_stream_mem_create (fulltext, strlen (fulltext),
-					   TRUE, FALSE);
-	if (sig)
-		g_free (fulltext);
-	Bonobo_PersistStream_load (persist, (Bonobo_Stream)bonobo_object_corba_objref (BONOBO_OBJECT (stream)), "text/html", &ev);
-	if (ev._major != CORBA_NO_EXCEPTION) {
-		/* FIXME. Some error message. */
-		return;
-	}
-	if (ev._major != CORBA_SYSTEM_EXCEPTION)
-		CORBA_Object_release (persist, &ev);
-
-	Bonobo_Unknown_unref (persist, &ev);
-	CORBA_exception_free (&ev);
-	bonobo_object_unref (BONOBO_OBJECT(stream));
-}
-
-
-static void
-show_attachments (EMsgComposer *composer,
-		  gboolean show)
-{
-	if (show) {
-		gtk_widget_show (composer->attachment_scrolled_window);
-		gtk_widget_show (composer->attachment_bar);
-	} else {
-		gtk_widget_hide (composer->attachment_scrolled_window);
-		gtk_widget_hide (composer->attachment_bar);
-	}
-
-	composer->attachment_bar_visible = show;
-
-	/* Update the GUI.  */
-
-#if 0
-	gtk_check_menu_item_set_active
-		(GTK_CHECK_MENU_ITEM
-		 (glade_xml_get_widget (composer->menubar_gui,
-					"menu_view_attachments")),
-		 show);
-#endif
-
-	/* XXX we should update the toggle toolbar item as well.  At
-	   this point, it is not a toggle because Glade is broken.  */
-}
-
-
-/* Address dialog callbacks.  */
-
-static void
-address_dialog_destroy_cb (GtkWidget *widget,
-			   gpointer data)
-{
-	EMsgComposer *composer;
-
-	composer = E_MSG_COMPOSER (data);
-	composer->address_dialog = NULL;
-}
-
-static void
-address_dialog_apply_cb (EMsgComposerAddressDialog *dialog,
-			 gpointer data)
-{
-	EMsgComposerHdrs *hdrs;
-	GList *list;
-
-	hdrs = E_MSG_COMPOSER_HDRS (E_MSG_COMPOSER (data)->hdrs);
-
-	list = e_msg_composer_address_dialog_get_to_list (dialog);
-	e_msg_composer_hdrs_set_to (hdrs, list);
-
-	list = e_msg_composer_address_dialog_get_cc_list (dialog);
-	e_msg_composer_hdrs_set_cc (hdrs, list);
-
-	list = e_msg_composer_address_dialog_get_bcc_list (dialog);
-	e_msg_composer_hdrs_set_bcc (hdrs, list);
-}
-
-
-/* Message composer window callbacks.  */
-
-static void
-send_cb (GtkWidget *widget,
-	 gpointer data)
-{
-	gtk_signal_emit (GTK_OBJECT (data), signals[SEND]);
-}
-
-static void
-exit_dialog_cb (int reply, gpointer data)
-{
-	if (reply == 0)
-		gtk_widget_destroy (GTK_WIDGET (data));
-}
-
-static void
-exit_cb (GtkWidget *widget, gpointer data)
-{
-	EMsgComposer *composer = E_MSG_COMPOSER (data);
-	GtkWindow *parent =
-		GTK_WINDOW (gtk_widget_get_ancestor (GTK_WIDGET (data),
-						     GTK_TYPE_WINDOW));
-
-	gnome_ok_cancel_dialog_parented ("Discard this message?",
-					 exit_dialog_cb, composer, parent);
-}
-	
-
-static void
-menu_view_attachments_activate_cb (GtkWidget *widget,
-				   gpointer data)
-{
-	e_msg_composer_show_attachments (E_MSG_COMPOSER (data),
-					 GTK_CHECK_MENU_ITEM (widget)->active);
-}
-
-static void
-toolbar_view_attachments_clicked_cb (GtkWidget *widget,
-				      gpointer data)
-{
-	EMsgComposer *composer;
-
-	composer = E_MSG_COMPOSER (data);
-
-	e_msg_composer_show_attachments (composer,
-					 ! composer->attachment_bar_visible);
-}
-
-static void
-add_attachment_cb (GtkWidget *widget,
-		   gpointer data)
-{
-	EMsgComposer *composer;
-
-	composer = E_MSG_COMPOSER (data);
-
-	e_msg_composer_attachment_bar_attach
-		(E_MSG_COMPOSER_ATTACHMENT_BAR (composer->attachment_bar),
-		 NULL);
-}
-
-/* Create the address dialog if not created already.  */
-static void
-setup_address_dialog (EMsgComposer *composer)
-{
-	EMsgComposerAddressDialog *dialog;
-	EMsgComposerHdrs *hdrs;
-	GList *list;
-
-	if (composer->address_dialog != NULL)
-		return;
-
-	composer->address_dialog = e_msg_composer_address_dialog_new ();
-	dialog = E_MSG_COMPOSER_ADDRESS_DIALOG (composer->address_dialog);
-	hdrs = E_MSG_COMPOSER_HDRS (composer->hdrs);
-
-	gtk_signal_connect (GTK_OBJECT (dialog),
-			    "destroy", address_dialog_destroy_cb, composer);
-	gtk_signal_connect (GTK_OBJECT (dialog),
-			    "apply", address_dialog_apply_cb, composer);
-
-	list = e_msg_composer_hdrs_get_to (hdrs);
-	e_msg_composer_address_dialog_set_to_list (dialog, list);
-
-	list = e_msg_composer_hdrs_get_cc (hdrs);
-	e_msg_composer_address_dialog_set_cc_list (dialog, list);
-
-	list = e_msg_composer_hdrs_get_bcc (hdrs);
-	e_msg_composer_address_dialog_set_bcc_list (dialog, list);
-}
-
-static void
-address_dialog_cb (GtkWidget *widget,
-		   gpointer data)
-{
-	EMsgComposer *composer;
-
-	/* FIXME maybe we should hide the dialog on Cancel/OK instead of
-           destroying it.  */
-
-	composer = E_MSG_COMPOSER (data);
-
-	setup_address_dialog (composer);
-
-	gtk_widget_show (composer->address_dialog);
-	gdk_window_show (composer->address_dialog->window);
-}
-
-static void
-attachment_bar_changed_cb (EMsgComposerAttachmentBar *bar,
-			   gpointer data)
-{
-	EMsgComposer *composer;
-	
-	composer = E_MSG_COMPOSER (data);
-
-	if (e_msg_composer_attachment_bar_get_num_attachments (bar) > 0)
-		e_msg_composer_show_attachments (composer, TRUE);
-	else
-		e_msg_composer_show_attachments (composer, FALSE);
-}
-
-
-/* Menu bar implementation.  */
-
-static GnomeUIInfo file_tree[] = {
-	GNOMEUIINFO_MENU_OPEN_ITEM (NULL, NULL),
-	GNOMEUIINFO_MENU_SAVE_ITEM (NULL, NULL),
-	GNOMEUIINFO_MENU_SAVE_AS_ITEM (NULL, NULL),
-	GNOMEUIINFO_ITEM_NONE (N_("Save in _folder..."), N_("Save the message in a specified folder"),
-			       NULL),
-	GNOMEUIINFO_SEPARATOR,
-	GNOMEUIINFO_ITEM_STOCK (N_("Send"), N_("Send the message"),
-				send_cb, GNOME_STOCK_MENU_MAIL_SND),
-	GNOMEUIINFO_SEPARATOR,
-	GNOMEUIINFO_MENU_EXIT_ITEM (exit_cb, NULL),
-	GNOMEUIINFO_END
-};
-
-static GnomeUIInfo view_tree[] = {
-	GNOMEUIINFO_ITEM_STOCK (N_("View _attachments"), N_("View/hide attachments"),
-				menu_view_attachments_activate_cb, GNOME_STOCK_MENU_ATTACH),
-	GNOMEUIINFO_END
-};
-
-static GnomeUIInfo menubar_info[] = {
-	GNOMEUIINFO_MENU_FILE_TREE (file_tree),
-	GNOMEUIINFO_MENU_VIEW_TREE (view_tree),
-	GNOMEUIINFO_END
-};
-
-static void
-create_menubar (EMsgComposer *composer)
-{
-	BonoboUIHandler *uih;
-	BonoboUIHandlerMenuItem *list;
-
-	uih = composer->uih;
-
-	bonobo_ui_handler_create_menubar (uih);
-
-	list = bonobo_ui_handler_menu_parse_uiinfo_list_with_data (menubar_info, composer);
-	bonobo_ui_handler_menu_add_list (uih, "/", list);
-}
-
-
-/* Toolbar implementation.  */
-
-static GnomeUIInfo toolbar_info[] = {
-	GNOMEUIINFO_ITEM_STOCK (N_("Send"), N_("Send this message"), send_cb, GNOME_STOCK_PIXMAP_MAIL_SND),
-	GNOMEUIINFO_SEPARATOR,
-	GNOMEUIINFO_ITEM_STOCK (N_("Cut"), N_("Cut selected region into the clipboard"), NULL, GNOME_STOCK_PIXMAP_CUT),
-	GNOMEUIINFO_ITEM_STOCK (N_("Copy"), N_("Copy selected region into the clipboard"), NULL, GNOME_STOCK_PIXMAP_COPY),
-	GNOMEUIINFO_ITEM_STOCK (N_("Paste"), N_("Paste selected region into the clipboard"), NULL, GNOME_STOCK_PIXMAP_PASTE),
-	GNOMEUIINFO_ITEM_STOCK (N_("Undo"), N_("Undo last operation"), NULL, GNOME_STOCK_PIXMAP_UNDO),
-	GNOMEUIINFO_SEPARATOR,
-	GNOMEUIINFO_ITEM_STOCK (N_("Attach"), N_("Attach a file"), add_attachment_cb, GNOME_STOCK_PIXMAP_ATTACH),
-	GNOMEUIINFO_END
-};
-
-static void
-create_toolbar (EMsgComposer *composer)
-{
-	BonoboUIHandler *uih;
-	BonoboUIHandlerToolbarItem *list;
-
-	uih = composer->uih;
-
-	bonobo_ui_handler_create_toolbar (uih, "Toolbar");
-
-	list = bonobo_ui_handler_toolbar_parse_uiinfo_list_with_data (toolbar_info, composer);
-	bonobo_ui_handler_toolbar_add_list (uih, "/Toolbar", list);
-}
-
-
-/* GtkObject methods.  */
-
-static void
-destroy (GtkObject *object)
-{
-	EMsgComposer *composer;
-
-	composer = E_MSG_COMPOSER (object);
-
-	bonobo_object_unref (BONOBO_OBJECT (composer->uih));
-
-	/* FIXME?  I assume the Bonobo widget will get destroyed
-           normally?  */
-
-	if (composer->address_dialog != NULL)
-		gtk_widget_destroy (composer->address_dialog);
-	if (composer->hdrs != NULL)
-		gtk_widget_destroy (composer->hdrs);
-
-	if (composer->extra_hdr_names) {
-		int i;
-
-		for (i = 0; i < composer->extra_hdr_names->len; i++) {
-			g_free (composer->extra_hdr_names->pdata[i]);
-			g_free (composer->extra_hdr_values->pdata[i]);
-		}
-		g_ptr_array_free (composer->extra_hdr_names, TRUE);
-		g_ptr_array_free (composer->extra_hdr_values, TRUE);
-	}
-
-	if (GTK_OBJECT_CLASS (parent_class)->destroy != NULL)
-		(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-
-static void
-class_init (EMsgComposerClass *klass)
-{
-	GtkObjectClass *object_class;
-
-	object_class = (GtkObjectClass *) klass;
-
-	object_class->destroy = destroy;
-
-	parent_class = gtk_type_class (gnome_app_get_type ());
-
-	signals[SEND] =
-		gtk_signal_new ("send",
-				GTK_RUN_LAST,
-				object_class->type,
-				GTK_SIGNAL_OFFSET (EMsgComposerClass, send),
-				gtk_marshal_NONE__NONE,
-				GTK_TYPE_NONE, 0);
-
-	signals[POSTPONE] =
-		gtk_signal_new ("postpone",
-				GTK_RUN_LAST,
-				object_class->type,
-				GTK_SIGNAL_OFFSET (EMsgComposerClass, postpone),
-				gtk_marshal_NONE__NONE,
-				GTK_TYPE_NONE, 0);
-
-	gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
-}
-
-static void
-init (EMsgComposer *composer)
-{
-	composer->uih = NULL;
-
-	composer->hdrs = NULL;
-	composer->extra_hdr_names = g_ptr_array_new ();
-	composer->extra_hdr_values = g_ptr_array_new ();
-
-	composer->editor = NULL;
-
-	composer->address_dialog = NULL;
-
-	composer->attachment_bar = NULL;
-	composer->attachment_scrolled_window = NULL;
-}
-
-
-GtkType
-e_msg_composer_get_type (void)
-{
-	static GtkType type = 0;
-
-	if (type == 0) {
-		static const GtkTypeInfo info = {
-			"EMsgComposer",
-			sizeof (EMsgComposer),
-			sizeof (EMsgComposerClass),
-			(GtkClassInitFunc) class_init,
-			(GtkObjectInitFunc) init,
-			/* reserved_1 */ NULL,
-			/* reserved_2 */ NULL,
-			(GtkClassInitFunc) NULL,
-		};
-
-		type = gtk_type_unique (gnome_app_get_type (), &info);
-	}
-
-	return type;
-}
-
-
-/**
- * e_msg_composer_construct:
- * @composer: A message composer widget
- * 
- * Construct @composer.
- **/
-void
-e_msg_composer_construct (EMsgComposer *composer)
-{
-	GtkWidget *vbox;
-
-	g_return_if_fail (gtk_main_level () > 0);
-
-	gtk_window_set_default_size (GTK_WINDOW (composer),
-				     DEFAULT_WIDTH, DEFAULT_HEIGHT);
-
-	gnome_app_construct (GNOME_APP (composer), "e-msg-composer",
-			     "Compose a message");
-
-	composer->uih = bonobo_ui_handler_new ();
-	bonobo_ui_handler_set_app (composer->uih, GNOME_APP (composer));
-
-	vbox = gtk_vbox_new (FALSE, 0);
-
-	composer->hdrs = e_msg_composer_hdrs_new ();
-	gtk_box_pack_start (GTK_BOX (vbox), composer->hdrs, FALSE, TRUE, 0);
-	gtk_widget_show (composer->hdrs);
-
-	/* Editor component.  */
-
-	create_menubar (composer);
-	create_toolbar (composer);
-	composer->editor = create_editor (composer);
-
-	gtk_widget_show (composer->editor);
-	gtk_box_pack_start (GTK_BOX (vbox), composer->editor, TRUE, TRUE, 0);
-	gtk_widget_show (composer->editor);
-
-	/* Attachment editor, wrapped into a GtkScrolledWindow.  We don't
-           show it for now.  */
-
-	composer->attachment_scrolled_window = gtk_scrolled_window_new (NULL,
-									NULL);
-	gtk_scrolled_window_set_policy
-		(GTK_SCROLLED_WINDOW (composer->attachment_scrolled_window),
-		 GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
-	composer->attachment_bar = e_msg_composer_attachment_bar_new (NULL);
-	GTK_WIDGET_SET_FLAGS (composer->attachment_bar, GTK_CAN_FOCUS);
-	gtk_container_add (GTK_CONTAINER (composer->attachment_scrolled_window),
-			   composer->attachment_bar);
-	gtk_box_pack_start (GTK_BOX (vbox),
-			    composer->attachment_scrolled_window,
-			    FALSE, TRUE, GNOME_PAD_SMALL);
-
-	gtk_signal_connect (GTK_OBJECT (composer->attachment_bar), "changed",
-			    GTK_SIGNAL_FUNC (attachment_bar_changed_cb), composer);
-
-	gnome_app_set_contents (GNOME_APP (composer), vbox);
-	gtk_widget_show (vbox);
-
-	e_msg_composer_show_attachments (composer, FALSE);
-}
-
-/**
- * e_msg_composer_new:
- *
- * Create a new message composer widget.  This function must be called
- * within the GTK+ main loop, or it will fail.
- * 
- * Return value: A pointer to the newly created widget
- **/
-GtkWidget *
-e_msg_composer_new (void)
-{
-	GtkWidget *new;
-
-	g_return_val_if_fail (gtk_main_level () > 0, NULL);
- 
-	new = gtk_type_new (e_msg_composer_get_type ());
-	e_msg_composer_construct (E_MSG_COMPOSER (new));
-
-	/* Load the signature, if any. */
-	set_editor_text (BONOBO_WIDGET (E_MSG_COMPOSER (new)->editor), "");
-
-	return new;
-}
-
-
-static GList *
-add_recipients (GList *list, const char *recips, gboolean decode)
-{
-	int len;
-	char *addr;
-
-	while (*recips) {
-		len = strcspn (recips, ",");
-		if (len) {
-			addr = g_strndup (recips, len);
-			if (decode)
-				camel_url_decode (addr);
-			list = g_list_append (list, addr);
-		}
-		recips += len;
-		if (*recips == ',')
-			recips++;
-	}
-
-	return list;
-}
-
-static void
-free_recipients (GList *list)
-{
-	GList *l;
-
-	for (l = list; l; l = l->next)
-		g_free (l->data);
-	g_list_free (list);
-}
-
-/**
- * e_msg_composer_new_from_url:
- * @url: a mailto URL
- *
- * Create a new message composer widget, and fill in fields as
- * defined by the provided URL.
- **/
-GtkWidget *
-e_msg_composer_new_from_url (const char *url)
-{
-	EMsgComposer *composer;
-	EMsgComposerHdrs *hdrs;
-	GList *to = NULL, *cc = NULL, *bcc = NULL;
-	char *subject = NULL, *body = NULL;
-	const char *p, *header;
-	int len, clen;
-	char *content;
-
-	g_return_val_if_fail (strncasecmp (url, "mailto:", 7) == 0, NULL);
-
-	/* Parse recipients (everything after ':' until '?' or eos. */
-	p = url + 7;
-	len = strcspn (p, "?,");
-	if (len) {
-		content = g_strndup (p, len);
-		to = add_recipients (to, content, TRUE);
-		g_free (content);
-	}
-
-	p += len;
-	if (*p == '?') {
-		p++;
-
-		while (*p) {
-			len = strcspn (p, "=&");
-
-			/* If it's malformed, give up. */
-			if (p[len] != '=')
-				break;
-
-			header = p;
-			p += len + 1;
-
-			clen = strcspn (p, "&");
-			content = g_strndup (p, clen);
-			camel_url_decode (content);
-
-			if (!strncasecmp (header, "to", len))
-				to = add_recipients (to, content, FALSE);
-			else if (!strncasecmp (header, "cc", len))
-				cc = add_recipients (cc, content, FALSE);
-			else if (!strncasecmp (header, "bcc", len))
-				bcc = add_recipients (bcc, content, FALSE);
-			else if (!strncasecmp (header, "subject", len))
-				subject = g_strdup (content);
-			else if (!strncasecmp (header, "body", len))
-				body = g_strdup (content);
-
-			g_free (content);
-			p += clen;
-			if (*p == '&') {
-				p++;
-				if (!strcmp (p, "amp;"))
-					p += 4;
-			}
-		}
-	}
-		
-	composer = E_MSG_COMPOSER (e_msg_composer_new ());
-	hdrs = E_MSG_COMPOSER_HDRS (composer->hdrs);
-	e_msg_composer_hdrs_set_to (hdrs, to);
-	free_recipients (to);
-	e_msg_composer_hdrs_set_cc (hdrs, cc);
-	free_recipients (cc);
-	e_msg_composer_hdrs_set_bcc (hdrs, bcc);
-	free_recipients (bcc);
-	if (subject) {
-		e_msg_composer_hdrs_set_subject (hdrs, subject);
-		g_free (subject);
-	}
-
-	if (body) {
-		char *htmlbody = e_text_to_html (body, E_TEXT_TO_HTML_PRE);
-		set_editor_text (BONOBO_WIDGET (composer->editor), htmlbody);
-		g_free (htmlbody);
-	}
-
-	return GTK_WIDGET (composer);
-}
-
-
-
-/**
- * e_msg_composer_show_attachments:
- * @composer: A message composer widget
- * @show: A boolean specifying whether the attachment bar should be shown or
- * not
- * 
- * If @show is %FALSE, hide the attachment bar.  Otherwise, show it.
- **/
-void
-e_msg_composer_show_attachments (EMsgComposer *composer,
-				 gboolean show)
-{
-	g_return_if_fail (composer != NULL);
-	g_return_if_fail (E_IS_MSG_COMPOSER (composer));
-
-	show_attachments (composer, show);
-}
-
-
-/**
- * e_msg_composer_set_headers:
- * @composer: a composer object
- * @to: the values for the "To" header
- * @cc: the values for the "Cc" header
- * @bcc: the values for the "Bcc" header
- * @subject: the value for the "Subject" header
- *
- * Sets the headers in the composer to the given values.
- **/
-void 
-e_msg_composer_set_headers (EMsgComposer *composer, const GList *to,
-			    const GList *cc, const GList *bcc,
-			    const char *subject)
-{
-	EMsgComposerHdrs *hdrs;
-
-	g_return_if_fail (E_IS_MSG_COMPOSER (composer));
-	hdrs = E_MSG_COMPOSER_HDRS (composer->hdrs);
-
-	e_msg_composer_hdrs_set_to (hdrs, to);
-	e_msg_composer_hdrs_set_cc (hdrs, cc);
-	e_msg_composer_hdrs_set_bcc (hdrs, bcc);
-	e_msg_composer_hdrs_set_subject (hdrs, subject);
-}
-
-
-/**
- * e_msg_composer_set_body_text:
- * @composer: a composer object
- * @text: the HTML text to initialize the editor with
- *
- * Loads the given HTML text into the editor.
- **/
-void
-e_msg_composer_set_body_text (EMsgComposer *composer, const char *text)
-{
-	g_return_if_fail (E_IS_MSG_COMPOSER (composer));
-
-	set_editor_text (BONOBO_WIDGET (composer->editor), text);
-}
-
-
-/**
- * e_msg_composer_add_header:
- * @composer: a composer object
- * @name: the header name
- * @value: the header value
- *
- * Adds a header with @name and @value to the message. This header
- * may not be displayed by the composer, but will be included in
- * the message it outputs.
- **/
-void
-e_msg_composer_add_header (EMsgComposer *composer, const char *name,
-			   const char *value)
-{
-	g_return_if_fail (E_IS_MSG_COMPOSER (composer));
-	g_return_if_fail (name != NULL);
-	g_return_if_fail (value != NULL);
-
-	g_ptr_array_add (composer->extra_hdr_names, g_strdup (name));
-	g_ptr_array_add (composer->extra_hdr_values, g_strdup (value));
-}
-
-
-/**
- * e_msg_composer_get_message:
- * @composer: A message composer widget
- * 
- * Retrieve the message edited by the user as a CamelMimeMessage.  The
- * CamelMimeMessage object is created on the fly; subsequent calls to this
- * function will always create new objects from scratch.
- * 
- * Return value: A pointer to the new CamelMimeMessage object
- **/
-CamelMimeMessage *
-e_msg_composer_get_message (EMsgComposer *composer)
-{
-	g_return_val_if_fail (composer != NULL, NULL);
-	g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), NULL);
-
-	return build_message (composer);
-}
diff --git a/composer/e-msg-composer.h b/composer/e-msg-composer.h
deleted file mode 100644
index cc3826ab67..0000000000
--- a/composer/e-msg-composer.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-msg-composer.h
- *
- * Copyright (C) 1999  Helix Code, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * 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., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Author: Ettore Perazzoli
- */
-
-#ifndef ___E_MSG_COMPOSER_H__
-#define ___E_MSG_COMPOSER_H__
-
-#include 
-#include 
-
-#include "e-msg-composer-attachment-bar.h"
-#include "e-msg-composer-hdrs.h"
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-
-#define E_TYPE_MSG_COMPOSER	       (e_msg_composer_get_type ())
-#define E_MSG_COMPOSER(obj)	       (GTK_CHECK_CAST ((obj), E_TYPE_MSG_COMPOSER, EMsgComposer))
-#define E_MSG_COMPOSER_CLASS(klass)    (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_MSG_COMPOSER, EMsgComposerClass))
-#define E_IS_MSG_COMPOSER(obj)	       (GTK_CHECK_TYPE ((obj), E_TYPE_MSG_COMPOSER))
-#define E_IS_MSG_COMPOSER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_MSG_COMPOSER))
-
-
-typedef struct _EMsgComposer       EMsgComposer;
-typedef struct _EMsgComposerClass  EMsgComposerClass;
-
-struct _EMsgComposer {
-	GnomeApp parent;
-
-	BonoboUIHandler *uih;
-
-	GtkWidget *hdrs;
-	GPtrArray *extra_hdr_names, *extra_hdr_values;
-
-	GtkWidget *editor;
-
-	GtkWidget *attachment_bar;
-	GtkWidget *attachment_scrolled_window;
-
-	GtkWidget *address_dialog;
-
-	gboolean attachment_bar_visible : 1;
-};
-
-struct _EMsgComposerClass {
-	GnomeAppClass parent_class;
-
-	void (* send) (EMsgComposer *composer);
-	void (* postpone) (EMsgComposer *composer);
-};
-
-
-GtkType           e_msg_composer_get_type          (void);
-
-void              e_msg_composer_construct         (EMsgComposer *composer);
-GtkWidget        *e_msg_composer_new               (void);
-GtkWidget        *e_msg_composer_new_from_url      (const char *url);
-void              e_msg_composer_show_attachments  (EMsgComposer *composer,
-						    gboolean      show);
-
-void              e_msg_composer_set_headers       (EMsgComposer *composer,
-						    const GList *to,
-						    const GList *cc,
-						    const GList *bcc,
-						    const char *subject);
-void              e_msg_composer_set_body_text     (EMsgComposer *composer,
-						    const char *text);
-void              e_msg_composer_add_header        (EMsgComposer *composer,
-						    const char *name,
-						    const char *value);
-
-CamelMimeMessage *e_msg_composer_get_message       (EMsgComposer *composer);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* ___E_MSG_COMPOSER_H__ */
diff --git a/composer/main.c b/composer/main.c
deleted file mode 100644
index 9a29e95666..0000000000
--- a/composer/main.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-
-#include 
-#include 
-#include 
-
-#include 
-
-#include 
-#include 
-#include 
-
-#include "e-msg-composer.h"
-
-static void
-send_cb (EMsgComposer *composer,
-	 gpointer data)
-{
-	CamelMimeMessage *message;
-	CamelStream *stream;
-	gint stdout_dup;
-
-	message = e_msg_composer_get_message (composer);
-
-	stdout_dup = dup (1);
-	stream = camel_stream_fs_new_with_fd (stdout_dup);
-	camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (message),
-					    stream);
-	camel_stream_close (stream);
-
-	gtk_object_unref (GTK_OBJECT (message));
-
-#if 0
-	gtk_widget_destroy (GTK_WIDGET (composer));
-	gtk_main_quit ();
-#endif
-}
-
-static guint
-create_composer (void)
-{
-	GtkWidget *composer;
-
-	composer = e_msg_composer_new ();
-	gtk_widget_show (composer);
-
-	gtk_signal_connect (GTK_OBJECT (composer), "send", GTK_SIGNAL_FUNC (send_cb), NULL);
-
-	return FALSE;
-}
-
-int
-main (int argc, char **argv)
-{
-	CORBA_Environment ev;
-	CORBA_ORB orb;
-
-	CORBA_exception_init (&ev);
-	gnome_CORBA_init ("evolution-test-msg-composer", "0.0", &argc, argv, 0, &ev);
-	CORBA_exception_free (&ev);
-
-	orb = gnome_CORBA_ORB ();
-
-	glade_gnome_init ();
-
-	if (bonobo_init (orb, NULL, NULL) == FALSE)
-		g_error ("Could not initialize Bonobo\n");
-
-	/* We can't make any CORBA calls unless we're in the main loop.  So we
-	   delay creating the container here. */
-	gtk_idle_add ((GtkFunction) create_composer, NULL);
-
-	bonobo_main ();
-
-	return 0;
-}
diff --git a/configure.in b/configure.in
deleted file mode 100644
index 69eb16417c..0000000000
--- a/configure.in
+++ /dev/null
@@ -1,486 +0,0 @@
-# Process this file with autoconf to produce a configure script.
-AC_INIT(camel)
-AM_CONFIG_HEADER(config.h)
-
-cflags_set=${CFLAGS+set}
-
-EVOLUTION_MAJOR_VERSION=0
-EVOLUTION_MINOR_VERSION=0
-EVOLUTION_MICRO_VERSION=0
-VERSION=$EVOLUTION_MINOR_VERSION.$EVOLUTION_MICRO_VERSION
-PACKAGE=evolution
-
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
-AC_SUBST(VERSION)
-
-
-dnl Initialize libtool
-AM_PROG_LIBTOOL
-
-dnl Initialize maintainer mode
-AM_MAINTAINER_MODE
-
-AC_CANONICAL_HOST
-
-AM_ACLOCAL_INCLUDE(macros)
-GNOME_INIT(capplet)
-GNOME_COMPILE_WARNINGS
-AC_ISC_POSIX
-AC_PROG_CC
-AC_PROG_CPP
-AM_PROG_LEX
-AC_PROG_YACC
-AC_STDC_HEADERS
-AC_ARG_PROGRAM
-AC_PROG_INSTALL
-AC_PROG_LN_S
-AC_PROG_MAKE_SET
-
-AC_PATH_PROG(SENDMAIL, sendmail, /usr/sbin/sendmail, /usr/sbin:/usr/lib)
-AC_DEFINE_UNQUOTED(SENDMAIL_PATH, "$SENDMAIL")
-
-AC_MSG_CHECKING(system mail directory)
-if test -d /var/mail; then
-	system_mail_dir=/var/mail
-else
-	system_mail_dir=/var/spool/mail
-fi
-AC_MSG_RESULT($system_mail_dir)
-AC_DEFINE_UNQUOTED(SYSTEM_MAIL_DIR, "$system_mail_dir")
-
-dnl Check for new enough gnome-libs
-CFLAGS_save=$CFLAGS
-LIBS_save=$LIBS
-CFLAGS=`gnome-config --cflags gnomeui`
-LIBS=`gnome-config --libs gnomeui`
-
-AC_CHECK_LIB(gnomeui, gnome_window_icon_set_default_from_file, ,[
-AC_MSG_ERROR(gnome-libs 1.0.59 or higher is required.)])
-
-CFLAGS=$CFLAGS_save
-LIBS=$LIBS_save
-
-ALL_LINGUAS="da el fr gl hu ja ko nl no ru sv tr uk es"
-
-AM_GNOME_GETTEXT
-
-GNOME_X_CHECKS
-
-dnl
-dnl Purify support
-dnl
-AC_ARG_ENABLE(purify, 
-[  --enable-purify=[no/yes]      Enable support for building executables with
-                                Purify.],,enable_purify=no)
-AC_PATH_PROG(PURIFY, purify, impure)
-AC_ARG_WITH(purify-options, [  --with-purify-options=OPTIONS      Options passed to the purify command line (defaults to PURIFYOPTIONS variable).])
-if test "x$with_purify_options" = "xno"; then
-  with_purify_options="-always-use-cache-dir=yes -cache-dir=/gnome/lib/purify"
-fi
-if test "x$PURIFYOPTIONS" = "x"; then
-  PURIFYOPTIONS=$with_purify_options
-fi
-AC_SUBST(PURIFY)
-AM_CONDITIONAL(ENABLE_PURIFY, test "x$enable_purify" = "xyes" -a "x$PURIFY" != "ximpure")
-PURIFY="$PURIFY $PURIFYOPTIONS"
-
-dnl * Time zone stuff
-AC_CACHE_CHECK(for timezone variable, ac_cv_var_timezone,
-	AC_TRY_COMPILE([
-		#include 
-	], [
-		timezone = 1;
-	], ac_cv_var_timezone=yes, ac_cv_var_timezone=no))
-if test $ac_cv_var_timezone = yes; then
-	AC_DEFINE(HAVE_TIMEZONE)
-else
-	AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff,
-		AC_TRY_COMPILE([
-			#include 
-			], [
-			struct tm tm;
-			tm.tm_gmtoff = 1;
-			], ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no))
-	if test $ac_cv_struct_tm_gmtoff = yes; then
-		AC_DEFINE(HAVE_TM_GMTOFF)
-	else
-		AC_ERROR(unable to find a way to determine timezone)
-	fi
-fi
-
-AC_CHECK_FUNCS(mkstemp)
-
-dnl **************************************************
-dnl * pas-backend-file stuff.
-dnl * check for db_185.h.  if it's there, we use it.
-dnl * otherwise, we use db.h (since it'll be 185).
-dnl **************************************************
-AC_CHECK_HEADERS(db_185.h)
-
-dnl **************************************************
-dnl * ldap related stuff.
-dnl **************************************************
-AC_CHECK_LIB(lber, ber_get_tag, LDAP_LIBS="-llber")
-if test x$ac_cv_lib_lber_ber_get_tag = xyes; then
-AC_CHECK_LIB(ldap, ldap_open, LDAP_LIBS="-lldap $LDAP_LIBS", ,-llber)
-fi
-if test x$ac_cv_lib_ldap_ldap_open = xyes; then
-	AC_DEFINE(HAVE_LDAP)
-	AC_SUBST(LDAP_LIBS)
-else
-	AC_MSG_WARN(no ldap support present)
-fi
-AM_CONDITIONAL(ENABLE_LDAP, test x$ac_cv_lib_ldap_ldap_open = xyes)
-
-dnl **************************************************
-dnl * Posix thread support
-dnl **************************************************
-
-have_pthread=false
-
-AC_ARG_WITH(threads, [  --with-threads          Include thread support],[
-        if test x$withval = xyes; then
-              test_thread=true
-        else
-              test_thread=false
-	fi
-],[
-	test_thread=false
-])
-
-if $test_thread; then
-     GNOME_PTHREAD_CHECK
-     if test "x$PTHREAD_LIB" = "x" ; then
-         have_pthread=false
-     else
-         have_pthread=true
-     fi
-else
-     have_pthread=false
-fi
-
-AM_CONDITIONAL(ENABLE_THREADS, $have_pthread)
-
-dnl
-dnl Notice that this is a hack, and we wont be able to use this forever, but
-dnl at least for some time
-dnl
-if $have_pthread; then 
- 	THREADS_LIBS="$PTHREAD_LIB `glib-config --libs gthread`"
-	THREADS_CFLAGS="`glib-config --cflags gthread`"
-else
-	THREADS_LIBS=""
-	THREADS_CFLAGS=""
-fi
-
-
-dnl **************************************************
-dnl * Print check
-dnl **************************************************
-AC_MSG_CHECKING(for GnomePrint libraries >= 0.13)
-if gnome-config --libs print > /dev/null 2>&1; then 
-    vers=`gnome-config --modversion print | sed -e "s/gnome-print-//" | \
-        awk 'BEGIN { FS = "."; } { print $1 * 1000 + $2;}'`
-    if test "$vers" -ge 13; then
-        AC_MSG_RESULT(found)
-    else
-        AC_MSG_ERROR(You need at least GNOME print 0.13)
-    fi
-else
-    AC_MSG_ERROR(Did not find GnomePrint installed)
-fi
-GNOME_PRINT_LIBS=`gnome-config --libs print`
-GNOME_PRINT_CFLAGS=`gnome-config --cflags print`
-AC_SUBST(GNOME_PRINT_LIBS)
-AC_SUBST(GNOME_PRINT_CFLAGS)
-
-dnl **************************************************
-dnl * ORBit support
-dnl **************************************************
-dnl GNOMEGNORBA_LIBS="$GNOMEGNORBA_LIBS"
-dnl AC_SUBST(GNOMEGNORBA_LIBS)
-
-
-dnl ******************************
-dnl Check for Bonobo
-dnl ******************************
-AC_MSG_CHECKING(for Bonobo >= 0.10)
-if gnome-config --libs bonobo > /dev/null 2>&1; then
-	vers=`gnome-config --modversion bonobo`
-	case $vers
-	in
-	    bonobo-0.?) bonobo_ok=false ;;
-	    *) bonobo_ok=true ;;
-	esac
-else
-	bonobo_ok=false
-fi
-
-if $bonobo_ok; then
-	AC_MSG_RESULT($vers found)
-else
-	AC_MSG_ERROR(Bonobo 0.10 is required to compile Evolution)
-fi
-
-
-dnl ******************************
-dnl LibGlade checking
-dnl ******************************
-AC_MSG_CHECKING(For Glade libraries)
-if gnome-config --libs libglade > /dev/null 2>&1; then 
-    AC_MSG_RESULT(found)
-else
-    AC_MSG_ERROR(Did not find libGlade installed)
-fi
-
-dnl ******************************
-dnl libunicode checking
-dnl ******************************
-AC_MSG_CHECKING(For libunicode)
-if unicode-config --libs > /dev/null 2>&1; then 
-    UNICODE_LIBS=`unicode-config --libs`
-    UNICODE_CFLAGS=`unicode-config --cflags`
-    AC_SUBST(UNICODE_LIBS)
-    AC_SUBST(UNICODE_CFLAGS)
-    AC_MSG_RESULT(found)
-else
-    AC_MSG_ERROR(libunicode not found)
-fi
-
-dnl ******************************
-dnl GdkPixbuf checking
-dnl ******************************
-AC_MSG_CHECKING(For Gdkpixbuf libraries)
-if gnome-config --libs gdk_pixbuf gnomecanvaspixbuf > /dev/null 2>&1; then 
-    AC_MSG_RESULT(found)
-else
-    AC_MSG_ERROR(Did not find gdkpixbuf installed)
-fi
-
-GLIB_CFLAGS="`glib-config --cflags`"
-GLIB_LIBS="`glib-config --libs`"
-
-AC_SUBST(GLIB_CFLAGS)
-AC_SUBST(GLIB_LIBS)
-
-
-EXTRA_GNOME_LIBS="`gnome-config --libs libglade gdk_pixbuf gnomecanvaspixbuf gnomeui ` $THREADS_LIBS `unicode-config --libs`"
-EXTRA_GNOME_CFLAGS="`gnome-config --cflags libglade gdk_pixbuf gnomecanvaspixbuf gnomeui ` $THREADS_CFLAGS `unicode-config --cflags`"
-
-AC_SUBST(EXTRA_GNOME_LIBS)
-AC_SUBST(EXTRA_GNOME_CFLAGS)
-
-
-BONOBO_GNOME_LIBS="`gnome-config --libs bonobo libglade gdk_pixbuf gnomecanvaspixbuf gnomeui`"
-BONOBO_GNOME_CFLAGS="`gnome-config --cflags bonobo libglade gdk_pixbuf gnomecanvaspixbuf gnomeui `"
-AC_SUBST(BONOBO_GNOME_LIBS)
-AC_SUBST(BONOBO_GNOME_CFLAGS)
-
-BONOBO_HTML_GNOME_LIBS="`gnome-config --libs bonobo libglade gdk_pixbuf gtkhtml gnomecanvaspixbuf gnomeui ` $THREAD_LIBS"
-BONOBO_HTML_GNOME_CFLAGS="`gnome-config --cflags bonobo libglade gdk_pixbuf gtkhtml gnomecanvaspixbuf gnomeui ` $THREAD_CFLAGS"
-AC_SUBST(BONOBO_HTML_GNOME_LIBS)
-AC_SUBST(BONOBO_HTML_GNOME_CFLAGS)
-
-dnl ******************************
-dnl GtkHTML checking
-dnl ******************************
-
-AC_MSG_CHECKING(for GtkHTML)
-if gnome-config --libs gtkhtml > /dev/null 2>&1; then
-	vers=`gnome-config --modversion gtkhtml`
-	case $vers
-	in
-	    gtkhtml-0.1) gtkhtml_ok=false ;;
-	    *) gtkhtml_ok=true ;;
-	esac
-else
-	gtkhtml_ok=false
-fi
-
-if $gtkhtml_ok; then
-	AC_MSG_RESULT($vers found)
-else
-	AC_MSG_ERROR(GtkHTML 0.2 or later is required to compile Evolution)
-fi
-
-GTKHTML_CFLAGS="`gnome-config --cflags gtkhtml`"
-GTKHTML_LIBS="`gnome-config --libs gtkhtml`"
-
-AC_SUBST(GTKHTML_CFLAGS)
-AC_SUBST(GTKHTML_LIBS)
-
-dnl ******************************
-dnl Gnome-VFS checking
-dnl ******************************
-AC_MSG_CHECKING(for GNOME-VFS)
-if gnome-config --libs vfs > /dev/null 2>&1; then
-	vfs_ok=true
-else
-	vfs_ok=false
-fi
-
-if $vfs_ok; then
-	AC_MSG_RESULT(found)
-else
-	AC_MSG_ERROR(GNOME-VFS is required to compile Evolution)
-fi
-
-BONOBO_VFS_GNOME_LIBS="`gnome-config --libs bonobo libglade gdk_pixbuf gnomecanvaspixbuf vfs gnomeui `"
-BONOBO_VFS_GNOME_CFLAGS="`gnome-config --cflags bonobo libglade gdk_pixbuf gnomecanvaspixbuf vfs gnomeui `"
-AC_SUBST(BONOBO_VFS_GNOME_LIBS)
-AC_SUBST(BONOBO_VFS_GNOME_CFLAGS)
-
-dnl ******************************
-dnl Pilot checking
-dnl ******************************
-dnl GNOME_PILOT_CHECK
-
-
-dnl ******
-dnl XML
-dnl ******
-GNOME_XML_CHECK
-
-AC_SUBST(CAPPLET_LIBS)
-
-dnl ******************************
-dnl Whether to use OAF
-dnl ******************************
-
-AC_MSG_CHECKING(if Bonobo uses OAF)
-if ( gnome-config --libs bonobo | grep oaf ) > /dev/null 2>&1 ; then
-	enable_oaf="yes"
-else
-	enable_oaf="no"
-fi
-
-AC_MSG_RESULT("$enable_oaf")
-
-if test "x$enable_oaf" = "xyes"; then
-        AC_PATH_PROG(OAF_CONFIG,oaf-config,no)
-        if test x$OAF_CONFIG = xno; then
-                AC_MSG_ERROR("You enabled OAF support but oaf-config was not found")
-        else
-                OAF_LIBS=`$OAF_CONFIG --libs`
-                OAF_CFLAGS=`$OAF_CONFIG --cflags`
-                GNORBA_LIBNAME=
-        fi
-else
-        OAF_LIBS=
-        OAF_CFLAGS=
-        GNORBA_LIBNAME=gnorba
-fi
-
-AC_SUBST(OAF_LIBS)
-AC_SUBST(OAF_CFLAGS)
-
-AM_CONDITIONAL(USING_OAF, test "x$enable_oaf" = "xyes")
-
-if test "x$enable_oaf" = "xyes"; then
-	AC_DEFINE(USING_OAF)
-	BONOBO_GNOME_LIBS="`oaf-config --libs` $BONOBO_GNOME_LIBS"
-	BONOBO_GNOME_CFLAGS="`oaf-config --cflags ` $BONOBO_GNOME_CFLAGS"
-fi
-
-dnl ********
-dnl Kerberos
-dnl ********
-AC_ARG_WITH(krb5, [  --with-krb5=PREFIX      Location of Kerberos 5 libs/includes])
-AC_ARG_WITH(krb4, [  --with-krb4=PREFIX      Location of Kerberos 4 libs/includes])
-AC_MSG_CHECKING(for Kerberos 5)
-AC_MSG_RESULT(${with_krb5:=no})
-if test x$with_krb5 != xno; then
-	KRB5_CFLAGS="-I$with_krb5/include/krb5"
-	KRB5_LDFLAGS="-L$with_krb5/lib -lkrb5 -lk5crypto -lcom_err"
-	AC_DEFINE(HAVE_KRB5)
-fi
-AC_MSG_CHECKING(for Kerberos 4)
-AC_MSG_RESULT(${with_krb4:=no})
-if test x$with_krb4 != xno; then
-	KRB4_CFLAGS="-I$with_krb4/include -I$with_krb4/include/kerberosIV $KRB5_CFLAGS"
-	save_LDFLAGS="$LDFLAGS"
-	LDFLAGS="$LDFLAGS -L$with_krb4/lib"
-	AC_CHECK_LIB(krb, krb_mk_req,
-		[KRB4_LDFLAGS="-L$with_krb4/lib -lkrb -ldes"],
-		[KRB4_LDFLAGS="-L$with_krb4/lib -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"],
-		-ldes)
-	LDFLAGS="$save_LDFLAGS"
-	AC_DEFINE(HAVE_KRB4)
-fi
-AC_SUBST(KRB5_CFLAGS)
-AC_SUBST(KRB5_LDFLAGS)
-AC_SUBST(KRB4_CFLAGS)
-AC_SUBST(KRB4_LDFLAGS)
-
-
-dnl ******************************
-dnl Makefiles
-dnl ******************************
-
-AC_CONFIG_SUBDIRS(libical)
-
-AC_OUTPUT([
-Makefile
-evolution.spec
-macros/Makefile
-intl/Makefile
-po/Makefile.in
-e-util/Makefile
-libibex/Makefile
-camel/Makefile
-camel/providers/Makefile
-camel/providers/mbox/Makefile
-camel/providers/pop3/Makefile
-camel/providers/sendmail/Makefile
-camel/providers/smtp/Makefile
-camel/providers/vee/Makefile
-composer/Makefile
-widgets/Makefile
-widgets/e-paned/Makefile
-widgets/e-table/Makefile
-widgets/e-text/Makefile
-widgets/meeting-time-sel/Makefile
-widgets/misc/Makefile
-widgets/shortcut-bar/Makefile
-addressbook/Makefile
-addressbook/ename/Makefile
-addressbook/contact-editor/Makefile
-addressbook/printing/Makefile
-addressbook/backend/Makefile
-addressbook/backend/idl/Makefile
-addressbook/backend/pas/Makefile
-addressbook/backend/ebook/Makefile
-addressbook/gui/Makefile
-addressbook/gui/minicard/Makefile
-addressbook/gui/component/Makefile
-shell/Makefile
-mail/Makefile
-data/Makefile
-libversit/Makefile
-libibex/Makefile
-calendar/Makefile
-calendar/doc/Makefile
-calendar/doc/C/Makefile
-calendar/idl/Makefile
-calendar/cal-util/Makefile
-calendar/cal-client/Makefile
-calendar/pcs/Makefile
-calendar/gui/Makefile
-calendar/gui/dialogs/Makefile
-filter/Makefile
-wombat/Makefile
-art/Makefile
-default_user/Makefile
-default_user/local/Makefile
-default_user/local/Calendar/Makefile
-default_user/local/Contacts/Makefile
-default_user/local/Directories/Makefile
-default_user/local/Directories/subfolders/Makefile
-default_user/local/Directories/subfolders/Bigfoot/Makefile
-default_user/local/Directories/subfolders/Netcenter/Makefile
-default_user/local/Drafts/Makefile
-default_user/local/Inbox/Makefile
-default_user/local/Outbox/Makefile
-default_user/local/Trash/Makefile
-tools/Makefile
-])
diff --git a/data/.cvsignore b/data/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/data/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/data/Makefile.am b/data/Makefile.am
deleted file mode 100644
index 1ae1b2443e..0000000000
--- a/data/Makefile.am
+++ /dev/null
@@ -1,2 +0,0 @@
-EXTRA_DIST = \
-	evolution.desktop
\ No newline at end of file
diff --git a/data/evolution.desktop b/data/evolution.desktop
deleted file mode 100644
index da37bb15fb..0000000000
--- a/data/evolution.desktop
+++ /dev/null
@@ -1,14 +0,0 @@
-[Desktop Entry]
-Name=Evolution
-Name[da]=Evolution
-Name[lt]=Evolution
-Name[no]=Evolution
-Name[ru]=ü×ÏÌÀÃÉÑ
-Comment=Mail, Contacts and Task.
-Comment[da]=E-post, kontakter og opgaver.
-Comment[lt]=El. paðtas, adresai ir uþduotys
-Comment[no]=E-post, kontakter og oppgaver.
-Comment[ru]=üÌ.ÐÏÞÔÁ, ËÏÎÔÁËÔÙ É ÚÁÄÁÎÉÑ.
-Exec=evolution
-Terminal=0
-Type=Application
diff --git a/default_user/.cvsignore b/default_user/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/default_user/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/default_user/ChangeLog b/default_user/ChangeLog
deleted file mode 100644
index 545a0a3233..0000000000
--- a/default_user/ChangeLog
+++ /dev/null
@@ -1,37 +0,0 @@
-2000-05-10  Matt Loper  
-
-	* local/Inbox/mbox (Content-Transfer-Encoding): Commented out
-	currently unimplemented shortcut items.
-
-2000-05-10  Christopher James Lahey  
-
-	* Makefile.am, local/Calendar/Makefile.am,
-	local/Contacts/Makefile.am, local/Directories/Makefile.am,
-	local/Directories/subfolders/Bigfoot/Makefile.am,
-	local/Directories/subfolders/Netcenter/Makefile.am,
-	local/Drafts/Makefile.am, local/Inbox/Makefile.am,
-	local/Outbox/Makefile.am, local/Trash/Makefile.am: Created a
-	proper EXTRA_DIST section.
-
-2000-05-09  Christopher James Lahey  
-
-	* local/Directories/subfolders/Bigfoot/.cvsignore: New .cvsignore
-	file.
-
-2000-05-09  Christopher James Lahey  
-
-	* local/Contacts/Makefile.am, local/Contacts/addressbook.db:
-	Removed addressbook.db since this is now handled by the pas.
-
-2000-05-08  Matt Loper  
-
-	* shortcuts.xml: Removed unused shortcuts which point to
-	unimplemented folders.
-
-2000-05-08  Christopher James Lahey  
-
-	* local/Contacts/Makefile.am: Install `addressbook.db'.
-
-000-05-06  Ettore Perazzoli  
-
-	* default_user/local/Inbox/Makefile.am: Install `mbox'.
diff --git a/default_user/Makefile.am b/default_user/Makefile.am
deleted file mode 100644
index 2669874e5f..0000000000
--- a/default_user/Makefile.am
+++ /dev/null
@@ -1,6 +0,0 @@
-SUBDIRS = local
-
-defaultdir = $(prefix)/share/evolution/default_user
-default_DATA = shortcuts.xml
-
-EXTRA_DIST = $(default_DATA)
diff --git a/default_user/local/.cvsignore b/default_user/local/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/default_user/local/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/default_user/local/Calendar/.cvsignore b/default_user/local/Calendar/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/default_user/local/Calendar/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/default_user/local/Calendar/Makefile.am b/default_user/local/Calendar/Makefile.am
deleted file mode 100644
index 9117ae6373..0000000000
--- a/default_user/local/Calendar/Makefile.am
+++ /dev/null
@@ -1,3 +0,0 @@
-defaultcalendardir = $(datadir)/evolution/default_user/local/Calendar
-defaultcalendar_DATA = folder-metadata.xml
-EXTRA_DIST = $(defaultcalendar_DATA)
diff --git a/default_user/local/Calendar/folder-metadata.xml b/default_user/local/Calendar/folder-metadata.xml
deleted file mode 100644
index 9313cb5f50..0000000000
--- a/default_user/local/Calendar/folder-metadata.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-	calendar
-	Calendar items
-
diff --git a/default_user/local/Contacts/.cvsignore b/default_user/local/Contacts/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/default_user/local/Contacts/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/default_user/local/Contacts/Makefile.am b/default_user/local/Contacts/Makefile.am
deleted file mode 100644
index 6c0407f9e4..0000000000
--- a/default_user/local/Contacts/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-defaultcalendardir = $(datadir)/evolution/default_user/local/Contacts
-defaultcalendar_DATA =		\
-	folder-metadata.xml
-EXTRA_DIST = $(defaultcalendar_DATA)
diff --git a/default_user/local/Contacts/folder-metadata.xml b/default_user/local/Contacts/folder-metadata.xml
deleted file mode 100644
index dcee1ec826..0000000000
--- a/default_user/local/Contacts/folder-metadata.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-	contacts
-	Contacts
-
diff --git a/default_user/local/Directories/.cvsignore b/default_user/local/Directories/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/default_user/local/Directories/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/default_user/local/Directories/Makefile.am b/default_user/local/Directories/Makefile.am
deleted file mode 100644
index 64eb44d5b4..0000000000
--- a/default_user/local/Directories/Makefile.am
+++ /dev/null
@@ -1,9 +0,0 @@
-defaultdirectorydir = $(datadir)/evolution/default_user/local/Directories
-
-defaultdirectory_DATA = 		\
-	folder-metadata.xml
-
-SUBDIRS= subfolders
-
-EXTRA_DIST = $(defaultdirectory_DATA)
-
diff --git a/default_user/local/Directories/folder-metadata.xml b/default_user/local/Directories/folder-metadata.xml
deleted file mode 100644
index 23b773838a..0000000000
--- a/default_user/local/Directories/folder-metadata.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-	contacts
-	Internet Directory Servers
-
diff --git a/default_user/local/Directories/subfolders/.cvsignore b/default_user/local/Directories/subfolders/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/default_user/local/Directories/subfolders/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/default_user/local/Directories/subfolders/Bigfoot/.cvsignore b/default_user/local/Directories/subfolders/Bigfoot/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/default_user/local/Directories/subfolders/Bigfoot/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/default_user/local/Directories/subfolders/Bigfoot/Makefile.am b/default_user/local/Directories/subfolders/Bigfoot/Makefile.am
deleted file mode 100644
index 67f2f55a2a..0000000000
--- a/default_user/local/Directories/subfolders/Bigfoot/Makefile.am
+++ /dev/null
@@ -1,7 +0,0 @@
-defaultdirectorydir = $(datadir)/evolution/default_user/local/Directories/subfolders/Bigfoot
-
-defaultdirectory_DATA = 		\
-	folder-metadata.xml		\
-	uri
-
-EXTRA_DIST = $(defaultdirectory_DATA)
diff --git a/default_user/local/Directories/subfolders/Bigfoot/folder-metadata.xml b/default_user/local/Directories/subfolders/Bigfoot/folder-metadata.xml
deleted file mode 100644
index 905fcbe84a..0000000000
--- a/default_user/local/Directories/subfolders/Bigfoot/folder-metadata.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-	contacts
-	Bigfoot
-
diff --git a/default_user/local/Directories/subfolders/Bigfoot/uri b/default_user/local/Directories/subfolders/Bigfoot/uri
deleted file mode 100644
index fd658ed9b2..0000000000
--- a/default_user/local/Directories/subfolders/Bigfoot/uri
+++ /dev/null
@@ -1 +0,0 @@
-ldap://ldap.bigfoot.com/
\ No newline at end of file
diff --git a/default_user/local/Directories/subfolders/Makefile.am b/default_user/local/Directories/subfolders/Makefile.am
deleted file mode 100644
index 1dc5d5ce8e..0000000000
--- a/default_user/local/Directories/subfolders/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-defaultdirectorydir = $(datadir)/evolution/default_user/local/Directories/subfolders
-
-SUBDIRS= Bigfoot \
-	 Netcenter
diff --git a/default_user/local/Directories/subfolders/Netcenter/.cvsignore b/default_user/local/Directories/subfolders/Netcenter/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/default_user/local/Directories/subfolders/Netcenter/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/default_user/local/Directories/subfolders/Netcenter/Makefile.am b/default_user/local/Directories/subfolders/Netcenter/Makefile.am
deleted file mode 100644
index aca286c422..0000000000
--- a/default_user/local/Directories/subfolders/Netcenter/Makefile.am
+++ /dev/null
@@ -1,7 +0,0 @@
-defaultdirectorydir = $(datadir)/evolution/default_user/local/Directories/subfolders/Netcenter
-
-defaultdirectory_DATA = 		\
-	folder-metadata.xml		\
-	uri
-
-EXTRA_DIST = $(defaultdirectory_DATA)
diff --git a/default_user/local/Directories/subfolders/Netcenter/folder-metadata.xml b/default_user/local/Directories/subfolders/Netcenter/folder-metadata.xml
deleted file mode 100644
index c3292f4130..0000000000
--- a/default_user/local/Directories/subfolders/Netcenter/folder-metadata.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-	contacts
-	Netcenter
-
diff --git a/default_user/local/Directories/subfolders/Netcenter/uri b/default_user/local/Directories/subfolders/Netcenter/uri
deleted file mode 100644
index 6be98a814d..0000000000
--- a/default_user/local/Directories/subfolders/Netcenter/uri
+++ /dev/null
@@ -1 +0,0 @@
-ldap://memberdir.netscape.com/ou=member_directory,o=netcenter.com
\ No newline at end of file
diff --git a/default_user/local/Drafts/.cvsignore b/default_user/local/Drafts/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/default_user/local/Drafts/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/default_user/local/Drafts/Makefile.am b/default_user/local/Drafts/Makefile.am
deleted file mode 100644
index 144b8bb834..0000000000
--- a/default_user/local/Drafts/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-defaultcalendardir = $(datadir)/evolution/default_user/local/Drafts
-defaultcalendar_DATA = folder-metadata.xml
-
-EXTRA_DIST = $(defaultcalendar_DATA)
diff --git a/default_user/local/Drafts/folder-metadata.xml b/default_user/local/Drafts/folder-metadata.xml
deleted file mode 100644
index ee9cafe3b2..0000000000
--- a/default_user/local/Drafts/folder-metadata.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-	mail
-	Drafts
-
diff --git a/default_user/local/Inbox/.cvsignore b/default_user/local/Inbox/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/default_user/local/Inbox/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/default_user/local/Inbox/Makefile.am b/default_user/local/Inbox/Makefile.am
deleted file mode 100644
index ed3ecd58d4..0000000000
--- a/default_user/local/Inbox/Makefile.am
+++ /dev/null
@@ -1,7 +0,0 @@
-defaultcalendardir = $(datadir)/evolution/default_user/local/Inbox
-
-defaultcalendar_DATA = 		\
-	folder-metadata.xml	\
-	mbox
-
-EXTRA_DIST = $(defaultcalendar_DATA)
diff --git a/default_user/local/Inbox/folder-metadata.xml b/default_user/local/Inbox/folder-metadata.xml
deleted file mode 100644
index 64cfbadfc3..0000000000
--- a/default_user/local/Inbox/folder-metadata.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-	mail
-	Inbox folder
-
diff --git a/default_user/local/Inbox/mbox b/default_user/local/Inbox/mbox
deleted file mode 100644
index 83aa23fb57..0000000000
--- a/default_user/local/Inbox/mbox
+++ /dev/null
@@ -1,2230 +0,0 @@
-From -
-Return-Path: danw@helixcode.com
-Delivery-Date: Tue May  9 11:16:21 2000
-Received: from trna.helixcode.com (IDENT:root@trna.helixcode.com [140.239.238.2])
-	by twelve-monkeys.helixcode.com (8.9.3/8.9.3) with ESMTP id LAA26395
-	for ; Tue, 9 May 2000 11:16:21 -0400 (EDT)
-Received: from twelve-monkeys.helixcode.com (twelve-monkeys.helixcode.com [140.239.238.12])
-	by trna.helixcode.com (8.9.3/8.9.3) with ESMTP id LAA02867
-	for ; Tue, 9 May 2000 11:14:49 -0400
-Received: (from danw@localhost)
-	by twelve-monkeys.helixcode.com (8.9.3/8.9.3) id LAA26391;
-	Tue, 9 May 2000 11:16:21 -0400 (EDT)
-Message-Id: <200005091516.LAA26391@twelve-monkeys.helixcode.com>
-To: Eva Lucy Ann Tester 
-MIME-Version: 1.0
-Content-Type: multipart/related; boundary="----- =_aaaaaaaaaa0"
-Content-ID: <26389.957885364.0@twelve-monkeys.helixcode.com>
-Date: Tue, 09 May 2000 11:16:21 -0400
-From: "Helix Code, Inc." 
-Subject: Welcome to Evolution!
-
-------- =_aaaaaaaaaa0
-Content-Type: text/html; charset="us-ascii"
-Content-ID: <26389.957885364.1@twelve-monkeys.helixcode.com>
-Content-Transfer-Encoding: quoted-printable
-
-
-
-  
-    Welcome to Evolution Pre-Release!
-  
-
-  
-
- = - -
- = - -
- = - -

A warm welcome from the whole Evolution development - team. Thank you for helping us test Evolution; with - your feedback we can make it the best groupware suite - available today.

- = - -
= - - -

Getting Started

- -
- -

On the left of the Evolution window is the Shortcut Bar, with - icons labelled Inbox, Calendar, and Contacts. You can click on those icons to jump from one tool to - another.

- = - -
- = - - - -
Inbox
= - -
Click on this icon to see your email - all of it. Your - Inbox is also where you can access Evolution's powerful tools - to sort, filter, organize, and search your mail. -
- = - -
Calendar
Network - and share your calendar to keep your whole - organization on schedule and up to date.
- = - -
Contacts
= - -
The Contact manager holds your addresses, phone numbers, and - contact information. Like calendar information, contact data - can be synchronized with hand-held devices and shared over a - network.
- = - - - = - - - -
- = - -
- = - -
- - - - - -------- =_aaaaaaaaaa0 -Content-Type: image/png -Content-ID: <26389.957885364.2@twelve-monkeys.helixcode.com> -Content-Transfer-Encoding: base64 - -iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAABGdBTUEAALGPC/xhBQAAAAZiS0dE -AP8A/wD/oL2nkwAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB9AFAhEcJQyUsSkAACAASURB -VHjabL3ZcuRIkiyqAByOLSJIZlZN95z//6Hzch5G5J5lZrqWriQZG/btPpiruYHZKVLSXZVkBBZ3 -czM1VbXkr7/+c++6Fnmew/sCSZJg2zY45zDPM/7885/4+9//hiRJsCwLsixDkiRwLsM0zUiSBGma -Yl1XpGmKtn2iqmqkaYp933G73dE0NZxzWNcV27Yizz32fce2bfq7+75hXTcURQHvc+w7kKUJrrc7 -8jxHlmXI8xzrumJZFgDAy+WMfQfGaULfd3AuR5qm2LYNAJCmKbquQ13XAIBt28K1O2zbpj93u93Q -NA2SJNHfA4Asy9C2LZqmwb7vh89YlgVJkiDPc4zjgCRJkWUZvM9xvd7gfY6iKPHx8YG3tzds24b7 -/Y6Xlxf9rHVd9fklSYJ931FVJR6PB+Z5Rl03uN1uOJ1OODUNxmnCMAzw3qPwOQBgmhc4l2GeF0zT -hDRN4ZzD4/GAcw7TNOF0OgEA5nnGvu8oy1LvbxgGZFmGrutQVRWausK8rGjbFmVZYhgGNE2D3GWY -lxXbtmGeJyRJqp+fZRmcc3AuQ+E9lnXFMIxYlgWPxwOnUwPncuR5jnmesW0b8jzXZ5BlGbIsxTTN -KAsPX1Ro2ye2bcPtdsMvv3zHum7h9xy6rkOSpMjzXJ/bvu/o+x7OZfC+0Pt9PB749ddfkSTAum6Y -5zk8dyDPPfLcYV1lHS7LgjRNkWUp+l6ey+12w+vrK/Z9R5IkuN2u8L5AXdfIsiysaVkT67qCf5xz -KIsCv//xB15fX8NzTnE+n+F9gc/PT2RZhsLncC7Hf/7nf6E5NZjnGWVZoChK7PuO6/WKt7c3fXdN -XSFNM3R9jyRJMAyDfFdZoqpqDEOHdd10bX1+fuJ8PqOpK+R5jmGcdP8kSQI3zxPSNEOeeziXYVlW -fXh84Fxs27bp/+dGybJMN5M3P1dVJaZp1oeR5w5pmmKe5d+fzyecc7oQk8Rhmlp0XYd5zrFtG+q6 -hssyDTphfyJNU6RpinGadBHxpUtg2jQATdOMpkl0ocpmk2vs+14XYha+x75E+f1JAwg3Lu+Jf/Lc -h8Uni0muN0XuMgDAOI5I0xRVVcmzcA7DOKLrOhRFoQFgHAc8nyucy5EkKcqywLLUsnGWBfM8I89z -5LnDs23hfQGfO92wSQINvlVVwXtZ4HVVYl5Wvb91XQ/P3jmHl5cXDVrz46FBQn4mRZKm2Pcl3Hse -3uWMJJFnwWc9z4v+ngS3DFVVY1kW3fhZKv9921Z9H/zzeLYY3z/0+vnMs0w2pssc8tzr5x/fiaxj -e4gBcpBs+66HFJ+DHD6brneuJR5IaZojy5weVgBQFCXKssQpbFZ+zrIs2Pdd11HuMizrgvv9JuvY -OQlYSND3na7pddsxdh3KqkSe56iqSp6TyzCFZynXI4HbFwX6fsC6ruH5J7qGPz8/UJYlpmk6HCzO -yRqRZybPbZ5neffruoUIUmCaZkzTiDz3WJYZSZJKVpCm+Py8Is9zbOFFcyMuy3J4mN4XaJoaRVGi -74fwIFPsu2y6fd+RpQmqqkKSJOi6Ds45VFWJNE1DJJPgkaYpun5AnQB8z2ma4vl8Is9zvFzO2MJf -JGYV8cYl0u260HmyM8jJZsrx8vIiGyWcuM45XbDjOGGaRl30/HwGkKqqkKYpvPdo6jqckDOKosAw -ThiGEUmSoK4rZFmGZVlQFrJIJdvx8D5H23YhCDsU3uPZtti3DdM4hcxMNhoXmHMSJJM0xTRJICuK -Iiws6CIch10XUpqmaOoaaZZiWzcNoAzi0zTrBuA9TtOMYRj13m1Ak8zMI8vSsIkWzQ64OadJMgFm -CO/vH6jrWt8XN2vMroCyLPSkkw2wIctkffX9U7PBLE303mQjePOOFw0Az7ZFkqQagJjJSrayYFlW -zUTWdQ17QLILCVapHijOORSFx75t+m6TJNHf5Trb9h3zvMB7CRi5y7Bushb5nJkV8x3UVYmyOmEc -O+R5gXG6Azh+/vPZ6gHrvdxvlib6/Ppe1hGzWhvE123XYMLrdNyIcmFTSNWc3gwXAX9OFuCmF87/ -pidFkqBtO11EXAgMFAAwLyucy7CuG8qyRJIk8CED4SmUpRmmeQoLzZuMQ05Gpr88mXkPf/z+J5pT -oxuTfyQFv8E52Sh5nuvJJRt+xTTKC73fb2FDlchzp6eKDTRMsfZ9R+7kOd3ud5RleThpm6bBt2+v -ckJlDl3fY5wmOc2cQ+4yZGGh8zrXTZ79vKzYwulzu900YMzzrCcwF1Lf9/C5g3M5+pDWT/OC2/2B -t7dM31E/DPqu5B1IOfR4PPS5LMt8CHh1VWKaFz0lsyxFmsbP5OaX8iPH8/nUbIf/bNuGYVg0SOUu -w2hKyHme9ZTMXQxwfL/Lsup75rNfwvsYx1GvhYGbz0WCc6Hvimuav8PgxQ3BNVuWBfYdmOYZdSgx -sizTTKdfh8P65jriRmd5XFUl6qpEmjl8fn7qu2Pg4J+iKNB2fcjUUixLxzz0EGT6vsM8zxiGFE3T -IEsTJGmK57PVbLSpa+z7Du9zTOOoQZSlii3nHdPKBEnYFBIZh2HUl/31j6YPYRNz4S4hzdz3HZJZ -ZADkAbVtGzd3+EwGiaLwmgauqyxGbiBZjE7xgmGQ07gsPOZlxTgO8TRMElS1RNyyKND1fXhxKbZN -rsX7HE1daTSU615wu91Q1xWcE/whz+VklvLIwWUO4zTpy2bq7HNn0tENXddpRsDNmmUZHo8H0jTU -ypnDskrK2HY9siyWJ/u+YxhGXcBMLcuy0JrVPud5XkKpsGDddmyznOqs2SV1zvS04QKUZ9shTTPF -XQDA5043HlPFYZx0bazrphux8B7DOGKaZnif4/F4AgBOpxOqqtRyIUnketouXpsvKozhJDyWDKmU -NF2v2RQPjySB3jt/j5vWOafZhJSEHmVZoO+9btKi8JrN2FOZ98M1lGUZfO4PWBKzV/4s/2Hw4j76 -vF5DEJVrABLZ2CF48vM/Pz+1zLEBK2Yly6H0mKYxZFYpiqLU4DZOsx6wDLbLItciWXSm1/n1z/P5 -gPvx4x0vLxeM4xguHJjnTqOUTauZDXChzvNyqMM0mCSJPtxtk438uN/x7ft3FN5jnCaN4ltIpfZ9 -1xSO0UletDyAYRg0SEhNLJu/KCTCDuMUUqMahc/hiwqDiX5JkuByueByOSPLCoxDq9fgnMPpdJJT -30u2UZUlXO4xjiP6fkCe59j3XR8kXwyBMZuplGWBfdswTnPAOuRE46kzLwu6rgsvPQOQ/UtQ0G4K -1vvO5Zim9lDSAID3XmvreR4wTjHaO+eQpQmWZT+8TwZOYijysznybdc6VDZ9zOb4Xpdl0Wzifr+j -rmMpxAzNZRnWkGJv26Z177ysGKf7IXMj0Et8hnWt9zFbk39HWCvukEr73CFNMwxhHe/7DpdlGEcp -QYqiwLZtmp00daW4wRjWyTgOWFfBnt4/PjSoSMaTKvBrMaLn84ksk3JIsJc6lHepPsOIc8VUndlW -4b1mbBL8FozjqBkF9x1BZv5cWXgkIfiMYwR/y8JrZriuK4ZxwOl8OoCVfd9j3zc4l8Odzyf88v27 -qZUSfTFyyuCQikmaNcP7QlFkbgBe4LIsGMYppGdyar6+veHlcoEvCjzbVoG0ZVm0ls7zXGuYeONA -13Wa3shLiXVr7jIkAUhq21ZPjbaTurjrOpxOJ3jvw80PSJIBfT/ooiL6630OXxQYpwnbtioSzbQy -or6rvhAJYIOcKAFR3sMC3sJL5LOqqhIuy9D1QwDsKgFHkwRdP+jG5POX551odH88W33RfB/7vuP3 -3/9A0zRYQ/DlZzCAyDUnh4XIf6T7w+7KimmeQrDYMC/xxCJAzLRdAr6UjHVdCfZTV5LKh3sc90mz -CHZTyrJUFJplpr0XBlnnMs1CuYmmeYkZV5oiyyLwPM0LlmXQ7GxZZs1KmZFIyVlI/VxUeDzuWnbI -ppSs5dQ0GMYxnNqJBhqu2b7vw6b3GkirqsRvv/2uHZfL5YxlWUNGuR9K2GVZUdc1cucE1BuGQ2a2 -batmPty07KBwDX58XjUYMOPJc4d9h64lCaqyx5Zl0cOZ2EHfd3Cvry/IfQEgh58nuMzpySmnw89R -j6eZbSexRcfOAVO1ovABIKuwY8e27boIuYHKsghYADDPqYIvy7LpTRIUWtYlpKGyOFnnykbzWk91 -XafdiWVZNCUlyPP5eUOSJHh9vSBJUkzTqBnOtm0YJ6K+PrysTE/8adr1dCCYJxtWntk///oMi+Ci -z0zR5dwhyySNK8KLWLfVBNCITMvvxv/PwMtsSzbXhDQAVWXhD6DY7XY7gJjDMGCaRtR1rZ/De5aU -8BmyqErxkRiMwvOeRq3/pTySANL3A5L0jHWbMHX9YVNL8KsEH0kTDGEx8n3Zzc8/LDW2bcUwTnoq -Lt5r+cNgl4fui63lidsQUPRFhWWWwyhNEiyhVGIwimUE4HKPItTeW+jqxJ/JEBIf5CEYFT5Hnhea -CXifYxylrOv6DkVZYN93PcjKshTAbhjweD4PKTrBTJsNz/OE57ONXaTcYVkyDVzTNGLfQ4u07zVj -A+RQBHZpP4aOEbOVLDsj+d//+3/tdV3h+WyxLHOoqTIAe2gnpOELF6235FQSpHvfgWHo0dQ15kXa -J0mShv8l8CIpaB96lkz7y7LQk7UJrbau75E7SXXvj4cGlKqskPscHyE1S9MMfd/rjTLQrOsKn3s8 -no+QLo9wzuF8PqFteyzLjLaVWvV8vuB8PmEYRuUrJEkaIq3cqwCj8v3crI/HU/vWPvRxiWssoV03 -jiPO57MAb/2AovAovA/YwxI2GMKGYneB4NikCDjATZhi2+REKbzH/fFAbur1pm7gco/H4w5gD4j8 -LFlHyLTWdcU4jmiaE/Z9U6zma7Cpqgr7LgHHlgwA0HU9yrIIte8SShjJ0oQvIFiJPTTk/yfa7dh3 -CTLrKmBcURT6/ZIBBMAynLTe+5AF5aGrk2gLERAQkF/nQ4CQz0PoFMza/ZFywOsaZwAiCMnP5Pr9 -+PiQ9dk0ep3DINdcVQU+P69aoo3jiLoqUdVnDEOLMWQRzNj4TLLMBUxhC1mCZDvbtuJ8voR3Ks+B -e7Pve5xOTdjcUlrxsxjgvc9xu93R9x2a5oSiiDgG12/btQdgPvnx4792/gderHMOwyAtvOezxa+/ -/orH46Fts0iYyFCVJT6v14B+p/rQCU6QyGD751yIZSmtP+IPrMN4wuz7jo+PD/z66696MhJMKYpC -ywWmPkmCkOJLRK2rCu/v77i8vKCqavR9h2URwkxZljifX5AkGdZ1wPV60xbP89lqjfTx8YHv37/r -M4mdkUlblvu2KQZhEd7L5YL39w8NJnKCRsBPUjz2/ZMDQMPP+Pz8xMvLiy7UsvBS2vSDPhP20omU -82fZqvzbv/0bukCSWZYV5/MZfd8pnhPRfTlV6rrGPE3o+h73+/1AhGEaSsIS+/nO5TifGiRpisfj -qTjO7XbT989Fx9//+PgIQarWGp3P5vF46Lv69ddf9fRNwuZvu16zL7YlWVJwjZKItK0bmpNs4HVd -NRW2YCezRa47tpp/+8fv+Pf/8Xf88v27Es6kPe51vTKl5+exXBBQeMAvv3zTLIt7Zllm3SMsd7uu -w/l81g5Jmqa43e44n09I0xSn0wnrsqALHZ9hnDDPsxLDhnHS766qEmmS4P3jE29vrwo8E7dj9uey -LNN+KlNKvqiiKFB4j3/+85/Ytx3fvn+THqipUduAegvjrJFI9i9ALNvrJamhCiUEA4psoECkyF04 -YaS1QiLHNE3aA04S2URVWSpCz0CSJInUccty6JNy0VRliW2b8f7+Z+ixh99DoimaBKPUoPEbkkR6 -8WVZhgXvsK0LxlCGcONKytdiW1fkudNsRTYqF56kqoXPw/1tyrRzTtpx87wc0t15WTGHvjUDDhev -dBAGTa8jHtJhnidsm3zm4xE3ex5qWoJSbAnak5vvzmIPxGQkBZdDwAYulnnPkOI2TaP1ts8dXJYp -wHdqhCn44/1d61OSYoZ+QOE95mUJPJVJDyKCeNuWK4bD7hNLvW3bcL6c4b3HqanR9YMwTbcN03wE -RW3qXJYFvC/w/ZfveHt7Re5rTIHjwEyFwHVRRH7INI0YBimzqqrGOE7wucc0zXp49AE3syVPkiQ4 -n884nSQ7e7YtnMv1pF/XFY/Hw3QfsuO1h64Wn5/PPdIsRZokmOcFfT8oDmBxIMeTna2ibZPTqq5r -TNOEddsDcFLjcjnracFFSYCKNS4/r6oq9H2P5/OJl5cXZf7xu9Z11TYdb1BeZiAoZE5TNgJPSZLg -/f0D57OASfxettQ+Pj5wPp+VSEQgqOsH/QyeQG3XGcDJacCZA/AipYcH0OK///sf8D7H29ubAn3T -NIVuxnBgmFmG4Lpu6IceRVlocKirUjc7f29eVmGOhWfKHjxbaFw4Nl3lhrSdAAZAkotut5vWuNys -XKQEJplKp2kqLahlDjjHFFLpCCbyVJW2VCTHrJt8b1l45SEQnS/LCk3TaPpKIJHlonMCvO4Be7D3 -VVcV5vCc9y+EL6Lzuwl+PGF3fX855nmVNmfukLkc29YpuDgMg8kkc91UQkWXtmHTVFiWFX13MyxP -6Tps+64Z7+3+EKwol/KiaQRn+fHjHffHQ1vB5L1YYJB09Dp0JoSjkRvsZ1EMiP898jkyDYQ8LJM0 -xe1+l0MgrKlpGjHPcqjbbNYRuWfqI+kR9N/7fsDLy0tI8Uu0bYdhGDRKc2FL6yUCX2VRoG2fUv8H -cMs5Sf3IxGPqbxl62hoMpBzb7tq2DW9vr3h9fUFdN7her6EF5LGuUmeTLdf3Nz0p2BbiRuILIK8+ -z11AjldlSvHnkyTBr7/+gqIo0DSNdhpI+2XrzmokyNbi9zJtZpdhWzfcB8kYqCN4PEYFE4m6p4nT -mn+cJkzTFAJYeih92DPm7+Yu03dDlucwjApkEjiKYF7M2NjWfDweaJpG+8jHGjYzVOBEg2WSpsjC -Pe27dAmyLMXp1EiNPPS68Xi93qeGny/Pz4UaeZwm3O4PfA8AM4HJ2H9fvnRMoGAhsYXcZfC5Q9v1 -uN7uShcmPySu41wziGEYQ8a04Xq94+0tVSajtsS1I7ZgMUGL7eoECdZlASDvRJ5FYDBmKeZ5N5ia -4C5VVSs+Ro2JpRezfOEfliNt22JdSyV/2T9sgRdFibqOnJYlXK9j7V54j7br8ecff8IXHlVVaY06 -zwv+/PM/Q4TLlXxDUIQvhH3SsijgCxE0nE47TqeTElKKokTXtVq72jYQe8pFUQSAcdceMmub0+mE -wnuJwuGF9cMQePUlTk2NJBWQ0PsC+xbTO5bZTJ1tWvvx8QHvC21TsWVjazqi76xHheyR670wiEnw -3A7tNv7d4/HUFy+YSxQ68Tn2fWcWdqTsWk6AZb7xDwUnz2WGn5dwLysys4lZ6qWpUE/ZzmNWwe8p -AtawrdsBVyAhiO1etummeVfaMIFj5xy6bsAYKNG2FZYkkYGXpbHlx3SVB5AtKyzvnRnl17KL77oo -5F2yJczsk6Sqvh8CMSuDz4Uy64sK7+8/VHB2OuVBaDWHzGkzQTDVg4zXxeyS19h2nWZQ6yoZTtPU -AFKs61OvlZhW7qRDdAvfF2nQobMROBjEuvZdshV+X1WW6Ppen+u6SmZpWYzM+ngfjkgwF1nd1HAu -w+nUoO8H7eOfTiejqltRVTXqWoA1exLu+45xmvBsW72J5/Op7ZdpHPXBuXDDBPd4WtmUlui1jYTP -tgPQaUfBplPLumJoO6XkkvwhAKU3GgGz2L03hJNMyxirDnw+BdiiUjGyH/GTipBlDhFsZiUA8P7+ -Hlti4fqE3lxiGgXN/fz8RF3HrIxZBBcauegsaxggmRnY5yGAmQQUKwhyzmGaF5RFEeraCEaNo5QI -VVX+lDFxE/FkoaCF74tkoNxJm1DqUXfQI5DPkTuHHXvAJR4a+C0piKkt01YudoJ/3nvt1BA74SZ0 -gWbNYOW9V/xBxTjrhonah73T35W2aoHb7aZZgsVaJsOH+CoqExJZjmfbout6NE2jJLlt3fD+8UMz -NB42SZKowk/S9CxQ0Qfd2PO86SHAcrMoPBIk2LEjzVLtiKgyNrQf+Tz7XoIGW4LOLjCypC7nC4qy -CqdZxASaptH0TjYlDmQhLrwpBBMGi2mSE+Ya2hWsQ6xIiIANU/ay8Pi8XnXzE3VlXz/PhXPO9ImY -gDMABwAs64I0TUz/NJJPCJQJ9Tc36r5c+7n237lgSPf9ypYk1TbiHJtmMNwcTdMcGGBrAAmlRz8j -CboLLgLbossy+VwBlNKfWm15LpRg8tgFcFwUp7GnFkFKboxpmhRniF0KwXReX18VYRe6ao4xoNrc -FJYtSLCWp81kGKPK46c6MFCWlUUYiDH8OX4HM0gLKgufIdeUX07qTDcWAFxvN3z//i1QaVleThG/ -CCfw9fqJqqo1YOfOhe6GU9BZuBSjZsZ57nVtc42s64p+GLD3MevgZxIE5ua3JWkkvsk1tu2odT9B -Q3vIxKx71extGEYjFoskO5EgR6FUmsQunYtgD4LwRaSnw+2K6/WKruuNcq/VL5GA8TjwstmO4Yti -QODNVlWlCDNPWda99CMg33wYJxRFiaapUVXloUZnPcbAwBNx3XaVMUcCjjC8hKJaKl+dbcjC5wc9 -t6X9WoGOBRBPp5O2bSzPnp97bC1FZFnr3twhDzx6BlDZ7HPcrGlyUIpRT28ZcrZ9ZaXZfT9ocCPI -6ZwwDu1GZNCzKkc+V5Kx+LMx3ZbT5Wutyc1vWYgSrISIdL890Jwa1EGown9Enz7rKc3ft5tz33fc -7w8jtXWqg5d03wfQrjhQghk4ZPMJRbcqS8WXuOmkz3/Ssu09dCOsepOfGQVxWShxxEujaWokSJRN -S6qyc5IRJAk0y1aKcZpg/cLaJEef3hjEPfi+vBeOP/8b1bQ2A/ntt98AAG9vbyoNJ/W564ewTybh -IEhNAqgsuCjgco/n8xEkslK3jON0ZFoFfjvJOxaRPPLUowFH7jLk395QljVOpxHjOKlAwzlJS3xR -4Y8/fkfX9Xh5uRiBxBo2BZREI+24ImQDbaghY50mJcSMNG1EELRuh5qN1ziG048LPUkSXK+fmKZa -a1XNBFymqDXBwCxN9Hu5OEiRXgK3m1TOJAHartcTlKkvF5yeotse0rnk0AkYhlgSMWjZzc97Jxst -4h+iBbC1Mr8vS5PIyjNGKXJ/sUPEhON6u2pXwX5eZF7OyHOvmw8ALi9nZT92oSUahTUpytIHZucE -73MlMvHaRdwyYtskcyL7jTJ0fg/bpwfNe9Bb7DvgcockaFH4rtSnIMs0QHGd9GFtD+OoWg4CeTE7 -9MjzAsMQO0up4RlwfU3ThI+PTxV2jdOmhwp/lp9ZVTnqqgL0cIgdDitIIpfG+1zlySQtff/2DX+G -5zdOk3IAZB2mqCoPlyYiJ0xVpDFhWYXhVdcNHo8n8lxAk64btaX0z78+0TSNRhZeoFBTi6j9z1Ij -TpAbTZMEZVUjSzO4oFqa51nbQ1mW4eVFhDt//fWOv368B7Q+V+CLG2dZVgzDgPv9Hii/lVKUmbKn -aYr7/diCIVouRJb5IL4AgKY5aXbDjcZSyaaQEtj84YUwIq/rGngAudaR9pTs+14XHx2Y+DnMHsho -4wJi6cJ692sb0LZVy6LQAIwv0lkLvq7brqn4uu6HFHNdoypN3uVyUCVaujAXM4VFs9KSpRPAVls/ -DIcM0foF+NwHSngsTYpgDOKcQ1PX6AMWQAbmPC8q5OmzKP+NJUnEqO73x0/CK1u+jIHVum1bbAkb -jQIPiVml6Ahq1+ehKzIvUGMYObh2pSZXVa2OWsxA+BxIBS7LArn3mOYJ5RrNWabQ+bCZqZWU7/uO -19dXnE5nOFejLB8KrlrtBUtiR8KBBZzIxmNt9fHxI8h4s/AiMhXvUCdOCjBBv7qu0bZP9H1vNgV7 -7Su6jw89hVjDcGOQFVYUNcrioVROy42mDRJTIql7C2Wj8eGyxScLdA7uPV0gWayH+o01mqTkTk9E -vnxGT4Kgqi0PVlx8bsQH6tBJYSDxPkcaEPgu1IhFUSihaFnuuoDi5lj1ngl++dwZwk2q7EdKTKuq -CifQCmA/gI3blh+YiAxq879webL4EHUI8QSRUoaZDDdUFF/lyjQkbkHg0rZG7SlGfsbXMmKcJs2i -mCFEUll0JErTTU9nbnoi9rv2wyeT0UQO/v1+x+VyCSB2zCCIwpPJR5zCOjQx+3HO4ePjA+Mw4Nv3 -76EMW1UYJ98p+BYADNt4MDexRh3TNCt5x5aoNlPghp5m4cpwrQmT8o51/UTbtni5/F1BeWbjxPDS -57PVupm+Y87l0Zwhd6rhtzVTXddClKgrVbzJgi7Vvkkinbj9WCMNe2rQt4/ZAhf2NE24Xj+CR1qp -9S83QlVVKLxHlmYqA67rGmVVI8+LQ0RlUCmKEufz6eCe4wLYw2uTzseovz+ZhRpPqtgh+Pz8xDgO -B5MMnhRdIEJt24a//vqBHz9+hJclC3rbNpV19n13wAoIaJVlob5x9DlIzAZJDVeiacQIpa4qTPMS -ar0l0H4nNe0Yx0Flsgzy9iSyGvTPj6tufouLLMui4F1E93MFL6WXPh8wBmvYYSnT2hpE8pM3wDiO -+Pz81ExJXIGGw+flAWMiuJpqCbipIjBmMcF0xljbSXu6ONiFRaOYBX/99QPjOBpzkxW5yapYio7j -iLbt4IsCL5cLTk19AIopCLrdH3i2nQkK8TpyFyXR5ATwmVlcxNrYuX8hOY7PfVdNB1vPlrLsiBA2 -Ta09ajHv8OJk8pMtE9l+/qCk8j5XhJk/fz41+PHjB1LVGgh6um1pJOcEezBp0Xi0c6engvc5ltlk -J4Fwwo1N7MGCYY/HQ1+2JbBwQQl4lCuHWmpvYR7OATWVk3INJJhUAxo30MVu8gAAIABJREFUQFWV -8ME2TbIbOdmfz6ec6OcTPj7E146p1+VyRl3XOJ1OISgEvCFNNdLbAKn2UqFEs+41wzBqS4wLgr3v -fZd2EF/0V8cbZhV5Huvz9tni8iI+CQR5WU+fLydcLqKlmOdRuxpW2mr78Lzmqixxf9wPBjJ2kfIk -svRwptX0tGOwvVzOxoh2O6S/Sch0+FlDIAJF78LsIDPm2pyDToLt2PtdSkpmbTGjS1EUhfhIBJeq -aV7QdXc1IJVW84BlmfH9+zf8/e9/R55fMM/PQ0s28iicZr7btuGf//wL3uc4nU7BF7INOpNKRW5s -RTP7tGYoq8G2bGlFOT5l5F+9IPd9h2PKtK1iO3W5XA6KKqtoWgJ9kzUgXxi982xaxowiSVJMc+T6 -F0WJtm21sxB9AyJoxii8LLKQ81ADrtuukVuygcimsuSe2D5ag/Bo0F63DQT7Lh6GQu3tNbWk4y1d -YIvC43Q6oSyEWkm9+bqJzLLwHi7PjaXWeshabCoqBCVxRiqKAknQ+0fAMtOSpCg8tnVVLoYYps5a -L1vHIEuc6XvxJ4jsulzTTMpBq6pU7gHReTHvXPV9sJwRk5TNuETFQ+GrMSWNPeXkS/V05s9pmRHk -3l9bmRTh8H5ut0/UdYlT04hrlYvlifoOzssBS7Agme2+0FKLh5pz2UFNSsCVz/e3337HNI0oy78J -dyDQnOMBkx9wInatksRhnu+4hjb2UUrvDu1dcScq1Pm57TpUlVjllWURCTuO/IRC3bDkvmIwbNun -4ixRFu00gNhDUa9HPc76QXvUzmWSChsFk233WbOQrwwyopgAsG7Sa57nFxUKRdUZKbtDQHjl1Kuq -UqWokmYuX4AxKPhiRTSWiMRNzgVMjIM37XOHpGm0TKFgZVlWTQXLosCOHS8vL1JaFB5dP2hrkWk6 -PfTGadKIneeFtpxsCryuW2jxrAY1Xw/GnFJvjtphGacJuY+eiGS45U5MNyzKb/0ZyTMg9pEkCZL8 -qFOY51lBJZFn1+b5RV3DNVhh2xadXfg8RK7Xm5ZWLK/atkMV3GgpGrN1rGUZCjU4PxwwcoJDn4X8 -vQseiaUCzyQXxSxqC2Yc8XSkY1KkvMt1p6FtV5YFXF7h+f6hmdztJmy6W8gQRKknG7SuxKWXrWU+ -k8/PH5rB0Udhnme1Xmd5RUD9crlIlqTu2bVK03k/47hr5uBcXPepOfFJZiPJx7oCiy16XCe0fU/+ -z//5X/vj8VRTDrFRzvDb77/Be4/z+aInBxcrRSqsU6lbV5useQl24tHuyAcbL0kbl3BaSruRCy5L -E/iixDQO6PohGC4kwe64Umvxr6mOJSzdbleUZa1mDYJnSPvEuRxd3wWXlFm9BdVBxWWY5lk12tSm -F97DF+K0ynsjKMNFFlmLW6DB5iqPZtB1mTDfqImnr0Gkli7hpe8hUOWqracfAGWh+77hdrsbYJY+ -+8vBaisq9/ID/kLd+7atSqwqiiKAXfvhpJ/nGVVZBTOWFV0XsyWdCZA5vH98BE/7AmnIPKg/T5JU -/e5YTt505kOqPA8KYaRd2GlGJn4Ondaz4zgdNlN0SkpC5id6ezo08+/2fQte+ZfA7pNSj07ARVHg -+XzGtmySoKrPWGZx7dkCZsJ16PP84DfA05228FxbDERlWQWMZNDNSeyJfgrX201LTV6zDZgHe7V5 -0QxBOgJO1znXEvckM14+w6IokDwf/9yfbXsQeJAAQSeY86nRejsi8YKGF0V5kCHaVlXuMvz2+x/4 -29/+FvTjz58svK0mO9Y0q/aTu65Hnjs0zUlRZ56eLBektSWnOb322Wa53x94e3tV9RNLA74knrxM -+cn7Jjg5DAMulwvSNMXH+wfKqlTbpwhMrYeoTiBUvl/QZZJDxARjCItuOqTPdpAJlXX//Y9/KJOL -15bn4u5jdd/zsqIqS01Ref8fHx/45ZdfVL02m3KMmQjNPE5NLR2BgOVs24YfP97xyy/f9dqp+rSq -Tm4IMSapdLCHVWgKVhJZjGkipBnKodkdsG1SKcHu6qqcJgl+hNOZFm9lUWAYRziXmRIpV0n3+/s7 -/v73vx06Knz+r68vanfPNVuVJdquk9Q59/jt99/x9vamknNiTdZUg+vADpShnPx2e+DXX+PzL8sS -27ppt4OHxLIsaOoamXN4f/+h4qR//vMvvL6+Hmp8i39IK3nV098CtWma4uPjAy8vLxo0qrLEsi64 -XsU23M1m2o8VyBQ+x7rt+Py8Kjpv/dFlkZUB/ZwOZYC2Gjbp0d7vN0VRrYjEAiRRMLOYm5VT6uXl -BT73yAJ/XUC67QAokesstEtyvRcF7yLivx0AM0tisRzrLE2Auj448J4vZxRFoToJy9GnSIc22uu6 -YUljej+OA7quDfxur4gy68+27XS4CkuLx/V6QOd5HZYOHU8Ah3Vbf6rz+L5GM8uBz4/PnaIuOvHa -dxy177HWJMvQmrRqgNt2TGN/mPyUqTlndgD95KSnD+N8GNwicxKE/EMtvQuALSfqDKNIhX3ucLs/ -sG2rHhTX2101AkUInrynqpIAKwq52tC3U8F2QqYkLj3Cv7BlmzUesd2mWILCeChk2jYUyvHtUEJZ -KvBvv/+u8ykKnyvXwe5N+25YEpJfIG3t5QCME5inj8Lj+dSuR547uLLwaNdVQTu+XDHNzAPqWKqW -2+IA3PzcfOmX6MQBBnXdBAOOVfXJtu6z3upH89EFbfvE9+/f0HbdwZU1puDRY0BkwZtaP9t+McEz -a39t6Z1WJcg2IO+rKkvMQQjkMqfKu7Z9hsk3cYoNBUkE7uJCyBWM25RFKKdWXVXB2nsF4IKcOlqK -83eYLsahHBEITBIcHJv54lnL871xQVufO/otZlkalHOZtg/7IFDJUvHhZwAh9iOjukY11ByV3vyz -1Xbhc8Uc+N7HadbgxO4Hs7/oiZAoBnA6iWNOUVaaDUYwrURdVUgzh6oKa3mVcoB6BF2bQQtRFF7p -xTtk07NWJzGMAY7ZrTWIjYKy3HR0oujJ57OuKYKhEoCTn1qEbKM3tZiPtF2vhiA2cFqbcn3WSEJn -KrY8qYBlV83yP1juu2fbHSSVdN+hqWKahtosTX5KL8jg2/ddI7IVLTBSSstKuOj00+P0IerNLYNN -DSqKQk/VwucHQs7XwSPP5xNzAPCinXN2GLzAkob//f64BxpqqSAV/e1Yy4oD66c+wL5/6mfWdY00 -zXBqGmzbiq6nuWZ7iNqWrlsWcXYeAcW261D4XFNHEpS8z9VPcZ7jadF1UgtXVS3OSOHZTkZAY3EA -uuNwM1G9xtQR8Ni2SCSZZ+GKc9ITg7fy94dYAxOUEtJMeujKsEZlyUCyCjeWBaW+/pERXEK5tqWh -dIOkJRZZmpYgBfzzn38Gfn+NcVx+AlqtgetkRE3TNGHfN6WXF4XH45EdAFob3OK8xU0di59PwdP4 -rOdlVRJOtON2gcUaO17EKpqmhssLNfzg95D5GklPqWJHXdehbZ8KilJEtCzrof1HA1XiD9u2wZHg -ot7+ppfvc/rJL5jDTdtBopS72oXOGXk8EZ/PFt+/vyl4xtSXRpfWStwqtBh5mdo45w/e9NY7UNP2 -ID4Rn7kquAItZrGm6uM2z5nRoyeHsUkMPIWmuokuYqbtzDDUAjt4JBzNQdxPPAWWOPM8qf8A0+D7 -/aHZCp/pNI3qf2c7Mnw+lOLOYTNwQCafrZxm5ZfTn3MKRXhFZNu6GXkvzyBLU7jc4+Pjh3RedPxY -Ehh0j8NwUOF6bEZvkGqKvavjkWzU5/MRvufoDmx9Irp+gDMDWMVIc/mJ+MKMTIZqbsjzMmycO5Lk -fMCb7vc75nnG+Xw6TCBi4KFxCgfTMNuhyQj3DD0AmCEQeSe4TJZsFGVlcK7UzJL2e5ansa4r7vfr -IRummQj3mkwGGqL0OrgQsZQjmLzv80//3ZL+qqqMcmCbhrOunWYREVTBB4C9Ti5CRk9uRiKnZFtx -Qq0M+XQKjLEWt1N2483flffPDcPJK4pIV5XxoxMDxSi3TELP1B3kuNYEkmnxvmeK2M9BvMMa1078 -4aIvC49/BD1/HfCBZVnx+fmB0+mMuorDSPjCv7ZI44y5aCBB1p7NWqxAxWoUWNfaIRDWMo0cAuli -IFC0oQM67YDSNE2xJLOq+5ittW0r/g9ViS5NMQzRzpoppDgWJeofIBbU8RSyAYveksu6oG07FTcJ -0OXD1KD+wLiMWov1MHTFUpG/KhmZNYisHZrm0gaNa4bZ3fl8xr5t4hZ0veosvc3o/RnU6bdg260M -pmUpXQ+xz5MyxBcF1q0NqkAxkBVVqhwayyqEHlrhUfzE+6P/AWcLAFI6SJm7aqbLbIs8D87cELFP -DZfJxOUxrBuLKRXeSwZghw/ak8tO5rEIJwGKOJ7pOKpJUvwCRTEjzwdtfz2CYo9ur7yJ+/2O0+kU -ZqmJFr4sCh2QwEkq0gVwurn/+udfeHl90YxCRi6neDEuwEztv9ajDBSSom4HCbE13+TzmecZHYCm -adD3vZqjrOuqQNKO/RBsyHug5j62GpeD3Rmzh+fzib4flDUozkepMbxcD2CmGKPgCzAbx3R3/aBW -U8J3eChAKhbRnOE4HdxphHX20K6OqMhSnS67mwGxLK8o2aYzDTnwwzDi5UV8GVzmtHTM89gpkpbp -dKAMW/amLRGpg7DdIt53kiRwmWSf9PkT1eCupSb9A6g1WZcRWTYFsZJXVV1sN0Ml7MyM6qpS/Uca -XJApNOPkp2Vd1IVaMKJcB4MO26iuS1maHMBEAYK9Blw793DfYbo8TjsVTOmjI3CNcRxxv9/Epm+V -ISWWX0JMxUU0/YjK26mjFH7M4UPkBJgP4hFbbwtfuzNUz1WBHh3mkOd6StrZdEmSoKkrLCutnyMI -s267zg+YMKEMi04MNUYVKPncY56mA4JvdfBc2HYTWgziK4JuT18rG+ULFsrpFowtS0VjbZvIcrm/ -ljwRb0nRNLVKUtkqskxLzoS30lFeM7kNbdsFzoK0UUWVuCjmcAt95qY5HWbqEVS6XC7wuUNZ1ehV -p5EpRZyGI/xeDryoKxn+4nKHx2PQuY4kxHBsFzEIps1MnS1Zy2akYpDRKknLIuzRH284UITr+hTY -jZVmqUAJn8dx34/HzVhylcrQpLeE7RiRmSdZ36yZK9cvW6CPZ6sHHFN/Aujx72fZzKFcdm4+6EBs -MGc2/XxOB/NSUoDHfVJmKolFuTE0mYMIiwe1Have94OYgtJg0Tq8pGmKwURYPhB+uaC/ndEKrNoi -2znUMRAg7LSao6trFlhYucpI7/c7bvdHHEAZggNLjjYstnmehFvfNMi9vBjq59MsVcdh27n4V4w5 -K3CyFFNrN0ZugRhOiuqRtTX76lkm4GldlBiUwJKEfjUOBhlfTzkGChmdVaAsT1jXOSi6loMpqr12 -Bs15jtx3y70/nYRI4s3EGLLgmFLbGtbKTOdlRTIO8IU3bU7RjGRB0huNZIKyUh2DZzPhJvjc3W5B -3GTLCHdI563PgXWfPnY+Uvz2j3/g8nJBVdWHZ8N1FAeNCPGGpZHFZOigy4wsy1IdypqGMkRS8EUy -ylLGiQEdXCjbmOWtq2zuLJQLfO+BH4c6eG4suv5SpMGDgXiIHXrKjg/dnKjPoOCOGfBR1hwVjmz1 -Ub3piwrz8tTMl4d5lmVwBDwW4zTKhcQXbJFlKyqxP8eXer3efjL6/Ooqa80srIEHiTTclCQbUQBj -qb6kWI5hgEUU8WxqxiG/12OeG62NbTtN56av28EnkKgp/05SdKemqJx+MwVuAyXE4lt/PURjCoq4 -2G1bz3ZL7Kiptr0JLdlTtSiim65rcb8/0TQiKvK5xxpMW63Dzel0kv5zWQv7q6gwzY8DiEjnYLrU -dF0ceMET6PF44H5/4JdffjlYvTVNfWjZRVPT4xhqMtDEjrpUghbfoxirLgeWGzf75+c1DMTIzKCa -kKG8XHA6nYPg6BFnHIR3Q2+9aewDntHo7EIC3eu6HrgREXBbDP8+zkHo+h73x/0AhNrOyjjN2Pb2 -gE3Qk5HXbYMPZw9wFgU9FrnxibEQBCTGVpUyanwYuoP4LkrpvR5cbfvE89mpgI7ZcBtGtznn4Gxq -LvVHbIGwjcAW3mpcX+wUFT5AOrlYE08yx65hehAjo3NORx6rXvyLVzrTRdbSVsOtJhvG/825HKem -DhqFBbfbVfvDtNY+1lS7ahFsGWDTzCxL0TQnNLWUF7f7Q+o2M6xExyzxZMkjJ+B2u6LvC3z//k3b -ilmaIEszXYiWzLQHq7E8F5fmYRhwPp/Vnef19UVFRxwqaVtcVio6jT2ez1YBR56gbN9mUxQWMbOL -I87W4OoTx8AT5I3gbzSgZKvR+yIE40xLS3GpifMI6dXQhyEd9DMgW3MMzL5tWwMOkuicClkDQivO -fYEs6/Dx8SEDRk4nsd4KaD0PEQse2vVu02GrarRTrLwvFNGnJJolHAE6OmUzSBLbmqZJcJi6Pvgh -cu3ZQ+2r1Prj4xOXywXDMOJ0avSz2ZngoWIPWnkHkQtS1w3u96cGWjt1W0lvX6m5bdvicrkgSzMs -WNX+2k4EspxkBg4aFPJl78FJhVkCnXoo8iDCas00Se+0rMOmbnBqGk05rU8eBySw9cWUmGVCUZSY -5zVYhcvoZdsP5axCm3pZVFlqwE3Te6Zdn9cr6rr5Msl3AxCxAo6/8l6kpJfzWX3hSEBidNdTZJwU -E6DvwbFcgEpWfVGogpILiKXKvm/qmWcHX349haLqcvkC/K4/ZW9U4bGDMBvzCVqjM5hzTFZZeDyf -Lqj8WizLTdtods3Z2RTkV+z7jrqq8HhGHMR7r0GiHwY821Z9JOiDMAacJnpTxpNc2nITpinqA74a -sHxVJxK/ii1NYbayBRjbu6sCmwwezHL4nCzQbFV+5ITweqRjIKA37cNs2m8zFErgl2VGXddY1/Rw -MDdNoyPv7RwFgusuKoUInlQKKpDkw8XJ3qMl29hgEF2BZ6NDFzSVclqmytw8TN9sLWjT43GaAnjk -dGCEZTqRw02fwGfbKWmiLEv5Dpcr8KW1PY7ZxsfHhwzwLMpDNOYDn6YZS7oeWnP3+01bWWpH7QzZ -JFB7ZQJzhXnq8fHxGYZvbqpXt0YU7GmTCJXnk7LwGDCHcQy2WO4w8MQOA2HvvQ+KQctKjIHr2KK0 -ZhGWebauGxbTIua74nPwuUe/DgfTFNGxFxrg2cmJcxWcptwsH1iPW3/7aRxwPn07UMlfXy5IUoe2 -FTLQ29s3aZGF0e7WvYmnLDcvn6G1GrdtywjMuS/PYDVdokwp3WxFE4xOA8vQOl2xlJTuyXiYibCu -ycGUl5uU05dFtOS0I1cEl6F1YwkFXevi6fE4ZDbTNOLzehU5tap1ncrPXRF8x3ijy7KiqlIRdHS9 -Ejv4EC2d1d5YtBnaDwDaMIxomgbbtuF2f6hwiGpCuuW8vr7gfGrweLYH+THrabE/jsi5pMnRI57y -XY635uKcpgn3e7Ta4mZpAwMyuu+kSlm2Mw2ou2edH1NK4HJ5CdOIZVAjwVJr7En8gkIUmTnnfzLT -oOEpuyZ5LqaQXdcpSj6Og/jFBW65tTi3nP4sTZCE+QXkpdODkNRpzjRg/e9CO46dBCvKoRkFZzpa -4I3OR1ZbwEPA1qj0ILBrh2Ufy7J1XRV4Y6AhxmNVoMu6wmfybmVq7in8vASf2+2mwVAA5DRYsaWh -k+PVZanvOwCZli1fN//XrIDu1nT6FX/IDPPcSkCZJlU2fi0voklJbG3yGfJgsfMGHs9n8M4o9NAc -Qxlg236abYTsS8q1aAqbJKkGDHnmQjWf0hTu/eNDp7vyNBZGX6dRjeDUsmRqkUxZ59eJqJbqKewt -eWjP5wPzPON0OisDijdaFPlhjJcFFY+TdZaDbtz7IqrcluWn4Rl5XiBNrwe2FcVB6ZcBpmLIIDTM -OXDr2RmhH53lsPNF0aCELZo8EDUYfQlqMSUvilKBnLZ9aokVDR7CGKfA3ovjtOtgcLoq2ePrZGG2 -GDlrsAv++lE8FUdcdd1oHH8z5RtQhZYqsy3Tz0jTTE1R4lTiI8BrQT3LMOWCFSxC/Bzv94duVH4W -dfZrqOH3QAbb9x1//vEHXoIybhhGtOE5iH+DD+amTvX159MpmKPU2NZFyU5t22JZCni/KlIuGMNo -3IWPQzvshkuSRGcXLMuMJffKKIzlUHIwIrEqQjuQl+tShsFU2hK2Za5kzdMBRLZdm7ZtFWvRATpp -prZvljkJzCHQBvLYf/zH/9zJCnq2XTCzLJGkaVBkOYzBu31ZFjyfbZjNJ4YFfGjHgYeZzoK3qd/z -+cDb2zekaYr39x8oy0qdWOqqRuYyfH5eg4KqDAi1zIMH9p+UbtShcwIwR2ZbNSFtzGKdK/W6kFHc -oY63TjfWEVc0/rmiul812naSLt11qVGvgmVY27UHFtbRxyB6KkRHn0KNGy2ZiTpz61tAHX80Zt1V -F09jlHEcMU2jYjFxuEkWho44FScxq4qU0k215uwc0DCTwYPfSbELNw9PJ7LTxKNOUnFq8H2eH2bt -cYaBOEB5tF2r0tbX19fgDdDj8bijLCu8vb0iTTPcblf1aEAgbbVtq9dvS1SWunxuLJmaug4uVTCO -zOu/sCHbAvV6EHelIjr3tl2r921r7iRJ9UA8qmGz8P0OhS8wjIMBLhd9nsw+hbGYHHwoxDG5wbLM -QTi3qmAvDg1JA3gYuTHJ/fb7Ps0LmrrCQO//VNoa8zyhbTvVv7NOfH2RyUGcMW8jPNM9ors/fvzA -v//7v2uq8/r6im1b8f7+gZfLBTuEVca5Z5Z3fTqd8OPHD7y9vR3qTpmyKiafFnuIPvAxIH18fODt -7e2gNZehHq3R4cvvcNKQ5btfr1e8vr5qGTAbW2YL7nifqzXz7X5Xrf7j/sTr24si3ZRZ22zGLk67 -CaZpQtu2+B///u/aY2fJMZsJP01dhdRwO2AkaZrier3qwNY4tiyWbtbZ12o6uEg/Pz/x+vqqGoz5 -C6/CeuuL+5P0zdlqbZ9PNGGQyr9C34ntfIZBrza4SxfljtOp0RKhrioU5QW321+YphGnpkFZSe1L -7MTOd3w+Hqib5qdMRNx8Kjyfj58Gb9ANel5WvL+/4+3t7XCiM2vj763riqaptZVq5fVcf2Iykisu -EudPxmy38DnKqsb//b//N6D4NZ7PFr/88t1QyKU9OIzTAU/hcyR2wvfZPp/4/v07HsHkxLItAcBx -019vd/R9j8vlgqpqtLaxeu+mkQsqqxpJkmNdn0aS6w5tNEveIFghqqUWZZBg7thRFDWAzgB61mcN -yDKnUU5ntgVvdXuyW/Se+nAGAmuX/NU+yfoTML0qy0LrU9u3JYuObTi+ONkoV508a0lO27YGiSj1 -DKL1Xr9oA76OgiYaPk2TTGoKYFUenJWI/pZlcQCcrFTbBjcdpx3UkFys/8qWiwGNs+UZvNc1+6nP -zZ9nK64Jm43ZDi247iEoCkchgpTTNGPCrNjEV0LSui4HO++u77FjVwu3cZoxzXcN/oIHedyCPoE4 -TDxRJySJUL27/tN45MvQl74f8N///Q98+/YGH6ZG0TSF+EC0hJsUCCQFl0GRJZec+onyQpq6wrPt -NEiQkSr1/Yx5eQQMK8WpaVREx5JsDwmxlOLpoQMnEn6nWAeDOPUp0s1xOm59WRa4ZRGkVFh8p9A/ -HrXG5A9S5kqnk33rvgyOHA+tl9QM4WSUJEj18Sn9+T///CdOp5M5lVbtzSdJIgNEQokg6WyhqSRP -Qp4iTNO34D3PDe0NpkAlldV45+GkEuIMlXlVCEobgOTgN0jEldr2SCIRk8g4508AmH4Y4IsiIMeB -wmkWJUFIKzeldJQb1g5ykA0sL14ARZkqy2m5dMLhzHmO3SKISRrxviPMTJTgbN8le9oSXNLDyDfr -BG1baBRInU4NtnXDSkPWaURVVwrM2qGvFuylLiBJU4zj9FOrkP9Okhclu3zOUfItxibXzyvSLP1J -iGVPR7FHn0JWuil99/v3N1wuL6Ek6oO2JcrRrW+ilX1XVam28tFMZdN1Iy7Qlo2YHcrPyGcRK/2q -PqF8tjrAVP0qtk07LV9NR9mVmCbBBshDIAZh5xns+47UuRxVVemH5yYSk8nGqb0+tCM4yotDEtkf -jidanGCyrit+/Pihc/SskolZgzi2LD+9rHXblanG1Imbre97dKFWTpVVOGtWUJbiJGv5z5aTr2aL -4fNpMrpuO+732yHVt78XhRjHBcFpuhy3TsdZAm08GcST3usmsK1QO4SUcwycy3TAictcSHVHdSDy -uYNjOyr44lPnbqWuNAGNWU4Z3umR32GHoc7zopkXXY6tmIpqTQYZMu0oMrLybG7Qy/mMsizUsZlE -H7oJP5/toWWZZe4g/Y1DYJ3Kzu1kITG47VFWJS6XC87n02HoDdczr+lyueAcphaJv3+JtzBZpyxP -B/SfTDy7RtmKnOcFj8dTXajpv2cZtELr7UwJhIMk/Xa7KmYhdnI3Q2mfD9dCDEls2rYwtLaVwzaU -mKRuq3Q87I0D5Vi90KpSFWRWz82UegjOP/SAiyOSJv3/Nn3nQtp3hCmuhf4u7YjeXl+lregLVTnZ -aE8vAm7651NYgefzSWiiiTDq7gG85EnlvUcXzCj7QRaDdXJhGkgMQLKODkVRqt++de3liWxxEEsb -js4swGJGZ5VljarsjCXWgmVxGJbxsKj7vg8TZzgBGZqyZwEg6rpZTzzy0ykl7vpPdYO1p54IdyrD -ghwOarA0zOKL2vdFmYw0WWXwJ9hlTTyHYQwjuoWyPAYBFrM4S0JSv4hhQO4yvL2+qkks3wH5IGzJ -FUER+vXk9XkQugQSVVmKi461KONAzMezC6rPWTMcOuJeLi9Sjrochd/02uZlxXj9PIC1KqAJOEMc -1gE1rOGhR9qz+GA+NPOUCUtOMQprVz+rCUqpvn1t2xnLt/wgmLKIIQQ/AAAgAElEQVR4lJWYW5KQ -cw5rIPHFtYqgkhWeibNtnS5QM6mhZw02TrNuDGqsWdvbIYxpYHxZiiLNOkkCUmPCRcwnkzTFNvQH -YOJ+vyNNE1wuL4YZmOn8+JfLBS73WOZJnVNInIlEByiTTySZpTnhIoFjmhedAc/R5SRv2GBkCUCU -cHbGQoyL4n6/4f39E7/88h3ruuF6u+EtjZZVVVXjzz9/N6YqcR79uu2aonPB3R8PpGkSXGbojJyh -rkr8eP84gJbrtusJamcjdIEpyWyEpJiPz4eeelmW4f3HO85BisyNnOe56v6ZEdgOCPEQGagxw+fi -28gTh6egdZwi14ODab+ebJRaU436k8OREabxfpZlhi+qQzdnnKZg+W4UroYdKAM2Ntzvd7TtU+t1 -uvyI4/OucxKsiSxxrrquUVcVXO5Vb8H1b6duxdFz0V4tdlicSuHrqkLmHLpbr2uZA3TjcJT5y3DV -JI4tK2XWRB+MU+QZtJoVs81Mta+bl1VPbhJWvv6Jtd4WZIZH8QwNIiUCDQe0lYYR1hEndxk+Pq+h -fXUcmWz9y05Ng+v1qoYj7BFnrkCSpDryymoEnMvgMheYhwXW14u2lZYvDD8uJC7i86kJ46qXw89b -U1GaKwzjdFgU0Ywkx7dvb3h9ufw0YRcAlnlSvkBReIxjNPgovNex6V+ppKfT+dCNyVyOl8tZjTQi -kWs5DJs8Wqdnx5FaYXY9vR3Pl7NYUmVRpbcsC+gaXfhcrcI42IXZwPpF8h2lyz22bQmj5Eql1RI3 -spwMrgWxPj8DODrwWkm3tFkzJfm0Xa9DZqws3QaQ2+0WMosytJ+Bx6PVE1b+zh9k21zH5N5b3j6D -yrIuat9u/962rSMommrLU4KX18Om7wc81ShHMj7sEPXhNB02vR1uyoAu+M10yAasJJ9+Cl0vGFVd -13BVWcq4o/BiCBZZ6aytvXixkdQh9eLj8QzqrdTYHe8HGir/d17WcMrEmXN22qzM/ZPSgHRZPnwx -wegOhA2e5sIN90rEkDSqx7/9WsMXFcbpfhBlsPVjh5lw0wzjpOIKG/Gvt7ueDl+n8/KlNk0NXxQA -UhSFpPbDOClXn0w0EZFMCgSu66pRuiwKLOuCLHM4n0+H2rM3zLt/Vbp9FTTZhWlprczGXO4xTbOK -fXLvkWiqu+q0InYV6rrWqUKbWXT2e2zwaZoTTqdG7dPiXAh3UA9yw0lZ1B0cc21ZKsSXJJCUNqxf -5gla5uo4jihLH8qy4ECUO2Uq8hmxBZjnhd6PrPXEyIkz5REcDpI1Suitd581+7SAuFX90XGZcSta -z8XBMMyYvlJ8efgQ2CZdmlgN9THcuyyT9qAGzLIMjm6y0TNu+3r+ayq4GwYYgRXKItfgviqLesQ0 -7Tqa2XriU1giixZK4eUpxUXzbFs82xbrGhaLc8o+/Ko92PddjCXmWeWa8cWsIgJZngeMIU5ZcQf5 -8VcxkGVY8WXyeUT6K6KWPHgr9P1V0+stUJelD5yrMEUox+wDzz9ZQAu4swRvvB5+oXFnqtF83SQo -2uDMICwL4XhCsFQhAj+MI6bHXYNZ3w+hbo0W3Uyzh6AHkXJvPIyqlhN8PDDZiA1RSTmNoxKQWFqk -LsO84IC9kKdAMJNmnbxG3cihazAZS3H6G1rXIg67VbPZQHrj5ieLU+7hph0Vmqx8HWpqdSuWLajO -VcGaXuYULIqtUPdveRq2nqcG56se46DgC/6VLH+s8jJyKLKg+BSXLJbu0zypjL6qKpk98fF5/ekD -rMSXbQxKP7/SaDnvj+lYEVDZyATLdKqrcgpCe4wofNd1OvSQDz8izvLgWOvboZI2ABCJJw14DESJ -rutRFE/UdXMYXfbV430YBqX13m43DRDkBezbdrC05sx3RnGyBC2VOXcZljm2WWmR3ratlgZ2s+d5 -PMHuj7t6GpIYxQ2mIpyiwhJ0HF+djARLueF2u+P19eUnBqV122HtG0uJo1GKXYzqyhPKEw61kNM7 -6icoJSe28Xg8Dy43DOg0FbVINYMVA7C8n/mghiODkuPPLD5gefwqSksTAHJKcohrBChrBbvHaVab -9yKoD5n96cDW8HwpE7aMPz19DUEqBpP1X1p8W3MPBl57D1ZQtaWpll3cyJI5FsZ+3R8wHOJWQ9AG -HAxXN2O7bKOSrf95obYXTdujiLx6rR01SucOQ1F8+Txo7cfNS4loFQZasl2278D4BRSLfey4gezD -J388erhF1Jt1lF3YNnqTK872EtV0CRIs27FfO5o00Fp7FYUXEGYYMM1iJMHJQmlwVeYz4kkiL3c1 -qjVxc73fHgoECdaRq2Js2zZ8fn4cQC978oq8ukBdN8ocpKbBPjPBZ1Y1lVzCc7QlBKmkXDz25LXp -PrGM1KwZtmEZJHT2Y0C5o6TYh9kGo9bb9hmdz+fAJfHhdFswTbNmGZKZpOrFYLM4vlu2ZkkW2oxQ -x7kMvigwBExGSEDWNCY1gjinY92SZD1I4ilEIo/Cbr77/X7g+8soufUwlUr9+l0GIAvDUrPQEnZ6 -PxYYratScIIgGV+COzefa+FzpYMTMKZxjqP5pDilLEr0+Vrfkk+dJgm6kAbKB63GA/3o7rIZ1xid -XrNu6gnHKMb6yhcFpo931HWDsqxxv9/QDwPqudEHZlFWLn47yGNZZvx///gNLy8Xcc3xPoy3LkVd -Nk5mfLQ7ePbzZKLayxcF2rY9eNLbMsECRbE2mw+tLVuHczQXxVHW1ryuG5RFgWfb6si1b9+/YZ7E -/5+Lfd9z9Sakew/rwK/XU1UVsjQT5uY4HOjUUpJ4SQ2nCW37RJ/GzWgnEX2doDSMIoIpitKkwrNS -s9nGpFCFhqH2uRFXitOHEXreErQj2p0dCFtZmqHwCQbTiv461coOkLHmFyxH+S5cRixgPhDQqBHg -qc9yhMxFBm3bV4+j46vg8e/Vx3Hddnifo66rMGZ9PkzAsi5ADLBUgJZlgaY5oa4qXG/XgxFIDOCb -OmNL2TNrpruEUW/rOgV+wq5dljzPxRIsTVNMs+jOHw9pGdR1dhikwDRx3fYDsYXkkyFciF0wP368 -o++Hwyw9PsijJJbqrmhH1rZPba9ZR2I7hYUtL2vaCQAvLxd8+/amc9+psXeZE+KME0FLbiIqh2Sy -ZfT+8R4EK7OmmdZdxgKQthzhNVg+uD2JYpsJ2nlY1y0AfvRZyHWw6rqJoefRtckfamXnMq31nHPK -5HPOYZon/PjxV+iXi5lnlprNV/g4Cs10R7iJisBPkAWWHdyCbPBMEqcDLOycBp6W1obNTlb+66+/ -cD6fo/ErnY8zh2EbA4hawOUe+zCo3ZcFGdkCoyqw0yG1s25YUqfZ8RGcZoiDaQ1VnFmWXG+C//zP -/8L53KiQzaLr0zSpHwXfjfxTqAU6SzySxWgCop4YaYItWJ/TacrqTcqiQBaGfjKLY1bFk57j4PmH -bFViZkLlP4lJTe71ObphnJBMs3moW4g69aFlFDe9oLCcpEpSECM7qajjOISBlssh3WHQYB1DW24h -7qS6MLkZ0jQaN6rrbdfjX/2xTLXCe7i8Qtf9P1wu5+AkLKc39Q92SAcdXSJYlunJOhlPdW4yCwAy -Rf6qKrTp8dfWUVmWuJzPYlZy/1DHlji2LFU5sLRsKh3RTR9HjqIizZpuQQw0tIKqqko/b1mWsNjy -AzI9jgsu5zNcXmCZR6WzzssS/O4FB/m8XsO7Lw8Zx3FaUjQ44ffwmc3zruOp60ARJo/gGdaVdWdK -0wzvH++hW7R9acdtP7np0hAkalGkbKX9WFmWmpLHISWJthOnedESRk72Dedzg5eXV5zPZyX28DsY -eIgfqGah61BXJZ7PXDGxRTPs8UDbJm5Bl2RmSHyPNMXh5m/qSvkFTdNoJ4gDZJQvMC9o2xYvoSWt -hKwtEpucbfVxuAL924QxlGgH4I8//tTU5uXlErzinBmuGMEdaRcVyNIMp1ODNnjYc8Fdr0+NxgTw -LOuMwxGmaTRz3Y6DGQofhTEEPFh7fXxekSTXgxuvTIzxPw0kYfAgFVhaRyGCLueDSQTR3Nhf3dTD -7XSq1SSEABk3iBXakEBDEY1kH6sGv2ledNiHc5mMjc5zlIFtt64kxcQN6L3gD1k4ebMs1TmG1Pwf -OR170IWPuoHarsM8X7+Uf8kB1CWxh3oEdnU43TfLsiAnd8FT4lgujeMQgq1T34N9B1xeAGg1UJSG -5861QQovS0gmAHnoJLAEsziUjrbLMqRprmzLaV4MczRXgG7fd8WCJBjnaE4nscnLaqzrVe+bjEK2 -7fh7zJznedVTnpZ3mZp2rIf3YEtFrk/ibLZU+Aoaei/Y27puuF4/dUYjcTW6ekn5uCneRGOf5D/+ -43/utoYVf/3yMCJ8DPpo6RUH80Uk8IUPwzgyM1v+OOtexRDeBwnrri9K2nsZfrz/QJ4XMqopc0FP -nYeFRc88KDjGceDn0xld3+kJ6DKHx/OhrS+2mpI0RYIE4zT+Cx+8yOsW9HTGvCzB9y6CQOy1x0GP -KR6PO7Is14m+7HdTVsw2DdtxxFEsEkwuRTxNUwUEI9MrDSYiSTAI2VVbz+zEAntfSSixZ7789P30 -AyBoaGfZcwNMhvrMkquuKnQaqI89am7A6K+wajuOugHOPHQux/3xOMy453VFVuoaAlyB2+0WNwPv -Lxiu/PjxgaapzKjsaGlGZ6c0SXALRiQEWKO+JTvY3H0Fwu0fu1fEO2HVTpmMVEvQBsUls8CXkIkm -gV+hMzPC/uI6oTv2um4KJEpHaNYSmV4K7LwAO7qu17mEfNf8b3aYbgSvMyQ/fvzXblsOjFSsg263 -m6oEqVLKshLbNqmX3uPx0BnwtBVnUPntt9/x/fs39eez6KVMRsnweb0qgYYnEk/59/cP/I9//zum -ecLj8VRzEdqAaS0TrKCSBKjrRk+Sru1QlIUirBKIlujQE059m3bZCUe///4nvn//pq1C7h/v43BH -GUfVBopyjvv9rn/3xx9/4m9/+zf1R7CgFFNwK/ckxZcn2O12w8vLy0/26+y7d12POohwSHG2JceP -H+/4/v2b6hm+moNajoPlNvRhtsE4TrhcLgdFpPoKpFGXTuDQPkPrp0DpLO/VuRyf16ueVn3fKwIe -uewZ/vzzL7y+vpiW2ao4kJSDYlpzu91U2ccMripL/PHnn7hcLrpGCJYyo0gSwOdebeB4QHATPp8t -zufzQaU5jkOwiPdo6hpp5vB8PnC9XlUVyUPmfr/j27dvOjglScS3kid8UcgsjKqqBA8KdHCWyl3b -4du318Po9ljiRT9PAs40jO26Fi5z+O333/H29qYkJckmI+nOsX3Di+dY5qostSalNZjPfRB5DPrF -cvpEmyO2ffiyCPhVpTj8ECSS8U1DHP6RO+R51OHbFlTX92jb50HDLzW+B1QttejmPzV1GNG9YhgH -mVYThkAImShGQk40tu1BBgdiFbF+FkSem5mZUlFI4OIkH3YlODuOo8snM8PP3h9fBkk+dqbdV9KI -BSJFyRnq7nCyMfWLQyLlc3789QMuz1AUL3qv1kuBPXfrceB9gX07jnG3GQQzJGGDugPgxABqrcYI -3o7jFMo6KNbCYMxOibSpFjwedz1lLeloC179fH5FIRyLl5cXbNsaWozC5LMgrCUcRfWoZb3CuPck -hs7tjGV5tKMbpwnbNpiBsT7U49FxiQGXlGrrhDyOowaNoqzw8fFxsFTvhx7jVB+CKoVrhc/xeLZ6 -P/QMnAPethhLtyiq20NmKjMgHSMtraKyTFpOO3Y1FhiGAbfbqJpuSw4Rk4czzqcGmSvU54xAFVMv -C7qx3pZZ9O4wJ94SfexC5hRZpukERiyPoa4bNHWNzOV4tp3KI+u61lFX0zii7wdM06iDLKn4s044 -rMNsKl0UpbCnnAQAOhz3/cdhkfEk4RwA7/PAaoy6d8EahpDmleY714NvnO0kWEqspTL73CPNUhTF -pLyHvh8MGSbD+XIOLdGL4CohGFlC1DAMSpDJc2Gz9eaebDr8r6zD7WzBI9FlPbSq7Jw9BvN1lVmC -3ueHNJyuy9a5yA7wiMh9rhOIpmmSCUah5CCBinoW62PJFjSZnNuWHTo4VBuShcfZlefzGdu64Lf/ -91+oagk+0lLPkWbuYBdv+R42i+IamedZW6HExCwoTMpyFCJlBx6LzSitqzFlxGRfns9npTsnSYem -acQVWOoWr5NLpUVVHF4onVwIbhHp54iprh9Q+CjcICDC0+7H+7v2fkVWWhhTxPRAjrFGEcBuXFPT -MBSz1ZrVLqhlWXC73w+8dbIR123H0HfaAfC+UAMJIut86WxbSls0MywtYbVNfa8RWrKBFc8wjoky -1I/Pq57MWRoZYZSF0i0nTTM9+azd1DzPWEL9b0EqOxiTp9YzcOOpMS+81ynMPNG99zg1tbDn+uEQ -VGjGYvUMz+cTt9uIeV5Q1dWhNPpKoRXAeDBDXqFya1KZv+IBVqBDkdft/jjoQ+hsRL2CFfvwfXz1 -epD5hXkAA29hzeYGxM3DzMAaWdYFt+AMaTofAkr8nkWNWTZDiZ+mEeM4oTk1KIoCTV2j7bqQwYz6 -WdSSMBMehgHX6w1NU2u2xnUo/pqRRflVy6EGqMHLIUszJMmg4HucaJXpXoqEpBxNcwrDYsxId6ZR -BPs+g922Pc2kxeTDF8pmZ83JsUUSwccDWEL3Fj4w8VLP8Xy2ivjKaZIc0zsTobl4+bJ5vYzMlopL -IwXWR2VZYgumE23Xo+8jy4zqu23bcLu94/+n6017JLuSLDF7++pLRCTJUo8awuj//xBBgDCD+TCt -akDVXWSxmJmREeHL29f5YHbs2vWgCBSqm5UZ4f7eXcyOnWUcJ3p6etJxECcDh5ohh01r8+tsICX4 -1kWea/mHCQpsrVHmvn9cVPGIMhHhnZg/47B9DHTAYnAhILvXN0Nzb9OeccDd5bnb0tYKcdjjP6ZA -DoWyLGiefFILtw6zlPaRVgrzPNPhUEuoB3l++48Vo61icHuBploUpQLOeIbjNKlxC6pIjMRQPblo -d1Za1lWpXA8c1kg3iuOI9m3Ri8uOEm0lh8+ITYzRI1B4cC7KsqQkLWi53eTvLB5LFFOZ799fKY5j -quuSXp5fuFURNec8z5RmGd1u90+HkMXOwPJ0GQaRZ5HPAC63u23bKv+AcyrYGRl7cds2xgAAKuGF -ATCzXu/Q+btRhEN2YYVsyRFWVIMSnvnwpQKF/ABHT42HGCoHBCVqSx4abzVgEs6vblWFHpKEYIF0 -lYcK9RSAP1QS4B/YHtUp5za1/rIjyGEY3LjQlHHcQ05qUnEzNzV/TtIbD1TU0Yx6gAxvW0j7HilB -ybeJ3kVYlOrzxZx+HBdtNZqm0cWyPQiBHg1IAUrNcyyEmZROpxP1wahmp3bmDxwHseU/Xl/p5cuL -5hUCcCUKPD+9R899a/2Oag1jO1irPTozqfdfnuuftyNDbKhhGGmSMRhKfLD59njzRER4Nvg8bgMG -nv+ha00iWY/8Xseh9VqHbduoae4uMi5iXX9ZVkIN5ynFuu2UZ3xBQdAGNSHGgG3b0O16o/PTk6Yu -oRLAZWdjxwIxDQWYjz0FvMuOeUN7+uOWYsAs9k5DVf+JSw8UgDY6ygJP8F/nYMjMZKRvklePfjrW -F4+IJStZtbpuSHRxKzats9oehSiBPgkeB3aUk+qYb/Xam7Is6enpTHlR6xzVDHx0AfaSsGv1CrDR -jiWOuesHdyhuK72+/vhUrsK8I01STybtnl/4SbzTto0GZEJ3AFUlPtMoM3B8ToREoBR1nIDYEEbi -T/+pqordcvJcrNd6BdBwuINB2vcDh7/UtRhskNjIL+I2tHsXh3VDBu9DGW9ym4PXjyzJNIm9DESk -UAcB6eEE23o1E92cchM4D9o9ti3rPU79o/QYzxSjRJ9uHOmhClUdzEgsc9UlNbGZKTIheDryRvf7 -1YTgoqUWu7Ys9QxssfmxrqEsZStxfkbWh8NVnCkfyqtLz3b4EjERyMk5wY5KdS5uOdzoq/edRz9F -kchJtdKvv/5Gz89PdDgcnGyxquh+v+tm6/tBYrVLjdp69Eez1F6UNDbk0c6o2TQhdTLPLGNTDenH -+ecE+hKsGuty+eDgR3OLDMMHDRK4WRSF52nvwjFCKXnZ+gktR5rE9OPtneq6VrIGK/xcKrCfmjsr -ucbX0G/euAxceFRYPH/vFWdBdYLfta6JuPNyjPftduP3GAaK2o+jy3Lo+14JWbj5DnWl+MQw9FQU -+Se9/rz4Go+npyeqqoqWedbUXOslADegYVw9EBEtRJqk6ksBezXwPvjvD2rn1vedSr25l49M5Fek -LlBWIIaEXPzvqBLw387ZylWKVmNhS/FhGBUwTaW9tNmaUE3y2kDlxJVWPwx0vd1k7p+KeCiW0XWi -I1g18RSS3aGu2adBWs9hGNUSDWvDqhUxmt3Exuz97Z2KMtcLbt34z8Q24NOJc5hDHppwDZiEoFyd -55nKMlBWXFWVVFUV1XXNltNSMtVVpRRKXkSJztJxG9jTj0u40AthsMIUoJ3WhBSLMMt4NGhzAdjq -/ED7HgnpJhUPu1yps4NxLHKRUu52dvHMuaK1QGbTNGE1VlJQ1rRK5QXACc4/A3muzLSsRNs2WZtp -LtlWSVRiYVOSZhQLddkiyxg3RlFEr68/XF7AyNFaVVno1AXPEN+VGZ+VVnZfv7K5S1VVn7j8uP1s -6AvGZ7fbTTc/gEsXsMGx1DgM7G0LHYh9lzxSZlLUXay1kHmPYBEGDJ1lmU3KgQVa1/VUVZU3vcLa -wvjSUrgt4BxHsbL3bAuC8ttWUuu2G6ffSP/3QWTvmG7ZdGsIthhELDSQZNsSz/U5inh83d8Gz7vC -+idYF6OyKCQIN9KLtaxKOh6ZqwNW7rLMXAFALqqGEjKWA23Qesjjxq6qWmWGc8AmlezAmtO63jXJ -ZBgGOk4TWxEJWJHnB3p9/eGJfJg8FGoaikV2MZKzBpOgLStoJ30ebmQAPxwRxqQVlL+7IPJ1VVGS -ZjRI64A+D6KSpu0U57BhpT7wlsi/I32RYRTTNN/VVUZLQnWB2fRmt+iu9TLwcgMjFz5p1Wm2ekN2 -orVqw8+DswxQ+vvtTmVVSlkcCjgbu8joOKGThIlcw0jjvOxoytqsYzGCm2B9BNG+aWSVMY191Njr -xGbdNGAThJjHDIWiyCkg8eIb+0/WZ1pFmXeKdhIGnlDPYWrAEvRdBTnLunhkLbRTuCiS2OUesNkH -H0zcEmS0yCQMpqw46DlGnVu4XQD2e9PS5XKhWsRhPLp2PXxAgcqnQZMvC/bhcLJlaYdWHl9/+/am -nApWfbKnwjRNVJUFY2YWFLKMIi6LHOEEDx9iiFQAM5sW3LYdJfHonZT4QNM00/VyofPTkzyYUD3+ -0dep2WY/fJoxwzXHEmkQnzWKpBMKtT+LcYpCB3Au0n92fU/RNH0yV1zXVcs6FrPMOo77M+ONeV5U -3YUJyWNYB8JBITRCVQDHG5SvURh9sunGs1/Xjdq28VBiHnulOp6Kooiens6SmJsb7n/EPonSV4OJ -Cfnyvjsch8vmlfKiVFoyAipwOIOQhYw7bFx4Ntgb9zGVJwgCent7U+6JdbIJg4BmM3K0Y1M8f3bU -nSQHcfFGlJZYlmaZsWeP1O3KWtYz/2HTdOkgcN8H4zhMZ6zNF/NjNrXEWwyAh1g9WKph6mPXA3/m -SKpf5trUNVfLACxhggNpsjugY5XPL/NC96al97c3Op6OdDyeVGTH4DQnDg0S77euK1VlIXTk2caD -r+rIC4VWFEU0a0+2M3ouNEdIZYlmz6hxniPvg76/f6gO+/z0RE/nM2V5TenoYpuxYcZxUsNELPCu -42gynLpZmqhL8b7vMn/n8RHm7HYzY9FhdAbPABvkaVl21tgCB2El0cq8qF2pCTEJbnTYRyEM9HHs -ZUUd1iFGzU1k5PXIuLPUXme1xZtFHV+i0EPL7/cbJUmn8/pty9XwM05iut8bShLmsEPnsK7Gv35Z -aF5WdUq2cmFr+LpFkdrGXy4XjVjHJWG9Ie0/rDitqCxy+d2rHpKP8mkr58X0yB4+jyPSbWOHa1fF -bjpWXB48Kyw+AeDQsjTtQQ9cQenIIujCz4TZBgOTzr7Nkna4Xa6pKguK4kRFX2VZUp5llGY834dd -u429w82PgxucgjAM6XQ+i5aBlE7PMfQ73ZuW+r6n0+kknIqYFolKjyFdBNpYloUKdYZhYL+5xCHq -oMiCLMO+Z7OO2VDK2jRavHCYjsTrpC9q2zYq8px2CY20RCCrBNMTXiSe0xRqqq81C7HeadyHB+qE -Yo0imKji7MNtxWL7rL7nHhLhEdYQApuhbRnYZOBnFGDLEU8sjRYLxjowoWfGi7bfR0G3eZIDsZVF -m1M/uUUSGlcaO9JCZFUurVDb9XR7ffWo2vem9cprlM5JHKmkeDativU84PZiFpyiorqqOCrtcqFt -K/WAfSTwFAUb0URxQuvaakKuu3xCORBcm2DNaiFr/jOCEhKEwLWADgHvDJcGbOLgKYnDE7kRuJQ4 -+8A3ScHzGUyKEUJQnJR4NxeHs6GPIha50TR51eo4TZo7gPh06zGBwx7Sc2BQbozNGFHb3j0rOXaV -5vTry/WmJjd1XXMwyLpuWjbxuIzHLBjpIe3GOqDiIdpNhVEP/PJmKaVAPwR6Cq69IuKS7msViI5n -EDlLo2lib75pVgBHqbuU0zCOak6yLLvh7+dqKwVr7wWL/954uXEWiQWJAj3o/d7oHN0RUTLtB2GI -ChDL8d1DVe3BRu1xpr6uGy2ipGO76kYO2eDB+CLTWwqVA3j5+Ls296BpGpUYs4lKo+0Tekho6K3s -F6Dd6+t3+stf/jdKkoQulwtVVaVpPI8j1jzPKM9LmqfR+/eWyIIKM8s4DIaFYKFiHAzM5jSo07Dj -kljji0f5rL2tNUJrHLSFdc9sV0q7HfnZywNrAG0SDD9ADS44tBgAACAASURBVEdFCaotDjN7efG4 -fDe+EL4f4GOVYcNt/Ti00DOizbOUZllbGP2hxYGBjPVphEdDVZUUJzUliQ+KxnmW0rLkSnPFh0BE -NXL4lA4pHxzKOB6phGoPxZxvP4657wdx79lMFHLisZvWlRRjOB6PWkUEQUA/3t6V+LEZthb3nO7W -zNKE4iSmuWkUZXeuRUwSYjNSuM3OejtAYmsXEwxPApEUAzHGyBG3P8tjjxRGzshjk81sc/+s95tN -G3bx0YExFY30lsahwWlDMjcPI7rdV73FASihVePQTP5O4NEjpBR02CRJNJ/Bthd/+9t/0NPTmY7H -I6VprpLmw+Gg4JETuzjef9t2+p6LoqRKAkbsP9j8uRwAkHJjMsMhGxktbWc8GGcVnvH8mpF2TKDc -JGVUdio89ebZ+R0mMYNxGP3ypdR9unRsiIkLVyXPCIQlyplMcnzffzBMg2DxDiisdeskhX8PKvlj -e9i2DZUyvoP6UpWrxn0LICY0HVEU0fV6pWEY6Xw+C67wrnR8BPUE//Zv/23nUUzPMVJZqtrxvh9U -LAEtNXpUNjishCjBaLstw4PA6ead86wtoSLV+9tZeNf1Okvn2zSSyoF7GKgN4Q4Dog4YfTzHDTRX -blU7Lf6zNmiCgZJUrMNuhJzEKAyoaTvxpou1BOUDZ/N6TjX4SFOaZMOnwoBzn5E/bxQhv07syGT2 -z71zTmVZsNAj5ANn3zZKs5wul4vmNUCzzmVm7GkQVskRYDux3pTHzmeOM/k2Oh4OtG6rjupQ1ez7 -Tt+/fafnl2d6enqmtm01k34YXGTX7Xb7JP1FeT+Ok8S3Z1LCL14/i2fFvoR843Os+l0Ulq7CcWrJ -jaqylEO8Nx6QbmL08X6hOOH2om1bqusDlUVOmRCaLIBrDw5L0OJLzmER8BLAGuKIt1meN6qwx4M9 -kGlEqLyBVC4gHMD8sxdtSZCcXBYlTfOkVl8Ig8W6t/6cFh8C5wVMUvg8gBAGxi32tAK6f/zxtx2n -TmYcdFFSdl1P//Ivf6FpHMV4YfS0xXnOL7ksOR8dckv0RE3T0NPTk3qtgc47TrM6+jw65B4PBwqj -mG63K91udzqdjtLvH2ieR5UR294Lm82GlURRSF+/fqPz+axWTdZIcxiYx82kHDa1RGpREHCgxf1+ -p6ens45GYZFuLZ2AYwxi3f329kHPz0+U5zldrzc6Hg8eeGT9BjjWuZcwU+avY9QGujFixvDnrTJu -nieqq0qz7h/xhcvlQs/Pz0JeWqjrWsoytiNDkCfaorvwGLZto+fnZ4qiiv7jP/6NzuczlQWPN+/3 -m3dgO8do/vlod+AK/e37Kz09PX3itKNHh/szSmt85kK087fbnc7nM+37TufTkdZ1Ewnupq2k1Wlw -5t+B/vrXf6fT6UQBEb28MO/e9uuPiUOggWNtwevvcrnwzzGWeUnC8vbZMg8fxFTwH2zbjsoyV84H -ql9MGUD3LYqCDgcevf71r/8vVVVJp9OZrtcbvbzw+4P2xFYpbduoYvLj40OEQrnuqff3D/o//+v/ -oepYVDRpmnJbWhQ5xVFsnGzdogCFchgGen//UHYcCCBZmggxo1PjSgsO8WkYarbZvhONs4uGQh8z -L/7Du95uOtrCIs8yNhvJs1T7b9zO6IWxmKDkA0vOllzwh3PjLtePFbKhh36g0/lEeZZR2zQs+zU9 -L9BeZK0jgy2XEvx8PrHaK03F8stlzC/LzJFMJrmX3YtiiuKEZnH8wecbx8m41TJOsxnSB9oNou0T -X9+OjhzCLoESEoQJsorlwIPGncSjYhBd3+vh+jiVAOFkUADLn9/bRYv/RqYeI/a9xmEVRak26ojn -htYCASjWBt4CxhCtBUFIX758kcM9UH28NfS0ZCRIkYEtOD0+9+Bu08aa2hRFITXtSGWRU57l1EjL -gmeYpgkVRU7bumkSVBg6NijnUUZ6kRQyDr3fb+LzV0jLuamfpj2YbCAosKi6rihNM3p7e9Pnge+W -55l6X0LDEUUhxRwbPXyyPbJpqvO8SBwUu8pCibbtO41D79kcY0MhIGTfN817v16vciq2Gr6ASuNR -bAMgbhxHprXK7XdvWrMBgcKG3gjOBoPgZwJlR6w0QDLm7rMTLysde0ozTktOs4wm+W6QmQLVj6JQ -Z9D22SHngIHTzJOYgr8Nj3ubhMQ92vZJRcYONJyInOeZx09w72qh2+2VAdMs101s2W2WiIMAyWEc -xSU59lxi8OwHY2NmPRAtecd+D3gJ4KYbH9Shj8KzcXJJQwDZ7LqDmAgtShiG9Pb2ptqSSfr5oshp -F508/8xRE6+n6UbbFnt8fgvAPY5nUb0MGo0207alypC9XK5a6gNcddZxkQayZFnO1d0wUBRHNE5E -Ybjqd4BzLyrSYRxpE83F8Xiksigoywv6449venldLh8COLp0KYD3KsxLYvr555+ZqVsUFAgIOE+T -5FaEVBY5tzZRzGpAO3d/fCAAxuyCA8NsmmZaHh4sIqxb435igbOicF8a82O7+R2hg1QJCOApinix -PfL6LUKLUd3tdpODIlbAMo4T+n555flzWdI///lVQcDz05kWyeura/Ym3LbdmKVmHiXWmjRgJDOo -IIkty7ftTtfrVQ+7oijper0KXTilvr95kmsGeVaPmxBFPK758vJCYRTS5XLVgA3ekKCz5hqEwoxI -8PEXwVZaNVWxmXib2ZQYB3M71+t78bEdFxwShYEnFsPvv1yu1DYtVaIpsBsNPwMx59ZaHsExcRTT -7X6jy3URQ43FM2hBiq5zXprFVyBjc8yPD5mLMw/l559/ojiOhUcQ6SHeto3yQexYNIkj2uTz4LBB -hB2qDtjA2XxJZC1gcjQMA/V9T09PZ+8ZpGnKY7n6wK4/faffEVXGMI7UCfgKWrV6WAjBSG3ml5W2 -bfY0GjDo2fadZjNexOUexyxTj29ioIE5uS0heZHsugCmadcXFlDgzUF//PihC71tG0aBq5IWYT+h -auCHV9I8j5Smmc5FIZ9EP4MNjnBQlInbtlHfd56Xu1WKJXFMd4kXY4vqiIjcDBsjkHmeaZy4uvjy -5QulSaq5bGEY0sfloj6GznHGjXdUqy4JwRYstXpr5laUFMc8U8YGLWRGbduTefGDPcCpOJ/Ya3Db -dhWgpEmqL3XfiV5ff1BdlzqHfwx2KYrSMArdGOt+7xWo7dqODseDgF7ynaWFsso5R7vdTAUzeIYf -h+OBnp/OdLnevb9jPQDAaGPJ9WQ4EKswL1MtY3HA1HXF9O60oHH8pocHVzF8w23bSufTUcEuXE6M -/Keqf+ASPPFyAOAkHMcOsASbsB8GHXdySzp4HBI8bxzOWcZkp6qqaRg65ZCg/YmihNr2qsw9x+u3 -sWC7trS4eJMko8vlu5cibR2rMcK93b7xaHddvHezritt4k8ZQwmWZ6kktzrnUYQbWmtrJNNaRxrX -x7IKbdtWqquKivJIbdOpwi5JEvrjj6/Kzw+C1ltcLLhJlavNwNlC80MIhHP6ib2ydBf+Nh5MEsfU -zA2VknGAW4ZpooW+rDw/0b7PFMU8QnTKw53SJFEGYZqmNEspDXkwV0Shjk6x2dBy5HmmVtR3ibTm -1KHC87B/XEg2F6BpW+rkhTn14qyHD8u02bI7jEIPII2imD4+PqiuueqJo1h56VikGJOdn87c0xYl -HY+zKA8nnj3L7YvPaA1SWWCVKlsOlV6cFER01/bndrvrGAqbGov/sVXAtCUKI2Xc4XexOUmjbrc7 -cdoN7M/r+kBFeXSyceFCoNcOArA4RVabpEr1jeOIdtr1MOr6gacI66AVkq854GeH9wOfCvhY8ufe -6H5vjBFpwBJrmbDMM6+vv/3tP+h8PtHpdDLeAhH7PAgjF+NrjE5tWrFNh8LIdZkX/X4WZ1PujuNN -F5rdjpMaaDoQdDU9lLmxTWc5Hk8irinEjiqhdR2p7Vqd65dFLgakH1RVtRed7ND7WHrvRRhdo04W -7LgGbYINoYTwBe7BLN4ZKcszPcHRO217R2XBh8A8NXIDLR7bMU1i6kXAhN/P4E2oJeD5fNToaxxC -EBwVeU5d19HH5aK3jXW4scEh6DGXZSVUZSj/VgGSQIgZNBAz1ISl0/lE5xN71wdBZzznF6nMMnW/ -xUaxSbVJzDcjTxc6BYDHoaM8izyPP4xdy7L0xlGsbst13HS/36lpWpkC8YIE2OryGmcdK+OdQZAU -xxGNJkqMmXS78ueLgidP6InRe/N7ejehNqHn0TAMo0e4+bhcVB8BUZXDbpiC7Pz/mYoLfkYcx7TK -n8WGhFw7TTOa55aGYaC2aelwPFCSxNKiTR6IGYYhvbw80fF4ouPxQB8fF70AWeuyfMqBDEWF+Aiw -Wl0EuB/zPCnhD4D/tm0sB56XVeOzrYXUvDh/fZhbIu5o38lbEIgXg/mlzYDjh5FSIAkqT0/PdDw+ -0Tz1CgTt+y4WX6v8jkB6+ljLa+s6y+Vro23FrkGPpFwAa+v0iG9wRmGj828LYKkl2cZJM8fTSQ1S -lI8tgOC6rhQLoGWzCpHvB7IIxqVR6DICMVK83e50PB4oSWqVOvNCy7SFKPJckXhlm0XOxjrGRGK9 -6vtANNb5fGYcJcko7Hu63+/eoYZEHWu5lefM3Bynkaa58IxIeWSaqUEqLM/++fvvdDqf9Ta21RoO -rbLIKRG2JsDU9/cPxW8slsROyy2tG2TIuZdXqMlG2+7x8fOMWXnrtguj80R1lepNahOuUXh0XWsc -rlLdIK+vb/Tzzy+UJAcVS0VhpBZpvinqJozAxatW0ySlsuKWGF4YaCXg3RjHkW7+JDlQHDee8xbz -SBINVmEAPdQcT8vGtYcBxp/c+uxaRbA+YmIMAHNObASAQ0kceUGOaZJSHw5KNbTRUChHrTedRVuR -L4DRW9/dKM0KmudWudbQds9yM12vV8eii2Lqupvq662oxpbsMJnI84ySBxoqbug0Tb1NYA8R++dx -6loKKDZgmjFn/eNyUYMJ8NY5bTeVm4epzLHwyjEuto48dV3qpoGdV1nkukE53ZbHjKoajGBiMnoO -StfrldZ1U7oryExdP9DatJ5BJWsqbJjLqhOBgHw/OuugpJJf0LPlcDg/PdHpeFCm4ONtFIYhzctK -0/2us3s++DNxiSpp31jdZpF/UHHtAWUTeYOAqJTw1ziOaFlXRebzvJBoNHdIW+MQKAKR28eKQBf1 -VhQZnU5nwbMW6oeBBlHvYSTq2Y7LwYZSe9tWakSxaY1RkyThRJ9I2iqZnDRNS0HQ6UWAvwMeAV8o -u4d9Oa3E7rXEeGZ4jrzPEs8aLj4ej1SVzD4CIIX+LpHeAYfAKDPIKAwozjOaJidw+PXX3+n5+Uwv -Ly8qUcUH1MguKdG3MFQbcABzQMnHoVf7IhVghIEEdHJJBk9BHWtlqb7wr1+/0eFQKzX1cdyD74je -N8v4MHDCCWaSWVooNhhwh3meqW0bA9iwdHYYRn1JccyHVtM0VIkbL8pb9Go4gPI8p6qqiCikJBl0 -AQ3mluHFOmnpZ6O5bVmIMSBKcSTwEDlyEErXPC9pXRsRwCyetwA2AH6HndSoW42M7bDY4G0fBBEN -w7sGftj0Ziy+6+VKlQiswLbbt4X++PqNHW+NYSpuSCT48PoYVBeBagr05rbtdA0hUi2RQBh3qK9a -zSUJz+yLolSNCw61w+Hg3JSHxhzwifd9HoNWHL8k8BKH4XgEjwYrQkOli4sA2JmlXMP/IkkSGnQM -uxhNyfogjuLL+fX1h2phbEx6DDcXlN9M6kiVNGNBAywE+L4BuY7jiM6nIz0/c2kPzKAscs+aKQwj -ipOYprmlv//9V6qrio6ng2xm3kzzsupMvxQueWjklUmSSO9JanYwTpv2gXCySdNEXYh8S7OQbjcm -YRRFLj4BbtTJ1NGC7ve7N7rC34WFVlWVKkyal5XCcfwUCNp1HU3jLL1XrgYh07TrDYcTHONB25uy -jmD95A4LZ1eblWil0GnK5pOL6BAu15vOna1as+87xSzQtuCgQmlpfQRtS9U0dy+zD8+5aRp1rgUK -DgNUa2SSZqk6Mn1/fVUAFcaxaJXYIHWjvp89z4Msy2kcB280iU3DrarLIJiXhQZ5PxZ0Bv6EZz5P -k1rdp6lTD0ItiQvg9fWV6rqiJMmNtVnySfbN686xJVFl2cpOcw4WRzfHpZtLOE+R54IjcTW0GPUi -BHxcPTREtKsnACq7OGbuyZP4Co5DT4us0xg3O3zUVHUlriZJ4ju5Wulk0zRCbsno/HSmuj6oh1+W -JpTlBRF9qCNK1/cUDOxDV5YljdNIcfxMXdfRumZaksFdh3UAPd2bRi2WMIpj0kOqnvhN2yqXnzX8 -pYwKmeWIWC6X/BvSPC/ag3FPXyoHHTNiaxoJUVQQBDSNIxOhZGGhpGWzilH7ycOxFjVWLVRdF1SJ -hCE7R7cR64+cdZsKxMBg9GlMhr66bVu63a40TSOVZa6It3XogUMRRnjwebSVBMaJ1rwUHHlbEVjf -PMzq8yylRXrxJI5p3x1xiqPkMsryQsdiO0kWgAhVfry90TRN9PHxIUS0XL0cMc6FpBseCfBiVFGW -CUeBwhN4jy/IIbo3jZi1xMZKfqCyLHSsu22biqLmZZXnW2r75RKlXAXjqNPkYRcWi7AsRPzvuK2R -G2jJb05n4zwtEOGHjAJoa8Iw0EsTkw0FW/HBnN2xYzhBkgm2luWY49RLEnYk5ZK70eivTZR9TdOq -AgzlTJqm9NNPTCs+HL7Q8djwBg0Dz/1l0T6O1UuwpgrDSAMlEQGNh4YSt2laNpvoeq+KgXCGbc1K -vXnGaVbXFEQ/8YEzeQ49TMZIKY6YReiiythqvOtaHddFYSA360bT2Ht6ACC0sIECD+NR1w6zj8Vw -BELPiSn6VAZmqZM7c3lb6nO8XK46YrN5eNxycR/ciyNTmqbq3gTcx2EiqxfmAg/FZZnp9fUH5XlO -379/pzhOaF4+h7hAwbZvjToqo+K4G4INiFnMSGR9RpIkmr+w76T2bbCuS1NHF0+S2Ku2sEFh5mL5 -I70AbUybhvAplcQfPhDwXMIwoqoqHKlrcI6+IBlxhPriJUM/KgLt2sI7dSYljKVxliDvi8C4HuH9 -QxPBNnclxUlGsRCtAKKDIDdNF70I13VlSzBrKAjJJcQmcI7N80wYYqP235jZJ0lCX799174CD2wY -7jQMvVoyQz9twyX7/kOz5rO0oCiaPzm2JJKOCmsquxl6IQghJISlyZmQPtjaClZPrqzetLREKo87 -dRNvo2UyHrKl3TTN1Eyt01RLfkF7u3GSb1FQUeRs13Rv9PklMSlmgp8HEw2EQljOOnzpoQVAmbmu -q6bybNtGt9tVuAcp9X0nJp+uf87SVDMQnBOvT4/FXBnWaVpJdK3yKGz+H8IxLQcfbeH5fPLCZp6f -n9XCCwYyWMDItAfmwdmUkTEPDelQ17QTj9XWdWMNg5T8qDhiLxnHaejhXCVwkq4nO0IGfwQmIEkc -Udv19P7+zuK3B+UdEdHtftPDBlZb8MeoyoI2MWHp+14NRrDpHyu6x39vJzM43BF7DkKXvSjwfeM4 -Vum8f1E4Q5JNKNaoImIIC97f3ukgqrVF0FYcDkDveVOP+pDGadMse3DB67qmKAwUrT8cDlq+8d9N -9DScF6J1nXRWafPP0A6gh7NqKzffjZSiG4UBrWb8Mc+LlPiT58Xm8tdinXZAa76uHPEFVxpYSyWy -enBQIvONKFKRD8p+pY1uG/XDQOfzmTMH8hO17bsCVuDbY56+zIuna3c+jJvnn7Cuq5qrghtQ1weP -qg2hET5vI4QTmzEPpx9kOtiWo+97nSLYVGxLIWYLNufahCTdIAjpdDpRnpcym2+oLJ9pGP7wSlmb -sPRoFxbKuBhMOFQq8C9s2laVi5Y9xzLlK5VlpQcI3j2byKTqUYkLBa0gJiD7vtP1dtd3CSrz99dX -rWIwckZBAzCb13foCdng7WCtxXChqIGOfAZ4DYIubPMKwLko8lxDb1j9l6mzUSLCIlxq1i4cno4M -fjrBWfA//+f/s0N7fDqdtaRwHzLxONr35q7jPqa8ZoqEHuoDZXlJb2+vWqpD2x5HkbzISAkTzu4o -0NMJixwPmeWXiSLa7IAaeJpojAn7oVeNNrLTUe46SnCgZT40+k7EtGqPyLr92XM9ciqyUOXHiTix -4KQF43CWMnnfdyqLkuIkptvtRsMwip99objL8VAroIp3gXEsq8FWSpKYirygfuBgU4y39m1lAVOa -6jOG0eY0zd7nw7vkDL1GFrhL0B3k+fGtnipCD6OJvu+1+rIWZtDptyI3xWhu34nBUjG8gDMyyCto -X5xuI1JPB8dY3L2UHoCfWBOYzUOVCZ57XZU0i/oRnwXZCGzGOnlyZtva4sDNBAMjCunbt2+MBYh/ -IrQlaZro4d91HZUlqxnZrPOuVQ94/LYlcIYnC7Vtp/sJa8ONZ5HiHInZyEqTcDy2baPz6aQ8DgC5 -8ITAhV1X/I6m2VUVcRxT8Ntv/74jHYets0L6+PjQ3rC53+nl5UXTYRySftNy34JVkP6iJ/727Ru9 -vLx8isTWubA6EHHPBbACt823b9/py5cXT4hjI8vQH1tVHhBUIqLX11f66aefPN5C17UaKIGSG/23 -zl1FKdg0DbMTjTWYLdUsCw6gntWZv76+KnsS2gKIZrC5eBy3UtPcpaS/aU7h6+sPOp/P+mwhRLJj -MXtzPvItmvudyqrSdgr9ohW+MJjluPjMemPA9f3tnZ6ezmqwacFGLHr0vU5xGKqt+cfHhb58eaZh -GCnPMwoltgoa/CRJnONTlmpcGn7e5XLR7w8dhR1z7kJks34CeZZSLqYgX79+o5NMmvB+LdBqzWJx -mTVNwwaaRU7/+Mfvyp47HA5ijXZVQRAmYsiPgDcDaMBd21JRlp78/M+8EfB+IM8Hn+B2Y3mwrR7s -gaVmLX2nWRR930sAT0Ft29H5zN8FY3FU/dfrlWI2ImBziHVZqB86RZb3fafL9UqJIP0ujSeh8/ns -5qsmqhuo+ob8NBO8aDnqlt5rxyjWk856srmgicBzVekECIJHgUZzp5xR5zL5Vh2VQfsAk8xHOS9b -eTFrjTMREw3OnGaWBgNYsfLYcdw/ZcjxSy3U/ALe7lEU6Tx/HC/6GYDmpmlC+4PhpWWfocUB6Kl2 -VIYsNAwLNW1HhZCM+CbcDLYSCe26dWQv4cYjzXleFqVl2zRh3KhbntM4jlTXtWIMuHXatpEIuU05 -/2jlkiTRZCPLKmy77k/dkAEawrcRt5/dFPjPME5qOIMx2CMGZHEWFVhJpQMrOGxu7qnZoWkSMxjE -2KElZD7EJpuw1/U7LysVOkrld/JnbSzG5hwtvtE+DJRK1biuC0e1Gb4LJhJoGdhladFWPI5jyU5w -JL45ddOF243HzjFnrLFPu5XvwqWG+2GXzw76K8qNfSdlWLkQRVJOteXvo7xn1iB581Cc/iix7KHx -aKYI92G475xORzVQsAQWe1MBgYYTCrAL5xIbKa9eXV+xSQzYOc3OcYgNK0BySbWlwVwcn5Utn1PN -UUB5DtcYTky+a5XB8dwt4d20bavjJpsN/2gVjsUExVgr6DFuxlmsoLGJQcays/44ioUUFunzwkaD -ExK+XxTG5jm5Vsqaa0LPgCgrYAZgpimBRWLXbQ4CDsVHIZhda0ppNTN9RIxbXwW7luBGhH7e2biR -FxiayXrAcwgEh8DPseM8HCSxtLJoVbitXBU8tu7LFmyGccc8t17aELdRNR3qihoxi/GDQF0ep90r -PO0qqe9Hj6wFVeE9CCnPE4q3ddNbySKw+GJFXqibCUwOcZKOQoKxL+hx1uoLGIi+fftOWZZQXR+U -2TSOA3XdpjmDeEn4HChPsWjcKC2k47Gm56cnvsnGkaJo+VMvfXuAIJXlQ7z4MLu3VstxnFDTdhIT -HuhtZeezbC6SqHaCN6KLLgOnAOagvhw2pKEflAyDFuVy+dADBsYWSFdmh5vF8wuw1GvQsSGiAjsP -FYEVToUPnoaO579oOOfhcKCm6bxDFFRhpPdoXNu6iFR6U3ltnuc0jpN+FyDh1gXKXgwqioojFcDY -1o7jsGO9ZIZhlFCORVWIoM0CfLNVhw0OQfkOh2lElDkKLzsVgaTmFICh8gyYrn7RUWvfdxRFBy+J -ehwnquvNc1PC2gB5Ca0wJMpY98gfPNQ1xUlBYTjogeVcl1J9n5PR3swze2K0LbczsAfHJYYWOZ7m -Sfqeu4RlZp5rTpxEgvJP3ukFD0H4qLnFHenJj5eKFzBNIxVFTnXNJ9o88wHy22+/U55n9PPPP6tZ -hKNjhh5aisWItJOqqinNCtp3dl+xfSjz3AMPVbfThLo+6NhwWRY6HGrtk/AQUTJbrwRk753PJy3f -bO8KgopdCPb3opw9ng6sJJRxJQNPTzqXZrv0iPKajUGPx4P4KIaf+Pk6z5bNiR7f3hbAZ3Bj/tno -CVRX+NldLhf6y19+8aiuYRDQMM+0bZGW5DbV2ZJw1nXR8Sa/h9hzn0bVBo9Gm7dnnZTtAYTEHfSx -4JhgI6MyYFXe5lUSqFjcDbzohYBoeBsQ49ylGZgE/dkeXkXBPgyaCRAG3mfFfmCQclJbL0u15kMh -1LVLRHS9XPnvLAuNtw/FWyyWoOtp9h2IofVI5PlZpiK3k3yRxtZsgJHkWOmnURTROOwUJK6PVvQ1 -gcVWZII0Ji1RMWu1o5h9J938cZLR5Xqjfd/o5eWJwjCil5cXJRIFAbPzlnnx6JsIYEwSN+rouruO -UfCy7bjS2n3f73d2lBEz0DDM2KFXyvXD4UTrMtJibiS0D5BwVhWPh07HI0tmp9njUmAkxDeS34pY -LITn2itNo/HRT2JhUPKsue1aeilenJd7GGklYstHtUNLU8VEQPLClMRm9D0q2XC7sgox1568aVpl -CoJcsytiH+jkw/LgsXn48AmVnoy/g4sBjEIcRHme5FpWKAAAIABJREFUi2tPbA6SwBvfxjHbXe87 -qU0diE5oQ7q+p7/+9d/p+flZrdwRQIs26/ff/6C6LlWWjv758fPjc0CLsZuqh3UsNdUVr2c3f2fq -Oq8pUgcnduSNlcsAFaOjCkdeNmdZMTjMLseNCSQlWtdAAFzycg1A4cZn3kzlhINuFjpyHMcUwwkH -2eWryAcd0DFTRpmHQmqCyrJ6pBYr+Hh7f/NUe5ZcMs+zJtWu60rH44ktjKKKsnTUsM5hnLS0nGeH -9Pf9QH3v2E+h8d3Dza1l7ea7+QDXsO44KHud/ffqiTzY8XbWzVYUpXi2HWmZG413srfVtq1ezDPM -TUE0cvHPDOaxXj+mQG61R1cfVo9FFCcFRSIi4dZiUpBr2zb1DETFxEywWIg2o/bosEKD8zCAI1QY -19tdA2GQa4fodzjUAky0vIZ13YxpCVt64eAEDhKQ890Hgs+HV0J7XcscO1YMyU5+5plHujAd6XtS -ang/DFSI3uGXX36m5+dnbSOwWUEXrqqS+RNC+rHEKKDkTIN3KUU4ANXKLI5oXVlluG7OZanre10v -1kMCGxXveVtmT5X6qEgty5LaptHoPs2/EDs+EKDs38GaQcs3z7NWDexjuXpVUNwJ8BIEgRIM1Bbr -44PatqVM7KuwgTGjtOIQoKJsybRJL5NSEs8eR31dN+qlp8cHA3V1vH9X1pW3cZbVA740/ktJQ7vn -VOMird3IZ1kWWuWWwYwbefHWDBPtECcPR577kbVPX9aFxtsPL90XLwK3AJewzoqab5HxE4inBpvb -Tn1717bhdrvSOM7yLt4FrOq0HE7T1MNKbFqPE6YEqjeA3h74CeKp45h9FwGyjWP7YP21iDakoG1d -NAjD4hCwP1NvCKmKPL77ttMyjS7uTA1JVrrdOgEwM6N+XD9Roy3ZKssLFWMBzOyHgW63m9iDH+l6 -HWnfezEInZkwlKbUioFHlpXqTu1s3wdlUSaqzttUlqyYlnx/aBWsn4GNtstz9nvM0oIPB+Ph52zy -Mj3wMAmbponePz4oSRPFNaZpdH4VIn7Cbf7Yoj9WzZjEWKBaydlW/cVkm5gqmR8fDwfq+p6maaRl -iT7Ngq09tFVaZWlC85R4p3gQBHS9XClOHMr88fEuIEpPbdvSTz990Vz00Bwc+G/0exbdxYNgnvdg -TB3WTwEQiN+Gnx7MSPCQ8LNRYsdRrP09NmqWptRMrRcGikPJBkfixEdSkCVO4SWBfejahI2iCIm/ -KG0d9oH05GWZ6XplC/VCqNCP1lo8D849JqG15cqyVJNmb7c7NU0jZXVBVVnSKFMVBkHvn1yLAcxa -Gnkgt52VYIN7YcVDzm47obpO1A8CakdOm+o/4Rtw0b1LzJmND09ip/XoupYulx/05csXGsdJk4NQ -lvf94MlzHR0+UbLT7bZ7ORR936nrUCTtD+LhwOjDJYRDsihKniDMk1bVIDM1TSOOzzlN090bT377 -9p3WdVGvCHbXTj5NWyz3AgeItZez3hF2jcZxxFqAx/GKTgDEZCGKY4mljtSY4JEEg9Nu2zb69dff -NBij63s6CV96GEa+cRIm/Dydz14PmKYpVVVFT0/PagzBJJX5UwCD7SUBcljHWjALLUCGG0UrAqN/ -YIAGrjK5ovqsflwUnEQ5frlePBqstXbyTUgWNT7F5ofRJObInKnHXnXfv78y4SSOGOBMJ8ryQj0T -8qI004hEZKmxuuzY94ES3WovLF7BtN9Bqo07LcvMEeJSqi/LTMM4UCySU9trWnBRc+klRBQ5i4xQ -Rx4LEbFluM1A8Nl3FtUEAem42QrVJpOabB1vnK8go+hLltO+b5SmufbMqCbRKoXG7o7Hzr0aveL9 -RRHP/Yehp7IsTFSdc2tGPFocu2zIeXaJwLD0CgLSCDkYctjRISjKTsLLysXz+UR9P1BVHajvGomp -I60QIU+OY35/j4ehtXHDgWGxmnXdKIYDzSNXGXZJ0zTR169/KNca5iH4Qkyumbz59PPzE/3ll18o -lkBJgEFcWbB/YJomYhrZU11VtG6rxiJHUUKbnjG798DwxZWp9v5OWZZ7Xv8IIEUFY28oy8SyCkfb -xqA8xedumkb75G1zSbXWqgyKQCDJVhuulYD0lujpmAHGC3OeZ8qzVIVEccwg5+XSUxS9O9uzeaY0 -ibVvZZJRSUEQeSCcxVwY/InVHRY3xroGynpECZ9nGecrzjNdb3cxP2FfRyteAT3aJunaQBJsFLw7 -y0/AAVCWld6e93vjuRW7g3qmOD44LCR2IKh1FsbmBVkGhxuSd6yNGkCwUWzcsXZaoVFbzAEXlJ2U -YWKAuT7GxBhtYpSXxDGNwyAu2IuyXdFaJhITxz4WR48gtO9Ex+NRXKASBWGhU2GjmUoMTifPSWoU -fOB2u3nYla3Omf9yZ1PQPMuoaVtdOL49OB8EmBuuwpfHTQu9gG0Ljscj+8+FmXdrnE5n5o0nCQ19 -R8vc0zBOCoRgg18ub96MGskziPAKQ9yemzcLxwLlcoo3YZok3me1SL1F0T+PD6H849FllmXiNPRQ -AstILIp8lR8onnZkZLX3LMDZ5GDcRP3FmXNxFFMYxTR3HW3bquMfJPqgTcBn/vh4/9SWIdATbcG2 -rWwiaUpztCLT7A4NCIeGYdCRKIeEJlQWBScwZ6mHhlsFI2ba+r1Dh+kMw0jfvn3XiYANDsElgsVp -rdHx/eHpD9DVchf00AtDKvJEfCJIDyLrZGQj8Hzk35mLvL+/0/F4VMt0TMqSJKHr7a5tI1yFbEYE -ngmb1Ux0v9+05Lbcl3VNhPe/0jT2oiuYFMjOMg7i+e23/4+enp6UKszipVlThZqm1YCULMtp3Vqf -F2Hi02xYTJIkFHM4Zuj1Cz6QtFGeVxrgOJkSEmXlME5eJHMYRnS9fuj4xYJJoyTdfn/9oaMtkCTw -8lEeO7CMVL+Nw0aDJrNcEWH0PjgEioITUayLsL2VLCcct+diUGm9VTR7PaV1WajtOjWiAECJGxGo -7N///isdjwePFYhbhohoMGUaMgZRIs7LQhachRIMGxaHLnrmdY08Q1PnhBtr1QG5LfIZLA4B1pp9 -/2VZSvZ8QOfzmcZx0OonkrK+ae56i6dJSpMw/Wx68ibP+TEdOE1irz/FRsV7xgFmDVHCIFCji8dW -B3x+dwCyyQyqVExCuq6jSezYcRtDvNV1LftJiiCnLHKaxGRjE5ffWDAGeBmCA8OCn0RbM3uQOfwp -VLMRNsFZ9WdleSHxaqNiNHEc0UfPictZltHpeNC2No65fbFjWGBbOOSzLCPayeQixN60LklSiqdp -pmEbvVNSraIxKhDyBiKSWSk3qlGIdbMBDmCJQXZzYCECUc3ShJqGD4e6rqSc2fSkAmmBVU6hlvmY -oeJnvr7+8Bbe29sbFQWbRMSGsw+9OCidjwvJKapCIXaQ/rvb7WYUYwuPqzb6k6iuic7nIz09PQvw -FOtsnoMiSp31gsEHlt84+r0uqh4G0NzBjPEnxjrgmrvv5XvAb2rbXSjvvRVqKdo3x6EY1JqLK6ld -Y7/TNFPCVZrys2Yl5qDrxo4h1W5rnr2KLi9KWrddfSLtpAV+AzhYITaydvH2UsEzUUNbY3y6rZtO -FTCCnufFE0yNk09RhlrTOgS7Km4VxyO+bbFhq6oSxmZKrbhUWSNaVG2sZ3AZjSBn3e93qsrCrLtd -cJGEfv75Jzodj5TlFV2vXO0dDgf2RFjmT9FrPPdHtTTRNE9aBaNiUkMZ9CAooXFb4L+xoewXWZZF -F6S15oaABYsSH4bzzZlws9NOAXE5hISVouDeCP8eOmYAFXya5SpCsQIenyTkePFlyV74aAXA9gPt -F85EdtE6xlmiJR3m3KPhgMN/3uoNsOj4c0tOQl3T9cqZiFVVq5hqXTfK5f8Pw5zGaWKHWJlwWAo1 -MyETPUQtE3CaHVUWh7Fl0E3TqIvJJS3FXo48U5HZsy8MArreOq/Cu9/vpjKIKE1iPXyBgTyO6hzn -fjRp0aT6knXd6PX1lcZxlNSk2BPocF5hyZwUuWF7sURno9FOJwhoRwFegg+Adq7rOwqj0POZKIqC -zucTLfOixh54Zqk4OE8zV2FQBq7rplgCeP3QczCL9KA9uJ3DW8svtHs8mRLAUVqSdduVIIRnye3Z -TMfTSTCbWeXFibTRgRk/932noLQLy3VAb2SegwL4//2//187fP2c0QSPnUBJdL02RkyBnpTct/m2 -VOBMMyrKJ1RVMtAHAYizRYo01z7PUmq7TvXvDhCKPI09TvnHTHS2ZCpU157IKfj99btIKiMr4tWN -ge+JF2V16Sg9p3nWEFIOLK0oSzMaJe3n0afAIuMIutyEoQiR0ThxDnyaZjQMvZSDpIflsi5a5dgo -MEd3XT3qq0V4NY8hST6l+kAYxOSeWpJsOj0kNG4riWgaJ5nXb57uQNVu86KVoUPnQy/Hvm1but9b -Oh4P9PL8zADdwCPfw+GgNz3Sk/Ocw2DB5kR7h3YM2AQfzuzpwK7CLu8wFCXj9XqRiUDmuQcdDgea -xonarpUq0gppXKsFfUCeZ67yCiU9WTQPyG9klD6kIpdDPY7ofm+klXLPBM8ROMhjgjIo8PYfNqNN -RQk56t+/Xm+6Z6EOdUrPlC6Xm4494WPhuU798cff9r7vFeVFSY3b7e3tnb58eVFgCDenl62epRRJ -ft8jAeE///M/6V//9V+pLPJPjCvQGlG22oBGxHu/v7/T8/Oz56cH1p6jRgYPoSa8eaZppre3d47r -Lpm+u5gYc5hzYAwDtRr+f+aa3+hwqLUi+vjgmPTnpzNFMd+QMGq0ACPUdD9+vNPpdPQio7IspYAC -ZYyxWxK7Ij2dOUgyzTh56OPjg56enlxak7EU8/3nN514uJYhoKZp6Hg86uJlK7FUf15dV7Stm/bW -SCjC3PlyudLpdPSixi2aDHaaJQXhImFA90JlyWarX16eKQhj2tZFhDYuJ7LvB5mfR0rtBRD5yy8/ -iWx6YM69HNp5zrZruBTazlUJaNW+f3+lX375mer6QG3beMQ1cPJt2q6Vd3Pm5Rudzyet8FDN8HdM -lftQlDWNQ0/DOHqt2MfHB728vKgxrdKtRWWJ0a19n5Y+3zQNPT8/e5JvFaxFMV1vNw0ZGcdJsBW3 -zv/5zz/oy5cvlGepRz1WjgsUY2VR0JZlNIoQByMOBF7aiCVrEQ1+vUVw7S21LFzWbjLuscm+ViyE -UYxFXG1U2cOH/rQgLcEE5TJO8zznEjegXcCXTUt7/r/Jo1FaBiAcXFR3LcYe67rRvbk82DuzTRhK -xGWZ9cQfhlHos5s3ZcmyjArJrONo8oKGodNbLnhgRgLNtac4Ji0XsY6G4+4kijocnKDM2jTltu1E -LxFotYHsenYXbqgs809ho/jzwQMN24FuiZqXgAYcxQlNknoLrsEwdMr+LApWnuZFqZoAtCt8MaQa -WDMvKzVN60V1A8G30xz2N4hFPTiYFKlF7bPASHyU6QK5B/IOqy1E31n/zHm56ibd90h8M1JvkoFn -EQQkzk6TN5GCLB0THwCFePeIq5vmRdykRgVUeTTYfnKYRvWOww1eGtpC4yaG0Qd6NvxCBEuM66p9 -Beya3Dgp+kSFBXHmeDzQ0/lMWV5R216NGm76pBVAKAM+MIwvYCphR4WIV+Y/M5qgjJne3j7oeKyl -vdiMNoA599b9B301Tk2EVIyjawUs6YRvjNQD43AAJQkrsEJjp6YKMSlzcVBaIAsmGBgHPXoiwFIL -VFmrR7dRYgD4MFPGxse7uTetSZpx0uu26z/lEazrSKfTyfPpx5z7UacPIdjHx1VSjio1oYxjxobg -Es0VT8ZxdPOgFSF8AOdlpbVtVbizCBEMG2pdN4rTlLZtVg6CpcOCFGQPqnXj5wf+BTZZkecUJymt -W+cRzOwIEoc38JpJuAMYsa7GoQdTDEs62o11fFEUsglJKyfbtqmfQ8ouSQC1szRx41LjlqT4jxig -2CmIdcy2l5od2a/rygcAUysnyRBzUl7cxriJQZ3th+HTLwIRAQcAa/x7Hb9sm/MwA7j2mMWHFwi2 -mA02iGPyRDT8Yjo2sJhmb+pwONRiDBkrCQibNQoDb7GHYahGJEuPvL7J9NGbHlJxHGlvqdFK4vLi -WIBEs1G74VDl3mtjuXWc0eXCsWds8uFm6NO8PBBCdu1BYUkOJPoxXtyVs5xGa//hwwCgLnm8cwv6 -hmFI5/MT7ftOpxOHvODAwy2CcSYf8EdF3w+HWiTLfIDNhjk3G/JOGAS0mwMYhyNuYi7jcwHEVp0C -QWsAuywl3Ch127V1wAiALfB3nlW6y3ySkC6XD/1ctj2wuArezyLVICoHiOYspoWRo5vQOOdohNde -LleliuNZotJOJU8DRjHLPFOaZcKOjPTn2kwOy8lomrva3cEty7YW1jBU1LyhxxEOw5A3SRjLzDHy -yr3HwM3g4QQEis9OOIVQFHmEhlPcZ/aFylpipmFBaZZpeIFNsmEUM/xki2U/D6LGDoeaoiijj4+L -Y/7JYWbHkhjtsPXS6rEhUfaD2+2Hi646irMpLOj9oKt3N07lsheiWNKYMqqrSu2f8Vwu15seki63 -nunDURjRsIw6J4fEMwwj+vH2RvOcUGKIMhYw1YgtMcpoJSkY38WCoOzKu1FAgWfTBc/7ICCJzapo -l9aKe9GSoiihvev1GfB7mhRQtvwD67VowUu47bZtq1RcKDoxkXFe/7wxAo/KGykJCQy6snTeejb3 -Am1PkrAU2h6GtvVkMtokB4+jZCMwFZgAi+JSkQ874HWaZnUjqqvSi86zUl2oSNXXsWl19AyuDW5z -jBHxObBfsVcgHtI2WcaLSoO3gQT4g4u5OdqupSgO9SS3fHyrSbckA/Th/MUyeWB+RBI2rhNMFLoQ -GgmGsGNHqLRQWuFFwL/QHkz4GVE06Je1L9UCWYgKQ3TZYwaAPT0hRrFzV5TPMKnAYdm2rUhsEynj -WE03jT1FUUhlWWl6Erceq2klEuVIgNCDg+p+f9cACqU+j5Mi5G7CMH8ShsBqDJsHXnjWxRcUVVSE -wzhQWZXqNsT8jUQPa/T1ThTVmXe7PojFEkoSH+yFohFrCOaarHzklge5CfM8K9KPgwuiIttKqGuV -VEp5nrG9GvEtjgsHMXMw1kTOJMbMlsDkvAEirZijKBKswll/b9tGl8tFCU+P9mGq3JSfdbvfnPN2 -GNK2zd6lNw4DRVXlqS/DMBLBVq4/Gwd4URSUJjGlGac7l2VJVVlyRPiy0v3eaKXCjkCmv7JlsS9V -jR587gI1H8AXt4GINjIcI7osTU16rqOxWsUYEnfQiozj6Pno44R1lmGp0iutqSZ6X1+L75tIQr0F -bAF6fFhW4zs1TUtVValT0jT1XpWAzwOhBlSMEO9E8mdZBrp4Jfe8rNT+ePV84C3HnUtiUvsxHKr2 -s1umHTTqaVbo7WRRbfvuEhH4QMQyjBPlWUo/3t6V9g38AswzO3VIhdx0uVxUyAV3H7QbkBxjc6K1 -hCsyxo3WQQitI1cTPB3Z9p2mcVRRlZUJjybzDxJauPgg1i7Lck07hrEHwOGqqllEtCxUFLmuZ6s8 -tAnJ4JQkhrWaJKm2rUxiEhJREnsgsc3J3LeNhmmm+70RR+5CVYfQL+z7rrZrLs5898h30DvYKorl -0Y1iWF3ff6reoSqNcaL41lLuhrbyYJvdbjMDbNADNkae59R1XMp8/fZd6a5WFWdJNOiNgCADIR/H -UUcYjxyCJIn5wNhGT+Ti+OXzJzkwHhw00fxzUhWqcH7fogYXoBVDaz4Mg2coYinDQOnBmNu2jSO6 -zGFoDyYbNmpvbStSwYv9/Z//pDzPvPSaaV29mTzK5tEzrlzVbINzFxJnbyXGqOC2z3Ou/TxorfDV -t2zDfd/VxNOCWIxNrEoMs+QX50rsDGeRS3m9XulwOLAhzbrS8ZioXfrteuVJRZJ4GYz2AIbP4KZu -R5FMijbzXCbFgXBQ26mGDQiBM1YYuBg33pSjtiIIq8HFkWaZmrHgEkBV6arYjYIg0haEx7C1BOoc -tPS3lQJo8PbWBpV5HLmaQhIXPpO1Gm9bTqfG1AOfK80KxjBs78/o96Qnny2B7MjHGiNi7vjx8aGl -qUMgEwGTjnqqslmkWGGZhYpeDKMOq6xKM8e5tlHMEAj5VMj1kzsRPgs+K/fmkffzLperByjB622a -ZrVkQmIORmxOMeZAOYyM0oRjmvp+oPPpSOu2i2nm7lVaeZ6Jz3+iyD8+R5omYnTKJV9V1RrBNRt/ -Ai/vXaYSkM+inYAXv0PtrUou9CTDKNfv90Y8IJzO3CoYbavnnItS40rsoraZtHKVg9G9I4C07Dkw -6eHGE5SRun6gU5oog46fG6+r9/d3LYXnhSnVAPp43EyeWeqj8y8R0TT2wgyFAUgsbYIzGdGqJ810 -CrQKvoPN3PWDYhr8/Ec9NJYlV5s7tG33pqWmaaiua3kfo4av4LJk8U+mzw/jWwugq6/gungzfrSN -VVWpaAhhsNw2MZAa+x9680I+HHuIVKjCxgrOAut6u0uZlUkr4ayckiQh2olOpyda5pHiJKGua5lq -aR4uNhFOct6ks5B+errfG7k5+dCAUAXjSJyIlsRke3mYJdh+/fEws2g6ytUoDKiNhbgiijSAN9wn -r0Ztt3mGpRBtZFlGeVHSm/js2w2r3gMJP/eyyLXMZSCWNQ/cy1VU15WGV8KVxzrI4HZzB0KoPARr -mAn3WTXxiDL1ll+WWRc0m7CGHtDLWMSmZb+d3uCSAIEIC9Zt9kli2Uvqulbp0Tic06yg2+3KNOXr -zZiZ5qr/QJWFLD6MgsdxkF6+9sI6VPQiz8aCooinsy3IMI5eSKtVTkZRRIVJXbIXD7/rXKcsuByt -sSnCOjdZX5wazQG1sIFn1eRgJMqj5jVkaUqt8l9CDRBBK/DYSmqisJDQoAkAEHy/37kFeEytfQTA -YBm+rolurvv9rtbKmKuO4ygpN45x9fXbH7Sss4wrWG+P8k8VWaEjs6zbTm3X6Ak9ygvB/88hoMxZ -uDeN3ngQF2ER2lmpi1mKvAhmKyayNmLjuAvowzfIP//4g3vSLKUgjGleBg+QtNVGFIXi7y5gTky0 -iQsuzEzx56E/j2M+yNDqoJS/Ny2N40hHyWxs205vM1sm8uGUeWUyqinITRUdDwOP+w7J7jQvagln -gWGuPDi7EJRi+AZwLkSiP/ftetFN4HrV2ESPsxnr4XCQg8JZVa/bLtOFwFu8g3ymeSFFtruON9+X -L1+oLCvaNibnIFsijlhzgiAVvGdUtnj/jwGpTkkZeTN1uxc+LhevB7cXzmPZju9v9SqonKEELMtK -R3uROZSLIqdQhFb2vdoJmHWpst8HI0BwIuZ58QJOIevPsoxiBHdCGWb9xhDZVRS5arhdFnvsWW4V -BfcZyzxJ+ugoZVOu5ReflAtLXmWmvO87zYajbZ1LeAEWKsfFOEpjpKSXLsvSlI2zUimxKR/993j0 -GBn/uumTl55tTRBXFoaR3lAYZ6KCcEDRpm6w/Fxb5ivEkVpJ4bay2AkOJFtB2V53fwD71EdwhZ14 -rrRqHGhwv8nzTM1TZiljo4i95Fk3H3pqQIiW2JWHbxcbSooDy7oJw3QTIS/cH7vAEGx0zPaxWI/H -k1JrrZrSElbwnoBLwcMwL0qaxpHehZ4dxwnd7neK4/WTFBeVGlKVgebb5CieraeeshPrAWNq1dHH -Mb29/WAHZbnQ7O9Be7SuLnMC4C2k7tu20f1+9yoS7C2wGPuhp/pQa8uG9wKOg12naA8gMXcZHpM3 -qge5Kk1TivkkafVUVNqo9GWJKWP4w0W66ZqmUSILegomS7iQEAgvypK1+Z2o5SzZx86hH+2q7dzf -2jst66rABzz0t3n6NMbzBUCkAg93E4ceW85ODfCPeqynKQXCOkuTmP7+91/pcDzqSM6aVPBL3YSJ -uKi7bBgEtG2peNbx7LyuSmraTqsqTGSsbdU4Tao5fxwtFUXhHT62FZrmWeyoE6qqWkddXT/Qalic -lv9uWYyowDC35/4/Fhpxq9VfHHPvfr3dJQCWpz7jNFFRFnozIWBFb655olRIMY54E0moRUtdxwnL -iaGf6yx/HGkUPn+SxHS5XhzBJY49p2e0AOMYeeEbWF/7vuvkpqpKvRCxD6Bcxe/Os5SyLFcAbhhH -xVSwZvKcHbSsC+/j2M6u70UOC7hPwasATEsAjDjA5znwvBXtd2Uad0ePIL+djAVBQHEvybKWxw0O -NBscyuklmwz6Z6TY8sI60L6vEv9kgQjEZ3X0/ft3DQnlQyZSlqDlB3Rdp9MFHEaLQTfVilrGKPjf -HxOAMCXgqPL9k4+hs5lePGNFpxvHLRRrybXvnaP+hiEVZSlpsCcVmqB/5BN6JiInsNl3okHAORhL -4BmgnUIbgnn9tq2qAkQ/i8PTkVISzxQDIh33LmO9OZkOu2kL46jBiReXfb1elYCDRV+WpVYxcKxx -tmirI6pME1VVSfd740lQH8MsOMePbeC/f3+lqio02vt4PFJd19T3Pctxl9k7oGFCg0qo65xEGFgK -+x5kXpDG7Xanl5dnvYnxmbmKzYWkFX7KWygKDs/d1k1FXPYQsZ/FS1paV0ozdgVG1Jfl6sNmTG3C -pLqoZJTYSIUA7wWbiMzrdxI+R6IXbxxHdLlc9RmfjgdJT169DI+u6yk+Hg98KwmCjh5o312cV2xy -3/Z9p7cfb5RmKYtOspSINnp7++EBRviANp4KqkE2jyDPpwxEGixKFw+1fqoKuFfzVVt2YTHifKG6 -5i+eLYsnnHFxy6Hnhgyw835vlHoKvTtOWuu+cj6f5UXlFEWd2TilZuqxLRnzC5AvADRdDRwDx26D -SMYJqxy4pjyHDQeh40VwtcVmq6FYmdmDEQfNPC+6MR9dhHDrzPMiugJ2lGHb9kUTcrBYcWgDhGIf -vk7BQVcGr9qSPbZXzgO/4JCNuqK27XQMHIY7C+wxAAAgAElEQVQJBUFG6zo+yMD9gE3cjucT29HN -tyu1bUPD0FMcv9A4rnLLl4qKo7XBGsANfvnjD8rzXCda1nMBIrl1c7023rnlOeBz8hRpV6djJF1Z -qjguq1lyJ6MoVMtxhLtq8Okw0LbFXmBJGG68h4kPmF0uQLUBM5mGsR4e4p78P/7H/72XZSF66F09 -/fmHG+5zltH9fpc+igkL59OJdtrpcrnqCQp9fxCE9PXrN6prdsCJopiqqqRtW1WjjC/AizFSRZ1b -1L3aKDmtPT+Ir1+/URSGVB9qwRRmr42Atvx4POnDdm4piSDqkYA1sTFqCLT/KgtmUKHf5Wpj1c3D -v6dXPTaeDasrc/r++oPKsqDD4Ui9xqs7TwVQP/nfBQqSoi0JglB9AxwYxZvuer3pDb2uK7Vtq2zK -NEnp67evPDkQqjHeZxAEdL1eKM9L9jjcNq0wHklgEB85XYENXWXde9u1WnF1Mgev61oouy5ODlZk -lsjj/ByY5lpXFWV5rvx8pE0z/yHwEHmeFLFlHacwpTKGzmiZufUYxb+wF1o5vAzTJKGirFQgxIdI -rDyTprkznVwuEHx3pEKnYsUFP4ZlWagq2fob/HtcnhbH4VaQgUG8C76MuGphOT1X17YaxDsfx5Fu -txsdj0eqyor6offEeNh3WMfDMFJdV+pnEQkF3Zm7JhT89tu/70mSUF1V1EhPB9FM2/V0v9/p6enJ -c/6dpkmCF04SXsGsvKos6Xq70ffv3+nLly80zzNN00T/+3/5L3S733WOC2mpFVvglm3bRm7eWMCX -O3358qybGn+3bRua54V+/umLloThn7qjBFTXpZao+OxOZrqphTg83aMo1Jz3f/zjH3Q6HT2LLksn -xtwWwCYWaF3X9Pb2g4Zhon/5l78ok80uYjgowcACOgWrO7jdbnQ6ncyGIW0RDnWtB7DaoWvQ5UDH -44HutzslwrbDxuNpDbPg+P2NniejJWddr1c6nU4PzE4HRoLGiylQWeSU5YV6J97vDX15eaKuHyjP -MzZRFRqtcwsKjF1bpBl668o8eC7ZI88PAgefksbSRJ8vLLGSJKWhHzRiC9jHo2TdthGYPhR5Tkma -0X/+53/Q+XxWVR8AaMu03LaNjocDhRFXjzZC/XK50OFwUGAQCcIY26GV4PW4KbbC76eky8eVDsda -n9s4jpojcL83WjlM06QHrNXttG1LX768aAAwFLPgbIRlWdLxcKAsL7ScXpaFrre7h0DjRsBCHMeB -+q7R0ximCix+YLbfX/7yCx0ONSUpl13M8d/cLNL0TDb6Gz2zs5neRNEVKmGpLCs6n89UlEfK8sJz -H8JUgu2QepWVso8d++EFFOiGHcXeyQkzMlq3nW63K20bW2f9/vvv1DR3Q6VMdeHnGZND8HmnaaLb -7eYi1LfNU/mh/B3HiZq2pUnYeNCrw97adzziZzAMg1s8y6LZjEgZDgLSNJtpmumPr1/per2ogAQY -CttRLd6hNk0jTdMoWMhKXdd6h9rjWIw/S69ZkGAIrstCt/td7NnZ+RktFg5wfGbMqTGyss7JwBgw -A3dWaaFnTAM7dn8kG4lib1DX6VRQfFt+W0oxDuUkjiR05UJt66TCeMZpVqhFGX5e1/eeAhOKTfu8 -cIixYnHzMhPDwM9ARKJy07Yc6iGYhyWqYW/YfAQQuex0w1ZcqGJRNYTTNNH1dqPffvvVc7RBqQNb -bRdeEDp+tRgY4gO9vb9TEIT0l7/8QqfTM0VRSU3T0u32rl+WTR9SBQvxHzDX4MaK/gv216g+7Jdf -loVutw9aZYTGVcFEmfDMeU5PGkCBh962Hf362z+o73ulTeJ2wSJ8TDnifptbBwYC3ahpNi/Ijvf4 -mQXqVGN7Xvd5kKwT6mLf5MCwQSMOBU7Vq6/vO3r/uCgpiNlgqybzgO785csXenn54iXWruuqiksQ -q9ifLzH+eHxbff3jD2qa5pN1FdYIbhTcPqP8XnAcsGgXORjgb6CbLnHkFWz+OGYLbABeILxYm/VK -/ATDMBIAejYblSsRYAn4u9ZZ2bY7OFCgKpzEMg3JwwD5+ELoTPJv/IkrMI6D+gK8v7/r2BemLdYI -pOtYVg1c5zHJFz27HWVPoiGwOEqeZ3Jp+JgYsi5cUK6zN6+qkmLLjAPXG2YYCFGACeaj4GYcdy19 -p9lZUfMIpqEk4ZuXS/dYbsuMYuPT/2cuLMx+G4yxyKgYAQAlVBpwdcVCxox01JhvTjCeyDdMqOuK -DoeDsN8WZSEuS6LKO0uw+OmnL3Q6nSgIMuq7D9WuP7IQH2O7M+Mqa5lxAEAdASlWJySevbPlFBOw -VqWq8lhoVdAry1L69u27nOiZ8yCU2/X56ZnKsqIgcFXXanLkraAJASe4fe53rgK//PSToutIdMaB -bCPNiiLX6QVKXn6H9ImPgU0JdxwnMBvF4DPTiQJuOcflZ9fnw+HgIfyW4LNuu4p8oEOIQPeVCjSO -Yrrf7zqyg4JwHMUePM8pywY6HQ/a81spsqVOO/SfPE8BVgWy+UjTtkwllpAUBhQj3XdgaFrmYVmU -VJWFslh3dUT6PNqeTUQ4qkmIklgj4rwtxpFb3RgbuKpK2reNk1s0nGARcUclrC9H0AF5Zl0Den9/ -5yy5qvIoiu/v758UbOM0qV+Zj+rP6mhqkVSAHLZdKIrck+VaL7pK3XbdzLPr3Tw4ikK631mTzQSf -iKKoUwoy+tBEWYWhGjx0XUth0KlCyx5eWGh2MpHEEe0CrKrRp/RnbdsyndlMWKKQOeIuXSb+dDjj -lj8ej1QWBcVJRlXFYF8nFY3t1+/NnaIfoRKX2N12VOdjJuUkNM+OjISDAQErp+OR4iSRQ8S5BtuZ -diwV4rJcneLNLEyX0BSqwzPGlvYW1s2ZxPT9+yv1fa/P1DIUj8ej5hG4sJTdKO5Yl9+2DR0OB6Y4 -x7NXjjssh8vycRzkorPxcYuwM1e1qbOS+M1wDGzZn6bJA/lpMyYurCto204zLSxD1E43pnmirh+0 -9dl3Ukr0n01UnFWcY/BaHYizKueJUIyyCzNWgGl2rgm+OGyhQHOE0cK+7bTvG5VFTk3bef00qKQB -CZff6N4tE8t6C1i7JBvhlaaJOMWG3szd9Wi5ptKweeYuhhSzfqemuaszzjTxIYUZ67IM4g9wU2GT -OgaHIU3Se9uHyYrBUumv3mx4d0YZ9juCYFOWJeVZpsaQsHVyz2XzWH/TNJuDzE0H9p038vF40Mg2 -FpZ0MiaKHjz7IwX+WAdBEoqRyI2Vyviq4FszSeh6vXqyYtxwuIFvt6sHVHLuAGtDijxXZBoAmfWF -xM/QNRcEtK2bVhiI+8KmwO2WJinFSUa7HHwuUIO578vSOz8GvXF5fQ3DpjiEnb8jhQqsTFd1ur3x -mIn4OPrDWBQXgTWMHcdBvCGdBoYPn8mzlMPPhO7BXZSOqmwrTbQk+B2agxhGn0bk+O8gCJgJ6Nh8 -s76QaRo94GhZFiKxLELfjzLzdD7xg08KCsNBNziXH+yzjkRbi/pbv7wwTBQVX8SNx94ODNRMCmJY -/gBKLpghZHmh0kpUMZBGghGXxDG9f3xISMRBe29sDGyEMIy8l2ldYhCOweVxobFl4zRpyq1FuwE6 -xXFMu8yR2f2o90gyllE4z7MyBFGhPAacJknKISPbrrl1GGllWarVHfIaLPqMAwuHYJrwjDlLU2ra -ltqupfAt9A49/H44EbmDaFcTjEgISjGyIIS0gsAPnnmnnh8jfvY4zdQJe7HImRCDBCYchn3fC425 -88pebOhpniTgttAbl3kmTOdm5Jxt0QsBT8HJCMQW3MqJH0NksMYfDVdwiDklauRNGsKwNsKr5U8D -O2cvmSryDhbbxlpQ1FYEeK6wc0flCysyAOZRFFEMBBU9L6in7HSS0Lruao7A46VFfyBKjbqupKxY -PHJNGIbUDwP9/s8/ZGademWIjTm27sKuhPdvzUcvv0cCEKSZ69Zp/BLK3ixzVNiqLIQZtTCZp2JO -OXo2RHrHJv7a9ay+FRWz41JOUO46WtfBq0ogYAIfH6Yop/NJlWU2LvrRcBPAKKfOZJqmCxNUT60m -oh4smG/fvjHLLIyoE8vozSjF+PsyIaYoWLIaRxE1bacMOcs0tLbh+84LrOvuXl8NYQs894gCveW6 -rqdlWaUkX9T0ZF0nD0SzPgvzsmheobXFtrLz6/WqrRvWn036YVu1xuPLp2lGdR1oa8ZU3tEztLEB -Gn9Wmbpsgl3xHR5huvj6t7cftG0rnU4nozSNH+jukby7XaY9redubNmY8EcEI5Nl0R8SmNKrE9Em -CceoGn1Ha5Yd13VNMVszj57NNNR2DLrwS53kh0BMYQMiUM51XatlZ5qGRldfaN/Xtp32+zgpnbMu -f1nQOuua551pEnvpwEB7bdinXRxA8rmkSrQyQCkPJPVwONDxeCSikMapURlmKiEebddLZVGqDhyG -lHw772o/FsejZ1XuEn7A/CLPCp2BqpXCzWEP9lZx4Gyo0eF5XtI09nS5XD0ZM0hAqxwgEIx8+fKF -Fol33/edPi4XsZPKvcguAJNc+q66mC+Xi8SVjXo5wIeBQWDkKhRKs31EseEJyC6/HP9eFLnXRtgb -znpNYo4dhoFUDqFWf056nVJd19p2hFLFgGtgzWGAt4BBycS1xJsygAOAjAuLc1i9hwO7B8VNMKHB -Jsf7AV4BWj1vyk3p9rxmV8/aHCQwXLw2DAYmK6g+sGZxSYFIBI0KPAiaho1FijynWUxt4v1PLLym -2amKMC5yo5LME+VYdHddmZXFfVtGy8qmnfzia5rGnufUMj7CIn5M+AXzsK4qIZpERDSrDNl6uGG8 -gUQYfE5YibdtQ6fTUd1i4C4D6W3XtSqrtKcu+m+rIAQNNgqDTziG5fPzgnsEORcaR8e5R1ruOLq4 -KTundzeEA3z6nisbHMD4/XVd6xRjFM96Dd6cZ6HTBgqyYnEyM7LTQ8qmO0HkE4YstoFFFfIF5tm5 -OyFcBC3JY+w6Do2iyDmGTMhX07z/6XjUfxaxoRWHn8ao4zRRWRQ0LwtlaUrfX19pnmeqqlp4Ef70 -wX5P+EzYSnJdVzUm4X8deGW6BZhd8nWolvkq+eWxAxVFQcfjgaIo84I7scYcFXtWARaL7XJKZUN3 -XasXATNtV88EN01TsTiPaRpHyrITjeMk7MhYR4lWvp7nOedETOJegwf0qHF+f/+gX375WRVw96b1 -eng7GrQOp1EUUj841VPbNp6FEmb0nXiaPXLD66qiCJRgA1LCm9+WwY+x3MsyCz00cyaOMicGmQmO -Q3aRKtiYpNQtvRk3hqKT4Ipg+f9x4rEpxha5HobBux1sLoJdeKo8M4fnJI7BqAzw+xAG0fWDZvul -WaHpS1i0rKq7yu/dVL56vzfKr3i0BYf5SVWxkebhUFPbdlQWDLKCIVrXPF5klplzXirE0QbVkvV+ -CMKY2ubuWaOB+WjXEcRYaZrRWTAmbhObTwcFvBbv8yygX67tg9UNWD0LMgXsO2GSWqAXBV+Mdn04 -sZqVy9d1TcfjicIwoHWZqWk7+vF2dZOYe0P7fvd6eBc6u3l5lLgg2a17UD9GPFtbZeIyCuS7Yhpy -vV7peDzqJY4pDNZNLJOTcV0p3raNo6xPR9VJ84J1eWY8jyy8fh0fBMGGGL9gdJTEkZB7SMtvAHFb -UVI4Lx7l1N6kithfr4qWv/14o7IqVfqJZNaPjw8tER3LMKGy9EeHZZHToGWsr/u3hCTObV89CypM -PGwJaAkldq7PsdmONDNNoyTJZp5e/zEXwSOSKHff0WPtzYdDj6W3Ia2yMObZgUo2UQa23Hifg8kY -tMQlvN88z/VQ6YeemqZVvT50CnXNo0e0kHbujwh4+1xxKWzr8imMFWNJP6GalEOwLMzGTI2lvJ2q -2DId8txYPPUt+m0rFGxiGxOGn7l7DL5Qb20brIH3AH/IeR69PImiEGatOczsev8z0NeRqxicvd3u -tCwMVMKuTEHGkAV867bT/L/oeq8dybLkStSOlu7hkaK7SV5gZv7/W+ZlLgZzQRIg2dUlMiPC5dHy -Ppgt27Y9ahIgmlWVGel+zhZmy5aQNYvLlrU9pLiW8wWYaZDLT63xoyiiLM+pLCuqypJaI9pYFr4x -D3VFUZxIgEGspbB1XLEgEcILsyyjtm01TgkPniOzSF/uNI0yiXAPFl75ePhFmevYrB8Gul6vmg/I -6bCVij7caITjl3nenlA4O+8AO5Gw45QkST2PePRb1oQSC8neKhYcAhJdliX34CCiRBEFwWJCJCJ9 -js+bwo1hI9UqIKHWxoRBAGTHh2ypnXrVHBYuiESDfC7cgLYCQjvF0tjAO7BADQYIBYq1neHj1rO+ -BOCVAJSCFR2sy9DKrduuF4dLJSZN433eMBYHwia9XK9q/IlnDDIaLhBMaUCqwUQkzzMKKDD5AqEn -6LHR55bWbseAOHByER8BP7AeEzaMxClw+bvD2Zip75Hy/e1ocl4+U3yhhwgCppKnWfanPoG2Koq3 -bRNWXE1xXFIvwQVRGBBlKd1uD+r6gZrmTft/SD9hJ/0sy03TTMcQruxZPFfgLOUyJE13LxDymQSE -8ho9XZK6/MJlkamFmDOA4ACHmX1PBfQqOeRCbqfnktc5BPMMuCwZtMzSlGaTioQbyVUzrZe7zlbm -fBpXVUVVVdH7+ztVNYs59m2jnz/fqChyAa548//6669UVZXaSQPD4KkJ8wOsFTbchgBuJkkiiz40 -zk27VkMQmoRhqKGp1uhV3YNkkrBgw9HszbvhsY+Dv2lb/fkIl9n3SIlP1hLMklvczD3W952YTWQN -NHFBoJWzGZIKpsr6A/0ZgCZ0GYggh19jGEbaNuBnaDW4bbSb9Yc21+JdAEAt8cs6NeG53u4Pejwe -9P37d09G7ZyvQnVSfqa5R1EqorfOO2TxHm1UueIJcmBO06ijVJ+lCD+BmAbsLeZK8ygoCkc5qWda -xPQDHxROJC6qOPMIQ0BgEZdkuc27AczwwqZ5olKCDXAAzHK7jeMgUsbaM9zs+p7IsN1sHJQtvzAL -hRjlfr/pLQbQCw+v7zvP4Rcegtu2UZywE08hmw8Cn7IsXZ6d3Chc4YQyqps96y81MRGM4Hg80PH4 -QsPQ6Uirrms6Hg7ax0EUBTEQFocKaIwl2yBmm3i2l8tFJyiIJLOAFfgKwCCwwdjEZHsqrVflRgC4 -xC2EGzaOYoqi5VNFhGg5e9BgFBkqil/ooYwIOhfHRcpUxKFox3NIasboFu8efTl4HBbFB2/Btp5o -2Syt2B02n7n4wJmAKVl7NtvO8npI9WaeplGt22wrAK5AmiZ0Pj/YFOUpbMTmNtpcSxx6zDdxvoNJ -QnoBONk5STS70yYE//Wf/2ffQPSRhccz91BQ/Z6mcabXLyeqSo63ut1vOpsGkARQDn8WCwisrK7v -1AocJTn05VhUGAWiPISTCUon9Ib7vtF//Md/0ffvX+l0OsnDjj89LLQweChY7IyoZrSumzobwVVl -mmb1ucOf5T/PNycz2woaZTFCLHUX5xag/EkcixHDJBhEwcSatqWvX79Snh/px49/yO2z0evrScRT -F0+jjkBLEiYlemVo4e3CxILBdyrLwmtVGNEOleJspzA8u2bfBRiYWnT82Y/BzfnJW8iM7s/eRrAl -up2hI94Mz2wWPYnFOjrhwNvQDrb2GtW4hKvJ3szKJzocai/RZ1NyTaTP14Ggu0aF48BlVN7ZyKNN -y7LU+055ltNOO+0bR6zbCoX5J8wzGA3HwOpHrL/CPM/09vZGr6+vVJn8Qn5uoefpgM9pfQDsWJcN -XRKt9mxwDVc1MhW4Xn/bkaDr+jz3F//xxw/OV68qCgJOkrU3LUqaZVnocrno3BPA2f1+13x7S/2E -+g8nOqSdP3++0eFQ08uRJcq//fabkhsQuYWe7tu3b3Q4HCTOOvRGbtiMt9uN/p9/+WfVA+DfYyyJ -FCLYPU3zJA4vnCP38fFBX758Mc62uc7j4W1n2Yp2FJTEEf32+x+GBMIbqK4ryrKczuezAmR2k1hE -/Hq9qh4dSjkg4hYwtSSaJIll1p/Q77//phULeA7PYZqoMGz8NW7sj48P+vr1q2fpZclHz2vBjkb3 -fafb7U5fv37xHIJA0GKwi2/Ipm01DgzkpH3f6MePn/TXv/6FyrKk8/kieE+tEWZJklAUZ/R43DyU -H1OkX375hb59+6o9tG1Vn1OJizz3Lhx2lrrT4VB7gKwFIDHxcJVb4LkstW1Hr68n7x09j4cRjwbg -+euXr5RmGd3vd41J37ZV1+RzeKmdntgRYZrE9PPtg5mgJi0JeFyaJhT/8fsPqupKuey//fY7ZVlK -r6+vyvoax5FOpy8ikug8Zl5ZFPLQJgnNyJVpt22rF+SBRWXde/Cw4CfAvnCs6uu6jpqm1QWfJLEu -GvaErymKKgqCu5bb/N8iBTHnmccyqDBcpFKnQNO2bTSNoyquwLiz9EssgGVZ6XI56wMFCOU4BBFn -0C2jsvKsJBU3Og4yEFj6fv0UxmLj1qwfAyzGcCBi9IpDfN+JLpcrH6rk1JTou8FWs+QW5fAnqQHb -yJtwWPvsZ4rss20b5tlI98V7B6sySRI61BU1bScWaNyboy3ELw56PSihC2KaaWJq87rtROOk7x+t -E+KwiAKdItjDE4cR5NzbttHH+SzMu/STug9gdJ45TQx8AJ4pvTat2Y0TdyWIKX5mPpNmNYr5LJ5p -07R0PNYyvs0kKHSj6/VOdV2xFse0yZZqDx8G4B9d16rnIiqluKor1YOP40RFkYvSjIU9ccyimPP5 -XdNdLPI8L3AjybUaCKOY9n1Saa7NWbMuptYJaN3gmJJr8gpuLEhl52XVGyOOWcqZZaNHckAfzH8H -+w8UOZdpNl3VGmJO00TzHEh4ZqMLDZUQx127GCyc2Fb/jdASjNFsUhEzsXj6YEMt0Zviz2GEiA1t -Kc+KbcQuLwF6cR4RRaqtsEDqMA5UxaUab+AgfTxYj5+mibI052X1jEt4DQbaEqFkBYfBhqy6sacD -p9CD8vPhgwkbP80KCgUf+P33C9V1pUSleVm9PEGMtNgss5SNcdafz6PNUdZa5NmJP0uQ2Q0pexpD -TiZB+Wldrs6JuG0bejweGolu9SjAssBUxESjbRvNdXh23IYy0nkgROqIbL0K0pQFdUmSURzze4eG -oSwKut6uehkREX18fOi0Dqa0vJYjBQEfTcP2eyzjLZkOO0708vJCdV1TGOYUBL0ackRRpKWQJSWg -fEe/cblctDoACgymHfvR3dQbAIcO2gX8PbYMswmreEnny9UtpDRTkRBSb4CUcv4533Jd39NNgitQ -ygGF5e9IQmtNdAoyyEa6XK9qMQZ6JZulxCK84U2EbAR2P2o07z2KWBYMIo8FRO1iQ0UCu67Hg0tA -VFYcfRV5IJUzLEloVSkxZ84fj0dh+SXqSmyfK4AvtqLmw9WnhDMNeJln5WDg9gpNFPefzbP9xOld -M+u3baM0K2hbF2qaXtbVwR0g8+IpURXNh6RYvP7SNFMyUpKkaspZ5DlNs4u3W8RNmLMlElVoWotv -jEJBmeV3ihbVmcJUVc3tY1lIr+2APBvOiUPMui8h0s1WTlmWm2kNqxvvj4f3XJNEHIKjSByqNo1D -CyigJC0ojlvd5OAgANM6n6+UZamavha5MAybhtcGEakHOr7M5XLxuOg4JR+Pho6HA00S/gGzBqDD -IEYURU77tsn4atGpAd82mR4YUGfBZ9DJXifNn8szSQA2fQ5O+LbrvTEkZuPYqEFA1DQL3e53AZJK -lYau66oBmU46GcrNTpRmmeQWBKqWrMqCgjCkvh9EMhzrPBxe8UscaWiDvVGeyU7Pv6wTEUxSQd8F -MwyGlTjE4AMHujZcedldt6Y8S6k3YN7tdqNpmuhwOJg46ZKSOFZjUFs98MKOJR2ZDyV2XZqVUPX8 -nWxCEgOMbk0kScYmHfNEnQCVdhNWVUWPx8MzEIWjjSVcuQBTpsAGAXtCwpwDUttFbOzBF8EhkiT8 -5643NzrFwY2EX6zJ9/ezOgRjVBwnGQVhrCU26x2I9j3+xGjV1lCmES7FKfVjxdKUwij2Mv9uN97w -m8SRO+4AiaX5LKK2WcaxqRvBhgHlRU2Pe0O7HKhtKweFfFep7CIZIYyfiAUOuAo0R34VcQfLOWNv -JmlJBmlWmNGDK33gvsJAIJRKszFPiNUoAn1MWZVavqu5hqgWp3kiokSrDPi3p2km1cAq38FVHXya -PtS7H5RQvDCmTg56A/R9R0VRahINV0CxItjo64ZxUq06iC1JHH3qoe20wsqtYT02zwt13UPxAf6M -AXVdT1mW0+n0wrkIcqNkaUr3x13MSA8MgEUhLesqxCvHgDscDnR6OdKyrtQ0rQZ4ctJy7JFZoCdn -AlbqJLOGBu58EXpPJMY8DHY75pj0iLaVtQebuX2BuA/DQFHIoBqMWzEGtF6P4GLMxpQzzQpa2o5W -STqy7V2aJhIbx447uCBGaVux5tHuWZo7nKPQIvOUa9Gb2I7lrKEpKs08z71wFYS8IutwnGbPdsy5 -WO1GmRoI5XjwxqOY3tiUbnx2tMvT/Upt11IiVShCZWyoa2xzw56BjHVd6Xq9KukkikLJI581hdVq -nfGl2IRx1IWEW5B780mpqM9BneB17/tGeV5RkefSUnwOa8SiBkWZjUIi9exHxgFRoGKXKAxc0IkZ -P+HE//j4ULeZREAre0O/v7/paAfEpFgcX+D7Dy84INXjNFFlCE72JsOhCOwECa6Yiz+P4k6nkxB/ -Mi2LucUIVYTFFuzsK983LXV9p3wK0GSjOKN17Z+is1Z6PBpqm5aOLwcvPhsL+M906Ou60eVy1o2O -9+QCMbmf74dBSFLbJz1EkqQUBItiEM76zM3ILeAI9Sk7B69EBlBFxWrp6mmaiB1YIsSwTN+FdQpO -00QdhqBKZRDyhYg2nY7Y3r/veyrLwuYt0FsAACAASURBVPEbJEQEcXaWyo2KDlULkrFgpmonK2hb -7veHYkb4OZjaIbsClxeqd45YPyogjACRJEnVOPbRCItxXVcaJ6fEs2glKKUgcPAIcJPEn0RHDWx6 -OSvPfBwHqirn2mojqPnPOqou996bh4rDRinUPxMLj34yRqF8YHV9T9M0eo6qTYPbfZWXWCr6jI2I -AyESLQP2QlEUVNeVxnLbA6wsS6OTZ3szBGryz4vEZiygqixpmifjbLx6Cr4oipSwA6EQbzL6BKzF -cUJZmlBelHS/32nbO9G4r95tURQ5RSHr+d1t4Vx7mBCy0P3xQycmz242QeguAz4Ad2Wq4TDA4W0X -dZ7ndKgr9jMU8VMYhrStKyVxTP/4x6+UCwMyzzKaxfrbXgIKcE6zR1Z53tCWMfqs1AOuAhsuJZ5N -rsrEpGYWPUXXdfT6+kpxFKuRiObsrSsNfUOTjBFtddy2DRHt0pIl2mqi145MIKnVXjRSisOCnsvx -Tn+vzZGEliPPc2qaxsPEwI607xDahLquNEUa3xkEPOazcLUdWw88e+Oh1CjLkl6OR3kwm+fistNO -AcEgI/IAlbquKI4iuih/3r2wxKSTgPPP1NeESiEbAfl1Cb+r2eSpviB2Q0kUGErk4XE5zWYJmA7Y -OfYufRU2JnrLuq4oDBOal05vIHvzgEc+S4CHZb31IqLad6IojilcnGmHS/oJ9TZlM5FM9Q3gy4ON -aWPEOVPvLoSO3KMyIwYcVlM47X1XZbYo43BTrlC6rv3kD/D6+qrKNkivIcxJn0apeJ7suhNT1w/q -qwfeQdt1lKSpkxiL0pEnPInmMwA4szHnwBCe0fZnZybo6i2vZF4cym+5DrfbTcwzOmW3vry8iCPU -qmo/ENpcOtOgoaZ29FlVNVVVrRbr+IytCTt1lPbI009gLVvjGJfo4zIGWOqbmkxB8i7G9/cPIf6k -ymnJspKicDRs3VAdj1BBb9tGMW76zniOo6RlM85YRnKjUj95bjp76C8WonK9jc+7TT3F3PX5sKmq -Wkk2P3/+8NBllMs21RZe8rsAXxDGbLLZgG3kOfsKwJ3IevbZ8RuwCm57ziJdTnU6cb3yXJ03Tqdo -q69g23UBYvPYX1aYoU5BWUZxktIuoBhaAjxTHNCY9yuqLGnJ4IdbhmCaZnqjWx75MIxit80WZvjs -VVlqBef5DsSRtFDkvQ+MNWFC+uxUw+X9qDN56/OfZgUN96uX/GPZhM/CqmfVnB0zPh4P8YUoTby3 -09XbfhqXQJ5nMhV5UYNZTKKWZdXpAE9xCmfxJu8mTWJ1KMoyVk2GYUBtP2mlDI6GVU8iG3AxEmUL -LDqTkpKCoFPlYxSF1LQt7XujVetmDEAhPgO+1feDxMjztKQVJ2LwZ/7r77/Ty8tR1LMrawGsVXQY -htR2vTd6243PWRzF1PeN28wmhhu3PBMkBo/E8owOW+GDqs2CgLZ1UXIDQAvbF9l0H4z7+CTPdDM1 -zUODH3XUFoUq4oB0+LPHn5GeykPDCzydTkJ8yo2GO1KePZDxHz9+0rYudHp91enB82K2JqH9MNAu -4Rp4NpbhRRRou4SWjJ2Oe681AsEHv3ddA2HKxZ+ixCXky7x314/inWI9EDmQad12BTzZ5mtQiykc -/PAfdLNzpseeXk+C16zqP4FS/XZ/6EjWjnOrqvZGi7bkT5JYx6NFwaxKtEvO2nww34MoCgMF4NIs -o2VeKM3YnReTKhyMZVlSnmfU0+iHoYwT7Ttpa8wWdK1ueADfIFsp1dpkXH6WMjuhF7cVRN3S6xQJ -E4nAxLnbSgQ5CGinYxPJnucFt5nCASkKVtXW9YEejzvFQLSxmKz5JW/SXa2q3Q2TGlBuo20LPD80 -oP0WbMMLAI6A0gdaaZhBgoiSS9bbc2Q4b1b3RTkUk8eFO+00DJ1Hpd33XXuu6/UqAhGrhXc2U1DS -HQ4HLbNwkyJNKIozSpJJQj9TWoJZudUw4cyyA3398oXGaaKP9zMlSawMrOfvY/tauziMNYv2sPDm -n2f3nPDZtfSV5z8MA61mNm11Csg/BMHpcr1SmmaepNtFV9s0IHd4fXx8mDATly7dNK1OBLhVDBXf -iCJJIzIgIg5/vgk3nfLAr3AypiLOcJOrQAZNI6k0rDMu/3dshMlIy2Htfbs/mBikSlC+vXdiKnQc -x3IhrbSu/iGOUfL9/tB/tqQiUL6TxBHh+n7wQkTsYcsWfKlJpHbOvVh/uVCO953X2DMdeBgnbREw -jcB6qeuKiDiKHWzDMJQ4NowYbDgETheUgG3bUlVVKvFFTwGQyfKkUVE822WB1QfjQvQ6UOZZ4QIs -smezuC35xQkoDEAkxgi4HVg/PnrcaHDwq6qiq5B78MBtJh2kybuIk1j622kbge9mxR/YyF+/fpWZ -94HC6EH1gXtE9PnAIqBu8+2lt0+2YFyCB1rCzfNMwSdTDCdFZbAv9iYcKI0BGsHf8P64K/BUls5/ -Ds/6/f2Duq6n4/GgwaexAHp1VdHrty9UFrlWjGiXVFOywHyyUt4G2HJcfWy0GKeaJEnodn9QEscU -SfApAEw7ckRbE4imv+3OHtMRLs78eUhUkX47gfeG2bjKhbOUxnHgKVKaUtu1dEpPXrUbx9x6ck7f -gaqy9LQAcZw6x6h5oTiKJfjV5T5aQpVrlUbKMnqKy1s9N6yqKikVlaq1xcdoj4F3J4KaZbqDy5bF -fA+1oI8ZLY09iyvLVtt3RhYPdcVzcJHE4iXoyY7MPAk/DAjpsJEXIoGyLUtTleZawAW9m81tw2GB -Htq2K+Dtg7mHeCeYe2CchfFMHEe0StoO2GkudnnTFGQbZsKLdvHENwDa8OecRJMPO4SB8uEYUZKm -9NvvrLMoilKdaa17z/5EdsKNbq3UbE9qqwX+PQzALuuiWE4qzxE0W91EK9teg9m470RVVapPHrIL -932jPGOL8K7rqCxL+vLllV5eXuh0+ivNc/vEhNsoTXPFCcAVAXGItQbtJw9AVH+w8goCop9vb9Q0 -HX3//u1PAzBw6MEU1YKm8JHAJsF4FRcXbtiqqnRjA7tBiZ/nGT0ewSfLuHXdqJ8mzrwoS4qTjLau -M9FdTtY+jjMV4vMAQ5bRmLpglBhFEdV1LSBeSY/H3RMuWTARmAvovnYigp/7HKaCaVaSBOqLEIQh -ewJaRhZSgJEEZEMuNqPxd+UO+O6uv2Tb4UH57JYVlWcZbdtKNzlIMDVAP2/HLNaEAX0hDpw0zTVH -gBfP/km4YufWuO3neVa+P0YhlmOAMAoFXNQfYPXCSTCfxonOlVRnXG6ci8zj0dA0zSLeKJWogQMD -1Y/1nHs2n0SLtO+Tbm6k2UK8EgaOCQduP3gIalohfzdKaE7BTYWh53sz1jWPPYvySMM4CcmqlP44 -F975u5b4YOgh4NPansF6e547r0e2mgKLC8VRLNLVm1YXocmitOsEmx9TCqzZosglX5B1GKhccaCr -wCdnEA2VAzgBcRQpr8AeuHakPc0TrXJL2/wHbjcOFEW9176MsmesCQueW56l6lptLcnsFAS8gDRN -6X6/e9W0bYGex4NWIevWQkTBv/3b/9qZYtooZ1wZRcY6Gmkybn6/C5jnct7x0MDXfiZw8I0j1NWu -V7oq00Ij9h6QPHhGsl3AJb5IlnHENOKRkC0PsA46d5h3wFKJhSixzlURBmFTg/A99n1Te7S+H6gs -SyLaJXGWtedd12ugJvrpYRxUw2+NTqFyW7jnojCKROoJg5Fa/QmWxaUDwYIrlpt8mmc1L2E682ZI -IKsuvOfIqGfVHlRy8Dx0I7ZAmZ84BHg0W9LQ97TJZtnWnTqZvLgc+0S16mCJ2tYNKc0+m3AR/In/ -rLXvxq11uVzoy5evaoltAzJRsmNtVGVF/dDre0cJDYDZovkQOHFbtMlG3w23gSdA8ICAlR3WmPb5 -wq1gnj8JIJ24+O0woG3bqWkeFEUs63UXlPs70yShNMupF14LLkS0TBB9Kb6SZdQ0jVa48FV8fk5Y -NxbbwUQpzwsKfvnlX/ckSejt5086vb7S4VB7LqK3211CPRJ9kTj9vcy6hfPXh3HyaKKPB9ty42bO -80xpnIiMatpWZ/vw0sNt/v7+Tt++ffP018vi8IFFmIMYUeJhIUL7fL7Q9+/fPPBoENWja1OcwScA -mSxN6NG09Mcfv9N/+2//3SvzQe+c51lyBchDteM4EZQ+ovf3D3p9fVWRybKsn1yJcCjiMxciiZ3n -hW63G72+vmqVwDRpbmcsEARDC4wsUeHcbjc6nU5edWdDSq1yDjiBVbrdbndVs9lRIByTUS4ji8/Z -wjH77h+//kqn04mWZdbPbOPAcGmAjWe/CxHRP/7xD/of/+O/U1keqOseYi7TezJyjJXjOFaeAbIL -LpeL+lFYnwIrakPLaydW+PXz5xt9//7N4xpgfQP3QptmA0MxVYGfAg5KvPtcQ2EWLwnq2W8A2Qwv -L0f9XGWR6xrLs0xGhZ0HHLrq80Ffv7yqOOnZhDZmU82YTq+vdDq98MvoOu0Zt22l6+VKlWiPUTbO -UsLB7z6KIhqeeAG86VftU5yIhP/yZYU5BN/SWcoIbSJxUvZBYFxk+QNg9m2b/J3KugM5Z9VsuUE0 -43GcqJTXJsBYKzHWPPDtdzy+qOEoMhTBvOM5bqSLDYSd2/2hZhrTNFNVTbRtsUF/QzWNhD06lGLI -xmN2YmBcfgbdOEweSkUMMutoMUtTmgVnQfbB3fSQ7obYlINuzVEhKbXEq2ka6X7f9WdyDuBdJxsg -hcECHEy2fduoHUa1JgeTsixyCbskYzk2uUxHmSokSazrkO3fHxLCsXpVQpIkMhePdU3N86Kg87Pv -v93kGJGO4yi2YEyXvl6vKoACeSc0VdHz5sfm7rqW1jVTlicAVqRegYNgR602adn28mixl2Wlqip0 -BN20rfr9hWFIl+tVhVP8fGbKMlaOAl+D1RoOfcW2ImECxlFMh0NNURiJ5RZ5RodFUaggpGk7mpdF -mYPPQAVONEYlZ01Cga+c/SAIrkSJdrs/vNsUNxx8z3ADq6uJoa1icuBe9CpBDIs+YHvKos0BNmBH -M+62dic+0mwmMzaCXrws2EkGZSnonYdDLa2Ocyy24BVoodYsdds2bW/meda4KrtwoTFAJaU25eui -hwRs1/6sHQB2AdYiosgta4z1FYPLXBReRNO0SjypylLLbDwnPlSIGgmz4BaHY+E4NXpSZSJYiNap -KBbgkINESmrbThe2tQ536cetJ5+174BlzpOuU48GLsQfTCR41JZRUZQyass0um3fd2UpWmIRkHbn -fszvpxY7L9iZ5Xkm68YF0jB/gygMnRQZlZlzhuJ38Xo68bNJWGDHbUfogeUAHsuypEK4GWhZLJ4G -3Ot8YXel2MYiIfgCNwxTZU0OWxR7Pms+FdWVXPgizNKKdeYLP/M4z6iX8EeAaOPkACH8TCLetL// -/ju9vLxIpBgvpDlY6NG0XriGG2WuOv5p205jnvIspTDk6iXPUpkBJ4bItOimxKGBRQXTURxy1tdt -ngUDEGdctCNFntO+kWYYWP4BqgUsbNhRW9deq7C0s3lEOz8n2nh6dFFs2pGZy5LnEM04YmT88Wgk -vgoLZ5VNmEmfztoMBH7CiZlluKN+J5vyiyonimJl16VZQTt1NAyLylez1NnNV2Wh9ufruqpZp+Nn -HFWObMVkIGTZGDAm6iQUSMm8bs4Sjd+fA3JByy4lphuuy1GUfELgIWj7M3tykJKimAHMuqpoGDeK -xZ0qz3NJ1x6Ut4CWBe/w58+fdDgc6HA4qPgozTKaxlHbVXcIrJ77EGK/LGEqjie9rKwSkNu3jWJX -Ho/GmCLQMlZPwHmmnz9/6ikPkMSimPu+UyW021SopGEYeGOobd9pltIQc3dUAzbwEQBREIRUVSUd -DgdOVF0X1iCI44yV48Kh1kYoA+gDBoFblkvOxRMq2VIZBwp82h067OjIOMnnZRVMYvUW5DT11PUd -Xa9Xj9Jsx3Ef7x90fDl6VFa3eRj881mHm6q7rOz12VJ9N5Ro9Mm4OTkZ6KGLuCxLQcxLOp/Pn7zr -4jii//P//St9//5NMQ8bBrIsi44T1RXKuOSwHRVPcLI08aSxSZJRnvOBZHt5/Pemab1wTLRfFmAE -2w6tnHVb6vqBvn9PiCTvEs8Ehyy3GYkg+osahuBngsoM89YwjOQzJtKy+mKlaZqVCTlOPHHKs1fJ -wkRQba4EtGVdVLm67zudTi9UVTUdDgea54k6AaKtRN4e9GjHqqpWleGjaQ2uwM7M6+pT1uEvGC8y -p57n0HN5sf+LB4vMPkdbTdQqCeMoiFt2khe0OQIGSmrcnogQx/+PjYYZJ3/HnV5eTsLOi2nr7nqj -Kqde8uND8YIDkAcqZVWxDBYv9dE0tK6RF09lfzl6sCuXY/EpaJqGDoeDSJFzCsJQwjojb6Fa4onl -9zfNw5NwHl+OdDy+UFmy0m/fSeKsuTyHvfowjOoKzOUhfepr7cjTjuAsDXX3HKADmfowuQT+BwDI -wOmfppleX0/05csrFaJItHNmXADADuzocppmKktHDgK2wfTWmS7i7hQEJBdGqK1dGJY0jhPVdc0+ -AuuilwZixnEQWeCLJzwgoPV0fzwU79i2jcIgVht7bb8Ef+LyP/feI96/i0DnSikwOJdv4R15btKw -yge+48bfkzI58a7AkQkCNrAZx0mswkKP22AvXOtSNIyO/IYWcjIBrzgY4bcQ3+8Ple2CPmjlspP8 -N6DISZKKvpwU9WWaa6w3QycLQI0qTUoN3Fng+gK7JBs8sa6rKu7wq20d33oYr2okse87LfLZ9z1R -BDxN+eQGH7vrB0WmrTIM0w2O8GLbKyjGgqBQJRximSwZqWlbdRlCUiwSaCDwsJlyXDq7LARYU2Vp -quWok25uurj2fafr5UpFmWuqshqYxBEN46qVAwhPSLm9yThMy35ZQNzHZ5RlJbXtg1q5odHHWjJJ -EATsE1my8Ibo/hQ+4oNYDvz1tfw44LEZ8Bxikc3O4kBkQ0fgorNtG3VLb9qw9UnItXnYCrAMGIpm -4vqDfh5O0mVZUlWW1LStWoE75p0jDKEtRXXAaH8kbY+j3oJgY63VQPbBhcr5BuQZ0mDqsa4r3R8P -2ve7THW4BcVkKAw4uMUd4NKOhTENox+jHoahOk9jNG15AMMwshbA+tKhX0TySdd3lOWZzjXZGuzx -xBHgQM1QLLYs1RLltJMvBiq9hfBi21Z15F2WVVODMGXAaWZvU8x6ne7dKezKsqSqKukuIhM82Lad -tT1Bmi9Gfj/f3lXjgEyAXPL8wJyL45hOpxMdjy+0b4JBxDFt0u7gEMDBp+GVs4u/wk3CbjGLZgEy -7hB6M3jr9R+EgWTaH2gae1qMys4SabyWYHNAkIt7W+h+v9PhcGBXob75lMIEEA4TC6yPtm2JqPW0 -+RBoobpK4kgDO5JELhGZUbvwVaeYcyavPNZyPgfMqDx/XDwgkmPGMxW32LWFQwtVCzz53YjTgZxA -5IuCPQSHYWDTmzCgcVxMS+ZuW8STgWPvR6/Fyhe4XK+0LDOVZSXitVFB11Auq2dDHJurYZWvmAbg -n62JiDOlnXSK5KL5XBYhJmzTvKgXQxTKCN99CKO0iv1ZoiWQYPNYamwQBOr4AlQfY7+u7ygXBN2p -n7hE32mnKIzo59ub9vNsKDIajr0b0VmKMkYxcFfFGKiqKuq6TpFQHDh29IMbZFlWKoqYsrygl5cX -OhyOFIaB2j/HSaoVADYHm1wsLo9eNgfMLKuyoLyoaZlHzxAEtN8kjulyvXJvKH1zFAa0PGED+PmJ -ADh1XVNdV+LE7KPZhQpFds/Gehg2L9kGtxhGXM9pPIqwBwENoj4DvdiOS6391DOmMU4iy4Zl1rJQ -ludqyMIyYTeLZlAvURmxL0QjejkdaZeRbCYsUgvOPhuSRhHEQUiCGjToBJccV66haDYSEf9wG5Bm -GbVd72VB5lmq4itMw7K8oFXYhJbotkWbVmiFjBH18JOxrt1n8CC0fhm4iGdZUzjcbPYm9pm1MnNj -2MTsVwZ7kzSlaX7Qx/lDHLz5GcQ2ywyl0zhtZtzyORrJqrMsOMPosU9dtBZNasQxjDIWiuj946xj -M/TjQH2xCWx8ts2Tgy6fS3W3QFFaVWVBj8fDW6TzvND5fNYbha2+3vWGYCCF0fhff/tNBS7jOOmt -ABtmHCQWgGra1psioM1pmodyENqmpbIqneXW00J2GAxRP/QUxVy17NtG8zR6i9NOFhhoS5QdZt+p -9SPAlIcP18Wb6GA6YYU3lvyCxYsAT7Q0ALjAVGNEvKQougquMyjXAOuGXY5n2Yyh+ik6diE7LB2P -B6qqg1fa80a9Gusxd2vDGCPPMrpuNy+OGy0LvAiAJaVpRuu2qxYCLVYYsiGtbV83aRmxJmy68az5 -h0w/tjoNJuMsyq8AGOrckzfvGSsHQSjQVjNjMQmbRA3qMLCENE1op53GoRfODnshHg4HbgGArEOj -z4y0XsEdINvPiiwk0GCOjLEOIsMxorBiBSwwlIcMeMUUBAzURWHE6cTSR80zM98Oh8Mn+2nwmrlc -T8UHcNGbgogoF89C9L3IJ+DcuEzn85aLD4sv0JXZRCM2oNb0yZ7KVkJMmR6oKBI9FOEspOEgL0TH -w5FSER75FF3XLyPXD4ku88I5gJbK+mljy4u/y8+1hpqWf992vlmGPUDtXB4tEOLabGCGFXrhz9oJ -wPl8Nhs6UWfmYeA8xmVZqa4PVBY5ZXmhh8xDQDuOSmv49g4CyotSN8q+D588LJ2eRSTRYlKC7wHc -YFlcXBgOEBuTZnMo9t2ZlvBkizUN+Fncpq4ajwcW7SJKSJf8tKnoDKnPDmid1JnY4hqh2W/AkIqi -pL7vtN3atthcCIkn18cB9Hg8lAF6OByoqkqKYXcH5pSlQt7vD8pEj2+jquwiRYmyKCNw1ROLU0p3 -ORyc/DfwEFCXvxbHMQXECD6TJmaa50HHh9bFh5FfFzaZQX8g5ZP1JLhcr8KmWtRfvyoLojwXbfqm -PTsbfKZqWR0EAX379pWWZaG6/kLjcFcpMFEoICGpHmIyPIayZEPTMAzpcrnq3+0wj43iJFYHInsL -WLYZJgJqQybvZxydlxyio60jLNx0gyD0WjVMWDaRsgYBefRce/sCT3BuTJnacAOgA6kEQhuLmHMv -7SSzECJtst7GcZRcP2YSrsuik4/D4cDjSvFuWBa2PR9Mn2uRc1wy9iCwrSJEY3YCYinQAHXBEMUt -/9xeWJ69TW1iZyeeRAFsxTpnPkwp4buBGU/7BqsWI8P3G8ZVR9xwE2bPST7MIMNWz0f5XzsV4e/F -QbvWkux65Si1uChKmqabd3IeDrXEW9d0vV692xf8ZqSyYgpgT02AOJawYckabla7Kz+6l1sCYx2U -UcgTiMKIpnliMY25eS311rYO6IUsZRS32jSzX7z1QRjGkTaT/oNxUt/1RDTz4SDEFBsTHkWhLmhO -nXEtRLgFtCwzHY8HPcS6vtcTHCM7WEut624qHB75pWJT/scfP+h4rEVKnAqwx3bbuHUgqx0nhyyz -x6FTiKFCwvvADe/Hu6fKZ7BjUsdTCDzlJbghyPxDBZGmGc0ilGLzWUddZmv3WME/Ta6VEebhcKAg -jJWJiug44B/2wLRtihspj/qcnEM0eQeDOyxICU92fm5BcRCoLOiM5+aPCDNtefadqOt6ejwanVZZ -FiMqHhtZbpmYMNwBRZ2IaJ4mut8fahy677uQgkiNci6XCy3LSi/CL4GtOcamODSLoqR4390tiEVa -VZWUM6OW9IjucsQRvtFghBlHES3rSlnKpddzyR4GAS1PjDQXLpqowMb63sWinurFXgw9vAUmHQKb -eOyoICC6Xnl8ZEEyK2JClDTAONt/60sfB/r4ePcimcFR4E0/eGlDFhmHeKqqqiewzAKLbj5u5/pd -11NZEk3zTOEwUFHkVNcHlSPHkjeA8i4ShSH6b8tJgLwWbR7iy6ZxFHceFh1hpoxyeBxXD5Tb952m -eaGua7Uys+w7TUaWf49Al34YtE2x5qiYHtgDhcEtxjsej7v+/dO8UJaltO+Lp3vHxrYpS2AiwlAF -Gw3PHBMutHNg0eHPgyi0LLNOV6xHhPVuUA8IqU4sxsAj7uETtf0iNFyujCPBXBbT/s3aVttAXR5B -rgafcD4Hl8tZNjq7FdV1omsLvz8gZ86jrNz//I//ojRL9cOgpIX/P/cqEa3bYkofSfSR3ngYNm9T -gi/gSYrlFH5GjkErhlVREHJpDjMNa5zw3Cc/TwMsWAPTRqLJyDhZ/ZfEEbXd5L1IbCzEVmNDo3zy -DTvJAzntC8Ehpmq1LOMQ0zBQ15gsy3T0Bd86bBoAskgdgq9+XddUVQcVDjnvQDdeRGAK2qimaeh2 -u2tVggWPDYt0Y9jCwbUXxhnc58ZPphKRUJ2N2YbhJAA4AxjWNC2t66ImKBYQ5ViyQUdWEALBaszm -FHLbMn1yiLKb344zbTDLs7W4c6xCHL0TYvH7nzUkNo65dMdnK/KcWgGfgXvgtkfJ70xIIs03YPdj -h12hXQTd167tHz9+Upom9PpaihhqMhkKibYbMGaFaApeE1vB1vSHQ61/N2siFsPQZF1G8L//9//c -Uc4v80zDOHg9BPeyEfVDr7pt9PtQG6G3+L9FX+HG5EARUHwDBXyiiN1awzBSLjN03TjlsanYwTX8 -FJxp9fxEboFAZ81mi4GqoJxuPKQiLyiMIjUTxW1VFLmIPZzO2nIQwJo71AdaxbsAFQ0y7J+foQv5 -RK7gqOBhFAY0GSk1rL2GcdKF1Ha+A8/z8+XZdkGtxG1DKu209pHq2XmzoHVbqMgZB0HUNvwA8XuB -2MNXARp5X1MvClJRqWlVKRLv6+1Gy7LQ4XCQvMORoihWTMK3fMMhH3qfHeIj56AUyAE+iKcCVwt8 -wPZeBQOgD6AwKwd72tadXr+cfFNg4wAAIABJREFUtDJhjCUxh88oB3eqAi42rQ2FkOYYkTwJiWkc -Jx07g4I9ClOPqcQpXa5XXftEDAj2fU/H45GOxyMt80I/335SURR0PBz082Mtwfu/yHMetw6DXjTQ -pAQU0CD6A7ynLOUxfHC9/rbzTDhUR1Jrqdy2Lb2+vnpaY4w14ohPIKCfzrfcvZzL5Upfv35RR16r -94f3Gs9WmaCAvgsLgPPdvwn1k11mYcKICgEMszRNdTzFoaEjXa83+utf/6LEERvZ7URHpA7CTjLJ -KsmPjw96Ob2IocTsudMi0ATjqkXn847Jd71e9flZTTyQ9XXdRLLM9GnccvaARFqxteC2ikRL/rH9 -7bZt9PHxQf/yL//8FCWWKFZj7drxc8C8y/Ocrter6PkXRZizlA+lZ7q4jYgDsWYcRjocOA14mSe6 -3e9SFR0ku7Hx9Cb2AICsFvbrim4bVyC0K89W5CjV398/6Pv3b58cpqwDERSex+ORpmnUGK4kien9 -/YNeXl68KghzeOt9uSwLVWVB67arurLrWur7gf72t7+yBiBNtT3G50D7neeZ4l+4vcMwob///T8p -TVN6fT1Rntc0Dq2XVI22CjF5wLWwNrB+0HrhUtI2ezGmgX8W8ogYL2uhFEpAJm4fFr5MCijZ/t+W -YPjv6NGDIKSyzETw0CtHGbxlB4bFGlcOA8k4ThSVRw/HmgZuP1LRk6s4x3i14wbAYmvbRok6jnS0 -6k2PHEGUp9a8U/UMBtu4Xm+eYalz/42EUryqFTYTUcZP7RFGQ3Y8a7n3znjCf28YVcZxTD9/vum8 -OstSTzZt26f4iebs3k9gpkCOM4/Fb3PqbOQ2V4Q5lUUhaTQLjdNd6eHbtnFOoIxcoU5LEt4IaD/h -XKTsTEn3hUsvfPfQQizLSnmeGEk3UndjejStmtsCI0Hluq4r1VVJYZhQHC3eyNpKqJPYGZdYVisO -z9msGd4vm7I+r9ebJ5+38lzGu3i0u20bVVUlNPaGbrcb/e1vf5PPOdPlevWi2q3pK/NwEgWp8Wyf -nb7R8u47UYzACyugsH/AUUI/9952ZvlsZYy+ahI67zxPuuGdFJetmGc5rZ8XOv8dibIP4UNvc+xB -c83gP1jwuAk88iAglb3aXD6L3qK3ShNOh7WEinGaqCxzk1w8GyLLqA8zjhOVsuKf+VncVeuAeGuX -K+DrwwEQWp6B671jb5KCEty+CzviYv7+gcYxpaosqGk7baWgJEQFgPeGv5P/PEtVM9GCANMJJBIN -iDvoyPvuwjlwGHZ9LxHetQeiQt/P2vtdD3/Wb4xKIc9SkSHLRGgTOq497IAl2EhxuAXjUJilTEbQ -J6PznTMU2TZq2o7yfNUNjTVs21oO6CDFq6BezGWs7KqwWEd3WGPPFZoKkwx/AdbfaOkwieK4+kiD -XG2VhJ9h8wJ4vzmMKo5jxaaAbQFgj7H5izzXcYzlE/PJsijDix1MQ8qyXDc1HgL72Tl98rNkM0ki -DbgIlezCi+9Q15SkKf38+VNMPzMNrcDGQB+GDEPLCrRU5ChiZLUoCr5daP9To1CuSEhSWZDWOhmz -ylTZa1kK0Gr0sv5A8bQbG1z1JGGtexRG+nmjMKBhXPXADcOIpnlUKTNKROX3h5Z8Rd53t4nO27bR -7XbVeLUgCOjleKDrbZcw0Men719XlQJawDhsWTtOE23mgGmahi4XvnGzLBOW5CbMzkTJLPj89vYE -Y47fD6+fKAyoaXqn4ZCpkoLD267qQVSZaDF8c5OI9i2g1QiT2rYTYBVZA7xJy7KibduNOYh7N/B8 -eHZmtll8qEC3fRc+hlPqDcOolSXo7kGw0jIvTz4XRMtijFyWhR6z02wgD2FZdmOiMyuIiwwPyNkx -8rYVm1WnPrd6XdfR4/6goswp/vL6ymypNKW1abQUwwwVABgefF3XKsGF/591Ju06jtK2HxaUWNcf -jp6QKM9z6oeBmrZVB5R13eh2v6vJ4v3xkEqFo5wgsHgGiywPIBWVXUCBZ4pgS22g7mw1NQnbLTIm -IbNHj8VNaQkvm2S5T9Oko7RpXqjrB/rx44eSSzB+QfnOzL5RbpuN/vj4QWVVugBLUUTWRuGGPtm6 -x6CUzbJcVX7jONEshI84jhR7SKQ8t2V+lqUclilTCYwuq6rU3t+BjZkGp3DWPY8nWSG6ebcaDgOb -6YjFiT8L8RZATqtBeQ5JsUo9EG4ADLsenehyuXr6DbQ4TDC7SUI1E5SemYGW7QmzU0zF7Awfwp00 -DZ8qkljbPahY0erZMbb1bZhnNmXBeL1pWu9ZLMtCI2jIZiqGdguf345+wX6cppHmOfcSsIKA6HA8 -MB8EdNTp8dAHDORy30kYXYOGdzB1eFXutDWNqKpSwQ7ndU86OoGtMT4gjEXyLKVOT1pGx7OkoFRe -8jCMetAgdxCeeqPc4taIAuQcjCxRsj7bgS3L+icTi0gByUxcZaCkmk3OHghMIGhwWkzGTEMTdJnn -hSz0jMYxMJ57jD2AQ7DvO6VZSl3b0ddvXw3Is3lKTRCesjRVQhbKWICJSZrqAsXYLgoDmmdnuAGp -NDaQUy+uHIldV9piWJIYx39V6lMYhiGVRc6W6CbPDiWsLX2de02i3vRxnFAYhbStm1agFodCBWSl -xsCKnvt0l1MR6cju9sSz53fvrN93E8P2PG6eZ0bkQRLChgSYyvLxRLgFjqWIdi0UFqIFVqFG9UG8 -RMfFRcEuVhaHsJs9oFjBcl5HgQfg4rtaPQ4mQeAsoKLN8oJi8LXxcBxXmU/waZ4pldub+7pB0O/O -e1hYDEEQ0Cr5b9fbnemu2+opCJ2LbKiKP3uTsyCDZae//fY7/eUv3+h0OlEtuXM/39505omeHKXQ -c5KspXsCRbb0ZjvPxcm+RpuqFu2N5Fucr9L+sLgCCy5OOGV2mltpJWKRHSdykE1edWVBoePxSPM8 -08vLKy3zSDcx3rD4SBzH9Hg8TERV5hFxur4n6nuv2nHJQ6tuEOQYnk4vlGWZUqgRplqUR9q2+VPF -hMkExoPzPNMoVGhLB7csOugQLPKOtOIgIPrx44coSDfloyhbTsDR/YnjYct/HGC2J87ShGIRHmGG -bpF8XDxsmjF5JC4ckGyAk6qGBL/OH2et1JaFD7u7TDfsRCaKInp7e6O//OUvOjlTebcp1zkct6I8 -S4nI187Y5KlWQHCAxFADguGpTlXm2bNGITMSbF5D277T4/Gg+M9UaFzGF15wJ060WVJxLPCHzVJX -FWe7S8ACf9hAGUhA7HHyz3OnsmFnhLh7G7euK3p95SSadZnpLA4ySeLYic+RzZv5jHbkw5sxp7u4 -C6NEdDbRkbodzfNC48ToKlDz55EbQEqmsPZ0uZyV8IJSCyUmlGNAiLlfntVs83x+UJYJjXgeKYxi -vf0x+nrOa3g5Msc+lQ1sLd3wTJxOfvdMK+ZlVTlsWRR6gADNH4ZGbyJbgtseX63TolgPTeYjLNp3 -4nDFyPNwONDlclZuAjZ+kpBKlCHhhevP7XaT5NzC8EEGHb09x9GN40ht11Pb9TpFieOIzueL4kvz -PFMrAKSdellefpLEVOQFpUlK/epk6ofjQd2xGRjcNdcBgDUOPaT3WBeeRTz9JtMOBEGgMmRfq0B+ -cG/bqsLU3vwgFWEyAno52rJ5WbW1wXi8rkuKyyL35J/YFGVR0DS7P9A0s46f8OIReoi0nk3ah/P5 -orNrRnGdGy425jjN3uYFicZaWQGlZYluQl3/cKw32UDYJM8P1NqD42e9v7/r54de3AIkuHWswaRF -aZ3sefEkmUREx+OB5rnwXF05y+/mWXbBkzBNE4mCDmjfNnNwMKDphFATe7qZWxAtRRxFdL3d6SFO -vaAHA/EFcHW73eR9hPr954U9Bg51RXFSUJoOSr9GBqI94HGr2LEXwEc1qxThiv3vMG1BLDkYjmhl -tm2jl5cXsQNjGjmj6pFyN7Duipzdl13oBk8BoC/ArY3LC8xFrInD4UC321VDZ4IgURwBTlTLsn6q -VOCWhCp2XVdW1CUZRdGgNzXMRJ3lN+NSnEdZ0zyPhnPCFxi8/myLgT/PeMLiWe6B6m3zFTDpUnMe -KfctM9bZ3ieCVTHLMM6LksaJFylLL/mk/e3337TEQEmC01fniQZouVwuKkApioLquqJlWalpWgmF -jHX0Za2J8OVC4zjr22CH9Gga7Q9dEMksXmuJHihAOPn0TilNA6LdCUcQ+nmoK5qXVeiZIc1zoGVe -aOzAYYuNHs56sD0Hn+57qkEnnEDLfm/TNFPbtlSWpUdjHYZRHWLiOKFoWVnJZyTEvAH5u9lQ0Xl2 -OnZUMAAyrZYBCwhzb4Sl4vlCznq93XUzwt/fsi0di85VQM8HLvj1zj1n0moKBw9GhIdDra67bftg -3cE0U5L4FSBjLqTtVSrYjP27mral+/0muY+x9sr7TpI/2WubGYYhHY8vdDy+0LYuNM1MC7c6DNu2 -rOtG/dBTLpUS1iys087nd71t3QYe1CEaZDd2MUqIOTcPAYknFYW5qnM2OYqBmuJycvOm75q1CpzP -gPW4rptGk4GvgurT4l5cAfFBUtcHillM4qyS8LC7LlHBArLXqqqmZZ4UuV5Xl3IKameepUK3jbT0 -fzautKorINdAM3Gzv3/ctNQBCQRknsejMXr1QF5i6CHkUG/dHw/a9tVTwRVlTdQ16gEAHjyMN1nd -luttiSrGmqNYRRrSWGfhgaMsZmJKJr5zhUY4Wzk1FHx8szgsBhsIcVvbttHbzzcqypzKsvKANetS -bDXlibEfY3DzqLc1+l1rMZUmMafzJgntu6tuAHbisN+2TceD2OxYsLjhbJDmbDQHkMxaPX3fd9Q0 -HZ1OLxL5HYt5hfNmaNqWoqdAF1Rvx+OLTlaCMKSAAiUZsZ+ePwKe55GyzGUaoA216Dp+b98PVNez -SbMOdCScpSk1piXDBWRxqaqqtLobhlFve9zYaLsCCigMZw/byASzmqZRvSO5wpvUdr8ocvXPVEu3 -OJL8hVmNbXGgn88XHgHXXJHE1i6blUQZpVlGQcCGinG8UJZyeQ+qsKVC2sWaZynFSUnDOClYaH8B -qXcediERsaY8TlIahruKKbBhl9mN4dIkplVuJxtEast1tB1YuKzIyqmqSr15r9eLWn7j5+D2xBwf -6sKu68XsJBPwKFEWpANxOEw1Eedg9KE6KhSlZBQGtJmQSXtbA0fB3wPOhZ1H50Wu0muU+ejrrFIR -G8RGVi/LKvHTmVqlO5s0wXhkRm/BUVexDFp6WuDWEltgYuH35Bt9vH9QWZXahgC4jGPmFvBtxKGj -SRzr52aDi/apolm9cBBsyDQriGij+/2hmgjIaS3TkAlcHOJifxaqPDhFuZY49KTR+87chKFpNQQE -z3NeVi9u/rlNxMibvf0mul459i0KI2W1ooJBrgNXcKX4ZnbKU4GxTZ6XtG9sZw5wnSvQ2Sf1CTkK -7VSa8LOM7UwSHG42oeCF3ncdhWFNaRJTOwzad1nZJA6Crh9oE+DIctKfNycMQFGy9MNAJLFbAIyy -LGdmnjEVBdUSVN9AXqY1M8HvY81BRUmc0On0Stu6eAva6haso00UJRrZBYqlzaJ7PB50udzo9fVF -gSwQlkah70IyDUzFKsSAh9hEGfeiYvPyJ201YEtWVRVPQsQw02bbWxqzM5OcvYMG7U23bcpxwAJB -u4J3aw84xErneaYzZ/uOtcSUmwh8BXx+PrhY7zFIpiK/4y9ejHsSx5TllaQsufeKVqlpW33/9u8f -xkkXvJ2uwNTU8kVcCb+baO7QgN2xV7EiZSlNUq1skC6MFhGAn2VTgikI0BezfbBJ53mmL1++0On0 -QknKBChUNfhszzyIzISOam7F2Hu5f6hA7MQDTshYj6kcmE3zoBjKPCvssJziaZ4pk54YAFaepbTt -uyb0WNqq3Yhc1vogxjg5yiZuArDMAAyhZOKxY0epsQ23Udno1VHyw2oc5qKQPM7zqGPKZwELXFMt -t98FfWxebwj67Zcvr3QQemsjqKzln+/SFs3zTHEUq804LKQtB9+Kr+xhiY04TZNEj3EZ2na9Jt+g -/bAecjCStLLf5wMZ3x2BrDZRyaLpduKBhftsDmoP0EfjIuFxC2ZpSmVVUV0fNB4bybh9PwjZiMeH -DxEG2QgvZAPy4dvQ4VBrOc63diubNPO48W6s5yTfWZbqd7BVBaom9S2MI+r6WZ2ueMMuT8k67lC1 -uBEOvdv9oXiN5UDgWUIAlGWlRoDZz41n+vb2oSEpVwlqFTdflc4PIiBzhqiBF9b6bOjD7sZsix6j -lLOjBqtoc1ZXIT0eiGXipNKP84eWjUTxJ9dY3CxlWaqvnY29gp1Uon27z36K88zjN0OYZC2sYeoB -22WLogKYwfzU3kqWPAJN9rOqzi380Qsw4Zw2jn62Jfq277TK98ONBNkxj4EyfSmuCog8x2MrbrGU -VhY8RTq+ZForcyHSrKDH4y7fcfEYjmq5JuMntGu+mMkdAE3TeNiLnaLAtAUH3vPY1s7r9ZCV38OC -q8RT+hVFTlmWayDKvm/qI4DvjyqMiOjr169UlQWFcqg6DwG2cGeZLvMzYPHFfg6rEp7sAWbfsTWN -WbedyiKnKY5Vrm1JRnZUCBs2Vw2FmnLV972hsu/eCBcGnaBzW4GRnT5VVUFfvrxKmlPDIaXbRjdZ -07x2ZvVntGNB29ZaU1f8vn3fKfj3f/9/d7tx7cw3FLtviG2ut5uaemJxBgGJq04hC3xRFRfIItAf -R1GoKjjLhLIe+GzQaUUYgWao//jjB72cTlRVlQI4uMHiOFHWGHT2WZZJf9UTUaA68s+eBYGWgnyD -BXIqx4Z+G3l6ajL6AhxQ1idh21Z17kG8WZZl+sysRZXrN2NBuEM1jYS2nFuSVRiObt4chpFKQdMk -pbZzYZnI+MN3hyEEpwFFNAwua36XcR407Ha6YDfMIunDaOGs/h6XAbcCiwacwNYKzxWbUBmKhm6M -nwFjmqZp9fDMcx7vLfNM4zTq2liWhcqylIPe4kOboucMRs5eGMk4jjKhqYQMNevzhFEu3jdjLrGO -Nnken3r8GWBB7qBwBwuCW5+9NRljspcTee5BcRxRVZYUJzndbmcqi5LCKKDb7a7rzrFgI90ruFSm -aXbKv9glC8G7Ifj113/fIdN8TvolIrpcLvTlyxeKolBBpKIoVc6JGxkGC2AI4qa9Xq/07Rvnqz8e -Dz0dYcbgypKJ47bKUllL27bR+Xym0+lEQRDQ+Xym4/FIr6+vqiN3kdKJGB+MnhHk+8eFXl9PHksM -bEf4GNge7tkI8uPjg+pakFwBqKwJiWenLQpHRdjHkbquo7/97a+0w9BTKgObHPOMl3C/x9pxfn5f -lcCEXxgrAYXHiMqSoTiKjIM/fYIQSYzaoJMRtEi4PaD1uF6vwv0PlCRm+Qzcd/pluEWdf/vtd3p9 -fVXQ1YpnULEBVFXbMeN7//PnG/3lL9917LjvO/3xxw86HGqq61q9ALHpt23TidG2bdQ8HvT161eN -oge4CL5E23b0/fs3Korc+OVFqnK8Xm/0/fs3D1vBZ8YzR1WG6s3exOfzmf75n/6mVvGImEOLDRfu -sixoWfx9uO873aTst2vStjqwCs+ynF2C910BP/aDONP3798U+wCXQr0b2cW21EVhbZh2b9Qza4nI -Wee5fnkXOlkqBx8v0aHxkXAABkUln9F7fHkAFpauSyRyziKnMEw8vCGREeI//vErvbwcqSgKncNi -zGONLc/nC9V1SWn64hGg7KiR8wI+aJpGp8+WktSyB11O4ua5F+OfU9EuXB4PtQ+zTrT4TCAluZbC -PgNSQ0rrAGR15Tagwv67+/0uY8BYOepN03qtS9/P3ndZxH4cd4G9jVB58Kw90pucJasBvX+ctapA -fDrIWn//+y/0ejrR129fNdHmeVIE+ioTnZiNl0i4BrgeLy9HqqpKPSIw+gpCvqTAEGUPQwZxATbi -cFoWXj9fv36h0+mk3pOBxsxtytFPUTGJ8atNLE4MO/J6vevBhICbeV5oEuKP8vnlkEmSRDgMBZ1e -TrRuzJthKjNfAAjpseAkTETQpmF0CpLUYFijTBdnj8VFzG9ddTBSjOSTZV1lbr+YkyXyNiGALXt6 -ObnvSn3fUVWWNMptjnhoeOWjl4WgAgvL4wjEsTrj2MMB6Oe67XS/X7yHwWwqLrOPx4NYfg0eGAmO -N6cHlVRVNZVlJf3n7s3EUQIfDjVNU0qvpxNN82Ty+py5pg1VccEni3IS5mWh6+2uiDLKUAuUgdxh -xUlt12u5bEvHyfgaWDooblSYWaIKw0gzy1IVVVlWG4BYkEdQlQGfgGkqemgEu2J23fW9jtoSIUKF -oYuXz/NMq6fv37/R6+srHY+vdL1+KKaDw89uvtmwU6F1d8BgqmsGz6LrB6+qeh5j2jwJVGgYOxKF -tIvuwbUJiY5HufKYNXkJxpvP7k1lWXDMeFlqC7ptu/osYi0DEM7SVPkmYRSKZd5Mh7qmnZimfH80 -9D13eZLLQkrk4fcVqJLSHv54lsPQU9t2niU6S/cXVCQ8o4aWOZIsc/izaa9gEGSM4FzMkkOCp3nS -TZGlCfWit86yXHnm+05emW/FPIOwvOxt9vb2psYIll8OMhDmq0FAVJYHZ/P9JJ20iarcv4WekYal -ECdxRKfTC/fEaSE5e74MGBMNu7ieNzb7EPKIL01cfl1R5Fr6ohTGz2jbht7ePuj7969aRdk2AUo1 -LFLYZmHECI5GEsNaPVVffAsMwmFH8xyj2COxLMLEAwqN6ZBNRLKpO8M4cpLP4ag5djAV7fqeTqeT -kFtSfXeoSpYlNO69kaEcs+9BnmdC4d0U/bc2XM9GoTbS3bIV7eZwY+PHp8kGRmo3YUliTWYZawBC -eVa25YI+wEqRJwkn4Qsw9eLqpnkSnCqgbd2o7XrlCQALyLKUysLlFNzvdyXmcUDMoGNq247i0mua -htI0lTWffbKai/O8pJ8/f+jsHZs+CAI2tZDeHcgwgw5u/l0UuSdYwIFgFWjolfp+4BjjdaVtIwVb -XEILtyGb9LXn80VkwKDYxt6MEyUp05fZ13DoG6Uew+DRvlT06X0/eDJYp6iK1MaKU1Ua9cKDOSQb -jey6CS1KbmfoGA2qVFN8AfkwzKUn9XPu+IbI6XR6oS9fvtD7+4eU8ZnOtXGgYgwIWTV/9sGEg+6a -DIM/a6WoYRhRHLrE22eXZUjD88w5Mlk6KjzsIPBidmDuouFFjm1DTPthoEfzi7Y9yDZYV9dTszmq -m7mjciyLXEBkF76SpCmNQ0+jSflJ4kis0PzqrO87TU4GVmFLZxfCkSsL0V4yqMTshrMHB4fp9jRe -r7I3Cg1+5cM61vBT3kuk5jWjTNvshYwxKqs8B3XPxt/XmkkAWjc7ZWGNylGp+drai+3Yoa4o3jcX -eng4HBRI0/GBQX0R/vA8KdgEebRCGJRlYPXxghmo7XrxulufmGo+9sAHUkpZltLXr1+ZyprXtO83 -vfHwEh+Ph24+lPrOGYXBDsR/o+R1c303ejmfz+oZB00BEGwcEGqpPY0eG9FWGja0YjOfMRV/gXVd -6Xw+s3dCFunGBc02iiIB/moqik5vj+dKIFFPeRL0O6M4HvU53MSBF+0T4tjQ+1vqclmWVBa5LjTL -CUCmnTtUZ81q2DbrDUEmoXfWDeaoyRFtu0+1xWjueV6tkwdlj/r2dLxRFhqbSTeUbVvB/cfF5WTd -bGbTSvu6rIsXoYbSGoKaRRKLrGrV+hJY0ByVLycuFTptgf6e3ZPJu6k5A6JTS3F+j4boI99L2bZ5 -zpOLwmVRBAEp5mUrRK44YEOeEdFGTdNqgAkRUdy0nQaBZBlbEeFWnJdQNzWPYbgEhyXSvpNyu7ll -SP7UFhzCiqIoVOFl46XtL9wW4zhpRFRVVTSOA63rzOWSWFelCRN9wB9I00QNPLHowOirqloXnuUD -uLLaZys6FyTDIgsDGmUhlWWli3qQReymKe4gwmZDpYJFxfTiUBeXsinl4GHzlItz5xEn5X4Y1JwS -txLMQ3/77VfdzOq01Pu8Aoz5rOlEkqTMyjQJuu5wDD01GZKY3UEbUZalHN/Vdfr7bWp0fTh47ss4 -TLFUbDTdsiw0S+la17WWvrOkOdlJFYd7DvpssYFddZFp2c9+Cy9UFDlFcUJRNHmViXMA4mczjiMd -j0dti9iRulXxja0q3Y1uqLZpoocJREtFUXqaA0fISnSyAhIPKsJxHKnrB9r3je73Vh25AIjatWwr -WHhO6KRpWyQEJvBwphj215gB+84poT6UYRh1pgi3G7Cinum+z1lzAOnSNPMSVNgfb/IeJjThKC2n -aab7/a48fizwJGE64yBppwiYBKnHqp9AOsH4cpSRputnF01EIiL+OfOiggxLybR+d0z+CbXNgUrN -ft9pmtR9BrgH+v5UTnrQqcGTRxkLy7Vt26gfBiqkP+z6gZqmobIsqK4qCYmIVD+Pfn3bNjoeDnLI -bNq3Q7f+HIgyTrNyOVDWJybzYVCZcurbdIl3oevVc12YzDqbNJHHLlIrabU2XLi53RTBxz/wOYCk -53nmefIx94HX17qstMarp4mIo1kUnJtnU4aLwFZz87LoJAb8E57bO40EgMFWEHyMFB+Ph2YjctKS -W3OomC3jkttYoih07RWIWVVVKeaT5xmFsoca4ZWgesShgMuGzWgYswNPgttfXqsxynx7EqrkNww8 -zznf5JNvhevlSseXAx0PR20ZbP4fSqXUKJtgwrk/AYCWAQU0H6CUPbk0mnt2yOq2cwQyPnuR5/T2 -/kb3+52+ffvGnn/TpASPbVuJyJf1ogybplFtwcZpEpxj/1NP+VRUcuM4UV3X2vvxLR952gN7uO47 -aaoL97n+QbM9CXKsuAfejIy4RzTPg3IB0oTps/vW07rynymrUm3ZbLURRaycQ5u2yiRIS+pl1RYG -VHDb4jgLKtL+FIdxJ20vxTDQAAAgAElEQVRJmiZqeoIwWBzoOLB6cTBiTkJsIr6dAg+HNP+zLway -/A0LUI7T7FHJnSMxWJLpp1IerUuec4T2NI26WfWmlooLzsKwlC8rngDgmSKbEs8OlnpN23nMPKwP -XLD/+V9/pzRN6OXlhXv1w8Gb1CVpSrfbjeZl1SRtu09sqCvHii+0rp0qUK0GJU6TVIUIdhyHUhSn -sL3p7aZha6RUFU4QSji02Uknd3KBncw8m0UrnSnIhl4LJSb3Mi4WGv29M01wiadBECg+gPSVNM3o -UFe0bruCPfhvlh9g+28nS2YtgwItoc2940nAuq1K8uGTOKI0ccw89GN2mvIsjcYzBcJrLdqsIatV -r4GIs9Oull4YWU3zwxzWfn4eDjIwBVF+owdmwCr2jEDA6YCS0LoXW/086xJCGmRcaE011bQ0TWk/ -HMSLv9J3AiCTLb5WLfu5FD94IC6X2rlGXmGaYgU/zzoIKATxbDXOzPhA2A2kwTXzqpMcG+pZFo46 -jLaWQ0xTCqNYHYVQ2SnF3bxDtAi+m/BKVVVQWVZ0ONSslhTeB3gKFoQ8X660bZuk/8ZGHr/rQfnc -lmP9hmFI8TRPlKYJNSJvdKSPWHPMLWnFzmfZCkncaZKMfv3td2EKFk/ZbZHHDQgC8kIUAPJgfIO+ -qOtaatuODoeDdwPbcQ02Pl4e/AvyLKNGvNnzoqRxHGgYFk8E4ma+sfegmqah0TDr9ObXOT9LYymO -aRTJMfp3nOJZllO/DtQL264oMo9/b2W8SvkUABKcAAfgcTkbhdxCIGGJNyinvF4uZ4+rDtSbc+MS -VS7ag9byxsdxoLKsFOEHFdf6FzgX2+WTmxMswtB6WFPTeV70ZgURpapKSrNCDVSyjH0T1mXx0ngx -igTOUBQ5zfMis+9VZ+O4oHBA4JbD5wGzEN/Boeb0KS9CjU23jYZxoDIqPdPNcdpUnAWpOtYJG8F0 -ymzlVqAxwi8/eCQ0akrEwJclYz5RxBVp1/caP2a9NKy6DzF2NreCKffhJz8OG8Yas4fbatDV2DPQ -zIXv7CyWIw1vwAcBPgCABKQT5sfPCvygLLHiI8RE53kuCKULT1zXjOZ51QkC2hH4zgGHuN1uLu5Y -Dq4kTSkSrjrGYLZ6sVMH9Ob4edqHpr40FvFnz8oubOCuW3WMhxgzzhgsPFEN2F1AladppG1LFBiL -woimbVZ+ubV+RvWDZ8SbsdH35tuigwSUmxSkVp2CbTWCUVeWcmgLmGgIIIXYCgeTiklkk2+b8wBA -eCU0H6g4gHbDg98i19u20WjyGgFqMXOOQeGPjw8JPDlqNdkqvZfX5o8//qDjy1EBa/THuHjefr5R -nER0PL4YRtykwN08L3Q+nynPMwWO0Y7Ad89dhi501qUWbR6tmxV/2adIczt29LgjoHC3LW2Phx4s -POWKdI0AG0GOQJJkNE2Nrg0bL24vOrw7BT7n2U8ndTpmPv3vjwd9NdFbz6GcFhdAr7ebnDjravpn -aD+P8xzVlfEBdr5FOZMkGaXprGAMWgx8dk5gwQvkl9pJ4AXRrtRcWwrZlxSEIUWEG5UMbTYRAcvu -jz6fkmid8CZRn/t9hxtNrv6KaDmGcdU+lzPhnIkGL7DNa0/QFtnSMctYP29HtmxiwkxKPG+Occ8/ -ORnhPY3T5vHjd3le1sDFWWGxqclCfmmJwwS3qs0dhFYBOBCYiFYOjctgnDavveSNG+vfjfdcVxVt -20rdOHmJ1Pue0un1Vb53KUk6rn3r+oHSLKW6rj1WJiTVURTR9XoT6/Paq4hh0PGcyOPG5auW+vy9 -N6bGT7Pv27f4TFuMZlEtPKsrQQQDY7AoSlrmiebZ+mfMSkrCQe6b67pD3O6BbdsoRt+LHhjuoRas -Qs8AooH7M5Hm5OF0RwmPkxeJvG5UGCufOs9zytJEhRJW0BEL/3uZZ7rfb+pahL7Gxj3j0AgtoScM -aNucIurPpKrYUG9v7yp4sQxE9KdWP25/RhDQ0yyeb5l1WdRUMxaiyf1+Y4OSJFbU/5k4FYUBLSJk -WleUqBv98suvlKYJHY9HXahoAyzFE+lN9kWD1BSok1LMstKw9uynbZxbbERPziMfM3A35oP/AlKg -pmnWwA8+zCbPMMYdJqEe5FzZhd47sV4Ny+L8D+HDn+UVDUOjaDdMQGDEgtbSti7zwj/3cDhQXZUU -xQkN4sk3yN8JIDLPc6qqyk16TIw8U6JHHc8CE+LyezJy7Yj6vqP740F5kcuFOn4i6li7cWdZNikZ -DyNujKe3ddF22iUu+e0ksA3Gd0JPh+BAbM2QjL2eDbeNih2S+FMAg3U+wcaCkxD+OxMVEnp/f9eR -GxY5UNayKChOYkoNmQXZ8RiVOeeWzsyPAw/wQT8/yMnLJ7YP6FgPOfsz7M/Ms0zNR20JZUt+mxOw -LCvTbI3Ec1036tfBePqtkmKTa4+njC/1xxOyVRjrRnLfL6bjkU/+4/FAbdt5GgqU9tDM29Qg9Oe4 -6Yoi10N8WZZPibTcVsSew+zzd8e/04RowW9QGjP+kSmyzfiDk+fiZ7j4q0XB3izLtSQHY9Fy/lEy -r+vFe+Z2LItJztA3VFUl/fz5RvM8eRfMo2m1VC6K3LtQMB57PB56mWGT2TbueDxSLhJoG9iJzQ/n -K0b+E801fKYbWwZf27aaLsXy6pCapnHkpm2nUSY5fzaVspUpAkO8oFNTUSrP49/+7X/ttlwA+GMf -CuvaY5NJv3txzsAB6rqiLE2p6wflpWNBY7HwREFy7CUSjMEcLl8fzUM2JGvukQ67rove8vdHo6AJ -3GWg/OM2Bv3Y6gGWIBjlYjRCtNP5zF7+X15fKYojOp/PT38/qZ7ejv+sjPdZOYnMeD8JNlLgatLS -0znWMOjZ6+ltF8myLHQ8HChOCuq7uwCo/GwYCXeR01nKzLdH81DvvudxJPwJYqGu+od7LFTcWemm -wGk4ZTjT5xxF7DoMwo2jGyeaSY9NwSXq5t3K0MzjgMLBAQMWPHOYsbDPIpxuQ61M+r4XvCNWXTzU -lPadYN26yyvSTEQ3/eqVVOZcsCNPeosqKc8zattenYdLSYVCL98ZAPhyuSoxDWnUzrI80F6dbcQz -xb3Q2o2iRIQewnomILAUtGabe8nfLTA+FqTfIwwjCn755V93WBKDJgo2ExHRx8eZ6rpSIosl7tg0 -2WmaqCoLJucMnc5U7/c7vby8aBjFx8eHot2WL+DP+WMxILnT7XYTP4JIZ7CX61VBv/v9Rn030OF4 -MCYZDLSN00wfHx90Op20UgD5Asq5UXzoUflAOsu5arPq4a3pJgt2Wu35rY2VjYDuupbGcRK56fbJ -Yssh0pEcnP2TQUhEl8uVqqr0BEaWdo0+1TrbIMyEiOj33/+gf/qnvyk5CDe7fX//t18sxHqnv/71 -L+wJKTRui5jbNbAYBB+f53K50svLUW91O33Bn4Nyzh7YuDXf3z/om8iH7Qx7WRbK0kTjuoFBOQLS -pH4Ir6+vHrHKkqAcxrJ4YR51XdEyL/T2/i6tl2+ECvu1rmuV+4AwXWRewOru+7dvOl5FVHmSJJKS -PX/y/cuLkqZxpPvjrn4FqLAsC9G+BxixgGiHdXq5XOh0OnmXlTuAYm4B3t/eKJVsMpgPnM9nDeZU -FNU47VgzyEI28zjNCgA1TcOMJQmGWDfedDDXKIpcdelAOVEKssVX5M3OcWv0MoLD5ACuNLDHGqXf -n4wVNT6nFeugFMd/R6Amxk3W/NKmxthN+8wBf+7DbAyU7W/tBkGVNCBqPHGjJSxQbHQAs70cFGma -0uPxEKZjIfTOzpt02IWCgxZqzqaZvLLRMvXsYYyk4yRZFPNwN3ggZi+Ntna+B97uTQKQP1GWpU4V -bArvuq4qJbbAMdolbII0TSmQdgSbKQjZtg4VFRyb933X1B0cCNy2MrYAsRUSqaMoomVetIKyORWP -x0P8MwKT75ApKw/Vm+3xB3GIRvoP9Aicc7B6beXt/lDTXBw41mkZbTSLh2LVWwAMZiWvc3aGR6TF -sKyALc7znL58/cre9dWBiDZajC8++i78n0tkHfXh32XMZvsQ2IxjxIhEFR7VMZj07MNuqaY46TC/ -tlruPwtCqKoDrctIwzip1TQCRz7eP+hwPEhkM4/Ftn2XwMxNOeiVGKPA1WjfN42WglYeNwRukQQ+ -+ZvLEwSinmUZ0U5UlaWSrWxLYvkVuqDGSauSHz9+Utu29PJy/GS2CtLJLIAbBFT25bqqKRHGIGMt -7x9npVNjjo7ZOHAfkHBmUarhpmq7XoVVfBjsEn02UF0fKEtTuj/unruwxWJ4Zl1oRj1u3kZav+Ph -SHGS6iSq7wfVAABvQBmMCDEr+0Zcl6sUZv09aZrS4VBrIrLNt0QQqnIdloXu95uyF/HvwVYEs5Kt -uXNaVk6XxgHlftbmAdb7zlHlaK8sxsEuz0RxnAtBaeU2a3N4x/1+k4kXsxE/Pj480NIBfrFHlLOV -GQ75LE15CoBZYhAkdLn80MXDXyb20mDwC+msz+aSDFqEyuqKQj/zD+O+KBo/AYvY3FEYSHTS6s1N -8zzTRYwFA9FD1z0kGvqiL4lfLttSBwHR8fiiopd5WWkxQNI8T4QoPHcohYpQYzQH0A09L4Ava6Ht -YsW5F4Wdta0C7Jjv2fMen72qKrVx6vqefvvtd6rEXz/Pc4qTlIhaZSV2XasjOTuHDqTPfXZggqkF -7N2tao0JNKui93bsicpwmp3xSVXVSu6JpSfGoW1pw5gKAPTVkl+4Cpx/1xhiFwfHcIu6acbDMi/0 -aBoF/lDio8VDqe/nJEbaimZZrmV1XdcKSFv77TTNxHbeYTxZlol/ZGQOBF7nUFzCWSswN7djxybq -WzgaUBCHI55nmrAOJgr5Gby9vYvsvdQ9ApesJOEwn/ePDzMFIs8l+HkUj2o6hpqKSSutxwfo+oH6 -flQjDKLUEyjAvAAWWrAnUinjNFM/9BSEpB/kuVKwozfoD9j+adITEwsJBhcoj+a5p9MpE9YbHyzI -u0NQBFEgJ2RJeV47Zx4htDg+PRMtkJVo6bjOHHN1dtdSCdn+EZsLzycIAjVOGcUsA9gATnGM7jC2 -tO1FXVe0rRuPvcZRb8+qLPjzz5PncXg8vnDUej945T9AWCu44sOWFziosGg9tm1S8wt2tEm118Yh -CAdi5zocSLXX6SjQGlDY4A3NOxB+AFKA1pW1DHbW3os8GRHy8OnD76nrWhOQ4BC975v6BfgGLrNx -Nx682PplXWgRoBlhsDrVkedptfjLslBdVdQPg1Yibvw5e20rcx9mNWqBzThGt5As88GaCTYwqRgJ -lQq8GlGxMIuXHZHjJFOw0K5FZhDuSmAbx0Gt6ZZlodiaOdhMus3w3bGpAayhtMHCg9oNp2cQhhSF -cNoJVOgCAOhZhWYR6mkalVQDFSK0zbOUmvgCnKle0Y8fP9iBtSgEe8gpLwJ6PFyJd7lc//+2vmxH -jmvZLnIeq6q7SUp6uv//M36zDRgwYPvcI4pkT1WZlfPkh4gVO3bxChDOla7YXZW5h4gVa6CiYLWa -jcdS8EyCOuE954DJwJhjpHpz7UIzBtvvEbxTmujMCyNNE+1tgfSmSayhIWgHcCAhn2EYB3p7+0lx -HNP5fKaqLKgoaxo/P9Trzoq3WOmXePx4NjKZvYUB5yEs1Edxihv9kurRgSTjszmMgAFMeD+iAovC -QP87fsaFRs/Ny2w2g3M3Yg67s3pXcs1+KNJ9u900VDQKA4oTdt5xNGa+9eFOBX0IqqxQvAOtbwR6 -fRsaY29S7AEen+YSP55QKBZtiDiDrgXPDyxUvqkTbSXBh0EliA3JHICAShnZYv05HIi9CcfJCeH6 -YWCZuOyZSnIo122lt9c3yvNchWogBKE1iANx4HlkN4HvPS8LVVIRpFlG08yxzXmeUZqk9CY9SJIk -HNUchmo6wBv7cEi3mZnD8++RocalUORSgLNU883tBIKVZCERceAjSmWo7sahlxBNdlzFS8GNbTct -qJywKHMhEZFWIIhHRyAKTxCcb2Ep7i+WXFPkOX1+fjrLL6FWJ0mibMFfr28q6+VEnENJVnyzOGQ9 -TfkQpP6uQJrlqC8r0XGsv4FBeCY+0SrWlm6SpBqAojjsl5VkbLkKsWVSMg7Ay2EYtZSGxRqAMPA5 -8P6tjySAVsSfoQTO85LmadDbVunMKYvWMLas65pOpzMNQy95FbNcDCkVRazSb0R3p2mqACaqLoyR -IfwBaGsNVNM00/gvHIZII5pNCMs8M4CM4A4w84qioNPpRJczq2UboffisM2yTIxuI/XpgxsRWlhc -ytu2USu8AJuP+Gimcr3x5GpZVqpPJzqdTlQWObVisQ5S377vFA/DQNM0id449man9odO86J9jQVY -EAi6H4dok39XH63rotxlawTBikOfugiDC8Q1P7rGQtEFO7FhYGJEIT0xAJo0y9Q0Y5pGXbgBBVp+ -WcYVnGQdKBd64zKb84by7DH7zbrKsCPtrJ83DDez+FeaRo504lsx09ElUaojHQipoPzDAl4kbAUm -LZimuECI1cv9c24zkUegQdUXBAG9vb3Tly/PVNcV38rr7x72PO7iXvnnz1+q259nh4TjZum6nsZo -0mw9EMBg5x5FvtstiGdddzc3XqiGl9j4jq3HDjcuLcrP4mvbRpV+HDsWSas3eGI3IO0WPMWNjtKd -jU8Pz5cAVQW4C5huVdWFjmNVv0z9XXFMi5CycLjhUA7CkA46TCsc6Wd/NM6F+IczKHn+//iejoPE -xi9XA9x5GtTOzhqhxDChYPeYnsZxUjolHHGwqGyFYI03gjCkPMmIqFfE1sZEn89nimMyllqrOtHY -AwNmpGAtQW+NESNKniBgZxxWfi16esIOaxhHHb1gYeIEtR6BKDvxO/FSgOTGcaSpRQgOQRvwSDCy -M3wVf8jPg3iKk5acFTZosHmWURTHdGsax4/30n0iapqeNvkeeA9vb+/0x7evv4V52u+WiveCCqmE -oDIMvd7YYRjS0xPHZmeZ88e3laCCWduq5TyYdKBaR2GgJqN45nGcKE183ze5jRMJMXHuR0kceQck -t4srTfNEURxq6cqBLVyNdV2vFFxQxyGUQYXiOC4HHcfsKT+jMKJ9nzwg1ordLA3a5gvadiaKInp9 -fWWuSBjQugyi95+FRu8SltEOaZstrtZdd6eyrLyQGRxMjyxFF6zKgh8kOjvQm9SgpKpKut0a6ro7 -9X1PZcm+EPfdTbbi4yC6nE+UF6Xw7EN1IeXbwW8NsEFsvziOkz60MAzp+/fv9PR0UXUe5tthGNFB -h3eYzMq35/4S7r74kvCIH4bRpPG6+S9uufu9pePINEyirvnkcyzDSEhKn6r+Au0TM3SXWsz/++vX -By3LSqVUR2wK4Y9UUDrbxGO40yzmZLa6eZTJQVCoicq96/SgtaSjpmk1tAMvzY1zmJyDTWhRd9wa -wzgSBSSjxYySJFUJLjQU9iYOgtjLGcD3YUBuoG3jkExgR3EU0RZt+r6gznNBqKsy9IIg8SYC+D3W -UxFzeDD+cCNic6r3QBhSGB7KzMM7ZTJbSPseeenKj8IjmHuijHbpTqtwK0JRA4Ye3XxZFmGPFtxy -bquOrcdpVkNa58UXK72aPSAz41SVCVg+6edjNyk3draXDExFrKCL7fU3SpJCVbho/eBIvG2bp46E -bfy27RRC5z5N3G8WwmhC+YEZqi0zlESgZZQLTCQiulwu9Pz0ROfzxZtHTyIOefQLxGjJOgPjxufo -p83zKcAhBB4AWFg4kYsi57FUWTg0dz9ongbPYAOsP2u4gb9Z6JIqeISDoipLURt2+kCHoVc6Lls/ -zaaCCvU5OtZW5H33LHWuuwDmEPMM8BATlzhyM+myrDgsRW4P+zMBMMFBBxvUxmRlKWsMMmHojeNI -TfPp2YBx2d6KsGfyTGHHaabrraFlYaS6aVtPiHS93pRKjBYGEWrTPOsYEO/VypLDB1DVJRhPWl7j -f9HT42LhXt0J2oBZIJLNHsbOGizWOX6eZ1SWlYC0TjHIDEM2q4Xv4jwvdDqd6Hw+06mu9Oej9QJz -8v3jXSYdktAklXUcR0KM44wCDRM1hjDOWIQrnziKDY6yUFXVVNcVRUK6G4aB+r5TkhF+zjRNdL01 -1PcDdd2ddTccxcVjB6voAoPKItQWcQbfGL39cTCqPI4TnU41ZXlBYZi7xe85szr6L9/QMZVFQeu6 -sGhCWgTnXLMakUWsPgPguGOysO87lQVbOWVZSlGceL9vWXbtN7M0UXZYUTDwtCxuHAZuxDRx7hw7 -s7CxCXr8ssg1Ex4jnba9C+Ox1s8OH3Z2Oc4VRQedFCWvTY3FYscBDbYXRk7gYrRtS9+//0MvLy/a -N6JPdovQhXPEiaPiBmHIvaEAVugvozAimri9slz8OGbqc12V9Pr2rmlOiUwz3CTCiaw4GIQR7Vla -A2s6Yr0Z8J6YGbl5BBqwH3GgYgJlDzwNTJX5d5axYxDkxJZ1aNci+zdEoptI1Kuf28BE3xc8Fooi -p7KsPE5H13UabedlC+674hCoVrdtU0dmV0nePHPSXYhBu/z5aRo1OgwTBFR1cRxJroCLbUuSRMag -yYPYyxnmlkVBMQgFlheOB4HFA6ME67RikXu1IpKc9zzPaRoH6voP6rpOiSsOLMMEINY8OSTvuJ5t -9/ps3KDOwivxePAurWhX4Qq//FhZiy5HkNF0lwPX6yzcGjWGQUA/fnynaRrYrWY/9MYoipLSLKNt -d/7xbMyQ6CK3C7uuK7XEQqqy9XnHS8mFiuwCPnjisAQO2OO0nkxn+7zouF2a58HDM2ye3cfnp+oa -MHfn22RRMtQwkOFAREJIKimU70BEFCeZ4kSI3MbixqQIU4tCJkQYQ1r672OOvcVgrPsv9BUYpx77 -Tu298xY1Pzvpj4UghYg1cEQsyDcJRgTq8mFakyAgZT9yRFikF50r1Tttu6y67v39nc7nM9VVRes6 -qd8mgljSjNtZ66tgGaKguccRtzwANyHqgmYCOAT2FVpISwCLBd9yFvkOP2IwN6O4vXeeyyuAKQuO -hWr8kHr6d3f7Hyr2ONU1pRKJhDKe04UTRZatPhkgCYglruRDT9pT09wUCziO+DdvPTj4zvMikwHe -lFikAArRq6VpQm3b6s9M00ymCTvd7634zaVizBmKZ35BvTDAmOHHefWsREvF+7+X6qOk4+CoNLDG -cBLHSaolO0pstFBpyuIQFaRUFW3r5nEl8L2qqqQkySgMRBeQFYzhjKMyAkHlthUXHzopvb290bbt -dDrVv01hrFVYIoQujBXTNKUoZD386VQrW049BYSIYo1F7Vh4ErbeOB6/aSegILVcen5H3KrlGdNf -V3FvQvvHMWoHrRtbhY1j77nkgmgF5p016USM3LJuEjYKnUhsotY3r2W1LWnTNAKGsuX96XSSkNDY -0yLANGRe+FmschHaKZgble4URbz2kpirsn3P5QBhsR1MSvFMxn1SXIt1DqRRcI8GIYgUvzUNxegx -YJ0FExAswnmedP7+aCxoT2vt07aVhtuovQs70hQUJynduzfjAehYUdDOW8Tz/e2dnp6fKIpilVle -zidaxfcMC2UcRxNX3eq/54Ua0LatVJYnj/xgJc5wH8JEIsuYNFGWJc0zT0SYaZXQ0feejhtlOHp9 -jpFmk8q+l7wF4/bLQphWUe80K+jYVxWMoLy1Tkr90NNz/uwZVqL3DCjQQxXjM4ww8TzhqrSsDASl -SUyx3NZ1XVNRcHuDUjPLElVKgq2XZplWhOM4anoO99+9d4PNi2/hbf/q+06TeSzCrTPu9k77vqml -GqPou7YWy7J4IiEEguJnWYYd9CrL4kxKbrebRKVBP0GaYoSR6zwvRGYM+7jmXfpxJKlVhW72XpKv -mCjE5ChImq1234agAqex1Glen7AG6ymBlmMNaT96WhaXZN2JfBnVK8aMID3Bmg/mLcBjlpVl18H/ -/t///eBEmEFv8TTlLDmejfsSTGeuseupzV/OIcagI1p+/OfnBxEd4sUWeiIJTBss57zvB/EXyKjr -O539juMkXOvFhEnC0nuRwBCWiVZVKSmts/RKsVYu3A7EVOQF3Zqb6sjneaJKhDIcShnQz5+vdDpV -Oi0AQDqOA0URS0cTCQJF69APo/q3z8uitwhcjQCGOTuqWG2roigUjr47tDBKA9sLfx4oOI9fQwX5 -KnFr7rq76sFxOKCsrqqS0jSl6/VKURTRzx8/6fL0RE+Xi1pXQfuPnh5MQ6UFRzEN4uX3//7fv+jp -6aIb7NEDAii4ajHWxbO9AuBs/xv4HhAd9Pff36mu2SbbEccCr120Gw0tZRhGAq5yqGlVVupDYac0 -TEmePJcjYDVgrfJEIyGiQyLCYzrVJ07nUV0FG5DkWUqf15t6Rtpy/9FvwsfUdk8qjyph21bde/he -APeOY5d2eudE6jihYRxkJBs7Y1QJlQFuE7y///uwNtzWZ7zIc/r56xfVdU1Z6sQL+BIofzGbtHpu -nO6fn5/08vKiWMDpdKZlmbxZMxHR6+sbPT2dPX/8p6cLNU1PRJvHwXZe6k55V5WFfr48y6i931Wc -xL2jC2aEDZl62MumA8BmqZzfv/9DZVnQy8sLVWVBd1EM2Tipqio9x1f0fHmW0q9fr1RIK2JFGdAL -4LZ/zFxAFfPvf/+bXl5e1JAFno12BAknXPTCoCmv60avr2/0119/eqnEaIlwQKHtQIhFVdV0vX5S -GIZ0u93o+flZD2YWPpEHAONz3243qutaOfJd19H1eqNv377qhq3KQqWz+MzwGsBzq6uSjoPo1jTU -ti29vLzQsizUdXe6XJ7odDpT2zb6XaHJtyM/OAsNw0B//vmHrrc0iSkvSmqaxhu5ProeAdv4+fMn -ffv2TfwFGDDGhAVtSBAEur4zGc1htHi9Xunr169cwaybly6Nzw/WKNOpBy9/4fPzSs/PT1QWuTgO -bwpiWtWhdXcGc7nZ1KwAACAASURBVHYSP4tv375SHMXawkLAtm3iCWhVYvwhZ411Wk1+nP3A1tQS -vTMCN5h1l3p9K2f7ZWKSMHsedlEUiRd6SXle0sfHmzin9HS9MtXYWY3vdL8Pehti0YyC9t7vrfbT -qu2Wf4b+YNtjJajg4X1+fiqFld15enV94Ujrs/jhtbrRQGiJk4zmafCYjeu60n1d6e39nb7KwmG6 -qJsDp2nqub5YeTSAoKqqFRyK40gi3H1cAHHPCBCFwGcSyy0bwwaSkA0kxYK8XCQ6K+LvcL1eNS0K -ZS8mRpb3gfbkcmGn3Syv6CDnZov3kKapbHQ7n3dlPPwgPj5nLVVZjAP6r/j5RYnO/XEJ2FQquyHa -tqW6rrXl5Pfe6YUHgI9xmEXFNQcdxpk4Vh4A8iLw+6zEFuNmm8cQBE7gNi+rYim2QsYzsjRyq5jc -910PSFQFsB2zlzJXgIkGw+J9D8OoLQurHytto2NsbivSYBDDBTrYTYQP6rwAJ47lkrLPkkBshgD6 -7kcLcn2wgpBD8IAS0k0mNp1KQKr5GCqZxBFVVa1l8+12o2EY6du3r96isFhAksQ62y7Lig+pMNID -AOypfd/oev3wDCtd1l2nZZ0FYngMVqjfPg7bJInV+51LsU3BLGvNFga8KJ+eLpqPCEospi82Bhtz -cfgJpCnzGDAFwc2Im8tmyjMzsOJsyLWXQ7miMIxkHDorJZfTckiNQbG54Q0ZBJ9iEsMb+eX5mUNE -s4L2vdG1g3J2Fo99EIZ6b5w1Ul3XrLYTlRwcdaxRS5HntAnibx2pi4J1FiBcIbClbe/0n//5b/rr -rz91ps8WWruyOhfj5KymKcaAExMNGKnkWUbrZuzm05TWZaVdSEeWcpwmsWesYqPO4CKNyZvv8OuE -QYGOyRexVgs8+jrwGkzpMEJEZFsYhhSjjED0lE1htWmsTredKUVXUcv9UI+5IIyJiOef4Jnb+CSM -JWwqDk7Pddvo7f0f7dWRac/jjoziKJKXz1OLqixVgIPPYYGlLMsEJMxVEosMA/egdjE/Sekk8WZt -29DpVCvXehhH6t479YmzYZko2UFA4hLL6uc5XwC25VmaErIYenE+yjJOk8G4y96czlO/oziKPTah -deWxwKaaski2H1oaqxm3IyE+tEa9OSx6Tgepdt7y7i27zrYuYMiF8lnb9i5S5ROFIZfK0A/EcUJV -VeqFA/CZBTKFqulYb8+3aD8MCnRhIjULqciCYxY0PYjn97emoSiK6O3tncIwpK9fv9DLyzMVRSkA -YaKALo+TU8/W3kXIxXpwWf3BIiAcRuLwqQRmZEeRdjPbS27bNvof/+f/0rdvX9Vnomlu0mrWjigl -ZimogJhvM6utH8am8PTAGHFZVpVTp2nK2YA4kcbJpfKwtJPdU97f3qkoXR+NRYMHDS963GD2xPrX -v/6TSF4A3xKx3jqgAXOJn1NAriqwtl4oV4/YF0Z8Xq88AxcKJE48/myL/t9xFNFMi24QOABhfDnP -E1VVTfd7Sx8fHxTHMV0uF15g0yzxZ4mCKM4Hzy066+uvVE2xbGKLp5nyjDd/1/fqVHscB318fKrL -kHW5VZWf8CZA0HosdSHDXlaeLgAMi+NE59BZmqpmHNUeo9S7cAkqnVNjbMdt4EBt2/5mjwbQCuNi -+NGx/VZvWImhHpp933n07eMgYbxFHvfeXkZsgTZCkaaXCP4CWcpSobHxYO46jhNdrze9lc/nM3Mz -qpLipCaiXScFqAQY0HbBLPf73QPDkbBk2bGgzWOS8RhGg7W877tOS+y/w2Hy/PxEZVnSqa6o70cq -y1wFRwhmcQ7XqY7Y55mt6kFk4vfBz/gq1nHA62A3HmP0MRn/du7vkVIbS6+fa4QYghb4YezKInyM -IGLN9pkulycvlcQZZ7SevBQZhCAyYJEDgNn31FuEzkfAtRUw0ET1wWKWXeWtQeCIJSidrC4AhB2U -lNM8U32qlT8Q2FSgB+WjjYnG3Bf0W+Ark+jfmdXFt+g8zWaaQl4CEJfakTHdWD2gENXHsrpMRatM -JAoUz/n+zz8S5ZZ7ixeTG0x77XdCdXi9XtXM1foL2nHbSZKIQYW2N1wYMAiGA4CJMsvDBgG4OosT -b/SbSak6Egkaz6M45mns+2Y8KTt1YrbtZp5nSvqZ5pne3v+lqUfYHCBQsQ/hQHeR0drR6mP7CVGS -DVnBO7cXosXTgiCgv//+m6qqpPP5os/q69cvEj9fUBT9YjlyGFKWlRTQoCpFG2uGUh8t7LZvimts -++EpQ5lZuVCWha4CsNn0Lss+pDRLmR4peXe4RZd18ySRlvkGeSj03HzSFtR1NwqDgNaVb6i6Psl4 -r5RxFUkLsj+QL1zv5IwznMsu3GIgcOgEqYdy0Oapg/GHMs2ewkWeUyN+8IUsdOsptywrte1dyzCo -sIDGW2AH5hDsBFRoIAgQ+HnmCco0TZRLdPnlcqFefN+tTz/EWbFEioGZaf3dePPExjuukUxFJ5nF -5o/jiMkvpgqxhqO4Ce0ti3/Xi+koi7YC9a2HytEFnbBasRffPBcswpuFw2D4d5wk6Rjy7UdpLlKl -USlAHTrNzsPgoEPz+o7joPP5TOfTiW5NqwdAksT0+XnVZGKYjsDNB7N7PmRjPYD1XQjoZs1b23un -XpM2zyI0Phv0QPqxCcvY/OfzRaXtmKiEYauHT57nys3AvlK14upGtbC5By6DyxpEJQi2gLXEWZqq -h5nNcsOCf3v7oD///EMcf1tPcYZkFOtAa/nMrZgfjNNMwczIdCPZdJaX3baNQeozFchM8mfw4ACc -PPadLodg15sRC/Z+v3sJP1B0wcTExm9v+6YYx+vbqwKbIGqg14R2wRI80HehysFMFlLcRwkytASB -tFMQBDHKvAi70bkxz4LkgrOOhB/LeHO/gwG8oshp30yyjABM4Hw8ehRqrqIw51DSMz8+V+IN0pPn -ZdaWgkfFKYURO/MilmyWePXZyLnB7QcgtawrJWozxu5PLtwycGi6Uck5F6FUpyPWYHXbNn3vbhOu -GiDrvP1zqsqCcyTENxHOPbYsR+KujQkfxS8Q7S3W4HEQLQbRV6cp46gN23Iea9YURTmta+MxcvE5 -wKS9Na2H0aEqdVqHVQ+sLE1pkfYJdu6oQNEKxXFM8b3rOQVlmqkoc6qqTG9ULi9Db8RidedsP1So -Xxx6wzzPKQoDGqS04kTXRUgkqY6r1nWjJI7o3rFhBwdScH/TSM8CbQB8/B6ttW3bYTPXCtUe+Hn2 -t+uNcgHr0LOhVEVp23Ud1XVFdVXpuAkvclkWPf0dAzBQsBElOsp+8A7w8tI003y8/TioSF1w5M+f -P8UpiA+2pmno+9/fKQwDqqpaS3ubCoSFtxrK8DwvYjmW0pTM+jmiiG9+DphIaVlmWpbNG0FadeJm -WGZRFLJQaxglrjukVWbWPOLlpJ9gD83CJ3E/qigMejURtZmDwG/Azcfmx/dwFuIsOmJZ+K5YCEJY -u67TC8k5Py0yanZGrnDKzSRDIAhYbMUHX/Ygvd7ZkUret2JKhqOPgA+sH7w7VMTruqiXhJ2+uJ8V -0/v7B23bq6nmAv3v1f4uLyh7YOQis9BWyzCKiZOY7pJdgRE4522GCgofx8FjwDAM6cvXL5TnmeAB -s56A+MJMtV29OeRxHPTr9ZWCIFRDBDjg4sTHl3h9fZOk1Fxvma7r9RRPZMM8BiU4RVuifaTVjj+C -KBo2Mc80DL1SMQE8FmVO5/NFFYC+c5FT4IUhU3WzDJmGkRp8MMtq1AMHBwhKNCua6rqBKiECoSVA -BXIc7FNvxRoA9MZJTC9PJ7pcLuq79xjOmogRxjx3npoOXnFt29LlcvHsp5kSmlJVltRJfDgOkTAM -qWlbYQCGgmG4DMh1XTQDwKYmb1vvJf5Yq+1xcJvfG3mJm667JSMdxYHIggWLtYl3A54A/qqqSvGf -2bQGOMzwrgA+jtMsAHEsz3VRth8OaMV2draQt5gTnhUqMvAiQLCxawBGJgBMyyLXKQ0qA6xxPGdU -vVmWeWG3CBMdhl7Hm0gl9rUlm+4zGwuG548DMt73XdlfUZTQtt00rRQvGKVmmqZKmOGRREzrmggS -mSqohmRdAA77tip9E4w7ZNLB2PIxFcdyyW2K774vv3HM7WGg8+QopjVJKY5nz2gCNymHLDqXWGd0 -QvT8/Ex1VVIQRDQOHdWnkyrK4jhWXzccFhAMZWnKvahQQoG2OpZbRGlSUdcPdD6dRHU2a2mapqmG -cIxCX07ihKrqhY5jou4Nt0QmLsK70JVD7VPRCwKQGganlbDPF0Bdoc7Om1Y4cNjBrW5BTlilJXFE -b+8fSpu1QhMLjMExynrtIXVp2zaD7PPIUHMnZheznSQxRWFE09SqToDjy2c1kMUF8ei4M4ycCAz1 -XFUWmrwzjKMe5FEU0e12U3csSyleloXWh5GvDVyxQp7HDEUVI4mwat83HRVy67poS5gmKW3R5mlT -+BKGocimDk1Jknp5g6pHMBHsblK16J9xsWF8WMfcw3Be2aNDadM0NE2zoLspWfswmGAi4y+MYrq+ -vzunmNipCT+vVzqfznTvOkkLcg8NFMpH73L7gK1zrn3Qj2myTnTSC6U3+y0O3IomfG8D598Odl4Q -DDQLZmAz6LEQkB+Pg22R8YxllzkwkgHIQ1qkMIoV9MH3QDUx6UtNaJo6Wpe7OM3wYQtlG9RmeZ7R -7XYTzkTuRWjZeG8sTotgYxSIhQljFZT2i6Qrw7sBBwBwF7xvkFpsdegyFObfbMtsJeMqIMeCRKIN -8KIwWKRS5IkHfr8TE+00iM14ksSerZfFOIIwZLMMQ1IDSQp/g86L99Y0N61EoaWAyhOHnwWn7azf -AtlN2+h48DcG7rLoJcgYD8lId5e15Axxrb3XGm5egjGP8Fm+Po4j9eJQhAtcSWbIWuQxXKakGw0B -kd6BU2gcyy/Pc93w7+//iOX0pLfdtm207Qct40jjOEpUU0VpOomRwayBFDiFoOizmxi0XBf66eiR -PK2IdIPbzWytxJIkYWab4cGP0gNDQ7+oNn3WcSfKNxxgNgIrNESj1LjfwoYZAhIAjuM40eVCHtDH -VNre24w4LDCPtmM/yF3RBycJb7jX1zeqqsJ4GMaatoNnWFWlptgCFIM4ZTMAIdB3KP76vpf+daTL -5aKlN54L9+aFWlAfx+IRXbDZVzMGw/uGMo2RdTY6wVQGRi2w39YQTYTBhiEROUdirDvngRjLtGDR -NsNiRiA04bPa9hDlcpYXRvLOJh8go7H3AZuClobJiXVqI7vt2NDlMkZqeMttNa99+xmxYXtxXLbt -G+T68DqwbTqeR1mWdD6dNLELFQ00I7gUyrKkkG/WneYH/7FRMvieLhcqS+YOY7w2zTO1baObua5r -BXuqqhRE1821QdYpxbffzolh713KQ3BEGNKe2lIvnSGj89W3KDj+7yzL1BHlkXBhbblA+LBmFBDy -pEmqYy/9TMame5xmuned/v329qalNzYa+/AlSm758fOnRIJvnmgKwJiN7LKkKjybdd20pShLphl3 -Hcdd11VJiQA8YRjSx8cn3W4NzctKt6ZR5B+3jD0Um6bRCPF5npSeDWYfgDT+m3vusiwpjBhsslbX -EKV0Xady3kdTCjz/QZKi7EjLXir7vqkFO+zW/Ci21XvH87JqWxmGoSL39nc/Ol7j+cNSbltXyjLH -OeFJQakHBFSNZVlSWZ689kixjQeG377vwlfIlZugbEsjifbt2zdlkjofwFRp5KnoSiwvA8rIdV3o -fDqpjV1iplFoFe/3lnMBxnFUauZirKynaaT7vaeyKr2SBh+0rkt6eXmhPD9RnjlXnXmZxdEkliSa -TBxYXW9WFM59lo0qd40Lt0QX6/6DTYh+moUxTqtgnVt5PDjQMA6UZqmhJKfqcrNvu5bA1oxyWVZq -hWwBJPfR2PMxf4+pwKUSpiDA4JIylZAKlrdipIkcQ/ToOtcPA0ozDh3BgrdTGJvwU+Q5hV++MMAW -J/T+/v5bv2+/OyK00Kei7dDKYuJ5++V8oqKsaVs3ipNYgGEXd87Pg2hZJq+qAE9CDV5ltLl4QBb3 -7GVZ6cFjW4RlWagsCzqdamrbuyf4sfbctr2xUnW0cEVRGAntpvN4IPgWNINRa9+ztyHwK7zbeZlp -7hbvUEjThLZ1ol+/XqmqCsUnAjMxAhHLXkKoWC1ZKhGbL0w2fv78pYdMILd3lmV0v7dU1yfFN/DM -hmH0pij7cQiYuysZCOsAI+yyLCn417/+15Ek7BCDU69tG0nKCYWbnWrmuu3PX1/f6evXF7pcLnS7 -3Uw806ia8eMg8a/nLHXOd2NjgqZphGKZiNhlorZtqKpqtbsiCrS0wkz+cXEHAWff4UDRYE6jpsLN -1zQ3Ksta/PxWQeo75eq7oIhZDCAzqXBSvdFA6EEmve/LHghANWoJj1IbpV9VVpSkCTUNG2py+Emq -oaaYEwNxxjODdh757vaw4/FPTU3zqRr+deXnUFU1NQ0TYNIkoRmegPJ7cEilWU77tlF7b6nIcwl5 -uaumH4SsRIhEvrEHa/YXcWcCVlAUBc3TSF3fayISPCbyPJOJQqTto7thU9UD3JrWodmHSdK9XSlN -cy2h4S+wCKclw+zbBNlaXwQ4RrvJT6imouw+RZqpaKPD4f2AdYNqDCW9k65v+iwcOBd5uAc4+phw -MKmOE5Q5s7Ck9t6KYW/heR9iogReCE9ddiXrgcrs2mheEywVF2zn8/P7gRIJuWNdP2jKz48fP+k/ -/uM/NFrZlXo8f0UsN+yQbeABEdHb2xsbVsYs5BmGgZ1yhEuNOXuepdLr7mqc2TQ36ntW8zHldPRK -MDv2A9KJHh4n7sfHB10uF42tmqZRxoC58sOBjMJCjBVlk3rZ/fXnH3pyW8qtFYqAATYb26l5nqhp -eAyH/xbuNhy1PmvcM1tntapmBIjVNA09PT1pZWJRZ8ufh5/gXbzy8S5ut4b++vMPmTYsKnXGiAit -B4g/ViQ0zzO1bUtfvnzxVJCWc28Ze9aunAFe5pg8PT0p2ImLoet6VRAOQ69aCw2Jjfnz/f39Hzqf -z55IB2sQm6quKlrWVTUJSBbO0pT+/fffVNeV9t7o1+GrYFWrNhUpzRgX++fHLzqfT78Fg1i8pq5K -imTk+ePHP1QUpZOE3zv649sXJePY32ezFp2IyJHTTnVFTesCUKE2ZE5/rp4GzpfAjbJxob2+vqmf -gyOEOVfhGKDDtm3iRNqzt5wxO5jnSUt4II1gE+VZSqtBP7XHDgPVJH9+fmjceJLE5kEsiiK7Pp8d -V9/eXtX5BP0Reqwsi7zejcMeJ0XpwYDbBDzkci5TeWhpAEeUkTi1Me4rCgbPgiD6zc4coKELkti9 -eKvjIKXtwixUrZxl/AjGm4vmmtmL0JCMLLMSI7txmoQWmygzEtyD/uH9oEpg2u9ivPVJKx+n/yBv -kdhxlhMcpeoUZPv2x7+4QuKQ0Ka5sW+CMDzBOrXPEm2eNRuZ5oX6YdQpkfWMHMdR3nNBeZZRmhU0 -zTe9TNBeMfGHAUJu59xoGxx9zPOtFn+cZrXB27ZVy2goLnGQvb6+0bdvX6VVaVVDY4NPEK2G9ovb -7FUt0raNS3Ec2EWeS/IUsLY7PT1dZD1t4ma16uewADUuB7gRpVlGkdjIW+k0fCvWdaGYxRS5IrZK -4BDTS5TDdryBnhlc6I/3DyHYnHS+30pc1TTNdLmcdU7e97364eG2BEkkFals0zR0HJwvMM+Lx9G2 -OXF6cOEWE0okZJIs2ZzUGAN8b/TjCHkMQy5pkZSst91x0DyNNE2jotZWZrptm0ZeYTHhVoLs1UWr -zXqADkOvpaNjDvIGgGssDlOmj6Z0HKmWlFFU6gFrWyELbOG2tMAn6/idKevpdBIKdqKzZ2vLZkdV -mHIAL3I5DoHSU53VO0tp6zoiokC56VB46uUh2BC0/mlWqBORH0Weqi4jSVJFtaFpgBgNhwm48Tjc -mVCT6yGGQJD7/a6HE2c7zFTXleIN+77T9XpVroPTMvBGf3l5Fk2EH93FRrWzZhOg1ZpnoihiIPbX -r1dKU/YnZKl7LI4/LseBD7xdyVbWkGdZFnp/e6eqrkT2PnkYwxiGdO86iQPLdbRvI+yDIKQ4z1Iv -IsnO8ZmVF/w2RwfqiNOnrEpB+nMta/p+01OaUfuEEjGo2I+Djn3VPtrO0tMkpXvXyedIdT6KUmdd -V1oE9MFLh/Amz1IKVEu/6yQCaKol/Gh+fBjqGApjtjRJJXpsUStw0FanaVZGGyih+76YYNNUk3z3 -faddyBu2XOeflXuGGnjh29Z7ElN4FeLQ6aWXtgeVA4L4YMHz4MpnNWm3iW5wtFMuU3FURR4qhyzL -qOs6SuJIS1iLIjtptRv1ITUHLLYiL5Q6vK0rdX3vjT4P0y7O0+BVPCBmuUM6UFEViDMcStLpGPQx -Is2G027bpoYdcKPidRLpGLGuKmXWRVEkk61Kq595nsWVueZItyikMMyJqDEOVNb9OvRuYBzYdc3K -SvbIJJrGQWXCMESB8aodo1oOTFGygS0o9NYZyI2TI2370HJhUpFlKcUs1Fm8mK5RblfL8LJkh0dZ -LysCU6V8Wgrv/d5JuRsryLWuG8XRrlRRxgImRZaxAcZpoo+PD3p+ftYHCPEDFg1CK5OEI84XOQkR -OFLkuUSUiY7fjpyW2SOj4AXdmkZNFqMw0N8JNSRuwONIaJwm+v79u9hhEX18XOmPP75x3yiA0uPt -zOUwp/ygekDqjHU6enSASWJmN1pCE8pAjMPYhShXXMP6KIL8YQkyy7oqAcWCV0CxEc2N6gcHTxxH -FEeR59IL5B1KQbgKv76+6RqxvTZm4zbfAd/NBliyUO3wLOqDIFDKMucCxppuZCvVR3n6OK66NmEY -EwSk+QBpVtC6zDTPg4yTU91UCCvZ953WZaaDDrreGoqiTg9o6zcB3MNpN3iKhTDeQhylYWNncQZM -SpgIxZWP88JcJWviJNoRomluFKhkqjRPupZ50e9grflB3Irt6cSoZqxEFKi2ONEmMydMpP2W08Bv -enBkqQMymJQReSAZTDjSNPPUc2CfoZSE/TUWSRAEFAqwBztrTBSQ/ooTU4lMyyoz5UxPSvTnuIUt -pRNtSZKACbfR+XwWgDTUchKfdV2Z5lzXtTxo0pIMOXNPT096wFpLbYij8NmtmxECSGwGAqYhRMR+ -DCYmzfrEp1lG8zRpm+EmIpFx3s31fWh0m4nItmIe4AbsYZBoFWQJP4+RcVVVUd93NI4DhWHpaeYt -M9HejPguavstt7pyBoZBo7tCY6sFzCkMIxr1e84acWc3DVpI8P3RdlZVSW17p667/3ZjL8tC7X1X -kByA5CjOzS4H0SUWofLcNheuyhLfSMM8EHdu9xVufvBHoMewB5qVFg9D702leHKV6++Ik0jbAxYH -pT5lGSw5cI6rqqKnp2edq1pyilM4uX7EppyCxpmawwKuuXle0iH9C8c8hR4wUZWFzvZRaXCZnmgS -LYgiEFDg38ei08ZcFKdgmibU9R1rzfteuOOrAnqQBicmGNJy6sMHggqyBfd9E1xho2XhkpBLuovm -xF0uz3oT2ufECzDREnieZ+qHUaKkNr0peAOk+hz6vhdmGN+4uHnZ93DQA3IRDGRe/HIbh8ayLHS/ -t8L5X9QYNZW2D7fYJHwATkYelRAFsOu/0m1gEa/rStfrVSOsy7Lk9xuZSYjhqD+yIYeh98gxOLQQ -7ILRIAhIifhTAOxkGbojYqkhi3j8TUKIAqDIepVdKw/3mfz8SgbO+EJ5e/9Qhqm9RCzBJwzZoj7P -Uh1Xw94e7wAg9qOxzDTNGvtupxNgZGIq13U93e93r2UBw3IYRnp7+xCrsEPp6RhFSpUcm4z2TBYn -eaix5sXJKQwars1qs9Fc9oOjOljXXoI6NpdXHwYUpImJP549WaU7sRO1ZkKflWWZhH8ShVFM69oa -B5ud4jjVXLYkYQusQ4JG8cDxHRe5PVG1gMbJ/7wLn91l8l2vDVVVocSLYRjo169X73lgXux6N1I3 -HeAr+C4wMsEpfsifR99urcOtRgKHHWK6kXZk+2huWWYjMOK+sCxy7wazYirc/FmW0SBEKbxvfB47 -jnx07LE0bphyMmOw8Zx4QYLC4YHPUhSlphp9fn7K2DihfXeUbfT7XdfpM8Dti7WYiogGDj/47BZj -yfNcM/jc4RTpmBAHHDvz9vrf4L/DLYznjnXUNDdhs85KwsH6jcX4dp5nqqrKk3hzS7wRUexNWqwZ -L9oMawYTx0wgi9KEp290mPcZelmNDISOTNxD2cimi/ylwdUuipzyLOcbYBh0XssjsszrF1HitG2r -1cM0TTSOg4pvptkFP5RlSWlW6FgDMmA+/UatPoIg1NOdJwxOPIFRDYNfkcye78pIXCR4g91PYwWV -0D+jX06k3QFq/PHxqYcElHbor+OYg0Cen57odDpp5XM6nQxhJpCgiEk2ys6eeRJGse2bZzGls2/p -8+yEgIhfHCTF1hEYYNLlfOIKS54NKgybneduIf6suYw5MRkJ5TC53+/08+cvJ4CKYhPQGooV1eGx -Am1kvOO9r1qdzcus6wKINhZ/VZVqK4bZOqoVsAWLIqdURqaW7wFpM/wmdjF0OdU1nU8n2YybquhQ -eSQPZJyqYu8HxVpEigx3pv8qHRttACcrJ14qMkbWvCZcajEOiXXb6HSqmU4tCD0OeTBjXRQ8c2VQ -mSgNXRizwLjw89HbQxdgE4rBpIUmJMsyHgN2vZ+qYscZhyxAuLKodxv5fGosSkRl3W43ZVVZtR6Y -TFEU0TwN6tRrx4sQ8uTCfrMIqA1zwIO1M1xNYZX+HV++63pDe3W9JQQ6+P3sU5jTqa5EfrzpiYub -Ms9zyeILFCzFS0jTlMoiV0IONjQcl+I4oYACPXRYMDTqjb9tm5pqsrxzoLqedKPBv46TgCL1KeSw -h1SrBoxWkVqoDgAAEPFJREFUXR+feIfs7XbTfjqKQmX2resqHHfWdEzzRFmemeiw3AMg8ZxRNdn8 -gff3d5ombpHs+NQKXtCPL7LxjiNzgjKJ3srzkkE3xXZ4zq523DmHl3IGAIPH2to+AKrLg6MU/ndd -FzV0gZ4fVZB1XQI+g+/Qdb1n88VTnZAPlbo2TkjO8yCgQOS9s25G9gdwLZ9zH950QmUPIWzsg1w6 -9uP3Qpl/v3N1fD5flHWo6+nz80p1XdH5fFKiBX7gNI2qVoLUFPReOw5Tb7fTibI0pSTN9IF197um -7yA8JI4LNf94PESs0o7LaZ9+jJkqUHocAPaUQ0rtfozq5Au/OLDAdpnbr+uinwN+fWVZUV6U1Lat -aPWdkg0HwTj2KrtN4oiOfVX7q3vXa6kKYUaSpGrueJBTsqE8tWM9d1BGakXOz8LlKdpIcfamb70M -QiQsYz4/yA0CQo0zqiAhnjjM5nSqKc9LJQvB9xE9KEpjZMzZigDeAvf7XUtlTJbwHVEJ7CblFyQX -JgMluhn2fVOpum0pt23UVoRj6UcFmm2KtA3HdF4JE93vnY6oIewaJeT0x4+flCQxffnyhXYjT8fv -c+vMHeI4GNDOQZt/v7f0/PyseBIz9RxbFLLnJEn0UgUtGj/LZRDaEWMsPAWOHkO2AbQ9WHvIuzwO -NjWJwoiOw2UbxKdTLS88p3XtHuSvyW9sLxYJzaqLx0Nl+yUWBNU1c/nzvGTLos0RjLIsknIrpP5h -TGPjxsbp0I2J8s4l2nArgL6UwTbShwkKJvdOq7LlPj8/6enpSUtN9EZ242ECAjUbOAV2RONIGocS -mWajwV+WWZxvS9U6YOOkaegh7yokEiEU+liUhGmaeQwygJWg9WICYBWDrn0KKMvm3zIE/JtvfUgf -3qSEn2iaZp3OsMvS4gFVNm0J1ZAdXfKhkSjzEqYdoxxeltwTBKFa0MHohAG/wHvuoEQ3TaMMQfTH -eZ5r8GnX9YqEWwoxvifH1NXK/nRis4PqulTl3ufnJ8VJ4jn6qnW93MTANWwoR55l6qVg3YUsp8Za -6zEnIvJwFtCmY/VLXL1cAjwvjLlBcLJELpT6URhoQAmew77vFBdFIYET4W837TD0ctNE6j2GhT/P -uz4wVAtcMkU6LrnfW7rfW0rTRFHksmTJqnPT8S2o0ctDXPRYGQAkwuTg1rTUNI06z+KWwBe06DTA -JA495SRcLFqw1wBgDcMoCcEcojlPE82y8GymnxJMpCTGhKESfjhaFnDAJ3HAARiKiQeYgta7nZHf -2GTVH+prWFalcsM5jNU/ADTFNvR5+/aZOnmvlRyLJFvGkpymm1JAzvjVahE0YkonB6FWMEmSUJxE -dGsaAUB32gyRyG4GVAcAqHCQW4k3Dl4o46qyoDDkhY93G8UZte1NCU0Qp8EK3ZmcRlLl7F7MGSLI -yiKXzAB6CPV0fAmQb+Z5omGQqHWpgtr7XTEwHC7WuMPyHlAhweEaBy1i1zG6DALSypGDcpmEFYWB -HnqYUqkXpTy/aXJ7Axb9RMQ8gH4YKBBQwXeXTdTT3d6S1tXUUj9RlsAgg2g1RhCbChbYE2BUUMSW -d+jhcVMjeAN91LpuBgTi0w0lGLjkcMyxvvZW752mmRgkck8GcxJWV4UqqUSwB9tqlbQfPeV5pimz -KOlAF8WNw5wIF4OG0tACRTachIHPyTsQ0I9P80SlpBzrjF1YZHGSKkbzOErSymzddNph0WTwMECV -tWKUMAwpNMxJO0nAbeXGmJNeHta7AbHZQz8ohmCrg02rwljf1yhjPOtteBy7JzjCpsGYDeuSk6FD -WpfJqCNziiLY3Ee0rn5oDRyZgNw74DcQYVrvHXq4reHR50JsWPGH9ClwV9I0oa9fvtDpVMv4dfTE -RLaNw4gzMJgXEqH2/UVowquCvxZ8v3cdtT9+Up5nHPCS5QoKQpXpyZ5l0hOGIcUowUCxRInBJTYj -nGmW0bL23swXC8U60uIl30VkYl96HMv0IC+Vsmr19JYxhY1RFgVt26Ea9nFcFWxajFVXXdfCiGI+ -wi6jPHsjop8cx9HzfTv23evFsaj4Vl7087Rto2M/BjtLGkeewYLck+cZ/fz5S01QgoB03Aj7KLyE -RzUfSjWLqjvDzU0rDp7hFmKgEuipD259QAyCGf6mB6I6wDSiQWK2Us1kdCMmeAH+V/ZWfkmeKJiK -9ZHEER0Zh2wuy6rOvlVV6o21rg7U3YJAx8tO1bbKZvOpsNaabd831YQQ69oMsYZ06uKMPNff2lY1 -xxSWHrz0Lbcf6x3aj/0hFFXR+zgyGgYGg8d408PBrnOLKTz6KNrvm+eFtk69HMKYkux7oHoWXLoQ -E4GFaUVdwGgWsb3b952C//k//9uBEdOtaWXkwppxd+I6JRKyxicxreSct9nrkbk/zPTh4/8HF1bW -yofKOYeSD77mIMJwj76bcSMZn/ZY3F4WJUZYvTjMIhkAnE2oiOOe82J1+fb8gBiZZlvyUOa1wBwS -z4MAnx0ZCVma0sfnJ0VRSE+Xi2oYNCXpfJHfFXibE/+MKmnbNsrSTMlBFiuII//z+vn2TuttWwH+ -s7HyO+znT1MWfjln2f03r4XjYBsvvtVZX4B/D14DpgEufjw07QBboBUFjyqTJPaqFXgepGmmAbXc -OsUqeuIqYfa+rwP3QnmWgXoV2EmWNSjFe59FHs0isUInNAj8nOdJKOqL6kAAiFpPBg7smH2qt+wf -PGOU5D6YuKt/Qp5nXvVh2zLmMyQS6NEJ32FSTAX7hFvjjKIoo6a5Cms08t4LgGHQ8adpoqC5/XMk -SUL94NRwP378pKLI6Xw+U9M0qidellmRd0wHrCLPykfBF397e9dy3toeWU01Tkz0y9aN5Xq90dPT -Rf8MXjyCQx5vJmfdzOo/RFq5uSqpOytcgR1t2VFSgcziWYAN+frrlYqSJcu2JyzynC2z7x3leU6n -04Xa9kafn5/0/PzMscwSh7U8SFAfP7t1kPn8vNKXLy+eE9Mj8QY4BiYH9kbB78dBhAWIYJG65nn0 -uix0vV29Wz0MQ3p//6CyZOpyJeCtrfg0y084IkmSerr519dXtWhjw5VQKyBURnj28PNDBTNNE3Vd -R9++ffOchLHmbNAIQEFUWZiB//z5k6dTgtuogeviDlc2KdnU8xHxYkREP378pL/++lMdssLQof1Y -/wCg7YGL6rTrOvUzwJ8DIcziKfYzowrouo6GYaQ//vimzxoEJQSkAnd5fX2jui7Veh4jzKZp6eXl -yYuCh+tzEEg0GD44wJnL5Syz7VzdZkFNTZNYmU0oOW+3m4JX+FJdd9dNcr1+qr+cLW9sJlySxAak -iNSJFcaH9nS0c0/w6x+FS6BsWgYVnHlsa2JxDRujbdNh8jyj8+lE67pQVbMXHmb96iA0z0qsYTyh -lwonEIuwTa3Suq4xVMxEe1BNNVagchNUfvXoprYiABMNt43jtx9Cfd29Del4FaQhsPhzaH+sHwBu -mDxP1Pbcj20LdNT0GJ/FFvADFXnBpJ+ypDhJaN/ZI8Jy7h2GsT3Yve8ysSEvZ/HRORqakDSJqevd -eBa4BVqL2+3GlUaRu5aKHEsvDCPatlmnHHmeKZPR6iPQog6yqdVlWXIW0EoAY7AxbtZ3weo/bNQ7 -Ds19PyQF+VCqNwhQ6OW3bddJHlepuwbtWJm/i1xPtPqOl3VTI0aXFMthi0laUBD88l42bi8HRJjZ -uyH12HDRQE49kBCsKg0fiA0zVol9WoQMlFKSzF4ZhxuAf9ZueuPYsAITpT0uZv5vN75dvFbzjhcH -80seGfHC7SU3jzMUIiLqdZRmQ0ERZc7g4m6synaa50FP3yjKdPHbkhXP2I72vv/9NxVlyfLPB8PJ -IGAhV1kWyglHeQivP034kZIa1VaWsYy6MziDM5ZATqOAT+RSbxwY5aq2TJB8N75dWTf/5YWqsqQw -wucs9Z3gsANJy7dgj9XZGOvKeTE6vwN87txMT+CLB+k0vj+AT8sqBEaRZ6m2rQ6bikSe7gJkwzCk -qixUQAUZPPYOuzNxCzyFToWJjRcGAXX9aqLfe+f6HEfKUWG9xiQt7qox6gCIrWgO77yqTqpc3dZF -359/+B8spsoyii0Cb8cSwzjSvMwKEAFAsRvR8qkRLb2uztk0y1Kap4Ri4fNneUHL0picdf5voNNG -2mnT3AQwzNSJ5fHEn0ygBHp53KjO/40Zi3YsZkdfLn8t8r4HcuitWxL44rxg2t9QXFZTuuDQ6Zip -73ux1T48U089oEQ9OEWRIeks3ggT3IiiZNLK+XRS11vLTrtcLoq9WK98S2BiDIS8jctBnb0njpnn -SW2t7GYHpZZ9I1v97wBejtNkvO6g2Uid1Zy4SgNBZ/p5QrPkBDpV4uT1wk3T8u0m5a/FOCxQOYlQ -yt5w+77R+/u7tGUnja1jiu7mAdr7cSjD0h40MAHBc9j3nd7eP/QQsu2pcwXmsJuu72g/GGCe58PP -a5D+XJOSkkSqa9KwXLhIAY/Bc7UXGS4enj71orhdPG6HJWBZR+vwcVRmN8e27XRIv29VUlgUls8+ -inoJ831mQXWKyo7TTG9vb3oapUIBdWknO31+fkrZyw8hoECFRTrXNtFS1kl2GEe1y2azzUVptrbc -hzsQej4LFEE/ADdVTAAGAfOwiSdZ6HYMComtdeFBFQLV32yca1grwFRQeC1CpWUptZ+frEu4XJ7o -y5evFAstG88OQB5YaaUwxg5DXbYjQmuWYUtX6C9wewBpBsr9CKix8qz0bOB9R6JImW79MNL1dtVA -VMixp3kRs9BApyWuMkl1wwEUhiLOgZ6ruhy5NjVR6zFL+4V9HcDuz+vVmwQEQaC6B2cMO4nv3uJd -HDgYIAt3HnurhK2MdGtaGkcmk0Hnkee5KhJx4KBN4RQoNrcZhtHZ7JcMLoM+D/KVnXAp5z+JKZZW -wkbFAyS0Kc46xbFJsNhU9kUiW9yOriyy/Qh88ElJOtdcl9XjL9ubC8IRhCugVK0qnmUy3z70Nlog -IyOg/4+MOkhAp2miuq494gbwBsu7hwcf7LVcsOOio0Gks9oZrZNU7jrBQEsD9xiktNZ15bHNbBQX -fkffd146EhY5CDKMFE90vd40odhVNc70Y9s3KgoetUah8+m33A3779y7SRXQws9j08zYc7DFYke/ -nxclbetCt6ZXNSPGYmzUEWmwCxJ1HxN0sOk4apyJXgjggNEJ+ypGKgBzVGbfaQeH4rq6No+NOyuK -4oyWe6c9PNYyDphHYxS0DAgnsb6QSZLKBIVTg3n+P5sbl3X/EL4lcUytyHaZyEYauYd9AGyGtQ5M -Vx8HUro02qN19XkXbetck+GPYBORbHAqHL+gkYj5RfgJwKCZck8/UJ6nnkINQgksKDtmQQ45NhRu -LCU8CNI7iakmRltw+o0ilqrempbWZdKXZNFtgFwITgT9FiabIBNx6Ejs+bLFMbcjmHyAJgxj0m0j -Z3qaxNTnBeVZashNZNJgd0MhznTjrNuqYp9Z0oHAzIJwBxsAwFOahtoOjeMklk68+NhsJKe+77SE -rMqC2nvnTQXiOKZj32mZZ03Rta2O3ZioVLCI+r6jMIwUqG3bVtKaHIiKvl459ctKy9oqgIw1g3KU -vRldJh0AQsz8eZw2a54kfgaLcjZVf7Ls1/XJdkyZJEzJdaCpu1yYiTfR6XRiMHWZ9MCOTXgH5uez -gKb2gM6Ez0BEtEWuQuYIOesFYAlYcMrKKZf1Yzn9+GcbR4ZDP8syKotCK8RxGikvck1rOp1qz5vS -8kcwQXhkfCrOJlqCXTAAIqL/Dyy2Xw3ACWE3AAAAAElFTkSuQmCC - -------- =_aaaaaaaaaa0 -Content-Type: image/png -Content-ID: <26389.957885364.3@twelve-monkeys.helixcode.com> -Content-Transfer-Encoding: base64 - -iVBORw0KGgoAAAANSUhEUgAAAgIAAABaCAYAAADKBz5/AAAABGdBTUEAALGPC/xhBQAAAAZiS0dE -AP8A/wD/oL2nkwAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB9AFAhIaFX5RmFoAACAASURB -VHja7J13mCVVmf8/Vbdu7tu5p8P05MwwTCQnySAgyYTKKogBMK26JtR1Dav+TKuiYkBRxCVKkKDk -AWaAgck5h8755lTp98c9ZZ+pud3TAzMEt77PU0+HW7fCOe/7nu95wzkKb0L8+GuXqmvXdzRHaiqm -R2Paglik5ngjYJxjGlZ9X1+uPxzm7lC4+u/5XOHRn/3sfh0PHjx48ODBw6uC8mZ6mP/92QeUPe3F -2aZlXdrR1Xtqw/j6k3vjicoqNUzSp2PrClplJY2xGqpqK4zaytbP7F277JYbf3xPwXUp2+taDx48 -ePDg4S1CBG79wfVqfyEVSeWLX0l2FS6dMrFmmuLXAts6u5i/cD6nnvQ+fn3LL3noHw9y9vnn8j/f -/jn+gJ9Eoi+xddtTnzn11A/eXiyYlnRJyyMEHjx48ODBw8GhvdEPcPP/XDV5oJD9oBnihlBcbfC3 -TmBb7yADXR2sWLWB2Uedw4xZMwlGoxRzBqueXcsd9/+VbCpDJr2tSk/k3vnu8459+s8PvtgrCIAt -CI7tOjx48ODBgwcPbxaPwF9++mnf7kzHBZVKxafymnXOQHs/6ZzCjd/6KZm+Ns6/4lpMw6Shpopx -4+pYs34rqUwGza+B6kcv6CiKwZknzUw11FW94ze3Pr5GEAFTHJZ0eGTAgwcPHjx4KAPfG3HT39x0 -Xayts+eT2Xzue4Sb5w11divnnXM+a7YMUNRNdu3p4777HkLVVHr6B+lPZDHMImF/jGAkjF0sEoxE -sYsFGirDwUg0+OSa9Xvbxfuo4lC87vXgwYMHDx5Gx+seGrjzr1+c276h62taqPI9+oCPlvmTec+7 -r2fqlFmY4alcdPEVhCIRqmsqSefSxCoqSScT+ANhjICNBmihIKpPxQxqFE2D2mjFImA1oANFIC9+ -OmTA8wh48ODBgwcPbyQR+P4Pr1TCmfyivm29Px4cHDzFopJ1Gzbxzve/j6lTZgFw8y9+QSwaxrB1 -0tkMiqqRSKb4wFXvJZu1ePhvj5DPpVAUhUI+T6QiSko3MC2rCagFCkBO8grYDIcGoBQy8ODBgwcP -HjwIqK/XjQJJ8/RQTfVfO7v7T776w59QF550PjlD47Of+ibvee+VLF6yhGUvrMIXCqHaFr/81U00 -1lWj6yb11TF+9YufMW3aRAzbZsHC+Xzx6zeQzKewDZtxNZXzgXFAPVADVAIRIAj4GQ4VeOECDx48 -ePDg4fUmAnfe/NF5mWzmr6l+Ju7bO+SbdvR5TB4/EfCzY/culi9fTnf/AJZqYxl5wMe7L3sP//Zv -HyIWsln58mpQCtiWgc8yuejCi/jK576Dr2gR8kNNbWwqMB5oFGSgCqgAwoIIaHh5Ax48ePDgwcMB -OOLJgjd/5/wZmUzwJ35/8KihREZZt2U3xWySO/5yFytWr8MfjKKpGnWNjXz+E59kzcpVWIUUHT19 -PP/C0wwmB+iPp3ny6cfoau9Az+UJ+KA26uOue+5hfGM9c6dPtB5+etU68T42YIjDyRkwGK4k8HIF -PHjw4MGDh9eDCDz15/NCvYZ6naoFPrhxd6/W06uTzCvc9/en2blnF7bPR9inYKo+Jk6bws9+8iM2 -bXqeLdvb2Ll9E2kjTyKRR/Gp9HT0ktPzKAE/Q719LF+6lIxRZPa0JmZNG289+PjKnQyvH1AUJKAg -EQGD4YWGPHjw4MGDBw8c4dBApj9dX+juunLSrOn+n9/8KPPmL2LHll0EbBPFH2D+0VOYNXMShUyc -LavXsGDOXB5/6HkKuTwP3nMvzzz5LIuPn4dt51mweAENLeOwsEnreQYSOaqCQWJakEBAt4A6SgmD -clggSCks4JQVeqEBDx48ePDg4fUiAsVqKzzt2BNnnXHWtfhUjRlHLcT0+TBtH6qm8qUbv8bPfvEr -qhrqiFaG6I8PUDBsLBT+dOfddLR18tGPXUNdrJnb/3g7119zNUP9Q3z4Ix/muJNPYzBnE4oEWbOp -O00pQbACiEokwO8iAV7CoAcPHjx48CDhiJYPBpXGgekz3/6Az998ybe+/H6eWrGbcChEOBxhKNXH -I488xMypU0nl8/gNBdWv8Y5LLuelVS/wh1v/wD333o8SMFiwcCE1VXVc97HP84tf385Xb/wmd9// -Bx5+/CGqI2F6hrJQqhKIACFBAgKSN8AjAB48ePDgwcPrTQSWPbcy9dDybS9rhf+65OGlHRR0hcqK -KlKpFLbi5667H6KYLwAKpqqwaOFCbvr5TbT37uHUk05iyTGN9Lb1oUp7C158wWI0xcfe3b2EolFC -1RGUbMEnBv6AiwB4ZYMePHjw4MHDKDiiyYLvXzLJfmZ7ccIrawbO9WmBgKHDzJkz+OY3v8kra18m -lUljFnQCqkqqWCQUVOkb3McjDzzJ4O6tnHr0eKojQXZu38Vzz68g37aB9dt3oIY0HnziYaZObaWl -2s+OHR3ZLbu6UpQWE0oBCSApjjSlpEGdUsKgt8qgBw8ePHjw8HoQgYdX9jKtuTYTT6VP9PsDE1vG -N9OXyPPD73+XbD7Liy88S3NrE4/edzOKFWX9+hWsWv48mf5txDSF6dU6x4YKpLNZJugdrF6/lueX -beZvTzzG2886jWNmNJPr38PSFbvSvQOpDJAVRGAIiEtEIEepesApIfTgwYMHDx48cOSXGFb29Mbb -FJ+ybfbsWSfd/8Bj6g2f/gSnnX4KPr9JMWuh+VQaxp/C939wHrNmtHDvL3/CR945kw0bephp5mio -q+P0TJ5qn8L4cdUEYgHaEgaP3n832aLGF649E9te795y2MLbfdCDBw8ePHh4Yz0CgDI0lFXmHd3o -69nXc2FXZ2dg1erV7NixjWw2RbBCY8/WfUyc0MSiRcex4Jg57FtzFzVmEX0wS7BCQ0kV0HwKxXFB -lEyWHXGbSTXVRKsiBEIhzjllPvc8sioVT2ZTYvYfBwbEz4TwEOTYPzTgwYMHDx48eBirR+D66y5W -Kir0aE1ttKG6oS5ayNvJ7nQqPpCyM7/9zp2jbeSjAEpiKLeUoNJ3+1/+t2LcuEpOPvl4+nt7+fPt -d/Pv13+U55Yt5+xzL2LX6kdZvjZFdE6AuXMaGdjVjw+bign1ZNIJAiEfiqKQzmXoTVk0VofRLdPW -DdOZ+RtlDtPzDHjw4MGDBw+v0iPw9a9d5AtXN5w9cdLMT0Qj0a9PGD/3a1WxljMjvrqjx1dOnLNk -yYmx09+2uOuZZ17Qy5AAFVB7ejMcN6+1LpO3Tjl9yRx+d9vfSA7uZuuWLcycM5tf3/Qr/vdPt7Ls -idU0BgtUa1Dr0wnWVhJTFXr7hvD5FPZEguhFhUA4RntXksYJTeQNU//70+uTumEmhQdgEOhnOE8g -RWlbYh1viWEPHjx48ODh0DwCCZ9yZrO/+jeXXXr9pKqKEIXUXlZu2T5/z9aO+XYoihahwyxEV3/l -y+96oDFQvPPT//VAqgzZ8MWivudnTol88bmXNvG5T1zHlt3b2L7iJcxQmIa6OrSwxofOmcTcap0d -O3tQ4wV2JeOs2JqjI6UTUX3kSdPYEGFKSxV5RaOpuoJk1jYLhuXsK+AcRfbfY8D2vAEePHjw4MHD -IXgErr/+NN+ZZxx/cW2o9uYvfeUXkyoilfz59t9x5dUf44n7HuPppS+xdsUGtq3dVNnWsXdmwCie -P3lC+F3vuvz49PVfOKc32RfLbt2+UxX3CFiaZs6YVtewr3tgbsfO7XR1DhAIRZjWFOWso6rxFZIo -+QFmNoeIpXW6ckV643n8LY1cMg0qagNs687R2uJnXJ1FVzLFCQtmsLUtnntlzY6E8AbEhTdA9ghk -GC4f9MiABw8ePHjwMBYicPTR0+c1jW/58UeuvmFORayJvz/5GN/98c+w0iaGrmBpAUL+AKlsBttn -0tM34Hv6le31mXTvRX39AwuOXZJPNDXW7lu9plcBAn19af+s+U3jDNM6LpU0A7FIiPqqCA3+Ai3V -Ieo1i/Y+k+lRCzUAG7pzTJs+k0/+5C9kuv9Ojd+iZY6fceMC9MUt+jMqjZPq6EkUs6vX7nLKBAfE -0cdw+WAWr3TQgwcPHjx4KIuyew386EdX+mMx7VvZgr3Yp1g8/exSvv7VG+nc3U4iXSSezGCYJmYw -iD8YpqKilmIBND3M6o1J7a47Np1z+517f5nMDPz2CzeeP07cR924uW9964TYroKtY1hFLJ9O1oow -WNBpmBhkYkzhub0ZwgtbScUC3PFKN0mji5a3Xcnsyy5g3oXX074nRWVtHfG+Aq2tDdhK0CkX1MTM -3znKhQY8ePDgwYMHDwcjAt3dxhmx6LiLE71DXPWpr/CBaz7InvZuApEIKBaTZ07ny1/8PO+6/BIM -FDK5InlDozdZ4Jijj+E/PvVR0ml/y66N6nueemzrC28/f+71rZPqa9e90jZAuPaV2rDfyOYM0ski -scYQBrX05TRCLS34/CpPPt1JciAA6SQnzTifX333V3QmZzO5ZRa5VIiCBS2tMdSiqj/39NI0pWTA -MKUywaz429mK2PEEeETAgwcPHjx4cOGAZMH/+s9LfF2p3Cc/+aH/UCorwnzz//03mzQTFR+2ZeH3 -+TjqqKP4xCc+XfpCIMhtv/4jiuZH9YeYOH4WanACqYSKpqFYvfq4nu7erze2VCyoqFYee+pvrzx7 -2aULLnzmse3jdNNi1544VqVO+95+zrvgZIr+KjZu3cz8Ga3U1vqwIyHuf7yTh5f+O7oNV5xeT188 -QbUFOT1ndvZm88IDEBJEIO/yCFgeEfDgwYMHDx7K44AcgcmLW49OdiWvnzCxqm7Vhs3c89cnKOTy -5HI6hlkgncmwfecennjyKf7x6FOsePFlBocG0M0itqWwauUaNmzYhG5bBLQAtgm2AgO9AzMSKWOh -EtSGNEXr0FRlfjyZZ/z4Fr7ww1+T6OkiVtXIZ3/0fdo2rqN9zx4WTa9k7qwGlkyNYvltckWVaa0B -YsEQuUSSqbNjxTv+tq2PUi6ACmymlCMwSKls0EkU9MIDHjx48ODBw1g8AheddsXZ0WBt6y//8hvW -LN9MoWASAiojEdauWsPO9p1cdfVVrN+4htX6y2j+IJYKdTUVnHHWOZgFg2eXP4+d1MkXdFQtREAL -8/Cjv1e37Nja8vOf3vZJxR7a1NxUu2+gPzcxm8uR7l9F04xGVjz9JDdPvo2GqJ/KmB8jG6K6MkZj -pMAxxzXSOzFFsF5j1ZZBJk5SyeRTReEFyAkikBVHThAAQ/IGeImCHjx48ODBw2hE4Cc3XaVd+LYL -JoSqJoX/8exj7Khowx8woGCTzxe48etfJpmLM9AziOozGF83jqF8hlR/mspINd/48udobJrM5798 -Lbf87n4aaqoIBjU6u3vp6Ehz+cWf5PKLr1XOeNviuYWCTUNtFe3tg1xz9VcoFC1Mw6K2QmNC2Mec -JhszkaKqIUBOt0lU2fh1HVQ/Qb9KVLfsZ1btdnYWLAgi4IQGnPwAOTTgwYMHDx48eBjVIxBo1bRI -S8C0bVYuX0s6kUcNKBTyFioqf779XoJRH1beIBgNc8edd9A4roWhgQH+/Qs3cNHF7+Gb3/gsG9bu -RdVsMsUshbxFSINvf+sHnHP25dz6x9/Q2TFIMKKj6CbVVRHyBR9TJlSQjCc4urmCOTPriLZ3QNFm -3/ZB1JxJbaKIokOxYJFOm0ycBq88mEhLHoHiCN4AjwR48ODBgwcPI2C/qoFw0N/Y1ds226eoGEEd -Q7VIJQoctegovv/drzF33lSMgg8lEKSY1vnvb30fFYtsNkt3T5LdHTv40DUfZ/XqVdRFI1RofgIh -qKqJ0tPfTWNzjM994WvE/DGUokVIiwIW2byO369yzFETmNTajGUX6asJEmiq4JLvnMlgUxhfzsRq -CWHZNr6QRWR8hb11ezolBn9naeGMRAScigEvN8CDBw8ePHgYi0cg27+XwcEeamoaSfSmqYpVkSgO -8Z9f/A9OO+VsVry8hu0b29FzBuObmli+YgUXXXwhHZ0DpJND+KIBogE/QZ9N0bTwqX60YJBCwSCr -FxhXXUs0HAFdwSiYFC0DFYWKiEbXYJramI/taZPBwTg9PQOcP6+avuUa0XHVmP095NUIhpUiaVvs -G8gUbOufA39WeABkEiDnB3jw4MGDBw8eymC/qoHKqoqal9avueTvTz0yZeuWvRTSefApbNy4nhdf -fIXnnn6SVMGgvrGJv91/N9OmzeC2P92OpvmoigQJaBqa5sO2LUIRDVCxC0WKxQKhgEYqmcdPAFXx -oft8+GwbVTUIh6A/naMuGqS9L8lVH/0wl7znVDauWEZi807uer6PigqFurog+AwCFXn2Zhha9kp6 -n/AEDAhvwD5KFQQZDlxQyIMHDx48ePAwChFQjjt2VsSXKp7bXB2e1REfwLTzhDQ/A939tO3rIJsq -ENBUMokhCsUh7rz7AfKpDK11tdiajaqAiU3ADyFVQ8cmns0T0lQqA37i6QyqT8MwdVRVxe9XsJUi -yUKe6roQuztzXHbpVbz9sg8wuC9D/IV/MPuEZk4PqUxqrcWn2eR2ZJi9JMDdzwzu3bFP7xYkIA90 -Ad2UygazklfACw148ODBgwcPI2C/0EC6dzB54plndFaEwHzuBQzbQjFLJYC1jTWk+uKkMjn8gRC3 -3/ZQiSj4A6SyKVpa67FtnURWh2yWnF4ka+hMn9LIdddeR2NdAx+74dP4ikWyKvhNA9MIUFsbQin6 -8CkqoaCPhx65i5eW3cHaFR3MmVbN4ikt+PUh8v1JNMuHv0WndU6YvEleEACnSiDv8gJYHgnw4MGD -Bw8eRoeTLKgAylPLNhgnnXlF/gMf/iqf//g1ZFMGuWKA1gkTufeee/nF724mFU+RyaZRDIOa6hpa -JzSTKmTYsn0PnZ1xUukcaRN0S8VPkAvPfTvv/+B1hKpNFNPADBiEwhBQFbKFPPF0CjWoEA5HGN9a -z7iaGqZOnEBtUwU1NX5U20IL+gjVVxIcV4NeUFm1Tk9s2mkkGa4YMF1eAG81QQ8ePHjw4OEQiACA -MpgsYuTTXZFwde708z/M5KkzCUY08IOl5zj15JOINVTjC4Vobm1k69ZtLH/hFZYcdzrRiijjmuqY -Mq6eaDSMYhoU8ln+dNufmD25iUsv+jCKZjB/RgPXXHYsJy6sozqskMlYZNI5hnrSFAZz2GaOzi37 -uODsKSxZVM9QKkC2pZreXI5cPgOTi7y4PRXv6Sk6ewwUAD+lbYe9nAAPHjx48ODhEOCTPAIqoFWY -2/NBRTnn2eXP1z79/DIKuQLxoRQvLn+C559fwfatOwkHNQrFHDt27mLnzp08ev/91FTGaKxvoKG5 -jvraBqZPbmF8cxPxwSLJfJG6qiATmmOcf/ZMaptrqauw6e0dpD9hoGkqOV3ByhWIBFWKFqAomDZU -+WpYsaWNtGFCJEl9pWWua9d6Xl6b6hGDf0I8/z7hFShXOugRAw8ePHjw4KEMFMkz4ANC06fX106Z -WP1Xf+34RV27EwwmMxh2nrAWIpcYQotWYOYNLAVsw6RY1ImEfdiKn0goiM9nEzRN1HAIyzSpidZR -KKTpSwxQFbSpqNQ49ZQp1FWGeGZZGys2DBALB6mKRqitrSSR7sLIm6iKTSiiMHdGC3ohy8KjGojW -J8n3dqeu/0H/BrNodaDQVVet9Q8MGQawXBCDOKWqgTxvrjJCZQz/L/eM9hivbf8LyePB4BE7Dx48 -eDiMHgHHG6ACgcHBrO/tpzRNam2ZcPycJcexafsOIoEAuUSSU885gU985NNs3b6DgaEBPvC+d5JK -xclkdaqiUWJVEQKBIFUN9Vx3w/WcftKJPPDw45iWRUt9FYZdoD9lsmFbN1t39JJNm4R8KroCM1pb -mT13EsnuPnL5AnPmzCRQUUGoLkIxn6VnMElYNenNmpmly5M9VVHF/u8v1R/zH5+se1tTvd9q6zJ3 -xRNmmgMTBd8MBMAnDk0cfunQXP93fveJPlFGGPzkflNd574VCYDP1Taa6/C9Rd9R7iffW7yf/i9N -kP6v95nien/VE4t/XWiujlcAZeve+MNfeMdRn6yacQUdW/fwzOrVWKrFtR+6hjNPv4S2rm5u/f3v -+NRnPsPKV1YTrTYI+YKotkm2YBKJ6OQGE/TaIdJ6kaKqMLW+idaKKpKpFJpRoLOrwGA6hS8QJRSy -SZgFdnf0EY5V0xwOsPi0hbTvaSeRjpNImQSDNsFYJc1RK3r+WRWTzj9JC4QrlKZ1G7KcuDjyjunT -IupPbxm8de26tMH+CYPu6gH7dVYmH3AKMEca7BSXYVFcz+dsknSv8HDIng1ZSWcBpwL9wD/EOW+1 -PAnH2LwTqB3F8FrAKmAtw3tJvNkTQp1+mgycDaSBB0T/6Ly5l8BWXHL6fyXM5vTZROAcSt7Ft0qf -He42WAwsBPYCz79F7YuHQyQC/zTMS1/s7Puvb9srjp2/8Lieyy7gmdVr0FG46abb6O3Nc/ttf6Kj -t58zzriA6oZqbMtgIJslFo5SXV+Palrccdd97O3upiqkodsWQ6kcqh6jJ5HDZxrsyxSJaSEaakP0 -pfLEU1kaxtex8MwLiPd08vhjLxHvjtPcWEtlTSXHz6vGsIuEw/7gzKnZ1gGfppLx0ZvIkDZs31mL -w2//xnWN7Zddl76H4fUDTMlD8EYMGqpo4w8CH3oV339FPH/aZYQVcd1TgJvFeS9SCoc4+y68FZTV -MThB4FvAtIOc/wNgt9Qe+luACGjAEtFPu4ClUj8V3qSDq0NgjwECwDqhP/8X9u9w+mwh8Gtg51uk -zw633fID7wBuBO4TMuC0gY1XlfUv7REAsItF9L/e9re7p4x/21H+UKpCKSpUKBGee34pfsXmo9de -w//7+c84422n8dtf/ZYrrrycjWs3EQwGUPQCuVSOnAKVsUoKhTwUdfa2ddHDIJlihmAgiKabZG2V -TNFPZX0loYhGZyJPavlKtq/dgWIUqa2K0DuUptgxhJlJc9yiyfQVdKxQgzqU8LNjWyfVDZV0RTT6 -k6p/75DeDEoN2M5A6Mwc34h1BRRJofYBK8XvsqtthvjZRym/QfYGWEAlEJM8As7g7hMGOiju5Qca -KK2qaLve961gdMOS63FAtIfbS2IJQ1QjDUpv5r0k5P53+snn6qc34zLYDgmYBawQ73CW8MQ4a3X8 -qw6Ecp+FJRv5Zu+zI9EGsn0JizZIiHc38TZz+5clAvsZ3bse69v2qa/PWH3eeaeceuYpr/DCi6sp -2jbf/+EPmTxxCr+77VY6Ozr5+U2/oKOzi6r6Jux8moJexAyESAz2U8wXMAp5bJ9N0YTmCa3UaY3o -CtQ0RDj3nPOI+qPcde/dJPoGMXw+lGKQgqET80fIZkyKuUHqmipR0j70gsFL27vxR6qZMXchSs86 -ioTQFJv+3qHss892KmDPYHgXQnngVd4gpfIBfwT+DjRScn9XABHg60LJ1guj6+ybkBGGxwRCHBhO -cBTVMVYBYJz43NmW2XiLGB2feA+ngmUN8KwwNEXpyFBaTjos+vWtELd195MmZEAVfZR/HfpJkdp5 -LLkziqQzDtGKCEIK//prdDh9FpL6bNzr3GdvBp0MSkQgJIiAzXDJtuNt9fAvRgTkmZe5b293/J2X -X3H7Cy++2PiJT94wc8+W69H1AK+sW87qVWsI+UN0D3Zz25/+SFEtYOVzKCr4CIGRpzISIDq+ldNO -WUx1NMJgPMX8o6fQ05ti9XMr0XwKm1/ewMZNG2nv76CmLorPX0lBT+PDRzaTxB8KEjJt4okM2UyA -1Ip2wg11ZPIakUCMc088w9yya6teUx3UN+ztXnf/Y/E1lNzGC4Ct0gDyRg0YtjRDN8TzFCQFQ2Lc -FZL3wjnPnRvgdt35pX6sFd9JiXc2JMPNIRhud2zY/S72ETI6qtQWMfYvBXXITdE1IyuXQEkZb4L7 -cw6hTRTXYY+xPf5ZkuvyCNQIYxpnOFmXEd6j3LMeyjs4+RdVwGeA70kzOjlkVq5PeoELRF/0A1Gp -H5TXSYYUV5+WuxaHUSZH6rM6IXvJV6lbh7s9lCOslw4ZcuxLUNiXvLAvOendD5UUjvYOh8NOjVU3 -D4d+Qfl8r3KT6zc1cdbKkQBhfIsrXl7VdfzipluvueFzV9bXF8fnbX/Nd278f4qBYfpCPiOZydqa -qioLpk9WjIqIr7WlSZ1SW62Eq+uZPL6evniCdWvbGDSzbNi6k+62NqZMnkBP/y4sxUI1bPqSQ9RF -QlTYEQYHMyghBUvxU9TzVFWomNEgKd1HwIIKK0CNoVLXZLBhxWO5l9Z2de3c1NUO9ACdQkELQJsw -XDNEx7S9gURAF4oTlxh1hv3j25Y4Z0gY4CFhdBKC2Mgxf9kroEnGKiaUNCquBfuHFA4W25WzhH2u -QUoePA63O1513UsRz50SA5C8gmRa/O3MymzXdeTqCdtFGORMcHlmO5IhUw+hPUa6hlwx4vwdEYZ1 -JBKgSt9zv4fcT/Jn1ghkUQPqKSWdAvxW0pHRymude/SKc91VG8pBiN1raTO3LKqu+youWzUW2T5U -uPssJmSvQtKt4hh1S5YjTXoX5zvGIbaH5pINc4zXeDUeJKcN/JTClI7+FSU91cd474PZl9dqp9xy -NlLo0G0nLEmeFJd+jWYj3O2kliEnR9JuHnYiILMnuRELQP6VNYPtKz9y4z1TWqtmaeGKCabuq8rk -c8FsJhdIpzM+y7a13Zt2aSeevCR86VknRkLBCt/GTbtI9g1iVqi09/QRCAYIh2y6BjsJhkwmNtfy -8totjKutpToYJGcUSRRzWLZJLp+lsT5GTyFJPJVB80OxaKIE/BgGWLaFrRd56omt8e6+TMrVgc7g -a1BK8tGFAM8BNrzOLj2nPXUx8JvCiCTEMxUloSgIotALtDO8m6IzABbYP/nPPaipwARKCYnzxN8v -AN8QnpG8azZdTrmcWP3HgauA6eKeK4H/AZZJbsHDHSdVXe2Wk9pjSGoDwiiI+AAAIABJREFUJ3SS -d7WHYxh+AhxPqYLix5KhsgVBelC4Ob8m3qdc9YE8K5wAfFrMjCeIZ9gK/BX4iyArBYmoWaMYLrmd -3eEqx6g77/ER4GrgGeC/pQEb4LPAZWJwv9kh7a4ZqvP8TeJZF4t2e0QaPD4ObBFtqrue3RaycLu4 -zueF3I42u3Hu2SDa7GJgqrj2DuBvwK2iX/OjtJljXN8mPBj7gO8AX6CUxR+kFEb7ptBpt0werlCK -3GdNwPuEp9FPKTn3mwznTRRG8dxpwAnAV8TPqJi03Af8rEx72CPoZj2lhNoLxe89lJIYf8twIt/h -ShJ2t0EUeI+wLXWCoD8K/FDoqBwusEYh+5XAJ8W1pgrZexn4EaWKoIPZF6c9xwv9OEHIm3sWfhml -MKLjUUTSL03c70ShP/dI+qWI9pwDfBd4gv3zzOwyz/K8+P064HIhJ41i/PmZ6Oe89CxvyrCaNooL -Oy8YYNiG3l3tCQUScaC+qqqiNp3Jhi3bDsdqQlVf/vJ7J2jhyf5YTYVSyNkoWpHBoRx2Joxh6vS2 -dZQClKZGciBDVjexfQGskEIxbZNIFzC0IgEzgG3l8BuQ01XMYo7ZE2sI+jUi0QDRsEJDJaBbnHv6 -+Ni9f98Zz6RNdRR3U4rSroRB0fGbKCWiFV+n9rWkgd4QbZoV9/e7iEBKGIUBoWhy9r/MuMu5oarF -AGEJwzmVUrnaPOASQS5S0izQLmNoYsCd4nuI5wgBp1GqTviEGEiS0rMdLoMjow6YTSku2yp5RHTg -OfEeZpnB2y+MyQ1Ckf8q+jorzv034GRKO1TukWY47jCDE3Y5A/hf4VZHXCdKqQJgiVD4j1AqrcpI -XoqDDUbqCC5vOUlrirhHlwgl5MT1bUHQlgjjXyPu7ciQ3B71lMreFoj/RYCjpOdoEQOSXaYN5KoB -xDON5g1w2myRaPcm8f+80L354vgA8GFBptLivdxt5lxrnCAwk4X8BShVXUwXJGGBkO1dkrv6cJEB -XIPgvwsd2UuprPBUMYBcKgx+ssz9nTacBzzp8r5OFGRpDvApoffpEQi/kxj8Z+BM8dkg0CxksFJc -K+my4xxG3ZwjDscWNYmB+AzxDPsk++LuA0UKiT0EHCv+3y9k8mzgdHE9R7+zZeyUIxcnAvdLeinb -+z5x70bxHEnJ2yC35WwhW1OE7cxKXo65lCpGJorPMuKQ29UhNmGhiwiSO0OMMT7RXr8S9/ubINLZ -w2Q3j2hoQHZV6ZILOyDFcC2fTzHy+VzOsqzogoUTpl72nrOaTznp9MC6je3s29tB92Ce3r49FHMG -GcvEyPuIVUSJBgN09w6Ss03GVVegtzbR35+kMlZFfeNEOvq7GewcIBIOkrTyzJvRjOLTsXSDwe4U -0aBGJBxhdkOYvA3HTAtVvH2xPeGnt+0rvrCpMCTNtHwutyJC0ZYLAZgAbJZmOK8HGbBd7i8fw2U4 -MJwX4BCFnGRY7FHczjIReAV4WBiJIPBVoRBXAb9j/3JKs0w88N+FUvYLpt8t/n+WYPDODEh1eTvs -w2x0ZomjHN4p3s/t0naMxFIxeDYL78gfGc50/ri4xt9EvFORZtOm9AyaMBAOCVgpZsZOouJCYfyO -Bn4OfEzMiuwRYpPKIQ4+QdHuCCI2TsivKg3KzgDVIGTJcLWH49L9AnClMLIdghhkRB9nJVd3wRV6 -Ul22IcKBSZqKa5Y1TngpmoR+/VHMWoOCgHxADOq/Fu3XI3l/3OEbOcGyTnhG/iyes1J4uhoEqfgf -DqyUOZwENSo8D/czXM3yFfG+1wrPU7n7O+3SLN7xj5SSgh2SeQVwriA060YImTiDV5MgAQivQJto -nwXi+WqkCdzh9NY5bWAI3XpF6NM0qT+/Kg6FA9dtkQffbwgS0CFm5IPi/xeL41tCVtVRrhMUg2sV -8JSQ5yrxvTliovKEkOuYy0uCNHg7sl0p5MhZjVaVdKdakGmljL1x7ETEpSNfErZAAT4qJh43CA8W -b+YQgeryCFjSoJQTjZMQndYLdFuW3VEomG0zp9emv/XFd804bsH8yKZN29i7Z4j1G3aQ7eqlkChi -KAqBokkxD6lsnJ6+OG17d9Ld3UNjfQP9Q3mKpsbMRUdzwXnncsxR86htaaB1/ASax9UQqY4SiPip -jgV51+WnMG/uRGa0tBAOmdRW+QiGkkxtKVR87MLg5KooMYazXB1D6iS7OATBFgYqLQbHE9+AMIE1 -wmDsjnkeasyvW7BpR1mKwuWGmKU1CKF3x6ZVSaCvFf/7X6FA48SAuUrMhOqFMaoTxsfPkVltLCsM -bpcweHvErG+HGBhjrvdQXKGS+8R13i1ciOMEmZkl2uUlYTgjDFdjlCNFVeLev5VCTH4xKPxa9MuS -EdpEeZVG110W6mRrV0mDcUAyPPVSe7g9Y0XRhjmXjOUlElzuWeXBGMlgVoj/+UbwYnxUDHr9wE1C -zyrFZzuBX4p2nC5ct3XSNVVGrojpEwa+ShhnhdKaGQgvwzjxWVAy4ocTCeBxcV+nkkC+v6NboRFk -MkVpHZG/iz7xCXKZF9c4WmoLt07JoSQnNHScaOeI0PF7xL0PdyWNfJ3tIozkE/fZLvoEQWYmjaBT -jkxXCY8cwG1CFp0KqmVCZqaId3Ou4yadTkhgthi4b2c45+p+ce1LhU7I/eGO5wcZToKMSToUlp4f -8czlZFQZgQjcLf5fI77zrPj/dOF9G8nmvOk8AnJygy4JqjOA5YCMbZMAort2D8Zvuum+EMHoArTq -xlhFTTAYqwlZ4aBqBmIECjr4w+j2IPHuDCctaiaZ6megb4gn126kp6+HgmXw+IMDPMk/0Px+IrU1 -DA4OEK3wEw7ZoMRY++IWErkUQcvHoklRIpPG0aAZGH6wdGiZMaHqD9/WFl/71eWZwYzuxJAdN5s7 -flsAtonZyKVCEB+T4khvVeiSR8FJRIxLRrxa/J2QPA24ZsBNkmE6Who4ZDmZJ4ygkz1dPAIxr22U -SgiTIj8gLe6VEuGKcBmDKTPsf4iZYqMgAEsZXszpJWmgUUZwh4fE9xDkKsxwfkdRfH+HOGaI0Mkq -KXdBf5XuaXkmrkmz/5jUBrb0WVB8Fmc4CY2DxPGdxNW05JovF7f0ScYSYdjCZQZtJON6rvh7mTjP -krwNDjFZJ1yyp4gZXdb1DLLB9kv2J8z+24zHJUPulu3Dve+G20NaFHJZ7v5Zly1RhJw0CHksiPeZ -JfVXlRgkBoXMF6R3cGTCEAPNlcD5YnB5QNzT5MjU9duuccEJFSfEO74sCJ2z+NKgK0RjSyG7+YIo -26L/NZd9ce51DLDRFR6wXCTZOb/Kpce4bIO7EkGVPIc+iWhXSKEdWY+cSq5QGf1yP49jI/0MVzsN -SMS2SbSP47kuvtkGkHLrCFjSQCHPVJ1krUzQT+3Mqa2R1tkL+9OZ/Cpd97ceNW/q5HA02jw0mFcD -4Xrad++lvy9JeiBJRs+zdNVmEv1xIuEIA/t6wVaIRmJMbx3PULyP/v40RjpHTUWIQCTMjMnTCFdX -sW3rLvwBjektk8jGh4iNG0+sejKq9hKmWkVH90zqihuqfvRvcxZ//i/rCgOJ/Wp9DZd73ZYU+U8i -TPCvAFsYqSHBrnUhkI4gyrNJn8vQOAleDk4awRjkheFzst61I+QRsCXj65CbkcoH5UHPcY0OClfy -ecDbhSfrBGkmp43gRnXaIiRmAjBcepoW7eq4D6uFF2aGOLdK3DfBcCLjq4Uc0pJnMD6X29/9mXsp -YJP9kwwtYfCcBZscw10uLq24ZteBMt4AN3mqF/9LSzPhfvFTFW3UJc6pEW045BrA4cBEWMelmpHC -QhlJtsMc2bUlbKFLcfE+Ben+iku3VBfBdGxpQUw63ivCApbUvmExSIbKzBZl/btFnHOJIAKfopTT -cxeHt2qgHBkwhez0S/bFIadRoQMxye0ue0ScfA+nvU4bxb5Uu+yL4pLHjPBMzKa06uHz4tkuFNfY -xXCCsF6GICkuGfZLOqS52t/vsnMjec7kd8lLYQb53ULsXy2k8iZLGhxpHQE3G3TiwcaPvnr2cUtO -PePDXXuTlZZWMW5dW0bbt71d27StK6SoATq7eglHwrTt2kVQUxhIDGFYFhWaSkV1CAubUDRKnRak -qqaSxdOaWbOjSG4oQ1ApYBs+zLzCylXriDbUUNNchV6wMRWdoxZNJd25i6MWRkgOhUm0F5g6fQZW -KkdTvGPc9Wc3z//eA91F3bCLLje7XYaBmsJl+VZeGEUmb1lhVAcYTkx0s1V3qY2jGDnp3D+Kazmz -fkuSk1SZGOqR8G44RqdXKFZWeqZySVWW9M7O2vDnCoN5lVC8XdJA4lxPzrKWZwxpMXDVivMTYvBM -SEQiKu5dEEoeOgzhknIJhHIJXbkyqJHq003JIDrGPCXeIS7NgnRGT0Qtdy+ljLFPS4O8k6jVx3B+ -Q1Fy9+ddbeZzzezc7+TUrw9JYUvnPeVNqg4XEXDPJjOSbhUlku3WLbXMQG6KsMmnKSXV/YpS8u53 -xOCpCRKhcWD+hSPbzj3vER6zy4CZlOL0GvBTjuwCW47sOCFiR2ZCkg6EJLKoumbyWek6v2P/NRlk -L1fC1f/lBt8fAt+nlDD6NldI8VGG86tGypdQRtAv98A+loXoFJfdSgsZTbnGVs0lo2O5nn0I9uI1 -n68dhAXKxMA8dv7kSPPEJR9du7Jv4fq1m1m9rY1Uqki0pgbDgGhlhFR/gh7DpKmpjnwmxfSJk7Hs -HP2pFJXBavr6+2hoquXUJbPZ3dnLI39/jtraCJe/fTaZlMIr6/aQSiTRjTy7+nuY3NyEVh+lI56n -89l1bNywk/e+sJd/+0wr1aECe++9lZaTVWqOrdbmqqHpnwsGtO/9Za/J/vW2spI5BsvJEjXeomTA -dv1eYHhVQkNyP8mDnLtkzTmGhNFuEGGBFey/sp9znRzly80Op+GVZx/dwvg47ja56sIq872C6N8d -lBIbFzCceLhWvGtWcj0WR5gxrBfxyIUi1leU3t0nPpsrvrOb/ZNUOQzuaV3ST58rXOBzzUiUEZRc -Tk5FknnHszJa/bdyEIJSbma0Xrh2F4rwjNNmWfF5jXALQyn3wt1mlPFqIHnxcpJrvljm/od7ILRH -0K1iGd3yjTJrPJnSYk69wJfFYFntIlm+gxAJXSJCO4DfU8q0v4BSLsydEklWD1N4pFwf5CX9P048 -sy5CrWoZT45jX/aJ9otQSupby/5LwDuJhhlXSMA9ITUEoX9AEHyTUuXLbhGq6JE8FfkRbLst6VeA -/Xc91Tgwr2Cskx6D/VeGzZaxK+ooBEcmIzblq3lGknn30vSM4Xw5iX1EduJOHjQBs6m+3pdNFRcu -XbaBp1ZvYsbR8/mPGz+HP6yiGwW+8Z+f4qc3fZ9MNo0flVAoTCYTJ5vOMmlCK1e86x1MmTuB9t5u -nnxpFVs2bqU6pnLKMeNYMG0ypy2ayfHzWgmE/ERiYeqrq7A0H4mhPOmMQayqlauv/ywts1rYs0ph -3Z1DbFq5j+7nOgkMhGkK1yonTmue9N4T6uZRSqhpEsc44b6qllxYAQ5c2OKNGshHi+uO9RqGyy1W -rj57pJXNdErJTAg3+mxJsDNidvxuMfiVcycfTviFwXAyf50Yaq342xyh7eSZU5JSqRKSJ6NNfJ4S -xiI/QpjBopRwaAnX/8WSvAQolTR+X7j5eoSr0hpFCe1XYXx3ib+nM5zkGRYk7bQys/TR9NcxSA2S -6zZIab0F7RBn0vYo93pQtG+zkBUnySpIKT7+XaF/SUo5IOUWarFHMbJul+9oxOVw66fpegbzILMt -OaFMLpcLCU9SwGV7RyMTTsnod4UsxIUM75S+O47hBLkjkYzml54xRKl88tPis5Xsn4dllZGNPKVs -fsR3p7F/vkoNpWTCycLeyPbFHWY5HrhGDP6/EF6SZQznE8VHsVHOtXaLv+cK+QwJ3TiPUuk1jG3r -Zbf9dcup+7yRSIBP2JVfAZ8TuhMcoS+d86dTSmT+6EHCtc758wWBfH+ZMEVZj4D88DJDx19VoTRM -nYzx0k6SOYtTzzyND3/o44yfNJkPXfVB/nDrX6mpqEYxTfp7eyjmdKK1EWx/gIrKaqbObmbK7skM -7O3Glytg5guMn9jA+OoQvnCSUKSK9vYEhVyBQMBCqYphqyqpbBpdU/neD77NwqMXs+eZn7Lijz9n -+tsnsFgpkOiqIbPDRKsPMn5uk/qubOGoXQOGtWJ7wpJcVDajL/n4eu7WZ48SkrEPcdCQZw7lVsIa -6dpyLLlIKRnpJKGk54tY5qAwXJXiOy8x8mp0r3XW4cCp0y+HRyiV67mrMOQZQ04YgpeFC7aVUqZ/ -TnKNlwsvyCWRmyhlN39QGIcTxEwsKEiSJgbY2xnOnRnrQksjbYst98cyQTIaKZWqrRHG+ARpNqoy -8nKmMut/UTxbhbiW0yZrhRF3zjUYeZlXawTZUaQ2a6NUTXGDmAUvEG5sp6baL867neFExbEssjJW -2T6S+jnaLqYj6a2T+LlX/H0UpRyBXjGbdkJLsyjlV/ygTHhAHjwuohQL3y5kb7b43Ll+hPLJnIfj -/ecJ8uuQGSenqFt4fxxvXZEDyygd+3Kb0OsWSvH9c8SgHROyiUQmzRH62RTPYAnScJrQy50ML9aW -4MBEZtv1PA8JsjqZ0u6Km8Q7HSO+F+LAvJuDwXoVMiLLyVcYrtzaIOxXhgNLkp1Q3HcolaB+UNiH -7WXOl0N3PxKhlPcLve9mOMHZ1sYoGCrgq62fqS1YdBHFmx+kqibCL396E5n+3Tz+1CqKhSJLH3uC -pilNhEIaOb3I1NlTiad6KORsVr+wgq0bNlMZCePzQc9QnFg0yOrtHazfvoNIUCFp+IlEapgybRpD -Q0MkU1lMFcZHK1CLWW7+9FVMmuBnMNHDcaEo+qBKW3c12S0DTDpHwdZ8pDf5aRrXHPjSxxcv/O5v -/sbLW3tUVwxPTkLxlelM63UgAO5FP4wRlOhgA6jbdadzYBaxNUq8zJYGz0FKK7ldLVh3UMzuELHR -Rykl5xyJZKyxtnlIzB5sDkyQsl3hgUFBHD4oBsNB8R5ydrddZsBxvn+fIA6XiVDAYmlQWCEMoDML -kaso3EtByzIl95M1woBriGt+h1JdcotQ4DSl0s4pYqB1G5+RBtA+SrXunxDelSrxjtsZ3snRdJEq -u0xIoVzylbvNHhOG5Z3iORdKz7lWyFAfw5tqpcfYZrpLtk3XZ4ezdr5cPpG8nLDpIp+jxaJVISuP -i4HvXPG8TmXFZEEKHna5puUYuypI4Z/FADpTukcbpQWcRssXeS3vv04MslPFjNlJrs6L93pS6EiK -AxcCkol1VrzDtylV9CxkOMkT8dlDUviOEbyZPuFV6hRk9lhxOCvJ3i/CEKN5DXURmvqxIK3jxdFL -aSXAyyktJsRB7PFIOmJIHiQ51KePIiN+QWgc72VRTL5MSbZM1/nbxPnO2hYxDlxa2Rm7A5QW8Xqb -kJmQdL4OWGMhAv/shGw6rTXUBqmtUynuM8llkuzaleLyd76LhoYWVq1cxeXvuIhHHnyG7q5utu7Z -Sm0ojKr4OXnxQsLhED2JFFs291NfXcsPv/efhGJNbN++ll/cfCvptm58/hiB+kn4DYtowSZkmKT6 -OpnVWM1ZZ53K9KNNtOIghb0p0m1tBMIBqhcpGGmDrBWjf3cHr7S1ceJFReV9Z7fO6erp19vjpjxD -UlwdYrkGZF4HMuAI5CXC0Ackd/VYPBPOQHi/YI5VUhzVMUy3C0WNSbE9owxDdojAkBCS3wulHC/u -NSgUNTVKHPe1wGmLDwlXfDPDayE4jNWZdceFgjjJfsoIA2lWvM9DDC/ZnBDKnhzFbWgyXGffT6l8 -cCPDteq6uIbz3aw4b1Aa1Kwys4QnKFUwVEsuUZ0Dy6ec2VNGzFJuFIY/SGkhlqJg/w9JcevCKCEO -pw2XCgM5Q3y+UxjTqBTPVFzfjVMqo3R2tXTnZrjbzKlIeElcv16EcwxhrJwBIifabEDyzIzUZhcI -sqJLsq2LmeNLEqnJcXiWb5UJ5dOu+2el+z9EaXGdcvcvF676sdBFZ50FJ7lugpCdnWW8PHJ8OiNm -dHcKd3aTRBizjF4K+mrbwSEsXYIITJDsVK80iDj5PEPiWdybgsn6uIfSsr6Nwu45qwH2CfuiUL6s -1wmzfEEQWsdrV5BCT7OAL4r++h+pPWTyKpPWZ8XzTBeft4tzfi7ulZH0q5ytcOzWGQzvKCpvlDYg -yJ9TTeNOTna77u8V3h2nyiTMcM4HHJjg+AfhOXAqm8IMVzW5k3k1SsuvLxf9EMJVFukbAwlwanr9 -c+fOrX7v+67+WHu8g7XrNuIrKHzq3z/Nle9+L1OnT+ahxx5jx+YddPV0o2katmGiKgbTp7dSV19J -Z18/8fgQvb0JDJ9FfW0dPttkyUknEYxUsXnTBuqbJ2BhEu/vIxIJ01xZQ9Yq0lBXQ0QzWfZCH7kd -eyh2DqD1FzHT4G+uw2xoIZQpcOfLXdy3ehBfKMTsea3+iRX5yu6+QmEgbbg3+SnnbjzUnfpeDZw2 -lRc6cga5IVd8a1QPjTR7cDJWE+L7ukuhndhZuQ17ygm4IT1PWhp0ZNf6WJfUPVhbOAw3IIWqHGWQ -Z2Kj1cCPFKt1XIkpyeDEXaRoLF6XnNR+TsKdYwB7GN4caaQlYh2FM1x94X4OdwkdDGciyzsxZsQ1 -+oTBGYncyJuiOEtuO3s3OG3pJFbprlmoI5+WdL94mVlfufaSS6kSUps5a0H0Sm2WP0ib6dL9ndmS -Lc20RpPtVyOPo/VZiv0TFd3PlnN5N+REtKLUfo4+Of0XZ7j8NOfyVsnbIjsEOSn13aDUnvFDmEyM -1e47Nf8Z6RllGewVOjAwAhkuJx+6ZF8yUnskXaE7Z2KmCRL9J/H7/1DKzekQM93l4ruzBHG+j+Hy -43JLHstJeU4VjVyu7Oic0z+pMp4rec0PuWrLKSGWJ50Z9l9rwijj6g9JfeesW1JuXxWfdH5OOj/r -Ii6W6/pB8bm8Ed4/yYk2BoH45+DT3rbXBDadc9JZR93557/SmRri05//Erf8/ves37ydbHwA/AFm -zp7JrbfcQsu4Rs458xR27m5jx869aD4/waBGJOLHKir88re/x+8PUhGoJJVLoNh+ahpM0okh6moj -7OvqMhNpTQ0oAWX15h6eXbWLXO8AlfVhJk+fQmNNgHcvCJDPGKRWtvH7R/bS74uyO7mXx/70Gza/ -8iSzZs2uvGygOO+36T57IG04jSIrvHtXM/0I5wzILNkpZ3NK+JJjIAGySzIluZNMicXKm0clJWNW -jgS4r2WI6zgJK7LBS4wwgL0Wb4DTFgOiD1KC3fo4cI2ADPsvilTO4Diz6rTExH3STGC0Z7fZfw0G -R8HkRCykmXZCGgQO1rZOxYrcT0aZ2bDT1v3i3LTUHpbUHg4ZGcn4yySwT7pWUPq9XAmh7M4dFNdW -GDmj2+1VcoxYJfuv1KZLxl4mQqaLgI/UZk42tkziU9K7HI4BsJw+jPX+OZcr2ZLk0OnLBAfWxzvy -MET5ZcVNiUT5GS7l0yS9HhJ9dTj1siA9rzNwBxmutMpLBEkmSeU8RnJ7OhUQMYYX5ClKg6Wb0Dl2 -2rFHlniukBSO00WoCymHIceB1QNyn/RJ9jHoyqsxpJyDVBly47bhBclrJj8TDJe6yhVdliuXx5Ds -vy7JhDtpUnHZTE06Z6QF3mR91qT22C+UqY1BMf6JbbvWG08svWXXth1DR+WSKcY3NtPX28Oqlaux -TINIOEIym6MiEKKncw9de3czadIE2l/qYsb0KRiWQvuedlRFoaq2Cl0PUCiYFIw8gWgYtQBBzSaq -QTybpbOjy5wyfQrhqOorWhGu/tCHUI0C9f5ervrct1i/9D7W3/I9zEgF9z3fht0S4TPvv5KBpM74 -BYvp2beRRDHBpEVTKs9V1Vn/+2hHTmp4gwPXCHcnlxypRCSn453V1xTXLPhgyVOWNDMxpEFTFkBn -9uhj/1LA0VzitqS0YYk0mRJrzx2GmZf73vLWrkPsvziMmwxkJTexNULszpAMc06a2Y20k1i5tnW7 -NeUlbHUp3JJzxf0ZQQkN8V6H0heO0Qyw/x4PptS/uRG8AZb0/rY0k/RLf2dHGNxl+cy45MkYwYsk -t5kTXnG3WYH9d9Q0xtBmmitPwJJmb7LcH65KFpmMGaL9X839ZflxPCRDHFilZLF/qaW7Lxx5QHoe -Rx6cz+TZ4OEIj8hk2pEBtz3Qpb7MMfLuprJMyCQrJF3PYOTdRR3vp7Oa4bGUkupWCE9EQbjmnc3S -NkgkVF4Ey3L1iUx2/Oy/V4K8um5+BIIj60i2TK5XUSLiI+mPm3g7pNIpWR0podkhTqakH4UyZNgu -I8+a9O7/XPxMOwThsHu70vovbrplu1+pwO/zk8gnyeVyvOOiCznvoou44/bbefTRx1izfgPXfvQG -0pkChXSKCZMmkstBR1cHmAYWPqxsDl0v0FBVRTJToJhLEonWceVVH+D9V1zBipUrrDPOPCdfURsJ -G1l8lVVwyfkLyaTTPHrHbbz0wlLW3PoTxleGiLXWULdmL9d9/kssuvSTbF7+QXpfzrD6pa3kMDhh -YSsnzq6tzw5acx54qQtXwo/hSpZyu8yPxGpdlqTwBUkIx7q3uryroe4aJOTdz3QO3L/dHuF6stsu -z/41tTJ5OtyrmLnbYrSFVSzXM9gHIVuWK0xijWGwsKVzDMkN6nO1s9weo5UOGlK7uvvJGsVLIhst -H+XrheXktZG8I25joLruo48yKzfYf292cxTyZbmMYJr9y5lMycCO9swHazOk51YOoV8Plajb0vuX -u3+xDDmzR5AjSyLl6gj95NatcraiKMmi/Kz6QeTw1ZKBvDTgaS5ybrrkZ7T2l99Bvt5I9mWkScZ3 -KG1etIDhhD4Zm0T+yGiltZaL0GU4sL7erV/WCPkfst3CFWZWJPmJaZ0yAAAQjElEQVRhFP2xysg7 -Lt22D6IfsgxZYzjfdp+vjVEo/tmAg4lMx4JjJ+vx5IC/d3cfFfUxzn77BVx8/oVMaqlh7bptJNMJ -0ok0s2bPZM/OHbT3thPW/GQSGfyRABYmRrqI6lPo7BskqCpUVtbh92ucftJ8/MEIW7ft1vWCkZtU -VxXcNrAbVQ9x3Yc+xdGzKjjhhAkkH/suQc1HXs/TEFF4x8njKPT/ifWPp9n04iaeerqf9r0pFi2p -Z7BziPrx1crRU5XWngy8uKFLjrXLA+dINc0mhxeyJ8JdomIfwgDqXKfcNZQyn9ljfCbDpUhH0kvi -vu9omc8j7fA32nnmSB6uMT6TKQ067oQ6+xDa1XTJmD3Gvi0y8j4CY7m/fK1yfTrSwF5OPg+lzYsc -uLjN4WqzQ5XtVyuTr/X+Y5Htcm0zmiwWy3gU7CPQBu5Q0Wu1B/J7HMr1ZOLdQ2k9hXmUSlIrJPf+ -bimXJsPIOURuOS23CNjBSs3HqiPKGGV0JFs+kjzYh3i+WwYPOH8su3WpkntGe8+7Lox95obPHBcO -azWPP/0iqq2yeeMW+gcGueeBR2nftwe/ohKrquTm3/0Kw9R5bukLHD19Cr5ghP6BARRMFs6bgeYP -MNSfxBfyEwyFiFTE0CIROnv6uPbqa5KGruemT2+IWpmcVqlAZbBIfdBPtZqhSgVrTz+Gz0dVax2K -qdG5qo+dS19g1/Y49dWVXDQpwPyjGqit87N1bwqNWizbF22Pp9RcXs+4WJzlYuTlapaPBA6HAtsH -mR2/mkVtrDLHkV5nYbR7W7wx23faI8wQXusCUK+lPexX2a+vpj/tw/Tc5hFoM/t1ksnDcf/R5PpQ -+uL11gn34nLWa/QIjiQbI11PTu5zEl8zlDLst1BKFtzLcM6JnOSXPEjIyD6InXk1a7q8Vhk5lHsf -tvPHUjWwXxmCbgbNz332a8c0VVkzfn/HfSiqxmB/gvWr17Bv1y7yus7gQD+FfJ5N6zexactWpk2a -xIMPPsTV11zL1j3bMHMmTz61lNPOOIs///F2IlWVKNhYus2mzbv5+z8e1Tv3tcWB3NvOOrair6c/ -4DMVmqpqqQwrmP09TDt+EvrOAaoaYoRDAdL5BGHdplJVmXF0hAXTTeyCSc0MG82qZtm6PsxAmC3d -Q+pR02dGw9VVRldXrzGCobc5sAzmrbwngQcPHjy8leHeTMvJy3ByJJyKmH6Gq4OyHP7l0P8loR1q -B6x48cWh1atWLY9o+VMnTp9Q0bmti5b6eizFx1nnnMvRs2dz5113s237Dl5ZuRLLhi/c+FlyVp4V -y15k98atRGoq2L59J7t278EG0vE09TU1GLZOhaLbu9vbnMzwTCgQMi3VxPZFSBYtgsUCe/p9aM/s -4oGNORZlLGoTFslckoaojxOXTCazfi8JVKqnQ9sqFV80z9QZLazZmKK7L8WlV10fOFNTpm/Z9CUr -myu460zl38vlC3hC5cGDBw+vHwGQKw+cBNgw+yejygnNToVLkdd3xdi3LMYSGpA9Airge3HFc0OR -Kt+Fho+qnq5uUmmDytpKvvaVr3Dm284ibxRZtvwFmsa3Usxn6Oho5+GHHuDWP9zJnvYuUvEh/nrv -Pdxx931MnNTExRecxfbdu/FHfVAs5HbvboublpUC0osWTavv6yuGE9kiuzuSbNk7QE+2SKS2BcvM -0Z30MWnhBSw4+Qq27exBCRcJxFMoWKT2KITqKljfb/PEqn5SSoiFJ5zEJz71OQb6uv3r1q2L9vYO -ZCRhkRM03GECzyvgwYMHD28cIZArNpzywIwgCEmG9xGRFxPybPZhIgIOGcAhAz3d/fqxixcl/usr -3zi7JhRUVm3aQrw7zspVa3jkiad5+OF/YOl55i1ahF7Q2bGrjYHuAQp2kdrGGvLpHEVbR/MHaJ40 -jllzZ7Fl525aWhuNbes2Dwwm0knRsclZs2a09GQKEX8gyu9v+QMfu+EGJs+cwee++j22tXdx3FlX -8JkvfJU58xezp7+X1cvWsXhSiFRbmqCiMGQGeOCVHhZdcQU3//YvzJo3j4pojMWLjmPz9i3BXbu2 -h7OZfIYD42CG63ePDHjw4MHDG08GDPZfAMg5nCqqw7nk9P8JjHXvdMvVAbm//+OFp2uqJz235JQz -qGusxUJh4+bNLF+2jEx8iONPP5bf/OInfPHznyEaCtLUOp7bbrmVe+/6E/XNEwn7Y/gUP+tWbOc3 -N/2ZqU1NpLtTibau/jjDq+QNtYybpGdSGcK+ANlcjq079/Dcc8/y0GNP8Ktb7kXXhxf62rGzk0fX -7OObTyT54x6DPXWNrPfVUtSqeNel78OnBRhX38TFF13Ecy88RzgYo662uq65tW62ojCO0kIUzk95 -t0L37k6KJzoePHjw8IYSgYLr8EjAEfYIHOAV6Orq+v/tnXtsU+cZxp9zsY/t2LETyI1rGi7hEli4 -3zsuAqH1grZK7daOMaAqaOPSThvStmpbWammru2mQaFF29oBE1QCSjtooTSUGCgtNEBJAiEJiUMS -27HjS+zj67F99kdymhPj0LJOLYj3J33K8cnxybEU5Xvyfu/3PEmdTteycOGSMn2WIb+65jIiYgJG -gw5dogi3O4i6a/U4/t67cLm9ePyxR7By5WoUDByMv7+5CwzLQyMI0BsETCgdgoKiwsjBtw/bZVlW -bCa9AHxTxw4vag+IeaLfh5qGBhz+zwFUVJzC6dPHoGElBMIhjB4xCOc+O4sdO17HhMnfwebnX8T0 -mbOw6/0atHQEcN3hRO2Vy3jsh49AJ5iwY/sO7N69G1drr0LLC0wgENSBQVKSEhH03TKmjpbsL1mK -IAiC+PbEAf09/gaFgCIGvvBDr6ioCESCvprVK9dMqW+8khuTojBodZAZFojHcK2xEU6nCwmGwfWm -dhz+4AO8feQIaqtroON5mHRajC8dhJKhQ+JHjla2ezzeTqUSgJ4wF8GSK3GpxIS83Hy89NLLKCos -QNn4SXht+07U1V/FZ5cv4djRkzh+4kOEwmEUFA/FL9ZvQkfYiz1vHUJjayd++/vnMG/BQjz/h9+h -4YYN1sozSDIsIKcw+f5y3D9nOtvRYjf7u4JhudchTZ0klW7YQb94BEEQxD0pBG7i3PkLgdOnK6oe -evC7Yxcsmjdgzdr1nOjzo6G5FRazCZyGRyImIRIN4UbrDXTYHWAYGTISKCrKQknJgMhx64Wmq7X1 -DvR6ZnvQvQWkc/jQbGgY/Vy70wshy4BzZ6xgNUYsXTIP7xx9H87WToRDQYjBCAAOtvpmHHrnEPbt -OQh3hxMbnl6PDes2wGQ2Y83ap1FXew2JZAo8xyEFGUvnL8YLW15GU6uNvd7cYEzGEmIilUqPk4zj -Zie524nPJQiCIIi7Xggozkvp1q9oa3OGvG7/5XmzF4WHFRePFYMOTbaRR1FBLlpdPhg0enAA4vEU -si0ChhQOxIyZEzGkiI8fO1pVU1vd2KaqBHh6xEB3RYBnvWOGFX/f1eWH1foxWmxONNpaYD1Zidoa -G+JSDCNGl2LL5s2IxmKwd7iQiEbRJYYgSUmEwyF0BQJ4Y9cutNrsyDYZsGHdo5g4aQ4qz5yF0+VG -ltGIqk/Po8Xepsk1GbhQKCymUrLiFa2sRcXR10uaKgMEQRDEXQ/zP1yvjmDUoruJTgfAKOgEy+y5 -s0dOnDhyyc/Wrps7etT4nE6vTydoBeG9w3txvdWOKdOmg5Eckarzte5/vrm3trHB6cLNMZRKj0AA -QOSpVfOPNTVJRkP2AHT6PHC5umA2ZcHlDoLRJPHAkgXY+uqr+Msrf8W2nTshxeJYt24NZs2cieUr -ngTLsMjPNcNgysbFS5dxYP8eLJ6/BBt++Svs378fLCMjEgqAE7SwGLWpiBhuaGvz1KA7i9uB7ix3 -J3odq9TRrbRFhSAIgrgnKgKZBEQfj+hkIinZmmy+T89eqN629bUTtpaWWrMp22k2ZwezLfnto0aM -axeDYce2bXtO7djxr0+8XtGBbgcoT8/o7BEAXpUQEIsHmZJ5w/JmP/H4A1j10xXYuPEpmPMKUGk9 -A44HXHYH9h04iI8+OglJSmCgxYJhQweD5VhcvFgNKRbDvrf2YO2qn+DkyROwnr2E8kllsFZY0WRr -gsViRiKVBAMWWk5mhg8qMsejklcMRwIqkZK+ReXrWM0SBEEQxF1ZEVC/T51BoOmpDmjR7fikR/eW -OwOALNU5oedaJZNb2Qqi7AcV0esKpRhDxMvLC0ZZ8kzbps6aNHbZ936OkvtKEQx24bk/bkGnuxOd -dheanHbwHAdB0HbPy3IKPMcjGo4iCRbLli3BxPETsOffe+H2dMFsyYbH5UUyJUFv1EOKxcHJKcTj -EVgMHPJMOQ5rVW0FgHYAbQDsAFw9owt94zKpV4AgCIK4pyoCyFQRQF8DHrUftJIzHeqZ4BUnKH+G -0YW+DlExny/i0glyu73TM7Kh5fPCG61NiPrcqLM5oGV4TB07CM9sfBLDBw9BW5sdiXgU5dOnYsq0 -6RhXNg55hRZ8ePwYrNZzCPi7wCSTiEsxyHIKMgPIiRQ4gYVOlrBo/nRsffE3GFxSrK+6dDHs94dv -KJUJ9LpZKbnSJAIIgiCIuxr+a7w3PT5THdqjdn3S9lQBlKFkcqfnWivZ70qTnjLZpmKxFGqrvYfL -pgiXCkz6Z+ubG8pu1DeM5WMJXo7IGDd5Bh58eAXmzHfA7nfA1erErzdtwtTyaV887JpnVuPKlXpk -sTyu1jVBjoWhN1kwY9o0BEUfrtka8MKmZ/GDR1cAAOpb/saPLCkcFg5EtC6PGEf/mdsMaGmAIAiC -uEcrAsDN2dFq9ye1MFAmd2WtPdLPULtEqSdf2eUQxfqr9kqTJqvKoGcv5+rMosyxuSGf1+hsuYaa -i6fQ3NGKYNAHzsDC7XKg/kodImE3Ovz1mFc+Ew8tnQNnswusTosf/fgJvPKnP2P0qJH45MwpDBie -g1iXC/94fTvqqs+heNgAQyIWr2lu9VzvqQqEVBUBdaMgCQGCIAjiroT5P98rPbaYVVUAWFUlgM0g -HNRLC6m0/77V91N2KuiNBr1ZI2gt+XnGonxzdsl9owaPGTpyyLSwK5Yl68F5EyG20+MRomKUc7vD -zJjSEjy8eDH27T5o8oaCbGnp+Mjy5SukiuPv4mjlx8jR8SmO4aMTp5TJ5hxT4MAb+45eaXR8HpeS -bnRvbVSWM5RdA3FQIiFBEARBQuCWgqC/oUa9vKAWB+n35HqGeuuigO5GRF3PEAAYdFmCMZFICgWF -5sIskz6L4WU2EpQ4PsWymqQ8Jid/oODz+tu9ouiPJSQmx2SR9XpWsjU7HNFYUmlcVGddB9Hb4xBB -7xIGGQsRBEEQJARucW8m7Tj9++rSevpx+v3UVQYevX0Hyo4Fjeorr7pG8T1gM1QnmDRBos4aUPoc -lGULZadAerMgLQ0QBEEQJARu8+dkEgJftdqgFgScatJPP/4yAZAuBOQMYqC/JkYSAQRBEAQJgW/p -mdWCgEHfXgQuw8TPpl3f3xJFpp4F9a4G5TgF6g0gCIIgSAjcMYIgkzDIdD59maI/IYC0yT6Z9poq -AQRBEAQJgTvwMzBfMuEzX+Ezy7cQBennCYIgCIKEwB38eZjbPJ+pUVHO8JogCIIgSAjcAc9OSwME -QRAE8TX4Lybv2o9oSY6CAAAAAElFTkSuQmCC - -------- =_aaaaaaaaaa0 -Content-Type: image/png -Content-ID: <26389.957885364.4@twelve-monkeys.helixcode.com> -Content-Transfer-Encoding: base64 - -iVBORw0KGgoAAAANSUhEUgAAAFcAAABVCAYAAAA8AHhnAAAABGdBTUEAALGPC/xhBQAAAAZiS0dE -AP8A/wD/oL2nkwAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB9AFAhIKIGIgTigAACAASURB -VHja5b13lGTned75u/neylXdXZ27p2emJw9mgJlBIEAkggkkQXIZlHkoWV6ttVrJKx3t2pZ2Ja7P -UtJ65bUtyaa8FkVZgZJMUzTFAFAgQBJxBmEiJvZ093QOlcPNYf/oauxFoQeBHJAKdc53qupUd917 -n/u+zxu/twT+4T2Ezoo/wrfqQP8QgRW3APaGAyz+AwNWBKSPv/fmD44WE0lA6qy3RNDEH6D0CN9H -zXlZYm/emfxfbav9hf2Tg+/uALsJ+t9pcF+WHEDuLOmturCtrnWkQLbVdH5ZkuTTi2vm051j/73Q -XhFQAB1IdVay815+iy9SBJSizr+9ZTL/BJAHckAaMN6q48s/AKlVAa3zPgLc2HorDIsACH1Jbb+m -RT+T682/nyvVzc+iznrL7uj3W3rVw5NDRztSk45JjxqjiRvOtZHofWZ8Z+9fPPbM9PNdwL5l4Eo/ -CMkVHfOz+ZR6qG4Hz3W0R+hcZNhZ0Q28mcIt+3v/aTKp3LNWDT9Wb1hx1yu+uNFAS99Hqd0EWN45 -2js+Mtz/j3sKyebSWuNKjCJCILhBFykAwp1Htk2KQvQnyXTmo2fOLy1vcSP/3oArAEI2k5kRIu+H -7rv/3rvDMHhhYWm9FJOmG6WuIiCMDKS+HIbhf376hfn/FvNK4jcyfKvo4fsJ7uYFCOV6yzQ05Ykw -9D501523v+vkmZe+5riB3bn4sEuyvusbedfR8X/mum7vc2dXfzHm8kVbUNBbwrvfT3BfAXKlaZer -1fITVrv1Yx9+6H3Hnj5x8uHolcBG34MUiw/eu+eWRrP1a00z/HC5avpdvnR0g7Xkbw24L1+c6YQl -WQgvCEg//c773p448eLZZ7ti/rhxe6MAiPsm87oiRX/VaJj//YXpynxXoBLy6pvI3ydwXwa40rBm -hcg5p+vy/3HHrUevnDx7YbpLfaM3YXAEQEjn+TeiIH/x9MXKN7dw76IucLuTWMKNCtF/kOC+TBGl -Wnsmk1ZqiiL/GkTfLFXq1S6efiMSLABCcYf8kB+EO69cbv32dcLrrdy96DWAja/o7xK4L3sIi8vV -k7LombcdO/LP5xaWv2TZjreFBMddOjEGngiImVHGBMJfsWv8rGtHdH2+FZC8DqjX+7u/M+C+LJ1r -5ebJSml970c++L6Hnnvx7Ne2kJiXfeWtVqqPz4aW8PP1UmR2JYbELdT+FRFc7GbFpV3sWtdzL/9W -gHs9HntZQust69HK2tJ7//FPfXLHU88+/1wXMJsZNa2T8NE7obNeGBd+KXT5Um2Zuc7nShf4cZCl -LjDjWTqp879K1/+Jb0CyX3VR3wtI35W6vI7jL2VSemqkv+fPP/DQhz77W//P7z3ZxbubF/8ygNke -blEMaby0EHxxMzAYG0ru7uspTIgCo57nRK7nlBCks+evVJ6/jo+7lWTHDZ/fFXjEX7OVTRC+C4mL -q1L3a15Dfa5HCWxxkVImnUzumRj7kwfe8+Cvffr/+u15QJgY7r+nv9jz6YH+gYHZ2ZnLl2cXfj0I -AyWblz++tup+rtBrHMjlEnf157O3G5KSzOeLeJ6H69p4votpNgjCYNnzo98/eX7lT7sMm7AFN0dd -QPqA13ntXSfKi94oLcTVKK4u6haqmYg9x1dyi9dGbG1+hxZ7Vh3XE+qN5pOOZf2aphvPVKpVxkcG -/8D3g+G777kH3/d7dFUOfM+6X1IMc2yi/2d27dr5YFJPbh/o6VdDV0AQdcJgQ/tFUUYUFDLpfDqT -Tt/bk1XvaFut47YTBZ1jajGNUDvnEqeHbj4WtqC1NyRRAq+uHGweRO06aPfBX+sEXuUlbJFAiTrS -ABBJMLlrYviTdTv4DUMW/ri/f3RClgxSqSzDw7n2E099J7n/0AH80MfQVcrldYQgQBZErKZNEILv -efh+QCQI9PX2MTQ8jOfZXLry3MzzZxZ/yg8iNyZsQlcOwo9JrBN7jueh/c45B3Gpl18D2LikajEp -M7IZY3tCU7fJUpTpyecGdC2RSiRSoq4lBUmSxX37DgpRFAmjoyPMzc0Js7OzeJ7L6Ogonh9U10sl -q91uoypSJEmSOzUzs6rreuh5XrheKrUXV9dKm+oWQLtUqT5W7Ov5V6qW+urFi5d/7uMf/Un27TtE -uTGTvMV2WVpeYOfOCRYWZnEsCyOh4vs+ohAiiuCHPpbpEAkS5XKLVNJldHQMb9yaqNfMT12YqfzG -Fp5BELv5m4CqgMUri5rhFgGPsBW4m8DKMVATyaTWf2DPjk9oonxXykgdzKQzSsJIIqsGAwODyLJG -b08R07QprVfpzfYRRiHNapPIj0jqSUQjjWf7mG2TlJZACSUK2RyyJHHz7ptIJlNYlokgiEiSjGm2 -Lcv3n3rkW48eP3PxpWt+KJ4ZKEof+PjHP4rjtllenWXm6lnm52a5447buXDhHGarDkKIFGjYtotv -u0iCSOgEBLaDJCn4tKmurLBzfJSx0THqjbW7G6Z1fHHVOhnT1HhaclMyNzVW6gAMYG7BueH1VFWM -SawOpI4cO/yz/T29//P+XXvUYrYXvACr2abdtFiut1BUHc/zERAIggjbdogiyOay1BtLGIa+UU+S -ZVKpFM1mk3Q6TWl9jchyMdttJicnCaOIVCpFFEW4jkMYRezYu5+HPvQQ80vXnJ/7p/9TfdeeyeKl -qasEIfze7/57PvzgO3nvu97Nr3/q1/nZf/IzSJKI5zmomky72SKwA1zbwzYtPC9AEkQSegJdTzAy -OszA5ACW2+TE808vPXdm6V9u4c8GMePldMBsd5YJtDrPTowyXvYmpC6pjfuRyWN33Pmr99/7zl/Y -t/uAtDC9yNzVWVbmlikvr9OoNTADC9tu44cOrtvGD0yiyEVVIyyngaooCIKAqqqk02nCMMQPAkzT -JJVKIIsufcUsghTQaFaQ5YhafR3Pt1hYnmdprcqpM+fYtWeffM999yeXV9c5dMstnDl7iumZKVKq -Sn+xn/n5BZrNNn4QYRhpFFnHtnxCL8RxXDzPJ/R8Qj9AEQXEKKLVbCAYEggiuqama7VKrWl69Zhh -VWOlJykWvARbeBBxV+1lD0Tqklpx01LefPOh+z724R/59J6dezn+5DPMz84hI3ZEWyAioOnX8EML -P2gThiae38KPWoiKC9iE4QYl+YFDq9XAcS1EMUI3VGRZwA9MvMBBVkRsz6bRbqAYKn39vYxv34Yd -RFydmeXFU6ept0yCSGRgcIjZa7OIsoIiaRT7B1leXWdhaZ2x8UnyPQOsrdUJULBdC8fzkGQJRZaB -aOP8xQhZElhYX0U3EoyNb8NsN7Pzy+XLMWCVLaK8sPPsd62t3DJB3qoMA2jjY2O/sGNwnAtnznPt -8lVSCR1VlRGiAM9z8UKXKIoIgxCCgDDa+F5RijBNB1GUMHQVP9gwxJIkEYRgNmokEgmCMCST66PV -auM7Er0DO9ANnXK5zErVoXx1iUJPlm07h1lcrDA3t4wgytQaJoqaxrID9u+5iVqtQd/gds5PLTO0 -bS+rqyWM7Ahes0ZoN0nrBrIYYdZqyLqC4LogQCSG+H6AJCmMju6gUW+Pv3hueshyvFrMUG1SgtJF -E3qHd5WYZHdHbpHUBawCaHfddefeH//Rn/gX5mqdxx/5G3RVRtcU/NDBx8OLXNzQxw80BBREQUWU -VAI/QpZUfC9EECSCwMVxTaIoQFElwshDkgRUVSKTzeJFvezacytDI7vIFkYp9IwxPLqbsYn9DAyO -02jNM3ttlkQyh+9L+KFIOpMn39MLosTySolDt9zG7PwymVyRw7fcgZbIUambDI1O0NOfwnJt2mab -SAjxPRfbMnEcEz/wQVPxg4jdu/YxOraNmZlpc7VcqXRJLF0GLtjCJfM6y9+KFsQYuPonP/mTn/zQ -hz7ytvmLV7hw7iyI4IUefhjghQFeGOKFIWHQMZCCgCAIRBGI0sZ5SaKMKHqoiowkyng+OE6IJKeQ -pCSKmmVoaIJSqczs3CKimmRhpULFDEnmRxnduZe2WeWmg7fSrIWUSxbpVB/DY9u4trSIqKpUWz67 -9hxkdWWNZMJgbW2VEyeOoyeSuJ6LbddJpwwUUcB1WkhiROQHRKGAJKoYqoJlmh1qGEdWkJ8/dXY6 -VpGOS+Km1G56D3YHXLsL3E0X7hWSuxkgGJM7d/yK2XIGHn/4YdbWV9ANnZAIUZYJI4EgEogQEAQP -UQpBjBCECFHaOA9FUdAMHc9uoSgKkqDh+RKCmGR4ZA/JVD+ilCTy6zQaZZZWl1mt1DByPbR8ETmV -x5cNVM2g1RYpZMfYM3kztXqTQl8vs4uzSAkNxzNYWS1z9ObD7N01ydrSAhcvXUSUJEzbxmu3kSJw -7CaRbxP6DkIoEIUSBCJy6COLIl4Qsn33DoyUlnj08ScvdIX0USyw8WISa3WAtWLBxCvcMrk7Gtu9 -a3vxnrvuPNyXH+SJICCbTiMS4fkeiBBGIWEQEoYBoti5L9HGs+97G2ogSoiI5HK9BGFEGCkkVINE -skAun6daM4lCWKmW8Yko9BRJF4aomzb9w8OUKlValsu1+ctkEmn0QKa6eoXJ7aOMjo/zX/768+zK -7SFCZP7aKs1dLr65zvDIDm4+HKEm0rx4+iyRbdLSgMjHbnt4poMUBkRCRBD5BMHG6Z8/fx4xoXL4 -yMFNbyleHN30BMQtos2teiCI04IYN2THbjnw0PjQyLtPPPk05eUVhDDED3xURSYIA8IwIAx8otBH -lCQEYeO+CIKArhskkykMI4koSQRBiKwYJFM50pkevEDAdgKaLZMgDIkIcL2QIFJwApGm5bG4UiGR -ypMtFEkWR7k6s4SeSHPfvfeyd+8ujj//DK5vMzs3RyozhusEhJ7HttExPvbRD/HEky+gJdIMj24n -l81hGEnS6QypdIowCAhDD8cxcT2byPVAFIgkmXxfD7Im8/zJcxe2yCNvqrsVo4JNn9ftvPe7aOHl -u/Fysri3p++Ogd5ecB3sdhNJDFHEjbuvSgKaLKLKApIoIEnyhkETZSRRxfcjPC8kCCJEFHKFAUQp -geOJLK1WcLwQ03bxw5AgjChXmwSRhKqnQFCY2LGHm246yk2HjtJsu7xw7iq7Dx5Dz+R58dxZnLBB -qVLB9UPCUMZ2I1KpPNlcH6Zt8e9+9w/J5ArISopGyyaTLYKcRNYLaHofg6O7KfSPIicShLKAIIl4 -no8kSWQyWYIgYIvEObGmle7gItziOdqqV0wExPe///0333HsGG6jhqEpaLKEqojoiowqi4iECFGA -LIKuJpBlDbFjXGVJw9BTKIqB4wTMza1TaziUKy0Gh8YYG9tBIpkmmc6CrLB330G279hNNtfDxI7d -SJJBrWUxt7jC5alZDu7dT+j7tJs1FhZmmFtYJxIE8j0DVKttjGQSRde4OjtDo2Xz9PFn+aM/+hxI -IkEUUmpUGRwbx/FFikM78QIdpAyZwiCKnkIUJXRdR1VVYCMyVFVZv04KNYpRQNCVrAnihmwTULm7 -lysIgp0XT59hZe4aLdOGTJYgCtETBoqk4roBhAGqomLbLhEgCiKyKOK6HpZVRdM00pksucIoqWyG -nr5+5hcWuTa/wMDQCOlsDj8IWF1eQRB9JC1F23SotEzQ0ly+MsP+AzeRSxqceuEUoVnh9AtPc/LZ -b3L09lspFAfJFYcZGRth9uoljKQGckgyqXHsztt46eJZRsbHMc0W56+cZ7h/iKXVKgNDk6yvyjQa -DTK5QcRodYO+FA1BENENg4SuJlzXd7fIF4Rdvm8Y42N/qzL9K0oXud58enb2Gj25HDu3bSOh6yQM -HVEAURAgClFkCUWWIApRVQVRlDaOEAToRoLR0VG2b99OX1+RVDpLEIicOXseP4goDgyhJ5KsrK5y -4dJlBKQN7yMUmJqeJZFM027b3PG2u1BkhTPHn0B2G1SWZxnpz7Fz+zYM3WDH5BiCYuBHLj29eWy/ -zej4MHfffzerpWUGh3s5efp5EmmNZNpgenaGXL6P9UqLRKqX4ZFJwCAKIQxDyuUyvu8zNjbGyHB/ -pstYRVtIqx9zyfyuisTWLaT5ntzQ+lqJ3t4BevNF8qkUCVVGikJ820ZGQEZCQUYMJdqWhSCJpDMZ -Cj295PMFZFkhDMAybZbW1/GBsW3b6OkromoaKytLRFGIAoS2hy4bOJaPYWTxvYA7jtzMYEbn2unj -rM1doVWr4viQKoxgBgb1RkBvYZDJ7btot5r0Dw5SHBrl8adOYIUiiUyB5bUyt9xyhCunXkL2A1Kq -wOL8ZQYHe/AC0FMDaKkhhGQKJaViGNCfyzFSGGGodygbC3OFLYIINwauF5Pi7j6IV4I7c2nmcqVc -xnMjMtkijt1GCHz68jkG+nrRZAVJEBEjEUmQ0FNJAgFsd8NIGYkUmWyBldUSzZZJtlBAVFVsz6Nt -mSwtLeLYNo5lUuzrRRYE5mfnaTZMBCR2ToyjhBZf/NzvUJo5RUqTcByP3QeOUncU1mo+1VbEyrKJ -02gyuW2CSrnM2nqV4fFJ1GQCPV2gWmuxurJGwciwNDVFSoWkETI9fZZsLoEXCKiJApGewMMnmVLR -EHBqHpFFbotkf9AVJLgxnvWv15n5qnq+KAluKAgoCaPzaYSiyARBQBB4CAKIokAUBeB7aKpCJp0i -k0lTqVS5Oj1N/8AgvcUBgiAimUwhywr1eoNsNkcmk8V1fZaWl1iulJnYtZ1MPsHuXaOsLF7h63/9 -59jtNeTIpFKtMTw6xvmLl1FVne07dnL01iNcm76KRMjpF0/QV8igyiJ7d42ytrJGJpmkkM9tREWK -gCCFrK0t4HsmouAxN3uJTEom8s0NF1KU0DSN+flriKLAof0HCoosq10+bhCrSsTpwLkeJcRdjJej -kInt26eSPQWWqzXCaCOjFRFg2W0azQaua20AS4AQBUS+S7NZZ2VpmSiKyGTzVOpNHC9EUTRKpQqV -SvVlUE3TJp8vkMrkGNm+jYZZo6+YZmXxEpfPHSd0SoRuFT9oMbl7D+vlKv0Dg7RMC9NscfbkSW49 -ehO3HTtCWhdZvjbF4b27OPH0Cf67Dz5Au9Wg2WwQhgFIAcmUynppmbn5K7Qaa0hYLF67QH8xRcJI -ISCjaRql8joXL51n9+494r7JnYWuyCwuofFyz3UpodvNiIDw2uLCybptc9+DD9Jb7EOUwLZNqrUy -YeghySKCGCGKApIYEbg2oe+iqgqeH7BertJbHEDVE7RaFkQiimzQbFikklkSRpowECCSsOw2hUIG -s7HO8vwlGpV5KusL6LpMtpAl29NDKCoIkoJhGOSyWVRVxjZtJkaHSMqQlGBssMCB3ROsLS2T0BUG -+4vIkkgmmyaby9DblycKHFQZQq+NJvk0Sqtk0z3IcgIQUFWZ8+fPkUwmeOd994zFcOnOkG0C676W -MesGNwSCheXlZ64uziEmk2SyKSyrjSQJJBIa2VyadDqJrqsYuooQeCgSiFGIaZlYlsXQyCjVRoty -vUUqnUeSVEAklysgCBKCIFEuV8nn8rhmk2tT57l6/hRuvUTkWQwODpAq9JLtG8YNJfoHh/HDiCAI -MC0TVZaw2y3WluYoL85QXbnG8Sce5+KZUxw9fDP5bAZNlUklk4ShQBBAf98AKSPJ4twcTruFKoAS -RZgtByKRMIyQJBHd0FleXkURpEFZEpWu0DaIGTG/q+pw3Y6bePZHajQa5dGJnZ84dPiomhPazExd -Qjd0enp6yefzCKIIkoAkSfj+Rk3M8wNUPUEyncN0fBQ9RU9fP62mhW05KLIKCKytrROGEQMDg6yu -LJOUQ5Znp8joCookoqo6WroHIz+MQ4KGBaqepGXaqKqK2awzOtjL+GAfa/OzjAxkUEU4dvQIiWSS -VttmeWUV1/Op1erokopjOfTks1itJilDI7B8EooOASTTBYgsBByEMCCKZDQtjZpQhcXla3al3lyN -Zb9anVUHmp21mbCJrgduFAfXbFtB7/D4vn17D+wpKg4nXzhBuVxBVjWqtRqlSpkgDBFEEc/1cFwP -UVZIpXMIooakJcgVilRrLTzHJ5fLE4YR9XqDTDpNb0+Rq1evIokCVmUBQ4KUruGYNj3FIfTsIIFe -QEwUECQD03aoNVokDR1NFhnsySNHLoFrsjhzjnazzlNPP83ly1e4+977sV0X03FQZA3P9NE0jVaz -iqEpKIKI2zIRQoF8poe2E+A4NUTBQhbBtkI0Pc3eg3txvJZx7uLUhQ64m8A2gUZnmTFq4PVo4eUa -/ckXnvn3337i6zR8ifHJw4QkwFdJGwXaTZ9G06fR9onCiJSRIJdOIYtA5JJQRarlRVIJgVRGBhxK -a0sErkW9tMzK3Euk9TZ++xq2tU42n6TpmLiSgq+k8CSDlh2iqEkC18I1WwiBTyqRxG6b2FaLRn2d -2269iRdePMHcwgzJlEFxoMju3ROISIQeNOptbMdCkiRCZFQjixNKhFqCtu+zWFmjZyBBOp8gCCPc -IEIzZBpmhUJvL+9690PZbWODg1sUKoMuro1erxHvFX1SlfX1+vi2vr3vuO/9k7fefg8ri+sszi4R -edBs2Wh6imQmjyxGGy6PrBCEAa7nIxBu5HaFEC/waTUbDA30Y7daeGadvoKG3VqmUZsDEZqOjYOM -mMhRGNyOg8rg0DaWlpZJqjKtRpN8poDvBOgyFNIqIwMp/vpLf0YmreH7AYVikR/5kR9DNwpMz8wj -KwaNehMhcrAdE4Bmq0kkiggiKIaGLwS0rBVuu/VmGvU6rXoTQRLp6SvSUxwile2hXFkTLl6+cqWT -DYvTQqsj0e7rce5Wzb+i57mXewr9Pzo2Mi7VqzVeOneWZrNJPpchndYRIg9dU4kiCCKwLBcECT8C -SZKRJIVatY6hG5RWVunrKVDIp2i1qqyuLpFOJ/EjiTCS2L5zH7YLbSdk28QeTNMjmUhit5qk0lks -y0XXdJIJhXxSIanB7slt9PflmNy1m92799FsOyiqxuy1BTTdYHFxkaSh0W43MdtNrHYLVZHRNAlN -VVA1Fdts4dkOtx09RiFboFJpUKtZZHJFLNun1ljLvnThwskoijZpYJNv2x3A/TcC7qt6GNbXKs0Q -0bg6M3PbwYMHufmmQ1y5dBERj75CmkImgSirOI5LGEQb5R1BwXV9JEmGUEAIwXdddu3YgSrD1NWL -mGYTSRJotduISgJVT1HoHcILRIZHd9A2fRTVYH11DVURaTRa9BcHqFYqGJpEQg0ZHczRm0vw7cce -pa+3yP4DB3jm2efoHxhhdX2NdCZDrVZFQsD17I0ctL+h0bomE4UBRBFEYDbbVEplDu2/idtvvwtV -TbJt+14OHDqCIPni2bOnrzWareWOtLaBWgfoTXCjNwJu1A300tLimbbVuvvIkaMDtxw5QuC6VNZX -8Kw6uioSomDbDoIgIckKCBKOF4AgIgoiKT3BkcOHaTUqTE1doN2qEYQeju2Sy/ci6UkSyRyuL5Ap -FEmm8hh6mlqtidXhV1VVMbQkltlGEUL68gkCt8HMlfMUsllUWcV2PARBZs++vSwuL5FMGSwtLiKw -QQNRsIFBFPposkQYbtgg17GRBYFWo8n87CyqmuCBd76Hvv4R8j1FkimdE889W11cWroSM2ib9OC9 -lqfwel2Ogu/7YRC432nWax9VFd146IMPkcukuXLpJaqVUqfo6CHJKkEIYSRS6OmlUq1x8MBBDu3b -T6te5eyZ5wkjB0naKAHJioZpe+SKQxjJHEEk4gUSkqzTatq4jocoimRSOvVqHT2RJPADdFkgnZQZ -G8zTm09QWlklQsD1XA4cPEjbNAnY8GRKpTVaLQvHsVEUGU2VCXyXjYTeRjQbBi4EHroq4tkWpXKJ -5dV1ltdLrJcr9PX18MyzT1kz12ZOdiR10wUzYz7vmwL3Ffu1TNO2SqW1p4IgfF8QCMadd72NWqXM -mdOnUEQNTdURRIkgjDBtj77iAHfd9XZ27phk6vx5nj/+FI7bRpFDgshDkVUkWSed7SVfHGJ1vUIy -lSOb78MyPdptC8/xkQSJRELBc31kRdswBr6LoYaUV6bJJjUuX7xM4IfYjotlWViODUJErV5FFCVc -NyIMQ1RFpl6rQhSgKiKiAIoio6ohlllDlSFpqKQzKZaXV7g0NcXi8hKTu/Zy4eL5mUtXzl/sANqM -tTJZrxdEiNfbwhSLSOxyrXHm2089+aOPP/X0fCDpfOQTP8U973wvzWYT27bxfY97776HT//mb/KB -970fWZI49eKLzExd2QhDUwaObaKpCpqhIYoKqVSWcqVOMpWl0Fuk3baxTAtZlJEEEbPVoidfQJZF -FEnEd2xkReKHP/YRCvk8mUyaXCaLgEC1XAYiBgeLtJo1MukEq6uLGx6M69I2TRKJxEa4FYUEwUZj -i6IIqJpI26ojiAG208QLTMLIwbQatFsWpmnWu6oSwnVaZN8ULbyi69u0zFLbbD0yNrpt56Fjt0+M -jGxn4qZD7Dl8lKGJ3Xz0Jz+JIOv81z/7POvLS8xNXUQMWqSTCpbZQJJk2raPbuQZHt9NIGik0lk0 -WaPdsJFFFdsOAAlDT+K6HmrGoFytkUlnUSQRMXQwGxXGR/qZnr5MhIWqSzieyTvecS/5Qpql+Xny -6RSryyvYgU6j0cSslOhNJ5CjgBCBdhCxVquT11wE38Iya0gKuJ7LWrlKIplBkg3uvfedfPmrf/nc -ytryakdiNxvvzFiO4bvi3FcBXK1X21/66n/7+vy15WttN5jce/ut+bn1GrfcejsD/UX+47/5DPNX -LyMFbUTfxPUbRPi4jo+iJDGSBUIpiaRmMJI5FEQKmTy25XF1aobBgRFEFBRZJQgj7MjD9TwIA3RJ -wGyU6C0k0dQQy2pQayxh2U0kWcB1bXZO7GB5YYFWrQGhSMURMNsmmgAZQ0MkwidEz6QxrRZKfR4V -GyMhIUgRLcvCC0SSyV727zvM3v373d/87U893lXtjXc2vmYgIb7eDsdYRrZsCwAADsZJREFURLLZ -CNH847/4wy/8/C//k/f94s//jz/2hb/80z9JpzQWp69x+rln2L1jhIQcktQEVCNDywZBzyDqaQJB -ZXBgCE0WsVt12o0mYRBimW0md+6E0EdVRKIwwNBVDEVHE2XSRgLHbqMqYCQgwsZxGtz5trdTq7UZ -HZmgXKoBIg8++H5arTae69CT1YlCl0DRKJkBDgqB3Uaz1uijgtheY7wvw9F9e+lJZ9BklZ7eIoqe -YGhsnIuXz61fZ9dOd6sTbxbcOMivAhioPf6tR5/xrNbE8twsn//Pn6U3ZzA/9RJeq0xWBy8ICUQV -HxVf1Mn3DnWaki16UgYiAp7jktQNErqOoalY7TqBbyJEHm6ziRoJRI5FYLWQcGnU11hdvUrbLHHT -wZtJpfKYpoMkyczPzbNtYoL77ruXSmUV2W+gyj6e71EzLSIiBKeBOXeWYUqMF3QSuIRmi4XpWSRk -2qZH03KRNI1HHv3qUtc2qXhztMjrjM16o+CGXYU5G2hnc9nBu+6+684D+/dz+tTzHD64m9LKHKMD -eQwlRPRdCpk06VSG7Tt2IUoqYRAhBAGC55FJpqlVqiiiSOC5pFMGZruBGHmoUkDkNNEiF6dVoTeb -wDVryILH6to8hd4MFy9eJJ/LMTU1ha6piBJcOH+GIHScYjGL114lMNfQBBPVr9NamSLpVeiJarx9 -/xg37dtBFHhMX5mmXGpgGHmaLYd0tsDEzh088+wT89eLYN/I3uA3M0/mVTQxtmPygUNHjyGqGplC -ASOZQJQERCGgXl5j32AO3W2SM2Rc08RstZBEiVw6QzaVplVrICORNAwMVWZhfhZdFdF1EUKbpOKS -0j10wSbymihiyP69k4Sez9rqKtMzU4RiUNk2MYIgBayXF3jq2cfXf/lXf/Hc0aP7qJdmaCyfR6xc -pNebZ0KtcsdkL2lMArOBqCdxBY1K20fWCjTbIc2WS09vH1dnrlRXVldaXbZJejPewpudzhRvjKA4 -tu1Yy4uo2xZ2EDGxazeFvuJG/1c+w1AyolVqIUg+lVYdAhHfcdELeURBoFKusn3nTkRBxHYd6tUS -o+NjCGKIIAVUy/Ok+orYQQsCjUppBV3RWV5eI5dLsO2uET71r37r0tuPHT4yOjqsprMC//GP/vzi -5alrc1/+yp8f3DM5qib9CsO6QMKuoUcht47vpF89zNx6hTPTZeq2RK64A7mgY/oKd997C/fc/w7+ -4r/80bXrbAAUuwTzupuuv5vRV5v530jUjB25gWFqloPpBVyZmaN3YIh0TiXdk2Z3UkAT4exqlSgI -2TZ+EMsJMPQk6ysr9BZ6yaZzhFGA53tk0imiKMS1bXRdQgib+LaIpsgookyxt4f+4gCFbB+TuydA -8HE913v0yWefHO7PbPvqN4LqwmpjGnBOnnlhblt/dufhnUPsT4dkTbj60jQ56iwKAr6SYqZUIRBT -jO/byey5aXKFAvfc+y76+4vh3zzy5Zmua5auA/INoYVXRXITE7u4+dBe6rUmkR/yjUceRlUV1tZX -ccOA4kAfvTnokVfJWFdoXHgCa+ES1YVpZqdOkWSG5txllHqA3KiSDqeJGk9DbRa1KZKIFLzGCrI1 -g9ieQg/WqazN0bCbVJwWp849j+N6lusHzZnF6vGF1caZTZepWm9dadcWSSVV1GQ/1aCPNb/AtWaK -P3vkBdpKDtnIIatpREWnVKmy58AeRsaKfPnLn581zbZ3HVqka0vUDaOFV6jI1MXLfPuxE+wZGcJu -tRkdyBKFPtPTV5m51GJX+gHWV68xmmtz+4EJZubaXJhbxGspFBNraJZLY3WUsV0fwG5dRNWeI5Lq -VBujZKUikdBk+zaV0Ckz0DfEuYtVxFaDIwcP07djhOX5c2HMizFjqUC7aXFmvb7y3iuKxsmzK5gV -nz277+E7ixbnyj6jcpr+4hiakeHCSy+Ry6Qo5AzOX3gx/NznPnO5S9WjLaRVeL0BG9/LRDxhfXm+ -NDdzBXN1CVnTqLUs9u8ao/GczUhPnnLZRlWT3P/eO1Bos3e3w95rLU5PneKudx0k9FXWF/v5+lf+ -mOKwwtseGKLQP8nidJavfulbDI7Y/MRP/BDXzr3ASHEPw4UQVU4RrfvsumMXV86daHeiJDuWb20B -dtsM/TnTWXbM5uDIyDjZPo2db7uVb33nSbRCEV80cD2L2bmNNqoH3nU/B27azTe++bXZer1ubVEy -32oszGsOuPhuaUEAkCLnxLNPPMbg4ADvePd7KDXbXF1Y5oH3vZ9scZBqpONoOf7669/gyvw0ckHG -al7jvtt76UsuMjzcYrRvgaMHLN59T4E92wR6jDoT/Q57xgMGB1NIakRPXy/T8wssr5XxbJ+luUW2 -DY2gKIl6xzXcLCDWgApQBWpr7fAE6Sy1KGR4726uldaYXVzmnre/k+q6yZWpJTxf5IMf/giFnhRf -/OKftv/DZz5zrmunTve22a3Gw9wwyX35TlVX57504MH3/NKxYzcRuD43r93J/OXThH6TXDrDuXKL -cmkeMahxbrnCkXmfpDDMoJDBcSwCrwGCimFEjOwY48rF59i+bwcyOqlUhnW28Sd/cY5iX5LvfOc0 -ojiOvvoUY4cn8HWLk2fPrccoYbN4uJnMDlbnWg/fvF/5oK7qzMxcpV22MCSFpx75NqlMnluO3kEi -ZVAc6OXC5RfDL3zpS896nudtsVvd6wI63KJZ74YNsxAAsV5rlraNDLyv2fb6jVSebD5P6LucOnmc -kICe8UmWGnUagYCU3IbLOKY3xMOPnuexx+ZJZbKEYj96ejsXLy/zB398houXljl89AN85ZtXyOz6 -GH/16ElaJLnzPR/jxKV5Ts1O8wu/+nM89uxX+cM/+MvjjuNtAlqOSW0dsBzTL+2ZGBrLJo3t46Oj -/MtP/waH9x0ioyX5wHs/yJH77+OmWw7iR63gt/7v33p2ba1U6soIbkak7a5kudVZHq8xwe97AhcQ -7WZtdmFp7Uci0eDQzUdJJjXOnX6BZr3Ezh376evvwwkEVGOAnoGDVBsyc8tVlFSa+YpAxcriacM8 -/NRL1IOIpbpCqv8QFxY8Pv7T/4zJg0fIDRX59L/+HZxI5Zf+xf/Czbfu5//8zU8tnjs1fb5z4ZUu -YDcLiEGt2jw3ur3n3vnSQqZcLXPo1tsYHZ1gYHSc2dIKU7MXmr/zu//6WxcuXlqP9YZ5sfb8dhe4 -ccMZvFYd7XsBF0As1RrLupFMOZF8649/4ifQNYWB3hTZhMal46fpzaSwLZN602T37gMEvs1qeQrT -r2H0HyI9uB8lP8rzl+aoehq21IOUHmOhYmE5Hk898whf/8Z/5R/99D/iQx/8GOPDowiByz//5V89 -4dh+qQNmGSh1AG7EdtqErbZtVertJws7C6NT64tDJ86elsZ27eWRbz+++LWHv3Ly9373t59aWFhs -bzGwonvvQ7urOOl09YrdsDEsxDepAMl3vffBf3v02O0f37PrIBMjEyQVlSf/6vM89/wTzC1fo394 -iJtuOsyttxykUb1Gs1XiqZNLZHI9vO3Ou5idm6O/fwRdz/Cnf/YF1lYrSHKSj/7Q+/ixT/wojz3+ -GKlUFs9zOPfS87O/8r/979/qALsCLAHLHZBrsQ0gmxvEc0AWKHRWhv9/OLLGK4cTb4Jsxri8Aqx3 -nusdDWl3AXxDBwi94sZcnbrybSFqppqmf6R/9BByapRDRw+TKQ7RckCUda5eneKl8+dYXF5naaXO -xWtXKNcrVGtV1lYrvHTuMn/zjcepV1scvulmPv7jP8X9DzyA5wv8p8/+vyhaxInnv934/d//T0/Y -trPJtaXOhdc6F76Za91s3OjOAyi8eqZj3DtwY/vLWrEOm3asAmx31dCiG+3nhl2NwdZ3vvP8b1yd -XT3p+vzKz/wPvzTcPzrMA4MfZMfeI0hCxNSlC6wszTM7PY1pNikUDSRZBrmPMAwYnxxg3+EMR48c -ww8Cas0mjdY6mi7xxJOPUCpPt77zxFNP1WvNeqzMXY31E1hd/bNC1wyJ7n1mm4ZLie2aDGPGrBkD -047tlvS7poJwo2mhe/iF2plfk5Zkqf/DH//hH3773Q99aHRsYlQWZXbt2M7c3DKpRIpsOkvCkJmb -m+f4c8e58223s7q2wvbt47iuQ6tV42tff5jdu0ZIJFQe+cZXOH78mdWZ6cVnXNevd8BcBxY6dLDW -AbodA2BTopTOlJMUr5w2neyszanTcXC9rtx1I/b9zS7teEs4t9tz2JxHbnROPgf0jO/cddvR2972 -jg995CMHp67M9OQyvTzwzgcQibh0YZmTL77IsWOHcT2L8W3DPPrNh/E8myuXL2C3lzh96mS93XIu -Li6sz8bcolIH1CVgtcOF7S7Jjbo2jCdiPJvqGnYUnyG2KdF2F++2YiUet+s4bxm43QBvGpFkx4jk -Nw2JkUqM79i1a/Ke++4fq1Rq/Yvz1cz2iQlNkhDmFmbYsWNMOHfudNho1Jori8vVVr22ZLadRkyK -zI4ErXXAXekYsVbMuvtdjr4Qm9VjdE2I0mNTmOLjvePca8ZK6VaMb1+XGm7k7zMIW0wb2VTHTAzo -bOd9OiY5Wkw1pa52eTcGbKMD5lqHFqodqYobmPgkD6HLs1FjgOpdE0HELbrIvRjXOl0jAAJeZ/bu -jfwpg6grqRHGJGBTnesdUDddoVTXfDEldk7d4LZiBqzaed3qUtHu5EoYA8zvcrU225HiowaFrr9x -Y3/nbjVT4Q27U2+RFMfHA2oxMBNd6hmX3nhhNC65ce6Lb8XfasZM9Bpz0iReOetR6RoBQNeGPm+L -jdOvOzH6rf7ZFoGtJ4eqsaXxykFwUpe7F1fPuGpuNVvmtX4hStjipktbVHTjm6fDrr29b2oa9ff7 -h4deawKoGDMqxNQ5Dp7XtYl5qxHZr6eu3Tv1hS12p0dcf3D8Gx7z/YP4PbQ3MnBzqyz/VkPio+/m -otl6hm53Nfd63x29mQv9QT+26mh5o/0U0RZtV2/2Jl+3w/M6x+LvErhvBOw30st2I7Tphn7v3/af -SewGOrpeVeRv4+P/A9Q+PxXM9RiwAAAAAElFTkSuQmCC - -------- =_aaaaaaaaaa0-- diff --git a/default_user/local/Makefile.am b/default_user/local/Makefile.am deleted file mode 100644 index f14aa4a6da..0000000000 --- a/default_user/local/Makefile.am +++ /dev/null @@ -1,8 +0,0 @@ -SUBDIRS = \ - Calendar \ - Contacts \ - Directories \ - Drafts \ - Inbox \ - Outbox \ - Trash diff --git a/default_user/local/Outbox/.cvsignore b/default_user/local/Outbox/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/default_user/local/Outbox/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/default_user/local/Outbox/Makefile.am b/default_user/local/Outbox/Makefile.am deleted file mode 100644 index d9ccc4dba4..0000000000 --- a/default_user/local/Outbox/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -defaultcalendardir = $(datadir)/evolution/default_user/local/Outbox -defaultcalendar_DATA = folder-metadata.xml - -EXTRA_DIST = $(defaultcalendar_DATA) diff --git a/default_user/local/Outbox/folder-metadata.xml b/default_user/local/Outbox/folder-metadata.xml deleted file mode 100644 index 4452fb9e0c..0000000000 --- a/default_user/local/Outbox/folder-metadata.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - mail - Outbox - diff --git a/default_user/local/Trash/.cvsignore b/default_user/local/Trash/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/default_user/local/Trash/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/default_user/local/Trash/Makefile.am b/default_user/local/Trash/Makefile.am deleted file mode 100644 index 25def5bfe9..0000000000 --- a/default_user/local/Trash/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -defaultcalendardir = $(datadir)/evolution/default_user/local/Trash -defaultcalendar_DATA = folder-metadata.xml - -EXTRA_DIST = $(defaultcalendar_DATA) diff --git a/default_user/local/Trash/folder-metadata.xml b/default_user/local/Trash/folder-metadata.xml deleted file mode 100644 index 6f1acf7a4a..0000000000 --- a/default_user/local/Trash/folder-metadata.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - mail - Trash - diff --git a/default_user/shortcuts.xml b/default_user/shortcuts.xml deleted file mode 100644 index 3838b14164..0000000000 --- a/default_user/shortcuts.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - evolution:/local/Inbox - - evolution:/local/Calendar - evolution:/local/Contacts - - - - - evolution:/local/Directories/Bigfoot - evolution:/local/Directories/Netcenter - - - - - diff --git a/devel-docs/.cvsignore b/devel-docs/.cvsignore deleted file mode 100644 index d436efd0f7..0000000000 --- a/devel-docs/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -Makefile.in -Makefile - diff --git a/devel-docs/Makefile.am b/devel-docs/Makefile.am deleted file mode 100644 index 74a5ff5b60..0000000000 --- a/devel-docs/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -## Process this file with automake to produce Makefile.in - -SUBDIRS=camel diff --git a/devel-docs/camel/.cvsignore b/devel-docs/camel/.cvsignore deleted file mode 100644 index 56d9506207..0000000000 --- a/devel-docs/camel/.cvsignore +++ /dev/null @@ -1,12 +0,0 @@ -sgml -html -Makefile.in -Makefile -camel.signals -camel.hierarchy -camel.args -camel-decl.txt -camel-unused.txt -camel.html -camel-decl-list.txt - diff --git a/devel-docs/camel/Makefile.am b/devel-docs/camel/Makefile.am deleted file mode 100644 index 276059cf88..0000000000 --- a/devel-docs/camel/Makefile.am +++ /dev/null @@ -1,101 +0,0 @@ -## Process this file with automake to produce Makefile.in - -# The name of the module. -DOC_MODULE=camel - -# The top-level SGML file. -DOC_MAIN_SGML_FILE=camel-docs.sgml - -# The directory containing the source code (if it contains documentation). -DOC_SOURCE_DIR=$(top_srcdir)/camel - -CFLAGS=`gtk-config --cflags gtk` -LDFLAGS="-lcamel `gtk-config --libs gtk` " - - -HTML_DIR=$(datadir)/gnome/html - - - -TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE) - -tmpl_sources = \ - tmpl/camel-data-wrapper.sgml \ - tmpl/camel-folder.sgml \ - tmpl/camel-mime-message.sgml \ - tmpl/camel-mime-part.sgml \ - tmpl/camel-recipient.sgml \ - tmpl/camel-service.sgml \ - tmpl/camel-store.sgml \ - tmpl/camel-stream.sgml - - -camel_docdir = $(HTML_DIR) -camel_doc_DATA = \ - camel.html \ - camel.hierarchy \ - camel.types \ - camel-scan.c \ - camel-decl.txt \ - camel-sections.txt - -EXTRA_DIST = $(camel_doc_DATA) - -camel.html: html/book1.html - -cd $(srcdir) && cp html/book1.html camel.html - -html/book1.html: sgml/camel-doc.bottom - $(MAKE) html - -sgml/camel-doc.bottom: $(tmpl_sources) - $(MAKE) sgml - -camel-scan.c: - -scan: camel-scan.c - CFLAGS=$(CFLAGS) LDFLAGS=$(LDFLAGS) gtkdoc-scanobj --module=$(DOC_MODULE) - gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) - -templates: scan - gtkdoc-mktmpl --module=$(DOC_MODULE) - -sgml: - gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) - -html: - if ! test -d html ; then mkdir html ; fi - -cd html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) - -clean-local: - rm -f *~ *.bak *.hierarchy *.signals *.args *-unused.txt camel.html - -maintainer-clean-local: clean - rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt Makefile.in - -install-data-local: - $(mkinstalldirs) $(TARGET_DIR) - (installfiles=`echo $(srcdir)/html/*.html`; \ - if test "$$installfiles" = '$(srcdir)/html/*.html'; \ - then echo '-- Nothing to install' ; \ - else \ - for i in $$installfiles; do \ - echo '-- Installing '$$i ; \ - $(INSTALL_DATA) $$i $(TARGET_DIR); \ - done; \ - echo '-- Installing $(srcdir)/html/index.sgml' ; \ - $(INSTALL_DATA) $(srcdir)/html/index.sgml $(TARGET_DIR); \ - echo '-- Fixing Crossreferences' ; \ - gtkdoc-fixxref --module=$(DOC_MODULE) --html-dir=$(HTML_DIR)|| true; \ - fi) - -dist-hook: - mkdir $(distdir)/html - mkdir $(distdir)/sgml - mkdir $(distdir)/tmpl - -cp $(srcdir)/html/*.html $(srcdir)/html/*.css $(distdir)/html - -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl - -cp $(srcdir)/sgml/*.sgml $(distdir)/sgml - -cp $(srcdir)/sgml/*.bottom $(srcdir)/sgml/*.top $(distdir)/sgml - - -.PHONY : html sgml templates scan diff --git a/devel-docs/camel/README_AND_TODO.txt b/devel-docs/camel/README_AND_TODO.txt deleted file mode 100644 index 5feeb1e4e9..0000000000 --- a/devel-docs/camel/README_AND_TODO.txt +++ /dev/null @@ -1,43 +0,0 @@ -Camel is currently (conceptualy) separated in four parts: - -* the session handling -* the storage mechanism. -* the (mime) message handling. -* some general utilities class/functions. - - - -* Session handling ------------------- - -(This is not gnome session managing related) -CamelSession is an object used to store some parameters on a user -basis. This can be a permanent (fs based) or volatile -(ram only) storage depending on user preferences. -The session object is, for example, responsible for -remembering authentication datas during application lifetime. -It is also responsible for selecting and loading providers -corresponding to protocols. In the case where only one -provider exists for a given protocol, the task is trivial, -but when multiple providers exist for a given protocol, the -user can choose their prefered one. Given its relationship -with providers, the session object is also used to instanciate -a store given an URL. - -Associated Classes: - CamelSession - implementation: 5% - -Associated Files: - camel-provider.[ch] - implementation: 2.5% (a struct in camel-provider.h) - - -* the storage mechanism. ------------------------- - -The storage mechanism is mainly represented by -the Store class and the Folder class. -* the (mime) message handling. -* some general utilities class/functions. - diff --git a/devel-docs/camel/camel-docs.sgml b/devel-docs/camel/camel-docs.sgml deleted file mode 100644 index 33c6623731..0000000000 --- a/devel-docs/camel/camel-docs.sgml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - -]> - - - - Camel Messaging Library Reference Manual - - - - Camel Objects - &CamelMimeMessage; - &CamelService; - &CamelStore; - &CamelFolder; - &CamelMimePart; - &CamelDataWrapper; - &CamelRecipient; - - - diff --git a/devel-docs/camel/camel-sections.txt b/devel-docs/camel/camel-sections.txt deleted file mode 100644 index 1f6d45c03c..0000000000 --- a/devel-docs/camel/camel-sections.txt +++ /dev/null @@ -1,154 +0,0 @@ - -gnome.h -camel-data-wrapper.h - - -
-camel-data-wrapper -CamelDataWrapper -CamelDataWrapper -camel_data_wrapper_write_to_stream - -CAMEL_DATA_WRAPPER -camel_data_wrapper_get_type -CAMEL_DATA_WRAPPER_CLASS -
- -
-camel-recipient -CamelRecipientTable -CamelRecipientTable -camel_recipient_table_new -camel_recipient_table_get -camel_recipient_table_add -camel_recipient_table_add_list -camel_recipient_table_remove -camel_recipient_table_ref -camel_recipient_table_unref -
- -
-camel-mime-part -CamelMimePart -CamelMimePart -camel_mime_part_add_header -camel_mime_part_set_content_object -camel_mime_part_set_filename -camel_mime_part_get_disposition -camel_mime_part_get_content_MD5 -camel_mime_part_get_encoding -camel_mime_part_set_header_lines -camel_mime_part_get_content_object -camel_mime_part_get_content_id -camel_mime_part_set_description -camel_mime_part_set_text -camel_mime_part_set_encoding -camel_mime_part_set_disposition -camel_mime_part_remove_header -camel_mime_part_get_filename -camel_mime_part_get_content_languages -camel_mime_part_set_content_languages -camel_mime_part_get_header_lines -camel_mime_part_get_description -camel_mime_part_get_header - -CAMEL_MIME_PART -camel_mime_part_get_type -CAMEL_MIME_PART_CLASS -
- - - -
-camel-mime-message -CamelMimeMessage -CamelMimeMessage -camel_mime_message_remove_recipient -camel_mime_message_get_recipients -camel_mime_message_set_flag -camel_mime_message_set_subject -camel_mime_message_get_reply_to -camel_mime_message_get_from -camel_mime_message_set_reply_to -camel_mime_message_get_sent_date -camel_mime_message_new_with_session -camel_mime_message_add_recipient -camel_mime_message_get_subject -camel_mime_message_set_from -camel_mime_message_get_flag -camel_mime_message_get_message_number -camel_mime_message_get_received_date -camel_mime_message_set_received_date - -CAMEL_MIME_MESSAGE -camel_mime_message_get_type -CAMEL_MIME_MESSAGE_CLASS -
- - -
-camel-folder -CamelFolder -CamelFolder -camel_folder_get_folder -camel_folder_create -camel_folder_delete -camel_folder_delete_messages -camel_folder_get_parent_folder -camel_folder_get_parent_store -camel_folder_get_mode -camel_folder_list_subfolders - -CAMEL_FOLDER -camel_folder_get_type -CAMEL_FOLDER_CLASS -
- -
-camel-service -CamelService -CamelService -camel_service_connect -camel_service_is_connected -camel_service_connect_to_with_login_passwd -camel_service_connect_to_with_login_passwd_port -camel_service_get_url - -CAMEL_SERVICE -camel_service_get_type -CAMEL_SERVICE_CLASS -
- -
-camel-store -CamelStore -CamelStore -camel_store_get_separator -camel_store_get_folder - -CAMEL_STORE -camel_store_get_type -CAMEL_STORE_CLASS -
- - -
-camel-stream -CamelStream -CamelStream -camel_stream_seek -camel_stream_write -camel_stream_flush -camel_stream_eos -camel_stream_write_string -camel_stream_close -camel_stream_write_strings -camel_stream_read -camel_stream_available - -CAMEL_STREAM -camel_stream_get_type -CAMEL_STREAM_CLASS -
- - diff --git a/devel-docs/camel/camel.types b/devel-docs/camel/camel.types deleted file mode 100644 index 93142d8692..0000000000 --- a/devel-docs/camel/camel.types +++ /dev/null @@ -1,9 +0,0 @@ -#include -#include -camel_data_wrapper_get_type -camel_folder_get_type -camel_mime_message_get_type -camel_mime_part_get_type -camel_service_get_type -camel_store_get_type -camel_stream_get_type diff --git a/devel-docs/camel/tmpl/.cvsignore b/devel-docs/camel/tmpl/.cvsignore deleted file mode 100644 index 29db8d052d..0000000000 --- a/devel-docs/camel/tmpl/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -camel-unused.sgml - diff --git a/devel-docs/camel/tmpl/camel-data-wrapper.sgml b/devel-docs/camel/tmpl/camel-data-wrapper.sgml deleted file mode 100644 index 6fce9eb128..0000000000 --- a/devel-docs/camel/tmpl/camel-data-wrapper.sgml +++ /dev/null @@ -1,26 +0,0 @@ - -CamelDataWrapper - - -data container with streaming methods - - - -A CamelDataWrapper is wrapper around data which can save them to a stream -and restore them from a stream. - - - - - - - - - - - - -@data_wrapper: -@stream: - - diff --git a/devel-docs/camel/tmpl/camel-folder.sgml b/devel-docs/camel/tmpl/camel-folder.sgml deleted file mode 100644 index 882d63499c..0000000000 --- a/devel-docs/camel/tmpl/camel-folder.sgml +++ /dev/null @@ -1,96 +0,0 @@ - -CamelFolder - - -Represents a folder of messages on a store. - - - -CamelFolder represents a folder in a message store. - - - - - - - - - - - - - - - - - - -@folder: -@folder_name: -@Returns: - - - - - - - -@folder: -@Returns: - - - - - - - -@folder: -@recurse: -@Returns: - - - - - - - -@folder: -@Returns: - - - - - - - -@folder: -@Returns: - - - - - - - -@folder: -@Returns: - - - - - - - -@folder: -@Returns: - - - - - - - -@folder: -@Returns: - - diff --git a/devel-docs/camel/tmpl/camel-mime-message.sgml b/devel-docs/camel/tmpl/camel-mime-message.sgml deleted file mode 100644 index 704f3d3572..0000000000 --- a/devel-docs/camel/tmpl/camel-mime-message.sgml +++ /dev/null @@ -1,171 +0,0 @@ - -CamelMimeMessage - - - - - - - - - - - - - - - - - - - - - - - - - -@mime_message: -@recipient_type: -@recipient: - - - - - - - -@mime_message: -@recipient_type: -@Returns: - - - - - - - -@mime_message: -@flag: -@value: - - - - - - - -@mime_message: -@subject: - - - - - - - -@mime_message: -@Returns: - - - - - - - -@mime_message: -@Returns: - - - - - - - -@mime_message: -@reply_to: - - - - - - - -@mime_message: -@Returns: - - - - - - - -@session: -@Returns: - - - - - - - -@mime_message: -@recipient_type: -@recipient: - - - - - - - -@mime_message: -@Returns: - - - - - - - -@mime_message: -@from: - - - - - - - -@mime_message: -@flag: -@Returns: - - - - - - - -@mime_message: -@Returns: - - - - - - - -@mime_message: -@Returns: - - - - - - - -@mime_message: -@received_date: - - diff --git a/devel-docs/camel/tmpl/camel-mime-part.sgml b/devel-docs/camel/tmpl/camel-mime-part.sgml deleted file mode 100644 index 2db158b25f..0000000000 --- a/devel-docs/camel/tmpl/camel-mime-part.sgml +++ /dev/null @@ -1,151 +0,0 @@ - -CamelMimePart - - - - - - - - - - - - - - - - - - - -@mime_part: -@filename: - - - - - - - -@mime_part: -@Returns: - - - - - - - -@mime_part: -@Returns: - - - - - - - -@mime_part: -@Returns: - - - - - - - -@mime_part: -@header_lines: - - - - - - - -@mime_part: -@Returns: - - - - - - - -@mime_part: -@description: - - - - - - - -@camel_mime_part: -@text: - - - - - - - -@mime_part: -@encoding: - - - - - - - -@mime_part: -@disposition: - - - - - - - -@mime_part: -@Returns: - - - - - - - -@mime_part: -@Returns: - - - - - - - -@mime_part: -@content_languages: - - - - - - - -@mime_part: -@Returns: - - - - - - - -@mime_part: -@Returns: - - diff --git a/devel-docs/camel/tmpl/camel-recipient.sgml b/devel-docs/camel/tmpl/camel-recipient.sgml deleted file mode 100644 index 4af84cf58e..0000000000 --- a/devel-docs/camel/tmpl/camel-recipient.sgml +++ /dev/null @@ -1,88 +0,0 @@ - -CamelRecipientTable - - - - - - - - - - - - - - - - - - - -@recipient_hash_table: -@ref_count: - - - - - - -@Returns: - - - - - - - -@recipient_table: - - - - - - - -@recipient_table: -@recipient_type: -@Returns: - - - - - - - -@recipient_table: -@recipient_type: -@recipient: - - - - - - - -@recipient_table: -@recipient_type: -@recipient: - - - - - - - -@recipient_table: -@recipient_type: -@recipient_list: - - - - - - - -@recipient_table: - - diff --git a/devel-docs/camel/tmpl/camel-service.sgml b/devel-docs/camel/tmpl/camel-service.sgml deleted file mode 100644 index 5b51ea902e..0000000000 --- a/devel-docs/camel/tmpl/camel-service.sgml +++ /dev/null @@ -1,72 +0,0 @@ - -CamelService - - - - - - - - - - - - - - - - - - - -@e: - - - - - - -@service: - - - - - - - -@service: -@Returns: - - - - - - - -@service: -@host: -@login: -@passwd: - - - - - - - -@service: -@host: -@login: -@passwd: -@port: - - - - - - - -@service: -@Returns: - - diff --git a/devel-docs/camel/tmpl/camel-store.sgml b/devel-docs/camel/tmpl/camel-store.sgml deleted file mode 100644 index 2882c09986..0000000000 --- a/devel-docs/camel/tmpl/camel-store.sgml +++ /dev/null @@ -1,45 +0,0 @@ - -CamelStore - - - -A class representing a message (local or distant) repository - - - -The store class models a place where messages can be stored and retreived. It can be a local -store (for example an mbox-style store) or a distant server (for example an POP3 server). Messages are -not retreived or stored directly with a CamelStore object. Instead, a CamelFolder object must be -obtained from the store first. - - - - - - - - - - - - - - - - - - -@store: -@Returns: - - - - - - - -@store: -@folder_name: -@Returns: - - diff --git a/devel-docs/camel/tmpl/camel-stream.sgml b/devel-docs/camel/tmpl/camel-stream.sgml deleted file mode 100644 index e965db2e45..0000000000 --- a/devel-docs/camel/tmpl/camel-stream.sgml +++ /dev/null @@ -1,101 +0,0 @@ - -CamelStream - - - - - - - - - - - - - - - - - - - -@stream: -@offset: -@policy: -@Returns: - - - - - - - -@stream: -@buffer: -@n: -@Returns: - - - - - - - -@stream: - - - - - - - -@stream: -@Returns: - - - - - - - -@stream: -@string: - - - - - - - -@stream: - - - - - - - -@stream: -@Varargs: - - - - - - - -@stream: -@buffer: -@n: -@Returns: - - - - - - - -@stream: -@Returns: - - diff --git a/devel-docs/misc/ref_and_id_proposition.txt b/devel-docs/misc/ref_and_id_proposition.txt deleted file mode 100644 index 2127b45a57..0000000000 --- a/devel-docs/misc/ref_and_id_proposition.txt +++ /dev/null @@ -1,237 +0,0 @@ -Author: Bertrand Guiheneuf -Date: August 9th 1999 -Last revision date : September 3rd 1999 -Version: 0.2 - -The last version of this document is always available in gnome CVS in -the gnome-mailer module: devel-docs/misc/ref_and_id_proposition.txt - - - -A) Identifying messages within folders --------------------------------------- - -Currently, in Camel there is only one way to retrieve a message from a -mail store: - CamelMimeMessage * - get_message (CamelFolder *folder, gint number) - -where number is an integer representing the message rank within its -parent folder. - -This is a traditional method (JavaMail, MAPI) and it is very useful -because this is often the only way to get a message in from a -classical store (pop3 for example). - -Moreover, various documents ([1], [2]) proposed to generalize the URL -scheme used in Camel ([3]) to access mail stores in order to identify -messages. Such an URL would be, for instance: - -pop3://po.myisp.com:1 - -Meaning: "Access message 1 on Pop3 server po.myisp.com" - - -However, referencing a message with its number within a folder is a -very unreliable method: - -1) Message order in a folder can change during a session: - - The user can move or remove messages from the folder, thus - completely changing message numbers. We could however imagine to - follow message operations in order to keep camel in a coherent - state at each time instant. This could be quite complex but may - be feasible using gtk signal system. - -2) Message order can change between sessions: - - Gnome-mailer was designed from the begining to allow messages to be - stored in classical mailboxes (mbox, maildir, MH, IMAP ...), in - order to allow users to run other MUA on their mailboxes if - necessary. These other MUA can change message order within folders - without any chance for Camel to trace the operations. - -These two scenarii show that it is quite impossible to use reliable -folder caching or message referencing if messages are referenced only -by their position within their parent folder. - - -We thus have to find a general way to identify and retreive a message -within its folder. One thing is sure, however: all folders -implementation won't allow this method. Pop3 stores will always access -messages using their rank on the server. MUA using Camel will thus -have to be prepared to access some stores providing only the old -fashionned message number access method. - -Basically, we have two choices: - -1) Accessing messages using (mailbox) Unique ID (UID) - - A UID is a string identifier associated to a message, which is - guaranteed to be unique within its parent folder and which will not - change between sessions. - -2) Accessing messages using Message ID - - A Message ID is a string identifier associated to a messages which - is guaranteed to be unique in the world, that is, no other message - can have the same Message ID. The message ID is defined in RFC 822, - and is stored as the message header "Message-id" - -Method (1) already exists in IMAP. -It is quite simple to define on local stores (MH, mbox, ....) but it -may not resist to message modification by other MUA. -Methods based on Message-id matching or message content checksum seem -to be the best one. Using an "X-" header is another possibility for -non read-only folders. A combination of these three methods may be the -most reliable solution. -The UID is impossible to implement in a POP3 store provider. - -(2) Can be used with IMAP, but would be very ineficient. -The main issue with this method is its dependancy upon other MUAs and -MTAs. Message-id is set before or during message transport. Moreover, -some rfc822 compliant messages may not even have any Message-id -header. -These are major issues when accessing read-only stores. -The M-ID is also impossible to implement in a POP3 store provider. - - -We may not rely on external MUA and MTA to guarentee the uniqueness of -the identifier . We may loose messages by never being able to read them -if two had the same uid. It would be possible to find workarounds, but -it could make Camel use a bit tricky. - -Given that most users will use IMAP or a database based store as their -main mail store, and given that this stores allow UID very -easily, I suggest that we use method (1). Discussion is still open, -though. - -Here are the public methods I propose to add to CamelFolder: - -gboolean camel_folder_supports_uid (CamelFolder *folder) - returns true if the folder can get messages - by their uid. - -gchar * camel_folder_get_uid_by_number (CamelFolder *folder, gint message_number) - return the uid of message which number in the folder - is %message_number. - -gchar * camel_folder_get_message_uid (CamelFolder *folder, CamelMimeMessage *message) - return the uid of the message within the folder. - -CamelMimeMessage *camel_folder_get_message_by_uid (CamelFolder *folder, gchar *uid) - return the message which uid is %uid - -In addition, the CamelMessage Class will have a new public method - -gchar * camel_mime_message_get_uid (CamelMimeMessage *message) - return the uid associated to the message in its physical parent - folder. - - - -B) Handling message references in (v)folders. ---------------------------------------------- - - -We want the future Gnome mailer to be able to build (virtual) folders -holding references to messages physically located in other -folders. More generally, we would like folders to be able to hold: - -1) messages -2) subfolders -3) references to messages - -(1) and (2) are already implemented in Camel because most mail stores -can hold messages and/or subfolders. - -(3) is a different issue, because no existing mail store can currently -hold, within folders, references to messages in other folders. -It will thus be a specific gnome-mailer extension. - - -One of the main issue is to determine what kind of behaviour we expect -from folders holding references. Here is a possible API. - -( the world (v)folder is used to distinguish between the physical -parent folder and the folder holding a reference to the message, when -a confusion may arise) - -Addition to CamelFolder: - -gboolean camel_folder_can_hold_references (CamelFolder *folder) - return true if the folder can contain references - -void camel_folder_add_reference_by_uid (CamelFolder *folder, gchar *folder_url, gchar *message_uid) - add a reference into a folder. %folder_url is the url of - the folder, %message_uid is the uid of the message within - its physical parent folder. - -void camel_folder_add_reference_by_message (CamelFolder *folder, CamelMessage *message) - add a reference. The place where the reference points - to is found using CamelMessage methods - -void camel_folder_remove_reference_by_uid (CamelFolder *folder, gchar *uid) - remove a message reference form a folder. Reference - is identified using its uid within the folder. - -gboolean camel_folder_uid_is_reference (CamelFolder *folder, gchar *uid) - return true if the message corresponding to the uid is a reference. - -Then all usual operations on the folder act if the message was -actually physically stored in this folder. For example, when the mailer -uses camel_folder_get_message_by_uid onto the (v)folder, the actual -message is retreived from its physical store. - -As you can see, the uid of the message within its physical parent -folder is different than its uid within the (v)folder. This is because -there is no way to guarantee that the uids of two messages in two -different folders would be different. Using references on this two -message in the same vfolder would break uniqueness of the uid in the -(v)folder. - -A couple of other methods could be defined but all the basics are -described here. - -This draft API is far from complete nor perfect, and is described here -only to stimulate discussions before the actual implementation. - - -The question now is to know how we store references. There are basically -two ways: - -1) references are stored using the URL of the physical folder - and the uid of the message within the folder - -2) a list of reference is kept, and in this list, reference are stored -as in (1). Folders would refer to the actual message using index in -the list - - - -The main problem with (1) is that references get lost as soon -as the actual message is moved. There is no way to find in which -folders references to the message exist. - -(2) is a way to solve this issue. When messages are used, Camel looks -in the list to see if the message is refered somewhere, and actualize -the URL and the uid with their new values. - -The problem with (2) is that we need to keep this information in a file -and libraries writing automatically to files are generally a bad idea. - -As in additional remark, it is clear that Camel will only be able to -hold references to messages on stores supporting UIDs. - - -Thanks in advance for your comments and ideas, - - - Bertrand - - --- - -[1] : http://www.selequa.com/%7epurp/gnomail/mail2db.html -[2] : http://www.selequa.com/%7epurp/gnomail/dbRecFmt.html -[3] : http://www.gnome.org/mailing-lists/archives/gnome-mailer-list/1999-April/0248.shtml diff --git a/devel-docs/query/virtual-folder-in-depth.sgml b/devel-docs/query/virtual-folder-in-depth.sgml deleted file mode 100644 index d3e3e0504b..0000000000 --- a/devel-docs/query/virtual-folder-in-depth.sgml +++ /dev/null @@ -1,407 +0,0 @@ - - - - -
- - - - Giao - Nguyen - - - - An in-depth look at the virtual folder mechanism - - - This document describes a different way of approaching mail - organization and how all things are possible in this brave new - world. This document does not describe physical storage issues - nor interface issues. - - - Historically mail has been organized into folders. These - folders usually mapped to a single storage medium. The - relationship between mail organization and storage medium was - one to one. There was one mail organization for every storage - medium. This scheme had its limitations. - - - Efforts at categorizations are only meaningful at the instance that - one categorized. To find any piece of data, regardless of how well - it was categorized, required some amount of searching. Therefore, any - attempts to nullify searching is doomed to fail. It's time to embrace - searching as a way of life. - - - These are the terms and their definitions. The example rules used are - based on the syntax for VM (http://www.wonderworks.com/vm/) by Kyle - Jones whose ideas form the basis for this. I'm only adding the - existence of summary files to aid in scaling. I currently use VM and - it's virtual-folder rules for my daily mail purposes. To date, my only - complaints are speed (it has no caches) and for the unitiated, it's - not very user-friendly. - - - Comments, questions, rants, etc. should be directed at Giao Nguyen - (grail@cafebabe.org) who will try to address issues in a timely - manner. - - - - - - - Definitions - - Store - - A location where mail can be found. This may be a file (Berkeley - mbox), directory (MH), IMAP server, POP3 server, Exchange server, - Lotus Notes server, a stack of Post-Its by your monitor fed through - some OCR system. - - - - - Message - - An individual mail message. - - - - Vfolder - - A group of messages sharing some commonality. This is the result of a - query. The vfolder maybe contained in a store, but it is not necessary - that a store holds only one vfolder. There is always an implicit - vfolder rule which matches all messages. A store contains the vfolder - which is the result of the query (any). It's short for virtual folder - or maybe view folder. I dunno. - - - - Default-vfolder - - The vfolder defined by (any) applied to the store. This is not the - inbox. The inbox could easily be defined by a query. A default rule - for the inbox could be (new) but it doesn't have to be. Mine happens - to be (or (unread) (new)). - - - - Folder - - The classical mail folder approach: one message organization per - store. - - - - Query - - A search for messages. The result of this is a vfolder. There are two - kinds of queries: named queries and lambda queries. More on this - later. - - - - Summary file - - An external file that contains pointers to messages which are matches - for a named query. In addition to pointers, the summary file should - also contain signatures of the store for sanity checks. When the term - "index" is used as a verb, it means to build a summary file for a - given name-value pair. - - - - - - - Queries - - Named queries are analogous to classical mail folders. Because named - queries maybe reused, summary files are kept as caches to reduce - the overall cost of viewing a vfolder. Summary files are superior to - folders in that they allow for the same messages to appear in multiple - vfolders without message duplications. Duplications of messages - defeats attempts at tagging a message with additional user information - like annotations. Named queries will define folders. - - - Lambda queries are similar to named queries except that they have no - name. These are created on the fly by the user to filter out or - include certain messages. - - - All queries can be layered on top of each other. A lambda query can be - layered on a named query and a named query can be layered on a lambda - query. The possibilities are endless. - - - The layerings can be done as boolean operations (and, or, not). Short - circuiting should be used. - - - Examples: - -(and (author "Giao") - (unread)) - - The (unread) query should only be evaluated on the results of (author - "Giao"). - -(or (author "Giao") - (unread)) - - Both of these queries should be evaluated. Any matches are added to the - resulting vfolder. - - - - - - Summary files - - Summary files are only meaningful when applied to the context of the - default-vfolder of a store. - - - Summary files should be generated for queries of the form: - -(function "constant value") - - Summary files should never be generated for queries of the form: - - (function (function1)) - - (and (function "value") - (another-function "another value")) - - Given a query of the form: - - (and (function "value") - (another-function "another value")) - - The system should use one summary file for (function "value") and - another summary file for (another-function "another value"). I will - call the prior form the "plain form". - - - It should be noted that the signature of the store should be based on - the assumption that new data may have been added to the store since - the application generated the summary file. Signatures generated on - the entirety of the store will most likely be meaningless for things - like POP/IMAP servers. - - - - - - Incremental indexing - - When new messages are detected, all known queries should be evaluated - on the new messages. vfolders should be notified of new messages that - are positive matches for their queries. The indexes generated by this - process should be merged into the current indexes for the vfolder. - - - - - - Can I have multiple stores? - - I don't see why not. Again, the inbox is a vfolder so you can get a - unified inbox consisting of all new mail sent to all your stores or - your can get inboxes for each store or any combination your heart - desire. You get your cake, eat it, and someone else cleans the dishes! - - - - - - Why all this? - - Consider the dynamic nature of the following query: - -(and (author "Giao") - (sent-after (today-midnight))) - - today-midnight would be a function that is evaluated at run-time to - calculate the appropriate object. - - - - - - Scenarios of usage and their solutions - - Mesage alterations - - This is a fuzzy area that should be left to the UI to handle. Messages - are altered. Read status are altered when a new message is read for - example. How do we handle this if our query is for unread messages? - Upon viewing the state would change. - - - One idea is to not evaluate the queries unless we're changing between - vfolder views. This assumes that one can only view a particular - vfolder at a time. For multi-vfolder viewing, a message change should - propagate through the vfolder system. Certain effects (as in our - example) would not be intuitive. - - - It would not be a clean solution to make special cases but they may be - necessary where certain defined fields are ignored when they are - changed. Some combination of the above rules can be used. I don't - think it's an easy solution. - - - - Message inclusion and exclusion - - Messages are included and excluded also with queries. The final query - will have the form of: - - (and (author "Giao") - (criteria value) - (not (criteria other-value))) - - Userland criterias may be a label of some sort. These may be userland - labels or Message-IDs. What are the performance issues involved in - this? With short circuiting, it's not a major problem. - - - The criterias and values are determined by the UI. The vfolder - mechanism isn't concerned with such issues. - - - Messages can be included and excluded at will. The idea is often - called "arbitrary inclusion/exclusion". This can be done by - Message-IDs or other fields. It's been noted that Message-IDs are not - unique. - - - I propose that any given vfolder is allocated an inclusion label and an - exclusion label. These should be randomly generated. This should be - part of the vfolder description. It should be noted that the vfolder - description has not been drafted yet. - - - The result is such that the rules for a given named query is: - - (and (user-query) - (label inclusion-label) - (not exclusion-label)) - - - - - Query scheduling - - Consider the following extremely dynamic queries: - - A: - (and (author "Giao") - (sent-after (today-midnight))) - - B: - (and (sent-after (today-midnight)) - (author "Giao")) - - C: - (or (author "Giao") - (sent-after (today-midnight))) - - Query A would be significantly faster because (author "Giao") is not - dynamic. A summary file could be generated for this query. Query B is - slow and can be optimized if there was a query compiler of some - sort. Query C demonstrates a query in which there is no good - optimization which can be applied. These come with a certain amount of - baggage. - - - It seems then that for boolean 'and' operations, plain forms should be - moved forward and other queries should be moved such that they are - evaluated later. I would expect that the majority of queries would be - of the plain form. - - - First is that the summary file is tied to the query and the store - where the query originates from. Second, a hashing function for - strings needs to be calculated for the query so that the query and the - summary file can be associated. This hashing function could be similar - to the hashing function described in Rob Pike's "The Practice of - Programming". (FIXME: Stick page number here) - - - - Archives - - Many people are concerned that archives won't be preserved, archives - aren't supported, and many other archive related issues. This is the - short version. - - - Archives are just that, archives. Archives are stores. Take your - vfolder, export it to a store. You are done. If you load up the store - again, then the default-vfolder of that store is the view of the - vfolder, except the query is different. - - - The point to vfolder is not to do away with classical folder - representation but to move the queries to the front where it would - make data management easier for people who don't think in terms of - files but in terms of queries because ordinary people don't think in - terms of files. - - - - - - - Miscellany - - Annotations - - There should be a scheme to add annotations to messages. Common mail - user agents have used a tag in the message header to mark messages as - read/unread for example. Extending on this we have the ability to add - our own data to a message to add meaning to it. If we have a good - scheme for doing this, new possibilities are opened. - - - Keywords - - When sending a message, a message could have certain keywords attached - to it. While this can be done with the subject line, the subject line - has a tendency to be munged by other mail applications. One popular - example is the "[rR]e:" prefix. Using the subject line also breaks the - "contract" with other mail user agents. Using keywords in another - field in the message header allows the sender to assist the recipient - in organizing data automatically. Note that the sender can only - provide hints as the sender is unlikely to know the organization - schemes of the recipient. - - - - - Scope - - Let us assume that we have multiple stores. Does a query work on a - given store? Or does it work on all stores? Or is it configurable such - that a query can work on a user-selected list of stores? - - - - - - - Alternatives to the above - - Jim Meyer (purp@selequa.com) is putting some notes on where - annotations needs to be located. They'll be located here as well as - any contributions I may have to them. - - -
diff --git a/devel-docs/query/virtual-folder-in-depth.txt b/devel-docs/query/virtual-folder-in-depth.txt deleted file mode 100644 index 01718a5f05..0000000000 --- a/devel-docs/query/virtual-folder-in-depth.txt +++ /dev/null @@ -1,309 +0,0 @@ -TITLE: An in-depth look at the virtual folder mechanism -AUTHOR: Giao Nguyen - -* introduction - -This document describes a different way of approaching mail -organization and how all things are possible in this brave new -world. This document does not describe physical storage issues nor -interface issues. - -Historically mail has been organized into folders. These folders -usually mapped to a single storage medium. The relationship between -mail organization and storage medium was one to one. There was one -mail organization for every storage medium. This scheme had its -limitations. - -Efforts at categorizations are only meaningful at the instance that -one categorized. To find any piece of data, regardless of how well -it was categorized, required some amount of searching. Therefore, any -attempts to nullify searching is doomed to fail. It's time to embrace -searching as a way of life. - -These are the terms and their definitions. The example rules used are -based on the syntax for VM (http://www.wonderworks.com/vm/) by Kyle -Jones whose ideas form the basis for this. I'm only adding the -existence of summary files to aid in scaling. I currently use VM and -it's virtual-folder rules for my daily mail purposes. To date, my only -complaints are speed (it has no caches) and for the unitiated, it's -not very user-friendly. - -Comments, questions, rants, etc. should be directed at Giao Nguyen - who will try to address issues in a timely -manner. - -* Definitions - -** store - -A location where mail can be found. This may be a file (Berkeley -mbox), directory (MH), IMAP server, POP3 server, Exchange server, -Lotus Notes server, a stack of Post-Its by your monitor fed through -some OCR system. - -** message - -An individual mail message. - -** vfolder - -A group of messages sharing some commonality. This is the result of a -query. The vfolder maybe contained in a store, but it is not necessary -that a store holds only one vfolder. There is always an implicit -vfolder rule which matches all messages. A store contains the vfolder -which is the result of the query (any). It's short for virtual folder -or maybe view folder. I dunno. - -** default-vfolder - -The vfolder defined by (any) applied to the store. This is not the -inbox. The inbox could easily be defined by a query. A default rule -for the inbox could be (new) but it doesn't have to be. Mine happens -to be (or (unread) (new)). - -** folder - -The classical mail folder approach: one message organization per -store. - -** query - -A search for messages. The result of this is a vfolder. There are two -kinds of queries: named queries and lambda queries. More on this -later. - -** summary file - -An external file that contains pointers to messages which are matches -for a named query. In addition to pointers, the summary file should -also contain signatures of the store for sanity checks. When the term -"index" is used as a verb, it means to build a summary file for a -given name-value pair. - -* Queries - -Named queries are analogous to classical mail folders. Because named -queries maybe reused, summary files are kept as caches to reduce -the overall cost of viewing a vfolder. Summary files are superior to -folders in that they allow for the same messages to appear in multiple -vfolders without message duplications. Duplications of messages -defeats attempts at tagging a message with additional user information -like annotations. Named queries will define folders. - -Lambda queries are similar to named queries except that they have no -name. These are created on the fly by the user to filter out or -include certain messages. - -All queries can be layered on top of each other. A lambda query can be -layered on a named query and a named query can be layered on a lambda -query. The possibilities are endless. - -The layerings can be done as boolean operations (and, or, not). Short -circuiting should be used. - -Examples: - -(and (author "Giao") - (unread)) - -The (unread) query should only be evaluated on the results of (author -"Giao"). - -(or (author "Giao") - (unread)) - -Both of these queries should be evaluated. Any matches are added to the -resulting vfolder. - -* Summary files - -Summary files are only meaningful when applied to the context of the -default-vfolder of a store. - -Summary files should be generated for queries of the form: - -(function "constant value") - -Summary files should never be generated for queries of the form: - -(function (function1)) - -(and (function "value") - (another-function "another value")) - -Given a query of the form: - -(and (function "value") - (another-function "another value")) - -The system should use one summary file for (function "value") and -another summary file for (another-function "another value"). I will -call the prior form the "plain form". - -It should be noted that the signature of the store should be based on -the assumption that new data may have been added to the store since -the application generated the summary file. Signatures generated on -the entirety of the store will most likely be meaningless for things -like POP/IMAP servers. - -* Incremental indexing - -When new messages are detected, all known queries should be evaluated -on the new messages. vfolders should be notified of new messages that -are positive matches for their queries. The indexes generated by this -process should be merged into the current indexes for the vfolder. - -* Can I have multiple stores? - -I don't see why not. Again, the inbox is a vfolder so you can get a -unified inbox consisting of all new mail sent to all your stores or -your can get inboxes for each store or any combination your heart -desire. You get your cake, eat it, and someone else cleans the dishes! - -* Why all this? - -Consider the dynamic nature of the following query: - -(and (author "Giao") - (sent-after (today-midnight))) - -today-midnight would be a function that is evaluated at run-time to -calculate the appropriate object. - -* Scenarios of usage and their solutions - -** Mesage alterations - -This is a fuzzy area that should be left to the UI to handle. Messages -are altered. Read status are altered when a new message is read for -example. How do we handle this if our query is for unread messages? -Upon viewing the state would change. - -One idea is to not evaluate the queries unless we're changing between -vfolder views. This assumes that one can only view a particular -vfolder at a time. For multi-vfolder viewing, a message change should -propagate through the vfolder system. Certain effects (as in our -example) would not be intuitive. - -It would not be a clean solution to make special cases but they may be -necessary where certain defined fields are ignored when they are -changed. Some combination of the above rules can be used. I don't -think it's an easy solution. - -** Message inclusion and exclusion - -Messages are included and excluded also with queries. The final query -will have the form of: - -(and (author "Giao") - (criteria value) - (not (criteria other-value))) - -Userland criterias may be a label of some sort. These may be userland -labels or Message-IDs. What are the performance issues involved in -this? With short circuiting, it's not a major problem. - -The criterias and values are determined by the UI. The vfolder -mechanism isn't concerned with such issues. - -Messages can be included and excluded at will. The idea is often -called "arbitrary inclusion/exclusion". This can be done by -Message-IDs or other fields. It's been noted that Message-IDs are not -unique. - -I propose that any given vfolder is allocated an inclusion label and an -exclusion label. These should be randomly generated. This should be -part of the vfolder description. It should be noted that the vfolder -description has not been drafted yet. - -The result is such that the rules for a given named query is: - -(and (user-query) - (label inclusion-label) - (not exclusion-label)) - -** Query scheduling - -Consider the following extremely dynamic queries: - -A: -(and (author "Giao") - (sent-after (today-midnight))) - -B: -(and (sent-after (today-midnight)) - (author "Giao")) - -C: -(or (author "Giao") - (sent-after (today-midnight))) - -Query A would be significantly faster because (author "Giao") is not -dynamic. A summary file could be generated for this query. Query B is -slow and can be optimized if there was a query compiler of some -sort. Query C demonstrates a query in which there is no good -optimization which can be applied. These come with a certain amount of -baggage. - -It seems then that for boolean 'and' operations, plain forms should be -moved forward and other queries should be moved such that they are -evaluated later. I would expect that the majority of queries would be -of the plain form. - -First is that the summary file is tied to the query and the store -where the query originates from. Second, a hashing function for -strings needs to be calculated for the query so that the query and the -summary file can be associated. This hashing function could be similar -to the hashing function described in Rob Pike's "The Practice of -Programming". (FIXME: Stick page number here) - -** Archives - -Many people are concerned that archives won't be preserved, archives -aren't supported, and many other archive related issues. This is the -short version. - -Archives are just that, archives. Archives are stores. Take your -vfolder, export it to a store. You are done. If you load up the store -again, then the default-vfolder of that store is the view of the -vfolder, except the query is different. - -The point to vfolder is not to do away with classical folder -representation but to move the queries to the front where it would -make data management easier for people who don't think in terms of -files but in terms of queries because ordinary people don't think in -terms of files. - -* Miscellany - -** Annotations - -There should be a scheme to add annotations to messages. Common mail -user agents have used a tag in the message header to mark messages as -read/unread for example. Extending on this we have the ability to add -our own data to a message to add meaning to it. If we have a good -scheme for doing this, new possibilities are opened. - -*** Keywords - -When sending a message, a message could have certain keywords attached -to it. While this can be done with the subject line, the subject line -has a tendency to be munged by other mail applications. One popular -example is the "[rR]e:" prefix. Using the subject line also breaks the -"contract" with other mail user agents. Using keywords in another -field in the message header allows the sender to assist the recipient -in organizing data automatically. Note that the sender can only -provide hints as the sender is unlikely to know the organization -schemes of the recipient. - -** Scope - -Let us assume that we have multiple stores. Does a query work on a -given store? Or does it work on all stores? Or is it configurable such -that a query can work on a user-selected list of stores? - -* Alternatives to the above - -Jim Meyer is putting some notes on where -annotations needs to be located. They'll be located here as well as -any contributions I may have to them. diff --git a/doc/.cvsignore b/doc/.cvsignore deleted file mode 100644 index 550bd25cdb..0000000000 --- a/doc/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile - diff --git a/doc/C/apx-authors.sgml b/doc/C/apx-authors.sgml deleted file mode 100644 index 7039f6c9c9..0000000000 --- a/doc/C/apx-authors.sgml +++ /dev/null @@ -1,70 +0,0 @@ - - - Authors - - Evolution was written by: - - Seth Alves: alves@helixcode.com - Anders Carlssonandersca@gnu.org - Damon Chaplin:damon@helixcode.com - Clifford R. Conover rusty@zootweb.com - Miguel De Icaza: miguel@helixcode.com - Arturo Espinoza arturo@nucleu.unam.mx - Larry Ewing: lewing@helixcode.com - Bertrand Guiheneuf: bertrand@helixcode.com - Tuomas Kuosmanen: tigert@gimp.org - Christopher J. Lahey: clahey@helixcode.com - Matthew Loper: matt@helixcode.com - Dave Mason dcm@redhat.com - Federico Mena: federico@helixcode.com - Eskil Heyn Olsendeity@eski.dk - Nat Friedman: nat@helixcode.com - Ettore Perazzoli:ettore@helixcode.com - Russell Steinthal: rms39@columbia.edu - Peter Teichman: peter@helixcode.com - Chris Toshok: toshok@helixcode.com - Radek Doulik: rodo@helixcode.com - Dan Winship: winship@helixcode.com - Michael Zucchi: notzed@helixcode.com - -and other dedicated GNOME programmers. - - - The Evolution code owes a great debt - to the GNOME-pim and - GNOME-Calendar applications, and to - KHTMLW. The developers of - Evolution acknowledge the efforts - and contributions of all who worked on those projects. - - - - For more information please visit the - Evolution Web page. Please send all comments, - suggestions, and bug reports to the GNOME bug tracking - database. Instructions for submitting bug reports can be - found on-line at - http://bugs.gnome.org/Reporting.html. If you are using - GNOME 1.1 or later, you can also use command - bug-buddy for submitting bug reports. - - - This manual was written by Aaron Weber - (aaron@helixcode.com) with the help of the - application programmers and the GNOME Documentation Project. - Please send all comments and suggestions regarding the manual to - the GNOME Documentation Project at - docs@gnome.org. You can also add your comments - online by using GNOME Documentation - Status Table. - - - diff --git a/doc/C/apx-bugs.sgml b/doc/C/apx-bugs.sgml deleted file mode 100644 index eb30901422..0000000000 --- a/doc/C/apx-bugs.sgml +++ /dev/null @@ -1,19 +0,0 @@ - - - Known bugs and limitations - - - This appendix describes known bugs and limitations of - Evolution. Please contact the - Evolution team (bugs@helixcode.com) or use - bug-buddy if you find one we have not - listed, or if you have a patch to fix one. - - - - - The bugs are many, but the application is young, and this is to - be expected. - - - diff --git a/doc/C/apx-fdl.sgml b/doc/C/apx-fdl.sgml deleted file mode 100644 index 7a85c6e4a2..0000000000 --- a/doc/C/apx-fdl.sgml +++ /dev/null @@ -1,678 +0,0 @@ - - GNU Free Documentation License - - Version 1.1, March 2000 - - - - Copyright © 2000 -
- Free Software Foundation, Inc. - 59 Temple Place, Suite 330, - Boston, - MA - 02111-1307 - USA -
- Everyone is permitted to copy and distribute verbatim copies of this license - document, but changing it is not allowed. -
- - - - 0. PREAMBLE - - - The purpose of this License is to make a manual, textbook, or other - written document "free" in the sense of freedom: to assure everyone - the effective freedom to copy and redistribute it, with or without - modifying it, either commercially or noncommercially. Secondarily, - this License preserves for the author and publisher a way to get - credit for their work, while not being considered responsible for - modifications made by others. - - - - This License is a kind of "copyleft", which means that derivative - works of the document must themselves be free in the same sense. It - complements the GNU General Public License, which is a copyleft - license designed for free software. - - - - We have designed this License in order to use it for manuals for free - software, because free software needs free documentation: a free - program should come with manuals providing the same freedoms that the - software does. But this License is not limited to software manuals; it - can be used for any textual work, regardless of subject matter or - whether it is published as a printed book. We recommend this License - principally for works whose purpose is instruction or reference. - - - - - 1. APPLICABILITY AND DEFINITIONS - - - This License applies to any manual or other work that contains a - notice placed by the copyright holder saying it can be distributed - under the terms of this License. The "Document" , below, refers to any such - manual or work. Any member of the public is a licensee, and is - addressed as "you". - - - - A "Modified Version" of the - Document means any work containing the Document or a portion of it, - either copied verbatim, or with modifications and/or translated into - another language. - - - - A "Secondary Section" is a named - appendix or a front-matter section of the Document that deals exclusively with the - relationship of the publishers or authors of the Document to the Document's overall subject (or to - related matters) and contains nothing that could fall directly within - that overall subject. (For example, if the Document is in part a textbook of - mathematics, a Secondary Section - may not explain any mathematics.) The relationship could be a matter - of historical connection with the subject or with related matters, or - of legal, commercial, philosophical, ethical or political position - regarding them. - - - - The "Invariant Sections" are - certain Secondary Sections whose - titles are designated, as being those of Invariant Sections, in the notice that - says that the Document is released - under this License. - - - - The "Cover Texts" are certain - short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that - says that the Document is released - under this License. - - - - A "Transparent" copy of the - Document means a machine-readable - copy, represented in a format whose specification is available to the - general public, whose contents can be viewed and edited directly and - straightforwardly with generic text editors or (for images composed of - pixels) generic paint programs or (for drawings) some widely available - drawing editor, and that is suitable for input to text formatters or - for automatic translation to a variety of formats suitable for input - to text formatters. A copy made in an otherwise Transparent file format whose markup - has been designed to thwart or discourage subsequent modification by - readers is not Transparent. A - copy that is not "Transparent" - is called "Opaque". - - - - Examples of suitable formats for Transparent copies include plain - ASCII without markup, Texinfo input format, LaTeX input format, SGML - or XML using a publicly available DTD, and standard-conforming simple - HTML designed for human modification. Opaque formats include - PostScript, PDF, proprietary formats that can be read and edited only - by proprietary word processors, SGML or XML for which the DTD and/or - processing tools are not generally available, and the - machine-generated HTML produced by some word processors for output - purposes only. - - - - The "Title Page" means, for a - printed book, the title page itself, plus such following pages as are - needed to hold, legibly, the material this License requires to appear - in the title page. For works in formats which do not have any title - page as such, "Title Page" - means the text near the most prominent appearance of the work's title, - preceding the beginning of the body of the text. - - - - - - 2. VERBATIM COPYING - - - You may copy and distribute the Document in any medium, either - commercially or noncommercially, provided that this License, the - copyright notices, and the license notice saying this License applies - to the Document are reproduced in - all copies, and that you add no other conditions whatsoever to those - of this License. You may not use technical measures to obstruct or - control the reading or further copying of the copies you make or - distribute. However, you may accept compensation in exchange for - copies. If you distribute a large enough number of copies you must - also follow the conditions in section - 3. - - - - You may also lend copies, under the same conditions stated above, and - you may publicly display copies. - - - - - - 3. COPYING IN QUANTITY - - - If you publish printed copies of the Document numbering more than 100, and - the Document's license notice - requires Cover Texts, you must - enclose the copies in covers that carry, clearly and legibly, all - these Cover Texts: Front-Cover - Texts on the front cover, and Back-Cover Texts on the back cover. Both - covers must also clearly and legibly identify you as the publisher of - these copies. The front cover must present the full title with all - words of the title equally prominent and visible. You may add other - material on the covers in addition. Copying with changes limited to - the covers, as long as they preserve the title of the Document and satisfy these conditions, - can be treated as verbatim copying in other respects. - - - - If the required texts for either cover are too voluminous to fit - legibly, you should put the first ones listed (as many as fit - reasonably) on the actual cover, and continue the rest onto adjacent - pages. - - - - If you publish or distribute Opaque copies of the Document numbering more than 100, you - must either include a machine-readable Transparent copy along with each - Opaque copy, or state in or - with each Opaque copy a - publicly-accessible computer-network location containing a complete - Transparent copy of the Document, free of added material, which - the general network-using public has access to download anonymously at - no charge using public-standard network protocols. If you use the - latter option, you must take reasonably prudent steps, when you begin - distribution of Opaque copies - in quantity, to ensure that this Transparent copy will remain thus - accessible at the stated location until at least one year after the - last time you distribute an Opaque copy (directly or through your - agents or retailers) of that edition to the public. - - - - It is requested, but not required, that you contact the authors of the - Document well before - redistributing any large number of copies, to give them a chance to - provide you with an updated version of the Document. - - - - - - 4. MODIFICATIONS - - - You may copy and distribute a Modified - Version of the Document - under the conditions of sections 2 - and 3 above, provided that you - release the Modified Version under - precisely this License, with the Modified - Version filling the role of the Document, thus licensing distribution - and modification of the Modified - Version to whoever possesses a copy of it. In addition, you - must do these things in the Modified - Version: - - - - - - A - - Use in the Title Page (and - on the covers, if any) a title distinct from that of the Document, and from those of - previous versions (which should, if there were any, be listed in - the History section of the Document). You may use the same - title as a previous version if the original publisher of that - version gives permission. - - - - - - - B - - List on the Title Page, as - authors, one or more persons or entities responsible for - authorship of the modifications in the Modified Version, together with at - least five of the principal authors of the Document (all of its principal - authors, if it has less than five). - - - - - - - C - - State on the Title Page - the name of the publisher of the Modified Version, as the - publisher. - - - - - - - D - - Preserve all the copyright notices of the Document. - - - - - - - E - - Add an appropriate copyright notice for your modifications - adjacent to the other copyright notices. - - - - - - - F - - Include, immediately after the copyright notices, a license - notice giving the public permission to use the Modified Version under the terms - of this License, in the form shown in the Addendum below. - - - - - - - G - - Preserve in that license notice the full lists of Invariant Sections and required - Cover Texts given in the - Document's license notice. - - - - - - - H - - Include an unaltered copy of this License. - - - - - - - I - - Preserve the section entitled "History", and its title, and add - to it an item stating at least the title, year, new authors, and - publisher of the Modified Version - as given on the Title - Page. If there is no section entitled "History" in the - Document, create one stating - the title, year, authors, and publisher of the Document as given on its Title Page, then add an item - describing the Modified - Version as stated in the previous sentence. - - - - - - - J - - Preserve the network location, if any, given in the Document for public access to a - Transparent copy of the - Document, and likewise the - network locations given in the Document for previous versions it - was based on. These may be placed in the "History" section. You - may omit a network location for a work that was published at - least four years before the Document itself, or if the - original publisher of the version it refers to gives permission. - - - - - - - K - - In any section entitled "Acknowledgements" or "Dedications", - preserve the section's title, and preserve in the section all - the substance and tone of each of the contributor - acknowledgements and/or dedications given therein. - - - - - - - L - - Preserve all the Invariant - Sections of the Document, unaltered in their text - and in their titles. Section numbers or the equivalent are not - considered part of the section titles. - - - - - - - M - - Delete any section entitled "Endorsements". Such a section may - not be included in the Modified - Version. - - - - - - - N - - Do not retitle any existing section as "Endorsements" or to - conflict in title with any Invariant Section. - - - - - - - If the Modified Version includes - new front-matter sections or appendices that qualify as Secondary Sections and contain no - material copied from the Document, you may at your option designate - some or all of these sections as invariant. To do this, add their - titles to the list of Invariant - Sections in the Modified - Version's license notice. These titles must be distinct from - any other section titles. - - - - You may add a section entitled "Endorsements", provided it contains - nothing but endorsements of your Modified - Version by various parties--for example, statements of peer - review or that the text has been approved by an organization as the - authoritative definition of a standard. - - - - You may add a passage of up to five words as a Front-Cover Text, and a passage of up - to 25 words as a Back-Cover - Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of - Front-Cover Text and one of - Back-Cover Text may be added by - (or through arrangements made by) any one entity. If the Document already includes a cover text - for the same cover, previously added by you or by arrangement made by - the same entity you are acting on behalf of, you may not add another; - but you may replace the old one, on explicit permission from the - previous publisher that added the old one. - - - - The author(s) and publisher(s) of the Document do not by this License give - permission to use their names for publicity for or to assert or imply - endorsement of any Modified Version - . - - - - - - 5. COMBINING DOCUMENTS - - - You may combine the Document with - other documents released under this License, under the terms defined - in section 4 above for modified - versions, provided that you include in the combination all of the - Invariant Sections of all of the - original documents, unmodified, and list them all as Invariant Sections of your combined - work in its license notice. - - - - The combined work need only contain one copy of this License, and - multiple identical Invariant - Sections may be replaced with a single copy. If there are - multiple Invariant Sections with - the same name but different contents, make the title of each such - section unique by adding at the end of it, in parentheses, the name of - the original author or publisher of that section if known, or else a - unique number. Make the same adjustment to the section titles in the - list of Invariant Sections in the - license notice of the combined work. - - - - In the combination, you must combine any sections entitled "History" - in the various original documents, forming one section entitled - "History"; likewise combine any sections entitled "Acknowledgements", - and any sections entitled "Dedications". You must delete all sections - entitled "Endorsements." - - - - - - 6. COLLECTIONS OF DOCUMENTS - - - You may make a collection consisting of the Document and other documents released - under this License, and replace the individual copies of this License - in the various documents with a single copy that is included in the - collection, provided that you follow the rules of this License for - verbatim copying of each of the documents in all other respects. - - - - You may extract a single document from such a collection, and - distribute it individually under this License, provided you insert a - copy of this License into the extracted document, and follow this - License in all other respects regarding verbatim copying of that - document. - - - - - - 7. AGGREGATION WITH INDEPENDENT WORKS - - - A compilation of the Document or - its derivatives with other separate and independent documents or - works, in or on a volume of a storage or distribution medium, does not - as a whole count as a Modified - Version of the Document, - provided no compilation copyright is claimed for the compilation. - Such a compilation is called an "aggregate", and this License does not - apply to the other self-contained works thus compiled with the Document , on account of their being - thus compiled, if they are not themselves derivative works of the - Document. If the Cover Text requirement of section 3 is applicable to these copies - of the Document, then if the Document is less than one quarter of the - entire aggregate, the Document's - Cover Texts may be placed on - covers that surround only the Document within the aggregate. Otherwise - they must appear on covers around the whole aggregate. - - - - - - 8. TRANSLATION - - - Translation is considered a kind of modification, so you may - distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations - requires special permission from their copyright holders, but you may - include translations of some or all Invariant Sections in addition to the - original versions of these Invariant - Sections. You may include a translation of this License - provided that you also include the original English version of this - License. In case of a disagreement between the translation and the - original English version of this License, the original English version - will prevail. - - - - - - 9. TERMINATION - - - You may not copy, modify, sublicense, or distribute the Document except as expressly provided - for under this License. Any other attempt to copy, modify, sublicense - or distribute the Document is - void, and will automatically terminate your rights under this - License. However, parties who have received copies, or rights, from - you under this License will not have their licenses terminated so long - as such parties remain in full compliance. - - - - - - 10. FUTURE REVISIONS OF THIS LICENSE - - - The Free - Software Foundation may publish new, revised versions of the - GNU Free Documentation License from time to time. Such new versions - will be similar in spirit to the present version, but may differ in - detail to address new problems or concerns. See http://www.gnu.org/copyleft/. - - - - Each version of the License is given a distinguishing version - number. If the Document specifies - that a particular numbered version of this License "or any later - version" applies to it, you have the option of following the terms and - conditions either of that specified version or of any later version - that has been published (not as a draft) by the Free Software - Foundation. If the Document does - not specify a version number of this License, you may choose any - version ever published (not as a draft) by the Free Software - Foundation. - - - - - - Addendum - - - To use this License in a document you have written, include a copy of - the License in the document and put the following copyright and - license notices just after the title page: - - - - Copyright © YEAR YOUR NAME. - - - - Permission is granted to copy, distribute and/or modify this document - under the terms of the GNU Free Documentation License, Version 1.1 or - any later version published by the Free Software Foundation; with the - Invariant Sections being LIST - THEIR TITLES, with the Front-Cover - Texts being LIST, and with the Back-Cover Texts being LIST. A copy - of the license is included in the section entitled GNU Free - Documentation License. - - - - If you have no Invariant - Sections, write "with no Invariant Sections" instead of saying - which ones are invariant. If you have no Front-Cover Texts, write "no - Front-Cover Texts" instead of "Front-Cover Texts being LIST"; likewise - for Back-Cover Texts. - - - - If your document contains nontrivial examples of program code, we - recommend releasing these examples in parallel under your choice of - free software license, such as the GNU General Public - License, to permit their use in free software. - - - - -
\ No newline at end of file diff --git a/doc/C/apx-gloss.sgml b/doc/C/apx-gloss.sgml deleted file mode 100644 index 80f9b3f14b..0000000000 --- a/doc/C/apx-gloss.sgml +++ /dev/null @@ -1,242 +0,0 @@ - - - - - Glossary - - - Attachment - - - Any file sent with an e-mail for the reciever to download. - - - - - - Automatic Indexing - - - Pre-sorting procedure that allows - Evolution to refer to data quickly. - It enables faster searches and decreases memory usage for - data displays. - - - - - - Bcc (Blind Carbon Copy) - - - A way of addressing a message. Bcc is used to send a group of - people an e-mail, while hiding their names and addresses from each - other. - - - - - - Cc (Carbon Copy) - - - Carbon-copies are used to send a 3rd party a copy of the e-mail, - so they an keep up to date on a conversation, without being in the - To: list. - - - - - - Druid - - - A small program or script used to help configure or set up some - larger program. The mail setup druid - helps you ready your email system for use. Druids are the Linux - equivalent of "Assistants" and "Wizards." - - - - - - Evolution - - - Evolution is the GNOME - groupware application. - - - - - - Execute - - - To run a program. Any file that can be run is called an - executable. In order to be execute program, a user must have - the proper permissions. - - - - - - Filter - - - Within Evolution, a filter is a method - of sorting mail automatically. - - - - - - Forward - - - By forwarding an e-mail, the user can send a third party a message - which was sent to the user originally. - - - - - - Groupware - - - Groupware is a term describing an application who has many - productivity features built into one program. - - - - - - Haiku - - - A Japanese form of poetry. Haiku are unrhymed, and - three lines long. The first and last lines should have five - syllables, and the second line seven syllables. The subject - matter is traditionally related to the seasons. - - - - - - HTML - - - Hyper-text Markup Language(HTML) is the layout - language which all webpages are written in. HTML can be used - inside of e-mails to insert images, justfiy text different ways, - and even include webpages inside the e-mail itself. - - - - - - Hot Key - - - Hot-keys are keyboard combinations used to do actions on a - computer instead of using the mouse to do the same action. - Hot-keys can speed up computer usage. - - - - - - iCal - - - iCal is the program which - Evolution uses to manage the calendar - section. - - - - - - Live Document - - - A document embedded in or attached an email message that - contains scripting or other active contents. For example, a - Gnumeric spreadsheet page could be - included in a message, and the recipient could alter some of the - data from within Evolution without - having to start another program. - - - - - - Mail Client - - - A mail client is the application which a user reads and sends - their e-mail with. - - - - - - Nautilus - - - Nautilus is the next generation file - manager for GNOME being written by Eazel. - - - - - - Nickname - - - An alias for an e-mail address. - - - - - - Script - - - A program which is written in an interpreted language, which can - be executed. - - - - - - Shortcut Bar - - - The Shortcut Bar is where the user accesses - all the components of Evolution from. - - - - - - Spam - - - Spam: useless e-mail. Spam normally comes in forms of - chain-letters and advertisements for websites or services. - - - - - - vFolder - - - vFolders allow an e-mail to be shared among multiple folders, so - it appears that theres a copy of the e-mail in each folder. - - - - - diff --git a/doc/C/config-prefs.sgml b/doc/C/config-prefs.sgml deleted file mode 100644 index 8ca4dbbc7d..0000000000 --- a/doc/C/config-prefs.sgml +++ /dev/null @@ -1,202 +0,0 @@ - - - Advanced Configuration with the Preferences Window - - To change your configuration settings, select - Preferences from the - Settings menu. This will open the - preferences window, illustrated in . - Preferences are seperated into several categories: - - - - Identity, which allows you to set - your name, email address, and other information. The - default values are the ones found on your system account. - - - - - - Mail, which allows you to specify - your email server and protocols, as well as attachment - and HTML handling, forwarding behavior, filters, and - other Evolution behaviors - specific to email. The default behaviors are those - approved by Jamie Zawinski. - - - - - - Contacts, which allows you to - control addressbook sharing as well as other funcctions - specific to your contact manager. - - - - - - Calendar, which allows you to set - up calendar networking, as well as the way that your - calendar will behave and appear. The default view is by - week and the default calendar is Western. Time and - date are determined by the system clock and - localization, and cannot be set here. - - - - - - General, which covers everything - else, including the Evolution - startup screen. - - - - - - - -
- Preferences Dialog - - Preferences dialog - - - -
- - - - - Identity Settings - - If you have only one email address, or use automatic - forwarding to funnel multiple addresses into one, then you - will only need to configure one identity. To create a single - user with a single identity, enter the following information: - (INSERT detailed DESCRIPTION HERE) - - - - If you have one email accout for your personal life, and one - for work, you'll want to create multiple identities. You - can do this by: (INSERT DESCRIPTION HERE) - - - - Multiple Identities and Network Settings - - If you use multiple network connections—if, for - example, you dial up an ISP for your personal mail, and use - a LAN for your work-related tasks— you will also have - to set seperate network settings for each identity. - - - - - - Setting up the Network - - In order to do much of anything with - Evolution, you need to connect to - your network. To do that, you'll need to know your user name - and password, what sort of mail sending and receiving - protocols your network uses, and the names of the servers - you'll be using. If you're switching from another groupware - or email progam, you can almost certainly use the same - settings as you did with that program. Select the - Network tab in the - Preferences window to get started. - - - - Advanced Network Configuration - - INSERT a little introduction paragraph here. - - - Multiple Network Connections - - People with who use multiple ISP's or networks, or who - have multiple email accounts, will need to do a little - more work, but not much. - - - Multiple Identities and Networks - - Nate's laptop goes everywhere with him, and he needs - to be able to use Evolution - from anywhere&mdash a hotel room, an airplane, a - client's office, his office, anywhere at all. (INSERT - HOW EVOLUTION HELPS HIM DO THIS). - - - - - (INSERT DESCRIPTION OF WHAT THESE THINGS ARE AND HOW TO - USE THEM) (I'M THINKING IN TERMS OF THE APPLE LOCATION - MANAGER) (Kill this section if Evolution doesn't support - this for 1.0). - - - - - Other Advanced Network Settings - - I can't think of any at the moment but i'm sure they're - out there. They belong here. - - - - - - Modifying the Mail - - This section discusses mail-specific preferences. Click on - the Mail tab in the - Preferences window to access these - settings. - - - You can set the following options: - - - - - Managing the Contact Manager - - To set the behavior of your Contact Manager, click on the - Contact Manager tab in the - Preferences window. - - - You can set the following options: - - - - - Configuring the Calendar - - This section discusses calendar-specific preferences. Click - on the Calendar tab in the - Preferences window to access these - settings. - - - You can set the following options: - - - - - - General Preferences - - Overall Evolution prefs-- whatever else doesn't fit. - - -
- \ No newline at end of file diff --git a/doc/C/config-setupassist.sgml b/doc/C/config-setupassist.sgml deleted file mode 100644 index ea78865037..0000000000 --- a/doc/C/config-setupassist.sgml +++ /dev/null @@ -1,126 +0,0 @@ - - - Easy Setup with the Setup Assistant - - The setup assistant can gather most of the information - necessary for Evolution's daily - operation. If you prefer more detailed or advanced - configuration, see - - - This paragraph will describe all information required by the - setup assistant. It will include a long itemized list, and a - screenshot or two. - - - Mail Setup - - The first time you try to send or receive mail with - Evolution, the mail - setup druid will pop up to help you - set up your email preferences. If you don't plan to use - email, or if you'd rather configure your email preferences - later, click Cancel. - - - The setup druid - will guide you through the network configuration process. It - will ask you for some basic information; your system - administrator or ISP should have the answers you'll need. - The mail setup druid is pictured in . - - - -
- Mail Setup Druid - - Evolution Main Window - - - -
- - - - - The druid will ask you for the following information: - - Name— Your - full name: eg. Eva Lucianne Tester - - Email address&mdash; - Your email address: eg. eltester@helixcode.com - - - - - Organization— Any - organization you represent. Leave this blank if you - wish. - - - - Signature File— A text - file appended to any email you send, typically your name - and email address, or a quotation you like. It should be - under three lines of text. - - - - Mail source type— - Evolution supports two mail - sources: POP servers, the most common email server type, - and UNIX-style MBOX files. Ask your system - administrator which one you use. - - - - - - Server— This should be the - name of your mail server, eg. - mailserver.organization.org - - - - - - Username— Usually, this is - the part of your email address before the @ character, - and Evolution has selected - that value as the default. If you have a different - username, you can enter it here. - - - - - - Authentication— Select the - type of authentication you will use. You can click - Detect supported types to find - out which authentication protocols your network allows. - - - - - - - Mail Transport— This is the - mail sending protocol you will want to use. Sendmail is - the default. - - - -
- - To learn how to configure Evolution - in greater detail, or to change preferences once you have set - them, see . - -
- -
- - - diff --git a/doc/C/config-sync.sgml b/doc/C/config-sync.sgml deleted file mode 100644 index ae78a6daaf..0000000000 --- a/doc/C/config-sync.sgml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - Setting up your synchronization system - - Synchronization presents you with two issues you'll need to - deal with. The first one is pretty simple: you'll need to get - the data to move among the various devices you're using. If - you've already got Gnome-Pilot - working, then all you have to do is tell it to use Evolution - as a conduit. If you haven't used - Gnome-Pilot before, you'll need to - run the GNOME Control Center and go - through the hand-held device setup assistant. Then you can - create the Evolution conduit and press the hotsync button. - - - If that doesn't work, jump up and down several times and swear - loudly. Then make sure you've got - Gnome-Pilot going to the right - device (for my serial port, it's /dev/ttys0, not the default - /dev/pilot) and that you have read and write permission on - that device. If you don't you'll need to be added to whatever - group has those permissions (for my system, it's tty). - Alternately, if you're the only user of your computer and - don't care too much about security, just use - su to become root, and then use - chmod a+rw /dev/[DEVICENAME] to set - universal read and write permissions on that port— just - don't tell your sysadmin I said you could. (Sysadmins, of - course, would never do such a thing.) - - - Once Evolution knows where to get - the mail, address, and calendar data, it needs to know what to - do with it. When you synchronize your local data with the data on - a server or handheld device, you may run into conflicts: - perhaps you have ended up with two cards with the same name - and different addresses, or old mail that has been deleted - from one device but not the other. What if you want to keep - only the most recent mail on your hand-held or your laptop, - but all the mail on the LDAP server or your desktop machine? - Select the Synchronization tab from the - Preferences window to set up the - conflict resolution preferences. - - - You can set Evolution's - synchronization behavior in the following ways: - - - - - Data Loss Prevention - - It's always a good idea to make a backup. If you set your - synchronization behaviors wrong, you could end up deleting - the messages and cards you want to keep, and keeping the - ones you want to delete. Before you change these - preferences, make a backup of your - Evolution files. You can do - this by... - - - - diff --git a/doc/C/devel-action.sgml b/doc/C/devel-action.sgml deleted file mode 100644 index 5d40c78bf7..0000000000 --- a/doc/C/devel-action.sgml +++ /dev/null @@ -1,18 +0,0 @@ - - - Actions: Making Evolution Behave - - Build Actions - - How to create an action. - - - - - Using Actions - - How to use an action you or someone else has built. - - - - \ No newline at end of file diff --git a/doc/C/devel-component.sgml b/doc/C/devel-component.sgml deleted file mode 100644 index db4f93c27d..0000000000 --- a/doc/C/devel-component.sgml +++ /dev/null @@ -1,24 +0,0 @@ - - - Evolution Components - Build your own species - - Explain exactly what an Evolution Component is. - - - - Building Evolution Components - - Explain how to build them-- what resources are available, - what interfaces exposed. - - - - - Using Additional Evolution Components - - Once you've got one--either you've built it or borrowed it-- - you can use it. Here's how. - - - \ No newline at end of file diff --git a/doc/C/devel-script.sgml b/doc/C/devel-script.sgml deleted file mode 100644 index 74dbf161cd..0000000000 --- a/doc/C/devel-script.sgml +++ /dev/null @@ -1,17 +0,0 @@ - - - Scripting: Making Evolution Sit up and Beg - - Writing Scripts - - How to write scripts for Evolution. - - - - - Using Scripts - - How to use and install scripts for Evolution. - - - diff --git a/doc/C/evolution-guide.sgml b/doc/C/evolution-guide.sgml deleted file mode 100644 index 1e76a74a7d..0000000000 --- a/doc/C/evolution-guide.sgml +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - - - - - - - - - - - - -]> - - - - - - A User's Guide to Evolution - - AaronWeber - KevinBreit - - - - 2000Helix Code, Inc. - Kevin Breit - - - - - PUT THE RIGHT LEGALNOTICE IN HERE - - - - - This is version 0.4 of the Evolution manual. - - - - - - - - - &PREFACE; - - - Using Evolution - A Guide for Everybody - - - Part one of the Evolution manual - describes how to use Evolution - for email, contact management, and appointment and task - scheduling. You'll find as you go along that, as with most of - Linux, there's more than one way to do things, and you can - pick whichever method you like best. - - - - &USAGE-MAINWINDOW; - &USAGE-MAIL; - &USAGE-CONTACT; - &USAGE-CALENDAR; - &USAGE-SYNC; - - - - Configuring and Managing Evolution - A guide for Power Users and Administrators - - - Evolution is highly configurable. - Usually, when developers say that, they mean that they didn't - test it out thoroughly and have left it to other hackers to - "configure" themselves a working system. When we say - configurable, we mean that although - Evolution will work perfectly well - with minimal setup hassle, you can alter its behavior to fit - your needs with just a little more work. - - - - &CONFIG-SETUPASSIST; - &CONFIG-PREFS; - &CONFIG-SYNC; - - - Developing for Evolution - An Introduction for the Happy Few - - - There are three levels of developing for - Evolution. You can write actions. - You can write scripts. And you can write full-fledged - Evolution components. This paragraph will eventually - desfcribe what that means. - - - - &DEVEL-ACTION; - &DEVEL-SCRIPT; - &DEVEL-COMPONENT; - - &APX-GLOSS; - &APX-BUGS; - &APX-AUTHORS; - &APX-FDL; - - - - - - - - - - - - - diff --git a/doc/C/fig/mail-druid-pic.png b/doc/C/fig/mail-druid-pic.png deleted file mode 100644 index f29f3e77be..0000000000 Binary files a/doc/C/fig/mail-druid-pic.png and /dev/null differ diff --git a/doc/C/fig/mainwindow-pic.png b/doc/C/fig/mainwindow-pic.png deleted file mode 100644 index b7c6067449..0000000000 Binary files a/doc/C/fig/mainwindow-pic.png and /dev/null differ diff --git a/doc/C/preface.sgml b/doc/C/preface.sgml deleted file mode 100644 index 9ccb257e5e..0000000000 --- a/doc/C/preface.sgml +++ /dev/null @@ -1,159 +0,0 @@ - - - - Introduction - -
- What is Evolution, and What Can It Do for Me? - - The idea of evolution as a process of improvement and - development is a strong influence on the developers at Helix - Code. We named our groupware suite - "Evolution" because we knew that it would be able to survive - in the wilderness of the software marketplace for one reason: - it's better. - - - Evolution is a suite of groupware - applications within the GNOME desktop environment that you can - use to send, receive, and organize email, manage address and - other contact information, and maintain a calendar. It - enables you to do those things on one or several computers, - connected directly or over a network, for one person or for - large groups. Evolution can handle - almost all your communications tasks with the power and - flexibility of the GNOME desktop environment. - - - We built Evolution with three groups of - people in mind: everyday users, system administrators, and - developers. - - - - - For everyday users, we made - Evolution easy to use without - sacrificing power. We made the interface familiar and - intuitive, but also allowed users to customize it to - their liking. We made the setup and configuration as - easy as possible. For any confusion, we wrote a - comprehensive manual and help system. - - - - - For administrators, we made sure - Evolution met and and - exceeded the standards set by currently available - groupware products, and we developed support for most - major network protocols so that it can integrate - seamlessly with existing hardware and network - environments. All of our efforts have made - Evolution both easy to use - and easy to support. - - - - - For developers, we built in - support for open standards and protocols to turn - Evolution into an advanced - development platform. From the simplest scripting to - the most complex network and component programming, - Evolution offers developers - the ideal environment for cutting-edge application - development. - - - - - For all three groups, we did our best to ensure the - safety of data. - - - - - - In action, Evolution makes most - daily tasks faster, because we built it to work with you - instead of against you. For example, it takes only one or two - clicks to enter an appointment or an address card sent to you - by email, or to send email to a contact or appointment. - Evolution makes displays faster and - more efficient, so searches are faster and memory usage is - lower. People who get lots of mail will appreciate - advanced features like vFolders, which - let you save searches as though they were ordinary mail - folders. - - -
- -
- About This Book - - - This version of the Evolution - User's Guide is a draft. It is missing - huge chunks of information, and many of the features it - describes are unimplemented. All the content is subject to - change, especially if you help. Please send comments on the - guide to aaron@helixcode.com. Items that are - known to need action are indicated as such, often with - notation like (INSERT CONTENT HERE). If you would like to - work on the guide please contact me or see the GNOME - Documentation project web site. This - paragraph will be removed in later versions of the manual. - - - - - This book is divided into three sections. The first section is - a guided tour— it will - explain how to use Evolution. If - you are new to Evolution or to - groupware in general, this is the section for you. The second - section, covering configuration, - is targeted at advanced users and administrators. If you are - a network administrator, you may find yourself referring to - this section frequently. The third section is a quick developer's guide, for power users and - hackers. If you want to add advanced scripting to - Evolution, write your own - embeddable components, or simply want to find out just how - powerful Evolution can be, this is - the section for you. - - - Throughout the book, you'll find examples, tips and warnings - to help you along. Most of them are decent, hardworking - pieces of information, and genuinely try to be helpful. Some - of the tips, entitled Bad Ideas, - are, in fact, out to trick you. Please don't follow their - advice, no matter how appealing it may sound. - - - Typographical conventions - - Some kinds of words are marked off with special typography. - It's listed below: - - Applications - Commands typed at the command line - Labels for menu items and buttons - Other text treatments - Other text treatments - - - -
-
- - - - - - diff --git a/doc/C/usage-calendar.sgml b/doc/C/usage-calendar.sgml deleted file mode 100644 index 83e03c80c0..0000000000 --- a/doc/C/usage-calendar.sgml +++ /dev/null @@ -1,140 +0,0 @@ - - - The Evolution Calendar: Time-Tamer Extraordinaire - - To begin using the calendar, select - Calendar from the shortcut - bar. By default, the calendar starts in week view mode (IS - THIS TRUE? CHANGE TEXT TO FIT FEATURE). The calendar week view is - shown in : - - -
- Evolution Calendar View - - Evolution Contact Manager Window - - - -
- - -
- - Ways of Looking at your Calendar - - You can view your calendar by the day, by the week, by the - month, or by the year. To do so, click BUTTONS SOMEWHERE. - - - Describe the less-obvious differences among the views of - time here. - - - - In addition, Evolution supports - Hebrew, Muslim, and other calendar formats. To switch to a - different calendar format, choose - GUIMENUITEM from the - GUIMENU. - - - Describe the ways that different calendars can work here, - and how the different calendars work together. - - - - Scheduling With the Evolution Calendar - - The Evolution calendar allows - you to schedule events for yourself or a group of people. - It can handle events that repeat, event lengths from ten - minutes to multiple days, and events that have a date but - no specific time. You can set overlapping events, although - Evolution will warn you about - trying to do two things at once. You can also set event - reminders so that you don't forget about everything you've - just put into your calendar. Basically, it can handle almost - any schedule you throw at it. - - - Creating events - - While looking at the calendar, select New - Appointment from the - MENU, or press - KEYSYM. The New - Appointment dialog will appear. (INSERT - DESCRIPTION OF INTERFACE HERE: Date, Time, Recurrence, - Reminders, and Tentative/Confirmed) - - - You can alter those settings later by clicking once on the - event in the calendar view to - select it, and then choosing Event - Properties from the - Settings menu. - - - - - Appointments for Groups - - If you have your calendar set up to work with other - calendars over a network, you can see when others are - available to meet with you. To browse other people's - calendars over your local network, do this: - - - In addition, you can use - Evolution to mark a meeting - request on another person's calendar. To do so, first - select New Appointment from the - MENU, or press KEYSYM - to bring up the new event window. - Then describe the event as you would any other. Before - you click OK, (INSERT DESCRIPTION - HERE...). Evolution will - automatically send email to each person on the request - list, notifying of the time and date of the meeting you - have requested with them. In addition, it will mark the - event on your calendar and on theirs as tentative, rather than - a confirmed, event. - - - To mark a tentative event as confirmed, click once on the - event in the calendar view to - select it, and then choose Event - Properties from the - Settings menu. In the Event - Properties dialog window, click the - "tentative" button to un-mark the event. (NOTE THAT this - feature may not at all exist!) - - - - - Scheduling privileges - - There are several levels of scheduling privileges. You - can set whether people can see your calendar, whether they - can request meetings or appointments, and whether they can - create appointments. This section may have to be deleted, - because I don't know if we are going to support privileges - at all. - - - - - - Organizing your Appointments - - Until I have Evolution running properly, - I have no idea how this sort of organization will actually work. - - - But this section will have at least two paragraphs, and - probably a screenshot. - - -
diff --git a/doc/C/usage-contact.sgml b/doc/C/usage-contact.sgml deleted file mode 100644 index 6cc9cd605f..0000000000 --- a/doc/C/usage-contact.sgml +++ /dev/null @@ -1,288 +0,0 @@ - - - The Evolution Contact Manager - - The Evolution contact manager can - handle all of the functions of an address book, phone book, - or Rolodex. Of course, Evolution - allows easier updates than an actual paper book, and much - easier synchronization with handheld and remote devices. And - I doubt that you can take your little black book and make it - accessible to the rest of your office over a network. Since - Evolution supports most major - network protocols, including IMAP and - LDAP, it's easy to use over an - existing network. - - - Antother advantage of Evolution - is that the address book is integrated into the rest of - the application. That means that when you look for - someone's address, you can also see a history of - appointments with that person, and when you get an email - with contact information in it, you can create a new address - card very quickly. In addition, searches, folders, and - vFolders all work in the same intuitive way they do in the - other components, so you don't have to learn another system - for similar tasks. - - - This chaper will cover the usage of the - Evolution contact manager, - including organizing large amounts of contact data, sharing - addresses over a network, and the automation - capabilities of the address book. Contact manager - configuration is addressed in . - - - - Getting Started With the Contact Manager - - - To start managing your contacts, click on - Contacts in the shortcut bar. - - - Describe the interface. Include the fact that the - whole address book consists of a set of cards, organized into - folders. - - - - Creating, Deleting, and Adding Cards - - You can create a new card by pressing the New - Card button, or by pressing - KEYSYM. The New Card - window will appear. It has the following fields: - - - - Name: Enter the person's name here - - - - - - Address: - - - - Something - - - - Something - - - - - You can choose which fields an address card has, and create - new fields for cards. For example, - Evolution provides for two line - postal addresses by default, but you may have as many or as - few lines to an address as you wish. To change which - fields an address card has, choose DESCRIBE HERE HOW TO DO - THIS - - - - Quick ways to add cards - - You can add cards from within an email message or calendar - appointment. While looking at an email, right-click on - any email address or message, and choose - Create Card for this Address or - Create Card for this Senderfrom - the menu that appears. While looking at a calendar - appointment, right-click any email address, and choose - Create Card for this Address. - (NOTE that feature may change! unimplemented!) - - - - - You delete a card by pressing the Delete - Card button, or by dragging it into the trash folder. - - - - You can move cards around just as you would with email: - dragging and dropping works, as does right-clicking and - selecting Move from the menu - that appears. - - - - - Organizing your Contact Manager - - Organizing your contact manager is a lot like organizing - your mail. You can have folders and searches the same way - you can with mail, but the contact manager does not allow - vFolders. It does, however, allow each card to fall under - several categories, and allow you to create your own - categories. We'll go over categories in a bit. - - - Another useful UNIMPLEMENTED - Evolution feature is its ability - to recognize when people live together. If two people in - your contact manager share an address, and you change the - address for one of them, Evolution will ask you if you wish - to change the address for both of them, or just for one. - - - - Groups of contacts - - Evolution lets you put cards - into folders, mark them as members of different groups, - and search through them in a variety of ways. This - section will describe how to organize and find contact - information using Evolution. - CHANGE THIS paragraph: it needs a great deal of work. - - - - Grouping with Folders - - The simplest way to group address cards is to use - folders. By default, cards start in the - Contacts folder. You can create - more folders inside that one, or create other address - book folders as well. Each card must be in one and only - one folder. - - - To create a new folder, do this: - - - To put a card into a folder, do this: - - - - - Grouping with Categories - - The other way to group cards is to mark them as - belonging to different categories. The difference - between folders and categories is that folders contain - cards, but category membership is a property of each - card. That means that you can mark a card as being in - several categories or no category at all. For example, - I put my friend Matthew's card in the "Business" category, - because he works with me, the "Friends" category, because - he's also my friend, and the "Frequent" category, because - I call him all the time and can never remember his phone - number. - - - To mark a card as belonging to a category, do this: - - - Then, you can refer to all the cards in that category - by: - - - If the default categories don't suit you, you can add - your own. Here's how: - - - - - - - Sharing your Cards (and keeping them to yourself) - - Cards can be shared over a network. This is the sort of - feature you'll want to use if your company has a list of - vendors and clients that needs constant updating. If you - also share your calendars, people can avoid duplicating - work and keep up to date on developments within their - workgroup or across the entire company. - - - - Sharing Address Cards and Calendar Data - - I want to schedule a meeting with someone at Company - X, but I'm not sure who to talk to there. Our - corporate network has an address card that states our - contacts there, so I know whom to call. Since we also - share the calendars, I know that Deanna has already - scheduled a meeting with them next Thursday, and I can - either go to the meeting myself or ask Deanna to - discuss my concerns for me. Either way, I avoid - having to schedule yet another meeting with Company X, - which is good since everybody hates their products and - they're doomed to fail anyway. - - - - - Of course, you don't want to share all of your cards— - why overload the network with a list of babysitters, or - tell everyone on your network you're talking to new job - prospects? Evolution lets you - decide which folders you want to make accessible to others. - - - To begin sharing a folder of address cards, select (something) . The - Sharing window will pop up. It contains: - - - - - - Automating the Contact Manager - - The Evolution contact manager - can perform a wide variety of tasks for you. From speeding - up basic tasks like adding a new address card to managing - mailing lists, you'll find that the contact manager is more - than a mere address book. - - - - Send me a card: Adding New Cards Quickly - - When you get information in the mail or in a calendar - entry, you can add it to an address card. To do so, right - click on any email address or email message, and select - Add Address Card from the menu - that appears. Of course, - Evolution adds cards from a hand-held device - during HotSync operation. For more information about - that, see . - - - - - Managing a Mailing list - - You already know that when you are writing an email, you - can address it to one or more people, and that - Evolution will fill in - addresses from your contact manager's address cards if - you let it. In addition to that, you can send email to - everyone in a particular group by doing SOMETHING HERE. - Future versions of Evolution - will allow you to you export a group of cards to a - spreadsheet, database, or word processor so you can print - address labels or prepare large postal mailings. - - - - Map It! and other extra features - - Need a map or directions? Click - MapIt from within the contact - manager, and Evolution will - map the address for you online. - - - - \ No newline at end of file diff --git a/doc/C/usage-mail.sgml b/doc/C/usage-mail.sgml deleted file mode 100644 index 2dd289e4c3..0000000000 --- a/doc/C/usage-mail.sgml +++ /dev/null @@ -1,776 +0,0 @@ - - - Evolution Mail - - An Overview of the Evolution Mailer - - Email is an integral part of life these days, and - Evolution mail is here to help - you keep track of it. Evolution - email is like other email programs in all the ways you would - hope: - - - - Item: Description - - - - - Item: Description - - - - - Item: Description - - - . - - - However, Evolution has some - important differences. First, it's built to handle very - large amounts of mail without slowing down or crashing. We - had high mail volumes in mind when we designed our filtering and - searching - functions. There's also the - Evolution vFolder, an - advanced organizational feature not found in other mail - clients. If you get a lot of mail, or if you keep every - message you get in case you need to refer to it later, - you'll find that feature especially useful. - - - - You can start reading email by clicking - Inbox in the shortcut bar. By - default, the Inbox is open when you - start Evolution, and the first - time you see your inbox, there's a message in it from Helix - Code welcoming you to the application. - - - - - Reading, Getting and Sending Mail - - Reading a Message - - The first time you open your - Evolution - Inbox, you will see a window like the - one in , with a - message from Helix Code in the message - list. The message is displayed - below that, in the view pane. If - you find the view pane too small, - you can double-click on the message in the - message list to have it open in a - new window. As is the case with folders, you can - right-click on messages in the message list and get a - menu of possible actions. - - - Go ahead and right-click on the message, and select - Delete Message from the menu - that appears. The message will move into the - Trash folder. If you want to keep - it, you can open the Trash folder - and drag the message back to your - Inbox. The trash will be - automatically emptied the next time you quit - Evolution. (FEATURE - UNIMPLEMENTED! Text may change to fit featureset) - - - -
- Evolution Mail - - Evolution Mail - - - -
- -
-
- - - - - Getting Mail - - To check your email, just click Send and - Receive in the toolbar. If this is the first - time you've done so, the mail druid - will ask you for the information it needs to check your - mail (see for more - information). Then, Evolution - will download your mail for you and send any mail you've - marked ready to send. New mail will appear in your - Inbox and also in the - Today View. - - - - If you get an error message instead of mail, you probably - need to change your network preferences. To learn how to - do that, have a look at , or ask your system - administrator. - - - - Attachments, HTML Mail, and Live Documents - - If you receive a file attached to an email, - Evolution will ask where you - want to put it. Once you've downloaded a file, you can - open, move, copy, or execute it just like any other, - using Nautilus or your - favorite shell or file manager. (This text will change - to fit app behavior, once features are implemented.) - - - - Evolution can also display - HTML-formatted mail, complete with graphics. HTML - formatting will display automatically, although you can - turn it off if you prefer. - - - - It can also display live - documents, which have scripted or - executable contents— for example, a working - spreadsheet page or a chess game. - - - Bad Idea - - When someone you don't know sends you an attached - program, go ahead and run it. Set your preferences to - always run live documents when you recieve them, too. - Everybody knows all that virus stuff is just a Windows - problem. - - - - - - - Writing and Sending Mail - - You can start writing a new - email message by selecting New - Mail from the File Menu, - or by pressing Ctrl-N. When you do so, - the New Message window will open, - as shown in . - - - -
- New Message Window - - Evolution Main Window - - - -
- - - - Enter an address in the To: field, a - message in the Message: field, and - press Send and Receive. That's - easy. It may even be too easy, which is why I like to - queue my messages up to be sent a few minutes later. - - - Send Now, Send Later - - Evolution will send mail immediately unless you tell - it to do otherwise by selecting Send - Later from the MENU. - Then, when you press Send & - Receive, all your unsent messages will go - out at once. I like to use "Send Later" because it - gives me a chance to change my mind about a message - before it goes out. That way, I don't send anything I'll - regret the next day. - - - To learn more about how you can specify message queue - and filter behavior, see . - - - - - - There is quite a bit more to sending mail, though. In the - next few sections, you'll see how - Evolution handles additional features, - including mailing lists, attachments, and forwarding. - - - - - Choosing Recipients - - If you have created address cards in the contact - manager, you can also enter nicknames or other portions - of address data, and - Evolution will complete the - address for you. (INSERT description of UI for this - feature, once it is decided upon). If you enter a name - or nickname that can go with more than one card, - Evolution will open a dialog box to ask you which person - you meant. (QUESTION: will users be able to drag & drop - address cards to send email?). For more information - about using email together with the contact manager and - the calendar, see and . - - - In addition, you can mark recipients in three different - ways. The To: field is for the - primary recipients of the message you are going to send. - However, it is considered bad form to have more than a - few email addresses in this section. - - - If you're writing to one person, but want to keep a - third party up to date, you can use - Cc:. Hearkening back to the dark - ages when people used typewriters and there were no copy - machines, "Cc" stands for "Carbon Copy." Use it - whenever you want to share a message you've written to - someone else. - - Using the Cc: field - - Say, for example, Susan sends an email to a client. - She puts her co-worker, Tim, in the in the - Cc: field, so that he know - what's going on. The client can see that Tim also - recieved the message, and know that they can talk - to Tim about the message as well. - - - - - If you have a large number of recipients, or if you want - to send mail to several people without sharing the - recipient list, you should use - BCc:. "BCc" stands for "Blind - Carbon Copy", and means that people listed in the - BCc: are excluded from the - recipient list, although they will receive the message - and the list of addresses from the - To: and Cc: - fields. - - - Using the BCc: field - - Let's say Tim sends an email to a client, and wants - his supervisor to know what he wrote. He doesn't, - however, want the client to start writing his - supervisor about the project— it's Tim's job - to deal with the client. So Tim puts his - supervisor's email address in the - BCc: field. That way, the - client has one contact, and the boss stays in the - loop. - - - - - - - Replying to Messages - - In order to reply to a message, click on it once in the - message list to select it. Then press the - Reply button, or use the - REPLY COMBO hot key. A window like - the New Message window will - appear, but the subject will already be present— - typically, your new message will have the same subject - as the message to which you are replying, but with Re: - before it, to mark it as a reply. In addition, the - full text of the previous message may be inserted into - the new message, with the > character before each - line. This indicates quoting. You can intersperse - your message with the quoted material as shown in - - - -
- Reply Message Window - - Evolution Main Window - - - -
- - -
- - - If a message has several recipients, as in the case of - mailing lists or messages that have been carbon copied, - you may wish to select one of the items under the - Reply-To submenu on the - MENU menu. This will allow you to - choose one or several of the other message recipients in - addition to the person who originally sent you the - message. If there are large numbers of people in the - Cc: or To: - fields, this can save substantial amounts of time. In - addition, Reply-To makes it very easy to keep off-topic - conversation away from mailing lists and newsgroups. - - Using the Reply-To feature - - Returning again to the email Susan sent to Tim and - their client, you'll note that the Reply-To feature - allows the client to decide whether to reply just to - Susan, or to both Tim and Susan by selecting - a menu item, rather than by cutting and pasting the - email addresses. - - - -
- - - Embellishing that email - - Evolution allows you to - make your email more attractive in a number of ways. You - can send messages formatted with HTML, attach any sort - of file to them, and even include live documents, like - spreadhseets or chess games. This section will tell - you how. - - - - Colors, pictures, and fonts with HTML Mail - - Most email messages are sent as plain text, but they - can also be sent as HTML, which means they can include - color, text style, and other formatting information. - Evolution will read and display HTML properly without - trouble, and also allows you to send outgoing - email messages as HTML. To send an HTML message, just - use the composition toolbar to add formatting; - your message text will appear formatted in the composer - window, and the message will be sent as HTML. - - - A Technical note on HTML Tags - - Any text, including HTML tags, entered into the - message composition window is assumed to be plain - text. If you enter HTML directly into the - composer— say, <BR>Bold Text</BR>, - the the composer will assume you meant exactly that, - and not "make this text bold," as a HTML composition - tool would. For the very technically inclined, that - means that when the text <BR> is sent as HTML, it - will be converted to the string - &lt;BR&gt;. - - - - Some people do not have HTML-capable mail clients, or - prefer not to receive HTML-enhanced mail because it is - slower to download and display. - Some people refer to HTML mail as - "the root of all evil" and get very angry if you send - them HTML mail, which is why the default in - Evolution is plain text. - If you choose to send HTML mail, but have an address - book entry for someone who does not wish to receive - HTML-enhanced mail, you can note that preference in - their address card. The mailer will automatically - strip the HTML tags from any messages you send to that - address. - - - - - Attachments - - If you want to attach a file to your email message, - you can do so by . If - your recipients can read HTML mail, you can put an - image inside the mail by dragging the file into the - composer window, or by selecting Menu - Item from the Menu - menu. Still, unless you know what email client the - recipient is using, it's best to send a message or - attachment in the simplest manner possible. - - - - Live Documents - - Later versions of Evolution - will allow you to enliven your email with almost any - sort of document, and even with entire - applications. At this point, however, I don't know how - that will work. - - - - - - Forwarding Mail - - Forward is useful if you have - received a message and you think someone else would like - to see it, or if you get a message intended for someone - else. You can forward a message as an attachment to a - new message (the default way of forwarding) or you can send it - inline as a quoted portion of the - message you are sending. Attachment forwarding is best - if you want to send the entire message you received, - unaltered. Inline forwarding is best if you want to - send portions of a message, or if you have a large - number of comments on different sections of the message - you are forwarding. Remember to note from whom the - message came, and where, if at all, you have removed or - altered content. - - - To forward a message, first make sure it is selected by - clicking it once in the message list. Then, press - Forward on the toolbar, or select - SOMETHING. To forward a message inline instead of as an - attachment, DO SOMETHING ELSE. Choose an addressee as - you would when sending a new message; the subject will - already be entered, but you can alter it. Enter your - comments on the message in the composition - frame, and press Send and - Receive. To forward it - inline instead of attached, - select Forward Inline from - the Message menu. - - - - Seven Tips for Email Usage - - I started with ten, but four were "Don't send - spam." - - - - Always begin and close with a salutation. Say - "please" and "thank you", just like you do in real - life. You can keep your pleasantries short, but be pleasant! - - - - - - ALL CAPS MEANS YOU'RE SHOUTING! - - - - - - Never write anything in email you wouldn't say in - public. Old messages have a nasty habit of - resurfacing when you least expect them to. - - - - - - Check your spelling and use complete sentences. - - - - - - Don't send nasty emails (flames). If you get one, - don't write back. - - - - - - Don't send spam or forward chain mail. If you - must, verify any rumors, and make sure the - message doesn't have multiple layers of email - quotation symbols (>) indicating multiple - layers of careless inline forwarding. - - - - - - When you reply or forward, include just enough of - the previous message to provide context. Not too - much, not too little. - - - - - Happy mailing! - -
-
- - - Organizing Your Mail - - Even if you only get a few email messages a day, you - probably want to sort and organize them. When you get a - hundred a day and you want to refer to a message you - received six weeks ago, you need to sort and organize them, - and Evolution has the tools to - help you do it. - - - - Getting Organized with Folders - - Mail, as well as address cards and calendars, is kept in - folders. If you like, you can create new folders by - selecting New and then - Folder from the - File menu, or by pressing - COMBO. (Will there be a dialog box to - determine name and location? Must wait for feature to - describe.) The new folders will appear in the - tree view, and you can drag them - wherever you want to relocate them. You can move messages - into the folders by dragging and dropping, or by selecting - them and choosing ITEM from the - MENU. If you create filters with the - filter druid, you can have mail - moved to a folder automatically. An email message can be in - only one folder at a time, just like real mail in real - folders. This is also the case for folders of address - cards and calendar information. - - - - - Searching for Messages - - Because Evolution automatically - creates an index of every email you send or receive, it - can search through your old messages and present you with - results very quickly. You can search for messages by - author, subject, keyword, or headers. (INSERT descriptons - of what those terms mean) - - - To create a search, enter the word or phrase you're - looking for in the form field below the toolbar, and - choose a search type: - - - - Body or subject contains: This - will search message subjects and the messages - themselves for the word or phrase you've entered in - the search field. - - - - - - Body contains: This will search - only in message text, not the subject lines. - - - - - - Subject contains: This will - show you messages where the search text is in the - subject line. It will not search in the message body. - - - - - - Body does not contain: This - finds every email message that does not have the - search text in the message body. It will still show - messages that have the search text in the subject - line, if it is not also in the body. - - - - - - Subject does not contain:This - finds every mail whose subject does not - contain the search text. - - - - - - - - - Getting Really Organized with Virtual Folders - - If you find yourself performing a search frequently, you - can save it as a virtual folder. Virtual folders, or - vFolders, are an advanced way of viewing your email - messages within Evolution. If - you get a lot of mail or often forget where you put - messages, vFolders can help you stay on top of things. - - - A vFolder looks and acts a lot like a folder, but it's - actually a saved search that you can access in most of the - same ways you would a regular folder. The one important - differences between them is that a conventional folder - actually contains messages, but a vFolder is a view of - messages that may be in several different folders. This - means that while a message may fall into several vFolders, - it can be in only one conventional folder. Also, it means - that you cannot remove a message from a vFolder unless you - delete it, and you cannot add a message to a vFolder - unless you change the vFolder's search criteria. - - - As messages that meet the vFolder criteria arrive or are - deleted, Evolution will - automatically place them in and and remove them from the - vFolder contents list. When you delete a message, it gets - erased from the folder it actually exists in as well as - any vFolders which include it. - - - That's pretty complicated. But it can be useful. For - example, if I have a folder for all the email from one - person, and another folder for all the email on a given - topic, I feel organized. But when the person sends me - mail about the topic, my whole email filing universe - becomes chaotic. I need vFolders to save the day for me. - - - That sounds silly, but imagine a business trying to keep - track of mail from hundreds of vendors and clients, or a - university with overlapping and changing groups of - faculty, staff, administrators and students. The larger - the system, the less you can afford that sort of - confusion. vFolders make for better organization because - they can accept overlapping groups in a way that regular - folders and filing systems can't. - - - - Using Folders, Searches, and vFolders - - To organize my mail box, I can set up a vFolder - for emails from my friend Vince, by doing (INSERT - PROCESS HERE). Then, whenever I want to see the - messages Vince has sent me, I open the vFolder, and - every message he's sent me shows up, no matter where - I've actually filed it. If I want, I can also create a - vFolder containing any message from my list of - co-workers which also has the name of the project in - it. That way, when Vince sends me mail about the - project, I can see that message both in the "Vince" - vFolder and in the "Project" vFolder. That's because - when I open up the "Vince" folder, I'm really - performing a search for all the mail from Vince, and - when I open the "Project" folder I'm really performing - a search for all the mail about the project. - - (INSERT SCREENSHOT HERE) - - - - - - - Staying organized: Mail Filters in Evolution - - Filters sort your email for you. People who subscribe to - multiple mailing lists, or who often need to refer to - messages they have sent, find filters especially helpful - to seperate personal from list-related mail, but they're - good for anybody who gets more than a few messages a day. - To create a filter, go to your - Inbox. Then select - Filter Druid from the - Tools menu. This will start the a - druid, which will allow you to - create filters. - - - The filter druid window - contains a window listing rules, and an option to create a - new rule. To start filtering your mail, click - Add to add a filtering rule. - You'll decide when it should take place: - - - - When mail arrives: Select - this option to have messages filtered as they - arrive. - - - - - When mail is sent: Select - this option to filter your outgoing mail. You - can use this feature to keep your - Outbox as organized as - your Inbox. - - - - - - - Then, the filter druid will ask you which emails it should - act upon. You can set criteria to include words or phrases - in the subject, To:, Cc: or body of the message. Once - you've decided which messages to filter, the druid will ask - you the sort of action you wish to take. More details and - screenshots should follow here. - - - - - Two Notable Filter Features - - - Any incoming email that does not meet - filter action criteria remains in the Inbox. - - - If you move a folder, your filters - will follow it. - - - - - -
- diff --git a/doc/C/usage-mainwindow.sgml b/doc/C/usage-mainwindow.sgml deleted file mode 100644 index a917f3a71f..0000000000 --- a/doc/C/usage-mainwindow.sgml +++ /dev/null @@ -1,264 +0,0 @@ - - - - The Main Window: Evolution Basics - - - Start Evolution by selecting - Evolution from the - Applications of the Main - Panel Menu, or by typing - evolution at the command-line.After - Evolution starts up, you will see - the main window, which looks a lot like - in . On the left of the - main window are the shortcut - bar and the tree-view. - Just underneath the title bar is a series of menus in the - menu bar, and below that, the - tool bar with buttons for different - functions. The largest part of the main - window is taken up by a welcome message. - - - - - -
- Evolution Main Window and Inbox - - Evolution Main Window - - - -
- - - - - The Way Evolution Looks - - The appearance of both - Evolution and - GNOME is very easy to - customize, so your screen might not look like this - picture. You might configure - Evolution to start with a - different view, or without the shortcut - bar or tree view. - - -
- - - The Shortcut Bar - - The buttons in the shortcut bar give - you quick access to the different functions that - Evolution provides. - - - The buttons in the shortcut bar are: - - - - Today, which will bring up a summary - of any new messages you've recieved, along with the tasks and - appointments you have lined up for today. - - - - - - Inbox, which will show you all - of your email. Your Inbox is also where you can - access Evolution's tools to filter, sort, organize, - and search your mail. - - - - - - The Calendar, which can store - appointments for you. Connected to a network, you - can use it to keep a group of people on schedule and - up to date. - - - - - - The Contacts tool holds your - addresses, phone numbers, and contact information. - Like calendar information, contact data can be - synchronized with hand-held devices and shared over a - network. - - - - - - The Tasks tool combines a "to - do" list with reminders to help you keep track of - daily events. - - - - - Notes is your catch-all - notepad: write haiku, take down - messages from phone conversations, or keep small - things organized. - - - - - - - - If you prefer to use a keyboard shortcut, or hot - key, you can use those instead. They're - shown... (INSERT DESCRIPTION) You can also set your own hot - keys for functions that don't have any; this is covered in - . If you're using the keyboard - shortcuts you may also want to hide the shortcut - bar by selecting Hide/Show Shortcut - Bar from the MENU menu. - - - - - The Tree View - - The tree view is the most comprehensive way to - get to your information: it can show you everything you've - stored with Evolution - appointments, address cards, emails, and so forth. - - The tree view display presents your - data like a file tree— it - starts small at the top, and branches downwards. There are a - few folders you will always see, because they're at the top. - On my computer, I have only one: Local. - When I click on the plus sign next to the label, I see the - contents: - - - - Calendar, where you'll find the - appointments and event listings. - - - - - Contacts, where your address - cards are stored. - - - - - Directories, for directories, which - have not been implemented yet. - - - - - Inbox, for your incoming mail. - This is where you will make the most subfolders. - - - - - Outbox, where you can store - copies of mail you have sent, or unsent drafts. - - - - - Trash, where you can throw things away. - - - - - - - - Right-clicking will bring up a menu for just about anything - in GNOME, and Evolution is no - exception. If you right-click on a folder, you'll have a - menu with the following options: - - Something - Something - Something - . - - - - Context-Sensitive Help - - You can almost always get help on an item by - right-clicking it. If you're not sure what something is, - or don't know what you can do with it, right-clicking and - choosing Help is a good way to - find out. - - - - - If a folder has other folders in it, there will be a plus - sign next to it. Click on the plus sign, and the folder will - open to let you see the other folders inside. This may - change in the future to something more attractive, like - triangles that drop down as you click on them to display the - rest of the tree. - - - - Any time new information arrives in a folder, that folder - will be highlighted, or its label displayed as bold - text. You can learn more about customizing - Evolution alerts and appearance - in . - - - - Moving and deleting folders and other items works in one of - two ways: using drag-and-drop or by - right-clicking and selecting an item from the - right-click menu. You can drag the - folders inside the tree view to change their order or put - one folder inside another. To delete a folder, drag it into - the trash folder or right-click it and select - Delete from the menu that pops - up. The same goes for individual messages, appointments, - and address cards, whether they're in the tree - view or not: drag them where you want them, and - they will go there. - - - You can also use the right-click menu to - move, rename, and delete folders. - Delete function from the - right-click menu. - - - Once you've familiarized yourself with the main - window you can start doing things with it. - We'll start with your email inbox: you've got a letter - waiting for you already. - - -
- - - - - - diff --git a/doc/C/usage-sync.sgml b/doc/C/usage-sync.sgml deleted file mode 100644 index f28ebc10cc..0000000000 --- a/doc/C/usage-sync.sgml +++ /dev/null @@ -1,19 +0,0 @@ - - - Synchronizing with a Hand-held Device - - Once you've set up a synchronization system, it pretty much - takes care of itself. Not only that, it's entirely possible - that your system administrator has set it up for you. All - that this chapter covers is how to use that system once it's - installed and configured. If you need to set it up, consult - . - - - - If you've already got Gnome-pilot set up to use - Evolution all you need to do is put - your hand-held device on the cradle and press the HotSync - button. No, really. That's all there is to it. - - \ No newline at end of file diff --git a/doc/Camel-Classes b/doc/Camel-Classes deleted file mode 100644 index 93aec087dd..0000000000 --- a/doc/Camel-Classes +++ /dev/null @@ -1,35 +0,0 @@ -CamelException -CamelProvider -CamelThreadProxy -CamelURL -GtkObject - + CamelObject - + CamelAddress - | + CamelInternetAddress - | ` CamelNewsAddress - + CamelDataWrapper - | + CamelMedium - | | ` CamelMimePart - | | ` CamelMimeMessage - | ` CamelMultipart - + CamelFolder - | ` CamelFolderPtProxy - + CamelFolderSearch - + CamelFolderSummary - + CamelMimeFilter - | + CamelMimeFilterBasic - | + CamelMimeFilterCharset - | + CamelMimeFilterIndex - | ` CamelMimeFilterSave - + CamelService - | + CamelStore - | ` CamelTransport - + CamelSession - + CamelStream - | + CamelSeekableStream - | | + CamelSeekableSubstream - | | + CamelStreamFs - | | ` CamelStreamMem - | + CamelStreamBuffer - | ` CamelStreamFilter - ` CamelThreadProxy \ No newline at end of file diff --git a/doc/ChangeLog b/doc/ChangeLog deleted file mode 100644 index d56b709778..0000000000 --- a/doc/ChangeLog +++ /dev/null @@ -1,134 +0,0 @@ -2000-05-27 Aaron Weber - - * C/evolution-guide.sgml: added Kevin Breit to author and - copyright. - - * C/apx-authors.sgml: Put app authors in a simplelist. - - * C/usage-mail.sgml: Removed USAGE-SETUP insertion, added xref to send - users to config-setupassist chapter. This and the following changes - take setup druid coverage out of usage - section and put it in config section. - * C/config-setupassist.sgml: Added mail druid coverage from - usage-setup.sgml. - * C/usage-setup.sgml: Removed file. contents in - config-setupassist.sgml. - * C/evolution-guide.sgml: Removed - USAGE-SETUP entity (and file usage-setup.sgml.) - - -2000-05-26 Aaron Weber - - * C/fig/mainwindow-pic.png: new file - * C/fig/mail-druid-pic.png: new file - * C/fig: New directory, for figure graphics. - - * C/apx-gloss.sgml: new file. glossary. thx. to kevin from chicago. - - * C/usage-setup.sgml: More accurate description of druid, and - moved to mail section-- see usage-mail.sgml entry. This is a new - location for this entity, and it may move more later. - - - * C/usage-mainwindow.sgml: altered description of starting - evolution. added screenshot for main-window picture. - - * C/usage-mail.sgml: added screenshots, added coverage of setup - druid and put it into get-and-send section, which is probably not - where it should stay. Also started filter druid coverage and - clarified examples, esp. in Bcc: section. - - * C/usage-contact.sgml: Clarified examples. - - * C/preface.sgml: rewording of "what is" and "about book" sections. - - * C/evolution-guide.sgml: added glossary entity APX-GLOSS, altered - phrasing in part intros, changed order of Setup-assistant section. - - * C/config-prefs.sgml: changed wording, removed ref. to re-running - setup assistant. - -2000-05-18 Aaron Weber - - * C/evo_book_0.1.sgml: removed. - - * C/apx-authors.sgml: new file. - * C/apx-bugs.sgml: same. - * C/apx-fdl.sgml: same. - * C/config-prefs.sgml: same. - * C/config-setupassist.sgml: same. - * C/config-sync.sgml: same. - * C/devel-action.sgml: same. - * C/devel-component.sgml: same. - * C/devel-script.sgml: same. - * C/evolution-guide.sgml: same. - * C/preface.sgml: same. - * C/usage-calendar.sgml: same. - * C/usage-contact.sgml: same. - * C/usage-mail.sgml: same. - * C/usage-mainwindow.sgml: same. - * C/usage-setup.sgml: same. - * C/usage-sync.sgml: same. - -2000-05-07 Dan Winship - - * Camel-Classes: sync - -2000-04-16 Aaron Weber - - * C/evo_book_0.1.sgml: new file (doc sgml) - - * C/ : New directory for doc sgml & graphics - -2000-03-05 Christopher James Lahey - - * white-papers/widgets/e-table.sgml: Added Miguel to the author - list for ETable. - -2000-03-03 Christopher James Lahey - - * white-papers/widgets/, white-papers/widgets/e-table.sgml: New - doc for the ETable widget. - - * ChangeLog: Created a ChangeLog file for the docs file and - integrated the individual ChangeLogs. - -2000-03-01 Dan Winship - - * ibex.sgml: Ibex white paper - -2000-02-29 Federico Mena Quintero - - * calendar.sgml: Sections for the calendar user agent and the - calendar client library. - -2000-02-29 Dan Winship - - * camel.sgml: Reorg a bit more, make the
 section narrower,
-	add more references to graphics (the graphics themselves are
-	still in beta), add a section on CamelStream.
-
-2000-02-28  Federico Mena Quintero  
-
-	* calendar.sgml: Section for the personal calendar server.
-
-2000-02-28  Dan Winship  
-
-	* camel.sgml: add Bertrand to authors, edit his additions
-
-2000-02-28  bertrand  
-
-	* camel.sgml: add a blurb about camel offering
-	uniform interface. needs style and grammar corrections. 
-	Talk about virtual folders.
-	Talk about lightweight messages
-	Talk about IMAP. 
-
-2000-02-28  Dan Winship  
-
-	* camel.sgml: Beginnings of a Camel white paper
-
-2000-02-25  Federico Mena Quintero  
-
-	* calendar.sgml: New file for the Evolution calendaring white paper.
-
diff --git a/doc/Design b/doc/Design
deleted file mode 100644
index 7b7cf6f821..0000000000
--- a/doc/Design
+++ /dev/null
@@ -1,201 +0,0 @@
-
-The Evolution Project specification
-Miguel de Icaza.
-
-
-* Introduction
-
-	Evolution is a project aiming at providing the free software
-	community with a professional, high-quality tool for managing
-	mail, appointments, tasks and other personal information
-	tools.  
-
-	We want to make Evolution a system that addresses our needs
-	(the free software development community) and we believe that
-	by addressing our needs, we will provide a system that will
-	scale in the years to come for other users that are just
-	starting to use computers and the internet.
-
-	The main objectives of Evolution are to provide these powerful
-	features, and to make the user interface as pretty and
-	polished as possible.
-
-	Evolution is a GNOME application and a number of auxiliary
-	CORBA servers that act as the storage backends. 
-
-	Evolution will copy the best user interface bits and the best
-	ideas and features found on contemporary groupware systems.
-
-* Evolution internals.
-
-	Evolution can store its information locally (files for mail,
-	calendar and address book) or on a remote server (imap/pop,
-	cap, ldap).  
-
-	Given the importance of syncing in this modern PDA world,
-	the Evolution GUI acts as a client to the data repository.
-	The data repository is a GUI-less CORBA server called Wombat.
-
-	Wombat provides a unified access system to the calendar and
-	addressbook data (doing mail is a bit hard, so we are leaving
-	this as a TODO item for now).
-
-	Wombat's CORBA interfaces are notifier-based.  This means that
-	CORBA requests sent to Wombat do not return values
-	inmediately, but rather than for Wombat requests the user has
-	to provide a CORBA object that will be notified of what
-	happened.
-
-	Yes, that sounds hairy.  It is actually pretty simple.  It
-	basically means that you submit requests to Wombat, and a
-	callback is invoked in your code when the request has been
-	carried away. 
-
-	This enables a Palm to sync to the repository without having
-	the GUI for Evolution running.  It also means that volunteers
-	will be able to write text-based and web-based versions of
-	Evolution (not me though :-).
-
-* Evolution as a platform
-
-	Evolution is more than a client for managing the above
-	information: Evolution is a platform for building groupware
-	applications that use the above components to get their work done.
-
-	To achieve this Evolution is designed to be scriptable, and it
-	exports its internals trough CORBA/Bonobo.  It is implemented
-	as a collection of Bonobo containers and Bonobo components.
-
-	There is a clean separation between the views (the user
-	interface) and the model (the view).  The views that we are
-	writing are GNOME based, and they talk to the Wombat CORBA
-	server.
-
-	Wombat takes care of notifications to the various clients for
-	the data. 
-
-* The overall organization
-
-	A bar similar to outlook provides shortcuts for accessing the
-	various resources managed by Evolution: mail folders,
-	contacts, tasks, journal entries, notes, messages and other
-	user-defined destinations. 
-
-* User interface widgets
-
-** The ETable package
-
-	This package provides a way of displaying and editing tables.
-
-	Tables are displayed based on a TableColumn definition that
-	defines the layout used for the display.  Table Columns can be
-	nested, and the package does grouping of information displayed
-	according to the criteria defined there.
-
-	This is used in multiple places troughout evolution: it is
-	used for the Mail summary display, for the TODO display and
-	TODO new data entry and for the address book.
-
-	Nesting in the address book can be performed on various
-	fields.  For example, a first level of nesting could be
-	"Company" and a second level would be "Country" the result is
-	a 2-level tree that can be collapsed expanded and contains the
-	information sorted/grouped by those two criteria.
-
-	The user interface for this will be copied from Outlook: the
-	possibility of adding and removing fields with drag and drop
-	as well as grouping using drag and drop.
-
-* The Mail system
-
-** The Mail sources
-
-	The mail system will support 4 sources of mail:
-
-		POP3 (transfer to a local file).
-		IMAP
-		Local mbox format in $MAIL.
-		Local mbox format that have other delivery points.
-
-	On top of that, it will be possible to browse existing mbox
-	archives (and possibly other formats in the future, like
-	Mailbox and Maildir).
-
-** Storing the mail
-
-	Mail that gets incorporated into the system is stored in mbox
-	format, and summary files are provided for quick access to the
-	files.  No modifications to the file on disk is performed (I
-	am not quite sure about this, perhaps we want to add the
-	status flags and some method for adding metadata to the mail).
-
-	Summary files are rebuilt on demand or rebuild if the mbox
-	file and the summary file have got out of sync.
-
-	A Metadata system that will enable us to attach information to
-	a message will have to be designed and implemented (enabling
-	users to add annotations to mails, and special keywords and
-	flags in a per-message fashion).
-
-** Folders
-
-	Michael Zucchi is working on a system that will let users
-	easily define rules for splitting their incoming mail into
-	physical folders.  
-
-	A further refinement to Folders are Virtual Folders.  This
-	basically provides a powerful search and viewing facility for
-	mail.  It works like this: when a mail is "incorporated" into
-	Evolution it is scanned and indexed.
-
-	Then users can enter queries into Evolution that will search
-	the entire database of messages.	
-
-** Virtual folders
-
-	Virtual folders will enable users to read/browse their mail in
-	new ways: by specifying search criterias, these folders will
-	contain messages that match the criteria given.  
-
-	There is more information about this in the libcamel
-	directory. 
-
-	We will index all headers from a message, and possible the
-	contents of messages and keep those on a separate file, to
-	enable users to query their mail database.
-
-** Mail summary display
-
-	The summary will be displayed using the ETable package, to
-	enable users to add a number of sorting criteria and various
-	display methods for the summary view.
-
-	The Outlook methods for displaying will be present on the
-	system.
-
-	Message threading will be supported in Evolution.
-
-** Message display engine
-
-	We are going to be using a combination of
-	libcamel/limime/libjamie to parse messages and render them
-	into an HTML buffer.
-
-* The HTML engine
-
-	The GtkHTML engine will be used to display messages, and will
-	be extended to support a number of features that we require:
-	internal handling of characters will be based on Unicode
-
-* The message composer
-
-	Regular features found in composers will be added: connecting
-	the composer to the address book, support for drag and drop
-	for including attachments, editing the message, archiving
-	drafts and archiving messages sent.
-
-	Ettore has been working on adding editing support to the
-	GtkHTML and he is working currently on a Bonobo component that
-	will provide a ready-to-use Bonobo control for embedding into
-	other applications.
-
diff --git a/doc/white-papers/calendar/calendar.sgml b/doc/white-papers/calendar/calendar.sgml
deleted file mode 100644
index 2cb3132e2b..0000000000
--- a/doc/white-papers/calendar/calendar.sgml
+++ /dev/null
@@ -1,209 +0,0 @@
-Evolution">
-CUA">
-PCS">
-Bonobo">
-CORBA">
-GTK+">
-]>
-
-
- - - &Evolution; Calendaring Framework - - - - Federico - Mena Quintero - -
- federico@helixcode.com -
-
-
-
- - - 2000 - Helix Code, Inc. - - - - - The &Evolution; groupware suite provides a framework for - developing calendaring applications, as well as a graphical - calendar client and a personal calendar server. This white - paper describes the architecture of the &Evolution; - calendaring framework. - - -
- - - - - Introduction - - - Calendaring is an important part of a groupware suite. A - calendaring framework will allow a user to keep a personal - calendar and have several applications use it. Such - applications could be a graphical calendar client that the user - employs to schedule appointments and keep track of his time, a - Palm Pilot synchronization client, or - a simple alarm or reminder utility. A comprehensive calendaring - framework will also allow multiple users to schedule - appointments between each other; for example, a project director - may want to schedule a weekly meeting with the rest of the - project members, or a person who owns a large house may want to - schedule a big party with his friends. The attendees will then - want to reply with messages such as, “I will - attend”, or “I will attend only if the proposed time - is changed”. - - - - The &Evolution; groupware suite provides a framework for - developing calendaring applications, as well as a graphical - calendar client or calendar user agent (&CUA;) and a personal - calendar server (&PCS;). - - - - The following sections explain the basic calendaring framework, - the functions of the calendar user agent and the personal - calendar server, and the relationship between the two. - - - - - - - Personal Calendar Server - - - The personal calendar server (&PCS;) provides centralized - management and storage of a user's personal calendar. Multiple - clients can connect to the &PCS; simultaneously to query and - modify the user's calendar in a synchronized fashion. The main - features of the &PCS; are as follows: - - - - Storage - - - The &PCS; is responsible for loading and saving calendars. - Centralizing the loading and saving functionality allows - multiple clients to use the same calendar at the same time - without having to worry about each other. - - - - - Basic Queries - - - The &PCS; provides functions to do basic queries on a - calendar, for example, a client can ask the server for a list - of all the appointments in the calendar, or for all the data - for a specific appointment. - - - - - Recurrence and Alarm Queries - - - Clients can ask the &PCS; for a list of the appointments that - occur within a specified time range; for example a graphical - client that has a per-week view could ask the &PCS; for all - the appointments that occur in a particular week. This - includes multiple occurrences of a single recurring event; for - example, the object for “a 1-hour meeting that occurs on - every Tuesday and Thursday” is represented inside the - &PCS; as a single event with a recurrence rule. Similarly, - clients can ask the &PCS; for a list of events that have - alarms that trigger within a specified time range. - - - - - Notification of Changes - - - This is the most important function of the &PCS;, as it allows - multiple calendar clients to maintain a unified view of the - calendar between the server and themselves. When a client - asks the &PCS; to modify or remove an event, the &PCS; - notifies all the clients that are connected to it about the - change. The policy is that “the server is always - right”; clients can act as dumb views onto the - calendar's data and they will be notified by the &PCS; when - something changes. - - - - - - - - Calendar User Agent - - - A calendar user agent (&CUA;) is a program that lets a user - manipulate a calendar. &Evolution; provides an attractive, - graphical calendar client that communicates with the &Evolution; - personal calendar server. - - - - The &Evolution; calendar client just provides a view onto the - data that is stored and managed by the personal calendar server. - The calendar client does not perform direct manipulations on a - calendar's data; instead it offloads those requests to the - calendar server, which takes care of making the appropriate - modifications in the calendar and then notifies all the clients - about the changes. - - - - - - - Calendar Client Library - - - Communication between the personal calendar server and calendar - clients is defined by a set of &Bonobo; &CORBA; interfaces. - Clients can be written by implementing the client-side - Listener interface, which defines the - notification callbacks that the PCS uses to inform clients about - changes to the calendar. - - - - As a convenience for >K; programmers, &Evolution; also - includes a library which provides a - CalClient class which can be used for - communication with the personal calendar server. Objects of - this class automatically contact the PCS when they are created. - CalClient provides functions to request - changes in the calendar, and it also emits signals when it gets - notification about changes from the PCS. This makes it easy and - convenient to write calendar clients for &Evolution; using - >K;. - - - - The implementation of the CalClient class - simply wraps the &Evolution; &CORBA; interfaces for calendaring - with a familiar-looking >K; object. Calls to the - Listener interface get translated to - signal emissions from the CalClient, thus - shielding programmers from the details of the &CORBA; - interfaces. - - -
diff --git a/doc/white-papers/mail/camel.sgml b/doc/white-papers/mail/camel.sgml deleted file mode 100644 index a339909f54..0000000000 --- a/doc/white-papers/mail/camel.sgml +++ /dev/null @@ -1,339 +0,0 @@ -Evolution"> - -]> - -
- - - The &Camel; Messaging Library - - - - Dan - Winship - -
- danw@helixcode.com -
-
-
- - - Bertrand - Guiheneuf - -
- bertrand@helixcode.com -
-
-
-
- - - 2000 - Helix Code, Inc. - - -
- - - Introduction - - - &Camel; is a generic messaging library. It is being used as the - back end for the mail component of &Evolution;. The name - "&Camel;" is an acronym; it refers to the fact that the - library is capable of going several days without food or water. - It means : Camel's Acronym Makes Everyone Laugh. - - - - &Camel;'s initial design is heavily based on Sun's - JavaMail API. It uses the Gtk+ object - system, and many of its classes are direct analags of JavaMail - classes. Its design has also been influenced by the features of - IMAP, and the limitations of the standard UNIX mbox mail store, - which set some of the boundaries on its requirements and - extensibility. - - - - &Camel; sees all message repositories as stores containing - folders. These folders in turn contain the messages the client - actually accesses. The use of such a unified interface allows - the client applications to be very extensible. &Camel; includes - an external provider mechanism which allows applications to - dynamically load and use protocols which were not available when - the application was initially written. - - - - The abstract store/folder mechanism is a powerful and versatile - way of accessing messages. No particular asumptions are made on - the client side, thus allowing new ways of managing the - messages. For example, the messages stored in the folders don't - necessarily have to share some common physical location. The - folder can be a purely virtual folder, containing only - references to the actual messages. This is used by the "vFolder" - provider, which allows you select messages meeting particular - criteria and deal with them as a group. - - - - In addition to these possibilities, &Camel; has full MIME - support. &Camel; MIME messages are lightweight objects - representing the MIME skeleton of the actual message. The data - contained in the subparts are never stored in memory except when - they are actually needed. The application, when accessing the - various MIME objects contained in the message (text parts, - attachments, embedded binary objects ...) asks &Camel; for a - stream that it can read data from. This scheme is particularly - useful with the IMAP provider. IMAP has strong MIME support - built-in, which allows &Camel; to download only the parts of - messages that it actually needs: attachments need not be - downloaded until they are viewed, and unnecessary - "multipart/alternative" parts will never be read off the server. - - - - - Overview - - - - - To begin using &Camel;, an application first creates a - CamelSession object. This object is used - to store application defaults, and to coordinate communication - between providers and the application. - - - - A CamelProvider is a dynamically-loadable - module that provides functionality associated with a specific - service. Examples of providers are IMAP and SMTP. Providers - include subclasses of the various other &Camel; classes for - accessing and manipulating messages. - - - - CamelService is an abstract class for - describing a connection to a local or remote service. It - currently has two subclasses: CamelStore, - for services that store messages (such as IMAP servers and mbox - files), and CamelTransport, for services - that deliver messages (such as SMTP, or a local MTA). A provider - could also be both a store and a transport, as in the case of - NNTP. - - - - A CamelStore contains some number of - CamelFolder objects, which in turn - contain messages. A CamelFolder provides - a CamelFolderSummary object, which - includes details about the subject, date, and sender of each - message in the folder. The folder also includes the messages - themselves, as subclasses of CamelMedium. - - - - Email messages are represented by the - CamelMimeMessage class, a subclass of - CamelMedium. This class includes - operations for accessing RFC822 and MIME headers, accessing - subparts of MIME messages, encoding and decoding Base64 and - Quoted-Printable, etc. - - - - CamelTransport includes methods for - delivering messages. While the abstract - CamelTransport::send method takes a - CamelMedium, its subclasses may only be - able to deliver messages of specific - CamelMedium subclasses. For instance, - CamelSendmailTransport requires a - CamelMimeMessage, because it needs a - message that includes a "To:" header. A hypothetical - CamelNNTPTransport would need a - CamelNewsMessage, which would have a - "Newsgroups:" header. - - - - The content of messages are referred to using - CamelStream and its subclasses. In the - case of an mbox-based store, the - CamelStream would abstract the operation - of reading the correct section of the mbox file. For IMAP, - reading off the CamelStream might result - in commands being issued to the remote IMAP server and data - being read off a socket. - - - - The final major class in &Camel; is - CamelException, which is used to - propagate information about errors. Many methods take a - CamelException as an argument, which the - caller can then check if an error occurs. It includes both a - numeric error code which can be interpreted by the program, and - a text error message that can be displayed to the user. - - - - - Major Subcomponents - - - The Message Store - - - A CamelStore inherits the ability to - connect and authenticate to a service from its parent class, - CamelService. It then adds the ability - to retrieve folders. A store must contain at least one folder, - which can be retrieved with - CamelStore::get_default_folder. There are - also methods to retrieve the "top-level" folder (for - hieararchical stores), and to retrieve an arbitrary folder by - name. - - - - All CamelFolders must implement certain - core operations, most notably generating a summary and - retrieving and deleting messages. A - CamelFolder must assign a permanently - unique identifier to each message it contains. Messages can - then be retrieved via - CamelFolder::get_message_by_uid. Alternately, - within a single mail-reading session, messages can be referred - to by their linear position within the store using - CamelFolder::get_message_by_number. - - - - Folders must also implement the - get_parent_folder and - list_subfolders methods. For stores that - don't allow multiple folders, they would return NULL and an - empty list, respectively. Stores that do allow multiple - folders will also define methods for creating and deleting - folders, and for moving messages between them (assuming the - folders are writable). - - - - Folders that support searching can define the - search_by_expression method. For mbox - folders, this is implemented by indexing the messages with the - ibex library and using that to search them later. For IMAP - folders, this uses the IMAP SEARCH command. Other folder types - might not be able to implement this functionality, in which - case users would not be able to do full-content searches on - them. - - - - - Messages - - - As mentioned before, messages are represented by subclasses of - CamelMedium. - CamelMedium itself is a subclass of - CamelDataWrapper, a generic class for - connecting a typed data source to a data sink. - CamelMedium adds the concept of message - headers versus message body. - (CamelDataWrapper has one other - important subclass, CamelMultipart, - which is used to provide separate access to the multiple - independent parts of a multipart MIME type.) - CamelMedium's subclasses provide more - specialized handling of various headers: - CamelMimePart adds special handling for - the &ldquot;Content-*&rdquot; headers in MIME messages, and - its subclass CamelMimeMessage adds - handling for the RFC822 headers. - - - - - - Consider a message with two parts: a text part (in both plain - text and HTML), and an attached image: - - - - From: Dan Winship <danw@helixcode.com> - To: Matt Loper <matt@helixcode.com> - Subject: the Camel white paper - MIME-Version: 1.0 - Content-Type: multipart/mixed; - boundary="jhTYrnsRrdhDFGa" - - This is a multi-part message in MIME format. - --jhTYrnsRrdhDFGa - Content-Type: multipart/alternative; - boundary="sFSenbAFDSgDfg" - - --sFSenbAFDSgDfg - Content-Type: text/plain - - Hey, Matt - - Check out this graphic... - - -- Dan - - --sFSenbAFDSgDfg - Content-Type: text/html - - Hey, Matt<br> - <br> - Check out this graphic...<br> - <br> - -- Dan<br> - <br> - --sFSenbAFDSgDfg-- - - --jhTYrnsRrdhDFGa - Content-Type: image/png - Content-Transfer-Encoding: base64 - - F4JLw0ORrkRa8AwAMQJLAaI3UDIGsco9RAaB92... - --jhTYrnsRrdhDFGa-- - - - - In &Camel;, this would be represented as follows: - - - - - - - Streams - - - Streams are a generic data transport layer. Two basic stream - classes are CamelStreamFs, for - reading and writing files, and - CamelStreamMem, for reading from and - writing to objects that are already in memory. - - - - Streams can also be chained together. So a CamelMimePart - containing base64-encoded data can filter its output through - a CamelStreamB64. Other parts of the application that want - to read its data will never need to even realize that the - original data was encoded. - - - -
diff --git a/doc/white-papers/mail/ibex.sgml b/doc/white-papers/mail/ibex.sgml deleted file mode 100644 index dcb8f5ca4b..0000000000 --- a/doc/white-papers/mail/ibex.sgml +++ /dev/null @@ -1,158 +0,0 @@ -Evolution"> - - -]> - -
- - - Ibex: an Indexing System - - - - Dan - Winship - -
- danw@helixcode.com -
-
-
-
- - - 2000 - Helix Code, Inc. - - -
- - - Introduction - - - &Ibex; is a library for text indexing. It is being used by - &Camel; to allow it to quickly search locally-stored messages, - either because the user is looking for a specific piece of text, - or because the application is contructing a vFolder or filtering - incoming mail. - - - - - Design Goals and Requirements for Ibex - - - The design of &Ibex; is based on a number of requirements. - - - - - First, obviously, it must be fast. In particular, searching - the index must be appreciably faster than searching through - the messages themselves, and constructing and maintaining - the index must not take a noticeable amount of time. - - - - - - The indexes must not take up too much space. Many users have - limited filesystem quotas on the systems where they read - their mail, and even users who read mail on private machines - have to worry about running out of space on their disks. The - indexes should be able to do their job without taking up so - much space that the user decides he would be better off - without them. - - - - Another aspect of this problem is that the system as a whole - must be clever about what it does and does not index: - accidentally indexing a "text" mail message containing - uuencoded, BinHexed, or PGP-encrypted data will drastically - affect the size of the index file. Either the caller or the - indexer itself has to avoid trying to index these sorts of - things. - - - - - - The indexing system must allow data to be added to the index - incrementally, so that new messages can be added to the - index (and deleted messages can be removed from it) without - having to re-scan all existing messages. - - - - - - It must allow the calling application to explain the - structure of the data however it wants to, rather than - requiring that the unit of indexing be individual files. - This way, &Camel; can index a single mbox-format file and - treat it as multiple messages. - - - - - - It must support non-ASCII text, given that many people send - and receive non-English email, and even people who only - speak English may receive email from people whose names - cannot be written in the US-ASCII character set. - - - - - - While there are a number of existing indexing systems, none of - them met all (or even most) of our requirements. - - - - - The Implementation - - - &Ibex; is still young, and many of the details of the current - implementation are not yet finalized. - - - - With the current index file format, 13 megabytes of Info files - can be indexed into a 371 kilobyte index file—a bit under - 3% of the original size. This is reasonable, but making it - smaller would be nice. (The file format includes some simple - compression, but gzip can compress an - index file to about half its size, so we can clearly do better.) - - - - The implementation has been profiled and optimized for speed to - some degree. But, it has so far only been run on a 500MHz - Pentium III system with very fast disks, so we have no solid - benchmarks. - - - - Further optimization (of both the file format and the in-memory - data structures) awaits seeing how the library is most easily - used by &Evolution;: if the indexes are likely to be kept in - memory for long periods of time, the in-memory data structures - need to be kept small, but the reading and writing operations - can be slow. On the other hand, if the indexes will only be - opened when they are needed, reading and writing must be fast, - and memory usage is less critical. - - - - Of course, to be useful for other applications that have - indexing needs, the library should provide several options, so - that each application can use the library in the way that is - most suited for its needs. - - -
diff --git a/doc/white-papers/widgets/e-table.sgml b/doc/white-papers/widgets/e-table.sgml deleted file mode 100644 index 5ff4faf2ae..0000000000 --- a/doc/white-papers/widgets/e-table.sgml +++ /dev/null @@ -1,279 +0,0 @@ -Evolution"> -ETable"> -ETableModel"> -ETableSimple"> -ETableHeader"> -ETableSpecification"> -ETableCol"> -]> - -
- - - The ETable Widget - - - - Chris - Lahey - -
- clahey@helixcode.com -
-
-
- - Miguel - de Icaza - -
- miguel@helixcode.com -
-
-
-
- - - 2000 - Helix Code, Inc. - - -
- - - Introduction - - - &ETable; is a table widget on steroids. It is intended to provide - all the table functionality needed throughout &Evolution;, and - hopefully be general purpose enough to be used in other projects. - - - - &ETable; provides a lot of interactive control over the data in the - table. Without any work from the programmer, &ETable; provides - rearrangeable columns and editable data. When finished, &ETable; will - also provide, again with no programmer intervention, easy interactive - sorting and grouping. - - - - &ETable; gives you a great deal of functionality, flexibility, and - power. Most of this power is internal to the widget, but some of - the flexibility requires a bit of work by the programmer. - However, once you learn it, &ETable; is not very hard at all to - use. - - - - &ETable;'s power comes from the fact that it is fully - model/view/controller based. Various models are involved into - the process of rendering the information, and various views are - provided. The programmer has a wide range of options: from the - most finely hand-tuned table to a generic all-encompasing widget - that takes over most of tasks. It is up to the programmer: he - can use the simple to use &ETable; widget that takes care of - everything in a generic way, or he can use the various - components to roll his own tabular display. - - - - &ETable; ships with a standard set of information renderers: - strings, bitmaps, toggle-buttons, check-boxes, and multi-line - strings. But the programmer can write and implement his own - renderer for his information. This means that by default - &ETable; provides the basic display facilities that programmers - required, but they offer the programmer a complete freedom to - incorporate new cell renderers. - - - - - - ETableModel - - - The data back end for the &ETable; is an &ETableModel;. The - &ETableModel is an abstract interface that acts as the - information repository for the various &ETable components. - - - - To use &ETable; you have to create a subclass of the abstract - &ETableModel; class. However, to save you the work of defining - a new GtkClass every time you use - &ETable, there is a predefined subclass of &ETableModel; called - &ETableSimple; which simply takes a list of function callbacks - to perform the various operations. - - - - - - Columns - - - There are two different meanings to the word "column". The first - is the model column (defined by the &ETableCol: object). A model - column describes how it maps to the column in the &ETableModel; - as well as containing information about its properties (name, - resizability, resize dimensions, and a renderer for this - specific columns). - - - - &ETable; distinguishes between a model column index, and a view - column index. The former reflects the column in which the data - is stored in the &ETableModel; The later represents the actual - location at which the column is being displayed in the screen. - - - - Each view column index corresponds to a specific model column, - though a model column may have any number of view columns - associated with it (including zero). For example the same - column might be rendered twice, or the data from one column - could be used to display different bits of information - - - - The view column does not necessarily depend on only one model - column. In some cases, the view column renderer can be given a - reference to another model column to get extra information about - its display. For example, a mail program could display deleted - messages with a line through them by creating a model column - with no corresponding view column that told whether or not the - message is deleted, and then having the text column - strikethrough the display if the invisible column had a value - corresponding to "deleted". - - - - The view column also specifies a few other pieces of - information. One piece of information is the renderer. &ETable; - provides a number of renderers to choose from, or you can write - your own. Currently, there are renderers for text, image sets, - and checkboxes. - - - - The view column also includes information about the header. - There are two types of headers: text, and pixbuf. The first - allows you to specify a string which is rendered in the header. - The second allows you to specify an image to copy into the - header. - - - - - Header - - - The &ETableHeader; represents the header information for the - table. The &ETableHeader; is used in two different ways. The - first is the in the full_header - element of an &ETable;. This is the list of possible columns in - the view. You add each of your columns to this &ETableHeader; - and then pass it into the &ETable;. - - - - The second use is completely internal. &ETable; uses another - &ETableHeader; to store the actual displayed columns. Many of - the &ETableHeader; functions are for this purpose. The only - functions that users of the library should need to use are - e_table_header_new and - e_table_header_add_col. - - - - - Layout Specification - - - &ETable; uses an &ETableSpecification; to layout the columns of - the widget. The &ETableSpecification; is specified as XML data - passed into the &ETable; as a string. - - - - The most powerful part of the &ETableSpecification; is that when - finished, &ETable; will allow you to get a copy of an - &ETableSpecification; that describes the current view of the - tree. This allows the developer to save the current view so that - next time the user opens this table, they find it in exactly the - state that they left it. - - - - The XML specification allows for a number of things. First, it - allows you to pick a set of default columns to be shown. Thus, - even if you had hundreds of pieces of data, you could choose to - only display a few that fit on the screen by default. - - - - The second major thing that the &ETableSpecification; allows you - to specify is the column grouping and sorting. &ETable; has a - powerful mechanism for allowing the user to choose columns to - group by, thus allowing multiple columns of sorting, as well as - visual grouping of similar elements and interactive selection of - what data to display. - - - - The grouping in &ETableSpecification; is specified as a - hierarchy of columns to group by. Each level of the hierarchy - lets you sort by a particular column, either ascending or - descending. All levels except the last cause the canvas to group - by the given column. - - - - An example &ETableSpecification; follows. - - - - <ETableSpecification> - <columns-shown frozen_columns="2"> - <column> 0 </column> - <column> 1 </column> - <column> 2 </column> - <column> 3 </column> - <column> 4 </column> - </columns-shown> - <grouping> - <group column="3" ascending="1"> - <group column="4" ascending="0"> - <leaf column="2" ascending="1"/> - </group> - </group> - </grouping> - </ETableSpecification> - - - - This example has 5 columns which are initially in order. It has - 2 levels of grouping. The first is grouped by the 4th column - (all indexes are 0 based) and sorts those groups in ascending - order. Inside those groups, the data is grouped by the fifth - column and sorted in descending order of the fifth column. - Finally, the data in those groups is sorted by the third column - in ascending order. Due to the "frozen_columns" attribute on the - columns-shown element, the user will not be - able to rearrange the first two columns. They will always be the - first two. - - - - - Conclusion - - - All in all, &ETable; is a very powerful widget. Once you learn - to use it, you have access to a vast amount of power requiring a - comparatively small amount of work. - - -
diff --git a/e-util/.cvsignore b/e-util/.cvsignore deleted file mode 100644 index cb49036068..0000000000 --- a/e-util/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -.deps -Makefile -Makefile.in -.libs -*.lo -*.la diff --git a/e-util/ChangeLog b/e-util/ChangeLog deleted file mode 100644 index 519b62cb7b..0000000000 --- a/e-util/ChangeLog +++ /dev/null @@ -1,235 +0,0 @@ -2000-05-27 Federico Mena Quintero - - * e-dialog-widgets.c (e_dialog_editable_set): Moved over from - event-editor-utils.c. - (e_dialog_editable_get): Likewise. - (e_dialog_toggle_set): Likewise. - (e_dialog_toggle_get): Likewise. - (e_dialog_spin_set): Likewise. - (e_dialog_spin_get_double): Likewise. - (e_dialog_spin_get_int): Likewise. - (e_dialog_option_menu_set): Likewise, and added a value map. - (e_dialog_option_menu_get): Likewise. - (e_dialog_dateedit_set): Likewise. - (e_dialog_dateedit_get): Likewise. - (e_dialog_radio_set): New function. - (e_dialog_radio_get): New function. - -2000-05-24 Christopher James Lahey - - * e-paned.c, e-paned.h: Removed. - -2000-05-23 Federico Mena Quintero - - * e-dialog-widgets.c (get_radio_value): Implemented. Amazing that - one has to go through so much pain to get a stupid value from - GTK+. - (hook_option_menu): Implemented. Same complaint. - (get_toggle_value): Implemented. - (get_spin_button_value): Implemented. - (get_entry_value): Implemented. - (e_dialog_widget_hook_value): Function to hook a widget to the - variable it will modify. - (e_dialog_get_values): Function to feed the variables from a - dialog's widgets. - (e_dialog_xml_widget_hook_value): Function to hook a widget from - a Glade file. - -2000-05-23 Christopher James Lahey - - * e-util.c, e-util.h: Added e_write_file. - -2000-05-19 Federico Mena Quintero - - * e-dialog-widgets.[ch]: New files with utilities for hooking up - widgets in Glade-generated dialogs. - - * Makefile.am (libeutil_la_SOURCES): Added e-dialog-widgets.[ch]. - -2000-05-19 Christopher James Lahey - - * e-gui-utils.c, e-gui-utils.h: Added e_container_foreach_leaf. - -2000-05-18 Christopher James Lahey - - * Makefile.am: Add imagesdir support. - - * e-gui-utils.c, e-gui-utils.h: Added e_create_image_widget for - glade use. - -2000-05-16 Christopher James Lahey - - * e-xml-utils.c: xmlGetProp appears to return malloced memory. - Thus we must free it. - -2000-05-15 Ettore Perazzoli - - * e-util.c (e_free_string_list): New function. - -2000-05-14 Christopher James Lahey - - * e-util.c, e-util.h: Added e_strdup_strip which returns a copy of - the string with the leading and trailing spaces removed. - -2000-05-11 NotZed - - * e-sexp.c (e_sexp_finalise): Destroy the g_scanner when cleaning up. - (e_sexp_finalise): Free symbol table on finalise. - -2000-05-09 Christopher James Lahey - - * e-canvas.c: Remove reflow idle when being destroyed. - -2000-05-06 Christopher James Lahey - - * e-html-utils.c: Got rid of some warnings. - - * e-util.c, e-util.h: Added e_read_file which takes a filename and - returns a newly allocated string containing the contents of that - file. - -2000-05-03 Ettore Perazzoli - - * e-util.h: #include and . - - * e-util.c (e_free_object_list): New utility function. - -2000-05-02 Damon Chaplin - - * e-canvas.c (e_canvas_focus_in): - (e_canvas_focus_out): set and reset the GTK_HAS_FOCUS flag. We now get - focus_out events correctly. - -2000-05-02 NotZed - - * e-sexp.c (e_sexp_finalise): Free the parse tree if we have one. - (e_sexp_parse): If we already have a parse tree, free it. - -2000-05-02 Matt Loper - - * Makefile.am: set G_LOG_DOMAIN. - -2000-05-01 Ettore Perazzoli - - * e-xml-utils.c, e-xml-utils.h: Constified all the functions. - -2000-04-27 Dan Winship - - * e-html-utils.c (e_text_to_html): Moved here from the mailer, - since it's of general use, and the composer needs it too. - -2000-04-24 Miguel de Icaza - - * e-popup-menu.c: New file. Implements easy to use popup menus. - -2000-04-24 Matt Loper - - * e-paned.c: New file. Makes a GtkPaned with more than two - children. - * e-paned.h: same. - - * Makefile.am: added e-paned.[ch]. - -2000-04-19 Christopher James Lahey - - * e-xml-utils.c, e-xml-utils.h: Added - e_xml_get_child_by_name_by_lang. - -2000-04-16 Anders Carlsson - - * e-canvas.c (e_canvas_class_init): Add realize. - (e_canvas_realize): Set the back pixmap to NULL to reduce flicker. - -2000-04-14 Christopher James Lahey - - * e-xml-utils.c: Fixing a warning. - -2000-04-14 Christopher James Lahey - - * e-xml-utils.c: Add g_return_if_fails. - -2000-04-12 Miguel de Icaza - - * e-cursors.c (e_cursor_get): Prevent next hacker to get bitten by this. - -2000-04-10 Christopher James Lahey - - * e-canvas.c: Added proper keyboard focus handling. - -2000-04-06 Matt Loper - - * e-setup.c (e_setup_base_dir): Get/set Evolution's base directory - via gnome-config. - (mkdir_if_necessary): New function. - (e_setup_base_dir): Use mkdir_if_necessary(). - -2000-03-22 NotZed - - * e-util/e-sexp.h: Formatting cleanup. - -2000-03-07 NotZed - - * e-util/Makefile.am (libeutil_la_SOURCES): s-sexp.h -> e-sexp.h. - -2000-03-12 Christopher James Lahey - - * e-util/e-canvas.c, e-util/e-canvas.h: Fixed some bugs here to - speed up reflow and to make it fail less often. - -2000-03-10 Christopher James Lahey - - * e-util/e-canvas.c, e-util/e-canvas.h: Designed a new system for - doing hierarchical displays in the canvas. Adds an extra idle - loop to the canvas system. - -2000-03-05 Christopher James Lahey - - * e-util/e-xml-utils.c: Fixed e_xml_set_integer_prop_by_name. - -2000-03-04 Christopher James Lahey - - * e-util/e-xml-utils.c, e-util/e-xml-utils.h: Added - e_xml_set_integer_prop_by_name. - -2000-02-28 NotZed - - * e-util/e-sexp.[ch]: Added. moved from filter-sexp.[ch] - - * e-util/Makefile.am (libeutil_a_SOURCES): Add e-sexp. - (noinst_LTLIBRARIES): Changed to a libtool library. - -2000-02-24 Christopher James Lahey - - * e-util/e-xml-utils.c, e-util/e-xml-utils.h: Added - e_xml_get_integer_prop_by_name. - - * e-util/Makefile.am: Added e-util.c. - - * e-util/e-util.h: Added e-util.c functions. - - * e-util/e-util.c: New file for compare functions - -2000-02-24 Christopher James Lahey - - * e-util/e-canvas-utils.h: Fixed the comment at the top and added - #ifndef __E_CANVAS_UTILS__. - - * e-util/Makefile.am: Added e-xml-utils.c and - e-xml-utils.h. - - * e-util/e-xml-utils.h, e-util/e-xml-utils.c: Added files for some - xml utilities. - - * e-util/e-util.h: Added type EFocus which describes which - direction the focus will be coming from. - -2000-02-23 Dan Winship - - * e-util/e-setup.c (e_setup_base_dir): Make ~/evolution mode 700 - rather than mode 600 (and use the symbolic name rather than the - number). - -2000-02-09 Christopher James Lahey - - * e-util/Makefile.am: Add canvas utilities to libeutil. - diff --git a/e-util/Makefile.am b/e-util/Makefile.am deleted file mode 100644 index cfed75a936..0000000000 --- a/e-util/Makefile.am +++ /dev/null @@ -1,32 +0,0 @@ -imagesdir = $(datadir)/images/evolution - -INCLUDES = \ - $(GNOME_INCLUDEDIR) \ - -DEVOLUTION_IMAGES=\""$(imagesdir)"\" \ - -DG_LOG_DOMAIN=\"e-utils\" - -noinst_LTLIBRARIES = libeutil.la - -libeutil_la_SOURCES = \ - e-canvas.c \ - e-canvas.h \ - e-canvas-utils.c \ - e-canvas-utils.h \ - e-cursors.c \ - e-cursors.h \ - e-dialog-widgets.c \ - e-dialog-widgets.h \ - e-gui-utils.c \ - e-gui-utils.h \ - e-html-utils.c \ - e-html-utils.h \ - e-popup-menu.c \ - e-popup-menu.h \ - e-setup.c \ - e-setup.h \ - e-sexp.c \ - e-sexp.h \ - e-util.c \ - e-util.h \ - e-xml-utils.c \ - e-xml-utils.h diff --git a/e-util/e-canvas-utils.c b/e-util/e-canvas-utils.c deleted file mode 100644 index 2b50248124..0000000000 --- a/e-util/e-canvas-utils.c +++ /dev/null @@ -1,36 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * e-canvas-utils.c - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include "e-canvas-utils.h" - -void -e_canvas_item_move_absolute (GnomeCanvasItem *item, double dx, double dy) -{ - double translate[6]; - - g_return_if_fail (item != NULL); - g_return_if_fail (GNOME_IS_CANVAS_ITEM (item)); - - art_affine_translate (translate, dx, dy); - - gnome_canvas_item_affine_absolute (item, translate); -} diff --git a/e-util/e-canvas-utils.h b/e-util/e-canvas-utils.h deleted file mode 100644 index 9580f64f96..0000000000 --- a/e-util/e-canvas-utils.h +++ /dev/null @@ -1,29 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * e-canvas-utils.h - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef __E_CANVAS_UTILS__ -#define __E_CANVAS_UTILS__ - -#include -void e_canvas_item_move_absolute (GnomeCanvasItem *item, double dx, double dy); - -#endif /* __E_CANVAS_UTILS__ */ diff --git a/e-util/e-canvas.c b/e-util/e-canvas.c deleted file mode 100644 index 534e3fb1e8..0000000000 --- a/e-util/e-canvas.c +++ /dev/null @@ -1,460 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * e-canvas.c - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include -#include "e-canvas.h" -static void e_canvas_init (ECanvas *card); -static void e_canvas_destroy (GtkObject *object); -static void e_canvas_class_init (ECanvasClass *klass); -static void e_canvas_realize (GtkWidget *widget); -static gint e_canvas_key (GtkWidget *widget, - GdkEventKey *event); - -static gint e_canvas_focus_in (GtkWidget *widget, - GdkEventFocus *event); -static gint e_canvas_focus_out (GtkWidget *widget, - GdkEventFocus *event); - -static int emit_event (GnomeCanvas *canvas, GdkEvent *event); - -static GnomeCanvasClass *parent_class = NULL; - -enum { - REFLOW, - LAST_SIGNAL -}; - -static guint e_canvas_signals [LAST_SIGNAL] = { 0, }; - -GtkType -e_canvas_get_type (void) -{ - static GtkType canvas_type = 0; - - if (!canvas_type) - { - static const GtkTypeInfo canvas_info = - { - "ECanvas", - sizeof (ECanvas), - sizeof (ECanvasClass), - (GtkClassInitFunc) e_canvas_class_init, - (GtkObjectInitFunc) e_canvas_init, - /* reserved_1 */ NULL, - /* reserved_2 */ NULL, - (GtkClassInitFunc) NULL, - }; - - canvas_type = gtk_type_unique (gnome_canvas_get_type (), &canvas_info); - } - - return canvas_type; -} - -static void -e_canvas_class_init (ECanvasClass *klass) -{ - GtkObjectClass *object_class; - GnomeCanvasClass *canvas_class; - GtkWidgetClass *widget_class; - - object_class = (GtkObjectClass*) klass; - canvas_class = (GnomeCanvasClass *) klass; - widget_class = (GtkWidgetClass *) klass; - - parent_class = gtk_type_class (gnome_canvas_get_type ()); - - object_class->destroy = e_canvas_destroy; - - widget_class->key_press_event = e_canvas_key; - widget_class->key_release_event = e_canvas_key; - widget_class->focus_in_event = e_canvas_focus_in; - widget_class->focus_out_event = e_canvas_focus_out; - widget_class->realize = e_canvas_realize; - - klass->reflow = NULL; - - e_canvas_signals [REFLOW] = - gtk_signal_new ("reflow", - GTK_RUN_LAST, - object_class->type, - GTK_SIGNAL_OFFSET (ECanvasClass, reflow), - gtk_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); - - gtk_object_class_add_signals (object_class, e_canvas_signals, LAST_SIGNAL); -} - -static void -e_canvas_init (ECanvas *canvas) -{ -} - -static void -e_canvas_destroy (GtkObject *object) -{ - ECanvas *canvas = E_CANVAS(object); - if (canvas->idle_id) - g_source_remove(canvas->idle_id); -} - -GtkWidget * -e_canvas_new () -{ - return GTK_WIDGET (gtk_type_new (e_canvas_get_type ())); -} - - -/* Returns whether the item is an inferior of or is equal to the parent. */ -static int -is_descendant (GnomeCanvasItem *item, GnomeCanvasItem *parent) -{ - for (; item; item = item->parent) - if (item == parent) - return TRUE; - - return FALSE; -} - -/* Emits an event for an item in the canvas, be it the current item, grabbed - * item, or focused item, as appropriate. - */ -static int -emit_event (GnomeCanvas *canvas, GdkEvent *event) -{ - GdkEvent ev; - gint finished; - GnomeCanvasItem *item; - GnomeCanvasItem *parent; - guint mask; - - /* Perform checks for grabbed items */ - - if (canvas->grabbed_item && !is_descendant (canvas->current_item, canvas->grabbed_item)) - return FALSE; - - if (canvas->grabbed_item) { - switch (event->type) { - case GDK_ENTER_NOTIFY: - mask = GDK_ENTER_NOTIFY_MASK; - break; - - case GDK_LEAVE_NOTIFY: - mask = GDK_LEAVE_NOTIFY_MASK; - break; - - case GDK_MOTION_NOTIFY: - mask = GDK_POINTER_MOTION_MASK; - break; - - case GDK_BUTTON_PRESS: - case GDK_2BUTTON_PRESS: - case GDK_3BUTTON_PRESS: - mask = GDK_BUTTON_PRESS_MASK; - break; - - case GDK_BUTTON_RELEASE: - mask = GDK_BUTTON_RELEASE_MASK; - break; - - case GDK_KEY_PRESS: - mask = GDK_KEY_PRESS_MASK; - break; - - case GDK_KEY_RELEASE: - mask = GDK_KEY_RELEASE_MASK; - break; - - default: - mask = 0; - break; - } - - if (!(mask & canvas->grabbed_event_mask)) - return FALSE; - } - - /* Convert to world coordinates -- we have two cases because of diferent - * offsets of the fields in the event structures. - */ - - ev = *event; - - switch (ev.type) { - case GDK_ENTER_NOTIFY: - case GDK_LEAVE_NOTIFY: - gnome_canvas_window_to_world (canvas, - ev.crossing.x, ev.crossing.y, - &ev.crossing.x, &ev.crossing.y); - break; - - case GDK_MOTION_NOTIFY: - case GDK_BUTTON_PRESS: - case GDK_2BUTTON_PRESS: - case GDK_3BUTTON_PRESS: - case GDK_BUTTON_RELEASE: - gnome_canvas_window_to_world (canvas, - ev.motion.x, ev.motion.y, - &ev.motion.x, &ev.motion.y); - break; - - default: - break; - } - - /* Choose where we send the event */ - - item = canvas->current_item; - - if (canvas->focused_item - && ((event->type == GDK_KEY_PRESS) || (event->type == GDK_KEY_RELEASE) || (event->type == GDK_FOCUS_CHANGE))) - item = canvas->focused_item; - - /* The event is propagated up the hierarchy (for if someone connected to - * a group instead of a leaf event), and emission is stopped if a - * handler returns TRUE, just like for GtkWidget events. - */ - - finished = FALSE; - - while (item && !finished) { - gtk_object_ref (GTK_OBJECT (item)); - - gtk_signal_emit_by_name (GTK_OBJECT (item), "event", - &ev, - &finished); - - if (GTK_OBJECT_DESTROYED (item)) - finished = TRUE; - - parent = item->parent; - gtk_object_unref (GTK_OBJECT (item)); - - item = parent; - } - - return finished; -} - -/* Key event handler for the canvas */ -static gint -e_canvas_key (GtkWidget *widget, GdkEventKey *event) -{ - GnomeCanvas *canvas; - - g_return_val_if_fail (widget != NULL, FALSE); - g_return_val_if_fail (GNOME_IS_CANVAS (widget), FALSE); - g_return_val_if_fail (event != NULL, FALSE); - - canvas = GNOME_CANVAS (widget); - - return emit_event (canvas, (GdkEvent *) event); -} - - -/** - * e_canvas_item_grab_focus: - * @item: A canvas item. - * - * Makes the specified item take the keyboard focus, so all keyboard events will - * be sent to it. If the canvas widget itself did not have the focus, it grabs - * it as well. - **/ -void -e_canvas_item_grab_focus (GnomeCanvasItem *item) -{ - GnomeCanvasItem *focused_item; - GdkEvent ev; - - g_return_if_fail (item != NULL); - g_return_if_fail (GNOME_IS_CANVAS_ITEM (item)); - g_return_if_fail (GTK_WIDGET_CAN_FOCUS (GTK_WIDGET (item->canvas))); - - focused_item = item->canvas->focused_item; - - if (focused_item) { - ev.focus_change.type = GDK_FOCUS_CHANGE; - ev.focus_change.window = GTK_LAYOUT (item->canvas)->bin_window; - ev.focus_change.send_event = FALSE; - ev.focus_change.in = FALSE; - - emit_event (item->canvas, &ev); - } - - item->canvas->focused_item = item; - - if (!GTK_WIDGET_HAS_FOCUS (GTK_WIDGET(item->canvas))) { - gtk_widget_grab_focus (GTK_WIDGET (item->canvas)); - } - - if (focused_item) { - ev.focus_change.type = GDK_FOCUS_CHANGE; - ev.focus_change.window = GTK_LAYOUT (item->canvas)->bin_window; - ev.focus_change.send_event = FALSE; - ev.focus_change.in = TRUE; - - emit_event (item->canvas, &ev); - } -} - -/* Focus in handler for the canvas */ -static gint -e_canvas_focus_in (GtkWidget *widget, GdkEventFocus *event) -{ - GnomeCanvas *canvas; - - canvas = GNOME_CANVAS (widget); - - GTK_WIDGET_SET_FLAGS (widget, GTK_HAS_FOCUS); - - if (canvas->focused_item) - return emit_event (canvas, (GdkEvent *) event); - else - return FALSE; -} - -/* Focus out handler for the canvas */ -static gint -e_canvas_focus_out (GtkWidget *widget, GdkEventFocus *event) -{ - GnomeCanvas *canvas; - - canvas = GNOME_CANVAS (widget); - - GTK_WIDGET_UNSET_FLAGS (widget, GTK_HAS_FOCUS); - - if (canvas->focused_item) - return emit_event (canvas, (GdkEvent *) event); - else - return FALSE; -} - -static void -e_canvas_realize (GtkWidget *widget) -{ - if (GTK_WIDGET_CLASS (parent_class)->realize) - (* GTK_WIDGET_CLASS (parent_class)->realize) (widget); - - gdk_window_set_back_pixmap (GTK_LAYOUT (widget)->bin_window, NULL, FALSE); -} - -static void -e_canvas_item_invoke_reflow (GnomeCanvasItem *item, int flags) -{ - GnomeCanvasGroup *group; - GList *list; - GnomeCanvasItem *child; - - if (GNOME_IS_CANVAS_GROUP (item)) { - group = GNOME_CANVAS_GROUP (item); - for (list = group->item_list; list; list = list->next) { - child = GNOME_CANVAS_ITEM (list->data); - if (child->object.flags & E_CANVAS_ITEM_DESCENDENT_NEEDS_REFLOW) - e_canvas_item_invoke_reflow (child, flags); - } - } - - if (item->object.flags & E_CANVAS_ITEM_NEEDS_REFLOW) { - ECanvasItemReflowFunc func; - func = gtk_object_get_data (GTK_OBJECT (item), - "ECanvasItem::reflow_callback"); - if (func) - func (item, flags); - } - - item->object.flags &= ~E_CANVAS_ITEM_NEEDS_REFLOW; - item->object.flags &= ~E_CANVAS_ITEM_DESCENDENT_NEEDS_REFLOW; -} - -static void -do_reflow (ECanvas *canvas) -{ - if (GNOME_CANVAS(canvas)->root->object.flags & E_CANVAS_ITEM_DESCENDENT_NEEDS_REFLOW) - e_canvas_item_invoke_reflow (GNOME_CANVAS(canvas)->root, 0); -} - -/* Idle handler for the e-canvas. It deals with pending reflows. */ -static gint -idle_handler (gpointer data) -{ - ECanvas *canvas; - - GDK_THREADS_ENTER(); - - canvas = E_CANVAS (data); - do_reflow (canvas); - - /* Reset idle id */ - canvas->idle_id = 0; - - gtk_signal_emit (GTK_OBJECT (canvas), - e_canvas_signals [REFLOW]); - - GDK_THREADS_LEAVE(); - - return FALSE; -} - -/* Convenience function to add an idle handler to a canvas */ -static void -add_idle (ECanvas *canvas) -{ - if (canvas->idle_id != 0) - return; - - canvas->idle_id = g_idle_add_full (G_PRIORITY_HIGH_IDLE, idle_handler, (gpointer) canvas, NULL); -} - -static void -e_canvas_item_descendent_needs_reflow (GnomeCanvasItem *item) -{ - if (item->object.flags & E_CANVAS_ITEM_DESCENDENT_NEEDS_REFLOW) - return; - - item->object.flags |= E_CANVAS_ITEM_DESCENDENT_NEEDS_REFLOW; - if (item->parent) - e_canvas_item_descendent_needs_reflow(item->parent); -} - -void -e_canvas_item_request_reflow (GnomeCanvasItem *item) -{ - if (item->object.flags & GNOME_CANVAS_ITEM_REALIZED) { - item->object.flags |= E_CANVAS_ITEM_NEEDS_REFLOW; - e_canvas_item_descendent_needs_reflow(item); - add_idle(E_CANVAS(item->canvas)); - } -} - -void -e_canvas_item_request_parent_reflow (GnomeCanvasItem *item) -{ - g_return_if_fail(item != NULL); - g_return_if_fail(GNOME_IS_CANVAS_ITEM(item)); - e_canvas_item_request_reflow(item->parent); -} - -void -e_canvas_item_set_reflow_callback (GnomeCanvasItem *item, ECanvasItemReflowFunc func) -{ - gtk_object_set_data(GTK_OBJECT(item), "ECanvasItem::reflow_callback", (gpointer) func); -} diff --git a/e-util/e-canvas.h b/e-util/e-canvas.h deleted file mode 100644 index f1ff1195c9..0000000000 --- a/e-util/e-canvas.h +++ /dev/null @@ -1,84 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* e-canvas.h - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -#ifndef __E_CANVAS_H__ -#define __E_CANVAS_H__ - -#include - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus */ - -/* ECanvas - A class derived from canvas for the purpose of adding - * evolution specific canvas hacks. - */ - -#define E_CANVAS_TYPE (e_canvas_get_type ()) -#define E_CANVAS(obj) (GTK_CHECK_CAST ((obj), E_CANVAS_TYPE, ECanvas)) -#define E_CANVAS_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_CANVAS_TYPE, ECanvasClass)) -#define E_IS_CANVAS(obj) (GTK_CHECK_TYPE ((obj), E_CANVAS_TYPE)) -#define E_IS_CANVAS_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_CANVAS_TYPE)) - -typedef void (*ECanvasItemReflowFunc) (GnomeCanvasItem *item, - gint flags); - -typedef struct _ECanvas ECanvas; -typedef struct _ECanvasClass ECanvasClass; - -/* Object flags for items */ -enum { - E_CANVAS_ITEM_NEEDS_REFLOW = 1 << 13, - E_CANVAS_ITEM_DESCENDENT_NEEDS_REFLOW = 1 << 14 -}; - -struct _ECanvas -{ - GnomeCanvas parent; - - int idle_id; -}; - -struct _ECanvasClass -{ - GnomeCanvasClass parent_class; - void (* reflow) (ECanvas *canvas); -}; - - -GtkType e_canvas_get_type (void); -GtkWidget *e_canvas_new (void); - -/* Used to send all of the keystroke events to a specific item as well as - * GDK_FOCUS_CHANGE events. - */ -void e_canvas_item_grab_focus (GnomeCanvasItem *item); - -void e_canvas_item_request_reflow (GnomeCanvasItem *item); -void e_canvas_item_request_parent_reflow (GnomeCanvasItem *item); -void e_canvas_item_set_reflow_callback (GnomeCanvasItem *item, ECanvasItemReflowFunc func); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -#endif /* __E_CANVAS_H__ */ diff --git a/e-util/e-cursors.c b/e-util/e-cursors.c deleted file mode 100644 index 56a5015cbd..0000000000 --- a/e-util/e-cursors.c +++ /dev/null @@ -1,134 +0,0 @@ -/* - * cursors.c: cursor handling for Evolution. - * copied from Gnumeric. - * - * Authors: - * Miguel de Icaza (miguel@gnu.org) - */ -#include -#include -#include "e-cursors.h" - -static GdkColor black, white; - -#define GDK_INTERNAL_CURSOR -1 - -typedef struct { - GdkCursor *cursor; - int hot_x, hot_y; - char **xpm; -} CursorDef; - -static CursorDef cursors [] = { - { NULL, GDK_INTERNAL_CURSOR, GDK_CROSSHAIR, NULL }, - { NULL, GDK_INTERNAL_CURSOR, GDK_LEFT_PTR, NULL }, - { NULL, GDK_INTERNAL_CURSOR, GDK_FLEUR, NULL }, - { NULL, GDK_INTERNAL_CURSOR, GDK_SB_H_DOUBLE_ARROW, NULL }, - { NULL, GDK_INTERNAL_CURSOR, GDK_SB_V_DOUBLE_ARROW, NULL }, - { NULL, 0, 0, NULL } -}; - -static int inited = FALSE; - -static void -create_bitmap_and_mask_from_xpm (GdkBitmap **bitmap, GdkBitmap **mask, gchar **xpm) -{ - int height, width, colors; - char pixmap_buffer [(32 * 32)/8]; - char mask_buffer [(32 * 32)/8]; - int x, y, pix, yofs; - int transparent_color, black_color; - - sscanf (xpm [0], "%d %d %d %d", &height, &width, &colors, &pix); - - g_assert (height == 32); - g_assert (width == 32); - g_assert (colors <= 3); - - transparent_color = ' '; - black_color = '.'; - - yofs = colors + 1; - for (y = 0; y < 32; y++){ - for (x = 0; x < 32;){ - char value = 0, maskv = 0; - - for (pix = 0; pix < 8; pix++, x++){ - if (xpm [y + yofs][x] != transparent_color){ - maskv |= 1 << pix; - - /* - * Invert the colours here because it seems - * to workaround a bug the Matrox G100 Xserver? - * We reverse the foreground & background in the next - * routine to compensate. - */ - if (xpm [y + yofs][x] == black_color){ - value |= 1 << pix; - } - } - } - pixmap_buffer [(y * 4 + x/8)-1] = value; - mask_buffer [(y * 4 + x/8)-1] = maskv; - } - } - *bitmap = gdk_bitmap_create_from_data (NULL, pixmap_buffer, 32, 32); - *mask = gdk_bitmap_create_from_data (NULL, mask_buffer, 32, 32); -} - -void -e_cursors_init (void) -{ - GdkColormap *colormap; - int i; - - colormap = gtk_widget_get_default_colormap (); - gdk_color_white (colormap, &white); - gdk_color_black (colormap, &black); - - for (i = 0; cursors [i].hot_x; i++){ - GdkBitmap *bitmap, *mask; - - if (cursors [i].hot_x < 0) - cursors [i].cursor = gdk_cursor_new (cursors [i].hot_y); - else { - create_bitmap_and_mask_from_xpm (&bitmap, &mask, cursors [i].xpm); - - /* The foreground and background colours are reversed. - * See comment above for explanation. - */ - cursors [i].cursor = - gdk_cursor_new_from_pixmap ( - bitmap, mask, - &black, &white, - cursors [i].hot_x, - cursors [i].hot_y); - } - } - - inited = TRUE; - - g_assert (i == E_NUM_CURSORS); -} - -void -e_cursors_shutdown (void) -{ - int i; - - for (i = 0; cursors [i].hot_x; i++) - gdk_cursor_destroy (cursors [i].cursor); -} - - -/* Returns a cursor given its type */ -GdkCursor * -e_cursor_get (ECursorType type) -{ - g_return_val_if_fail (type >= 0 && type < E_NUM_CURSORS, NULL); - - if (!inited) - g_warning ("e_cursors_init not called"); - - return cursors [type].cursor; -} diff --git a/e-util/e-cursors.h b/e-util/e-cursors.h deleted file mode 100644 index 771e5f6d4d..0000000000 --- a/e-util/e-cursors.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef E_CURSORS_H -#define E_CURSORS_H - -/* Copied from Gnumeric */ - -typedef enum { - E_CURSOR_THIN_CROSS, - E_CURSOR_ARROW, - E_CURSOR_MOVE, - E_CURSOR_SIZE_X, - E_CURSOR_SIZE_Y, - E_NUM_CURSORS -} ECursorType; - -void e_cursors_init (void); -void e_cursors_shutdown (void); - -#define e_cursor_set(win, c) \ -G_STMT_START { \ - if (win) \ - gdk_window_set_cursor (win, e_cursor_get (c)); \ -} G_STMT_END - -#define e_cursor_set_widget(w, c) \ -G_STMT_START { \ - if (GTK_WIDGET (w)->window) \ - gdk_window_set_cursor (GTK_WIDGET (w)->window, e_cursor_get (c)); \ -} G_STMT_END - -GdkCursor *e_cursor_get (ECursorType type); - -#endif /* E_CURSORS_H */ - diff --git a/e-util/e-dialog-widgets.c b/e-util/e-dialog-widgets.c deleted file mode 100644 index 98099a1891..0000000000 --- a/e-util/e-dialog-widgets.c +++ /dev/null @@ -1,713 +0,0 @@ -/* Evolution internal utilities - Glade dialog widget utilities - * - * Copyright (C) 2000 Helix Code, Inc. - * - * Author: Federico Mena-Quintero - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "e-dialog-widgets.h" - - - -/* A widget, a pointer to the variable it will modify, and extra information */ -typedef struct { - GtkWidget *widget; - gpointer value_var; - gpointer info; -} WidgetHook; - -/* Hook information for a complete dialog */ -typedef struct { - GSList *whooks; -} DialogHooks; - - - -/* Destroy handler for the dialog; frees the dialog hooks */ -static void -dialog_destroy_cb (GtkObject *dialog, gpointer data) -{ - DialogHooks *hooks; - - hooks = data; - - g_slist_free (hooks->whooks); - hooks->whooks = NULL; - - g_free (hooks); - gtk_object_set_data (dialog, "dialog-hooks", NULL); -} - -/* Ensures that the dialog has the necessary attached data to store the widget - * hook information. - */ -static DialogHooks * -get_dialog_hooks (GtkWidget *dialog) -{ - DialogHooks *hooks; - - hooks = gtk_object_get_data (GTK_OBJECT (dialog), "dialog-hooks"); - if (!hooks) { - hooks = g_new0 (DialogHooks, 1); - gtk_object_set_data (GTK_OBJECT (dialog), "dialog-hooks", hooks); - gtk_signal_connect (GTK_OBJECT (dialog), "destroy", - GTK_SIGNAL_FUNC (dialog_destroy_cb), hooks); - } - - return hooks; -} - -/* Converts an mapped value to the appropriate index in an item group. The - * values for the items are provided as a -1-terminated array. - */ -static int -value_to_index (const int *value_map, int value) -{ - int i; - - for (i = 0; value_map[i] != -1; i++) - if (value_map[i] == value) - return i; - - return -1; -} - -/* Converts an index in an item group to the appropriate mapped value. See the - * function above. - */ -static int -index_to_value (const int *value_map, int index) -{ - int i; - - /* We do this the hard way, i.e. not as a simple array reference, to - * check for correctness. - */ - - for (i = 0; value_map[i] != -1; i++) - if (i == index) - return value_map[i]; - - return -1; -} - -/* Callback for the "toggled" signal of toggle buttons */ -static void -toggled_cb (GtkToggleButton *toggle, gpointer data) -{ - GnomePropertyBox *pbox; - - pbox = GNOME_PROPERTY_BOX (data); - - /* For radio buttons, we only notify the property box if the button is - * active, because we'll get one call for each of the changed buttons in - * the radio group. - */ - if (!GTK_IS_RADIO_BUTTON (toggle) || toggle->active) - gnome_property_box_changed (pbox); -} - -/* Hooks a radio button group */ -static void -hook_radio (GtkWidget *dialog, GtkRadioButton *radio, gpointer value_var, gpointer info) -{ - GSList *group; - int *value; - int i; - const int *value_map; - GSList *l; - - group = gtk_radio_button_group (radio); - - /* Set the value */ - - value = (int *) value_var; - value_map = (const int *) info; - - i = value_to_index (value_map, *value); - if (i != -1) { - l = g_slist_nth (group, i); - if (!l) - g_message ("hook_radio(): could not find index %d in radio group!", i); - - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (l->data), TRUE); - } else - g_message ("hook_radio(): could not find value %d in value map!", *value); - - /* Hook to changed */ - - if (GNOME_IS_PROPERTY_BOX (dialog)) - for (l = group; l; l = l->next) - gtk_signal_connect (GTK_OBJECT (l->data), "toggled", - GTK_SIGNAL_FUNC (toggled_cb), dialog); -} - -/* Gets the value of a radio button group */ -static void -get_radio_value (GtkRadioButton *radio, gpointer value_var, gpointer info) -{ - GSList *group; - GSList *l; - int i; - int *value; - const int *value_map; - int v; - - group = gtk_radio_button_group (radio); - - for (i = 0, l = group; l; l = l->next) { - radio = GTK_RADIO_BUTTON (l->data); - - if (GTK_TOGGLE_BUTTON (radio)->active) - break; - } - - if (!l) - g_assert_not_reached (); - - value = (int *) value_var; - value_map = (const int *) info; - - v = index_to_value (value_map, i); - if (v == -1) { - g_message ("get_radio_value(): could not find index %d in value map!", i); - return; - } - - *value = v; -} - -/* Callback for the "activate" signal of menu items */ -static void -activate_cb (GtkMenuItem *item, gpointer data) -{ - GnomePropertyBox *pbox; - - pbox = GNOME_PROPERTY_BOX (data); - gnome_property_box_changed (pbox); -} - -/* Hooks an option menu */ -static void -hook_option_menu (GtkWidget *dialog, GtkOptionMenu *omenu, gpointer value_var, gpointer info) -{ - int *value; - int i; - const int *value_map; - - /* Set the value */ - - value = (int *) value_var; - value_map = (const int *) info; - - i = value_to_index (value_map, *value); - if (i != -1) - gtk_option_menu_set_history (omenu, i); - else - g_message ("hook_option_menu(): could not find value %d in value map!", *value); - - /* Hook to changed */ - - if (GNOME_IS_PROPERTY_BOX (dialog)) { - GtkMenu *menu; - GList *l; - - menu = GTK_MENU (gtk_option_menu_get_menu (omenu)); - - for (l = GTK_MENU_SHELL (menu)->children; l; l = l->next) - gtk_signal_connect (GTK_OBJECT (l->data), "activate", - GTK_SIGNAL_FUNC (activate_cb), dialog); - } -} - -/* Gets the value of an option menu */ -static void -get_option_menu_value (GtkOptionMenu *omenu, gpointer value_var, gpointer info) -{ - GtkMenu *menu; - GtkWidget *active; - GList *children; - GList *l; - int i; - int *value; - const int *value_map; - int v; - - menu = GTK_MENU (gtk_option_menu_get_menu (omenu)); - - active = gtk_menu_get_active (menu); - g_assert (active != NULL); - - children = GTK_MENU_SHELL (menu)->children; - - for (i = 0, l = children; l; l = l->next) { - if (GTK_WIDGET (l->data) == active) - break; - } - - if (!l) - g_assert_not_reached (); - - value = (int *) value_var; - value_map = (const int *) info; - - v = index_to_value (value_map, i); - if (v == -1) { - g_message ("get_option_menu_value(): could not find index %d in value map!", i); - return; - } - - *value = v; -} - -/* Hooks a toggle button */ -static void -hook_toggle (GtkWidget *dialog, GtkToggleButton *toggle, gpointer value_var, gpointer info) -{ - gboolean *value; - - /* Set the value */ - - value = (gboolean *) value_var; - gtk_toggle_button_set_active (toggle, *value); - - /* Hook to changed */ - - if (GNOME_IS_PROPERTY_BOX (dialog)) - gtk_signal_connect (GTK_OBJECT (toggle), "toggled", - GTK_SIGNAL_FUNC (toggled_cb), dialog); -} - -/* Gets the value of a toggle button */ -static void -get_toggle_value (GtkToggleButton *toggle, gpointer value_var, gpointer info) -{ - gboolean *value; - - value = (gboolean *) value; - *value = toggle->active ? TRUE : FALSE; -} - -/* Callback for the "value_changed" signal of the adjustment of a spin button */ -static void -value_changed_cb (GtkAdjustment *adj, gpointer data) -{ - GnomePropertyBox *pbox; - - pbox = GNOME_PROPERTY_BOX (data); - gnome_property_box_changed (pbox); -} - -/* Hooks a spin button */ -static void -hook_spin_button (GtkWidget *dialog, GtkSpinButton *spin, gpointer value_var, gpointer info) -{ - double *value; - GtkAdjustment *adj; - - /* Set the value */ - - value = (double *) value_var; - adj = gtk_spin_button_get_adjustment (spin); - - adj->value = *value; - gtk_signal_emit_by_name (GTK_OBJECT (adj), "value_changed"); - - /* Hook to changed */ - - if (GNOME_IS_PROPERTY_BOX (dialog)) - gtk_signal_connect (GTK_OBJECT (adj), "value_changed", - GTK_SIGNAL_FUNC (value_changed_cb), dialog); -} - -/* Gets the value of a spin button */ -static void -get_spin_button_value (GtkSpinButton *spin, gpointer value_var, gpointer info) -{ - double *value; - GtkAdjustment *adj; - - value = (double *) value_var; - - adj = gtk_spin_button_get_adjustment (spin); - *value = adj->value; -} - -/* Callback for the "changed" signal of a GtkEditable widget */ -static void -changed_cb (GtkEditable *editable, gpointer data) -{ - GnomePropertyBox *pbox; - - pbox = GNOME_PROPERTY_BOX (data); - gnome_property_box_changed (pbox); -} - -/* Hooks a GtkEditable widget */ -static void -hook_editable (GtkWidget *dialog, GtkEditable *editable, gpointer value_var, gpointer info) -{ - char **value; - gint pos; - - /* Set the value */ - - value = (char **) value_var; - - pos = 0; - gtk_editable_delete_text (editable, 0, -1); - - /* Take NULL as empty string */ - if (*value) - gtk_editable_insert_text (editable, *value, strlen (*value), &pos); - - /* Hook to changed */ - - if (GNOME_IS_PROPERTY_BOX (dialog)) - gtk_signal_connect (GTK_OBJECT (editable), "changed", - GTK_SIGNAL_FUNC (changed_cb), dialog); -} - -/* Gets the value of a GtkEditable widget */ -static void -get_editable_value (GtkEditable *editable, gpointer value_var, gpointer data) -{ - char **value; - - value = (char **) value_var; - if (*value) - g_free (*value); - - *value = gtk_editable_get_chars (editable, 0, -1); -} - -void -e_dialog_editable_set (GtkWidget *widget, char *value) -{ - g_return_if_fail (widget != NULL); - g_return_if_fail (GTK_IS_EDITABLE (widget)); - - gtk_editable_delete_text (GTK_EDITABLE (widget), 0, -1); - - if (value) { - gint pos; - - pos = 0; - gtk_editable_insert_text (GTK_EDITABLE (widget), value, strlen (value), &pos); - } -} - -char * -e_dialog_editable_get (GtkWidget *widget) -{ - g_return_val_if_fail (widget != NULL, NULL); - g_return_val_if_fail (GTK_IS_EDITABLE (widget), NULL); - - return gtk_editable_get_chars (GTK_EDITABLE (widget), 0, -1); -} - -void -e_dialog_radio_set (GtkWidget *widget, int value, const int *value_map) -{ - GSList *group; - int i; - GSList *l; - - g_return_if_fail (widget != NULL); - g_return_if_fail (GTK_IS_RADIO_BUTTON (widget)); - g_return_if_fail (value_map != NULL); - - group = gtk_radio_button_group (GTK_RADIO_BUTTON (widget)); - - i = value_to_index (value_map, value); - if (i != -1) { - l = g_slist_nth (group, i); - if (!l) - g_message ("e_dialog_radio_set(): could not find index %d in radio group!", - i); - - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (l->data), TRUE); - } else - g_message ("e_dialog_radio_set(): could not find value %d in value map!", - value); -} - -int -e_dialog_radio_get (GtkWidget *widget, const int *value_map) -{ - GSList *group; - GSList *l; - int i; - int v; - - g_return_val_if_fail (widget != NULL, -1); - g_return_val_if_fail (GTK_IS_RADIO_BUTTON (widget), -1); - g_return_val_if_fail (value_map != NULL, -1); - - group = gtk_radio_button_group (GTK_RADIO_BUTTON (widget)); - - for (i = 0, l = group; l; l = l->next) { - widget = GTK_WIDGET (l->data); - - if (GTK_TOGGLE_BUTTON (widget)->active) - break; - } - - if (!l) - g_assert_not_reached (); - - v = index_to_value (value_map, i); - if (v == -1) { - g_message ("e_dialog_radio_get(): could not find index %d in value map!", i); - return -1; - } - - return v; -} - -void -e_dialog_toggle_set (GtkWidget *widget, gboolean value) -{ - g_return_if_fail (widget != NULL); - g_return_if_fail (GTK_IS_TOGGLE_BUTTON (widget)); - - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), value); -} - -gboolean -e_dialog_toggle_get (GtkWidget *widget) -{ - g_return_val_if_fail (widget != NULL, FALSE); - g_return_val_if_fail (GTK_IS_TOGGLE_BUTTON (widget), FALSE); - - return GTK_TOGGLE_BUTTON (widget)->active; -} - -void -e_dialog_spin_set (GtkWidget *widget, double value) -{ - GtkAdjustment *adj; - - g_return_if_fail (widget != NULL); - g_return_if_fail (GTK_IS_SPIN_BUTTON (widget)); - - adj = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (widget)); - - adj->value = value; - gtk_signal_emit_by_name (GTK_OBJECT (adj), "value_changed"); -} - -double -e_dialog_spin_get_double (GtkWidget *widget) -{ - GtkAdjustment *adj; - - g_return_val_if_fail (widget != NULL, 0.0); - g_return_val_if_fail (GTK_IS_SPIN_BUTTON (widget), 0.0); - - adj = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (widget)); - return adj->value; -} - -int -e_dialog_spin_get_int (GtkWidget *widget) -{ - double value; - - g_return_val_if_fail (widget != NULL, -1); - g_return_val_if_fail (GTK_IS_SPIN_BUTTON (widget), -1); - - value = e_dialog_spin_get_double (widget); - return (int) floor (value); -} - -void -e_dialog_option_menu_set (GtkWidget *widget, int value, const int *value_map) -{ - int i; - - g_return_if_fail (widget != NULL); - g_return_if_fail (GTK_IS_OPTION_MENU (widget)); - g_return_if_fail (value_map != NULL); - - i = value_to_index (value_map, value); - - if (i != -1) - gtk_option_menu_set_history (GTK_OPTION_MENU (widget), i); - else - g_message ("e_dialog_option_menu_set(): could not find value %d in value map!", - value); -} - -int -e_dialog_option_menu_get (GtkWidget *widget, const int *value_map) -{ - GtkMenu *menu; - GtkWidget *active; - GList *children; - GList *l; - int i; - int v; - - g_return_val_if_fail (widget != NULL, -1); - g_return_val_if_fail (GTK_IS_OPTION_MENU (widget), -1); - g_return_val_if_fail (value_map != NULL, -1); - - menu = GTK_MENU (gtk_option_menu_get_menu (GTK_OPTION_MENU (widget))); - - active = gtk_menu_get_active (menu); - g_assert (active != NULL); - - children = GTK_MENU_SHELL (menu)->children; - - for (i = 0, l = children; l; l = l->next) { - if (GTK_WIDGET (l->data) == active) - break; - } - - if (!l) - g_assert_not_reached (); - - v = index_to_value (value_map, i); - if (v == -1) { - g_message ("e_dialog_option_menu_get(): could not find index %d in value map!", i); - return -1; - } - - return v; -} - -void -e_dialog_dateedit_set (GtkWidget *widget, time_t t) -{ - g_return_if_fail (widget != NULL); - g_return_if_fail (GNOME_IS_DATE_EDIT (widget)); - - gnome_date_edit_set_time (GNOME_DATE_EDIT (widget), t); -} - -time_t -e_dialog_dateedit_get (GtkWidget *widget) -{ - g_return_val_if_fail (widget != NULL, -1); - g_return_val_if_fail (GNOME_IS_DATE_EDIT (widget), -1); - - return gnome_date_edit_get_date (GNOME_DATE_EDIT (widget)); -} - -gboolean -e_dialog_widget_hook_value (GtkWidget *dialog, GtkWidget *widget, - gpointer value_var, gpointer info) -{ - DialogHooks *hooks; - WidgetHook *wh; - - g_return_val_if_fail (dialog != NULL, FALSE); - g_return_val_if_fail (widget != NULL, FALSE); - g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE); - g_return_val_if_fail (value_var != NULL, FALSE); - - hooks = get_dialog_hooks (dialog); - - /* First check if it is a "group" widget, like a radio button or an - * option menu. Then we check for normal ungrouped widgets. - */ - - if (GTK_IS_RADIO_BUTTON (widget)) - hook_radio (dialog, GTK_RADIO_BUTTON (widget), value_var, info); - else if (GTK_IS_OPTION_MENU (widget)) - hook_option_menu (dialog, GTK_OPTION_MENU (widget), value_var, info); - else if (GTK_IS_TOGGLE_BUTTON (widget)) - hook_toggle (dialog, GTK_TOGGLE_BUTTON (widget), value_var, info); - else if (GTK_IS_SPIN_BUTTON (widget)) - hook_spin_button (dialog, GTK_SPIN_BUTTON (widget), value_var, info); - else if (GTK_IS_EDITABLE (widget)) - hook_editable (dialog, GTK_EDITABLE (widget), value_var, info); - else - return FALSE; - - wh = g_new (WidgetHook, 1); - wh->widget = widget; - wh->value_var = value_var; - wh->info = info; - - hooks->whooks = g_slist_prepend (hooks->whooks, wh); - - return TRUE; -} - -void -e_dialog_get_values (GtkWidget *dialog) -{ - DialogHooks *hooks; - GSList *l; - - g_return_if_fail (dialog != NULL); - - hooks = get_dialog_hooks (dialog); - - for (l = hooks->whooks; l; l = l->next) { - WidgetHook *wh; - - wh = l->data; - - if (GTK_IS_RADIO_BUTTON (wh->widget)) - get_radio_value (GTK_RADIO_BUTTON (wh->widget), wh->value_var, wh->info); - else if (GTK_IS_OPTION_MENU (wh->widget)) - get_option_menu_value (GTK_OPTION_MENU (wh->widget), wh->value_var, wh->info); - else if (GTK_IS_TOGGLE_BUTTON (wh->widget)) - get_toggle_value (GTK_TOGGLE_BUTTON (wh->widget), wh->value_var, wh->info); - else if (GTK_IS_SPIN_BUTTON (wh->widget)) - get_spin_button_value (GTK_SPIN_BUTTON (wh->widget), wh->value_var, wh->info); - else if (GTK_IS_EDITABLE (wh->widget)) - get_editable_value (GTK_EDITABLE (wh->widget), wh->value_var, wh->info); - else - g_assert_not_reached (); - } -} - -gboolean -e_dialog_xml_widget_hook_value (GladeXML *xml, GtkWidget *dialog, const char *widget_name, - gpointer value_var, gpointer info) -{ - GtkWidget *widget; - - g_return_val_if_fail (xml != NULL, FALSE); - g_return_val_if_fail (GLADE_IS_XML (xml), FALSE); - g_return_val_if_fail (dialog != NULL, FALSE); - g_return_val_if_fail (widget_name != NULL, FALSE); - g_return_val_if_fail (value_var != NULL, FALSE); - - widget = glade_xml_get_widget (xml, widget_name); - if (!widget) { - g_message ("e_dialog_xml_widget_hook_value(): could not find widget `%s' in " - "Glade data!", widget_name); - return FALSE; - } - - return e_dialog_widget_hook_value (dialog, widget, value_var, info); -} diff --git a/e-util/e-dialog-widgets.h b/e-util/e-dialog-widgets.h deleted file mode 100644 index cbcdd1c8f1..0000000000 --- a/e-util/e-dialog-widgets.h +++ /dev/null @@ -1,60 +0,0 @@ -/* Evolution internal utilities - Glade dialog widget utilities - * - * Copyright (C) 2000 Helix Code, Inc. - * - * Author: Federico Mena-Quintero - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. - */ - -#ifndef E_DIALOG_WIDGETS_H -#define E_DIALOG_WIDGETS_H - -#include -#include -#include - - - -void e_dialog_editable_set (GtkWidget *widget, char *value); -char *e_dialog_editable_get (GtkWidget *widget); - -void e_dialog_radio_set (GtkWidget *widget, int value, const int *value_map); -int e_dialog_radio_get (GtkWidget *widget, const int *value_map); - -void e_dialog_toggle_set (GtkWidget *widget, gboolean value); -gboolean e_dialog_toggle_get (GtkWidget *widget); - -void e_dialog_spin_set (GtkWidget *widget, double value); -double e_dialog_spin_get_double (GtkWidget *widget); -int e_dialog_spin_get_int (GtkWidget *widget); - -void e_dialog_option_menu_set (GtkWidget *widget, int value, const int *value_map); -int e_dialog_option_menu_get (GtkWidget *widget, const int *value_map); - -void e_dialog_dateedit_set (GtkWidget *widget, time_t t); -time_t e_dialog_dateedit_get (GtkWidget *widget); - -gboolean e_dialog_widget_hook_value (GtkWidget *dialog, GtkWidget *widget, - gpointer value_var, gpointer info); - -void e_dialog_get_values (GtkWidget *dialog); - -gboolean e_dialog_xml_widget_hook_value (GladeXML *xml, GtkWidget *dialog, const char *widget_name, - gpointer value_var, gpointer info); - - - -#endif diff --git a/e-util/e-gui-utils.c b/e-util/e-gui-utils.c deleted file mode 100644 index 5d53c64d35..0000000000 --- a/e-util/e-gui-utils.c +++ /dev/null @@ -1,138 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * GUI utility functions - * - * Author: - * Miguel de Icaza (miguel@helixcode.com) - * - * (C) 1999 Miguel de Icaza - * (C) 2000 Helix Code, Inc. - */ -#include -#include -#include -#include -#include -#include "e-gui-utils.h" -#include -#include - -void -e_notice (GtkWindow *window, const char *type, const char *format, ...) -{ - GtkWidget *dialog; - va_list args; - char *str; - - va_start (args, format); - str = g_strdup_vprintf (format, args); - dialog = gnome_message_box_new (str, type, GNOME_STOCK_BUTTON_OK, NULL); - va_end (args); - g_free (str); - - if (window) - gnome_dialog_set_parent (GNOME_DIALOG (dialog), window); - - gnome_dialog_run (GNOME_DIALOG (dialog)); -} - -static void -kill_popup_menu (GtkWidget *widget, GtkMenu *menu) -{ - g_return_if_fail (menu != NULL); - g_return_if_fail (GTK_IS_MENU (menu)); - - gtk_object_unref (GTK_OBJECT (menu)); -} - -void -e_auto_kill_popup_menu_on_hide (GtkMenu *menu) -{ - g_return_if_fail (menu != NULL); - g_return_if_fail (GTK_IS_MENU (menu)); - - gtk_signal_connect (GTK_OBJECT (menu), "hide", - GTK_SIGNAL_FUNC (kill_popup_menu), menu); -} - -void -e_popup_menu (GtkMenu *menu, GdkEventButton *event) -{ - g_return_if_fail (menu != NULL); - g_return_if_fail (GTK_IS_MENU (menu)); - - e_auto_kill_popup_menu_on_hide (menu); - gtk_menu_popup (menu, NULL, NULL, 0, NULL, event->button, event->time); -} - -GtkWidget *e_create_image_widget(gchar *name, - gchar *string1, gchar *string2, - gint int1, gint int2) -{ - char *filename; - GdkPixbuf *pixbuf; - double width, height; - GtkWidget *canvas, *alignment; - if (string1) { - if (*string1 == '/') - filename = g_strdup(string1); - else - filename = g_concat_dir_and_file(EVOLUTION_IMAGES, string1); - pixbuf = gdk_pixbuf_new_from_file(filename); - width = gdk_pixbuf_get_width(pixbuf); - height = gdk_pixbuf_get_height(pixbuf); - - canvas = gnome_canvas_new_aa(); - GTK_OBJECT_UNSET_FLAGS(GTK_WIDGET(canvas), GTK_CAN_FOCUS); - gnome_canvas_item_new(gnome_canvas_root(GNOME_CANVAS(canvas)), - gnome_canvas_pixbuf_get_type(), - - "pixbuf", pixbuf, - NULL); - - alignment = gtk_widget_new(gtk_alignment_get_type(), - "child", canvas, - "xalign", (double) 0, - "yalign", (double) 0, - "xscale", (double) 0, - "yscale", (double) 0, - NULL); - - gtk_widget_set_usize(canvas, width, height); - - gdk_pixbuf_unref(pixbuf); - - gtk_widget_show(canvas); - gtk_widget_show(alignment); - g_free(filename); - - return alignment; - } else - return NULL; -} - -typedef struct { - GtkCallback callback; - gpointer closure; -} CallbackClosure; - -static void -e_container_foreach_leaf_callback(GtkWidget *widget, CallbackClosure *callback_closure) -{ - if (GTK_IS_CONTAINER(widget)) { - e_container_foreach_leaf(GTK_CONTAINER(widget), callback_closure->callback, callback_closure->closure); - } else { - (*callback_closure->callback) (widget, callback_closure->closure); - } -} - -void -e_container_foreach_leaf(GtkContainer *container, - GtkCallback callback, - gpointer closure) -{ - CallbackClosure callback_closure; - callback_closure.callback = callback; - callback_closure.closure = closure; - gtk_container_foreach(container, (GtkCallback) e_container_foreach_leaf_callback, &callback_closure); -} diff --git a/e-util/e-gui-utils.h b/e-util/e-gui-utils.h deleted file mode 100644 index cffdbd1e4f..0000000000 --- a/e-util/e-gui-utils.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef E_GUI_UTILS_H -#define E_GUI_UTILS_H - -#include -#include - -void e_popup_menu (GtkMenu *menu, GdkEventButton *event); -void e_auto_kill_popup_menu_on_hide (GtkMenu *menu); -void e_notice (GtkWindow *window, const char *type, const char *format, ...); -GtkWidget *e_create_image_widget (gchar *name, gchar *string1, gchar *string2, gint int1, gint int2); -void e_container_foreach_leaf (GtkContainer *container, - GtkCallback callback, - gpointer closure); - - -#endif /* E_GUI_UTILS_H */ diff --git a/e-util/e-html-utils.c b/e-util/e-html-utils.c deleted file mode 100644 index dc47d0243c..0000000000 --- a/e-util/e-html-utils.c +++ /dev/null @@ -1,246 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* e-html-utils.c - * Copyright (C) 2000 Helix Code, Inc. - * Author: Dan Winship - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include "e-html-utils.h" -#include -#include -#include -#include - -static int etth_interesting[] = { - 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, /* 0x00 - 0x0f */ - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, /* 0x10 - 0x1f */ - 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* sp - / */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 1, 2, 1, 2, /* 0 - ? */ - 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* @ - O */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, /* P - _ */ - 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* ` - o */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, /* p - del */ - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, /* 0x80 - 0x8f */ - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, /* 0x90 - 0x9f */ - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, /* 0xa0 - 0xaf */ - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, /* 0xb0 - 0xbf */ - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, /* 0xc0 - 0xcf */ - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, /* 0xd0 - 0xdf */ - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, /* 0xe0 - 0xef */ - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 /* 0xf0 - 0xff */ -}; -#define ETTH_SPECIAL 1 -#define ETTH_PUNCTUATION 2 -#define ETTH_ESCAPED 3 -#define ETTH_EOF 4 - -static char * -check_size (char **buffer, int *buffer_size, char *out, int len) -{ - if (out + len > *buffer + *buffer_size) { - int index = out - *buffer; - - *buffer_size *= 2; - *buffer = g_realloc (*buffer, *buffer_size); - out = *buffer + index; - } - return out; -} - -static char * -url_extract (const char **text, gboolean check) -{ - const char *end = *text, *p; - char *out; - - while (*end && !isspace (*end) && *end != '"') - end++; - - /* Back up if we probably went too far. */ - while (end > *text && strchr (",.!?;:>", *(end - 1))) - end--; - - if (check) { - /* Make sure we weren't fooled. */ - p = memchr (*text, ':', end - *text); - if (!p || end - p < 3) - return NULL; - } - - out = g_strndup (*text, end - *text); - *text = end; - return out; -} - -/** - * e_text_to_html: - * @input: a NUL-terminated input buffer - * @flags: some combination of the E_TEXT_TO_HTML_* flags defined - * in e-html-utils.h - * - * This takes a buffer of text as input and produces a buffer of - * "equivalent" HTML, subject to certain transformation rules. - * - * The set of possible flags is: - * - * - E_TEXT_TO_HTML_PRE: wrap the output HTML in
 and 
. - * Should only be used if @input is the entire buffer to be - * converted. If e_text_to_html is being called with small pieces - * of data, you should wrap the entire result in
 yourself.
- *
- *   - E_TEXT_TO_HTML_CONVERT_NL: convert "\n" to "
\n" on output. - * (should not be used with E_TEXT_TO_HTML_PRE, since that would - * result in double-newlines). - * - * - E_TEXT_TO_HTML_CONVERT_SPACES: convert a block of N spaces - * into N-1 non-breaking spaces and one normal space. A space - * at the start of the buffer is always converted to a - * non-breaking space, regardless of the following character, - * which probably means you don't want to use this flag on - * pieces of data that aren't delimited by at least line breaks. - * - * - E_TEXT_TO_HTML_CONVERT_URLS: wrap around - * strings that look like URLs. - **/ -char * -e_text_to_html (const char *input, unsigned int flags) -{ - const unsigned char *cur = input, *end; - char *buffer = NULL; - char *out = NULL; - int buffer_size = 0; - - /* Allocate a translation buffer. */ - buffer_size = strlen (input) * 2 + 5; - buffer = g_malloc (buffer_size); - - out = buffer; - if (flags & E_TEXT_TO_HTML_PRE) - out += sprintf (out, "
\n");
-
-	while (*cur) {
-		if (isalpha (*cur) && (flags & E_TEXT_TO_HTML_CONVERT_URLS)) {
-			char *tmpurl = NULL, *refurl = NULL, *dispurl = NULL;
-
-			if (!strncasecmp (cur, "http://", 7) ||
-			    !strncasecmp (cur, "https://", 8) ||
-			    !strncasecmp (cur, "ftp://", 6) ||
-			    !strncasecmp (cur, "nntp://", 7) ||
-			    !strncasecmp (cur, "mailto:", 7) ||
-			    !strncasecmp (cur, "news:", 5)) {
-				tmpurl = url_extract (&cur, TRUE);
-				if (tmpurl) {
-					refurl = e_text_to_html (tmpurl, 0);
-					dispurl = g_strdup (refurl);
-				}
-			} else if (!strncasecmp (cur, "www.", 4) &&
-				   isalnum (*(cur + 4))) {
-				tmpurl = url_extract (&cur, FALSE);
-				dispurl = e_text_to_html (tmpurl, 0);
-				refurl = g_strdup_printf ("http://%s",
-							  dispurl);
-			}
-
-			if (tmpurl) {
-				out = check_size (&buffer, &buffer_size, out,
-						  strlen (refurl) +
-						  strlen (dispurl) + 15);
-				out += sprintf (out,
-						"%s",
-						refurl, dispurl);
-				g_free (tmpurl);
-				g_free (refurl);
-				g_free (dispurl);
-			}
-		}
-
-		/* Skip until we need to care. */
-		end = cur;
-		while (!etth_interesting[*end] ||
-			(etth_interesting[*end] == ETTH_PUNCTUATION &&
-			 !(flags & E_TEXT_TO_HTML_CONVERT_URLS)))
-			end++;
-
-		out = check_size (&buffer, &buffer_size, out,
-				  end - cur + 10);
-		memcpy (out, cur, end - cur);
-		out += end - cur;
-
-		if (!*end)
-			break;
-		cur = end;
-
-		switch (*cur) {
-		case '<':
-			strcpy (out, "<");
-			out += 4;
-			break;
-
-		case '>':
-			strcpy (out, ">");
-			out += 4;
-			break;
-
-		case '&':
-			strcpy (out, "&");
-			out += 5;
-			break;
-
-		case '"':
-			strcpy (out, """);
-			out += 6;
-			break;
-
-		case '\n':
-			*out++ = *cur;
-			if (flags & E_TEXT_TO_HTML_CONVERT_NL) {
-				strcpy (out, "
"); - out += 4; - } - break; - - case ' ': - if (flags & E_TEXT_TO_HTML_CONVERT_SPACES) { - if (cur == input || *(cur + 1) == ' ') { - strcpy (out, " "); - out += 6; - break; - } - } - /* otherwise, FALL THROUGH */ - - default: - if ((*cur >= 0x20 && *cur < 0x80) || - (*cur == '\r' || *cur == '\t')) { - /* Default case, just copy. */ - *out++ = *cur; - } else - out += g_snprintf(out, 9, "&#%d;", *cur); - break; - } - - cur++; - } - - out = check_size (&buffer, &buffer_size, out, 7); - if (flags & E_TEXT_TO_HTML_PRE) - strcpy (out, "
"); - else - *out = '\0'; - - return buffer; -} diff --git a/e-util/e-html-utils.h b/e-util/e-html-utils.h deleted file mode 100644 index a56889f4d9..0000000000 --- a/e-util/e-html-utils.h +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* e-html-utils.c */ -/* - * Copyright (C) 2000 Helix Code, Inc. - * Author: Dan Winship - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef __E_HTML_UTILS__ -#define __E_HTML_UTILS__ - -#define E_TEXT_TO_HTML_PRE (1 << 0) -#define E_TEXT_TO_HTML_CONVERT_NL (1 << 1) -#define E_TEXT_TO_HTML_CONVERT_SPACES (1 << 2) -#define E_TEXT_TO_HTML_CONVERT_URLS (1 << 3) - -char *e_text_to_html (const char *input, unsigned int flags); - -#endif /* __E_HTML_UTILS__ */ diff --git a/e-util/e-popup-menu.c b/e-util/e-popup-menu.c deleted file mode 100644 index 192d234371..0000000000 --- a/e-util/e-popup-menu.c +++ /dev/null @@ -1,99 +0,0 @@ -/* - * e-popup-menu.c: popup menu display - * - * Author: - * Miguel de Icaza (miguel@kernel.org) - * Jody Goldberg (jgoldberg@home.com) - * - * (C) 2000 Helix Code, Inc. - */ -#include -#include -#include "e-popup-menu.h" -#include "e-gui-utils.h" - -/* - * Creates an item with an optional icon - */ -static GtkWidget * -make_item (GtkMenu *menu, const char *name, const char *pixname) -{ - GtkWidget *label, *item; - guint label_accel; - - if (*name == '\0') - return gtk_menu_item_new (); - - /* - * Ugh. This needs to go into Gtk+ - */ - label = gtk_accel_label_new (""); - label_accel = gtk_label_parse_uline (GTK_LABEL (label), name); - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); - gtk_widget_show (label); - - item = gtk_pixmap_menu_item_new (); - gtk_container_add (GTK_CONTAINER (item), label); - - if (label_accel != GDK_VoidSymbol){ - gtk_widget_add_accelerator ( - item, - "activate_item", - gtk_menu_ensure_uline_accel_group (GTK_MENU (menu)), - label_accel, 0, - GTK_ACCEL_LOCKED); - } - - if (pixname){ - GtkWidget *pixmap = gnome_stock_pixmap_widget (item, pixname); - - gtk_widget_show (pixmap); - gtk_pixmap_menu_item_set_pixmap ( - GTK_PIXMAP_MENU_ITEM (item), pixmap); - } - - return item; -} - -GtkMenu * -e_popup_menu_create (EPopupMenu *menu_list, int disable_mask, void *closure) -{ - GtkMenu *menu = GTK_MENU (gtk_menu_new ()); - int i; - - for (i = 0; menu_list [i].name; i++){ - GtkWidget *item; - - item = make_item (menu, menu_list [i].name, - menu_list [i].pixname); - - if (menu_list [i].fn) - gtk_signal_connect ( - GTK_OBJECT (item), "activate", - GTK_SIGNAL_FUNC (menu_list [i].fn), - closure); - - if (menu_list [i].disable_mask & disable_mask) - gtk_widget_set_sensitive (item, FALSE); - - gtk_widget_show (item); - gtk_menu_append (menu, item); - } - - return menu; - -} - -void -e_popup_menu_run (EPopupMenu *menu_list, GdkEventButton *event, int disable_mask, void *closure) -{ - GtkMenu *menu; - - g_return_if_fail (menu_list != NULL); - g_return_if_fail (event != NULL); - - menu = e_popup_menu_create (menu_list, disable_mask, closure); - - e_popup_menu (menu, event); -} - diff --git a/e-util/e-popup-menu.h b/e-util/e-popup-menu.h deleted file mode 100644 index 400e6987b7..0000000000 --- a/e-util/e-popup-menu.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef E_POPUP_MENU_H -#define E_POPUP_MENU_H - -#include - -typedef struct { - char const * const name; - char const * const pixname; - void (*fn)(GtkWidget *widget, void *closure); - int disable_mask; -} EPopupMenu; - -void e_popup_menu_run (EPopupMenu *menu_list, GdkEventButton *event, - int disable_mask, void *closure); - -#endif /* E_POPUP_MENU_H */ diff --git a/e-util/e-setup.c b/e-util/e-setup.c deleted file mode 100644 index f88ef97526..0000000000 --- a/e-util/e-setup.c +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Sets up the ~/evolution directory - * - * Author: - * Miguel de Icaza (miguel@kernel.org) - * - * (C) 2000 Helix Code, Inc. http://www.helixcode.com - */ -#include -#include -#include -#include -#include -#include "e-setup.h" - -char *evolution_dir = NULL; -char *evolution_folders_dir = NULL; -char *evolution_shortcuts_dir = NULL; -char *evolution_private = NULL; -char *evolution_public = NULL; - -/* Try to ensure the existence of a directory, by checking for it and - * creating it if necessary. It returns FALSE if it doesn't exist and - * can't be created */ -static gboolean -mkdir_if_necessary (char *dirname) -{ - struct stat s; - - g_assert (dirname); - - /* If we can't stat the dirname... */ - if (stat (dirname, &s) == -1) { - - /* ...it may be because there's no such directory */ - if (errno == ENOENT) { - g_print ("Directory %s doesn't exist; creating...", - dirname); - if (mkdir (dirname, S_IRWXU) == -1) { - g_print ("failed! %s\n", g_strerror (errno)); - return FALSE; - } - else /* directory created! */ - g_print ("success!\n"); - } - /* ..or maybe there's some other problem with the directory */ - else { - - g_print ("There's a problem with accessing " - "\"%s\": %s\n", - dirname, g_strerror(errno)); - return FALSE; - } - } - /* There's a file or directory there. */ - else { - /* if it's a file, complain; otherwise, we're all set */ - if (!S_ISDIR (s.st_mode)) { - g_print ("Evolution is trying to create a directory,\n" - "\"%s\". But there appears to be a file in\n" - "the way. Move it away.\n", - dirname); - return FALSE; - } - } - return TRUE; -} - - -gboolean -e_setup_base_dir (void) -{ - gboolean success = FALSE; - - /* try to get the evolution home directory from gnome-config; - if we can't, we'll make a new one at ~/evolution */ - evolution_dir = gnome_config_get_string("/Evolution/directories/home"); - - if (!evolution_dir) evolution_dir = - g_concat_dir_and_file (g_get_home_dir (), "evolution"); - - if (!evolution_folders_dir) - evolution_folders_dir = - g_concat_dir_and_file (evolution_dir, "folders"); - - if (!evolution_shortcuts_dir) - evolution_shortcuts_dir = - g_concat_dir_and_file (evolution_dir, "shortcuts"); - - if (mkdir_if_necessary (evolution_dir) && - mkdir_if_necessary (evolution_folders_dir) && - mkdir_if_necessary (evolution_shortcuts_dir)) { - - success = TRUE; - gnome_config_set_string ("/Evolution/directories/home", - evolution_dir); - gnome_config_sync(); - } - - return success; -} - diff --git a/e-util/e-setup.h b/e-util/e-setup.h deleted file mode 100644 index 1c787473d9..0000000000 --- a/e-util/e-setup.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef EVOLUTION_UTIL_SETUP_H -#define EVOLUTION_UTIL_SETUP_H - -#include - -gboolean e_setup_base_dir (void); - -extern char *evolution_folders_dir; -extern char *evolution_dir; - -#endif /* EVOLUTION_UTIL_SETUP_H */ diff --git a/e-util/e-sexp.c b/e-util/e-sexp.c deleted file mode 100644 index 7d7b5f5f0f..0000000000 --- a/e-util/e-sexp.c +++ /dev/null @@ -1,1121 +0,0 @@ -/* - * Copyright 2000 HelixCode (http://www.helixcode.com). - * - * A simple, extensible s-exp evaluation engine. - * - * Author : - * Michael Zucchi - - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ - -/* - The following built-in s-exp's are supported: - - list = (and list*) - perform an intersection of a number of lists, and return that. - - bool = (and bool*) - perform a boolean AND of boolean values. - - list = (or list*) - perform a union of a number of lists, returning the new list. - - bool = (or bool*) - perform a boolean OR of boolean values. - - int = (+ int*) - Add integers. - - string = (+ string*) - Concat strings. - - int = (- int int*) - Subtract integers from the first. - - Comparison operators: - - bool = (< int int) - bool = (> int int) - bool = (= int int) - - bool = (< string string) - bool = (> string string) - bool = (= string string) - Perform a comparision of 2 integers, or 2 string values. - - Function flow: - - type = (if bool function) - type = (if bool function function) - Choose a flow path based on a boolean value - - type = (begin func func func) - Execute a sequence. The last function return is the return type. -*/ - -#include -#include -#include -#include - -#include "e-sexp.h" - -#define p(x) /* parse debug */ -#define r(x) /* run debug */ -#define d(x) /* general debug */ - - -static struct _ESExpTerm * parse_list(ESExp *f, int gotbrace); -static struct _ESExpTerm * parse_value(ESExp *f); - -static void parse_dump_term(struct _ESExpTerm *t, int depth); - -static GtkObjectClass *parent_class; - - - -static GScannerConfig scanner_config = -{ - ( " \t\r\n") /* cset_skip_characters */, - ( G_CSET_a_2_z - "_+<=>" - G_CSET_A_2_Z) /* cset_identifier_first */, - ( G_CSET_a_2_z - "_0123456789-<>" - G_CSET_A_2_Z - G_CSET_LATINS - G_CSET_LATINC ) /* cset_identifier_nth */, - ( ";\n" ) /* cpair_comment_single */, - - FALSE /* case_sensitive */, - - TRUE /* skip_comment_multi */, - TRUE /* skip_comment_single */, - TRUE /* scan_comment_multi */, - TRUE /* scan_identifier */, - TRUE /* scan_identifier_1char */, - FALSE /* scan_identifier_NULL */, - TRUE /* scan_symbols */, - FALSE /* scan_binary */, - TRUE /* scan_octal */, - TRUE /* scan_float */, - TRUE /* scan_hex */, - FALSE /* scan_hex_dollar */, - TRUE /* scan_string_sq */, - TRUE /* scan_string_dq */, - TRUE /* numbers_2_int */, - FALSE /* int_2_float */, - FALSE /* identifier_2_string */, - TRUE /* char_2_token */, - FALSE /* symbol_2_token */, - FALSE /* scope_0_fallback */, -}; - -struct _ESExpResult * -e_sexp_result_new(int type) -{ - struct _ESExpResult *r = g_malloc0(sizeof(*r)); - r->type = type; - return r; -} - -void -e_sexp_result_free(struct _ESExpResult *t) -{ - if (t == NULL) - return; - - switch(t->type) { - case ESEXP_RES_ARRAY_PTR: - g_ptr_array_free(t->value.ptrarray, TRUE); - break; - case ESEXP_RES_BOOL: - case ESEXP_RES_INT: - break; - case ESEXP_RES_STRING: - g_free(t->value.string); - break; - case ESEXP_RES_UNDEFINED: - break; - } - g_free(t); -} - -/* implementations for the builtin functions */ - -/* can you tell, i dont like glib? */ -/* we can only itereate a hashtable from a called function */ -struct _glib_sux_donkeys { - int count; - GPtrArray *uids; -}; - -/* ok, store any values that are in all sets */ -static void -g_lib_sux_htand(char *key, int value, struct _glib_sux_donkeys *fuckup) -{ - if (value == fuckup->count) { - g_ptr_array_add(fuckup->uids, key); - } -} - -/* or, store all unique values */ -static void -g_lib_sux_htor(char *key, int value, struct _glib_sux_donkeys *fuckup) -{ - g_ptr_array_add(fuckup->uids, key); -} - -static ESExpResult * -term_eval_and(struct _ESExp *f, int argc, struct _ESExpTerm **argv, void *data) -{ - struct _ESExpResult *r, *r1; - GHashTable *ht = g_hash_table_new(g_str_hash, g_str_equal); - struct _glib_sux_donkeys lambdafoo; - int type=-1; - int bool = TRUE; - int i; - - r(printf("( and\n")); - - r = e_sexp_result_new(ESEXP_RES_UNDEFINED); - - for (i=0;bool && itype; - if (type != r1->type) { - printf("invalid types in and operation, all types must be the same\n"); - } else if ( r1->type == ESEXP_RES_ARRAY_PTR ) { - char **a1; - int l1, j; - - a1 = (char **)r1->value.ptrarray->pdata; - l1 = r1->value.ptrarray->len; - for (j=0;jtype == ESEXP_RES_BOOL ) { - bool &= r1->value.bool; - } - e_sexp_result_free(r1); - } - - if (type == ESEXP_RES_ARRAY_PTR) { - lambdafoo.count = argc; - lambdafoo.uids = g_ptr_array_new(); - g_hash_table_foreach(ht, (GHFunc)g_lib_sux_htand, &lambdafoo); - r->type = ESEXP_RES_ARRAY_PTR; - r->value.ptrarray = lambdafoo.uids; - } else if (type == ESEXP_RES_BOOL) { - r->type = ESEXP_RES_BOOL; - r->value.bool = bool; - } - - g_hash_table_destroy(ht); - - return r; -} - -static ESExpResult * -term_eval_or(struct _ESExp *f, int argc, struct _ESExpTerm **argv, void *data) -{ - struct _ESExpResult *r, *r1; - GHashTable *ht = g_hash_table_new(g_str_hash, g_str_equal); - struct _glib_sux_donkeys lambdafoo; - int type = -1; - int bool = FALSE; - int i; - - r(printf("(or \n")); - - r = e_sexp_result_new(ESEXP_RES_UNDEFINED); - - for (i=0;!bool && itype; - if (r1->type != type) { - printf("wrong types in or operation\n"); - } else if (r1->type == ESEXP_RES_ARRAY_PTR) { - char **a1; - int l1, j; - - a1 = (char **)r1->value.ptrarray->pdata; - l1 = r1->value.ptrarray->len; - for (j=0;jtype == ESEXP_RES_BOOL) { - bool |= r1->value.bool; - } - e_sexp_result_free(r1); - } - - if (type == ESEXP_RES_ARRAY_PTR) { - lambdafoo.count = argc; - lambdafoo.uids = g_ptr_array_new(); - g_hash_table_foreach(ht, (GHFunc)g_lib_sux_htor, &lambdafoo); - r->type = ESEXP_RES_ARRAY_PTR; - r->value.ptrarray = lambdafoo.uids; - } else if (type == ESEXP_RES_BOOL) { - r->type = ESEXP_RES_BOOL; - r->value.bool = bool; - } - g_hash_table_destroy(ht); - - return r; -} - -static ESExpResult * -term_eval_not(struct _ESExp *f, int argc, struct _ESExpResult **argv, void *data) -{ - int res = TRUE; - ESExpResult *r; - - if (argc>0) { - if (argv[0]->type == ESEXP_RES_BOOL - && argv[0]->value.bool) - res = FALSE; - } - r = e_sexp_result_new(ESEXP_RES_BOOL); - r->value.bool = res; - return r; -} - -/* this should support all arguments ...? */ -static ESExpResult * -term_eval_lt(struct _ESExp *f, int argc, struct _ESExpTerm **argv, void *data) -{ - struct _ESExpResult *r, *r1, *r2; - - r = e_sexp_result_new(ESEXP_RES_UNDEFINED); - - if (argc == 2) { - r1 = e_sexp_term_eval(f, argv[0]); - r2 = e_sexp_term_eval(f, argv[1]); - if (r1->type != r2->type) { - printf("error, invalid types in compare\n"); - } else if (r1->type == ESEXP_RES_INT) { - r->type = ESEXP_RES_BOOL; - r->value.bool = r1->value.number < r2->value.number; - } else if (r1->type == ESEXP_RES_STRING) { - r->type = ESEXP_RES_BOOL; - r->value.bool = strcmp(r1->value.string, r2->value.string) < 0; - } - } - return r; -} - -/* this should support all arguments ...? */ -static ESExpResult * -term_eval_gt(struct _ESExp *f, int argc, struct _ESExpTerm **argv, void *data) -{ - struct _ESExpResult *r, *r1, *r2; - - r = e_sexp_result_new(ESEXP_RES_UNDEFINED); - - if (argc == 2) { - r1 = e_sexp_term_eval(f, argv[0]); - r2 = e_sexp_term_eval(f, argv[1]); - if (r1->type != r2->type) { - printf("error, invalid types in compare\n"); - } else if (r1->type == ESEXP_RES_INT) { - r->type = ESEXP_RES_BOOL; - r->value.bool = r1->value.number > r2->value.number; - } else if (r1->type == ESEXP_RES_STRING) { - r->type = ESEXP_RES_BOOL; - r->value.bool = strcmp(r1->value.string, r2->value.string) > 0; - } - } - return r; -} - -/* this should support all arguments ...? */ -static ESExpResult * -term_eval_eq(struct _ESExp *f, int argc, struct _ESExpTerm **argv, void *data) -{ - struct _ESExpResult *r, *r1, *r2; - - r = e_sexp_result_new(ESEXP_RES_BOOL); - - if (argc == 2) { - r1 = e_sexp_term_eval(f, argv[0]); - r2 = e_sexp_term_eval(f, argv[1]); - if (r1->type != r2->type) { - r->value.bool = FALSE; - } else if (r1->type == ESEXP_RES_INT) { - r->value.bool = r1->value.number == r2->value.number; - } else if (r1->type == ESEXP_RES_BOOL) { - r->value.bool = r1->value.bool == r2->value.bool; - } else if (r1->type == ESEXP_RES_STRING) { - r->value.bool = strcmp(r1->value.string, r2->value.string) == 0; - } - } - return r; -} - -static ESExpResult * -term_eval_plus(struct _ESExp *f, int argc, struct _ESExpResult **argv, void *data) -{ - struct _ESExpResult *r=NULL; - int type; - int i; - - if (argc>0) { - type = argv[0]->type; - switch(type) { - case ESEXP_RES_INT: { - int total = argv[0]->value.number; - for (i=1;itype == ESEXP_RES_INT;i++) { - total += argv[i]->value.number; - } - if (ivalue.number = total; - break; } - case ESEXP_RES_STRING: { - GString *s = g_string_new(argv[0]->value.string); - for (i=1;itype == ESEXP_RES_STRING;i++) { - g_string_append(s, argv[i]->value.string); - } - if (ivalue.string = s->str; - g_string_free(s, FALSE); - break; } - - } - } - - if (!r) { - r = e_sexp_result_new(ESEXP_RES_INT); - r->value.number = 0; - } - return r; -} - -static ESExpResult * -term_eval_sub(struct _ESExp *f, int argc, struct _ESExpResult **argv, void *data) -{ - struct _ESExpResult *r=NULL; - int type; - int i; - - if (argc>0) { - type = argv[0]->type; - switch(type) { - case ESEXP_RES_INT: { - int total = argv[0]->value.number; - for (i=1;itype == ESEXP_RES_INT;i++) { - total -= argv[i]->value.number; - } - if (ivalue.number = total; - break; } - } - } - - if (!r) { - r = e_sexp_result_new(ESEXP_RES_INT); - r->value.number = 0; - } - return r; -} - -/* implements 'if' function */ -static ESExpResult * -term_eval_if(struct _ESExp *f, int argc, struct _ESExpTerm **argv, void *data) -{ - struct _ESExpResult *r; - int doit; - - if (argc >=2 && argc<=3) { - r = e_sexp_term_eval(f, argv[0]); - doit = (r->type == ESEXP_RES_BOOL && r->value.bool); - e_sexp_result_free(r); - if (doit) { - return e_sexp_term_eval(f, argv[1]); - } else if (argc>2) { - return e_sexp_term_eval(f, argv[2]); - } - } - return e_sexp_result_new(ESEXP_RES_UNDEFINED); -} - -/* implements 'begin' statement */ -static ESExpResult * -term_eval_begin(struct _ESExp *f, int argc, struct _ESExpTerm **argv, void *data) -{ - struct _ESExpResult *r=NULL; - int i; - - for (i=0;itype = ESEXP_RES_UNDEFINED; - - switch (t->type) { - case ESEXP_TERM_STRING: - r(printf(" (string \"%s\")\n", t->value.string)); - r->type = ESEXP_RES_STRING; - /* erk, this shoul;dn't need to strdup this ... */ - r->value.string = g_strdup(t->value.string); - break; - case ESEXP_TERM_INT: - r(printf(" (int %d)\n", t->value.number)); - r->type = ESEXP_RES_INT; - r->value.number = t->value.number; - break; - case ESEXP_TERM_BOOL: - r(printf(" (int %d)\n", t->value.number)); - r->type = ESEXP_RES_BOOL; - r->value.bool = t->value.bool; - break; - case ESEXP_TERM_IFUNC: { - if (t->value.func.sym->f.ifunc) { - r1 = t->value.func.sym->f.ifunc(f, t->value.func.termcount, t->value.func.terms, t->value.func.sym->data); - if (r1) { - e_sexp_result_free(r); - r = r1; - } - } - break; } - case ESEXP_TERM_FUNC: { - struct _ESExpResult **argv; - - /* first evaluate all arguments to result types */ - argv = alloca(sizeof(argv[0]) * t->value.func.termcount); - for (i=0;ivalue.func.termcount;i++) { - argv[i] = e_sexp_term_eval(f, t->value.func.terms[i]); - } - /* call the function */ - if (t->value.func.sym->f.func) { - r1 = t->value.func.sym->f.func(f, t->value.func.termcount, argv, t->value.func.sym->data); - if (r1) { - e_sexp_result_free(r); - r = r1; - } - } - for (i=0;ivalue.func.termcount;i++) { - e_sexp_result_free(argv[i]); - } - break; } - default: - printf("Warning: Unknown type encountered in parse tree: %d\n", t->type); - r->type = ESEXP_RES_UNDEFINED; - } - - return r; -} - - -static void -eval_dump_result(ESExpResult *r, int depth) -{ - int i; - - if (r==NULL) { - printf("null result???\n"); - return; - } - - for (i=0;itype) { - case ESEXP_RES_ARRAY_PTR: - printf("array pointers\n"); - break; - case ESEXP_RES_INT: - printf("int: %d\n", r->value.number); - break; - case ESEXP_RES_STRING: - printf("string: '%s'\n", r->value.string); - break; - case ESEXP_RES_BOOL: - printf("bool: %c\n", r->value.bool?'t':'f'); - break; - case ESEXP_RES_UNDEFINED: - printf(" \n"); - break; - } - printf("\n"); -} - -static void -parse_dump_term(struct _ESExpTerm *t, int depth) -{ - int i; - - if (t==NULL) { - printf("null term??\n"); - return; - } - - for (i=0;itype) { - case ESEXP_TERM_STRING: - printf(" \"%s\"", t->value.string); - break; - case ESEXP_TERM_INT: - printf(" %d", t->value.number); - break; - case ESEXP_TERM_BOOL: - printf(" #%c", t->value.bool?'t':'f'); - break; - case ESEXP_TERM_IFUNC: - case ESEXP_TERM_FUNC: - printf(" (function %s\n", t->value.func.sym->name); - /*printf(" [%d] ", t->value.func.termcount);*/ - for (i=0;ivalue.func.termcount;i++) { - parse_dump_term(t->value.func.terms[i], depth+1); - } - for (i=0;ivalue.var->name); - break; - default: - printf("unknown type: %d\n", t->type); - } - - printf("\n"); -} - -/* - PARSER -*/ - -static struct _ESExpTerm * -parse_new_term(int type) -{ - struct _ESExpTerm *s = g_malloc0(sizeof(*s)); - s->type = type; - return s; -} - -static void -parse_term_free(struct _ESExpTerm *t) -{ - int i; - - if (t==NULL) { - return; - } - - switch (t->type) { - case ESEXP_TERM_FUNC: - case ESEXP_TERM_IFUNC: - for (i=0;ivalue.func.termcount;i++) { - parse_term_free(t->value.func.terms[i]); - } - g_free(t->value.func.terms); - break; - case ESEXP_TERM_VAR: - break; - case ESEXP_TERM_STRING: - g_free(t->value.string); - break; - case ESEXP_TERM_INT: - break; - default: - printf("parse_term_free: unknown type: %d\n", t->type); - } - g_free(t); -} - -static struct _ESExpTerm ** -parse_values(ESExp *f, int *len) -{ - int token; - struct _ESExpTerm **terms; - int i=0; - GScanner *gs = f->scanner; - - p(printf("parsing values\n")); - - /* FIXME: This hardcoded nonsense!!! :) */ - terms = g_malloc0(20*sizeof(*terms)); - - while ( (token = g_scanner_peek_next_token(gs)) != G_TOKEN_EOF - && token != ')') { - terms[i]=parse_value(f); - i++; - } - - p(printf("found %d subterms\n", i)); - *len = i; - - p(printf("dont parsing values\n")); - return terms; -} - -static struct _ESExpTerm * -parse_value(ESExp *f) -{ - int token; - struct _ESExpTerm *t = NULL; - GScanner *gs = f->scanner; - struct _ESExpSymbol *s; - - p(printf("parsing value\n")); - - token = g_scanner_get_next_token(gs); - switch(token) { - case G_TOKEN_LEFT_PAREN: - p(printf("got brace, its a list!\n")); - return parse_list(f, TRUE); - case G_TOKEN_STRING: - p(printf("got string\n")); - t = parse_new_term(ESEXP_TERM_STRING); - t->value.string = g_strdup(g_scanner_cur_value(gs).v_string); - break; - case G_TOKEN_INT: - t = parse_new_term(ESEXP_TERM_INT); - t->value.number = g_scanner_cur_value(gs).v_int; - p(printf("got int\n")); - break; - case '#': - printf("got bool?\n"); - token = g_scanner_get_next_token(gs); - t = parse_new_term(ESEXP_TERM_BOOL); - t->value.bool = token=='t'; - break; - case G_TOKEN_SYMBOL: - s = g_scanner_cur_value(gs).v_symbol; - switch (s->type) { - case ESEXP_TERM_FUNC: - case ESEXP_TERM_IFUNC: - /* this is basically invalid, since we can't use function - pointers, but let the runtime catch it ... */ - t = parse_new_term(s->type); - t->value.func.sym = s; - t->value.func.terms = parse_values(f, &t->value.func.termcount); - break; - case ESEXP_TERM_VAR: - t = parse_new_term(s->type); - t->value.var = s; - break; - default: - printf("Invalid symbol type: %d\n", s->type); - } - break; - case G_TOKEN_IDENTIFIER: - printf("Unknown identifier encountered: %s\n", g_scanner_cur_value(gs).v_identifier); - break; - default: - printf("Innvalid token trying to parse a list of values\n"); - } - p(printf("done parsing value\n")); - return t; -} - -/* FIXME: this needs some robustification */ -static struct _ESExpTerm * -parse_list(ESExp *f, int gotbrace) -{ - int token; - struct _ESExpTerm *t = NULL; - GScanner *gs = f->scanner; - - p(printf("parsing list\n")); - if (gotbrace) - token = '('; - else - token = g_scanner_get_next_token(gs); - if (token =='(') { - token = g_scanner_get_next_token(gs); - switch(token) { - case G_TOKEN_SYMBOL: { - struct _ESExpSymbol *s; - - s = g_scanner_cur_value(gs).v_symbol; - p(printf("got funciton: %s\n", s->name)); - t = parse_new_term(s->type); - p(printf("created new list %p\n", t)); - /* if we have a variable, find out its base type */ - while (s->type == ESEXP_TERM_VAR) { - s = ((ESExpTerm *)(s->data))->value.var; - } - if (s->type == ESEXP_TERM_FUNC - || s->type == ESEXP_TERM_IFUNC) { - t->value.func.sym = s; - t->value.func.terms = parse_values(f, &t->value.func.termcount); - } else { - printf("Error, trying to call variable as function\n"); - } - break; } - case G_TOKEN_IDENTIFIER: - printf("Unknown identifier: %s\n", g_scanner_cur_value(gs).v_identifier); - break; - default: - printf("unknown sequence encountered, type = %d\n", token); - } - token = g_scanner_get_next_token(gs); - if (token != ')') { - printf("Error, expected ')' not found\n"); - } - } else { - printf("Error, list term without opening (\n"); - } - - p(printf("returning list %p\n", t)); - return t; -} - -#if 0 -GList * -camel_mbox_folder_search_by_expression(CamelFolder *folder, char *expression, CamelException *ex) -{ - GScanner *gs; - int i; - struct _ESExpTerm *t; - struct _searchcontext *ctx; - struct _ESExpResult *r; - GList *matches = NULL; - - gs = g_scanner_new(&scanner_config); - for(i=0;ifolder = folder; - ctx->summary = camel_folder_get_summary(folder, ex); - ctx->message_info = camel_folder_summary_get_message_info_list(ctx->summary); -#ifdef HAVE_IBEX - ctx->index = ibex_open(CAMEL_MBOX_FOLDER(folder)->index_file_path, FALSE); - if (!ctx->index) { - perror("Cannot open index file, body searches will be ignored\n"); - } -#endif - r = term_eval(ctx, t); - - /* now create a folder summary to return?? */ - if (r - && r->type == ESEXP_RES_ARRAY_PTR) { - d(printf("got result ...\n")); - for (i=0;ivalue.ptrarray->len;i++) { - d(printf("adding match: %s\n", (char *)g_ptr_array_index(r->value.ptrarray, i))); - matches = g_list_prepend(matches, g_strdup(g_ptr_array_index(r->value.ptrarray, i))); - } - e_sexp_result_free(r); - } - - if (ctx->index) - ibex_close(ctx->index); - - gtk_object_unref((GtkObject *)ctx->summary); - g_free(ctx); - parse_term_free(t); - } else { - printf("Warning, Could not parse expression!\n %s\n", expression); - } - - g_scanner_destroy(gs); - - return matches; -} -#endif - - -static void e_sexp_finalise(GtkObject *); - -static void -e_sexp_class_init (ESExpClass *class) -{ - GtkObjectClass *object_class; - - object_class = (GtkObjectClass *) class; - - object_class->finalize = e_sexp_finalise; - - parent_class = gtk_type_class (gtk_object_get_type ()); -} - -/* 'builtin' functions */ -static struct { - char *name; - ESExpFunc *func; - int type; /* set to 1 if a function can perform shortcut evaluation, or - doesn't execute everything, 0 otherwise */ -} symbols[] = { - { "and", (ESExpFunc *)term_eval_and, 1 }, - { "or", (ESExpFunc *)term_eval_or, 1 }, - { "not", (ESExpFunc *)term_eval_not, 0 }, - { "<", (ESExpFunc *)term_eval_lt, 1 }, - { ">", (ESExpFunc *)term_eval_gt, 1 }, - { "=", (ESExpFunc *)term_eval_eq, 1 }, - { "+", (ESExpFunc *)term_eval_plus, 0 }, - { "-", (ESExpFunc *)term_eval_sub, 0 }, - { "if", (ESExpFunc *)term_eval_if, 1 }, - { "begin", (ESExpFunc *)term_eval_begin, 1 }, -}; - -static void -free_symbol(void *key, void *value, void *data) -{ - struct _ESExpSymbol *s = value; - - g_free(s->name); - g_free(s); -} - -static void -e_sexp_finalise(GtkObject *o) -{ - ESExp *s = (ESExp *)o; - - if (s->tree) { - parse_term_free(s->tree); - s->tree = NULL; - } - - g_scanner_scope_foreach_symbol(s->scanner, 0, free_symbol, 0); - g_scanner_destroy(s->scanner); - - ((GtkObjectClass *)(parent_class))->finalize((GtkObject *)o); -} - -static void -e_sexp_init (ESExp *s) -{ - int i; - - s->scanner = g_scanner_new(&scanner_config); - - /* load in builtin symbols? */ - for(i=0;iname = g_strdup(name); - s->f.func = func; - s->type = ESEXP_TERM_FUNC; - s->data = data; - g_scanner_scope_add_symbol(f->scanner, scope, s->name, s); -} - -void -e_sexp_add_ifunction(ESExp *f, int scope, char *name, ESExpIFunc *ifunc, void *data) -{ - struct _ESExpSymbol *s; - - g_return_if_fail(FILTER_IS_SEXP(f)); - g_return_if_fail(name != NULL); - - s = g_malloc0(sizeof(*s)); - s->name = g_strdup(name); - s->f.ifunc = ifunc; - s->type = ESEXP_TERM_IFUNC; - s->data = data; - g_scanner_scope_add_symbol(f->scanner, scope, s->name, s); -} - -void -e_sexp_add_variable(ESExp *f, int scope, char *name, ESExpTerm *value) -{ - struct _ESExpSymbol *s; - - g_return_if_fail(FILTER_IS_SEXP(f)); - g_return_if_fail(name != NULL); - - s = g_malloc0(sizeof(*s)); - s->name = g_strdup(name); - s->type = ESEXP_TERM_VAR; - s->data = value; - g_scanner_scope_add_symbol(f->scanner, scope, s->name, s); -} - -void -e_sexp_remove_symbol(ESExp *f, int scope, char *name) -{ - int oldscope; - struct _ESExpSymbol *s; - - g_return_if_fail(FILTER_IS_SEXP(f)); - g_return_if_fail(name != NULL); - - oldscope = g_scanner_set_scope(f->scanner, scope); - s = g_scanner_lookup_symbol(f->scanner, name); - g_scanner_scope_remove_symbol(f->scanner, scope, name); - g_scanner_set_scope(f->scanner, oldscope); - if (s) { - g_free(s->name); - g_free(s); - } -} - -int -e_sexp_set_scope(ESExp *f, int scope) -{ - g_return_val_if_fail(FILTER_IS_SEXP(f), 0); - - return g_scanner_set_scope(f->scanner, scope); -} - -void -e_sexp_input_text(ESExp *f, const char *text, int len) -{ - g_return_if_fail(FILTER_IS_SEXP(f)); - g_return_if_fail(text != NULL); - - g_scanner_input_text(f->scanner, text, len); -} - -void -e_sexp_input_file (ESExp *f, int fd) -{ - g_return_if_fail(FILTER_IS_SEXP(f)); - - g_scanner_input_file(f->scanner, fd); -} - -/* needs some error return? */ -void -e_sexp_parse(ESExp *f) -{ - g_return_if_fail(FILTER_IS_SEXP(f)); - - if (f->tree) - parse_term_free(f->tree); - - f->tree = parse_list(f, FALSE); - - if (f->tree) - parse_dump_term(f->tree, 0); -} - -struct _ESExpResult * -e_sexp_eval(ESExp *f) -{ - g_return_val_if_fail(FILTER_IS_SEXP(f), NULL); - g_return_val_if_fail(f->tree != NULL, NULL); - - return e_sexp_term_eval(f, f->tree); -} - -#ifdef TESTER -int main(int argc, char **argv) -{ - ESExp *f; - char *t = "(+ \"foo\" \"\\\"\" \"bar\" \"\\\\ blah \\x \")"; - ESExpResult *r; - - gtk_init(&argc, &argv); - - f = e_sexp_new(); - - e_sexp_add_variable(f, 0, "test", NULL); - - e_sexp_input_text(f, t, strlen(t)); - e_sexp_parse(f); - - if (f->tree) { - parse_dump_term(f->tree, 0); - } - - r = e_sexp_eval(f); - if (r) { - eval_dump_result(r, 0); - } else { - printf("no result?|\n"); - } - - return 0; -} -#endif diff --git a/e-util/e-sexp.h b/e-util/e-sexp.h deleted file mode 100644 index 885a2369b9..0000000000 --- a/e-util/e-sexp.h +++ /dev/null @@ -1,115 +0,0 @@ -/* - generic s-exp evaluator class -*/ -#ifndef _E_SEXP_H -#define _E_SEXP_H - -#include -#include - -#define E_SEXP(obj) GTK_CHECK_CAST (obj, e_sexp_get_type (), ESExp) -#define E_SEXP_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, e_sexp_get_type (), ESExpClass) -#define FILTER_IS_SEXP(obj) GTK_CHECK_TYPE (obj, e_sexp_get_type ()) - -typedef struct _ESExp ESExp; -typedef struct _ESExpClass ESExpClass; - -typedef struct _ESExpSymbol ESExpSymbol; -typedef struct _ESExpResult ESExpResult; -typedef struct _ESExpTerm ESExpTerm; - -typedef struct _ESExpResult *(ESExpFunc)(struct _ESExp *sexp, - int argc, - struct _ESExpResult **argv, - void *data); - -typedef struct _ESExpResult *(ESExpIFunc)(struct _ESExp *sexp, - int argc, - struct _ESExpTerm **argv, - void *data); -enum _ESExpResultType { - ESEXP_RES_ARRAY_PTR=0, /* type is a ptrarray, what it points to is implementation dependant */ - ESEXP_RES_INT, /* type is a number */ - ESEXP_RES_STRING, /* type is a pointer to a single string */ - ESEXP_RES_BOOL, /* boolean type */ - ESEXP_RES_UNDEFINED /* unknown type */ -}; - -struct _ESExpResult { - enum _ESExpResultType type; - union { - GPtrArray *ptrarray; - int number; - char *string; - int bool; - } value; -}; - -enum _ESExpTermType { - ESEXP_TERM_INT = 0, /* integer literal */ - ESEXP_TERM_BOOL, /* boolean literal */ - ESEXP_TERM_STRING, /* string literal */ - ESEXP_TERM_FUNC, /* normal function, arguments are evaluated before calling */ - ESEXP_TERM_IFUNC, /* immediate function, raw terms are arguments */ - ESEXP_TERM_VAR, /* variable reference */ -}; - -struct _ESExpSymbol { - int type; /* ESEXP_TERM_FUNC or ESEXP_TERM_VAR */ - char *name; - void *data; - union { - ESExpFunc *func; - ESExpIFunc *ifunc; - } f; -}; - -struct _ESExpTerm { - enum _ESExpTermType type; - union { - char *string; - int number; - int bool; - struct { - struct _ESExpSymbol *sym; - struct _ESExpTerm **terms; - int termcount; - } func; - struct _ESExpSymbol *var; - } value; -}; - - - -struct _ESExp { - GtkObject object; - - GScanner *scanner; /* for parsing text version */ - ESExpTerm *tree; /* root of expression tree */ -}; - -struct _ESExpClass { - GtkObjectClass parent_class; - -}; - -guint e_sexp_get_type (void); -ESExp *e_sexp_new (void); -void e_sexp_add_function (ESExp *f, int scope, char *name, ESExpFunc *func, void *data); -void e_sexp_add_ifunction (ESExp *f, int scope, char *name, ESExpIFunc *func, void *data); -void e_sexp_add_variable (ESExp *f, int scope, char *name, ESExpTerm *value); -void e_sexp_remove_symbol (ESExp *f, int scope, char *name); -int e_sexp_set_scope (ESExp *f, int scope); - -void e_sexp_input_text (ESExp *f, const char *text, int len); -void e_sexp_input_file (ESExp *f, int fd); - - -void e_sexp_parse (ESExp *f); -ESExpResult *e_sexp_eval (ESExp *f); - -ESExpResult *e_sexp_term_eval (struct _ESExp *f, struct _ESExpTerm *t); -ESExpResult *e_sexp_result_new (int type); -void e_sexp_result_free (struct _ESExpResult *t); - -#endif /* _E_SEXP_H */ diff --git a/e-util/e-text-event-processor-emacs-like.c b/e-util/e-text-event-processor-emacs-like.c deleted file mode 100644 index be323d028f..0000000000 --- a/e-util/e-text-event-processor-emacs-like.c +++ /dev/null @@ -1,372 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* e-text-event-processor.c - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include -#include "e-text-event-processor-emacs-like.h" -static void e_text_event_processor_emacs_like_init (ETextEventProcessorEmacsLike *card); -static void e_text_event_processor_emacs_like_class_init (ETextEventProcessorEmacsLikeClass *klass); -static gint e_text_event_processor_emacs_like_event (ETextEventProcessor *tep, ETextEventProcessorEvent *event); - -static ETextEventProcessorClass *parent_class = NULL; - -/* The arguments we take */ -enum { - ARG_0 -}; - -static const ETextEventProcessorCommand control_keys[26] = -{ - { E_TEP_START_OF_LINE, E_TEP_MOVE, 0, "" }, /* a */ - { E_TEP_BACKWARD_CHARACTER, E_TEP_MOVE, 0, "" }, /* b */ - { E_TEP_SELECTION, E_TEP_COPY, 0, "" }, /* c */ - { E_TEP_FORWARD_CHARACTER, E_TEP_DELETE, 0, "" }, /* d */ - { E_TEP_END_OF_LINE, E_TEP_MOVE, 0, "" }, /* e */ - { E_TEP_FORWARD_CHARACTER, E_TEP_MOVE, 0, "" }, /* f */ - { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* g */ - { E_TEP_BACKWARD_CHARACTER, E_TEP_DELETE, 0, "" }, /* h */ - { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* i */ - { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* j */ - { E_TEP_END_OF_LINE, E_TEP_DELETE, 0, "" }, /* k */ - { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* l */ - { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* m */ - { E_TEP_FORWARD_LINE, E_TEP_MOVE, 0, "" }, /* n */ - { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* o */ - { E_TEP_BACKWARD_LINE, E_TEP_MOVE, 0, "" }, /* p */ - { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* q */ - { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* r */ - { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* s */ - { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* t */ - { E_TEP_START_OF_LINE, E_TEP_DELETE, 0, "" }, /* u */ - { E_TEP_SELECTION, E_TEP_PASTE, 0, "" }, /* v */ - { E_TEP_SELECTION, E_TEP_DELETE, 0, "" }, /* w */ - { E_TEP_SELECTION, E_TEP_DELETE, 0, "" }, /* x */ - { E_TEP_SELECTION, E_TEP_PASTE, 0, "" }, /* y */ - { E_TEP_SELECTION, E_TEP_NOP, 0, "" } /* z */ -}; - -static const ETextEventProcessorCommand alt_keys[26] = -{ - { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* a */ - { E_TEP_BACKWARD_WORD, E_TEP_MOVE, 0, "" }, /* b */ - { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* c */ - { E_TEP_FORWARD_WORD, E_TEP_DELETE, 0, "" }, /* d */ - { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* e */ - { E_TEP_FORWARD_WORD, E_TEP_MOVE, 0, "" }, /* f */ - { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* g */ - { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* h */ - { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* i */ - { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* j */ - { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* k */ - { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* l */ - { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* m */ - { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* n */ - { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* o */ - { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* p */ - { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* q */ - { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* r */ - { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* s */ - { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* t */ - { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* u */ - { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* v */ - { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* w */ - { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* x */ - { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* y */ - { E_TEP_SELECTION, E_TEP_NOP, 0, "" } /* z */ - -}; - -GtkType -e_text_event_processor_emacs_like_get_type (void) -{ - static GtkType text_event_processor_emacs_like_type = 0; - - if (!text_event_processor_emacs_like_type) - { - static const GtkTypeInfo text_event_processor_emacs_like_info = - { - "ETextEventProcessorEmacsLike", - sizeof (ETextEventProcessorEmacsLike), - sizeof (ETextEventProcessorEmacsLikeClass), - (GtkClassInitFunc) e_text_event_processor_emacs_like_class_init, - (GtkObjectInitFunc) e_text_event_processor_emacs_like_init, - /* reserved_1 */ NULL, - /* reserved_2 */ NULL, - (GtkClassInitFunc) NULL, - }; - - text_event_processor_emacs_like_type = gtk_type_unique (e_text_event_processor_get_type (), &text_event_processor_emacs_like_info); - } - - return text_event_processor_emacs_like_type; -} - -static void -e_text_event_processor_emacs_like_class_init (ETextEventProcessorEmacsLikeClass *klass) -{ - GtkObjectClass *object_class; - ETextEventProcessorClass *processor_class; - - object_class = (GtkObjectClass*) klass; - processor_class = (ETextEventProcessorClass*) klass; - - parent_class = gtk_type_class (e_text_event_processor_get_type ()); - - processor_class->event = e_text_event_processor_emacs_like_event; -} - -static void -e_text_event_processor_emacs_like_init (ETextEventProcessorEmacsLike *tep) -{ -} - -static gint -e_text_event_processor_emacs_like_event (ETextEventProcessor *tep, ETextEventProcessorEvent *event) -{ - ETextEventProcessorCommand command; - ETextEventProcessorEmacsLike *tep_el = E_TEXT_EVENT_PROCESSOR_EMACS_LIKE(tep); - command.action = E_TEP_NOP; - switch (event->type) { - case GDK_BUTTON_PRESS: - if (event->button.button == 1) { - command.action = E_TEP_GRAB; - command.time = event->button.time; - gtk_signal_emit_by_name (GTK_OBJECT (tep), "command", &command); - if (event->button.state & GDK_SHIFT_MASK) - command.action = E_TEP_SELECT; - else - command.action = E_TEP_MOVE; - command.position = E_TEP_VALUE; - command.value = event->button.position; - command.time = event->button.time; - tep_el->mouse_down = TRUE; - } - break; - case GDK_2BUTTON_PRESS: - if (event->button.button == 1) { - command.action = E_TEP_SELECT; - command.position = E_TEP_SELECT_WORD; - command.time = event->button.time; - } - break; - case GDK_3BUTTON_PRESS: - if (event->button.button == 1) { - command.action = E_TEP_SELECT; - command.position = E_TEP_SELECT_ALL; - command.time = event->button.time; - } - break; - case GDK_BUTTON_RELEASE: - if (event->button.button == 1) { - command.action = E_TEP_UNGRAB; - command.time = event->button.time; - gtk_signal_emit_by_name (GTK_OBJECT (tep), "command", &command); - command.time = event->button.time; - tep_el->mouse_down = FALSE; - command.action = E_TEP_NOP; - } else if (event->button.button == 2) { - command.action = E_TEP_MOVE; - command.position = E_TEP_VALUE; - command.value = event->button.position; - command.time = event->button.time; - gtk_signal_emit_by_name (GTK_OBJECT (tep), "command", &command); - - command.action = E_TEP_GET_SELECTION; - command.position = E_TEP_SELECTION; - command.value = 0; - command.time = event->button.time; - } - break; - case GDK_MOTION_NOTIFY: - if (tep_el->mouse_down) { - command.action = E_TEP_SELECT; - command.position = E_TEP_VALUE; - command.time = event->motion.time; - command.value = event->motion.position; - } - break; - case GDK_KEY_PRESS: - { - ETextEventProcessorEventKey key = event->key; - command.time = event->key.time; - if (key.state & GDK_SHIFT_MASK) - command.action = E_TEP_SELECT; - else - command.action = E_TEP_MOVE; - switch(key.keyval) { - case GDK_Home: - if (key.state & GDK_CONTROL_MASK) - command.position = E_TEP_START_OF_BUFFER; - else - command.position = E_TEP_START_OF_LINE; - break; - case GDK_End: - if (key.state & GDK_CONTROL_MASK) - command.position = E_TEP_END_OF_BUFFER; - else - command.position = E_TEP_END_OF_LINE; - break; - case GDK_Page_Up: command.position = E_TEP_BACKWARD_PAGE; break; - case GDK_Page_Down: command.position = E_TEP_FORWARD_PAGE; break; - /* CUA has Ctrl-Up/Ctrl-Down as paragraph up down */ - case GDK_Up: command.position = E_TEP_BACKWARD_LINE; break; - case GDK_Down: command.position = E_TEP_FORWARD_LINE; break; - case GDK_Left: - if (key.state & GDK_CONTROL_MASK) - command.position = E_TEP_BACKWARD_WORD; - else - command.position = E_TEP_BACKWARD_CHARACTER; - break; - case GDK_Right: - if (key.state & GDK_CONTROL_MASK) - command.position = E_TEP_FORWARD_WORD; - else - command.position = E_TEP_FORWARD_CHARACTER; - break; - - case GDK_BackSpace: - command.action = E_TEP_DELETE; - if (key.state & GDK_CONTROL_MASK) - command.position = E_TEP_BACKWARD_WORD; - else - command.position = E_TEP_BACKWARD_CHARACTER; - break; - case GDK_Clear: - command.action = E_TEP_DELETE; - command.position = E_TEP_END_OF_LINE; - break; - case GDK_Insert: - if (key.state & GDK_SHIFT_MASK) { - command.action = E_TEP_PASTE; - command.position = E_TEP_SELECTION; - } else if (key.state & GDK_CONTROL_MASK) { - command.action = E_TEP_COPY; - command.position = E_TEP_SELECTION; - } else { - /* gtk_toggle_insert(text) -- IMPLEMENT */ - } - break; - case GDK_Delete: - if (key.state & GDK_CONTROL_MASK){ - command.action = E_TEP_DELETE; - command.position = E_TEP_FORWARD_WORD; - } else if (key.state & GDK_SHIFT_MASK) { - command.action = E_TEP_COPY; - command.position = E_TEP_SELECTION; - gtk_signal_emit_by_name (GTK_OBJECT (tep), "command", &command); - - command.action = E_TEP_DELETE; - command.position = E_TEP_SELECTION; - } else { - command.action = E_TEP_DELETE; - command.position = E_TEP_FORWARD_CHARACTER; - } - break; - case GDK_Tab: - /* Don't insert literally */ - command.action = E_TEP_NOP; - command.position = E_TEP_SELECTION; - break; - case GDK_Return: - if (key.state & GDK_CONTROL_MASK) { - command.action = E_TEP_ACTIVATE; - command.position = E_TEP_SELECTION; - } else { - command.action = E_TEP_INSERT; - command.position = E_TEP_SELECTION; - command.value = 1; - command.string = "\n"; - } - break; - case GDK_Escape: - /* Don't insert literally */ - command.action = E_TEP_NOP; - command.position = E_TEP_SELECTION; - break; - - default: - if (key.state & GDK_CONTROL_MASK) { - if ((key.keyval >= 'A') && (key.keyval <= 'Z')) - key.keyval -= 'A' - 'a'; - - if ((key.keyval >= 'a') && (key.keyval <= 'z')) { - command.position = control_keys[(int) (key.keyval - 'a')].position; - if (control_keys[(int) (key.keyval - 'a')].action != E_TEP_MOVE) - command.action = control_keys[(int) (key.keyval - 'a')].action; - command.value = control_keys[(int) (key.keyval - 'a')].value; - command.string = control_keys[(int) (key.keyval - 'a')].string; - } - - if (key.keyval == 'x' || key.keyval == 'w') { - command.action = E_TEP_COPY; - command.position = E_TEP_SELECTION; - gtk_signal_emit_by_name (GTK_OBJECT (tep), "command", &command); - - command.action = E_TEP_DELETE; - command.position = E_TEP_SELECTION; - } - - break; - } else if (key.state & GDK_MOD1_MASK) { - if ((key.keyval >= 'A') && (key.keyval <= 'Z')) - key.keyval -= 'A' - 'a'; - - if ((key.keyval >= 'a') && (key.keyval <= 'z')) { - command.position = alt_keys[(int) (key.keyval - 'a')].position; - if (alt_keys[(int) (key.keyval - 'a')].action != E_TEP_MOVE) - command.action = alt_keys[(int) (key.keyval - 'a')].action; - command.value = alt_keys[(int) (key.keyval - 'a')].value; - command.string = alt_keys[(int) (key.keyval - 'a')].string; - } - } else if (key.length > 0) { - command.action = E_TEP_INSERT; - command.position = E_TEP_SELECTION; - command.value = strlen(key.string); - command.string = key.string; - - } else { - command.action = E_TEP_NOP; - } - } - break; - case GDK_KEY_RELEASE: - command.time = event->key.time; - command.action = E_TEP_NOP; - break; - default: - command.action = E_TEP_NOP; - break; - } - } - if (command.action != E_TEP_NOP) { - gtk_signal_emit_by_name (GTK_OBJECT (tep), "command", &command); - return 1; - } - else - return 0; -} - -ETextEventProcessor * -e_text_event_processor_emacs_like_new (void) -{ - ETextEventProcessorEmacsLike *retval = gtk_type_new (e_text_event_processor_emacs_like_get_type ()); - return E_TEXT_EVENT_PROCESSOR (retval); -} - diff --git a/e-util/e-text-event-processor-emacs-like.h b/e-util/e-text-event-processor-emacs-like.h deleted file mode 100644 index 651bb552b3..0000000000 --- a/e-util/e-text-event-processor-emacs-like.h +++ /dev/null @@ -1,68 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* e-text-event-processor-emacs-like.h - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -#ifndef __E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_H__ -#define __E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_H__ - -#include -#include "e-text-event-processor.h" - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus */ - -/* ETextEventProcessorEmacsLike - Turns events on a text widget into commands. Uses an emacs-ish interface. - * - */ - -#define E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_TYPE (e_text_event_processor_emacs_like_get_type ()) -#define E_TEXT_EVENT_PROCESSOR_EMACS_LIKE(obj) (GTK_CHECK_CAST ((obj), E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_TYPE, ETextEventProcessorEmacsLike)) -#define E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_TYPE, ETextEventProcessorEmacsLikeClass)) -#define E_IS_TEXT_EVENT_PROCESSOR_EMACS_LIKE(obj) (GTK_CHECK_TYPE ((obj), E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_TYPE)) -#define E_IS_TEXT_EVENT_PROCESSOR_EMACS_LIKE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_TYPE)) - - -typedef struct _ETextEventProcessorEmacsLike ETextEventProcessorEmacsLike; -typedef struct _ETextEventProcessorEmacsLikeClass ETextEventProcessorEmacsLikeClass; - -struct _ETextEventProcessorEmacsLike -{ - ETextEventProcessor parent; - - /* object specific fields */ - gboolean mouse_down; -}; - -struct _ETextEventProcessorEmacsLikeClass -{ - ETextEventProcessorClass parent_class; -}; - - -GtkType e_text_event_processor_emacs_like_get_type (void); -ETextEventProcessor *e_text_event_processor_emacs_like_new (void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -#endif /* __E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_H__ */ diff --git a/e-util/e-text-event-processor-types.h b/e-util/e-text-event-processor-types.h deleted file mode 100644 index 8f2ffbaf39..0000000000 --- a/e-util/e-text-event-processor-types.h +++ /dev/null @@ -1,140 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* e-text-event-processor.h - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GTK+ Team and others 1997-1999. See the AUTHORS - * file for a list of people on the GTK+ Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GTK+ at ftp://ftp.gtk.org/pub/gtk/. - */ - -#ifndef __E_TEXT_EVENT_PROCESSOR_TYPES_H__ -#define __E_TEXT_EVENT_PROCESSOR_TYPES_H__ - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus */ - -#include - -typedef enum _ETextEventProcessorCommandPosition ETextEventProcessorCommandPosition; -typedef enum _ETextEventProcessorCommandAction ETextEventProcessorCommandAction; -typedef struct _ETextEventProcessorCommand ETextEventProcessorCommand; - -typedef union _ETextEventProcessorEvent ETextEventProcessorEvent; -typedef struct _ETextEventProcessorEventButton ETextEventProcessorEventButton; -typedef struct _ETextEventProcessorEventKey ETextEventProcessorEventKey; -typedef struct _ETextEventProcessorEventMotion ETextEventProcessorEventMotion; - -enum _ETextEventProcessorCommandPosition { - E_TEP_VALUE, - E_TEP_SELECTION, - - E_TEP_START_OF_BUFFER, - E_TEP_END_OF_BUFFER, - - E_TEP_START_OF_LINE, - E_TEP_END_OF_LINE, - - E_TEP_FORWARD_CHARACTER, - E_TEP_BACKWARD_CHARACTER, - - E_TEP_FORWARD_WORD, - E_TEP_BACKWARD_WORD, - - E_TEP_FORWARD_LINE, - E_TEP_BACKWARD_LINE, - - E_TEP_FORWARD_PARAGRAPH, - E_TEP_BACKWARD_PARAGRAPH, - - E_TEP_FORWARD_PAGE, - E_TEP_BACKWARD_PAGE, - - E_TEP_SELECT_WORD, - E_TEP_SELECT_ALL - -}; - -enum _ETextEventProcessorCommandAction { - E_TEP_MOVE, - E_TEP_SELECT, - E_TEP_DELETE, - E_TEP_INSERT, - - E_TEP_COPY, - E_TEP_PASTE, - E_TEP_GET_SELECTION, - E_TEP_SET_SELECT_BY_WORD, - E_TEP_ACTIVATE, - - E_TEP_GRAB, - E_TEP_UNGRAB, - - E_TEP_NOP -}; - -struct _ETextEventProcessorCommand { - ETextEventProcessorCommandPosition position; - ETextEventProcessorCommandAction action; - int value; - char *string; - guint32 time; -}; - -struct _ETextEventProcessorEventButton { - GdkEventType type; - guint32 time; - guint state; - guint button; - gint position; -}; - -struct _ETextEventProcessorEventKey { - GdkEventType type; - guint32 time; - guint state; - guint keyval; - gint length; - gchar *string; -}; - -struct _ETextEventProcessorEventMotion { - GdkEventType type; - guint32 time; - guint state; - gint position; -}; - -union _ETextEventProcessorEvent { - GdkEventType type; - ETextEventProcessorEventButton button; - ETextEventProcessorEventKey key; - ETextEventProcessorEventMotion motion; -}; - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -#endif /* __E_TEXT_EVENT_PROCESSOR_TYPES_H__ */ diff --git a/e-util/e-text-event-processor.c b/e-util/e-text-event-processor.c deleted file mode 100644 index 47f028ca62..0000000000 --- a/e-util/e-text-event-processor.c +++ /dev/null @@ -1,103 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* e-text-event-processor.c - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include -#include "e-text-event-processor.h" -static void e_text_event_processor_init (ETextEventProcessor *card); -static void e_text_event_processor_class_init (ETextEventProcessorClass *klass); - -static GtkObjectClass *parent_class = NULL; - -/* The arguments we take */ -enum { - ARG_0 -}; - -enum { - E_TEP_EVENT, - E_TEP_LAST_SIGNAL -}; - -static guint e_tep_signals[E_TEP_LAST_SIGNAL] = { 0 }; - -GtkType -e_text_event_processor_get_type (void) -{ - static GtkType text_event_processor_type = 0; - - if (!text_event_processor_type) - { - static const GtkTypeInfo text_event_processor_info = - { - "ETextEventProcessor", - sizeof (ETextEventProcessor), - sizeof (ETextEventProcessorClass), - (GtkClassInitFunc) e_text_event_processor_class_init, - (GtkObjectInitFunc) e_text_event_processor_init, - /* reserved_1 */ NULL, - /* reserved_2 */ NULL, - (GtkClassInitFunc) NULL, - }; - - text_event_processor_type = gtk_type_unique (gtk_object_get_type (), &text_event_processor_info); - } - - return text_event_processor_type; -} - -static void -e_text_event_processor_class_init (ETextEventProcessorClass *klass) -{ - GtkObjectClass *object_class; - - object_class = (GtkObjectClass*) klass; - - parent_class = gtk_type_class (gtk_object_get_type ()); - - e_tep_signals[E_TEP_EVENT] = - gtk_signal_new ("command", - GTK_RUN_LAST, - object_class->type, - GTK_SIGNAL_OFFSET (ETextEventProcessorClass, command), - gtk_marshal_NONE__POINTER, - GTK_TYPE_NONE, 1, - GTK_TYPE_POINTER); - - gtk_object_class_add_signals (object_class, e_tep_signals, E_TEP_LAST_SIGNAL); - - klass->event = NULL; - klass->command = NULL; -} - -static void -e_text_event_processor_init (ETextEventProcessor *tep) -{ -} - -gint -e_text_event_processor_handle_event (ETextEventProcessor *tep, ETextEventProcessorEvent *event) -{ - if (E_TEXT_EVENT_PROCESSOR_CLASS(GTK_OBJECT(tep)->klass)->event) { - return E_TEXT_EVENT_PROCESSOR_CLASS(GTK_OBJECT(tep)->klass)->event(tep, event); - } else { - return 0; - } -} diff --git a/e-util/e-text-event-processor.h b/e-util/e-text-event-processor.h deleted file mode 100644 index 1fc79f3f70..0000000000 --- a/e-util/e-text-event-processor.h +++ /dev/null @@ -1,74 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* e-text-event-processor.h - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -#ifndef __E_TEXT_EVENT_PROCESSOR_H__ -#define __E_TEXT_EVENT_PROCESSOR_H__ - -#include -#include "e-text-event-processor-types.h" - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus */ - -/* ETextEventProcessor - Turns events on a text widget into commands. - * - */ - -#define E_TEXT_EVENT_PROCESSOR_TYPE (e_text_event_processor_get_type ()) -#define E_TEXT_EVENT_PROCESSOR(obj) (GTK_CHECK_CAST ((obj), E_TEXT_EVENT_PROCESSOR_TYPE, ETextEventProcessor)) -#define E_TEXT_EVENT_PROCESSOR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TEXT_EVENT_PROCESSOR_TYPE, ETextEventProcessorClass)) -#define E_IS_TEXT_EVENT_PROCESSOR(obj) (GTK_CHECK_TYPE ((obj), E_TEXT_EVENT_PROCESSOR_TYPE)) -#define E_IS_TEXT_EVENT_PROCESSOR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TEXT_EVENT_PROCESSOR_TYPE)) - - -typedef struct _ETextEventProcessor ETextEventProcessor; -typedef struct _ETextEventProcessorClass ETextEventProcessorClass; - -struct _ETextEventProcessor -{ - GtkObject parent; - - /* object specific fields */ - -}; - -struct _ETextEventProcessorClass -{ - GtkObjectClass parent_class; - - /* signals */ - void (* command) (ETextEventProcessor *tep, ETextEventProcessorCommand *command); - - /* virtual functions */ - gint (* event) (ETextEventProcessor *tep, ETextEventProcessorEvent *event); -}; - - -GtkType e_text_event_processor_get_type (void); -gint e_text_event_processor_handle_event (ETextEventProcessor *tep, ETextEventProcessorEvent *event); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -#endif /* __E_TEXT_EVENT_PROCESSOR_H__ */ diff --git a/e-util/e-util.c b/e-util/e-util.c deleted file mode 100644 index cac850b0d5..0000000000 --- a/e-util/e-util.c +++ /dev/null @@ -1,161 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * e-xml-utils.c - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include -#include -#include -#include -#include -#include - -#include "e-util.h" - -int -g_str_compare(const void *x, const void *y) -{ - return strcmp(x, y); -} - -int -g_int_compare(const void *x, const void *y) -{ - if ( GPOINTER_TO_INT(x) < GPOINTER_TO_INT(y) ) - return -1; - else if ( GPOINTER_TO_INT(x) == GPOINTER_TO_INT(y) ) - return 0; - else - return -1; -} - -char * -e_strdup_strip(char *string) -{ - int i; - int length = 0; - int initial = 0; - for ( i = 0; string[i]; i++ ) { - if (initial == i && isspace(string[i])) { - initial ++; - } - if (!isspace(string[i])) { - length = i - initial + 1; - } - } - return g_strndup(string + initial, length); -} - -void -e_free_object_list (GList *list) -{ - GList *p; - - for (p = list; p != NULL; p = p->next) - gtk_object_unref (GTK_OBJECT (p->data)); - - g_list_free (list); -} - -void -e_free_string_list (GList *list) -{ - GList *p; - - for (p = list; p != NULL; p = p->next) - g_free (p->data); - - g_list_free (list); -} - -#define BUFF_SIZE 1024 - -char * -e_read_file(const char *filename) -{ - int fd; - char buffer[BUFF_SIZE]; - GList *list = NULL, *list_iterator; - GList *lengths = NULL, *lengths_iterator; - int length = 0; - int bytes; - char *ret_val; - - fd = open(filename, O_RDONLY); - if (fd == -1) - return NULL; - bytes = read(fd, buffer, BUFF_SIZE); - while (bytes) { - if (bytes > 0) { - list = g_list_prepend(list, g_strndup(buffer, bytes)); - lengths = g_list_prepend(lengths, GINT_TO_POINTER(bytes)); - length += bytes; - } else { - if (errno != EINTR) { - close(fd); - g_list_foreach(list, (GFunc) g_free, NULL); - g_list_free(list); - g_list_free(lengths); - return NULL; - } - } - bytes = read(fd, buffer, BUFF_SIZE); - } - ret_val = g_new(char, length + 1); - ret_val[length] = 0; - lengths_iterator = lengths; - list_iterator = list; - for ( ; list_iterator; list_iterator = list_iterator->next, lengths_iterator = lengths_iterator->next) { - int this_length = GPOINTER_TO_INT(lengths_iterator->data); - length -= this_length; - memcpy(ret_val + length, list_iterator->data, this_length); - } - close(fd); - g_list_foreach(list, (GFunc) g_free, NULL); - g_list_free(list); - g_list_free(lengths); - return ret_val; -} - -gint -e_write_file(const char *filename, const char *data, int flags) -{ - int fd; - int length = strlen(data); - int bytes; - fd = open(filename, flags, 0666); - if (fd == -1) - return errno; - while (length > 0) { - bytes = write(fd, data, length); - if (bytes > 0) { - length -= bytes; - data += bytes; - } else { - if (errno != EINTR && errno != EAGAIN) { - int save_errno = errno; - close(fd); - return save_errno; - } - } - } - close(fd); - return 0; -} diff --git a/e-util/e-util.c-8611 b/e-util/e-util.c-8611 deleted file mode 100644 index cac850b0d5..0000000000 --- a/e-util/e-util.c-8611 +++ /dev/null @@ -1,161 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * e-xml-utils.c - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include -#include -#include -#include -#include -#include - -#include "e-util.h" - -int -g_str_compare(const void *x, const void *y) -{ - return strcmp(x, y); -} - -int -g_int_compare(const void *x, const void *y) -{ - if ( GPOINTER_TO_INT(x) < GPOINTER_TO_INT(y) ) - return -1; - else if ( GPOINTER_TO_INT(x) == GPOINTER_TO_INT(y) ) - return 0; - else - return -1; -} - -char * -e_strdup_strip(char *string) -{ - int i; - int length = 0; - int initial = 0; - for ( i = 0; string[i]; i++ ) { - if (initial == i && isspace(string[i])) { - initial ++; - } - if (!isspace(string[i])) { - length = i - initial + 1; - } - } - return g_strndup(string + initial, length); -} - -void -e_free_object_list (GList *list) -{ - GList *p; - - for (p = list; p != NULL; p = p->next) - gtk_object_unref (GTK_OBJECT (p->data)); - - g_list_free (list); -} - -void -e_free_string_list (GList *list) -{ - GList *p; - - for (p = list; p != NULL; p = p->next) - g_free (p->data); - - g_list_free (list); -} - -#define BUFF_SIZE 1024 - -char * -e_read_file(const char *filename) -{ - int fd; - char buffer[BUFF_SIZE]; - GList *list = NULL, *list_iterator; - GList *lengths = NULL, *lengths_iterator; - int length = 0; - int bytes; - char *ret_val; - - fd = open(filename, O_RDONLY); - if (fd == -1) - return NULL; - bytes = read(fd, buffer, BUFF_SIZE); - while (bytes) { - if (bytes > 0) { - list = g_list_prepend(list, g_strndup(buffer, bytes)); - lengths = g_list_prepend(lengths, GINT_TO_POINTER(bytes)); - length += bytes; - } else { - if (errno != EINTR) { - close(fd); - g_list_foreach(list, (GFunc) g_free, NULL); - g_list_free(list); - g_list_free(lengths); - return NULL; - } - } - bytes = read(fd, buffer, BUFF_SIZE); - } - ret_val = g_new(char, length + 1); - ret_val[length] = 0; - lengths_iterator = lengths; - list_iterator = list; - for ( ; list_iterator; list_iterator = list_iterator->next, lengths_iterator = lengths_iterator->next) { - int this_length = GPOINTER_TO_INT(lengths_iterator->data); - length -= this_length; - memcpy(ret_val + length, list_iterator->data, this_length); - } - close(fd); - g_list_foreach(list, (GFunc) g_free, NULL); - g_list_free(list); - g_list_free(lengths); - return ret_val; -} - -gint -e_write_file(const char *filename, const char *data, int flags) -{ - int fd; - int length = strlen(data); - int bytes; - fd = open(filename, flags, 0666); - if (fd == -1) - return errno; - while (length > 0) { - bytes = write(fd, data, length); - if (bytes > 0) { - length -= bytes; - data += bytes; - } else { - if (errno != EINTR && errno != EAGAIN) { - int save_errno = errno; - close(fd); - return save_errno; - } - } - } - close(fd); - return 0; -} diff --git a/e-util/e-util.h b/e-util/e-util.h deleted file mode 100644 index 132c89e9a0..0000000000 --- a/e-util/e-util.h +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef _E_UTIL_H_ -#define _E_UTIL_H_ - -#include -#include - -#define E_MAKE_TYPE(l,str,t,ci,i,parent) \ -GtkType l##_get_type(void)\ -{\ - static GtkType type = 0;\ - if (!type){\ - GtkTypeInfo info = {\ - str,\ - sizeof (t),\ - sizeof (t##Class),\ - (GtkClassInitFunc) ci,\ - (GtkObjectInitFunc) i,\ - NULL, /* reserved 1 */\ - NULL, /* reserved 2 */\ - (GtkClassInitFunc) NULL\ - };\ - type = gtk_type_unique (parent, &info);\ - }\ - return type;\ -} - -typedef enum { - E_FOCUS_NONE, - E_FOCUS_CURRENT, - E_FOCUS_START, - E_FOCUS_END -} EFocus; - -int g_str_compare (const void *x, const void *y); -int g_int_compare (const void *x, const void *y); - -char *e_strdup_strip (char *string); - -void e_free_object_list (GList *list); -void e_free_string_list (GList *list); - -char *e_read_file (const char *filename); -gint e_write_file(const char *filename, const char *data, int flags); - -#endif /* _E_UTIL_H_ */ diff --git a/e-util/e-util.h-29002 b/e-util/e-util.h-29002 deleted file mode 100644 index 132c89e9a0..0000000000 --- a/e-util/e-util.h-29002 +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef _E_UTIL_H_ -#define _E_UTIL_H_ - -#include -#include - -#define E_MAKE_TYPE(l,str,t,ci,i,parent) \ -GtkType l##_get_type(void)\ -{\ - static GtkType type = 0;\ - if (!type){\ - GtkTypeInfo info = {\ - str,\ - sizeof (t),\ - sizeof (t##Class),\ - (GtkClassInitFunc) ci,\ - (GtkObjectInitFunc) i,\ - NULL, /* reserved 1 */\ - NULL, /* reserved 2 */\ - (GtkClassInitFunc) NULL\ - };\ - type = gtk_type_unique (parent, &info);\ - }\ - return type;\ -} - -typedef enum { - E_FOCUS_NONE, - E_FOCUS_CURRENT, - E_FOCUS_START, - E_FOCUS_END -} EFocus; - -int g_str_compare (const void *x, const void *y); -int g_int_compare (const void *x, const void *y); - -char *e_strdup_strip (char *string); - -void e_free_object_list (GList *list); -void e_free_string_list (GList *list); - -char *e_read_file (const char *filename); -gint e_write_file(const char *filename, const char *data, int flags); - -#endif /* _E_UTIL_H_ */ diff --git a/e-util/e-xml-utils.c b/e-util/e-xml-utils.c deleted file mode 100644 index 89f8591e8a..0000000000 --- a/e-util/e-xml-utils.c +++ /dev/null @@ -1,104 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * e-xml-utils.c - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include -#include "e-xml-utils.h" -#include -#include - - -xmlNode *e_xml_get_child_by_name(xmlNode *parent, const xmlChar *child_name) -{ - xmlNode *child; - - g_return_val_if_fail(parent != NULL, NULL); - g_return_val_if_fail(child_name != NULL, NULL); - - for (child = parent->childs; child; child = child->next) { - if ( !xmlStrcmp( child->name, child_name ) ) { - return child; - } - } - return NULL; -} - -/* Returns the first child with the name child_name and the "lang" - * attribute that matches the current LC_MESSAGES, or else, the first - * child with the name child_name and no "lang" attribute. - */ -xmlNode * -e_xml_get_child_by_name_by_lang(xmlNode *parent, const xmlChar *child_name, const char *lang) -{ - xmlNode *child; - /* This is the default version of the string. */ - xmlNode *C = NULL; - - g_return_val_if_fail(parent != NULL, NULL); - g_return_val_if_fail(child_name != NULL, NULL); - - if (lang == NULL) - lang = setlocale(LC_MESSAGES, NULL); - - for (child = parent->childs; child; child = child->next) { - if ( !xmlStrcmp( child->name, child_name ) ) { - char *this_lang = xmlGetProp(child, "lang"); - if ( this_lang == NULL ) { - C = child; - } - else if (!strcmp(this_lang, "lang")) - return child; - } - } - return C; -} - -int -e_xml_get_integer_prop_by_name(xmlNode *parent, const xmlChar *prop_name) -{ - xmlChar *prop; - int ret_val = 0; - - g_return_val_if_fail (parent != NULL, 0); - g_return_val_if_fail (prop_name != NULL, 0); - - prop = xmlGetProp(parent, prop_name); - if (prop) { - ret_val = atoi(prop); - xmlFree(prop); - } - return ret_val; -} - -void -e_xml_set_integer_prop_by_name(xmlNode *parent, const xmlChar *prop_name, int value) -{ - xmlChar *valuestr; - - g_return_if_fail (parent != NULL); - g_return_if_fail (prop_name != NULL); - - valuestr = g_strdup_printf("%d", value); - xmlSetProp(parent, prop_name, valuestr); - g_free (valuestr); -} - - diff --git a/e-util/e-xml-utils.c-56826 b/e-util/e-xml-utils.c-56826 deleted file mode 100644 index 89f8591e8a..0000000000 --- a/e-util/e-xml-utils.c-56826 +++ /dev/null @@ -1,104 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * e-xml-utils.c - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include -#include "e-xml-utils.h" -#include -#include - - -xmlNode *e_xml_get_child_by_name(xmlNode *parent, const xmlChar *child_name) -{ - xmlNode *child; - - g_return_val_if_fail(parent != NULL, NULL); - g_return_val_if_fail(child_name != NULL, NULL); - - for (child = parent->childs; child; child = child->next) { - if ( !xmlStrcmp( child->name, child_name ) ) { - return child; - } - } - return NULL; -} - -/* Returns the first child with the name child_name and the "lang" - * attribute that matches the current LC_MESSAGES, or else, the first - * child with the name child_name and no "lang" attribute. - */ -xmlNode * -e_xml_get_child_by_name_by_lang(xmlNode *parent, const xmlChar *child_name, const char *lang) -{ - xmlNode *child; - /* This is the default version of the string. */ - xmlNode *C = NULL; - - g_return_val_if_fail(parent != NULL, NULL); - g_return_val_if_fail(child_name != NULL, NULL); - - if (lang == NULL) - lang = setlocale(LC_MESSAGES, NULL); - - for (child = parent->childs; child; child = child->next) { - if ( !xmlStrcmp( child->name, child_name ) ) { - char *this_lang = xmlGetProp(child, "lang"); - if ( this_lang == NULL ) { - C = child; - } - else if (!strcmp(this_lang, "lang")) - return child; - } - } - return C; -} - -int -e_xml_get_integer_prop_by_name(xmlNode *parent, const xmlChar *prop_name) -{ - xmlChar *prop; - int ret_val = 0; - - g_return_val_if_fail (parent != NULL, 0); - g_return_val_if_fail (prop_name != NULL, 0); - - prop = xmlGetProp(parent, prop_name); - if (prop) { - ret_val = atoi(prop); - xmlFree(prop); - } - return ret_val; -} - -void -e_xml_set_integer_prop_by_name(xmlNode *parent, const xmlChar *prop_name, int value) -{ - xmlChar *valuestr; - - g_return_if_fail (parent != NULL); - g_return_if_fail (prop_name != NULL); - - valuestr = g_strdup_printf("%d", value); - xmlSetProp(parent, prop_name, valuestr); - g_free (valuestr); -} - - diff --git a/e-util/e-xml-utils.h b/e-util/e-xml-utils.h deleted file mode 100644 index 41b0f0b9d6..0000000000 --- a/e-util/e-xml-utils.h +++ /dev/null @@ -1,35 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * e-xml-utils.h - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef __E_XML_UTILS__ -#define __E_XML_UTILS__ - -#include -#include - -xmlNode *e_xml_get_child_by_name(xmlNode *parent, const xmlChar *child_name); -/* lang set to NULL means use the current locale. */ -xmlNode *e_xml_get_child_by_name_by_lang(xmlNode *parent, const xmlChar *child_name, const char *lang); -int e_xml_get_integer_prop_by_name(xmlNode *parent, const xmlChar *prop_name); -void e_xml_set_integer_prop_by_name(xmlNode *parent, const xmlChar *prop_name, int value); - -#endif /* __E_XML_UTILS__ */ diff --git a/e-util/e-xml-utils.h-82548 b/e-util/e-xml-utils.h-82548 deleted file mode 100644 index 41b0f0b9d6..0000000000 --- a/e-util/e-xml-utils.h-82548 +++ /dev/null @@ -1,35 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * e-xml-utils.h - * Copyright (C) 2000 Helix Code, Inc. - * Author: Chris Lahey - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef __E_XML_UTILS__ -#define __E_XML_UTILS__ - -#include -#include - -xmlNode *e_xml_get_child_by_name(xmlNode *parent, const xmlChar *child_name); -/* lang set to NULL means use the current locale. */ -xmlNode *e_xml_get_child_by_name_by_lang(xmlNode *parent, const xmlChar *child_name, const char *lang); -int e_xml_get_integer_prop_by_name(xmlNode *parent, const xmlChar *prop_name); -void e_xml_set_integer_prop_by_name(xmlNode *parent, const xmlChar *prop_name, int value); - -#endif /* __E_XML_UTILS__ */ diff --git a/e-util/ename/.cvsignore b/e-util/ename/.cvsignore deleted file mode 100644 index 4f8c173841..0000000000 --- a/e-util/ename/.cvsignore +++ /dev/null @@ -1,8 +0,0 @@ -.deps -.libs -Makefile -Makefile.in -*.lo -*.la -test-ename-western -test-ename-western-gtk diff --git a/e-util/ename/Makefile.am b/e-util/ename/Makefile.am deleted file mode 100644 index e30796574a..0000000000 --- a/e-util/ename/Makefile.am +++ /dev/null @@ -1,45 +0,0 @@ -INCLUDES = \ - -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \ - -DG_LOG_DOMAIN=\"EName\" \ - -I$(srcdir) \ - -I$(srcdir)/.. \ - -I$(top_srcdir) \ - -I. \ - -I.. \ - -I$(top_builddir) \ - -I$(includedir) \ - $(GNOME_INCLUDEDIR) - -gnome_libs = \ - $(BONOBO_GNOME_LIBS) \ - $(INTLLIBS) - -ename_libs = \ - libename.la \ - $(gnome_libs) - -lib_LTLIBRARIES = libename.la - -libename_la_SOURCES = \ - e-name-western.c - -libenameincludedir = $(includedir)/ename - -libenameinclude_HEADERS = \ - e-name-western-tables.h \ - e-name-western.h - - -noinst_PROGRAMS = \ - test-ename-western \ - test-ename-western-gtk - -test_ename_western_SOURCES = \ - test-ename-western.c - -test_ename_western_LDADD = $(ename_libs) - -test_ename_western_gtk_SOURCES = \ - test-ename-western-gtk.c - -test_ename_western_gtk_LDADD = $(ename_libs) $(gnome_libs) diff --git a/e-util/ename/TODO b/e-util/ename/TODO deleted file mode 100644 index 669661eea7..0000000000 --- a/e-util/ename/TODO +++ /dev/null @@ -1,2 +0,0 @@ -* Support other naming systems. -* Handle misspelled suffixes better. diff --git a/e-util/ename/e-name-western-tables.h b/e-util/ename/e-name-western-tables.h deleted file mode 100644 index 369d530edc..0000000000 --- a/e-util/ename/e-name-western-tables.h +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef __E_NAME_WESTERN_TABLES_H__ -#define __E_NAME_WESTERN_TABLES_H__ - -char *e_name_western_pfx_table[] = { - - /* - * English. - */ - "mister", "miss.", "mr.", "mrs.", "ms.", - "miss", "mr", "mrs", "ms", "sir", - "professor", "prof.", "dr", "dr.", "doctor", - "reverend", "president", "judge", "senator", - "congressman", "congresswoman", - - "the honorable", "the reverend", "his holiness", - "his eminence", - - - /* - * French. - */ - "monsieur", "mr.", "mademoiselle", "melle.", - "madame", "mme.", "professeur", - - /* - * Spanish. - */ - "senor", "senora", "senorita", - - NULL}; - -char *e_name_western_sfx_table[] = { - - /* - * English. - */ - "junior", "senior", "jr", "sr", "I", "II", "III", "IV", "V", - "phd", "ms", "md", "esq", "esq.", "esquire", - - NULL}; - -char *e_name_western_twopart_sfx_table[] = { - - /* - * English. - */ - "the first", "the second", "the third", - - NULL}; - -char *e_name_western_complex_last_table[] = {"van", "von", "de", NULL}; - -#endif /* ! __E_NAME_WESTERN_TABLES_H__ */ diff --git a/e-util/ename/e-name-western.c b/e-util/ename/e-name-western.c deleted file mode 100644 index 698cceec0b..0000000000 --- a/e-util/ename/e-name-western.c +++ /dev/null @@ -1,868 +0,0 @@ -/* - * A simple Western name parser. - * - * Jamie, do you know anything about name parsing? - * Are you going down that rat hole? Bring a flashlight. - * - * Author: - * Nat Friedman (nat@helixcode.com) - * - * Copyright 1999, Helix Code, Inc. - */ - -#include -#include -#include - -#include -#include - -typedef struct { - int prefix_idx; - int first_idx; - int middle_idx; - int nick_idx; - int last_idx; - int suffix_idx; -} ENameWesternIdxs; - -static int -e_name_western_str_count_words (char *str) -{ - int word_count; - char *p; - - word_count = 0; - - for (p = str; p != NULL; p = strchr (p, ' ')) { - word_count ++; - p ++; - } - - return word_count; -} - -static void -e_name_western_cleanup_string (char **str) -{ - char *newstr; - char *p; - - if (*str == NULL) - return; - - /* skip any spaces and commas at the start of the string */ - p = *str; - while (isspace (*p) || *p == ',') - p ++; - - /* make the copy we're going to return */ - newstr = g_strdup (p); - - if ( strlen(newstr) > 0) { - /* now search from the back, skipping over any spaces and commas */ - p = newstr + strlen (newstr) - 1; - while (isspace (*p) || *p == ',') - p --; - /* advance p to after the character that caused us to exit the - previous loop, and end the string. */ - if ((! isspace (*p)) && *p != ',') - p ++; - *p = '\0'; - } - - g_free (*str); - *str = newstr; -} - -static char * -e_name_western_get_words_at_idx (char *str, int idx, int num_words) -{ - char *words; - char *p; - int word_count; - int words_len; - - /* - * Walk to the end of the words. - */ - word_count = 0; - p = str + idx; - while (word_count < num_words && *p != '\0') { - while (! isspace (*p) && *p != '\0') - p ++; - - while (isspace (*p) && *p != '\0') - p ++; - - word_count ++; - } - - words_len = p - str - idx - 1; - - if (*p == '\0') - words_len ++; - - words = g_malloc0 (1 + words_len); - strncpy (words, str + idx, words_len); - - return words; -} - -/* - * What the fuck is wrong with glib's MAX macro. - */ -static int -e_name_western_max (const int a, const int b) -{ - if (a > b) - return a; - - return b; -} - -static gboolean -e_name_western_word_is_suffix (char *word) -{ - int i; - - for (i = 0; e_name_western_sfx_table [i] != NULL; i ++) { - if (g_strcasecmp (word, e_name_western_sfx_table [i])) - continue; - - return TRUE; - } - - return FALSE; -} - -static char * -e_name_western_get_one_prefix_at_str (char *str) -{ - char *word; - int i; - - /* - * Check for prefixes from our table. - */ - for (i = 0; e_name_western_pfx_table [i] != NULL; i ++) { - int pfx_words; - char *words; - - pfx_words = e_name_western_str_count_words (e_name_western_pfx_table [i]); - words = e_name_western_get_words_at_idx (str, 0, pfx_words); - - if (! g_strcasecmp (words, e_name_western_pfx_table [i])) - return words; - - g_free (words); - } - - /* - * Check for prefixes we don't know about. These are always a - * sequence of more than one letters followed by a period. - */ - word = e_name_western_get_words_at_idx (str, 0, 1); - - if (strlen (word) > 2 && isalpha (word [0]) && isalpha (word [1]) && - word [strlen (word) - 1] == '.') - return word; - - g_free (word); - - return NULL; -} - -static char * -e_name_western_get_prefix_at_str (char *str) -{ - char *pfx; - char *pfx1; - char *pfx2; - char *p; - - /* Get the first prefix. */ - pfx1 = e_name_western_get_one_prefix_at_str (str); - - if (pfx1 == NULL) - return NULL; - - /* Check for a second prefix. */ - p = str + strlen (pfx1); - while (isspace (*p) && *p != '\0') - p ++; - - pfx2 = e_name_western_get_one_prefix_at_str (p); - - if (pfx2 != NULL) { - int pfx_len; - - pfx_len = (p + strlen (pfx2)) - str; - pfx = g_malloc0 (pfx_len + 1); - strncpy (pfx, str, pfx_len); - } else { - pfx = g_strdup (pfx1); - } - - g_free (pfx1); - g_free (pfx2); - - return pfx; -} - -static void -e_name_western_extract_prefix (ENameWestern *name, ENameWesternIdxs *idxs) -{ - char *pfx; - - pfx = e_name_western_get_prefix_at_str (name->full); - - if (pfx == NULL) - return; - - idxs->prefix_idx = 0; - name->prefix = pfx; -} - -static gboolean -e_name_western_is_complex_last_beginning (char *word) -{ - int i; - - for (i = 0; e_name_western_complex_last_table [i] != NULL; i ++) { - - if (! g_strcasecmp ( - word, e_name_western_complex_last_table [i])) - return TRUE; - } - - return FALSE; -} - -static void -e_name_western_extract_first (ENameWestern *name, ENameWesternIdxs *idxs) -{ - /* - * If there's a prefix, then the first name is right after it. - */ - if (idxs->prefix_idx != -1) { - int first_idx; - char *p; - - first_idx = idxs->prefix_idx + strlen (name->prefix); - - /* Skip past white space. */ - p = name->full + first_idx; - while (isspace (*p) && *p != '\0') - p++; - - if (*p == '\0') - return; - - idxs->first_idx = p - name->full; - name->first = e_name_western_get_words_at_idx ( - name->full, idxs->first_idx, 1); - - } else { - - /* - * Otherwise, the first name is probably the first string. - */ - idxs->first_idx = 0; - name->first = e_name_western_get_words_at_idx ( - name->full, idxs->first_idx, 1); - } - - /* - * Check that we didn't just assign the beginning of a - * compound last name to the first name. - */ - if (name->first != NULL) { - if (e_name_western_is_complex_last_beginning (name->first)) { - g_free (name->first); - name->first = NULL; - idxs->first_idx = -1; - } - } -} - -static void -e_name_western_extract_middle (ENameWestern *name, ENameWesternIdxs *idxs) -{ - char *word; - int middle_idx; - - /* - * Middle names can only exist if you have a first name. - */ - if (idxs->first_idx == -1) - return; - - middle_idx = idxs->first_idx + strlen (name->first) + 1; - - if (middle_idx > strlen (name->full)) - return; - - /* - * Search for the first space (or the terminating \0) - */ - while (isspace (name->full [middle_idx]) && - name->full [middle_idx] != '\0') - middle_idx ++; - - if (name->full [middle_idx] == '\0') - return; - - /* - * Skip past the nickname, if it's there. - */ - if (name->full [middle_idx] == '\"') { - if (idxs->nick_idx == -1) - return; - - middle_idx = idxs->nick_idx + strlen (name->nick) + 1; - - while (isspace (name->full [middle_idx]) && - name->full [middle_idx] != '\0') - middle_idx ++; - - if (name->full [middle_idx] == '\0') - return; - } - - /* - * Make sure this isn't the beginning of a complex last name. - */ - word = e_name_western_get_words_at_idx (name->full, middle_idx, 1); - if (e_name_western_is_complex_last_beginning (word)) { - g_free (word); - return; - } - - /* - * Make sure this isn't a suffix. - */ - e_name_western_cleanup_string (& word); - if (e_name_western_word_is_suffix (word)) { - g_free (word); - return; - } - - /* - * Make sure we didn't just grab a cute nickname. - */ - if (word [0] == '\"') { - g_free (word); - return; - } - - idxs->middle_idx = middle_idx; - name->middle = word; -} - -static void -e_name_western_extract_nickname (ENameWestern *name, ENameWesternIdxs *idxs) -{ - int idx; - int start_idx; - char *str; - - if (idxs->first_idx == -1) - return; - - if (idxs->middle_idx > idxs->first_idx) - idx = idxs->middle_idx + strlen (name->middle); - else - idx = idxs->first_idx + strlen (name->first); - - while (name->full [idx] != '\"' && name->full [idx] != '\0') - idx ++; - - if (name->full [idx] != '\"') - return; - - start_idx = idx; - - /* - * Advance to the next double quote. - */ - idx ++; - - while (name->full [idx] != '\"' && name->full [idx] != '\0') - idx ++; - - if (name->full [idx] == '\0') - return; - - str = g_malloc0 (idx - start_idx + 2); - strncpy (str, name->full + start_idx, idx - start_idx + 1); - - name->nick = str; - idxs->nick_idx = start_idx; -} - -static int -e_name_western_last_get_max_idx (ENameWestern *name, ENameWesternIdxs *idxs) -{ - int max_idx = -1; - - if (name->prefix != NULL) - max_idx = e_name_western_max ( - max_idx, idxs->prefix_idx + strlen (name->prefix)); - - if (name->first != NULL) - max_idx = e_name_western_max ( - max_idx, idxs->first_idx + strlen (name->first)); - - if (name->middle != NULL) - max_idx = e_name_western_max ( - max_idx, idxs->middle_idx + strlen (name->middle)); - - if (name->nick != NULL) - max_idx = e_name_western_max ( - max_idx, idxs->nick_idx + strlen (name->nick)); - - return max_idx; -} - -static void -e_name_western_extract_last (ENameWestern *name, ENameWesternIdxs *idxs) -{ - char *word; - int idx = -1; - - idx = e_name_western_last_get_max_idx (name, idxs); - - /* - * In the case where there is no preceding name element, the - * name is either just a first name ("Nat", "John"), is a - * single-element name ("Cher", which we treat as a first - * name), or is just a last name. The only time we can - * differentiate a last name alone from a single-element name - * or a first name alone is if it's a complex last name ("de - * Icaza", "van Josephsen"). So if there is no preceding name - * element, we check to see whether or not the first part of - * the name is the beginning of a complex name. If it is, - * we subsume the entire string. If we accidentally subsume - * the suffix, this will get fixed in the fixup routine. - */ - if (idx == -1) { - word = e_name_western_get_words_at_idx (name->full, 0, 1); - if (! e_name_western_is_complex_last_beginning (word)) { - g_free (word); - return; - } - - name->last = g_strdup (name->full); - idxs->last_idx = 0; - return; - } - - /* Skip past the white space. */ - while (isspace (name->full [idx]) && name->full [idx] != '\0') - idx ++; - - if (name->full [idx] == '\0') - return; - - word = e_name_western_get_words_at_idx (name->full, idx, 1); - e_name_western_cleanup_string (& word); - if (e_name_western_word_is_suffix (word)) { - g_free (word); - return; - } - g_free (word); - - /* - * Subsume the rest of the string into the last name. If we - * accidentally include the prefix, it will get fixed later. - * This is the only way to handle things like "Miguel de Icaza - * Amozorrutia" without dropping data and forcing the user - * to retype it. - */ - name->last = g_strdup (name->full + idx); - idxs->last_idx = idx; -} - -static char * -e_name_western_get_preceding_word (char *str, int idx) -{ - int word_len; - char *word; - char *p; - - p = str + idx; - - while (isspace (*p) && p > str) - p --; - - while (! isspace (*p) && p > str) - p --; - - if (isspace (*p)) - p ++; - - word_len = (str + idx) - p; - word = g_malloc0 (word_len + 1); - if (word_len > 0) - strncpy (word, p, word_len); - - return word; -} - -static char * -e_name_western_get_suffix_at_str_end (char *str) -{ - char *suffix; - char *p; - - /* - * Walk backwards till we reach the beginning of the - * (potentially-comma-separated) list of suffixes. - */ - p = str + strlen (str); - while (1) { - char *nextp; - char *word; - - word = e_name_western_get_preceding_word (str, p - str); - nextp = p - strlen (word) - 1; - - e_name_western_cleanup_string (& word); - - if (e_name_western_word_is_suffix (word)) { - p = nextp; - g_free (word); - } else { - g_free (word); - break; - } - } - - if (p == (str + strlen (str))) - return NULL; - - suffix = g_strdup (p); - e_name_western_cleanup_string (& suffix); - - if (strlen (suffix) == 0) { - g_free (suffix); - return NULL; - } - - return suffix; -} - -static void -e_name_western_extract_suffix (ENameWestern *name, ENameWesternIdxs *idxs) -{ - - name->suffix = e_name_western_get_suffix_at_str_end (name->full); - - if (name->suffix == NULL) - return; - - idxs->suffix_idx = strlen (name->full) - strlen (name->suffix); -} - -static gboolean -e_name_western_detect_backwards (ENameWestern *name, ENameWesternIdxs *idxs) -{ - char *comma; - char *word; - - comma = strchr (name->full, ','); - - if (comma == NULL) - return FALSE; - - /* - * If there's a comma, we need to detect whether it's - * separating the last name from the first or just separating - * suffixes. So we grab the word which comes before the - * comma and check if it's a suffix. - */ - word = e_name_western_get_preceding_word (name->full, comma - name->full); - - if (e_name_western_word_is_suffix (word)) { - g_free (word); - return FALSE; - } - - g_free (word); - return TRUE; -} - -static void -e_name_western_reorder_asshole (ENameWestern *name, ENameWesternIdxs *idxs) -{ - char *prefix; - char *last; - char *suffix; - char *firstmidnick; - char *newfull; - - char *comma; - char *p; - - if (! e_name_western_detect_backwards (name, idxs)) - return; - - /* - * Convert - * , - * to - * - */ - - /* - * Grab the prefix from the beginning. - */ - prefix = e_name_western_get_prefix_at_str (name->full); - - /* - * Everything from the end of the prefix to the comma is the - * last name. - */ - comma = strchr (name->full, ','); - if (comma == NULL) - return; - - p = name->full + (prefix == NULL ? 0 : strlen (prefix)); - - while (isspace (*p) && *p != '\0') - p ++; - - last = g_malloc0 (comma - p + 1); - strncpy (last, p, comma - p); - - /* - * Get the suffix off the end. - */ - suffix = e_name_western_get_suffix_at_str_end (name->full); - - /* - * Firstmidnick is everything from the comma to the beginning - * of the suffix. - */ - p = comma + 1; - - while (isspace (*p) && *p != '\0') - p ++; - - if (suffix != NULL) { - char *q; - - /* - * Point q at the beginning of the suffix. - */ - q = name->full + strlen (name->full) - strlen (suffix) - 1; - - /* - * Walk backwards until we hit the space which - * separates the suffix from firstmidnick. - */ - while (! isspace (*q) && q > comma) - q --; - - if ((q - p + 1) > 0) { - firstmidnick = g_malloc0 (q - p + 1); - strncpy (firstmidnick, p, q - p); - } else - firstmidnick = NULL; - } else { - firstmidnick = g_strdup (p); - } - - /* - * Create our new reordered version of the name. - */ -#define NULLSTR(a) ((a) == NULL ? "" : (a)) - newfull = g_strdup_printf ("%s %s %s %s", NULLSTR (prefix), NULLSTR (firstmidnick), - NULLSTR (last), NULLSTR (suffix)); - g_strstrip (newfull); - g_free (name->full); - name->full = newfull; - - - g_free (prefix); - g_free (firstmidnick); - g_free (last); - g_free (suffix); -} - -static void -e_name_western_zap_nil (char **str, int *idx) -{ - if (*str == NULL) - return; - - if (strlen (*str) != 0) - return; - - *idx = -1; - g_free (*str); - *str = NULL; -} - -static void -e_name_western_fixup (ENameWestern *name, ENameWesternIdxs *idxs) -{ - /* - * The middle and last names cannot be the same. - */ - if (idxs->middle_idx != -1 && idxs->middle_idx == idxs->last_idx) { - idxs->middle_idx = -1; - g_free (name->middle); - name->middle = NULL; - } - - /* - * If we have a middle name and no last name, then we mistook - * the last name for the middle name. - */ - if (idxs->last_idx == -1 && idxs->middle_idx != -1) { - idxs->last_idx = idxs->middle_idx; - name->last = name->middle; - name->middle = NULL; - idxs->middle_idx = -1; - } - - /* - * Check to see if we accidentally included the suffix in the - * last name. - */ - if (idxs->suffix_idx != -1 && idxs->last_idx != -1 && - idxs->suffix_idx < (idxs->last_idx + strlen (name->last))) { - char *sfx; - - sfx = name->last + (idxs->suffix_idx - idxs->last_idx); - if (sfx != NULL) { - char *newlast; - char *p; - - p = sfx - 1; - while (isspace (*p) && p > name->last) - p --; - p ++; - - newlast = g_malloc0 (p - name->last + 1); - strncpy (newlast, name->last, p - name->last); - g_free (name->last); - name->last = newlast; - } - } - - /* - * If we have a prefix and a first name, but no last name, - * then we need to assign the first name to the last name. - * This way we get things like "Mr Friedman" correctly. - */ - if (idxs->first_idx != -1 && idxs->prefix_idx != -1 && - idxs->last_idx == -1) { - name->last = name->first; - idxs->last_idx = idxs->first_idx; - idxs->first_idx = -1; - name->first = NULL; - } - - /* - * Remove stray spaces and commas (although there don't seem - * to be any in the test cases, they might show up later). - */ - e_name_western_cleanup_string (& name->prefix); - e_name_western_cleanup_string (& name->first); - e_name_western_cleanup_string (& name->middle); - e_name_western_cleanup_string (& name->nick); - e_name_western_cleanup_string (& name->last); - e_name_western_cleanup_string (& name->suffix); - - /* - * Make zero-length strings just NULL. - */ - e_name_western_zap_nil (& name->prefix, & idxs->prefix_idx); - e_name_western_zap_nil (& name->first, & idxs->first_idx); - e_name_western_zap_nil (& name->middle, & idxs->middle_idx); - e_name_western_zap_nil (& name->nick, & idxs->nick_idx); - e_name_western_zap_nil (& name->last, & idxs->last_idx); - e_name_western_zap_nil (& name->suffix, & idxs->suffix_idx); -} - -/** - * e_name_western_western_parse_fullname: - * @full_name: A string containing a Western name. - * - * Parses @full_name and returns an #ENameWestern object filled with - * the component parts of the name. - */ -ENameWestern * -e_name_western_parse (const char *full_name) -{ - ENameWesternIdxs *idxs; - ENameWestern *wname; - - wname = g_new0 (ENameWestern, 1); - - wname->full = g_strdup (full_name); - - idxs = g_new0 (ENameWesternIdxs, 1); - - idxs->prefix_idx = -1; - idxs->first_idx = -1; - idxs->middle_idx = -1; - idxs->nick_idx = -1; - idxs->last_idx = -1; - idxs->suffix_idx = -1; - - /* - * An extremely simple algorithm. - * - * The goal here is to get it right 95% of the time for - * Western names. - * - * First we check to see if this is an ass-backwards name - * ("Prefix Last, First Middle Suffix"). These names really - * suck (imagine "Dr von Johnson, Albert Roderick Jr"), so - * we reorder them first and then parse them. - * - * Next, we grab the most obvious assignments for the various - * parts of the name. Once this is done, we check for stupid - * errors and fix them up. - */ - e_name_western_reorder_asshole (wname, idxs); - - e_name_western_extract_prefix (wname, idxs); - e_name_western_extract_first (wname, idxs); - e_name_western_extract_nickname (wname, idxs); - e_name_western_extract_middle (wname, idxs); - e_name_western_extract_last (wname, idxs); - e_name_western_extract_suffix (wname, idxs); - - e_name_western_fixup (wname, idxs); - - g_free (idxs); - - return wname; -} - -/** - * e_name_western_free: - * @name: An ENameWestern object which needs to be freed. - * - * Deep-frees @name - */ -void -e_name_western_free (ENameWestern *w) -{ - - g_free (w->prefix); - g_free (w->first); - g_free (w->middle); - g_free (w->nick); - g_free (w->last); - g_free (w->suffix); - - g_free (w->full); - - g_free (w); -} diff --git a/e-util/ename/e-name-western.h b/e-util/ename/e-name-western.h deleted file mode 100644 index fa5bac494c..0000000000 --- a/e-util/ename/e-name-western.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef __E_NAME_WESTERN_H__ -#define __E_NAME_WESTERN_H__ - -typedef struct { - - /* Public */ - char *prefix; - char *first; - char *middle; - char *nick; - char *last; - char *suffix; - - /* Private */ - char *full; -} ENameWestern; - -ENameWestern *e_name_western_parse (const char *full_name); -void e_name_western_free (ENameWestern *w); - -#endif /* ! __E_NAME_WESTERN_H__ */ diff --git a/e-util/ename/test-ename-western-gtk.c b/e-util/ename/test-ename-western-gtk.c deleted file mode 100644 index 17daf42b30..0000000000 --- a/e-util/ename/test-ename-western-gtk.c +++ /dev/null @@ -1,148 +0,0 @@ -#include -#include - -ENameWestern *name; -GtkWidget *full; -GtkWidget *prefix; -GtkWidget *first; -GtkWidget *middle; -GtkWidget *nick; -GtkWidget *last; -GtkWidget *suffix; - -static void -fill_entries (void) -{ - -#define SET(a,b) (gtk_entry_set_text (GTK_ENTRY (a), (b) == NULL ? "" : (b))) - SET(prefix, name->prefix); - SET(first, name->first); - SET(middle, name->middle); - SET(nick, name->nick); - SET(last, name->last); - SET(suffix, name->suffix); -} - -static void -full_changed_cb (GtkEntry *fulle) -{ - e_name_western_free (name); - name = e_name_western_parse (gtk_entry_get_text (fulle)); - fill_entries (); -} - -static void -create_window (void) -{ - GtkWidget *app; - GtkTable *table; - - GtkWidget *prefix_label; - GtkWidget *first_label; - GtkWidget *middle_label; - GtkWidget *nick_label; - GtkWidget *last_label; - GtkWidget *suffix_label; - - app = gnome_app_new ("test", "Evolution Western Name Parser"); - - table = GTK_TABLE (gtk_table_new (3, 6, FALSE)); - - full = gtk_entry_new (); - prefix = gtk_entry_new (); - first = gtk_entry_new (); - middle = gtk_entry_new (); - nick = gtk_entry_new (); - last = gtk_entry_new (); - suffix = gtk_entry_new (); - - gtk_widget_set_usize (prefix, 100, 0); - gtk_widget_set_usize (first, 100, 0); - gtk_widget_set_usize (middle, 100, 0); - gtk_widget_set_usize (nick, 100, 0); - gtk_widget_set_usize (last, 100, 0); - gtk_widget_set_usize (suffix, 100, 0); - - gtk_table_attach (table, full, 0, 6, 0, 1, - GTK_EXPAND | GTK_FILL, 0, - 0, 0); - - gtk_table_attach (table, prefix, 0, 1, 1, 2, - GTK_EXPAND | GTK_FILL | GTK_SHRINK, 0, - 0, 0); - - gtk_table_attach (table, first, 1, 2, 1, 2, - GTK_EXPAND | GTK_FILL | GTK_SHRINK, 0, - 0, 0); - - gtk_table_attach (table, middle, 2, 3, 1, 2, - GTK_EXPAND | GTK_FILL | GTK_SHRINK, 0, - 0, 0); - - gtk_table_attach (table, nick, 3, 4, 1, 2, - GTK_EXPAND | GTK_FILL | GTK_SHRINK, 0, - 0, 0); - - gtk_table_attach (table, last, 4, 5, 1, 2, - GTK_EXPAND | GTK_FILL | GTK_SHRINK, 0, - 0, 0); - - gtk_table_attach (table, suffix, 5, 6, 1, 2, - GTK_EXPAND | GTK_FILL | GTK_SHRINK, 0, - 0, 0); - - prefix_label = gtk_label_new ("Prefix"); - first_label = gtk_label_new ("First"); - middle_label = gtk_label_new ("Middle"); - nick_label = gtk_label_new ("Nick"); - last_label = gtk_label_new ("Last"); - suffix_label = gtk_label_new ("Suffix"); - - gtk_table_attach (table, prefix_label, 0, 1, 2, 3, - GTK_SHRINK, 0, - 0, 0); - - gtk_table_attach (table, first_label, 1, 2, 2, 3, - GTK_SHRINK, 0, - 0, 0); - - gtk_table_attach (table, middle_label, 2, 3, 2, 3, - GTK_SHRINK, 0, - 0, 0); - - gtk_table_attach (table, nick_label, 3, 4, 2, 3, - GTK_SHRINK, 0, - 0, 0); - - gtk_table_attach (table, last_label, 4, 5, 2, 3, - GTK_SHRINK, 0, - 0, 0); - - gtk_table_attach (table, suffix_label, 5, 6, 2, 3, - GTK_SHRINK, 0, - 0, 0); - - gnome_app_set_contents (GNOME_APP (app), GTK_WIDGET (table)); - - gtk_widget_show_all (app); - - gtk_entry_set_text (GTK_ENTRY (full), - "The Honorable Doctor van Jacobsen, Albert Roderick \"The Clenched Fist\" Jr, MD, PhD, Esquire"); - - name = e_name_western_parse ("The Honorable Doctor van Jacobsen, Albert Roderick \"The Clenched Fist\" Jr, MD, PhD, Esquire"); - fill_entries (); - - gtk_signal_connect (GTK_OBJECT (full), "changed", full_changed_cb, NULL); -} - -int -main (int argc, char **argv) -{ - gnome_init ("Test EName", "Test EName", argc, argv); - - create_window (); - - gtk_main (); - - return 0; -} diff --git a/e-util/ename/test-ename-western.c b/e-util/ename/test-ename-western.c deleted file mode 100644 index 6d3beaf16f..0000000000 --- a/e-util/ename/test-ename-western.c +++ /dev/null @@ -1,70 +0,0 @@ -#include -#include - -#include - -static void -do_name (char *n) -{ - ENameWestern *wname; - - wname = e_name_western_parse (n); - - printf ("Full Name: [%s]\n", n); - - printf ("Prefix: [%s]\n", wname->prefix); - printf ("First: [%s]\n", wname->first); - printf ("Middle: [%s]\n", wname->middle); - printf ("Nick: [%s]\n", wname->nick); - printf ("Last: [%s]\n", wname->last); - printf ("Suffix: [%s]\n", wname->suffix); - - printf ("\n"); - - e_name_western_free (wname); -} - -int -main (int argc, char **argv) -{ - if (argc == 2) { - while (! feof (stdin)) { - char s[256]; - - if (fgets (s, sizeof (s), stdin) == NULL) - return 0; - - g_strstrip (s); - - do_name (s); - } - - return 0; - } - - do_name ("Nat"); - do_name ("Karl Anders Carlsson"); - do_name ("Miguel de Icaza Amozorrutia"); - do_name ("The Honorable Doctor de Icaza, Miguel \"Sparky\" Junior, PhD, MD"); - do_name ("Nat Friedman MD, Phd"); - do_name ("Nat Friedman PhD"); - do_name ("Friedman, Nat"); - do_name ("Miguel de Icaza Esquire"); - do_name ("Dr Miguel \"Sparky\" de Icaza"); - do_name ("Robert H.B. Netzer"); - do_name ("W. Richard Stevens"); - do_name ("Nat Friedman"); - do_name ("N. Friedman"); - do_name ("Miguel de Icaza"); - do_name ("Drew Johnson"); - do_name ("President Bill \"Slick Willy\" Clinton"); - do_name ("The Honorable Mark J. Einstein Jr"); - do_name ("Friedman, Nat"); - do_name ("de Icaza, Miguel"); - do_name ("Mr de Icaza, Miguel"); - do_name ("Smith, John Jr"); - do_name ("Nick Glennie-Smith"); - do_name ("Dr von Johnson, Albert Roderick Jr"); - - return 0; -} diff --git a/evolution.spec.in b/evolution.spec.in deleted file mode 100644 index 38f8d855f9..0000000000 --- a/evolution.spec.in +++ /dev/null @@ -1,124 +0,0 @@ -# Note this is NOT a relocatable thing :) -%define name evolution -%define ver @VERSION@ -%define RELEASE 1 -%define rel %{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:%RELEASE} -%define prefix /usr -%define sysconfdir /etc - -Name: %name -Summary: Integrated GNOME mail client, calendar and address book. -Version: %ver -Release: %rel -Copyright: GPL -Group: System Environment/Libraries -Source: %{name}-%{ver}.tar.gz -URL: http://www.gnome.org/ -BuildRoot: /var/tmp/%{name}-%{ver}-root -Docdir: %{prefix}/doc - -%description - -%package devel -Summary: Libraries and include files for developing Evolution components -Group: Development/Libraries -Requires: %name = %{PACKAGE_VERSION} -Obsoletes: %{name}-devel - -%description devel -This package provides the necessary development libraries and include -files to allow you to develop evolution components. - -%changelog -* Sun May 21 2000 Ross Golder -- created spec file - -%prep -%setup - -%build -%ifarch alpha - MYARCH_FLAGS="--host=alpha-redhat-linux" -%endif - -LC_ALL="" -LINGUAS="" -LANG="" -export LC_ALL LINGUAS LANG - -CFLAGS="$RPM_OPT_FLAGS" ./configure $MYARCH_FLAGS --prefix=%{prefix} \ - --sysconfdir=%{sysconfdir} - -if [ "$SMP" != "" ]; then - (make "MAKE=make -k -j $SMP"; exit 0) - make -else - make -fi - -%install -[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT - -make prefix=$RPM_BUILD_ROOT%{prefix} sysconfdir=$RPM_BUILD_ROOT%{sysconfdir} install - -for FILE in "$RPM_BUILD_ROOT/bin/*"; do - file "$FILE" | grep -q not\ stripped && strip $FILE -done - -%clean -[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT - -%post -if ! grep %{prefix}/lib /etc/ld.so.conf > /dev/null ; then - echo "%{prefix}/lib" >> /etc/ld.so.conf -fi - -/sbin/ldconfig - -%postun -p /sbin/ldconfig - -%files -%defattr(0555, bin, bin) - -%doc AUTHORS COPYING ChangeLog NEWS README -%{prefix}/bin/evolution -%{prefix}/bin/evolution-mail -%{prefix}/bin/evolution-addressbook -%{prefix}/bin/evolution-calendar -%{prefix}/bin/wombat -%{prefix}/bin/killev -%{prefix}/lib/lib*.so.* -%{prefix}/lib/evolution/camel-providers/*/lib*.so.* -#%{prefix}/lib/evolution/camel-providers/*/*.url -%{prefix}/share/evolution/default_user/local/* - -%defattr(0644, bin, bin) -%{prefix}/share/evolution/glade/*.glade -%{prefix}/share/evolution/filtertypes.xml -%{prefix}/share/evolution/default_user/shortcuts.xml - -%defattr (0444, bin, bin) -%{prefix}/share/locale/*/LC_MESSAGES/* -%{prefix}/share/gnome/help/gnomecal/* -%{prefix}/share/images/evolution/*.png -%{sysconfdir}/CORBA/servers/* - -%files devel - -%defattr(0555, bin, bin) -%{prefix}/lib/*.a -%{prefix}/lib/*.so -%{prefix}/lib/*.la -%{prefix}/lib/evolution/camel-providers/*/*.a -%{prefix}/lib/evolution/camel-providers/*/*.so -%{prefix}/lib/evolution/camel-providers/*/*.la - -%defattr(0444, bin, bin) -%{prefix}/include/*.h -%{prefix}/include/camel/*.h -%{prefix}/include/composer/*.h -%{prefix}/include/ename/*.h -%{prefix}/include/evolution/ebook/*.h -%{prefix}/include/evolution/cal-util/*.h -%{prefix}/include/evolution/cal-client/*.h -%{prefix}/share/idl/*.idl diff --git a/filter/.cvsignore b/filter/.cvsignore deleted file mode 100644 index 7c13af9a14..0000000000 --- a/filter/.cvsignore +++ /dev/null @@ -1,9 +0,0 @@ -*.la -*.lo -.libs -.deps -.pure -Makefile -Makefile.in -filter-driver -filter-editor diff --git a/filter/ChangeLog b/filter/ChangeLog deleted file mode 100644 index cb9562d284..0000000000 --- a/filter/ChangeLog +++ /dev/null @@ -1,229 +0,0 @@ -2000-05-27 Not Zed - - * vfoldertypes.xml: New file - lists rules appropriate for - vfolders (no actions, etc). - - * Makefile.am (EXTRA_DIST): Add vfoldertypes.xml - - * filter-driver.c (filter_driver_expand_option): Made public from - expand_filter_option. - (filter_driver_rule_count): find out how many user rules are - defined. - (filter_driver_rule_get): Get a user rule by index. - -2000-05-21 Ettore Perazzoli - - * filter-druid.c: Don't pass an empty URL to `gtk_html_begin()' - anymore. - - * filter-arg-types.c: Updated for the new GtkHTML API which uses - `GtkHTMLStream *' instead of `GtkHTMLStreamHandle'. - * filter-arg.c: Likewise. - * filter-arg.h: Likewise. - * filter-druid.c: Likewise. - - * filter-format.c: Likewise. - * filter-format.h: Likewise. - -2000-05-18 Dan Winship - - * filter-driver.c (filter_driver_run): update for - camel_folder_get_uids change - -2000-05-17 NotZed - - * filter-druid.c: Fix some html formatting. - -2000-05-16 NotZed - - * filter-driver.c (filter_driver_run): Delete all processed - messages. This is probably going to slow it down a bit. - (filter_driver_run): Close folders before destroying them *sigh*. - (open_folder): Actually open the folder. Doh. - - * filtertypes.xml: Initial filter rules. - - * filter-xml.c (filter_write_optionset): Save the description - also. - (write_description): Routine to save description - only saves 1 - node of description. - - * filter-arg.c (filter_arg_edit_clicked): Dont free edata here, - let the destroy do it(?) - - * filter-editor.c (main): Simple driver program for testing, so i - can fix all this really broken code *sigh* - -2000-05-15 NotZed - - * filter-editor.c (filter_editor_set_rule_files): filename based - interface. - (filter_editor_save_rules): Interface to save the options to a - filename. - - * filter-xml.[ch]: Bunch of cleanup. - - * filter-xml.c (filter_*_file): New interfaces to read/write files - directly, rather than messing with xmldoc crap. - - * Makefile.am: Removed filter-driver test program, now just part - of libfilter. - - * filter-driver.c: Made an object, with an api and everything, can - apply a filter to a given mailbox. - -2000-05-10 Christopher James Lahey - - * filter-arg.h: Changed tree.h to gnome-xml/tree.h. - - * Makefile.am: Added filter-arg-types.h, filter-arg.h, - filter-xml.h, filter-format.h, filter-druid.h, filter-editor.h. - -2000-05-02 Matt Loper - - * Makefile.am: set G_LOG_DOMAIN. - -2000-05-01 NotZed - - * filter-driver.c (main): Fix for api. - -2000-04-30 Dan Winship - - * filter-driver.c (start): Remove no-longer-necessary call to - camel_provider_register_as_module. - -2000-04-25 Ettore Perazzoli - - * Makefile.am (INCLUDES): Use `$(GTKHTML_CFLAGS)'. - -2000-04-20 NotZed - - * filter-driver.c: Removed a bunch of crappy unrequired headers. - - * Makefile.am (filter_driver_LDADD): Added libibex back again. - -2000-04-18 Dan Winship - - * filter-driver.c: remove unused camel-log.h include - -2000-04-12 Matt Loper - - * filter-arg.c (filter_arg_edit_value): Return a value. - -2000-03-27 NotZed - - * filter-xml.c (tokenise_xmlfreeprop): Free a prop after - tokenising it. - (find_node_attr): Free the prop after using it. - (load_desc): Ditto. I use free() because xmlFree() is nowhere to - be found. - (filter_load_optionset): Ditto. - - * filter-arg-types.c (arg_address_values_add_xml): free() xml - stuff, plugs a leak. - (arg_folder_values_add_xml): Ditto. - -2000-03-22 NotZed - - * filter-driver.c (main): Changed to use async search api. - -2000-03-04 NotZed - - * filter-druid.c (html_write_options): Output 'and' bits between - the rules. - - * filter-driver.c (main): Actually implement filtering, at least, - from Inbox. Copy messages to folder (in the same store only, so - far), delete, and stop processing are implemented, and the logic - to handle default processing. - - * filter-xml.c (load_optionvalue): Fix up a bug where we lost the - name of the arg (ouch). - * filter-xml.c: Wrapped printf's in debug macros. - -2000-03-02 NotZed - - * filter-druid.c (object_destroy): Disconnect the list signal, so - we dont get spurious emits during destroy. - (arg_changed): Callback to update filter arg asynchronously. - (arg_link_clicked): Edit the value non-modally. - - * filter-arg.c (filter_arg_edit_values_1): Changed to use - non-modal interface. - -2000-03-01 Ettore Perazzoli - - * Makefile.am: New file. - - * Makefile: Removed. I wonder why we are using plain Makefiles - instead of automake Makefiles at all. - -2000-02-29 NotZed - - * filter-driver.c (main): Remove gui code, this will be actual - filtering code. - - * Makefile: Added filter-editor to the library. - - * filter-editor.c (main): Comment out, make it a proper library. - -2000-02-28 NotZed - - * filter-druid.c: Removed unused header. - - * Makefile: Removed references to filter-sexp.[ch]. - - * filter-sexp.[ch]: Removed some unecessary includes. Moved to - e-util. Renamed callers. - -2000-02-24 NotZed - - * filter-xml.c (filter_description_free): - (filter_load_ruleset_free): - (filter_load_optionset_free): Functions for memory management. - - * filter-arg.c (filter_arg_copy): Copy the values of one arg into - another. - - * filter-editor.c: New widget, a dialogue which uses filter-druid - to present the various editing views. - (druid_dialogue_clicked): On finish, save the user's new filter - definition where it came from. - - * filter-druid.c: Changed to just being a notebook with no tabs, - rather than a full druid (no next/prev/etc buttons). - (option_name_changed): Update the option's description as the user - enters it in. - -2000-02-22 NotZed - - * filter-xml.c (filter_clone_optionrule): - (filter_clone_optionrule_free): - (filter_optionrule_new_from_rule): New utility functions for - working with the internal rule format. - - * filter-arg.[ch]: Added new callbacks for editing a single value, - and a new editor which shows all items in a list, and allows you - to edit them via the single-edit method. This needs some cleanup - for some unused/unusable virtual methods (edit_values, - write_html?). - - * Makefile: Add the druid for build. - - * filter-druid.c: A 'druid' widget for editing a single filter - rule. - -2000-02-21 Matt Loper - - * .cvsignore: New file. - -2000-02-18 NotZed - - * blank/check.xpm: Added forgotten files. - - * Uh, more changes, lots, its still work in progress. - -2000-02-14 NotZed - - * Initial import. - diff --git a/filter/Makefile.am b/filter/Makefile.am deleted file mode 100644 index b6369253ac..0000000000 --- a/filter/Makefile.am +++ /dev/null @@ -1,37 +0,0 @@ -INCLUDES = \ - -I $(top_srcdir) \ - -I $(top_srcdir)/libibex \ - -I $(top_srcdir)/camel \ - -I $(top_srcdir)/e-util \ - -I $(top_srcdir)/camel/providers/mbox \ - -I $(GNOME_INCLUDEDIR) \ - $(GTKHTML_CFLAGS) \ - -DG_LOG_DOMAIN=\"filter\" -## - -noinst_LTLIBRARIES = \ - libfilter.la - -libfilter_la_SOURCES = \ - filter-arg-types.c \ - filter-arg-types.h \ - filter-arg.c \ - filter-arg.h \ - filter-xml.c \ - filter-xml.h \ - filter-format.c \ - filter-format.h \ - filter-druid.c \ - filter-druid.h \ - filter-editor.c \ - filter-editor.h \ - filter-driver.c \ - filter-driver.h - -EXTRA_DIST = blank.xpm check.xpm \ - filtertypes.xml vfoldertypes.xml - -# basic rules. -filterdir = $(prefix)/share/evolution -filter_DATA = filtertypes.xml vfoldertypes.xml - diff --git a/filter/blank.xpm b/filter/blank.xpm deleted file mode 100755 index 499f7a04fc..0000000000 --- a/filter/blank.xpm +++ /dev/null @@ -1,22 +0,0 @@ -/* XPM */ -static char * blank_xpm[] = { -"16 16 3 1", -" c None", -". c #000000", -"+ c #FFFFFF", -" ", -" .............. ", -" .++++++++++++. ", -" .++++++++++++. ", -" .++++++++++++. ", -" .++++++++++++. ", -" .++++++++++++. ", -" .++++++++++++. ", -" .++++++++++++. ", -" .++++++++++++. ", -" .++++++++++++. ", -" .++++++++++++. ", -" .++++++++++++. ", -" .++++++++++++. ", -" .............. ", -" "}; diff --git a/filter/check.xpm b/filter/check.xpm deleted file mode 100755 index 74f9b56122..0000000000 --- a/filter/check.xpm +++ /dev/null @@ -1,22 +0,0 @@ -/* XPM */ -static char * check_xpm[] = { -"16 16 3 1", -" c None", -". c #000000", -"+ c #FFFFFF", -" ", -" .............. ", -" .++++++++++++. ", -" .++++++++++++. ", -" .+++++++++.++. ", -" .++++++++..++. ", -" .+++++++...++. ", -" .++.+++...+++. ", -" .++..+...++++. ", -" .++.....+++++. ", -" .+++...++++++. ", -" .++++.+++++++. ", -" .++++++++++++. ", -" .++++++++++++. ", -" .............. ", -" "}; diff --git a/filter/filter-arg-types.c b/filter/filter-arg-types.c deleted file mode 100644 index fd0bb32248..0000000000 --- a/filter/filter-arg-types.c +++ /dev/null @@ -1,753 +0,0 @@ -/* - * Copyright (C) 2000 Helix Code Inc. - * - * Authors: Michael Zucchi - * - * Implementations of the filter-arg types. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public License - * as published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include - -#include "filter-arg-types.h" - - -/* ********************************************************************** */ -/* String */ -/* ********************************************************************** */ - -/* Use for a superclass of any items which are simple strings */ - -static void filter_arg_string_class_init (FilterArgStringClass *class); -static void filter_arg_string_init (FilterArgString *gspaper); - -static FilterArg *string_parent_class; - -guint -filter_arg_string_get_type (void) -{ - static guint type = 0; - - if (!type) { - GtkTypeInfo type_info = { - "FilterArgString", - sizeof (FilterArgString), - sizeof (FilterArgStringClass), - (GtkClassInitFunc) filter_arg_string_class_init, - (GtkObjectInitFunc) filter_arg_string_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL - }; - - type = gtk_type_unique (filter_arg_get_type (), &type_info); - } - - return type; -} - -static void -arg_string_write_html(FilterArg *argin, GtkHTML *html, GtkHTMLStream *stream) -{ - FilterArgString *arg = (FilterArgString *)argin; - /* empty */ -} - -static void -arg_string_write_text(FilterArg *argin, GString *string) -{ - FilterArgString *arg = (FilterArgString *)argin; - GList *l; - char *a; - - l = argin->values; - if (l == NULL) { - g_string_append(string, "folder"); - } - while (l) { - a = l->data; - g_string_append(string, a); - if (l->next) { - g_string_append(string, ", "); - } - l = g_list_next(l); - } -} - -static void -arg_string_edit_values(FilterArg *arg) -{ - printf("edit string values!\n"); -} - -/* pop up a dialogue, asking for a new string value */ -static int -arg_string_edit_value(FilterArg *arg, int index) -{ - GnomeDialog *dialogue; - GtkHBox *hbox; - GtkLabel *label; - GtkEntry *entry; - char *text = NULL; - char *newtext; - - dialogue = (GnomeDialog *)gnome_dialog_new("Edit value", "Ok", "Cancel", 0); - - hbox = (GtkHBox *)gtk_hbox_new(FALSE, 0); - label = (GtkLabel *)gtk_label_new("Folder name"); - gtk_box_pack_start((GtkBox *)hbox, (GtkWidget *)label, FALSE, FALSE, 0); - entry = (GtkEntry *)gtk_entry_new(); - gtk_box_pack_start((GtkBox *)hbox, (GtkWidget *)entry, TRUE, TRUE, 0); - if (index>=0) { - text = filter_arg_get_value(arg, index); - } - if (text) { - gtk_entry_set_text(entry, text); - } - gtk_box_pack_start((GtkBox *)dialogue->vbox, (GtkWidget *)hbox, TRUE, TRUE, 0); - gtk_widget_show_all((GtkWidget *)hbox); - gtk_object_ref((GtkObject *)entry); /* so we can get the text back afterwards */ - if (gnome_dialog_run_and_close(dialogue) == 0) { - GList *node; - - newtext = g_strdup(gtk_entry_get_text(entry)); - gtk_object_unref((GtkObject *)entry); - if (index>=0 - && (node = g_list_find(arg->values, text))) { - node->data = newtext; - } else { - arg->values = g_list_append(arg->values, newtext); - } - g_free(text); - return g_list_index(arg->values, newtext); - } - return -1; -} - -static xmlNodePtr -arg_string_values_get_xml(FilterArg *argin) -{ - xmlNodePtr value; - FilterArgString *arg = (FilterArgString *)argin; - GList *l; - char *a; - - value = xmlNewNode(NULL, "optionvalue"); - xmlSetProp(value, "name", argin->name); - - l = argin->values; - while (l) { - xmlNodePtr cur; - - a = l->data; - - cur = xmlNewChild(value, NULL, "folder", NULL); - if (a) - xmlSetProp(cur, "folder", a); - l = g_list_next(l); - } - - return value; -} - -static void -arg_string_values_add_xml(FilterArg *arg, xmlNodePtr node) -{ - xmlNodePtr n; - - n = node->childs; - while (n) { - if (!strcmp(n->name, "folder")) { - filter_arg_string_add(arg, xmlGetProp(n, "folder")); - } else { - g_warning("Loading folders from xml, wrong node encountered: %s\n", n->name); - } - n = n->next; - } -} - -static char * -arg_string_get_value_as_string(FilterArg *argin, void *data) -{ - FilterArgString *arg = (FilterArgString *)argin; - char *a = (char *)data; - - return a; -} - -static void -arg_string_free_value(FilterArg *arg, void *a) -{ - g_free(a); -} - -static void -filter_arg_string_class_init (FilterArgStringClass *class) -{ - GtkObjectClass *object_class; - - object_class = (GtkObjectClass *) class; - if (string_parent_class == NULL) - string_parent_class = gtk_type_class (gtk_object_get_type ()); - - class->parent_class.write_html = arg_string_write_html; - class->parent_class.write_text = arg_string_write_text; - class->parent_class.edit_values = arg_string_edit_values; - class->parent_class.edit_value = arg_string_edit_value; - class->parent_class.free_value = arg_string_free_value; - class->parent_class.get_value_as_string = arg_string_get_value_as_string; - - class->parent_class.values_get_xml = arg_string_values_get_xml; - class->parent_class.values_add_xml = arg_string_values_add_xml; -} - -static void -filter_arg_string_init (FilterArgString *arg) -{ - arg->arg.values = NULL; -} - -/** - * filter_arg_string_new: - * - * Create a new FilterArgString widget. - * - * Return value: A new FilterArgString widget. - **/ -FilterArg * -filter_arg_string_new (char *name) -{ - FilterArg *a = FILTER_ARG ( gtk_type_new (filter_arg_string_get_type ())); - a->name = g_strdup(name); - return a; -} - - -void -filter_arg_string_add(FilterArg *arg, char *name) -{ - filter_arg_add(arg, g_strdup(name)); -} - -void -filter_arg_string_remove(FilterArg *arg, char *name) -{ - /* do it */ -} - - -/* ********************************************************************** */ -/* Address */ -/* ********************************************************************** */ - -static void filter_arg_address_class_init (FilterArgAddressClass *class); -static void filter_arg_address_init (FilterArgAddress *gspaper); - -static FilterArg *parent_class; - -guint -filter_arg_address_get_type (void) -{ - static guint type = 0; - - if (!type) { - GtkTypeInfo type_info = { - "FilterArgAddress", - sizeof (FilterArgAddress), - sizeof (FilterArgAddressClass), - (GtkClassInitFunc) filter_arg_address_class_init, - (GtkObjectInitFunc) filter_arg_address_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL - }; - - type = gtk_type_unique (filter_arg_get_type (), &type_info); - } - - return type; -} - -static void -arg_address_write_html(FilterArg *argin, GtkHTML *html, GtkHTMLStream *stream) -{ - FilterArgAddress *arg = (FilterArgAddress *)argin; - /* empty */ -} - -static void -arg_address_write_text(FilterArg *argin, GString *string) -{ - FilterArgAddress *arg = (FilterArgAddress *)argin; - GList *l; - struct filter_arg_address *a; - - l = argin->values; - if (l == NULL) { - g_string_append(string, "email address"); - } - while (l) { - a = l->data; - g_string_append(string, a->name); - if (l->next) { - g_string_append(string, ", "); - } - l = g_list_next(l); - } -} - -static void -arg_address_edit_values(FilterArg *arg) -{ - printf("edit it!\n"); -} - -static int -arg_address_edit_value(FilterArg *arg, int index) -{ - GnomeDialog *dialogue; - GtkHBox *hbox; - GtkLabel *label; - GtkEntry *entry; - char *text = NULL; - char *newtext; - struct filter_arg_address *ad; - - dialogue = (GnomeDialog *)gnome_dialog_new("Edit value", "Ok", "Cancel", 0); - - hbox = (GtkHBox *)gtk_hbox_new(FALSE, 0); - label = (GtkLabel *)gtk_label_new("Folder name"); - gtk_box_pack_start((GtkBox *)hbox, (GtkWidget *)label, FALSE, FALSE, 0); - entry = (GtkEntry *)gtk_entry_new(); - gtk_box_pack_start((GtkBox *)hbox, (GtkWidget *)entry, TRUE, TRUE, 0); - if (index>=0 - && (ad = filter_arg_get_value(arg, index))) { - text = ad->email; - } - if (text) { - gtk_entry_set_text(entry, text); - } - gtk_box_pack_start((GtkBox *)dialogue->vbox, (GtkWidget *)hbox, TRUE, TRUE, 0); - gtk_widget_show_all((GtkWidget *)hbox); - gtk_object_ref((GtkObject *)entry); /* so we can get the text back afterwards */ - if (gnome_dialog_run_and_close(dialogue) == 0) { - GList *node; - - newtext = g_strdup(gtk_entry_get_text(entry)); - gtk_object_unref((GtkObject *)entry); - if (index>=0 - && (node = g_list_find(arg->values, text))) { - ad = node->data; - ad->email = newtext; - } else { - ad = g_malloc0(sizeof(*ad)); - ad->email = newtext; - arg->values = g_list_append(arg->values, ad); - } - g_free(text); - return g_list_index(arg->values, ad); - } - return -1; -} - -static xmlNodePtr -arg_address_values_get_xml(FilterArg *argin) -{ - xmlNodePtr value; - FilterArgAddress *arg = (FilterArgAddress *)argin; - GList *l; - struct filter_arg_address *a; - - /* hmm, perhaps this overhead should be in FilterArg, and this function just returns the base node?? */ - value = xmlNewNode(NULL, "optionvalue"); - xmlSetProp(value, "name", argin->name); - - l = argin->values; - while (l) { - xmlNodePtr cur; - - a = l->data; - - cur = xmlNewChild(value, NULL, "address", NULL); - if (a->name) - xmlSetProp(cur, "name", a->name); - if (a->email) - xmlSetProp(cur, "email", a->email); - l = g_list_next(l); - } - - return value; -} - -static void -arg_address_values_add_xml(FilterArg *arg, xmlNodePtr node) -{ - xmlNodePtr n; - - n = node->childs; - while (n) { - if (!strcmp(n->name, "address")) { - char *nm, *e; - nm = xmlGetProp(n, "name"); - e = xmlGetProp(n, "email"); - filter_arg_address_add(arg, nm, e); - free(nm); - free(e); - } else { - g_warning("Loading address from xml, wrong node encountered: %s\n", n->name); - } - n = n->next; - } -} - -/* the search string is just the raw email address */ -static char * -arg_address_get_value_as_string(FilterArg *argin, void *data) -{ - FilterArgAddress *arg = (FilterArgAddress *)argin; - struct filter_arg_address *a = (struct filter_arg_address *)data; - - printf("geting address as string : %s %s\n", a->email, a->name); - - if (a->email == NULL - || a->email[0] == '\0') { - if (a->name == NULL - || a->name[0] == '\0') - return ""; - return a->name; - } else - return a->email; -} - -static void -arg_address_free_value(FilterArg *arg, struct filter_arg_address *a) -{ - g_free(a->name); - g_free(a->email); - g_free(a); -} - -static void -filter_arg_address_class_init (FilterArgAddressClass *class) -{ - GtkObjectClass *object_class; - - object_class = (GtkObjectClass *) class; - if (parent_class == NULL) - parent_class = gtk_type_class (gtk_object_get_type ()); - - class->parent_class.write_html = arg_address_write_html; - class->parent_class.write_text = arg_address_write_text; - class->parent_class.edit_values= arg_address_edit_values; - class->parent_class.edit_value= arg_address_edit_value; - class->parent_class.free_value = arg_address_free_value; - - class->parent_class.values_get_xml = arg_address_values_get_xml; - class->parent_class.values_add_xml = arg_address_values_add_xml; - - class->parent_class.get_value_as_string = arg_address_get_value_as_string; -} - -static void -filter_arg_address_init (FilterArgAddress *arg) -{ -} - -/** - * filter_arg_address_new: - * - * Create a new FilterArgAddress widget. - * - * Return value: A new FilterArgAddress widget. - **/ -FilterArg * -filter_arg_address_new (char *name) -{ - FilterArg *a = FILTER_ARG ( gtk_type_new (filter_arg_address_get_type ())); - a->name = g_strdup(name); - return a; -} - -void -filter_arg_address_add(FilterArg *arg, char *name, char *email) -{ - struct filter_arg_address *a; - - a = g_malloc0(sizeof(*a)); - - a->name = g_strdup(name); - a->email = g_strdup(email); - - filter_arg_add(arg, a); -} - -void -filter_arg_address_remove(FilterArg *arg, char *name, char *email) -{ - -} - -/* ********************************************************************** */ -/* Folder */ -/* ********************************************************************** */ - - -static void filter_arg_folder_class_init (FilterArgFolderClass *class); -static void filter_arg_folder_init (FilterArgFolder *gspaper); - -static FilterArg *folder_parent_class; - -guint -filter_arg_folder_get_type (void) -{ - static guint type = 0; - - if (!type) { - GtkTypeInfo type_info = { - "FilterArgFolder", - sizeof (FilterArgFolder), - sizeof (FilterArgFolderClass), - (GtkClassInitFunc) filter_arg_folder_class_init, - (GtkObjectInitFunc) filter_arg_folder_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL - }; - - type = gtk_type_unique (filter_arg_string_get_type (), &type_info); - } - - return type; -} - -static void -arg_folder_write_html(FilterArg *argin, GtkHTML *html, GtkHTMLStream *stream) -{ - FilterArgFolder *arg = (FilterArgFolder *)argin; - /* empty */ -} - -static void -arg_folder_write_text(FilterArg *argin, GString *string) -{ - FilterArgFolder *arg = (FilterArgFolder *)argin; - GList *l; - char *a; - - l = argin->values; - if (l == NULL) { - g_string_append(string, "folder"); - } - while (l) { - a = l->data; - g_string_append(string, a); - if (l->next) { - g_string_append(string, ", "); - } - l = g_list_next(l); - } -} - -static void -arg_folder_edit_values(FilterArg *argin) -{ - FilterArgFolder *arg = (FilterArgFolder *)argin; - GList *l; - char *a, *start, *ptr, *ptrend, *ptrgap; - char outbuf[128], *outptr; /* FIXME: dont use a bounded buffer! */ - GString *string = g_string_new(""); - GtkWidget *dialogue; - GtkWidget *text; - - dialogue = gnome_dialog_new("Edit addresses", - "Ok", "Cancel", NULL); - text = gtk_text_new(NULL, NULL); - gtk_object_ref((GtkObject *)text); - - l = argin->values; - while (l) { - a = l->data; - gtk_text_insert(text, NULL, NULL, NULL, a, strlen(a)); - gtk_text_insert(text, NULL, NULL, NULL, "\n", 1); - l = g_list_next(l); - } - - gtk_box_pack_start(GNOME_DIALOG(dialogue)->vbox, text, TRUE, TRUE, 2); - gtk_widget_show(text); - gtk_text_set_editable(text, 1); - - gnome_dialog_run_and_close(dialogue); - - /* FIXME: free current values */ - argin->values = NULL; - ptr = GTK_TEXT(text)->text.ch; - ptrend = ptr+GTK_TEXT(text)->text_end; - ptrgap = ptr+GTK_TEXT(text)->gap_position; - - start = ptr; - outptr = outbuf; - while (ptr0) { - new = g_malloc(len+1); - new[len]=0; - memcpy(new, outbuf, len); - printf("(appending '%s')", new); - argin->values = g_list_append(argin->values, new); - } - outptr = outbuf; - } else { - *outptr++ = *ptr; - } - ptr++; - if (ptr==ptrgap) { - ptr += GTK_TEXT(text)->gap_size; - } - } - if (outptr>outbuf) { - int len = outptr-outbuf; - char *new; - - printf("(lastlen = %d)", len); - - new = g_malloc(len+1); - new[len]=0; - memcpy(new, start, len); - argin->values = g_list_append(argin->values, new); - } - printf("\n"); -} - -static xmlNodePtr -arg_folder_values_get_xml(FilterArg *argin) -{ - xmlNodePtr value; - FilterArgFolder *arg = (FilterArgFolder *)argin; - GList *l; - char *a; - - value = xmlNewNode(NULL, "optionvalue"); - xmlSetProp(value, "name", argin->name); - - l = argin->values; - while (l) { - xmlNodePtr cur; - - a = l->data; - - cur = xmlNewChild(value, NULL, "folder", NULL); - if (a) - xmlSetProp(cur, "name", a); - l = g_list_next(l); - } - - return value; -} - -static void -arg_folder_values_add_xml(FilterArg *arg, xmlNodePtr node) -{ - xmlNodePtr n; - - printf("adding folder values ...\n"); - - n = node->childs; - while (n) { - if (!strcmp(n->name, "folder")) { - char *name = xmlGetProp(n, "name"); - if (name) { - filter_arg_folder_add(arg, name); - free(name); - } else - g_warning("no xml prop 'name' on '%s'\n", n->name); - } else { - g_warning("Loading folders from xml, wrong node encountered: %s\n", n->name); - } - n = n->next; - } -} - -static char * -arg_folder_get_value_as_string(FilterArg *argin, void *data) -{ - FilterArgFolder *arg = (FilterArgFolder *)argin; - char *a = (char *)data; - - return a; -} - -static void -arg_folder_free_value(FilterArg *arg, void *a) -{ - g_free(a); -} - -static void -filter_arg_folder_class_init (FilterArgFolderClass *class) -{ - GtkObjectClass *object_class; - FilterArgClass *filter_class; - - object_class = (GtkObjectClass *) class; - filter_class = (FilterArgClass *) class; - if (folder_parent_class == NULL) - folder_parent_class = gtk_type_class (filter_arg_string_get_type ()); - - /* FIXME: only need to over-ride the edit values right? */ - filter_class->write_html = arg_folder_write_html; - filter_class->write_text = arg_folder_write_text; - filter_class->edit_values = arg_folder_edit_values; - filter_class->free_value = arg_folder_free_value; - - filter_class->values_get_xml = arg_folder_values_get_xml; - filter_class->values_add_xml = arg_folder_values_add_xml; -} - -static void -filter_arg_folder_init (FilterArgFolder *arg) -{ -} - -/** - * filter_arg_folder_new: - * - * Create a new FilterArgFolder widget. - * - * Return value: A new FilterArgFolder widget. - **/ -FilterArg * -filter_arg_folder_new (char *name) -{ - FilterArg *a = FILTER_ARG ( gtk_type_new (filter_arg_folder_get_type ())); - a->name = g_strdup(name); - return a; -} - - -void -filter_arg_folder_add(FilterArg *arg, char *name) -{ - filter_arg_add(arg, g_strdup(name)); -} - -void -filter_arg_folder_remove(FilterArg *arg, char *name) -{ - /* do it */ -} diff --git a/filter/filter-arg-types.h b/filter/filter-arg-types.h deleted file mode 100644 index 6a1d80bfae..0000000000 --- a/filter/filter-arg-types.h +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (C) 2000 Helix Code Inc. - * - * Authors: Michael Zucchi - * - * Implementations of the filter-args. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public License - * as published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef _FILTER_ARG_TYPES_H -#define _FILTER_ARG_TYPES_H - -#include "filter-arg.h" - -/* An Address */ -#define FILTER_ARG_ADDRESS(obj) GTK_CHECK_CAST (obj, filter_arg_address_get_type (), FilterArgAddress) -#define FILTER_ARG_ADDRESS_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, filter_arg_address_get_type (), FilterArgAddressClass) -#define IS_FILTER_ARG_ADDRESS(obj) GTK_CHECK_TYPE (obj, filter_arg_address_get_type ()) - -typedef struct _FilterArgAddress FilterArgAddress; -typedef struct _FilterArgAddressClass FilterArgAddressClass; - -struct _FilterArgAddress { - FilterArg arg; -}; - -struct _FilterArgAddressClass { - FilterArgClass parent_class; -}; - -struct filter_arg_address { - char *name; - char *email; -}; - -guint filter_arg_address_get_type (void); -FilterArg *filter_arg_address_new (char *name); -void filter_arg_address_add(FilterArg *, char *name, char *email); -void filter_arg_address_remove(FilterArg *, char *name, char *email); - -/* A simple String */ -#define FILTER_ARG_STRING(obj) GTK_CHECK_CAST (obj, filter_arg_string_get_type (), FilterArgString) -#define FILTER_ARG_STRING_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, filter_arg_string_get_type (), FilterArgStringClass) -#define IS_FILTER_ARG_STRING(obj) GTK_CHECK_TYPE (obj, filter_arg_string_get_type ()) - -typedef struct _FilterArgString FilterArgString; -typedef struct _FilterArgStringClass FilterArgStringClass; - -struct _FilterArgString { - FilterArg arg; - - /* Name/property to save/load to xml */ - /* char *xmlname; */ - /* char *xmlprop; */ -}; - -struct _FilterArgStringClass { - FilterArgClass parent_class; -}; - -guint filter_arg_string_get_type (void); -FilterArg *filter_arg_string_new (char *name); -void filter_arg_string_add(FilterArg *, char *name); -void filter_arg_string_remove(FilterArg *, char *name); - -/* A Folder, subclass of a string */ -#define FILTER_ARG_FOLDER(obj) GTK_CHECK_CAST (obj, filter_arg_folder_get_type (), FilterArgFolder) -#define FILTER_ARG_FOLDER_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, filter_arg_folder_get_type (), FilterArgFolderClass) -#define IS_FILTER_ARG_FOLDER(obj) GTK_CHECK_TYPE (obj, filter_arg_folder_get_type ()) - -typedef struct _FilterArgFolder FilterArgFolder; -typedef struct _FilterArgFolderClass FilterArgFolderClass; - -struct _FilterArgFolder { - FilterArgString arg; -}; - -struct _FilterArgFolderClass { - FilterArgStringClass parent_class; -}; - -guint filter_arg_folder_get_type (void); -FilterArg *filter_arg_folder_new (char *name); -void filter_arg_folder_add(FilterArg *, char *name); -void filter_arg_folder_remove(FilterArg *, char *name); - -#endif /* ! _FILTER_ARG_TYPES_H */ - diff --git a/filter/filter-arg.c b/filter/filter-arg.c deleted file mode 100644 index ece10efbba..0000000000 --- a/filter/filter-arg.c +++ /dev/null @@ -1,563 +0,0 @@ -/* - * Copyright (C) 2000 Helix Code Inc. - * - * Authors: Michael Zucchi - * - * Abstract filter argument class. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public License - * as published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include - -#include "filter-arg.h" - - -static void filter_arg_class_init (FilterArgClass *class); -static void filter_arg_init (FilterArg *gspaper); - -#define _PRIVATE(x) (((FilterArg *)(x))->priv) - -struct _FilterArgPrivate { - GtkWidget *dialogue; /* editor widget */ - xmlNodePtr *oldargs; -}; - -static GtkObjectClass *parent_class; - -enum { - CHANGED, - LAST_SIGNAL -}; - -static guint signals[LAST_SIGNAL] = { 0 }; - -guint -filter_arg_get_type (void) -{ - static guint type = 0; - - if (!type) { - GtkTypeInfo type_info = { - "FilterArg", - sizeof (FilterArg), - sizeof (FilterArgClass), - (GtkClassInitFunc) filter_arg_class_init, - (GtkObjectInitFunc) filter_arg_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL - }; - - type = gtk_type_unique (gtk_object_get_type (), &type_info); - } - - return type; -} - -static FilterArg * -clone_default(FilterArg *a) -{ - xmlNodePtr values; - FilterArg *new = FILTER_ARG ( gtk_type_new (((GtkObject *)a)->klass->type) ); - - /* clone values */ - new->name = g_strdup(a->name); - values = filter_arg_values_get_xml(a); - filter_arg_values_add_xml(new, values); - xmlFreeNodeList(values); - - return new; -} - -static void -write_html_nothing(FilterArg *arg, GtkHTML *html, GtkHTMLStream *stream) -{ - /* empty */ -} - -static void -write_text_nothing(FilterArg *arg, GString *string) -{ - /* empty */ -} - -static void -edit_values_nothing(FilterArg *arg) -{ - /* empty */ -} - -static void * -edit_value_nothing(FilterArg *arg, void *v) -{ - return v; -} - -static void -free_value_nothing(FilterArg *arg, void *v) -{ - /* empty */ -} - -static gint -compare_pointers(gpointer a, gpointer b) -{ - return a==b; -} - -static void -filter_arg_class_init (FilterArgClass *class) -{ - GtkObjectClass *object_class; - - object_class = (GtkObjectClass *) class; - parent_class = gtk_type_class (gtk_object_get_type ()); - - class->write_html = write_html_nothing; - class->write_text = write_text_nothing; - class->edit_values = edit_values_nothing; - class->edit_value = edit_value_nothing; - class->free_value = free_value_nothing; - class->clone = clone_default; - - signals[CHANGED] = - gtk_signal_new ("changed", - GTK_RUN_LAST, - object_class->type, - GTK_SIGNAL_OFFSET (FilterArgClass, changed), - gtk_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); - gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); -} - -static void -filter_arg_init (FilterArg *arg) -{ - arg->values = NULL; - arg->priv = g_malloc0(sizeof(*arg->priv)); -} - -/** - * filter_arg_new: - * - * Create a new FilterArg widget. - * - * Return value: A new FilterArg widget. - **/ -FilterArg * -filter_arg_new (char *name) -{ - FilterArg *a = FILTER_ARG ( gtk_type_new (filter_arg_get_type ())); - if (name) - a->name = g_strdup(name); - return a; -} - -FilterArg * -filter_arg_clone (FilterArg *arg) -{ - return ((FilterArgClass *)(arg->object.klass))->clone(arg); -} - -void -filter_arg_copy(FilterArg *dst, FilterArg *src) -{ - xmlNodePtr values; - - g_return_if_fail( ((GtkObject *)src)->klass->type == ((GtkObject *)dst)->klass->type ); - - /* remove old values */ - while (dst->values) { - filter_arg_remove(dst, dst->values->data); - } - - /* clone values */ - values = filter_arg_values_get_xml(src); - filter_arg_values_add_xml(dst, values); - xmlFreeNodeList(values); -} - -void -filter_arg_add(FilterArg *arg, void *v) -{ - g_return_if_fail(v != NULL); - - arg->values = g_list_append(arg->values, v); - gtk_signal_emit(GTK_OBJECT(arg), signals[CHANGED]); -} - -void -filter_arg_remove(FilterArg *arg, void *v) -{ - arg->values = g_list_remove(arg->values, v); - ((FilterArgClass *)(arg->object.klass))->free_value(arg, v); - gtk_signal_emit(GTK_OBJECT(arg), signals[CHANGED]); -} - - -void -filter_arg_write_html(FilterArg *arg, GtkHTML *html, GtkHTMLStream *stream) -{ - ((FilterArgClass *)(arg->object.klass))->write_html(arg, html, stream); -} -void -filter_arg_write_text(FilterArg *arg, GString *string) -{ - int count, i; - - count = filter_arg_get_count(arg); - for (i=0;i1) { - g_string_append(string, "or "); - } - } - -#if 0 - ((FilterArgClass *)(arg->object.klass))->write_text(arg, string); -#endif -} -void -filter_arg_edit_values(FilterArg *arg) -{ - void filter_arg_edit_values_1(FilterArg *arg); - - g_return_if_fail(arg != NULL); - - -#if 1 - filter_arg_edit_values_1(arg); -#else - - if (((FilterArgClass *)(arg->object.klass))->edit_values) - ((FilterArgClass *)(arg->object.klass))->edit_values(arg); - else - g_warning("No implementation of virtual method edit_values"); -#endif -} - -int -filter_arg_edit_value(FilterArg *arg, int index) -{ - return ((FilterArgClass *)(arg->object.klass))->edit_value(arg, index); -} - -xmlNodePtr -filter_arg_values_get_xml(FilterArg *arg) -{ - return ((FilterArgClass *)(arg->object.klass))->values_get_xml(arg); -} -void -filter_arg_values_add_xml(FilterArg *arg, xmlNodePtr node) -{ - ((FilterArgClass *)(arg->object.klass))->values_add_xml(arg, node); -} - -/* returns the number of args in the arg list */ -int -filter_arg_get_count(FilterArg *arg) -{ - int count=0; - GList *l; - - for (l = arg->values;l;l=g_list_next(l)) - count++; - return count; -} - -void * -filter_arg_get_value(FilterArg *arg, int index) -{ - int count=0; - GList *l; - - for (l = arg->values;l && countdata; - return NULL; -} - -char * -filter_arg_get_value_as_string(FilterArg *arg, int index) -{ - int count=0; - GList *l; - void *data; - - data = filter_arg_get_value(arg, index); - if (data) { - return ((FilterArgClass *)(arg->object.klass))->get_value_as_string(arg, data); - } else { - return ""; - } -} - - -struct filter_arg_edit { - FilterArg *arg; - GtkList *list; - GList *items; - GnomeDialog *dialogue; - GtkWidget *add, *remove, *edit; - GtkWidget *item_current; -}; - -static void -filter_arg_edit_add(GtkWidget *w, struct filter_arg_edit *edata) -{ - GtkListItem *listitem; - GList *items = NULL; - int i; - - printf("adding new item\n"); - - printf("editing ...\n"); - - i = filter_arg_edit_value(edata->arg, -1); - if (i>=0) { - gtk_list_remove_items_no_unref(edata->list, edata->items); - listitem = (GtkListItem *)gtk_list_item_new_with_label(filter_arg_get_value_as_string(edata->arg, i)); - gtk_object_set_data((GtkObject *)listitem, "arg_i", filter_arg_get_value(edata->arg, i)); - edata->items = g_list_append(edata->items, listitem); - gtk_widget_show((GtkWidget *)listitem); - - /* this api is nonsense */ - gtk_list_append_items(edata->list, g_list_copy(edata->items)); - } -} - -void dump_list(GList *list) -{ - printf("dumping list:\n"); - for (;list;list = g_list_next(list)) { - printf(" %p %p\n", list, list->data); - } -} - -static void -fill_list(struct filter_arg_edit *edata) -{ - GList *items = NULL; - int i, count; - GtkListItem *listitem; - - gtk_list_remove_items(edata->list, edata->items); - g_list_free(edata->items); - - count = filter_arg_get_count(edata->arg); - for (i=0;iarg, i); - listitem = (GtkListItem *)gtk_list_item_new_with_label(labeltext); - gtk_object_set_data((GtkObject *)listitem, "arg_i", filter_arg_get_value(edata->arg, i)); - items = g_list_append(items, listitem); - gtk_widget_show(GTK_WIDGET(listitem)); - printf("adding item %d\n", i); - } - - printf("items re-added\n"); - - edata->item_current = NULL; - edata->items = items; - - gtk_list_append_items(edata->list, g_list_copy(edata->items)); -} - -static void -filter_arg_edit_edit(GtkWidget *w, struct filter_arg_edit *edata) -{ - char *name; - int i; - - /* yurck */ - if (edata->item_current - && (name = gtk_object_get_data((GtkObject *)edata->item_current, "arg_i")) - && (i = g_list_index(edata->arg->values, name)) >= 0 - && (i = filter_arg_edit_value(edata->arg, i)) >= 0) { - - fill_list(edata); - } -} - -static void -filter_arg_edit_delete(GtkWidget *w, struct filter_arg_edit *edata) -{ - GtkListItem *listitem; - char *name; - - /* yurck */ - if (edata->item_current - && (name = gtk_object_get_data((GtkObject *)edata->item_current, "arg_i"))) { - filter_arg_remove(edata->arg, name); - fill_list(edata); - } -} - -static void -edit_sensitise(struct filter_arg_edit *edata) -{ - int state = edata->item_current != NULL; - gtk_widget_set_sensitive(edata->remove, state); - gtk_widget_set_sensitive(edata->edit, state); -} - -static void -filter_arg_edit_select(GtkWidget *w, GtkListItem *list, struct filter_arg_edit *edata) -{ - edata->item_current = list; - edit_sensitise(edata); - - printf ("node = %p\n", g_list_find(edata->items, edata->item_current)); -} - -static void -filter_arg_edit_unselect(GtkWidget *w, GtkListItem *list, struct filter_arg_edit *edata) -{ - edata->item_current = NULL; - edit_sensitise(edata); -} - -static void -filter_arg_edit_clicked(GnomeDialog *d, int button, struct filter_arg_edit *edata) -{ - struct _FilterArgPrivate *p = _PRIVATE(edata->arg); - - printf("window finished\n"); - if (button==0) { - gtk_signal_emit(GTK_OBJECT(edata->arg), signals[CHANGED]); - } else { - /* cancel button, restore old values ... */ - printf("cancel button\n"); - while (edata->arg->values) { - filter_arg_remove(edata->arg, edata->arg->values->data); - } - filter_arg_values_add_xml(edata->arg, p->oldargs); - } - xmlFreeNodeList(p->oldargs); - p->oldargs = NULL; - p->dialogue = NULL; - gnome_dialog_close(d); -} - -static void -filter_arg_edit_destroy(GnomeDialog *d, struct filter_arg_edit *edata) -{ - struct _FilterArgPrivate *p = _PRIVATE(edata->arg); - - if (p->oldargs) { - while (edata->arg->values) { - filter_arg_remove(edata->arg, edata->arg->values->data); - } - filter_arg_values_add_xml(edata->arg, p->oldargs); - xmlFreeNodeList(p->oldargs); - p->oldargs = NULL; - } - - if (p->dialogue) { - p->dialogue = NULL; - gnome_dialog_close(d); - } - g_free(edata); -} - -void -filter_arg_edit_values_1(FilterArg *arg) -{ - GList *vales; - GtkList *list; - GtkListItem *listitem; - int count, i; - GnomeDialog *dialogue; - GtkHBox *hbox; - GtkVBox *vbox; - GtkWidget *button; - GtkWidget *scrolled_window, *frame; - struct filter_arg_edit * edata; - struct _FilterArgPrivate *p = _PRIVATE(arg); - - /* dont show more than 1 editor for each type */ - if (p->dialogue) { - gdk_window_raise(GTK_WIDGET(p->dialogue)->window); - return; - } - - /* copy the current state */ - p->oldargs= filter_arg_values_get_xml(arg); - - edata = g_malloc0(sizeof(*edata)); - edata->item_current = NULL; - edata->arg = arg; - - dialogue = (GnomeDialog *)gnome_dialog_new("Edit values", "Ok", "Cancel", 0); - edata->dialogue = dialogue; - - p->dialogue = dialogue; - - hbox = (GtkHBox *)gtk_hbox_new(FALSE, 0); - - list = (GtkList *)gtk_list_new(); - edata->list = list; - edata->items = NULL; - fill_list(edata); - - scrolled_window = gtk_scrolled_window_new(NULL, NULL); - frame = gtk_frame_new("Option values"); - - gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrolled_window), (GtkWidget *)list); - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); - gtk_container_set_focus_vadjustment(GTK_CONTAINER (list), gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (scrolled_window))); - gtk_container_add(GTK_CONTAINER(frame), scrolled_window); - gtk_widget_set_usize(frame, 200, 300); - gtk_box_pack_start((GtkBox *)hbox, frame, TRUE, TRUE, 0); - - /* buttons */ - vbox = (GtkVBox *)gtk_vbox_new(FALSE, 0); - - button = gtk_button_new_with_label ("Add"); - gtk_box_pack_start((GtkBox *)vbox, button, FALSE, TRUE, 0); - edata->add = button; - button = gtk_button_new_with_label ("Remove"); - gtk_box_pack_start((GtkBox *)vbox, button, FALSE, TRUE, 0); - edata->remove = button; - button = gtk_button_new_with_label ("Edit"); - gtk_box_pack_start((GtkBox *)vbox, button, FALSE, TRUE, 0); - edata->edit = button; - - gtk_box_pack_start((GtkBox *)hbox, (GtkWidget *)vbox, FALSE, FALSE, 0); - - gtk_signal_connect((GtkObject *)edata->add, "clicked", filter_arg_edit_add, edata); - gtk_signal_connect((GtkObject *)edata->edit, "clicked", filter_arg_edit_edit, edata); - gtk_signal_connect((GtkObject *)edata->remove, "clicked", filter_arg_edit_delete, edata); - gtk_signal_connect((GtkObject *)edata->list, "select_child", filter_arg_edit_select, edata); - gtk_signal_connect((GtkObject *)edata->list, "unselect_child", filter_arg_edit_unselect, edata); - - gtk_widget_show(GTK_WIDGET(list)); - gtk_widget_show_all(GTK_WIDGET(hbox)); - gtk_box_pack_start((GtkBox *)dialogue->vbox, (GtkWidget *)hbox, TRUE, TRUE, 0); - - gtk_signal_connect((GtkObject *)dialogue, "clicked", filter_arg_edit_clicked, edata); - gtk_signal_connect((GtkObject *)dialogue, "destroy", filter_arg_edit_destroy, edata); - - edit_sensitise(edata); - - gtk_widget_show(dialogue); -} - - diff --git a/filter/filter-arg.h b/filter/filter-arg.h deleted file mode 100644 index 7790123569..0000000000 --- a/filter/filter-arg.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (C) 2000 Helix Code Inc. - * - * Authors: Michael Zucchi - * - * Abstract class to hold filter arguments. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public License - * as published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef _FILTER_ARG_H -#define _FILTER_ARG_H - -#include -#include -#include /* gnome-xml */ - -#define FILTER_ARG(obj) GTK_CHECK_CAST (obj, filter_arg_get_type (), FilterArg) -#define FILTER_ARG_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, filter_arg_get_type (), FilterArgClass) -#define IS_FILTER_ARG(obj) GTK_CHECK_TYPE (obj, filter_arg_get_type ()) - -typedef struct _FilterArg FilterArg; -typedef struct _FilterArgClass FilterArgClass; - -struct _FilterArg { - GtkObject object; - - struct _FilterArgPrivate *priv; - - char *name; - GList *values; -}; - -struct _FilterArgClass { - GtkObjectClass parent_class; - - /* make a copy of yourself */ - struct _FilterArg * (*clone)(FilterArg *arg); - - /* virtual methods */ - void (*write_html)(FilterArg *arg, GtkHTML *html, GtkHTMLStream *stream); - void (*write_text)(FilterArg *arg, GString *string); - void (*free_value)(FilterArg *arg, void *v); - - void (*edit_values)(FilterArg *arg); - int (*edit_value)(FilterArg *arg, int index); - - void (*values_add_xml)(FilterArg *arg, xmlNodePtr node); - xmlNodePtr (*values_get_xml)(FilterArg *arg); - - char * (*get_value_as_string)(FilterArg *arg, void *data); - - /* signals */ - void (*changed)(FilterArg *arg); -}; - -guint filter_arg_get_type (void); -FilterArg *filter_arg_new (char *name); -FilterArg *filter_arg_clone(FilterArg *arg); -void filter_arg_copy (FilterArg *dst, FilterArg *src); -void filter_arg_value_add(FilterArg *a, void *v); - -void filter_arg_edit_values(FilterArg *arg); -int filter_arg_edit_value(FilterArg *arg, int index); - -void filter_arg_remove(FilterArg *arg, void *v); -void filter_arg_add(FilterArg *arg, void *v); - -xmlNodePtr filter_arg_values_get_xml(FilterArg *arg); -void filter_arg_values_add_xml(FilterArg *arg, xmlNodePtr node); -int filter_arg_get_count(FilterArg *arg); -void *filter_arg_get_value(FilterArg *arg, int index); -char *filter_arg_get_value_as_string(FilterArg *arg, int index); - -#endif /* ! _FILTER_ARG_H */ - diff --git a/filter/filter-driver.c b/filter/filter-driver.c deleted file mode 100644 index e43f543611..0000000000 --- a/filter/filter-driver.c +++ /dev/null @@ -1,639 +0,0 @@ -/* - * Copyright (C) 2000 Helix Code Inc. - * - * Authors: Michael Zucchi - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ - -#include "filter-driver.h" - -#include -#include -#include -#include - -#include -#include - -#include "filter-arg-types.h" -#include "filter-xml.h" -#include "e-sexp.h" -#include "filter-format.h" - -#include - -struct _FilterDriverPrivate { - GList *rules, *options; - GHashTable *globals; /* global variables */ - - /* run-time data */ - GHashTable *folders; /* currently open folders */ - GList *matches; /* all messages which match current rule */ - GHashTable *terminated; /* messages for which processing is terminated */ - GHashTable *processed; /* all messages that were processed in some way */ - - CamelFolder *source; /* temporary input folder */ - - CamelException *ex; - - /* evaluator */ - ESExp *eval; -}; - -#define _PRIVATE(o) (((FilterDriver *)(o))->priv) - -static void filter_driver_class_init (FilterDriverClass *klass); -static void filter_driver_init (FilterDriver *obj); -static void filter_driver_finalise (GtkObject *obj); - -static CamelFolder *open_folder(FilterDriver *d, const char *folder_url); -static int close_folders(FilterDriver *d); - -static ESExpResult *do_delete(struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterDriver *); -static ESExpResult *do_forward(struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterDriver *); -static ESExpResult *do_copy(struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterDriver *); -static ESExpResult *do_stop(struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterDriver *); - -static struct { - char *name; - ESExpFunc *func; - int type; /* set to 1 if a function can perform shortcut evaluation, or - doesn't execute everything, 0 otherwise */ -} symbols[] = { - { "delete", (ESExpFunc *)do_delete, 0 }, - { "forward-to", (ESExpFunc *)do_forward, 0 }, - { "copy-to", (ESExpFunc *)do_copy, 0 }, - { "stop", (ESExpFunc *)do_stop, 0 }, -}; - -static GtkObjectClass *filter_driver_parent; - -enum SIGNALS { - LAST_SIGNAL -}; - -static guint signals[LAST_SIGNAL] = { 0 }; - -guint -filter_driver_get_type (void) -{ - static guint type = 0; - - if (!type) { - GtkTypeInfo type_info = { - "FilterDriver", - sizeof (FilterDriver), - sizeof (FilterDriverClass), - (GtkClassInitFunc) filter_driver_class_init, - (GtkObjectInitFunc) filter_driver_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL - }; - - type = gtk_type_unique (gtk_object_get_type (), &type_info); - } - - return type; -} - -static void -filter_driver_class_init (FilterDriverClass *klass) -{ - GtkObjectClass *object_class = (GtkObjectClass *) klass; - - filter_driver_parent = gtk_type_class (gtk_object_get_type ()); - - object_class->finalize = filter_driver_finalise; - - gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); -} - -static void -filter_driver_init (FilterDriver *obj) -{ - struct _FilterDriverPrivate *p; - int i; - - p = _PRIVATE(obj) = g_malloc0(sizeof(*p)); - - p->eval = e_sexp_new(); - /* Load in builtin symbols */ - for(i=0;ieval, 0, symbols[i].name, (ESExpIFunc *)symbols[i].func, obj); - } else { - e_sexp_add_function(p->eval, 0, symbols[i].name, symbols[i].func, obj); - } - } - - p->globals = g_hash_table_new(g_str_hash, g_str_equal); - - p->ex = camel_exception_new (); -} - -static void -free_hash_strings(void *key, void *value, void *data) -{ - g_free(key); - g_free(value); -} - -static void -filter_driver_finalise (GtkObject *obj) -{ - FilterDriver *d = (FilterDriver *)obj; - struct _FilterDriverPrivate *p = _PRIVATE(d); - - g_hash_table_foreach(p->globals, free_hash_strings, d); - g_hash_table_destroy(p->globals); - - gtk_object_unref((GtkObject *)p->eval); - - ((GtkObjectClass *)(filter_driver_parent))->finalize((GtkObject *)obj); -} - -/** - * filter_driver_new: - * - * Create a new FilterDriver object. - * - * Return value: A new FilterDriver widget. - **/ -FilterDriver * -filter_driver_new (void) -{ - FilterDriver *new = FILTER_DRIVER ( gtk_type_new (filter_driver_get_type ())); - return new; -} - - -void filter_driver_set_session(FilterDriver *d, CamelSession *s) -{ - if (d->session) - gtk_object_unref((GtkObject *)s); - d->session = s; - if (s) - gtk_object_ref((GtkObject *)s); -} - -int filter_driver_set_rules(FilterDriver *d, const char *description, const char *filter) -{ - struct _FilterDriverPrivate *p = _PRIVATE(d); - xmlDocPtr desc, filt; - - printf("Loading system '%s'\nLoading user '%s'\n", description, filter); - -#warning "fix leaks, free xml docs here" - desc = xmlParseFile(description); - p->rules = filter_load_ruleset(desc); - - filt = xmlParseFile(filter); - p->options = filter_load_optionset(filt, p->rules); - - return 0; -} - -void filter_driver_set_global(FilterDriver *d, const char *name, const char *value) -{ - struct _FilterDriverPrivate *p = _PRIVATE(d); - char *oldkey, *oldvalue; - - if (g_hash_table_lookup_extended(p->globals, name, (void *)&oldkey, (void *)&oldvalue)) { - g_free(oldvalue); - g_hash_table_insert(p->globals, oldkey, g_strdup(value)); - } else { - g_hash_table_insert(p->globals, g_strdup(name), g_strdup(value)); - } -} - -extern int filter_find_arg(FilterArg *a, char *name); - -/* - - foreach rule - find matches - - foreach action - get all matches - - */ - -/* - splices ${cc} lines into a single string -*/ -static int -expand_variables(GString *out, char *source, GList *args, GHashTable *globals) -{ - GList *argl; - FilterArg *arg; - char *name= alloca(32); - char *start, *end, *newstart, *tmp, *val; - int namelen=32; - int len=0; - int ok = 0; - - printf("expanding %s\n", source); - - start = source; - while ( (newstart = strstr(start, "${")) - && (end = strstr(newstart+2, "}")) ) { - len = end-newstart-2; - if (len+1>namelen) { - namelen = (len+1)*2; - name = alloca(namelen); - } - memcpy(name, newstart+2, len); - name[len] = 0; - printf("looking for name '%s'\n", name); - argl = g_list_find_custom(args, name, (GCompareFunc) filter_find_arg); - if (argl) { - int i, count; - - tmp = g_strdup_printf("%.*s", newstart-start, start); - printf("appending: %s\n", tmp); - g_string_append(out, tmp); - g_free(tmp); - - arg = argl->data; - count = filter_arg_get_count(arg); - for (i=0;ioptions; - while (optionl) { - struct filter_optionrule *or = optionl->data; - if (or->rule->type == FILTER_XML_MATCH - || or->rule->type == FILTER_XML_EXCEPT) { - if (or->args) { - arg = or->args->data; - if (arg) { - printf("arg = %s\n", arg->name); - } - } - expand_variables(s, or->rule->code, or->args, p->globals); - } - optionl = g_list_next(optionl); - } - - g_string_append(s, ")"); - } - - if (action) { - g_string_append(action, "(begin "); - optionl = op->options; - while (optionl) { - struct filter_optionrule *or = optionl->data; - if (or->rule->type == FILTER_XML_ACTION) { - expand_variables(action, or->rule->code, or->args, p->globals); - g_string_append(action, " "); - } - optionl = g_list_next(optionl); - } - g_string_append(action, ")"); - } - - if (s) - printf("combined rule '%s'\n", s->str); - if (action) - printf("combined action '%s'\n", action->str); -} - -static ESExpResult * -do_delete(struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterDriver *d) -{ - struct _FilterDriverPrivate *p = _PRIVATE(d); - GList *m; - - printf("doing delete\n"); - m = p->matches; - while (m) { - CamelMimeMessage *mm; - - printf(" %s\n", (char *)m->data); - - mm = camel_folder_get_message_by_uid(p->source, m->data, p->ex); - if (mm) { - camel_mime_message_set_flags(mm, CAMEL_MESSAGE_DELETED, CAMEL_MESSAGE_DELETED); - gtk_object_unref((GtkObject *)mm); - } - - m = m->next; - } - return NULL; -} - -static ESExpResult * -do_forward(struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterDriver *d) -{ - struct _FilterDriverPrivate *p = _PRIVATE(d); - GList *m; - - printf("doing forward on the following messages:\n"); - m = p->matches; - while (m) { - printf(" %s\n", (char *)m->data); - m = m->next; - } - return NULL; -} - -static ESExpResult * -do_copy(struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterDriver *d) -{ - GList *m; - int i; - struct _FilterDriverPrivate *p = _PRIVATE(d); - - printf("doing copy\n"); - for (i=0;itype == ESEXP_RES_STRING) { - char *folder = argv[i]->value.string; - CamelFolder *outbox; - - /* FIXME: this might have to find another store, based on - the folder as a url??? */ - printf("opening outpbox %s\n", folder); - outbox = open_folder(d, folder); - if (outbox == NULL) { - g_warning("Cannot open folder: %s", folder); - continue; - } - - m = p->matches; - while (m) { - CamelMimeMessage *mm; - - printf("appending message %s\n", (char *)m->data); - - mm = camel_folder_get_message_by_uid(p->source, m->data, p->ex); - camel_folder_append_message(outbox, mm, p->ex); - gtk_object_unref((GtkObject *)mm); - - printf(" %s\n", (char *)m->data); - m = m->next; - } - } - } - - return NULL; -} - -static ESExpResult * -do_stop(struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterDriver *d) -{ - GList *m; - struct _FilterDriverPrivate *p = _PRIVATE(d); - - printf("doing stop on the following messages:\n"); - m = p->matches; - while (m) { - printf(" %s\n", (char *)m->data); - g_hash_table_insert(p->terminated, g_strdup(m->data), (void *)1); - m = m->next; - } - return NULL; -} - -static CamelFolder * -open_folder(FilterDriver *d, const char *folder_url) -{ - char *folder, *store; - CamelStore *camelstore; - CamelFolder *camelfolder; - struct _FilterDriverPrivate *p = _PRIVATE(d); - - /* we have a lookup table of currently open folders */ - camelfolder = g_hash_table_lookup(p->folders, folder_url); - if (camelfolder) - return camelfolder; - - store = g_strdup(folder_url); - folder = strrchr(store, '/'); - if (folder == NULL || folder == store || folder[1]==0) - goto fail; - - *folder++ = 0; - camelstore = camel_session_get_store (d->session, store, p->ex); - if (camel_exception_get_id (p->ex)) { - printf ("Could not open store: %s: %s", store, camel_exception_get_description (p->ex)); - goto fail; - } - - camelfolder = camel_store_get_folder (camelstore, folder, p->ex); - if (camel_exception_get_id (p->ex)) { - printf ("Could not open folder: %s: %s", folder, camel_exception_get_description (p->ex)); - goto fail; - } - - if (!camel_folder_exists(camelfolder, p->ex)) { - camel_folder_create(camelfolder, p->ex); - } - - camel_folder_open(camelfolder, FOLDER_OPEN_RW, p->ex); - - if (camel_exception_get_id (p->ex)) { - printf ("Could not open folder: %s: %s", folder, camel_exception_get_description (p->ex)); - goto fail; - } - - printf("opening folder: %s\n", folder_url); - - g_free(store); - - g_hash_table_insert(p->folders, g_strdup(folder_url), camelfolder); - - return camelfolder; - -fail: - g_free(store); - return NULL; -} - -static void -close_folder(void *key, void *value, void *data) -{ - CamelFolder *f = value; - FilterDriver *d = data; - struct _FilterDriverPrivate *p = _PRIVATE(d); - - printf("closing folder: %s\n", key); - - g_free(key); - camel_folder_close(f, TRUE, p->ex); - gtk_object_unref((GtkObject *)f); -} - -/* flush/close all folders */ -static int -close_folders(FilterDriver *d) -{ - struct _FilterDriverPrivate *p = _PRIVATE(d); - - g_hash_table_foreach(p->folders, close_folder, d); - g_hash_table_destroy(p->folders); - p->folders = g_hash_table_new(g_str_hash, g_str_equal); - - /* FIXME: status from d */ - return 0; -} - -int -filter_driver_rule_count(FilterDriver *d) -{ - struct _FilterDriverPrivate *p = _PRIVATE(d); - return g_list_length(p->options); -} - -struct filter_option * -filter_driver_rule_get(FilterDriver *d, int n) -{ - struct _FilterDriverPrivate *p = _PRIVATE(d); - return g_list_nth_data(p->options, n); -} - -int -filter_driver_run(FilterDriver *d, CamelFolder *source, CamelFolder *inbox) -{ - struct _FilterDriverPrivate *p = _PRIVATE(d); - ESExpResult *r; - GList *options; - GString *s, *a; - GPtrArray *all; - GList *m; - int i; - -#warning "This must be made mega-robust" - p->source = source; - - /* setup runtime data */ - p->folders = g_hash_table_new(g_str_hash, g_str_equal); - p->terminated = g_hash_table_new(g_str_hash, g_str_equal); - p->processed = g_hash_table_new(g_str_hash, g_str_equal); - - camel_exception_init(p->ex); - - options = p->options; - while (options) { - struct filter_option *fo = options->data; - - s = g_string_new(""); - a = g_string_new(""); - filter_driver_expand_option(d, s, a, fo); - - printf("searching expression %s\n", s->str); - p->matches = camel_folder_search_by_expression (p->source, s->str, p->ex); - - /* remove uid's for which processing is complete ... */ - m = p->matches; - while (m) { - GList *n = m->next; - - printf("matched: %s\n", m->data); - - /* for all matching id's, so we can work out what to default */ - if (g_hash_table_lookup(p->processed, m->data) == NULL) { - g_hash_table_insert(p->processed, g_strdup(m->data), (void *)1); - } - - if (g_hash_table_lookup(p->terminated, m->data)) { - printf("removing terminated message %s\n", (char *)m->data); - p->matches = g_list_remove_link(p->matches, m); - } - m = n; - } - - printf("applying actions ... '%s'\n", a->str); - e_sexp_input_text(p->eval, a->str, strlen(a->str)); - e_sexp_parse(p->eval); - r = e_sexp_eval(p->eval); - e_sexp_result_free(r); - - g_string_free(s, TRUE); - g_string_free(a, TRUE); - - g_list_free(p->matches); - - options = g_list_next(options); - } - - /* apply the default of copying to an inbox, if we are given one, and make sure - we delete everything as well */ - all = camel_folder_get_uids(p->source, p->ex); - for (i = 0; i < all->len; i++) { - char *uid = all->pdata[i], *procuid; - CamelMimeMessage *mm; - - procuid = g_hash_table_lookup(p->processed, uid); - if (procuid == NULL) { - if (inbox) { - printf("Applying default rule to message %s\n", uid); - - mm = camel_folder_get_message_by_uid(p->source, all->pdata[i], p->ex); - camel_folder_append_message(inbox, mm, p->ex); - camel_mime_message_set_flags(mm, CAMEL_MESSAGE_DELETED, CAMEL_MESSAGE_DELETED); - gtk_object_unref((GtkObject *)mm); - } - } else { - camel_folder_delete_message_by_uid(p->source, uid, p->ex); - } - } - camel_folder_free_uids(p->source, all); - - g_hash_table_destroy(p->processed); - g_hash_table_destroy(p->terminated); - close_folders(d); - g_hash_table_destroy(p->folders); - - return 0; -} diff --git a/filter/filter-driver.h b/filter/filter-driver.h deleted file mode 100644 index ad9afca53f..0000000000 --- a/filter/filter-driver.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (C) 2000 Helix Code Inc. - * - * Authors: Michael Zucchi - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ - -#ifndef _FILTER_DRIVER_H -#define _FILTER_DRIVER_H - -#include -#include -#include -#include "filter-xml.h" - -#define FILTER_DRIVER(obj) GTK_CHECK_CAST (obj, filter_driver_get_type (), FilterDriver) -#define FILTER_DRIVER_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, filter_driver_get_type (), FilterDriverClass) -#define IS_FILTER_DRIVER(obj) GTK_CHECK_TYPE (obj, filter_driver_get_type ()) - -typedef struct _FilterDriver FilterDriver; -typedef struct _FilterDriverClass FilterDriverClass; - -struct _FilterDriver { - GtkObject parent; - - struct _FilterDriverPrivate *priv; - - CamelSession *session; -}; - -struct _FilterDriverClass { - GtkObjectClass parent_class; -}; - -guint filter_driver_get_type (void); -FilterDriver *filter_driver_new (void); - -void filter_driver_set_session(FilterDriver *, CamelSession *); -int filter_driver_set_rules(FilterDriver *, const char *system, const char *filter); -void filter_driver_set_global(FilterDriver *, const char *name, const char *value); - -/* apply rules to a folder, unmatched messages goto inbox, if not NULL */ -int filter_driver_run(FilterDriver *d, CamelFolder *source, CamelFolder *inbox); - -/* generate the search query/action string for a filter option */ -void filter_driver_expand_option(FilterDriver *d, GString *s, GString *action, struct filter_option *op); - -/* get info about rules (options) */ -int filter_driver_rule_count(FilterDriver *d); -struct filter_option *filter_driver_rule_get(FilterDriver *d, int n); - -#endif /* ! _FILTER_DRIVER_H */ diff --git a/filter/filter-druid.c b/filter/filter-druid.c deleted file mode 100644 index 4a4595c5fb..0000000000 --- a/filter/filter-druid.c +++ /dev/null @@ -1,736 +0,0 @@ -/* - * Copyright (C) 2000 Helix Code Inc. - * - * Authors: Michael Zucchi - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public License - * as published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include -#include -#include -#include - -#include -#include - -#include "filter-arg-types.h" -#include "filter-xml.h" -#include "filter-format.h" - - -#include "filter-druid.h" - -static void filter_druid_class_init (FilterDruidClass *klass); -static void filter_druid_init (FilterDruid *obj); - -#define _PRIVATE(x) (((FilterDruid *)(x))->priv) - -struct _FilterDruidPrivate { - GtkWidget *notebook; - int page; - - char *default_html; - - /* page 0 */ - GtkWidget *list0; - GtkWidget *html0; - GtkWidget *add0, *remove0, *up0, *down0; - GList *items0; - GtkFrame *listframe0; - - /* page 1 */ - GtkWidget *name1; - GtkWidget *activate1; - GtkHTML *html1; -}; - -/* forward ref's */ -static void build_druid(FilterDruid *d); -static void update_display(FilterDruid *f, int initial); - -/* globals */ -static GtkNotebookClass *filter_druid_parent; - -enum SIGNALS { - OPTION_SELECTED, - LAST_SIGNAL -}; - -static guint signals[LAST_SIGNAL] = { 0 }; - -guint -filter_druid_get_type (void) -{ - static guint type = 0; - - if (!type) { - GtkTypeInfo type_info = { - "FilterDruid", - sizeof (FilterDruid), - sizeof (FilterDruidClass), - (GtkClassInitFunc) filter_druid_class_init, - (GtkObjectInitFunc) filter_druid_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL - }; - - type = gtk_type_unique (gtk_notebook_get_type (), &type_info); - } - - return type; -} - -static void -object_destroy(FilterDruid *obj) -{ - struct _FilterDruidPrivate *p = _PRIVATE(obj); - - g_free(p->default_html); - - gtk_signal_disconnect_by_data((GtkObject *)p->list0, obj); - - /* FIXME: free lists? */ - - GTK_OBJECT_CLASS(filter_druid_parent)->destroy(obj); -} - -static void -filter_druid_class_init (FilterDruidClass *klass) -{ - GtkObjectClass *object_class = (GtkObjectClass *) klass; - - filter_druid_parent = gtk_type_class (gtk_notebook_get_type ()); - - object_class->destroy = object_destroy; - - signals[OPTION_SELECTED] = - gtk_signal_new ("option_selected", - GTK_RUN_FIRST, - object_class->type, - GTK_SIGNAL_OFFSET (FilterDruidClass, option_selected), - gtk_marshal_NONE__POINTER, - GTK_TYPE_NONE, 1, - GTK_TYPE_POINTER); - - gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); -} - -static void -filter_druid_init (FilterDruid *obj) -{ - struct _FilterDruidPrivate *priv; - - obj->priv = g_malloc0(sizeof(*obj->priv)); - priv = _PRIVATE(obj); -} - -/** - * filter_druid_new: - * - * Create a new FilterDruid object. - * - * Return value: A new FilterDruid widget. - **/ -FilterDruid * -filter_druid_new (void) -{ - FilterDruid *new = FILTER_DRUID ( gtk_type_new (filter_druid_get_type ())); - - build_druid(new); - - return new; -} - - -extern int filter_find_arg(FilterArg *a, char *name); - -#include "check.xpm" -#include "blank.xpm" - - -struct filter_optionrule * -find_optionrule(struct filter_option *option, char *name) -{ - GList *optionrulel; - struct filter_optionrule *or; - - optionrulel = option->options; - while (optionrulel) { - or = optionrulel->data; - if (!strcmp(or->rule->name, name)) { - return or; - } - optionrulel = g_list_next(optionrulel); - } - return NULL; -} - -static int display_order[] = { - FILTER_XML_MATCH, - FILTER_XML_EXCEPT, - FILTER_XML_ACTION, -}; -static char *display_pretext[] = { - "For messages matching:
    ", - "Unless:
      ", - "Perform these actions:
        ", -}; -static char *display_posttext[] = { - "
      ", - "
    ", - "
", -}; - -void -html_write_options(GtkHTML *html, struct filter_option *option, char *def) -{ - GtkHTMLStream *stream; - GList *optionrulel; - int i; - - stream = gtk_html_begin(html); - - gtk_html_write(html, stream, "", strlen("")); - if (option) { - char *t; - - if (option->type == FILTER_XML_SEND) { - t = "

When a message is sent.

"; - } else { - t = "

When a message is received.

"; - } - gtk_html_write(html, stream, t, strlen(t)); - - for (i=0;ioptions; - while (optionrulel) { - struct filter_optionrule *or = optionrulel->data; - - if (or->rule->type == display_order[i]) { - if (!doneheader) { - gtk_html_write(html, stream, display_pretext[i], strlen(display_pretext[i])); - doneheader = TRUE; - } - - if (donefirst) { - gtk_html_write(html, stream, "   and ", strlen("   and ")); - } - filter_description_html_write(or->rule->description, or->args, html, stream); - donefirst = TRUE; - gtk_html_write(html, stream, "
", strlen("
")); - } - optionrulel = g_list_next(optionrulel); - } - if (doneheader) { - gtk_html_write(html, stream, display_posttext[i], strlen(display_posttext[i])); - } - } - } else { - if (def == NULL) - def = "Select options."; - gtk_html_write(html, stream, def, strlen(def)); - } - gtk_html_end(html, stream, GTK_HTML_STREAM_OK); -} - -GList * -fill_rules(GList *rules, struct filter_option *option, int type) -{ - GList *optionl, *rulel; - GtkWidget *listitem, *hbox, *checkbox, *label; - GList *items = NULL; - - rulel = rules; - while (rulel) { - struct filter_rule *fr = rulel->data; - char *labeltext; - - if (fr->type == type) { - int state; - - state = find_optionrule(option, fr->name) != NULL; - - labeltext = filter_description_text(fr->description, NULL); - - printf("adding rule %s\n", labeltext); - - hbox = gtk_hbox_new(FALSE, 3); - checkbox = gnome_pixmap_new_from_xpm_d(state?check_xpm:blank_xpm); - gtk_box_pack_start(GTK_BOX(hbox), checkbox, FALSE, FALSE, 0); - label = gtk_label_new(labeltext); - gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, TRUE, 0); - listitem = gtk_list_item_new(); - gtk_container_add(GTK_CONTAINER(listitem), hbox); - gtk_widget_show_all(listitem); - - gtk_object_set_data(GTK_OBJECT(listitem), "checkbox", checkbox); - gtk_object_set_data(GTK_OBJECT(listitem), "checkstate", (void *)state); - gtk_object_set_data(GTK_OBJECT(listitem), "rule", fr); - - items = g_list_append(items, listitem); - } - rulel = g_list_next(rulel); - } - return items; -} - -GList * -fill_options(GList *options) -{ - GList *optionl, *rulel, *optionrulel; - GtkWidget *listitem, *hbox, *checkbox, *label; - GList *items = NULL; - - optionl = options; - while (optionl) { - struct filter_option *op = optionl->data; - char *labeltext; - - labeltext = filter_description_text(op->description, NULL); - listitem = gtk_list_item_new_with_label(labeltext); - g_free(labeltext); - gtk_widget_show_all(listitem); - - gtk_object_set_data(GTK_OBJECT(listitem), "option", op); - - items = g_list_append(items, listitem); - optionl = g_list_next(optionl); - } - return items; -} - -static void -select_rule_child(GtkList *list, GtkWidget *child, FilterDruid *f) -{ - GtkWidget *w; - struct filter_rule *fr = gtk_object_get_data(GTK_OBJECT(child), "rule"); - int state; - struct filter_optionrule *rule; - struct _FilterDruidPrivate *p = _PRIVATE(f); - - w = gtk_object_get_data(GTK_OBJECT(child), "checkbox"); - state = !(int) gtk_object_get_data(GTK_OBJECT(child), "checkstate"); - - gnome_pixmap_load_xpm_d(GNOME_PIXMAP(w), state?check_xpm:blank_xpm); - gtk_object_set_data(GTK_OBJECT(child), "checkstate", (void *)state); - - if (state) { - printf("adding rule %p\n", fr); - rule = filter_optionrule_new_from_rule(fr); - f->option_current->options = g_list_append(f->option_current->options, rule); - } else { - rule = find_optionrule(f->option_current, fr->name); - if (rule) { - f->option_current->options = g_list_remove(f->option_current->options, rule); - filter_clone_optionrule_free(rule); - } - } - - update_display(f, 0); -} - - - -static void -select_option_child(GtkList *list, GtkWidget *child, FilterDruid *f) -{ - struct filter_option *op; - struct filter_option *new; - GList *optionsl; - struct _FilterDruidPrivate *p = _PRIVATE(f); - - switch (p->page) { - case 1: - case 2: - case 3: - select_rule_child(list, child, f); - default: - return; - case 0: - break; - } - - if (f->option_current) { - printf("freeing current option\n"); - /* free option_current copy */ - optionsl = f->option_current->options; - while (optionsl) { - GList *op = optionsl; - optionsl = g_list_next(optionsl); - filter_clone_optionrule_free(op->data); - } - g_list_free(f->option_current->options); - g_free(f->option_current); - f->option_current = NULL; - } - - if (child) { - op = gtk_object_get_data(GTK_OBJECT(child), "option"); - - printf("option = %p\n", op); - - /* clone the option */ - new = g_malloc(sizeof(*new)); - new->type = op->type; - new->description = op->description; - new->options = NULL; - optionsl = op->options; - while (optionsl) { - struct filter_optionrule *ornew, - *or = optionsl->data; - ornew = filter_clone_optionrule(or); - new->options = g_list_append(new->options, ornew); - optionsl = g_list_next(optionsl); - } - f->option_current = new; - - gtk_signal_emit(GTK_OBJECT(f), signals[OPTION_SELECTED], op); - } - - update_display(f, 0); -} - -static void -unselect_option_child(GtkList *list, GtkWidget *child, FilterDruid *f) -{ - printf("unselect option child\n"); - select_option_child(list, NULL, f); -} - -static void -arg_changed(FilterArg *arg, FilterDruid *f) -{ - FilterArg *orig; - - printf("value changed!!!\n"); - - orig = gtk_object_get_data(arg, "origin"); - if (orig) { - filter_arg_copy(orig, arg); - update_display(f, 0); - } else { - /* FIXME: uh, what the fuck to do here? */ - update_display(f, 0); - } -} - -static void -arg_link_clicked(GtkHTML *html, const char *url, FilterDruid *f) -{ - printf("url clicked: %s\n", url); - if (!strncmp(url, "arg:", 4)) { - FilterArg *arg; - void *dummy; - - if (sscanf(url+4, "%p %p", &dummy, &arg)==2 - && arg) { - FilterArg *orig; - - printf("arg = %p\n", arg); - - gtk_signal_connect((GtkObject *)arg, "changed", arg_changed, f); - filter_arg_edit_values(arg); - } - } -} - -static void -option_name_changed(GtkEntry *entry, FilterDruid *f) -{ - struct filter_desc *desc; - - printf("name chaned: %s\n", gtk_entry_get_text(entry)); - - if (f->option_current) { - /* FIXME: lots of memory leaks */ - desc = g_malloc0(sizeof(*desc)); - desc->data = g_strdup(gtk_entry_get_text(entry)); - desc->type = FILTER_XML_TEXT; - desc->vartype = -1; - desc->varname = NULL; - f->option_current->description = g_list_append(NULL, desc); - } -} - -static void -dialogue_clicked(FilterDruid *d, int button, void *data) -{ - GString *s = g_string_new(""); - struct _FilterDruidPrivate *p = _PRIVATE(d); - int initial=0; - - printf("button %d clicked ...\n", button); - - g_string_free(s, TRUE); - - switch(button) { - case 1: - if (p->page<4) { - p->page++; - initial =1; - } - break; - case 0: - if (p->page>0) { - p->page--; - initial = 1; - } - break; - } - update_display(d, initial); -} - -static int filter_types[] = { FILTER_XML_MATCH, FILTER_XML_EXCEPT, FILTER_XML_ACTION }; -static char *filter_titles[] = { - "Select rule(s), where messages match", - "Select rule(s), where messages do not match", - "Select action(s) to apply to messages" - -}; -static void -update_display(FilterDruid *f, int initial) -{ - struct _FilterDruidPrivate *p = _PRIVATE(f); - - printf("rending page %d options\n", p->page); - - switch (p->page) { - case 0: - printf("option_current = %p <###################\n", f->option_current); - - if (initial) { - printf("adding options\n"); - gtk_signal_handler_block_by_data((GtkObject *)p->list0, f); - gtk_list_remove_items((GtkList *)p->list0, p->items0); - p->items0 = fill_options(f->options); - gtk_list_append_items((GtkList *)p->list0, p->items0); - gtk_signal_handler_unblock_by_data((GtkObject *)p->list0, f); - gtk_frame_set_label(p->listframe0, "Select rule type"); - } - - html_write_options((GtkHTML *)p->html0, f->option_current, p->default_html); - break; - case 1: - case 2: - case 3: - if (initial) { - printf("adding rules\n"); - gtk_signal_handler_block_by_data((GtkObject *)p->list0, f); - gtk_list_remove_items((GtkList *)p->list0, p->items0); - p->items0 = fill_rules(f->rules, f->option_current, filter_types[p->page-1]); - gtk_list_append_items((GtkList *)p->list0, p->items0); - gtk_signal_handler_unblock_by_data((GtkObject *)p->list0, f); - gtk_frame_set_label(p->listframe0, filter_titles[p->page-1]); - gtk_notebook_set_page(GTK_NOTEBOOK(p->notebook), 0); - } - - html_write_options((GtkHTML *)p->html0, f->option_current, p->default_html); - break; - case 4: - if (initial) { - char *text; - text = filter_description_text(f->option_current->description, NULL); - if (text == NULL) { - /* maybe this could fudge something out of the first - bits of the rule */ - if (f->option_current->type == FILTER_XML_SEND) { - text = "Filter messages sent"; - } else { - text = "Filter messages received"; - } - gtk_entry_set_text(GTK_ENTRY(p->name1), text); - } else { - gtk_entry_set_text(GTK_ENTRY(p->name1), text); - g_free(text); - } - gtk_notebook_set_page(GTK_NOTEBOOK(p->notebook), 1); - } - - html_write_options((GtkHTML *)p->html1, f->option_current, p->default_html); - break; - - } -} - -void -filter_druid_set_rules(FilterDruid *f, GList *options, GList *rules, struct filter_option *current) -{ - struct filter_option *new; - GList *optionsl; - - f->options = options; - f->rules = rules; - f->user = NULL; - - if (current) { - /* FIXME: free this list if it isn't empty ... */ - /* clone the 'current' option */ - new = g_malloc(sizeof(*new)); - new->type = current->type; - new->description = current->description; - new->options = NULL; - optionsl = current->options; - while (optionsl) { - struct filter_optionrule *ornew, - *or = optionsl->data; - ornew = filter_clone_optionrule(or); - new->options = g_list_append(new->options, ornew); - optionsl = g_list_next(optionsl); - } - f->option_current = new; - } else { - f->option_current = NULL; - } - - update_display(f, 1); -} - -static void -build_druid(FilterDruid *d) -{ - GtkWidget *vbox, *frame, *scrolled_window, *list, *html, *hbox, *label, *vbox1; - struct _FilterDruidPrivate *p = _PRIVATE(d); - -#if 0 - gnome_dialog_append_buttons((GnomeDialog *)d, "Prev", "Next", "Finish", "Cancel", 0); - gnome_dialog_set_close((GnomeDialog *)d, FALSE); - gnome_dialog_set_sensitive((GnomeDialog *)d, 0, FALSE); - gnome_dialog_set_sensitive((GnomeDialog *)d, 1, FALSE); - gnome_dialog_set_sensitive((GnomeDialog *)d, 2, FALSE); - gnome_dialog_set_default((GnomeDialog *)d, 1); -#endif - - p->notebook = d; - gtk_notebook_set_show_tabs(GTK_NOTEBOOK(p->notebook), FALSE); - - /* page0, initial setup page */ - vbox = gtk_vbox_new(FALSE, 3); - frame = gtk_frame_new("Filters"); - p->listframe0 = (GtkFrame *)frame; - - list = gtk_list_new(); - scrolled_window = gtk_scrolled_window_new(NULL, NULL); - gtk_widget_set_usize(scrolled_window, 400, 150); - gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrolled_window), list); - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window), - GTK_POLICY_AUTOMATIC, - GTK_POLICY_AUTOMATIC); - gtk_container_set_focus_vadjustment - (GTK_CONTAINER (list), - gtk_scrolled_window_get_vadjustment - (GTK_SCROLLED_WINDOW (scrolled_window))); - gtk_container_add(GTK_CONTAINER(frame), scrolled_window); - gtk_box_pack_start((GtkBox *)vbox, frame, TRUE, TRUE, 0); - - frame = gtk_frame_new("Filter Description (click on values to edit)"); - html = gtk_html_new(); - scrolled_window = gtk_scrolled_window_new (NULL, NULL); - gtk_widget_set_usize(scrolled_window, 400, 150); - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window), - GTK_POLICY_AUTOMATIC, - GTK_POLICY_AUTOMATIC); - gtk_container_add(GTK_CONTAINER(scrolled_window), html); - gtk_container_add(GTK_CONTAINER(frame), scrolled_window); - gtk_box_pack_start((GtkBox *)vbox, frame, TRUE, TRUE, 0); - - p->html0 = html; - p->list0 = list; - - gtk_signal_connect(GTK_OBJECT(list), "select_child", select_option_child, d); - gtk_signal_connect(GTK_OBJECT(list), "unselect_child", select_option_child, d); -/* gtk_signal_connect(GTK_OBJECT(list), "unselect_child", unselect_option_child, d); */ -/* gtk_signal_connect(GTK_OBJECT(d), "clicked", dialogue_clicked, d);*/ - - gtk_signal_connect(GTK_OBJECT(html), "link_clicked", arg_link_clicked, d); - - gtk_notebook_append_page(GTK_NOTEBOOK(p->notebook), vbox, NULL); - - - /* page1, used for the final page display */ - vbox = gtk_vbox_new(FALSE, 3); - - frame = gtk_frame_new("Rule options"); - vbox1 = gtk_vbox_new(FALSE, 3); - - hbox = gtk_hbox_new(FALSE, 3); - label = gtk_label_new("Name of rule"); - p->name1 = gtk_entry_new(); - gtk_box_pack_start((GtkBox *)hbox, label, FALSE, FALSE, 0); - gtk_box_pack_start((GtkBox *)hbox, p->name1, TRUE, TRUE, 0); - gtk_box_pack_start((GtkBox *)vbox1, hbox, TRUE, FALSE, 0); - - gtk_container_add(GTK_CONTAINER(frame), vbox1); - - p->activate1 = gtk_check_button_new_with_label("Activate rule?"); - gtk_box_pack_start((GtkBox *)vbox1, p->activate1, TRUE, FALSE, 0); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(p->activate1), TRUE); - - gtk_signal_connect(GTK_OBJECT(p->name1), "changed", option_name_changed, d); - - gtk_box_pack_start((GtkBox *)vbox, frame, TRUE, TRUE, 0); - - /* another copy of the filter thingy */ - frame = gtk_frame_new("Filter Description (click on values to edit)"); - html = gtk_html_new(); - p->html1 = (GtkHTML *)html; - scrolled_window = gtk_scrolled_window_new (NULL, NULL); - gtk_widget_set_usize(scrolled_window, 400, 150); - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window), - GTK_POLICY_AUTOMATIC, - GTK_POLICY_AUTOMATIC); - gtk_container_add(GTK_CONTAINER(scrolled_window), html); - gtk_container_add(GTK_CONTAINER(frame), scrolled_window); - gtk_box_pack_start((GtkBox *)vbox, frame, TRUE, TRUE, 0); - - /* finish off */ - gtk_notebook_append_page(GTK_NOTEBOOK(p->notebook), vbox, NULL); - - gtk_signal_connect(GTK_OBJECT(html), "link_clicked", arg_link_clicked, d); - - gtk_widget_show_all(p->notebook); -} - -void -filter_druid_set_page(FilterDruid *f, enum FilterDruidPage page) -{ - struct _FilterDruidPrivate *p = _PRIVATE(f); - int initial = p->page != page; - - p->page = page; - update_display(f, initial); -} - - -void -filter_druid_set_default_html(FilterDruid *f, const char *html) -{ - struct _FilterDruidPrivate *p = _PRIVATE(f); - - g_free(p->default_html); - p->default_html = g_strdup(html); -} - -enum FilterDruidPage -filter_druid_get_page(FilterDruid *f) -{ - struct _FilterDruidPrivate *p = _PRIVATE(f); - - return p->page; -} - diff --git a/filter/filter-druid.h b/filter/filter-druid.h deleted file mode 100644 index 7927dc70dd..0000000000 --- a/filter/filter-druid.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (C) 2000 Helix Code Inc. - * - * Authors: Michael Zucchi - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public License - * as published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef _FILTER_DRUID_H -#define _FILTER_DRUID_H - -#include - -#include "filter-xml.h" - -#define FILTER_DRUID(obj) GTK_CHECK_CAST (obj, filter_druid_get_type (), FilterDruid) -#define FILTER_DRUID_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, filter_druid_get_type (), FilterDruidClass) -#define IS_FILTER_DRUID(obj) GTK_CHECK_TYPE (obj, filter_druid_get_type ()) - -typedef struct _FilterDruid FilterDruid; -typedef struct _FilterDruidClass FilterDruidClass; - -enum FilterDruidPage { - FILTER_DRUID_SELECT_RULE, - FILTER_DRUID_SELECT_MATCH, - FILTER_DRUID_SELECT_NOMATCH, - FILTER_DRUID_SELECT_ACTION, - FILTER_DRUID_SELECT_FINISH -}; - -struct _FilterDruid { - GtkNotebook parent; - - GList *options; /* all options */ - GList *rules; /* all rules */ - GList *user; /* current user options */ - - struct filter_option *option_current; - - struct _FilterDruidPrivate *priv; -}; - -struct _FilterDruidClass { - GtkNotebookClass parent_class; - - /* signals */ - void (*option_selected)(FilterDruid *f, struct filter_option *option); -}; - -guint filter_druid_get_type (void); -FilterDruid *filter_druid_new (void); - -/* Hmm, glists suck, no typesafety */ -void filter_druid_set_rules(FilterDruid *f, GList *options, GList *rules, struct filter_option *userrule); -void filter_druid_set_default_html(FilterDruid *f, const char *text); - -/* set the page of display */ -void filter_druid_set_page(FilterDruid *f, enum FilterDruidPage page); -enum FilterDruidPage filter_druid_get_page(FilterDruid *f); - -/* check if the druid is allowed to finish at this point */ -gboolean filter_druid_can_finish(FilterDruid *f); - -#endif /* ! _FILTER_DRUID_H */ diff --git a/filter/filter-editor.c b/filter/filter-editor.c deleted file mode 100644 index ec6320b649..0000000000 --- a/filter/filter-editor.c +++ /dev/null @@ -1,386 +0,0 @@ -/* - * Copyright (C) 2000 Helix Code Inc. - * - * Authors: Michael Zucchi - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public License - * as published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include "filter-druid.h" -#include "filter-editor.h" - - -static void filter_editor_class_init (FilterEditorClass *klass); -static void filter_editor_init (FilterEditor *obj); - -static GnomeDialogClass *filter_editor_parent; - -#define _PRIVATE(x) (((FilterEditor *)(x))->priv) - -struct _FilterEditorPrivate { - FilterDruid *druid; - - GtkWidget *edit, *add, *remove, *up, *down; - - /* for sub-druid */ - struct filter_option *druid_option; - GtkWidget *druid_dialogue; - FilterDruid *druid_druid; -}; - -enum SIGNALS { - LAST_SIGNAL -}; - -static guint signals[LAST_SIGNAL] = { 0 }; - -guint -filter_editor_get_type (void) -{ - static guint type = 0; - - if (!type) { - GtkTypeInfo type_info = { - "FilterEditor", - sizeof (FilterEditor), - sizeof (FilterEditorClass), - (GtkClassInitFunc) filter_editor_class_init, - (GtkObjectInitFunc) filter_editor_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL - }; - - type = gtk_type_unique (gnome_dialog_get_type (), &type_info); - } - - return type; -} - -static void -object_destroy(FilterEditor *obj) -{ - struct _FilterEditorPrivate *p = _PRIVATE(obj); - - if (p->druid_druid) - gtk_object_unref((GtkObject *)p->druid_dialogue); - - GTK_OBJECT_CLASS(filter_editor_parent)->destroy(obj); -} - -static void -filter_editor_class_init (FilterEditorClass *klass) -{ - GtkObjectClass *object_class = (GtkObjectClass *) klass; - - filter_editor_parent = gtk_type_class (gnome_dialog_get_type ()); - - object_class->destroy = object_destroy; - - gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); -} - -static void -filter_editor_init (FilterEditor *obj) -{ - obj->priv = g_malloc0(sizeof(*obj->priv)); -} - - -static void -sensitise(FilterEditor *e) -{ - struct _FilterEditorPrivate *p = _PRIVATE(e); - - gtk_widget_set_sensitive(p->add, TRUE); - gtk_widget_set_sensitive(p->edit, e->option_current != NULL); - gtk_widget_set_sensitive(p->remove, e->option_current != NULL); - gtk_widget_set_sensitive(p->up, g_list_index(e->useroptions, e->option_current)>0); - gtk_widget_set_sensitive(p->down, g_list_index(e->useroptions, e->option_current)!=g_list_length(e->useroptions)-1); -} - -static void -druid_option_selected(FilterDruid *f, struct filter_option *option, FilterEditor *e) -{ - printf("option selected: %p\n", option); - e->option_current = option; - sensitise(e); -} - -static void -druid_dialogue_clicked(GnomeDialog *d, int button, FilterEditor *e) -{ - struct _FilterEditorPrivate *p = _PRIVATE(e); - int page = filter_druid_get_page(p->druid_druid); - - switch(button) { - case 1: - if (page<4) { - page++; - } - break; - case 0: - if (page>0) { - page--; - } - break; - case 2: - printf("Finish!\n"); - if (p->druid_druid->option_current) { - struct filrt_optionrule *or; - - printf("refcount = %d\n", ((GtkObject *)p->druid_druid)->ref_count); - - or = p->druid_druid->option_current; - if (p->druid_option) { - GList *node; - - node = g_list_find(e->useroptions, p->druid_option); - if (node) { - /* fixme: free old one */ - node->data = or; - } else { - g_warning("Cannot find node I edited, appending instead"); - e->useroptions = g_list_append(e->useroptions, or); - } - } else { - e->useroptions = g_list_append(e->useroptions, or); - } - filter_druid_set_rules(p->druid, e->useroptions, e->rules, or); - } - case 3: - printf("cancel!\n"); - p->druid_dialogue = NULL; - gnome_dialog_close(d); - return; - } - filter_druid_set_page(p->druid_druid, page); - - gnome_dialog_set_sensitive(p->druid_dialogue, 0, page>0); - gnome_dialog_set_sensitive(p->druid_dialogue, 1, page<4); - gnome_dialog_set_sensitive(p->druid_dialogue, 2, page==4); /* FIXME: make this depenedant on when the rules are actually done */ -} - -static void -druid_dialogue_option_selected(FilterDruid *f, struct filter_option *option, FilterEditor *e) -{ - struct _FilterEditorPrivate *p = _PRIVATE(e); - - gnome_dialog_set_sensitive(p->druid_dialogue, 1, TRUE); -} - -static void -add_or_edit(FilterEditor *e, struct filter_option *option) -{ - GnomeDialog *dialogue; - FilterDruid *druid; - struct _FilterEditorPrivate *p = _PRIVATE(e); - - if (p->druid_dialogue) { - gdk_window_raise(GTK_WIDGET(p->druid_dialogue)->window); - return; - } - - dialogue = gnome_dialog_new(option?"Edit Filter":"Create filter", "Prev", "Next", "Finish", "Cancel", 0); - - p->druid_dialogue = dialogue; - - gnome_dialog_set_close(dialogue, FALSE); - gnome_dialog_set_sensitive(dialogue, 0, FALSE); - gnome_dialog_set_sensitive(dialogue, 1, FALSE); - gnome_dialog_set_sensitive(dialogue, 2, FALSE); - gnome_dialog_set_default(dialogue, 1); - - gtk_signal_connect(GTK_OBJECT(dialogue), "clicked", druid_dialogue_clicked, e); - - druid = filter_druid_new(); - - p->druid_druid = druid; - - filter_druid_set_default_html(p->druid_druid, "

Create Filtering Rule

" - "

Select one of the base rules above, then continue " - "forwards to customise it.

"); - - filter_druid_set_rules(druid, e->systemoptions, e->rules, option); - gtk_box_pack_start(dialogue->vbox, druid, TRUE, TRUE, 0); - - if (option) { - druid_dialogue_clicked(dialogue, 1, e); - } - - p->druid_option = option; - - gtk_signal_connect(druid, "option_selected", druid_dialogue_option_selected, e); - - gtk_widget_show(druid); - gtk_widget_show(dialogue); -} - -static void -add_clicked(GtkWidget *w, FilterEditor *e) -{ - printf("add new ...\n"); - - add_or_edit(e, NULL); -} - -static void -edit_clicked(GtkWidget *w, FilterEditor *e) -{ - printf("add new ...\n"); - - add_or_edit(e, e->option_current); -} - -static void -remove_clicked(GtkWidget *w, FilterEditor *e) -{ - printf("remove current ...\n"); -} - -static void -up_clicked(GtkWidget *w, FilterEditor *e) -{ - printf("up ...\n"); -} - -static void -down_clicked(GtkWidget *w, FilterEditor *e) -{ - printf("down ...\n"); -} - -/* build the contents of the editor */ -static void -build_editor(FilterEditor *e) -{ - struct _FilterEditorPrivate *p = _PRIVATE(e); - GtkWidget *hbox; - GtkWidget *vbox; - - hbox = gtk_hbox_new(FALSE, 3); - - p->druid = (GtkWidget *)filter_druid_new(); - gtk_box_pack_start((GtkBox *)hbox, p->druid, TRUE, TRUE, 0); - - vbox = gtk_vbox_new(FALSE, 0); - - p->edit = gtk_button_new_with_label ("Edit"); - p->add = gtk_button_new_with_label ("Add"); - p->remove = gtk_button_new_with_label ("Remove"); - p->up = gtk_button_new_with_label ("Up"); - p->down = gtk_button_new_with_label ("Down"); - - gtk_box_pack_start((GtkBox *)vbox, p->edit, FALSE, TRUE, 0); - gtk_box_pack_start((GtkBox *)vbox, p->add, FALSE, TRUE, 3); - gtk_box_pack_start((GtkBox *)vbox, p->remove, FALSE, TRUE, 0); - gtk_box_pack_start((GtkBox *)vbox, p->up, FALSE, TRUE, 3); - gtk_box_pack_start((GtkBox *)vbox, p->down, FALSE, TRUE, 0); - - gtk_box_pack_start((GtkBox *)hbox, vbox, FALSE, FALSE, 0); - - gtk_box_pack_start((GtkBox *)e->parent.vbox, hbox, TRUE, TRUE, 0); - - gtk_signal_connect(p->druid, "option_selected", druid_option_selected, e); - - gtk_signal_connect(p->edit, "clicked", edit_clicked, e); - gtk_signal_connect(p->add, "clicked", add_clicked, e); - gtk_signal_connect(p->remove, "clicked", remove_clicked, e); - gtk_signal_connect(p->up, "clicked", up_clicked, e); - gtk_signal_connect(p->down, "clicked", down_clicked, e); - - filter_druid_set_default_html(p->druid, "

Filtering Rules

" - "

Select one of the rules above to view, and " - "edit. Or Add a new rule.

"); - - gtk_widget_show_all(hbox); - sensitise(e); -} - - -/** - * filter_editor_new: - * - * Create a new FilterEditor object. - * - * Return value: A new FilterEditor widget. - **/ -FilterEditor * -filter_editor_new (void) -{ - FilterEditor *new = FILTER_EDITOR ( gtk_type_new (filter_editor_get_type ())); - - build_editor(new); - - return new; -} - -void -filter_editor_set_rules(FilterEditor *e, GList *rules, GList *systemoptions, GList *useroptions) -{ - struct _FilterEditorPrivate *p = _PRIVATE(e); - - e->rules= rules; - e->systemoptions = systemoptions; - e->useroptions = useroptions; - - filter_druid_set_rules(p->druid, useroptions, rules, NULL); -} - -void -filter_editor_set_rule_files(FilterEditor *e, const char *systemrules, const char *userrules) -{ - GList *rules, *options = NULL, *options2; - xmlDocPtr doc, out, optionset, filteroptions; - - doc = xmlParseFile(systemrules); - rules = filter_load_ruleset(doc); - options2 = filter_load_optionset(doc, rules); - out = xmlParseFile(userrules); - if (out) - options = filter_load_optionset(out, rules); - - printf("Loading system rules: %s = %p = %p\n", systemrules, doc, rules); - printf("Loading user rules: %s = %p = %p\n", userrules, out, options); - - filter_editor_set_rules(e, rules, options2, options); -} - -int -filter_editor_save_rules(FilterEditor *e, const char *userrules) -{ - return filter_write_optionset_file(userrules, e->useroptions); -} - -#ifdef STANDALONE - -int main(int argc, char **argv) -{ - FilterEditor *fe; - - gnome_init("Test", "0.0", argc, argv); - gdk_rgb_init (); - gtk_widget_set_default_colormap (gdk_rgb_get_cmap ()); - gtk_widget_set_default_visual (gdk_rgb_get_visual ()); - - fe = filter_editor_new(); - filter_editor_set_rule_files(fe, "/home/notzed/gnome/evolution/filter/filterdescription.xml", "/home/notzed/filters.xml"); - gtk_widget_show(fe); - - gtk_main(); - - return 0; -} - -#endif diff --git a/filter/filter-editor.h b/filter/filter-editor.h deleted file mode 100644 index 66f7a81e11..0000000000 --- a/filter/filter-editor.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (C) 2000 Helix Code Inc. - * - * Authors: Michael Zucchi - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public License - * as published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef _FILTER_EDITOR_H -#define _FILTER_EDITOR_H - -#include -#include -#include "filter-xml.h" - -#define FILTER_EDITOR(obj) GTK_CHECK_CAST (obj, filter_editor_get_type (), FilterEditor) -#define FILTER_EDITOR_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, filter_editor_get_type (), FilterEditorClass) -#define IS_FILTER_EDITOR(obj) GTK_CHECK_TYPE (obj, filter_editor_get_type ()) - -typedef struct _FilterEditor FilterEditor; -typedef struct _FilterEditorClass FilterEditorClass; - -struct _FilterEditor { - GnomeDialog parent; - - struct _FilterEditorPrivate *priv; - - GList *rules; - GList *systemoptions; - GList *useroptions; - - struct filter_option *option_current; -}; - -struct _FilterEditorClass { - GnomeDialogClass parent_class; -}; - -guint filter_editor_get_type (void); -FilterEditor *filter_editor_new (void); - -void filter_editor_set_rules(FilterEditor *e, GList *rules, GList *systemoptions, GList *useroptions); -void filter_editor_set_rule_files(FilterEditor *e, const char *systemrules, const char *userrules); -int filter_editor_save_rules(FilterEditor *e, const char *userrules); - -#endif /* ! _FILTER_EDITOR_H */ diff --git a/filter/filter-format.c b/filter/filter-format.c deleted file mode 100644 index b7a2a956be..0000000000 --- a/filter/filter-format.c +++ /dev/null @@ -1,237 +0,0 @@ -/* -*- Mode: C; c-file-style: "linux"; indent-tabs-mode: t; c-basic-offset: 8; -*- */ - -#include -#include -#include -#include - -#include -#include - -#include "filter-arg-types.h" -#include "filter-xml.h" - -#define d(x) - -/* FIXME: remove static, this is defined in filter-xml */ -static int -filter_find_rule(struct filter_rule *a, char *name) -{ - d(printf("finding, is %s = %s?\n", a->name, name)); - return strcmp(a->name, name); -} - -static int -filter_find_arg(FilterArg *a, char *name) -{ - d(printf("finding, is %s = %s?\n", a->name, name)); - return strcmp(a->name, name); -} - -static int display_order[] = { FILTER_XML_MATCH, FILTER_XML_ACTION, FILTER_XML_EXCEPT }; - -static struct filter_option * -option_clone(struct filter_option *source) -{ - struct filter_option *dest = g_malloc0(sizeof(*dest)); - GList *loptions; - struct filter_optionrule *old, *new; - - dest->type = source->type; - dest->description = source->description; - loptions = dest->options; - while (loptions) { - old = loptions->data; - new = g_malloc0(sizeof(*new)); - new->rule = old->rule; - /* FIXME: need to copy any args as well!!! */ - dest->options = g_list_append(dest->options, new); - loptions = g_list_next(loptions); - } - return dest; -} - - - -struct description_decode_lambda { - GString *str; - GList *args; - GtkHTML *html; - GtkHTMLStream *stream; -}; - -static char * -arg_text(FilterArg *arg) -{ - char *out = NULL; - GList *value, *next; - GString *str; - - value = arg->values; - - d(printf("getting text from arg %s\n", arg->name)); - - if (value == NULL) - return NULL; - - str = g_string_new(""); - filter_arg_write_text(arg, str); - out = str->str; - g_string_free(str, FALSE); - return out; -} - -static void -description_decode_text(struct filter_desc *d, struct description_decode_lambda *l) -{ - GList *list; - char *txt; - - switch (d->type) { - case FILTER_XML_TEXT: - case FILTER_XML_DESC: - dotext: - d(printf("appending '%s'\n", d->data)); - /* printf("vartype = %s\n", detokenise(d->vartype)); */ - d(printf("varname = %s\n", d->varname)); - if (d->vartype !=-1 && d->varname - && (list = g_list_find_custom(l->args, d->varname, (GCompareFunc) filter_find_arg)) - && (txt = arg_text(list->data))) { - } else { - txt = d->data; - } - g_string_append(l->str, txt); - break; - default: - printf("WARN: unknown desc text type '%d' = %s\n", d->type, d->data); - goto dotext; - } -} - -char * -filter_description_text(GList *description, GList *args) -{ - char *txt; - struct description_decode_lambda l; - - d(printf("\ndecoding ...\n")); - - l.str = g_string_new(""); - l.args = args; - g_list_foreach(description, (GFunc) description_decode_text, &l); - - d(printf("string is '%s'\n", l.str->str)); - - txt = l.str->str; - g_string_free(l.str, FALSE); - - return txt; -} - -static void -html_write(GtkHTML *html, GtkHTMLStream *stream, char *s) -{ - d(printf("appending html '%s'\n", s)); - gtk_html_write(html, stream, s, strlen(s)); -} - - -static void -description_decode_html(struct filter_desc *d, struct description_decode_lambda *l) -{ - GList *list; - char *txt, *end; - int free; - - switch (d->type) { - case FILTER_XML_TEXT: - case FILTER_XML_DESC: - dotext: - d(printf("appending '%s'\n", d->data)); - /*printf("vartype = %s\n", detokenise(d->vartype));*/ - d(printf("varname = %s\n", d->varname)); - free = FALSE; - if (d->vartype !=-1 && d->varname) { - char *link; - list = g_list_find_custom(l->args, d->varname, (GCompareFunc) filter_find_arg); - end = ""; - if (list) { - txt = arg_text(list->data); - if (txt == NULL) - txt = d->data; - else - free = TRUE; - link = g_strdup_printf("", d, list->data); - } else { - printf("cannot find arg '%s'\n", d->varname); - link = g_strdup_printf("", d, NULL); - txt = d->data; - } - html_write(l->html, l->stream, link); - g_free(link); - } else { - txt = d->data; - end = NULL; - } - html_write(l->html, l->stream, txt); - if (end) { - html_write(l->html, l->stream, end); - } - if (free) - g_free(txt); - break; - default: - /*printf("WARN: unknown desc text type '%s' = %s\n", detokenise(d->type), d->data);*/ - goto dotext; - } -} - -void -filter_description_html_write(GList *description, GList *args, GtkHTML *html, GtkHTMLStream *stream) -{ - char *txt; - struct description_decode_lambda l; - - d(printf("\ndecoding ...\n")); - - l.str = NULL; - l.args = args; - l.html = html; - l.stream = stream; - g_list_foreach(description, (GFunc) description_decode_html, &l); -} - -#ifdef TESTER -int main(int argc, char **argv) -{ - GList *rules, *options; - xmlDocPtr doc, out, optionset, filteroptions; - - gnome_init("Test", "0.0", argc, argv); - - doc = xmlParseFile("filterdescription.xml"); - - rules = load_ruleset(doc); - options = load_optionset(doc, rules); - - out = xmlParseFile("saveoptions.xml"); - options = load_optionset(doc, rules); - - while (options) { - printf("applying a rule ...\n"); - filterme(options->data); - options = g_list_next(options); - } - -#if 0 - out = xmlNewDoc("1.0"); - optionset = save_optionset(out, options); - filteroptions = xmlNewDocNode(out, NULL, "filteroptions", NULL); - xmlAddChild(filteroptions, optionset); - xmlDocSetRootElement(out, filteroptions); - xmlSaveFile("saveoptions.xml", out); -#endif - return 0; -} -#endif - diff --git a/filter/filter-format.h b/filter/filter-format.h deleted file mode 100644 index bdd047164e..0000000000 --- a/filter/filter-format.h +++ /dev/null @@ -1,10 +0,0 @@ - -#ifndef _FILTER_FORMAT_H -#define _FILTER_FORMAT_H - -#include - -char *filter_description_text(GList *description, GList *args); -void description_html_write(GList *description, GList *args, GtkHTML *html, GtkHTMLStream *stream); - -#endif /* _FILTER_FORMAT_H */ diff --git a/filter/filter-xml.c b/filter/filter-xml.c deleted file mode 100644 index 1979ab76f7..0000000000 --- a/filter/filter-xml.c +++ /dev/null @@ -1,580 +0,0 @@ -/* -*- Mode: C; c-file-style: "linux"; indent-tabs-mode: t; c-basic-offset: 8; -*- */ - -/* Load save filter descriptions/options from an xml file */ - -#include -#include -#include -#include - -#include -#include - -#include "filter-arg-types.h" -#include "filter-xml.h" - -#define d(x) - -struct token_tab { - char *name; - enum filter_xml_token token; -}; - -struct token_tab token_table[] = { - { "action", FILTER_XML_ACTION }, - { "address", FILTER_XML_ADDRESS }, - { "code", FILTER_XML_CODE }, - { "description", FILTER_XML_DESC }, - { "except", FILTER_XML_EXCEPT }, - { "folder", FILTER_XML_FOLDER }, - { "match", FILTER_XML_MATCH }, - { "name", FILTER_XML_NAME }, - { "option", FILTER_XML_OPTION }, - { "optionrule", FILTER_XML_OPTIONRULE }, - { "optionset", FILTER_XML_OPTIONSET }, - { "optionvalue", FILTER_XML_OPTIONVALUE }, - { "receive", FILTER_XML_RECEIVE }, - { "rule", FILTER_XML_RULE }, - { "ruleset", FILTER_XML_RULESET }, - { "send", FILTER_XML_SEND }, - { "source", FILTER_XML_SOURCE }, - { "text", FILTER_XML_TEXT }, -}; - -/* convert a name to a token value */ -static int -tokenise(const char *name) -{ - int i; - int len = sizeof(token_table)/sizeof(token_table[0]); - - if (name) { - for (i=0;i=0) { - for (i=0;i"; -} - - -static xmlNodePtr -find_node(xmlNodePtr start, char *name) -{ - d(printf("trying to find node '%s'\n", name)); - while (start && strcmp(start->name, name)) - start = start->next; - d(printf("node = %p\n", start)); - return start; -} - -static xmlNodePtr -find_node_attr(xmlNodePtr start, char *name, char *attrname, char *attrvalue) -{ - char *s; - - d(printf("looking for node named %s with attribute %s=%s\n", name, attrname, attrvalue)); - - while ( start && (start = find_node(start, name)) ) { - s = xmlGetProp(start, attrname); - d(printf(" comparing '%s' to '%s'\n", s, attrvalue)); - if (s && !strcmp(s, attrvalue)) { - free(s); - break; - } - free(s); - start = start->next; - } - return start; -} - -static GList * -load_desc(xmlNodePtr node, int type, int vartype, char *varname) -{ - struct filter_desc *desc; - xmlNodePtr n; - int newtype; - int newvartype; - char *newvarname; - GList *list = NULL; - - while (node) { - if (node->content) { - desc = g_malloc0(sizeof(*desc)); - desc->data = node->content; - desc->type = type; - desc->vartype = vartype; - desc->varname = varname?g_strdup(varname):0; - d(printf(" **** node name = %s var name = %s var type = %s\n", node->name, varname, detokenise(vartype))); - list = g_list_append(list, desc); - d(printf("appending '%s'\n", node->content)); - newtype = type; - newvartype = -1; - newvarname = NULL; - } else { - newtype = tokenise(node->name); - newvartype = tokenise_xmlfreeprop(xmlGetProp(node, "type")); - newvarname = xmlGetProp(node, "name"); - } - n = node->childs; - while (n) { - d(printf("adding child '%s'\n", n->name)); - list = g_list_concat(list, load_desc(n, newtype, newvartype, newvarname)); - n = n->next; - } - if (newvarname) - free(newvarname); - node = node->next; - } - return list; -} - -GList * -filter_load_ruleset(xmlDocPtr doc) -{ - xmlNodePtr ruleset, rule, n; - struct filter_rule *r; - int type; - int ruletype; - GList *rules = NULL; - - g_return_val_if_fail(doc!=NULL, NULL); - - ruleset = find_node(doc->root->childs, "ruleset"); - - while (ruleset) { - - rule = ruleset->childs; - - ruletype = tokenise_xmlfreeprop(xmlGetProp(ruleset, "type")); - - d(printf("ruleset, name = %s\n", ruleset->name)); - - while (rule) { - - n = rule->childs; - r = g_malloc0(sizeof(*r)); - r->type = ruletype; - r->name = xmlGetProp(rule, "name"); - - d(printf(" rule, name = %s\n", r->name)); - - while (n) { - type = tokenise(n->name); - d(printf(" n, name = %s\n", n->name)); - d(printf(" ncontent = %s\n", n->content)); - d(printf(" childs = %p\n", n->childs)); - if (n->childs) { - d(printf(" childs content = %s\n", n->childs->content)); - } - switch(type) { - case FILTER_XML_CODE: - r->code = xmlNodeGetContent(n); - break; - case FILTER_XML_DESC: - d(printf(" ** loading description\n")); - r->description = load_desc(n->childs, type, -1, NULL); - d(printf(" ** done loading description\n")); - break; - default: - printf("warning, unknown token encountered\n"); - break; - } - n = n->next; - } - if (r) - rules = g_list_append(rules, r); - rule = rule->next; - } - ruleset = find_node(ruleset->next, "ruleset"); - } - return rules; -} - -int -filter_find_rule(struct filter_rule *a, char *name) -{ - d(printf("finding, is %s = %s?\n", a->name, name)); - return strcmp(a->name, name); -} - -int -filter_find_arg(FilterArg *a, char *name) -{ - d(printf("finding, is %s = %s?\n", a->name, name)); - return strcmp(a->name, name); -} - -static FilterArg * -load_optionvalue(struct filter_desc *desc, xmlNodePtr node) -{ - FilterArg *arg = NULL; - - d(printf("creating arg entry for '%s'\n", desc->varname)); - - switch(desc->vartype) { - case FILTER_XML_ADDRESS: - arg = filter_arg_address_new(desc->varname); - break; - case FILTER_XML_FOLDER: - arg = filter_arg_folder_new(desc->varname); - break; - default: - d(printf("ok, maybe we're not\n")); - /* unknown arg type, drop it */ - return NULL; - } - - if (node == NULL) - return arg; - - filter_arg_values_add_xml(arg, node); - - return arg; -} - -GList * -filter_load_optionset(xmlDocPtr doc, GList *rules) -{ - xmlNodePtr optionset, option, o, or; - struct filter_option *op; - struct filter_optionrule *optionrule; - struct filter_rule *fr; - struct filter_desc *desc; - int type; - GList *l = NULL; - GList *lrule; - GList *ldesc; - - g_return_val_if_fail(doc!=NULL, NULL); - - optionset = find_node(doc->root->childs, "optionset"); - if (optionset == NULL) { - printf("optionset not found\n"); - return NULL; - } - option = find_node(optionset->childs, "option"); - while (option) { - o = option->childs; - op = g_malloc0(sizeof(*op)); - d(printf("option = %s\n", o->name)); - d(printf("option, type=%s\n", xmlGetProp(option, "type"))); - op->type = tokenise_xmlfreeprop(xmlGetProp(option, "type")); - while (o) { - char *rulestr; - - type = tokenise(o->name); - switch (type) { - case FILTER_XML_OPTIONRULE: - rulestr = xmlGetProp(o, "rule"); - lrule = g_list_find_custom(rules, rulestr, (GCompareFunc) filter_find_rule); - if (lrule) { - fr = lrule->data; - d(printf("found rule : %s\n", fr->name)); - optionrule = g_malloc0(sizeof(*optionrule)); - optionrule->rule = fr; - op->options = g_list_append(op->options, optionrule); - - /* scan through all variables required, setup blank variables if they do not exist */ - ldesc = fr->description; - while (ldesc) { - desc = ldesc->data; - if (desc->varname && desc->vartype!=-1) { - FilterArg *arg; - /* try and see if there is a setting for this value */ - or = find_node_attr(o->childs, "optionvalue", "name", desc->varname); - arg = load_optionvalue(desc, or); - if (arg) { - optionrule->args = g_list_append(optionrule->args, arg); - d(printf("Adding arg %s\n", arg->name)); - } - } - ldesc = g_list_next(ldesc); - } - } else { - /* FIXME: memleak */ - printf("Cannot find rule: %s\n", rulestr); - } - free(rulestr); - break; - case FILTER_XML_DESC: - d(printf("loading option descriptiong\n")); - op->description = load_desc(option->childs, type, -1, NULL); - break; - } - o = o->next; - } - l = g_list_append(l, op); - option = find_node(option->next, "option"); - } - return l; -} - -static xmlNodePtr -write_description(xmlDocPtr doc, GList *descl) -{ - xmlNodePtr d; - struct filter_desc *desc; - - desc = descl->data; - d = xmlNewDocNode(doc, NULL, "description", NULL); - xmlNodeSetContent(d, desc->data); - return d; -} - -xmlNodePtr -filter_write_optionset(xmlDocPtr doc, GList *optionl) -{ - xmlNodePtr root, option, optionrule, optionvalue; - GList *optionrulel, *argl; - struct filter_optionrule *or; - - root = xmlNewDocNode(doc, NULL, "optionset", NULL); - - /* for all options */ - while (optionl) { - struct filter_option *op = optionl->data; - - option = xmlNewDocNode(doc, NULL, "option", NULL); - xmlSetProp(option, "type", detokenise(op->type)); - - if (op->description) { - xmlNodePtr desc; - - desc = write_description(doc, op->description); - xmlAddChild(option, desc); - } - - optionrulel = op->options; - while (optionrulel) { - or = optionrulel->data; - - optionrule = xmlNewDocNode(doc, NULL, "optionrule", NULL); - xmlSetProp(optionrule, "type", detokenise(or->rule->type)); - xmlSetProp(optionrule, "rule", or->rule->name); - - argl = or->args; - while (argl) { - FilterArg *arg = argl->data; - - optionvalue = filter_arg_values_get_xml(arg); - if (optionvalue) - xmlAddChild(optionrule, optionvalue); - - argl = g_list_next(argl); - } - - xmlAddChild(option, optionrule); - - optionrulel = g_list_next(optionrulel); - } - - xmlAddChild(root, option); - optionl = g_list_next(optionl); - } - - return root; -} - -/* utility functions */ -struct filter_optionrule * -filter_clone_optionrule(struct filter_optionrule *or) -{ - GList *arg; - struct filter_optionrule *rule; - - rule = g_malloc0(sizeof(*rule)); - - rule->rule = or->rule; - arg = or->args; - while (arg) { - FilterArg *new = filter_arg_clone(FILTER_ARG(arg->data)); - gtk_object_set_data((GtkObject *)new, "origin", arg->data); - rule->args = g_list_append(rule->args, new); - arg = g_list_next(arg); - } - return rule; -} - -void -filter_clone_optionrule_free(struct filter_optionrule *or) -{ - GList *argl; - - d(printf("---- free optionrule\n")); - - argl = or->args; - while (argl) { - gtk_object_unref(GTK_OBJECT(argl->data)); - argl = g_list_next(argl); - } - g_list_free(or->args); - g_free(or); -} - -struct filter_optionrule * -filter_optionrule_new_from_rule(struct filter_rule *rule) -{ - struct filter_optionrule *or; - GList *descl; - - or = g_malloc0(sizeof(*or)); - - or->rule = rule; - - descl = rule->description; - while (descl) { - struct filter_desc *desc = descl->data; - if (desc->varname && desc->vartype != -1) { - FilterArg *arg = NULL; - switch (desc->vartype) { - case FILTER_XML_ADDRESS: - arg = filter_arg_address_new(desc->varname); - break; - case FILTER_XML_FOLDER: - arg = filter_arg_folder_new(desc->varname); - break; - } - if (arg) { - or->args = g_list_append(or->args, arg); - } - } - descl = g_list_next(descl); - } - return or; -} - -void -filter_description_free(GList *descl) -{ - GList *node; - - node = descl; - while (node) { - GList *next = g_list_next(node); - struct filter_desc *d = node->data; - - g_free(d->data); - g_free(d->varname); - g_free(d); - - node = next; - } - g_list_free(descl); -} - -void -filter_load_ruleset_free(GList *nodel) -{ - GList *node = nodel; - - while (node) { - GList *next = g_list_next(node); - struct filter_rule *r = node->data; - - filter_description_free(r->description); - - /* g_free(r->name); */ - /* g_free(r->code); */ - - g_free(r); - node = next; - } - g_list_free(nodel); -} - -void -filter_load_optionset_free(GList *optionl) -{ - GList *option = optionl; - while (option) { - GList *next = g_list_next(option); - struct filter_option *fo = option->data; - GList *optionrule = fo->options; - - while (optionrule) { - GList *next = g_list_next(optionrule); - struct filter_optionrule *or = optionrule->data; - GList *arg = or->args; - - while (arg) { - gtk_object_unref(arg->data); - arg = g_list_next(arg); - } - - g_list_free(or->args); - g_free(or); - optionrule = next; - } - filter_description_free(fo->description); - g_list_free(fo->options); - g_free(fo); - option = next; - } -} - -GList *filter_load_ruleset_file(const char *name) -{ - xmlDocPtr doc; - GList *rules; - - doc = xmlParseFile(name); - rules = filter_load_ruleset(doc); - xmlFreeDoc(doc); - - return rules; -} - -GList *filter_load_optionset_file(const char *name, GList *rules) -{ - xmlDocPtr doc; - GList *options; - - doc = xmlParseFile(name); - options = filter_load_optionset(doc, rules); - xmlFreeDoc(doc); - - return options; -} - -int filter_write_optionset_file(const char *name, GList *optionl) -{ - xmlDocPtr out; - xmlDocPtr optionset; - xmlNodePtr filteroptions; - int ret; - - out = xmlNewDoc("1.0"); - optionset = filter_write_optionset(out, optionl); - filteroptions = xmlNewDocNode(out, NULL, "filteroptions", NULL); - xmlAddChild(filteroptions, optionset); - xmlDocSetRootElement(out, filteroptions); - ret = xmlSaveFile(name, out); - xmlFreeDoc(out); - - return ret; -} diff --git a/filter/filter-xml.h b/filter/filter-xml.h deleted file mode 100644 index ce8a5ffc3a..0000000000 --- a/filter/filter-xml.h +++ /dev/null @@ -1,77 +0,0 @@ - -#ifndef _FILTER_XML_H -#define _FILTER_XML_H - -#include -#include - -#include "filter-arg.h" - -enum filter_xml_token { - FILTER_XML_TEXT=0, - FILTER_XML_RULE, - FILTER_XML_CODE, - FILTER_XML_DESC, - FILTER_XML_RULESET, - FILTER_XML_OPTION, - FILTER_XML_OPTIONRULE, - FILTER_XML_OPTIONSET, - FILTER_XML_OPTIONVALUE, - FILTER_XML_SOURCE, - FILTER_XML_SEND, - FILTER_XML_RECEIVE, - FILTER_XML_ADDRESS, - FILTER_XML_FOLDER, - FILTER_XML_NAME, - FILTER_XML_MATCH, - FILTER_XML_ACTION, - FILTER_XML_EXCEPT -}; - -struct filter_desc { - int type; - char *data; - char *varname; /* for named types */ - int vartype; -}; - -struct filter_rule { - int type; - char *name; - char *code; - GList *description; -}; - -struct filter_optionrule { - struct filter_rule *rule; - GList *args; /* FilterArg objects */ -}; - -struct filter_option { - int type; /* 'send' 'receive'? */ - GList *description; /* filter_desc */ - GList *options; /* option_rule */ -}; - -GList *filter_load_ruleset(xmlDocPtr doc); -GList *filter_load_optionset(xmlDocPtr doc, GList *rules); -xmlNodePtr filter_write_optionset(xmlDocPtr doc, GList *optionl); - -void filter_description_free(GList *descl); -void filter_load_ruleset_free(GList *nodel); -void filter_load_optionset_free(GList *optionl); - -GList *filter_load_ruleset_file(const char *name); -GList *filter_load_optionset_file(const char *name, GList *rules); -int filter_write_optionset_file(const char *name, GList *optionl); - -/* callbacks for searching GLists of various types */ -int filter_find_rule(struct filter_rule *a, char *name); -int filter_find_arg(FilterArg *a, char *name); - -/* utility functions */ -struct filter_optionrule *filter_clone_optionrule(struct filter_optionrule *or); -void filter_clone_optionrule_free(struct filter_optionrule *or); -struct filter_optionrule *filter_optionrule_new_from_rule(struct filter_rule *rule); - -#endif /* ! _FILTER_XML_H */ diff --git a/filter/filtertypes.xml b/filter/filtertypes.xml deleted file mode 100644 index f93a7b9c35..0000000000 --- a/filter/filtertypes.xml +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - (match-all (header-contains "From" ${sender})) - - The From address matches sender(s). - - - - - (match-all (header-contains "To" ${receipient})) - - The To address matches receipients. - - - - - (match-all (header-contains "Subject" ${words})) - - The Subject contains words. - - - - - (match-all (header-contains "CC" ${self-email})) - - I am in the cc list. - - - - - (& (> message-size (size-lower size-range)) - (< message-size (size-uppwer size-range))) - - The message is a certain size. - - - - - - - (copy-to ${folder}) - - Send a copy to folder. - - - - (forward-to ${address}) - - Forward the message to people. - - - - (delete) - - Delete message. - - - - (stop) - - Stop processing further rules for this message. - - - - - - - (match-all (not (header-contains "To" ${self-email}))) - - When I am the receipient. - - - - - - - - - - diff --git a/filter/vfoldertypes.xml b/filter/vfoldertypes.xml deleted file mode 100644 index bb12220d31..0000000000 --- a/filter/vfoldertypes.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - (match-all (header-contains "From" ${sender})) - - The From address matches sender(s). - - - - - (match-all (header-contains "To" ${receipient})) - - The To address matches receipients. - - - - - (match-all (header-contains "Subject" ${words})) - - The Subject contains words. - - - - - (match-all (header-contains "CC" ${self-email})) - - I am in the cc list. - - - - - - - - (match-all (not (header-contains "To" ${self-email}))) - - I am the receipient. - - - - - - - - - - diff --git a/help/.cvsignore b/help/.cvsignore deleted file mode 100644 index 550bd25cdb..0000000000 --- a/help/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile - diff --git a/help/C/apx-authors.sgml b/help/C/apx-authors.sgml deleted file mode 100644 index 7039f6c9c9..0000000000 --- a/help/C/apx-authors.sgml +++ /dev/null @@ -1,70 +0,0 @@ - - - Authors - - Evolution was written by: - - Seth Alves: alves@helixcode.com - Anders Carlssonandersca@gnu.org - Damon Chaplin:damon@helixcode.com - Clifford R. Conover rusty@zootweb.com - Miguel De Icaza: miguel@helixcode.com - Arturo Espinoza arturo@nucleu.unam.mx - Larry Ewing: lewing@helixcode.com - Bertrand Guiheneuf: bertrand@helixcode.com - Tuomas Kuosmanen: tigert@gimp.org - Christopher J. Lahey: clahey@helixcode.com - Matthew Loper: matt@helixcode.com - Dave Mason dcm@redhat.com - Federico Mena: federico@helixcode.com - Eskil Heyn Olsendeity@eski.dk - Nat Friedman: nat@helixcode.com - Ettore Perazzoli:ettore@helixcode.com - Russell Steinthal: rms39@columbia.edu - Peter Teichman: peter@helixcode.com - Chris Toshok: toshok@helixcode.com - Radek Doulik: rodo@helixcode.com - Dan Winship: winship@helixcode.com - Michael Zucchi: notzed@helixcode.com - -and other dedicated GNOME programmers. - - - The Evolution code owes a great debt - to the GNOME-pim and - GNOME-Calendar applications, and to - KHTMLW. The developers of - Evolution acknowledge the efforts - and contributions of all who worked on those projects. - - - - For more information please visit the - Evolution Web page. Please send all comments, - suggestions, and bug reports to the GNOME bug tracking - database. Instructions for submitting bug reports can be - found on-line at - http://bugs.gnome.org/Reporting.html. If you are using - GNOME 1.1 or later, you can also use command - bug-buddy for submitting bug reports. - - - This manual was written by Aaron Weber - (aaron@helixcode.com) with the help of the - application programmers and the GNOME Documentation Project. - Please send all comments and suggestions regarding the manual to - the GNOME Documentation Project at - docs@gnome.org. You can also add your comments - online by using GNOME Documentation - Status Table. - - - diff --git a/help/C/apx-bugs.sgml b/help/C/apx-bugs.sgml deleted file mode 100644 index eb30901422..0000000000 --- a/help/C/apx-bugs.sgml +++ /dev/null @@ -1,19 +0,0 @@ - - - Known bugs and limitations - - - This appendix describes known bugs and limitations of - Evolution. Please contact the - Evolution team (bugs@helixcode.com) or use - bug-buddy if you find one we have not - listed, or if you have a patch to fix one. - - - - - The bugs are many, but the application is young, and this is to - be expected. - - - diff --git a/help/C/apx-fdl.sgml b/help/C/apx-fdl.sgml deleted file mode 100644 index 7a85c6e4a2..0000000000 --- a/help/C/apx-fdl.sgml +++ /dev/null @@ -1,678 +0,0 @@ - - GNU Free Documentation License - - Version 1.1, March 2000 - - - - Copyright © 2000 -
- Free Software Foundation, Inc. - 59 Temple Place, Suite 330, - Boston, - MA - 02111-1307 - USA -
- Everyone is permitted to copy and distribute verbatim copies of this license - document, but changing it is not allowed. -
- - - - 0. PREAMBLE - - - The purpose of this License is to make a manual, textbook, or other - written document "free" in the sense of freedom: to assure everyone - the effective freedom to copy and redistribute it, with or without - modifying it, either commercially or noncommercially. Secondarily, - this License preserves for the author and publisher a way to get - credit for their work, while not being considered responsible for - modifications made by others. - - - - This License is a kind of "copyleft", which means that derivative - works of the document must themselves be free in the same sense. It - complements the GNU General Public License, which is a copyleft - license designed for free software. - - - - We have designed this License in order to use it for manuals for free - software, because free software needs free documentation: a free - program should come with manuals providing the same freedoms that the - software does. But this License is not limited to software manuals; it - can be used for any textual work, regardless of subject matter or - whether it is published as a printed book. We recommend this License - principally for works whose purpose is instruction or reference. - - - - - 1. APPLICABILITY AND DEFINITIONS - - - This License applies to any manual or other work that contains a - notice placed by the copyright holder saying it can be distributed - under the terms of this License. The "Document" , below, refers to any such - manual or work. Any member of the public is a licensee, and is - addressed as "you". - - - - A "Modified Version" of the - Document means any work containing the Document or a portion of it, - either copied verbatim, or with modifications and/or translated into - another language. - - - - A "Secondary Section" is a named - appendix or a front-matter section of the Document that deals exclusively with the - relationship of the publishers or authors of the Document to the Document's overall subject (or to - related matters) and contains nothing that could fall directly within - that overall subject. (For example, if the Document is in part a textbook of - mathematics, a Secondary Section - may not explain any mathematics.) The relationship could be a matter - of historical connection with the subject or with related matters, or - of legal, commercial, philosophical, ethical or political position - regarding them. - - - - The "Invariant Sections" are - certain Secondary Sections whose - titles are designated, as being those of Invariant Sections, in the notice that - says that the Document is released - under this License. - - - - The "Cover Texts" are certain - short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that - says that the Document is released - under this License. - - - - A "Transparent" copy of the - Document means a machine-readable - copy, represented in a format whose specification is available to the - general public, whose contents can be viewed and edited directly and - straightforwardly with generic text editors or (for images composed of - pixels) generic paint programs or (for drawings) some widely available - drawing editor, and that is suitable for input to text formatters or - for automatic translation to a variety of formats suitable for input - to text formatters. A copy made in an otherwise Transparent file format whose markup - has been designed to thwart or discourage subsequent modification by - readers is not Transparent. A - copy that is not "Transparent" - is called "Opaque". - - - - Examples of suitable formats for Transparent copies include plain - ASCII without markup, Texinfo input format, LaTeX input format, SGML - or XML using a publicly available DTD, and standard-conforming simple - HTML designed for human modification. Opaque formats include - PostScript, PDF, proprietary formats that can be read and edited only - by proprietary word processors, SGML or XML for which the DTD and/or - processing tools are not generally available, and the - machine-generated HTML produced by some word processors for output - purposes only. - - - - The "Title Page" means, for a - printed book, the title page itself, plus such following pages as are - needed to hold, legibly, the material this License requires to appear - in the title page. For works in formats which do not have any title - page as such, "Title Page" - means the text near the most prominent appearance of the work's title, - preceding the beginning of the body of the text. - - - - - - 2. VERBATIM COPYING - - - You may copy and distribute the Document in any medium, either - commercially or noncommercially, provided that this License, the - copyright notices, and the license notice saying this License applies - to the Document are reproduced in - all copies, and that you add no other conditions whatsoever to those - of this License. You may not use technical measures to obstruct or - control the reading or further copying of the copies you make or - distribute. However, you may accept compensation in exchange for - copies. If you distribute a large enough number of copies you must - also follow the conditions in section - 3. - - - - You may also lend copies, under the same conditions stated above, and - you may publicly display copies. - - - - - - 3. COPYING IN QUANTITY - - - If you publish printed copies of the Document numbering more than 100, and - the Document's license notice - requires Cover Texts, you must - enclose the copies in covers that carry, clearly and legibly, all - these Cover Texts: Front-Cover - Texts on the front cover, and Back-Cover Texts on the back cover. Both - covers must also clearly and legibly identify you as the publisher of - these copies. The front cover must present the full title with all - words of the title equally prominent and visible. You may add other - material on the covers in addition. Copying with changes limited to - the covers, as long as they preserve the title of the Document and satisfy these conditions, - can be treated as verbatim copying in other respects. - - - - If the required texts for either cover are too voluminous to fit - legibly, you should put the first ones listed (as many as fit - reasonably) on the actual cover, and continue the rest onto adjacent - pages. - - - - If you publish or distribute Opaque copies of the Document numbering more than 100, you - must either include a machine-readable Transparent copy along with each - Opaque copy, or state in or - with each Opaque copy a - publicly-accessible computer-network location containing a complete - Transparent copy of the Document, free of added material, which - the general network-using public has access to download anonymously at - no charge using public-standard network protocols. If you use the - latter option, you must take reasonably prudent steps, when you begin - distribution of Opaque copies - in quantity, to ensure that this Transparent copy will remain thus - accessible at the stated location until at least one year after the - last time you distribute an Opaque copy (directly or through your - agents or retailers) of that edition to the public. - - - - It is requested, but not required, that you contact the authors of the - Document well before - redistributing any large number of copies, to give them a chance to - provide you with an updated version of the Document. - - - - - - 4. MODIFICATIONS - - - You may copy and distribute a Modified - Version of the Document - under the conditions of sections 2 - and 3 above, provided that you - release the Modified Version under - precisely this License, with the Modified - Version filling the role of the Document, thus licensing distribution - and modification of the Modified - Version to whoever possesses a copy of it. In addition, you - must do these things in the Modified - Version: - - - - - - A - - Use in the Title Page (and - on the covers, if any) a title distinct from that of the Document, and from those of - previous versions (which should, if there were any, be listed in - the History section of the Document). You may use the same - title as a previous version if the original publisher of that - version gives permission. - - - - - - - B - - List on the Title Page, as - authors, one or more persons or entities responsible for - authorship of the modifications in the Modified Version, together with at - least five of the principal authors of the Document (all of its principal - authors, if it has less than five). - - - - - - - C - - State on the Title Page - the name of the publisher of the Modified Version, as the - publisher. - - - - - - - D - - Preserve all the copyright notices of the Document. - - - - - - - E - - Add an appropriate copyright notice for your modifications - adjacent to the other copyright notices. - - - - - - - F - - Include, immediately after the copyright notices, a license - notice giving the public permission to use the Modified Version under the terms - of this License, in the form shown in the Addendum below. - - - - - - - G - - Preserve in that license notice the full lists of Invariant Sections and required - Cover Texts given in the - Document's license notice. - - - - - - - H - - Include an unaltered copy of this License. - - - - - - - I - - Preserve the section entitled "History", and its title, and add - to it an item stating at least the title, year, new authors, and - publisher of the Modified Version - as given on the Title - Page. If there is no section entitled "History" in the - Document, create one stating - the title, year, authors, and publisher of the Document as given on its Title Page, then add an item - describing the Modified - Version as stated in the previous sentence. - - - - - - - J - - Preserve the network location, if any, given in the Document for public access to a - Transparent copy of the - Document, and likewise the - network locations given in the Document for previous versions it - was based on. These may be placed in the "History" section. You - may omit a network location for a work that was published at - least four years before the Document itself, or if the - original publisher of the version it refers to gives permission. - - - - - - - K - - In any section entitled "Acknowledgements" or "Dedications", - preserve the section's title, and preserve in the section all - the substance and tone of each of the contributor - acknowledgements and/or dedications given therein. - - - - - - - L - - Preserve all the Invariant - Sections of the Document, unaltered in their text - and in their titles. Section numbers or the equivalent are not - considered part of the section titles. - - - - - - - M - - Delete any section entitled "Endorsements". Such a section may - not be included in the Modified - Version. - - - - - - - N - - Do not retitle any existing section as "Endorsements" or to - conflict in title with any Invariant Section. - - - - - - - If the Modified Version includes - new front-matter sections or appendices that qualify as Secondary Sections and contain no - material copied from the Document, you may at your option designate - some or all of these sections as invariant. To do this, add their - titles to the list of Invariant - Sections in the Modified - Version's license notice. These titles must be distinct from - any other section titles. - - - - You may add a section entitled "Endorsements", provided it contains - nothing but endorsements of your Modified - Version by various parties--for example, statements of peer - review or that the text has been approved by an organization as the - authoritative definition of a standard. - - - - You may add a passage of up to five words as a Front-Cover Text, and a passage of up - to 25 words as a Back-Cover - Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of - Front-Cover Text and one of - Back-Cover Text may be added by - (or through arrangements made by) any one entity. If the Document already includes a cover text - for the same cover, previously added by you or by arrangement made by - the same entity you are acting on behalf of, you may not add another; - but you may replace the old one, on explicit permission from the - previous publisher that added the old one. - - - - The author(s) and publisher(s) of the Document do not by this License give - permission to use their names for publicity for or to assert or imply - endorsement of any Modified Version - . - - - - - - 5. COMBINING DOCUMENTS - - - You may combine the Document with - other documents released under this License, under the terms defined - in section 4 above for modified - versions, provided that you include in the combination all of the - Invariant Sections of all of the - original documents, unmodified, and list them all as Invariant Sections of your combined - work in its license notice. - - - - The combined work need only contain one copy of this License, and - multiple identical Invariant - Sections may be replaced with a single copy. If there are - multiple Invariant Sections with - the same name but different contents, make the title of each such - section unique by adding at the end of it, in parentheses, the name of - the original author or publisher of that section if known, or else a - unique number. Make the same adjustment to the section titles in the - list of Invariant Sections in the - license notice of the combined work. - - - - In the combination, you must combine any sections entitled "History" - in the various original documents, forming one section entitled - "History"; likewise combine any sections entitled "Acknowledgements", - and any sections entitled "Dedications". You must delete all sections - entitled "Endorsements." - - - - - - 6. COLLECTIONS OF DOCUMENTS - - - You may make a collection consisting of the Document and other documents released - under this License, and replace the individual copies of this License - in the various documents with a single copy that is included in the - collection, provided that you follow the rules of this License for - verbatim copying of each of the documents in all other respects. - - - - You may extract a single document from such a collection, and - distribute it individually under this License, provided you insert a - copy of this License into the extracted document, and follow this - License in all other respects regarding verbatim copying of that - document. - - - - - - 7. AGGREGATION WITH INDEPENDENT WORKS - - - A compilation of the Document or - its derivatives with other separate and independent documents or - works, in or on a volume of a storage or distribution medium, does not - as a whole count as a Modified - Version of the Document, - provided no compilation copyright is claimed for the compilation. - Such a compilation is called an "aggregate", and this License does not - apply to the other self-contained works thus compiled with the Document , on account of their being - thus compiled, if they are not themselves derivative works of the - Document. If the Cover Text requirement of section 3 is applicable to these copies - of the Document, then if the Document is less than one quarter of the - entire aggregate, the Document's - Cover Texts may be placed on - covers that surround only the Document within the aggregate. Otherwise - they must appear on covers around the whole aggregate. - - - - - - 8. TRANSLATION - - - Translation is considered a kind of modification, so you may - distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations - requires special permission from their copyright holders, but you may - include translations of some or all Invariant Sections in addition to the - original versions of these Invariant - Sections. You may include a translation of this License - provided that you also include the original English version of this - License. In case of a disagreement between the translation and the - original English version of this License, the original English version - will prevail. - - - - - - 9. TERMINATION - - - You may not copy, modify, sublicense, or distribute the Document except as expressly provided - for under this License. Any other attempt to copy, modify, sublicense - or distribute the Document is - void, and will automatically terminate your rights under this - License. However, parties who have received copies, or rights, from - you under this License will not have their licenses terminated so long - as such parties remain in full compliance. - - - - - - 10. FUTURE REVISIONS OF THIS LICENSE - - - The Free - Software Foundation may publish new, revised versions of the - GNU Free Documentation License from time to time. Such new versions - will be similar in spirit to the present version, but may differ in - detail to address new problems or concerns. See http://www.gnu.org/copyleft/. - - - - Each version of the License is given a distinguishing version - number. If the Document specifies - that a particular numbered version of this License "or any later - version" applies to it, you have the option of following the terms and - conditions either of that specified version or of any later version - that has been published (not as a draft) by the Free Software - Foundation. If the Document does - not specify a version number of this License, you may choose any - version ever published (not as a draft) by the Free Software - Foundation. - - - - - - Addendum - - - To use this License in a document you have written, include a copy of - the License in the document and put the following copyright and - license notices just after the title page: - - - - Copyright © YEAR YOUR NAME. - - - - Permission is granted to copy, distribute and/or modify this document - under the terms of the GNU Free Documentation License, Version 1.1 or - any later version published by the Free Software Foundation; with the - Invariant Sections being LIST - THEIR TITLES, with the Front-Cover - Texts being LIST, and with the Back-Cover Texts being LIST. A copy - of the license is included in the section entitled GNU Free - Documentation License. - - - - If you have no Invariant - Sections, write "with no Invariant Sections" instead of saying - which ones are invariant. If you have no Front-Cover Texts, write "no - Front-Cover Texts" instead of "Front-Cover Texts being LIST"; likewise - for Back-Cover Texts. - - - - If your document contains nontrivial examples of program code, we - recommend releasing these examples in parallel under your choice of - free software license, such as the GNU General Public - License, to permit their use in free software. - - - - -
\ No newline at end of file diff --git a/help/C/apx-gloss.sgml b/help/C/apx-gloss.sgml deleted file mode 100644 index 80f9b3f14b..0000000000 --- a/help/C/apx-gloss.sgml +++ /dev/null @@ -1,242 +0,0 @@ - - - - - Glossary - - - Attachment - - - Any file sent with an e-mail for the reciever to download. - - - - - - Automatic Indexing - - - Pre-sorting procedure that allows - Evolution to refer to data quickly. - It enables faster searches and decreases memory usage for - data displays. - - - - - - Bcc (Blind Carbon Copy) - - - A way of addressing a message. Bcc is used to send a group of - people an e-mail, while hiding their names and addresses from each - other. - - - - - - Cc (Carbon Copy) - - - Carbon-copies are used to send a 3rd party a copy of the e-mail, - so they an keep up to date on a conversation, without being in the - To: list. - - - - - - Druid - - - A small program or script used to help configure or set up some - larger program. The mail setup druid - helps you ready your email system for use. Druids are the Linux - equivalent of "Assistants" and "Wizards." - - - - - - Evolution - - - Evolution is the GNOME - groupware application. - - - - - - Execute - - - To run a program. Any file that can be run is called an - executable. In order to be execute program, a user must have - the proper permissions. - - - - - - Filter - - - Within Evolution, a filter is a method - of sorting mail automatically. - - - - - - Forward - - - By forwarding an e-mail, the user can send a third party a message - which was sent to the user originally. - - - - - - Groupware - - - Groupware is a term describing an application who has many - productivity features built into one program. - - - - - - Haiku - - - A Japanese form of poetry. Haiku are unrhymed, and - three lines long. The first and last lines should have five - syllables, and the second line seven syllables. The subject - matter is traditionally related to the seasons. - - - - - - HTML - - - Hyper-text Markup Language(HTML) is the layout - language which all webpages are written in. HTML can be used - inside of e-mails to insert images, justfiy text different ways, - and even include webpages inside the e-mail itself. - - - - - - Hot Key - - - Hot-keys are keyboard combinations used to do actions on a - computer instead of using the mouse to do the same action. - Hot-keys can speed up computer usage. - - - - - - iCal - - - iCal is the program which - Evolution uses to manage the calendar - section. - - - - - - Live Document - - - A document embedded in or attached an email message that - contains scripting or other active contents. For example, a - Gnumeric spreadsheet page could be - included in a message, and the recipient could alter some of the - data from within Evolution without - having to start another program. - - - - - - Mail Client - - - A mail client is the application which a user reads and sends - their e-mail with. - - - - - - Nautilus - - - Nautilus is the next generation file - manager for GNOME being written by Eazel. - - - - - - Nickname - - - An alias for an e-mail address. - - - - - - Script - - - A program which is written in an interpreted language, which can - be executed. - - - - - - Shortcut Bar - - - The Shortcut Bar is where the user accesses - all the components of Evolution from. - - - - - - Spam - - - Spam: useless e-mail. Spam normally comes in forms of - chain-letters and advertisements for websites or services. - - - - - - vFolder - - - vFolders allow an e-mail to be shared among multiple folders, so - it appears that theres a copy of the e-mail in each folder. - - - - - diff --git a/help/C/config-prefs.sgml b/help/C/config-prefs.sgml deleted file mode 100644 index 8ca4dbbc7d..0000000000 --- a/help/C/config-prefs.sgml +++ /dev/null @@ -1,202 +0,0 @@ - - - Advanced Configuration with the Preferences Window - - To change your configuration settings, select - Preferences from the - Settings menu. This will open the - preferences window, illustrated in . - Preferences are seperated into several categories: - - - - Identity, which allows you to set - your name, email address, and other information. The - default values are the ones found on your system account. - - - - - - Mail, which allows you to specify - your email server and protocols, as well as attachment - and HTML handling, forwarding behavior, filters, and - other Evolution behaviors - specific to email. The default behaviors are those - approved by Jamie Zawinski. - - - - - - Contacts, which allows you to - control addressbook sharing as well as other funcctions - specific to your contact manager. - - - - - - Calendar, which allows you to set - up calendar networking, as well as the way that your - calendar will behave and appear. The default view is by - week and the default calendar is Western. Time and - date are determined by the system clock and - localization, and cannot be set here. - - - - - - General, which covers everything - else, including the Evolution - startup screen. - - - - - - - -
- Preferences Dialog - - Preferences dialog - - - -
- - - - - Identity Settings - - If you have only one email address, or use automatic - forwarding to funnel multiple addresses into one, then you - will only need to configure one identity. To create a single - user with a single identity, enter the following information: - (INSERT detailed DESCRIPTION HERE) - - - - If you have one email accout for your personal life, and one - for work, you'll want to create multiple identities. You - can do this by: (INSERT DESCRIPTION HERE) - - - - Multiple Identities and Network Settings - - If you use multiple network connections—if, for - example, you dial up an ISP for your personal mail, and use - a LAN for your work-related tasks— you will also have - to set seperate network settings for each identity. - - - - - - Setting up the Network - - In order to do much of anything with - Evolution, you need to connect to - your network. To do that, you'll need to know your user name - and password, what sort of mail sending and receiving - protocols your network uses, and the names of the servers - you'll be using. If you're switching from another groupware - or email progam, you can almost certainly use the same - settings as you did with that program. Select the - Network tab in the - Preferences window to get started. - - - - Advanced Network Configuration - - INSERT a little introduction paragraph here. - - - Multiple Network Connections - - People with who use multiple ISP's or networks, or who - have multiple email accounts, will need to do a little - more work, but not much. - - - Multiple Identities and Networks - - Nate's laptop goes everywhere with him, and he needs - to be able to use Evolution - from anywhere&mdash a hotel room, an airplane, a - client's office, his office, anywhere at all. (INSERT - HOW EVOLUTION HELPS HIM DO THIS). - - - - - (INSERT DESCRIPTION OF WHAT THESE THINGS ARE AND HOW TO - USE THEM) (I'M THINKING IN TERMS OF THE APPLE LOCATION - MANAGER) (Kill this section if Evolution doesn't support - this for 1.0). - - - - - Other Advanced Network Settings - - I can't think of any at the moment but i'm sure they're - out there. They belong here. - - - - - - Modifying the Mail - - This section discusses mail-specific preferences. Click on - the Mail tab in the - Preferences window to access these - settings. - - - You can set the following options: - - - - - Managing the Contact Manager - - To set the behavior of your Contact Manager, click on the - Contact Manager tab in the - Preferences window. - - - You can set the following options: - - - - - Configuring the Calendar - - This section discusses calendar-specific preferences. Click - on the Calendar tab in the - Preferences window to access these - settings. - - - You can set the following options: - - - - - - General Preferences - - Overall Evolution prefs-- whatever else doesn't fit. - - -
- \ No newline at end of file diff --git a/help/C/config-setupassist.sgml b/help/C/config-setupassist.sgml deleted file mode 100644 index ea78865037..0000000000 --- a/help/C/config-setupassist.sgml +++ /dev/null @@ -1,126 +0,0 @@ - - - Easy Setup with the Setup Assistant - - The setup assistant can gather most of the information - necessary for Evolution's daily - operation. If you prefer more detailed or advanced - configuration, see - - - This paragraph will describe all information required by the - setup assistant. It will include a long itemized list, and a - screenshot or two. - - - Mail Setup - - The first time you try to send or receive mail with - Evolution, the mail - setup druid will pop up to help you - set up your email preferences. If you don't plan to use - email, or if you'd rather configure your email preferences - later, click Cancel. - - - The setup druid - will guide you through the network configuration process. It - will ask you for some basic information; your system - administrator or ISP should have the answers you'll need. - The mail setup druid is pictured in . - - - -
- Mail Setup Druid - - Evolution Main Window - - - -
- - - - - The druid will ask you for the following information: - - Name— Your - full name: eg. Eva Lucianne Tester - - Email address&mdash; - Your email address: eg. eltester@helixcode.com - - - - - Organization— Any - organization you represent. Leave this blank if you - wish. - - - - Signature File— A text - file appended to any email you send, typically your name - and email address, or a quotation you like. It should be - under three lines of text. - - - - Mail source type— - Evolution supports two mail - sources: POP servers, the most common email server type, - and UNIX-style MBOX files. Ask your system - administrator which one you use. - - - - - - Server— This should be the - name of your mail server, eg. - mailserver.organization.org - - - - - - Username— Usually, this is - the part of your email address before the @ character, - and Evolution has selected - that value as the default. If you have a different - username, you can enter it here. - - - - - - Authentication— Select the - type of authentication you will use. You can click - Detect supported types to find - out which authentication protocols your network allows. - - - - - - - Mail Transport— This is the - mail sending protocol you will want to use. Sendmail is - the default. - - - -
- - To learn how to configure Evolution - in greater detail, or to change preferences once you have set - them, see . - -
- -
- - - diff --git a/help/C/config-sync.sgml b/help/C/config-sync.sgml deleted file mode 100644 index ae78a6daaf..0000000000 --- a/help/C/config-sync.sgml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - Setting up your synchronization system - - Synchronization presents you with two issues you'll need to - deal with. The first one is pretty simple: you'll need to get - the data to move among the various devices you're using. If - you've already got Gnome-Pilot - working, then all you have to do is tell it to use Evolution - as a conduit. If you haven't used - Gnome-Pilot before, you'll need to - run the GNOME Control Center and go - through the hand-held device setup assistant. Then you can - create the Evolution conduit and press the hotsync button. - - - If that doesn't work, jump up and down several times and swear - loudly. Then make sure you've got - Gnome-Pilot going to the right - device (for my serial port, it's /dev/ttys0, not the default - /dev/pilot) and that you have read and write permission on - that device. If you don't you'll need to be added to whatever - group has those permissions (for my system, it's tty). - Alternately, if you're the only user of your computer and - don't care too much about security, just use - su to become root, and then use - chmod a+rw /dev/[DEVICENAME] to set - universal read and write permissions on that port— just - don't tell your sysadmin I said you could. (Sysadmins, of - course, would never do such a thing.) - - - Once Evolution knows where to get - the mail, address, and calendar data, it needs to know what to - do with it. When you synchronize your local data with the data on - a server or handheld device, you may run into conflicts: - perhaps you have ended up with two cards with the same name - and different addresses, or old mail that has been deleted - from one device but not the other. What if you want to keep - only the most recent mail on your hand-held or your laptop, - but all the mail on the LDAP server or your desktop machine? - Select the Synchronization tab from the - Preferences window to set up the - conflict resolution preferences. - - - You can set Evolution's - synchronization behavior in the following ways: - - - - - Data Loss Prevention - - It's always a good idea to make a backup. If you set your - synchronization behaviors wrong, you could end up deleting - the messages and cards you want to keep, and keeping the - ones you want to delete. Before you change these - preferences, make a backup of your - Evolution files. You can do - this by... - - - - diff --git a/help/C/devel-action.sgml b/help/C/devel-action.sgml deleted file mode 100644 index 5d40c78bf7..0000000000 --- a/help/C/devel-action.sgml +++ /dev/null @@ -1,18 +0,0 @@ - - - Actions: Making Evolution Behave - - Build Actions - - How to create an action. - - - - - Using Actions - - How to use an action you or someone else has built. - - - - \ No newline at end of file diff --git a/help/C/devel-component.sgml b/help/C/devel-component.sgml deleted file mode 100644 index db4f93c27d..0000000000 --- a/help/C/devel-component.sgml +++ /dev/null @@ -1,24 +0,0 @@ - - - Evolution Components - Build your own species - - Explain exactly what an Evolution Component is. - - - - Building Evolution Components - - Explain how to build them-- what resources are available, - what interfaces exposed. - - - - - Using Additional Evolution Components - - Once you've got one--either you've built it or borrowed it-- - you can use it. Here's how. - - - \ No newline at end of file diff --git a/help/C/devel-script.sgml b/help/C/devel-script.sgml deleted file mode 100644 index 74dbf161cd..0000000000 --- a/help/C/devel-script.sgml +++ /dev/null @@ -1,17 +0,0 @@ - - - Scripting: Making Evolution Sit up and Beg - - Writing Scripts - - How to write scripts for Evolution. - - - - - Using Scripts - - How to use and install scripts for Evolution. - - - diff --git a/help/C/evolution-guide.sgml b/help/C/evolution-guide.sgml deleted file mode 100644 index 1e76a74a7d..0000000000 --- a/help/C/evolution-guide.sgml +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - - - - - - - - - - - - -]> - - - - - - A User's Guide to Evolution - - AaronWeber - KevinBreit - - - - 2000Helix Code, Inc. - Kevin Breit - - - - - PUT THE RIGHT LEGALNOTICE IN HERE - - - - - This is version 0.4 of the Evolution manual. - - - - - - - - - &PREFACE; - - - Using Evolution - A Guide for Everybody - - - Part one of the Evolution manual - describes how to use Evolution - for email, contact management, and appointment and task - scheduling. You'll find as you go along that, as with most of - Linux, there's more than one way to do things, and you can - pick whichever method you like best. - - - - &USAGE-MAINWINDOW; - &USAGE-MAIL; - &USAGE-CONTACT; - &USAGE-CALENDAR; - &USAGE-SYNC; - - - - Configuring and Managing Evolution - A guide for Power Users and Administrators - - - Evolution is highly configurable. - Usually, when developers say that, they mean that they didn't - test it out thoroughly and have left it to other hackers to - "configure" themselves a working system. When we say - configurable, we mean that although - Evolution will work perfectly well - with minimal setup hassle, you can alter its behavior to fit - your needs with just a little more work. - - - - &CONFIG-SETUPASSIST; - &CONFIG-PREFS; - &CONFIG-SYNC; - - - Developing for Evolution - An Introduction for the Happy Few - - - There are three levels of developing for - Evolution. You can write actions. - You can write scripts. And you can write full-fledged - Evolution components. This paragraph will eventually - desfcribe what that means. - - - - &DEVEL-ACTION; - &DEVEL-SCRIPT; - &DEVEL-COMPONENT; - - &APX-GLOSS; - &APX-BUGS; - &APX-AUTHORS; - &APX-FDL; - - - - - - - - - - - - - diff --git a/help/C/fig/mail-druid-pic.png b/help/C/fig/mail-druid-pic.png deleted file mode 100644 index f29f3e77be..0000000000 Binary files a/help/C/fig/mail-druid-pic.png and /dev/null differ diff --git a/help/C/fig/mainwindow-pic.png b/help/C/fig/mainwindow-pic.png deleted file mode 100644 index b7c6067449..0000000000 Binary files a/help/C/fig/mainwindow-pic.png and /dev/null differ diff --git a/help/C/preface.sgml b/help/C/preface.sgml deleted file mode 100644 index 9ccb257e5e..0000000000 --- a/help/C/preface.sgml +++ /dev/null @@ -1,159 +0,0 @@ - - - - Introduction - -
- What is Evolution, and What Can It Do for Me? - - The idea of evolution as a process of improvement and - development is a strong influence on the developers at Helix - Code. We named our groupware suite - "Evolution" because we knew that it would be able to survive - in the wilderness of the software marketplace for one reason: - it's better. - - - Evolution is a suite of groupware - applications within the GNOME desktop environment that you can - use to send, receive, and organize email, manage address and - other contact information, and maintain a calendar. It - enables you to do those things on one or several computers, - connected directly or over a network, for one person or for - large groups. Evolution can handle - almost all your communications tasks with the power and - flexibility of the GNOME desktop environment. - - - We built Evolution with three groups of - people in mind: everyday users, system administrators, and - developers. - - - - - For everyday users, we made - Evolution easy to use without - sacrificing power. We made the interface familiar and - intuitive, but also allowed users to customize it to - their liking. We made the setup and configuration as - easy as possible. For any confusion, we wrote a - comprehensive manual and help system. - - - - - For administrators, we made sure - Evolution met and and - exceeded the standards set by currently available - groupware products, and we developed support for most - major network protocols so that it can integrate - seamlessly with existing hardware and network - environments. All of our efforts have made - Evolution both easy to use - and easy to support. - - - - - For developers, we built in - support for open standards and protocols to turn - Evolution into an advanced - development platform. From the simplest scripting to - the most complex network and component programming, - Evolution offers developers - the ideal environment for cutting-edge application - development. - - - - - For all three groups, we did our best to ensure the - safety of data. - - - - - - In action, Evolution makes most - daily tasks faster, because we built it to work with you - instead of against you. For example, it takes only one or two - clicks to enter an appointment or an address card sent to you - by email, or to send email to a contact or appointment. - Evolution makes displays faster and - more efficient, so searches are faster and memory usage is - lower. People who get lots of mail will appreciate - advanced features like vFolders, which - let you save searches as though they were ordinary mail - folders. - - -
- -
- About This Book - - - This version of the Evolution - User's Guide is a draft. It is missing - huge chunks of information, and many of the features it - describes are unimplemented. All the content is subject to - change, especially if you help. Please send comments on the - guide to aaron@helixcode.com. Items that are - known to need action are indicated as such, often with - notation like (INSERT CONTENT HERE). If you would like to - work on the guide please contact me or see the GNOME - Documentation project web site. This - paragraph will be removed in later versions of the manual. - - - - - This book is divided into three sections. The first section is - a guided tour— it will - explain how to use Evolution. If - you are new to Evolution or to - groupware in general, this is the section for you. The second - section, covering configuration, - is targeted at advanced users and administrators. If you are - a network administrator, you may find yourself referring to - this section frequently. The third section is a quick developer's guide, for power users and - hackers. If you want to add advanced scripting to - Evolution, write your own - embeddable components, or simply want to find out just how - powerful Evolution can be, this is - the section for you. - - - Throughout the book, you'll find examples, tips and warnings - to help you along. Most of them are decent, hardworking - pieces of information, and genuinely try to be helpful. Some - of the tips, entitled Bad Ideas, - are, in fact, out to trick you. Please don't follow their - advice, no matter how appealing it may sound. - - - Typographical conventions - - Some kinds of words are marked off with special typography. - It's listed below: - - Applications - Commands typed at the command line - Labels for menu items and buttons - Other text treatments - Other text treatments - - - -
-
- - - - - - diff --git a/help/C/usage-calendar.sgml b/help/C/usage-calendar.sgml deleted file mode 100644 index 83e03c80c0..0000000000 --- a/help/C/usage-calendar.sgml +++ /dev/null @@ -1,140 +0,0 @@ - - - The Evolution Calendar: Time-Tamer Extraordinaire - - To begin using the calendar, select - Calendar from the shortcut - bar. By default, the calendar starts in week view mode (IS - THIS TRUE? CHANGE TEXT TO FIT FEATURE). The calendar week view is - shown in : - - -
- Evolution Calendar View - - Evolution Contact Manager Window - - - -
- - -
- - Ways of Looking at your Calendar - - You can view your calendar by the day, by the week, by the - month, or by the year. To do so, click BUTTONS SOMEWHERE. - - - Describe the less-obvious differences among the views of - time here. - - - - In addition, Evolution supports - Hebrew, Muslim, and other calendar formats. To switch to a - different calendar format, choose - GUIMENUITEM from the - GUIMENU. - - - Describe the ways that different calendars can work here, - and how the different calendars work together. - - - - Scheduling With the Evolution Calendar - - The Evolution calendar allows - you to schedule events for yourself or a group of people. - It can handle events that repeat, event lengths from ten - minutes to multiple days, and events that have a date but - no specific time. You can set overlapping events, although - Evolution will warn you about - trying to do two things at once. You can also set event - reminders so that you don't forget about everything you've - just put into your calendar. Basically, it can handle almost - any schedule you throw at it. - - - Creating events - - While looking at the calendar, select New - Appointment from the - MENU, or press - KEYSYM. The New - Appointment dialog will appear. (INSERT - DESCRIPTION OF INTERFACE HERE: Date, Time, Recurrence, - Reminders, and Tentative/Confirmed) - - - You can alter those settings later by clicking once on the - event in the calendar view to - select it, and then choosing Event - Properties from the - Settings menu. - - - - - Appointments for Groups - - If you have your calendar set up to work with other - calendars over a network, you can see when others are - available to meet with you. To browse other people's - calendars over your local network, do this: - - - In addition, you can use - Evolution to mark a meeting - request on another person's calendar. To do so, first - select New Appointment from the - MENU, or press KEYSYM - to bring up the new event window. - Then describe the event as you would any other. Before - you click OK, (INSERT DESCRIPTION - HERE...). Evolution will - automatically send email to each person on the request - list, notifying of the time and date of the meeting you - have requested with them. In addition, it will mark the - event on your calendar and on theirs as tentative, rather than - a confirmed, event. - - - To mark a tentative event as confirmed, click once on the - event in the calendar view to - select it, and then choose Event - Properties from the - Settings menu. In the Event - Properties dialog window, click the - "tentative" button to un-mark the event. (NOTE THAT this - feature may not at all exist!) - - - - - Scheduling privileges - - There are several levels of scheduling privileges. You - can set whether people can see your calendar, whether they - can request meetings or appointments, and whether they can - create appointments. This section may have to be deleted, - because I don't know if we are going to support privileges - at all. - - - - - - Organizing your Appointments - - Until I have Evolution running properly, - I have no idea how this sort of organization will actually work. - - - But this section will have at least two paragraphs, and - probably a screenshot. - - -
diff --git a/help/C/usage-contact.sgml b/help/C/usage-contact.sgml deleted file mode 100644 index 6cc9cd605f..0000000000 --- a/help/C/usage-contact.sgml +++ /dev/null @@ -1,288 +0,0 @@ - - - The Evolution Contact Manager - - The Evolution contact manager can - handle all of the functions of an address book, phone book, - or Rolodex. Of course, Evolution - allows easier updates than an actual paper book, and much - easier synchronization with handheld and remote devices. And - I doubt that you can take your little black book and make it - accessible to the rest of your office over a network. Since - Evolution supports most major - network protocols, including IMAP and - LDAP, it's easy to use over an - existing network. - - - Antother advantage of Evolution - is that the address book is integrated into the rest of - the application. That means that when you look for - someone's address, you can also see a history of - appointments with that person, and when you get an email - with contact information in it, you can create a new address - card very quickly. In addition, searches, folders, and - vFolders all work in the same intuitive way they do in the - other components, so you don't have to learn another system - for similar tasks. - - - This chaper will cover the usage of the - Evolution contact manager, - including organizing large amounts of contact data, sharing - addresses over a network, and the automation - capabilities of the address book. Contact manager - configuration is addressed in . - - - - Getting Started With the Contact Manager - - - To start managing your contacts, click on - Contacts in the shortcut bar. - - - Describe the interface. Include the fact that the - whole address book consists of a set of cards, organized into - folders. - - - - Creating, Deleting, and Adding Cards - - You can create a new card by pressing the New - Card button, or by pressing - KEYSYM. The New Card - window will appear. It has the following fields: - - - - Name: Enter the person's name here - - - - - - Address: - - - - Something - - - - Something - - - - - You can choose which fields an address card has, and create - new fields for cards. For example, - Evolution provides for two line - postal addresses by default, but you may have as many or as - few lines to an address as you wish. To change which - fields an address card has, choose DESCRIBE HERE HOW TO DO - THIS - - - - Quick ways to add cards - - You can add cards from within an email message or calendar - appointment. While looking at an email, right-click on - any email address or message, and choose - Create Card for this Address or - Create Card for this Senderfrom - the menu that appears. While looking at a calendar - appointment, right-click any email address, and choose - Create Card for this Address. - (NOTE that feature may change! unimplemented!) - - - - - You delete a card by pressing the Delete - Card button, or by dragging it into the trash folder. - - - - You can move cards around just as you would with email: - dragging and dropping works, as does right-clicking and - selecting Move from the menu - that appears. - - - - - Organizing your Contact Manager - - Organizing your contact manager is a lot like organizing - your mail. You can have folders and searches the same way - you can with mail, but the contact manager does not allow - vFolders. It does, however, allow each card to fall under - several categories, and allow you to create your own - categories. We'll go over categories in a bit. - - - Another useful UNIMPLEMENTED - Evolution feature is its ability - to recognize when people live together. If two people in - your contact manager share an address, and you change the - address for one of them, Evolution will ask you if you wish - to change the address for both of them, or just for one. - - - - Groups of contacts - - Evolution lets you put cards - into folders, mark them as members of different groups, - and search through them in a variety of ways. This - section will describe how to organize and find contact - information using Evolution. - CHANGE THIS paragraph: it needs a great deal of work. - - - - Grouping with Folders - - The simplest way to group address cards is to use - folders. By default, cards start in the - Contacts folder. You can create - more folders inside that one, or create other address - book folders as well. Each card must be in one and only - one folder. - - - To create a new folder, do this: - - - To put a card into a folder, do this: - - - - - Grouping with Categories - - The other way to group cards is to mark them as - belonging to different categories. The difference - between folders and categories is that folders contain - cards, but category membership is a property of each - card. That means that you can mark a card as being in - several categories or no category at all. For example, - I put my friend Matthew's card in the "Business" category, - because he works with me, the "Friends" category, because - he's also my friend, and the "Frequent" category, because - I call him all the time and can never remember his phone - number. - - - To mark a card as belonging to a category, do this: - - - Then, you can refer to all the cards in that category - by: - - - If the default categories don't suit you, you can add - your own. Here's how: - - - - - - - Sharing your Cards (and keeping them to yourself) - - Cards can be shared over a network. This is the sort of - feature you'll want to use if your company has a list of - vendors and clients that needs constant updating. If you - also share your calendars, people can avoid duplicating - work and keep up to date on developments within their - workgroup or across the entire company. - - - - Sharing Address Cards and Calendar Data - - I want to schedule a meeting with someone at Company - X, but I'm not sure who to talk to there. Our - corporate network has an address card that states our - contacts there, so I know whom to call. Since we also - share the calendars, I know that Deanna has already - scheduled a meeting with them next Thursday, and I can - either go to the meeting myself or ask Deanna to - discuss my concerns for me. Either way, I avoid - having to schedule yet another meeting with Company X, - which is good since everybody hates their products and - they're doomed to fail anyway. - - - - - Of course, you don't want to share all of your cards— - why overload the network with a list of babysitters, or - tell everyone on your network you're talking to new job - prospects? Evolution lets you - decide which folders you want to make accessible to others. - - - To begin sharing a folder of address cards, select (something) . The - Sharing window will pop up. It contains: - - - - - - Automating the Contact Manager - - The Evolution contact manager - can perform a wide variety of tasks for you. From speeding - up basic tasks like adding a new address card to managing - mailing lists, you'll find that the contact manager is more - than a mere address book. - - - - Send me a card: Adding New Cards Quickly - - When you get information in the mail or in a calendar - entry, you can add it to an address card. To do so, right - click on any email address or email message, and select - Add Address Card from the menu - that appears. Of course, - Evolution adds cards from a hand-held device - during HotSync operation. For more information about - that, see . - - - - - Managing a Mailing list - - You already know that when you are writing an email, you - can address it to one or more people, and that - Evolution will fill in - addresses from your contact manager's address cards if - you let it. In addition to that, you can send email to - everyone in a particular group by doing SOMETHING HERE. - Future versions of Evolution - will allow you to you export a group of cards to a - spreadsheet, database, or word processor so you can print - address labels or prepare large postal mailings. - - - - Map It! and other extra features - - Need a map or directions? Click - MapIt from within the contact - manager, and Evolution will - map the address for you online. - - - - \ No newline at end of file diff --git a/help/C/usage-mail.sgml b/help/C/usage-mail.sgml deleted file mode 100644 index 2dd289e4c3..0000000000 --- a/help/C/usage-mail.sgml +++ /dev/null @@ -1,776 +0,0 @@ - - - Evolution Mail - - An Overview of the Evolution Mailer - - Email is an integral part of life these days, and - Evolution mail is here to help - you keep track of it. Evolution - email is like other email programs in all the ways you would - hope: - - - - Item: Description - - - - - Item: Description - - - - - Item: Description - - - . - - - However, Evolution has some - important differences. First, it's built to handle very - large amounts of mail without slowing down or crashing. We - had high mail volumes in mind when we designed our filtering and - searching - functions. There's also the - Evolution vFolder, an - advanced organizational feature not found in other mail - clients. If you get a lot of mail, or if you keep every - message you get in case you need to refer to it later, - you'll find that feature especially useful. - - - - You can start reading email by clicking - Inbox in the shortcut bar. By - default, the Inbox is open when you - start Evolution, and the first - time you see your inbox, there's a message in it from Helix - Code welcoming you to the application. - - - - - Reading, Getting and Sending Mail - - Reading a Message - - The first time you open your - Evolution - Inbox, you will see a window like the - one in , with a - message from Helix Code in the message - list. The message is displayed - below that, in the view pane. If - you find the view pane too small, - you can double-click on the message in the - message list to have it open in a - new window. As is the case with folders, you can - right-click on messages in the message list and get a - menu of possible actions. - - - Go ahead and right-click on the message, and select - Delete Message from the menu - that appears. The message will move into the - Trash folder. If you want to keep - it, you can open the Trash folder - and drag the message back to your - Inbox. The trash will be - automatically emptied the next time you quit - Evolution. (FEATURE - UNIMPLEMENTED! Text may change to fit featureset) - - - -
- Evolution Mail - - Evolution Mail - - - -
- -
-
- - - - - Getting Mail - - To check your email, just click Send and - Receive in the toolbar. If this is the first - time you've done so, the mail druid - will ask you for the information it needs to check your - mail (see for more - information). Then, Evolution - will download your mail for you and send any mail you've - marked ready to send. New mail will appear in your - Inbox and also in the - Today View. - - - - If you get an error message instead of mail, you probably - need to change your network preferences. To learn how to - do that, have a look at , or ask your system - administrator. - - - - Attachments, HTML Mail, and Live Documents - - If you receive a file attached to an email, - Evolution will ask where you - want to put it. Once you've downloaded a file, you can - open, move, copy, or execute it just like any other, - using Nautilus or your - favorite shell or file manager. (This text will change - to fit app behavior, once features are implemented.) - - - - Evolution can also display - HTML-formatted mail, complete with graphics. HTML - formatting will display automatically, although you can - turn it off if you prefer. - - - - It can also display live - documents, which have scripted or - executable contents— for example, a working - spreadsheet page or a chess game. - - - Bad Idea - - When someone you don't know sends you an attached - program, go ahead and run it. Set your preferences to - always run live documents when you recieve them, too. - Everybody knows all that virus stuff is just a Windows - problem. - - - - - - - Writing and Sending Mail - - You can start writing a new - email message by selecting New - Mail from the File Menu, - or by pressing Ctrl-N. When you do so, - the New Message window will open, - as shown in . - - - -
- New Message Window - - Evolution Main Window - - - -
- - - - Enter an address in the To: field, a - message in the Message: field, and - press Send and Receive. That's - easy. It may even be too easy, which is why I like to - queue my messages up to be sent a few minutes later. - - - Send Now, Send Later - - Evolution will send mail immediately unless you tell - it to do otherwise by selecting Send - Later from the MENU. - Then, when you press Send & - Receive, all your unsent messages will go - out at once. I like to use "Send Later" because it - gives me a chance to change my mind about a message - before it goes out. That way, I don't send anything I'll - regret the next day. - - - To learn more about how you can specify message queue - and filter behavior, see . - - - - - - There is quite a bit more to sending mail, though. In the - next few sections, you'll see how - Evolution handles additional features, - including mailing lists, attachments, and forwarding. - - - - - Choosing Recipients - - If you have created address cards in the contact - manager, you can also enter nicknames or other portions - of address data, and - Evolution will complete the - address for you. (INSERT description of UI for this - feature, once it is decided upon). If you enter a name - or nickname that can go with more than one card, - Evolution will open a dialog box to ask you which person - you meant. (QUESTION: will users be able to drag & drop - address cards to send email?). For more information - about using email together with the contact manager and - the calendar, see and . - - - In addition, you can mark recipients in three different - ways. The To: field is for the - primary recipients of the message you are going to send. - However, it is considered bad form to have more than a - few email addresses in this section. - - - If you're writing to one person, but want to keep a - third party up to date, you can use - Cc:. Hearkening back to the dark - ages when people used typewriters and there were no copy - machines, "Cc" stands for "Carbon Copy." Use it - whenever you want to share a message you've written to - someone else. - - Using the Cc: field - - Say, for example, Susan sends an email to a client. - She puts her co-worker, Tim, in the in the - Cc: field, so that he know - what's going on. The client can see that Tim also - recieved the message, and know that they can talk - to Tim about the message as well. - - - - - If you have a large number of recipients, or if you want - to send mail to several people without sharing the - recipient list, you should use - BCc:. "BCc" stands for "Blind - Carbon Copy", and means that people listed in the - BCc: are excluded from the - recipient list, although they will receive the message - and the list of addresses from the - To: and Cc: - fields. - - - Using the BCc: field - - Let's say Tim sends an email to a client, and wants - his supervisor to know what he wrote. He doesn't, - however, want the client to start writing his - supervisor about the project— it's Tim's job - to deal with the client. So Tim puts his - supervisor's email address in the - BCc: field. That way, the - client has one contact, and the boss stays in the - loop. - - - - - - - Replying to Messages - - In order to reply to a message, click on it once in the - message list to select it. Then press the - Reply button, or use the - REPLY COMBO hot key. A window like - the New Message window will - appear, but the subject will already be present— - typically, your new message will have the same subject - as the message to which you are replying, but with Re: - before it, to mark it as a reply. In addition, the - full text of the previous message may be inserted into - the new message, with the > character before each - line. This indicates quoting. You can intersperse - your message with the quoted material as shown in - - - -
- Reply Message Window - - Evolution Main Window - - - -
- - -
- - - If a message has several recipients, as in the case of - mailing lists or messages that have been carbon copied, - you may wish to select one of the items under the - Reply-To submenu on the - MENU menu. This will allow you to - choose one or several of the other message recipients in - addition to the person who originally sent you the - message. If there are large numbers of people in the - Cc: or To: - fields, this can save substantial amounts of time. In - addition, Reply-To makes it very easy to keep off-topic - conversation away from mailing lists and newsgroups. - - Using the Reply-To feature - - Returning again to the email Susan sent to Tim and - their client, you'll note that the Reply-To feature - allows the client to decide whether to reply just to - Susan, or to both Tim and Susan by selecting - a menu item, rather than by cutting and pasting the - email addresses. - - - -
- - - Embellishing that email - - Evolution allows you to - make your email more attractive in a number of ways. You - can send messages formatted with HTML, attach any sort - of file to them, and even include live documents, like - spreadhseets or chess games. This section will tell - you how. - - - - Colors, pictures, and fonts with HTML Mail - - Most email messages are sent as plain text, but they - can also be sent as HTML, which means they can include - color, text style, and other formatting information. - Evolution will read and display HTML properly without - trouble, and also allows you to send outgoing - email messages as HTML. To send an HTML message, just - use the composition toolbar to add formatting; - your message text will appear formatted in the composer - window, and the message will be sent as HTML. - - - A Technical note on HTML Tags - - Any text, including HTML tags, entered into the - message composition window is assumed to be plain - text. If you enter HTML directly into the - composer— say, <BR>Bold Text</BR>, - the the composer will assume you meant exactly that, - and not "make this text bold," as a HTML composition - tool would. For the very technically inclined, that - means that when the text <BR> is sent as HTML, it - will be converted to the string - &lt;BR&gt;. - - - - Some people do not have HTML-capable mail clients, or - prefer not to receive HTML-enhanced mail because it is - slower to download and display. - Some people refer to HTML mail as - "the root of all evil" and get very angry if you send - them HTML mail, which is why the default in - Evolution is plain text. - If you choose to send HTML mail, but have an address - book entry for someone who does not wish to receive - HTML-enhanced mail, you can note that preference in - their address card. The mailer will automatically - strip the HTML tags from any messages you send to that - address. - - - - - Attachments - - If you want to attach a file to your email message, - you can do so by . If - your recipients can read HTML mail, you can put an - image inside the mail by dragging the file into the - composer window, or by selecting Menu - Item from the Menu - menu. Still, unless you know what email client the - recipient is using, it's best to send a message or - attachment in the simplest manner possible. - - - - Live Documents - - Later versions of Evolution - will allow you to enliven your email with almost any - sort of document, and even with entire - applications. At this point, however, I don't know how - that will work. - - - - - - Forwarding Mail - - Forward is useful if you have - received a message and you think someone else would like - to see it, or if you get a message intended for someone - else. You can forward a message as an attachment to a - new message (the default way of forwarding) or you can send it - inline as a quoted portion of the - message you are sending. Attachment forwarding is best - if you want to send the entire message you received, - unaltered. Inline forwarding is best if you want to - send portions of a message, or if you have a large - number of comments on different sections of the message - you are forwarding. Remember to note from whom the - message came, and where, if at all, you have removed or - altered content. - - - To forward a message, first make sure it is selected by - clicking it once in the message list. Then, press - Forward on the toolbar, or select - SOMETHING. To forward a message inline instead of as an - attachment, DO SOMETHING ELSE. Choose an addressee as - you would when sending a new message; the subject will - already be entered, but you can alter it. Enter your - comments on the message in the composition - frame, and press Send and - Receive. To forward it - inline instead of attached, - select Forward Inline from - the Message menu. - - - - Seven Tips for Email Usage - - I started with ten, but four were "Don't send - spam." - - - - Always begin and close with a salutation. Say - "please" and "thank you", just like you do in real - life. You can keep your pleasantries short, but be pleasant! - - - - - - ALL CAPS MEANS YOU'RE SHOUTING! - - - - - - Never write anything in email you wouldn't say in - public. Old messages have a nasty habit of - resurfacing when you least expect them to. - - - - - - Check your spelling and use complete sentences. - - - - - - Don't send nasty emails (flames). If you get one, - don't write back. - - - - - - Don't send spam or forward chain mail. If you - must, verify any rumors, and make sure the - message doesn't have multiple layers of email - quotation symbols (>) indicating multiple - layers of careless inline forwarding. - - - - - - When you reply or forward, include just enough of - the previous message to provide context. Not too - much, not too little. - - - - - Happy mailing! - -
-
- - - Organizing Your Mail - - Even if you only get a few email messages a day, you - probably want to sort and organize them. When you get a - hundred a day and you want to refer to a message you - received six weeks ago, you need to sort and organize them, - and Evolution has the tools to - help you do it. - - - - Getting Organized with Folders - - Mail, as well as address cards and calendars, is kept in - folders. If you like, you can create new folders by - selecting New and then - Folder from the - File menu, or by pressing - COMBO. (Will there be a dialog box to - determine name and location? Must wait for feature to - describe.) The new folders will appear in the - tree view, and you can drag them - wherever you want to relocate them. You can move messages - into the folders by dragging and dropping, or by selecting - them and choosing ITEM from the - MENU. If you create filters with the - filter druid, you can have mail - moved to a folder automatically. An email message can be in - only one folder at a time, just like real mail in real - folders. This is also the case for folders of address - cards and calendar information. - - - - - Searching for Messages - - Because Evolution automatically - creates an index of every email you send or receive, it - can search through your old messages and present you with - results very quickly. You can search for messages by - author, subject, keyword, or headers. (INSERT descriptons - of what those terms mean) - - - To create a search, enter the word or phrase you're - looking for in the form field below the toolbar, and - choose a search type: - - - - Body or subject contains: This - will search message subjects and the messages - themselves for the word or phrase you've entered in - the search field. - - - - - - Body contains: This will search - only in message text, not the subject lines. - - - - - - Subject contains: This will - show you messages where the search text is in the - subject line. It will not search in the message body. - - - - - - Body does not contain: This - finds every email message that does not have the - search text in the message body. It will still show - messages that have the search text in the subject - line, if it is not also in the body. - - - - - - Subject does not contain:This - finds every mail whose subject does not - contain the search text. - - - - - - - - - Getting Really Organized with Virtual Folders - - If you find yourself performing a search frequently, you - can save it as a virtual folder. Virtual folders, or - vFolders, are an advanced way of viewing your email - messages within Evolution. If - you get a lot of mail or often forget where you put - messages, vFolders can help you stay on top of things. - - - A vFolder looks and acts a lot like a folder, but it's - actually a saved search that you can access in most of the - same ways you would a regular folder. The one important - differences between them is that a conventional folder - actually contains messages, but a vFolder is a view of - messages that may be in several different folders. This - means that while a message may fall into several vFolders, - it can be in only one conventional folder. Also, it means - that you cannot remove a message from a vFolder unless you - delete it, and you cannot add a message to a vFolder - unless you change the vFolder's search criteria. - - - As messages that meet the vFolder criteria arrive or are - deleted, Evolution will - automatically place them in and and remove them from the - vFolder contents list. When you delete a message, it gets - erased from the folder it actually exists in as well as - any vFolders which include it. - - - That's pretty complicated. But it can be useful. For - example, if I have a folder for all the email from one - person, and another folder for all the email on a given - topic, I feel organized. But when the person sends me - mail about the topic, my whole email filing universe - becomes chaotic. I need vFolders to save the day for me. - - - That sounds silly, but imagine a business trying to keep - track of mail from hundreds of vendors and clients, or a - university with overlapping and changing groups of - faculty, staff, administrators and students. The larger - the system, the less you can afford that sort of - confusion. vFolders make for better organization because - they can accept overlapping groups in a way that regular - folders and filing systems can't. - - - - Using Folders, Searches, and vFolders - - To organize my mail box, I can set up a vFolder - for emails from my friend Vince, by doing (INSERT - PROCESS HERE). Then, whenever I want to see the - messages Vince has sent me, I open the vFolder, and - every message he's sent me shows up, no matter where - I've actually filed it. If I want, I can also create a - vFolder containing any message from my list of - co-workers which also has the name of the project in - it. That way, when Vince sends me mail about the - project, I can see that message both in the "Vince" - vFolder and in the "Project" vFolder. That's because - when I open up the "Vince" folder, I'm really - performing a search for all the mail from Vince, and - when I open the "Project" folder I'm really performing - a search for all the mail about the project. - - (INSERT SCREENSHOT HERE) - - - - - - - Staying organized: Mail Filters in Evolution - - Filters sort your email for you. People who subscribe to - multiple mailing lists, or who often need to refer to - messages they have sent, find filters especially helpful - to seperate personal from list-related mail, but they're - good for anybody who gets more than a few messages a day. - To create a filter, go to your - Inbox. Then select - Filter Druid from the - Tools menu. This will start the a - druid, which will allow you to - create filters. - - - The filter druid window - contains a window listing rules, and an option to create a - new rule. To start filtering your mail, click - Add to add a filtering rule. - You'll decide when it should take place: - - - - When mail arrives: Select - this option to have messages filtered as they - arrive. - - - - - When mail is sent: Select - this option to filter your outgoing mail. You - can use this feature to keep your - Outbox as organized as - your Inbox. - - - - - - - Then, the filter druid will ask you which emails it should - act upon. You can set criteria to include words or phrases - in the subject, To:, Cc: or body of the message. Once - you've decided which messages to filter, the druid will ask - you the sort of action you wish to take. More details and - screenshots should follow here. - - - - - Two Notable Filter Features - - - Any incoming email that does not meet - filter action criteria remains in the Inbox. - - - If you move a folder, your filters - will follow it. - - - - - -
- diff --git a/help/C/usage-mainwindow.sgml b/help/C/usage-mainwindow.sgml deleted file mode 100644 index a917f3a71f..0000000000 --- a/help/C/usage-mainwindow.sgml +++ /dev/null @@ -1,264 +0,0 @@ - - - - The Main Window: Evolution Basics - - - Start Evolution by selecting - Evolution from the - Applications of the Main - Panel Menu, or by typing - evolution at the command-line.After - Evolution starts up, you will see - the main window, which looks a lot like - in . On the left of the - main window are the shortcut - bar and the tree-view. - Just underneath the title bar is a series of menus in the - menu bar, and below that, the - tool bar with buttons for different - functions. The largest part of the main - window is taken up by a welcome message. - - - - - -
- Evolution Main Window and Inbox - - Evolution Main Window - - - -
- - - - - The Way Evolution Looks - - The appearance of both - Evolution and - GNOME is very easy to - customize, so your screen might not look like this - picture. You might configure - Evolution to start with a - different view, or without the shortcut - bar or tree view. - - -
- - - The Shortcut Bar - - The buttons in the shortcut bar give - you quick access to the different functions that - Evolution provides. - - - The buttons in the shortcut bar are: - - - - Today, which will bring up a summary - of any new messages you've recieved, along with the tasks and - appointments you have lined up for today. - - - - - - Inbox, which will show you all - of your email. Your Inbox is also where you can - access Evolution's tools to filter, sort, organize, - and search your mail. - - - - - - The Calendar, which can store - appointments for you. Connected to a network, you - can use it to keep a group of people on schedule and - up to date. - - - - - - The Contacts tool holds your - addresses, phone numbers, and contact information. - Like calendar information, contact data can be - synchronized with hand-held devices and shared over a - network. - - - - - - The Tasks tool combines a "to - do" list with reminders to help you keep track of - daily events. - - - - - Notes is your catch-all - notepad: write haiku, take down - messages from phone conversations, or keep small - things organized. - - - - - - - - If you prefer to use a keyboard shortcut, or hot - key, you can use those instead. They're - shown... (INSERT DESCRIPTION) You can also set your own hot - keys for functions that don't have any; this is covered in - . If you're using the keyboard - shortcuts you may also want to hide the shortcut - bar by selecting Hide/Show Shortcut - Bar from the MENU menu. - - - - - The Tree View - - The tree view is the most comprehensive way to - get to your information: it can show you everything you've - stored with Evolution - appointments, address cards, emails, and so forth. - - The tree view display presents your - data like a file tree— it - starts small at the top, and branches downwards. There are a - few folders you will always see, because they're at the top. - On my computer, I have only one: Local. - When I click on the plus sign next to the label, I see the - contents: - - - - Calendar, where you'll find the - appointments and event listings. - - - - - Contacts, where your address - cards are stored. - - - - - Directories, for directories, which - have not been implemented yet. - - - - - Inbox, for your incoming mail. - This is where you will make the most subfolders. - - - - - Outbox, where you can store - copies of mail you have sent, or unsent drafts. - - - - - Trash, where you can throw things away. - - - - - - - - Right-clicking will bring up a menu for just about anything - in GNOME, and Evolution is no - exception. If you right-click on a folder, you'll have a - menu with the following options: - - Something - Something - Something - . - - - - Context-Sensitive Help - - You can almost always get help on an item by - right-clicking it. If you're not sure what something is, - or don't know what you can do with it, right-clicking and - choosing Help is a good way to - find out. - - - - - If a folder has other folders in it, there will be a plus - sign next to it. Click on the plus sign, and the folder will - open to let you see the other folders inside. This may - change in the future to something more attractive, like - triangles that drop down as you click on them to display the - rest of the tree. - - - - Any time new information arrives in a folder, that folder - will be highlighted, or its label displayed as bold - text. You can learn more about customizing - Evolution alerts and appearance - in . - - - - Moving and deleting folders and other items works in one of - two ways: using drag-and-drop or by - right-clicking and selecting an item from the - right-click menu. You can drag the - folders inside the tree view to change their order or put - one folder inside another. To delete a folder, drag it into - the trash folder or right-click it and select - Delete from the menu that pops - up. The same goes for individual messages, appointments, - and address cards, whether they're in the tree - view or not: drag them where you want them, and - they will go there. - - - You can also use the right-click menu to - move, rename, and delete folders. - Delete function from the - right-click menu. - - - Once you've familiarized yourself with the main - window you can start doing things with it. - We'll start with your email inbox: you've got a letter - waiting for you already. - - -
- - - - - - diff --git a/help/C/usage-sync.sgml b/help/C/usage-sync.sgml deleted file mode 100644 index f28ebc10cc..0000000000 --- a/help/C/usage-sync.sgml +++ /dev/null @@ -1,19 +0,0 @@ - - - Synchronizing with a Hand-held Device - - Once you've set up a synchronization system, it pretty much - takes care of itself. Not only that, it's entirely possible - that your system administrator has set it up for you. All - that this chapter covers is how to use that system once it's - installed and configured. If you need to set it up, consult - . - - - - If you've already got Gnome-pilot set up to use - Evolution all you need to do is put - your hand-held device on the cradle and press the HotSync - button. No, really. That's all there is to it. - - \ No newline at end of file diff --git a/help/Camel-Classes b/help/Camel-Classes deleted file mode 100644 index 93aec087dd..0000000000 --- a/help/Camel-Classes +++ /dev/null @@ -1,35 +0,0 @@ -CamelException -CamelProvider -CamelThreadProxy -CamelURL -GtkObject - + CamelObject - + CamelAddress - | + CamelInternetAddress - | ` CamelNewsAddress - + CamelDataWrapper - | + CamelMedium - | | ` CamelMimePart - | | ` CamelMimeMessage - | ` CamelMultipart - + CamelFolder - | ` CamelFolderPtProxy - + CamelFolderSearch - + CamelFolderSummary - + CamelMimeFilter - | + CamelMimeFilterBasic - | + CamelMimeFilterCharset - | + CamelMimeFilterIndex - | ` CamelMimeFilterSave - + CamelService - | + CamelStore - | ` CamelTransport - + CamelSession - + CamelStream - | + CamelSeekableStream - | | + CamelSeekableSubstream - | | + CamelStreamFs - | | ` CamelStreamMem - | + CamelStreamBuffer - | ` CamelStreamFilter - ` CamelThreadProxy \ No newline at end of file diff --git a/help/ChangeLog b/help/ChangeLog deleted file mode 100644 index d56b709778..0000000000 --- a/help/ChangeLog +++ /dev/null @@ -1,134 +0,0 @@ -2000-05-27 Aaron Weber - - * C/evolution-guide.sgml: added Kevin Breit to author and - copyright. - - * C/apx-authors.sgml: Put app authors in a simplelist. - - * C/usage-mail.sgml: Removed USAGE-SETUP insertion, added xref to send - users to config-setupassist chapter. This and the following changes - take setup druid coverage out of usage - section and put it in config section. - * C/config-setupassist.sgml: Added mail druid coverage from - usage-setup.sgml. - * C/usage-setup.sgml: Removed file. contents in - config-setupassist.sgml. - * C/evolution-guide.sgml: Removed - USAGE-SETUP entity (and file usage-setup.sgml.) - - -2000-05-26 Aaron Weber - - * C/fig/mainwindow-pic.png: new file - * C/fig/mail-druid-pic.png: new file - * C/fig: New directory, for figure graphics. - - * C/apx-gloss.sgml: new file. glossary. thx. to kevin from chicago. - - * C/usage-setup.sgml: More accurate description of druid, and - moved to mail section-- see usage-mail.sgml entry. This is a new - location for this entity, and it may move more later. - - - * C/usage-mainwindow.sgml: altered description of starting - evolution. added screenshot for main-window picture. - - * C/usage-mail.sgml: added screenshots, added coverage of setup - druid and put it into get-and-send section, which is probably not - where it should stay. Also started filter druid coverage and - clarified examples, esp. in Bcc: section. - - * C/usage-contact.sgml: Clarified examples. - - * C/preface.sgml: rewording of "what is" and "about book" sections. - - * C/evolution-guide.sgml: added glossary entity APX-GLOSS, altered - phrasing in part intros, changed order of Setup-assistant section. - - * C/config-prefs.sgml: changed wording, removed ref. to re-running - setup assistant. - -2000-05-18 Aaron Weber - - * C/evo_book_0.1.sgml: removed. - - * C/apx-authors.sgml: new file. - * C/apx-bugs.sgml: same. - * C/apx-fdl.sgml: same. - * C/config-prefs.sgml: same. - * C/config-setupassist.sgml: same. - * C/config-sync.sgml: same. - * C/devel-action.sgml: same. - * C/devel-component.sgml: same. - * C/devel-script.sgml: same. - * C/evolution-guide.sgml: same. - * C/preface.sgml: same. - * C/usage-calendar.sgml: same. - * C/usage-contact.sgml: same. - * C/usage-mail.sgml: same. - * C/usage-mainwindow.sgml: same. - * C/usage-setup.sgml: same. - * C/usage-sync.sgml: same. - -2000-05-07 Dan Winship - - * Camel-Classes: sync - -2000-04-16 Aaron Weber - - * C/evo_book_0.1.sgml: new file (doc sgml) - - * C/ : New directory for doc sgml & graphics - -2000-03-05 Christopher James Lahey - - * white-papers/widgets/e-table.sgml: Added Miguel to the author - list for ETable. - -2000-03-03 Christopher James Lahey - - * white-papers/widgets/, white-papers/widgets/e-table.sgml: New - doc for the ETable widget. - - * ChangeLog: Created a ChangeLog file for the docs file and - integrated the individual ChangeLogs. - -2000-03-01 Dan Winship - - * ibex.sgml: Ibex white paper - -2000-02-29 Federico Mena Quintero - - * calendar.sgml: Sections for the calendar user agent and the - calendar client library. - -2000-02-29 Dan Winship - - * camel.sgml: Reorg a bit more, make the
 section narrower,
-	add more references to graphics (the graphics themselves are
-	still in beta), add a section on CamelStream.
-
-2000-02-28  Federico Mena Quintero  
-
-	* calendar.sgml: Section for the personal calendar server.
-
-2000-02-28  Dan Winship  
-
-	* camel.sgml: add Bertrand to authors, edit his additions
-
-2000-02-28  bertrand  
-
-	* camel.sgml: add a blurb about camel offering
-	uniform interface. needs style and grammar corrections. 
-	Talk about virtual folders.
-	Talk about lightweight messages
-	Talk about IMAP. 
-
-2000-02-28  Dan Winship  
-
-	* camel.sgml: Beginnings of a Camel white paper
-
-2000-02-25  Federico Mena Quintero  
-
-	* calendar.sgml: New file for the Evolution calendaring white paper.
-
diff --git a/help/Design b/help/Design
deleted file mode 100644
index 7b7cf6f821..0000000000
--- a/help/Design
+++ /dev/null
@@ -1,201 +0,0 @@
-
-The Evolution Project specification
-Miguel de Icaza.
-
-
-* Introduction
-
-	Evolution is a project aiming at providing the free software
-	community with a professional, high-quality tool for managing
-	mail, appointments, tasks and other personal information
-	tools.  
-
-	We want to make Evolution a system that addresses our needs
-	(the free software development community) and we believe that
-	by addressing our needs, we will provide a system that will
-	scale in the years to come for other users that are just
-	starting to use computers and the internet.
-
-	The main objectives of Evolution are to provide these powerful
-	features, and to make the user interface as pretty and
-	polished as possible.
-
-	Evolution is a GNOME application and a number of auxiliary
-	CORBA servers that act as the storage backends. 
-
-	Evolution will copy the best user interface bits and the best
-	ideas and features found on contemporary groupware systems.
-
-* Evolution internals.
-
-	Evolution can store its information locally (files for mail,
-	calendar and address book) or on a remote server (imap/pop,
-	cap, ldap).  
-
-	Given the importance of syncing in this modern PDA world,
-	the Evolution GUI acts as a client to the data repository.
-	The data repository is a GUI-less CORBA server called Wombat.
-
-	Wombat provides a unified access system to the calendar and
-	addressbook data (doing mail is a bit hard, so we are leaving
-	this as a TODO item for now).
-
-	Wombat's CORBA interfaces are notifier-based.  This means that
-	CORBA requests sent to Wombat do not return values
-	inmediately, but rather than for Wombat requests the user has
-	to provide a CORBA object that will be notified of what
-	happened.
-
-	Yes, that sounds hairy.  It is actually pretty simple.  It
-	basically means that you submit requests to Wombat, and a
-	callback is invoked in your code when the request has been
-	carried away. 
-
-	This enables a Palm to sync to the repository without having
-	the GUI for Evolution running.  It also means that volunteers
-	will be able to write text-based and web-based versions of
-	Evolution (not me though :-).
-
-* Evolution as a platform
-
-	Evolution is more than a client for managing the above
-	information: Evolution is a platform for building groupware
-	applications that use the above components to get their work done.
-
-	To achieve this Evolution is designed to be scriptable, and it
-	exports its internals trough CORBA/Bonobo.  It is implemented
-	as a collection of Bonobo containers and Bonobo components.
-
-	There is a clean separation between the views (the user
-	interface) and the model (the view).  The views that we are
-	writing are GNOME based, and they talk to the Wombat CORBA
-	server.
-
-	Wombat takes care of notifications to the various clients for
-	the data. 
-
-* The overall organization
-
-	A bar similar to outlook provides shortcuts for accessing the
-	various resources managed by Evolution: mail folders,
-	contacts, tasks, journal entries, notes, messages and other
-	user-defined destinations. 
-
-* User interface widgets
-
-** The ETable package
-
-	This package provides a way of displaying and editing tables.
-
-	Tables are displayed based on a TableColumn definition that
-	defines the layout used for the display.  Table Columns can be
-	nested, and the package does grouping of information displayed
-	according to the criteria defined there.
-
-	This is used in multiple places troughout evolution: it is
-	used for the Mail summary display, for the TODO display and
-	TODO new data entry and for the address book.
-
-	Nesting in the address book can be performed on various
-	fields.  For example, a first level of nesting could be
-	"Company" and a second level would be "Country" the result is
-	a 2-level tree that can be collapsed expanded and contains the
-	information sorted/grouped by those two criteria.
-
-	The user interface for this will be copied from Outlook: the
-	possibility of adding and removing fields with drag and drop
-	as well as grouping using drag and drop.
-
-* The Mail system
-
-** The Mail sources
-
-	The mail system will support 4 sources of mail:
-
-		POP3 (transfer to a local file).
-		IMAP
-		Local mbox format in $MAIL.
-		Local mbox format that have other delivery points.
-
-	On top of that, it will be possible to browse existing mbox
-	archives (and possibly other formats in the future, like
-	Mailbox and Maildir).
-
-** Storing the mail
-
-	Mail that gets incorporated into the system is stored in mbox
-	format, and summary files are provided for quick access to the
-	files.  No modifications to the file on disk is performed (I
-	am not quite sure about this, perhaps we want to add the
-	status flags and some method for adding metadata to the mail).
-
-	Summary files are rebuilt on demand or rebuild if the mbox
-	file and the summary file have got out of sync.
-
-	A Metadata system that will enable us to attach information to
-	a message will have to be designed and implemented (enabling
-	users to add annotations to mails, and special keywords and
-	flags in a per-message fashion).
-
-** Folders
-
-	Michael Zucchi is working on a system that will let users
-	easily define rules for splitting their incoming mail into
-	physical folders.  
-
-	A further refinement to Folders are Virtual Folders.  This
-	basically provides a powerful search and viewing facility for
-	mail.  It works like this: when a mail is "incorporated" into
-	Evolution it is scanned and indexed.
-
-	Then users can enter queries into Evolution that will search
-	the entire database of messages.	
-
-** Virtual folders
-
-	Virtual folders will enable users to read/browse their mail in
-	new ways: by specifying search criterias, these folders will
-	contain messages that match the criteria given.  
-
-	There is more information about this in the libcamel
-	directory. 
-
-	We will index all headers from a message, and possible the
-	contents of messages and keep those on a separate file, to
-	enable users to query their mail database.
-
-** Mail summary display
-
-	The summary will be displayed using the ETable package, to
-	enable users to add a number of sorting criteria and various
-	display methods for the summary view.
-
-	The Outlook methods for displaying will be present on the
-	system.
-
-	Message threading will be supported in Evolution.
-
-** Message display engine
-
-	We are going to be using a combination of
-	libcamel/limime/libjamie to parse messages and render them
-	into an HTML buffer.
-
-* The HTML engine
-
-	The GtkHTML engine will be used to display messages, and will
-	be extended to support a number of features that we require:
-	internal handling of characters will be based on Unicode
-
-* The message composer
-
-	Regular features found in composers will be added: connecting
-	the composer to the address book, support for drag and drop
-	for including attachments, editing the message, archiving
-	drafts and archiving messages sent.
-
-	Ettore has been working on adding editing support to the
-	GtkHTML and he is working currently on a Bonobo component that
-	will provide a ready-to-use Bonobo control for embedding into
-	other applications.
-
diff --git a/help/white-papers/calendar/calendar.sgml b/help/white-papers/calendar/calendar.sgml
deleted file mode 100644
index 2cb3132e2b..0000000000
--- a/help/white-papers/calendar/calendar.sgml
+++ /dev/null
@@ -1,209 +0,0 @@
-Evolution">
-CUA">
-PCS">
-Bonobo">
-CORBA">
-GTK+">
-]>
-
-
- - - &Evolution; Calendaring Framework - - - - Federico - Mena Quintero - -
- federico@helixcode.com -
-
-
-
- - - 2000 - Helix Code, Inc. - - - - - The &Evolution; groupware suite provides a framework for - developing calendaring applications, as well as a graphical - calendar client and a personal calendar server. This white - paper describes the architecture of the &Evolution; - calendaring framework. - - -
- - - - - Introduction - - - Calendaring is an important part of a groupware suite. A - calendaring framework will allow a user to keep a personal - calendar and have several applications use it. Such - applications could be a graphical calendar client that the user - employs to schedule appointments and keep track of his time, a - Palm Pilot synchronization client, or - a simple alarm or reminder utility. A comprehensive calendaring - framework will also allow multiple users to schedule - appointments between each other; for example, a project director - may want to schedule a weekly meeting with the rest of the - project members, or a person who owns a large house may want to - schedule a big party with his friends. The attendees will then - want to reply with messages such as, “I will - attend”, or “I will attend only if the proposed time - is changed”. - - - - The &Evolution; groupware suite provides a framework for - developing calendaring applications, as well as a graphical - calendar client or calendar user agent (&CUA;) and a personal - calendar server (&PCS;). - - - - The following sections explain the basic calendaring framework, - the functions of the calendar user agent and the personal - calendar server, and the relationship between the two. - - - - - - - Personal Calendar Server - - - The personal calendar server (&PCS;) provides centralized - management and storage of a user's personal calendar. Multiple - clients can connect to the &PCS; simultaneously to query and - modify the user's calendar in a synchronized fashion. The main - features of the &PCS; are as follows: - - - - Storage - - - The &PCS; is responsible for loading and saving calendars. - Centralizing the loading and saving functionality allows - multiple clients to use the same calendar at the same time - without having to worry about each other. - - - - - Basic Queries - - - The &PCS; provides functions to do basic queries on a - calendar, for example, a client can ask the server for a list - of all the appointments in the calendar, or for all the data - for a specific appointment. - - - - - Recurrence and Alarm Queries - - - Clients can ask the &PCS; for a list of the appointments that - occur within a specified time range; for example a graphical - client that has a per-week view could ask the &PCS; for all - the appointments that occur in a particular week. This - includes multiple occurrences of a single recurring event; for - example, the object for “a 1-hour meeting that occurs on - every Tuesday and Thursday” is represented inside the - &PCS; as a single event with a recurrence rule. Similarly, - clients can ask the &PCS; for a list of events that have - alarms that trigger within a specified time range. - - - - - Notification of Changes - - - This is the most important function of the &PCS;, as it allows - multiple calendar clients to maintain a unified view of the - calendar between the server and themselves. When a client - asks the &PCS; to modify or remove an event, the &PCS; - notifies all the clients that are connected to it about the - change. The policy is that “the server is always - right”; clients can act as dumb views onto the - calendar's data and they will be notified by the &PCS; when - something changes. - - - - - - - - Calendar User Agent - - - A calendar user agent (&CUA;) is a program that lets a user - manipulate a calendar. &Evolution; provides an attractive, - graphical calendar client that communicates with the &Evolution; - personal calendar server. - - - - The &Evolution; calendar client just provides a view onto the - data that is stored and managed by the personal calendar server. - The calendar client does not perform direct manipulations on a - calendar's data; instead it offloads those requests to the - calendar server, which takes care of making the appropriate - modifications in the calendar and then notifies all the clients - about the changes. - - - - - - - Calendar Client Library - - - Communication between the personal calendar server and calendar - clients is defined by a set of &Bonobo; &CORBA; interfaces. - Clients can be written by implementing the client-side - Listener interface, which defines the - notification callbacks that the PCS uses to inform clients about - changes to the calendar. - - - - As a convenience for >K; programmers, &Evolution; also - includes a library which provides a - CalClient class which can be used for - communication with the personal calendar server. Objects of - this class automatically contact the PCS when they are created. - CalClient provides functions to request - changes in the calendar, and it also emits signals when it gets - notification about changes from the PCS. This makes it easy and - convenient to write calendar clients for &Evolution; using - >K;. - - - - The implementation of the CalClient class - simply wraps the &Evolution; &CORBA; interfaces for calendaring - with a familiar-looking >K; object. Calls to the - Listener interface get translated to - signal emissions from the CalClient, thus - shielding programmers from the details of the &CORBA; - interfaces. - - -
diff --git a/help/white-papers/mail/camel.sgml b/help/white-papers/mail/camel.sgml deleted file mode 100644 index a339909f54..0000000000 --- a/help/white-papers/mail/camel.sgml +++ /dev/null @@ -1,339 +0,0 @@ -Evolution"> - -]> - -
- - - The &Camel; Messaging Library - - - - Dan - Winship - -
- danw@helixcode.com -
-
-
- - - Bertrand - Guiheneuf - -
- bertrand@helixcode.com -
-
-
-
- - - 2000 - Helix Code, Inc. - - -
- - - Introduction - - - &Camel; is a generic messaging library. It is being used as the - back end for the mail component of &Evolution;. The name - "&Camel;" is an acronym; it refers to the fact that the - library is capable of going several days without food or water. - It means : Camel's Acronym Makes Everyone Laugh. - - - - &Camel;'s initial design is heavily based on Sun's - JavaMail API. It uses the Gtk+ object - system, and many of its classes are direct analags of JavaMail - classes. Its design has also been influenced by the features of - IMAP, and the limitations of the standard UNIX mbox mail store, - which set some of the boundaries on its requirements and - extensibility. - - - - &Camel; sees all message repositories as stores containing - folders. These folders in turn contain the messages the client - actually accesses. The use of such a unified interface allows - the client applications to be very extensible. &Camel; includes - an external provider mechanism which allows applications to - dynamically load and use protocols which were not available when - the application was initially written. - - - - The abstract store/folder mechanism is a powerful and versatile - way of accessing messages. No particular asumptions are made on - the client side, thus allowing new ways of managing the - messages. For example, the messages stored in the folders don't - necessarily have to share some common physical location. The - folder can be a purely virtual folder, containing only - references to the actual messages. This is used by the "vFolder" - provider, which allows you select messages meeting particular - criteria and deal with them as a group. - - - - In addition to these possibilities, &Camel; has full MIME - support. &Camel; MIME messages are lightweight objects - representing the MIME skeleton of the actual message. The data - contained in the subparts are never stored in memory except when - they are actually needed. The application, when accessing the - various MIME objects contained in the message (text parts, - attachments, embedded binary objects ...) asks &Camel; for a - stream that it can read data from. This scheme is particularly - useful with the IMAP provider. IMAP has strong MIME support - built-in, which allows &Camel; to download only the parts of - messages that it actually needs: attachments need not be - downloaded until they are viewed, and unnecessary - "multipart/alternative" parts will never be read off the server. - - - - - Overview - - - - - To begin using &Camel;, an application first creates a - CamelSession object. This object is used - to store application defaults, and to coordinate communication - between providers and the application. - - - - A CamelProvider is a dynamically-loadable - module that provides functionality associated with a specific - service. Examples of providers are IMAP and SMTP. Providers - include subclasses of the various other &Camel; classes for - accessing and manipulating messages. - - - - CamelService is an abstract class for - describing a connection to a local or remote service. It - currently has two subclasses: CamelStore, - for services that store messages (such as IMAP servers and mbox - files), and CamelTransport, for services - that deliver messages (such as SMTP, or a local MTA). A provider - could also be both a store and a transport, as in the case of - NNTP. - - - - A CamelStore contains some number of - CamelFolder objects, which in turn - contain messages. A CamelFolder provides - a CamelFolderSummary object, which - includes details about the subject, date, and sender of each - message in the folder. The folder also includes the messages - themselves, as subclasses of CamelMedium. - - - - Email messages are represented by the - CamelMimeMessage class, a subclass of - CamelMedium. This class includes - operations for accessing RFC822 and MIME headers, accessing - subparts of MIME messages, encoding and decoding Base64 and - Quoted-Printable, etc. - - - - CamelTransport includes methods for - delivering messages. While the abstract - CamelTransport::send method takes a - CamelMedium, its subclasses may only be - able to deliver messages of specific - CamelMedium subclasses. For instance, - CamelSendmailTransport requires a - CamelMimeMessage, because it needs a - message that includes a "To:" header. A hypothetical - CamelNNTPTransport would need a - CamelNewsMessage, which would have a - "Newsgroups:" header. - - - - The content of messages are referred to using - CamelStream and its subclasses. In the - case of an mbox-based store, the - CamelStream would abstract the operation - of reading the correct section of the mbox file. For IMAP, - reading off the CamelStream might result - in commands being issued to the remote IMAP server and data - being read off a socket. - - - - The final major class in &Camel; is - CamelException, which is used to - propagate information about errors. Many methods take a - CamelException as an argument, which the - caller can then check if an error occurs. It includes both a - numeric error code which can be interpreted by the program, and - a text error message that can be displayed to the user. - - - - - Major Subcomponents - - - The Message Store - - - A CamelStore inherits the ability to - connect and authenticate to a service from its parent class, - CamelService. It then adds the ability - to retrieve folders. A store must contain at least one folder, - which can be retrieved with - CamelStore::get_default_folder. There are - also methods to retrieve the "top-level" folder (for - hieararchical stores), and to retrieve an arbitrary folder by - name. - - - - All CamelFolders must implement certain - core operations, most notably generating a summary and - retrieving and deleting messages. A - CamelFolder must assign a permanently - unique identifier to each message it contains. Messages can - then be retrieved via - CamelFolder::get_message_by_uid. Alternately, - within a single mail-reading session, messages can be referred - to by their linear position within the store using - CamelFolder::get_message_by_number. - - - - Folders must also implement the - get_parent_folder and - list_subfolders methods. For stores that - don't allow multiple folders, they would return NULL and an - empty list, respectively. Stores that do allow multiple - folders will also define methods for creating and deleting - folders, and for moving messages between them (assuming the - folders are writable). - - - - Folders that support searching can define the - search_by_expression method. For mbox - folders, this is implemented by indexing the messages with the - ibex library and using that to search them later. For IMAP - folders, this uses the IMAP SEARCH command. Other folder types - might not be able to implement this functionality, in which - case users would not be able to do full-content searches on - them. - - - - - Messages - - - As mentioned before, messages are represented by subclasses of - CamelMedium. - CamelMedium itself is a subclass of - CamelDataWrapper, a generic class for - connecting a typed data source to a data sink. - CamelMedium adds the concept of message - headers versus message body. - (CamelDataWrapper has one other - important subclass, CamelMultipart, - which is used to provide separate access to the multiple - independent parts of a multipart MIME type.) - CamelMedium's subclasses provide more - specialized handling of various headers: - CamelMimePart adds special handling for - the &ldquot;Content-*&rdquot; headers in MIME messages, and - its subclass CamelMimeMessage adds - handling for the RFC822 headers. - - - - - - Consider a message with two parts: a text part (in both plain - text and HTML), and an attached image: - - - - From: Dan Winship <danw@helixcode.com> - To: Matt Loper <matt@helixcode.com> - Subject: the Camel white paper - MIME-Version: 1.0 - Content-Type: multipart/mixed; - boundary="jhTYrnsRrdhDFGa" - - This is a multi-part message in MIME format. - --jhTYrnsRrdhDFGa - Content-Type: multipart/alternative; - boundary="sFSenbAFDSgDfg" - - --sFSenbAFDSgDfg - Content-Type: text/plain - - Hey, Matt - - Check out this graphic... - - -- Dan - - --sFSenbAFDSgDfg - Content-Type: text/html - - Hey, Matt<br> - <br> - Check out this graphic...<br> - <br> - -- Dan<br> - <br> - --sFSenbAFDSgDfg-- - - --jhTYrnsRrdhDFGa - Content-Type: image/png - Content-Transfer-Encoding: base64 - - F4JLw0ORrkRa8AwAMQJLAaI3UDIGsco9RAaB92... - --jhTYrnsRrdhDFGa-- - - - - In &Camel;, this would be represented as follows: - - - - - - - Streams - - - Streams are a generic data transport layer. Two basic stream - classes are CamelStreamFs, for - reading and writing files, and - CamelStreamMem, for reading from and - writing to objects that are already in memory. - - - - Streams can also be chained together. So a CamelMimePart - containing base64-encoded data can filter its output through - a CamelStreamB64. Other parts of the application that want - to read its data will never need to even realize that the - original data was encoded. - - - -
diff --git a/help/white-papers/mail/ibex.sgml b/help/white-papers/mail/ibex.sgml deleted file mode 100644 index dcb8f5ca4b..0000000000 --- a/help/white-papers/mail/ibex.sgml +++ /dev/null @@ -1,158 +0,0 @@ -Evolution"> - - -]> - -
- - - Ibex: an Indexing System - - - - Dan - Winship - -
- danw@helixcode.com -
-
-
-
- - - 2000 - Helix Code, Inc. - - -
- - - Introduction - - - &Ibex; is a library for text indexing. It is being used by - &Camel; to allow it to quickly search locally-stored messages, - either because the user is looking for a specific piece of text, - or because the application is contructing a vFolder or filtering - incoming mail. - - - - - Design Goals and Requirements for Ibex - - - The design of &Ibex; is based on a number of requirements. - - - - - First, obviously, it must be fast. In particular, searching - the index must be appreciably faster than searching through - the messages themselves, and constructing and maintaining - the index must not take a noticeable amount of time. - - - - - - The indexes must not take up too much space. Many users have - limited filesystem quotas on the systems where they read - their mail, and even users who read mail on private machines - have to worry about running out of space on their disks. The - indexes should be able to do their job without taking up so - much space that the user decides he would be better off - without them. - - - - Another aspect of this problem is that the system as a whole - must be clever about what it does and does not index: - accidentally indexing a "text" mail message containing - uuencoded, BinHexed, or PGP-encrypted data will drastically - affect the size of the index file. Either the caller or the - indexer itself has to avoid trying to index these sorts of - things. - - - - - - The indexing system must allow data to be added to the index - incrementally, so that new messages can be added to the - index (and deleted messages can be removed from it) without - having to re-scan all existing messages. - - - - - - It must allow the calling application to explain the - structure of the data however it wants to, rather than - requiring that the unit of indexing be individual files. - This way, &Camel; can index a single mbox-format file and - treat it as multiple messages. - - - - - - It must support non-ASCII text, given that many people send - and receive non-English email, and even people who only - speak English may receive email from people whose names - cannot be written in the US-ASCII character set. - - - - - - While there are a number of existing indexing systems, none of - them met all (or even most) of our requirements. - - - - - The Implementation - - - &Ibex; is still young, and many of the details of the current - implementation are not yet finalized. - - - - With the current index file format, 13 megabytes of Info files - can be indexed into a 371 kilobyte index file—a bit under - 3% of the original size. This is reasonable, but making it - smaller would be nice. (The file format includes some simple - compression, but gzip can compress an - index file to about half its size, so we can clearly do better.) - - - - The implementation has been profiled and optimized for speed to - some degree. But, it has so far only been run on a 500MHz - Pentium III system with very fast disks, so we have no solid - benchmarks. - - - - Further optimization (of both the file format and the in-memory - data structures) awaits seeing how the library is most easily - used by &Evolution;: if the indexes are likely to be kept in - memory for long periods of time, the in-memory data structures - need to be kept small, but the reading and writing operations - can be slow. On the other hand, if the indexes will only be - opened when they are needed, reading and writing must be fast, - and memory usage is less critical. - - - - Of course, to be useful for other applications that have - indexing needs, the library should provide several options, so - that each application can use the library in the way that is - most suited for its needs. - - -
diff --git a/help/white-papers/widgets/e-table.sgml b/help/white-papers/widgets/e-table.sgml deleted file mode 100644 index 5ff4faf2ae..0000000000 --- a/help/white-papers/widgets/e-table.sgml +++ /dev/null @@ -1,279 +0,0 @@ -Evolution"> -ETable"> -ETableModel"> -ETableSimple"> -ETableHeader"> -ETableSpecification"> -ETableCol"> -]> - -
- - - The ETable Widget - - - - Chris - Lahey - -
- clahey@helixcode.com -
-
-
- - Miguel - de Icaza - -
- miguel@helixcode.com -
-
-
-
- - - 2000 - Helix Code, Inc. - - -
- - - Introduction - - - &ETable; is a table widget on steroids. It is intended to provide - all the table functionality needed throughout &Evolution;, and - hopefully be general purpose enough to be used in other projects. - - - - &ETable; provides a lot of interactive control over the data in the - table. Without any work from the programmer, &ETable; provides - rearrangeable columns and editable data. When finished, &ETable; will - also provide, again with no programmer intervention, easy interactive - sorting and grouping. - - - - &ETable; gives you a great deal of functionality, flexibility, and - power. Most of this power is internal to the widget, but some of - the flexibility requires a bit of work by the programmer. - However, once you learn it, &ETable; is not very hard at all to - use. - - - - &ETable;'s power comes from the fact that it is fully - model/view/controller based. Various models are involved into - the process of rendering the information, and various views are - provided. The programmer has a wide range of options: from the - most finely hand-tuned table to a generic all-encompasing widget - that takes over most of tasks. It is up to the programmer: he - can use the simple to use &ETable; widget that takes care of - everything in a generic way, or he can use the various - components to roll his own tabular display. - - - - &ETable; ships with a standard set of information renderers: - strings, bitmaps, toggle-buttons, check-boxes, and multi-line - strings. But the programmer can write and implement his own - renderer for his information. This means that by default - &ETable; provides the basic display facilities that programmers - required, but they offer the programmer a complete freedom to - incorporate new cell renderers. - - - - - - ETableModel - - - The data back end for the &ETable; is an &ETableModel;. The - &ETableModel is an abstract interface that acts as the - information repository for the various &ETable components. - - - - To use &ETable; you have to create a subclass of the abstract - &ETableModel; class. However, to save you the work of defining - a new GtkClass every time you use - &ETable, there is a predefined subclass of &ETableModel; called - &ETableSimple; which simply takes a list of function callbacks - to perform the various operations. - - - - - - Columns - - - There are two different meanings to the word "column". The first - is the model column (defined by the &ETableCol: object). A model - column describes how it maps to the column in the &ETableModel; - as well as containing information about its properties (name, - resizability, resize dimensions, and a renderer for this - specific columns). - - - - &ETable; distinguishes between a model column index, and a view - column index. The former reflects the column in which the data - is stored in the &ETableModel; The later represents the actual - location at which the column is being displayed in the screen. - - - - Each view column index corresponds to a specific model column, - though a model column may have any number of view columns - associated with it (including zero). For example the same - column might be rendered twice, or the data from one column - could be used to display different bits of information - - - - The view column does not necessarily depend on only one model - column. In some cases, the view column renderer can be given a - reference to another model column to get extra information about - its display. For example, a mail program could display deleted - messages with a line through them by creating a model column - with no corresponding view column that told whether or not the - message is deleted, and then having the text column - strikethrough the display if the invisible column had a value - corresponding to "deleted". - - - - The view column also specifies a few other pieces of - information. One piece of information is the renderer. &ETable; - provides a number of renderers to choose from, or you can write - your own. Currently, there are renderers for text, image sets, - and checkboxes. - - - - The view column also includes information about the header. - There are two types of headers: text, and pixbuf. The first - allows you to specify a string which is rendered in the header. - The second allows you to specify an image to copy into the - header. - - - - - Header - - - The &ETableHeader; represents the header information for the - table. The &ETableHeader; is used in two different ways. The - first is the in the full_header - element of an &ETable;. This is the list of possible columns in - the view. You add each of your columns to this &ETableHeader; - and then pass it into the &ETable;. - - - - The second use is completely internal. &ETable; uses another - &ETableHeader; to store the actual displayed columns. Many of - the &ETableHeader; functions are for this purpose. The only - functions that users of the library should need to use are - e_table_header_new and - e_table_header_add_col. - - - - - Layout Specification - - - &ETable; uses an &ETableSpecification; to layout the columns of - the widget. The &ETableSpecification; is specified as XML data - passed into the &ETable; as a string. - - - - The most powerful part of the &ETableSpecification; is that when - finished, &ETable; will allow you to get a copy of an - &ETableSpecification; that describes the current view of the - tree. This allows the developer to save the current view so that - next time the user opens this table, they find it in exactly the - state that they left it. - - - - The XML specification allows for a number of things. First, it - allows you to pick a set of default columns to be shown. Thus, - even if you had hundreds of pieces of data, you could choose to - only display a few that fit on the screen by default. - - - - The second major thing that the &ETableSpecification; allows you - to specify is the column grouping and sorting. &ETable; has a - powerful mechanism for allowing the user to choose columns to - group by, thus allowing multiple columns of sorting, as well as - visual grouping of similar elements and interactive selection of - what data to display. - - - - The grouping in &ETableSpecification; is specified as a - hierarchy of columns to group by. Each level of the hierarchy - lets you sort by a particular column, either ascending or - descending. All levels except the last cause the canvas to group - by the given column. - - - - An example &ETableSpecification; follows. - - - - <ETableSpecification> - <columns-shown frozen_columns="2"> - <column> 0 </column> - <column> 1 </column> - <column> 2 </column> - <column> 3 </column> - <column> 4 </column> - </columns-shown> - <grouping> - <group column="3" ascending="1"> - <group column="4" ascending="0"> - <leaf column="2" ascending="1"/> - </group> - </group> - </grouping> - </ETableSpecification> - - - - This example has 5 columns which are initially in order. It has - 2 levels of grouping. The first is grouped by the 4th column - (all indexes are 0 based) and sorts those groups in ascending - order. Inside those groups, the data is grouped by the fifth - column and sorted in descending order of the fifth column. - Finally, the data in those groups is sorted by the third column - in ascending order. Due to the "frozen_columns" attribute on the - columns-shown element, the user will not be - able to rearrange the first two columns. They will always be the - first two. - - - - - Conclusion - - - All in all, &ETable; is a very powerful widget. Once you learn - to use it, you have access to a vast amount of power requiring a - comparatively small amount of work. - - -
diff --git a/libibex/.cvsignore b/libibex/.cvsignore deleted file mode 100644 index 9a14585748..0000000000 --- a/libibex/.cvsignore +++ /dev/null @@ -1,9 +0,0 @@ -.deps -Makefile -Makefile.in -.libs -.deps -*.lo -*.la -lookup -mkindex diff --git a/libibex/COPYING.LIB b/libibex/COPYING.LIB deleted file mode 100644 index eb685a5ec9..0000000000 --- a/libibex/COPYING.LIB +++ /dev/null @@ -1,481 +0,0 @@ - GNU LIBRARY GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1991 Free Software Foundation, Inc. - 675 Mass Ave, Cambridge, MA 02139, USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the library GPL. It is - numbered 2 because it goes with version 2 of the ordinary GPL.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Library General Public License, applies to some -specially designated Free Software Foundation software, and to any -other libraries whose authors decide to use it. You can use it for -your libraries, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if -you distribute copies of the library, or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link a program with the library, you must provide -complete object files to the recipients so that they can relink them -with the library, after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - Our method of protecting your rights has two steps: (1) copyright -the library, and (2) offer you this license which gives you legal -permission to copy, distribute and/or modify the library. - - Also, for each distributor's protection, we want to make certain -that everyone understands that there is no warranty for this free -library. If the library is modified by someone else and passed on, we -want its recipients to know that what they have is not the original -version, so that any problems introduced by others will not reflect on -the original authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that companies distributing free -software will individually obtain patent licenses, thus in effect -transforming the program into proprietary software. To prevent this, -we have made it clear that any patent must be licensed for everyone's -free use or not licensed at all. - - Most GNU software, including some libraries, is covered by the ordinary -GNU General Public License, which was designed for utility programs. This -license, the GNU Library General Public License, applies to certain -designated libraries. This license is quite different from the ordinary -one; be sure to read it in full, and don't assume that anything in it is -the same as in the ordinary license. - - The reason we have a separate public license for some libraries is that -they blur the distinction we usually make between modifying or adding to a -program and simply using it. Linking a program with a library, without -changing the library, is in some sense simply using the library, and is -analogous to running a utility program or application program. However, in -a textual and legal sense, the linked executable is a combined work, a -derivative of the original library, and the ordinary General Public License -treats it as such. - - Because of this blurred distinction, using the ordinary General -Public License for libraries did not effectively promote software -sharing, because most developers did not use the libraries. We -concluded that weaker conditions might promote sharing better. - - However, unrestricted linking of non-free programs would deprive the -users of those programs of all benefit from the free status of the -libraries themselves. This Library General Public License is intended to -permit developers of non-free programs to use free libraries, while -preserving your freedom as a user of such programs to change the free -libraries that are incorporated in them. (We have not seen how to achieve -this as regards changes in header files, but we have achieved it as regards -changes in the actual functions of the Library.) The hope is that this -will lead to faster development of free libraries. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, while the latter only -works together with the library. - - Note that it is possible for a library to be covered by the ordinary -General Public License rather than by this special one. - - GNU LIBRARY GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library which -contains a notice placed by the copyright holder or other authorized -party saying it may be distributed under the terms of this Library -General Public License (also called "this License"). Each licensee is -addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also compile or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - c) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - d) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the source code distributed need not include anything that is normally -distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Library General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - Appendix: How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! diff --git a/libibex/ChangeLog b/libibex/ChangeLog deleted file mode 100644 index 6a79d0f2bf..0000000000 --- a/libibex/ChangeLog +++ /dev/null @@ -1,95 +0,0 @@ -2000-05-11 NotZed - - * index.c (ibex_unindex): Make sure we mark the ibex as dirty. - -2000-05-07 NotZed - - * file.c (ibex_save): New function, only write out the ibex if it - has changed. - -2000-05-07 - - * file.c (ibex_open): Also close the fd after we're done. - - * find.c (ibex_contains_name): New function to find out if a file - is indexed. - -2000-05-02 Matt Loper - - * Makefile.am: set G_LOG_DOMAIN. - -2000-04-12 NotZed - - * find.c (ibex_dump_all): Debug function to dump the whole index - to stdout. - - * words.c (get_ibex_file): Use g_strdup(), not strdup(). - -2000-04-11 NotZed - - * file.c (write_word): Always write out all words we have (even if - its 0 ... the file expects it). No longer check for removed files. - (store_word): Check for removed files here, and only add to the - ordered tree if we have references left to this word. - (ibex_write): First insert into the tree, to determine the - wordcount to be saved in the output file, and then write that. - (ibex_open): Remove some debug. - - * words.c (ibex_index_buffer): Always set 'unread', if it is a - valid pointer (dont rely on caller to initialise it). - -2000-03-26 NotZed - - * lookup.c (main): Fixed call to ibex_open. - - * mkindex.c (main): Fixed call to ibex_open. - - * file.c (ibex_open): Changed to accept flags and mode equivalent - to open(2). - -2000-02-25 Dan Winship - - * *.c: add gtk-doc-style comments - -2000-02-21 Matt Loper - - * .cvsignore: Added mkindex. - -2000-02-21 NotZed - - * Makefile.am: change noinst_LIBRARIES to noinst_LTLIBRARIES, and - supply -static to LDFLAGS. Duh, and changed LDADD back to - libibex.la. - -2000-02-20 Matt Loper - - * Makefile.am: changed mkindex_LDADD to libibex.a instead of - libibex.la. - -2000-02-19 Matt Loper - - * .cvsignore: added lookup. - -2000-02-18 Miguel de Icaza - - * Makefile.am (lookup_LDADD): For now. make a libibex.a library so - we can link it with the camel provider. I hate libtool - -2000-02-16 Dan Winship - - * Makefile.am: automakify - -2000-02-16 NotZed - - * find.[ch] (ibex_find_name): Finds if a word is indexed under a - given name. - -2000-02-14 NotZed - - * Makefile: Hack together a build using libtool. This should all - be auto*'d at some point I guess. - -2000-02-13 NotZed - - * Added ChangeLog file. - diff --git a/libibex/Makefile.am b/libibex/Makefile.am deleted file mode 100644 index c9e8165987..0000000000 --- a/libibex/Makefile.am +++ /dev/null @@ -1,21 +0,0 @@ -## Process this file with automake to produce Makefile.in - -noinst_LTLIBRARIES = libibex.la - -libibex_la_SOURCES = file.c index.c find.c words.c ibex.h -libibex_la_LDFLAGS = -static - -noinst_HEADERS = ibex_internal.h - -INCLUDES = -I$(srcdir) $(GLIB_CFLAGS) $(UNICODE_CFLAGS) \ - -DG_LOG_DOMAIN=\"libibex\" - - -noinst_PROGRAMS = mkindex lookup - -mkindex_SOURCES = mkindex.c -mkindex_LDADD = libibex.la $(GLIB_LIBS) $(UNICODE_LIBS) - -lookup_SOURCES = lookup.c -lookup_LDADD = libibex.la $(GLIB_LIBS) $(UNICODE_LIBS) - diff --git a/libibex/TODO b/libibex/TODO deleted file mode 100644 index a087c8d1f3..0000000000 --- a/libibex/TODO +++ /dev/null @@ -1,61 +0,0 @@ -Stability ---------- -* ibex_open should never crash, and should never return NULL without -errno being set. Should check for errors when reading. - - -Performance ------------ -* Profiling, keep thinking about data structures, etc. - -* Check memory usage - -* See if writing the "inverse image" of long ref streams helps -compression without hurting performance now. (ie, if a word appears in -more than half of the files, write out the list of files it _doesn't_ -appear in). (I tried this before, and it wasn't working well, but the -file format and data structures have changed a lot.) - -* We could save a noticeable chunk of time if normalize_word computed -the hash of the word and then we could pass that into -g_hash_table_insert somehow. - -* Make a copy of the buffer to be indexed (or provide interface for -caller to say ibex can munge the provided data) and then use that -rather than constantly copying things. ? - - -Functionality -------------- -* ibex file locking - -* specify file mode in ibex_open - -* ibex_find* need to normalize the search words... should this be done -by the caller or by ibex_find? - -* Needs to be some way to do a secondary search after getting results -back from ibex_find* (ie, for "foo near bar"). This either has to be -done by ibex, or requires us to export the normalize interface. - -* Does there need to be an ibex_find_any, or is that easy enough for the -caller to do? - -* utf8_trans needs to cover at least two more code pages. This is -tricky because it's not clear whether some of the letters there should -be translated to ASCII or left as UTF8. This requires some -investigation. - -* ibex_index_* need to ignore HTML tags. - NAME = [A-Za-z][A-Za-z0-9.-]* - - - - ugh. ok, simplifying, we get: - <[^!](([^"'>]*("[^"]*"|'[^']*'))*> or - - - which is still not simple. sigh. - -* ibex_index_* need to recognize and ignore "non-text". Particularly -BinHex and uuencoding. diff --git a/libibex/file.c b/libibex/file.c deleted file mode 100644 index c419360e26..0000000000 --- a/libibex/file.c +++ /dev/null @@ -1,481 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public License - * as published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with the Gnome Library; see the file COPYING.LIB. If not, - * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* file.c: index file read/write ops */ - -#include -#include -#include -#include -#include -#include - -#include "ibex_internal.h" - -static unsigned long read_number (FILE *f); -static void write_number (FILE *f, unsigned long n); -static char *get_compressed_word (FILE *f, char **lastword); - -static gint free_file (gpointer key, gpointer value, gpointer data); -static void free_word (gpointer key, gpointer value, gpointer data); - -/* The file format is: - * - * version string (currently "ibex1") - * file count - * list of compressed filenames, separated by \0 - * word count - * list of compressed words, each followed by \0, a count, and that - * many references. - * - * All numbers are stored 7-bit big-endian, with the high bit telling - * whether or not the number continues to the next byte. - * - * compressed text consists of a byte telling how many characters the - * line has in common with the line before it, followed by the rest of - * the string. Obviously this only really works if the lists are sorted. - */ - -/** - * ibex_open: open (or possibly create) an ibex index - * @file: the name of the file - * @flags: open flags, see open(2). - * @mode: If O_CREAT is passed in flags, then the file mode - * to create the new file with. It will be anded with the current - * umask. - * - * Open and/or create the named ibex file and return a handle to it. - * - * Return value: an ibex handle, or NULL if an error occurred. - **/ -ibex * -ibex_open (char *file, int flags, int mode) -{ - ibex *ib; - FILE *f; - char vbuf[sizeof (IBEX_VERSION) - 1]; - char *word, *lastword; - unsigned long nfiles, nwords, nrefs, ref; - ibex_file **ibfs = NULL; - int i; - GPtrArray *refs; - int fd; - char *modestr; - - fd = open(file, flags, mode); - if (fd == -1) { - return NULL; - } - - /* yuck, this is because we use FILE * interface - internally */ - switch (flags & O_ACCMODE) { - case O_RDONLY: - modestr = "r"; - break; - case O_RDWR: - if (flags & O_APPEND) - modestr = "a+"; - else - modestr = "w+"; - break; - case O_WRONLY: - if (flags & O_APPEND) - modestr = "a"; - else - modestr = "w"; - break; - default: - if (flags & O_APPEND) - modestr = "a+"; - else - modestr = "r+"; - break; - } - - f = fdopen(fd, modestr); - if (f == NULL) { - if (errno == 0) - errno = ENOMEM; - close(fd); - return NULL; - } - - ib = g_malloc (sizeof (ibex)); - ib->dirty = FALSE; - ib->path = g_strdup (file); - ib->files = g_tree_new (strcmp); - ib->words = g_hash_table_new (g_str_hash, g_str_equal); - ib->oldfiles = g_ptr_array_new (); - - if (!f) { - close(fd); - return ib; - } - - /* Check version. If its empty, then we have just created it */ - if (fread (vbuf, 1, sizeof (vbuf), f) != sizeof (vbuf)) { - if (feof (f)) { - fclose(f); - close(fd); - return ib; - } - } - if (strncmp (vbuf, IBEX_VERSION, sizeof (vbuf) != 0)) { - errno = EINVAL; - goto errout; - } - - /* Read list of files. */ - nfiles = read_number (f); - ibfs = g_malloc (nfiles * sizeof (ibex_file *)); - lastword = NULL; - for (i = 0; i < nfiles; i++) { - ibfs[i] = g_malloc (sizeof (ibex_file)); - ibfs[i]->name = get_compressed_word (f, &lastword); - if (!ibfs[i]->name) { - goto errout; - } - ibfs[i]->index = 0; - g_tree_insert (ib->files, ibfs[i]->name, ibfs[i]); - } - - /* Read list of words. */ - nwords = read_number (f); - lastword = NULL; - for (i = 0; i < nwords; i++) { - word = get_compressed_word (f, &lastword); - if (!word) { - goto errout; - } - - nrefs = read_number (f); - refs = g_ptr_array_new (); - g_ptr_array_set_size (refs, nrefs); - while (nrefs--) { - ref = read_number (f); - if (ref >= nfiles) { - goto errout; - } - refs->pdata[nrefs] = ibfs[ref]; - } - - g_hash_table_insert (ib->words, word, refs); - } - - g_free (ibfs); - fclose (f); - close(fd); - return ib; - -errout: - - fclose (f); - close(fd); - g_tree_traverse (ib->files, free_file, G_IN_ORDER, NULL); - g_tree_destroy (ib->files); - g_hash_table_foreach (ib->words, free_word, NULL); - g_hash_table_destroy (ib->words); - g_ptr_array_free (ib->oldfiles, TRUE); - if (ibfs) - g_free (ibfs); - g_free (ib->path); - g_free (ib); - - return NULL; -} - -struct ibex_write_data { - unsigned long index; - FILE *f; - char *lastname; -}; - -/* This is an internal function to find the longest common initial - * prefix between the last-written word and the current word. - */ -static int -get_prefix (struct ibex_write_data *iwd, char *name) -{ - int i = 0; - if (iwd->lastname) { - while (!strncmp (iwd->lastname, name, i + 1)) - i++; - } - iwd->lastname = name; - return i; -} - -static gint -write_file (gpointer key, gpointer value, gpointer data) -{ - char *file = key; - ibex_file *ibf = value; - struct ibex_write_data *iwd = data; - int prefix; - - ibf->index = iwd->index++; - prefix = get_prefix (iwd, file); - fprintf (iwd->f, "%c%s", prefix, file + prefix); - fputc (0, iwd->f); - return FALSE; -} - -/* scans for words which still exist in the index (after - index removals), and adds them to the ordered tree for - writing out in order */ -static void -store_word (gpointer key, gpointer value, gpointer data) -{ - GTree *wtree = data; - GPtrArray *refs = value; - int i; - ibex_file *ibf; - - for (i = 0; i < refs->len; i++) { - ibf = g_ptr_array_index (refs, i); - if (ibf->index == -1) { - g_ptr_array_remove_index_fast (refs, i); - i--; - } - } - - if (refs->len > 0) { - g_tree_insert (wtree, key, value); - } -} - -/* writes a word out, in order */ -static gint -write_word (gpointer key, gpointer value, gpointer data) -{ - char *word = key; - GPtrArray *refs = value; - struct ibex_write_data *iwd = data; - int i, prefix; - ibex_file *ibf; - - prefix = get_prefix (iwd, word); - fprintf (iwd->f, "%c%s", prefix, word + prefix); - fputc (0, iwd->f); - - write_number (iwd->f, refs->len); - - for (i = 0; i < refs->len; i++) { - ibf = g_ptr_array_index (refs, i); - write_number (iwd->f, ibf->index); - } - return FALSE; -} - -/** - * ibex_write: Write an ibex out to disk. - * @ib: the ibex - * - * This writes an ibex to disk. - * - * Return value: 0 for success, -1 for failure (in which case errno - * is set). - **/ -int -ibex_write (ibex *ib) -{ - struct ibex_write_data iwd; - GTree *wtree; - char *tmpfile; - - tmpfile = g_strdup_printf ("%s~", ib->path); - iwd.f = fopen (tmpfile, "w"); - if (!iwd.f) { - if (errno == 0) - errno = ENOMEM; - g_free (tmpfile); - return -1; - } - - fputs (IBEX_VERSION, iwd.f); - if (ferror (iwd.f)) - goto lose; - - iwd.index = 0; - iwd.lastname = NULL; - write_number (iwd.f, g_tree_nnodes (ib->files)); - if (ferror (iwd.f)) - goto lose; - g_tree_traverse (ib->files, write_file, G_IN_ORDER, &iwd); - if (ferror (iwd.f)) - goto lose; - - iwd.lastname = NULL; - wtree = g_tree_new (strcmp); - g_hash_table_foreach (ib->words, store_word, wtree); - write_number (iwd.f, g_tree_nnodes(wtree)); - if (ferror (iwd.f)) - goto lose; - g_tree_traverse (wtree, write_word, G_IN_ORDER, &iwd); - g_tree_destroy (wtree); - if (ferror (iwd.f)) - goto lose; - - if (fclose (iwd.f) == 0 && rename (tmpfile, ib->path) == 0) { - g_free (tmpfile); - ib->dirty = FALSE; - return 0; - } - -lose: - unlink (tmpfile); - g_free (tmpfile); - return -1; -} - -/** - * ibex_save: - * @ib: - * - * Only write out an ibex if it is dirty. - * - * Return value: Same as ibex_write. - **/ -int -ibex_save (ibex *ib) -{ - if (ib->dirty) - return ibex_write(ib); - return 0; -} - -/** - * ibex_close: Write out the ibex file (if it has changed) and free - * the data associated with it. - * @ib: the ibex - * - * If this ibex file has been modified since it was opened, this will - * call ibex_write() to write it out to disk. It will then free all data - * associated with the ibex. After calling ibex_close(), @ib will no - * longer be a valid ibex. - * - * Return value: 0 on success, -1 on an ibex_write() failure (in which - * case @ib will not be destroyed). - **/ -int -ibex_close (ibex *ib) -{ - ibex_file *ibf; - - if (ib->dirty && ibex_write (ib) == -1) - return -1; - - g_tree_traverse (ib->files, free_file, G_IN_ORDER, NULL); - g_tree_destroy (ib->files); - g_hash_table_foreach (ib->words, free_word, NULL); - g_hash_table_destroy (ib->words); - - while (ib->oldfiles->len) { - ibf = g_ptr_array_remove_index (ib->oldfiles, 0); - g_free (ibf->name); - g_free (ibf); - } - g_ptr_array_free (ib->oldfiles, TRUE); - g_free (ib->path); - g_free (ib); - - return 0; -} - -static gint -free_file (gpointer key, gpointer value, gpointer data) -{ - ibex_file *ibf = value; - - g_free (ibf->name); - g_free (ibf); - return FALSE; -} - -static void -free_word (gpointer key, gpointer value, gpointer data) -{ - g_free (key); - g_ptr_array_free (value, TRUE); -} - -static char * -get_compressed_word (FILE *f, char **lastword) -{ - char *buf, *p; - int c, size; - - c = getc (f); - if (c == EOF) - return NULL; - - size = c + 10; - buf = g_malloc (size); - if (*lastword) - strncpy (buf, *lastword, c); - p = buf + c; - do { - c = getc (f); - if (c == EOF) - return NULL; - if (p == buf + size) { - buf = g_realloc (buf, size + 10); - p = buf + size; - size += 10; - } - *p++ = c; - } while (c != 0); - - *lastword = buf; - return buf; -} - -static void -write_number (FILE *f, unsigned long number) -{ - int i, flag = 0; - char buf[4]; - - i = 4; - do { - buf[--i] = (number & 0x7F) | flag; - number = number >> 7; - flag = 0x80; - } while (number != 0); - - fwrite (buf + i, 1, 4 - i, f); -} - -static unsigned long -read_number (FILE *f) -{ - int byte; - unsigned long num; - - num = 0; - do { - byte = getc (f); - num = num << 7 | (byte & 0x7F); - } while (byte & 0x80); - - return num; -} - diff --git a/libibex/find.c b/libibex/find.c deleted file mode 100644 index 1bb58917ac..0000000000 --- a/libibex/find.c +++ /dev/null @@ -1,198 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public License - * as published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with the Gnome Library; see the file COPYING.LIB. If not, - * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* find.c: index file searching ops */ - -#include - -#include "ibex_internal.h" - -/** - * ibex_find: search an ibex for a word - * @ib: an ibex - * @word: the word - * - * This routine searches an ibex for a word and returns a GPtrArray - * containing the names of the files in the ibex that contain the word. - * If no matches are found, it will return an empty array (not NULL). - * The caller must free the array, but MUST NOT free or alter its - * elements. - * - * Return value: the array of filenames containing @word - **/ -GPtrArray * -ibex_find (ibex *ib, char *word) -{ - GPtrArray *refs, *ret; - ibex_file *ibf; - int i; - - ret = g_ptr_array_new (); - refs = g_hash_table_lookup (ib->words, word); - if (refs) { - for (i = 0; i < refs->len; i++) { - ibf = g_ptr_array_index (refs, i); - g_ptr_array_add (ret, ibf->name); - } - } - return ret; -} - -/** - * ibex_contains_name: - * @ib: - * @name: - * - * Returns #TRUE if the ibex @ib has any index entry for - * the key @name. - * - * Return value: - **/ -gboolean -ibex_contains_name(ibex *ib, char *name) -{ - return g_tree_lookup(ib->files, name) != NULL; -} - -/** - * ibex_find_name: Check if a word occurs in a given file - * @ib: an ibex - * @name: a filename - * @word: a word - * - * This checks if the given word occurs in the given file. - * - * Return value: TRUE or FALSE - **/ -gboolean -ibex_find_name (ibex *ib, char *name, char *word) -{ - GPtrArray *refs; - ibex_file *ibf; - int i; - - refs = g_hash_table_lookup (ib->words, word); - if (refs) { - for (i = 0; i < refs->len; i++) { - ibf = g_ptr_array_index (refs, i); - if (!strcmp (ibf->name, name)) - return TRUE; - } - } - return FALSE; -} - -static gint -build_array (gpointer key, gpointer value, gpointer data) -{ - char *name = key; - unsigned int count = GPOINTER_TO_UINT (value); - GPtrArray *ret = data; - - if (count == 1) - g_ptr_array_add (ret, name); - return FALSE; -} - -/** - * ibex_find_all: Find files containing multiple words - * @ib: an ibex - * @words: a GPtrArray of words - * - * This works like ibex_find(), but returns an array of filenames - * which contain all of the words in @words. - * - * Return value: an array of matches - **/ -GPtrArray * -ibex_find_all (ibex *ib, GPtrArray *words) -{ - GTree *work; - GPtrArray *wrefs, *ret; - int i, j, count; - char *word; - ibex_file *ibf; - - if (words->len == 0) - return g_ptr_array_new (); - else if (words->len == 1) - return ibex_find (ib, g_ptr_array_index (words, 0)); - - work = g_tree_new (strcmp); - for (i = 0; i < words->len; i++) { - word = g_ptr_array_index (words, i); - wrefs = g_hash_table_lookup (ib->words, word); - if (!wrefs) { - /* One of the words isn't even in the index. */ - g_tree_destroy (work); - return g_ptr_array_new (); - } - - if (i == 0) { - /* Copy the references into a tree, using the - * filenames as keys and the size of words as - * the value. - */ - for (j = 0; j < wrefs->len; j++) { - ibf = g_ptr_array_index (wrefs, j); - g_tree_insert (work, ibf->name, - GUINT_TO_POINTER (words->len)); - } - } else { - /* Increment the counts in the working tree - * for the references for this word. - */ - for (j = 0; j < wrefs->len; j++) { - ibf = g_ptr_array_index (wrefs, j); - count = GPOINTER_TO_UINT (g_tree_lookup (work, ibf->name)); - if (count) { - g_tree_insert (work, ibf->name, - GUINT_TO_POINTER (count - 1)); - } - } - } - } - - /* Build an array with the refs that contain all the words. */ - ret = g_ptr_array_new (); - g_tree_traverse (work, build_array, G_IN_ORDER, ret); - g_tree_destroy (work); - return ret; -} - -static void -ibex_dump_foo(char *key, GPtrArray *refs, void *data) -{ - int i; - - printf("%s: ", key); - for (i=0;ilen;i++) { - ibex_file *ibf = g_ptr_array_index (refs, i); - printf("%c%s", ibf->index==-1?'-':' ', ibf->name); - } - printf("\n"); -} - -/* debug function to dump the tree, in key order */ -void -ibex_dump_all (ibex *ib) -{ - g_hash_table_foreach(ib->words, ibex_dump_foo, 0); -} diff --git a/libibex/ibex.h b/libibex/ibex.h deleted file mode 100644 index 03635e275d..0000000000 --- a/libibex/ibex.h +++ /dev/null @@ -1,106 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public License - * as published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with the Gnome Library; see the file COPYING.LIB. If not, - * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef IBEX_H -#define IBEX_H - -#include -#include -#include -#include - -struct ibex; -typedef struct ibex ibex; - -/* All functions that can fail set errno and return NULL or -1 on - * failure. - */ - -/* Open the named ibex index file. If CREATE is true, create the file - * if it doesn't already exist. - */ -ibex *ibex_open (char *file, int flags, int mode); - -/* Write the ibex to disk. */ -int ibex_write (ibex *ib); - -/* only save if ibex has changed. */ -int ibex_save (ibex *ib); - -/* Write the ibex to disk if it has changed, and free all memory - * associated with it. - */ -int ibex_close (ibex *ib); - - - -/* Index the named file. (If the FILENAME is already in the index, - * remove the old copy. - */ -int ibex_index_file (ibex *ib, char *filename); - -/* Index LEN bytes off FD, using NAME as the filename in the index. - * (If NAME already exists in the index, this adds more data to it.) - */ -int ibex_index_fd (ibex *ib, char *name, int fd, size_t len); - -/* Like ibex_index_fd, but with a buffer rather than a file descriptor. - * The buffer does not need to be '\0'-terminated. If UNREAD is not - * NULL, then the indexer won't assume that the buffer ends on a word - * boundary, and will return (in UNREAD) the number of bytes from the - * end of the buffer that it didn't use, if any. - */ -int ibex_index_buffer (ibex *ib, char *name, char *buffer, - size_t len, size_t *unread); - -/* Remove entries for a given file from the index. (Most of the removal - * isn't actually done until the file is written out to disk, so this - * is very fast.) - */ -void ibex_unindex (ibex *ib, char *name); - -/* Rename a file in the index. (This is also fast.) */ -void ibex_rename (ibex *ib, char *oldfilename, char *newfilename); - - - -/* Find a word in the index. Returns an array of strings: the caller - * should free the array, but should not free or modify the strings. - */ -GPtrArray *ibex_find (ibex *ib, char *word); - -/* Find if a word is contained in a specific name reference. - */ -gboolean ibex_find_name (ibex *ib, char *name, char *word); - -/* has a file been indexed? - */ -gboolean ibex_contains_name(ibex *ib, char *name); - -/* Return all the files containing all of the words in the given - * array. Returned data is like with ibex_find. - */ -GPtrArray *ibex_find_all (ibex *ib, GPtrArray *words); - -/* Debug function, dumps the whole index tree, showing removed files as well */ -void ibex_dump_all (ibex *ib); - -#endif /* ! IBEX_H */ - diff --git a/libibex/ibex_internal.h b/libibex/ibex_internal.h deleted file mode 100644 index 1647147a3a..0000000000 --- a/libibex/ibex_internal.h +++ /dev/null @@ -1,39 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public License - * as published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with the Gnome Library; see the file COPYING.LIB. If not, - * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include - -#include "ibex.h" - -#define IBEX_VERSION "ibex1" - -struct ibex { - char *path; - GTree *files; - GHashTable *words; - GPtrArray *oldfiles; - gboolean dirty; -}; - -struct ibex_file { - char *name; - long index; -}; -typedef struct ibex_file ibex_file; diff --git a/libibex/index.c b/libibex/index.c deleted file mode 100644 index 1afedbd251..0000000000 --- a/libibex/index.c +++ /dev/null @@ -1,154 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public License - * as published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with the Gnome Library; see the file COPYING.LIB. If not, - * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* index.c: high-level indexing ops */ - -#include -#include -#include -#include -#include - -#include "ibex_internal.h" - -/** - * ibex_index_file: Index a file by name - * @ib: an ibex - * @filename: name of the file to index - * - * This indexes the given file into @ib. If @filename is already in - * the ibex, the existing index entries for it are discarded and the - * file is indexed anew. - * - * Return value: 0 on success, -1 on failure. - **/ -int -ibex_index_file (ibex *ib, char *filename) -{ - int fd; - int status; - struct stat st; - - fd = open (filename, O_RDONLY); - if (fd < 0) - return -1; - - if (fstat (fd, &st) == -1) { - close (fd); - return -1; - } - if (!S_ISREG (st.st_mode)) { - close (fd); - errno = EINVAL; - return -1; - } - - ibex_unindex (ib, filename); - status = ibex_index_fd (ib, filename, fd, st.st_size); - close (fd); - return status; -} - -/** - * ibex_index_fd: Index a file given a file descriptor - * @ib: an ibex - * @name: the name of the file being indexed - * @fd: a file descriptor, open for reading - * @len: the number of bytes to read from the file - * - * This indexes a file, or a part of a file, given an open file - * descriptor and a size. There is no requirement that @name - * actually correspond to @fd in any particular way. - * - * If the function returns successfully, the file descriptor offset of - * @fd will be exactly @len bytes beyond where it was when the - * function was called. The indexer assumes that this point is a word - * boundary. - * - * The behavior of this function is not defined if it is not - * possible to read @len bytes off @fd. - * - * Return value: 0 on success, -1 on failure. - **/ -int -ibex_index_fd (ibex *ib, char *name, int fd, size_t len) -{ - char *buf; - int off = 0, nread, status; - - buf = g_malloc (len); - do { - nread = read (fd, buf + off, len - off); - if (nread == -1) { - g_free (buf); - return -1; - } - off += nread; - } while (off != len); - - status = ibex_index_buffer (ib, name, buf, len, NULL); - g_free (buf); - - return status; -} - -/** - * ibex_unindex: Remove a file from the ibex - * @ib: an ibex - * @name: name of the file to remove - * - * This removes all references to @name from @ib. No memory is freed - * right away, but further searches on @ib will never return @name. - **/ -void -ibex_unindex (ibex *ib, char *name) -{ - ibex_file *ibf; - - ibf = g_tree_lookup (ib->files, name); - if (ibf) { - ibf->index = -1; - g_tree_remove (ib->files, name); - g_ptr_array_add (ib->oldfiles, ibf); - ib->dirty = TRUE; - } -} - -/** - * ibex_rename: Rename a file in the ibex - * @ib: an ibex - * @oldname: the old name of the file - * @newname: the new name of the file - * - * This renames a file in the ibex. - **/ -void -ibex_rename (ibex *ib, char *oldname, char *newname) -{ - ibex_file *ibf; - - ibf = g_tree_lookup (ib->files, oldname); - if (ibf) { - g_tree_remove (ib->files, oldname); - g_free (ibf->name); - ibf->name = g_strdup (newname); - g_tree_insert (ib->files, ibf->name, ibf); - } -} diff --git a/libibex/lookup.c b/libibex/lookup.c deleted file mode 100644 index 2d01dbf850..0000000000 --- a/libibex/lookup.c +++ /dev/null @@ -1,83 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * Copyright (C) 2000 Helix Code Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/* lookup.c: a simple client, part 2 */ - -#include -#include -#include -#include - -#include "ibex.h" - -extern int optind; -extern char *optarg; - -static void -usage (void) -{ - fprintf (stderr, "Usage: lookup [-f indexfile] word ...\n"); - exit (1); -} - -int -main (int argc, char **argv) -{ - ibex *ib; - GPtrArray *ans, *words; - int opt, i; - char *file = "INDEX"; - - while ((opt = getopt (argc, argv, "f:")) != -1) { - switch (opt) { - case 'f': - file = optarg; - break; - - default: - usage (); - break; - } - } - argc -= optind; - argv += optind; - - if (argc == 0) - usage (); - - ib = ibex_open (file, O_RDWR|O_CREAT, 0600); - if (!ib) { - printf ("Couldn't open %s: %s\n", file, strerror (errno)); - exit (1); - } - - words = g_ptr_array_new (); - while (argc--) - g_ptr_array_add (words, argv[argc]); - - ans = ibex_find_all (ib, words); - if (ans) { - for (i = 0; i < ans->len; i++) - printf ("%s\n", (char *)g_ptr_array_index (ans, i)); - exit (0); - } else { - printf ("Nope.\n"); - exit (1); - } -} diff --git a/libibex/mkindex.c b/libibex/mkindex.c deleted file mode 100644 index 151dcecb2d..0000000000 --- a/libibex/mkindex.c +++ /dev/null @@ -1,84 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * Copyright (C) 2000 Helix Code Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/* mkindex.c: a simple client, part 1 */ - -#include -#include -#include -#include - -#include "ibex.h" - -extern int optind; -extern char *optarg; - -static void -usage (void) -{ - fprintf (stderr, "Usage: mkindex [-f indexfile] file ...\n"); - exit (1); -} - -int -main (int argc, char **argv) -{ - ibex *ib; - int opt; - char *file = "INDEX"; - - while ((opt = getopt (argc, argv, "f:")) != -1) { - switch (opt) { - case 'f': - file = optarg; - break; - - default: - usage (); - break; - } - } - argc -= optind; - argv += optind; - - if (argc == 0) - usage (); - - ib = ibex_open (file, O_CREAT|O_RDWR, 0600); - if (!ib) { - fprintf (stderr, "Couldn't open index file %s: %s\n", - file, strerror (errno)); - exit (1); - } - - while (argc--) { - if (ibex_index_file (ib, argv[argc]) == -1) { - fprintf (stderr, "Couldn't index %s: %s\n", - argv[argc], strerror (errno)); - exit (1); - } - } - - if (ibex_close (ib) != 0) { - fprintf (stderr, "Failed to write index file %s: %s\n", - file, strerror (errno)); - exit (1); - } - exit (0); -} diff --git a/libibex/words.c b/libibex/words.c deleted file mode 100644 index 7642b0a305..0000000000 --- a/libibex/words.c +++ /dev/null @@ -1,269 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public License - * as published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with the Gnome Library; see the file COPYING.LIB. If not, - * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* words.c: low-level indexing ops */ - -#include -#include -#include - -#include - -#include "ibex_internal.h" - -static signed char utf8_trans[] = { - 'A', 'A', 'A', 'A', 'A', 'A', -1, 'C', 'E', 'E', 'E', 'E', 'I', 'I', - 'I', 'I', -2, 'N', 'O', 'O', 'O', 'O', 'O', '*', 'O', 'U', 'U', 'U', - 'U', 'Y', -3, -4, 'a', 'a', 'a', 'a', 'a', 'a', -5, 'c', 'e', 'e', - 'e', 'e', 'i', 'i', 'i', 'i', -6, 'n', 'o', 'o', 'o', 'o', 'o', '/', - 'o', 'u', 'u', 'u', 'u', 'y', -7, 'y', 'A', 'a', 'A', 'a', 'A', 'a', - 'C', 'c', 'C', 'c', 'C', 'c', 'C', 'c', 'D', 'd', 'D', 'd', 'E', 'e', - 'E', 'e', 'E', 'e', 'E', 'e', 'E', 'e', 'G', 'g', 'G', 'g', 'G', 'g', - 'G', 'g', 'H', 'h', 'H', 'h', 'I', 'i', 'I', 'i', 'I', 'i', 'I', 'i', - 'I', 'i', -8, -9, 'J', 'j', 'K', 'k', 'k', 'L', 'l', 'L', 'l', 'L', - 'l', 'L', 'l', 'L', 'l', 'N', 'n', 'N', 'n', 'N', 'n', 'n', -10, -11, - 'O', 'o', 'O', 'o', 'O', 'o', -12, -13, 'R', 'r', 'R', 'r', 'R', 'r', - 'S', 'r', 'S', 's', 'S', 's', 'S', 's', 'T', 't', 'T', 't', 'T', 't', - 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'W', 'w', - 'Y', 'y', 'Y', 'Z', 'z', 'Z', 'z', 'Z', 'z', 's' -}; - -static char *utf8_long_trans[] = { - "AE", "TH", "TH", "ss", "ae", "th", "th", "IJ", "ij", - "NG", "ng", "OE", "oe" -}; - -/* This is a bit weird. It takes pointers to the start and end (actually - * just past the end) of a UTF-8-encoded word, and a buffer at least 1 - * byte longer than the length of the word. It copies the word into the - * buffer in all lowercase without accents, and splits up ligatures. - * (Since any ligature would be a multi-byte character in UTF-8, splitting - * them into two US-ASCII characters won't overrun the buffer.) - * - * It is not safe to call this routine with bad UTF-8. - */ -static void -normalize_word (char *start, char *end, char *buf) -{ - unsigned char *s, *d; - unicode_char_t uc; - - s = (unsigned char *)start; - d = (unsigned char *)buf; - while (s < (unsigned char *)end) { - if (*s < 0x80) { - /* US-ASCII character: copy unless it's - * an apostrophe. - */ - if (*s != '\'') - *d++ = tolower (*s); - s++; - } else { - char *next = unicode_get_utf8 (s, &uc); - if (uc >= 0xc0 && uc < 0xc0 + sizeof (utf8_trans)) { - signed char ch = utf8_trans[uc - 0xc0]; - if (ch > 0) - *d++ = tolower (ch); - else { - *d++ = tolower (utf8_long_trans[-ch - 1][0]); - *d++ = tolower (utf8_long_trans[-ch - 1][1]); - } - s = next; - } else { - while (s < (unsigned char *)next) - *d++ = *s++; - } - } - } - *d = '\0'; -} - -enum { IBEX_ALPHA, IBEX_NONALPHA, IBEX_INVALID, IBEX_INCOMPLETE }; - -/* This incorporates parts of libunicode, because there's no way to - * force libunicode to not read past a certain point. - */ -static int -utf8_category (char *sp, char **snp, char *send) -{ - unsigned char *p = (unsigned char *)sp, **np = (unsigned char **)snp; - unsigned char *end = (unsigned char *)send; - - if (isascii (*p)) { - *np = p + 1; - if (isalpha (*p) || *p == '\'') - return IBEX_ALPHA; - return IBEX_NONALPHA; - } else { - unicode_char_t uc; - int more; - - if ((*p & 0xe0) == 0xc0) { - more = 1; - uc = *p & 0x1f; - } else if ((*p & 0xf0) == 0xe0) { - more = 2; - uc = *p & 0x0f; - } else if ((*p & 0xf8) == 0xf0) { - more = 3; - uc = *p & 0x07; - } else if ((*p & 0xfc) == 0xf8) { - more = 4; - uc = *p & 0x03; - } else if ((*p & 0xfe) == 0xfc) { - more = 5; - uc = *p & 0x01; - } else - return IBEX_INVALID; - - if (p + more > end) - return IBEX_INCOMPLETE; - - while (more--) { - if ((*++p & 0xc0) != 0x80) - return IBEX_INVALID; - uc <<= 6; - uc |= *p & 0x3f; - } - - *np = p + 1; - if (unicode_isalpha (uc)) - return IBEX_ALPHA; - else - return IBEX_NONALPHA; - } -} - -static ibex_file * -get_ibex_file (ibex *ib, char *name) -{ - ibex_file *ibf; - - ibf = g_tree_lookup (ib->files, name); - if (!ibf) { - ibf = g_malloc (sizeof (ibex_file)); - ibf->name = g_strdup (name); - ibf->index = 0; - g_tree_insert (ib->files, ibf->name, ibf); - ib->dirty = TRUE; - } - return ibf; -} - -static void -ref_word (ibex *ib, ibex_file *ibf, char *word) -{ - GPtrArray *refs; - - refs = g_hash_table_lookup (ib->words, word); - if (!refs) { - refs = g_ptr_array_new (); - g_hash_table_insert (ib->words, g_strdup (word), refs); - g_ptr_array_add (refs, ibf); - ib->dirty = TRUE; - } else if (g_ptr_array_index (refs, refs->len - 1) != ibf) { - g_ptr_array_add (refs, ibf); - ib->dirty = TRUE; - } -} - -/** - * ibex_index_buffer: the lowest-level ibex indexing interface - * @ib: an ibex - * @name: the name of the file being indexed - * @buffer: a buffer containing data from the file - * @len: the length of @buffer - * @unread: an output argument containing the number of unread bytes - * - * This routine indexes up to @len bytes from @buffer into @ib. - * If @unread is NULL, the indexer assumes that the buffer ends on a - * word boundary, and will index all the way to the end of the - * buffer. If @unread is not NULL, and the buffer ends with an - * alphabetic character, the indexer will assume that the buffer has - * been cut off in the middle of a word, and return the number of - * un-indexed bytes at the end of the buffer in *@unread. The caller - * should then read in more data through whatever means it has - * and pass in the unread bytes from the original buffer, followed - * by the new data, on its next call. - * - * Return value: 0 on success, -1 on failure. - **/ -int -ibex_index_buffer (ibex *ib, char *name, char *buffer, - size_t len, size_t *unread) -{ - char *p, *q, *nq, *end, *word; - ibex_file *ibf = get_ibex_file (ib, name); - int wordsiz, cat; - - if (unread) - *unread = 0; - - end = buffer + len; - wordsiz = 20; - word = g_malloc (wordsiz); - - p = buffer; - while (p < end) { - while (p < end) { - cat = utf8_category (p, &q, end); - if (cat != IBEX_NONALPHA) - break; - p = q; - } - if (p == end) { - g_free (word); - return 0; - } else if (cat == IBEX_INVALID) { - errno = EINVAL; - g_free (word); - return -1; - } else if (cat == IBEX_INCOMPLETE) - q = end; - - while (q < end) { - cat = utf8_category (q, &nq, end); - if (cat != IBEX_ALPHA) - break; - q = nq; - } - if (cat == IBEX_INVALID || - (cat == IBEX_INCOMPLETE && !unread)) { - errno = EINVAL; - g_free (word); - return -1; - } else if (cat == IBEX_INCOMPLETE || (q == end && unread)) { - *unread = end - p; - g_free (word); - return 0; - } - - if (wordsiz < q - p + 1) { - wordsiz = q - p + 1; - word = g_realloc (word, wordsiz); - } - normalize_word (p, q, word); - ref_word (ib, ibf, word); - p = q; - } - - g_free (word); - return 0; -} diff --git a/libical/.cvsignore b/libical/.cvsignore deleted file mode 100644 index 41f3513f40..0000000000 --- a/libical/.cvsignore +++ /dev/null @@ -1,19 +0,0 @@ -*.la -*.lo -.libs -Makefile -Makefile.in -aclocal.m4 -config.cache -config.guess -config.h -config.h.in -config.log -config.status -config.sub -configure -libtool -ltconfig -ltmain.sh -stamp-h -stamp-h.in diff --git a/libical/AUTHORS b/libical/AUTHORS deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/libical/CHANGES b/libical/CHANGES deleted file mode 100644 index 953514a9e4..0000000000 --- a/libical/CHANGES +++ /dev/null @@ -1,222 +0,0 @@ - -Version 0.15 ------------- - -Split the storage classess ( icalstore, icalcluster, icalcalendar ) -into a seperate library, libicalss - -Implemented restriction checking in file icalrestrictions.c. The -checking is not complete, but can handle the bulk of the restrictions -described in RFC 2446. - -Created a new value type, METHOD. Changed METHOD property to use the -new value. The METHOD value uses an enumeration. - - -Version 0.14b -------------- - -Implemented parsing of RECUR values, although it does not handle BYDAY -specs with numbers. - -Fixed error in icalparser_next_line that mangled lines longer than the -temp buffer (1024 chars.) The temp buffer is now 80 chars, and it can -handle (apparently) arbitrary length lines - -Fixed severe brokenness in a value, but I forgot which one. - -Cleaned cruft out of the distribution, so the tarfile is smaller. - - -Version 0.14a 14 Jan 00 ------------------------ - -Fixed bug in ROLE parameter -- missing '-' in the text of allowed values - -Fixed bug in X-parameters - -Version 0.14 11 Jan 00 ----------------------- - -Fixed wrong value type for TRIGGER property - -Added Calendar object. Calendar is an aggregate of two stores and two -clusters, and can store all of the inforamation associated with a -calendar. - -icalcomponent_add_property and icalcomponent_add_component will -complain if you try to add a component or property that is already -part of an other component. The *_free routines wil complain if you try -to free a linked component or property. - -More improvements to error handling. - -Parser is much more robust. - -Minor memory enhancements. - -Regression test runs without memory leaks. - -Version 0.13d 21Dec99 ---------------------- - -Seperated perl interface and library - -Added autoconf support - -Scripts that generate derived properties, values and parameters now -change source and header files inline. - -Changed icalstore to cluster all components with DTSTART in a month -into a single file. This should reduce number of file accesses by a -factor of 60. - -Ran code through Purify and fixed memory leaks. - - -Version 0.13 16Nov99 ---------------------- - -Yet more bug fixes! Yeah! - -Added better error handling. The Parser inserts X-LIC-*ERROR -properties to warn of parsing errors. - -The imip source/sink programs in /src/imip is demonstrably functional. - -Version 0.12b 17Oct99 ---------------------- - -More bug fixes, particularily in parse from string routines - -ICal::Store is mostly functional - -This is version is a checkpoint, not a release. - -Version 0.12a 10Oct99 ---------------------- - -Expanded perl interface: - Added 1/2 of Store module - Fixed bugs - Implemeted get_{first,next}_property - -Extended C interface - Made get_{first,next}_property work properly - Fixed bugs - - -This is version is a checkpoint, not a release. - -Version 0.12 27Aug99 --------------------- - -Added a rudimentatry perl interface - -This is version is a checkpoint, not a release. - - -Version 0.11 11Aug99 --------------------- - -Eliminated most use of flex/bison -- all parsing, except for the -values, is done in C. - -Cleaned up memory leaks. Purify claims that I got them all. - -Moved all derived component/prop/param/value code ( in .inc / .h -files) into main files ( icalcomponent.{c,h}, icalproperty.{c,h}, etc/ -) - -Implemented *_clone routines. - -Fixed a lot of bugs. - -Implemented more value types. Still unimplemeneted are BINARY and RECUR - -Included MacOS/Code Warior files from Graham Davison - - -Version 0.10 8Jul99 -------------------- - -Eliminated shift/reduce and reduce/reduce conflicts in the parser. -This version is almost feature complete -- it has the basic structure -for all of the library's functionality, and it will only require -implementing procedure shells and fixing bugs. I think that all of the -hard work is done... - -Version 0.09a,b 3,7 Jul99 -------------------------- - -Various improvements to the parser, added some functionality. The parser code -is mostly complete, and should be fully functional, except for a horde of -bugs. Also added support for X-Properties. - -Version 0.09 25Jun99 --------------------- - -Added a parser in files src/comp/icalitip.{y,l} The lexer is mostly -functional, but the parser is not. - - -Version 0.08 2Jun99 --------------------- - -All files now have MPL licensing - -Implement enough of the code to perform some rudimentary testing - - -Version 0.07 14May99 --------------------- - -Remove all interfaces that construct object from a string - -Moved most code back into comp directory - -Implemented C files for most headers -- usecases.c now links. - -Many improvements to generation scripts. - - - -Version 0.06 25Apr99 --------------------- - -Expanded distribution to include: - Directory structure that can accomodate future expansion - Several levels of Makefiles - This CHANGES file - -Added headers for irip and parse modules - -Added several files with design information - -Added scripts that I had used to generate much of the ical header code. - -Split C headers from CC headers - -Added data for iTIP and iCAL component restrictions in restrictions.csv - -Version 0.05 11Apr99 ----------------------- - -Changes to ical headers - - Added derived Property classes. - - Improved the interface to the derived property and parameter classes - - Added derived component classes. - - Created usecases.c and ccusecases.cc to demonstrate use - - C++ interface compile - - -Version 0.04 5Apr99 -------------------- - -Version 0.02 30Mar99 --------------------- \ No newline at end of file diff --git a/libical/COPYING b/libical/COPYING deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/libical/ChangeLog b/libical/ChangeLog deleted file mode 100644 index 935d5cfede..0000000000 --- a/libical/ChangeLog +++ /dev/null @@ -1,62 +0,0 @@ -2000-05-13 Ettore Perazzoli - - * src/libical/Makefile.am (INCLUDES): Include from the build - directory too. - -2000-05-10 Christopher James Lahey - - * configure.in: Reorder Makefiles so that it will build. - -2000-04-27 Ettore Perazzoli - - * src/test/Makefile.am - (INCLUDES): Add `-I ../libical' here too. - - * src/libicalss/Makefile.am: - (INCLUDES): I am an idiot. It should be `-I ../libical'. - -2000-04-27 Ettore Perazzoli - - * src/libicalss/Makefile.am: - (INCLUDES): Add `$(builddir)/../libicalss so that we can #include - "libicalversion.h" too. - -2000-04-26 Matt Loper - - * src/libical/.cvsignore: added icalversion.h. - - * src/libical/icalversion.h: autogenerated file removed from cvs. - -2000-04-26 Christopher James Lahey - - * src/test/Makefile.in: Removed. - -2000-04-25 Ettore Perazzoli - - * src/libicalss/Makefile.am (INCLUDES): Use `$(srcdir)' properly. - -2000-04-24 Seth Alves - - * src/libical/icaltypes.c (icaldurationtype_from_timet): convert - from a time_t to an icaldurationtype. - -2000-03-17 Eric Busboom - - * icalstore.c Vastly improved icalstore_test. - -2000-03-16 Eric Busboom - - * icalcluster.c Added compile flag (ICAL_SAFESAVES) to switch how - icalcluster saves files during commits. When the flag is define, - it will write the data to a temorar file and rename the file to - the target file. - - * storage.c Added seterate test suite for sotage components - - * icalparser.c Created parser object, implemented line-oriented - parsering, and made message oriented parsing work in terms f line - oriented parsing. - - * icalparser.c Fixed icalparser_get_line to remove \r in input. - - diff --git a/libical/INSTALL b/libical/INSTALL deleted file mode 100644 index 88e2a5e7d6..0000000000 --- a/libical/INSTALL +++ /dev/null @@ -1,24 +0,0 @@ -Building the library --------------------- - -This distribution is developed on Red Hat Linux 6.0 and usually -compiles on SunOS 5.6 and FreeBSD 2.27. I have reports of success of -previous version on MacOS ( with CodeWarrior ) but I don't know about -any other systems. - -The library is configured with automake. From the root directory, run - - ./configure - -To build all of the Makefiles for your system. If you will be installing the library, you may want to use the --prefix flag to set the directory where the library and header files will be installed. - - ./configure --prefix=/proj/local/ - -If configure runs fine, run "make" to build the library and -"make install" to install it. - -The current version of libical focuses on creating and -manipulating iCal objects. With it, you can parse text representations -of iCal components, add and remove sub-components, properties, -parameters and values, and print the components back out as strings. - diff --git a/libical/MacOS/errno.h b/libical/MacOS/errno.h deleted file mode 100644 index 4be3479b50..0000000000 --- a/libical/MacOS/errno.h +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Copyright (c) 1982, 1986, 1989 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)errno.h 7.13 (Berkeley) 2/19/91 - */ - -#ifdef macintosh -#include -#else -#ifndef KERNEL -extern int errno; /* global error number */ -#endif -#endif - - -#define EPERM 1 /* Operation not permitted */ -/* MSL defines ENOMEM, EACCES, ENOENT, ENOSYS. We give in. */ -#ifndef ENOENT -#define ENOENT 2 /* No such file or directory */ -#endif -#define ESRCH 3 /* No such process */ -#define EINTR 4 /* Interrupted system call */ -#define EIO 5 /* Input/output error */ -#define ENXIO 6 /* Device not configured */ -#define E2BIG 7 /* Argument list too long */ -#define ENOEXEC 8 /* Exec format error */ -#define EBADF 9 /* Bad file descriptor */ -#define ECHILD 10 /* No child processes */ -#define EDEADLK 11 /* Resource deadlock avoided */ - /* 11 was EAGAIN */ -#ifndef ENOMEM -#define ENOMEM 12 /* Cannot allocate memory */ -#define EACCES 13 /* Permission denied */ -#endif -#define EFAULT 14 /* Bad address */ -#ifndef _POSIX_SOURCE -#define ENOTBLK 15 /* Block device required */ -#define EBUSY 16 /* Device busy */ -#endif -#define EEXIST 17 /* File exists */ -#define EXDEV 18 /* Cross-device link */ -#define ENODEV 19 /* Operation not supported by device */ -#define ENOTDIR 20 /* Not a directory */ -#define EISDIR 21 /* Is a directory */ -#define EINVAL 22 /* Invalid argument */ -#define ENFILE 23 /* Too many open files in system */ -#define EMFILE 24 /* Too many open files */ -#define ENOTTY 25 /* Inappropriate ioctl for device */ -#ifndef _POSIX_SOURCE -#define ETXTBSY 26 /* Text file busy */ -#endif -#define EFBIG 27 /* File too large */ -#define ENOSPC 28 /* No space left on device */ -#define ESPIPE 29 /* Illegal seek */ -#define EROFS 30 /* Read-only file system */ -#define EMLINK 31 /* Too many links */ -#define EPIPE 32 /* Broken pipe */ - -#ifndef __MWERKS__ -/* math software */ -#define EDOM 33 /* Numerical argument out of domain */ -#define ERANGE 34 /* Result too large */ -#endif - -/* non-blocking and interrupt i/o */ -#if defined(macintosh) -#ifndef EAGAIN -#define EAGAIN 11 -#endif -#else -#define EAGAIN 35 /* Resource temporarily unavailable */ -#endif -#define EWOULDBLOCK EAGAIN /* Operation would block */ -#ifndef _POSIX_SOURCE -/* Did I tell that MSL also occupies errnos 33-40? We give in. */ -#if ENOMEM==37 -#define EINPROGRESS 136 /* Operation now in progress */ -#define EALREADY 137 /* Operation already in progress */ - -/* ipc/network software -- argument errors */ -#define ENOTSOCK 138 /* Socket operation on non-socket */ -#define EDESTADDRREQ 139 /* Destination address required */ -#define EMSGSIZE 140 /* Message too long */ -#else -#define EINPROGRESS 36 /* Operation now in progress */ -#define EALREADY 37 /* Operation already in progress */ - -/* ipc/network software -- argument errors */ -#define ENOTSOCK 38 /* Socket operation on non-socket */ -#define EDESTADDRREQ 39 /* Destination address required */ -#define EMSGSIZE 40 /* Message too long */ -#endif -#define EPROTOTYPE 41 /* Protocol wrong type for socket */ -#define ENOPROTOOPT 42 /* Protocol not available */ -#define EPROTONOSUPPORT 43 /* Protocol not supported */ -#define ESOCKTNOSUPPORT 44 /* Socket type not supported */ -#define EOPNOTSUPP 45 /* Operation not supported on socket */ -#define EPFNOSUPPORT 46 /* Protocol family not supported */ -#define EAFNOSUPPORT 47 /* Address family not supported by protocol family */ -#define EADDRINUSE 48 /* Address already in use */ -#define EADDRNOTAVAIL 49 /* Can't assign requested address */ - -/* ipc/network software -- operational errors */ -#define ENETDOWN 50 /* Network is down */ -#define ENETUNREACH 51 /* Network is unreachable */ -#define ENETRESET 52 /* Network dropped connection on reset */ -#define ECONNABORTED 53 /* Software caused connection abort */ -#define ECONNRESET 54 /* Connection reset by peer */ -#define ENOBUFS 55 /* No buffer space available */ -#define EISCONN 56 /* Socket is already connected */ -#define ENOTCONN 57 /* Socket is not connected */ -#define ESHUTDOWN 58 /* Can't send after socket shutdown */ -#define ETOOMANYREFS 59 /* Too many references: can't splice */ -#define ETIMEDOUT 60 /* Connection timed out */ -#define ECONNREFUSED 61 /* Connection refused */ - -#define ELOOP 62 /* Too many levels of symbolic links */ -#endif /* _POSIX_SOURCE */ -#define ENAMETOOLONG 63 /* File name too long */ - -/* should be rearranged */ -#ifndef _POSIX_SOURCE -#define EHOSTDOWN 64 /* Host is down */ -#define EHOSTUNREACH 65 /* No route to host */ -#endif /* _POSIX_SOURCE */ -#define ENOTEMPTY 66 /* Directory not empty */ - -/* quotas & mush */ -#ifndef _POSIX_SOURCE -#define EPROCLIM 67 /* Too many processes */ -#define EUSERS 68 /* Too many users */ -#define EDQUOT 69 /* Disc quota exceeded */ - -/* Network File System */ -#define ESTALE 70 /* Stale NFS file handle */ -#define EREMOTE 71 /* Too many levels of remote in path */ -#define EBADRPC 72 /* RPC struct is bad */ -#define ERPCMISMATCH 73 /* RPC version wrong */ -#define EPROGUNAVAIL 74 /* RPC prog. not avail */ -#define EPROGMISMATCH 75 /* Program version wrong */ -#define EPROCUNAVAIL 76 /* Bad procedure for program */ -#endif /* _POSIX_SOURCE */ - -#define ENOLCK 77 /* No locks available */ - -#ifndef ENOSYS -#define ENOSYS 78 /* Function not implemented */ -#endif - -#define EFTYPE 79 /* Inappropriate file type or format */ - -#ifdef KERNEL -/* pseudo-errors returned inside kernel to modify return to process */ -#define ERESTART -1 /* restart syscall */ -#define EJUSTRETURN -2 /* don't modify regs, just return */ -#endif diff --git a/libical/MacOS/libical.mcp b/libical/MacOS/libical.mcp deleted file mode 100644 index 1c0ec4a35b..0000000000 Binary files a/libical/MacOS/libical.mcp and /dev/null differ diff --git a/libical/MacOS/libical.mcp.exp b/libical/MacOS/libical.mcp.exp deleted file mode 100644 index 07c84e0efc..0000000000 --- a/libical/MacOS/libical.mcp.exp +++ /dev/null @@ -1 +0,0 @@ -icalvalue_get_utcoffset icalvalue_set_utcoffset icalvalue_new_utcoffset icalvalue_get_uri icalvalue_set_uri icalvalue_new_uri icalvalue_get_trigger icalvalue_set_trigger icalvalue_new_trigger icalvalue_get_time icalvalue_set_time icalvalue_new_time icalvalue_get_text icalvalue_set_text icalvalue_new_text icalvalue_get_recur icalvalue_set_recur icalvalue_new_recur icalvalue_get_period icalvalue_set_period icalvalue_new_period icalvalue_get_integer icalvalue_set_integer icalvalue_new_integer icalvalue_get_geo icalvalue_set_geo icalvalue_new_geo icalvalue_get_float icalvalue_set_float icalvalue_new_float icalvalue_get_duration icalvalue_set_duration icalvalue_new_duration icalvalue_get_datetimeperiod icalvalue_set_datetimeperiod icalvalue_new_datetimeperiod icalvalue_get_datetimedate icalvalue_set_datetimedate icalvalue_new_datetimedate icalvalue_get_datetime icalvalue_set_datetime icalvalue_new_datetime icalvalue_get_date icalvalue_set_date icalvalue_new_date icalvalue_get_caladdress icalvalue_set_caladdress icalvalue_new_caladdress icalvalue_get_boolean icalvalue_set_boolean icalvalue_new_boolean icalvalue_get_binary icalvalue_set_binary icalvalue_new_binary icalvalue_get_attach icalvalue_set_attach icalvalue_new_attach icalvalue_isa_value icalvalue_isa icalvalue_as_ical_string icalvalue_trigger_as_ical_string icalvalue_period_as_ical_string icalvalue_datetimeperiod_as_ical_string icalvalue_recur_as_ical_string icalvalue_geo_as_ical_string icalvalue_float_as_ical_string icalvalue_datetimedate_as_ical_string icalvalue_datetime_as_ical_string icalvalue_date_as_ical_string icalvalue_time_as_ical_string icalvalue_duration_as_ical_string icalvalue_attach_as_ical_string icalvalue_string_as_ical_string icalvalue_int_as_ical_string icalvalue_binary_as_ical_string icalvalue_is_valid icalvalue_free icalvalue_new icalvalue_new_impl icalproperty_get_action icalproperty_set_action icalproperty_vanew_action icalproperty_new_action icalproperty_get_due icalproperty_set_due icalproperty_vanew_due icalproperty_new_due icalproperty_get_dtstamp icalproperty_set_dtstamp icalproperty_vanew_dtstamp icalproperty_new_dtstamp icalproperty_get_completed icalproperty_set_completed icalproperty_vanew_completed icalproperty_new_completed icalproperty_get_geo icalproperty_set_geo icalproperty_vanew_geo icalproperty_new_geo icalproperty_get_created icalproperty_set_created icalproperty_vanew_created icalproperty_new_created icalproperty_get_calscale icalproperty_set_calscale icalproperty_vanew_calscale icalproperty_new_calscale icalproperty_get_percentcomplete icalproperty_set_percentcomplete icalproperty_vanew_percentcomplete icalproperty_new_percentcomplete icalproperty_get_exrule icalproperty_set_exrule icalproperty_vanew_exrule icalproperty_new_exrule icalproperty_get_attach icalproperty_set_attach icalproperty_vanew_attach icalproperty_new_attach icalproperty_get_url icalproperty_set_url icalproperty_vanew_url icalproperty_new_url icalproperty_get_rdate icalproperty_set_rdate icalproperty_vanew_rdate icalproperty_new_rdate icalproperty_get_tzname icalproperty_set_tzname icalproperty_vanew_tzname icalproperty_new_tzname icalproperty_get_dtend icalproperty_set_dtend icalproperty_vanew_dtend icalproperty_new_dtend icalproperty_get_summary icalproperty_set_summary icalproperty_vanew_summary icalproperty_new_summary icalproperty_get_recurrenceid icalproperty_set_recurrenceid icalproperty_vanew_recurrenceid icalproperty_new_recurrenceid icalproperty_get_dtstart icalproperty_set_dtstart icalproperty_vanew_dtstart icalproperty_new_dtstart icalproperty_get_freebusy icalproperty_set_freebusy icalproperty_vanew_freebusy icalproperty_new_freebusy icalproperty_get_priority icalproperty_set_priority icalproperty_vanew_priority icalproperty_new_priority icalproperty_get_repeat icalproperty_set_repeat icalproperty_vanew_repeat icalproperty_new_repeat icalproperty_get_tzurl icalproperty_set_tzurl icalproperty_vanew_tzurl icalproperty_new_tzurl icalproperty_get_resources icalproperty_set_resources icalproperty_vanew_resources icalproperty_new_resources icalproperty_get_tzid icalproperty_set_tzid icalproperty_vanew_tzid icalproperty_new_tzid icalproperty_get_exdate icalproperty_set_exdate icalproperty_vanew_exdate icalproperty_new_exdate icalproperty_get_requeststatus icalproperty_set_requeststatus icalproperty_vanew_requeststatus icalproperty_new_requeststatus icalproperty_get_location icalproperty_set_location icalproperty_vanew_location icalproperty_new_location icalproperty_get_sequence icalproperty_set_sequence icalproperty_vanew_sequence icalproperty_new_sequence icalproperty_get_transp icalproperty_set_transp icalproperty_vanew_transp icalproperty_new_transp icalproperty_get_tzoffsetto icalproperty_set_tzoffsetto icalproperty_vanew_tzoffsetto icalproperty_new_tzoffsetto icalproperty_get_x_name icalproperty_get_x icalproperty_set_x_name icalproperty_set_x icalproperty_vanew_x icalproperty_new_x icalproperty_get_class icalproperty_set_class icalproperty_vanew_class icalproperty_new_class icalproperty_get_trigger icalproperty_set_trigger icalproperty_vanew_trigger icalproperty_new_trigger icalproperty_get_comment icalproperty_set_comment icalproperty_vanew_comment icalproperty_new_comment icalproperty_get_organizer icalproperty_set_organizer icalproperty_vanew_organizer icalproperty_new_organizer icalproperty_get_relatedto icalproperty_set_relatedto icalproperty_vanew_relatedto icalproperty_new_relatedto icalproperty_get_contact icalproperty_set_contact icalproperty_vanew_contact icalproperty_new_contact icalproperty_get_attendee icalproperty_set_attendee icalproperty_vanew_attendee icalproperty_new_attendee icalproperty_get_rrule icalproperty_set_rrule icalproperty_vanew_rrule icalproperty_new_rrule icalproperty_get_tzoffsetfrom icalproperty_set_tzoffsetfrom icalproperty_vanew_tzoffsetfrom icalproperty_new_tzoffsetfrom icalproperty_get_version icalproperty_set_version icalproperty_vanew_version icalproperty_new_version icalproperty_get_categories icalproperty_set_categories icalproperty_vanew_categories icalproperty_new_categories icalproperty_get_description icalproperty_set_description icalproperty_vanew_description icalproperty_new_description icalproperty_get_status icalproperty_set_status icalproperty_vanew_status icalproperty_new_status icalproperty_get_prodid icalproperty_set_prodid icalproperty_vanew_prodid icalproperty_new_prodid icalproperty_get_uid icalproperty_set_uid icalproperty_vanew_uid icalproperty_new_uid icalproperty_get_lastmodified icalproperty_set_lastmodified icalproperty_vanew_lastmodified icalproperty_new_lastmodified icalproperty_get_method icalproperty_set_method icalproperty_vanew_method icalproperty_new_method icalproperty_get_value icalproperty_set_value icalproperty_get_next_parameter icalproperty_get_first_parameter icalproperty_count_parameters icalproperty_remove_parameter icalproperty_add_parameter icalproperty_isa_property icalproperty_isa icalproperty_as_ical_string icalproperty_free icalproperty_new icalproperty_new_impl icalproperty_add_parameters icalparameter_set_x icalparameter_get_x icalparameter_new_x icalparameter_set_value icalparameter_get_value icalparameter_new_value icalparameter_set_tzid icalparameter_get_tzid icalparameter_new_tzid icalparameter_set_sentby icalparameter_get_sentby icalparameter_new_sentby icalparameter_set_rsvp icalparameter_get_rsvp icalparameter_new_rsvp icalparameter_set_role icalparameter_get_role icalparameter_new_role icalparameter_set_reltype icalparameter_get_reltype icalparameter_new_reltype icalparameter_set_related icalparameter_get_related icalparameter_new_related icalparameter_set_range icalparameter_get_range icalparameter_new_range icalparameter_set_partstat icalparameter_get_partstat icalparameter_new_partstat icalparameter_set_member icalparameter_get_member icalparameter_new_member icalparameter_set_language icalparameter_get_language icalparameter_new_language icalparameter_set_fmttype icalparameter_get_fmttype icalparameter_new_fmttype icalparameter_set_fbtype icalparameter_get_fbtype icalparameter_new_fbtype icalparameter_set_encoding icalparameter_get_encoding icalparameter_new_encoding icalparameter_set_dir icalparameter_get_dir icalparameter_new_dir icalparameter_set_delegatedto icalparameter_get_delegatedto icalparameter_new_delegatedto icalparameter_set_delegatedfrom icalparameter_get_delegatedfrom icalparameter_new_delegatedfrom icalparameter_set_cutype icalparameter_get_cutype icalparameter_new_cutype icalparameter_set_cn icalparameter_get_cn icalparameter_new_cn icalparameter_set_altrep icalparameter_get_altrep icalparameter_new_altrep icalparameter_get_xname icalparameterset_xname icalparameter_isa_parameter icalparameter_isa icalparameter_is_valid icalparameter_as_ical_string icalparameter_free icalparameter_new icalparameter_new_impl icalenum_string_to_component_kind icalenum_component_kind_to_string icalenum_value_kind_by_prop icalenum_string_to_parameter_kind icalenum_parameter_kind_to_string icalenum_string_to_property_kind icalenum_property_kind_to_string icalcomponent_get_component icalcomponent_get_next_component icalcomponent_get_first_component icalcomponent_count_components icalcomponent_remove_component icalcomponent_add_component icalcomponent_get_properties icalcomponent_get_next_property icalcomponent_get_first_property icalcomponent_count_properties icalcomponent_remove_property icalcomponent_add_property icalcomponent_isa_component icalcomponent_isa icalcomponent_is_valid icalcomponent_as_ical_string icalcomponent_free icalcomponent_vanew icalcomponent_new icalcomponent_new_impl icalcomponent_add_children #pvl_list_count #pvl_elem_count #pvl_apply #pvl_data #pvl_tail #pvl_head #pvl_prior #pvl_next #pvl_count #pvl_clear #pvl_find_next #pvl_find #pvl_remove #pvl_insert_before #pvl_insert_after #pvl_insert_ordered #pvl_pop #pvl_push #pvl_shift #pvl_unshift #pvl_new_element #pvl_newlist #strdup icalrestriction_records icalrestriction_is_parameter_allowed icalrestriction_get_component_restriction icalrestriction_get_property_restriction icalerrno icalerror_set_errno icalerror_clear_errno buffer_ring initialized buffer_pos icalmemory_append_string icalmemory_free_buffer icalmemory_resize_buffer icalmemory_new_buffer icalmemory_free_tmp_buffer icalmemory_resize_tmp_buffer icalmemory_new_tmp_buffer #__msipl_rd__3std # std::__msipl_rd #__dt__Q23std18__random_generatorFv # std::__random_generator::~__random_generator() #seed__Q23std18__random_generatorFUl # std::__random_generator::seed(unsigned long) #setfill__3stdFi # std::setfill(int) #setbase__3stdFi # std::setbase(int) #setiosflags__3stdFl # std::setiosflags(long) #resetiosflags__3stdFl # std::resetiosflags(long) #ffill__3stdFRQ23std35basic_ios>w # std::ffill(std::basic_ios>&,wchar_t) #ffill__3stdFRQ23std35basic_ios>i # std::ffill(std::basic_ios>&,int) #setw__3stdFi # std::setw(int) #setprecision__3stdFi # std::setprecision(int) #__vt__Q23std39basic_istream> # std::basic_istream>::__vt #__vt__Q23std35basic_ios> # std::basic_ios>::__vt #__vt__Q23std39basic_ostream> # std::basic_ostream>::__vt #__vt__Q23std39basic_filebuf> # std::basic_filebuf>::__vt #__vt__Q23std41basic_streambuf> # std::basic_streambuf>::__vt #__vt__Q23std8bad_cast # std::bad_cast::__vt #__vt__Q23std9exception # std::exception::__vt #cerr__3std # std::cerr #clog__3std # std::clog #cout__3std # std::cout #cin__3std # std::cin #index__Q23std8ios_base # std::ios_base::index #heap_size__Q23std14base_allocator # std::base_allocator::heap_size #end_free__Q23std14base_allocator # std::base_allocator::end_free #start_free__Q23std14base_allocator # std::base_allocator::start_free #free_list__Q23std14base_allocator # std::base_allocator::free_list #init_cnt__Q33std8ios_base4Init # std::ios_base::Init::init_cnt #use_facet>__3stdFRCQ23std6locale # std::use_facet>(const std::locale&) #what__Q23std9exceptionCFv # std::exception::what() const #what__Q23std8bad_castCFv # std::bad_cast::what() const #__dt__Q23std9exceptionFv # std::exception::~exception() #use_facet>__3stdFRCQ23std6locale # std::use_facet>(const std::locale&) #__dt__Q23std8bad_castFv # std::bad_cast::~bad_cast() #init__Q23std35basic_ios>FPQ23std41basic_streambuf> # std::basic_ios>::init(std::basic_streambuf>*) #always_noconv__Q23std23_Generic_codecvtCFv # std::_Generic_codecvt::always_noconv() const #out__Q23std23_Generic_codecvtCFRiPCcPCcRPCcPcPcRPc # std::_Generic_codecvt::out(int&,const char*,const char*,const char*&,char*,char*,char*&) const #__ct__Q23std39basic_ostream>FPQ23std41basic_streambuf> # std::basic_ostream>::basic_ostream(std::basic_streambuf>*) #__ct__Q23std39basic_istream>FPQ23std41basic_streambuf> # std::basic_istream>::basic_istream(std::basic_streambuf>*) #__dt__Q33std39basic_ostream>6sentryFv # std::basic_ostream>::sentry::~sentry() #flush__Q23std39basic_ostream>Fv # std::basic_ostream>::flush() #close__Q23std39basic_filebuf>Fv # std::basic_filebuf>::close() #overflow__Q23std41basic_streambuf>Fi # std::basic_streambuf>::overflow(int) #xsputn__Q23std41basic_streambuf>FPCci # std::basic_streambuf>::xsputn(const char*,int) #pbackfail__Q23std41basic_streambuf>Fi # std::basic_streambuf>::pbackfail(int) #uflow__Q23std41basic_streambuf>Fv # std::basic_streambuf>::uflow() #underflow__Q23std41basic_streambuf>Fv # std::basic_streambuf>::underflow() #xsgetn__Q23std41basic_streambuf>FPci # std::basic_streambuf>::xsgetn(char*,int) #showmanyc__Q23std41basic_streambuf>Fv # std::basic_streambuf>::showmanyc() #sync__Q23std41basic_streambuf>Fv # std::basic_streambuf>::sync() #seekpos__Q23std41basic_streambuf>FQ23std7fposs # std::basic_streambuf>::seekpos(std::fpos,short) #seekoff__Q23std41basic_streambuf>FlQ33std8ios_base7seekdirs # std::basic_streambuf>::seekoff(long,std::ios_base::seekdir,short) #setbuf__Q23std41basic_streambuf>FPci # std::basic_streambuf>::setbuf(char*,int) #imbue__Q23std41basic_streambuf>FRCQ23std6locale # std::basic_streambuf>::imbue(const std::locale&) #xsputn__Q23std39basic_filebuf>FPCci # std::basic_filebuf>::xsputn(const char*,int) #xsgetn__Q23std39basic_filebuf>FPci # std::basic_filebuf>::xsgetn(char*,int) #showmanyc__Q23std39basic_filebuf>Fv # std::basic_filebuf>::showmanyc() #imbue__Q23std39basic_filebuf>FRCQ23std6locale # std::basic_filebuf>::imbue(const std::locale&) #uflow__Q23std39basic_filebuf>Fv # std::basic_filebuf>::uflow() #sync__Q23std39basic_filebuf>Fv # std::basic_filebuf>::sync() #setbuf__Q23std39basic_filebuf>FPci # std::basic_filebuf>::setbuf(char*,int) #seekpos__Q23std39basic_filebuf>FQ23std7fposs # std::basic_filebuf>::seekpos(std::fpos,short) #seekoff__Q23std39basic_filebuf>FlQ33std8ios_base7seekdirs # std::basic_filebuf>::seekoff(long,std::ios_base::seekdir,short) #underflow__Q23std39basic_filebuf>Fv # std::basic_filebuf>::underflow() #pbackfail__Q23std39basic_filebuf>Fi # std::basic_filebuf>::pbackfail(int) #overflow__Q23std39basic_filebuf>Fi # std::basic_filebuf>::overflow(int) #@8@68@__dt__Q23std39basic_ostream>Fv #__dt__Q23std35basic_ios>Fv # std::basic_ios>::~basic_ios() #@12@68@__dt__Q23std39basic_istream>Fv #__dt__Q23std39basic_istream>Fv # std::basic_istream>::~basic_istream() #__dt__Q23std39basic_ostream>Fv # std::basic_ostream>::~basic_ostream() #__dt__Q33std8ios_base4InitFv # std::ios_base::Init::~Init() #__dt__Q23std41basic_streambuf>Fv # std::basic_streambuf>::~basic_streambuf() #__ct__Q33std8ios_base4InitFv # std::ios_base::Init::Init() #__dt__Q23std39basic_filebuf>Fv # std::basic_filebuf>::~basic_filebuf() #__mask_map__3std # std::__mask_map #__vt__Q23std15moneypunct # std::moneypunct::__vt #__vt__Q23std15moneypunct # std::moneypunct::__vt #__vt__Q23std15moneypunct # std::moneypunct::__vt #__vt__Q23std15moneypunct # std::moneypunct::__vt #__vt__Q23std12timepunct # std::timepunct::__vt #__vt__Q23std12timepunct # std::timepunct::__vt #__vt__Q23std11numpunct # std::numpunct::__vt #__vt__Q23std11numpunct # std::numpunct::__vt #__vt__Q23std14codecvt # std::codecvt::__vt #__vt__Q23std14codecvt # std::codecvt::__vt #__vt__Q23std15ctype_byname # std::ctype_byname::__vt #__vt__Q23std8ctype # std::ctype::__vt #__vt__Q23std8ctype # std::ctype::__vt #__vt__Q33std6locale5facet # std::locale::facet::__vt #__vt__Q23std13runtime_error # std::runtime_error::__vt #__vt__Q23std12out_of_range # std::out_of_range::__vt #__vt__Q23std12length_error # std::length_error::__vt #__vt__Q23std11logic_error # std::logic_error::__vt #__vt__Q23std9bad_alloc # std::bad_alloc::__vt #__vt__Q23std23_Generic_codecvt # std::_Generic_codecvt::__vt #__vt__Q23std23_Generic_codecvt # std::_Generic_codecvt::__vt #__vt__Q23std64num_get>> # std::num_get>>::__vt #__vt__Q23std64num_get>> # std::num_get>>::__vt #__vt__Q23std64num_put>> # std::num_put>>::__vt #__vt__Q23std64num_put>> # std::num_put>>::__vt #__vt__Q23std20_Generic_numpunct # std::_Generic_numpunct::__vt #__vt__Q23std20_Generic_numpunct # std::_Generic_numpunct::__vt #__vt__Q23std10collate # std::collate::__vt #__vt__Q23std10collate # std::collate::__vt #__vt__Q23std21_Generic_timepunct # std::_Generic_timepunct::__vt #__vt__Q23std21_Generic_timepunct # std::_Generic_timepunct::__vt #__vt__Q23std65time_get>> # std::time_get>>::__vt #__vt__Q23std65time_get>> # std::time_get>>::__vt #__vt__Q23std65time_put>> # std::time_put>>::__vt #__vt__Q23std65time_put>> # std::time_put>>::__vt #__vt__Q23std66money_get>> # std::money_get>>::__vt #__vt__Q23std66money_get>> # std::money_get>>::__vt #__vt__Q23std66money_put>> # std::money_put>>::__vt #__vt__Q23std66money_put>> # std::money_put>>::__vt #__vt__Q23std24_Generic_moneypunct # std::_Generic_moneypunct::__vt #__vt__Q23std24_Generic_moneypunct # std::_Generic_moneypunct::__vt #__vt__Q23std24_Generic_moneypunct # std::_Generic_moneypunct::__vt #__vt__Q23std24_Generic_moneypunct # std::_Generic_moneypunct::__vt #id__Q23std64num_get>> # std::num_get>>::id #__init__id__Q23std64num_get>> #id__Q23std64num_get>> # std::num_get>>::id #__init__id__Q23std64num_get>> #id__Q23std64num_put>> # std::num_put>>::id #__init__id__Q23std64num_put>> #id__Q23std64num_put>> # std::num_put>>::id #__init__id__Q23std64num_put>> #id__Q23std10collate # std::collate::id #__init__id__Q23std10collate #id__Q23std10collate # std::collate::id #__init__id__Q23std10collate #id__Q23std65time_get>> # std::time_get>>::id #__init__id__Q23std65time_get>> #id__Q23std65time_get>> # std::time_get>>::id #__init__id__Q23std65time_get>> #id__Q23std65time_put>> # std::time_put>>::id #__init__id__Q23std65time_put>> #id__Q23std65time_put>> # std::time_put>>::id #__init__id__Q23std65time_put>> #id__Q23std66money_get>> # std::money_get>>::id #__init__id__Q23std66money_get>> #id__Q23std66money_get>> # std::money_get>>::id #__init__id__Q23std66money_get>> #id__Q23std66money_put>> # std::money_put>>::id #__init__id__Q23std66money_put>> #id__Q23std66money_put>> # std::money_put>>::id #__init__id__Q23std66money_put>> #id__Q23std15moneypunct # std::moneypunct::id #__init__id__Q23std15moneypunct #id__Q23std15moneypunct # std::moneypunct::id #__init__id__Q23std15moneypunct #id__Q23std15moneypunct # std::moneypunct::id #__init__id__Q23std15moneypunct #id__Q23std15moneypunct # std::moneypunct::id #__init__id__Q23std15moneypunct #id__Q23std12timepunct # std::timepunct::id #__init__id__Q23std12timepunct #id__Q23std12timepunct # std::timepunct::id #__init__id__Q23std12timepunct #id__Q23std11numpunct # std::numpunct::id #__init__id__Q23std11numpunct #id__Q23std11numpunct # std::numpunct::id #__init__id__Q23std11numpunct #id__Q23std14codecvt # std::codecvt::id #__init__id__Q23std14codecvt #id__Q23std14codecvt # std::codecvt::id #__init__id__Q23std14codecvt #id__Q23std8ctype # std::ctype::id #__init__id__Q23std8ctype #id__Q23std8ctype # std::ctype::id #__init__id__Q23std8ctype #global_s__Q23std6locale # std::locale::global_s #id_count_s__Q33std6locale2id # std::locale::id::id_count_s #insert__Q23std32vector>FPPvUlRCPv # std::vector>::insert(void**,unsigned long,void*const&) #erase__Q23std32vector>FPPvPPv # std::vector>::erase(void**,void**) #do_assign__Q23std32vector>FPCPvPCPvQ23std20forward_iterator_tag # std::vector>::do_assign(void*const*,void*const*,std::forward_iterator_tag) #resize__Q23std32vector>FUlPv # std::vector>::resize(unsigned long,void*) #compare__Q23std59basic_string,Q23std12allocator>CFUlUlPCcUl # std::basic_string, std::allocator>::compare(unsigned long,unsigned long,const char*,unsigned long) const #max_size__Q23std13allocatorCFv # std::allocator::max_size() const #max_size__Q23std12allocatorCFv # std::allocator::max_size() const #max_size__Q23std12allocatorCFv # std::allocator::max_size() const #init__Q23std59basic_string,Q23std12allocator>FPCcPCcRCQ23std12allocatorQ23std26random_access_iterator_tag # std::basic_string, std::allocator>::init(const char*,const char*,const std::allocator&,std::random_access_iterator_tag) #append__Q23std59basic_string,Q23std12allocator>FRCQ23std59basic_string,Q23std12allocator>UlUl # std::basic_string, std::allocator>::append(const std::basic_string, std::allocator>&,unsigned long,unsigned long) #init__Q23std59basic_string,Q23std12allocator>FPCwPCwRCQ23std12allocatorQ23std26random_access_iterator_tag # std::basic_string, std::allocator>::init(const wchar_t*,const wchar_t*,const std::allocator&,std::random_access_iterator_tag) #__dt__Q23std66money_put>>Fv # std::money_put>>::~money_put() #__dt__Q23std66money_put>>Fv # std::money_put>>::~money_put() #__dt__Q23std66money_get>>Fv # std::money_get>>::~money_get() #__dt__Q23std66money_get>>Fv # std::money_get>>::~money_get() #__dt__Q23std65time_put>>Fv # std::time_put>>::~time_put() #__dt__Q23std65time_put>>Fv # std::time_put>>::~time_put() #__dt__Q23std65time_get>>Fv # std::time_get>>::~time_get() #__dt__Q23std65time_get>>Fv # std::time_get>>::~time_get() #__dt__Q23std10collateFv # std::collate::~collate() #__dt__Q23std10collateFv # std::collate::~collate() #__dt__Q23std64num_put>>Fv # std::num_put>>::~num_put() #__dt__Q23std64num_put>>Fv # std::num_put>>::~num_put() #__dt__Q23std64num_get>>Fv # std::num_get>>::~num_get() #__dt__Q23std64num_get>>Fv # std::num_get>>::~num_get() #what__Q23std9bad_allocCFv # std::bad_alloc::what() const #what__Q23std11logic_errorCFv # std::logic_error::what() const #replace>>>__Q33std6locale3impFRCQ23std65time_put>> # std::locale::imp::replace>>>(const std::time_put>>&) #replace>>>__Q33std6locale3impFRCQ23std65time_get>> # std::locale::imp::replace>>>(const std::time_get>>&) #replace>__Q33std6locale3impFRCQ23std12timepunct # std::locale::imp::replace>(const std::timepunct&) #replace>>>__Q33std6locale3impFRCQ23std65time_put>> # std::locale::imp::replace>>>(const std::time_put>>&) #replace>>>__Q33std6locale3impFRCQ23std65time_get>> # std::locale::imp::replace>>>(const std::time_get>>&) #replace>__Q33std6locale3impFRCQ23std12timepunct # std::locale::imp::replace>(const std::timepunct&) #replace>>>__Q33std6locale3impFRCQ23std64num_put>> # std::locale::imp::replace>>>(const std::num_put>>&) #replace>>>__Q33std6locale3impFRCQ23std64num_get>> # std::locale::imp::replace>>>(const std::num_get>>&) #replace>__Q33std6locale3impFRCQ23std11numpunct # std::locale::imp::replace>(const std::numpunct&) #replace>>>__Q33std6locale3impFRCQ23std64num_put>> # std::locale::imp::replace>>>(const std::num_put>>&) #replace>>>__Q33std6locale3impFRCQ23std64num_get>> # std::locale::imp::replace>>>(const std::num_get>>&) #replace>__Q33std6locale3impFRCQ23std11numpunct # std::locale::imp::replace>(const std::numpunct&) #replace>>>__Q33std6locale3impFRCQ23std66money_put>> # std::locale::imp::replace>>>(const std::money_put>>&) #replace>>>__Q33std6locale3impFRCQ23std66money_get>> # std::locale::imp::replace>>>(const std::money_get>>&) #replace>__Q33std6locale3impFRCQ23std15moneypunct # std::locale::imp::replace>(const std::moneypunct&) #replace>__Q33std6locale3impFRCQ23std15moneypunct # std::locale::imp::replace>(const std::moneypunct&) #replace>>>__Q33std6locale3impFRCQ23std66money_put>> # std::locale::imp::replace>>>(const std::money_put>>&) #replace>>>__Q33std6locale3impFRCQ23std66money_get>> # std::locale::imp::replace>>>(const std::money_get>>&) #replace>__Q33std6locale3impFRCQ23std15moneypunct # std::locale::imp::replace>(const std::moneypunct&) #replace>__Q33std6locale3impFRCQ23std15moneypunct # std::locale::imp::replace>(const std::moneypunct&) #replace>__Q33std6locale3impFRCQ23std14codecvt # std::locale::imp::replace>(const std::codecvt&) #replace>__Q33std6locale3impFRCQ23std8ctype # std::locale::imp::replace>(const std::ctype&) #replace>__Q33std6locale3impFRCQ23std14codecvt # std::locale::imp::replace>(const std::codecvt&) #replace>__Q33std6locale3impFRCQ23std8ctype # std::locale::imp::replace>(const std::ctype&) #replace>__Q33std6locale3impFRCQ23std10collate # std::locale::imp::replace>(const std::collate&) #replace>__Q33std6locale3impFRCQ23std10collate # std::locale::imp::replace>(const std::collate&) #use_facet>>>__3stdFRCQ23std6locale # std::use_facet>>>(const std::locale&) #use_facet>>>__3stdFRCQ23std6locale # std::use_facet>>>(const std::locale&) #use_facet>__3stdFRCQ23std6locale # std::use_facet>(const std::locale&) #use_facet>>>__3stdFRCQ23std6locale # std::use_facet>>>(const std::locale&) #use_facet>>>__3stdFRCQ23std6locale # std::use_facet>>>(const std::locale&) #use_facet>__3stdFRCQ23std6locale # std::use_facet>(const std::locale&) #use_facet>>>__3stdFRCQ23std6locale # std::use_facet>>>(const std::locale&) #use_facet>>>__3stdFRCQ23std6locale # std::use_facet>>>(const std::locale&) #use_facet>__3stdFRCQ23std6locale # std::use_facet>(const std::locale&) #use_facet>>>__3stdFRCQ23std6locale # std::use_facet>>>(const std::locale&) #use_facet>>>__3stdFRCQ23std6locale # std::use_facet>>>(const std::locale&) #use_facet>__3stdFRCQ23std6locale # std::use_facet>(const std::locale&) #use_facet>>>__3stdFRCQ23std6locale # std::use_facet>>>(const std::locale&) #use_facet>>>__3stdFRCQ23std6locale # std::use_facet>>>(const std::locale&) #use_facet>__3stdFRCQ23std6locale # std::use_facet>(const std::locale&) #use_facet>__3stdFRCQ23std6locale # std::use_facet>(const std::locale&) #use_facet>>>__3stdFRCQ23std6locale # std::use_facet>>>(const std::locale&) #use_facet>>>__3stdFRCQ23std6locale # std::use_facet>>>(const std::locale&) #use_facet>__3stdFRCQ23std6locale # std::use_facet>(const std::locale&) #use_facet>__3stdFRCQ23std6locale # std::use_facet>(const std::locale&) #use_facet>__3stdFRCQ23std6locale # std::use_facet>(const std::locale&) #use_facet>__3stdFRCQ23std6locale # std::use_facet>(const std::locale&) #use_facet>__3stdFRCQ23std6locale # std::use_facet>(const std::locale&) #use_facet>__3stdFRCQ23std6locale # std::use_facet>(const std::locale&) #__ct__Q23std32vector>FRCQ23std32vector> # std::vector>::vector(const std::vector>&) #__as__Q23std32vector>FRCQ23std32vector> # std::vector>::operator =(const std::vector>&) #init__Q23std32vector>FUlRCPv # std::vector>::init(unsigned long,void*const&) #__ne,Q23std12allocator>__3stdFRCQ23std59basic_string,Q23std12allocator>PCc # std::operator !=, std::allocator>(const std::basic_string, std::allocator>&,const char*) #__pl,Q23std12allocator>__3stdFRCQ23std59basic_string,Q23std12allocator>RCQ23std59basic_string,Q23std12allocator> # std::operator +, std::allocator>(const std::basic_string, std::allocator>&,const std::basic_string, std::allocator>&) #__ct__Q33std59basic_string,Q23std12allocator>9CharArrayFRCQ23std12allocatorUl # std::basic_string, std::allocator>::CharArray::CharArray(const std::allocator&,unsigned long) #__dt__Q23std40_EmptyMemberOpt,Ul>Fv # std::_EmptyMemberOpt, unsigned long>::~_EmptyMemberOpt() #__ct__Q33std59basic_string,Q23std12allocator>9CharArrayFRCQ33std59basic_string,Q23std12allocator>9CharArray # std::basic_string, std::allocator>::CharArray::CharArray(const std::basic_string, std::allocator>::CharArray&) #get_allocator__Q23std59basic_string,Q23std12allocator>CFv # std::basic_string, std::allocator>::get_allocator() const #__ct__Q23std59basic_string,Q23std12allocator>FRCQ23std59basic_string,Q23std12allocator>UlUl # std::basic_string, std::allocator>::basic_string(const std::basic_string, std::allocator>&,unsigned long,unsigned long) #__ct__Q23std59basic_string,Q23std12allocator>FPCwRCQ23std12allocator # std::basic_string, std::allocator>::basic_string(const wchar_t*,const std::allocator&) #init__Q23std59basic_string,Q23std12allocator>FUlwRCQ23std12allocator # std::basic_string, std::allocator>::init(unsigned long,wchar_t,const std::allocator&) #change_size__Q23std59basic_string,Q23std12allocator>FUlb # std::basic_string, std::allocator>::change_size(unsigned long,bool) #__ct__Q33std59basic_string,Q23std12allocator>9CharArrayFRCQ23std12allocatorUl # std::basic_string, std::allocator>::CharArray::CharArray(const std::allocator&,unsigned long) #get_allocator__Q23std59basic_string,Q23std12allocator>CFv # std::basic_string, std::allocator>::get_allocator() const #__ct__Q23std59basic_string,Q23std12allocator>FRCQ23std59basic_string,Q23std12allocator>UlUl # std::basic_string, std::allocator>::basic_string(const std::basic_string, std::allocator>&,unsigned long,unsigned long) #__ct__Q23std59basic_string,Q23std12allocator>FPCcRCQ23std12allocator # std::basic_string, std::allocator>::basic_string(const char*,const std::allocator&) #__dt__Q23std40_EmptyMemberOpt,Ul>Fv # std::_EmptyMemberOpt, unsigned long>::~_EmptyMemberOpt() #__ct__Q33std59basic_string,Q23std12allocator>9CharArrayFRCQ33std59basic_string,Q23std12allocator>9CharArray # std::basic_string, std::allocator>::CharArray::CharArray(const std::basic_string, std::allocator>::CharArray&) #assign__Q23std59basic_string,Q23std12allocator>FRCQ23std59basic_string,Q23std12allocator>UlUl # std::basic_string, std::allocator>::assign(const std::basic_string, std::allocator>&,unsigned long,unsigned long) #replace__Q23std59basic_string,Q23std12allocator>FUlUlUlc # std::basic_string, std::allocator>::replace(unsigned long,unsigned long,unsigned long,char) #__dt__Q23std12out_of_rangeFv # std::out_of_range::~out_of_range() #init__Q23std59basic_string,Q23std12allocator>FUlcRCQ23std12allocator # std::basic_string, std::allocator>::init(unsigned long,char,const std::allocator&) #__dt__Q23std11logic_errorFv # std::logic_error::~logic_error() #change_size__Q23std59basic_string,Q23std12allocator>FUlb # std::basic_string, std::allocator>::change_size(unsigned long,bool) #__dt__Q23std12length_errorFv # std::length_error::~length_error() #__ct__62_RefCountedPtr>FPQ33std6locale3imp # _RefCountedPtr>::_RefCountedPtr(std::locale::imp*) #__as__62_RefCountedPtr>FRC62_RefCountedPtr> # _RefCountedPtr>::operator =(const _RefCountedPtr>&) #__dt__28_RefCountedPtr>Fv # _RefCountedPtr>::~_RefCountedPtr() #__ct__62_RefCountedPtr>FRC62_RefCountedPtr> # _RefCountedPtr>::_RefCountedPtr(const _RefCountedPtr>&) #assign__Q23std59basic_string,Q23std12allocator>FPCcUl # std::basic_string, std::allocator>::assign(const char*,unsigned long) #__vc__Q23std59basic_string,Q23std12allocator>FUl # std::basic_string, std::allocator>::operator [](unsigned long) #resize__Q23std59basic_string,Q23std12allocator>FUlc # std::basic_string, std::allocator>::resize(unsigned long,char) #end__Q23std59basic_string,Q23std12allocator>Fv # std::basic_string, std::allocator>::end() #begin__Q23std59basic_string,Q23std12allocator>Fv # std::basic_string, std::allocator>::begin() #__ct__Q23std59basic_string,Q23std12allocator>FRCQ23std12allocator # std::basic_string, std::allocator>::basic_string(const std::allocator&) #__vc__Q23std59basic_string,Q23std12allocator>FUl # std::basic_string, std::allocator>::operator [](unsigned long) #resize__Q23std59basic_string,Q23std12allocator>FUlw # std::basic_string, std::allocator>::resize(unsigned long,wchar_t) #__ct__Q23std59basic_string,Q23std12allocator>FRCQ23std12allocator # std::basic_string, std::allocator>::basic_string(const std::allocator&) #__dt__Q23std9bad_allocFv # std::bad_alloc::~bad_alloc() #__dt__Q23std23_Generic_codecvtFv # std::_Generic_codecvt::~_Generic_codecvt() #__ct__Q23std23_Generic_codecvtFUl # std::_Generic_codecvt::_Generic_codecvt(unsigned long) #__dt__Q23std23_Generic_codecvtFv # std::_Generic_codecvt::~_Generic_codecvt() #__ct__Q23std23_Generic_codecvtFUl # std::_Generic_codecvt::_Generic_codecvt(unsigned long) #__ct__Q23std64num_get>>FUl # std::num_get>>::num_get(unsigned long) #__ct__Q23std64num_get>>FUl # std::num_get>>::num_get(unsigned long) #__ct__Q23std64num_put>>FUl # std::num_put>>::num_put(unsigned long) #__ct__Q23std64num_put>>FUl # std::num_put>>::num_put(unsigned long) #__dt__Q23std20_Generic_numpunctFv # std::_Generic_numpunct::~_Generic_numpunct() #__ct__Q23std20_Generic_numpunctFUl # std::_Generic_numpunct::_Generic_numpunct(unsigned long) #__dt__Q23std20_Generic_numpunctFv # std::_Generic_numpunct::~_Generic_numpunct() #__ct__Q23std20_Generic_numpunctFUl # std::_Generic_numpunct::_Generic_numpunct(unsigned long) #__ct__Q23std10collateFUl # std::collate::collate(unsigned long) #__ct__Q23std10collateFUl # std::collate::collate(unsigned long) #__dt__Q23std21_Generic_timepunctFv # std::_Generic_timepunct::~_Generic_timepunct() #__ct__Q23std21_Generic_timepunctFUl # std::_Generic_timepunct::_Generic_timepunct(unsigned long) #__dt__Q23std21_Generic_timepunctFv # std::_Generic_timepunct::~_Generic_timepunct() #__ct__Q23std21_Generic_timepunctFUl # std::_Generic_timepunct::_Generic_timepunct(unsigned long) #__ct__Q23std65time_get>>FUl # std::time_get>>::time_get(unsigned long) #__ct__Q23std65time_get>>FUl # std::time_get>>::time_get(unsigned long) #__ct__Q23std65time_put>>FUl # std::time_put>>::time_put(unsigned long) #__ct__Q23std65time_put>>FUl # std::time_put>>::time_put(unsigned long) #__ct__Q23std66money_get>>FUl # std::money_get>>::money_get(unsigned long) #__ct__Q23std66money_get>>FUl # std::money_get>>::money_get(unsigned long) #__ct__Q23std66money_put>>FUl # std::money_put>>::money_put(unsigned long) #__ct__Q23std66money_put>>FUl # std::money_put>>::money_put(unsigned long) #__dt__Q23std24_Generic_moneypunctFv # std::_Generic_moneypunct::~_Generic_moneypunct() #__ct__Q23std24_Generic_moneypunctFUl # std::_Generic_moneypunct::_Generic_moneypunct(unsigned long) #__dt__Q23std24_Generic_moneypunctFv # std::_Generic_moneypunct::~_Generic_moneypunct() #__ct__Q23std24_Generic_moneypunctFUl # std::_Generic_moneypunct::_Generic_moneypunct(unsigned long) #__dt__Q23std24_Generic_moneypunctFv # std::_Generic_moneypunct::~_Generic_moneypunct() #__ct__Q23std24_Generic_moneypunctFUl # std::_Generic_moneypunct::_Generic_moneypunct(unsigned long) #__dt__Q23std24_Generic_moneypunctFv # std::_Generic_moneypunct::~_Generic_moneypunct() #__ct__Q23std24_Generic_moneypunctFUl # std::_Generic_moneypunct::_Generic_moneypunct(unsigned long) #__ct__Q23std13allocatorFRCQ23std31allocator # std::allocator::!(const std::allocator&) #__ct__Q23std88allocator,Q23std12allocator>9CharArray>FRCQ23std12allocator # std::allocator, std::allocator>::CharArray>::!(const std::allocator&) #__ct__Q23std88allocator,Q23std12allocator>9CharArray>FRCQ23std12allocator # std::allocator, std::allocator>::CharArray>::!(const std::allocator&) #what__Q23std13runtime_errorCFv # std::runtime_error::what() const #__dt__Q23std8ctypeFv # std::ctype::~ctype() #__dt__Q23std15ctype_bynameFv # std::ctype_byname::~ctype_byname() #__dt__Q23std14codecvtFv # std::codecvt::~codecvt() #__dt__Q23std14codecvtFv # std::codecvt::~codecvt() #do_falsename__Q23std11numpunctCFv # std::numpunct::do_falsename() const #do_truename__Q23std11numpunctCFv # std::numpunct::do_truename() const #do_grouping__Q23std11numpunctCFv # std::numpunct::do_grouping() const #do_thousands_sep__Q23std11numpunctCFv # std::numpunct::do_thousands_sep() const #do_decimal_point__Q23std11numpunctCFv # std::numpunct::do_decimal_point() const #__dt__Q23std11numpunctFv # std::numpunct::~numpunct() #do_falsename__Q23std11numpunctCFv # std::numpunct::do_falsename() const #do_truename__Q23std11numpunctCFv # std::numpunct::do_truename() const #do_grouping__Q23std11numpunctCFv # std::numpunct::do_grouping() const #do_thousands_sep__Q23std11numpunctCFv # std::numpunct::do_thousands_sep() const #do_decimal_point__Q23std11numpunctCFv # std::numpunct::do_decimal_point() const #__dt__Q23std11numpunctFv # std::numpunct::~numpunct() #__dt__Q23std12timepunctFv # std::timepunct::~timepunct() #__dt__Q23std12timepunctFv # std::timepunct::~timepunct() #do_neg_format__Q23std15moneypunctCFv # std::moneypunct::do_neg_format() const #do_pos_format__Q23std15moneypunctCFv # std::moneypunct::do_pos_format() const #do_frac_digits__Q23std15moneypunctCFv # std::moneypunct::do_frac_digits() const #do_negative_sign__Q23std15moneypunctCFv # std::moneypunct::do_negative_sign() const #do_positive_sign__Q23std15moneypunctCFv # std::moneypunct::do_positive_sign() const #do_curr_symbol__Q23std15moneypunctCFv # std::moneypunct::do_curr_symbol() const #do_grouping__Q23std15moneypunctCFv # std::moneypunct::do_grouping() const #do_thousands_sep__Q23std15moneypunctCFv # std::moneypunct::do_thousands_sep() const #do_decimal_point__Q23std15moneypunctCFv # std::moneypunct::do_decimal_point() const #__dt__Q23std15moneypunctFv # std::moneypunct::~moneypunct() #do_neg_format__Q23std15moneypunctCFv # std::moneypunct::do_neg_format() const #do_pos_format__Q23std15moneypunctCFv # std::moneypunct::do_pos_format() const #do_frac_digits__Q23std15moneypunctCFv # std::moneypunct::do_frac_digits() const #do_negative_sign__Q23std15moneypunctCFv # std::moneypunct::do_negative_sign() const #do_positive_sign__Q23std15moneypunctCFv # std::moneypunct::do_positive_sign() const #do_curr_symbol__Q23std15moneypunctCFv # std::moneypunct::do_curr_symbol() const #do_grouping__Q23std15moneypunctCFv # std::moneypunct::do_grouping() const #do_thousands_sep__Q23std15moneypunctCFv # std::moneypunct::do_thousands_sep() const #do_decimal_point__Q23std15moneypunctCFv # std::moneypunct::do_decimal_point() const #__dt__Q23std15moneypunctFv # std::moneypunct::~moneypunct() #__dt__Q23std88allocator,Q23std12allocator>9CharArray>Fv # std::allocator, std::allocator>::CharArray>::~allocator() #__dt__Q23std192_EmptyMemberOpt,Q23std12allocator>9CharArray>,PQ33std59basic_string,Q23std12allocator>9CharArray>Fv # std::_EmptyMemberOpt, std::allocator>::CharArray>, std::basic_string, std::allocator>::CharArray*>::~_EmptyMemberOpt() #__ct__Q23std59basic_string,Q23std12allocator>FUlwRCQ23std12allocator # std::basic_string, std::allocator>::basic_string(unsigned long,wchar_t,const std::allocator&) #do_neg_format__Q23std15moneypunctCFv # std::moneypunct::do_neg_format() const #do_pos_format__Q23std15moneypunctCFv # std::moneypunct::do_pos_format() const #do_frac_digits__Q23std15moneypunctCFv # std::moneypunct::do_frac_digits() const #do_negative_sign__Q23std15moneypunctCFv # std::moneypunct::do_negative_sign() const #do_positive_sign__Q23std15moneypunctCFv # std::moneypunct::do_positive_sign() const #do_curr_symbol__Q23std15moneypunctCFv # std::moneypunct::do_curr_symbol() const #do_grouping__Q23std15moneypunctCFv # std::moneypunct::do_grouping() const #do_thousands_sep__Q23std15moneypunctCFv # std::moneypunct::do_thousands_sep() const #do_decimal_point__Q23std15moneypunctCFv # std::moneypunct::do_decimal_point() const #__dt__Q23std15moneypunctFv # std::moneypunct::~moneypunct() #__dt__Q23std88allocator,Q23std12allocator>9CharArray>Fv # std::allocator, std::allocator>::CharArray>::~allocator() #__dt__Q23std192_EmptyMemberOpt,Q23std12allocator>9CharArray>,PQ33std59basic_string,Q23std12allocator>9CharArray>Fv # std::_EmptyMemberOpt, std::allocator>::CharArray>, std::basic_string, std::allocator>::CharArray*>::~_EmptyMemberOpt() #__ct__Q23std59basic_string,Q23std12allocator>FUlcRCQ23std12allocator # std::basic_string, std::allocator>::basic_string(unsigned long,char,const std::allocator&) #do_neg_format__Q23std15moneypunctCFv # std::moneypunct::do_neg_format() const #do_pos_format__Q23std15moneypunctCFv # std::moneypunct::do_pos_format() const #do_frac_digits__Q23std15moneypunctCFv # std::moneypunct::do_frac_digits() const #do_negative_sign__Q23std15moneypunctCFv # std::moneypunct::do_negative_sign() const #do_positive_sign__Q23std15moneypunctCFv # std::moneypunct::do_positive_sign() const #do_curr_symbol__Q23std15moneypunctCFv # std::moneypunct::do_curr_symbol() const #do_grouping__Q23std15moneypunctCFv # std::moneypunct::do_grouping() const #do_thousands_sep__Q23std15moneypunctCFv # std::moneypunct::do_thousands_sep() const #do_decimal_point__Q23std15moneypunctCFv # std::moneypunct::do_decimal_point() const #__dt__Q23std15moneypunctFv # std::moneypunct::~moneypunct() #__two_exp__3stdFs # std::__two_exp(short) #__amu__Q23std4_BCDFQ23std4_BCD # std::_BCD::operator *=(std::_BCD) #__apl__Q23std4_BCDFQ23std4_BCD # std::_BCD::operator +=(std::_BCD) #__ct__Q23std4_BCDFPCci # std::_BCD::_BCD(const char*,int) #to_string__Q23std4_BCDCFiRi # std::_BCD::to_string(int,int&) const #__ct__Q23std4_BCDFri # std::_BCD::_BCD(long double,int) #__dt__Q23std4_BCDFv # std::_BCD::~_BCD() #__ct__Q23std15moneypunctFUl # std::moneypunct::moneypunct(unsigned long) #__ct__Q23std15moneypunctFUl # std::moneypunct::moneypunct(unsigned long) #__ct__Q23std15moneypunctFUl # std::moneypunct::moneypunct(unsigned long) #__ct__Q23std15moneypunctFUl # std::moneypunct::moneypunct(unsigned long) #do_am_pm__Q23std12timepunctCFi # std::timepunct::do_am_pm(int) const #do_month_name__Q23std12timepunctCFUl # std::timepunct::do_month_name(unsigned long) const #do_weekday_name__Q23std12timepunctCFUl # std::timepunct::do_weekday_name(unsigned long) const #__ct__Q23std12timepunctFUl # std::timepunct::timepunct(unsigned long) #do_am_pm__Q23std12timepunctCFi # std::timepunct::do_am_pm(int) const #do_month_name__Q23std12timepunctCFUl # std::timepunct::do_month_name(unsigned long) const #do_weekday_name__Q23std12timepunctCFUl # std::timepunct::do_weekday_name(unsigned long) const #__ct__Q23std12timepunctFUl # std::timepunct::timepunct(unsigned long) #__ct__Q23std11numpunctFUl # std::numpunct::numpunct(unsigned long) #__ct__Q23std11numpunctFUl # std::numpunct::numpunct(unsigned long) #do_in__Q23std14codecvtCFRiPCcPCcRPCcPwPwRPw # std::codecvt::do_in(int&,const char*,const char*,const char*&,wchar_t*,wchar_t*,wchar_t*&) const #do_out__Q23std14codecvtCFRiPCwPCwRPCwPcPcRPc # std::codecvt::do_out(int&,const wchar_t*,const wchar_t*,const wchar_t*&,char*,char*,char*&) const #__ct__Q23std14codecvtFUl # std::codecvt::codecvt(unsigned long) #do_nothing__Q23std14codecvtCFPCcPCcRPCcPcPcRPc # std::codecvt::do_nothing(const char*,const char*,const char*&,char*,char*,char*&) const #__ct__Q23std14codecvtFUl # std::codecvt::codecvt(unsigned long) #__ct__Q23std15ctype_bynameFPCcUl # std::ctype_byname::ctype_byname(const char*,unsigned long) #do_tolower__Q23std8ctypeCFPcPCc # std::ctype::do_tolower(char*,const char*) const #do_toupper__Q23std8ctypeCFPcPCc # std::ctype::do_toupper(char*,const char*) const #scan_not__Q23std8ctypeCFQ33std10ctype_base4maskPCcPCc # std::ctype::scan_not(std::ctype_base::mask,const char*,const char*) const #scan_is__Q23std8ctypeCFQ33std10ctype_base4maskPCcPCc # std::ctype::scan_is(std::ctype_base::mask,const char*,const char*) const #is__Q23std8ctypeCFPCcPCcPQ33std10ctype_base4mask # std::ctype::is(const char*,const char*,std::ctype_base::mask*) const #__dt__Q23std8ctypeFv # std::ctype::~ctype() #__ct__Q23std8ctypeFPCQ33std10ctype_base4maskbUl # std::ctype::ctype(const std::ctype_base::mask*,bool,unsigned long) #__dt__Q23std59basic_string,Q23std12allocator>Fv # std::basic_string, std::allocator>::~basic_string() #__dt__Q23std12allocatorFv # std::allocator::~allocator() #widen__Q23std8ctypeCFRCQ23std59basic_string,Q23std12allocator> # std::ctype::widen(const std::basic_string, std::allocator>&) const #classify__Q23std8ctypeCFw # std::ctype::classify(wchar_t) const #do_narrow__Q23std8ctypeCFPCwPCwcPc # std::ctype::do_narrow(const wchar_t*,const wchar_t*,char,char*) const #do_widen__Q23std8ctypeCFPCcPCcPw # std::ctype::do_widen(const char*,const char*,wchar_t*) const #do_tolower__Q23std8ctypeCFPwPCw # std::ctype::do_tolower(wchar_t*,const wchar_t*) const #do_toupper__Q23std8ctypeCFPwPCw # std::ctype::do_toupper(wchar_t*,const wchar_t*) const #do_scan_not__Q23std8ctypeCFQ33std10ctype_base4maskPCwPCw # std::ctype::do_scan_not(std::ctype_base::mask,const wchar_t*,const wchar_t*) const #do_scan_is__Q23std8ctypeCFQ33std10ctype_base4maskPCwPCw # std::ctype::do_scan_is(std::ctype_base::mask,const wchar_t*,const wchar_t*) const #do_is__Q23std8ctypeCFPCwPCwPQ33std10ctype_base4mask # std::ctype::do_is(const wchar_t*,const wchar_t*,std::ctype_base::mask*) const #__as__Q33std6locale3impFRCQ33std6locale3imp # std::locale::imp::operator =(const std::locale::imp&) #__dt__Q33std6locale3impFv # std::locale::imp::~imp() #__ct__Q33std6locale3impFRCQ33std6locale3imp # std::locale::imp::imp(const std::locale::imp&) #__dt__Q23std32vector>Fv # std::vector>::~vector() #__dt__Q23std68vector>Fv # std::vector>::~vector() #__dt__Q23std31allocatorFv # std::allocator::~allocator() #__dt__Q23std13allocatorFv # std::allocator::~allocator() #__dt__Q23std41_EmptyMemberOpt,Ul>Fv # std::_EmptyMemberOpt, unsigned long>::~_EmptyMemberOpt() #__ct__Q33std6locale3impFUl # std::locale::imp::imp(unsigned long) #__dt__Q33std6locale5facetFv # std::locale::facet::~facet() #make_classic__Q23std6localeFv # std::locale::make_classic() #__ct__Q23std6localeFRC62_RefCountedPtr> # std::locale::locale(const _RefCountedPtr>&) #classic__Q23std6localeFv # std::locale::classic() #global__Q23std6localeFRCQ23std6locale # std::locale::global(const std::locale&) #name__Q23std6localeCFv # std::locale::name() const #__as__Q23std6localeFRCQ23std6locale # std::locale::operator =(const std::locale&) #__ct__Q23std6localeFRCQ23std6localeRCQ23std6localei # std::locale::locale(const std::locale&,const std::locale&,int) #__dt__Q23std6localeFv # std::locale::~locale() #__ct__Q23std6localeFRCQ23std6localePCci # std::locale::locale(const std::locale&,const char*,int) #__dt__Q23std10_MSLstringFv # std::_MSLstring::~_MSLstring() #__dt__Q23std12allocatorFv # std::allocator::~allocator() #__dt__Q23std59basic_string,Q23std12allocator>Fv # std::basic_string, std::allocator>::~basic_string() #__ct__Q23std6localeFPCc # std::locale::locale(const char*) #__dt__Q23std13runtime_errorFv # std::runtime_error::~runtime_error() #__ct__Q23std6localeFRCQ23std6locale # std::locale::locale(const std::locale&) #__dt__62_RefCountedPtr>Fv # _RefCountedPtr>::~_RefCountedPtr() #__ct__Q23std6localeFv # std::locale::locale() #__ct__28_RefCountedPtr>FPc # _RefCountedPtr>::_RefCountedPtr(char*) #__as__28_RefCountedPtr>FRC28_RefCountedPtr> # _RefCountedPtr>::operator =(const _RefCountedPtr>&) #__ct__Q23std10_MSLstringFRCQ23std59basic_string,Q23std12allocator> # std::_MSLstring::_MSLstring(const std::basic_string, std::allocator>&) #__vt__Q33std8ios_base7failure # std::ios_base::failure::__vt #__vt__Q23std8ios_base # std::ios_base::__vt #what__Q33std8ios_base7failureCFv # std::ios_base::failure::what() const #throwfailure__Q23std8ios_baseFv # std::ios_base::throwfailure() #__dt__Q33std8ios_base7failureFv # std::ios_base::failure::~failure() #__dt__Q23std8ios_baseFv # std::ios_base::~ios_base() #__ct__Q23std8ios_baseFv # std::ios_base::ios_base() #register_callback__Q23std8ios_baseFPFQ33std8ios_base5eventRQ23std8ios_basei_vi # std::ios_base::register_callback(void (*)(std::ios_base::event, std::ios_base&, int),int) #__ct__Q23std50pairFv # std::pair::pair() #pword__Q23std8ios_baseFi # std::ios_base::pword(int) #iword__Q23std8ios_baseFi # std::ios_base::iword(int) #getloc__Q23std8ios_baseCFv # std::ios_base::getloc() const #imbue__Q23std8ios_baseFRCQ23std6locale # std::ios_base::imbue(const std::locale&) #__vt__Q23std12strstreambuf # std::strstreambuf::__vt #init__Q23std12strstreambufFPciPc # std::strstreambuf::init(char*,int,char*) #setbuf__Q23std12strstreambufFPci # std::strstreambuf::setbuf(char*,int) #seekpos__Q23std12strstreambufFQ23std7fposs # std::strstreambuf::seekpos(std::fpos,short) #seekoff__Q23std12strstreambufFlQ33std8ios_base7seekdirs # std::strstreambuf::seekoff(long,std::ios_base::seekdir,short) #underflow__Q23std12strstreambufFv # std::strstreambuf::underflow() #pbackfail__Q23std12strstreambufFi # std::strstreambuf::pbackfail(int) #overflow__Q23std12strstreambufFi # std::strstreambuf::overflow(int) #freeze__Q23std12strstreambufFb # std::strstreambuf::freeze(bool) #__dt__Q23std12strstreambufFv # std::strstreambuf::~strstreambuf() #__console_exit #__stdio_exit #__aborting #__exit #exit #__atexit #atexit #abort #__malloc_pool #free #realloc #calloc #malloc #__files #__num_to_file #__file_to_num #__flush_line_buffered_output_files #__flush_all #__close_all #__init_file #__find_unopened_file #__llmod #__lmod #__mod #__lldiv #__ldiv #__div #__llmul #__lmul #__mul #__lladd #__ladd #__add #lldiv #ldiv #div #llabs #labs #abs #__assertion_failed #bsearch #setbuf #setvbuf #__flush_buffer #__load_buffer #__prep_buffer #__convert_to_newlines #__convert_from_newlines #puts #fputs #putchar #putc #fputc #__put_char #__ungotten #ungetc #gets #fgets #getchar #getc #fgetc #__get_char #__ctype_map #__lower_map #__upper_map #toupper #tolower #isxdigit #isupper #isspace #ispunct #isprint #islower #isgraph #isdigit #iscntrl #isalpha #isalnum #fwrite #fread #errno #__temp_file_mode #__set_idle_proc #__get_file_modes #__handle_reopen #__handle_open #freopen #fopen #fflush #fclose #tmpfile #tmpnam #rename #remove #rewind #fsetpos #fseek #_fseek #fgetpos #ftell #_ftell #__float_nan #__float_huge #__double_min #__double_max #__double_epsilon #__double_tiny #__double_huge #__double_nan #__extended_min #__extended_max #__extended_epsilon #__extended_tiny #__extended_huge #__extended_nan #__lconv #localeconv #setlocale #wcstombs #mbstowcs #wctomb #mbtowc #mblen #memcmp #__memrchr #memchr #memset #memmove #memcpy #__fill_mem #__copy_longs_rev_unaligned #__copy_longs_unaligned #__copy_longs_rev_aligned #__copy_longs_aligned #__move_mem #__copy_mem #__stdio_atexit #perror #ferror #feof #clearerr #__pool_free_all #__pool_free #__pool_realloc #__pool_alloc_clear #__pool_alloc #__pool_preassign #__pool_preallocate #__init_pool_obj #sprintf #snprintf #vsprintf #vsnprintf #printf #vprintf #fprintf #vfprintf #qsort #srand #rand #sscanf #__vsscanf #scanf #fscanf #__vfscanf #raise #signal #__strerror #strerror #strstr #strtok #strcspn #strspn #strpbrk #strrchr #strxfrm #strcoll #strchr #strncmp #strcmp #strncat #strcat #strncpy #strcpy #strlen #__close_string #__write_string #__read_string #__open_string_file #atof #strtod #__strtold #strtoumax #strtoimax #atol #atoi #strtoll #strtol #strtoull #strtoul #__strtoull #__strtoul #system #getenv #__month_to_days #strftime #localtime #gmtime #ctime #asctime #time #mktime #difftime #clock #__leap_year #ccommand #clrscr #__close_console #__write_console #__read_console #__end_critical_region #__begin_critical_region #__kill_critical_regions #__init_critical_regions #fcntl #creat #open #__rename_file #__delete_file #__temp_file_name #__close_file #__position_file #__write_file #__read_file #__open_temp_file #__open_file #__path2fss #__sys_free #__sys_alloc #mkdir #fstat #stat #__to_gm_time #__get_time #__get_clock #write #unlink #ttyname #sleep #rmdir #read #lseek #isatty #getlogin #getcwd #exec #cuserid #close #chdir #_ftype #_fcreator #tell #fdopen #fileno #__gettype #__getcreator #__ctopstring #__system7present #__myraise #utimes #utime #uname #fwide #fgetws #fputws #ungetwc #fgetwc #getwchar #getwc #fputwc #putwchar #putwc #watof #wcstod #__wcstold #wcstoumax #wcstoimax #watol #watoi #wcstoll #wcstol #wcstoull #wcstoul #__wcstoull #__wcstoul #wctrans #towctrans #__wctype_map #__wlower_map #__wupper_map #iswctype #wctype #wctob #towupper #towlower #iswxdigit #iswupper #iswspace #iswpunct #iswprint #iswlower #iswgraph #iswdigit #iswcntrl #iswalpha #iswalnum #wmemcmp #wmemchr #wmemset #wmemmove #wmemcpy #swprintf #vwprintf #vswprintf #wprintf #fwprintf #vfwprintf #swscanf #__vswscanf #vwscanf #wscanf #fwscanf #__vfwscanf #wcsstr #wcstok #wcscspn #wcsspn #wcspbrk #wcsrchr #wcsxfrm #wcscoll #wcschr #wcsncmp #wcscmp #wcsncat #wcscat #wcsncpy #wcscpy #wcslen #wcsftime #wctime #wasctime #ValidateMallocHeap #GetNextMallocHeapRegistration #GetFirstMallocHeapRegistration #UnregisterMallocHeap #RegisterMallocHeap #__fminl #__fmaxl #__fdiml #__nextafterl #__remquol #__copysignl #__remainderl #__fmodl #__modfl #__truncl #llroundl #lroundl #__roundl #llrintl #lrintl #__rintl #__nearbyintl #__floorl #__ceill #__lgammal #__gammal #__erfcl #__erfl #__hypotl #__sqrtl #__powl #__fabsl #scalblnl #scalbnl #__logbl #__log2l #__log1pl #__expm1l #__exp2l #__log10l #__logl #__ldexpl #__frexpl #__expl #__atanhl #__asinhl #__acoshl #__tanhl #__sinhl #__coshl #__tanl #__sinl #__cosl #__atan2l #__atanl #__asinl #__acosl #fminf #fmaxf #fdimf #remquof #copysignf #remainderf #fmodf #truncf #llroundf #lroundf #roundf #llrintf #lrintf #rintf #nearbyintf #floorf #ceilf #lgammaf #gammaf #erfcf #erff #hypotf #sqrtf #powf #fabsf #scalblnf #scalbnf #logbf #log2f #log1pf #expm1f #exp2f #log10f #logf #ldexpf #frexpf #expf #atanhf #asinhf #acoshf #tanhf #sinhf #coshf #tanf #sinf #cosf #atan2f #atanf #asinf #acosf #nextafter #llround #lround #llrint #lrint #scalbln #scalbn #__dc_arr #__del_arr #__new_arr #__init_arr #__copy #__som_check_ev #__som_check_new #__vt__Q23std13bad_exception # std::bad_exception::__vt #what__Q23std13bad_exceptionCFv # std::bad_exception::what() const #__end__catch #__throw #__ct__Q23std9exceptionFv # std::exception::exception() #__unexpected #__dt__Q23std13bad_exceptionFv # std::bad_exception::~bad_exception() #__unregister_fragment #__register_fragment #__global_destructor_chain #__destroy_global_chain #__register_global_object #__destroy_new_array2 #__destroy_new_array #__destroy_arr #__construct_array #__dt__26__partial_array_destructorFv # __partial_array_destructor::~__partial_array_destructor() #__construct_new_array #__throw_catch_compare #unexpected__3stdFv # std::unexpected() #set_unexpected__3stdFPFv_v # std::set_unexpected(void (*)(void)) #terminate__3stdFv # std::terminate() #set_terminate__3stdFPFv_v # std::set_terminate(void (*)(void)) #__vt__Q23std10bad_typeid # std::bad_typeid::__vt #what__Q23std10bad_typeidCFv # std::bad_typeid::what() const #__dynamic_cast #__get_typeid #__dt__Q23std10bad_typeidFv # std::bad_typeid::~bad_typeid() #nothrow__3std # std::nothrow #__dla__FPv # operator delete[](void*) #__nwa__FUlRCQ23std9nothrow_t # operator new[](unsigned long,const std::nothrow_t&) #__nwa__FUl # operator new[](unsigned long) #__dl__FPv # operator delete(void*) #__nw__FUlRCQ23std9nothrow_t # operator new(unsigned long,const std::nothrow_t&) #__nw__FUl # operator new(unsigned long) #_prealloc_newpool__3stdFUl # std::_prealloc_newpool(unsigned long) #_set_newnonptrmax__3stdFUl # std::_set_newnonptrmax(unsigned long) #_set_newpoolsize__3stdFUl # std::_set_newpoolsize(unsigned long) #__throws_bad_alloc__3std # std::__throws_bad_alloc #__new_handler__3std # std::__new_handler #__del_hdl #__new_hdl #set_new_handler__3stdFPFv_v # std::set_new_handler(void (*)(void)) #__throw_bad_alloc__3stdFv # std::__throw_bad_alloc() #qd #__terminate #__initialize #__start #__ptmf_null \ No newline at end of file diff --git a/libical/MacOS/libical_prefix.h b/libical/MacOS/libical_prefix.h deleted file mode 100644 index 0810563119..0000000000 --- a/libical/MacOS/libical_prefix.h +++ /dev/null @@ -1,5 +0,0 @@ -/* libical_prefix.h */ - -#include -#define _TIME_T -#include "errno.h" \ No newline at end of file diff --git a/libical/MacOS/restrictions.make b/libical/MacOS/restrictions.make deleted file mode 100644 index dd146f5ed3..0000000000 --- a/libical/MacOS/restrictions.make +++ /dev/null @@ -1 +0,0 @@ -#pseudo target all Ä {libical_c_src}parameterrestrictions.inc {libical_c_src}restrictionrecords.inc # Generate source file {libical_c_src}parameterrestrictions.inc Ä ¶ {libical_scripts}mkparameterrestrictions.pl ¶ {libical_data}params-in-prop.txt ¶ {libical_project}restrictions.make perl {libical_scripts}mkparameterrestrictions.pl {libical_data}params-in-prop.txt ¶ > {libical_c_src}parameterrestrictions.inc # Set file creator to CodeWarrior setfile {libical_c_src}parameterrestrictions.inc -c CWIE # Generate source file {libical_c_src}restrictionrecords.inc Ä ¶ {libical_scripts}mkrestrictionrecords.pl ¶ {libical_data}restrictions.csv ¶ {libical_project}restrictions.make perl {libical_scripts}mkrestrictionrecords.pl {libical_data}restrictions.csv ¶ > {libical_c_src}restrictionrecords.inc # Set file creator to CodeWarrior setfile {libical_c_src}restrictionrecords.inc -c CWIE \ No newline at end of file diff --git a/libical/MacOS/restrictions.script b/libical/MacOS/restrictions.script deleted file mode 100644 index ab719b87d5..0000000000 --- a/libical/MacOS/restrictions.script +++ /dev/null @@ -1 +0,0 @@ -directory {libical_project} # Generate source files make all -f restrictions.make > make.out make.out \ No newline at end of file diff --git a/libical/MacOS/strdup.c b/libical/MacOS/strdup.c deleted file mode 100644 index ae60fee3df..0000000000 --- a/libical/MacOS/strdup.c +++ /dev/null @@ -1,17 +0,0 @@ - -#include "strdup.h" -#include -#include - - -char *strdup(const char *s ) -{ - char *p; - - if ( (p = (char *) malloc( strlen( s ) + 1 )) == NULL ) - return( NULL ); - - strcpy( p, s ); - - return( p ); -} diff --git a/libical/MacOS/strdup.h b/libical/MacOS/strdup.h deleted file mode 100644 index 1bb73aa535..0000000000 --- a/libical/MacOS/strdup.h +++ /dev/null @@ -1,3 +0,0 @@ -/* strdup.h */ - -char * strdup(const char *str); diff --git a/libical/Makefile.am b/libical/Makefile.am deleted file mode 100644 index 66b37da052..0000000000 --- a/libical/Makefile.am +++ /dev/null @@ -1,11 +0,0 @@ - - -EXTRA_DIST = \ - ChangeLog \ - README \ - TEST \ - TODO - -SUBDIRS = design-data doc scripts test-data src - - diff --git a/libical/NEWS b/libical/NEWS deleted file mode 100644 index d5fd9cb9cf..0000000000 --- a/libical/NEWS +++ /dev/null @@ -1,250 +0,0 @@ -Version 0.16 5 April 00 ( cvs tag libical-0-16) ----------------------------------------------- - -Now using automake. - -Substantial changes to the parser. New interfaces let you parser -multiple components from a single stream by feading the parser object -one line at a time. - -Added a STRING value type. this type is like TEXT, but does not -backslash magic characters. It is used in PRODID and REQUEST-STATUS, -where the '/' and ';' are literal. - -Added several convience functions for REQUEST-STATUS to icalenums.c - -Addedd a routine to icalcomponent to convert X-LIC errors to -REQUEST-STATUS return values. - -Version 0.15a 5 Mar 00 (cvs tag libical-0-15a) ---------------------- - -Experimented with CVS - -Fixed icalvalue_set_text to convert escaped characters into the proper -values. - -Other minor code tweaks. - - -Version 0.15 7 Feb 00 ---------------------- - -Split the storage classess ( icalstore, icalcluster, icalcalendar ) -into a seperate library, libicalss - -Implemented restriction checking in file icalrestrictions.c. The -checking is not complete, but can handle the bulk of the restrictions -described in RFC 2446. - -Created a new value type, METHOD. Changed METHOD property to use the -new value. The METHOD value uses an enumeration. - - -Version 0.14b -------------- - -Implemented parsing of RECUR values, although it does not handle BYDAY -specs with numbers. - -Fixed error in icalparser_next_line that mangled lines longer than the -temp buffer (1024 chars.) The temp buffer is now 80 chars, and it can -handle (apparently) arbitrary length lines - -Fixed severe brokenness in a value, but I forgot which one. - -Cleaned cruft out of the distribution, so the tarfile is smaller. - - -Version 0.14a 14 Jan 00 ------------------------ - -Fixed bug in ROLE parameter -- missing '-' in the text of allowed values - -Fixed bug in X-parameters - -Version 0.14 11 Jan 00 ----------------------- - -Fixed wrong value type for TRIGGER property - -Added Calendar object. Calendar is an aggregate of two stores and two -clusters, and can store all of the inforamation associated with a -calendar. - -icalcomponent_add_property and icalcomponent_add_component will -complain if you try to add a component or property that is already -part of an other component. The *_free routines wil complain if you try -to free a linked component or property. - -More improvements to error handling. - -Parser is much more robust. - -Minor memory enhancements. - -Regression test runs without memory leaks. - -Version 0.13d 21Dec99 ---------------------- - -Seperated perl interface and library - -Added autoconf support - -Scripts that generate derived properties, values and parameters now -change source and header files inline. - -Changed icalstore to cluster all components with DTSTART in a month -into a single file. This should reduce number of file accesses by a -factor of 60. - -Ran code through Purify and fixed memory leaks. - - -Version 0.13 16Nov99 ---------------------- - -Yet more bug fixes! Yeah! - -Added better error handling. The Parser inserts X-LIC-*ERROR -properties to warn of parsing errors. - -The imip source/sink programs in /src/imip is demonstrably functional. - -Version 0.12b 17Oct99 ---------------------- - -More bug fixes, particularily in parse from string routines - -ICal::Store is mostly functional - -This is version is a checkpoint, not a release. - -Version 0.12a 10Oct99 ---------------------- - -Expanded perl interface: - Added 1/2 of Store module - Fixed bugs - Implemeted get_{first,next}_property - -Extended C interface - Made get_{first,next}_property work properly - Fixed bugs - - -This is version is a checkpoint, not a release. - -Version 0.12 27Aug99 --------------------- - -Added a rudimentatry perl interface - -This is version is a checkpoint, not a release. - - -Version 0.11 11Aug99 --------------------- - -Eliminated most use of flex/bison -- all parsing, except for the -values, is done in C. - -Cleaned up memory leaks. Purify claims that I got them all. - -Moved all derived component/prop/param/value code ( in .inc / .h -files) into main files ( icalcomponent.{c,h}, icalproperty.{c,h}, etc/ -) - -Implemented *_clone routines. - -Fixed a lot of bugs. - -Implemented more value types. Still unimplemeneted are BINARY and RECUR - -Included MacOS/Code Warior files from Graham Davison - - -Version 0.10 8Jul99 -------------------- - -Eliminated shift/reduce and reduce/reduce conflicts in the parser. -This version is almost feature complete -- it has the basic structure -for all of the library's functionality, and it will only require -implementing procedure shells and fixing bugs. I think that all of the -hard work is done... - -Version 0.09a,b 3,7 Jul99 -------------------------- - -Various improvements to the parser, added some functionality. The parser code -is mostly complete, and should be fully functional, except for a horde of -bugs. Also added support for X-Properties. - -Version 0.09 25Jun99 --------------------- - -Added a parser in files src/comp/icalitip.{y,l} The lexer is mostly -functional, but the parser is not. - - -Version 0.08 2Jun99 --------------------- - -All files now have MPL licensing - -Implement enough of the code to perform some rudimentary testing - - -Version 0.07 14May99 --------------------- - -Remove all interfaces that construct object from a string - -Moved most code back into comp directory - -Implemented C files for most headers -- usecases.c now links. - -Many improvements to generation scripts. - - - -Version 0.06 25Apr99 --------------------- - -Expanded distribution to include: - Directory structure that can accomodate future expansion - Several levels of Makefiles - This CHANGES file - -Added headers for irip and parse modules - -Added several files with design information - -Added scripts that I had used to generate much of the ical header code. - -Split C headers from CC headers - -Added data for iTIP and iCAL component restrictions in restrictions.csv - -Version 0.05 11Apr99 ----------------------- - -Changes to ical headers - - Added derived Property classes. - - Improved the interface to the derived property and parameter classes - - Added derived component classes. - - Created usecases.c and ccusecases.cc to demonstrate use - - C++ interface compile - - -Version 0.04 5Apr99 -------------------- - -Version 0.02 30Mar99 --------------------- diff --git a/libical/README b/libical/README deleted file mode 100644 index e0f7641e1e..0000000000 --- a/libical/README +++ /dev/null @@ -1,96 +0,0 @@ - -LIBICAL -- An implementation of basic iCAL protocols - -The code and datafiles in this distribution are licensed under the -Mozilla Public License. See http://www.mozilla.org/NPL/MPL-1.0.html -for a copy of the license. Alternately, you may use libical under the -terms of the GNU Library General Public License. See -http://www.fsf.org/copyleft/lesser.html for a copy of the LGPL. - -This dual license ensures that the library can be incorporated into -both proprietary code and GPL'd programs, and will benefit from -improvements made by programmers in both realms. I will only accept -changes into my version of the library if they are similarly -dual-licensed. - -The code in this distribution implements the iCal protocols as -described in RFC2445 and RFC2446. The code is in very early stages of -development. - -This code is under active development. If you would like to contribute -to the project, you can contact me, Eric Busboom, at -eric@softwarestudio.org. The project has a webpage at - - http://softwarestudio.org/libical/index.html - -and a mailing list that you can join by sending the following mail: - - ------------ - To: minimalist@softwarestudio.org - Subject: subscribe libical - ------------ - - -Building the library --------------------- - -This distribution is developed on Red Hat Linux 6.0 and usually -compiles on SunOS 5.6 and FreeBSD 2.27. I have reports of success of -previous version on MacOS ( with CodeWarrior ) but I don't know about -any other systems. - -The library is configured with automake. From the root directory, run - - ./configure - -To build all of the Makefiles for your system. If you will be installing the library, you may want to use the --prefix flag to set the directory where the library and header files will be installed. - - ./configure --prefix=/proj/local/ - -If configure runs fine, run "make" to build the library and -"make install" to install it. - -The current version of libical focuses on creating and -manipulating iCal objects. With it, you can parse text representations -of iCal components, add and remove sub-components, properties, -parameters and values, and print the components back out as strings. - - -Notes for Libical Developers -------------------- - -If you don't want to use gcc as the compiler, and you got the sources -from CVS, you should set the CC variable to the path to the compiler -and run "automake --include-deps" to keep automake from using -gcc-specific automatic dependancy tracking. - - > CC=/pkg/SUNWspro/bin/cc; export CC - > automake --include-deps - > ./configure --prefix=/proj/local/ - > make - -You will not need to re-run automake unless you got the sources from CVS. - - -Perl Library ------------- - -There is a perl language binding of this library, LIBICAL. -It is available from http://www.softwarestudio.org/libical - -Parser ------- - -The parser is a test program that will convert a text representation -of an iCal object to the internal representation and print it back out -as text. It is primarily a test tool, but it is also a good -demonstration of how the library works. - -To use it, cat one of the test components into the parser -executable. For example, from the root of the distribution: - - src/test/icalparser < test-data/1.1 - - -Eric Busboom -eric@softwarestudio.org diff --git a/libical/TEST b/libical/TEST deleted file mode 100644 index 90c3473b31..0000000000 --- a/libical/TEST +++ /dev/null @@ -1,4 +0,0 @@ - -Parser Tests ------------- -Use iCAL keywords as first words of unquoted strings \ No newline at end of file diff --git a/libical/THANKS b/libical/THANKS deleted file mode 100644 index 4130c35e23..0000000000 --- a/libical/THANKS +++ /dev/null @@ -1,6 +0,0 @@ -Thanks to: - - -Graham Davison for MacOS support and miscelaneous code bits - -Seth Alves for the first cut at the Makefile.am files \ No newline at end of file diff --git a/libical/TODO b/libical/TODO deleted file mode 100644 index c5c85f6753..0000000000 --- a/libical/TODO +++ /dev/null @@ -1,28 +0,0 @@ - -TODOs for libical-0.16 ---------------------- - -libical treats properties with multiple values incorrecty -- it always -seperates multiple values into multiple properties. This is not -acceptable for CATEGORIES and RESOURCES. - -Some TEXT valued properties, like METHOD, have a limited set of valid -values. The code should check that the values of these properites are -valid. ( Although METHOD now uses enums, and is not really TEXT valued ) - -Finish implementing values - ATTACH/BINARY - content_type - language - -Check for buffer overflow on external input. - -Error Handling - - Dates and times: the parser will accept many illegal date time - values - -RECUR values ignore integers in BYDAY clauses, ie 'FREQ=MONTHLY;BYDAY=-1SU' - -Restrictions code does not catch lack of DTEND or DURATION - diff --git a/libical/acconfig.h b/libical/acconfig.h deleted file mode 100644 index e9383f73a4..0000000000 --- a/libical/acconfig.h +++ /dev/null @@ -1,7 +0,0 @@ -/* Define to make icalerror_* calls abort instead of internally - signalling an error */ -#undef ICAL_ERRORS_ARE_FATAL - -/* Define to make icalcluster_commit() save to a temp file and mv to - the original file instead of writing to the orig file directly */ -#undef ICAL_SAFESAVES diff --git a/libical/autogen.sh b/libical/autogen.sh deleted file mode 100755 index e15e4e33a8..0000000000 --- a/libical/autogen.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/sh -# Run this to generate all the initial makefiles, etc. - -srcdir=`dirname $0` -test -z "$srcdir" && srcdir=. - -ORIGDIR=`pwd` -cd $srcdir -PROJECT=libical -TEST_TYPE=-d -FILE=src - -DIE=0 - -(autoconf --version) < /dev/null > /dev/null 2>&1 || { - echo - echo "You must have autoconf installed to compile $PROJECT." - echo "Download the appropriate package for your distribution," - echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" - DIE=1 -} - -(automake --version) < /dev/null > /dev/null 2>&1 || { - echo - echo "You must have automake installed to compile $PROJECT." - echo "Get ftp://ftp.cygnus.com/pub/home/tromey/automake-1.2d.tar.gz" - echo "(or a newer version if it is available)" - DIE=1 -} - -if test "$DIE" -eq 1; then - exit 1 -fi - -test $TEST_TYPE $FILE || { - echo "You must run this script in the top-level $PROJECT directory" - exit 1 -} - -if test -z "$*"; then - echo "I am going to run ./configure with no arguments - if you wish " - echo "to pass any to it, please specify them on the $0 command line." -fi - -case $CC in -*xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;; -esac - -if test -z "$ACLOCAL_FLAGS"; then - - acdir=`aclocal --print-ac-dir` - m4list="glib.m4" - - for file in $m4list - do - if [ ! -f "$acdir/$file" ]; then - echo "WARNING: aclocal's directory is $acdir, but..." - echo " no file $acdir/$file" - echo " You may see fatal macro warnings below." - echo " If these files are installed in /some/dir, set the ACLOCAL_FLAGS " - echo " environment variable to \"-I /some/dir\", or install" - echo " $acdir/$file." - echo "" - fi - done -fi - -aclocal $ACLOCAL_FLAGS - -# optionally feature autoheader -(autoheader --version) < /dev/null > /dev/null 2>&1 && autoheader - -automake -a $am_opt -autoconf -cd $ORIGDIR - -$srcdir/configure "$@" - -echo -echo "Now type 'make' to compile $PROJECT." diff --git a/libical/configure.in b/libical/configure.in deleted file mode 100644 index db9177b3b3..0000000000 --- a/libical/configure.in +++ /dev/null @@ -1,51 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. -AC_INIT(src/libical/ical.h) -AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(libical,0.16) - -dnl Checks for programs. -AC_PROG_YACC -AC_PROG_CC -AM_PROG_LEX -AC_PROG_LN_S -AC_PROG_RANLIB -AC_PROG_INSTALL - -AM_PROG_LIBTOOL - -AC_SUBST(AR) -AC_CHECK_PROGS(AR, ar aal, ar) - -AC_DEFINE(ICAL_ERRORS_ARE_FATAL,1) -AC_DEFINE(ICAL_SAFESAVES,1) - -dnl Checks for libraries. -dnl Replace `main' with a function in -lical: -dnl AC_CHECK_LIB(ical, main) - -dnl Checks for header files. -AC_HEADER_STDC -AC_CHECK_HEADERS(time.h sys/types.h assert.h) - -dnl Checks for typedefs, structures, and compiler characteristics. -AC_C_CONST -AC_TYPE_SIZE_T -AC_STRUCT_TM - -dnl Checks for library functions. -AC_CHECK_FUNCS(strdup) - -AC_OUTPUT([ -Makefile -src/Makefile -src/libical/Makefile -src/libical/icalversion.h -src/libicalss/Makefile -src/test/Makefile -design-data/Makefile -doc/Makefile -scripts/Makefile -test-data/Makefile -src/Makefile -config.h -]) diff --git a/libical/configure.scan b/libical/configure.scan deleted file mode 100644 index c07a9f6bf8..0000000000 --- a/libical/configure.scan +++ /dev/null @@ -1,30 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. -AC_INIT(src/comp-cc/usecases.cc) - -dnl Checks for programs. -AC_PROG_YACC -AC_PROG_CC -AC_PROG_LEX -AC_PROG_INSTALL -AC_PROG_LN_S -AC_PROG_RANLIB - -dnl Checks for libraries. -dnl Replace `main' with a function in -lical: -AC_CHECK_LIB(ical, main) - -dnl Checks for header files. -AC_HEADER_DIRENT -AC_HEADER_STDC -AC_CHECK_HEADERS(fcntl.h limits.h malloc.h unistd.h) - -dnl Checks for typedefs, structures, and compiler characteristics. -AC_C_CONST -AC_TYPE_OFF_T -AC_TYPE_SIZE_T -AC_STRUCT_TM - -dnl Checks for library functions. -AC_CHECK_FUNCS(mkdir strdup uname) - -AC_OUTPUT(src/libicalss/Makefile src/test/Makefile src/libical/Makefile src/Makefile src/pvl/Makefile src/comp-cc/Makefile Makefile) diff --git a/libical/design-data/.cvsignore b/libical/design-data/.cvsignore deleted file mode 100644 index 3dda72986f..0000000000 --- a/libical/design-data/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile.in -Makefile diff --git a/libical/design-data/Makefile.am b/libical/design-data/Makefile.am deleted file mode 100644 index 0548974160..0000000000 --- a/libical/design-data/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ -EXTRA_DIST =\ - components.txt \ - param-c-types.txt \ - params-in-prop.txt \ - prop-to-value.txt \ - property-tokens.txt \ - restrictions.csv \ - status.txt \ - value-c-types.txt \ - value-mem-semantics.txt \ diff --git a/libical/design-data/components.txt b/libical/design-data/components.txt deleted file mode 100644 index 15417eaf2f..0000000000 --- a/libical/design-data/components.txt +++ /dev/null @@ -1,21 +0,0 @@ -VCALENDAR -VEVENT -VTODO -VJOURNAL -VFREEBUSY -VTIMEZONE -XSTANDARDTIME -XDAYLIGHTSAVINGSTIME -VALARM -XAUDIOALARM -XDISPLAYALARM -XEMAILALARM -XPROCEDUREALARM -X -VSCHEDULE -VQUERY -VCAR -VCOMMAND -XLICINVALID -ANY - diff --git a/libical/design-data/param-c-types.txt b/libical/design-data/param-c-types.txt deleted file mode 100644 index d2f28e688a..0000000000 --- a/libical/design-data/param-c-types.txt +++ /dev/null @@ -1,23 +0,0 @@ -ALTREP char* -CN char* -CUTYPE icalparameter_cutype -DELEGATED-FROM char* -DELEGATED-TO char* -DIR char* -ENCODING icalparameter_encoding -FBTYPE icalparameter_fbtype -FMTTYPE char* -LANGUAGE char* -MEMBER char* -PARTSTAT icalparameter_partstat -RANGE icalparameter_range -RELATED icalparameter_related -RELTYPE icalparameter_reltype -ROLE icalparameter_role -RSVP int -SENT-BY char* -TZID char* -VALUE icalparameter_value -X char* -X-LIC-ERRORTYPE icalparameter_xlicerrortype -X-LIC-COMPARETYPE icalparameter_xliccomparetype diff --git a/libical/design-data/params-in-prop.txt b/libical/design-data/params-in-prop.txt deleted file mode 100644 index 4d4e133fc3..0000000000 --- a/libical/design-data/params-in-prop.txt +++ /dev/null @@ -1,55 +0,0 @@ -ACTION VALUE X -ATTACH FMTTYPE ENCODING VALUE X -ATTENDEE CN CUTYPE DELEGATED-FROM DELEGATED-TO DIR LANGUAGE MEMBER PARTSTAT ROLE RSVP SENT-BY X -CALSCALE X -CATEGORIES LANGUAGE X -CLASS X -COMMENT ALTREP LANGUAGE X -COMPLETED X -CONTACT ALTREP LANGUAGE X -CREATED X -DESCRIPTION ALTREP LANGUAGE X -DTEND VALUE TZID X -DTSTAMP X -DTSTART VALUE TZID X -DUE VALUE TZID X -DURATION X -EXDATE VALUE TZID X -EXRULE X -FREEBUSY FBTYPE X -GEO X -LAST-MODIFIED X -LOCATION ALTREP LANGUAGE X -METHOD X -ORGANIZER CN DIR LANGUAGE SENT-BY X -PERCENT-COMPLETE X -PRIORITY X -PRODID X -RDATE VALUE TZID X -RECURRENCE-ID VALUE RANGE TZID X -RELATED-TO RELTYPE X -REPEAT X -REQUEST-STATUS LANGUAGE X -RESOURCES ALTREP LANGUAGE X -RRULE X -SEQUENCE X -STATUS X -SUMMARY ALTREP LANGUAGE X -TRANSP X -TRIGGER VALUE RELATED X -TZID X -TZNAME LANGUAGE X -TZOFFSETFROM X -TZOFFSETTO X -TZURL X -UID X -URL X -VERSION X -XPROP LANGUAGE X -X-LIC-ERROR XLICEERRORTYPE X -SCOPE X -MAXRESULTS X -MAXRESULTSSIZE X -QUERY X -QUERYNAME X -TARGET X \ No newline at end of file diff --git a/libical/design-data/prop-to-value.txt b/libical/design-data/prop-to-value.txt deleted file mode 100644 index 017c944983..0000000000 --- a/libical/design-data/prop-to-value.txt +++ /dev/null @@ -1,50 +0,0 @@ -CALSCALE TEXT -METHOD METHOD # Non-std. RFC2445 specifies TEXT -PRODID TEXT -VERSION TEXT -CATEGORIES TEXT -CLASS TEXT -COMMENT TEXT -DESCRIPTION TEXT -LOCATION TEXT -PERCENT-COMPLETE INTEGER -PRIORITY INTEGER -RESOURCES TEXT -STATUS TEXT -SUMMARY TEXT -COMPLETED DATE-TIME -FREEBUSY PERIOD -TRANSP TEXT -TZNAME TEXT -TZOFFSETFROM UTC-OFFSET -TZOFFSETTO UTC-OFFSET -TZURL URI -TZID TEXT -ATTENDEE CAL-ADDRESS -CONTACT TEXT -ORGANIZER CAL-ADDRESS -RELATED-TO TEXT -URL URI -UID TEXT -EXRULE RECUR -RRULE RECUR -ACTION TEXT -REPEAT INTEGER -CREATED DATE-TIME -DTSTAMP DATE-TIME -LAST-MODIFIED DATE-TIME -SEQUENCE INTEGER -X-LIC-ERROR TEXT -X-LIC-CLUSTERCOUNT INTEGER -REQUEST-STATUS STRING -ATTACH ATTACH # Non-std: URI or BINARY -GEO GEO # Non-std: Two FLOATS -DTEND DATE-TIME-DATE # Non-std: DATE-TIME or DATE -DUE DATE-TIME-DATE # Non-std: DATE-TIME or DATE -DTSTART DATE-TIME-DATE # Non-std: DATE-TIME or DATE -RECURRENCE-ID DATE-TIME-DATE # Non-std: DATE-TIME or DATE -EXDATE DATE-TIME-DATE # Non-std: DATE-TIME or DATE -RDATE DATE-TIME-PERIOD # Non-std: DATE-TIME or DATE or PERIOD -TRIGGER TRIGGER # Non-std: DURATION or DATE-TIME -DURATION DURATION -QUERY QUERY diff --git a/libical/design-data/property-tokens.txt b/libical/design-data/property-tokens.txt deleted file mode 100644 index f8a95861c4..0000000000 --- a/libical/design-data/property-tokens.txt +++ /dev/null @@ -1,65 +0,0 @@ -8BIT -ACCEPTED -ADD -AUDIO -BASE64 -BINARY -BOOLEAN -BUSY -BUSY-TENTATIVE -BUSY-UNAVAILABLE -CAL-ADDRESS -CANCEL -CANCELLED -CHAIR -CHILD -COMPLETED -CONFIDENTIAL -CONFIRMED -COUNTER -DATE -DATE-TIME -DECLINECOUNTER -DECLINED -DELEGATED -DISPLAY -DRAFT -DURATION -EMAIL -END -FINAL -FLOAT -FREE -GREGORIAN -GROUP -INDIVIDUAL -IN-PROCESS -INTEGER -NEEDS-ACTION -NON-PARTICIPANT -OPAQUE -OPT-PARTICIPANT -PARENT -PERIOD -PRIVATE -PROCEDURE -PUBLIC -PUBLISH -RECUR -REFRESH -REPLY -REQ-PARTICIPANT -REQUEST -RESOURCE -ROOM -SIBLING -START -TENTATIVE -TEXT -THISANDFUTURE -THISANDPRIOR -TIME -TRANSPAENT -UNKNOWN -UTCOFFSET -XNAME diff --git a/libical/design-data/restrictions.csv b/libical/design-data/restrictions.csv deleted file mode 100644 index e93f0a2a2a..0000000000 --- a/libical/design-data/restrictions.csv +++ /dev/null @@ -1,1348 +0,0 @@ -# Method, Target component, Property, Sub-component, Restriction -PUBLISH,VEVENT,NONE,NONE,ONEPLUS -PUBLISH,VEVENT,DTSTAMP,NONE,ONE -PUBLISH,VEVENT,DTSTART,NONE,ONE -PUBLISH,VEVENT,ORGANIZER,NONE,ONE -PUBLISH,VEVENT,SUMMARY,NONE,ONE -PUBLISH,VEVENT,UID,NONE,ONE -PUBLISH,VEVENT,RECURRENCEID,NONE,ZEROORONE -PUBLISH,VEVENT,SEQUENCE,NONE,ZEROORONE -PUBLISH,VEVENT,ATTACH,NONE,ZEROPLUS -PUBLISH,VEVENT,CATEGORIES,NONE,ZEROORONE -PUBLISH,VEVENT,CLASS,NONE,ZEROORONE -PUBLISH,VEVENT,COMMENT,NONE,ZEROORONE -PUBLISH,VEVENT,CONTACT,NONE,ZEROPLUS -PUBLISH,VEVENT,CREATED,NONE,ZEROORONE -PUBLISH,VEVENT,DESCRIPTION,NONE,ZEROORONE -PUBLISH,VEVENT,DTEND,NONE,ZEROORONE -PUBLISH,VEVENT,DURATION,NONE,ZEROORONE -PUBLISH,VEVENT,EXDATE,NONE,ZEROPLUS -PUBLISH,VEVENT,EXRULE,NONE,ZEROPLUS -PUBLISH,VEVENT,GEO,NONE,ZEROORONE -PUBLISH,VEVENT,LASTMODIFIED,NONE,ZEROORONE -PUBLISH,VEVENT,LOCATION,NONE,ZEROORONE -PUBLISH,VEVENT,PRIORITY,NONE,ZEROORONE -PUBLISH,VEVENT,RDATE,NONE,ZEROPLUS -PUBLISH,VEVENT,RELATEDTO,NONE,ZEROPLUS -PUBLISH,VEVENT,RESOURCES,NONE,ZEROORONE -PUBLISH,VEVENT,RRULE,NONE,ZEROPLUS -PUBLISH,VEVENT,STATUS,NONE,ZEROORONE -PUBLISH,VEVENT,TRANSP,NONE,ZEROORONE -PUBLISH,VEVENT,URL,NONE,ZEROORONE -PUBLISH,VEVENT,X,NONE,ZEROPLUS -PUBLISH,VEVENT,ATTENDEE,NONE,ZERO -PUBLISH,VEVENT,REQUESTSTATUS,NONE,ZERO -PUBLISH,VEVENT,NONE,VALARM,ZEROPLUS -PUBLISH,VEVENT,NONE,VFREEBUSY,ZERO -PUBLISH,VEVENT,NONE,VJOURNAL,ZERO -PUBLISH,VEVENT,NONE,VTODO,ZERO -PUBLISH,VEVENT,NONE,VTIMEZONE,ZEROPLUS -PUBLISH,VEVENT,NONE,X,ZEROPLUS -REQUEST,VEVENT,NONE,NONE,ONEPLUS -REQUEST,VEVENT,ATTENDEE,NONE,ONEPLUS -REQUEST,VEVENT,DTSTAMP,NONE,ONE -REQUEST,VEVENT,DTSTART,NONE,ONE -REQUEST,VEVENT,ORGANIZER,NONE,ONE -REQUEST,VEVENT,SEQUENCE,NONE,ZEROORONE -REQUEST,VEVENT,SUMMARY,NONE,ONE -REQUEST,VEVENT,UID,NONE,ONE -REQUEST,VEVENT,ATTACH,NONE,ZEROPLUS -REQUEST,VEVENT,CATEGORIES,NONE,ZEROORONE -REQUEST,VEVENT,CLASS,NONE,ZEROORONE -REQUEST,VEVENT,COMMENT,NONE,ZEROORONE -REQUEST,VEVENT,CONTACT,NONE,ZEROPLUS -REQUEST,VEVENT,CREATED,NONE,ZEROORONE -REQUEST,VEVENT,DESCRIPTION,NONE,ZEROORONE -REQUEST,VEVENT,DTEND,NONE,ONEEXCLUSIVE,icalrestriction_check_exclusive -REQUEST,VEVENT,DURATION,NONE,ONEEXCLUSIVE,icalrestriction_check_exclusive -REQUEST,VEVENT,EXDATE,NONE,ZEROPLUS -REQUEST,VEVENT,EXRULE,NONE,ZEROPLUS -REQUEST,VEVENT,GEO,NONE,ZEROORONE -REQUEST,VEVENT,LASTMODIFIED,NONE,ZEROORONE -REQUEST,VEVENT,LOCATION,NONE,ZEROORONE -REQUEST,VEVENT,PRIORITY,NONE,ZEROORONE -REQUEST,VEVENT,RDATE,NONE,ZEROPLUS -REQUEST,VEVENT,RECURRENCEID,NONE,ZEROORONE -REQUEST,VEVENT,RELATEDTO,NONE,ZEROPLUS -REQUEST,VEVENT,REQUESTSTATUS,NONE,ZEROPLUS -REQUEST,VEVENT,RESOURCES,NONE,ZEROORONE -REQUEST,VEVENT,RRULE,NONE,ZEROPLUS -REQUEST,VEVENT,STATUS,NONE,ZEROORONE -REQUEST,VEVENT,TRANSP,NONE,ZEROORONE -REQUEST,VEVENT,URL,NONE,ZEROORONE -REQUEST,VEVENT,X,NONE,ZEROPLUS -REQUEST,VEVENT,NONE,VALARM,ZEROPLUS -REQUEST,VEVENT,NONE,VTIMEZONE,ZEROPLUS -REQUEST,VEVENT,NONE,X,ZEROPLUS -REQUEST,VEVENT,NONE,VFREEBUSY,ZERO -REQUEST,VEVENT,NONE,VJOURNAL,ZERO -REQUEST,VEVENT,NONE,VTODO,ZERO -REPLY,VEVENT,NONE,NONE,ONEPLUS -REPLY,VEVENT,ATTENDEE,NONE,ONE -REPLY,VEVENT,DTSTAMP,NONE,ONE -REPLY,VEVENT,ORGANIZER,NONE,ONE -REPLY,VEVENT,RECURRENCEID,NONE,ZEROORONE -REPLY,VEVENT,UID,NONE,ONE -REPLY,VEVENT,SEQUENCE,NONE,ZEROORONE -REPLY,VEVENT,ATTACH,NONE,ZEROPLUS -REPLY,VEVENT,CATEGORIES,NONE,ZEROORONE -REPLY,VEVENT,CLASS,NONE,ZEROORONE -REPLY,VEVENT,COMMENT,NONE,ZEROORONE -REPLY,VEVENT,CONTACT,NONE,ZEROPLUS -REPLY,VEVENT,CREATED,NONE,ZEROORONE -REPLY,VEVENT,DESCRIPTION,NONE,ZEROORONE -REPLY,VEVENT,DTEND,NONE,ONEEXCLUSIVE,icalrestriction_check_exclusive -REPLY,VEVENT,DTSTART,NONE,ZEROORONE -REPLY,VEVENT,DURATION,NONE,ONEEXCLUSIVE,icalrestriction_check_exclusive -REPLY,VEVENT,EXDATE,NONE,ZEROPLUS -REPLY,VEVENT,EXRULE,NONE,ZEROPLUS -REPLY,VEVENT,GEO,NONE,ZEROORONE -REPLY,VEVENT,LASTMODIFIED,NONE,ZEROORONE -REPLY,VEVENT,LOCATION,NONE,ZEROORONE -REPLY,VEVENT,PRIORITY,NONE,ZEROORONE -REPLY,VEVENT,RDATE,NONE,ZEROPLUS -REPLY,VEVENT,RELATEDTO,NONE,ZEROPLUS -REPLY,VEVENT,RESOURCES,NONE,ZEROORONE -REPLY,VEVENT,REQUESTSTATUS,NONE,ZEROPLUS -REPLY,VEVENT,RRULE,NONE,ZEROPLUS -REPLY,VEVENT,STATUS,NONE,ZEROORONE -REPLY,VEVENT,SUMMARY,NONE,ZEROORONE -REPLY,VEVENT,TRANSP,NONE,ZEROORONE -REPLY,VEVENT,URL,NONE,ZEROORONE -REPLY,VEVENT,X,NONE,ZEROPLUS -REPLY,VEVENT,NONE,VTIMEZONE,ZEROORONE -REPLY,VEVENT,NONE,X,ZEROPLUS -REPLY,VEVENT,NONE,VALARM,ZERO -REPLY,VEVENT,NONE,VFREEBUSY,ZERO -REPLY,VEVENT,NONE,VJOURNAL,ZERO -REPLY,VEVENT,NONE,VTODO,ZERO -ADD,VEVENT,NONE,NONE,ONE -ADD,VEVENT,DTSTAMP,NONE,ONE -ADD,VEVENT,DTSTART,NONE,ONE -ADD,VEVENT,ORGANIZER,NONE,ONE -ADD,VEVENT,SEQUENCE,NONE,ONE -ADD,VEVENT,SUMMARY,NONE,ONE -ADD,VEVENT,UID,NONE,ONE -ADD,VEVENT,ATTACH,NONE,ZEROPLUS -ADD,VEVENT,ATTENDEE,NONE,ZEROPLUS -ADD,VEVENT,CATEGORIES,NONE,ZEROORONE -ADD,VEVENT,CLASS,NONE,ZEROORONE -ADD,VEVENT,COMMENT,NONE,ZEROORONE -ADD,VEVENT,CONTACT,NONE,ZEROPLUS -ADD,VEVENT,CREATED,NONE,ZEROORONE -ADD,VEVENT,DESCRIPTION,NONE,ZEROORONE -ADD,VEVENT,DTEND,NONE,ONEEXCLUSIVE, icalrestriction_check_exclusive -ADD,VEVENT,DURATION,NONE,ONEEXCLUSIVE, icalrestriction_check_exclusive -ADD,VEVENT,EXDATE,NONE,ZEROPLUS -ADD,VEVENT,EXRULE,NONE,ZEROPLUS -ADD,VEVENT,GEO,NONE,ZEROORONE -ADD,VEVENT,LASTMODIFIED,NONE,ZEROORONE -ADD,VEVENT,LOCATION,NONE,ZEROORONE -ADD,VEVENT,PRIORITY,NONE,ZEROORONE -ADD,VEVENT,RDATE,NONE,ZEROPLUS -ADD,VEVENT,RELATEDTO,NONE,ZEROPLUS -ADD,VEVENT,RESOURCES,NONE,ZEROORONE -ADD,VEVENT,RRULE,NONE,ZEROPLUS -ADD,VEVENT,STATUS,NONE,ZEROORONE -ADD,VEVENT,TRANSP,NONE,ZEROORONE -ADD,VEVENT,URL,NONE,ZEROORONE -ADD,VEVENT,X,NONE,ZEROPLUS -ADD,VEVENT,RECURRENCEID,NONE,ZERO -ADD,VEVENT,REQUESTSTATUS,NONE,ZERO -ADD,VEVENT,NONE,VALARM,ZEROPLUS -ADD,VEVENT,NONE,VTIMEZONE,ZEROPLUS -ADD,VEVENT,NONE,X,ZEROPLUS -ADD,VEVENT,NONE,VFREEBUSY,ZERO -ADD,VEVENT,NONE,VTODO,ZERO -ADD,VEVENT,NONE,VJOURNAL,ZERO -CANCEL,VEVENT,NONE,NONE,ONEPLUS -CANCEL,VEVENT,ATTENDEE,NONE,ZEROPLUS -CANCEL,VEVENT,DTSTAMP,NONE,ONE -CANCEL,VEVENT,ORGANIZER,NONE,ONE -CANCEL,VEVENT,SEQUENCE,NONE,ONE -CANCEL,VEVENT,UID,NONE,ONE -CANCEL,VEVENT,COMMENT,NONE,ZEROORONE -CANCEL,VEVENT,ATTACH,NONE,ZEROPLUS -CANCEL,VEVENT,CATEGORIES,NONE,ZEROORONE -CANCEL,VEVENT,CLASS,NONE,ZEROORONE -CANCEL,VEVENT,CONTACT,NONE,ZEROPLUS -CANCEL,VEVENT,CREATED,NONE,ZEROORONE -CANCEL,VEVENT,DESCRIPTION,NONE,ZEROORONE -CANCEL,VEVENT,DTEND,NONE,ONEEXCLUSIVE, icalrestriction_check_exclusive -CANCEL,VEVENT,DTSTART,NONE,ZEROORONE -CANCEL,VEVENT,DURATION,NONE,ONEEXCLUSIVE, icalrestriction_check_exclusive -CANCEL,VEVENT,EXDATE,NONE,ZEROPLUS -CANCEL,VEVENT,EXRULE,NONE,ZEROPLUS -CANCEL,VEVENT,GEO,NONE,ZEROORONE -CANCEL,VEVENT,LASTMODIFIED,NONE,ZEROORONE -CANCEL,VEVENT,LOCATION,NONE,ZEROORONE -CANCEL,VEVENT,PRIORITY,NONE,ZEROORONE -CANCEL,VEVENT,RDATE,NONE,ZEROPLUS -CANCEL,VEVENT,RECURRENCEID,NONE,ZEROORONE -CANCEL,VEVENT,RELATEDTO,NONE,ZEROPLUS -CANCEL,VEVENT,RESOURCES,NONE,ZEROORONE -CANCEL,VEVENT,RRULE,NONE,ZEROPLUS -CANCEL,VEVENT,STATUS,NONE,ZEROORONE -CANCEL,VEVENT,SUMMARY,NONE,ZEROORONE -CANCEL,VEVENT,TRANSP,NONE,ZEROORONE -CANCEL,VEVENT,URL,NONE,ZEROORONE -CANCEL,VEVENT,X,NONE,ZEROPLUS -CANCEL,VEVENT,REQUESTSTATUS,NONE,ZERO -CANCEL,VEVENT,NONE,VTIMEZONE,ZEROPLUS -CANCEL,VEVENT,NONE,X,ZEROPLUS -CANCEL,VEVENT,NONE,VTODO,ZERO -CANCEL,VEVENT,NONE,VJOURNAL,ZERO -CANCEL,VEVENT,NONE,VFREEBUSY,ZERO -CANCEL,VEVENT,NONE,VALARM,ZERO -REFRESH,VEVENT,NONE,NONE,ONE -REFRESH,VEVENT,ATTENDEE,NONE,ONE -REFRESH,VEVENT,DTSTAMP,NONE,ONE -REFRESH,VEVENT,ORGANIZER,NONE,ONE -REFRESH,VEVENT,UID,NONE,ONE -REFRESH,VEVENT,COMMENT,NONE,ZEROORONE -REFRESH,VEVENT,RECURRENCEID,NONE,ZEROORONE -REFRESH,VEVENT,X,NONE,ZEROPLUS -REFRESH,VEVENT,ATTACH,NONE,ZERO -REFRESH,VEVENT,CATEGORIES,NONE,ZERO -REFRESH,VEVENT,CLASS,NONE,ZERO -REFRESH,VEVENT,CONTACT,NONE,ZERO -REFRESH,VEVENT,CREATED,NONE,ZERO -REFRESH,VEVENT,DESCRIPTION,NONE,ZERO -REFRESH,VEVENT,DTEND,NONE,ZERO -REFRESH,VEVENT,DTSTART,NONE,ZERO -REFRESH,VEVENT,DURATION,NONE,ZERO -REFRESH,VEVENT,EXDATE,NONE,ZERO -REFRESH,VEVENT,EXRULE,NONE,ZERO -REFRESH,VEVENT,GEO,NONE,ZERO -REFRESH,VEVENT,LASTMODIFIED,NONE,ZERO -REFRESH,VEVENT,LOCATION,NONE,ZERO -REFRESH,VEVENT,PRIORITY,NONE,ZERO -REFRESH,VEVENT,RDATE,NONE,ZERO -REFRESH,VEVENT,RELATEDTO,NONE,ZERO -REFRESH,VEVENT,REQUESTSTATUS,NONE,ZERO -REFRESH,VEVENT,RESOURCES,NONE,ZERO -REFRESH,VEVENT,RRULE,NONE,ZERO -REFRESH,VEVENT,SEQUENCE,NONE,ZERO -REFRESH,VEVENT,STATUS,NONE,ZERO -REFRESH,VEVENT,SUMMARY,NONE,ZERO -REFRESH,VEVENT,TRANSP,NONE,ZERO -REFRESH,VEVENT,URL,NONE,ZERO -REFRESH,VEVENT,NONE,X,ZEROPLUS -REFRESH,VEVENT,NONE,VTODO,ZERO -REFRESH,VEVENT,NONE,VJOURNAL,ZERO -REFRESH,VEVENT,NONE,VFREEBUSY,ZERO -REFRESH,VEVENT,NONE,VTIMEZONE,ZERO -REFRESH,VEVENT,NONE,VALARM,ZERO -COUNTER,VEVENT,NONE,NONE,ONE -COUNTER,VEVENT,DTSTAMP,NONE,ONE -COUNTER,VEVENT,DTSTART,NONE,ONE -COUNTER,VEVENT,ORGANIZER,NONE,ONE -COUNTER,VEVENT,SEQUENCE,NONE,ONE -COUNTER,VEVENT,SUMMARY,NONE,ONE -COUNTER,VEVENT,UID,NONE,ONE -COUNTER,VEVENT,ATTACH,NONE,ZEROPLUS -COUNTER,VEVENT,ATTENDEE,NONE,ZEROPLUS -COUNTER,VEVENT,CATEGORIES,NONE,ZEROORONE -COUNTER,VEVENT,CLASS,NONE,ZEROORONE -COUNTER,VEVENT,COMMENT,NONE,ZEROORONE -COUNTER,VEVENT,CONTACT,NONE,ZEROPLUS -COUNTER,VEVENT,CREATED,NONE,ZEROORONE -COUNTER,VEVENT,DESCRIPTION,NONE,ZEROORONE -COUNTER,VEVENT,DTEND,NONE,ONEEXCLUSIVE, icalrestriction_check_exclusive -COUNTER,VEVENT,DURATION,NONE,ONEEXCLUSIVE, icalrestriction_check_exclusive -COUNTER,VEVENT,EXDATE,NONE,ZEROPLUS -COUNTER,VEVENT,EXRULE,NONE,ZEROPLUS -COUNTER,VEVENT,GEO,NONE,ZEROORONE -COUNTER,VEVENT,LASTMODIFIED,NONE,ZEROORONE -COUNTER,VEVENT,LOCATION,NONE,ZEROORONE -COUNTER,VEVENT,PRIORITY,NONE,ZEROORONE -COUNTER,VEVENT,RDATE,NONE,ZEROPLUS -COUNTER,VEVENT,RECURRENCEID,NONE,ZEROORONE -COUNTER,VEVENT,RELATEDTO,NONE,ZEROPLUS -COUNTER,VEVENT,REQUESTSTATUS,NONE,ZEROPLUS -COUNTER,VEVENT,RESOURCES,NONE,ZEROORONE -COUNTER,VEVENT,RRULE,NONE,ZEROPLUS -COUNTER,VEVENT,STATUS,NONE,ZEROORONE -COUNTER,VEVENT,TRANSP,NONE,ZEROORONE -COUNTER,VEVENT,URL,NONE,ZEROORONE -COUNTER,VEVENT,X,NONE,ZEROPLUS -COUNTER,VEVENT,NONE,VALARM,ZEROPLUS -COUNTER,VEVENT,NONE,VTIMEZONE,ZEROPLUS -COUNTER,VEVENT,NONE,X,ZEROPLUS -COUNTER,VEVENT,NONE,VTODO,ZERO -COUNTER,VEVENT,NONE,VJOURNAL,ZERO -COUNTER,VEVENT,NONE,VFREEBUSY,ZERO -DECLINECOUNTER,VEVENT,NONE,NONE,ONE -DECLINECOUNTER,VEVENT,DTSTAMP,NONE,ONE -DECLINECOUNTER,VEVENT,ORGANIZER,NONE,ONE -DECLINECOUNTER,VEVENT,UID,NONE,ONE -DECLINECOUNTER,VEVENT,COMMENT,NONE,ZEROORONE -DECLINECOUNTER,VEVENT,RECURRENCEID,NONE,ZEROORONE -DECLINECOUNTER,VEVENT,REQUESTSTATUS,NONE,ZEROPLUS -DECLINECOUNTER,VEVENT,SEQUENCE,NONE,ZERO -DECLINECOUNTER,VEVENT,X,NONE,ZEROPLUS -DECLINECOUNTER,VEVENT,ATTACH,NONE,ZERO -DECLINECOUNTER,VEVENT,ATTENDEE,NONE,ZERO -DECLINECOUNTER,VEVENT,CATEGORIES,NONE,ZERO -DECLINECOUNTER,VEVENT,CLASS,NONE,ZERO -DECLINECOUNTER,VEVENT,CONTACT,NONE,ZERO -DECLINECOUNTER,VEVENT,CREATED,NONE,ZERO -DECLINECOUNTER,VEVENT,DESCRIPTION,NONE,ZERO -DECLINECOUNTER,VEVENT,DTEND,NONE,ZERO -DECLINECOUNTER,VEVENT,DTSTART,NONE,ZERO -DECLINECOUNTER,VEVENT,DURATION,NONE,ZERO -DECLINECOUNTER,VEVENT,EXDATE,NONE,ZERO -DECLINECOUNTER,VEVENT,EXRULE,NONE,ZERO -DECLINECOUNTER,VEVENT,GEO,NONE,ZERO -DECLINECOUNTER,VEVENT,LASTMODIFIED,NONE,ZERO -DECLINECOUNTER,VEVENT,LOCATION,NONE,ZERO -DECLINECOUNTER,VEVENT,PRIORITY,NONE,ZERO -DECLINECOUNTER,VEVENT,RDATE,NONE,ZERO -DECLINECOUNTER,VEVENT,RELATEDTO,NONE,ZERO -DECLINECOUNTER,VEVENT,RESOURCES,NONE,ZERO -DECLINECOUNTER,VEVENT,RRULE,NONE,ZERO -DECLINECOUNTER,VEVENT,STATUS,NONE,ZERO -DECLINECOUNTER,VEVENT,SUMMARY,NONE,ZERO -DECLINECOUNTER,VEVENT,TRANSP,NONE,ZERO -DECLINECOUNTER,VEVENT,URL,NONE,ZERO -DECLINECOUNTER,VEVENT,NONE,X,ZEROPLUS -DECLINECOUNTER,VEVENT,NONE,VTODO,ZERO -DECLINECOUNTER,VEVENT,NONE,VJOURNAL,ZERO -DECLINECOUNTER,VEVENT,NONE,VFREEBUSY,ZERO -DECLINECOUNTER,VEVENT,NONE,VTIMEZONE,ZERO -DECLINECOUNTER,VEVENT,NONE,VALARM,ZERO -PUBLISH,VFREEBUSY,NONE,NONE,ONEPLUS -PUBLISH,VFREEBUSY,DTSTAMP,NONE,ONE -PUBLISH,VFREEBUSY,DTSTART,NONE,ONE -PUBLISH,VFREEBUSY,DTEND,NONE,ONE -PUBLISH,VFREEBUSY,FREEBUSY,NONE,ONEPLUS -PUBLISH,VFREEBUSY,ORGANIZER,NONE,ONE -PUBLISH,VFREEBUSY,COMMENT,NONE,ZEROORONE -PUBLISH,VFREEBUSY,CONTACT,NONE,ZEROPLUS -PUBLISH,VFREEBUSY,X,NONE,ZEROPLUS -PUBLISH,VFREEBUSY,URL,NONE,ZEROORONE -PUBLISH,VFREEBUSY,ATTENDEE,NONE,ZERO -PUBLISH,VFREEBUSY,DURATION,NONE,ZERO -PUBLISH,VFREEBUSY,REQUESTSTATUS,NONE,ZERO -PUBLISH,VFREEBUSY,UID,NONE,ZERO -PUBLISH,VFREEBUSY,NONE,X,ZEROPLUS -PUBLISH,VFREEBUSY,NONE,VEVENT,ZERO -PUBLISH,VFREEBUSY,NONE,VTODO,ZERO -PUBLISH,VFREEBUSY,NONE,VJOURNAL,ZERO -PUBLISH,VFREEBUSY,NONE,VTIMEZONE,ZERO -PUBLISH,VFREEBUSY,NONE,VALARM,ZERO -REQUEST,VFREEBUSY,NONE,NONE,ONE -REQUEST,VFREEBUSY,ATTENDEE,NONE,ONEPLUS -REQUEST,VFREEBUSY,DTEND,NONE,ONE -REQUEST,VFREEBUSY,DTSTAMP,NONE,ONE -REQUEST,VFREEBUSY,DTSTART,NONE,ONE -REQUEST,VFREEBUSY,ORGANIZER,NONE,ONE -REQUEST,VFREEBUSY,UID,NONE,ONE -REQUEST,VFREEBUSY,COMMENT,NONE,ZEROORONE -REQUEST,VFREEBUSY,CONTACT,NONE,ZEROPLUS -REQUEST,VFREEBUSY,X,NONE,ZEROPLUS -REQUEST,VFREEBUSY,FREEBUSY,NONE,ZERO -REQUEST,VFREEBUSY,DURATION,NONE,ZERO -REQUEST,VFREEBUSY,REQUESTSTATUS,NONE,ZERO -REQUEST,VFREEBUSY,URL,NONE,ZERO -REQUEST,VFREEBUSY,NONE,X,ZEROPLUS -REQUEST,VFREEBUSY,NONE,VALARM,ZERO -REQUEST,VFREEBUSY,NONE,VEVENT,ZERO -REQUEST,VFREEBUSY,NONE,VTODO,ZERO -REQUEST,VFREEBUSY,NONE,VJOURNAL,ZERO -REQUEST,VFREEBUSY,NONE,VTIMEZONE,ZERO -REPLY,VFREEBUSY,NONE,NONE,ONE -REPLY,VFREEBUSY,ATTENDEE,NONE,ONE -REPLY,VFREEBUSY,DTSTAMP,NONE,ONE -REPLY,VFREEBUSY,DTEND,NONE,ONE -REPLY,VFREEBUSY,DTSTART,NONE,ONE -REPLY,VFREEBUSY,FREEBUSY,NONE,ONEPLUS -REPLY,VFREEBUSY,ORGANIZER,NONE,ONE -REPLY,VFREEBUSY,UID,NONE,ONE -REPLY,VFREEBUSY,COMMENT,NONE,ZEROORONE -REPLY,VFREEBUSY,CONTACT,NONE,ZEROPLUS -REPLY,VFREEBUSY,REQUESTSTATUS,NONE,ZEROPLUS -REPLY,VFREEBUSY,URL,NONE,ZEROORONE -REPLY,VFREEBUSY,X,NONE,ZEROPLUS -REPLY,VFREEBUSY,DURATION,NONE,ZERO -REPLY,VFREEBUSY,SEQUENCE,NONE,ZERO -REPLY,VFREEBUSY,NONE,X,ZEROPLUS -REPLY,VFREEBUSY,NONE,VALARM,ZERO -REPLY,VFREEBUSY,NONE,VEVENT,ZERO -REPLY,VFREEBUSY,NONE,VTODO,ZERO -REPLY,VFREEBUSY,NONE,VJOURNAL,ZERO -REPLY,VFREEBUSY,NONE,VTIMEZONE,ZERO -PUBLISH,VTODO,NONE,NONE,ONEPLUS -PUBLISH,VTODO,DTSTAMP,NONE,ONE -PUBLISH,VTODO,DTSTART,NONE,ONE -PUBLISH,VTODO,ORGANIZER,NONE,ONE -PUBLISH,VTODO,PRIORITY,NONE,ONE -PUBLISH,VTODO,SEQUENCE,NONE,ZEROORONE -PUBLISH,VTODO,SUMMARY,NONE,ONE -PUBLISH,VTODO,UID,NONE,ONE -PUBLISH,VTODO,ATTACH,NONE,ZEROPLUS -PUBLISH,VTODO,CATEGORIES,NONE,ZEROORONE -PUBLISH,VTODO,CLASS,NONE,ZEROORONE -PUBLISH,VTODO,COMMENT,NONE,ZEROORONE -PUBLISH,VTODO,CONTACT,NONE,ZEROPLUS -PUBLISH,VTODO,CREATED,NONE,ZEROORONE -PUBLISH,VTODO,DESCRIPTION,NONE,ZEROORONE -PUBLISH,VTODO,DUE,NONE,ZEROORONE -PUBLISH,VTODO,DURATION,NONE,ZEROORONE -PUBLISH,VTODO,EXDATE,NONE,ZEROPLUS -PUBLISH,VTODO,EXRULE,NONE,ZEROPLUS -PUBLISH,VTODO,GEO,NONE,ZEROORONE -PUBLISH,VTODO,LASTMODIFIED,NONE,ZEROORONE -PUBLISH,VTODO,LOCATION,NONE,ZEROORONE -PUBLISH,VTODO,PERCENTCOMPLETE,NONE,ZEROORONE -PUBLISH,VTODO,RDATE,NONE,ZEROPLUS -PUBLISH,VTODO,RECURRENCEID,NONE,ZEROORONE -PUBLISH,VTODO,RELATEDTO,NONE,ZEROPLUS -PUBLISH,VTODO,RESOURCES,NONE,ZEROORONE -PUBLISH,VTODO,RRULE,NONE,ZEROPLUS -PUBLISH,VTODO,STATUS,NONE,ZEROORONE -PUBLISH,VTODO,URL,NONE,ZEROORONE -PUBLISH,VTODO,X,NONE,ZEROPLUS -PUBLISH,VTODO,ATTENDEE,NONE,ZERO -PUBLISH,VTODO,REQUESTSTATUS,NONE,ZERO -PUBLISH,VTODO,NONE,VTIMEZONE,ZEROPLUS -PUBLISH,VTODO,NONE,VALARM,ZEROPLUS -PUBLISH,VTODO,NONE,X,ZEROPLUS -PUBLISH,VTODO,NONE,VFREEBUSY,ZERO -PUBLISH,VTODO,NONE,VEVENT,ZERO -PUBLISH,VTODO,NONE,VJOURNAL,ZERO -REQUEST,VTODO,NONE,NONE,ONEPLUS -REQUEST,VTODO,ATTENDEE,NONE,ONEPLUS -REQUEST,VTODO,DTSTAMP,NONE,ONE -REQUEST,VTODO,DTSTART,NONE,ONE -REQUEST,VTODO,ORGANIZER,NONE,ONE -REQUEST,VTODO,PRIORITY,NONE,ONE -REQUEST,VTODO,SEQUENCE,NONE,ZEROORONE -REQUEST,VTODO,SUMMARY,NONE,ONE -REQUEST,VTODO,UID,NONE,ONE -REQUEST,VTODO,ATTACH,NONE,ZEROPLUS -REQUEST,VTODO,CATEGORIES,NONE,ZEROORONE -REQUEST,VTODO,CLASS,NONE,ZEROORONE -REQUEST,VTODO,COMMENT,NONE,ZEROORONE -REQUEST,VTODO,CONTACT,NONE,ZEROPLUS -REQUEST,VTODO,CREATED,NONE,ZEROORONE -REQUEST,VTODO,DESCRIPTION,NONE,ZEROORONE -REQUEST,VTODO,DUE,NONE,ZEROORONE -REQUEST,VTODO,DURATION,NONE,ZEROORONE -REQUEST,VTODO,EXDATE,NONE,ZEROPLUS -REQUEST,VTODO,EXRULE,NONE,ZEROPLUS -REQUEST,VTODO,GEO,NONE,ZEROORONE -REQUEST,VTODO,LASTMODIFIED,NONE,ZEROORONE -REQUEST,VTODO,LOCATION,NONE,ZEROORONE -REQUEST,VTODO,PERCENTCOMPLETE,NONE,ZEROORONE -REQUEST,VTODO,RDATE,NONE,ZEROPLUS -REQUEST,VTODO,RECURRENCEID,NONE,ZEROORONE -REQUEST,VTODO,RELATEDTO,NONE,ZEROPLUS -REQUEST,VTODO,RESOURCES,NONE,ZEROORONE -REQUEST,VTODO,RRULE,NONE,ZEROPLUS -REQUEST,VTODO,STATUS,NONE,ZEROORONE -REQUEST,VTODO,URL,NONE,ZEROORONE -REQUEST,VTODO,X,NONE,ZEROPLUS -REQUEST,VTODO,REQUESTSTATUS,NONE,ZERO -REQUEST,VTODO,NONE,VALARM,ZEROPLUS -REQUEST,VTODO,NONE,VTIMEZONE,ZEROPLUS -REQUEST,VTODO,NONE,X,ZEROPLUS -REQUEST,VTODO,NONE,VEVENT,ZERO -REQUEST,VTODO,NONE,VFREEBUSY,ZERO -REQUEST,VTODO,NONE,VJOURNAL,ZERO -REPLY,VTODO,NONE,NONE,ONEPLUS -REPLY,VTODO,ATTENDEE,NONE,ONEPLUS -REPLY,VTODO,DTSTAMP,NONE,ONE -REPLY,VTODO,ORGANIZER,NONE,ONE -REPLY,VTODO,REQUESTSTATUS,NONE,ONEPLUS -REPLY,VTODO,UID,NONE,ONE -REPLY,VTODO,ATTACH,NONE,ZEROPLUS -REPLY,VTODO,CATEGORIES,NONE,ZEROORONE -REPLY,VTODO,CLASS,NONE,ZEROORONE -REPLY,VTODO,COMMENT,NONE,ZEROORONE -REPLY,VTODO,CONTACT,NONE,ZEROPLUS -REPLY,VTODO,CREATED,NONE,ZEROORONE -REPLY,VTODO,DESCRIPTION,NONE,ZEROORONE -REPLY,VTODO,DTSTART,NONE,ZEROORONE -REPLY,VTODO,DUE,NONE,ZEROORONE -REPLY,VTODO,DURATION,NONE,ZEROORONE -REPLY,VTODO,EXDATE,NONE,ZEROPLUS -REPLY,VTODO,EXRULE,NONE,ZEROPLUS -REPLY,VTODO,GEO,NONE,ZEROORONE -REPLY,VTODO,LASTMODIFIED,NONE,ZEROORONE -REPLY,VTODO,LOCATION,NONE,ZEROORONE -REPLY,VTODO,PERCENTCOMPLETE,NONE,ZEROORONE -REPLY,VTODO,PRIORITY,NONE,ZEROORONE -REPLY,VTODO,RDATE,NONE,ZEROPLUS -REPLY,VTODO,RELATEDTO,NONE,ZEROPLUS -REPLY,VTODO,RESOURCES,NONE,ZEROORONE -REPLY,VTODO,RRULE,NONE,ZEROPLUS -REPLY,VTODO,RECURRENCEID,NONE,ZEROORONE -REPLY,VTODO,SEQUENCE,NONE,ZEROORONE -REPLY,VTODO,STATUS,NONE,ZEROORONE -REPLY,VTODO,SUMMARY,NONE,ZEROORONE -REPLY,VTODO,URL,NONE,ZEROORONE -REPLY,VTODO,X,NONE,ZEROPLUS -REPLY,VTODO,NONE,VTIMEZONE,ZEROORONE -REPLY,VTODO,NONE,X,ZEROPLUS -REPLY,VTODO,NONE,VALARM,ZERO -REPLY,VTODO,NONE,VEVENT,ZERO -REPLY,VTODO,NONE,VFREEBUSY,ZERO -ADD,VTODO,NONE,NONE,ONE -ADD,VTODO,DTSTAMP,NONE,ONE -ADD,VTODO,ORGANIZER,NONE,ONE -ADD,VTODO,PRIORITY,NONE,ONE -ADD,VTODO,SEQUENCE,NONE,ONE -ADD,VTODO,SUMMARY,NONE,ONE -ADD,VTODO,UID,NONE,ONE -ADD,VTODO,ATTACH,NONE,ZEROPLUS -ADD,VTODO,ATTENDEE,NONE,ZEROPLUS -ADD,VTODO,CATEGORIES,NONE,ZEROORONE -ADD,VTODO,CLASS,NONE,ZEROORONE -ADD,VTODO,COMMENT,NONE,ZEROORONE -ADD,VTODO,CONTACT,NONE,ZEROPLUS -ADD,VTODO,CREATED,NONE,ZEROORONE -ADD,VTODO,DESCRIPTION,NONE,ZEROORONE -ADD,VTODO,DTSTART,NONE,ZEROORONE -ADD,VTODO,DUE,NONE,ZEROORONE -ADD,VTODO,DURATION,NONE,ZEROORONE -ADD,VTODO,EXDATE,NONE,ZEROPLUS -ADD,VTODO,EXRULE,NONE,ZEROPLUS -ADD,VTODO,GEO,NONE,ZEROORONE -ADD,VTODO,LASTMODIFIED,NONE,ZEROORONE -ADD,VTODO,LOCATION,NONE,ZEROORONE -ADD,VTODO,PERCENTCOMPLETE,NONE,ZEROORONE -ADD,VTODO,RDATE,NONE,ZEROPLUS -ADD,VTODO,RELATEDTO,NONE,ZEROPLUS -ADD,VTODO,RESOURCES,NONE,ZEROORONE -ADD,VTODO,RRULE,NONE,ZEROPLUS -ADD,VTODO,STATUS,NONE,ZEROORONE -ADD,VTODO,URL,NONE,ZEROORONE -ADD,VTODO,X,NONE,ZEROPLUS -ADD,VTODO,RECURRENCEID,NONE,ZERO -ADD,VTODO,REQUESTSTATUS,NONE,ZERO -ADD,VTODO,NONE,VALARM,ZEROPLUS -ADD,VTODO,NONE,VTIMEZONE,ZEROPLUS -ADD,VTODO,NONE,X,ZEROPLUS -ADD,VTODO,NONE,VEVENT,ZERO -ADD,VTODO,NONE,VJOURNAL,ZERO -ADD,VTODO,NONE,VFREEBUSY,ZERO -CANCEL,VTODO,NONE,NONE,ONE -CANCEL,VTODO,ATTENDEE,NONE,ZEROPLUS -CANCEL,VTODO,UID,NONE,ONE -CANCEL,VTODO,DTSTAMP,NONE,ONE -CANCEL,VTODO,ORGANIZER,NONE,ONE -CANCEL,VTODO,SEQUENCE,NONE,ONE -CANCEL,VTODO,ATTACH,NONE,ZEROPLUS -CANCEL,VTODO,CATEGORIES,NONE,ZEROORONE -CANCEL,VTODO,CLASS,NONE,ZEROORONE -CANCEL,VTODO,COMMENT,NONE,ZEROORONE -CANCEL,VTODO,CONTACT,NONE,ZEROPLUS -CANCEL,VTODO,CREATED,NONE,ZEROORONE -CANCEL,VTODO,DESCRIPTION,NONE,ZEROORONE -CANCEL,VTODO,DTSTART,NONE,ZEROORONE -CANCEL,VTODO,DUE,NONE,ZEROORONE -CANCEL,VTODO,DURATION,NONE,ZEROORONE -CANCEL,VTODO,EXDATE,NONE,ZEROPLUS -CANCEL,VTODO,EXRULE,NONE,ZEROPLUS -CANCEL,VTODO,GEO,NONE,ZEROORONE -CANCEL,VTODO,LASTMODIFIED,NONE,ZEROORONE -CANCEL,VTODO,LOCATION,NONE,ZEROORONE -CANCEL,VTODO,PERCENTCOMPLETE,NONE,ZEROORONE -CANCEL,VTODO,RDATE,NONE,ZEROPLUS -CANCEL,VTODO,RECURRENCEID,NONE,ZEROORONE -CANCEL,VTODO,RELATEDTO,NONE,ZEROPLUS -CANCEL,VTODO,RESOURCES,NONE,ZEROORONE -CANCEL,VTODO,RRULE,NONE,ZEROPLUS -CANCEL,VTODO,PRIORITY,NONE,ZEROORONE -CANCEL,VTODO,STATUS,NONE,ZEROORONE -CANCEL,VTODO,URL,NONE,ZEROORONE -CANCEL,VTODO,X,NONE,ZEROPLUS -CANCEL,VTODO,REQUESTSTATUS,NONE,ZERO -CANCEL,VTODO,NONE,VTIMEZONE,ZEROORONE -CANCEL,VTODO,NONE,X,ZEROPLUS -CANCEL,VTODO,NONE,VALARM,ZERO -CANCEL,VTODO,NONE,VEVENT,ZERO -CANCEL,VTODO,NONE,VFREEBUSY,ZERO -REFRESH,VTODO,NONE,NONE,ONE -REFRESH,VTODO,ATTENDEE,NONE,ONE -REFRESH,VTODO,DTSTAMP,NONE,ONE -REFRESH,VTODO,UID,NONE,ONE -REFRESH,VTODO,RECURRENCEID,NONE,ZEROORONE -REFRESH,VTODO,X,NONE,ZEROPLUS -REFRESH,VTODO,ATTACH,NONE,ZERO -REFRESH,VTODO,CATEGORIES,NONE,ZERO -REFRESH,VTODO,CLASS,NONE,ZERO -REFRESH,VTODO,COMMENT,NONE,ZERO -REFRESH,VTODO,CONTACT,NONE,ZERO -REFRESH,VTODO,CREATED,NONE,ZERO -REFRESH,VTODO,DESCRIPTION,NONE,ZERO -REFRESH,VTODO,DTSTART,NONE,ZERO -REFRESH,VTODO,DUE,NONE,ZERO -REFRESH,VTODO,DURATION,NONE,ZERO -REFRESH,VTODO,EXDATE,NONE,ZERO -REFRESH,VTODO,EXRULE,NONE,ZERO -REFRESH,VTODO,GEO,NONE,ZERO -REFRESH,VTODO,LASTMODIFIED,NONE,ZERO -REFRESH,VTODO,LOCATION,NONE,ZERO -REFRESH,VTODO,ORGANIZER,NONE,ZERO -REFRESH,VTODO,PERCENTCOMPLETE,NONE,ZERO -REFRESH,VTODO,PRIORITY,NONE,ZERO -REFRESH,VTODO,RDATE,NONE,ZERO -REFRESH,VTODO,RELATEDTO,NONE,ZERO -REFRESH,VTODO,REQUESTSTATUS,NONE,ZERO -REFRESH,VTODO,RESOURCES,NONE,ZERO -REFRESH,VTODO,RRULE,NONE,ZERO -REFRESH,VTODO,SEQUENCE,NONE,ZERO -REFRESH,VTODO,STATUS,NONE,ZERO -REFRESH,VTODO,URL,NONE,ZERO -REFRESH,VTODO,NONE,X,ZEROPLUS -REFRESH,VTODO,NONE,VALARM,ZERO -REFRESH,VTODO,NONE,VEVENT,ZERO -REFRESH,VTODO,NONE,VFREEBUSY,ZERO -REFRESH,VTODO,NONE,VTIMEZONE,ZERO -COUNTER,VTODO,NONE,NONE,ONE -COUNTER,VTODO,ATTENDEE,NONE,ONEPLUS -COUNTER,VTODO,DTSTAMP,NONE,ONE -COUNTER,VTODO,ORGANIZER,NONE,ONE -COUNTER,VTODO,PRIORITY,NONE,ONE -COUNTER,VTODO,SUMMARY,NONE,ONE -COUNTER,VTODO,UID,NONE,ONE -COUNTER,VTODO,ATTACH,NONE,ZEROPLUS -COUNTER,VTODO,CATEGORIES,NONE,ZEROORONE -COUNTER,VTODO,CLASS,NONE,ZEROORONE -COUNTER,VTODO,COMMENT,NONE,ZEROORONE -COUNTER,VTODO,CONTACT,NONE,ZEROPLUS -COUNTER,VTODO,CREATED,NONE,ZEROORONE -COUNTER,VTODO,DESCRIPTION,NONE,ZEROORONE -COUNTER,VTODO,DTSTART,NONE,ZEROORONE -COUNTER,VTODO,DUE,NONE,ZEROORONE -COUNTER,VTODO,DURATION,NONE,ZEROORONE -COUNTER,VTODO,EXDATE,NONE,ZEROPLUS -COUNTER,VTODO,EXRULE,NONE,ZEROPLUS -COUNTER,VTODO,GEO,NONE,ZEROORONE -COUNTER,VTODO,LASTMODIFIED,NONE,ZEROORONE -COUNTER,VTODO,LOCATION,NONE,ZEROORONE -COUNTER,VTODO,PERCENTCOMPLETE,NONE,ZEROORONE -COUNTER,VTODO,RDATE,NONE,ZEROPLUS -COUNTER,VTODO,RECURRENCEID,NONE,ZEROORONE -COUNTER,VTODO,RELATEDTO,NONE,ZEROPLUS -COUNTER,VTODO,REQUESTSTATUS,NONE,ZEROPLUS -COUNTER,VTODO,RESOURCES,NONE,ZEROORONE -COUNTER,VTODO,RRULE,NONE,ZEROORONE -COUNTER,VTODO,SEQUENCE,NONE,ZEROORONE -COUNTER,VTODO,STATUS,NONE,ZEROORONE -COUNTER,VTODO,URL,NONE,ZEROORONE -COUNTER,VTODO,X,NONE,ZEROPLUS -COUNTER,VTODO,NONE,VALARM,ZEROPLUS -COUNTER,VTODO,NONE,VTIMEZONE,ZEROORONE -COUNTER,VTODO,NONE,X,ZEROPLUS -COUNTER,VTODO,NONE,VEVENT,ZERO -COUNTER,VTODO,NONE,VFREEBUSY,ZERO -DECLINECOUNTER,VTODO,NONE,NONE,ONE -DECLINECOUNTER,VTODO,ATTENDEE,NONE,ONEPLUS -DECLINECOUNTER,VTODO,DTSTAMP,NONE,ONE -DECLINECOUNTER,VTODO,ORGANIZER,NONE,ONE -DECLINECOUNTER,VTODO,SEQUENCE,NONE,ONE -DECLINECOUNTER,VTODO,UID,NONE,ONE -DECLINECOUNTER,VTODO,ATTACH,NONE,ZEROPLUS -DECLINECOUNTER,VTODO,CATEGORIES,NONE,ZEROORONE -DECLINECOUNTER,VTODO,CLASS,NONE,ZEROORONE -DECLINECOUNTER,VTODO,COMMENT,NONE,ZEROORONE -DECLINECOUNTER,VTODO,CONTACT,NONE,ZEROPLUS -DECLINECOUNTER,VTODO,CREATED,NONE,ZEROORONE -DECLINECOUNTER,VTODO,DESCRIPTION,NONE,ZEROORONE -DECLINECOUNTER,VTODO,DTSTART,NONE,ZEROORONE -DECLINECOUNTER,VTODO,DUE,NONE,ZEROORONE -DECLINECOUNTER,VTODO,DURATION,NONE,ZEROORONE -DECLINECOUNTER,VTODO,EXDATE,NONE,ZEROPLUS -DECLINECOUNTER,VTODO,EXRULE,NONE,ZEROPLUS -DECLINECOUNTER,VTODO,GEO,NONE,ZEROORONE -DECLINECOUNTER,VTODO,LASTMODIFIED,NONE,ZEROORONE -DECLINECOUNTER,VTODO,LOCATION,NONE,ZEROORONE -DECLINECOUNTER,VTODO,PERCENTCOMPLETE,NONE,ZEROORONE -DECLINECOUNTER,VTODO,PRIORITY,NONE,ZEROORONE -DECLINECOUNTER,VTODO,RDATE,NONE,ZEROPLUS -DECLINECOUNTER,VTODO,RECURRENCEID,NONE,ZEROORONE -DECLINECOUNTER,VTODO,RELATEDTO,NONE,ZEROPLUS -DECLINECOUNTER,VTODO,REQUESTSTATUS,NONE,ZEROPLUS -DECLINECOUNTER,VTODO,RESOURCES,NONE,ZEROORONE -DECLINECOUNTER,VTODO,RRULE,NONE,ZEROPLUS -DECLINECOUNTER,VTODO,STATUS,NONE,ZEROORONE -DECLINECOUNTER,VTODO,URL,NONE,ZEROORONE -DECLINECOUNTER,VTODO,X,NONE,ZEROPLUS -DECLINECOUNTER,VTODO,NONE,VTIMEZONE,ZEROPLUS -DECLINECOUNTER,VTODO,NONE,X,ZEROPLUS -DECLINECOUNTER,VTODO,NONE,VALARM,ZERO -DECLINECOUNTER,VTODO,NONE,VEVENT,ZERO -DECLINECOUNTER,VTODO,NONE,VFREEBUSY,ZERO -PUBLISH,VJOURNAL,NONE,NONE,ONEPLUS -PUBLISH,VJOURNAL,DESCRIPTION,NONE,ONE -PUBLISH,VJOURNAL,DTSTAMP,NONE,ONE -PUBLISH,VJOURNAL,DTSTART,NONE,ONE -PUBLISH,VJOURNAL,ORGANIZER,NONE,ONE -PUBLISH,VJOURNAL,UID,NONE,ONE -PUBLISH,VJOURNAL,ATTACH,NONE,ZEROPLUS -PUBLISH,VJOURNAL,CATEGORIES,NONE,ZEROORONE -PUBLISH,VJOURNAL,CLASS,NONE,ZEROORONE -PUBLISH,VJOURNAL,COMMENT,NONE,ZEROORONE -PUBLISH,VJOURNAL,CONTACT,NONE,ZEROPLUS -PUBLISH,VJOURNAL,CREATED,NONE,ZEROORONE -PUBLISH,VJOURNAL,EXDATE,NONE,ZEROPLUS -PUBLISH,VJOURNAL,EXRULE,NONE,ZEROPLUS -PUBLISH,VJOURNAL,LASTMODIFIED,NONE,ZEROORONE -PUBLISH,VJOURNAL,RDATE,NONE,ZEROPLUS -PUBLISH,VJOURNAL,RECURRENCEID,NONE,ZEROORONE -PUBLISH,VJOURNAL,RELATEDTO,NONE,ZEROPLUS -PUBLISH,VJOURNAL,RRULE,NONE,ZEROPLUS -PUBLISH,VJOURNAL,SEQUENCE,NONE,ZEROORONE -PUBLISH,VJOURNAL,STATUS,NONE,ZEROORONE -PUBLISH,VJOURNAL,SUMMARY,NONE,ZEROORONE -PUBLISH,VJOURNAL,URL,NONE,ZEROORONE -PUBLISH,VJOURNAL,X,NONE,ZEROPLUS -PUBLISH,VJOURNAL,ATTENDEE,NONE,ZERO -PUBLISH,VJOURNAL,NONE,VALARM,ZEROPLUS -PUBLISH,VJOURNAL,NONE,VTIMEZONE,ZEROPLUS -PUBLISH,VJOURNAL,NONE,X,ZEROPLUS -PUBLISH,VJOURNAL,NONE,VEVENT,ZERO -PUBLISH,VJOURNAL,NONE,VFREEBUSY,ZERO -PUBLISH,VJOURNAL,NONE,VTODO,ZERO -ADD,VJOURNAL,NONE,NONE,ONE -ADD,VJOURNAL,DESCRIPTION,NONE,ONE -ADD,VJOURNAL,DTSTAMP,NONE,ONE -ADD,VJOURNAL,DTSTART,NONE,ONE -ADD,VJOURNAL,ORGANIZER,NONE,ONE -ADD,VJOURNAL,SEQUENCE,NONE,ONE -ADD,VJOURNAL,UID,NONE,ONE -ADD,VJOURNAL,ATTACH,NONE,ZEROPLUS -ADD,VJOURNAL,CATEGORIES,NONE,ZEROORONE -ADD,VJOURNAL,CLASS,NONE,ZEROORONE -ADD,VJOURNAL,COMMENT,NONE,ZEROORONE -ADD,VJOURNAL,CONTACT,NONE,ZEROPLUS -ADD,VJOURNAL,CREATED,NONE,ZEROORONE -ADD,VJOURNAL,EXDATE,NONE,ZEROPLUS -ADD,VJOURNAL,EXRULE,NONE,ZEROPLUS -ADD,VJOURNAL,LASTMODIFIED,NONE,ZEROORONE -ADD,VJOURNAL,RDATE,NONE,ZEROPLUS -ADD,VJOURNAL,RELATEDTO,NONE,ZEROPLUS -ADD,VJOURNAL,RRULE,NONE,ZEROPLUS -ADD,VJOURNAL,STATUS,NONE,ZEROORONE -ADD,VJOURNAL,SUMMARY,NONE,ZEROORONE -ADD,VJOURNAL,URL,NONE,ZEROORONE -ADD,VJOURNAL,X,NONE,ZEROPLUS -ADD,VJOURNAL,ATTENDEE,NONE,ZERO -ADD,VJOURNAL,RECURRENCEID,NONE,ZERO -ADD,VJOURNAL,NONE,VALARM,ZEROPLUS -ADD,VJOURNAL,NONE,VTIMEZONE,ZEROORONE -ADD,VJOURNAL,NONE,X,ZEROPLUS -ADD,VJOURNAL,NONE,VEVENT,ZERO -ADD,VJOURNAL,NONE,VFREEBUSY,ZERO -ADD,VJOURNAL,NONE,VTODO,ZERO -CANCEL,VJOURNAL,NONE,NONE,ONEPLUS -CANCEL,VJOURNAL,DTSTAMP,NONE,ONE -CANCEL,VJOURNAL,ORGANIZER,NONE,ONE -CANCEL,VJOURNAL,SEQUENCE,NONE,ONE -CANCEL,VJOURNAL,UID,NONE,ONE -CANCEL,VJOURNAL,ATTACH,NONE,ZEROPLUS -CANCEL,VJOURNAL,ATTENDEE,NONE,ZEROPLUS -CANCEL,VJOURNAL,CATEGORIES,NONE,ZEROORONE -CANCEL,VJOURNAL,CLASS,NONE,ZEROORONE -CANCEL,VJOURNAL,COMMENT,NONE,ZEROORONE -CANCEL,VJOURNAL,CONTACT,NONE,ZEROPLUS -CANCEL,VJOURNAL,CREATED,NONE,ZEROORONE -CANCEL,VJOURNAL,DESCRIPTION,NONE,ZEROORONE -CANCEL,VJOURNAL,DTSTART,NONE,ZEROORONE -CANCEL,VJOURNAL,EXDATE,NONE,ZEROPLUS -CANCEL,VJOURNAL,EXRULE,NONE,ZEROPLUS -CANCEL,VJOURNAL,LASTMODIFIED,NONE,ZEROORONE -CANCEL,VJOURNAL,RDATE,NONE,ZEROPLUS -CANCEL,VJOURNAL,RECURRENCEID,NONE,ZEROORONE -CANCEL,VJOURNAL,RELATEDTO,NONE,ZEROPLUS -CANCEL,VJOURNAL,RRULE,NONE,ZEROPLUS -CANCEL,VJOURNAL,STATUS,NONE,ZEROORONE -CANCEL,VJOURNAL,SUMMARY,NONE,ZEROORONE -CANCEL,VJOURNAL,URL,NONE,ZEROORONE -CANCEL,VJOURNAL,X,NONE,ZEROPLUS -CANCEL,VJOURNAL,REQUESTSTATUS,NONE,ZERO -CANCEL,VJOURNAL,NONE,VTIMEZONE,ZEROPLUS -CANCEL,VJOURNAL,NONE,X,ZEROPLUS -CANCEL,VJOURNAL,NONE,VALARM,ZERO -CANCEL,VJOURNAL,NONE,VEVENT,ZERO -CANCEL,VJOURNAL,NONE,VFREEBUSY,ZERO -CANCEL,VJOURNAL,NONE,VTODO,ZERO -NONE,VCALENDAR,ACTION,NONE,ZERO -NONE,VCALENDAR,ATTACH,NONE,ZERO -NONE,VCALENDAR,ATTENDEE,NONE,ZERO -NONE,VCALENDAR,CALSCALE,NONE,ZEROORONE -NONE,VCALENDAR,CATEGORIES,NONE,ZERO -NONE,VCALENDAR,CLASS,NONE,ZERO -NONE,VCALENDAR,COMMENT,NONE,ZERO -NONE,VCALENDAR,COMPLETED,NONE,ZERO -NONE,VCALENDAR,CONTACT,NONE,ZERO -NONE,VCALENDAR,CREATED,NONE,ZERO -NONE,VCALENDAR,DESCRIPTION,NONE,ZERO -NONE,VCALENDAR,DTEND,NONE,ZERO -NONE,VCALENDAR,DTSTAMP,NONE,ZERO -NONE,VCALENDAR,DTSTART,NONE,ZERO -NONE,VCALENDAR,DUE,NONE,ZERO -NONE,VCALENDAR,DURATION,NONE,ZERO -NONE,VCALENDAR,EXDATE,NONE,ZERO -NONE,VCALENDAR,EXRULE,NONE,ZERO -NONE,VCALENDAR,FREEBUSY,NONE,ZERO -NONE,VCALENDAR,GEO,NONE,ZERO -NONE,VCALENDAR,LASTMODIFIED,NONE,ZERO -NONE,VCALENDAR,LOCATION,NONE,ZERO -NONE,VCALENDAR,METHOD,NONE,ZEROORONE -NONE,VCALENDAR,ORGANIZER,NONE,ZERO -NONE,VCALENDAR,PERCENTCOMPLETE,NONE,ZERO -NONE,VCALENDAR,PRIORITY,NONE,ZERO -NONE,VCALENDAR,PRODID,NONE,ONE -NONE,VCALENDAR,RDATE,NONE,ZERO -NONE,VCALENDAR,RECURRENCEID,NONE,ZERO -NONE,VCALENDAR,RELATEDTO,NONE,ZERO -NONE,VCALENDAR,REPEAT,NONE,ZERO -NONE,VCALENDAR,REQUESTSTATUS,NONE,ZERO -NONE,VCALENDAR,RESOURCES,NONE,ZERO -NONE,VCALENDAR,RRULE,NONE,ZERO -NONE,VCALENDAR,SEQUENCE,NONE,ZERO -NONE,VCALENDAR,STATUS,NONE,ZERO -NONE,VCALENDAR,SUMMARY,NONE,ZERO -NONE,VCALENDAR,TRANSP,NONE,ZERO -NONE,VCALENDAR,TRIGGER,NONE,ZERO -NONE,VCALENDAR,TZID,NONE,ZERO -NONE,VCALENDAR,TZNAME,NONE,ZERO -NONE,VCALENDAR,TZOFFSETFROM,NONE,ZERO -NONE,VCALENDAR,TZOFFSETTO,NONE,ZERO -NONE,VCALENDAR,TZURL,NONE,ZERO -NONE,VCALENDAR,UID,NONE,ZERO -NONE,VCALENDAR,URL,NONE,ZERO -NONE,VCALENDAR,VERSION,NONE,ONE -NONE,VCALENDAR,X,NONE,ZEROPLUS -NONE,VEVENT,ACTION,NONE,ZERO -NONE,VEVENT,ATTACH,NONE,ZEROPLUS -NONE,VEVENT,ATTENDEE,NONE,ZEROPLUS -NONE,VEVENT,CALSCALE,NONE,ZERO -NONE,VEVENT,CATEGORIES,NONE,ZEROPLUS -NONE,VEVENT,CLASS,NONE,ZEROORONE -NONE,VEVENT,COMMENT,NONE,ZEROPLUS -NONE,VEVENT,COMPLETED,NONE,ZERO -NONE,VEVENT,CONTACT,NONE,ZEROPLUS -NONE,VEVENT,CREATED,NONE,ZEROORONE -NONE,VEVENT,DESCRIPTION,NONE,ZEROORONE -NONE,VEVENT,DTEND,NONE,ONEEXCLUSIVE, icalrestriction_check_exclusive -NONE,VEVENT,DTSTAMP,NONE,ZEROORONE -NONE,VEVENT,DTSTART,NONE,ZEROORONE -NONE,VEVENT,DUE,NONE,ZERO -NONE,VEVENT,DURATION,NONE,ONEEXCLUSIVE, icalrestriction_check_exclusive -NONE,VEVENT,EXDATE,NONE,ZEROPLUS -NONE,VEVENT,EXRULE,NONE,ZEROPLUS -NONE,VEVENT,FREEBUSY,NONE,ZERO -NONE,VEVENT,GEO,NONE,ZEROORONE -NONE,VEVENT,LASTMODIFIED,NONE,ZEROORONE -NONE,VEVENT,LOCATION,NONE,ZEROORONE -NONE,VEVENT,METHOD,NONE,ZERO -NONE,VEVENT,ORGANIZER,NONE,ZEROORONE -NONE,VEVENT,PERCENTCOMPLETE,NONE,ZERO -NONE,VEVENT,PRIORITY,NONE,ZEROORONE -NONE,VEVENT,PRODID,NONE,ZERO -NONE,VEVENT,RDATE,NONE,ZEROPLUS -NONE,VEVENT,RECURRENCEID,NONE,ZEROORONE -NONE,VEVENT,RELATEDTO,NONE,ZEROPLUS -NONE,VEVENT,REPEAT,NONE,ZERO -NONE,VEVENT,REQUESTSTATUS,NONE,ZEROPLUS -NONE,VEVENT,RESOURCES,NONE,ZEROPLUS -NONE,VEVENT,RRULE,NONE,ZEROPLUS -NONE,VEVENT,SEQUENCE,NONE,ZEROORONE -NONE,VEVENT,STATUS,NONE,ZEROORONE -NONE,VEVENT,SUMMARY,NONE,ZEROORONE -NONE,VEVENT,TRANSP,NONE,ZEROORONE -NONE,VEVENT,TRIGGER,NONE,ZERO -NONE,VEVENT,TZID,NONE,ZERO -NONE,VEVENT,TZNAME,NONE,ZERO -NONE,VEVENT,TZOFFSETFROM,NONE,ZERO -NONE,VEVENT,TZOFFSETTO,NONE,ZERO -NONE,VEVENT,TZURL,NONE,ZERO -NONE,VEVENT,UID,NONE,ZEROORONE -NONE,VEVENT,URL,NONE,ZEROORONE -NONE,VEVENT,VERSION,NONE,ZERO -NONE,VEVENT,X,NONE,ZEROPLUS -NONE,VTODO,ACTION,NONE,ZERO -NONE,VTODO,ATTACH,NONE,ZEROPLUS -NONE,VTODO,ATTENDEE,NONE,ZEROPLUS -NONE,VTODO,CALSCALE,NONE,ZERO -NONE,VTODO,CATEGORIES,NONE,ZEROPLUS -NONE,VTODO,CLASS,NONE,ZEROORONE -NONE,VTODO,COMMENT,NONE,ZEROPLUS -NONE,VTODO,COMPLETED,NONE,ZEROORONE -NONE,VTODO,CONTACT,NONE,ZEROPLUS -NONE,VTODO,CREATED,NONE,ZEROORONE -NONE,VTODO,DESCRIPTION,NONE,ZEROORONE -NONE,VTODO,DTEND,NONE,ZERO -NONE,VTODO,DTSTAMP,NONE,ZEROORONE -NONE,VTODO,DTSTART,NONE,ZEROORONE -NONE,VTODO,DUE,NONE,ONEEXCLUSIVE -NONE,VTODO,DURATION,NONE,ONEEXCLUSIVE -NONE,VTODO,EXDATE,NONE,ZEROPLUS -NONE,VTODO,EXRULE,NONE,ZEROPLUS -NONE,VTODO,FREEBUSY,NONE,ZERO -NONE,VTODO,GEO,NONE,ZEROORONE -NONE,VTODO,LASTMODIFIED,NONE,ZEROORONE -NONE,VTODO,LOCATION,NONE,ZEROORONE -NONE,VTODO,METHOD,NONE,ZERO -NONE,VTODO,ORGANIZER,NONE,ZEROORONE -NONE,VTODO,PERCENTCOMPLETE,NONE,ZEROORONE -NONE,VTODO,PRIORITY,NONE,ZEROORONE -NONE,VTODO,PRODID,NONE,ZERO -NONE,VTODO,RDATE,NONE,ZEROPLUS -NONE,VTODO,RECURRENCEID,NONE,ZEROORONE -NONE,VTODO,RELATEDTO,NONE,ZEROPLUS -NONE,VTODO,REPEAT,NONE,ZERO -NONE,VTODO,REQUESTSTATUS,NONE,ZEROPLUS -NONE,VTODO,RESOURCES,NONE,ZEROPLUS -NONE,VTODO,RRULE,NONE,ZEROPLUS -NONE,VTODO,SEQUENCE,NONE,ZEROORONE -NONE,VTODO,STATUS,NONE,ZEROORONE -NONE,VTODO,SUMMARY,NONE,ZEROORONE -NONE,VTODO,TRANSP,NONE,ZERO -NONE,VTODO,TRIGGER,NONE,ZERO -NONE,VTODO,TZID,NONE,ZERO -NONE,VTODO,TZNAME,NONE,ZERO -NONE,VTODO,TZOFFSETFROM,NONE,ZERO -NONE,VTODO,TZOFFSETTO,NONE,ZERO -NONE,VTODO,TZURL,NONE,ZERO -NONE,VTODO,UID,NONE,ZEROORONE -NONE,VTODO,URL,NONE,ZEROORONE -NONE,VTODO,VERSION,NONE,ZERO -NONE,VTODO,X,NONE,ZEROPLUS -NONE,VJOURNAL,ACTION,NONE,ZERO -NONE,VJOURNAL,ATTACH,NONE,ZEROPLUS -NONE,VJOURNAL,ATTENDEE,NONE,ZEROPLUS -NONE,VJOURNAL,CALSCALE,NONE,ZERO -NONE,VJOURNAL,CATEGORIES,NONE,ZEROPLUS -NONE,VJOURNAL,CLASS,NONE,ZEROORONE -NONE,VJOURNAL,COMMENT,NONE,ZEROPLUS -NONE,VJOURNAL,COMPLETED,NONE,ZERO -NONE,VJOURNAL,CONTACT,NONE,ZEROPLUS -NONE,VJOURNAL,CREATED,NONE,ZEROORONE -NONE,VJOURNAL,DESCRIPTION,NONE,ZEROORONE -NONE,VJOURNAL,DTEND,NONE,ZERO -NONE,VJOURNAL,DTSTAMP,NONE,ZEROORONE -NONE,VJOURNAL,DTSTART,NONE,ZEROORONE -NONE,VJOURNAL,DUE,NONE,ONEEXCLUSIVE -NONE,VJOURNAL,DURATION,NONE,ONEEXCLUSIVE -NONE,VJOURNAL,EXDATE,NONE,ZEROPLUS -NONE,VJOURNAL,EXRULE,NONE,ZEROPLUS -NONE,VJOURNAL,FREEBUSY,NONE,ZERO -NONE,VJOURNAL,GEO,NONE,ZERO -NONE,VJOURNAL,LASTMODIFIED,NONE,ZEROORONE -NONE,VJOURNAL,LOCATION,NONE,ZERO -NONE,VJOURNAL,METHOD,NONE,ZERO -NONE,VJOURNAL,ORGANIZER,NONE,ZEROORONE -NONE,VJOURNAL,PERCENTCOMPLETE,NONE,ZERO -NONE,VJOURNAL,PRIORITY,NONE,ZERO -NONE,VJOURNAL,PRODID,NONE,ZERO -NONE,VJOURNAL,RDATE,NONE,ZEROPLUS -NONE,VJOURNAL,RECURRENCEID,NONE,ZEROORONE -NONE,VJOURNAL,RELATEDTO,NONE,ZEROPLUS -NONE,VJOURNAL,REPEAT,NONE,ZERO -NONE,VJOURNAL,REQUESTSTATUS,NONE,ZEROPLUS -NONE,VJOURNAL,RESOURCES,NONE,ZERO -NONE,VJOURNAL,RRULE,NONE,ZEROPLUS -NONE,VJOURNAL,SEQUENCE,NONE,ZEROORONE -NONE,VJOURNAL,STATUS,NONE,ZEROORONE -NONE,VJOURNAL,SUMMARY,NONE,ZEROORONE -NONE,VJOURNAL,TRANSP,NONE,ZERO -NONE,VJOURNAL,TRIGGER,NONE,ZERO -NONE,VJOURNAL,TZID,NONE,ZERO -NONE,VJOURNAL,TZNAME,NONE,ZERO -NONE,VJOURNAL,TZOFFSETFROM,NONE,ZERO -NONE,VJOURNAL,TZOFFSETTO,NONE,ZERO -NONE,VJOURNAL,TZURL,NONE,ZERO -NONE,VJOURNAL,UID,NONE,ZEROORONE -NONE,VJOURNAL,URL,NONE,ZEROORONE -NONE,VJOURNAL,VERSION,NONE,ZERO -NONE,VJOURNAL,X,NONE,ZEROPLUS -NONE,VFREEBUSY,ACTION,NONE,ZERO -NONE,VFREEBUSY,ATTACH,NONE,ZERO -NONE,VFREEBUSY,ATTENDEE,NONE,ZEROPLUS -NONE,VFREEBUSY,CALSCALE,NONE,ZERO -NONE,VFREEBUSY,CATEGORIES,NONE,ZERO -NONE,VFREEBUSY,CLASS,NONE,ZERO -NONE,VFREEBUSY,COMMENT,NONE,ZEROPLUS -NONE,VFREEBUSY,COMPLETED,NONE,ZERO -NONE,VFREEBUSY,CONTACT,NONE,ZEROORONE -NONE,VFREEBUSY,CREATED,NONE,ZERO -NONE,VFREEBUSY,DESCRIPTION,NONE,ZERO -NONE,VFREEBUSY,DTEND,NONE,ZEROORONE -NONE,VFREEBUSY,DTSTAMP,NONE,ZERO -NONE,VFREEBUSY,DTSTART,NONE,ZEROORONE -NONE,VFREEBUSY,DUE,NONE,ZERO -NONE,VFREEBUSY,DURATION,NONE,ZEROORONE -NONE,VFREEBUSY,EXDATE,NONE,ZERO -NONE,VFREEBUSY,EXRULE,NONE,ZERO -NONE,VFREEBUSY,FREEBUSY,NONE,ZEROPLUS -NONE,VFREEBUSY,GEO,NONE,ZERO -NONE,VFREEBUSY,LASTMODIFIED,NONE,ZERO -NONE,VFREEBUSY,LOCATION,NONE,ZERO -NONE,VFREEBUSY,METHOD,NONE,ZERO -NONE,VFREEBUSY,ORGANIZER,NONE,ZEROORONE -NONE,VFREEBUSY,PERCENTCOMPLETE,NONE,ZERO -NONE,VFREEBUSY,PRIORITY,NONE,ZERO -NONE,VFREEBUSY,PRODID,NONE,ZERO -NONE,VFREEBUSY,RDATE,NONE,ZERO -NONE,VFREEBUSY,RECURRENCEID,NONE,ZERO -NONE,VFREEBUSY,RELATEDTO,NONE,ZERO -NONE,VFREEBUSY,REPEAT,NONE,ZERO -NONE,VFREEBUSY,REQUESTSTATUS,NONE,ZEROPLUS -NONE,VFREEBUSY,RESOURCES,NONE,ZERO -NONE,VFREEBUSY,RRULE,NONE,ZERO -NONE,VFREEBUSY,SEQUENCE,NONE,ZERO -NONE,VFREEBUSY,STATUS,NONE,ZERO -NONE,VFREEBUSY,SUMMARY,NONE,ZERO -NONE,VFREEBUSY,TRANSP,NONE,ZERO -NONE,VFREEBUSY,TRIGGER,NONE,ZERO -NONE,VFREEBUSY,TZID,NONE,ZERO -NONE,VFREEBUSY,TZNAME,NONE,ZERO -NONE,VFREEBUSY,TZOFFSETFROM,NONE,ZERO -NONE,VFREEBUSY,TZOFFSETTO,NONE,ZERO -NONE,VFREEBUSY,TZURL,NONE,ZERO -NONE,VFREEBUSY,UID,NONE,ZEROORONE -NONE,VFREEBUSY,URL,NONE,ZEROORONE -NONE,VFREEBUSY,VERSION,NONE,ZERO -NONE,VFREEBUSY,X,NONE,ZEROPLUS -NONE,VTIMEZONE,ACTION,NONE,ZERO -NONE,VTIMEZONE,ATTACH,NONE,ZERO -NONE,VTIMEZONE,ATTENDEE,NONE,ZERO -NONE,VTIMEZONE,CALSCALE,NONE,ZERO -NONE,VTIMEZONE,CATEGORIES,NONE,ZERO -NONE,VTIMEZONE,CLASS,NONE,ZERO -NONE,VTIMEZONE,COMMENT,NONE,ZERO -NONE,VTIMEZONE,COMPLETED,NONE,ZERO -NONE,VTIMEZONE,CONTACT,NONE,ZERO -NONE,VTIMEZONE,CREATED,NONE,ZERO -NONE,VTIMEZONE,DESCRIPTION,NONE,ZERO -NONE,VTIMEZONE,DTEND,NONE,ZERO -NONE,VTIMEZONE,DTSTAMP,NONE,ZERO -NONE,VTIMEZONE,DTSTART,NONE,ZERO -NONE,VTIMEZONE,DUE,NONE,ZERO -NONE,VTIMEZONE,DURATION,NONE,ZERO -NONE,VTIMEZONE,EXDATE,NONE,ZERO -NONE,VTIMEZONE,EXRULE,NONE,ZERO -NONE,VTIMEZONE,FREEBUSY,NONE,ZERO -NONE,VTIMEZONE,GEO,NONE,ZERO -NONE,VTIMEZONE,LASTMODIFIED,NONE,ZEROORONE -NONE,VTIMEZONE,LOCATION,NONE,ZERO -NONE,VTIMEZONE,METHOD,NONE,ZERO -NONE,VTIMEZONE,ORGANIZER,NONE,ZERO -NONE,VTIMEZONE,PERCENTCOMPLETE,NONE,ZERO -NONE,VTIMEZONE,PRIORITY,NONE,ZERO -NONE,VTIMEZONE,PRODID,NONE,ZERO -NONE,VTIMEZONE,RDATE,NONE,ZERO -NONE,VTIMEZONE,RECURRENCEID,NONE,ZERO -NONE,VTIMEZONE,RELATEDTO,NONE,ZERO -NONE,VTIMEZONE,REPEAT,NONE,ZERO -NONE,VTIMEZONE,REQUESTSTATUS,NONE,ZERO -NONE,VTIMEZONE,RESOURCES,NONE,ZERO -NONE,VTIMEZONE,RRULE,NONE,ZERO -NONE,VTIMEZONE,SEQUENCE,NONE,ZERO -NONE,VTIMEZONE,STATUS,NONE,ZERO -NONE,VTIMEZONE,SUMMARY,NONE,ZERO -NONE,VTIMEZONE,TRANSP,NONE,ZERO -NONE,VTIMEZONE,TRIGGER,NONE,ZERO -NONE,VTIMEZONE,TZID,NONE,ONE -NONE,VTIMEZONE,TZNAME,NONE,ZERO -NONE,VTIMEZONE,TZOFFSETFROM,NONE,ZERO -NONE,VTIMEZONE,TZOFFSETTO,NONE,ZERO -NONE,VTIMEZONE,TZURL,NONE,ZEROPLUS -NONE,VTIMEZONE,UID,NONE,ZERO -NONE,VTIMEZONE,URL,NONE,ZERO -NONE,VTIMEZONE,VERSION,NONE,ZERO -NONE,VTIMEZONE,X,NONE,ZEROORONE -NONE,XSTANDARD,ACTION,NONE,ZERO -NONE,XSTANDARD,ATTACH,NONE,ZERO -NONE,XSTANDARD,ATTENDEE,NONE,ZERO -NONE,XSTANDARD,CALSCALE,NONE,ZERO -NONE,XSTANDARD,CATEGORIES,NONE,ZERO -NONE,XSTANDARD,CLASS,NONE,ZERO -NONE,XSTANDARD,COMMENT,NONE,ZEROPLUS -NONE,XSTANDARD,COMPLETED,NONE,ZERO -NONE,XSTANDARD,CONTACT,NONE,ZERO -NONE,XSTANDARD,CREATED,NONE,ZERO -NONE,XSTANDARD,DESCRIPTION,NONE,ZERO -NONE,XSTANDARD,DTEND,NONE,ZERO -NONE,XSTANDARD,DTSTAMP,NONE,ZERO -NONE,XSTANDARD,DTSTART,NONE,ONE -NONE,XSTANDARD,DUE,NONE,ZERO -NONE,XSTANDARD,DURATION,NONE,ZERO -NONE,XSTANDARD,EXDATE,NONE,ZERO -NONE,XSTANDARD,EXRULE,NONE,ZERO -NONE,XSTANDARD,FREEBUSY,NONE,ZERO -NONE,XSTANDARD,GEO,NONE,ZERO -NONE,XSTANDARD,LASTMODIFIED,NONE,ZERO -NONE,XSTANDARD,LOCATION,NONE,ZERO -NONE,XSTANDARD,METHOD,NONE,ZERO -NONE,XSTANDARD,ORGANIZER,NONE,ZERO -NONE,XSTANDARD,PERCENTCOMPLETE,NONE,ZERO -NONE,XSTANDARD,PRIORITY,NONE,ZERO -NONE,XSTANDARD,PRODID,NONE,ZERO -NONE,XSTANDARD,RDATE,NONE,ZEROPLUS -NONE,XSTANDARD,RECURRENCEID,NONE,ZERO -NONE,XSTANDARD,RELATEDTO,NONE,ZERO -NONE,XSTANDARD,REPEAT,NONE,ZERO -NONE,XSTANDARD,REQUESTSTATUS,NONE,ZERO -NONE,XSTANDARD,RESOURCES,NONE,ZERO -NONE,XSTANDARD,RRULE,NONE,ZEROPLUS -NONE,XSTANDARD,SEQUENCE,NONE,ZERO -NONE,XSTANDARD,STATUS,NONE,ZERO -NONE,XSTANDARD,SUMMARY,NONE,ZERO -NONE,XSTANDARD,TRANSP,NONE,ZERO -NONE,XSTANDARD,TRIGGER,NONE,ZERO -NONE,XSTANDARD,TZID,NONE,ZERO -NONE,XSTANDARD,TZNAME,NONE,ZEROPLUS -NONE,XSTANDARD,TZOFFSETFROM,NONE,ONE -NONE,XSTANDARD,TZOFFSETTO,NONE,ONE -NONE,XSTANDARD,TZURL,NONE,ZERO -NONE,XSTANDARD,UID,NONE,ZERO -NONE,XSTANDARD,URL,NONE,ZERO -NONE,XSTANDARD,VERSION,NONE,ZERO -NONE,XSTANDARD,X,NONE,ZEROPLUS -NONE,XDAYLIGHT,ACTION,NONE,ZERO -NONE,XDAYLIGHT,ATTACH,NONE,ZERO -NONE,XDAYLIGHT,ATTENDEE,NONE,ZERO -NONE,XDAYLIGHT,CALSCALE,NONE,ZERO -NONE,XDAYLIGHT,CATEGORIES,NONE,ZERO -NONE,XDAYLIGHT,CLASS,NONE,ZERO -NONE,XDAYLIGHT,COMMENT,NONE,ZEROPLUS -NONE,XDAYLIGHT,COMPLETED,NONE,ZERO -NONE,XDAYLIGHT,CONTACT,NONE,ZERO -NONE,XDAYLIGHT,CREATED,NONE,ZERO -NONE,XDAYLIGHT,DESCRIPTION,NONE,ZERO -NONE,XDAYLIGHT,DTEND,NONE,ZERO -NONE,XDAYLIGHT,DTSTAMP,NONE,ZERO -NONE,XDAYLIGHT,DTSTART,NONE,ONE -NONE,XDAYLIGHT,DUE,NONE,ZERO -NONE,XDAYLIGHT,DURATION,NONE,ZERO -NONE,XDAYLIGHT,EXDATE,NONE,ZERO -NONE,XDAYLIGHT,EXRULE,NONE,ZERO -NONE,XDAYLIGHT,FREEBUSY,NONE,ZERO -NONE,XDAYLIGHT,GEO,NONE,ZERO -NONE,XDAYLIGHT,LASTMODIFIED,NONE,ZERO -NONE,XDAYLIGHT,LOCATION,NONE,ZERO -NONE,XDAYLIGHT,METHOD,NONE,ZERO -NONE,XDAYLIGHT,ORGANIZER,NONE,ZERO -NONE,XDAYLIGHT,PERCENTCOMPLETE,NONE,ZERO -NONE,XDAYLIGHT,PRIORITY,NONE,ZERO -NONE,XDAYLIGHT,PRODID,NONE,ZERO -NONE,XDAYLIGHT,RDATE,NONE,ZEROPLUS -NONE,XDAYLIGHT,RECURRENCEID,NONE,ZERO -NONE,XDAYLIGHT,RELATEDTO,NONE,ZERO -NONE,XDAYLIGHT,REPEAT,NONE,ZERO -NONE,XDAYLIGHT,REQUESTSTATUS,NONE,ZERO -NONE,XDAYLIGHT,RESOURCES,NONE,ZERO -NONE,XDAYLIGHT,RRULE,NONE,ZEROPLUS -NONE,XDAYLIGHT,SEQUENCE,NONE,ZERO -NONE,XDAYLIGHT,STATUS,NONE,ZERO -NONE,XDAYLIGHT,SUMMARY,NONE,ZERO -NONE,XDAYLIGHT,TRANSP,NONE,ZERO -NONE,XDAYLIGHT,TRIGGER,NONE,ZERO -NONE,XDAYLIGHT,TZID,NONE,ZERO -NONE,XDAYLIGHT,TZNAME,NONE,ZEROPLUS -NONE,XDAYLIGHT,TZOFFSETFROM,NONE,ONE -NONE,XDAYLIGHT,TZOFFSETTO,NONE,ONE -NONE,XDAYLIGHT,TZURL,NONE,ZERO -NONE,XDAYLIGHT,UID,NONE,ZERO -NONE,XDAYLIGHT,URL,NONE,ZERO -NONE,XDAYLIGHT,VERSION,NONE,ZERO -NONE,XDAYLIGHT,X,NONE,ZEROPLUS -NONE,XAUDIOALARM,ACTION,NONE,ONE -NONE,XAUDIOALARM,ATTACH,NONE,ZEROORONE -NONE,XAUDIOALARM,ATTENDEE,NONE,ZERO -NONE,XAUDIOALARM,CALSCALE,NONE,ZERO -NONE,XAUDIOALARM,CATEGORIES,NONE,ZERO -NONE,XAUDIOALARM,CLASS,NONE,ZERO -NONE,XAUDIOALARM,COMMENT,NONE,ZERO -NONE,XAUDIOALARM,COMPLETED,NONE,ZERO -NONE,XAUDIOALARM,CONTACT,NONE,ZERO -NONE,XAUDIOALARM,CREATED,NONE,ZERO -NONE,XAUDIOALARM,DESCRIPTION,NONE,ZERO -NONE,XAUDIOALARM,DTEND,NONE,ZERO -NONE,XAUDIOALARM,DTSTAMP,NONE,ZERO -NONE,XAUDIOALARM,DTSTART,NONE,ZERO -NONE,XAUDIOALARM,DUE,NONE,ZERO -NONE,XAUDIOALARM,DURATION,NONE,ONEMUTUAL,icalrestriction_check_mutual -NONE,XAUDIOALARM,REPEAT,NONE,ONEMUTUAL,icalrestriction_check_mutual -NONE,XAUDIOALARM,EXDATE,NONE,ZERO -NONE,XAUDIOALARM,EXRULE,NONE,ZERO -NONE,XAUDIOALARM,FREEBUSY,NONE,ZERO -NONE,XAUDIOALARM,GEO,NONE,ZERO -NONE,XAUDIOALARM,LASTMODIFIED,NONE,ZERO -NONE,XAUDIOALARM,LOCATION,NONE,ZERO -NONE,XAUDIOALARM,METHOD,NONE,ZERO -NONE,XAUDIOALARM,ORGANIZER,NONE,ZERO -NONE,XAUDIOALARM,PERCENTCOMPLETE,NONE,ZERO -NONE,XAUDIOALARM,PRIORITY,NONE,ZERO -NONE,XAUDIOALARM,PRODID,NONE,ZERO -NONE,XAUDIOALARM,RDATE,NONE,ZERO -NONE,XAUDIOALARM,RECURRENCEID,NONE,ZERO -NONE,XAUDIOALARM,RELATEDTO,NONE,ZERO -NONE,XAUDIOALARM,REQUESTSTATUS,NONE,ZERO -NONE,XAUDIOALARM,RESOURCES,NONE,ZERO -NONE,XAUDIOALARM,RRULE,NONE,ZERO -NONE,XAUDIOALARM,SEQUENCE,NONE,ZERO -NONE,XAUDIOALARM,STATUS,NONE,ZERO -NONE,XAUDIOALARM,SUMMARY,NONE,ZERO -NONE,XAUDIOALARM,TRANSP,NONE,ZERO -NONE,XAUDIOALARM,TRIGGER,NONE,ONE -NONE,XAUDIOALARM,TZID,NONE,ZERO -NONE,XAUDIOALARM,TZNAME,NONE,ZERO -NONE,XAUDIOALARM,TZOFFSETFROM,NONE,ZERO -NONE,XAUDIOALARM,TZOFFSETTO,NONE,ZERO -NONE,XAUDIOALARM,TZURL,NONE,ZERO -NONE,XAUDIOALARM,UID,NONE,ZERO -NONE,XAUDIOALARM,URL,NONE,ZERO -NONE,XAUDIOALARM,VERSION,NONE,ZERO -NONE,XAUDIOALARM,X,NONE,ZEROPLUS -NONE,XDISPLAYALARM,ACTION,NONE,ONE -NONE,XDISPLAYALARM,ATTACH,NONE,ZERO -NONE,XDISPLAYALARM,ATTENDEE,NONE,ZERO -NONE,XDISPLAYALARM,CALSCALE,NONE,ZERO -NONE,XDISPLAYALARM,CATEGORIES,NONE,ZERO -NONE,XDISPLAYALARM,CLASS,NONE,ZERO -NONE,XDISPLAYALARM,COMMENT,NONE,ZERO -NONE,XDISPLAYALARM,COMPLETED,NONE,ZERO -NONE,XDISPLAYALARM,CONTACT,NONE,ZERO -NONE,XDISPLAYALARM,CREATED,NONE,ZERO -NONE,XDISPLAYALARM,DESCRIPTION,NONE,ONE -NONE,XDISPLAYALARM,DTEND,NONE,ZERO -NONE,XDISPLAYALARM,DTSTAMP,NONE,ZERO -NONE,XDISPLAYALARM,DTSTART,NONE,ZERO -NONE,XDISPLAYALARM,DUE,NONE,ZERO -NONE,XDISPLAYALARM,DURATION,NONE,ONEMUTUAL,icalrestriction_check_mutual -NONE,XDISPLAYALARM,REPEAT,NONE,ONEMUTUAL,icalrestriction_check_mutual -NONE,XDISPLAYALARM,EXDATE,NONE,ZERO -NONE,XDISPLAYALARM,EXRULE,NONE,ZERO -NONE,XDISPLAYALARM,FREEBUSY,NONE,ZERO -NONE,XDISPLAYALARM,GEO,NONE,ZERO -NONE,XDISPLAYALARM,LASTMODIFIED,NONE,ZERO -NONE,XDISPLAYALARM,LOCATION,NONE,ZERO -NONE,XDISPLAYALARM,METHOD,NONE,ZERO -NONE,XDISPLAYALARM,ORGANIZER,NONE,ZERO -NONE,XDISPLAYALARM,PERCENTCOMPLETE,NONE,ZERO -NONE,XDISPLAYALARM,PRIORITY,NONE,ZERO -NONE,XDISPLAYALARM,PRODID,NONE,ZERO -NONE,XDISPLAYALARM,RDATE,NONE,ZERO -NONE,XDISPLAYALARM,RECURRENCEID,NONE,ZERO -NONE,XDISPLAYALARM,RELATEDTO,NONE,ZERO -NONE,XDISPLAYALARM,REQUESTSTATUS,NONE,ZERO -NONE,XDISPLAYALARM,RESOURCES,NONE,ZERO -NONE,XDISPLAYALARM,RRULE,NONE,ZERO -NONE,XDISPLAYALARM,SEQUENCE,NONE,ZERO -NONE,XDISPLAYALARM,STATUS,NONE,ZERO -NONE,XDISPLAYALARM,SUMMARY,NONE,ZERO -NONE,XDISPLAYALARM,TRANSP,NONE,ZERO -NONE,XDISPLAYALARM,TRIGGER,NONE,ONE -NONE,XDISPLAYALARM,TZID,NONE,ZERO -NONE,XDISPLAYALARM,TZNAME,NONE,ZERO -NONE,XDISPLAYALARM,TZOFFSETFROM,NONE,ZERO -NONE,XDISPLAYALARM,TZOFFSETTO,NONE,ZERO -NONE,XDISPLAYALARM,TZURL,NONE,ZERO -NONE,XDISPLAYALARM,UID,NONE,ZERO -NONE,XDISPLAYALARM,URL,NONE,ZERO -NONE,XDISPLAYALARM,VERSION,NONE,ZERO -NONE,XDISPLAYALARM,X,NONE,ZEROPLUS -NONE,XEMAILALARM,ACTION,NONE,ONE -NONE,XEMAILALARM,ATTACH,NONE,ZEROPLUS -NONE,XEMAILALARM,ATTENDEE,NONE,ONEPLUS -NONE,XEMAILALARM,CALSCALE,NONE,ZERO -NONE,XEMAILALARM,CATEGORIES,NONE,ZERO -NONE,XEMAILALARM,CLASS,NONE,ZERO -NONE,XEMAILALARM,COMMENT,NONE,ZERO -NONE,XEMAILALARM,COMPLETED,NONE,ZERO -NONE,XEMAILALARM,CONTACT,NONE,ZERO -NONE,XEMAILALARM,CREATED,NONE,ZERO -NONE,XEMAILALARM,DESCRIPTION,NONE,ONE -NONE,XEMAILALARM,DTEND,NONE,ZERO -NONE,XEMAILALARM,DTSTAMP,NONE,ZERO -NONE,XEMAILALARM,DTSTART,NONE,ZERO -NONE,XEMAILALARM,DUE,NONE,ZERO -NONE,XEMAILALARM,DURATION,NONE,ONEMUTUAL,icalrestriction_check_mutual -NONE,XEMAILALARM,REPEAT,NONE,ONEMUTUAL,icalrestriction_check_mutual -NONE,XEMAILALARM,EXDATE,NONE,ZERO -NONE,XEMAILALARM,EXRULE,NONE,ZERO -NONE,XEMAILALARM,FREEBUSY,NONE,ZERO -NONE,XEMAILALARM,GEO,NONE,ZERO -NONE,XEMAILALARM,LASTMODIFIED,NONE,ZERO -NONE,XEMAILALARM,LOCATION,NONE,ZERO -NONE,XEMAILALARM,METHOD,NONE,ZERO -NONE,XEMAILALARM,ORGANIZER,NONE,ZERO -NONE,XEMAILALARM,PERCENTCOMPLETE,NONE,ZERO -NONE,XEMAILALARM,PRIORITY,NONE,ZERO -NONE,XEMAILALARM,PRODID,NONE,ZERO -NONE,XEMAILALARM,RDATE,NONE,ZERO -NONE,XEMAILALARM,RECURRENCEID,NONE,ZERO -NONE,XEMAILALARM,RELATEDTO,NONE,ZERO -NONE,XEMAILALARM,REQUESTSTATUS,NONE,ZERO -NONE,XEMAILALARM,RESOURCES,NONE,ZERO -NONE,XEMAILALARM,RRULE,NONE,ZERO -NONE,XEMAILALARM,SEQUENCE,NONE,ZERO -NONE,XEMAILALARM,STATUS,NONE,ZERO -NONE,XEMAILALARM,SUMMARY,NONE,ONE -NONE,XEMAILALARM,TRANSP,NONE,ZERO -NONE,XEMAILALARM,TRIGGER,NONE,ONE -NONE,XEMAILALARM,TZID,NONE,ZERO -NONE,XEMAILALARM,TZNAME,NONE,ZERO -NONE,XEMAILALARM,TZOFFSETFROM,NONE,ZERO -NONE,XEMAILALARM,TZOFFSETTO,NONE,ZERO -NONE,XEMAILALARM,TZURL,NONE,ZERO -NONE,XEMAILALARM,UID,NONE,ZERO -NONE,XEMAILALARM,URL,NONE,ZERO -NONE,XEMAILALARM,VERSION,NONE,ZERO -NONE,XEMAILALARM,X,NONE,ZEROPLUS -NONE,XPROCEDUREALARM,ACTION,NONE,ONE -NONE,XPROCEDUREALARM,ATTACH,NONE,ZEROORONE -NONE,XPROCEDUREALARM,ATTENDEE,NONE,ZERO -NONE,XPROCEDUREALARM,CALSCALE,NONE,ZERO -NONE,XPROCEDUREALARM,CATEGORIES,NONE,ZERO -NONE,XPROCEDUREALARM,CLASS,NONE,ZERO -NONE,XPROCEDUREALARM,COMMENT,NONE,ZERO -NONE,XPROCEDUREALARM,COMPLETED,NONE,ZERO -NONE,XPROCEDUREALARM,CONTACT,NONE,ZERO -NONE,XPROCEDUREALARM,CREATED,NONE,ZERO -NONE,XPROCEDUREALARM,DESCRIPTION,NONE,ZEROORONE -NONE,XPROCEDUREALARM,DTEND,NONE,ZERO -NONE,XPROCEDUREALARM,DTSTAMP,NONE,ZERO -NONE,XPROCEDUREALARM,DTSTART,NONE,ZERO -NONE,XPROCEDUREALARM,DUE,NONE,ZERO -NONE,XPROCEDUREALARM,DURATION,NONE,ONEMUTUAL,icalrestriction_check_mutual -NONE,XPROCEDUREALARM,REPEAT,NONE,ONEMUTUAL,icalrestriction_check_mutual -NONE,XPROCEDUREALARM,EXDATE,NONE,ZERO -NONE,XPROCEDUREALARM,EXRULE,NONE,ZERO -NONE,XPROCEDUREALARM,FREEBUSY,NONE,ZERO -NONE,XPROCEDUREALARM,GEO,NONE,ZERO -NONE,XPROCEDUREALARM,LASTMODIFIED,NONE,ZERO -NONE,XPROCEDUREALARM,LOCATION,NONE,ZERO -NONE,XPROCEDUREALARM,METHOD,NONE,ZERO -NONE,XPROCEDUREALARM,ORGANIZER,NONE,ZERO -NONE,XPROCEDUREALARM,PERCENTCOMPLETE,NONE,ZERO -NONE,XPROCEDUREALARM,PRIORITY,NONE,ZERO -NONE,XPROCEDUREALARM,PRODID,NONE,ZERO -NONE,XPROCEDUREALARM,RDATE,NONE,ZERO -NONE,XPROCEDUREALARM,RECURRENCEID,NONE,ZERO -NONE,XPROCEDUREALARM,RELATEDTO,NONE,ZERO -NONE,XPROCEDUREALARM,REQUESTSTATUS,NONE,ZERO -NONE,XPROCEDUREALARM,RESOURCES,NONE,ZERO -NONE,XPROCEDUREALARM,RRULE,NONE,ZERO -NONE,XPROCEDUREALARM,SEQUENCE,NONE,ZERO -NONE,XPROCEDUREALARM,STATUS,NONE,ZERO -NONE,XPROCEDUREALARM,SUMMARY,NONE,ZERO -NONE,XPROCEDUREALARM,TRANSP,NONE,ZERO -NONE,XPROCEDUREALARM,TRIGGER,NONE,ONE -NONE,XPROCEDUREALARM,TZID,NONE,ZERO -NONE,XPROCEDUREALARM,TZNAME,NONE,ZERO -NONE,XPROCEDUREALARM,TZOFFSETFROM,NONE,ZERO -NONE,XPROCEDUREALARM,TZOFFSETTO,NONE,ZERO -NONE,XPROCEDUREALARM,TZURL,NONE,ZERO -NONE,XPROCEDUREALARM,UID,NONE,ZERO -NONE,XPROCEDUREALARM,URL,NONE,ZERO -NONE,XPROCEDUREALARM,VERSION,NONE,ZERO -NONE,XPROCEDUREALARM,X,NONE,ZEROPLUS diff --git a/libical/design-data/status-new.txt b/libical/design-data/status-new.txt deleted file mode 100644 index 9e7bbf83a7..0000000000 --- a/libical/design-data/status-new.txt +++ /dev/null @@ -1,56 +0,0 @@ -2.0 STATOK Operation was successfully performed. -2.0.1 STARTSENDATA Start ICAL input; end with . -2.0.11 OKDATAFOLLOWS The request was processed successfully. Reply data follows on the next line and terminates with . -2.0.2 REPLYPENDING A timeout has occurred. The server is still working on the reply. Use CONTINUE to continue waiting for the reply or ABORT to terminate the command. -2.0.3 ABORTED The command currently underway was successsfully aborted. -2.0.4 WILLATTEMPT The specified Calendar is not here but an attempt will be made to deliver the request or reply to the Calendar anyway. -2.0.5 TRUSTEDWILLQUEUE The request or reply will be queued and delivered to the target calendar when its iRIP server contacts this server and issues the SWITCH command. -2.0.6 WILLATTEMPT The specified Calendar is not here but an attempt will be made to deliver the request or reply to the Calendar anyway. -2.0.7 QUEUED The message has been queued for delivery. -2.0.8 QUEUEEMPTY There are no more queued messages. -2.1 FALLBACK Success. Fallback taken on one or more property values. -2.2 NOCOMMANDINPROGRESS An ABORT or CONTINUE was received when no command was in progress -2.2 IGPROP Success. Invalid property ignored. -2.3 IGPARAM Success. invalid property parameter ignored. -2.4 IGXPROP Success. Unknown non-standard property ignored. -2.5 IGXPARAM Success. Unknown non standard property value ignored. -2.6 IGCOMP Success. Invalid calendar component ignored. -2.7 FORWARD Success. Request forwarded to Calendar User. -2.8 ONEEVENT Success. Repeating event ignored. Scheduled as a single component. -2.9 TRUNC Success. Truncated end date time to date boundary. -2.10 ONETODO Success. Repeating VTODO ignored. Scheduled as a single VTODO. -2.11 TRUNCRRULE Success. Unbounded RRULE clipped at some finite number of instances -3.0 INVPROPNAME Invalid property name. -3.1 INVPROPVAL Invalid property value. -3.2 INVPARAM Invalid property parameter. -3.3 INVPARAMVAL Invalid property parameter value. -3.4 INVCOMP Invalid calendar component sequence. -3.5 INVTIME Invalid date or time. -3.6 INVRULE Invalid rule. -3.7 INVCU Invalid Calendar User. -3.8 NOAUTH No authority. -3.9 BADVERSION Unsupported version. -3.10 TOOBIG Request entity too large. -3.11 MISSREQCOMP Required component or property missing. -3.12 UNKCOMP Unknown component or property found. -3.13 BADCOMP Unsupported component or property found -3.14 NOCAP Unsupported capability. -4.0 BUSY Event conflict. Date/time is busy. -5.0 MAYBE Request MAY supported. -5.1 UNAVAIL Service unavailable. -5.2 NOSERVICE Invalid calendar service. -5.3 NOSCHED No scheduling support for user. -6.1 AUTHENTICATEFAILURE Unsupported authentication mechanism, credentials rejected -6.2 AUTHENTICATIONABORTED Sender aborted authentication, authentication exchange cancelled -8.0 GENERALFAILURE A failure has occurred in the Receiver that prevents the operation from succeeding. -8.1 SERVERTOOBUSY The iRIP Receiver is too busy. -8.2 ICALOBJECTTOOBIG Object has exceeded the server's size limit. -8.3 DATETOOLARGE A DATETIME value was too far in the future to be represented on this Calendar. -8.4 DATETOOSMALL A DATETIME value was too far in the past to be represented on this Calendar. -9.0 INVALIDIRIPCOMMAND An unrecongnized command was received. -9.1 UNEXPECTEDCOMMAND The command is not allowed for the server's current state. -10.1 REFERRAL Accompanied by an alternate address. -10.2 SERVERSHUTDOWN The server is shutting down. -10.3 SERVERSTOPPING FLOOD 2 -10.4 EXCEEDEDQUOTAS The operation would cause a resource to exceed the allocated quota -10.5 QUEUEDTOOLONG The ITIP message has been queued too long. Delivery has been aborted. diff --git a/libical/design-data/status.foo b/libical/design-data/status.foo deleted file mode 100644 index a2591bd26a..0000000000 --- a/libical/design-data/status.foo +++ /dev/null @@ -1,104 +0,0 @@ -2.0 STATOK Operation was successfully performed. - -2.0.1 START-SENDATA Start ICAL input; end with - . - -2.0.11 OK-DATAFOLLOWS The request was processed - successfully. Reply data follows on - the next line and terminates with - . - -2.0.2 REPLY-PENDING A timeout has occurred. The server is - still working on the reply. Use - CONTINUE to continue waiting for the - reply or ABORT to terminate the - command. - -2.0.3 ABORTED In response to the client issuing an - ABORT command, this reply code - indicates that any command currently - underway was successsfully aborted. - -2.0.4 WILL-ATTEMPT The specified Calendar is not here - but an attempt will be made to deliver - the request or reply to the Calendar - anyway. There is a trust relationship - between this iRIP server and the - iRIP server for the target calendar. - -2.0.5 TRUSTED-WILL-QUEUE The specified Calendar cannot be - contacted directly and a trust - relationship exists between this - server and the server on which the - Calendar exists. The request or reply - will be queued and delivered to the - target calendar when its iRIP server - contacts this server and issues the - SWITCH command. - -2.0.6 WILL-ATTEMPT The specified Calendar is not here - but an attempt will be made to deliver - the request or reply to the Calendar - anyway. There is not a trust - relationship between the iRIP server - and the iRIP server for the target - calendar. - -2.0.7 QUEUED The message has been queued for - delivery. - -2.0.8 QUEUE-EMPTY There are no more queued messages. - -2.2 NO COMMAND IN PROGRESS An ABORT or CONTINUE was received when - no command was in progress - -6.1 AUTHENTICATE FAILURE Unsupported authentication mechanism, - credentials rejected - -6.2 AUTHENTICATION ABORTED Sender aborted authentication, - authentication exchange cancelled - -8.0 GENERAL FAILURE A failure has occurred in the Receiver - that prevents the operation from - succeeding. - -8.1 SERVER TOO BUSY Sent when a session cannot be - established because the iRIP - Receiver is too busy. - -8.2 ICAL OBJECT TOO BIG Used to signal that an ICAL object has - exceeded the server's size limit. - -8.3 DATE TOO LARGE A DATETIME value was too far in the - future to be represented on this - Calendar. - -8.4 DATE TOO SMALL A DATETIME value was too far in the - past to be represented on this - Calendar. - -9.0 INVALID iRIP COMMAND An unrecongnized command was received. - -9.1 UNEXPECTED COMMAND A command was issued in a manner - inconsistent with the state diagram. - For example, issuing the SENDATA - command without having specified any - RECIPIENTs will cause this error. -10.1 REFERRAL Accompanied by an alternate address. - The RECIPIENT specified should be - contacted at the given alternate - address. The referral address MUST - follow the reply code. - -10.2 SERVER SHUT DOWN The server is shutting down. - -10.3 SERVER STOPPING FLOOD 2 - - -10.4 EXCEEDED QUOTAS The operation has not be performed - because it would cause the resources - (memory, disk, CPU, etc) to exceed the - allocated quota - -10.5 QUEUED TOO LONG The ITIP message has been queued too - long. Delivery has been aborted. \ No newline at end of file diff --git a/libical/design-data/status.txt b/libical/design-data/status.txt deleted file mode 100644 index 9e7bbf83a7..0000000000 --- a/libical/design-data/status.txt +++ /dev/null @@ -1,56 +0,0 @@ -2.0 STATOK Operation was successfully performed. -2.0.1 STARTSENDATA Start ICAL input; end with . -2.0.11 OKDATAFOLLOWS The request was processed successfully. Reply data follows on the next line and terminates with . -2.0.2 REPLYPENDING A timeout has occurred. The server is still working on the reply. Use CONTINUE to continue waiting for the reply or ABORT to terminate the command. -2.0.3 ABORTED The command currently underway was successsfully aborted. -2.0.4 WILLATTEMPT The specified Calendar is not here but an attempt will be made to deliver the request or reply to the Calendar anyway. -2.0.5 TRUSTEDWILLQUEUE The request or reply will be queued and delivered to the target calendar when its iRIP server contacts this server and issues the SWITCH command. -2.0.6 WILLATTEMPT The specified Calendar is not here but an attempt will be made to deliver the request or reply to the Calendar anyway. -2.0.7 QUEUED The message has been queued for delivery. -2.0.8 QUEUEEMPTY There are no more queued messages. -2.1 FALLBACK Success. Fallback taken on one or more property values. -2.2 NOCOMMANDINPROGRESS An ABORT or CONTINUE was received when no command was in progress -2.2 IGPROP Success. Invalid property ignored. -2.3 IGPARAM Success. invalid property parameter ignored. -2.4 IGXPROP Success. Unknown non-standard property ignored. -2.5 IGXPARAM Success. Unknown non standard property value ignored. -2.6 IGCOMP Success. Invalid calendar component ignored. -2.7 FORWARD Success. Request forwarded to Calendar User. -2.8 ONEEVENT Success. Repeating event ignored. Scheduled as a single component. -2.9 TRUNC Success. Truncated end date time to date boundary. -2.10 ONETODO Success. Repeating VTODO ignored. Scheduled as a single VTODO. -2.11 TRUNCRRULE Success. Unbounded RRULE clipped at some finite number of instances -3.0 INVPROPNAME Invalid property name. -3.1 INVPROPVAL Invalid property value. -3.2 INVPARAM Invalid property parameter. -3.3 INVPARAMVAL Invalid property parameter value. -3.4 INVCOMP Invalid calendar component sequence. -3.5 INVTIME Invalid date or time. -3.6 INVRULE Invalid rule. -3.7 INVCU Invalid Calendar User. -3.8 NOAUTH No authority. -3.9 BADVERSION Unsupported version. -3.10 TOOBIG Request entity too large. -3.11 MISSREQCOMP Required component or property missing. -3.12 UNKCOMP Unknown component or property found. -3.13 BADCOMP Unsupported component or property found -3.14 NOCAP Unsupported capability. -4.0 BUSY Event conflict. Date/time is busy. -5.0 MAYBE Request MAY supported. -5.1 UNAVAIL Service unavailable. -5.2 NOSERVICE Invalid calendar service. -5.3 NOSCHED No scheduling support for user. -6.1 AUTHENTICATEFAILURE Unsupported authentication mechanism, credentials rejected -6.2 AUTHENTICATIONABORTED Sender aborted authentication, authentication exchange cancelled -8.0 GENERALFAILURE A failure has occurred in the Receiver that prevents the operation from succeeding. -8.1 SERVERTOOBUSY The iRIP Receiver is too busy. -8.2 ICALOBJECTTOOBIG Object has exceeded the server's size limit. -8.3 DATETOOLARGE A DATETIME value was too far in the future to be represented on this Calendar. -8.4 DATETOOSMALL A DATETIME value was too far in the past to be represented on this Calendar. -9.0 INVALIDIRIPCOMMAND An unrecongnized command was received. -9.1 UNEXPECTEDCOMMAND The command is not allowed for the server's current state. -10.1 REFERRAL Accompanied by an alternate address. -10.2 SERVERSHUTDOWN The server is shutting down. -10.3 SERVERSTOPPING FLOOD 2 -10.4 EXCEEDEDQUOTAS The operation would cause a resource to exceed the allocated quota -10.5 QUEUEDTOOLONG The ITIP message has been queued too long. Delivery has been aborted. diff --git a/libical/design-data/value-c-types.txt b/libical/design-data/value-c-types.txt deleted file mode 100644 index c7dd26034f..0000000000 --- a/libical/design-data/value-c-types.txt +++ /dev/null @@ -1,22 +0,0 @@ -ATTACH struct icalattachtype # Non-std -BINARY char* -BOOLEAN int -CAL-ADDRESS char* -DATE struct icaltimetype -DATE-TIME struct icaltimetype -DATE-TIME-DATE struct icaltimetype # Non-std -DATE-TIME-PERIOD struct icalperiodtype # Non-std -DURATION struct icaldurationtype -FLOAT float -GEO struct icalgeotype # Non-std -INTEGER int -METHOD icalproperty_method # Non-std -PERIOD struct icalperiodtype -RECUR struct icalrecurrencetype -STRING char* # Non-std -TEXT char* -TIME struct icaltimetype -TRIGGER union icaltriggertype # Non-std -URI char* -UTC-OFFSET int -QUERY char* diff --git a/libical/design-data/value-mem-semantics.txt b/libical/design-data/value-mem-semantics.txt deleted file mode 100644 index 5948e244f6..0000000000 --- a/libical/design-data/value-mem-semantics.txt +++ /dev/null @@ -1,19 +0,0 @@ -ATTACH struct icalattachtype -BINARY char* -BOOLEAN int -CAL-ADDRESS char* -DATE time_t -DATE-TIME time_t -DATE-TIME-DATE time_t -DATE-TIME-PERIOD struct icalperiodtype -DURATION struct icaldurationtype -FLOAT float -GEO struct icalgeotype -INTEGER int -PERIOD struct icalperiodtype -RECUR struct icalrecurrencetype -TEXT char* -TIME time_t -TRIGGER struct icaltriggertimetype -URI char* -UTC-OFFSET int diff --git a/libical/doc/.cvsignore b/libical/doc/.cvsignore deleted file mode 100644 index 3dda72986f..0000000000 --- a/libical/doc/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile.in -Makefile diff --git a/libical/doc/Makefile.am b/libical/doc/Makefile.am deleted file mode 100644 index 0df4f3f42d..0000000000 --- a/libical/doc/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -EXTRA_DIST = UsingLibical.lyx UsingLibical.ps diff --git a/libical/doc/UsingLibical.lyx b/libical/doc/UsingLibical.lyx deleted file mode 100644 index afc5b0608d..0000000000 --- a/libical/doc/UsingLibical.lyx +++ /dev/null @@ -1,2256 +0,0 @@ -#This file was created by Sat Feb 19 10:33:21 2000 -#LyX 1.0 (C) 1995-1999 Matthias Ettrich and the LyX Team -\lyxformat 2.15 -\textclass linuxdoc -\language default -\inputencoding default -\fontscheme default -\graphics default -\paperfontsize default -\spacing single -\papersize Default -\paperpackage a4 -\use_geometry 0 -\use_amsmath 0 -\paperorientation portrait -\secnumdepth 3 -\tocdepth 3 -\paragraph_separation indent -\defskip medskip -\quotes_language english -\quotes_times 2 -\papercolumns 1 -\papersides 1 -\paperpagestyle default - -\layout Title - -Using Libical -\layout Author - -Eric Busboom (eric@softwarestudio.org) -\layout Date - -January 2000 -\layout Section - -Introduction -\layout Standard - -Libical is an Open Source implementation of the iCalendar protocols and - protocol data units. - The iCalendar specification describes how calendar clients can communicate - with calendar servers for users can store their calendar data and arrange - meetings with other users. - -\layout Standard - -Libical implements the following specifications and protocols -\layout Standard -\added_space_top 0.3cm \added_space_bottom 0.3cm \LyXTable -multicol5 -5 2 0 0 -1 -1 -1 -1 -1 0 0 0 -1 0 0 0 -1 0 0 0 -1 0 0 0 -1 1 0 0 -8 1 0 "" "" -8 1 1 "" "" -0 8 1 0 0 0 0 "" "" -0 8 1 0 0 0 0 "" "" -0 8 1 0 0 0 0 "" "" -0 8 1 0 0 0 0 "" "" -0 8 1 0 0 0 0 "" "" -0 8 1 0 0 0 0 "" "" -0 8 1 0 0 0 0 "" "" -0 8 1 0 0 0 0 "" "" -0 8 1 0 0 0 0 "" "" -0 8 1 0 0 0 0 "" "" - -iCal Core -\newline -2445 -\newline -iTIP -\newline -2446 -\newline -iMIP -\newline -2447 -\newline -iRIP -\newline -draft -\newline -CAP -\newline -draft -\layout Standard - -(The current version, 0.15, does not implement iRip or CAP. - ) -\layout Standard - -This documentation assumes that you are familiar with the iCalendar standards - RFC2445 and RFC2446. - these specifications are online on the CALSCH webpage at: -\layout Verbatim - -http://www.imc.org/ietf-calendar/ -\layout Subsection - -The libical project -\layout Standard - -This code is under active development. - If you would like to contribute to the project, you can contact me, Eric - Busboom, at eric@softwarestudio.org. - The project has a webpage at -\layout Verbatim - -http://softwarestudio.org/libical/index.html -\layout Standard - -and a mailing list that you can join by sending the following mail: -\layout Verbatim - -To: minimalist@softwarestudio.org -\layout Verbatim - -Subject: subscribe libical -\layout Subsection - -License -\layout Standard - -The code and datafiles in this distribution are licensed under the Mozilla - Public License. - See http://www.mozilla.org/NPL/MPL-1.0.html for a copy of the license. - Alternately, you may use libical under the terms of the GNU Library General - Public License. - See http://www.fsf.org/copyleft/lesser.html for a copy of the LGPL. -\layout Standard - -This dual license ensures that the library can be incorporated into both - proprietary code and GPL'd programs, and will benefit from improvements - made by programmers in both realms. - I will only accept changes into my version of the library if they are similarly - dual-licensed. -\layout Subsection - -Purpose & Goals -\layout Subsection - -Document version -\layout Verbatim - -$Id: UsingLibical.lyx,v 1.4 2000/05/15 06:18:16 ericb Exp $ -\layout Section - -Building the Library -\layout Standard - -Libical uses autoconf to generate makefiles, although it uses none of the - autoconf flags to influence the compilation. - It should built with no adjustments on Linux, FreeBSD and Solaris. - -\layout Section - -Structure -\layout Standard - -The iCal calendar model is based on four types of objects: components, propertie -s, values and parameters. - -\layout Standard - -Properties are the fundamental unit of information in iCal, and they work - a bit like a hash entry, with a constant key and a variable value. - Properties may also have modifiers, called parameters. - In the iCal content line -\layout Verbatim - -ORGANIZER;ROLE=CHAIR:MAILTO:mrbig@host.com -\layout Standard - -The property name is -\begin_inset Quotes eld -\end_inset - -ORGANIZER, -\begin_inset Quotes erd -\end_inset - - the value of the property is -\begin_inset Quotes eld -\end_inset - -mrbig@host.com -\begin_inset Quotes erd -\end_inset - - and the -\begin_inset Quotes eld -\end_inset - -ROLE -\begin_inset Quotes erd -\end_inset - - parameter specifies that Mr Big is the chair of the meetings associated - with this property. - -\layout Standard - -Components are groups of properties that represent the core objects of a - calendar system, such as events or timezones. - -\layout Standard - -The central goal of libical is to parse iTIP data into an internal representatio -n of Components, Properties, Parameters an Values, and to allow the user - to manipulate the data in various ways -\layout Standard -\added_space_bottom 0.3cm -\begin_float fig -\layout Standard - - -\begin_inset Figure size 180 147 -file icaluml.eps -flags 13 - -\end_inset - - -\end_float -When a component is send across a network, if it is un-encrypted, it will - look something like: -\layout Code - -BEGIN:VEVENT -\layout Code - -DTSTAMP:19980309T231000Z -\layout Code - -UID:guid-1.host1.com -\layout Code - -ORGANIZER;ROLE=CHAIR:MAILTO:mrbig@host.com -\layout Code - -ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=GROUP: -\layout Code - - -\protected_separator - MAILTO:employee-A@host.com -\layout Code - -DESCRIPTION:Project XYZ Review Meeting -\layout Code - -CATEGORIES:MEETING -\layout Code - -CLASS:PUBLIC -\layout Code - -CREATED:19980309T130000Z -\layout Code - -SUMMARY:XYZ Project Review -\layout Code - -DTSTART;TZID=US-Eastern:19980312T083000 -\layout Code - -DTEND;TZID=US-Eastern:19980312T093000 -\layout Code - -LOCATION:1CP Conference Room 4350 -\layout Code - -END:VEVENT -\layout Subsection - -Core iCal classes -\layout Subsubsection - -Components -\layout Subsubsection - -Properties -\layout Subsubsection - -Values -\layout Subsubsection - -Parameters -\layout Subsection - -Other elements of libical -\layout Standard - -In addition to the core iCal classes, libical has many other types, structures, - classes that aid in creating and using iCal components. - -\layout Subsubsection - -Enumerations -\layout Subsubsection - -Types -\layout Subsubsection - -The Parser -\layout Subsubsection - -Restrictions -\layout Subsubsection - -Error objects -\layout Subsubsection - -Memory Management -\layout Subsubsection - -Storage classes -\layout Section - -Differences From RFCs -\layout Standard - -Libical has been designed to follow the standards as closely as possible, - so that the key objects in the standards are also keey objects in the library. - However, there are a few areas where the specifications are (arguably) - irregular, and following them exactly would result in an unfriendly interface. - These deviations make libical easier to use by maintaining a self-similar - interface. - -\layout Subsection - -Pseudo Components -\layout Standard - -Libical defines components for groups of properties that look and act like - components, but are not defined as components in the specification. - XDAYLIGHT and XSTANDARD are notable examples. - These pseudo components group properties within the VTIMEZONE components. - For instanace, the timezone properties associated with daylight savings - time starts with -\begin_inset Quotes eld -\end_inset - -BEGIN:DAYLIGHT -\begin_inset Quotes erd -\end_inset - - and ends with -\begin_inset Quotes eld -\end_inset - -END:DAYLIGHT, just like other components, but is not defined as a component - in RFC2445. - ( See RFC2445, page 61 ) In Libical,this grouping is represented by the - XDAYLIGHT component. - Standard iCAL components all start with the letter -\begin_inset Quotes eld -\end_inset - -V, -\begin_inset Quotes erd -\end_inset - - while pseudo components start with -\begin_inset Quotes erd -\end_inset - -X. -\begin_inset Quotes erd -\end_inset - - -\layout Standard - -There are also pseudo components that are conceptually derived classess - of VALARM. - RFC2446 defines what properties may be included in each component, and - for VALARM, the set of properties it may have depends on the value of the - ACTION property. - -\layout Standard - -For instance, if a VALARM component has an ACTION property with the value - of -\begin_inset Quotes eld -\end_inset - -AUDIO, -\begin_inset Quotes erd -\end_inset - - the component must also have an -\begin_inset Quotes eld -\end_inset - -ATTACH -\begin_inset Quotes erd -\end_inset - - property. - However, if the ACTION value is -\begin_inset Quotes eld -\end_inset - -DISPLAY, -\begin_inset Quotes erd -\end_inset - - the component must have a DESCRIPTION property. - -\layout Standard - -To handle these various, complex restrictions, libical has pseudo components - for each type of alarm: XAUDIOALARM, XDISPLAYALARM, XEMAILALARM and XPROCEDUREA -LARM. - -\layout Subsection - -Combined Values -\layout Standard - -Many values can take more than one type. - TRIGGER, for instance, can have a value type of with DURATION or of DATE-TIME. - These multiple types make it difficult to create routines to return the - value associated with a property. - -\layout Standard - -It is natural to have interfaces that would return the value of a property, - but it is cumbersone for a single routine to return multiple types. - So, in libical, properties that can have multiple types are given a single - type that is the union of their RFC2445 types. - For instance, in libical, the value of the TRIGGER property resolves to - -\noun on -struct icaltriggertype -\noun default -. - This type is a union of a DURATION and a DATE-TIME. - -\layout Subsection - -Multi-Valued Properties -\layout Standard - -Some properties, such as CATEGORIES have only one value type, but each CATEGORIE -S property can have multiple value instances. - This also results in a cumbersome interface -- CATEGORIES accessors would - have to return a list while all other accessors returned a single value. - In libical, all properties have a single value, and multi-valued properties - are broken down into multiple single valued properties during parsing. - That is, an input line like, -\layout Verbatim - -CATEGORIES: work, home -\layout Standard - -becomes in libical's internal representation -\layout Verbatim - -CATEGORIES: work -\layout Verbatim - -CATEGORIES: home -\layout Standard - -Oddly, RFC2445 allows some multi-valued properties ( like FREEBUSY ) to - exist as both a multi-values property and as multiple single value properties, - while others ( like CATEGORIES ) can only exist as single multi-valued - properties. - This makes the internal representation for CATEGORIES illegal. - However when you convert a component to a string, the library will collect - all of the CATEGORIES properties into one. - -\layout Section - -Implementation Limitations -\layout Section - -Using libical -\layout Subsection - -Creating Components -\layout Standard - -There are three ways to create components in Libical: creating individual - objects and assembling them, building entire objects in massive vaargs - calls, and parsing a text file containing iCalendar data. - -\layout Subsubsection - -Constructor Interfaces -\layout Standard - -Using constructor interfaces, you create each of the objects seperately - and them assemble them in to components: -\layout Code - -icalcomponent *event; -\layout Code - -icalproperty *prop; -\layout Code - -icalparameter *param; -\layout Code - -struct icaltimetype atime; -\layout Code - -event = icalcomponent_new(ICAL_VEVENT_COMPONENT); -\layout Code - -prop = icalproperty_new_dtstamp(atime) ; -\layout Code - -icalcomponent_add_property(event, prop); -\layout Code - -prop = icalproperty_new_uid(strdup("guid-1.host1.com")) ); -\layout Code - -icalcomponent_add_property(event,prop); -\layout Code - -prop=icalproperty_new_organizer(strdup("mrbig@host.com")); -\layout Code - -param = icalparameter_new_role(ICAL_ROLE_CHAIR) -\layout Code - -icalproperty_add_parameter(prop, param); -\layout Code - -icalcomponent_add_property(event,prop); -\layout Standard - -While we are on this example, you should notice that libical uses a semi-object- -oriented style of interface. - Most things you work with are objects, that are instantiated with a constructor - that has -\begin_inset Quotes eld -\end_inset - -new -\begin_inset Quotes erd -\end_inset - - in the name. - Also note that, other than the object reference, most structure data is - passed in to libical routines by value. - Strings, of course, are passed in by reference, but libical will take ownership - of the memory, so you had beter strdup() the data unless you want a core - dump when the memory is freed for the second time. - Libical has some complex bu very regular memory handling rules. - These are detailed in section -\begin_inset LatexCommand \ref{sec:memory} - -\end_inset - -. -\layout Standard - -If any of the constructors fail, they will return 0. - If you try to insert 0 into a property or component, or use a zero-valued - object reference, libical will either silently ignore the error or will - abort with an error message. - This behavior is controlled by a compile time flag (ICAL_ERRORS_ARE_FATAL), - and will abort by default. - -\layout Subsubsection - -vaargs Constructors -\layout Standard - -There is another way to create complex components, which is arguable more - elegant, if you are not horrified by vaargs. - The vaargs constructor interface all you to create intricate components - in a single block of text. - -\layout Code - - -\protected_separator - -\protected_separator - -\protected_separator - calendar = -\layout Code - - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator -icalcomponent_vanew( -\layout Code - - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - ICAL_VCALENDAR_COMPONENT, -\layout Code - - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - icalproperty_new_version(strdup("2.0")), -\layout Code - - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - icalproperty_new_prodid(strdup("-//RDU Software//NONSGML HandCal//EN")), -\layout Code - - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - icalcomponent_vanew( -\layout Code - - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator -ICAL_VEVENT_COMPONENT, -\layout Code - - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator -icalproperty_new_dtstamp(atime), -\layout Code - - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator -icalproperty_new_uid(strdup("guid-1.host1.com")), -\layout Code - - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator -icalproperty_vanew_organizer( -\layout Code - - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - strdup("mrbig@host.com"), -\layout Code - - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - icalparameter_new_role(ICAL_ROLE_CHAIR), -\layout Code - - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - 0 -\layout Code - - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator -), -\layout Code - - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator -icalproperty_vanew_attendee( -\layout Code - - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - strdup("employee-A@host.com"), -\layout Code - - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - icalparameter_new_role(ICAL_ROLE_REQPARTICIPANT), -\layout Code - - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - icalparameter_new_rsvp(1), -\layout Code - - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - icalparameter_new_cutype(ICAL_CUTYPE_GROUP), -\layout Code - - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - 0 -\layout Code - - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - ), -\layout Code - - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator -icalproperty_new_location(strdup("1CP Conference Room 4350")), -\layout Code - - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator -0 -\layout Code - - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator -), -\layout Code - - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - 0 -\layout Code - - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - ); -\layout Standard - -This form is similar to the regular constructor, except that they have -\begin_inset Quotes eld -\end_inset - -vanew -\begin_inset Quotes erd -\end_inset - - instead of -\begin_inset Quotes eld -\end_inset - -new -\begin_inset Quotes erd -\end_inset - - in the name. - The arguments are similar too, except that the component contstructor can - have a list of properties, and the property constructor can have a list - or parameters. - Be sure to terminate every list with a '0', or your code will crash, if - you are lucky. - -\layout Subsubsection - -Parsing Text Files -\layout Standard - -The final way to create components will probably be the most common; you - can create components from RFC2445 compliant text. - If you have the string in memory, use -\layout Verbatim - -icalcomponent* icalparser_parse_string(char* str); -\layout Standard - -This may seem wasteful if you want to pull a large component off of the - network; you may prefer to parse the component line by line. - This is possible too, with -\layout Verbatim - -icalcomponent* icalparser_parse(char*(*line_gen_func)(char *s, size_t size, - void *d)); -\layout Standard - -This routine takes a pointer to a function that copies 'size' characters - to 's'. - The routine returns 's', similar to fgets(). - See string_line_generator in icalparser.c for an example. - -\layout Subsection - -Accessing Components -\layout Standard - -Given a reference to a component, you probably will want to access the propertie -s, parameters and values inside. - -\layout Subsubsection - -Finding Components -\layout Standard - -To find a sub-component of a component, use: -\layout Verbatim - -icalproperty* icalcomponent_get_first_component( -\layout Verbatim - - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator -icalcomponent* component, -\layout Verbatim - - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator -icalcomponent_kind kind); -\layout Standard - -This routine will return a reference to the first component of the type - 'kind.' The key kind values, listed in icalenums.h are: -\layout Code - -ICAL_ANY_COMPONENT -\layout Code - -ICAL_VEVENT_COMPONENT -\layout Code - -ICAL_VTODO_COMPONENT -\layout Code - -ICAL_VJOURNAL_COMPONENT -\layout Code - -ICAL_VCALENDAR_COMPONENT -\layout Code - -ICAL_VFREEBUSY_COMPONENT -\layout Code - -ICAL_VALARM_COMPONENT -\layout Standard - -These are only the most common components; there are many more listed in - icalenums.h. -\layout Standard - -As you might guess, if there is more than one subcomponent of the type you - have chosen, this routine will return only the first. - to get at the others, you need to iterate through the component. - -\layout Subsubsection - -Interating Through Components -\layout Standard - -Iteration requires a second routine to get the next subcomponent after the - first: -\layout Verbatim - -icalcomponent* icalcomponent_get_next_component(icalcomponent* component, - -\layout Verbatim - -icalcomponent_kind kind); -\layout Standard - -With the 'first' and 'next' routines, you can create a for loop to iterate - through all of a components subcomponents -\layout Code - - -\protected_separator - for(c = icalcomponent_get_first_component(comp,ICAL_ANY_COMPONENT); -\layout Code - - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator -c != 0; -\layout Code - - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator -c = icalcomponent_get_next_component(comp,ICAL_ANY_COMPONENT)) -\layout Code - -{ -\layout Code - - -\protected_separator - -\protected_separator - -\protected_separator - do_something(c); -\layout Code - -} -\layout Standard - -This code bit wil iterate through all of the subcomponents in 'comp' but - you can select a specific type of component by changing ICAL_ANY_COMPONENT - to another component type. -\layout Subsubsection - -Removing Components -\layout Standard - -Libical component have internal iterators, so you can only have one iteration - over a component at a time. - Removing an element from a list while iterating through the list can cause - problems, since you will probably be removing the element that the internal - iterator points to. - This will result in the iteration loop terminating immediately after removing - the element. - To avoid the problem, you will need to step the iterator ahead of the element - you are going to remove, like this: -\layout Code - -for(c = icalcomponent_get_first_component(parent_comp,ICAL_ANY_COMPONENT); - -\layout Code - - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator -c != 0; -\layout Code - - -\protected_separator - -\protected_separator - -\protected_separator - -\protected_separator -c = next -\layout Code - -{ -\protected_separator - -\protected_separator - -\layout Code - - -\protected_separator -next = icalcomponent_get_next_component(parent_comp,ICAL_ANY_COMPONENT); -\layout Code - - -\protected_separator - -\protected_separator - icalcomponent_remove_component(parent_comp,c); -\layout Code - -} -\layout Subsubsection - -Working with properties and parameters -\layout Standard - -Finding, iterating and removing properties works the same as it does for - components, using the property-specific or parameter-specific interfaces: - -\layout Verbatim - -icalproperty* icalcomponent_get_first_property( -\layout Verbatim - - -\protected_separator - -\protected_separator - -\protected_separator -icalcomponent* component, -\layout Verbatim - - -\protected_separator - -\protected_separator - -\protected_separator -icalproperty_kind kind); -\layout Verbatim - -icalproperty* icalcomponent_get_next_property( -\layout Verbatim - - -\protected_separator - -\protected_separator - -\protected_separator -icalcomponent* component, -\layout Verbatim - - -\protected_separator - -\protected_separator - -\protected_separator -icalproperty_kind kind); -\layout Verbatim - -void icalcomponent_add_property( -\layout Verbatim - - -\protected_separator - -\protected_separator - -\protected_separator -icalcomponent* component, -\layout Verbatim - - -\protected_separator - -\protected_separator - -\protected_separator -icalproperty* property); -\layout Verbatim - -void icalcomponent_remove_property( -\layout Verbatim - - -\protected_separator - -\protected_separator - -\protected_separator -icalcomponent* component, -\layout Verbatim - - -\protected_separator - -\protected_separator - -\protected_separator -icalproperty* property); -\layout Verbatim - -icalparameter* icalproperty_get_first_parameter( -\layout Verbatim - - -\protected_separator - -\protected_separator - -\protected_separator -icalproperty* prop, -\layout Verbatim - - -\protected_separator - -\protected_separator - -\protected_separator -icalparameter_kind kind); -\layout Verbatim - -icalparameter* icalproperty_get_next_parameter( -\layout Verbatim - - -\protected_separator - -\protected_separator - -\protected_separator -icalproperty* prop, -\layout Verbatim - - -\protected_separator - -\protected_separator - -\protected_separator -icalparameter_kind kind); -\layout Verbatim - -void icalproperty_add_parameter( -\layout Verbatim - - -\protected_separator - -\protected_separator - -\protected_separator -icalproperty* prop, -\layout Verbatim - - -\protected_separator - -\protected_separator - -\protected_separator -icalparameter* parameter); -\layout Verbatim - -void icalproperty_remove_parameter( -\layout Verbatim - - -\protected_separator - -\protected_separator - -\protected_separator -icalproperty* prop, -\layout Verbatim - - -\protected_separator - -\protected_separator - -\protected_separator -icalparameter_kind kind); -\layout Subsubsection - -Getting Values -\layout Subsubsection - -Setting Values -\layout Subsubsection - -Getting Parameters -\layout Subsubsection - -Setting Parameters -\layout Subsubsection - -Removing Parameters -\layout Subsubsection - -Checking Component Validity -\layout Subsection - -Storing Objects -\layout Standard - -The libical distribution inclues a seperate library, libicalss, that allows - you to store iCal component data to disk in a variety of ways. - This library is documented seperately. - -\layout Subsection - - -\begin_inset LatexCommand \label{sec:memory} - -\end_inset - -Memory Management -\layout Standard - -Libical relies heavily on dynamic allocation for both the core objects and - for the strings used to hold values. - Some of this memory the library caller owns and must free, and some of - the memory is managed by the library. - Here is a summary of the memory rules. - -\layout Description - -1) If the function name has "new" in it, the caller gets control of the - memory. - ( such as icalcomponent_new(), or icalproperty_new_clone() ) -\layout Description - -2) If you got the memory from a routine with new in it, you must call the - corresponding *_free routine to free the memory. - ( Use icalcomponent_free() to free objects created with icalcomponent_new()) - -\layout Description - -3) If the function name has "add" in it, the caller is transfering control - of the memory to the routine. - ( icalproperty_add_parameter() ) -\layout Description - -4) If the function name has "remove" in it, the caller passes in a pointer - to an object and after the call returns, the caller owns the object. - So, before you call icalcomponent_remove_property(comp,foo), you do not - own "foo" and after the call returns, you do. - -\layout Description - -5) If the routine returns a string, libical owns the memory and will put - it on a ring buffer to reclaim later. - You'd better strdup() it if you want to keep it, and you don't have to - delete it. - -\layout Subsection - -Error Handling -\layout Standard - -icalerror_errno. - Return values. - #defines. - icalerror_stop_here. - X-LIC-ERROR -\layout Subsubsection - -Return values -\layout Subsubsection - -icalerrno -\layout Subsubsection - -Component errors -\layout Subsubsection - -icalerror_stop_here -\layout Subsubsection - -X-LIC-ERROR -\layout Subsection - -Naming Standard -\layout Standard - -Structures that you access with the -\begin_inset Quotes eld -\end_inset - -struct -\begin_inset Quotes erd -\end_inset - - keyword, such as -\begin_inset Quotes eld -\end_inset - -struct icaltimetype -\begin_inset Quotes erd -\end_inset - - are things that you are allowed to see inside and poke at. - -\layout Standard - -Structures that you access though a typedef, such as -\begin_inset Quotes eld -\end_inset - -icalcomponent -\begin_inset Quotes erd -\end_inset - - are things where all of the data is hidden. - -\layout Standard - -Component names that start with -\begin_inset Quotes eld -\end_inset - -V -\begin_inset Quotes erd -\end_inset - - are part of RFC 2445 or another iCal standard. - Component names that start with -\begin_inset Quotes eld -\end_inset - -X -\begin_inset Quotes erd -\end_inset - - are also part of the spec, but they are not actually components in the - spec. - However, they look and act like components, so they are components in libical. - Names that start with -\begin_inset Quotes eld -\end_inset - -XLIC -\begin_inset Quotes erd -\end_inset - - or -\begin_inset Quotes eld -\end_inset - -X-LIC -\begin_inset Quotes erd -\end_inset - - are not part of any iCal spec. - They are used internally by libical. - -\layout Standard - -Enums that identify a component, property, value or parameter end with -\begin_inset Quotes eld -\end_inset - -_COMPONENT, -\begin_inset Quotes erd -\end_inset - - -\begin_inset Quotes eld -\end_inset - -_PROPERTY, -\begin_inset Quotes erd -\end_inset - - -\begin_inset Quotes eld -\end_inset - -_VALUE, -\begin_inset Quotes erd -\end_inset - - or -\begin_inset Quotes eld -\end_inset - -_PARAMETER -\begin_inset Quotes erd -\end_inset - -s -\layout Standard - -Enums that identify a parameter value have the name of the parameter as - the second word. - For instance: ICAL_ROLE_REQPARTICIPANT or ICAL_PARTSTAT_ACCEPTED. -\layout Standard - -The enums for the parts of a recurarance rule and request statuses are irregular. - -\layout Section - -Useful Recipies -\layout Standard - -Iteration -\layout Standard - -Copying components. - Remember that you must clone or remove an object before putting in on another - list. - -\layout Standard - -Finding compliance errors -\layout Section - -Performance -\layout Standard - -Checking restrictions is computationally expensive -\layout Section - -Hacks and Bugs -\the_end diff --git a/libical/doc/UsingLibical.ps b/libical/doc/UsingLibical.ps deleted file mode 100644 index 0417ded6a5..0000000000 --- a/libical/doc/UsingLibical.ps +++ /dev/null @@ -1,1308 +0,0 @@ -%!PS-Adobe-2.0 -%%Creator: dvips(k) 5.85 Copyright 1999 Radical Eye Software -%%Title: UsingLibical.dvi -%%Pages: 6 -%%PageOrder: Ascend -%%BoundingBox: 0 0 612 792 -%%EndComments -%DVIPSWebPage: (www.radicaleye.com) -%DVIPSCommandLine: dvips -t letter -o -%+ /usr/local/home/eric/proj/FreeAssociation/libical/doc/UsingLibical.ps -%+ UsingLibical.dvi -%DVIPSParameters: dpi=600, compressed -%DVIPSSource: TeX output 2000.02.18:1517 -%%BeginProcSet: texc.pro -%! -/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S -N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72 -mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0 -0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{ -landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize -mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[ -matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round -exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{ -statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0] -N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin -/FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array -/BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2 -array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N -df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A -definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get -}B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub} -B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr -1 add N}if}B/id 0 N/rw 0 N/rc 0 N/gp 0 N/cp 0 N/G 0 N/CharBuilder{save 3 -1 roll S A/base get 2 index get S/BitMaps get S get/Cd X pop/ctr 0 N Cdx -0 Cx Cy Ch sub Cx Cw add Cy setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx -sub Cy .1 sub]/id Ci N/rw Cw 7 add 8 idiv string N/rc 0 N/gp 0 N/cp 0 N{ -rc 0 ne{rc 1 sub/rc X rw}{G}ifelse}imagemask restore}B/G{{id gp get/gp -gp 1 add N A 18 mod S 18 idiv pl S get exec}loop}B/adv{cp add/cp X}B -/chg{rw cp id gp 4 index getinterval putinterval A gp add/gp X adv}B/nd{ -/cp 0 N rw exit}B/lsh{rw cp 2 copy get A 0 eq{pop 1}{A 255 eq{pop 254}{ -A A add 255 and S 1 and or}ifelse}ifelse put 1 adv}B/rsh{rw cp 2 copy -get A 0 eq{pop 128}{A 255 eq{pop 127}{A 2 idiv S 128 and or}ifelse} -ifelse put 1 adv}B/clr{rw cp 2 index string putinterval adv}B/set{rw cp -fillstr 0 4 index getinterval putinterval adv}B/fillstr 18 string 0 1 17 -{2 copy 255 put pop}for N/pl[{adv 1 chg}{adv 1 chg nd}{1 add chg}{1 add -chg nd}{adv lsh}{adv lsh nd}{adv rsh}{adv rsh nd}{1 add adv}{/rc X nd}{ -1 add set}{1 add clr}{adv 2 chg}{adv 2 chg nd}{pop nd}]A{bind pop} -forall N/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn -/BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put -}if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{ -bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A -mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{ -SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{ -userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X -1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4 -index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N -/p{show}N/RMat[1 0 0 -1 0 0]N/BDot 260 string N/Rx 0 N/Ry 0 N/V{}B/RV/v{ -/Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT) -(LaserWriter 16/600)]{A length product length le{A length product exch 0 -exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse -end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask -grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot} -imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round -exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto -fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p -delta add tail}B/b{S p tail}B/c{-4 M}B/d{-3 M}B/e{-2 M}B/f{-1 M}B/g{0 M} -B/h{1 M}B/i{2 M}B/j{3 M}B/k{4 M}B/w{0 rmoveto}B/l{p -4 w}B/m{p -3 w}B/n{ -p -2 w}B/o{p -1 w}B/q{p 1 w}B/r{p 2 w}B/s{p 3 w}B/t{p 4 w}B/x{0 S -rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end - -%%EndProcSet -TeXDict begin 40258431 52099146 1000 600 600 (UsingLibical.dvi) -@start -%DVIPSBitmapFont: Fa ecbx1000 10 47 -/Fa 47 122 df<913A03FF8007FE027F9039F07FFF800103B500FDB512E0010F903A00FF -FE0FF0D93FF8ECF81F90267FE0019038F03FF849485A4816E014804816C00200ED1FF081 -F007C06F91C7FCA8B912E0A4000390C701C0C7FCB3ABB5D8FC3FEBFF80A43D3A7EB938> -27 D<12E07E127C7E7E7F6C7E6C7E12037F6C7E7F12007F137E137FA2EB3F80A214C013 -1F14E0A2130F14F0A4EB07F8A514FCB114F8A5EB0FF0A414E0131FA214C0133F1480A2EB -7F00A2137E13FE5B12015B485A5B1207485A485A90C7FC123E5A12F05A16537BBD25>41 -D46 -D<49B4FC011F13F0017F13FC9038FF83FE4848C67E4848EB7F804848EB3FC04848EB1FE0 -A2001F15F0A24848EB0FF8A3007F15FCA400FF15FEB3007F15FCA5003F15F86D131FA200 -1F15F0A26C6CEB3FE0000715C06C6CEB7F806C6CEBFF003900FF83FE6DB45A011F13F001 -0190C7FC27377CB530>48 D<141E143E14FE1307137FB5FCA3138FEA000FB3B3A5007FB6 -1280A4213679B530>IIII<001C15C0D81F80 -130701F8137F90B61280A216005D5D15F05D15804AC7FC14F090C9FCA7EB03FE90381FFF -E0017F13F89038FE07FC9038F003FFD9C0011380496C13C090C7FC000E15E0C8127F16F0 -A216F8A3121FEA3FC0487E12FF7FA316F05B15FFD87F8014E0007EC713C0003E5B003F49 -13806C6C481300390FF01FFE6CB512F8000114E06C6C1380D90FF8C7FC25377BB530>I< -EC0FF8ECFFFE0103EBFF8090390FF80FC090393FE003E090397F8001F09038FF000F48EC -1FF84848133F485A120F5B121FA2003FEC1FF0ED0FE0484890C7FCA31408EC7FF039FFF1 -FFFC01F313FFD9F78013809039FF007FC049EB3FE04914F0ED1FF85B16FCA34914FEA412 -7FA5123F16FCA26C7E16F8000F143F6D14F0000715E06C6CEB7FC03A01FF81FF806C90B5 -1200013F13FC010F13F00101138027377CB530>I<123C123EEA3FE090B71280A4170048 -5D5E5E5E5EA2007CC7EA0FC000784A5A4BC7FC00F8147E485C5D14014A5AC7485A4A5AA2 -4A5A143F4AC8FCA214FEA213015C1303A21307A2130F5CA2131FA5133FA96D5A6D5A6D5A -29397BB730>I<49B47E010F13F0013F13FC9038FE01FF3A01F8007F804848EB3FC04848 -EB1FE0150F484814F01507121FA27F7F7F6D130F01FF14E014C09138E01FC06CEBF83F91 -38FE7F806C9038FFFE005D6C14F06C14FC6C14FF6D14806D14C090B612E0D803FD14F026 -07F07F13F848487E261FC00F13FC383F8003007F010013FE90C7127F151F00FE14071503 -1501A21500A216FC7E6C14016D14F86C6C13036DEB07F06C6CEB0FE0D80FFEEB7FC00003 -B61200C614FC013F13F00103138027377CB530>II67 DI70 -DI73 D76 D80 -D82 DI<003FB91280A4D9F800EBF003D87FC09238007FC049 -161F007EC7150FA2007C1707A200781703A400F818E0481701A4C892C7FCB3AE010FB7FC -A43B387DB742>III97 -D<13FFB5FCA412077EAF4AB47E020F13F0023F13FC9138FE03FFDAF00013804AEB7FC002 -80EB3FE091C713F0EE1FF8A217FC160FA217FEAA17FCA3EE1FF8A217F06E133F6EEB7FE0 -6E14C0903AFDF001FF80903AF8FC07FE009039F03FFFF8D9E00F13E0D9C00390C7FC2F3A -7EB935>I<903801FFC0010F13FC017F13FFD9FF8013802603FE0013C048485AEA0FF812 -1F13F0123F6E13804848EB7F00151C92C7FC12FFA9127FA27F123FED01E06C7E15036C6C -EB07C06C6C14806C6C131FC69038C07E006DB45A010F13F00101138023257DA42A>II<903803FF8001 -1F13F0017F13FC3901FF83FE3A03FE007F804848133F484814C0001FEC1FE05B003FEC0F -F0A2485A16F8150712FFA290B6FCA301E0C8FCA4127FA36C7E1678121F6C6C14F86D14F0 -00071403D801FFEB0FE06C9038C07FC06DB51200010F13FC010113E025257DA42C>II<161FD907FE -EBFFC090387FFFE348B6EAEFE02607FE07138F260FF801131F48486C138F003F15CF4990 -387FC7C0EEC000007F81A6003F5DA26D13FF001F5D6C6C4890C7FC3907FE07FE48B512F8 -6D13E0261E07FEC8FC90CAFCA2123E123F7F6C7E90B512F8EDFF8016E06C15F86C816C81 -5A001F81393FC0000F48C8138048157F5A163FA36C157F6C16006D5C6C6C495AD81FF0EB -07FCD807FEEB3FF00001B612C06C6C91C7FC010713F02B377DA530>I<13FFB5FCA41207 -7EAFED7FC0913803FFF8020F13FE91381F03FFDA3C01138014784A7E4A14C05CA25CA291 -C7FCB3A3B5D8FC3F13FFA4303A7DB935>II<13FFB5FCA412077EAF92 -380FFFE0A4923803FC0016F0ED0FE0ED1F804BC7FC157E5DEC03F8EC07E04A5A141FEC7F -E04A7E8181A2ECCFFEEC0FFF496C7F806E7F6E7F82157F6F7E6F7E82150F82B5D8F83F13 -F8A42D3A7EB932>107 D<13FFB5FCA412077EB3B3ACB512FCA4163A7DB91B>I<01FED97F -E0EB0FFC00FF902601FFFC90383FFF80020701FF90B512E0DA1F81903983F03FF0DA3C00 -903887801F000749DACF007F00034914DE6D48D97FFC6D7E4A5CA24A5CA291C75BB3A3B5 -D8FC1FB50083B512F0A44C257DA451>I<01FEEB7FC000FF903803FFF8020F13FE91381F -03FFDA3C011380000713780003497E6D4814C05CA25CA291C7FCB3A3B5D8FC3F13FFA430 -257DA435>I<903801FFC0010F13F8017F13FFD9FF807F3A03FE003FE048486D7E48486D -7E48486D7EA2003F81491303007F81A300FF1680A9007F1600A3003F5D6D1307001F5DA2 -6C6C495A6C6C495A6C6C495A6C6C6CB45A6C6CB5C7FC011F13FC010113C029257DA430> -I<9039FF01FF80B5000F13F0023F13FC9138FE07FFDAF00113800003496C13C00280EB7F -E091C713F0EE3FF8A2EE1FFCA3EE0FFEAA17FC161FA217F8163F17F06E137F6E14E06EEB -FFC0DAF00313809139FC07FE0091383FFFF8020F13E0020390C7FC91C9FCACB512FCA42F -357EA435>I<9038FE03F000FFEB0FFEEC3FFF91387C7F809138F8FFC000075B6C6C5A5C -A29138807F80ED3F00150C92C7FC91C8FCB3A2B512FEA422257EA427>114 -D<90383FF0383903FFFEF8000F13FF381FC00F383F0003007E1301007C130012FC15787E -7E6D130013FCEBFFE06C13FCECFF806C14C06C14F06C14F81203C614FC131F9038007FFE -140700F0130114007E157E7E157C6C14FC6C14F8EB80019038F007F090B512C000F81400 -38E01FF81F257DA426>I<130FA55BA45BA25B5BA25A1207001FEBFFE0B6FCA3000390C7 -FCB21578A815F86CEB80F014816CEBC3E090383FFFC06D1380903803FE001D357EB425> -I<01FFEC3FC0B5EB3FFFA4000714016C80B3A35DA25DA26C5C6E4813E06CD9C03E13FF90 -387FFFFC011F13F00103138030257DA435>II120 DI E -%EndDVIPSBitmapFont -%DVIPSBitmapFont: Fb ecbx1200 12 47 -/Fb 47 122 df<157F913803FFC0020F7F4A7F91383FE1F891387F80789138FF007C4914 -3C495A163E4948131EA3130FA3163E163C167C16786E13F84B5A4B5A15075E6D6C485A4B -C70003B512E0153E15FC6D5B5D4B91390007C0004B5E6D6D150F4FC7FC6D6D151E49173E -496D5D491778496D15F890261FBFFE4A5AD93F3F5E9026FE1FFF1403D801FC6E495A0003 -6D5E48486C6D130F000F6F49C8FC001F6D6D133E48486C6D133C187C007F6D6D5B6F6C48 -5A00FF6E6C485A6FEB87C06F13CFEFFF806F91C9FC6D6D5B6F49EC01E06F7F6C6CEC3FFF -706D13036C6C4A6DEB07C06C6C91B500F0130FDA800702FCEB1F806C9026E03FF89039FF -80FF00000390B5D8F03FEBFFFE6CDBC00F5C6C6CDA00035C011F01F8D9007F13E0010301 -80020790C7FC4B477BC557>38 D45 DI49 DII<163FA25E5E5D5DA25D5D5D5DA25D92B5FCEC01F7EC03E7 -140715C7EC0F87EC1F07143E147E147C14F8EB01F0EB03E0130714C0EB0F80EB1F00133E -5BA25B485A485A485A120F5B48C7FC123E5A12FCB91280A5C8000F90C7FCAC027FB61280 -A531417DC038>I<0007150301E0143F01FFEB07FF91B6FC5E5E5E5E5E16804BC7FC5D15 -E092C8FC01C0C9FCAAEC3FF001C1B5FC01C714C001DF14F09039FFE03FFC9138000FFE01 -FC6D7E01F06D13804915C0497F6C4815E0C8FC6F13F0A317F8A4EA0F80EA3FE0487E12FF -7FA317F05B5D6C4815E05B007EC74813C0123E003F4A1380D81FC0491300D80FF0495AD8 -07FEEBFFFC6CB612F0C65D013F1480010F01FCC7FC010113C02D427BC038>I<4AB47E02 -1F13F0027F13FC49B6FC01079038807F8090390FFC001FD93FF014C04948137F4948EBFF -E048495A5A1400485A120FA248486D13C0EE7F80EE1E00003F92C7FCA25B127FA2EC07FC -91381FFF8000FF017F13E091B512F89039F9F01FFC9039FBC007FE9039FF8003FF17804A -6C13C05B6F13E0A24915F0A317F85BA4127FA5123FA217F07F121FA2000F4A13E0A26C6C -15C06D4913806C018014006C6D485A6C9038E01FFC6DB55A011F5C010714C0010191C7FC -9038003FF02D427BC038>I<121E121F13FC90B712FEA45A17FC17F817F017E017C0A248 -1680007EC8EA3F00007C157E5E00785D15014B5A00F84A5A484A5A5E151FC848C7FC157E -5DA24A5A14035D14074A5AA2141F5D143FA2147F5D14FFA25BA35B92C8FCA35BA55BAA6D -5A6D5A6D5A2F447AC238>III65 -D67 -DII71 -DI76 DII<923807FFC092B512FE0207ECFFC0021F15F091267FFE0013FC90 -2601FFF0EB1FFF01070180010313C04990C76C7FD91FFC6E6C7E49486F7E49486F7E01FF -8348496F7E48496F1380A248496F13C0A24890C96C13E0A24819F04982003F19F8A3007F -19FC49177FA400FF19FEAD007F19FC6D17FFA3003F19F8A26D5E6C19F0A26E5D6C19E0A2 -6C6D4B13C06C19806E5D6C6D4B13006C6D4B5A6D6C4B5A6D6C4B5A6D6C4A5B6D01C00107 -5B6D01F0011F5B010101FE90B5C7FC6D90B65A023F15F8020715C002004AC8FC030713C0 -47467AC454>II82 DI<003FBA12E0A59026FE000FEB8003D87FE09338003FF049171F90C71607 -A2007E1803007C1801A300781800A400F819F8481978A5C81700B3B3A20107B8FCA54543 -7CC24E>I86 D<903801FFE0011F13FE017F6D7E48B612E03A03FE007F -F84848EB1FFC6D6D7E486C6D7EA26F7FA36F7F6C5A6C5AEA00F090C7FCA40203B5FC91B6 -FC1307013F13F19038FFFC01000313E0481380381FFE00485A5B127F5B12FF5BA35DA26D -5B6C6C5B4B13F0D83FFE013EEBFFC03A1FFF80FC7F0007EBFFF86CECE01FC66CEB8007D9 -0FFCC9FC322F7DAD36>97 DIII -I103 DI<137C48B4FC4813804813C0A24813E0A56C13C0A26C13806C1300EA007C90C7 -FCAAEB7FC0EA7FFFA512037EB3AFB6FCA518467CC520>II108 D<90277F8007FEEC0FFCB590263FFFC090387FFF8092B5D8F001B5 -12E002816E4880913D87F01FFC0FE03FF8913D8FC00FFE1F801FFC0003D99F009026FF3E -007F6C019E6D013C130F02BC5D02F86D496D7EA24A5D4A5DA34A5DB3A7B60081B60003B5 -12FEA5572D7CAC5E>I<90397F8007FEB590383FFF8092B512E0028114F8913987F03FFC -91388F801F000390399F000FFE6C139E14BC02F86D7E5CA25CA35CB3A7B60083B512FEA5 -372D7CAC3E>II<90397FC0 -0FF8B590B57E02C314E002CF14F89139DFC03FFC9139FF001FFE000301FCEB07FF6C496D -13804A15C04A6D13E05C7013F0A2EF7FF8A4EF3FFCACEF7FF8A318F017FFA24C13E06E15 -C06E5B6E4913806E4913006E495A9139DFC07FFC02CFB512F002C314C002C091C7FCED1F -F092C9FCADB67EA536407DAC3E>I<90387F807FB53881FFE0028313F0028F13F8ED8FFC -91389F1FFE000313BE6C13BC14F8A214F0ED0FFC9138E007F8ED01E092C7FCA35CB3A5B6 -12E0A5272D7DAC2E>114 D<90391FFC038090B51287000314FF120F381FF003383FC000 -49133F48C7121F127E00FE140FA215077EA27F01E090C7FC13FE387FFFF014FF6C14C015 -F06C14FC6C800003806C15806C7E010F14C0EB003F020313E0140000F0143FA26C141F15 -0FA27EA26C15C06C141FA26DEB3F8001E0EB7F009038F803FE90B55A00FC5CD8F03F13E0 -26E007FEC7FC232F7CAD2C>IIII121 D E -%EndDVIPSBitmapFont -%DVIPSBitmapFont: Fc ectt1000 10 59 -/Fc 59 126 df<121FEA3F80EA7FC0EAFFE0B0EA7FC0AEEA1F00C7FCA7121FEA3F80EA7F -C0EAFFE0A5EA7FC0EA3F80EA1F000B3470B32C>33 D<003C131E007F137F481480A66C14 -00A6007E7FA6003E133EA3003C131E001C131C191977B32C>I<143814FC13011303EB07 -F8EB0FF0EB1FC0EB3F80EB7F0013FE485A485A5B12075B120F5B485AA2123F90C7FCA25A -127EA312FE5AAC7E127EA3127F7EA27F121FA26C7E7F12077F12037F6C7E6C7E137FEB3F -80EB1FC0EB0FF0EB07F8EB03FC130113001438164272B92C>40 D<127012FC7E7E6C7E6C -7EEA0FE06C7E6C7E6C7E6C7E137F7F1480131F14C0130FEB07E0A214F01303A214F81301 -A314FC1300AC130114F8A3130314F0A2130714E0A2EB0FC0131F1480133F14005B13FE48 -5A485A485A485AEA3FC0485A48C7FC5A5A1270164279B92C>I44 D<007FB512F0B612F8A36C14F01D0579942C>I<121FEA3F80EA -7FC0EAFFE0A5EA7FC0EA3F80EA1F000B0B708A2C>I<1507ED0F80A2151F16005D153E15 -7E157CA215FC5D14015D14035D14075D140F5D141F92C7FC5C143EA2147E147C14FC5C13 -015C13035C13075C130F5C131F91C8FC5B133EA2137E137C13FC5B12015B12035B12075B -120F5B121F90C9FCA25A123E127E127C12FC5AA2127021417BB92C>II<1307497EA2131FA2133F137F13FF5A1207127FB5FC13 -DF139FEA7C1F1200B3AE007FB512E0B612F0A36C14E01C3477B32C>I<121FEA3F80EA7F -C0EAFFE0A5EA7FC0EA3F80EA1F00C7FCAE121FEA3F80EA7FC0EAFFE0A5EA7FC0EA3F80EA -1F000B2470A32C>58 DI<007FB612F0B712F8A36C15F0CAFCA8007F -B612F0B712F8A36C15F025127DA12C>61 D64 -D<14FE497EA4497FA214EFA2130781A214C7A2010F7FA314C390381F83F0A590383F01F8 -A490387E00FCA549137E90B512FEA34880A29038F8003FA34848EB1F80A4000715C04913 -0FD87FFEEBFFFC6D5AB514FE6C15FC497E27347EB32C>I<02FF13700107EBE0F84913F9 -013F13FD4913FFEBFF813901FE007F4848131FD807F0130F1507485A491303485A150148 -C7FCA25A007EEC00F01600A212FE5AAB7E127EA3007F15F06CEC01F8A26C7EA26C6C1303 -6D14F06C6C130716E0D803FC131F6C6CEB3FC03A00FF81FF806DB512006D5B010F5B6D13 -F00100138025357DB32C>67 D<007FB612F0B712F8A37E3903F00001A7ED00F01600A4EC -01E04A7EA490B5FCA5EBF003A46E5A91C8FCA5163C167EA8007FB612FEB7FCA36C15FC27 -337EB22C>69 D<903901FC038090390FFF87C04913EF017F13FF90B6FC4813073803FC01 -497E4848137F4848133F49131F121F5B003F140F90C7FCA2127EED078092C7FCA212FE5A -A8913803FFF84A13FCA27E007E6D13F89138000FC0A36C141FA27F121F6D133F120F6D13 -7F6C7E6C6C13FF6D5A3801FF076C90B5FC6D13EF011F13CF6DEB0780D901FCC7FC26357D -B32C>71 DI<007FB512F8B612FCA36C14 -F839000FC000B3B3A5007FB512F8B612FCA36C14F81E3379B22C>I<387FFFE0B57EA36C -5BD803F0C8FCB3AE16F0ED01F8A8007FB6FCB7FCA36C15F025337DB22C>76 -DIII<007FB512C0B612F88115FF6C15802603F00013C0153FED0FE0ED07 -F0A2150316F81501A6150316F01507A2ED0FE0ED3FC015FF90B61280160015FC5D15C001 -F0C8FCB0387FFF80B57EA36C5B25337EB22C>I<387FFFFCB67E15E015F86C803907E007 -FE1401EC007F6F7E151FA26F7EA64B5AA2153F4BC7FCEC01FE140790B55A5D15E0818190 -38E007FCEC01FE1400157F81A8160FEE1F80A5D87FFEEB1FBFB5ECFF00815E6C486D5AC8 -EA01F029347EB22C>82 D<90381FF80790B5EA0F804814CF000714FF5A381FF01F383FC0 -03497E48C7FC007E147F00FE143F5A151FA46CEC0F00007E91C7FC127F7FEA3FE0EA1FFC -EBFFC06C13FC0003EBFFC06C14F06C6C7F01077F9038007FFEEC07FF02001380153FED1F -C0A2ED0FE0A20078140712FCA56CEC0FC0A26CEC1F806D133F01E0EB7F009038FE01FF90 -B55A5D00F914F0D8F83F13C0D8700790C7FC23357CB32C>I<007FB612FCB712FEA43AFC -007E007EA70078153CC71400B3AF90383FFFFCA2497F6D5BA227337EB22C>I86 D89 D<003FB612C04815E0A400 -7EC7EA1FC0ED3F80A2ED7F00157E15FE4A5A003C5CC712034A5AA24A5A4A5AA24A5A4AC7 -FCA214FE495AA2495A495AA2495A495AA2495A49C8FCA213FE485AA24848EB03C049EB07 -E01207485A5B121F485AA248C7FCB7FCA46C15C023337CB22C>I<007FB6FCB71280A46C -150021067B7D2C>95 D<3801FFF0000713FE001F6D7E15E048809038C01FF81407EC01FC -381F80000006C77EC8127EA3ECFFFE131F90B5FC1203120F48EB807E383FF800EA7FC090 -C7FC12FE5AA47E007F14FEEB8003383FE01F6CB612FC6C15FE6C14BF0001EBFE1F3A003F -F007FC27247CA32C>97 DI<903803FFE0011F13F8017F13FE48B5FC48804848C6FC -EA0FF0485A49137E4848131890C9FC5A127EA25AA8127EA2127F6C140F6DEB1F806C7E6D -133F6C6CEB7F003907FE03FF6CB55A6C5C6C6C5B011F13E0010390C7FC21247AA32C>I< -EC0FFE4A7EA380EC003FAAEB07F8EB3FFE90B512BF4814FF5A3807FC0F380FF00348487E -497E48487F90C7FC007E80A212FE5AA87E007E5CA2007F5C6C7E5C6C6C5A380FF0073807 -FC1F6CB612FC6CECBFFE6C143FEB3FFC90390FF01FFC27337DB22C>IIIII<1307EB1FC0A2497EA36D5AA20107C7FC90C8FCA7387FFFC080B5FC7E -A2EA0007B3A8007FB512FCB612FEA36C14FC1F3479B32C>I<140EEC3F80A2EC7FC0A3EC -3F80A2EC0E0091C7FCA748B512804814C0A37EC7120FB3B3A2141F003C1480007E133FB4 -14005CEB01FEEBFFFC6C5B5C001F5B000790C7FC1A467CB32C>II<387FFFE0B57EA37E -EA0003B3B3A5007FB61280B712C0A36C158022337BB22C>I<3A7F83F007E09039CFFC1F -F83AFFDFFE3FFCD87FFF13FF91B57E3A07FE1FFC3E01FCEBF83F496C487E01F013E001E0 -13C0A301C01380B33B7FFC3FF87FF0027F13FFD8FFFE6D13F8D87FFC4913F0023F137F2D -2481A32C>I<397FF01FE039FFF87FFC9038F9FFFE01FB7F6CB6FC00019038F03F80ECC0 -1F02807FEC000F5B5BA25BB3267FFFE0B5FCB500F11480A36C01E0140029247FA32C>I< -EB07FCEB1FFF017F13C048B512F048803907FC07FC390FF001FE48486C7E0180133F003F -158090C7121F007EEC0FC0A348EC07E0A76C140F007E15C0A2007F141F6C15806D133F6C -6CEB7F006D5B6C6C485A3907FC07FC6CB55A6C5C6C6C13C0011F90C7FCEB07FC23247CA3 -2C>I<397FF01FE039FFF8FFF801FB13FE90B6FC6C158000019038F07FC09138801FE091 -380007F049EB03F85BED01FC491300A216FE167EA816FE6D14FCA2ED01F86D13036DEB07 -F0150F9138801FE09138E07FC091B51280160001FB5B01F813F8EC3FC091C8FCAD387FFF -E0B57EA36C5B27367FA32C>I114 D<90387FF8700003B512F8120F5A5A387FC00F387E00034813015AA3 -6CEB00F0007F140013F0383FFFC06C13FE6CEBFF80000314E0C66C13F8010113FCEB0007 -EC00FE0078147F00FC143F151F7EA26C143F6D133E6D13FE9038F007FC90B5FC15F815E0 -00F8148039701FFC0020247AA32C>I<131E133FA9007FB6FCB71280A36C1500D8003FC8 -FCB1ED03C0ED07E0A5EC800F011FEB1FC0ECE07F6DB51280160001035B6D13F89038003F -E0232E7EAD2C>I<3A7FF003FF80486C487FA3007F7F0001EB000FB3A3151FA2153F6D13 -7F3900FE03FF90B7FC6D15807F6D13CF902603FE07130029247FA32C>I<3A7FFF01FFFC -B514FE148314016C15FC3A03E0000F80A26D131F00011500A26D5B0000143EA26D137E01 -7C137CA2017E13FC013E5BA2EB3F01011F5BA21483010F5BA214C701075BA214EF01035B -A214FF6D90C7FCA26D5A147C27247EA32C>II<3A3FFF03FFF048018713F8A36C010313F03A00FC007E005D90387E01F8013F5B -EB1F83EC87E090380FCFC0903807EF80EB03FF6D90C7FC5C6D5A147C14FE130180903803 -EF80903807CFC0EB0FC7EC83E090381F01F0013F7FEB7E00017C137C49137E0001803A7F -FF01FFFC1483B514FE6C15FC140127247EA32C>I<3A7FFF01FFFCB5008113FE14831481 -6C010113FC3A03E0000F806C7E151F6D140012005D6D133E137C017E137E013E137CA201 -3F13FC6D5BA2EB0F815DA2EB07C1ECC3E0A2EB03E3ECE7C0130114F75DEB00FFA292C7FC -80A2143EA2147E147CA214FC5CA2EA0C01003F5BEA7F83EB87E0EA7E0F495A387FFF806C -90C8FC6C5A6C5AEA07E027367EA32C>I<003FB612E04815F0A4007EC7EA1FE0ED3FC0ED -7F80EDFF004A5A003C495AC7485A4A5A4A5A4A5A4A5A4AC7FCEB01FC495AEB0FF0495A49 -5A495A49C8FC4848EB01E04848EB03F0485A485A485A485A485AB7FCA46C15E024247DA3 -2C>I<15FF02071380141F147F91B512004913C04AC7FCEB03F85CB31307EB1FE013FF00 -7F5BB55A49C8FC6D7E6C7FC67F131FEB07F01303B380EB01FEECFFC06D13FF6E1380141F -14070200130021417BB92C>I125 D E -%EndDVIPSBitmapFont -%DVIPSBitmapFont: Fd ecbx1440 14.4 41 -/Fd 41 122 df27 -D<151E153E15FE1403140F147FEB07FF0003B5FCB6FCA3EBF87FEAFC00C7FCB3B3B3A600 -7FB712FCA52E4E76CD42>49 DI<913807FFC002 -7F13FC0103B67E010F15E090261FF80313F890267FC0007F01FEC7EA3FFE48488148486E -138013FE486C6C6D13C0804817E080A66C5B18C06C5B6C90C75AD80038168090C8FC4C13 -00A24C5A5F4C5A4B5B4B13C0030F5BDB7FFEC7FC91387FFFF816C016FCEEFF80DA000313 -E09238007FF8EE3FFE707E70138018C07013E018F07013F8A218FC82A218FEA3EA03C0EA -0FF0EA3FFC487EA2B5FCA218FCA25E18F8A26C4816F0495C4916E0D83FE04A13C06C485C -D80FF04A1380D807FE91387FFE003B03FFE003FFFC6C90B65A6C6C15E0010F92C7FC0101 -14FCD9001F1380374F7BCD42>I<17FC1601A216031607160FA2161F163F167FA216FF5D -5DA25D5D5D167F153E157E15FC15F8EC01F01403EC07E015C0EC0F80141FEC3F00143E5C -14FC495A5C495A1307495A5C49C7FC5B137E137C5B1201485A5B485A120F485A90C8FC12 -3E127E5ABA1280A5C901FCC7FCAF021FB71280A5394F7CCE42>I<486C150601F0153E01 -FEEC01FED9FFF0133F91B65A5F5F5F5F5F94C7FC16FC5E16E093C8FC15FC01F0138091CA -FCAC913807FF80023F13F891B512FE01F36E7E9026FFFC0113E09139E0007FF891C76C7E -496E7E01F86E7E5B7013804916C0C9FC18E08218F0A418F8A31203EA0FE0EA3FF8487EA2 -12FF7FA218F0A25B5E6C4816E05B01C016C06CC85A18806C6C4A13007FD80FF04A5A6C6C -ECFFFCD803FE4913F02701FFE00F5B6C6CB612806D92C7FC010F14F8010114C09026003F -FCC8FC354F7ACD42>II<121F7F7FEBFF8091B8FCA45A18FE18FC18 -F818F0A218E018C018804817000180C8123E007EC9127E5F007C4B5A4C5A5F16074C5A48 -4B5A4CC7FC167E167CC912FC4B5A4B5AA24B5A150F4B5AA24B5AA24BC8FC5DA25C5D1403 -A214075D140FA3141FA2143FA34A5AA414FFA65BAB6D5B6E5A6E5A6E5A385279D042>I< -913803FFC0023F13FC49B67E010715E090260FFC0013F8D93FE0EB1FFCD97F80EB07FE49 -C76C7E496E1380484880000317C049157F120718E0173F120FA27FA27F7F6E147F02E015 -C08002FC14FF6C01FF15806F481300EDE0036C9138F807FE6F485A6C9138FF1FF06CEDFF -E017806D4AC7FC7F010F6E7E6D81010115F06D81010315FE010F81D93FF71580D97FC115 -C02701FF807F14E048EB001F48486D14F04848010314F848481300496E13FC003F151F49 -1407007F6F13FE491400177F00FF163F49151F170F1707A21703A218FCA27F127F6DED07 -F8A26C6CED0FF07F6C6CED1FE06C6CED3FC06C6CEDFF806C01C0010313006C01FCEB3FFE -6C6CB612F8011F15E001071580010002FCC7FC020F13C0374F7BCD42>I<913807FF8002 -7F13F849B512FE01076E7E90261FFE0113E0903A7FF8003FF049486D7E48496D7E48496D -7E484980486F138091C7FC486F13C05A18E0485A18F0A27013F812FFA318FCA618FEA35E -127FA4003F5DA26C7E5E7E6C6D5B161E6C7F6C6D5B6C6C6C13F890393FFC03F06DB55A01 -074A13FC01001400EC1FF891C8FCA218F85EA301FC16F0487E2607FF8015E05E486D15C0 -A24C1380A24C13005F4A131F6C4B5A49C7485A494A5A6C48495B6D01075B2701FF803F90 -C7FC6C90B512FC013F5C6D14C0010791C8FC9038007FF0374F7BCD42>I66 D<932603FFF01407047F01FF140F0307B6 -00E0131F033F03F8133F92B700FE137F02039126C003FF13FF020F01F8C7EA3FC1023F01 -C0EC0FE391B5C80003B5FC4901FC814949814901E082011F498249498292CA7E49488349 -48835A4A83485B4885A24849187FA2485B1B3FA2485B1B1FA25AA21B0091CDFCA2B5FCAE -7EA280A36C1A1FA36C7FA21B3F6C7F1B3E6C7F1B7E6C6D187C6C1AFC6E18F86C19016D6C -EF03F06D7E6FEE07E06D6DEE0FC001076DEE1F806D01F8EE3F006D6D16FE6D01FF4B5A02 -3F01C0EC07F8020F01FCEC3FF00203903AFFC001FFC0020091B6C7FC033F15FC030715F0 -DB007F1480040301F0C8FC505479D25F>II70 -D72 DI76 -D80 -D82 DI85 D97 -DI<913803 -FFE0023F13FE91B67E010315E0010F9038003FF8D93FFCEB07FC4948497E4948131F4849 -497E485B485BA24890C7FC5A5B003F6F5A705A705A007F92C8FC5BA312FFAD127F7FA312 -3F7F6CEE0F80A26C6D141F18006C6D5C6C6D143E6C6D147E6C6D5C6D6C495A6DB4EB07F0 -010F9038C01FE06D90B5128001014AC7FCD9003F13F80203138031387CB63A>I<943803 -FF80040FB5FCA5EE003F170FB3A4913803FF80023F13F849B512FE0107ECFF8F011F9038 -C03FEF90273FFE0007B5FCD97FF8130149487F484980484980484980488291C8FC5A5B12 -3FA2127F5BA312FFAD127FA37F123FA3121F7F6C5E6C6D5C5F6C6D91B5FC6C6D5B6C6D49 -14E0D97FFCD90FEFEBFF80D91FFFEB7F8F010790B5120F010114FC6D6C13E00207010049 -C7FC41547CD249>I<913807FF80027F13F849B512FE01076E7E011F010313E0903A3FFC -007FF0D97FF06D7E49486D7E4849130F48496D7E48824890C77E1880485A82003F17C0A3 -485A18E082A212FFA290B8FCA401FCCAFCA6127FA37F123FA2EF03E06C7E17076C17C06C -6D140F18806C6D141F6C6DEC3F006C6D147ED97FFC495AD91FFFEB07F86D9038E03FF001 -0390B512C001005D023F01FCC7FC020113E033387CB63C>IIII<133FEBFFC0487F487FA2487FA66C5BA26C5B -6C5B013FC7FC90C8FCAEEB1FF8B5FCA512017EB3B3A6B612F0A51C547CD324>I107 DIII<913801FFC0023F13FE -91B67E010315E0010F018013F8903A3FFC001FFED97FF0EB07FF49486D7F48496D7F4849 -6D7F91C8127F4883488349153F001F83A2003F8349151FA2007F83A400FF1880AC007F18 -00A3003F5F6D153FA2001F5FA26C6C4B5AA26C6D4A5A6C5F6C6D495B6C6D495B6D6C4990 -C7FCD93FFCEB1FFE6DB46CB45A010790B512F0010115C0D9003F49C8FC020313E039387C -B642>II< -90393FF001FCB590380FFF804B13E0037F13F09238FE1FF89138F1F83F00019138F07FFC -6CEBF3E015C0ECF780A2ECFF00EE3FF84AEB1FF0EE0FE093C7FC5CA45CB3ABB612FEA52E -367DB535>114 D<903903FFC00E011FEBFC1E90B6127E000315FE3907FE003FD80FF013 -0F4848130348481301491300127F90C8127EA248153EA27FA27F01F091C7FC13FCEBFF80 -6C13FEECFFF06C14FE6F7E6C15E06C816C15FC6C81C681133F010F15801301D9000F14C0 -EC003F030713E0150100F880167F6C153FA2161F7EA217C07E6D143F17807F6DEC7F0001 -F85C6DEB03FE9039FF801FFC486CB512F0D8F81F14C0D8F00791C7FC39E0007FF02B387C -B634>I<147CA614FCA41301A31303A21307A2130F131F133F137F13FF1203000F90B512 -FEB7FCA426007FFCC8FCB3A9EE0F80ABEE1F006D7EA2011F143E806D6D5A6DEBC1F86DEB -FFF001005C023F1380DA03FEC7FC294D7ECB33>II121 D E -%EndDVIPSBitmapFont -%DVIPSBitmapFont: Fe ecss2074 20.74 10 -/Fe 10 116 df76 -D85 -D<91380FFF8049B512F0010F14FC017F14FF48B712C0000782001F824882DAE0007F49C7 -EA3FFE01F8140FD81FC06E7E90C86C1380121E00186F13C0001081CAFCEF7FE0A318F017 -3FAD93B5FC157F0207B6FC143F49B7FC1307011F153F017FEBF80090B512804801F8C7FC -4813C04890C8FCEA0FFC485A485A5B485A5BA248C9FCA5177FA26D15FFA26C6C5C6D5C6D -140F6C6C5C01FF91B5FC6CEBE00791B612BF6CEDFE3F16FC6C15F06C15C06CECFE006C6C -13F0D91FFCC9FC344C77CA4C>97 DII103 D105 -D108 D110 -D<91380FFFC091B512FE0107ECFFC0011F15F8017F15FE90B812804817C05A489038F000 -3F4890C70003138049EC007FD81FF8151F491507003F16014992C7FCA2485AA77FA26C7E -7F7F6CB4FC6C13C014F86CEBFF806C14FC6CECFFE06C15FC6D14FF6D15C0010F81010315 -F8010081020F80DA007F7F03071480DB003F13C0160F040313E01600EF7FF0173FA2EF1F -F8A2170FA7EF1FF0A20070163F127C007FEE7FE001C015FF01F0020313C0B5020F138002 -F0137F91B712006C5E001F5E000716F0C65E011F1580010302FCC7FCD9000F13C0354C7C -CA3D>115 D E -%EndDVIPSBitmapFont -%DVIPSBitmapFont: Ff ecrm0700 7 1 -/Ff 1 66 df<140EA2141FA34A7EA3EC6FC0A2ECEFE014C7A290380183F0A390380301F8 -A201067F1400A249137EA2011C137F01187FA24980013FB5FCA2903960000FC0A201E080 -491307A248486D7EA200038115011207D81FC0497ED8FFF890383FFFE0A22B2A7EA931> -65 D E -%EndDVIPSBitmapFont -%DVIPSBitmapFont: Fg ecrm1000 10 78 -/Fg 78 123 df21 D27 DIII<007C137C00FE13FEEAFF01A3EAFE00A7007E13FC -007C137CA8003C137800381338A700181330171E77BA2A>34 D<030C497EA2031C130303 -1891C7FCA303385B03301306A30370130E0360130CA303E0131C4B1318A3020114384B13 -30A30203147092C71260A34A14E0007FB91280BA12C0C7270C000180C7FCA2021C130302 -1891C8FCA402385B02301306A50270130E0260130CA2BA12C06C1880280001C00038C8FC -4A1330A30103147091C71260A34914E001065CA3010E1301010C5CA3011C1303011891C9 -FCA301385B01301306A30170130E0160130CA23A4A7BB945>II<121C -127FEAFF80A213C0A3127F121C1200A412011380A2120313005A1206120E5A5A5A12600A -1979B917>39 D<146014E0EB01C0EB0380EB0700130E131E5B5BA25B485AA2485AA21207 -5B120F90C7FCA25A121EA2123EA35AA65AB2127CA67EA3121EA2121F7EA27F12077F1203 -A26C7EA26C7E1378A27F7F130E7FEB0380EB01C0EB00E01460135278BD20>I<12C07E12 -707E7E7E120F6C7E6C7EA26C7E6C7EA21378A2137C133C133E131EA2131F7FA21480A3EB -07C0A6EB03E0B2EB07C0A6EB0F80A31400A25B131EA2133E133C137C1378A25BA2485A48 -5AA2485A48C7FC120E5A5A5A5A5A13527CBD20>II<121C127FEAFF80A213C0A3127F121C1200A4 -12011380A2120313005A1206120E5A5A5A12600A19798817>44 DI<121C127FEAFF80A5EA7F00121C0909798817>I<1506A2150E150CA2151C1518153815 -30A215701560A215E015C0A214011580A2140315005C1406A2140E140CA2141C1418A214 -381430A21470146014E05CA213015CA2130391C7FCA25B1306A2130E130C131C1318A213 -381330A213701360A213E05BA212015B120390C8FCA25A1206A2120E120CA2121C1218A2 -1238123012701260A212E05AA21F537BBD2A>IIIII<1538A2157815F8A2140114031407A2140F141F141B14331473146314C3 -13011483EB030313071306130C131C131813301370136013C01201EA038013005A120E12 -0C5A123812305A12E0B712F8A3C73803F800AA4A7E0103B512F8A325387EB72A>I<0006 -140CD80780133C9038F003F890B5FC5D5D158092C7FC14FC38067FE090C9FCAAEB07F8EB -1FFE9038780F809038E007E03907C003F0496C7E130000066D7E81C8FC8181A21680A412 -1C127F5A7FA390C713005D12FC00605C12704A5A6C5C6C1303001E495A6C6C485A3907E0 -3F800001B5C7FC38007FFCEB1FE021397CB62A>I -I<12301238123E003FB612E0A316C05A168016000070C712060060140E5D5D00E0143048 -14705D5DC712014A5A4AC7FC1406140E5CA25C1478147014F05C1301A213035C1307A213 -0FA3131F5CA2133FA5137FA96DC8FC131E233A7BB72A>II<121C127FEAFF80A5EA7F00121CC7FCB2121C127FEAFF80A5EA7F00121C092479A317> -58 D64 D<1538A3157CA315FEA34A7EA34A6C7EA202077FEC063FA2020E7F -EC0C1FA2021C7FEC180FA202387FEC3007A202707FEC6003A202C07F1501A2D901807F81 -A249C77F167FA20106810107B6FCA24981010CC7121FA2496E7EA3496E7EA3496E7EA213 -E0707E1201486C81D80FFC02071380B56C90B512FEA3373C7DBB3E>II<913A01FF800180020FEBE003027F13F8903A01FF807E07903A03FC000F0FD90FF0EB -039F4948EB01DFD93F80EB00FF49C8127F01FE153F12014848151F4848150FA248481507 -A2485A1703123F5B007F1601A35B00FF93C7FCAD127F6DED0180A3123F7F001F16031800 -6C7E5F6C7E17066C6C150E6C6C5D00001618017F15386D6C5CD91FE05C6D6CEB03C0D903 -FCEB0F80902701FF803FC7FC9039007FFFFC020F13F002011380313D7BBA3C>IIIIIII<013FB512E0A39039001FFC -00EC07F8B3B3A3123FEA7F80EAFFC0A44A5A1380D87F005B0070131F6C5C6C495A6C49C7 -FC380781FC3801FFF038007F80233B7DB82B>I -76 DIIIIIII<003FB812E0A3D9C003EB001F273E0001FE130348EE01F00078160000 -701770A300601730A400E01738481718A4C71600B3B0913807FF80011FB612E0A335397D -B83C>III<007FB590383FFFFCA3C6 -01F801071380D97FE0D903FCC7FC013FEC01F06D6C5C5F6D6C5C6D6C13034CC8FC6D6C13 -06160E6D6C5B6DEB8018163891387FC0306E6C5A16E06E6C5A91380FF18015FB6EB4C9FC -5D14036E7EA26E7F6F7EA24B7E15DF9138019FF09138038FF8150F91380607FC91380E03 -FE140C4A6C7EEC38000230804A6D7E14E04A6D7E49486D7E130391C76C7E01066E7E130E -010C6E7E011C1401013C8101FE822607FF80010713E0B500E0013FEBFF80A339397EB83E ->88 DI<003FB7FCA39039FC0001FE01 -C0130349495A003EC7FC003C4A5A5E0038141F00784A5A12704B5A5E006014FF4A90C7FC -A24A5A5DC712074A5AA24A5A5D143F4A5AA24A5A92C8FC5B495AA2495A5C130F4948EB01 -80A2495A5C137F495A16034890C7FC5B1203485AEE0700485A495C001F5D48485C5E4848 -495A49130FB8FCA329397BB833>I<007FB81280B912C0A26C17803204797041>95 -D97 DIIII<147E903803FF8090380FC1E0EB1F8790 -383F0FF0137EA213FCA23901F803C091C7FCADB512FCA3D801F8C7FCB3AB487E387FFFF8 -A31C3B7FBA19>IIII< -EB01C0EB07F0EB0FF8A5EB07F0EB01C090C7FCAAEB01F813FFA313071301B3B3A2123C12 -7E00FF13F01303A214E038FE07C0127C383C0F00EA0FFEEA03F8154984B719>III<2703F00FF0EB1FE000FFD93FFCEB7FF8913AF03F01E0 -7E903BF1C01F83803F3D0FF3800FC7001F802603F70013CE01FE14DC49D907F8EB0FC0A2 -495CA3495CB3A3486C496CEB1FE0B500C1B50083B5FCA340257EA445>I<3903F00FF000 -FFEB3FFCECF03F9039F1C01F803A0FF3800FC03803F70013FE496D7EA25BA35BB3A3486C -497EB500C1B51280A329257EA42E>II<3903F01FE000FFEB7FF89038 -F1E07E9039F3801F803A07F7000FC0D803FEEB07E049EB03F04914F849130116FC150016 -FEA3167FAA16FEA3ED01FCA26DEB03F816F06D13076DEB0FE001F614C09039F7803F0090 -38F1E07E9038F0FFF8EC1FC091C8FCAB487EB512C0A328357EA42E>II<3807E01F00 -FFEB7FC09038E1E3E09038E387F0380FE707EA03E613EE9038EC03E09038FC0080491300 -A45BB3A2487EB512F0A31C257EA421>II<1318A51338A31378A313F8120112031207001FB5FCB6FC -A2D801F8C7FCB215C0A93800FC011580EB7C03017E13006D5AEB0FFEEB01F81A347FB220 ->IIIIII<003FB512FCA2EB8003D83E0013F8003CEB07F00038EB0FE012300070EB -1FC0EC3F800060137F150014FE495AA2C6485A495AA2495A495A495AA290387F000613FE -A2485A485A0007140E5B4848130C4848131CA24848133C48C7127C48EB03FC90B5FCA21F -247EA325>I E -%EndDVIPSBitmapFont -end -%%EndProlog -%%BeginSetup -%%Feature: *Resolution 600dpi -TeXDict begin -%%BeginPaperSize: Letter -letter -%%EndPaperSize - -%%EndSetup -%%Page: 1 1 -1 0 bop 0 162 a Fg(11)17 b(11)h(T)249 180 y(E)295 162 -y(X)h(L)398 145 y Ff(A)435 162 y Fg(T)481 180 y(E)527 -162 y(X)0 353 y Fe(Using)54 b(Libical)p 0 467 3900 24 -v 0 580 a Fg(Eric)28 b(Busb)r(o)r(om)f(\(eric@soft)n(w)n -(arestudio.org\))1921 b(Jan)n(uary)25 b(2000)0 1217 y -Fd(1)131 b(In)l(tro)t(duction)0 1456 y Fg(Libical)23 -b(is)f(an)h(Op)r(en)g(Source)f(implemen)n(tation)h(of)g(the)g -(iCalendar)f(proto)r(cols)f(and)i(proto)r(col)e(data)i(units.)35 -b(The)23 b(iCalendar)0 1570 y(sp)r(eci\034cation)k(describ)r(es)g(ho)n -(w)f(calendar)g(clien)n(ts)i(can)f(comm)n(unicate)f(with)i(calendar)e -(serv)n(ers)f(for)i(users)g(can)g(store)f(their)0 1683 -y(calendar)g(data)h(and)h(arrange)d(meetings)i(with)h(other)f(users.)0 -1840 y(Libical)g(implemen)n(ts)h(the)g(follo)n(wing)e(sp)r -(eci\034cations)h(and)h(proto)r(cols)0 1996 y(iCal)f(Core)g(2445)e -(iTIP)k(2446)c(iMIP)j(2447)e(iRIP)i(draft)g(CAP)g(draft)0 -2153 y(\(The)g(curren)n(t)f(v)n(ersion,)f(0.15,)g(do)r(es)h(not)h -(implemen)n(t)g(iRip)g(or)e(CAP)-7 b(.)29 b(\))0 2309 -y(This)j(do)r(cumen)n(tation)g(assumes)g(that)g(y)n(ou)g(are)f -(familiar)h(with)h(the)f(iCalendar)f(standards)g(RF)n(C2445)g(and)h(RF) -n(C2446.)0 2423 y(these)c(sp)r(eci\034cations)e(are)h(online)g(on)h -(the)g(CALSCH)g(w)n(ebpage)e(at:)p 0 2475 3900 4 v 0 -2617 a Fc(http://www.imc.o)o(rg)o(/ie)o(tf)o(-c)o(ale)o(nd)o(ar)o(/)p -0 2776 V 0 2996 a Fb(1.1)112 b(The)38 b(libical)c(pro)6 -b(ject)0 3207 y Fg(This)29 b(co)r(de)g(is)g(under)g(activ)n(e)f(dev)n -(elopmen)n(t.)40 b(If)30 b(y)n(ou)e(w)n(ould)h(lik)n(e)f(to)h(con)n -(tribute)g(to)g(the)g(pro)5 b(ject,)29 b(y)n(ou)f(can)h(con)n(tact)f -(me,)0 3320 y(Eric)g(Busb)r(o)r(om,)f(at)g(eric@soft)n(w)n -(arestudio.org.)33 b(The)27 b(pro)5 b(ject)27 b(has)g(a)g(w)n(ebpage)g -(at)332 3518 y(h)n(ttp://soft)n(w)n(arestudio.org/libical/index.h)n -(tml)0 3716 y(and)g(a)h(mailing)f(list)g(that)h(y)n(ou)f(can)g(join)h -(b)n(y)f(sending)g(the)h(follo)n(wing)f(mail:)p 0 3769 -V 0 3904 a Fc(To:)42 b(minimalist@softwa)o(re)o(st)o(udi)o(o.)o(or)o(g) -0 4017 y(Subject:)e(subscribe)g(libical)p 0 4176 V 0 -4396 a Fb(1.2)112 b(License)0 4607 y Fg(The)60 b(co)r(de)f(and)h -(data\034les)f(in)h(this)g(distribution)g(are)e(licensed)i(under)g(the) -g(Mozilla)f(Public)h(License.)133 b(See)0 4720 y(h)n -(ttp://www.mozilla.org/NPL/MPL-1.0.h)n(tml)37 b(for)j(a)h(cop)n(y)f(of) -g(the)i(license.)76 b(Alternately)-7 b(,)44 b(y)n(ou)c(ma)n(y)g(use)g -(libical)0 4834 y(under)32 b(the)g(terms)g(of)g(the)g(GNU)h(Library)d -(General)h(Public)i(License.)50 b(See)32 b(h)n(ttp://www.fsf.org/cop)n -(yleft/lesser.h)n(tml)0 4947 y(for)27 b(a)g(cop)n(y)g(of)g(the)h(LGPL.) -0 5104 y(This)j(dual)g(license)f(ensures)h(that)g(the)g(library)f(can)g -(b)r(e)i(incorp)r(orated)d(in)n(to)i(b)r(oth)g(proprietary)e(co)r(de)i -(and)f(GPL'd)i(pro-)0 5217 y(grams,)23 b(and)h(will)h(b)r(ene\034t)g -(from)f(impro)n(v)n(emen)n(ts)e(made)i(b)n(y)g(programmers)e(in)i(b)r -(oth)h(realms.)34 b(I)25 b(will)f(only)g(accept)g(c)n(hanges)0 -5331 y(in)n(to)j(m)n(y)h(v)n(ersion)e(of)h(the)h(library)e(if)i(they)g -(are)f(similarly)f(dual-licensed.)0 5615 y Fb(1.3)112 -b(Purp)s(ose)38 b(&)f(Goals)0 5844 y(1.4)112 b(Do)s(cumen)m(t)37 -b(v)m(ersion)0 6054 y Fg($Id:)g(UsingLibical.lyx,v)26 -b(1.4)h(2000/02/18)22 b(23:06:04)j(eric)i(Exp)h(eric)f($)0 -6386 y Fd(2)131 b(Building)46 b(the)e(Library)0 6624 -y Fg(Libical)37 b(uses)g(auto)r(conf)h(to)f(generate)f(mak)n(e\034les,) -k(although)c(it)i(uses)g(none)f(of)h(the)g(auto)r(conf)f(\035ags)f(to)i -(in\035uence)g(the)0 6738 y(compilation.)e(It)28 b(should)f(built)i -(with)f(no)f(adjustmen)n(ts)h(on)f(Lin)n(ux,)g(F)-7 b(reeBSD)28 -b(and)f(Solaris.)0 7069 y Fd(3)131 b(Structure)0 7308 -y Fg(The)28 b(iCal)f(calendar)f(mo)r(del)i(is)f(based)g(on)h(four)f(t)n -(yp)r(es)g(of)h(ob)5 b(jects:)36 b(comp)r(onen)n(ts,)27 -b(prop)r(erties,)g(v)-5 b(alues)27 b(and)g(parameters.)0 -7464 y(Prop)r(erties)32 b(are)f(the)i(fundamen)n(tal)f(unit)i(of)e -(information)g(in)g(iCal,)i(and)e(they)g(w)n(ork)f(a)h(bit)h(lik)n(e)f -(a)g(hash)g(en)n(try)-7 b(,)34 b(with)e(a)0 7578 y(constan)n(t)21 -b(k)n(ey)h(and)g(a)f(v)-5 b(ariable)21 b(v)-5 b(alue.)35 -b(Prop)r(erties)21 b(ma)n(y)h(also)f(ha)n(v)n(e)g(mo)r(di\034ers,)h -(called)g(parameters.)33 b(In)22 b(the)h(iCal)f(con)n(ten)n(t)0 -7691 y(line)p 0 7728 V 0 7863 a Fc(ORGANIZER;ROLE=C)o(HA)o(IR:)o(MA)o -(IL)o(TO:)o(mr)o(bi)o(g@h)o(os)o(t.)o(com)p eop -%%Page: 2 2 -2 1 bop 0 -167 3900 5 v 0 -200 a Fa(4.)73 b(Di\033erences)31 -b(F)-8 b(rom)31 b(RF)m(Cs)2732 b Fg(2)p 0 162 3900 4 -v 0 312 a(The)34 b(prop)r(ert)n(y)f(name)h(is)g("OR)n(GANIZER,")g(the)g -(v)-5 b(alue)34 b(of)h(the)f(prop)r(ert)n(y)f(is)h("mrbig@host.com")e -(and)i(the)g("R)n(OLE")0 425 y(parameter)26 b(sp)r(eci\034es)h(that)h -(Mr)g(Big)f(is)g(the)h(c)n(hair)e(of)i(the)g(meetings)f(asso)r(ciated)f -(with)i(this)g(prop)r(ert)n(y)-7 b(.)0 582 y(Comp)r(onen)n(ts)26 -b(are)f(groups)g(of)h(prop)r(erties)f(that)i(represen)n(t)e(the)i(core) -e(ob)5 b(jects)26 b(of)g(a)g(calendar)f(system,)h(suc)n(h)g(as)g(ev)n -(en)n(ts)f(or)0 695 y(timezones.)0 852 y(The)k(cen)n(tral)f(goal)g(of)h -(libical)g(is)g(to)g(parse)f(iTIP)i(data)e(in)n(to)h(an)g(in)n(ternal)f -(represen)n(tation)g(of)h(Comp)r(onen)n(ts,)g(Prop)r(erties,)0 -965 y(P)n(arameters)d(an)h(V)-7 b(alues,)27 b(and)h(to)f(allo)n(w)g -(the)h(user)f(to)g(manipulate)g(the)h(data)g(in)f(v)-5 -b(arious)27 b(w)n(a)n(ys)0 1257 y Fb(3.1)112 b(Comp)s(onen)m(ts)0 -1486 y(3.2)g(Prop)s(erties)0 1715 y(3.3)g(V)-9 b(alues)0 -1944 y(3.4)112 b(P)m(arameters)0 2173 y(3.5)g(En)m(umerations)0 -2402 y(3.6)g(T)m(yp)s(es)0 2631 y(3.7)g(The)38 b(P)m(arser)0 -2860 y(3.8)112 b(Restrictions)0 3089 y(3.9)g(Memory)37 -b(Managemen)m(t)0 3356 y Fd(4)131 b(Di\033erences)44 -b(F)-11 b(rom)43 b(RF)l(Cs)0 3594 y Fg(Libical)c(has)f(b)r(een)h -(designed)g(to)f(follo)n(w)h(the)g(standards)e(as)i(closely)f(as)g(p)r -(ossible,)j(so)e(that)g(the)g(k)n(ey)f(ob)5 b(jects)39 -b(in)g(the)0 3708 y(standards)30 b(are)g(also)g(k)n(eey)g(ob)5 -b(jects)31 b(in)h(the)f(library)-7 b(.)47 b(Ho)n(w)n(ev)n(er,)30 -b(there)h(are)f(a)h(few)g(areas)e(where)i(the)h(sp)r(eci\034cations)e -(are)0 3821 y(\(arguably\))g(irregular,)h(and)g(follo)n(wing)g(them)h -(exactly)f(w)n(ould)g(result)h(in)g(an)f(unfriendly)h(in)n(terface.)49 -b(These)31 b(deviations)0 3935 y(mak)n(e)c(libical)g(easier)f(to)i(use) -f(b)n(y)h(main)n(taining)e(a)h(self-similar)g(in)n(terface.)0 -4227 y Fb(4.1)112 b(Pseudo)38 b(Comp)s(onen)m(ts)0 4437 -y Fg(Libical)g(de\034nes)g(comp)r(onen)n(ts)g(for)g(groups)f(of)i(prop) -r(erties)e(that)i(lo)r(ok)e(and)i(act)f(lik)n(e)g(comp)r(onen)n(ts,)i -(but)f(are)f(not)g(de-)0 4550 y(\034ned)c(as)f(comp)r(onen)n(ts)g(in)h -(the)g(sp)r(eci\034cation.)54 b(XD)n(A)-7 b(YLIGHT)35 -b(and)e(XST)-7 b(AND)n(ARD)36 b(are)c(notable)h(examples.)54 -b(These)0 4664 y(pseudo)23 b(comp)r(onen)n(ts)g(group)g(prop)r(erties)g -(within)h(the)g(VTIMEZONE)h(comp)r(onen)n(ts.)35 b(XD)n(A)-7 -b(YLIGHT)25 b(starts)d(with)j("BE-)0 4777 y(GIN:D)n(A)-7 -b(YLIGHT")35 b(and)f(ends)g(with)g("END:D)n(A)-7 b(YLIGHT,)36 -b(just)e(lik)n(e)g(other)f(comp)r(onen)n(ts,)i(but)g(is)f(not)g -(de\034ned)g(as)f(a)0 4891 y(comp)r(onen)n(t)27 b(in)h(RF)n(C2445.)35 -b(\()28 b(See)f(RF)n(C2445,)f(page)h(61)f(\))i(In)g(Libical,)f(it)h(is) -g(a)f(comp)r(onen)n(t.)0 5047 y(There)35 b(are)g(also)g(pseudo)h(comp)r -(onen)n(ts)f(that)i(are)e(conceptually)g(deriv)n(ed)g(classess)f(of)i -(V)-9 b(ALARM.)37 b(RF)n(C2446)d(de\034nes)0 5161 y(what)d(prop)r -(erties)f(ma)n(y)g(b)r(e)h(included)g(in)g(eac)n(h)f(comp)r(onen)n(t,)i -(and)e(for)h(V)-9 b(ALARM,)31 b(the)g(set)g(of)g(prop)r(erties)f(it)h -(ma)n(y)f(ha)n(v)n(e)0 5275 y(dep)r(ends)e(on)f(the)h(v)-5 -b(alue)28 b(of)f(the)h(A)n(CTION)f(prop)r(ert)n(y)-7 -b(.)0 5431 y(F)g(or)19 b(instance,)j(if)e(a)g(V)-9 b(ALARM)20 -b(comp)r(onen)n(t)g(has)f(an)h(A)n(CTION)g(prop)r(ert)n(y)e(with)j(the) -f(v)-5 b(alue)20 b(of)g("A)n(UDIO,")f(the)h(comp)r(onen)n(t)0 -5545 y(m)n(ust)h(also)g(ha)n(v)n(e)f(an)h("A)-7 b(TT)g(A)n(CH")21 -b(prop)r(ert)n(y)-7 b(.)34 b(Ho)n(w)n(ev)n(er,)20 b(if)i(the)g(A)n -(CTION)f(v)-5 b(alue)21 b(is)g("DISPLA)-7 b(Y,")22 b(the)g(comp)r(onen) -n(t)f(m)n(ust)0 5658 y(ha)n(v)n(e)26 b(a)i(DESCRIPTION)g(prop)r(ert)n -(y)-7 b(.)p eop -%%Page: 3 3 -3 2 bop 0 -167 3900 5 v 0 -200 a Fa(5.)73 b(Implemen)m(tation)29 -b(Limitations)2539 b Fg(3)0 162 y(T)-7 b(o)28 b(handle)g(these)g(v)-5 -b(arious,)27 b(complex)h(restrictions,)f(libical)h(has)g(pseudo)g(comp) -r(onen)n(ts)f(for)h(eac)n(h)f(t)n(yp)r(e)i(of)f(alarm:)37 -b(XA)n(U-)0 275 y(DIO)n(ALARM,)28 b(XDISPLA)-7 b(Y)g(ALARM,)30 -b(XEMAILALARM)f(and)f(XPR)n(OCEDUREALARM.)0 567 y Fb(4.2)112 -b(Com)m(bined)37 b(V)-9 b(alues)0 777 y Fg(Man)n(y)34 -b(v)-5 b(alues)34 b(can)g(tak)n(e)g(more)g(than)g(one)h(t)n(yp)r(e.)58 -b(TRIGGER,)35 b(for)f(instance,)i(can)e(ha)n(v)n(e)g(a)g(v)-5 -b(alue)34 b(t)n(yp)r(e)h(of)g(with)g(DU-)0 890 y(RA)-7 -b(TION)32 b(or)f(of)h(D)n(A)-7 b(TE-TIME.)33 b(These)f(m)n(ultiple)g(t) -n(yp)r(es)g(mak)n(e)f(it)i(di\036cult)g(to)e(create)g(routines)h(to)f -(return)h(the)g(v)-5 b(alue)0 1004 y(asso)r(ciated)26 -b(with)i(a)f(prop)r(ert)n(y)-7 b(.)0 1161 y(It)30 b(is)g(natural)g(to)f -(ha)n(v)n(e)g(in)n(terfaces)g(that)i(w)n(ould)e(return)h(the)g(v)-5 -b(alue)30 b(of)g(a)g(prop)r(ert)n(y)-7 b(,)29 b(but)i(it)f(is)g(cum)n -(b)r(ersone)f(for)h(a)g(single)0 1274 y(routine)i(to)g(return)g(m)n -(ultiple)h(t)n(yp)r(es.)51 b(So,)33 b(in)g(libical,)g(prop)r(erties)e -(that)i(can)f(ha)n(v)n(e)f(m)n(ultiple)i(t)n(yp)r(es)f(are)f(giv)n(en)h -(a)g(single)0 1388 y(t)n(yp)r(e)26 b(that)g(is)g(the)g(union)g(of)g -(their)g(RF)n(C2445)e(t)n(yp)r(es.)36 b(F)-7 b(or)26 -b(instance,)g(in)g(libical,)g(the)g(v)-5 b(alue)26 b(of)g(the)g -(TRIGGER)h(prop)r(ert)n(y)0 1501 y(resolv)n(es)e(to)j(struct)f -(icaltriggert)n(yp)r(e.)35 b(This)28 b(t)n(yp)r(e)f(is)h(a)f(union)h -(of)f(a)g(DURA)-7 b(TION)29 b(and)e(a)g(D)n(A)-7 b(TE-TIME.)0 -1793 y Fb(4.3)112 b(Multi-V)-9 b(alued)36 b(Prop)s(erties)0 -2003 y Fg(Some)31 b(prop)r(erties,)h(suc)n(h)f(as)g(CA)-7 -b(TEGORIES)33 b(ha)n(v)n(e)d(only)h(one)g(v)-5 b(alue)32 -b(t)n(yp)r(e,)h(but)f(eac)n(h)e(CA)-7 b(TEGORIES)33 b(prop)r(ert)n(y)d -(can)0 2116 y(ha)n(v)n(e)24 b(m)n(ultiple)h(v)-5 b(alue)25 -b(instances.)35 b(This)25 b(also)f(results)g(in)h(a)g(cum)n(b)r(ersome) -f(in)n(terface)g(\025)g(CA)-7 b(TEGORIES)26 b(accessors)d(w)n(ould)0 -2230 y(ha)n(v)n(e)k(to)i(return)f(a)g(list)g(while)h(all)f(other)g -(accessors)e(returned)i(a)g(single)g(v)-5 b(alue.)39 -b(In)29 b(libical,)g(all)f(prop)r(erties)f(ha)n(v)n(e)h(a)g(single)0 -2344 y(v)-5 b(alue,)35 b(and)e(m)n(ulti-v)-5 b(alued)33 -b(prop)r(erties)f(are)h(brok)n(en)f(do)n(wn)g(in)n(to)h(m)n(ultiple)h -(single)f(v)-5 b(alued)33 b(prop)r(erties)g(during)f(parsing.)0 -2457 y(That)c(is,)f(an)g(input)i(line)e(lik)n(e,)p 0 -2526 3900 4 v 0 2703 a Fc(CATEGORIES:)39 b(work,)i(home)p -0 2903 V 0 3053 a Fg(b)r(ecomes)27 b(in)h(libical's)f(in)n(ternal)g -(represen)n(tation)p 0 3122 V 0 3299 a Fc(CATEGORIES:)39 -b(work)0 3412 y(CATEGORIES:)g(home)p 0 3612 V 0 3767 -a Fg(Oddly)-7 b(,)34 b(RF)n(C2445)d(allo)n(ws)g(some)h(m)n(ulti-v)-5 -b(alued)33 b(prop)r(erties)f(\()h(lik)n(e)g(FREEBUSY)h(\))f(to)g(exist) -g(as)f(b)r(oth)h(a)f(m)n(ulti-v)-5 b(alues)0 3881 y(prop)r(ert)n(y)24 -b(and)h(as)f(m)n(ultiple)h(single)g(v)-5 b(alue)24 b(prop)r(erties,)h -(while)g(others)f(\()i(lik)n(e)e(CA)-7 b(TEGORIES)26 -b(\))f(can)g(only)g(exist)f(as)h(single)0 3994 y(m)n(ulti-v)-5 -b(alued)32 b(prop)r(erties.)48 b(This)31 b(mak)n(es)g(the)h(in)n -(ternal)f(represen)n(tation)e(for)i(CA)-7 b(TEGORIES)33 -b(illegal.)48 b(Ho)n(w)n(ev)n(er)30 b(when)0 4108 y(y)n(ou)d(con)n(v)n -(ert)f(a)h(comp)r(onen)n(t)g(to)h(a)f(string,)g(the)h(library)e(will)i -(collect)f(all)g(of)h(the)g(CA)-7 b(TEGORIES)28 b(prop)r(erties)f(in)n -(to)g(one.)0 4446 y Fd(5)131 b(Implemen)l(tation)44 b(Limitations)0 -4742 y(6)131 b(Using)44 b(libical)0 4999 y Fb(6.1)112 -b(Creating)37 b(Comp)s(onen)m(ts)0 5209 y Fg(There)e(are)g(three)h(w)n -(a)n(ys)e(to)i(create)e(comp)r(onen)n(ts)i(in)g(Libical:)53 -b(creating)34 b(individual)i(ob)5 b(jects)35 b(and)h(assem)n(bling)e -(them,)0 5323 y(building)28 b(en)n(tire)f(ob)5 b(jects)27 -b(in)h(massiv)n(e)e(v)-5 b(aargs)26 b(calls,)h(and)g(parsing)f(a)h -(text)h(\034le)g(con)n(taining)e(iCalendar)h(data.)p -eop -%%Page: 4 4 -4 3 bop 0 -167 3900 5 v 0 -200 a Fa(6.)73 b(Using)32 -b(libical)3190 b Fg(4)0 162 y Fa(6.1.1)94 b(Constructor)32 -b(In)m(terfaces)0 372 y Fg(Using)d(constructor)f(in)n(terfaces,)h(y)n -(ou)f(create)h(eac)n(h)f(of)i(the)f(ob)5 b(jects)29 b(sep)r(erately)g -(and)g(them)h(assem)n(ble)e(them)i(in)g(to)f(com-)0 485 -y(p)r(onen)n(ts:)p 0 555 3900 4 v 0 738 a Fc(event)41 -b(=)j(icalcomponent_n)o(ew)o(\(IC)o(AL)o(_V)o(EVE)o(NT)o(_C)o(OMP)o(ON) -o(EN)o(T\);)0 852 y(icalcomponent_ad)o(d_)o(pro)o(pe)o(rt)o(y\(e)o(ve)o -(nt)o(,)38 b(icalproperty_ne)o(w_)o(dts)o(ta)o(mp)o(\(at)o(im)o(e\))f -(\);)0 965 y(icalcomponent_ad)o(d_)o(pro)o(pe)o(rt)o(y\(e)o(ve)o(nt)o -(,ic)o(al)o(pr)o(ope)o(rt)o(y_)o(new)o(_u)o(id\()o(st)o(rd)o(up\()o("g) -o(ui)o(d-1)o(.h)o(os)o(t1.)o(co)o(m")o(\)\))g(\);)0 1079 -y(property=icalpro)o(pe)o(rty)o(_n)o(ew)o(_or)o(ga)o(ni)o(zer)o(\(s)o -(tr)o(dup)o(\(")o(mr)o(big)o(@h)o(ost)o(.c)o(om)o("\)\))o(;)0 -1192 y(icalproperty_add)o(_p)o(ara)o(me)o(te)o(r\(p)o(ro)o(pe)o(rty)o -(,i)o(ca)o(lpa)o(ra)o(me)o(ter)o(_n)o(ew_)o(ro)o(le)o(\(IC)o(AL)o(_R)o -(OLE)o(_C)o(HA)o(IR\))g(\);)0 1306 y(icalcomponent_ad)o(d_)o(pro)o(pe)o -(rt)o(y\(e)o(ve)o(nt)o(,pr)o(op)o(er)o(ty\))o(;)p 0 1506 -V 0 1722 a Fa(6.1.2)94 b(v)-5 b(aargs)32 b(Constructors)0 -1932 y(6.1.3)94 b(P)m(arsing)32 b(T)-8 b(ext)32 b(Files)0 -2161 y Fb(6.2)112 b(A)m(ccessing)37 b(Comp)s(onen)m(ts)0 -2371 y Fa(6.2.1)94 b(Finding)30 b(Comp)s(onen)m(ts)0 -2582 y(6.2.2)94 b(Remo)m(ving)29 b(Comp)s(onen)m(ts)0 -2792 y Fg(Remo)n(ving)23 b(an)h(elemen)n(t)h(from)f(a)g(list)g(while)h -(iterating)e(through)h(the)h(list)f(can)g(cause)g(problems,)g(since)g -(y)n(ou)g(will)g(probably)0 2905 y(b)r(e)e(remo)n(ving)e(the)i(elemen)n -(t)g(that)g(the)g(in)n(ternal)f(iterator)f(p)r(oin)n(ts)i(to.)34 -b(This)22 b(will)g(result)f(in)h(the)g(iteration)f(lo)r(op)h -(terminating)0 3019 y(immediately)29 b(after)f(remo)n(ving)g(the)h -(elemen)n(t.)41 b(T)-7 b(o)28 b(a)n(v)n(oid)g(the)h(problem,)f(y)n(ou)h -(will)g(need)g(to)f(step)h(the)h(iterator)d(ahead)h(of)0 -3132 y(the)g(elemen)n(t)g(y)n(ou)e(are)h(going)f(to)i(remo)n(v)n(e,)e -(lik)n(e)h(this:)p 0 3202 V 0 3385 a Fc(for\(c)41 b(=)j -(icalcomponent_g)o(et)o(_fi)o(rs)o(t_)o(com)o(po)o(ne)o(nt\()o(pa)o(re) -o(nt_)o(co)o(mp,)o(IC)o(AL)o(_AN)o(Y_)o(CO)o(MPO)o(NE)o(NT)o(\);)305 -3499 y(c)f(!=)g(0;)305 3612 y(c)g(=)g(next)0 3726 y({)174 -3839 y(next)f(=)h(icalcomponent_get)o(_n)o(ex)o(t_c)o(om)o(po)o(nen)o -(t\()o(pa)o(ren)o(t_)o(com)o(p,)o(IC)o(AL_)o(AN)o(Y_)o(COM)o(PO)o(NE)o -(NT\))o(;)174 3953 y(icalcomponent_rem)o(ov)o(e_)o(com)o(po)o(ne)o -(nt\()o(pa)o(re)o(nt_)o(co)o(mp)o(,c\))o(;)0 4067 y(})p -0 4267 V eop -%%Page: 5 5 -5 4 bop 0 -167 3900 5 v 0 -200 a Fa(6.)73 b(Using)32 -b(libical)3190 b Fg(5)0 162 y Fa(6.2.3)94 b(Finding)30 -b(Prop)s(erties)0 372 y(6.2.4)94 b(Remo)m(ving)29 b(Prop)s(erties)0 -582 y(6.2.5)94 b(Getting)31 b(V)-8 b(alues)0 792 y(6.2.6)94 -b(Setting)31 b(V)-8 b(alues)0 1002 y(6.2.7)94 b(Getting)31 -b(P)m(arameters)0 1212 y(6.2.8)94 b(Setting)31 b(P)m(arameters)0 -1422 y(6.2.9)94 b(Remo)m(ving)29 b(P)m(arameters)0 1632 -y(6.2.10)93 b(Chec)m(king)32 b(Comp)s(onen)m(t)e(V)-8 -b(alidit)m(y)0 1861 y Fb(6.3)112 b(Storing)37 b(Ob)6 -b(jects)0 2071 y Fg(The)27 b(libical)g(distribution)h(inclues)f(a)g -(sep)r(erate)f(library)-7 b(,)26 b(libicalss,)h(that)g(allo)n(ws)f(y)n -(ou)g(to)i(store)e(iCal)h(comp)r(onen)n(t)g(data)f(to)0 -2185 y(disk)h(in)h(a)f(v)-5 b(ariet)n(y)27 b(of)h(w)n(a)n(ys.)35 -b(This)27 b(library)g(is)g(do)r(cumen)n(ted)h(sep)r(erately)-7 -b(.)0 2476 y Fb(6.4)112 b(Memory)37 b(Managemen)m(t)0 -2686 y Fg(Libical)25 b(relies)f(hea)n(vily)g(on)h(dynamic)g(allo)r -(cation)f(for)h(b)r(oth)h(the)f(core)f(ob)5 b(jects)25 -b(and)g(for)f(the)i(strings)e(used)h(to)g(hold)g(v)-5 -b(alues.)0 2800 y(Some)34 b(of)f(this)h(memory)f(the)h(library)f -(caller)g(o)n(wns)g(and)g(m)n(ust)h(free,)h(and)f(some)f(of)h(the)g -(memory)f(is)h(managed)e(b)n(y)i(the)0 2914 y(library)-7 -b(.)36 b(Here)27 b(is)g(a)g(summary)g(of)h(the)g(memory)e(rules.)0 -3153 y Fa(1\))208 3300 y Fg(If)k(the)g(function)g(name)g(has)f -Fc(")p Fg(new)p Fc(")g Fg(in)h(it,)h(the)f(caller)f(gets)g(con)n(trol)g -(of)h(the)g(memory)-7 b(.)42 b(\()31 b(suc)n(h)e(as)g(icalcomp)r(onen-) -208 3413 y(t_new\(\),)f(or)e(icalprop)r(ert)n(y_new_clone\(\))f(\))0 -3593 y Fa(2\))208 3740 y Fg(If)j(y)n(ou)g(got)g(the)h(memory)f(from)g -(a)g(routine)g(with)h(new)f(in)h(it,)g(y)n(ou)f(m)n(ust)h(call)f(the)h -(corresp)r(onding)d(*_free)i(routine)208 3854 y(to)f(free)g(the)h -(memory)-7 b(.)36 b(\()28 b(Use)g(icalcomp)r(onen)n(t_free\(\))e(to)i -(free)f(ob)5 b(jects)27 b(created)g(with)h(icalcomp)r(onen)n -(t_new\(\)\))0 4034 y Fa(3\))208 4181 y Fg(If)h(the)g(function)g(name)f -(has)g Fc(")p Fg(add)p Fc(")g Fg(in)h(it,)g(the)g(caller)e(is)i -(transfering)e(con)n(trol)g(of)i(the)g(memory)f(to)g(the)h(routine.)40 -b(\()208 4294 y(icalprop)r(ert)n(y_add_parameter\(\))23 -b(\))0 4474 y Fa(4\))208 4621 y Fg(If)29 b(the)h(function)g(name)f(has) -g Fc(")p Fg(remo)n(v)n(e)p Fc(")e Fg(in)j(it,)g(the)g(caller)f(passes)f -(in)i(a)f(p)r(oin)n(ter)g(to)g(an)g(ob)5 b(ject)29 b(and)h(after)f(the) -g(call)208 4735 y(returns,)j(the)h(caller)e(o)n(wns)g(the)h(ob)5 -b(ject.)50 b(So,)33 b(b)r(efore)f(y)n(ou)f(call)h(icalcomp)r(onen)n -(t_remo)n(v)n(e_prop)r(ert)n(y\(comp,fo)r(o\),)208 4848 -y(y)n(ou)26 b(do)i(not)f(o)n(wn)g Fc(")p Fg(fo)r(o)p -Fc(")g Fg(and)g(after)g(the)h(call)f(returns,)g(y)n(ou)g(do.)0 -5028 y Fa(5\))208 5175 y Fg(If)d(the)g(routine)f(returns)g(a)g(string,) -h(libical)g(o)n(wns)f(the)h(memory)f(and)g(will)h(put)g(it)h(on)e(a)g -(ring)g(bu\033er)h(to)g(reclaim)f(later.)208 5288 y(Y)-7 -b(ou'd)27 b(b)r(etter)h(strdup\(\))g(it)g(if)g(y)n(ou)f(w)n(an)n(t)g -(to)h(k)n(eep)f(it,)h(and)f(y)n(ou)g(don't)h(ha)n(v)n(e)e(to)h(delete)h -(it.)0 5580 y Fb(6.5)112 b(Error)36 b(Handling)0 5790 -y Fg(icalerror_errno.)c(Return)c(v)-5 b(alues.)37 b(#de\034nes.)g -(icalerror_stop_here)p eop -%%Page: 6 6 -6 5 bop 0 -167 3900 5 v 0 -200 a Fa(7.)73 b(Useful)32 -b(Recipies)3067 b Fg(6)0 162 y Fa(6.5.1)94 b(Return)31 -b(v)-5 b(alues)0 372 y(6.5.2)94 b(icalerrno)0 582 y(6.5.3)g(Comp)s -(onen)m(t)29 b(errors)0 811 y Fb(6.6)112 b(Naming)36 -b(Standard)0 1021 y Fg(Structures)26 b(that)i(y)n(ou)e(access)f(with)j -(the)f("struct")f(k)n(eyw)n(ord,)f(suc)n(h)h(as)h("struct)f(icaltimet)n -(yp)r(e")g(are)g(things)h(that)g(y)n(ou)f(are)0 1134 -y(allo)n(w)n(ed)g(to)i(see)f(inside)g(and)h(p)r(ok)n(e)f(at.)0 -1291 y(Structures)33 b(that)h(y)n(ou)e(access)g(though)i(a)f(t)n(yp)r -(edef,)i(suc)n(h)e(as)g("icalcomp)r(onen)n(t")e(are)i(things)g(where)g -(all)g(of)h(the)f(data)g(is)0 1405 y(hidden.)0 1561 y(Comp)r(onen)n(t) -28 b(names)g(that)h(start)f(with)h("V")f(are)f(part)h(of)h(RF)n(C)f -(2445)f(or)g(another)h(iCal)g(standard.)38 b(Comp)r(onen)n(t)29 -b(names)0 1675 y(that)h(start)f(with)i("X")e(are)g(also)g(part)g(of)h -(the)g(sp)r(ec,)g(but)h(they)f(are)f(not)h(actually)f(comp)r(onen)n(ts) -g(in)h(the)g(sp)r(ec.)44 b(Ho)n(w)n(ev)n(er,)0 1788 y(they)34 -b(lo)r(ok)f(and)g(act)h(lik)n(e)f(comp)r(onen)n(ts,)h(so)f(they)h(are)f -(comp)r(onen)n(ts)g(in)h(libical.)55 b(Names)33 b(that)h(start)f(with)h -("XLIC")f(or)0 1902 y("X-LIC")26 b(are)h(not)h(part)f(of)g(an)n(y)g -(iCal)g(sp)r(ec.)37 b(They)27 b(are)g(used)h(in)n(ternally)e(b)n(y)i -(libical.)0 2058 y(En)n(ums)d(that)f(iden)n(tify)h(a)f(comp)r(onen)n -(t,)h(prop)r(ert)n(y)-7 b(,)24 b(v)-5 b(alue)24 b(or)g(parameter)e(end) -j(with)g("_COMPONENT,")e("_PR)n(OPER-)0 2172 y(TY,")k("_V)-9 -b(ALUE,")28 b(or)e("_P)-7 b(AAMETER"s)0 2328 y(En)n(ums)31 -b(that)f(iden)n(tify)h(a)f(parameter)f(v)-5 b(alue)30 -b(ha)n(v)n(e)f(the)i(name)f(of)h(the)f(parameter)f(as)h(the)h(second)e -(w)n(ord.)45 b(F)-7 b(or)29 b(instance:)0 2442 y(ICAL_R)n(OLE_REQP)-7 -b(AR)g(TICIP)g(ANT)29 b(or)d(ICAL_P)-7 b(AR)g(TST)g(A)g(T_A)n(CCEPTED.) -0 2598 y(The)28 b(en)n(ums)f(for)g(the)h(parts)f(of)g(a)g(recurarance)e -(rule)j(and)f(request)g(statuses)g(are)f(irregular.)0 -2937 y Fd(7)131 b(Useful)44 b(Recipies)0 3175 y Fg(Iteration)0 -3332 y(Cop)n(ying)26 b(comp)r(onen)n(ts.)37 b(Remem)n(b)r(er)27 -b(that)h(y)n(ou)f(m)n(ust)g(clone)g(or)g(remo)n(v)n(e)f(an)h(ob)5 -b(ject)28 b(b)r(efore)f(putting)h(in)g(on)f(anothr)g(list.)0 -3488 y(Finding)h(compliance)f(errors)0 3827 y Fd(8)131 -b(P)l(erformance)0 4065 y Fg(Chec)n(king)27 b(restrictions)f(is)h -(computationally)g(exp)r(ensiv)n(e)0 4404 y Fd(9)131 -b(Hac)l(ks)45 b(and)e(Bugs)p eop -%%Trailer -end -userdict /end-hook known{end-hook}if -%%EOF diff --git a/libical/doc/UsingLibical.sgml b/libical/doc/UsingLibical.sgml deleted file mode 100644 index d967bd860c..0000000000 --- a/libical/doc/UsingLibical.sgml +++ /dev/null @@ -1,318 +0,0 @@ - - - -
- -Using Libical - - -Eric Busboom (eric@softwarestudio.org) - - -January 2000 - - -Introduction -

-Libical is an Open Source implementation of the iCalendar protocols and - protocol data units. The iCalendar specification describes how calendar clients - can communicate with calendar servers for users can store their calendar data - and arrange meetings with other users. -

-

-Libical implements the following specifications and protocols -

-

-iCal Core -2445 -iTIP -2446 -iMIP -2447 -iRIP -draft -CAP -draft -

-

-(The current version, 0.14, does not implement iRip or CAP. ) -

-

-This code is under active development. If you would like to contribute - to the project, you can contact me, Eric Busboom, at eric@softwarestudio.org. - The project has a webpage at -

-

- -http://softwarestudio.org/libical/index.html - -

-and a mailing list that you can join by sending the following mail: -

-

- ------------- -To: minimalist@softwarestudio.org -Subject: subscribe libical ------------- - -

-$Id: UsingLibical.lyx,v 1.3 2000/01/06 06:20:06 eric Exp eric $ -

- -License -

-The code and datafiles in this distribution are licensed under the Mozilla - Public License. See http://www.mozilla.org/NPL/MPL-1.0.html for a copy of the - license. Alternately, you may use libical under the terms of the GNU Library - General Public License. See http://www.fsf.org/copyleft/lesser.html for a copy - of the LGPL. -

-

-This dual license ensures that the library can be incorporated into both - proprietary code and GPL'd programs, and will benefit from improvements made - by programmers in both realms. I will only accept changes into my version of - the library if they are similarly dual-licensed. -

- -Purpose & Goals - -Building the Library - -Structure -

-The iCal calendar model is based on four types of objects: components, - properties, values and parameters. -

-

-Components are the fundamental grouping of calendar information -

-

-Properties are the fundamental unit of information. Each property is composed - of a type, a value and collection of parameters. -

- -Components -

-Components are named clusters of properties -

- -Properties - -Values - -Parameters - -Storage - -Cluster - -Store - -Calendar - -Other bits -

-Restrictions -

-

-Types -

- -Differences From RFCs -

-Although libical has been design to follow the standards as closely as - possible, there are a few areas where the specifications are irregular, and - following them exactly would result in an unfriendly interface. -

- -Pseudo Components -

-Libical defines pseudo components for groups of properties that look and - act like components, but are not defined as components in the specification. - XDAYLIGHT and XSTANDARD are notable examples. These pseudo components group - properties within the VTIMEZONE components. XDAYLIGHT starts with "BEGIN:DAYLIGHT" - and ends with "END:DAYLIGHT, just like other components, but is not defined - as a component in RFC2445. ( See RFC2445, page 61 ) In Libical, it is a component. - -

-

-There are also pseudo componentsthat are conceptually derived classess - of VALARM. RFC2446 defines what properties may be included in each component, - and for VALARM, the set of properties it may have depends on the value of the - ACTION property. -

-

-For instance, if a VALARM component has an ACTION property with the value - of "AUDIO," the component must also have an "ATTACH" property. However, if the - ACTION value is "DISPLAY," the component must have a DESCRIPTION property. -

-

-To handle these various, complex restrictions, libical has pseudo components - for each type of alarm: XAUDIOALARM, XDISPLAYALARM, XEMAILALARM and XPROCEDUREALARM. - -

- -Combined Values -

-Many values can take more than one type. TRIGGER, for instance, can have - a value type of with DURATION or of DATE-TIME. It is natural to have interfaces - that would return the value of a property, but it is cumbersone for a single - routine to return multiple types. So, in libical, properties that can have - multiple types are given a single type that is the union of their RFC2445 types. - In libical, the value of the TRIGGER property resolves to -

-

-struct icaltriggertype -

-

-This type is a union of a DURATION and a DATE-TIME. -

- -Multi-Valued Properties -

-Some properties, such as CATEGORIES, have a single value type, but may - have multiple values in a single instance. This also results in a cumbersome - interface -- CATEGORIES accessors would have to return a list which all other - accessors returned a single value. In libical, all properties have a single - value, and multi-valued properties are broken down into multiple single valued - properties during parsing. The is, -

-

- -CATEGORIES: work, home - -

-becomes in libical's internal representation -

-

- -CATEGORIES: work -CATEGORIES: home - -

-Oddly, RFC2445 allows some multi-valued properties ( like FREEBUSY ) to - exist as both a multi-values property and as multiple single value properties, - while others ( like CATEGORIES ) can only exist as single multi-valued properties. - This makes the internal representation for CATEGORIES illegal. However when - you convert a component to a string, the library will collect all of the CATEGORIES - properties into one. -

- -Implementation Limitations - -Using libical - -Creating Components - -Constructor interfaces - -vaargs Constructors - -Parsing Text Files - -Accessing Components - -Finding Components - -Removing Components -

-Removing an element from a list while iterating through the list can cause - problems, since you will probably be removing the element that the internal - iterator points to. This will result in the iteration loop terminating immediately - after removing the element. To avoid the problem, you will need to step the - iterator ahead of the element you are going to remove, like this: -

-

- -for(c = icalcomponent_get_first_component(s); - c != 0; - c = next) -{ - next = icalcomponent_get_next_component(s); - icalcomponent_remove_component(s,c); -} - -

-Finding Properties - -Removing Properties - -Getting Values - -Setting Values - -Getting Parameters - -Setting Parameters - -Removing Parameters - -Storing Objects -

-When you store a component to the database with icalstore_add_component, - you give the library takes the memory, so the caller does not own the component - anymore. If you want to keep ownership, use clone to make a copy. ( See "Memory - Management" and "Naming Starndard for more about routines with "add" in the name. - ) -

- -Memory Management -

-Here are the memory rules for the C library: -

-

- - -1)If the function name has "new" in it, the caller gets - control of the memory. ( such as icalcomponent_new(), or icalproperty_new_clone() - ) - -2)If you got the memory from a routine with new in it, you must - call the corresponding *_free routine to free the memory. ( Use icalcomponent_free() - to free objects created with icalcomponent_new()) - -3)If the function name has "add" in it, the caller is - transfering control of the memory to the routine. ( icalproperty_add_parameter() - ) - -4)If the function name has "remove" in it, the caller - passes in a pointer to an object and after the call returns, the caller owns - the object. So, before you call icalcomponent_remove_property(comp,foo), you - do not own "foo" and after the call returns, you do. - -5)If the routine returns a string, libical owns the memory and will - put it on a ring buffer to reclaim later. You'd better strdup it if you want - to keep it, and you don't have to delete it. - -

-Error Handling - -Return values - -icalerrno - -Component errors - -Naming Standard -

-Structures that you access with the "struct" keyword, such as "struct icaltimetype" - are things that you are allowed to see inside and poke at. -

-

-Structures that you access though a typedef, such as "icalcomponent" are - things where all of the data is hidden. -

-

-Component names that start with "V" are part of RFC 2445 or another iCal - standard. Component names that start with "X" are also part of the spec, but - they are not actually components in the spec. However, they look and act like - components, so they are components in libical. Names that start with "XLIC" or - "X-LIC" are not part of any iCal spec. They are used internally by libical. -

- -Hacks and Bugs - - -
diff --git a/libical/doc/UsingLibical.txt b/libical/doc/UsingLibical.txt deleted file mode 100644 index f80ea31121..0000000000 --- a/libical/doc/UsingLibical.txt +++ /dev/null @@ -1,302 +0,0 @@ - - -Using Libical - -Eric Busboom (eric@softwarestudio.org) - -January 2000 - -1 Introduction - -Libical is an Open Source implementation of the iCalendar protocols -and protocol data units. The iCalendar specification describes how -calendar clients can communicate with calendar servers for users can -store their calendar data and arrange meetings with other users. - -Libical implements the following specifications and protocols - -+----------+-------+ -|iCal Core | 2445 | -+----------+-------+ -+----------+-------+ -| iTIP | 2446 | -+----------+-------+ -+----------+-------+ -| iMIP | 2447 | -+----------+-------+ -+----------+-------+ -| iRIP | draft | -+----------+-------+ -+----------+-------+ -| CAP | draft | -+----------+-------+ - - -(The current version, 0.14, does not implement iRip or CAP. ) - -This documentation assumes that you are familiar with the iCalendar -standards RFC2445 and RFC2446. - -1.1 The libical project - -This code is under active development. If you would like to contribute -to the project, you can contact me, Eric Busboom, at eric@softwarestudio.org. -The project has a webpage at - -http://softwarestudio.org/libical/index.html - -and a mailing list that you can join by sending the following mail: - ------------- - -To: minimalist@softwarestudio.org - -Subject: subscribe libical - ------------- - -1.2 License - -The code and datafiles in this distribution are licensed under the -Mozilla Public License. See http://www.mozilla.org/NPL/MPL-1.0.html -for a copy of the license. Alternately, you may use libical under -the terms of the GNU Library General Public License. See http://www.fsf.org/copyleft/lesser.html -for a copy of the LGPL. - -This dual license ensures that the library can be incorporated into -both proprietary code and GPL'd programs, and will benefit from improvements -made by programmers in both realms. I will only accept changes into -my version of the library if they are similarly dual-licensed. - -1.3 Purpose & Goals - -1.4 Document version - -$Id$ - -2 Building the Library - -3 Structure - -The iCal calendar model is based on four types of objects: components, -properties, values and parameters. - -Properties are the fundamental unit of information in iCal, and they -work a bit like a hash entry, with a constant key and a variable value. -Properties may also have modifiers, called parameters. In the iCal -content line - -ORGANIZER;ROLE=CHAIR:MAILTO:mrbig@host.com - -The property name is ``ORGANIZER,'' the value of the property is ``mrbig@host.com'' -and the ``ROLE'' parameter specifies that Mr Big is the chair of the -meetings associated with this property. - -Components are groups of properties that represent the core objects -of a calendar system, such as events or timezones. - -The central goal of libical is to parse iTIP data into an internal -representation of Components, Properties, Parameters an Values, and -to allow the user to manipulate the data in various ways - -3.1 Components - -3.2 Properties - -3.3 Values - -3.4 Parameters - -3.5 Enumerations - -3.6 Types - -3.7 The Parser - -3.8 Restrictions - -3.9 Memory Management - -4 Differences From RFCs - -Libical has been designed to follow the standards as closely as possible, -so that the key objects in the standards are also keey objects in -the library. However, there are a few areas where the specifications -are (arguably) irregular, and following them exactly would result -in an unfriendly interface. These deviations make libical easier to -use by maintaining a self-similar interface. - -4.1 Pseudo Components - -Libical defines components for groups of properties that look and act -like components, but are not defined as components in the specification. -XDAYLIGHT and XSTANDARD are notable examples. These pseudo components -group properties within the VTIMEZONE components. XDAYLIGHT starts -with ``BEGIN:DAYLIGHT'' and ends with ``END:DAYLIGHT, just like other -components, but is not defined as a component in RFC2445. ( See RFC2445, -page 61 ) In Libical, it is a component. - -There are also pseudo components that are conceptually derived classess -of VALARM. RFC2446 defines what properties may be included in each -component, and for VALARM, the set of properties it may have depends -on the value of the ACTION property. - -For instance, if a VALARM component has an ACTION property with the -value of ``AUDIO,'' the component must also have an ``ATTACH'' property. -However, if the ACTION value is ``DISPLAY,'' the component must have -a DESCRIPTION property. - -To handle these various, complex restrictions, libical has pseudo components -for each type of alarm: XAUDIOALARM, XDISPLAYALARM, XEMAILALARM and -XPROCEDUREALARM. - -4.2 Combined Values - -Many values can take more than one type. TRIGGER, for instance, can -have a value type of with DURATION or of DATE-TIME. These multiple -types make it difficult to create routines to return the value associated -with a property. - -It is natural to have interfaces that would return the value of a property, -but it is cumbersone for a single routine to return multiple types. -So, in libical, properties that can have multiple types are given -a single type that is the union of their RFC2445 types. For instance, -in libical, the value of the TRIGGER property resolves to struct icaltriggertype. -This type is a union of a DURATION and a DATE-TIME. - -4.3 Multi-Valued Properties - -Some properties, such as CATEGORIES have only one value type, but each -CATEGORIES property can have multiple value instances. This also results -in a cumbersome interface -- CATEGORIES accessors would have to return -a list while all other accessors returned a single value. In libical, -all properties have a single value, and multi-valued properties are -broken down into multiple single valued properties during parsing. -That is, an input line like, - -CATEGORIES: work, home - -becomes in libical's internal representation - -CATEGORIES: work - -CATEGORIES: home - -Oddly, RFC2445 allows some multi-valued properties ( like FREEBUSY -) to exist as both a multi-values property and as multiple single -value properties, while others ( like CATEGORIES ) can only exist -as single multi-valued properties. This makes the internal representation -for CATEGORIES illegal. However when you convert a component to a -string, the library will collect all of the CATEGORIES properties -into one. - -5 Implementation Limitations - -6 Using libical - -6.1 Creating Components - -6.1.1 Constructor Interfaces - -6.1.2 vaargs Constructors - -6.1.3 Parsing Text Files - -6.2 Accessing Components - -6.2.1 Finding Components - -6.2.2 Removing Components - -Removing an element from a list while iterating through the list can -cause problems, since you will probably be removing the element that -the internal iterator points to. This will result in the iteration -loop terminating immediately after removing the element. To avoid -the problem, you will need to step the iterator ahead of the element -you are going to remove, like this: - -for(c = icalcomponent_get_first_component(s); - - c != 0; - - c = next) - -{ - - next = icalcomponent_get_next_component(s); - - icalcomponent_remove_component(s,c); - -} - -6.2.3 Finding Properties - -6.2.4 Removing Properties - -6.2.5 Getting Values - -6.2.6 Setting Values - -6.2.7 Getting Parameters - -6.2.8 Setting Parameters - -6.2.9 Removing Parameters - -6.2.10 Checking Component Validity - -6.3 Storing Objects - -The libical distribution inclues a seperate library, libicalss, that -allows you to store iCal component data to disk in a variety of ways. -This library is documented seperately. - -6.4 Memory Management - -Here are the memory rules for the library: - -1) If the function name has "new" in it, the caller gets control - of the memory. ( such as icalcomponent_new(), or icalproperty_new_clone() - ) - -2) If you got the memory from a routine with new in it, you must - call the corresponding *_free routine to free the memory. ( Use - icalcomponent_free() to free objects created with icalcomponent_new()) - -3) If the function name has "add" in it, the caller is transfering - control of the memory to the routine. ( icalproperty_add_parameter() ) - -4) If the function name has "remove" in it, the caller passes in - a pointer to an object and after the call returns, the caller owns - the object. So, before you call icalcomponent_remove_property(comp,foo), - you do not own "foo" and after the call returns, you do. - -5) If the routine returns a string, libical owns the memory and will - put it on a ring buffer to reclaim later. You'd better strdup it - if you want to keep it, and you don't have to delete it. - -6.5 Error Handling - -6.5.1 Return values - -6.5.2 icalerrno - -6.5.3 Component errors - -6.6 Naming Standard - -Structures that you access with the ``struct'' keyword, such as ``struct -icaltimetype'' are things that you are allowed to see inside and poke -at. - -Structures that you access though a typedef, such as ``icalcomponent'' -are things where all of the data is hidden. - -Component names that start with ``V'' are part of RFC 2445 or another -iCal standard. Component names that start with ``X'' are also part -of the spec, but they are not actually components in the spec. However, -they look and act like components, so they are components in libical. -Names that start with ``XLIC'' or ``X-LIC'' are not part of any iCal -spec. They are used internally by libical. - -7 Hacks and Bugs diff --git a/libical/install-sh b/libical/install-sh deleted file mode 100755 index 0ff4b6a08e..0000000000 --- a/libical/install-sh +++ /dev/null @@ -1,119 +0,0 @@ -#!/bin/sh - -# -# install - install a program, script, or datafile -# This comes from X11R5; it is not part of GNU. -# -# $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $ -# -# This script is compatible with the BSD install script, but was written -# from scratch. -# - - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" - - -# put in absolute paths if you don't have them in your path; or use env. vars. - -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" - -instcmd="$mvprog" -chmodcmd="" -chowncmd="" -chgrpcmd="" -stripcmd="" -rmcmd="$rmprog -f" -mvcmd="$mvprog" -src="" -dst="" - -while [ x"$1" != x ]; do - case $1 in - -c) instcmd="$cpprog" - shift - continue;; - - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; - - -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; - - -s) stripcmd="$stripprog" - shift - continue;; - - *) if [ x"$src" = x ] - then - src=$1 - else - dst=$1 - fi - shift - continue;; - esac -done - -if [ x"$src" = x ] -then - echo "install: no input file specified" - exit 1 -fi - -if [ x"$dst" = x ] -then - echo "install: no destination specified" - exit 1 -fi - - -# If destination is a directory, append the input filename; if your system -# does not like double slashes in filenames, you may need to add some logic - -if [ -d $dst ] -then - dst="$dst"/`basename $src` -fi - -# Make a temp file name in the proper directory. - -dstdir=`dirname $dst` -dsttmp=$dstdir/#inst.$$# - -# Move or copy the file name to the temp name - -$doit $instcmd $src $dsttmp - -# and set any options; do chmod last to preserve setuid bits - -if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; fi -if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; fi -if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; fi -if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; fi - -# Now rename the file to the real destination. - -$doit $rmcmd $dst -$doit $mvcmd $dsttmp $dst - - -exit 0 diff --git a/libical/missing b/libical/missing deleted file mode 100755 index 7789652e87..0000000000 --- a/libical/missing +++ /dev/null @@ -1,190 +0,0 @@ -#! /bin/sh -# Common stub for a few missing GNU programs while installing. -# Copyright (C) 1996, 1997 Free Software Foundation, Inc. -# Franc,ois Pinard , 1996. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# 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., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 -fi - -case "$1" in - - -h|--h|--he|--hel|--help) - echo "\ -$0 [OPTION]... PROGRAM [ARGUMENT]... - -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. - -Options: - -h, --help display this help and exit - -v, --version output version information and exit - -Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - yacc create \`y.tab.[ch]', if possible, from existing .[ch]" - ;; - - -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing - GNU libit 0.0" - ;; - - -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 - ;; - - aclocal) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`acinclude.m4' or \`configure.in'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`configure.in'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`acconfig.h' or \`configure.in'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' configure.in` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case "$f" in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; - - automake) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - bison|yacc) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package - in order for those modifications to take effect. You can get - \`Bison' from any GNU archive site." - rm -f y.tab.c y.tab.h - if [ $# -ne 1 ]; then - eval LASTARG="\${$#}" - case "$LASTARG" in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if [ ! -f y.tab.h ]; then - echo >y.tab.h - fi - if [ ! -f y.tab.c ]; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex|flex) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package - in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." - rm -f lex.yy.c - if [ $# -ne 1 ]; then - eval LASTARG="\${$#}" - case "$LASTARG" in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if [ ! -f lex.yy.c ]; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - makeinfo) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - 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." - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` - if test -z "$file"; then - file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` - fi - touch $file - ;; - - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and you do not seem to have it handy on your - system. You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequirements for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 - ;; -esac - -exit 0 diff --git a/libical/mkinstalldirs b/libical/mkinstalldirs deleted file mode 100644 index e82eeacbb3..0000000000 --- a/libical/mkinstalldirs +++ /dev/null @@ -1,40 +0,0 @@ -#! /bin/sh -# mkinstalldirs --- make directory hierarchy -# Author: Noah Friedman -# Created: 1993-05-16 -# Public domain - -# $Id: mkinstalldirs,v 1.3 2000/05/15 06:18:13 ericb Exp $ - -errstatus=0 - -for file -do - set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` - shift - - pathcomp= - for d - do - pathcomp="$pathcomp$d" - case "$pathcomp" in - -* ) pathcomp=./$pathcomp ;; - esac - - if test ! -d "$pathcomp"; then - echo "mkdir $pathcomp" 1>&2 - - mkdir "$pathcomp" || lasterr=$? - - if test ! -d "$pathcomp"; then - errstatus=$lasterr - fi - fi - - pathcomp="$pathcomp/" - done -done - -exit $errstatus - -# mkinstalldirs ends here \ No newline at end of file diff --git a/libical/scripts/.cvsignore b/libical/scripts/.cvsignore deleted file mode 100644 index b840c21800..0000000000 --- a/libical/scripts/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile.in -Makefile \ No newline at end of file diff --git a/libical/scripts/Makefile.am b/libical/scripts/Makefile.am deleted file mode 100644 index fd1b053cb6..0000000000 --- a/libical/scripts/Makefile.am +++ /dev/null @@ -1,8 +0,0 @@ -EXTRA_DIST = \ -mkderivedcomponents.pl \ -mkderivedparameters.pl \ -mkderivedproperties.pl \ -mkderivedvalues.pl \ -mkparameterrestrictions.pl \ -mkrestrictionrecords.pl \ -mkrestrictiontable.pl diff --git a/libical/scripts/mkderivedcomponents.pl b/libical/scripts/mkderivedcomponents.pl deleted file mode 100755 index ac4e472250..0000000000 --- a/libical/scripts/mkderivedcomponents.pl +++ /dev/null @@ -1,170 +0,0 @@ -#!/usr/local/bin/perl - -use Getopt::Std; -getopts('chspi:'); - - -# ARG 0 is components.txt -open(PV,"$ARGV[0]") || die "Can't open components file $ARGV[0]:$!"; - -my @components; - -while (){ - - s/#.*//; - - chop; - - push(@components,$_); - -} - -close PV; - -# Write the file inline by copying everything before a demarcation -# line, and putting the generated data after the demarcation - -if ($opt_i) { - - open(IN,$opt_i) || die "Can't open input file \"$opt_i\""; - - while(){ - - if (/Do not edit/){ - last; - } - - print; - - } - - if($opt_i){ - print "# Everything below this line is machine generated. Do not edit. \n"; - } else { - print "/* Everything below this line is machine generated. Do not edit. */\n"; - } - -} - -if ($opt_c or $opt_h and !$opt_i){ - -print < /* for va_arg functions */ - -EOM - -} - -if ($opt_p and !$opt_i){ - -print <1,RANGE=>1,RSVP=>1,XLICERRORTYPE=>1,XLICCOMPARETYPE=>1); - -# Usually, open param-c-types.txt -open(F,"$ARGV[0]") || die "Can't open C parameter types file $ARGV[0]:$!"; - -# Write the file inline by copying everything before a demarcation -# line, and putting the generated data after the demarcation - -if ($opt_i) { - - open(IN,$opt_i) || die "Can't open input file $opt_i"; - - while(){ - - if (/Do not edit/){ - last; - } - - print; - - } - - if($opt_p){ - print "# Everything below this line is machine generated. Do not edit. \n"; - } else { - print "/* Everything below this line is machine generated. Do not edit. */\n"; - } - -} - - - -if (($opt_c or $opt_h) and !$opt_i) { - -print <){ - - chop; - my ($param,$type) = split(/\s{2,}/,$_); - - my $ucf = join("",map {ucfirst(lc($_));} split(/-/,$param)); - - my $lc = lc($ucf); - my $uc = uc($lc); - - my $lctype = lc($type); - - - my $charorenum; - my $set_code; - my $pointer_check; - my $new_pointer_check; - my $new_pointer_check_v; - my $xrange; - - if ($type=~/char/){ - $new_pointer_check = "icalerror_check_arg_rz( (v!=0),\"v\");"; - $new_pointer_check_v = "icalerror_check_arg_rv( (v!=0),\"v\");"; - } - - - if ($type=~/char/ ) { - - $charorenum = " icalerror_check_arg_rz( (param!=0), \"param\");\n return ((struct icalparameter_impl*)param)->string;"; - - $pointer_check = "icalerror_check_arg_rz( (v!=0),\"v\");"; - - $set_code = "((struct icalparameter_impl*)param)->string = strdup(v);" - - } else { - - $xrange =" if ( ((struct icalparameter_impl*)param)->string != 0){\n return ICAL_${uc}_XNAME;\n }\n" if !exists $no_xname{$uc}; - - $charorenum=<data.v_${lc}; -EOM - - $pointer_check = "icalerror_check_arg( (v!=0),\"v\");"; - - $set_code = "((struct icalparameter_impl*)param)->data.v_${lc} = v;"; - - $print_code = "switch (impl->data.v_${lc}) {\ncase ICAL_${uc}_: {\n}\ncase ICAL_${uc}_XNAME: /* Fall Through */\n}\n"; - - } - - - - if ($opt_c) { - - print <[0] = \$p; - - return \$self; -} - -sub get -{ - my \$self = shift; - my \$impl = \$self->_impl(); - - return Net::ICal::icalparameter_as_ical_string(\$impl); - -} - -sub set -{ - # This is hard to implement, so I've punted for now. - die "Set is not implemented"; -} - -EOM - -} - -} - -if ($opt_h){ - -print <){ - - chop; - my @v = split(/\s+/,$_); - - my $prop = shift @v; - my $value = shift @v; - my $comment = join(" ",@v); - - $propmap{$prop} = $value; -} - -close PV; - -# ARG 1 is value-c-types.txt -open(F,"$ARGV[1]") || die "Can't open C parameter types file $ARGV[1 ]:$!"; - -while (){ - - chop; - my @v = split(/\t+/,$_); - - my $value = shift @v; - my $type = shift @v; - my $comment = join(" ",@v); - - $valuemap{$value} = $type; - -} - -close F; - -# Write the file inline by copying everything before a demarcation -# line, and putting the generated data after the demarcation - -if ($opt_i) { - - open(IN,$opt_i) || die "Can't open input file $opt_i"; - - while(){ - - if (/Do not edit/){ - last; - } - - print; - - } - - print "/* Everything below this line is machine generated. Do not edit. */\n"; - -} - - -if ( ($opt_h or $opt_s) and !$opt_i ){ - -print <_add_elements(\\\@_); - - return bless \$self, \$package; -} - -sub set_value -{ - my \$self = shift; - my \$v = shift; - - my \$impl = \$self->_impl(); - - - if ( ref \$v && Net::ICal::icalvalue_isa_value(\$v->_impl())){ - Net::ICal::icalproperty_set_value(\$impl,\$v->_impl); - } else { - my \$value = Net::ICal::icalvalue_new_from_string(\$Net::ICal::ICAL_${ucvalue}_VALUE,\$v); - die if !\$impl; - Net::ICal::icalproperty_set_value(\$impl,\$value) unless !\$value; - } - -} - -sub get_value -{ - my \$self = shift; - my \$impl = \$self->_impl(); - - if (defined \$impl){ - my \$value = Net::ICal::icalproperty_get_value(\$impl); - return "" if !\$value; - return Net::ICal::icalvalue_as_ical_string(\$value); - } else { - return ""; - } -} - -EOM - -} elsif ($opt_m) { # Generate a map - -print "\'${uc}\' => \'Net::ICal::Property::${ucf},\'\n"; - -} - -} # This brace terminates the main loop - - - -# Add things to the end of the output. - -if ($opt_p) -{ - print "1;\n"; -} - -if ($opt_h){ - -print < generate c code file -# h-> generate header file -# s -> generate switch statement - -# Open with value-c-types.txt - - -open(F,"$ARGV[0]") || die "Can't open values data file $ARGV[0]:$!"; - - -# Write the file inline by copying everything before a demarcation -# line, and putting the generated data after the demarcation - -if ($opt_i) { - - open(IN,$opt_i) || die "Can't open input file $opt_i"; - - while(){ - - if (/Do not edit/){ - last; - } - - print; - - } - - print "/* Everything below this line is machine generated. Do not edit. */\n"; - -} - - -if (($opt_c || $opt_h) and !$opt_i) { -print < 'int', - CALADDRESS=>'string', - DATE=>'time', - DATETIME=>'time', - DATETIMEDATE=>'time', - DATETIMEPERIOD=>'period', - DURATION=>'duration', - INTEGER=>'int', - TEXT=>'string', - URI=>'string', - UTCOFFSET=>'int', - QUERY=>'string', - BINARY=>'string' - ); - -while() -{ - - chop; - my @v = split(/\t+/,$_); - - my $value = shift @v; - my $type = shift @v; - my $comment = join(" ",@v); - - my $ucf = join("",map {ucfirst(lc($_));} split(/-/,$value)); - - my $lc = lc($ucf); - my $uc = uc($lc); - - my $pointer_check = "icalerror_check_arg_rz( (v!=0),\"v\");\n" if $type =~ /\*/; - my $pointer_check_rv = "icalerror_check_arg_rv( (v!=0),\"v\");\n" if $type =~ /\*/; - - my $assign; - - if ($type =~ /char/){ - $assign = "strdup(v);\n\n if (impl->data.v_string == 0){\n errno = ENOMEM;\n }\n"; - } else { - $assign = "v;"; - } - - my $union_data; - - if (exists $union_map{$uc} ){ - $union_data=$union_map{$uc}; - } else { - $union_data = $lc; - } - - if ($opt_c) { -print <data.v_${union_data} = $assign -} - -$type -icalvalue_get_${lc}(icalvalue* value) -{ - icalerror_check_arg( (value!=0),"value"); - icalerror_check_value_type(value, ICAL_${uc}_VALUE); - - return ((struct icalvalue_impl*)value)->data.v_${union_data}; -} - -EOM - -} elsif($opt_h) { - - print <data.v_${union_data} - - str = strdup(temp); - - return str; -} - -EOM - -} -} elsif ($opt_p) { # Generate perl code - -print <[0] = \$p; - - return \$self; -} - -sub set -{ - my \$self = shift; - my \$v = shift; - - my \$impl = \$self->_impl(); - - if (\$v) { - my \$new_value = ICal::icalvalue_new_from_string(\$ICal::ICAL_${uc}_VALUE,\$v); - if (\$new_value){ - ICal::icalvalue_free(\$self->[0]); - \$self->[0] = \$new_value; - } - - } - -} - -sub get -{ - my \$self = shift; - my \$impl = \$self->[0]; - - if (defined \$impl){ - - return ICal::icalvalue_as_ical_string(\$impl); - - } -} - -EOM -} - - - -} - -if ($opt_p) -{ - print "1;\n"; -} - - -if ($opt_h){ - -print < - - -# usually open params-in-prop.txt -open(F,"$ARGV[0]") || die "Can't open restriction file $ARGV[0]:$!"; - -print <) -{ - chop; - - # split line by whitespace - my @v = split(/\s+/,$_); - # property is first item on line - my $prop = shift @v; - my $prop_name = $prop; - if (substr($prop,0,1) eq "X") { $prop = "X"; } - $prop = join("",split(/-/,$prop)); - -print < - -# usually open restrictions.csv -open(F,"$ARGV[0]") || die "Can't open restriction file $ARGV[0]:$!"; - -print <) -{ - chop; - - # split line at commas - my ($method,$component,$property,$subcomponent,$restriction)=split(/\,/,$_); - - # - #put in code to generate comments here! - # - if ($method ne $last_method) - { - $need_header = 1; - $last_method = $method; - } - if ($component ne $last_component) - { - $need_header = 1; - $last_component = $component; - } - - if ($need_header) - { - print "\n\t/* METHOD: ${method}, COMPONENT: ${component} */\n"; - $need_header = 0; - } - - foreach $item ($component,$property,$subcomponent,$restriction) - { - # handle special cases. - if ($item eq "NONE") - { $item = "NO"; } - else { if (substr($item,0,1) eq "X") - { $item = "X"; }} - - # strip out dashes - $item = join("",split(/-/,$item)); - } - # strip leading V from component names - $component =~ s/^(V?)(\w+?)((SAVINGS)?)((TIME)?)$/$2/; - $subcomponent =~ s/^V(\w+)/$1/; - - print "\t\{ICAL_METHOD_${method},ICAL_${component}_COMPONENT,"; - print "ICAL_${property}_PROPERTY,ICAL_${subcomponent}_COMPONENT,"; - print "ICAL_RESTRICTION_${restriction}\},\n"; - -} - -print <){ - - if (/Do not edit/){ - last; - } - - print; - - } - - print "/* Everything below this line is machine generated. Do not edit. */\n"; - - - close IN; -} - -print "icalrestriction_property_record icalrestriction_property_records[] = {\n"; - -while() -{ - - chop; - - s/\#.*$//; - - my($method,$targetcomp,$prop,$subcomp,$restr,$sub) = split(/,/,$_); - - next if !$method; - - if(!$sub) { - $sub = "0"; - } - - if($prop ne "NONE"){ - print(" \{ICAL_METHOD_${method},ICAL_${targetcomp}_COMPONENT,ICAL_${prop}_PROPERTY,ICAL_RESTRICTION_${restr},$sub\},\n"); - } - -} - - -print " {ICAL_METHOD_NONE,ICAL_NO_COMPONENT,ICAL_NO_PROPERTY,ICAL_RESTRICTION_NONE}\n"; - -print "};\n"; - -print "icalrestriction_component_record icalrestriction_component_records[] = {\n"; - - -close(F); -open(F,"$ARGV[0]") || die "Can't open restriction data file $ARGV[0]:$!"; - -while() -{ - - chop; - - s/\#.*$//; - - my($method,$targetcomp,$prop,$subcomp,$restr) = split(/,/,$_); - - next if !$method; - - - if($subcomp ne "NONE"){ - print(" \{ICAL_METHOD_${method},ICAL_${targetcomp}_COMPONENT,ICAL_${subcomp}_COMPONENT,ICAL_RESTRICTION_${restr}\},\n"); - } - -} - -print " {ICAL_METHOD_NONE,ICAL_NO_COMPONENT,ICAL_NO_COMPONENT,ICAL_RESTRICTION_NONE}\n"; -print "};\n"; diff --git a/libical/src/.cvsignore b/libical/src/.cvsignore deleted file mode 100644 index c038ed7864..0000000000 --- a/libical/src/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in \ No newline at end of file diff --git a/libical/src/Makefile.am b/libical/src/Makefile.am deleted file mode 100644 index 37dc5e39cb..0000000000 --- a/libical/src/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS = libical libicalss test diff --git a/libical/src/libical/.cvsignore b/libical/src/libical/.cvsignore deleted file mode 100644 index 708af857d7..0000000000 --- a/libical/src/libical/.cvsignore +++ /dev/null @@ -1,14 +0,0 @@ -Makefile -Makefile.in -icalitipy.c -icalitipy.h -icalitipl.c -icallexer.c -icalyacc.c -icalyacc.h -y.output -*.lo -*.la -.libs -.deps -icalversion.h diff --git a/libical/src/libical/.gdb_history b/libical/src/libical/.gdb_history deleted file mode 100644 index 55362e9165..0000000000 --- a/libical/src/libical/.gdb_history +++ /dev/null @@ -1,457 +0,0 @@ -run -ptype E -graph display E -quit -run -print E -graph display E -up -print p -graph display p -ptype p -info line 'p' -graph display p -print parameter_iterator -break icalproperty.c:182 -run -next -print p -graph display p -quit -run -up -graph display p -print parameter_iterator -graph display p -print *(p) -quit -show directories -run -run -y -list usecases.c -list test_parameters -info line 'main' -info line 'test_parameters' -info line 'icalproperty_vanew_comment' -ptype icalproperty_add_parameters -info line 'icalproperty_add_parameters' -run -up -info line 'icalproperty_vanew_comment' -info line 'icalproperty_add_parameters' -break icalproperty.c:51 -run -step -next -nexti -info line 'icalproperty_vanew_comment' -info line 'icalproperty_add_parameters' -break icalproperty.c:53 -run -next -graph display vp -break icalparameter_isa_parameter -cont -run -step -next -quit -run -break icalcomponent_get_first_property -break icalcomponent_get_next_property -break icalcomponent_new -run -next -step -next -step -next -graph display impl -up -down -next -graph display *(impl) -next -cont -next -graph display c -next -graph display *(prop) -next -step -quit -run -up -graph display p -down -print E -up -print *(prop) -graph display *(prop) -down -up -print prop -print param -down -up -print p -up -break usecases.c:522 -run -step -next -up -run -step -next -step -next -quit -run -up -quit -info line 'test_memory' -break b1 -break usecases.c:558 -run -graph display *(f) -graph display *(p) -next -run -next -step -next -print pos -print *(pos) -graph display string -graph display *(pos) -next -set variable *pos = 0x8053520 -next -step -next -print buf_size -print *(buf_size) -print *(string) -ptype string -next -run -print f -graph display f -graph display p -next -step -next -run -next -graph display bufsize -next -quit -graph display test_memory -info line 'test_memory' -break usecases.c:560 -run -graph display f -next -graph display p -print p -f -print strlen(S1) -next -print p - f -print strlen(S1) + strlen(S2) -next -break usecases.c:572 -run -cont -step -graph display *(pos) -next -step -quit -info line 'test_memory' -break usecases.c:560 -set args -run -next -graph display f -graph display p -next -graph display bufsize -run -next -set args -run -quit -info line 'test_memory' -break usecases.c:560 -graph display f -graph display p -run -graph display f -graph display p -graph display bufsize -next -down -up -quit -run -where -frame 2 -break icalmemory.c:79 -run -next -run -graph display buffer_ring -run -ont(box, font) = font(box, font); -_fontfix(box) = fontfix(box); -ont(box, font) = font(box, font); -#pragma override font -font(box, font) = _fontfix(_font(box, string(font))); -ont(box, font) = font(box, font); -ist -list -print buffer_ring[buffer_pos] -break icalmemory.c:77 -run -cont -quit -run -up -break icalmemory.c:77 -break icalmemory.c:78 -run -graph display buffer_ring -next -cont -quit -run -up -break icalmemory.c:77 -run -break icalmemory.c:78 -cont -graph display buffer_ring[buffer_pos] -quit -break usecases.c:560 -run -step -break icalmemory.c:129 -disable 2 -next -info line 'icalmemory_resize_buffer' -break icalmemory.c:79 -cont -run -cont -next -run -cont -graph display buffer_ring[buffer_pos] -graph display buffer_ring -break icalmemory.c:78 -run -graph display buffer_pos -cont -run -cont -quit -info line 'test_memory' -info line 'icalmemory_append_string' -break icalmemory.c:78 -break icalmemory.c:79 -run -graph display buffer_ring -graph display buffer_ring[buffer_pos] -graph display buffer_pos -cont -next -free( buffer_ring[2] -free( buffer_ring[2] ) -call free(buffer_ring[2] ) -call free(buffer_ring[1] ) -free(buffer_ring[1]) -run -cont -set variable buffer_pos = 2 -next -run -cont -run -cont -run -cont -next -quit -info line 'test_memory' -info line 'icalmemory_append_string' -break icalmemory.c:78 -break icalmemory.c:79 -run -graph display buffer_ring -graph display buffer_pos -graph display buffer_ring[buffer_pos] -cont -run -cont -set variable buffer_pos = 2 -next -cont -next -cont -run -next -run -quit -info line 'test_memory' -info line 'icalmemory_append_string' -break icalmemory.c:76 -break icalmemory.c:77 -run -graph display buffer_ring -graph display buffer_pos -graph display buffer_ring[buffer_pos] -cont -next -cont -next -cont -run -cont -next -cont -run -cont -next -graph display rtrn -next -run -next -cont -next -run -step -run -next -quit -run -up -print pos -graph display string -run -up -break usecases.c:572 -run -print bufsize -step -next -step -quit -run -up -graph display buf_size -graph display *(buf_size) -break icalmemory.c:136 -run -next -run -graph display *(new_buf) -quit -run -up -down -break icalmemory.c:136 -run -graph display *(new_buf) -quit -run -up -break icalmemory.c:136 -run -print *(new_buf) -next -print *buf_size -print *bu -print *buf -next -print new_buf -quit -run -up -break icalmemory.c:136 -run -print *(new_buf) -graph display *(new_buf) -graph display new_pos -graph display *(buf) -next -graph display new_buf -run -next -run -graph display *(pos) -next -quit -info line 'test_memory' -info line 'icalmemory_append_string' -break icalmemory.c:136 -run -graph display *(buf_size) -next -quit -info line 'test_memory' -break usecases.c:570 -run -step -next -delete 1 -until usecases.c:572 -step -next -graph display *(buf_size) -next -graph display *(pos) -graph display *(buf) -graph display *(new_buf) -graph display new_buf -next -graph display string -print *pos - *buf -run -break icalmemory.c:136 -run -next -set variable *pos = 0x8054993 -next -run -next -set variable *pos = 0x8054980 -set variable *pos = 0x8054700 -next -run -next -down -up -down -quit -run < ../../test-data/1.1 -up -break icalproperty.c:165 -run -next -run -info line 'icalvalue_as_ical_string' -break icalvalue.c:424 -cont -next -print value -next -run -up -cont -up -print *(prop) -graph display *(icalproperty_impl*)prop -quit - diff --git a/libical/src/libical/.gdbinit b/libical/src/libical/.gdbinit deleted file mode 100644 index 19de9b8209..0000000000 --- a/libical/src/libical/.gdbinit +++ /dev/null @@ -1,3 +0,0 @@ -directory /home/eric/proj/FreeAssociation/libical/src/pvl/ -path /home/eric/proj/FreeAssociation/libical/src/pvl/ - diff --git a/libical/src/libical/Makefile.am b/libical/src/libical/Makefile.am deleted file mode 100644 index 698a2d5a94..0000000000 --- a/libical/src/libical/Makefile.am +++ /dev/null @@ -1,87 +0,0 @@ - -#AUTOMAKE_OPTIONS = no-dependencies - -#noinst_LTLIBRARIES = libical.la -lib_LTLIBRARIES = libical.la - -INCLUDES = -I. - -YFLAGS =-d -v -t - -libical_la_SOURCES = \ - ical.h \ - icalcomponent.c \ - icalcomponent.h \ - icalenums.c \ - icalenums.h \ - icalerror.c \ - icalerror.h \ - icalyacc.y \ - icallexer.l \ - icalmemory.c \ - icalmemory.h \ - icalparameter.c \ - icalparameter.h \ - icalparser.c \ - icalparser.h \ - icalproperty.c \ - icalproperty.h \ - icalrestriction.c \ - icalrestriction.h \ - icaltypes.c \ - icaltypes.h \ - icalvalue.c \ - icalvalue.h \ - icalvcal.h \ - pvl.c \ - pvl.h - -include_HEADERS=\ - ical.h \ - icalcomponent.h \ - icalenums.h \ - icalerror.h \ - icalmemory.h \ - icalparameter.h \ - icalparser.h \ - icalproperty.h \ - icalrestriction.h \ - icaltypes.h \ - icalvalue.h \ - icalvcal.h \ - icalversion.h \ - pvl.h - - - -EXTRA_DIST = icallexer.c icalyacc.c icalyacc.h - -CONFIG_CLEAN_FILES = y.output *~ - -DESIGNDATA = ../../design-data -ICALSCRIPTS = ../../scripts -derived: icalproperty icalparameter icalvalue - -icalproperty: - $(ICALSCRIPTS)/mkderivedproperties.pl -i icalproperty.h -h $(DESIGNDATA)/prop-to-value.txt ${DESIGNDATA}/value-c-types.txt > icalproperty.newh - mv icalproperty.newh icalproperty.h - - $(ICALSCRIPTS)/mkderivedproperties.pl -i icalproperty.c -c $(DESIGNDATA)/prop-to-value.txt ${DESIGNDATA}/value-c-types.txt > icalproperty.newc - mv icalproperty.newc icalproperty.c - - -icalparameter: - $(ICALSCRIPTS)/mkderivedparameters.pl -i icalparameter.h -h $(DESIGNDATA)/param-c-types.txt > icalparameter.newh - mv icalparameter.newh icalparameter.h - - $(ICALSCRIPTS)/mkderivedparameters.pl -i icalparameter.c -c $(DESIGNDATA)/param-c-types.txt > icalparameter.newc - mv icalparameter.newc icalparameter.c - -icalvalue: - $(ICALSCRIPTS)/mkderivedvalues.pl -i icalvalue.h -h $(DESIGNDATA)/value-c-types.txt > icalvalue.newh - mv icalvalue.newh icalvalue.h - - $(ICALSCRIPTS)/mkderivedvalues.pl -i icalvalue.c -c $(DESIGNDATA)/value-c-types.txt > icalvalue.newc - mv icalvalue.newc icalvalue.c - - diff --git a/libical/src/libical/base64.c b/libical/src/libical/base64.c deleted file mode 100644 index 5925f977ac..0000000000 --- a/libical/src/libical/base64.c +++ /dev/null @@ -1,323 +0,0 @@ -/* - - Encode or decode file as MIME base64 (RFC 1341) - - by John Walker - http://www.fourmilab.ch/ - - This program is in the public domain. - -*/ - -#define REVDATE "11th August 1997" - -#include -#include -#include -#include - -#define TRUE 1 -#define FALSE 0 - -#define LINELEN 72 /* Encoded line length (max 76) */ - -typedef unsigned char byte; /* Byte type */ - -static FILE *fi = stdin; /* Input file */ -static FILE *fo = stdout; /* Output file */ -static byte iobuf[256]; /* I/O buffer */ -static int iolen = 0; /* Bytes left in I/O buffer */ -static int iocp = 256; /* Character removal pointer */ -static int ateof = FALSE; /* EOF encountered */ -static byte dtable[256]; /* Encode / decode table */ -static int linelength = 0; /* Length of encoded output line */ -static char eol[] = "\r\n"; /* End of line sequence */ -static int errcheck = TRUE; /* Check decode input for errors ? */ - -/* INBUF -- Fill input buffer with data */ - -static int inbuf(void) -{ - int l; - - if (ateof) { - return FALSE; - } - l = fread(iobuf, 1, 256, fi); /* Read input buffer */ - if (l <= 0) { - if (ferror(fi)) { - exit(1); - } - ateof = TRUE; - return FALSE; - } - iolen = l; - iocp = 0; - return TRUE; -} - -/* INCHAR -- Return next character from input */ - -static int inchar(void) -{ - if (iocp >= iolen) { - if (!inbuf()) { - return EOF; - } - } - - return iobuf[iocp++]; -} - -/* OCHAR -- Output an encoded character, inserting line breaks - where required. */ - -static void ochar(int c) -{ - if (linelength >= LINELEN) { - if (fputs(eol, fo) == EOF) { - exit(1); - } - linelength = 0; - } - if (putc(((byte) c), fo) == EOF) { - exit(1); - } - linelength++; -} - -/* ENCODE -- Encode binary file into base64. */ - -static void encode(void) -{ - int i, hiteof = FALSE; - - /* Fill dtable with character encodings. */ - - for (i = 0; i < 26; i++) { - dtable[i] = 'A' + i; - dtable[26 + i] = 'a' + i; - } - for (i = 0; i < 10; i++) { - dtable[52 + i] = '0' + i; - } - dtable[62] = '+'; - dtable[63] = '/'; - - while (!hiteof) { - byte igroup[3], ogroup[4]; - int c, n; - - igroup[0] = igroup[1] = igroup[2] = 0; - for (n = 0; n < 3; n++) { - c = inchar(); - if (c == EOF) { - hiteof = TRUE; - break; - } - igroup[n] = (byte) c; - } - if (n > 0) { - ogroup[0] = dtable[igroup[0] >> 2]; - ogroup[1] = dtable[((igroup[0] & 3) << 4) | (igroup[1] >> 4)]; - ogroup[2] = dtable[((igroup[1] & 0xF) << 2) | (igroup[2] >> 6)]; - ogroup[3] = dtable[igroup[2] & 0x3F]; - - /* Replace characters in output stream with "=" pad - characters if fewer than three characters were - read from the end of the input stream. */ - - if (n < 3) { - ogroup[3] = '='; - if (n < 2) { - ogroup[2] = '='; - } - } - for (i = 0; i < 4; i++) { - ochar(ogroup[i]); - } - } - } - if (fputs(eol, fo) == EOF) { - exit(1); - } -} - -/* INSIG -- Return next significant input */ - -static int insig(void) -{ - int c; - - /*CONSTANTCONDITION*/ - while (TRUE) { - c = inchar(); - if (c == EOF || (c > ' ')) { - return c; - } - } - /*NOTREACHED*/ -} - -/* DECODE -- Decode base64. */ - -static void decode(void) -{ - int i; - - for (i = 0; i < 255; i++) { - dtable[i] = 0x80; - } - for (i = 'A'; i <= 'Z'; i++) { - dtable[i] = 0 + (i - 'A'); - } - for (i = 'a'; i <= 'z'; i++) { - dtable[i] = 26 + (i - 'a'); - } - for (i = '0'; i <= '9'; i++) { - dtable[i] = 52 + (i - '0'); - } - dtable['+'] = 62; - dtable['/'] = 63; - dtable['='] = 0; - - /*CONSTANTCONDITION*/ - while (TRUE) { - byte a[4], b[4], o[3]; - - for (i = 0; i < 4; i++) { - int c = insig(); - - if (c == EOF) { - if (errcheck && (i > 0)) { - fprintf(stderr, "Input file incomplete.\n"); - exit(1); - } - return; - } - if (dtable[c] & 0x80) { - if (errcheck) { - fprintf(stderr, "Illegal character '%c' in input file.\n", c); - exit(1); - } - /* Ignoring errors: discard invalid character. */ - i--; - continue; - } - a[i] = (byte) c; - b[i] = (byte) dtable[c]; - } - o[0] = (b[0] << 2) | (b[1] >> 4); - o[1] = (b[1] << 4) | (b[2] >> 2); - o[2] = (b[2] << 6) | b[3]; - i = a[2] == '=' ? 1 : (a[3] == '=' ? 2 : 3); - if (fwrite(o, i, 1, fo) == EOF) { - exit(1); - } - if (i < 3) { - return; - } - } -} - -/* USAGE -- Print how-to-call information. */ - -static void usage(char *pname) -{ - fprintf(stderr, "%s -- Encode/decode file as base64. Call:\n", pname); - fprintf(stderr, - " %s [-e[ncode] / -d[ecode]] [-n] [infile] [outfile]\n", pname); - fprintf(stderr, "\n"); - fprintf(stderr, "Options:\n"); - fprintf(stderr, " -D Decode base64 encoded file\n"); - fprintf(stderr, " -E Encode file into base64\n"); - fprintf(stderr, " -N Ignore errors when decoding\n"); - fprintf(stderr, " -U Print this message\n"); - fprintf(stderr, "\n"); - fprintf(stderr, "by John Walker\n"); - fprintf(stderr, " WWW: http://www.fourmilab.ch/\n"); -} - -/* Main program */ - -int main(int argc, char *argv[]) -{ - int i, f = 0, decoding = FALSE; - char *cp, opt; - - for (i = 1; i < argc; i++) { - cp = argv[i]; - if (*cp == '-') { - opt = *(++cp); - if (islower(opt)) { - opt = toupper(opt); - } - switch (opt) { - - case 'D': /* -D Decode */ - decoding = TRUE; - break; - - case 'E': /* -E Encode */ - decoding = FALSE; - break; - - case 'N': /* -N Suppress error checking */ - errcheck = FALSE; - break; - - case 'U': /* -U Print how-to-call information */ - case '?': - usage(argv[0]); - return 0; - } - } else { - switch (f) { - - /** Warning! On systems which distinguish text mode and - binary I/O (MS-DOS, Macintosh, etc.) the modes in these - open statements will have to be made conditional based - upon whether an encode or decode is being done, which - will have to be specified earlier. But it's worse: if - input or output is from standard input or output, the - mode will have to be changed on the fly, which is - generally system and compiler dependent. 'Twasn't me - who couldn't conform to Unix CR/LF convention, so - don't ask me to write the code to work around - Apple and Microsoft's incompatible standards. **/ - - case 0: - if (strcmp(cp, "-") != 0) { - if ((fi = fopen(cp, "r")) == NULL) { - fprintf(stderr, "Cannot open input file %s\n", cp); - return 2; - } - } - f++; - break; - - case 1: - if (strcmp(cp, "-") != 0) { - if ((fo = fopen(cp, "w")) == NULL) { - fprintf(stderr, "Cannot open output file %s\n", cp); - return 2; - } - } - f++; - break; - - default: - fprintf(stderr, "Too many file names specified.\n"); - usage(argv[0]); - return 2; - } - } - } - - if (decoding) { - decode(); - } else { - encode(); - } - return 0; -} diff --git a/libical/src/libical/filelock.c b/libical/src/libical/filelock.c deleted file mode 100644 index 0376bc2bec..0000000000 --- a/libical/src/libical/filelock.c +++ /dev/null @@ -1,143 +0,0 @@ - -/* - I Stole this from: - http://www.cis.temple.edu/~ingargio/old/cis307s96/readings/rwlockexample.html - - CIS 307: An example using Read/Write File Locks - [fcntl.h], [fcntl.c], [fcntlmain.c] - -In Stevens "Advanced Programming in the Unix Environment" we see ways to use -the Unix service fcntl to lock portions of a file for reading and writing in -the manner stated in the Reader and Writer problem [any number of readers at -a time, but writers must operate alone]. Here we have three files that adapt -and use the code from Stevens: - -*fcntl.h: Specification of the locking functions. -*fcntl.c: Implementation of the locking functions. -*fcntlmain.c: Driver that does a simple test of the locking functions. - -WARNING: A file lock request which is blocked can be interrupted by a -signal. In this case the lock operation returns EINTR. Thus we may think we -got a lock when we really don't. A solution is to block signals when -locking. Another solution is to test the value returned by the lock -operation and relock if the value is EINTR. Another solution, which we adopt -here, is to do nothing about it. - -/* fcntl.c -- Defines mutexes in terms of read/write locks on files. - * (code is mostly from Stevens: Advanced Programming in the - * Unix environment. See from page 367 on. - * filerwlock, filerwlockCreate, filerwlockDelete, - * filerwreadlock, filerwlongreadlock, filerwlongunlock, - * filerwlockUnlock - */ - -#include -#include -#include -#include - -int lock_reg(int, int, int, off_t, int, off_t); - -#define read_lock(fd, offset, whence, len) \ - lock_reg(fd, F_SETLK, F_RDLCK, offset, whence, len) - -#define readw_lock(fd, offset, whence, len) \ - lock_reg(fd, F_SETLKW, F_RDLCK, offset, whence, len) - -#define write_lock(fd, offset, whence, len) \ - lock_reg(fd, F_SETLK, F_WRLCK, offset, whence, len) - -#define writew_lock(fd, offset, whence, len) \ - lock_reg(fd, F_SETLKW, F_WRLCK, offset, whence, len) - -#define un_lock(fd, offset, whence, len) \ - lock_reg(fd, F_SETLK, F_UNLCK, offset, whence, len) - -pid_t lock_test(int, int , off_t , int , off_t ); - -#define is_readlock(fd, offset, whence, len) \ - lock_test(fd, F_RDLCK, offset, whence, len) - -#define is_writelock(fd, offset, whence, len) \ - lock_test(fd, F_WRLCK, offset, whence, len) - -int lock_reg(int fd, int cmd, int type, off_t offset, int whence, off_t len) -{ - struct flock lock; - lock.l_type = type; /* F_RDLCK, F_WRLCK, F_UNLCK */ - lock.l_start = offset; /* byte offset relative to l_whence */ - lock.l_whence = whence; /* SEEK_SET, SEEK_CUR, SEEK_END */ - lock.l_len = len; /* #bytes (0 means to EOF) */ - return (fcntl(fd, cmd, &lock)); -} - -pid_t lock_test(int fd, int type, off_t offset, int whence, off_t len) -{ - struct flock lock; - lock.l_type = type; /* F_RDLCK or F_WRLCK */ - lock.l_start = offset; /* byte offset relative to l_whence */ - lock.l_whence = whence; /* SEEK_SET, SEEK_CUR, SEEK_END */ - lock.l_len = len; /* #bytes (0 means to EOF) */ - if (fcntl(fd,F_GETLK,&lock) < 0){ - perror("fcntl"); exit(1);} - if (lock.l_type == F_UNLCK) - return (0); /* false, region is not locked by another process */ - return (lock.l_pid); /* true, return pid of lock owner */ -} - -typedef struct { - int fd; - int n;} filerwlock; - -/* Create N read/write locks and returns the id of this cluster of locks. */ -filerwlock * filerwlockCreate(char *filename, int n) { - filerwlock *fl = (filerwlock *)malloc(sizeof(filerwlock)); - if (((fl->fd) = open(filename, O_RDWR | O_CREAT | O_TRUNC, S_IWUSR)) < 0) { - perror("open"); - exit(1);} - fl->n = n; - return fl; - } - -/* Delete the cluster of read/write locks associated with fl. */ -int filerwlockDelete(filerwlock *fl) { - if (close(fl->fd) < 0) { - perror("close"); - exit(1);} - return free(fl); - } - -/* Given the read/write lock cluster fl, lock its ith element */ -int filerwreadlock(filerwlock *fl, int i) { - if ((i < 0) | (i >= fl->n)) { - printf("filerwlockLock needs i in range 0 .. %d\n", (fl->n)-1); - exit(0);} - readw_lock(fl->fd, i, SEEK_SET, 1); - } - -int filerwwritelock(filerwlock *fl, int i) { - if ((i < 0) | (i >= fl->n)) { - printf("filerwlockLock needs i in range 0 .. %d\n", (fl->n)-1); - exit(0);} - writew_lock(fl->fd, i, SEEK_SET, 1); - } - -/* Given the lock cluster fl, unlock its ith element */ -int filerwunlock(filerwlock *fl, int i){ - - if ((i < 0) | (i >= fl->n)) { - printf("filerwlockUnlock needs i in range 0 .. %d\n", (fl->n)-1); - exit(0);} - un_lock(fl->fd, i, SEEK_SET, 1); - } - -/* Given the lock cluster fl, it read locks all its elements */ -int filerwlongreadlock(filerwlock *fl) { - readw_lock(fl->fd, 0, SEEK_SET, fl->n); -} - -/* Given the lock cluster fl, it unlocks all its elements */ -int filerwlongunlock(filerwlock *fl) { - un_lock(fl->fd, 0, SEEK_SET, fl->n); -} - diff --git a/libical/src/libical/filelock.h b/libical/src/libical/filelock.h deleted file mode 100644 index dbe0715cc6..0000000000 --- a/libical/src/libical/filelock.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - I Stole this from: - http://www.cis.temple.edu/~ingargio/old/cis307s96/readings/rwlockexample.html - - CIS 307: An example using Read/Write File Locks - [fcntl.h], [fcntl.c], [fcntlmain.c] - -In Stevens "Advanced Programming in the Unix Environment" we see ways to use -the Unix service fcntl to lock portions of a file for reading and writing in -the manner stated in the Reader and Writer problem [any number of readers at -a time, but writers must operate alone]. Here we have three files that adapt -and use the code from Stevens: - -*fcntl.h: Specification of the locking functions. -*fcntl.c: Implementation of the locking functions. -*fcntlmain.c: Driver that does a simple test of the locking functions. - -WARNING: A file lock request which is blocked can be interrupted by a -signal. In this case the lock operation returns EINTR. Thus we may think we -got a lock when we really don't. A solution is to block signals when -locking. Another solution is to test the value returned by the lock -operation and relock if the value is EINTR. Another solution, which we adopt -here, is to do nothing about it. - -fcntl.h - -*/ - -/* fcntl.h -- Defines mutexes in terms of read/write locks on files. - * filerwlock, filerwlockCreate, filerwlockDelete, - * filerwreadlock, filerwlockUnlock - */ - -typedef struct { - int fd; - int n; -} filerwlock; - -/* Create N read/write locks and returns the id of this cluster of locks. */ -filerwlock * filerwlockCreate(char *filename, int n); - -/* Delete the cluster of read/write locks associated with fl. */ -int filerwlockDelete(filerwlock *fl); - -/* Given the read/write lock cluster fl, lock its ith element */ -int filerwreadlock(filerwlock *fl, int i); - -int filerwwritelock(filerwlock *fl, int i); - -/* Given the lock cluster fl, unlock its ith element */ -int filerwunlock(filerwlock *fl, int i); - -/* Given the lock cluster fl, it read locks all its elements */ -int filerwlongreadlock(filerwlock *fl); - -/* Given the lock cluster fl, it unlocks all its elements */ -int filerwlongunlock(filerwlock *fl); diff --git a/libical/src/libical/foo b/libical/src/libical/foo deleted file mode 100644 index f46fdc7814..0000000000 --- a/libical/src/libical/foo +++ /dev/null @@ -1,1578 +0,0 @@ -/* - ====================================================================== - File: icalrestriction.c - - (C) COPYRIGHT 1999 Eric Busboom - http://www.softwarestudio.org - - The contents of this file are subject to the Mozilla Public License - Version 1.0 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and - limitations under the License. - - - ======================================================================*/ - -#include "icalenums.h" -#include "icalrestriction.h" - -/* Define the structs for the restrictions. these data are filled out -in machine generated code below */ - -typedef struct icalrestriction_property_record { - icalproperty_method method; - icalcomponent_kind component; - icalproperty_kind property; - icalrestriction_kind restriction; -} icalrestriction_property_record; - - -typedef struct icalrestriction_component_record { - icalproperty_method method; - icalcomponent_kind component; - icalcomponent_kind subcomponent; - icalrestriction_kind restriction; -} icalrestriction_component_record; - -icalrestriction_component_record icalrestriction_component_records[]; -icalrestriction_property_record icalrestriction_property_records[]; - -/* The each row gives the result of comparing a restriction against a - count. The columns in each row represent 0,1,2+. '-1' indicates - 'invalid, 'don't care' or 'needs more analysis' */ - -char compare_map[ICAL_RESTRICTION_UNKNOWN+1][3] = { - { 1, 1, 1},/*ICAL_RESTRICTION_NONE*/ - { 1, 0, 0},/*ICAL_RESTRICTION_ZERO*/ - { 0, 1, 0},/*ICAL_RESTRICTION_ONE*/ - { 1, 1, 1},/*ICAL_RESTRICTION_ZEROPLUS*/ - { 0, 1, 1},/*ICAL_RESTRICTION_ONEPLUS*/ - { 1, 1, 0},/*ICAL_RESTRICTION_ZEROORONE*/ - { 1, 1, 0},/*ICAL_RESTRICTION_ONEEXCLUSIVE*/ - { 1, 1, 0},/*ICAL_RESTRICTION_ONEMUTUAL*/ - { 1, 1, 1} /*ICAL_RESTRICTION_UNKNOWN*/ -}; - -char restr_string_map[ICAL_RESTRICTION_UNKNOWN+1][60] = { - "unknown number",/*ICAL_RESTRICTION_NONE*/ - "0",/*ICAL_RESTRICTION_ZERO*/ - "1",/*ICAL_RESTRICTION_ONE*/ - "zero or more",/*ICAL_RESTRICTION_ZEROPLUS*/ - "one or more" ,/*ICAL_RESTRICTION_ONEPLUS*/ - "zero or more",/*ICAL_RESTRICTION_ZEROORONE*/ - "zero or one, exclusive with another property",/*ICAL_RESTRICTION_ONEEXCLUSIVE*/ - "zero or one, mutual with another property",/*ICAL_RESTRICTION_ONEMUTUAL*/ - "unknown number" /*ICAL_RESTRICTION_UNKNOWN*/ -}; - - -int -icalrestriction_compare(icalrestriction_kind restr, int count){ - - if ( restr < ICAL_RESTRICTION_NONE || restr > ICAL_RESTRICTION_UNKNOWN - || count < 0){ - return -1; - } - - if (count > 2) { - count = 2; - } - - return compare_map[restr][count]; - -} - -int icalrestriction_check_component(icalproperty_method method, - icalcomponent* comp) -{ - icalproperty_kind kind; - icalcomponent_kind comp_kind; - icalrestriction_kind restr; - int count; - int compare; - int valid = 1; - - comp_kind = icalcomponent_isa(comp); - - /* Check all of the properties in this component */ - - for(kind = ICAL_ANY_PROPERTY+1; kind != ICAL_NO_PROPERTY; kind++){ - count = icalcomponent_count_properties(comp, kind); - - restr = icalrestriction_get_property_restriction(method, - comp_kind, - kind); - - - if(restr == ICAL_RESTRICTION_ONEEXCLUSIVE ) { - /* HACK. Treat this as a 0/1 restriction */ - restr = ICAL_RESTRICTION_ZEROORONE; - compare = icalrestriction_compare(restr,count); - } else if (restr == ICAL_RESTRICTION_ONEMUTUAL ) { - /* HACK. Treat this as a 0/1 restriction */ - restr = ICAL_RESTRICTION_ZEROORONE; - compare = icalrestriction_compare(restr,count); - } else { - compare = icalrestriction_compare(restr,count); - } - - assert(compare != -1); - - - if (compare == 0){ - char temp[1024]; - - sprintf(temp, "Failed iTIP restrictions for property %s. Expected %s instances of the property and got %d", - icalenum_property_kind_to_string(kind), - restr_string_map[restr], count); - - icalcomponent_add_property - (comp, - icalproperty_vanew_xlicerror( - temp, - icalparameter_new_xlicerrortype(ICAL_XLICERRORTYPE_INVALIDITIP), - 0)); - } - - - valid = valid && compare; - } - - - - return valid; - - -} - -int icalrestriction_check(icalcomponent* outer_comp) -{ - icalcomponent_kind comp_kind; - icalproperty_method method; - icalcomponent* inner_comp; - icalproperty *method_prop; - int valid; - - icalerror_check_arg_rz( (outer_comp!=0), "outer comp"); - - - /* Get the Method value from the outer component */ - - comp_kind = icalcomponent_isa(outer_comp); - - if (comp_kind != ICAL_VCALENDAR_COMPONENT){ - icalerror_set_errno(ICAL_BADARG_ERROR); - return 0; - } - - method_prop = icalcomponent_get_first_property(outer_comp, - ICAL_METHOD_PROPERTY); - - if (method_prop == 0){ - method = ICAL_METHOD_NONE; - } else { - method = icalproperty_get_method(method_prop); - } - - - /* Check the VCALENDAR wrapper */ - valid = icalrestriction_check_component(ICAL_METHOD_NONE,outer_comp); - - - /* Now check the inner components */ - - for(inner_comp= icalcomponent_get_first_component(outer_comp, - ICAL_ANY_COMPONENT); - inner_comp != 0; - inner_comp= icalcomponent_get_next_component(outer_comp, - ICAL_ANY_COMPONENT)){ - - valid = valid && icalrestriction_check_component(method,inner_comp); - - } - - - return valid; - -} - -icalrestriction_kind -icalrestriction_get_property_restriction(icalproperty_method method, - icalcomponent_kind component, - icalproperty_kind property) -{ - int i; - - for(i = 0; - icalrestriction_property_records[i].restriction != ICAL_RESTRICTION_NONE; - i++){ - - if (method == icalrestriction_property_records[i].method && - component == icalrestriction_property_records[i].component && - property == icalrestriction_property_records[i].property ){ - return icalrestriction_property_records[i].restriction; - } - } - - return ICAL_RESTRICTION_UNKNOWN; -} - -icalrestriction_kind -icalrestriction_get_component_restriction(icalproperty_method method, - icalcomponent_kind component, - icalcomponent_kind subcomponent) -{ - - int i; - - for(i = 0; - icalrestriction_component_records[i].restriction != ICAL_RESTRICTION_NONE; - i++){ - - if (method == icalrestriction_component_records[i].method && - component == icalrestriction_component_records[i].component && - subcomponent == icalrestriction_component_records[i].subcomponent ){ - return icalrestriction_component_records[i].restriction; - } - } - - return ICAL_RESTRICTION_UNKNOWN; -} - -/* Everything below this line is machine generated. Do not edit. */ -icalrestriction_property_record icalrestriction_property_records[] = { - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ONEPLUS,0}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE,icalrestriction_check_exclusive}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE,icalrestriction_check_exclusive}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE,icalrestriction_check_exclusive}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE,icalrestriction_check_exclusive}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE, icalrestriction_check_exclusive}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE, icalrestriction_check_exclusive}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE, icalrestriction_check_exclusive}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE, icalrestriction_check_exclusive}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE, icalrestriction_check_exclusive}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE, icalrestriction_check_exclusive}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_FREEBUSY_PROPERTY,ICAL_RESTRICTION_ONEPLUS,0}, - {ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REQUEST,ICAL_VFREEBUSY_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ONEPLUS,0}, - {ICAL_METHOD_REQUEST,ICAL_VFREEBUSY_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VFREEBUSY_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VFREEBUSY_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VFREEBUSY_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VFREEBUSY_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VFREEBUSY_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VFREEBUSY_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_REQUEST,ICAL_VFREEBUSY_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_REQUEST,ICAL_VFREEBUSY_COMPONENT,ICAL_FREEBUSY_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REQUEST,ICAL_VFREEBUSY_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REQUEST,ICAL_VFREEBUSY_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REQUEST,ICAL_VFREEBUSY_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REPLY,ICAL_VFREEBUSY_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_REPLY,ICAL_VFREEBUSY_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_REPLY,ICAL_VFREEBUSY_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_REPLY,ICAL_VFREEBUSY_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_REPLY,ICAL_VFREEBUSY_COMPONENT,ICAL_FREEBUSY_PROPERTY,ICAL_RESTRICTION_ONEPLUS,0}, - {ICAL_METHOD_REPLY,ICAL_VFREEBUSY_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_REPLY,ICAL_VFREEBUSY_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_REPLY,ICAL_VFREEBUSY_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REPLY,ICAL_VFREEBUSY_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_REPLY,ICAL_VFREEBUSY_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_REPLY,ICAL_VFREEBUSY_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REPLY,ICAL_VFREEBUSY_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_REPLY,ICAL_VFREEBUSY_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REPLY,ICAL_VFREEBUSY_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ONEPLUS,0}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ONEPLUS,0}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ONEPLUS,0}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ONEPLUS,0}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ONEPLUS,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_ACTION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_CALSCALE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_COMPLETED_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_FREEBUSY_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_METHOD_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_PRODID_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_REPEAT_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_TRIGGER_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_TZID_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_TZNAME_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_TZOFFSETFROM_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_TZOFFSETTO_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_TZURL_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_VERSION_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_ACTION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_CALSCALE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_COMPLETED_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE, icalrestriction_check_exclusive}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE, icalrestriction_check_exclusive}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_FREEBUSY_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_METHOD_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_PRODID_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_REPEAT_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_TRIGGER_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_TZID_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_TZNAME_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_TZOFFSETFROM_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_TZOFFSETTO_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_TZURL_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_VERSION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_ACTION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_CALSCALE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_COMPLETED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_FREEBUSY_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_METHOD_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_PRODID_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_REPEAT_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_TRIGGER_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_TZID_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_TZNAME_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_TZOFFSETFROM_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_TZOFFSETTO_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_TZURL_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_VERSION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_ACTION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_CALSCALE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_COMPLETED_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_FREEBUSY_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_METHOD_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_PRODID_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_REPEAT_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_TRIGGER_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_TZID_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_TZNAME_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_TZOFFSETFROM_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_TZOFFSETTO_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_TZURL_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_VERSION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_ACTION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_CALSCALE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_COMPLETED_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_FREEBUSY_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_METHOD_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_PRODID_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_REPEAT_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_TRIGGER_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_TZID_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_TZNAME_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_TZOFFSETFROM_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_TZOFFSETTO_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_TZURL_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_VERSION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_ACTION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_CALSCALE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_COMPLETED_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_FREEBUSY_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_METHOD_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_PRODID_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_REPEAT_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_TRIGGER_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_TZID_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_TZNAME_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_TZOFFSETFROM_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_TZOFFSETTO_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_TZURL_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_VERSION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_ACTION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_CALSCALE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_COMPLETED_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_FREEBUSY_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_METHOD_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_PRODID_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_REPEAT_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_TRIGGER_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_TZID_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_TZNAME_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_TZOFFSETFROM_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_TZOFFSETTO_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_TZURL_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_VERSION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_ACTION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_CALSCALE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_COMPLETED_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_FREEBUSY_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_METHOD_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_PRODID_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_REPEAT_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_TRIGGER_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_TZID_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_TZNAME_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_TZOFFSETFROM_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_TZOFFSETTO_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_TZURL_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_VERSION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_ACTION_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_CALSCALE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_COMPLETED_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEMUTUAL,icalrestriction_check_mutual}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_REPEAT_PROPERTY,ICAL_RESTRICTION_ONEMUTUAL,icalrestriction_check_mutual}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_FREEBUSY_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_METHOD_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_PRODID_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_TRIGGER_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_TZID_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_TZNAME_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_TZOFFSETFROM_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_TZOFFSETTO_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_TZURL_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_VERSION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_ACTION_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_CALSCALE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_COMPLETED_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEMUTUAL,icalrestriction_check_mutual}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_REPEAT_PROPERTY,ICAL_RESTRICTION_ONEMUTUAL,icalrestriction_check_mutual}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_FREEBUSY_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_METHOD_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_PRODID_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_TRIGGER_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_TZID_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_TZNAME_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_TZOFFSETFROM_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_TZOFFSETTO_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_TZURL_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_VERSION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_ACTION_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ONEPLUS,0}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_CALSCALE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_COMPLETED_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEMUTUAL,icalrestriction_check_mutual}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_REPEAT_PROPERTY,ICAL_RESTRICTION_ONEMUTUAL,icalrestriction_check_mutual}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_FREEBUSY_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_METHOD_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_PRODID_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_TRIGGER_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_TZID_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_TZNAME_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_TZOFFSETFROM_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_TZOFFSETTO_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_TZURL_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_VERSION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_ACTION_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_CALSCALE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_COMPLETED_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEMUTUAL,icalrestriction_check_mutual}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_REPEAT_PROPERTY,ICAL_RESTRICTION_ONEMUTUAL,icalrestriction_check_mutual}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_FREEBUSY_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_METHOD_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_PRODID_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_TRIGGER_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_TZID_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_TZNAME_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_TZOFFSETFROM_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_TZOFFSETTO_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_TZURL_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_VERSION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_NO_COMPONENT,ICAL_NO_PROPERTY,ICAL_RESTRICTION_NONE} -}; -icalrestriction_component_record icalrestriction_component_records[] = { - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_VJOURNAL_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_VTODO_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_VJOURNAL_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_VTODO_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_VJOURNAL_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_VTODO_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_VTODO_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_VJOURNAL_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_VTODO_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_VJOURNAL_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_VTODO_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_VJOURNAL_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_VTODO_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_VJOURNAL_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_VTODO_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_VJOURNAL_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_VEVENT_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_VTODO_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_VJOURNAL_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REQUEST,ICAL_VFREEBUSY_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REQUEST,ICAL_VFREEBUSY_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REQUEST,ICAL_VFREEBUSY_COMPONENT,ICAL_VEVENT_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REQUEST,ICAL_VFREEBUSY_COMPONENT,ICAL_VTODO_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REQUEST,ICAL_VFREEBUSY_COMPONENT,ICAL_VJOURNAL_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REQUEST,ICAL_VFREEBUSY_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REPLY,ICAL_VFREEBUSY_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REPLY,ICAL_VFREEBUSY_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REPLY,ICAL_VFREEBUSY_COMPONENT,ICAL_VEVENT_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REPLY,ICAL_VFREEBUSY_COMPONENT,ICAL_VTODO_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REPLY,ICAL_VFREEBUSY_COMPONENT,ICAL_VJOURNAL_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REPLY,ICAL_VFREEBUSY_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_VEVENT_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_VJOURNAL_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_VEVENT_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_VJOURNAL_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_VEVENT_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_VEVENT_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_VJOURNAL_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_VEVENT_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_VEVENT_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_VEVENT_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_VEVENT_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_VEVENT_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_VTODO_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_VEVENT_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_VTODO_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_VEVENT_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_VTODO_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_NO_COMPONENT,ICAL_NO_COMPONENT,ICAL_RESTRICTION_NONE} -}; diff --git a/libical/src/libical/ical.h b/libical/src/libical/ical.h deleted file mode 100644 index d0f33cd1a1..0000000000 --- a/libical/src/libical/ical.h +++ /dev/null @@ -1,43 +0,0 @@ -/* -*- Mode: C -*- */ -/*====================================================================== - FILE: ical.h - CREATOR: eric 20 March 1999 - - - (C) COPYRIGHT 1999 Eric Busboom - http://www.softwarestudio.org - - The contents of this file are subject to the Mozilla Public License - Version 1.0 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and - limitations under the License. - - The original author is Eric Busboom - The original code is ical.h - -======================================================================*/ - -#ifndef ICAL_H -#define ICAL_H - -#include "icalversion.h" -#include "icalenums.h" -#include "icalvalue.h" -#include "icalparameter.h" -#include "icalproperty.h" -#include "icalcomponent.h" -#include "icaltypes.h" -#include "icalparser.h" -#include "icalmemory.h" -#include "icalerror.h" -#include "icalrestriction.h" - -#endif /* !ICAL_H */ - - - diff --git a/libical/src/libical/icalcomponent.c b/libical/src/libical/icalcomponent.c deleted file mode 100644 index bd2b13189c..0000000000 --- a/libical/src/libical/icalcomponent.c +++ /dev/null @@ -1,782 +0,0 @@ -/* -*- Mode: C -*- */ -/*====================================================================== - FILE: icalcomponent.c - CREATOR: eric 28 April 1999 - - $Id$ - - - (C) COPYRIGHT 1999 Eric Busboom - http://www.softwarestudio.org - - The contents of this file are subject to the Mozilla Public License - Version 1.0 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and - limitations under the License. - - The original author is Eric Busboom - The original code is icalcomponent.c - -======================================================================*/ - - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "ical.h" -#include "pvl.h" /* "Pointer-to-void list" */ -#include /* for malloc */ -#include /* for va_list, etc */ -#include -#include "icalerror.h" -#include -#include /* for fprintf */ -#include "icalmemory.h" -#include "icalenums.h" - -#define MAX_TMP 1024 - - -/* icalproperty functions that only components get to use */ -void icalproperty_set_parent(icalproperty* property, - icalcomponent* component); - -icalcomponent* icalproperty_get_parent(icalproperty* property); - - - -struct icalcomponent_impl -{ - char id[5]; - icalcomponent_kind kind; - char* x_name; - pvl_list properties; - pvl_elem property_iterator; - pvl_list components; - pvl_elem component_iterator; - icalcomponent* parent; -}; - -void icalcomponent_add_children(struct icalcomponent_impl *impl,va_list args) -{ - void* vp; - - while((vp = va_arg(args, void*)) != 0) { - - assert (icalcomponent_isa_component(vp) != 0 || - icalproperty_isa_property(vp) != 0 ) ; - - if (icalcomponent_isa_component(vp) != 0 ){ - - icalcomponent_add_component((icalcomponent*)impl, - (icalcomponent*)vp); - - } else if (icalproperty_isa_property(vp) != 0 ){ - - icalcomponent_add_property((icalcomponent*)impl, - (icalproperty*)vp); - } - } -} - -icalcomponent* -icalcomponent_new_impl (icalcomponent_kind kind) -{ - struct icalcomponent_impl* comp; - - if ( ( comp = (struct icalcomponent_impl*) - malloc(sizeof(struct icalcomponent_impl))) == 0) { - icalerror_set_errno(ICAL_NEWFAILED_ERROR); - return 0; - } - - strcpy(comp->id,"comp"); - - comp->kind = kind; - comp->properties = pvl_newlist(); - comp->property_iterator = 0; - comp->components = pvl_newlist(); - comp->component_iterator = 0; - comp->x_name = 0; - comp->parent = 0; - - return comp; -} - -icalcomponent* -icalcomponent_new (icalcomponent_kind kind) -{ - return (icalcomponent*)icalcomponent_new_impl(kind); -} - -icalcomponent* -icalcomponent_vanew (icalcomponent_kind kind, ...) -{ - va_list args; - - struct icalcomponent_impl *impl = icalcomponent_new_impl(kind); - - if (impl == 0){ - return 0; - } - - va_start(args,kind); - icalcomponent_add_children(impl, args); - va_end(args); - - return (icalcomponent*) impl; -} - -icalcomponent* icalcomponent_new_from_string(char* str) -{ - icalcomponent_kind kind; - - icalerror_check_arg_rz( (str!=0), "str"); - - kind = icalenum_string_to_component_kind(str); - - if (kind == ICAL_NO_COMPONENT){ - return 0; - } - - return icalcomponent_new(kind); -} - -icalcomponent* icalcomponent_new_clone(icalcomponent* component) -{ - struct icalcomponent_impl *old = (struct icalcomponent_impl*)component; - struct icalcomponent_impl *new; - icalproperty *p; - icalcomponent *c; - - icalerror_check_arg_rv( (component!=0), "component"); - - new = icalcomponent_new_impl(old->kind); - - if (new == 0){ - return 0; - } - - - for(p = icalcomponent_get_first_property(old,ICAL_ANY_PROPERTY); - p != 0; - p = icalcomponent_get_next_property(old,ICAL_ANY_PROPERTY)){ - - icalcomponent_add_property(new,icalproperty_new_clone(p)); - } - - - for(c = icalcomponent_get_first_component(old,ICAL_ANY_COMPONENT); - c != 0; - c = icalcomponent_get_next_component(old,ICAL_ANY_COMPONENT)){ - - icalcomponent_add_component(new,icalcomponent_new_clone(c)); - } - - return new; - -} - - -void -icalcomponent_free (icalcomponent* component) -{ - icalproperty* prop; - icalcomponent* comp; - struct icalcomponent_impl *c = (struct icalcomponent_impl*)component; - - icalerror_check_arg_rv( (component!=0), "component"); - -#ifdef ICAL_FREE_ON_LIST_IS_ERROR - icalerror_assert( (c->parent ==0),"Tried to free a component that is still attached to a parent component"); -#else - if(c->parent != 0){ - return; - } -#endif - - if(component != 0 ){ - - while( (prop=pvl_pop(c->properties)) != 0){ - assert(prop != 0); - icalproperty_set_parent(prop,0); - icalproperty_free(prop); - } - - pvl_free(c->properties); - - while( (comp=pvl_data(pvl_head(c->components))) != 0){ - assert(comp!=0); - icalcomponent_remove_component(component,comp); - icalcomponent_free(comp); - } - - pvl_free(c->components); - - if (c->x_name != 0) { - free(c->x_name); - } - - c->kind = ICAL_NO_COMPONENT; - c->properties = 0; - c->property_iterator = 0; - c->components = 0; - c->component_iterator = 0; - c->x_name = 0; - c->id[0] = 'X'; - - free(c); - } -} - -char* -icalcomponent_as_ical_string (icalcomponent* component) -{ - char* buf, *out_buf; - char* tmp_buf; - size_t buf_size = 1024; - char* buf_ptr = 0; - -#ifdef ICAL_UNIX_NEWLINE - char newline[] = "\n"; -#else - char newline[] = "\r\n"; -#endif - - icalcomponent *c; - icalproperty *p; - icalcomponent_kind kind = icalcomponent_isa(component); - - char* kind_string; - - buf = icalmemory_new_buffer(buf_size); - buf_ptr = buf; - - icalerror_check_arg_rz( (component!=0), "component"); - icalerror_check_arg_rz( (kind!=ICAL_NO_COMPONENT), "component kind is ICAL_NO_COMPONENT"); - - kind_string = icalenum_component_kind_to_string(kind); - - icalerror_check_arg_rz( (kind_string!=0),"Unknown kind of component"); - - icalmemory_append_string(&buf, &buf_ptr, &buf_size, "BEGIN:"); - icalmemory_append_string(&buf, &buf_ptr, &buf_size, kind_string); - icalmemory_append_string(&buf, &buf_ptr, &buf_size, newline); - - - for(p = icalcomponent_get_first_property(component,ICAL_ANY_PROPERTY); - p != 0; - p = icalcomponent_get_next_property(component,ICAL_ANY_PROPERTY)){ - - tmp_buf = icalproperty_as_ical_string(p); - - icalmemory_append_string(&buf, &buf_ptr, &buf_size, tmp_buf); - } - - - for(c = icalcomponent_get_first_component(component,ICAL_ANY_COMPONENT); - c != 0; - c = icalcomponent_get_next_component(component,ICAL_ANY_COMPONENT)){ - - tmp_buf = icalcomponent_as_ical_string(c); - - icalmemory_append_string(&buf, &buf_ptr, &buf_size, tmp_buf); - - } - - icalmemory_append_string(&buf, &buf_ptr, &buf_size, "END:"); - icalmemory_append_string(&buf, &buf_ptr, &buf_size, - icalenum_component_kind_to_string(kind)); - icalmemory_append_string(&buf, &buf_ptr, &buf_size, newline); - - out_buf = icalmemory_tmp_copy(buf); - free(buf); - - return out_buf; -} - - -int -icalcomponent_is_valid (icalcomponent* component) -{ - struct icalcomponent_impl *impl = (struct icalcomponent_impl *)component; - - - if ( (strcmp(impl->id,"comp") == 0) && - impl->kind != ICAL_NO_COMPONENT){ - return 1; - } else { - return 0; - } - -} - - -icalcomponent_kind -icalcomponent_isa (icalcomponent* component) -{ - struct icalcomponent_impl *impl = (struct icalcomponent_impl *)component; - icalerror_check_arg_rz( (component!=0), "component"); - - if(component != 0) - { - return impl->kind; - } - - return ICAL_NO_COMPONENT; -} - - -int -icalcomponent_isa_component (void* component) -{ - struct icalcomponent_impl *impl = (struct icalcomponent_impl *)component; - - icalerror_check_arg_rz( (component!=0), "component"); - - if (strcmp(impl->id,"comp") == 0) { - return 1; - } else { - return 0; - } - -} - -int icalcomponent_property_sorter(void *a, void *b) -{ - icalproperty_kind kinda, kindb; - char *ksa, *ksb; - - kinda = icalproperty_isa((icalproperty*)a); - kindb = icalproperty_isa((icalproperty*)b); - - ksa = icalenum_property_kind_to_string(kinda); - ksb = icalenum_property_kind_to_string(kindb); - - return strcmp(ksa,ksb); -} - - -void -icalcomponent_add_property (icalcomponent* component, icalproperty* property) -{ - struct icalcomponent_impl *impl; - - icalerror_check_arg_rv( (component!=0), "component"); - icalerror_check_arg_rv( (property!=0), "property"); - - impl = (struct icalcomponent_impl*)component; - - icalerror_assert( (!icalproperty_get_parent(property)),"The property has already been added to a component. Remove the property with icalcomponent_remove_property before calling icalcomponent_add_property"); - - icalproperty_set_parent(property,component); - -#ifdef ICAL_INSERT_ORDERED - pvl_insert_ordered(impl->properties, - icalcomponent_property_sorter,property); -#else - pvl_push(impl->properties,property); -#endif - -} - - -void -icalcomponent_remove_property (icalcomponent* component, icalproperty* property) -{ - struct icalcomponent_impl *impl; - pvl_elem itr, next_itr; - struct icalproperty_impl *pimpl; - - icalerror_check_arg_rv( (component!=0), "component"); - icalerror_check_arg_rv( (property!=0), "property"); - - impl = (struct icalcomponent_impl*)component; - - pimpl = (struct icalproperty_impl*)property; - - icalerror_assert( (icalproperty_get_parent(property)),"The property is not a member of a component"); - - - for( itr = pvl_head(impl->properties); - itr != 0; - itr = next_itr) - { - next_itr = pvl_next(itr); - - if( pvl_data(itr) == (void*)property ){ - - if (impl->property_iterator == itr){ - impl->property_iterator = pvl_next(itr); - } - - pvl_remove( impl->properties, itr); - icalproperty_set_parent(property,0); - } - } -} - -int -icalcomponent_count_properties (icalcomponent* component, icalproperty_kind kind) -{ - int count=0; - icalproperty *p; - icalerror_check_arg_rz( (component!=0), "component"); - - for(p = icalcomponent_get_first_property(component,kind); - p != 0; - p = icalcomponent_get_next_property(component,kind)){ - - count++; - } - - - return count; - -} - -icalproperty* icalcomponent_get_current_property (icalcomponent* component) -{ - - struct icalcomponent_impl *c = (struct icalcomponent_impl*)component; - icalerror_check_arg_rz( (component!=0),"component"); - - if ((c->property_iterator==0)){ - return 0; - } - - return (icalproperty*) pvl_data(c->property_iterator); - -} - -icalproperty* -icalcomponent_get_first_property (icalcomponent* component, icalproperty_kind kind) -{ - struct icalcomponent_impl *c = (struct icalcomponent_impl*)component; - icalerror_check_arg_rz( (component!=0),"component"); - - for( c->property_iterator = pvl_head(c->properties); - c->property_iterator != 0; - c->property_iterator = pvl_next(c->property_iterator)) { - - icalproperty *p = (icalproperty*) pvl_data(c->property_iterator); - - if (icalproperty_isa(p) == kind || kind == ICAL_ANY_PROPERTY) { - - return p; - } - } - return 0; -} - -icalproperty* -icalcomponent_get_next_property (icalcomponent* component, icalproperty_kind kind) -{ - struct icalcomponent_impl *c = (struct icalcomponent_impl*)component; - icalerror_check_arg_rz( (component!=0),"component"); - - if (c->property_iterator == 0){ - return 0; - } - - for( c->property_iterator = pvl_next(c->property_iterator); - c->property_iterator != 0; - c->property_iterator = pvl_next(c->property_iterator)) { - - icalproperty *p = (icalproperty*) pvl_data(c->property_iterator); - - if (icalproperty_isa(p) == kind || kind == ICAL_ANY_PROPERTY) { - - return p; - } - } - - return 0; -} - - -icalproperty** -icalcomponent_get_properties (icalcomponent* component, icalproperty_kind kind); - - -void -icalcomponent_add_component (icalcomponent* parent, icalcomponent* child) -{ - struct icalcomponent_impl *impl, *cimpl; - - icalerror_check_arg_rv( (parent!=0), "parent"); - icalerror_check_arg_rv( (child!=0), "child"); - - impl = (struct icalcomponent_impl*)parent; - cimpl = (struct icalcomponent_impl*)child; - - icalerror_assert( (cimpl->parent ==0),"The child component has already been added to a parent component. Remove the component with icalcomponent_remove_componenet before calling icalcomponent_add_component"); - - cimpl->parent = parent; - - pvl_push(impl->components,child); -} - - -void -icalcomponent_remove_component (icalcomponent* parent, icalcomponent* child) -{ - struct icalcomponent_impl *impl,*cimpl; - pvl_elem itr, next_itr; - - icalerror_check_arg_rv( (parent!=0), "parent"); - icalerror_check_arg_rv( (child!=0), "child"); - - impl = (struct icalcomponent_impl*)parent; - cimpl = (struct icalcomponent_impl*)child; - - for( itr = pvl_head(impl->components); - itr != 0; - itr = next_itr) - { - next_itr = pvl_next(itr); - - if( pvl_data(itr) == (void*)child ){ - - if (impl->component_iterator == itr){ - /* impl->component_iterator = pvl_next(itr);*/ - } - pvl_remove( impl->components, itr); - cimpl->parent = 0; - } - } -} - - -int -icalcomponent_count_components (icalcomponent* component, icalcomponent_kind kind) -{ - int count=0; - icalcomponent *c; - icalerror_check_arg_rz( (component!=0), "component"); - - for(c = icalcomponent_get_first_component(component,kind); - c != 0; - c = icalcomponent_get_next_component(component,kind)){ - - count++; - } - - - return count; -} - -icalcomponent* -icalcomponent_get_current_component(icalcomponent* component) -{ - struct icalcomponent_impl *c = (struct icalcomponent_impl*)component; - - icalerror_check_arg_rz( (component!=0),"component"); - - if (c->component_iterator == 0){ - return 0; - } - - return (icalcomponent*) pvl_data(c->component_iterator); -} - -icalcomponent* -icalcomponent_get_first_component (icalcomponent* component, - icalcomponent_kind kind) -{ - struct icalcomponent_impl *c = (struct icalcomponent_impl*)component; - - icalerror_check_arg_rz( (component!=0),"component"); - - for( c->component_iterator = pvl_head(c->components); - c->component_iterator != 0; - c->component_iterator = pvl_next(c->component_iterator)) { - - icalcomponent *p = (icalcomponent*) pvl_data(c->component_iterator); - - if (icalcomponent_isa(p) == kind || kind == ICAL_ANY_COMPONENT) { - - return p; - } - } - - return 0; -} - - -icalcomponent* -icalcomponent_get_next_component (icalcomponent* component, icalcomponent_kind kind) -{ - struct icalcomponent_impl *c = (struct icalcomponent_impl*)component; - - icalerror_check_arg_rz( (component!=0),"component"); - - if (c->component_iterator == 0){ - return 0; - } - - for( c->component_iterator = pvl_next(c->component_iterator); - c->component_iterator != 0; - c->component_iterator = pvl_next(c->component_iterator)) { - - icalcomponent *p = (icalcomponent*) pvl_data(c->component_iterator); - - if (icalcomponent_isa(p) == kind || kind == ICAL_ANY_COMPONENT) { - - return p; - } - } - - return 0; -} - - -icalproperty** -icalcomponent_get_component (icalcomponent* component, icalproperty_kind kind); - - -int icalcomponent_count_errors(icalcomponent* component) -{ - int errors = 0; - icalproperty *p; - icalcomponent *c; - - for(p = icalcomponent_get_first_property(component,ICAL_ANY_PROPERTY); - p != 0; - p = icalcomponent_get_next_property(component,ICAL_ANY_PROPERTY)){ - - if(icalproperty_isa(p) == ICAL_XLICERROR_PROPERTY) - { - errors++; - } - } - - for(c = icalcomponent_get_first_component(component,ICAL_ANY_COMPONENT); - c != 0; - c = icalcomponent_get_next_component(component,ICAL_ANY_COMPONENT)){ - - errors += icalcomponent_count_errors(c); - - } - - return errors; -} - - -void icalcomponent_strip_errors(icalcomponent* component) -{ - icalproperty *p, *next_p; - icalcomponent *c; - - for(p = icalcomponent_get_first_property(component,ICAL_ANY_PROPERTY); - p != 0; - p = next_p){ - - next_p = icalcomponent_get_next_property(component,ICAL_ANY_PROPERTY); - - if(icalproperty_isa(p) == ICAL_XLICERROR_PROPERTY) - { - icalcomponent_remove_property(component,p); - } - } - - for(c = icalcomponent_get_first_component(component,ICAL_ANY_COMPONENT); - c != 0; - c = icalcomponent_get_next_component(component,ICAL_ANY_COMPONENT)){ - - icalcomponent_strip_errors(c); - } -} - - -void icalcomponent_convert_errors(icalcomponent* component) -{ - icalproperty *p, *next_p; - icalcomponent *c; - - for(p = icalcomponent_get_first_property(component,ICAL_ANY_PROPERTY); - p != 0; - p = next_p){ - - next_p = icalcomponent_get_next_property(component,ICAL_ANY_PROPERTY); - - if(icalproperty_isa(p) == ICAL_XLICERROR_PROPERTY) - { - struct icalreqstattype rst; - char tmp[MAX_TMP]; - icalparameter *param = icalproperty_get_first_parameter - (p,ICAL_XLICERRORTYPE_PARAMETER); - - rst.code = ICAL_UNKNOWN_STATUS; - rst.desc = 0; - - switch(icalparameter_get_xlicerrortype(param)){ - - case ICAL_XLICERRORTYPE_PARAMETERNAMEPARSEERROR: { - rst.code = ICAL_3_2_INVPARAM_STATUS; - break; - } - case ICAL_XLICERRORTYPE_PARAMETERVALUEPARSEERROR: { - rst.code = ICAL_3_3_INVPARAMVAL_STATUS; - break; - } - case ICAL_XLICERRORTYPE_PROPERTYPARSEERROR: { - rst.code = ICAL_3_0_INVPROPNAME_STATUS; - break; - } - case ICAL_XLICERRORTYPE_VALUEPARSEERROR: { - rst.code = ICAL_3_1_INVPROPVAL_STATUS; - break; - } - case ICAL_XLICERRORTYPE_COMPONENTPARSEERROR: { - rst.code = ICAL_3_4_INVCOMP_STATUS; - break; - } - - default: { - } - } - if (rst.code != ICAL_UNKNOWN_STATUS){ - - rst.debug = icalproperty_get_xlicerror(p); - icalcomponent_add_property(component, - icalproperty_new_requeststatus( - icalreqstattype_as_string(rst) - ) - ); - - icalcomponent_remove_property(component,p); - } - } - } - - for(c = icalcomponent_get_first_component(component,ICAL_ANY_COMPONENT); - c != 0; - c = icalcomponent_get_next_component(component,ICAL_ANY_COMPONENT)){ - - icalcomponent_convert_errors(c); - } -} - - -icalcomponent* icalcomponent_get_parent(icalcomponent* component) -{ - struct icalcomponent_impl *c = (struct icalcomponent_impl*)component; - - return c->parent; -} - -void icalcomponent_set_parent(icalcomponent* component, icalcomponent* parent) -{ - struct icalcomponent_impl *c = (struct icalcomponent_impl*)component; - - c->parent = parent; -} - - diff --git a/libical/src/libical/icalcomponent.h b/libical/src/libical/icalcomponent.h deleted file mode 100644 index 8d9f22ca76..0000000000 --- a/libical/src/libical/icalcomponent.h +++ /dev/null @@ -1,119 +0,0 @@ -/* -*- Mode: C -*- */ -/*====================================================================== - FILE: icalcomponent.h - CREATOR: eric 20 March 1999 - - - (C) COPYRIGHT 1999 Eric Busboom - http://www.softwarestudio.org - - The contents of this file are subject to the Mozilla Public License - Version 1.0 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and - limitations under the License. - - The original author is Eric Busboom - The original code is icalcomponent.h - -======================================================================*/ - -#ifndef ICALCOMPONENT_H -#define ICALCOMPONENT_H - -#include "icalproperty.h" -#include "icalvalue.h" -#include "icalenums.h" /* defines icalcomponent_kind */ - -typedef void icalcomponent; - -icalcomponent* icalcomponent_new(icalcomponent_kind kind); -icalcomponent* icalcomponent_new_clone(icalcomponent* component); -icalcomponent* icalcomponent_new_from_string(char* str); -icalcomponent* icalcomponent_vanew(icalcomponent_kind kind, ...); -void icalcomponent_free(icalcomponent* component); - -char* icalcomponent_as_ical_string(icalcomponent* component); - -int icalcomponent_is_valid(icalcomponent* component); - -icalcomponent_kind icalcomponent_isa(icalcomponent* component); - -int icalcomponent_isa_component (void* component); - -/* - * Working with properties - */ - -void icalcomponent_add_property(icalcomponent* component, - icalproperty* property); - -void icalcomponent_remove_property(icalcomponent* component, - icalproperty* property); - -int icalcomponent_count_properties(icalcomponent* component, - icalproperty_kind kind); - -/* Iterate through the properties */ -icalproperty* icalcomponent_get_current_property(icalcomponent* component); - -icalproperty* icalcomponent_get_first_property(icalcomponent* component, - icalproperty_kind kind); -icalproperty* icalcomponent_get_next_property(icalcomponent* component, - icalproperty_kind kind); - -/* Return a null-terminated array of icalproperties*/ - -icalproperty** icalcomponent_get_properties(icalcomponent* component, - icalproperty_kind kind); - - -/* - * Working with components - */ - - -void icalcomponent_add_component(icalcomponent* parent, - icalcomponent* child); - -void icalcomponent_remove_component(icalcomponent* parent, - icalcomponent* child); - -int icalcomponent_count_components(icalcomponent* component, - icalcomponent_kind kind); - -/* Iterate through components */ -icalcomponent* icalcomponent_get_current_component (icalcomponent* component); - -icalcomponent* icalcomponent_get_first_component(icalcomponent* component, - icalcomponent_kind kind); -icalcomponent* icalcomponent_get_next_component(icalcomponent* component, - icalcomponent_kind kind); - -/* Return a null-terminated array of icalproperties*/ -icalproperty** icalcomponent_get_component(icalcomponent* component, - icalproperty_kind kind); - -/* Working with embedded error properties */ - -int icalcomponent_count_errors(icalcomponent* component); - -/* Remove all X-LIC-ERROR properties*/ -void icalcomponent_strip_errors(icalcomponent* component); - -/* Convert some X-LIC-ERROR properties into RETURN-STATUS properties*/ -void icalcomponent_convert_errors(icalcomponent* component); - -/* Internal operations. You don't see these... */ -icalcomponent* icalcomponent_get_parent(icalcomponent* component); -void icalcomponent_set_parent(icalcomponent* component, - icalcomponent* parent); - -#endif /* !ICALCOMPONENT_H */ - - - diff --git a/libical/src/libical/icalenums.c b/libical/src/libical/icalenums.c deleted file mode 100644 index 95f308eec6..0000000000 --- a/libical/src/libical/icalenums.c +++ /dev/null @@ -1,615 +0,0 @@ -/* -*- Mode: C -*- */ -/*====================================================================== - FILE: icalenum.c - CREATOR: eric 29 April 1999 - - $Id$ - - - (C) COPYRIGHT 1999 Eric Busboom - http://www.softwarestudio.org - - The contents of this file are subject to the Mozilla Public License - Version 1.0 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and - limitations under the License. - - The original author is Eric Busboom - The original code is icalenum.c - - ======================================================================*/ - - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "icalenums.h" - -struct icalproperty_kind_map { - icalproperty_kind kind; - char name[20]; -}; - -static struct icalproperty_kind_map property_map[] = -{ - { ICAL_ACTION_PROPERTY, "ACTION"}, - { ICAL_ATTACH_PROPERTY, "ATTACH"}, - { ICAL_ATTENDEE_PROPERTY, "ATTENDEE"}, - { ICAL_CALSCALE_PROPERTY, "CALSCALE"}, - { ICAL_CATEGORIES_PROPERTY, "CATEGORIES"}, - { ICAL_CLASS_PROPERTY, "CLASS"}, - { ICAL_COMMENT_PROPERTY, "COMMENT"}, - { ICAL_COMPLETED_PROPERTY, "COMPLETED"}, - { ICAL_CONTACT_PROPERTY, "CONTACT"}, - { ICAL_CREATED_PROPERTY, "CREATED"}, - { ICAL_DESCRIPTION_PROPERTY, "DESCRIPTION"}, - { ICAL_DTEND_PROPERTY, "DTEND"}, - { ICAL_DTSTAMP_PROPERTY, "DTSTAMP"}, - { ICAL_DTSTART_PROPERTY, "DTSTART"}, - { ICAL_DUE_PROPERTY, "DUE"}, - { ICAL_DURATION_PROPERTY, "DURATION"}, - { ICAL_EXDATE_PROPERTY, "EXDATE"}, - { ICAL_EXRULE_PROPERTY, "EXRULE"}, - { ICAL_FREEBUSY_PROPERTY, "FREEBUSY"}, - { ICAL_GEO_PROPERTY, "GEO"}, - { ICAL_LASTMODIFIED_PROPERTY, "LAST-MODIFIED"}, - { ICAL_LOCATION_PROPERTY, "LOCATION"}, - { ICAL_METHOD_PROPERTY, "METHOD"}, - { ICAL_ORGANIZER_PROPERTY, "ORGANIZER"}, - { ICAL_PERCENTCOMPLETE_PROPERTY, "PERCENT-COMPLETE"}, - { ICAL_PRIORITY_PROPERTY, "PRIORITY"}, - { ICAL_PRODID_PROPERTY, "PRODID"}, - { ICAL_RDATE_PROPERTY, "RDATE"}, - { ICAL_RECURRENCEID_PROPERTY, "RECURRENCE-ID"}, - { ICAL_RELATEDTO_PROPERTY, "RELATED-TO"}, - { ICAL_REPEAT_PROPERTY, "REPEAT"}, - { ICAL_REQUESTSTATUS_PROPERTY, "REQUEST-STATUS"}, - { ICAL_RESOURCES_PROPERTY, "RESOURCES"}, - { ICAL_RRULE_PROPERTY, "RRULE"}, - { ICAL_SEQUENCE_PROPERTY, "SEQUENCE"}, - { ICAL_STATUS_PROPERTY, "STATUS"}, - { ICAL_SUMMARY_PROPERTY, "SUMMARY"}, - { ICAL_TRANSP_PROPERTY, "TRANSP"}, - { ICAL_TRIGGER_PROPERTY, "TRIGGER"}, - { ICAL_TZID_PROPERTY, "TZID"}, - { ICAL_TZNAME_PROPERTY, "TZNAME"}, - { ICAL_TZOFFSETFROM_PROPERTY, "TZOFFSETFROM"}, - { ICAL_TZOFFSETTO_PROPERTY, "TZOFFSETTO"}, - { ICAL_TZURL_PROPERTY, "TZURL"}, - { ICAL_UID_PROPERTY, "UID"}, - { ICAL_URL_PROPERTY, "URL"}, - { ICAL_VERSION_PROPERTY, "VERSION"}, - { ICAL_X_PROPERTY,"X_PROPERTY"}, - - /* CAP Object Properties */ - - { ICAL_SCOPE_PROPERTY, "SCOPE"}, - { ICAL_MAXRESULTS_PROPERTY, "MAXRESULTS"}, - { ICAL_MAXRESULTSSIZE_PROPERTY, "MAXRESULTSSIZE"}, - { ICAL_QUERY_PROPERTY, "QUERY" }, - { ICAL_QUERYNAME_PROPERTY, "QUERYNAME" }, - { ICAL_TARGET_PROPERTY, "TARGET"}, - - /* libical private properties */ - { ICAL_XLICERROR_PROPERTY,"X-LIC-ERROR"}, - { ICAL_XLICCLUSTERCOUNT_PROPERTY,"X-LIC-CLUSTERCOUNT"}, - - /* End of the list */ - { ICAL_NO_PROPERTY, ""} -}; - - -char* icalenum_property_kind_to_string(icalproperty_kind kind) -{ - int i; - - for (i=0; property_map[i].kind != ICAL_NO_PROPERTY; i++) { - if (property_map[i].kind == kind) { - return property_map[i].name; - } - } - - return 0; - -} - -icalproperty_kind icalenum_string_to_property_kind(char* string) -{ - int i; - - if (string ==0 ) { - return ICAL_NO_PROPERTY; - } - - for (i=0; property_map[i].kind != ICAL_NO_PROPERTY; i++) { - if (strcmp(property_map[i].name, string) == 0) { - return property_map[i].kind; - } - } - - return ICAL_NO_PROPERTY; -} - - - - -struct icalparameter_kind_map { - icalparameter_kind kind; - char name[20]; -}; - -static struct icalparameter_kind_map parameter_map[] = -{ - { ICAL_ALTREP_PARAMETER, "ALTREP"}, - { ICAL_CN_PARAMETER, "CN"}, - { ICAL_CUTYPE_PARAMETER, "CUTYPE"}, - { ICAL_DELEGATEDFROM_PARAMETER, "DELEGATED-FROM"}, - { ICAL_DELEGATEDTO_PARAMETER, "DELEGATED-TO"}, - { ICAL_DIR_PARAMETER, "DIR"}, - { ICAL_ENCODING_PARAMETER, "ENCODING"}, - { ICAL_FBTYPE_PARAMETER, "FBTYPE"}, - { ICAL_FMTTYPE_PARAMETER, "FMTTYPE"}, - { ICAL_LANGUAGE_PARAMETER, "LANGUAGE"}, - { ICAL_MEMBER_PARAMETER, "MEMBER"}, - { ICAL_PARTSTAT_PARAMETER, "PARTSTAT"}, - { ICAL_RANGE_PARAMETER, "RANGE"}, - { ICAL_RELATED_PARAMETER, "RELATED"}, - { ICAL_RELTYPE_PARAMETER, "RELTYPE"}, - { ICAL_ROLE_PARAMETER, "ROLE"}, - { ICAL_RSVP_PARAMETER, "RSVP"}, - { ICAL_SENTBY_PARAMETER, "SENT-BY"}, - { ICAL_TZID_PARAMETER, "TZID"}, - { ICAL_VALUE_PARAMETER, "VALUE"}, - - /* CAP parameters */ - - /* libical private parameters */ - { ICAL_XLICERRORTYPE_PARAMETER, "X-LIC-ERRORTYPE"}, - { ICAL_XLICCOMPARETYPE_PARAMETER, "X-LIC-COMPARETYPE"}, - - /* End of list */ - { ICAL_NO_PARAMETER, ""} -}; - -char* icalenum_parameter_kind_to_string(icalparameter_kind kind) -{ - int i; - - for (i=0; parameter_map[i].kind != ICAL_NO_PARAMETER; i++) { - if (parameter_map[i].kind == kind) { - return parameter_map[i].name; - } - } - - return 0; - -} - -icalparameter_kind icalenum_string_to_parameter_kind(char* string) -{ - int i; - - if (string ==0 ) { - return ICAL_NO_PARAMETER; - } - - for (i=0; parameter_map[i].kind != ICAL_NO_PARAMETER; i++) { - if (strcmp(parameter_map[i].name, string) == 0) { - return parameter_map[i].kind; - } - } - - return ICAL_NO_PARAMETER; -} - -struct icalvalue_kind_map { - icalvalue_kind kind; - char name[20]; -}; - -static struct icalvalue_kind_map value_map[] = -{ - { ICAL_BINARY_VALUE, "BINARY"}, - { ICAL_BOOLEAN_VALUE, "BOOLEAN"}, - { ICAL_CALADDRESS_VALUE, "CAL-ADDRESS"}, - { ICAL_DATE_VALUE, "DATE"}, - { ICAL_DATETIME_VALUE, "DATE-TIME"}, - { ICAL_DURATION_VALUE, "DURATION"}, - { ICAL_FLOAT_VALUE, "FLOAT"}, - { ICAL_INTEGER_VALUE, "INTEGER"}, - { ICAL_PERIOD_VALUE, "PERIOD"}, - { ICAL_RECUR_VALUE, "RECUR"}, - { ICAL_TEXT_VALUE, "TEXT"}, - { ICAL_TIME_VALUE, "TIME"}, - { ICAL_URI_VALUE, "URI"}, - { ICAL_UTCOFFSET_VALUE, "UTC-OFFSET"}, - { ICAL_METHOD_VALUE, "METHOD"}, /* Not an RFC2445 type */ - { ICAL_GEO_VALUE, "FLOAT"}, /* Not an RFC2445 type */ - { ICAL_ATTACH_VALUE, "XATTACH"}, /* Not an RFC2445 type */ - { ICAL_DATETIMEDATE_VALUE, "XDATETIMEDATE"}, /* Not an RFC2445 type */ - { ICAL_DATETIMEPERIOD_VALUE, "XDATETIMEPERIOD"}, /* Not an RFC2445 type */ - { ICAL_QUERY_VALUE, "QUERY"}, - { ICAL_NO_VALUE, ""}, -}; - -char* icalenum_value_kind_to_string(icalvalue_kind kind) -{ - int i; - - for (i=0; value_map[i].kind != ICAL_NO_VALUE; i++) { - if (value_map[i].kind == kind) { - return value_map[i].name; - } - } - - return 0; - -} - -icalvalue_kind icalenum_value_kind_by_prop(icalproperty_kind kind) -{ - - return ICAL_NO_VALUE; -} - - -struct icalcomponent_kind_map { - icalcomponent_kind kind; - char name[20]; -}; - - - -static struct icalcomponent_kind_map component_map[] = -{ - { ICAL_VEVENT_COMPONENT, "VEVENT" }, - { ICAL_VTODO_COMPONENT, "VTODO" }, - { ICAL_VJOURNAL_COMPONENT, "VJOURNAL" }, - { ICAL_VCALENDAR_COMPONENT, "VCALENDAR" }, - { ICAL_VFREEBUSY_COMPONENT, "VFREEBUSY" }, - { ICAL_VTIMEZONE_COMPONENT, "VTIMEZONE" }, - { ICAL_VALARM_COMPONENT, "VALARM" }, - { ICAL_XSTANDARD_COMPONENT, "STANDARD" }, /*These are part of RFC2445 */ - { ICAL_XDAYLIGHT_COMPONENT, "DAYLIGHT" }, /*but are not really components*/ - { ICAL_X_COMPONENT, "X" }, - { ICAL_VSCHEDULE_COMPONENT, "SCHEDULE" }, - - /* CAP components */ - { ICAL_VQUERY_COMPONENT, "VQUERY" }, - { ICAL_VCAR_COMPONENT, "VCAR" }, - { ICAL_VCOMMAND_COMPONENT, "VCOMMAND" }, - - /* libical private components */ - { ICAL_XLICINVALID_COMPONENT, "X-LIC-UNKNOWN" }, - { ICAL_ANY_COMPONENT, "ANY" }, - { ICAL_XROOT_COMPONENT, "XROOT" }, - - /* End of list */ - { ICAL_NO_COMPONENT, "" }, -}; - -char* icalenum_component_kind_to_string(icalcomponent_kind kind) -{ - int i; - - for (i=0; component_map[i].kind != ICAL_NO_COMPONENT; i++) { - if (component_map[i].kind == kind) { - return component_map[i].name; - } - } - - return 0; - -} - -icalcomponent_kind icalenum_string_to_component_kind(char* string) -{ - int i; - - if (string ==0 ) { - return ICAL_NO_COMPONENT; - } - - for (i=0; component_map[i].kind != ICAL_NO_COMPONENT; i++) { - if (strcmp(component_map[i].name, string) == 0) { - return component_map[i].kind; - } - } - - return ICAL_NO_COMPONENT; -} - -struct icalproperty_kind_value_map { - icalproperty_kind prop; - icalvalue_kind value; -}; - -static struct icalproperty_kind_value_map propval_map[] = -{ - { ICAL_CALSCALE_PROPERTY, ICAL_TEXT_VALUE }, - { ICAL_METHOD_PROPERTY, ICAL_METHOD_VALUE }, - { ICAL_PRODID_PROPERTY, ICAL_TEXT_VALUE }, - { ICAL_VERSION_PROPERTY, ICAL_TEXT_VALUE }, - { ICAL_CATEGORIES_PROPERTY, ICAL_TEXT_VALUE }, - { ICAL_CLASS_PROPERTY, ICAL_TEXT_VALUE }, - { ICAL_COMMENT_PROPERTY, ICAL_TEXT_VALUE }, - { ICAL_DESCRIPTION_PROPERTY, ICAL_TEXT_VALUE }, - { ICAL_LOCATION_PROPERTY, ICAL_TEXT_VALUE }, - { ICAL_PERCENTCOMPLETE_PROPERTY, ICAL_INTEGER_VALUE }, - { ICAL_PRIORITY_PROPERTY, ICAL_INTEGER_VALUE }, - { ICAL_RESOURCES_PROPERTY, ICAL_TEXT_VALUE }, - { ICAL_STATUS_PROPERTY, ICAL_TEXT_VALUE }, - { ICAL_SUMMARY_PROPERTY, ICAL_TEXT_VALUE }, - { ICAL_COMPLETED_PROPERTY, ICAL_DATETIME_VALUE }, - { ICAL_FREEBUSY_PROPERTY, ICAL_PERIOD_VALUE }, - { ICAL_TRANSP_PROPERTY, ICAL_TEXT_VALUE }, - { ICAL_TZNAME_PROPERTY, ICAL_TEXT_VALUE }, - { ICAL_TZOFFSETFROM_PROPERTY, ICAL_UTCOFFSET_VALUE }, - { ICAL_TZOFFSETTO_PROPERTY, ICAL_UTCOFFSET_VALUE }, - { ICAL_TZURL_PROPERTY, ICAL_URI_VALUE }, - { ICAL_TZID_PROPERTY, ICAL_TEXT_VALUE }, - { ICAL_ATTENDEE_PROPERTY, ICAL_CALADDRESS_VALUE }, - { ICAL_CONTACT_PROPERTY, ICAL_TEXT_VALUE }, - { ICAL_ORGANIZER_PROPERTY, ICAL_CALADDRESS_VALUE }, - { ICAL_RELATEDTO_PROPERTY, ICAL_TEXT_VALUE }, - { ICAL_URL_PROPERTY, ICAL_URI_VALUE }, - { ICAL_UID_PROPERTY, ICAL_TEXT_VALUE }, - { ICAL_EXRULE_PROPERTY, ICAL_RECUR_VALUE }, - { ICAL_RRULE_PROPERTY, ICAL_RECUR_VALUE }, - { ICAL_ACTION_PROPERTY, ICAL_TEXT_VALUE }, - { ICAL_REPEAT_PROPERTY, ICAL_INTEGER_VALUE }, - { ICAL_CREATED_PROPERTY, ICAL_DATETIME_VALUE }, - { ICAL_DTSTAMP_PROPERTY, ICAL_DATETIME_VALUE }, - { ICAL_LASTMODIFIED_PROPERTY, ICAL_DATETIME_VALUE }, - { ICAL_SEQUENCE_PROPERTY, ICAL_INTEGER_VALUE }, - { ICAL_X_PROPERTY, ICAL_TEXT_VALUE }, - { ICAL_REQUESTSTATUS_PROPERTY, ICAL_TEXT_VALUE }, - { ICAL_ATTACH_PROPERTY, ICAL_URI_VALUE }, - { ICAL_GEO_PROPERTY, ICAL_GEO_VALUE }, - { ICAL_DTEND_PROPERTY, ICAL_DATETIME_VALUE }, - { ICAL_DUE_PROPERTY, ICAL_DATETIME_VALUE }, - { ICAL_DTSTART_PROPERTY, ICAL_DATETIME_VALUE }, - { ICAL_RECURRENCEID_PROPERTY, ICAL_DATETIME_VALUE }, - { ICAL_EXDATE_PROPERTY, ICAL_DATETIME_VALUE }, - { ICAL_RDATE_PROPERTY, ICAL_DATETIME_VALUE }, - { ICAL_TRIGGER_PROPERTY, ICAL_DURATION_VALUE }, - { ICAL_DURATION_PROPERTY, ICAL_DURATION_VALUE }, - - /* CAP properties */ - { ICAL_SCOPE_PROPERTY, ICAL_TEXT_VALUE }, - { ICAL_MAXRESULTS_PROPERTY, ICAL_INTEGER_VALUE}, - { ICAL_MAXRESULTSSIZE_PROPERTY, ICAL_INTEGER_VALUE}, - { ICAL_QUERY_PROPERTY, ICAL_QUERY_VALUE }, - { ICAL_QUERYNAME_PROPERTY, ICAL_TEXT_VALUE }, - { ICAL_TARGET_PROPERTY, ICAL_CALADDRESS_VALUE }, - - - /* libical private properties */ - { ICAL_XLICERROR_PROPERTY,ICAL_TEXT_VALUE}, - { ICAL_XLICCLUSTERCOUNT_PROPERTY,ICAL_INTEGER_VALUE}, - - - /* End of list */ - { ICAL_NO_PROPERTY, ICAL_NO_PROPERTY} -}; - - -icalvalue_kind icalenum_property_kind_to_value_kind(icalproperty_kind kind) -{ - int i; - - for (i=0; propval_map[i].value != ICAL_NO_VALUE; i++) { - if ( propval_map[i].prop == kind ) { - return propval_map[i].value; - } - } - - return ICAL_NO_VALUE; -} - -struct {icalrecurrencetype_weekday wd; char * str; } -wd_map[] = { - {ICAL_SUNDAY_WEEKDAY,"SU"}, - {ICAL_MONDAY_WEEKDAY,"MO"}, - {ICAL_TUESDAY_WEEKDAY,"TU"}, - {ICAL_WEDNESDAY_WEEKDAY,"WE"}, - {ICAL_THURSDAY_WEEKDAY,"TH"}, - {ICAL_FRIDAY_WEEKDAY,"FR"}, - {ICAL_SATURDAY_WEEKDAY,"SA"}, - {ICAL_NO_WEEKDAY,0} -}; - -char* icalenum_weekday_to_string(icalrecurrencetype_weekday kind) -{ - int i; - - for (i=0; wd_map[i].wd != ICAL_NO_WEEKDAY; i++) { - if ( wd_map[i].wd == kind) { - return wd_map[i].str; - } - } - - return 0; -} - - -struct { - icalrecurrencetype_frequency kind; - char* str; -} freq_map[] = { - {ICAL_SECONDLY_RECURRENCE,"SECONDLY"}, - {ICAL_MINUTELY_RECURRENCE,"MINUTELY"}, - {ICAL_HOURLY_RECURRENCE,"HOURLY"}, - {ICAL_DAILY_RECURRENCE,"DAILY"}, - {ICAL_WEEKLY_RECURRENCE,"WEEKLY"}, - {ICAL_MONTHLY_RECURRENCE,"MONTHLY"}, - {ICAL_YEARLY_RECURRENCE,"YEARLY"}, - {ICAL_NO_RECURRENCE,0} -}; - -char* icalenum_recurrence_to_string(icalrecurrencetype_frequency kind) -{ - int i; - - for (i=0; freq_map[i].kind != ICAL_NO_RECURRENCE ; i++) { - if ( freq_map[i].kind == kind ) { - return freq_map[i].str; - } - } - return 0; -} - - -struct { - icalrecurrencetype_frequency kind; - int major; - int minor; - char* str; -} status_map[] = { - {ICAL_2_0_SUCCESS_STATUS, 2,0,"Success."}, - {ICAL_2_1_FALLBACK_STATUS, 2,1,"Success but fallback taken on one or more property values."}, - {ICAL_2_2_IGPROP_STATUS, 2,2,"Success, invalid property ignored."}, - {ICAL_2_3_IGPARAM_STATUS, 2,3,"Success, invalid property parameter ignored."}, - {ICAL_2_4_IGXPROP_STATUS, 2,4,"Success, unknown non-standard property ignored."}, - {ICAL_2_5_IGXPARAM_STATUS, 2,5,"Success, unknown non standard property value ignored."}, - {ICAL_2_6_IGCOMP_STATUS, 2,6,"Success, invalid calendar component ignored."}, - {ICAL_2_7_FORWARD_STATUS, 2,7,"Success, request forwarded to Calendar User."}, - {ICAL_2_8_ONEEVENT_STATUS, 2,8,"Success, repeating event ignored. Scheduled as a single component."}, - {ICAL_2_9_TRUNC_STATUS, 2,9,"Success, truncated end date time to date boundary."}, - {ICAL_2_10_ONETODO_STATUS, 2,10,"Success, repeating VTODO ignored. Scheduled as a single VTODO."}, - {ICAL_2_11_TRUNCRRULE_STATUS, 2,11,"Success, unbounded RRULE clipped at some finite number of instances "}, - {ICAL_3_0_INVPROPNAME_STATUS, 3,0,"Invalid property name."}, - {ICAL_3_1_INVPROPVAL_STATUS, 3,1,"Invalid property value."}, - {ICAL_3_2_INVPARAM_STATUS, 3,2,"Invalid property parameter."}, - {ICAL_3_3_INVPARAMVAL_STATUS, 3,3,"Invalid property parameter value."}, - {ICAL_3_4_INVCOMP_STATUS, 3,4,"Invalid calendar component."}, - {ICAL_3_5_INVTIME_STATUS, 3,5,"Invalid date or time."}, - {ICAL_3_6_INVRULE_STATUS, 3,6,"Invalid rule."}, - {ICAL_3_7_INVCU_STATUS, 3,7,"Invalid Calendar User."}, - {ICAL_3_8_NOAUTH_STATUS, 3,8,"No authority."}, - {ICAL_3_9_BADVERSION_STATUS, 3,9,"Unsupported version."}, - {ICAL_3_10_TOOBIG_STATUS, 3,10,"Request entity too large."}, - {ICAL_3_11_MISSREQCOMP_STATUS, 3,11,"Required component or property missing."}, - {ICAL_3_12_UNKCOMP_STATUS, 3,12,"Unknown component or property found."}, - {ICAL_3_13_BADCOMP_STATUS, 3,13,"Unsupported component or property found"}, - {ICAL_3_14_NOCAP_STATUS, 3,14,"Unsupported capability."}, - {ICAL_4_0_BUSY_STATUS, 4,0,"Event conflict. Date/time is busy."}, - {ICAL_5_0_MAYBE_STATUS, 5,0,"Request MAY supported."}, - {ICAL_5_1_UNAVAIL_STATUS, 5,1,"Service unavailable."}, - {ICAL_5_2_NOSERVICE_STATUS, 5,2,"Invalid calendar service."}, - {ICAL_5_3_NOSCHED_STATUS, 5,3,"No scheduling support for user."}, - {ICAL_UNKNOWN_STATUS, 0,0,"Error: Unknown request status"} -}; - - -char* icalenum_reqstat_desc(icalrequeststatus stat) -{ - - int i; - - for (i=0; status_map[i].kind != ICAL_UNKNOWN_STATUS; i++) { - if ( status_map[i].kind == stat) { - return status_map[i].str; - } - } - - return 0; -} - - -short icalenum_reqstat_major(icalrequeststatus stat) -{ - int i; - - for (i=0; status_map[i].kind != ICAL_UNKNOWN_STATUS; i++) { - if ( status_map[i].kind == stat) { - return status_map[i].major; - } - } - return -1; -} - -short icalenum_reqstat_minor(icalrequeststatus stat) -{ - int i; - - for (i=0; status_map[i].kind != ICAL_UNKNOWN_STATUS; i++) { - if ( status_map[i].kind == stat) { - return status_map[i].minor; - } - } - return -1; -} - - -icalrequeststatus icalenum_num_to_reqstat(short major, short minor) -{ - int i; - - for (i=0; status_map[i].kind != ICAL_UNKNOWN_STATUS; i++) { - if ( status_map[i].major == major && status_map[i].minor == minor) { - return status_map[i].kind; - } - } - return 0; -} - - - -struct {icalproperty_method method; char* str;} method_map[] = { - {ICAL_METHOD_PUBLISH,"PUBLISH"}, - {ICAL_METHOD_REQUEST,"REQUEST"}, - {ICAL_METHOD_REPLY,"REPLY"}, - {ICAL_METHOD_ADD,"ADD"}, - {ICAL_METHOD_CANCEL,"CANCEL"}, - {ICAL_METHOD_REFRESH,"REFRESH"}, - {ICAL_METHOD_COUNTER,"CPUNTER"}, - {ICAL_METHOD_DECLINECOUNTER,"DECLINECOUNTER"}, - /* CAP Methods */ - {ICAL_METHOD_CREATE,"CREATE"}, - {ICAL_METHOD_READ,"READ"}, - {ICAL_METHOD_RESPONSE,"RESPONSE"}, - {ICAL_METHOD_MOVE,"MOVE"}, - {ICAL_METHOD_MODIFY,"MODIFY"}, - {ICAL_METHOD_GENERATEUID,"GENERATEUID"}, - {ICAL_METHOD_DELETE,"DELETE"}, - {ICAL_METHOD_NONE,"NONE"} -}; - - -char* icalenum_method_to_string(icalproperty_method method) -{ - int i; - - for (i=0; method_map[i].method != ICAL_METHOD_NONE; i++) { - if ( method_map[i].method == method) { - return method_map[i].str; - } - } - - return 0; -} - -icalproperty_method icalenum_string_to_method(char* str) -{ - int i; - - while(*str == ' '){ - str++; - } - - - for (i=0; method_map[i].method != ICAL_METHOD_NONE; i++) { - if ( strcmp(method_map[i].str, str) == 0) { - return method_map[i].method; - } - } - - return ICAL_METHOD_NONE; -} diff --git a/libical/src/libical/icalenums.h b/libical/src/libical/icalenums.h deleted file mode 100644 index ff7cee486e..0000000000 --- a/libical/src/libical/icalenums.h +++ /dev/null @@ -1,466 +0,0 @@ -/* -*- Mode: C -*-*/ -/*====================================================================== - FILE: icalenums.h - - - - (C) COPYRIGHT 1999 Eric Busboom - http://www.softwarestudio.org - - The contents of this file are subject to the Mozilla Public License - Version 1.0 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and - limitations under the License. - - The original author is Eric Busboom - The original code is icalenums.h - - Contributions from: - Graham Davison (g.m.davison@computer.org) - -======================================================================*/ - -#ifndef ICALENUMS_H -#define ICALENUMS_H - - - -/*********************************************************************** - * Component enumerations -**********************************************************************/ - -typedef enum icalcomponent_kind { - ICAL_NO_COMPONENT, - ICAL_ANY_COMPONENT, /* Used to select all components*/ - ICAL_XROOT_COMPONENT, - ICAL_XATTACH_COMPONENT, /* MIME attached data, returned by parser. */ - ICAL_VEVENT_COMPONENT, - ICAL_VTODO_COMPONENT, - ICAL_VJOURNAL_COMPONENT, - ICAL_VCALENDAR_COMPONENT, - ICAL_VFREEBUSY_COMPONENT, - ICAL_VALARM_COMPONENT, - ICAL_XAUDIOALARM_COMPONENT, - ICAL_XDISPLAYALARM_COMPONENT, - ICAL_XEMAILALARM_COMPONENT, - ICAL_XPROCEDUREALARM_COMPONENT, - ICAL_VTIMEZONE_COMPONENT, - ICAL_XSTANDARD_COMPONENT, - ICAL_XDAYLIGHT_COMPONENT, - ICAL_X_COMPONENT, - ICAL_VSCHEDULE_COMPONENT, - ICAL_VQUERY_COMPONENT, - ICAL_VCAR_COMPONENT, - ICAL_VCOMMAND_COMPONENT, - ICAL_XLICINVALID_COMPONENT -} icalcomponent_kind; - -/*********************************************************************** - * Property Enumerations -**********************************************************************/ - -typedef enum icalproperty_kind { - ICAL_ANY_PROPERTY = 0, /* This must be the first enum, for iteration */ - ICAL_CALSCALE_PROPERTY, - ICAL_METHOD_PROPERTY, - ICAL_PRODID_PROPERTY, - ICAL_VERSION_PROPERTY, - ICAL_ATTACH_PROPERTY, - ICAL_CATEGORIES_PROPERTY, - ICAL_CLASS_PROPERTY, - ICAL_COMMENT_PROPERTY, - ICAL_DESCRIPTION_PROPERTY, - ICAL_GEO_PROPERTY, - ICAL_LOCATION_PROPERTY, - ICAL_PERCENTCOMPLETE_PROPERTY, - ICAL_PRIORITY_PROPERTY, - ICAL_RESOURCES_PROPERTY, - ICAL_STATUS_PROPERTY, - ICAL_SUMMARY_PROPERTY, - ICAL_COMPLETED_PROPERTY, - ICAL_DTEND_PROPERTY, - ICAL_DUE_PROPERTY, - ICAL_DTSTART_PROPERTY, - ICAL_DURATION_PROPERTY, - ICAL_FREEBUSY_PROPERTY, - ICAL_TRANSP_PROPERTY, - ICAL_TZID_PROPERTY, - ICAL_TZNAME_PROPERTY, - ICAL_TZOFFSETFROM_PROPERTY, - ICAL_TZOFFSETTO_PROPERTY, - ICAL_TZURL_PROPERTY, - ICAL_ATTENDEE_PROPERTY, - ICAL_CONTACT_PROPERTY, - ICAL_ORGANIZER_PROPERTY, - ICAL_RECURRENCEID_PROPERTY, - ICAL_RELATEDTO_PROPERTY, - ICAL_URL_PROPERTY, - ICAL_UID_PROPERTY, - ICAL_EXDATE_PROPERTY, - ICAL_EXRULE_PROPERTY, - ICAL_RDATE_PROPERTY, - ICAL_RRULE_PROPERTY, - ICAL_ACTION_PROPERTY, - ICAL_REPEAT_PROPERTY, - ICAL_TRIGGER_PROPERTY, - ICAL_CREATED_PROPERTY, - ICAL_DTSTAMP_PROPERTY, - ICAL_LASTMODIFIED_PROPERTY, - ICAL_SEQUENCE_PROPERTY, - ICAL_REQUESTSTATUS_PROPERTY, - ICAL_X_PROPERTY, - - /* CAP Properties */ - ICAL_SCOPE_PROPERTY, - ICAL_MAXRESULTS_PROPERTY, - ICAL_MAXRESULTSSIZE_PROPERTY, - ICAL_QUERY_PROPERTY, - ICAL_QUERYNAME_PROPERTY, - ICAL_TARGET_PROPERTY, - - /* libical private properties */ - ICAL_XLICERROR_PROPERTY, - ICAL_XLICCLUSTERCOUNT_PROPERTY, - - ICAL_NO_PROPERTY /* This must be the last enum, for iteration */ - -} icalproperty_kind; - -/*********************************************************************** - * Enumerations for the values of properties - ***********************************************************************/ - -typedef enum icalproperty_method { - ICAL_METHOD_PUBLISH, - ICAL_METHOD_REQUEST, - ICAL_METHOD_REPLY, - ICAL_METHOD_ADD, - ICAL_METHOD_CANCEL, - ICAL_METHOD_REFRESH, - ICAL_METHOD_COUNTER, - ICAL_METHOD_DECLINECOUNTER, - /* CAP Methods */ - ICAL_METHOD_CREATE, - ICAL_METHOD_READ, - ICAL_METHOD_RESPONSE, - ICAL_METHOD_MOVE, - ICAL_METHOD_MODIFY, - ICAL_METHOD_GENERATEUID, - ICAL_METHOD_DELETE, - ICAL_METHOD_NONE -} icalproperty_method ; - -typedef enum icalproperty_transp { - ICAL_TRANSP_OPAQUE, - ICAL_TRANS_TRANSPARENT -} icalproperty_trans; - -typedef enum icalproperty_calscale { - ICAL_CALSCALE_GREGORIAN -} icalproperty_calscale ; - - -typedef enum icalproperty_class { - ICAL_CLASS_PUBLIC, - ICAL_CLASS_PRIVATE, - ICAL_CLASS_CONFIDENTIAL, - ICAL_CLASS_XNAME -} icalproperty_class; - - -typedef enum icalproperty_status { - ICAL_STATUS_TENTATIVE, - ICAL_STATUS_CONFIRMED, - ICAL_STATUS_CANCELLED, /* CANCELED? SIC */ - ICAL_STATUS_NEEDSACTION, - ICAL_STATUS_COMPLETED, - ICAL_STATUS_INPROCESS, - ICAL_STATUS_DRAFT, - ICAL_STATUS_FINAL -} icalproperty_status; - -typedef enum icalproperty_action { - ICAL_ACTION_AUDIO, - ICAL_ACTION_DISPLAY, - ICAL_ACTION_EMAIL, - ICAL_ACTION_PROCEDURE, - ICAL_ACTION_XNAME -} icalproperty_action; - -/*********************************************************************** - * Value enumerations -**********************************************************************/ - -typedef enum icalvalue_kind { - ICAL_NO_VALUE, - ICAL_ATTACH_VALUE, /* Non-Standard*/ - ICAL_BINARY_VALUE, - ICAL_BOOLEAN_VALUE, - ICAL_CALADDRESS_VALUE, - ICAL_DATE_VALUE, - ICAL_DATETIME_VALUE, - ICAL_DATETIMEDATE_VALUE, /* Non-Standard */ - ICAL_DATETIMEPERIOD_VALUE, /* Non-Standard */ - ICAL_DURATION_VALUE, - ICAL_FLOAT_VALUE, - ICAL_GEO_VALUE, /* Non-Standard */ - ICAL_INTEGER_VALUE, - ICAL_METHOD_VALUE, /* Non-Standard */ - ICAL_PERIOD_VALUE, - ICAL_RECUR_VALUE, - ICAL_STRING_VALUE, /* Non-Standard */ - ICAL_TEXT_VALUE, - ICAL_TIME_VALUE, - ICAL_TRIGGER_VALUE, /* Non-Standard */ - ICAL_URI_VALUE, - ICAL_UTCOFFSET_VALUE, - ICAL_QUERY_VALUE, - ICAL_XNAME_VALUE -} icalvalue_kind; - - -/*********************************************************************** - * Parameter Enumerations - **********************************************************************/ - - -typedef enum icalparameter_kind { - ICAL_NO_PARAMETER, - ICAL_ANY_PARAMETER, - ICAL_ALTREP_PARAMETER, /* DQUOTE uri DQUOTE */ - ICAL_CN_PARAMETER, /* text */ - ICAL_CUTYPE_PARAMETER, /*INDIVIDUAL, GROUP, RESOURCE,ROOM,UNKNOWN, x-name*/ - ICAL_DELEGATEDFROM_PARAMETER, /* *("," DQUOTE cal-address DQUOTE) */ - ICAL_DELEGATEDTO_PARAMETER, /* *("," DQUOTE cal-address DQUOTE) */ - ICAL_DIR_PARAMETER, /* DQUOTE uri DQUOTE */ - ICAL_ENCODING_PARAMETER, /* *BIT, BASE64, x-name */ - ICAL_FMTTYPE_PARAMETER, /* registered MINE content type */ - ICAL_FBTYPE_PARAMETER, /* FREE, BUSY, BUSY-UNAVAILABLE, BUSY-TENTATIVE,x-name */ - ICAL_LANGUAGE_PARAMETER, /* text from RFC 1766 */ - ICAL_MEMBER_PARAMETER, /* DQUOTE cal-address DQUOTE */ - ICAL_PARTSTAT_PARAMETER, /* NEEDS-ACTION, ACCEPTED, DECLINED, TENTATIVE, DELEGATED, x-name */ - ICAL_RANGE_PARAMETER, /* THISANDPRIOR, THISANDFUTURE */ - ICAL_RELATED_PARAMETER, /* START, END */ - ICAL_RELTYPE_PARAMETER, /* PARENT, CHILD, SIBLING,x-name */ - ICAL_ROLE_PARAMETER, /* CHAIR, REQ_PARTICIPANT, OPT_PARTICIPANT, NON_PARTICIPANT, x-name */ - ICAL_RSVP_PARAMETER, /* TRUE. FALSE */ - ICAL_SENTBY_PARAMETER, /* DQUOTE uri DQUOTE */ - ICAL_TZID_PARAMETER, /* [tzidprefix] paramtext CRLF */ - ICAL_VALUE_PARAMETER, /* BINARY, BOOLEAN, CAL_ADDRESS, DATE, DATE-TIME, DURATION, FLOAT, INTEGER, PERIOD, RECUR, TEXT, TIME, UTC_OFFSET, x-name */ - ICAL_XLICERRORTYPE_PARAMETER, /*ICAL_XLICERROR_PARSE_ERROR,ICAL_XLICERROR_INVALID_ITIP*/ - ICAL_XLICCOMPARETYPE_PARAMETER, /**/ - ICAL_X_PARAMETER /* text */ -} icalparameter_kind; - -typedef enum icalparameter_cutype { - ICAL_CUTYPE_INDIVIDUAL, - ICAL_CUTYPE_GROUP, - ICAL_CUTYPE_RESOURCE, - ICAL_CUTYPE_ROOM, - ICAL_CUTYPE_UNKNOWN, - ICAL_CUTYPE_XNAME -} icalparameter_cutype; - - -typedef enum icalparameter_encoding { - ICAL_ENCODING_8BIT, - ICAL_ENCODING_BASE64, - ICAL_ENCODING_XNAME -} icalparameter_encoding; - -typedef enum icalparameter_fbtype { - ICAL_FBTYPE_FREE, - ICAL_FBTYPE_BUSY, - ICAL_FBTYPE_BUSYUNAVAILABLE, - ICAL_FBTYPE_BUSYTENTATIVE, - ICAL_FBTYPE_XNAME -} icalparameter_fbtype; - -typedef enum icalparameter_partstat { - ICAL_PARTSTAT_NEEDSACTION, - ICAL_PARTSTAT_ACCEPTED, - ICAL_PARTSTAT_DECLINED, - ICAL_PARTSTAT_TENTATIVE, - ICAL_PARTSTAT_DELEGATED, - ICAL_PARTSTAT_COMPLETED, - ICAL_PARTSTAT_INPROCESS, - ICAL_PARTSTAT_XNAME -} icalparameter_partstat; - -typedef enum icalparameter_range { - ICAL_RANGE_THISANDPRIOR, - ICAL_RANGE_THISANDFUTURE -} icalparameter_range; - -typedef enum icalparameter_related { - ICAL_RELATED_START, - ICAL_RELATED_END -} icalparameter_related; - -typedef enum icalparameter_reltype { - ICAL_RELTYPE_PARENT, - ICAL_RELTYPE_CHILD, - ICAL_RELTYPE_SIBLING, - ICAL_RELTYPE_XNAME -} icalparameter_reltype; - -typedef enum icalparameter_role { - ICAL_ROLE_CHAIR, - ICAL_ROLE_REQPARTICIPANT, - ICAL_ROLE_OPTPARTICIPANT, - ICAL_ROLE_NONPARTICIPANT, - ICAL_ROLE_XNAME -} icalparameter_role; - -typedef enum icalparameter_xlicerrortype { - ICAL_XLICERRORTYPE_COMPONENTPARSEERROR, - ICAL_XLICERRORTYPE_PARAMETERVALUEPARSEERROR, - ICAL_XLICERRORTYPE_PARAMETERNAMEPARSEERROR, - ICAL_XLICERRORTYPE_PROPERTYPARSEERROR, - ICAL_XLICERRORTYPE_VALUEPARSEERROR, - ICAL_XLICERRORTYPE_INVALIDITIP -} icalparameter_xlicerrortype; - -typedef enum icalparameter_xliccomparetype { - ICAL_XLICCOMPARETYPE_EQUAL=0, - ICAL_XLICCOMPARETYPE_LESS=-1, - ICAL_XLICCOMPARETYPE_LESSEQUAL=2, - ICAL_XLICCOMPARETYPE_GREATER=1, - ICAL_XLICCOMPARETYPE_GREATEREQUAL=3, - ICAL_XLICCOMPARETYPE_NOTEQUAL=4, - ICAL_XLICCOMPARETYPE_REGEX=5 -} icalparameter_xliccomparetype; - -typedef enum icalparameter_value { - ICAL_VALUE_XNAME = ICAL_XNAME_VALUE, - ICAL_VALUE_BINARY = ICAL_BINARY_VALUE, - ICAL_VALUE_BOOLEAN = ICAL_BOOLEAN_VALUE, - ICAL_VALUE_CALADDRESS = ICAL_CALADDRESS_VALUE, - ICAL_VALUE_DATE = ICAL_DATE_VALUE, - ICAL_VALUE_DATETIME = ICAL_DATETIME_VALUE, - ICAL_VALUE_DURATION = ICAL_DURATION_VALUE, - ICAL_VALUE_FLOAT = ICAL_FLOAT_VALUE, - ICAL_VALUE_INTEGER = ICAL_INTEGER_VALUE, - ICAL_VALUE_PERIOD = ICAL_PERIOD_VALUE, - ICAL_VALUE_RECUR = ICAL_RECUR_VALUE, - ICAL_VALUE_TEXT = ICAL_TEXT_VALUE, - ICAL_VALUE_TIME = ICAL_TIME_VALUE, - ICAL_VALUE_UTCOFFSET = ICAL_UTCOFFSET_VALUE, - ICAL_VALUE_URI = ICAL_URI_VALUE, - ICAL_VALUE_ERROR = ICAL_NO_VALUE -} icalparameter_value; - -/*********************************************************************** - * Recurrances -**********************************************************************/ - - -typedef enum icalrecurrencetype_frequency -{ - ICAL_NO_RECURRENCE, - ICAL_SECONDLY_RECURRENCE, - ICAL_MINUTELY_RECURRENCE, - ICAL_HOURLY_RECURRENCE, - ICAL_DAILY_RECURRENCE, - ICAL_WEEKLY_RECURRENCE, - ICAL_MONTHLY_RECURRENCE, - ICAL_YEARLY_RECURRENCE -} icalrecurrencetype_frequency; - -typedef enum icalrecurrencetype_weekday -{ - ICAL_NO_WEEKDAY, - ICAL_SUNDAY_WEEKDAY, - ICAL_MONDAY_WEEKDAY, - ICAL_TUESDAY_WEEKDAY, - ICAL_WEDNESDAY_WEEKDAY, - ICAL_THURSDAY_WEEKDAY, - ICAL_FRIDAY_WEEKDAY, - ICAL_SATURDAY_WEEKDAY -} icalrecurrencetype_weekday; - -enum { - ICAL_RECURRENCE_ARRAY_MAX = 0x7f7f, - ICAL_RECURRENCE_ARRAY_MAX_BYTE = 0x7f -}; - - -char* icalenum_recurrence_to_string(icalrecurrencetype_frequency kind); -char* icalenum_weekday_to_string(icalrecurrencetype_weekday kind); - -/*********************************************************************** - * Request Status codes - **********************************************************************/ - -typedef enum icalrequeststatus { - ICAL_UNKNOWN_STATUS, - ICAL_2_0_SUCCESS_STATUS, - ICAL_2_1_FALLBACK_STATUS, - ICAL_2_2_IGPROP_STATUS, - ICAL_2_3_IGPARAM_STATUS, - ICAL_2_4_IGXPROP_STATUS, - ICAL_2_5_IGXPARAM_STATUS, - ICAL_2_6_IGCOMP_STATUS, - ICAL_2_7_FORWARD_STATUS, - ICAL_2_8_ONEEVENT_STATUS, - ICAL_2_9_TRUNC_STATUS, - ICAL_2_10_ONETODO_STATUS, - ICAL_2_11_TRUNCRRULE_STATUS, - ICAL_3_0_INVPROPNAME_STATUS, - ICAL_3_1_INVPROPVAL_STATUS, - ICAL_3_2_INVPARAM_STATUS, - ICAL_3_3_INVPARAMVAL_STATUS, - ICAL_3_4_INVCOMP_STATUS, - ICAL_3_5_INVTIME_STATUS, - ICAL_3_6_INVRULE_STATUS, - ICAL_3_7_INVCU_STATUS, - ICAL_3_8_NOAUTH_STATUS, - ICAL_3_9_BADVERSION_STATUS, - ICAL_3_10_TOOBIG_STATUS, - ICAL_3_11_MISSREQCOMP_STATUS, - ICAL_3_12_UNKCOMP_STATUS, - ICAL_3_13_BADCOMP_STATUS, - ICAL_3_14_NOCAP_STATUS, - ICAL_4_0_BUSY_STATUS, - ICAL_5_0_MAYBE_STATUS, - ICAL_5_1_UNAVAIL_STATUS, - ICAL_5_2_NOSERVICE_STATUS, - ICAL_5_3_NOSCHED_STATUS -} icalrequeststatus; - - -char* icalenum_reqstat_desc(icalrequeststatus stat); -short icalenum_reqstat_major(icalrequeststatus stat); -short icalenum_reqstat_minor(icalrequeststatus stat); -icalrequeststatus icalenum_num_to_reqstat(short major, short minor); - -/*********************************************************************** - * Conversion functions -**********************************************************************/ - -char* icalenum_property_kind_to_string(icalproperty_kind kind); -icalproperty_kind icalenum_string_to_property_kind(char* string); - -char* icalenum_value_kind_to_string(icalvalue_kind kind); -icalvalue_kind icalenum_value_kind_by_prop(icalproperty_kind kind); - -char* icalenum_parameter_kind_to_string(icalparameter_kind kind); -icalparameter_kind icalenum_string_to_parameter_kind(char* string); - -char* icalenum_component_kind_to_string(icalcomponent_kind kind); -icalcomponent_kind icalenum_string_to_component_kind(char* string); - -icalvalue_kind icalenum_property_kind_to_value_kind(icalproperty_kind kind); - -char* icalenum_method_to_string(icalproperty_method); -icalproperty_method icalenum_string_to_method(char* string); - -#endif /* !ICALENUMS_H */ - - - diff --git a/libical/src/libical/icalerror.c b/libical/src/libical/icalerror.c deleted file mode 100644 index fb9e152b16..0000000000 --- a/libical/src/libical/icalerror.c +++ /dev/null @@ -1,99 +0,0 @@ -/* -*- Mode: C -*- - ====================================================================== - FILE: icalerror.c - CREATOR: eric 16 May 1999 - - $Id$ - $Locker$ - - - (C) COPYRIGHT 1999 Eric Busboom - http://www.softwarestudio.org - - The contents of this file are subject to the Mozilla Public License - Version 1.0 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and - limitations under the License. - - The original author is Eric Busboom - The original code is icalerror.c - - ======================================================================*/ - - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "icalerror.h" - -icalerrorenum icalerrno; - -int foo; -void icalerror_stop_here(void) -{ - foo++; /* Keep optimizers from removing routine */ -} - -void icalerror_crash_here(void) -{ - int *p=0; - *p = 1; - - assert( *p); -} - - -void icalerror_clear_errno() { - - icalerrno = ICAL_NO_ERROR; -} - -void icalerror_set_errno(icalerrorenum e) { - - icalerror_stop_here(); - icalerrno = e; -} - - -struct icalerror_string_map { - icalerrorenum error; - char name[160]; -}; - -static struct icalerror_string_map string_map[] = -{ - {ICAL_BADARG_ERROR,"Bad argumnet to function"}, - {ICAL_NEWFAILED_ERROR,"Failed to create a new object via a *_new() routine"}, - {ICAL_MALFORMEDDATA_ERROR,"An input string was not correctly formed"}, - {ICAL_PARSE_ERROR,"Failed to parse a part of an iCal componet"}, - {ICAL_INTERNAL_ERROR,"Random internal error. This indicates an error in the library code, not an error in use"}, - {ICAL_FILE_ERROR,"An operation on a file failed. Check errno for more detail."}, - {ICAL_ALLOCATION_ERROR,"Failed to allocate memory"}, - {ICAL_USAGE_ERROR,"The caller failed to properly sequence called to an object's interface"}, - {ICAL_NO_ERROR,"No error"}, - {ICAL_UNKNOWN_ERROR,"Unknown error type -- icalerror_strerror() was probably given bad input"} -}; - - -char* icalerror_strerror(icalerrorenum e) { - - int i; - - for (i=0; string_map[i].error != ICAL_UNKNOWN_ERROR; i++) { - if (string_map[i].error == e) { - return string_map[i].name; - } - } - - return string_map[i].name; /* Return string for ICAL_UNKNOWN_ERROR*/ - -} - - - diff --git a/libical/src/libical/icalerror.h b/libical/src/libical/icalerror.h deleted file mode 100644 index 124699c21b..0000000000 --- a/libical/src/libical/icalerror.h +++ /dev/null @@ -1,141 +0,0 @@ -/* -*- Mode: C -*- */ -/*====================================================================== - FILE: icalerror.h - CREATOR: eric 09 May 1999 - - $Id$ - - - (C) COPYRIGHT 1999 Eric Busboom - http://www.softwarestudio.org - - The contents of this file are subject to the Mozilla Public License - Version 1.0 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and - limitations under the License. - - The original author is Eric Busboom - The original code is icalerror.h - -======================================================================*/ - - -#ifndef ICALERROR_H -#define ICALERROR_H - -#include -#include /* For icalerror_warn() */ - -/* This routine is called before any error is triggered. It is called - by icalerror_set_errno, so it does not appear in all of the macros - below */ -void icalerror_stop_here(void); - -void icalerror_crash_here(void); - -#ifdef ICAL_ERRORS_ARE_FATAL -#undef NDEBUG -#endif - -#define icalerror_check_value_type(value,type); -#define icalerror_check_property_type(value,type); -#define icalerror_check_parameter_type(value,type); -#define icalerror_check_component_type(value,type); - -/* Assert with a message */ -#ifdef ICAL_ERRORS_ARE_FATAL - -#ifdef __GNUC__ -#define icalerror_assert(test,message) if(!(test)){fprintf(stderr,"%s(), %s:%d: %s\n",__FUNCTION__,__FILE__,__LINE__,message);icalerror_stop_here(); abort();} -#else /*__GNUC__*/ -#define icalerror_assert(test,message) if(!(test)){fprintf(stderr,"%s:%d: %s\n",__FILE__,__LINE__,message);icalerror_stop_here(); abort();} -#endif /*__GNUC__*/ -#else -#define icalerror_assert(test,message) -#endif - - -/* Check & abort if check fails */ -#ifdef ICAL_ERRORS_ARE_FATAL -#define icalerror_check_arg(test,arg) icalerror_stop_here();assert(test) -#else -#define icalerror_check_arg(test,arg) -#endif -/* Check & return void if check failes*/ - -#ifdef ICAL_ERRORS_ARE_FATAL -#define icalerror_check_arg_rv(test,arg) icalerror_stop_here();assert(test); -#else -#define icalerror_check_arg_rv(test,arg) if(!(test)) { icalerror_set_errno(ICAL_BADARG_ERROR); return; } -#endif - -/* Check & return 0 if check failes*/ -#ifdef ICAL_ERRORS_ARE_FATAL -#define icalerror_check_arg_rz(test,arg) icalerror_stop_here();assert(test); -#else -#define icalerror_check_arg_rz(test,arg) if(!(test)) {icalerror_set_errno(ICAL_BADARG_ERROR); return 0;} -#endif - - -/* Check & return an error if check failes*/ -#ifdef ICAL_ERRORS_ARE_FATAL -#define icalerror_check_arg_re(test,arg,error) icalerror_stop_here();assert(test); -#else -#define icalerror_check_arg_re(test,arg,error) if(!(test)) {icalerror_stop_here(); return error;} -#endif - - -/* Warning messages */ - -#ifdef ICAL_ERRORS_ARE_FATAL - -#ifdef __GNUC__ -#define icalerror_warn(message) {fprintf(stderr,"%s(), %s:%d: %s\n",__FUNCTION__,__FILE__,__LINE__,message); abort();} -#else /* __GNU_C__ */ -#define icalerror_warn(message) {fprintf(stderr,"%s:%d: %s\n",__FILE__,__LINE__,message); abort();} -#endif /* __GNU_C__ */ - -#else /*ICAL_ERRORS_ARE_FATAL */ - -#ifdef __GNUC__ -#define icalerror_warn(message) {fprintf(stderr,"%s(), %s:%d: %s\n",__FUNCTION__,__FILE__,__LINE__,message);} -#else /* __GNU_C__ */ -#define icalerror_warn(message) {fprintf(stderr,"%s:%d: %s\n",__FILE__,__LINE__,message);} -#endif /* __GNU_C__ */ - -#endif /*ICAL_ERRORS_ARE_FATAL*/ - -typedef enum icalerrorenum { - - ICAL_BADARG_ERROR, - ICAL_NEWFAILED_ERROR, - ICAL_MALFORMEDDATA_ERROR, - ICAL_PARSE_ERROR, - ICAL_INTERNAL_ERROR, /* Like assert --internal consist. prob */ - ICAL_FILE_ERROR, - ICAL_ALLOCATION_ERROR, - ICAL_USAGE_ERROR, - ICAL_NO_ERROR, - ICAL_MULTIPLEINCLUSION_ERROR, - ICAL_UNKNOWN_ERROR /* Used for problems in input to icalerror_strerror()*/ - -} icalerrorenum; - -extern icalerrorenum icalerrno; - - -void icalerror_clear_errno(); -void icalerror_set_errno(icalerrorenum); - -char* icalerror_strerror(icalerrorenum e); - - -#endif /* !ICALERROR_H */ - - - diff --git a/libical/src/libical/icalirip.h b/libical/src/libical/icalirip.h deleted file mode 100644 index eefbca35c5..0000000000 --- a/libical/src/libical/icalirip.h +++ /dev/null @@ -1,108 +0,0 @@ -/* -*- Mode: C -*- */ -/*====================================================================== - FILE: icalirip.h - CREATOR: eric 20 April 1999 - - $Id$ - - - (C) COPYRIGHT 1999 Eric Busboom - http://www.softwarestudio.org - - The contents of this file are subject to the Mozilla Public License - Version 1.0 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and - limitations under the License. - - The original author is Eric Busboom - The original code is icalirip.h - -======================================================================*/ - - -#ifndef ICALIRIP_H -#define ICALIRIP_H - -#include "ical.h" - -typedef void* icalirip; - -/********************** Server (Reciever) Interfaces *************************/ - -icalirip* icalirip_new(); -void* icalirip_free(); - -/* Protocol functions */ -char* icalirip_process_request(icalirip* irip, char* string); - -/* iRIP server stubs */ -typedef struct icalirip_response { - char code[6]; - char caluid[1024]; - void* result; -} icalirip_response; - -icalirip_response icalirip_timedout_stub(icalirip* irip); -icalirip_response icalirip_authenticate_stub(icalirip* irip, char* mechanism, char* data); -icalirip_response icalirip_sendata_stub(icalirip* irip, unsigned int time); -icalirip_response icalirip_dequeue_stub(icalirip* irip, char* caluid,unsigned int time); -icalirip_response icalirip_recipient_stub(icalirip* irip, char* address, unsigned int time); -icalirip_response icalirip_switch_stub(icalirip* irip); -icalirip_response icalirip_disconnect_stub(icalirip* irip); -icalirip_response icalirip_unknown_stub(icalirip* irip, char* command); - -/* icalirip_set_stubs makes the module use function pointers to -instead of the above stubs. The set_stubs procedure will requires the -user to link another library with defined the above stubs and -re-directs the call to the appropriate pointer to function. */ - -typedef struct icalirip_stubs { - - void(*authenticate_stub)(icalirip* irip, char* mechanism, char* data); - void (*sendata_stub)(icalirip* irip, unsigned int time); - void (*dequeue_stub)(icalirip* irip, char* caluid, unsigned int time); - void (*recipient_stub)(icalirip* irip, char* address, unsigned int time); - void (*switch_stub)(icalirip* irip); - void (*disconnect_stub)(); - void (*unknown_stub)(icalirip* irip, char* command, char** data); - -} icalirip_stubs; - -void icalirip_set_stubs(icalirip* irip, icalirip_stubs* stubs); - -/********************** Client (Sender) Interfaces **************************/ - -/* Client API */ -icalirip_response icalirip_abort(icalirip* irip); -icalirip_response icalirip_authenticate(icalirip* irip, char* mechanism, char* data); -icalirip_response icalirip_capability(icalirip* irip); -icalirip_response icalirip_continue(icalirip* irip, unsigned int time); -icalirip_response icalirip_sendata(icalirip* irip, icalcomponent* comp, unsigned int time); -icalirip_response icalirip_recipient(icalirip* irip, char* address, unsigned int time); -icalirip_response icalirip_dequeue(icalirip* irip, char* address, unsigned int time); -icalirip_response icalirip_switch(icalirip* irip); -icalirip_response icalirip_disconnect(); -icalirip_response icalirip_unknown(icalirip* irip, char* command); - -/* client stubs */ -void icalirip_send_request(icalirip* irip,char* request); -char* icalirip_get_response(icalirip* irip); - -/********************** Configuration Interfaces **************************/ - -/* Configure capabilities */ -void icalirip_add_auth_mechanism(icalirip* irip, char* auth); -void icalirip_set_max_object_size(icalirip* irip, unsigned int size); -void icalirip_set_max_date(icalirip* irip, time_t time); -void icalirip_set_min_date(icalirip* irip, time_t time); - - -#endif /* !ICALIRIP_H */ - - - diff --git a/libical/src/libical/icalitip.output b/libical/src/libical/icalitip.output deleted file mode 100644 index 1218f89c74..0000000000 --- a/libical/src/libical/icalitip.output +++ /dev/null @@ -1,1698 +0,0 @@ - - -Terminals which are not used: - - FLOATNUMBER - STRING - EOL - CHARACTER - COLON - TIMESEPERATOR - BIT8 - ACCEPTED - ADD - AUDIO - BASE64 - BINARY - BOOLEAN - BUSY - BUSYTENTATIVE - BUSYUNAVAILABLE - CALADDRESS - CANCEL - CANCELLED - CHAIR - CHILD - COMPLETED - CONFIDENTIAL - CONFIRMED - COUNTER - DATE - DATETIME - DECLINECOUNTER - DECLINED - DELEGATED - DISPLAY - DRAFT - DURATION - EMAIL - END - FINAL - FLOAT - FREE - GREGORIAN - GROUP - INDIVIDUAL - INPROCESS - INTEGER - NEEDSACTION - NONPARTICIPANT - OPAQUE - OPTPARTICIPANT - PARENT - PERIOD - PRIVATE - PROCEDURE - PUBLIC - PUBLISH - RECUR - REFRESH - REPLY - REQPARTICIPANT - REQUEST - RESOURCE - ROOM - SIBLING - START - TENTATIVE - TEXT - THISANDFUTURE - THISANDPRIOR - TIME - TRANSPAENT - UNKNOWN - UTCOFFSET - XNAME - ALTREP - CN - CUTYPE - DAYLIGHT - DIR - ENCODING - EVENT - FBTYPE - FMTTYPE - LANGUAGE - MEMBER - PARTSTAT - RANGE - RELATED - RELTYPE - ROLE - RSVP - SENTBY - STANDARD - URI - - - -Grammar -rule 1 value -> binary_value -rule 2 value -> boolean_value -rule 3 value -> date_value -rule 4 value -> datetime_value -rule 5 value -> duration_value -rule 6 value -> period_value -rule 7 value -> recur_value -rule 8 value -> utcoffset_value -rule 9 value -> error -rule 10 binary_value -> "unimplemented2" -rule 11 boolean_value -> TRUE -rule 12 boolean_value -> FALSE -rule 13 date_value -> DIGITS -rule 14 utc_char -> /* empty */ -rule 15 utc_char -> UTC_CHAR -rule 16 utc_char_b -> /* empty */ -rule 17 utc_char_b -> UTC_CHAR -rule 18 datetime_value -> DIGITS TIME_CHAR DIGITS utc_char -rule 19 dur_date -> dur_day -rule 20 dur_date -> dur_day dur_time -rule 21 dur_week -> DIGITS 'W' -rule 22 dur_time -> TIME_CHAR dur_hour -rule 23 dur_time -> TIME_CHAR dur_minute -rule 24 dur_time -> TIME_CHAR dur_second -rule 25 dur_hour -> DIGITS 'H' -rule 26 dur_hour -> DIGITS 'H' dur_minute -rule 27 dur_minute -> DIGITS 'M' -rule 28 dur_minute -> DIGITS 'M' dur_second -rule 29 dur_second -> DIGITS 'S' -rule 30 dur_day -> DIGITS 'D' -rule 31 dur_prefix -> /* empty */ -rule 32 dur_prefix -> '+' -rule 33 dur_prefix -> '-' -rule 34 duration_value -> dur_prefix 'P' dur_date -rule 35 duration_value -> dur_prefix 'P' dur_time -rule 36 duration_value -> dur_prefix 'P' dur_week -rule 37 period_value -> DIGITS TIME_CHAR DIGITS utc_char '/' DIGITS TIME_CHAR DIGITS utc_char_b -rule 38 period_value -> DIGITS TIME_CHAR DIGITS utc_char '/' duration_value -rule 39 recur_start -> FREQ EQUALS SECONDLY -rule 40 recur_start -> FREQ EQUALS MINUTELY -rule 41 recur_start -> FREQ EQUALS HOURLY -rule 42 recur_start -> FREQ EQUALS DAILY -rule 43 recur_start -> FREQ EQUALS WEEKLY -rule 44 recur_start -> FREQ EQUALS MONTHLY -rule 45 recur_start -> FREQ EQUALS YEARLY -rule 46 weekday -> SU -rule 47 weekday -> MO -rule 48 weekday -> TU -rule 49 weekday -> WE -rule 50 weekday -> TH -rule 51 weekday -> FR -rule 52 weekday -> SA -rule 53 weekday_list -> weekday -rule 54 weekday_list -> DIGITS weekday -rule 55 weekday_list -> weekday_list COMMA weekday -rule 56 recur_list -> DIGITS -rule 57 recur_list -> recur_list COMMA DIGITS -rule 58 recur_skip -> INTERVAL EQUALS DIGITS -rule 59 recur_skip -> WKST EQUALS SU -rule 60 recur_skip -> WKST EQUALS MO -rule 61 recur_skip -> WKST EQUALS TU -rule 62 recur_skip -> WKST EQUALS WE -rule 63 recur_skip -> WKST EQUALS TH -rule 64 recur_skip -> WKST EQUALS FR -rule 65 recur_skip -> WKST EQUALS SA -rule 66 recur_skip -> BYSECOND EQUALS recur_list -rule 67 recur_skip -> BYMINUTE EQUALS recur_list -rule 68 recur_skip -> BYHOUR EQUALS recur_list -rule 69 recur_skip -> BYDAY EQUALS weekday_list -rule 70 recur_skip -> BYMONTH EQUALS recur_list -rule 71 recur_skip -> BYMONTHDAY EQUALS recur_list -rule 72 recur_skip -> BYYEARDAY EQUALS recur_list -rule 73 recur_skip -> BYWEEKNO EQUALS recur_list -rule 74 recur_skip -> BYSETPOS EQUALS recur_list -rule 75 recur_skip -> UNTIL EQUALS datetime_value -rule 76 recur_skip -> UNTIL EQUALS date_value -rule 77 recur_skip -> COUNT EQUALS DIGITS -rule 78 recur_skip_list -> /* empty */ -rule 79 recur_skip_list -> recur_skip_list SEMICOLON recur_skip -rule 80 recur_value -> recur_start recur_skip_list -rule 81 plusminus -> '+' -rule 82 plusminus -> '-' -rule 83 utcoffset_value -> plusminus INTNUMBER INTNUMBER -rule 84 utcoffset_value -> plusminus INTNUMBER INTNUMBER INTNUMBER - -Terminals, with rules where they appear - -$ (-1) -'+' (43) 32 81 -'-' (45) 33 82 -'/' (47) 37 38 -'D' (68) 30 -'H' (72) 25 26 -'M' (77) 27 28 -'P' (80) 34 35 36 -'S' (83) 29 -'W' (87) 21 -error (256) 9 -DIGITS (257) 13 18 21 25 26 27 28 29 30 37 38 54 56 57 58 77 -INTNUMBER (258) 83 84 -FLOATNUMBER (259) -STRING (260) -EOL (261) -EQUALS (262) 39 40 41 42 43 44 45 58 59 60 61 62 63 64 65 66 67 68 - 69 70 71 72 73 74 75 76 77 -CHARACTER (263) -COLON (264) -COMMA (265) 55 57 -SEMICOLON (266) 79 -TIMESEPERATOR (267) -TRUE (268) 11 -FALSE (269) 12 -FREQ (270) 39 40 41 42 43 44 45 -BYDAY (271) 69 -BYHOUR (272) 68 -BYMINUTE (273) 67 -BYMONTH (274) 70 -BYMONTHDAY (275) 71 -BYSECOND (276) 66 -BYSETPOS (277) 74 -BYWEEKNO (278) 73 -BYYEARDAY (279) 72 -DAILY (280) 42 -MINUTELY (281) 40 -MONTHLY (282) 44 -SECONDLY (283) 39 -WEEKLY (284) 43 -HOURLY (285) 41 -YEARLY (286) 45 -INTERVAL (287) 58 -COUNT (288) 77 -UNTIL (289) 75 76 -WKST (290) 59 60 61 62 63 64 65 -MO (291) 47 60 -SA (292) 52 65 -SU (293) 46 59 -TU (294) 48 61 -WE (295) 49 62 -TH (296) 50 63 -FR (297) 51 64 -BIT8 (298) -ACCEPTED (299) -ADD (300) -AUDIO (301) -BASE64 (302) -BINARY (303) -BOOLEAN (304) -BUSY (305) -BUSYTENTATIVE (306) -BUSYUNAVAILABLE (307) -CALADDRESS (308) -CANCEL (309) -CANCELLED (310) -CHAIR (311) -CHILD (312) -COMPLETED (313) -CONFIDENTIAL (314) -CONFIRMED (315) -COUNTER (316) -DATE (317) -DATETIME (318) -DECLINECOUNTER (319) -DECLINED (320) -DELEGATED (321) -DISPLAY (322) -DRAFT (323) -DURATION (324) -EMAIL (325) -END (326) -FINAL (327) -FLOAT (328) -FREE (329) -GREGORIAN (330) -GROUP (331) -INDIVIDUAL (332) -INPROCESS (333) -INTEGER (334) -NEEDSACTION (335) -NONPARTICIPANT (336) -OPAQUE (337) -OPTPARTICIPANT (338) -PARENT (339) -PERIOD (340) -PRIVATE (341) -PROCEDURE (342) -PUBLIC (343) -PUBLISH (344) -RECUR (345) -REFRESH (346) -REPLY (347) -REQPARTICIPANT (348) -REQUEST (349) -RESOURCE (350) -ROOM (351) -SIBLING (352) -START (353) -TENTATIVE (354) -TEXT (355) -THISANDFUTURE (356) -THISANDPRIOR (357) -TIME (358) -TRANSPAENT (359) -UNKNOWN (360) -UTCOFFSET (361) -XNAME (362) -ALTREP (363) -CN (364) -CUTYPE (365) -DAYLIGHT (366) -DIR (367) -ENCODING (368) -EVENT (369) -FBTYPE (370) -FMTTYPE (371) -LANGUAGE (372) -MEMBER (373) -PARTSTAT (374) -RANGE (375) -RELATED (376) -RELTYPE (377) -ROLE (378) -RSVP (379) -SENTBY (380) -STANDARD (381) -URI (382) -TIME_CHAR (383) 18 22 23 24 37 38 -UTC_CHAR (384) 15 17 -"unimplemented2" (385) 10 - -Nonterminals, with rules where they appear - -value (141) - on left: 1 2 3 4 5 6 7 8 9 -binary_value (142) - on left: 10, on right: 1 -boolean_value (143) - on left: 11 12, on right: 2 -date_value (144) - on left: 13, on right: 3 76 -utc_char (145) - on left: 14 15, on right: 18 37 38 -utc_char_b (146) - on left: 16 17, on right: 37 -datetime_value (147) - on left: 18, on right: 4 75 -dur_date (148) - on left: 19 20, on right: 34 -dur_week (149) - on left: 21, on right: 36 -dur_time (150) - on left: 22 23 24, on right: 20 35 -dur_hour (151) - on left: 25 26, on right: 22 -dur_minute (152) - on left: 27 28, on right: 23 26 -dur_second (153) - on left: 29, on right: 24 28 -dur_day (154) - on left: 30, on right: 19 20 -dur_prefix (155) - on left: 31 32 33, on right: 34 35 36 -duration_value (156) - on left: 34 35 36, on right: 5 38 -period_value (157) - on left: 37 38, on right: 6 -recur_start (158) - on left: 39 40 41 42 43 44 45, on right: 80 -weekday (159) - on left: 46 47 48 49 50 51 52, on right: 53 54 55 -weekday_list (160) - on left: 53 54 55, on right: 55 69 -recur_list (161) - on left: 56 57, on right: 57 66 67 68 70 71 72 73 74 -recur_skip (162) - on left: 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 - 76 77, on right: 79 -recur_skip_list (163) - on left: 78 79, on right: 79 80 -recur_value (164) - on left: 80, on right: 7 -plusminus (165) - on left: 81 82, on right: 83 84 -utcoffset_value (166) - on left: 83 84, on right: 8 - - -state 0 - - error shift, and go to state 1 - DIGITS shift, and go to state 2 - TRUE shift, and go to state 3 - FALSE shift, and go to state 4 - FREQ shift, and go to state 5 - "unimplemented2" shift, and go to state 6 - '+' shift, and go to state 7 - '-' shift, and go to state 8 - - 'P' reduce using rule 31 (dur_prefix) - - value go to state 133 - binary_value go to state 9 - boolean_value go to state 10 - date_value go to state 11 - datetime_value go to state 12 - dur_prefix go to state 13 - duration_value go to state 14 - period_value go to state 15 - recur_start go to state 16 - recur_value go to state 17 - plusminus go to state 18 - utcoffset_value go to state 19 - - - -state 1 - - value -> error . (rule 9) - - $default reduce using rule 9 (value) - - - -state 2 - - date_value -> DIGITS . (rule 13) - datetime_value -> DIGITS . TIME_CHAR DIGITS utc_char (rule 18) - period_value -> DIGITS . TIME_CHAR DIGITS utc_char '/' DIGITS TIME_CHAR DIGITS utc_char_b (rule 37) - period_value -> DIGITS . TIME_CHAR DIGITS utc_char '/' duration_value (rule 38) - - TIME_CHAR shift, and go to state 20 - - $default reduce using rule 13 (date_value) - - - -state 3 - - boolean_value -> TRUE . (rule 11) - - $default reduce using rule 11 (boolean_value) - - - -state 4 - - boolean_value -> FALSE . (rule 12) - - $default reduce using rule 12 (boolean_value) - - - -state 5 - - recur_start -> FREQ . EQUALS SECONDLY (rule 39) - recur_start -> FREQ . EQUALS MINUTELY (rule 40) - recur_start -> FREQ . EQUALS HOURLY (rule 41) - recur_start -> FREQ . EQUALS DAILY (rule 42) - recur_start -> FREQ . EQUALS WEEKLY (rule 43) - recur_start -> FREQ . EQUALS MONTHLY (rule 44) - recur_start -> FREQ . EQUALS YEARLY (rule 45) - - EQUALS shift, and go to state 21 - - - -state 6 - - binary_value -> "unimplemented2" . (rule 10) - - $default reduce using rule 10 (binary_value) - - - -state 7 - - dur_prefix -> '+' . (rule 32) - plusminus -> '+' . (rule 81) - - INTNUMBER reduce using rule 81 (plusminus) - $default reduce using rule 32 (dur_prefix) - - - -state 8 - - dur_prefix -> '-' . (rule 33) - plusminus -> '-' . (rule 82) - - INTNUMBER reduce using rule 82 (plusminus) - $default reduce using rule 33 (dur_prefix) - - - -state 9 - - value -> binary_value . (rule 1) - - $default reduce using rule 1 (value) - - - -state 10 - - value -> boolean_value . (rule 2) - - $default reduce using rule 2 (value) - - - -state 11 - - value -> date_value . (rule 3) - - $default reduce using rule 3 (value) - - - -state 12 - - value -> datetime_value . (rule 4) - - $default reduce using rule 4 (value) - - - -state 13 - - duration_value -> dur_prefix . 'P' dur_date (rule 34) - duration_value -> dur_prefix . 'P' dur_time (rule 35) - duration_value -> dur_prefix . 'P' dur_week (rule 36) - - 'P' shift, and go to state 22 - - - -state 14 - - value -> duration_value . (rule 5) - - $default reduce using rule 5 (value) - - - -state 15 - - value -> period_value . (rule 6) - - $default reduce using rule 6 (value) - - - -state 16 - - recur_value -> recur_start . recur_skip_list (rule 80) - - $default reduce using rule 78 (recur_skip_list) - - recur_skip_list go to state 23 - - - -state 17 - - value -> recur_value . (rule 7) - - $default reduce using rule 7 (value) - - - -state 18 - - utcoffset_value -> plusminus . INTNUMBER INTNUMBER (rule 83) - utcoffset_value -> plusminus . INTNUMBER INTNUMBER INTNUMBER (rule 84) - - INTNUMBER shift, and go to state 24 - - - -state 19 - - value -> utcoffset_value . (rule 8) - - $default reduce using rule 8 (value) - - - -state 20 - - datetime_value -> DIGITS TIME_CHAR . DIGITS utc_char (rule 18) - period_value -> DIGITS TIME_CHAR . DIGITS utc_char '/' DIGITS TIME_CHAR DIGITS utc_char_b (rule 37) - period_value -> DIGITS TIME_CHAR . DIGITS utc_char '/' duration_value (rule 38) - - DIGITS shift, and go to state 25 - - - -state 21 - - recur_start -> FREQ EQUALS . SECONDLY (rule 39) - recur_start -> FREQ EQUALS . MINUTELY (rule 40) - recur_start -> FREQ EQUALS . HOURLY (rule 41) - recur_start -> FREQ EQUALS . DAILY (rule 42) - recur_start -> FREQ EQUALS . WEEKLY (rule 43) - recur_start -> FREQ EQUALS . MONTHLY (rule 44) - recur_start -> FREQ EQUALS . YEARLY (rule 45) - - DAILY shift, and go to state 26 - MINUTELY shift, and go to state 27 - MONTHLY shift, and go to state 28 - SECONDLY shift, and go to state 29 - WEEKLY shift, and go to state 30 - HOURLY shift, and go to state 31 - YEARLY shift, and go to state 32 - - - -state 22 - - duration_value -> dur_prefix 'P' . dur_date (rule 34) - duration_value -> dur_prefix 'P' . dur_time (rule 35) - duration_value -> dur_prefix 'P' . dur_week (rule 36) - - DIGITS shift, and go to state 33 - TIME_CHAR shift, and go to state 34 - - dur_date go to state 35 - dur_week go to state 36 - dur_time go to state 37 - dur_day go to state 38 - - - -state 23 - - recur_skip_list -> recur_skip_list . SEMICOLON recur_skip (rule 79) - recur_value -> recur_start recur_skip_list . (rule 80) - - SEMICOLON shift, and go to state 39 - - $default reduce using rule 80 (recur_value) - - - -state 24 - - utcoffset_value -> plusminus INTNUMBER . INTNUMBER (rule 83) - utcoffset_value -> plusminus INTNUMBER . INTNUMBER INTNUMBER (rule 84) - - INTNUMBER shift, and go to state 40 - - - -state 25 - - datetime_value -> DIGITS TIME_CHAR DIGITS . utc_char (rule 18) - period_value -> DIGITS TIME_CHAR DIGITS . utc_char '/' DIGITS TIME_CHAR DIGITS utc_char_b (rule 37) - period_value -> DIGITS TIME_CHAR DIGITS . utc_char '/' duration_value (rule 38) - - UTC_CHAR shift, and go to state 41 - - $default reduce using rule 14 (utc_char) - - utc_char go to state 42 - - - -state 26 - - recur_start -> FREQ EQUALS DAILY . (rule 42) - - $default reduce using rule 42 (recur_start) - - - -state 27 - - recur_start -> FREQ EQUALS MINUTELY . (rule 40) - - $default reduce using rule 40 (recur_start) - - - -state 28 - - recur_start -> FREQ EQUALS MONTHLY . (rule 44) - - $default reduce using rule 44 (recur_start) - - - -state 29 - - recur_start -> FREQ EQUALS SECONDLY . (rule 39) - - $default reduce using rule 39 (recur_start) - - - -state 30 - - recur_start -> FREQ EQUALS WEEKLY . (rule 43) - - $default reduce using rule 43 (recur_start) - - - -state 31 - - recur_start -> FREQ EQUALS HOURLY . (rule 41) - - $default reduce using rule 41 (recur_start) - - - -state 32 - - recur_start -> FREQ EQUALS YEARLY . (rule 45) - - $default reduce using rule 45 (recur_start) - - - -state 33 - - dur_week -> DIGITS . 'W' (rule 21) - dur_day -> DIGITS . 'D' (rule 30) - - 'W' shift, and go to state 43 - 'D' shift, and go to state 44 - - - -state 34 - - dur_time -> TIME_CHAR . dur_hour (rule 22) - dur_time -> TIME_CHAR . dur_minute (rule 23) - dur_time -> TIME_CHAR . dur_second (rule 24) - - DIGITS shift, and go to state 45 - - dur_hour go to state 46 - dur_minute go to state 47 - dur_second go to state 48 - - - -state 35 - - duration_value -> dur_prefix 'P' dur_date . (rule 34) - - $default reduce using rule 34 (duration_value) - - - -state 36 - - duration_value -> dur_prefix 'P' dur_week . (rule 36) - - $default reduce using rule 36 (duration_value) - - - -state 37 - - duration_value -> dur_prefix 'P' dur_time . (rule 35) - - $default reduce using rule 35 (duration_value) - - - -state 38 - - dur_date -> dur_day . (rule 19) - dur_date -> dur_day . dur_time (rule 20) - - TIME_CHAR shift, and go to state 34 - - $default reduce using rule 19 (dur_date) - - dur_time go to state 49 - - - -state 39 - - recur_skip_list -> recur_skip_list SEMICOLON . recur_skip (rule 79) - - BYDAY shift, and go to state 50 - BYHOUR shift, and go to state 51 - BYMINUTE shift, and go to state 52 - BYMONTH shift, and go to state 53 - BYMONTHDAY shift, and go to state 54 - BYSECOND shift, and go to state 55 - BYSETPOS shift, and go to state 56 - BYWEEKNO shift, and go to state 57 - BYYEARDAY shift, and go to state 58 - INTERVAL shift, and go to state 59 - COUNT shift, and go to state 60 - UNTIL shift, and go to state 61 - WKST shift, and go to state 62 - - recur_skip go to state 63 - - - -state 40 - - utcoffset_value -> plusminus INTNUMBER INTNUMBER . (rule 83) - utcoffset_value -> plusminus INTNUMBER INTNUMBER . INTNUMBER (rule 84) - - INTNUMBER shift, and go to state 64 - - $default reduce using rule 83 (utcoffset_value) - - - -state 41 - - utc_char -> UTC_CHAR . (rule 15) - - $default reduce using rule 15 (utc_char) - - - -state 42 - - datetime_value -> DIGITS TIME_CHAR DIGITS utc_char . (rule 18) - period_value -> DIGITS TIME_CHAR DIGITS utc_char . '/' DIGITS TIME_CHAR DIGITS utc_char_b (rule 37) - period_value -> DIGITS TIME_CHAR DIGITS utc_char . '/' duration_value (rule 38) - - '/' shift, and go to state 65 - - $default reduce using rule 18 (datetime_value) - - - -state 43 - - dur_week -> DIGITS 'W' . (rule 21) - - $default reduce using rule 21 (dur_week) - - - -state 44 - - dur_day -> DIGITS 'D' . (rule 30) - - $default reduce using rule 30 (dur_day) - - - -state 45 - - dur_hour -> DIGITS . 'H' (rule 25) - dur_hour -> DIGITS . 'H' dur_minute (rule 26) - dur_minute -> DIGITS . 'M' (rule 27) - dur_minute -> DIGITS . 'M' dur_second (rule 28) - dur_second -> DIGITS . 'S' (rule 29) - - 'H' shift, and go to state 66 - 'M' shift, and go to state 67 - 'S' shift, and go to state 68 - - - -state 46 - - dur_time -> TIME_CHAR dur_hour . (rule 22) - - $default reduce using rule 22 (dur_time) - - - -state 47 - - dur_time -> TIME_CHAR dur_minute . (rule 23) - - $default reduce using rule 23 (dur_time) - - - -state 48 - - dur_time -> TIME_CHAR dur_second . (rule 24) - - $default reduce using rule 24 (dur_time) - - - -state 49 - - dur_date -> dur_day dur_time . (rule 20) - - $default reduce using rule 20 (dur_date) - - - -state 50 - - recur_skip -> BYDAY . EQUALS weekday_list (rule 69) - - EQUALS shift, and go to state 69 - - - -state 51 - - recur_skip -> BYHOUR . EQUALS recur_list (rule 68) - - EQUALS shift, and go to state 70 - - - -state 52 - - recur_skip -> BYMINUTE . EQUALS recur_list (rule 67) - - EQUALS shift, and go to state 71 - - - -state 53 - - recur_skip -> BYMONTH . EQUALS recur_list (rule 70) - - EQUALS shift, and go to state 72 - - - -state 54 - - recur_skip -> BYMONTHDAY . EQUALS recur_list (rule 71) - - EQUALS shift, and go to state 73 - - - -state 55 - - recur_skip -> BYSECOND . EQUALS recur_list (rule 66) - - EQUALS shift, and go to state 74 - - - -state 56 - - recur_skip -> BYSETPOS . EQUALS recur_list (rule 74) - - EQUALS shift, and go to state 75 - - - -state 57 - - recur_skip -> BYWEEKNO . EQUALS recur_list (rule 73) - - EQUALS shift, and go to state 76 - - - -state 58 - - recur_skip -> BYYEARDAY . EQUALS recur_list (rule 72) - - EQUALS shift, and go to state 77 - - - -state 59 - - recur_skip -> INTERVAL . EQUALS DIGITS (rule 58) - - EQUALS shift, and go to state 78 - - - -state 60 - - recur_skip -> COUNT . EQUALS DIGITS (rule 77) - - EQUALS shift, and go to state 79 - - - -state 61 - - recur_skip -> UNTIL . EQUALS datetime_value (rule 75) - recur_skip -> UNTIL . EQUALS date_value (rule 76) - - EQUALS shift, and go to state 80 - - - -state 62 - - recur_skip -> WKST . EQUALS SU (rule 59) - recur_skip -> WKST . EQUALS MO (rule 60) - recur_skip -> WKST . EQUALS TU (rule 61) - recur_skip -> WKST . EQUALS WE (rule 62) - recur_skip -> WKST . EQUALS TH (rule 63) - recur_skip -> WKST . EQUALS FR (rule 64) - recur_skip -> WKST . EQUALS SA (rule 65) - - EQUALS shift, and go to state 81 - - - -state 63 - - recur_skip_list -> recur_skip_list SEMICOLON recur_skip . (rule 79) - - $default reduce using rule 79 (recur_skip_list) - - - -state 64 - - utcoffset_value -> plusminus INTNUMBER INTNUMBER INTNUMBER . (rule 84) - - $default reduce using rule 84 (utcoffset_value) - - - -state 65 - - period_value -> DIGITS TIME_CHAR DIGITS utc_char '/' . DIGITS TIME_CHAR DIGITS utc_char_b (rule 37) - period_value -> DIGITS TIME_CHAR DIGITS utc_char '/' . duration_value (rule 38) - - DIGITS shift, and go to state 82 - '+' shift, and go to state 83 - '-' shift, and go to state 84 - - $default reduce using rule 31 (dur_prefix) - - dur_prefix go to state 13 - duration_value go to state 85 - - - -state 66 - - dur_hour -> DIGITS 'H' . (rule 25) - dur_hour -> DIGITS 'H' . dur_minute (rule 26) - - DIGITS shift, and go to state 86 - - $default reduce using rule 25 (dur_hour) - - dur_minute go to state 87 - - - -state 67 - - dur_minute -> DIGITS 'M' . (rule 27) - dur_minute -> DIGITS 'M' . dur_second (rule 28) - - DIGITS shift, and go to state 88 - - $default reduce using rule 27 (dur_minute) - - dur_second go to state 89 - - - -state 68 - - dur_second -> DIGITS 'S' . (rule 29) - - $default reduce using rule 29 (dur_second) - - - -state 69 - - recur_skip -> BYDAY EQUALS . weekday_list (rule 69) - - DIGITS shift, and go to state 90 - MO shift, and go to state 91 - SA shift, and go to state 92 - SU shift, and go to state 93 - TU shift, and go to state 94 - WE shift, and go to state 95 - TH shift, and go to state 96 - FR shift, and go to state 97 - - weekday go to state 98 - weekday_list go to state 99 - - - -state 70 - - recur_skip -> BYHOUR EQUALS . recur_list (rule 68) - - DIGITS shift, and go to state 100 - - recur_list go to state 101 - - - -state 71 - - recur_skip -> BYMINUTE EQUALS . recur_list (rule 67) - - DIGITS shift, and go to state 100 - - recur_list go to state 102 - - - -state 72 - - recur_skip -> BYMONTH EQUALS . recur_list (rule 70) - - DIGITS shift, and go to state 100 - - recur_list go to state 103 - - - -state 73 - - recur_skip -> BYMONTHDAY EQUALS . recur_list (rule 71) - - DIGITS shift, and go to state 100 - - recur_list go to state 104 - - - -state 74 - - recur_skip -> BYSECOND EQUALS . recur_list (rule 66) - - DIGITS shift, and go to state 100 - - recur_list go to state 105 - - - -state 75 - - recur_skip -> BYSETPOS EQUALS . recur_list (rule 74) - - DIGITS shift, and go to state 100 - - recur_list go to state 106 - - - -state 76 - - recur_skip -> BYWEEKNO EQUALS . recur_list (rule 73) - - DIGITS shift, and go to state 100 - - recur_list go to state 107 - - - -state 77 - - recur_skip -> BYYEARDAY EQUALS . recur_list (rule 72) - - DIGITS shift, and go to state 100 - - recur_list go to state 108 - - - -state 78 - - recur_skip -> INTERVAL EQUALS . DIGITS (rule 58) - - DIGITS shift, and go to state 109 - - - -state 79 - - recur_skip -> COUNT EQUALS . DIGITS (rule 77) - - DIGITS shift, and go to state 110 - - - -state 80 - - recur_skip -> UNTIL EQUALS . datetime_value (rule 75) - recur_skip -> UNTIL EQUALS . date_value (rule 76) - - DIGITS shift, and go to state 111 - - date_value go to state 112 - datetime_value go to state 113 - - - -state 81 - - recur_skip -> WKST EQUALS . SU (rule 59) - recur_skip -> WKST EQUALS . MO (rule 60) - recur_skip -> WKST EQUALS . TU (rule 61) - recur_skip -> WKST EQUALS . WE (rule 62) - recur_skip -> WKST EQUALS . TH (rule 63) - recur_skip -> WKST EQUALS . FR (rule 64) - recur_skip -> WKST EQUALS . SA (rule 65) - - MO shift, and go to state 114 - SA shift, and go to state 115 - SU shift, and go to state 116 - TU shift, and go to state 117 - WE shift, and go to state 118 - TH shift, and go to state 119 - FR shift, and go to state 120 - - - -state 82 - - period_value -> DIGITS TIME_CHAR DIGITS utc_char '/' DIGITS . TIME_CHAR DIGITS utc_char_b (rule 37) - - TIME_CHAR shift, and go to state 121 - - - -state 83 - - dur_prefix -> '+' . (rule 32) - - $default reduce using rule 32 (dur_prefix) - - - -state 84 - - dur_prefix -> '-' . (rule 33) - - $default reduce using rule 33 (dur_prefix) - - - -state 85 - - period_value -> DIGITS TIME_CHAR DIGITS utc_char '/' duration_value . (rule 38) - - $default reduce using rule 38 (period_value) - - - -state 86 - - dur_minute -> DIGITS . 'M' (rule 27) - dur_minute -> DIGITS . 'M' dur_second (rule 28) - - 'M' shift, and go to state 67 - - - -state 87 - - dur_hour -> DIGITS 'H' dur_minute . (rule 26) - - $default reduce using rule 26 (dur_hour) - - - -state 88 - - dur_second -> DIGITS . 'S' (rule 29) - - 'S' shift, and go to state 68 - - - -state 89 - - dur_minute -> DIGITS 'M' dur_second . (rule 28) - - $default reduce using rule 28 (dur_minute) - - - -state 90 - - weekday_list -> DIGITS . weekday (rule 54) - - MO shift, and go to state 91 - SA shift, and go to state 92 - SU shift, and go to state 93 - TU shift, and go to state 94 - WE shift, and go to state 95 - TH shift, and go to state 96 - FR shift, and go to state 97 - - weekday go to state 122 - - - -state 91 - - weekday -> MO . (rule 47) - - $default reduce using rule 47 (weekday) - - - -state 92 - - weekday -> SA . (rule 52) - - $default reduce using rule 52 (weekday) - - - -state 93 - - weekday -> SU . (rule 46) - - $default reduce using rule 46 (weekday) - - - -state 94 - - weekday -> TU . (rule 48) - - $default reduce using rule 48 (weekday) - - - -state 95 - - weekday -> WE . (rule 49) - - $default reduce using rule 49 (weekday) - - - -state 96 - - weekday -> TH . (rule 50) - - $default reduce using rule 50 (weekday) - - - -state 97 - - weekday -> FR . (rule 51) - - $default reduce using rule 51 (weekday) - - - -state 98 - - weekday_list -> weekday . (rule 53) - - $default reduce using rule 53 (weekday_list) - - - -state 99 - - weekday_list -> weekday_list . COMMA weekday (rule 55) - recur_skip -> BYDAY EQUALS weekday_list . (rule 69) - - COMMA shift, and go to state 123 - - $default reduce using rule 69 (recur_skip) - - - -state 100 - - recur_list -> DIGITS . (rule 56) - - $default reduce using rule 56 (recur_list) - - - -state 101 - - recur_list -> recur_list . COMMA DIGITS (rule 57) - recur_skip -> BYHOUR EQUALS recur_list . (rule 68) - - COMMA shift, and go to state 124 - - $default reduce using rule 68 (recur_skip) - - - -state 102 - - recur_list -> recur_list . COMMA DIGITS (rule 57) - recur_skip -> BYMINUTE EQUALS recur_list . (rule 67) - - COMMA shift, and go to state 124 - - $default reduce using rule 67 (recur_skip) - - - -state 103 - - recur_list -> recur_list . COMMA DIGITS (rule 57) - recur_skip -> BYMONTH EQUALS recur_list . (rule 70) - - COMMA shift, and go to state 124 - - $default reduce using rule 70 (recur_skip) - - - -state 104 - - recur_list -> recur_list . COMMA DIGITS (rule 57) - recur_skip -> BYMONTHDAY EQUALS recur_list . (rule 71) - - COMMA shift, and go to state 124 - - $default reduce using rule 71 (recur_skip) - - - -state 105 - - recur_list -> recur_list . COMMA DIGITS (rule 57) - recur_skip -> BYSECOND EQUALS recur_list . (rule 66) - - COMMA shift, and go to state 124 - - $default reduce using rule 66 (recur_skip) - - - -state 106 - - recur_list -> recur_list . COMMA DIGITS (rule 57) - recur_skip -> BYSETPOS EQUALS recur_list . (rule 74) - - COMMA shift, and go to state 124 - - $default reduce using rule 74 (recur_skip) - - - -state 107 - - recur_list -> recur_list . COMMA DIGITS (rule 57) - recur_skip -> BYWEEKNO EQUALS recur_list . (rule 73) - - COMMA shift, and go to state 124 - - $default reduce using rule 73 (recur_skip) - - - -state 108 - - recur_list -> recur_list . COMMA DIGITS (rule 57) - recur_skip -> BYYEARDAY EQUALS recur_list . (rule 72) - - COMMA shift, and go to state 124 - - $default reduce using rule 72 (recur_skip) - - - -state 109 - - recur_skip -> INTERVAL EQUALS DIGITS . (rule 58) - - $default reduce using rule 58 (recur_skip) - - - -state 110 - - recur_skip -> COUNT EQUALS DIGITS . (rule 77) - - $default reduce using rule 77 (recur_skip) - - - -state 111 - - date_value -> DIGITS . (rule 13) - datetime_value -> DIGITS . TIME_CHAR DIGITS utc_char (rule 18) - - TIME_CHAR shift, and go to state 125 - - $default reduce using rule 13 (date_value) - - - -state 112 - - recur_skip -> UNTIL EQUALS date_value . (rule 76) - - $default reduce using rule 76 (recur_skip) - - - -state 113 - - recur_skip -> UNTIL EQUALS datetime_value . (rule 75) - - $default reduce using rule 75 (recur_skip) - - - -state 114 - - recur_skip -> WKST EQUALS MO . (rule 60) - - $default reduce using rule 60 (recur_skip) - - - -state 115 - - recur_skip -> WKST EQUALS SA . (rule 65) - - $default reduce using rule 65 (recur_skip) - - - -state 116 - - recur_skip -> WKST EQUALS SU . (rule 59) - - $default reduce using rule 59 (recur_skip) - - - -state 117 - - recur_skip -> WKST EQUALS TU . (rule 61) - - $default reduce using rule 61 (recur_skip) - - - -state 118 - - recur_skip -> WKST EQUALS WE . (rule 62) - - $default reduce using rule 62 (recur_skip) - - - -state 119 - - recur_skip -> WKST EQUALS TH . (rule 63) - - $default reduce using rule 63 (recur_skip) - - - -state 120 - - recur_skip -> WKST EQUALS FR . (rule 64) - - $default reduce using rule 64 (recur_skip) - - - -state 121 - - period_value -> DIGITS TIME_CHAR DIGITS utc_char '/' DIGITS TIME_CHAR . DIGITS utc_char_b (rule 37) - - DIGITS shift, and go to state 126 - - - -state 122 - - weekday_list -> DIGITS weekday . (rule 54) - - $default reduce using rule 54 (weekday_list) - - - -state 123 - - weekday_list -> weekday_list COMMA . weekday (rule 55) - - MO shift, and go to state 91 - SA shift, and go to state 92 - SU shift, and go to state 93 - TU shift, and go to state 94 - WE shift, and go to state 95 - TH shift, and go to state 96 - FR shift, and go to state 97 - - weekday go to state 127 - - - -state 124 - - recur_list -> recur_list COMMA . DIGITS (rule 57) - - DIGITS shift, and go to state 128 - - - -state 125 - - datetime_value -> DIGITS TIME_CHAR . DIGITS utc_char (rule 18) - - DIGITS shift, and go to state 129 - - - -state 126 - - period_value -> DIGITS TIME_CHAR DIGITS utc_char '/' DIGITS TIME_CHAR DIGITS . utc_char_b (rule 37) - - UTC_CHAR shift, and go to state 130 - - $default reduce using rule 16 (utc_char_b) - - utc_char_b go to state 131 - - - -state 127 - - weekday_list -> weekday_list COMMA weekday . (rule 55) - - $default reduce using rule 55 (weekday_list) - - - -state 128 - - recur_list -> recur_list COMMA DIGITS . (rule 57) - - $default reduce using rule 57 (recur_list) - - - -state 129 - - datetime_value -> DIGITS TIME_CHAR DIGITS . utc_char (rule 18) - - UTC_CHAR shift, and go to state 41 - - $default reduce using rule 14 (utc_char) - - utc_char go to state 132 - - - -state 130 - - utc_char_b -> UTC_CHAR . (rule 17) - - $default reduce using rule 17 (utc_char_b) - - - -state 131 - - period_value -> DIGITS TIME_CHAR DIGITS utc_char '/' DIGITS TIME_CHAR DIGITS utc_char_b . (rule 37) - - $default reduce using rule 37 (period_value) - - - -state 132 - - datetime_value -> DIGITS TIME_CHAR DIGITS utc_char . (rule 18) - - $default reduce using rule 18 (datetime_value) - - - -state 133 - - $ go to state 134 - - - -state 134 - - $ go to state 135 - - - -state 135 - - $default accept diff --git a/libical/src/libical/icalitip.tab.c b/libical/src/libical/icalitip.tab.c deleted file mode 100644 index 82536647e3..0000000000 --- a/libical/src/libical/icalitip.tab.c +++ /dev/null @@ -1,1663 +0,0 @@ - -/* A Bison parser, made from icalitip.y - by GNU Bison version 1.28 */ - -#define YYBISON 1 /* Identify Bison output. */ - -#define yyparse icalparser_yyparse -#define yylex icalparser_yylex -#define yyerror icalparser_yyerror -#define yylval icalparser_yylval -#define yychar icalparser_yychar -#define yydebug icalparser_yydebug -#define yynerrs icalparser_yynerrs -#define DIGITS 257 -#define INTNUMBER 258 -#define FLOATNUMBER 259 -#define STRING 260 -#define EOL 261 -#define EQUALS 262 -#define CHARACTER 263 -#define COLON 264 -#define COMMA 265 -#define SEMICOLON 266 -#define TIMESEPERATOR 267 -#define TRUE 268 -#define FALSE 269 -#define FREQ 270 -#define BYDAY 271 -#define BYHOUR 272 -#define BYMINUTE 273 -#define BYMONTH 274 -#define BYMONTHDAY 275 -#define BYSECOND 276 -#define BYSETPOS 277 -#define BYWEEKNO 278 -#define BYYEARDAY 279 -#define DAILY 280 -#define MINUTELY 281 -#define MONTHLY 282 -#define SECONDLY 283 -#define WEEKLY 284 -#define HOURLY 285 -#define YEARLY 286 -#define INTERVAL 287 -#define COUNT 288 -#define UNTIL 289 -#define WKST 290 -#define MO 291 -#define SA 292 -#define SU 293 -#define TU 294 -#define WE 295 -#define TH 296 -#define FR 297 -#define BIT8 298 -#define ACCEPTED 299 -#define ADD 300 -#define AUDIO 301 -#define BASE64 302 -#define BINARY 303 -#define BOOLEAN 304 -#define BUSY 305 -#define BUSYTENTATIVE 306 -#define BUSYUNAVAILABLE 307 -#define CALADDRESS 308 -#define CANCEL 309 -#define CANCELLED 310 -#define CHAIR 311 -#define CHILD 312 -#define COMPLETED 313 -#define CONFIDENTIAL 314 -#define CONFIRMED 315 -#define COUNTER 316 -#define DATE 317 -#define DATETIME 318 -#define DECLINECOUNTER 319 -#define DECLINED 320 -#define DELEGATED 321 -#define DISPLAY 322 -#define DRAFT 323 -#define DURATION 324 -#define EMAIL 325 -#define END 326 -#define FINAL 327 -#define FLOAT 328 -#define FREE 329 -#define GREGORIAN 330 -#define GROUP 331 -#define INDIVIDUAL 332 -#define INPROCESS 333 -#define INTEGER 334 -#define NEEDSACTION 335 -#define NONPARTICIPANT 336 -#define OPAQUE 337 -#define OPTPARTICIPANT 338 -#define PARENT 339 -#define PERIOD 340 -#define PRIVATE 341 -#define PROCEDURE 342 -#define PUBLIC 343 -#define PUBLISH 344 -#define RECUR 345 -#define REFRESH 346 -#define REPLY 347 -#define REQPARTICIPANT 348 -#define REQUEST 349 -#define RESOURCE 350 -#define ROOM 351 -#define SIBLING 352 -#define START 353 -#define TENTATIVE 354 -#define TEXT 355 -#define THISANDFUTURE 356 -#define THISANDPRIOR 357 -#define TIME 358 -#define TRANSPAENT 359 -#define UNKNOWN 360 -#define UTCOFFSET 361 -#define XNAME 362 -#define ALTREP 363 -#define CN 364 -#define CUTYPE 365 -#define DAYLIGHT 366 -#define DIR 367 -#define ENCODING 368 -#define EVENT 369 -#define FBTYPE 370 -#define FMTTYPE 371 -#define LANGUAGE 372 -#define MEMBER 373 -#define PARTSTAT 374 -#define RANGE 375 -#define RELATED 376 -#define RELTYPE 377 -#define ROLE 378 -#define RSVP 379 -#define SENTBY 380 -#define STANDARD 381 -#define URI 382 -#define TIME_CHAR 383 -#define UTC_CHAR 384 - -#line 1 "icalitip.y" - -/* -*- Mode: C -*- - ====================================================================== - FILE: icalitip.y - CREATOR: eric 10 June 1999 - - DESCRIPTION: - - $Id$ - $Locker$ - - (C) COPYRIGHT 1999 Eric Busboom - http://www.softwarestudio.org - - The contents of this file are subject to the Mozilla Public License - Version 1.0 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and - limitations under the License. - - The original author is Eric Busboom - The original code is icalitip.y - - - - ================================b======================================*/ - -#include -#include /* for strdup() */ -#include /* for SHRT_MAX*/ -#include "icalparser.h" -#include "ical.h" -#include "pvl.h" - -#define YYERROR_VERBOSE -#define YYDEBUG 1 - -icalvalue *icalparser_yy_value; /* Current Value */ - -/* Globals for UTCOFFSET values */ -int utc; -int utc_b; -int utcsign; - -/* Globals for DURATION values */ -struct icaldurationtype duration; - -/* Globals for RECUR values */ -struct icalrecurrencetype recur; -short skiplist[367]; -short skippos; - -void copy_list(short* array, size_t size); -void clear_recur(); -void add_prop(icalproperty_kind); -void icalparser_fill_date(struct tm* t, char* dstr); -void icalparser_fill_time(struct tm* t, char* tstr); -void set_value_type(icalvalue_kind kind); -void yyerror(char *s); /* Don't know why I need this.... */ -int yylex(void); /* Or this. */ -void set_parser_value_state(); -struct icaltimetype fill_datetime(char* d, char* t); - - - -/* Set the state of the lexer so it will interpret values ( iCAL - VALUEs, that is, ) correctly. */ - - -#line 75 "icalitip.y" -typedef union { - float v_float; - int v_int; - char* v_string; - -} YYSTYPE; -#include - -#ifndef __cplusplus -#ifndef __STDC__ -#define const -#endif -#endif - - - -#define YYFINAL 135 -#define YYFLAG -32768 -#define YYNTBASE 141 - -#define YYTRANSLATE(x) ((unsigned)(x) <= 385 ? yytranslate[x] : 167) - -static const short yytranslate[] = { 0, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 137, 2, 138, 2, 140, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 136, 2, 2, - 2, 133, 2, 2, 2, 2, 134, 2, 2, 139, - 2, 2, 135, 2, 2, 2, 132, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 1, 3, 4, 5, 6, - 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, - 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, - 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, - 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, - 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, - 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, - 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, - 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, - 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, - 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, - 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, - 127, 128, 129, 130, 131 -}; - -#if YYDEBUG != 0 -static const short yyprhs[] = { 0, - 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, - 20, 22, 24, 26, 27, 29, 30, 32, 37, 39, - 42, 45, 48, 51, 54, 57, 61, 64, 68, 71, - 74, 75, 77, 79, 83, 87, 91, 101, 108, 112, - 116, 120, 124, 128, 132, 136, 138, 140, 142, 144, - 146, 148, 150, 152, 155, 159, 161, 165, 169, 173, - 177, 181, 185, 189, 193, 197, 201, 205, 209, 213, - 217, 221, 225, 229, 233, 237, 241, 245, 246, 250, - 253, 255, 257, 261 -}; - -static const short yyrhs[] = { 142, - 0, 143, 0, 144, 0, 147, 0, 156, 0, 157, - 0, 164, 0, 166, 0, 1, 0, 131, 0, 14, - 0, 15, 0, 3, 0, 0, 130, 0, 0, 130, - 0, 3, 129, 3, 145, 0, 154, 0, 154, 150, - 0, 3, 132, 0, 129, 151, 0, 129, 152, 0, - 129, 153, 0, 3, 133, 0, 3, 133, 152, 0, - 3, 134, 0, 3, 134, 153, 0, 3, 135, 0, - 3, 136, 0, 0, 137, 0, 138, 0, 155, 139, - 148, 0, 155, 139, 150, 0, 155, 139, 149, 0, - 3, 129, 3, 145, 140, 3, 129, 3, 146, 0, - 3, 129, 3, 145, 140, 156, 0, 16, 8, 29, - 0, 16, 8, 27, 0, 16, 8, 31, 0, 16, - 8, 26, 0, 16, 8, 30, 0, 16, 8, 28, - 0, 16, 8, 32, 0, 39, 0, 37, 0, 40, - 0, 41, 0, 42, 0, 43, 0, 38, 0, 159, - 0, 3, 159, 0, 160, 11, 159, 0, 3, 0, - 161, 11, 3, 0, 33, 8, 3, 0, 36, 8, - 39, 0, 36, 8, 37, 0, 36, 8, 40, 0, - 36, 8, 41, 0, 36, 8, 42, 0, 36, 8, - 43, 0, 36, 8, 38, 0, 22, 8, 161, 0, - 19, 8, 161, 0, 18, 8, 161, 0, 17, 8, - 160, 0, 20, 8, 161, 0, 21, 8, 161, 0, - 25, 8, 161, 0, 24, 8, 161, 0, 23, 8, - 161, 0, 35, 8, 147, 0, 35, 8, 144, 0, - 34, 8, 3, 0, 0, 163, 12, 162, 0, 158, - 163, 0, 137, 0, 138, 0, 165, 4, 4, 0, - 165, 4, 4, 4, 0 -}; - -#endif - -#if YYDEBUG != 0 -static const short yyrline[] = { 0, - 112, 114, 115, 116, 117, 118, 119, 120, 121, 127, - 129, 132, 135, 150, 152, 155, 157, 159, 175, 176, - 178, 183, 186, 189, 193, 197, 202, 206, 211, 216, - 221, 224, 227, 231, 236, 241, 250, 271, 303, 305, - 306, 307, 308, 309, 310, 314, 316, 317, 318, 319, - 320, 321, 325, 327, 328, 331, 333, 336, 338, 339, - 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, - 350, 351, 352, 353, 354, 357, 360, 364, 366, 368, - 376, 377, 379, 385 -}; -#endif - - -#if YYDEBUG != 0 || defined (YYERROR_VERBOSE) - -static const char * const yytname[] = { "$","error","$undefined.","DIGITS", -"INTNUMBER","FLOATNUMBER","STRING","EOL","EQUALS","CHARACTER","COLON","COMMA", -"SEMICOLON","TIMESEPERATOR","TRUE","FALSE","FREQ","BYDAY","BYHOUR","BYMINUTE", -"BYMONTH","BYMONTHDAY","BYSECOND","BYSETPOS","BYWEEKNO","BYYEARDAY","DAILY", -"MINUTELY","MONTHLY","SECONDLY","WEEKLY","HOURLY","YEARLY","INTERVAL","COUNT", -"UNTIL","WKST","MO","SA","SU","TU","WE","TH","FR","BIT8","ACCEPTED","ADD","AUDIO", -"BASE64","BINARY","BOOLEAN","BUSY","BUSYTENTATIVE","BUSYUNAVAILABLE","CALADDRESS", -"CANCEL","CANCELLED","CHAIR","CHILD","COMPLETED","CONFIDENTIAL","CONFIRMED", -"COUNTER","DATE","DATETIME","DECLINECOUNTER","DECLINED","DELEGATED","DISPLAY", -"DRAFT","DURATION","EMAIL","END","FINAL","FLOAT","FREE","GREGORIAN","GROUP", -"INDIVIDUAL","INPROCESS","INTEGER","NEEDSACTION","NONPARTICIPANT","OPAQUE","OPTPARTICIPANT", -"PARENT","PERIOD","PRIVATE","PROCEDURE","PUBLIC","PUBLISH","RECUR","REFRESH", -"REPLY","REQPARTICIPANT","REQUEST","RESOURCE","ROOM","SIBLING","START","TENTATIVE", -"TEXT","THISANDFUTURE","THISANDPRIOR","TIME","TRANSPAENT","UNKNOWN","UTCOFFSET", -"XNAME","ALTREP","CN","CUTYPE","DAYLIGHT","DIR","ENCODING","EVENT","FBTYPE", -"FMTTYPE","LANGUAGE","MEMBER","PARTSTAT","RANGE","RELATED","RELTYPE","ROLE", -"RSVP","SENTBY","STANDARD","URI","TIME_CHAR","UTC_CHAR","\"unimplemented2\"", -"'W'","'H'","'M'","'S'","'D'","'+'","'-'","'P'","'/'","value","binary_value", -"boolean_value","date_value","utc_char","utc_char_b","datetime_value","dur_date", -"dur_week","dur_time","dur_hour","dur_minute","dur_second","dur_day","dur_prefix", -"duration_value","period_value","recur_start","weekday","weekday_list","recur_list", -"recur_skip","recur_skip_list","recur_value","plusminus","utcoffset_value", NULL -}; -#endif - -static const short yyr1[] = { 0, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 142, - 143, 143, 144, 145, 145, 146, 146, 147, 148, 148, - 149, 150, 150, 150, 151, 151, 152, 152, 153, 154, - 155, 155, 155, 156, 156, 156, 157, 157, 158, 158, - 158, 158, 158, 158, 158, 159, 159, 159, 159, 159, - 159, 159, 160, 160, 160, 161, 161, 162, 162, 162, - 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, - 162, 162, 162, 162, 162, 162, 162, 163, 163, 164, - 165, 165, 166, 166 -}; - -static const short yyr2[] = { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 0, 1, 0, 1, 4, 1, 2, - 2, 2, 2, 2, 2, 3, 2, 3, 2, 2, - 0, 1, 1, 3, 3, 3, 9, 6, 3, 3, - 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, - 1, 1, 1, 2, 3, 1, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 0, 3, 2, - 1, 1, 3, 4 -}; - -static const short yydefact[] = { 0, - 9, 13, 11, 12, 0, 10, 32, 33, 1, 2, - 3, 4, 0, 5, 6, 78, 7, 0, 8, 0, - 0, 0, 80, 0, 14, 42, 40, 44, 39, 43, - 41, 45, 0, 0, 34, 36, 35, 19, 0, 83, - 15, 18, 21, 30, 0, 22, 23, 24, 20, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 79, 84, 31, 25, 27, 29, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 32, 33, 38, 0, 26, 0, 28, 0, - 47, 52, 46, 48, 49, 50, 51, 53, 69, 56, - 68, 67, 70, 71, 66, 74, 73, 72, 58, 77, - 13, 76, 75, 60, 65, 59, 61, 62, 63, 64, - 0, 54, 0, 0, 0, 16, 55, 57, 14, 17, - 37, 18, 0, 0, 0 -}; - -static const short yydefgoto[] = { 133, - 9, 10, 11, 42, 131, 12, 35, 36, 37, 46, - 47, 48, 38, 13, 14, 15, 16, 98, 99, 101, - 63, 23, 17, 18, 19 -}; - -static const short yypact[] = { -1, --32768, -123,-32768,-32768, 1,-32768, 3, 6,-32768,-32768, --32768,-32768, -127,-32768,-32768,-32768,-32768, 64,-32768, 66, - -10, -2, 58, 67, -58,-32768,-32768,-32768,-32768,-32768, --32768,-32768, -128, 70,-32768,-32768,-32768, -55, 28, 71, --32768, -64,-32768,-32768, -68,-32768,-32768,-32768,-32768, 69, - 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, - 82, 83,-32768,-32768, 2, 89, 90,-32768, 0, 91, - 91, 91, 91, 91, 91, 91, 91, 92, 93, 94, - -14, -51,-32768,-32768,-32768, -36,-32768, -56,-32768, -7, --32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 88,-32768, - 95, 95, 95, 95, 95, 95, 95, 95,-32768,-32768, - -29,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, - 98,-32768, -7, 99, 100, -26,-32768,-32768, -58,-32768, --32768,-32768, 105, 107,-32768 -}; - -static const short yypgoto[] = {-32768, --32768,-32768, 29, -21,-32768, 30,-32768,-32768, 84,-32768, - 45, 46,-32768,-32768, 47,-32768,-32768, -79,-32768, -17, --32768,-32768,-32768,-32768,-32768 -}; - - -#define YYLAST 140 - - -static const short yytable[] = { 1, - 33, 2, 90, 43, 82, 20, -81, 44, 21, -82, - 122, 22, 3, 4, 5, 26, 27, 28, 29, 30, - 31, 32, 114, 115, 116, 117, 118, 119, 120, 91, - 92, 93, 94, 95, 96, 97, 91, 92, 93, 94, - 95, 96, 97, 127, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 102, 103, 104, 105, 106, 107, 108, - 59, 60, 61, 62, 66, 67, 68, 24, 25, 39, - 40, 41, 45, 34, 64, 65, 69, 121, 68, 70, - 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, - 81, 86, 88, 100, 109, 110, 111, 67, 123, 125, - 126, 128, 129, 130, 134, 124, 135, 132, 112, 113, - 87, 85, 89, 0, 0, 0, 0, 0, 0, 0, - 0, 49, 0, 0, 0, 0, 34, 0, 0, 6, - 0, 0, 0, 0, 0, 7, 8, -31, 83, 84 -}; - -static const short yycheck[] = { 1, - 3, 3, 3, 132, 3, 129, 4, 136, 8, 4, - 90, 139, 14, 15, 16, 26, 27, 28, 29, 30, - 31, 32, 37, 38, 39, 40, 41, 42, 43, 37, - 38, 39, 40, 41, 42, 43, 37, 38, 39, 40, - 41, 42, 43, 123, 17, 18, 19, 20, 21, 22, - 23, 24, 25, 71, 72, 73, 74, 75, 76, 77, - 33, 34, 35, 36, 133, 134, 135, 4, 3, 12, - 4, 130, 3, 129, 4, 140, 8, 129, 135, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 3, 3, 3, 3, 3, 3, 134, 11, 129, - 3, 3, 3, 130, 0, 11, 0, 129, 80, 80, - 66, 65, 67, -1, -1, -1, -1, -1, -1, -1, - -1, 38, -1, -1, -1, -1, 129, -1, -1, 131, - -1, -1, -1, -1, -1, 137, 138, 139, 137, 138 -}; -/* -*-C-*- Note some compilers choke on comments on `#line' lines. */ -#line 3 "/usr/lib/bison.simple" -/* This file comes from bison-1.28. */ - -/* Skeleton output parser for bison, - Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - 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., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* As a special exception, when this file is copied by Bison into a - Bison output file, you may use that output file without restriction. - This special exception was added by the Free Software Foundation - in version 1.24 of Bison. */ - -/* This is the parser code that is written into each bison parser - when the %semantic_parser declaration is not specified in the grammar. - It was written by Richard Stallman by simplifying the hairy parser - used when %semantic_parser is specified. */ - -#ifndef YYSTACK_USE_ALLOCA -#ifdef alloca -#define YYSTACK_USE_ALLOCA -#else /* alloca not defined */ -#ifdef __GNUC__ -#define YYSTACK_USE_ALLOCA -#define alloca __builtin_alloca -#else /* not GNU C. */ -#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386)) -#define YYSTACK_USE_ALLOCA -#include -#else /* not sparc */ -/* We think this test detects Watcom and Microsoft C. */ -/* This used to test MSDOS, but that is a bad idea - since that symbol is in the user namespace. */ -#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__) -#if 0 /* No need for malloc.h, which pollutes the namespace; - instead, just don't use alloca. */ -#include -#endif -#else /* not MSDOS, or __TURBOC__ */ -#if defined(_AIX) -/* I don't know what this was needed for, but it pollutes the namespace. - So I turned it off. rms, 2 May 1997. */ -/* #include */ - #pragma alloca -#define YYSTACK_USE_ALLOCA -#else /* not MSDOS, or __TURBOC__, or _AIX */ -#if 0 -#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up, - and on HPUX 10. Eventually we can turn this on. */ -#define YYSTACK_USE_ALLOCA -#define alloca __builtin_alloca -#endif /* __hpux */ -#endif -#endif /* not _AIX */ -#endif /* not MSDOS, or __TURBOC__ */ -#endif /* not sparc */ -#endif /* not GNU C */ -#endif /* alloca not defined */ -#endif /* YYSTACK_USE_ALLOCA not defined */ - -#ifdef YYSTACK_USE_ALLOCA -#define YYSTACK_ALLOC alloca -#else -#define YYSTACK_ALLOC malloc -#endif - -/* Note: there must be only one dollar sign in this file. - It is replaced by the list of actions, each action - as one case of the switch. */ - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY -2 -#define YYEOF 0 -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrlab1 -/* Like YYERROR except do call yyerror. - This remains here temporarily to ease the - transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. */ -#define YYFAIL goto yyerrlab -#define YYRECOVERING() (!!yyerrstatus) -#define YYBACKUP(token, value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { yychar = (token), yylval = (value); \ - yychar1 = YYTRANSLATE (yychar); \ - YYPOPSTACK; \ - goto yybackup; \ - } \ - else \ - { yyerror ("syntax error: cannot back up"); YYERROR; } \ -while (0) - -#define YYTERROR 1 -#define YYERRCODE 256 - -#ifndef YYPURE -#define YYLEX yylex() -#endif - -#ifdef YYPURE -#ifdef YYLSP_NEEDED -#ifdef YYLEX_PARAM -#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM) -#else -#define YYLEX yylex(&yylval, &yylloc) -#endif -#else /* not YYLSP_NEEDED */ -#ifdef YYLEX_PARAM -#define YYLEX yylex(&yylval, YYLEX_PARAM) -#else -#define YYLEX yylex(&yylval) -#endif -#endif /* not YYLSP_NEEDED */ -#endif - -/* If nonreentrant, generate the variables here */ - -#ifndef YYPURE - -int yychar; /* the lookahead symbol */ -YYSTYPE yylval; /* the semantic value of the */ - /* lookahead symbol */ - -#ifdef YYLSP_NEEDED -YYLTYPE yylloc; /* location data for the lookahead */ - /* symbol */ -#endif - -int yynerrs; /* number of parse errors so far */ -#endif /* not YYPURE */ - -#if YYDEBUG != 0 -int yydebug; /* nonzero means print parse trace */ -/* Since this is uninitialized, it does not stop multiple parsers - from coexisting. */ -#endif - -/* YYINITDEPTH indicates the initial size of the parser's stacks */ - -#ifndef YYINITDEPTH -#define YYINITDEPTH 200 -#endif - -/* YYMAXDEPTH is the maximum size the stacks can grow to - (effective only if the built-in stack extension method is used). */ - -#if YYMAXDEPTH == 0 -#undef YYMAXDEPTH -#endif - -#ifndef YYMAXDEPTH -#define YYMAXDEPTH 10000 -#endif - -/* Define __yy_memcpy. Note that the size argument - should be passed with type unsigned int, because that is what the non-GCC - definitions require. With GCC, __builtin_memcpy takes an arg - of type size_t, but it can handle unsigned int. */ - -#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ -#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT) -#else /* not GNU C or C++ */ -#ifndef __cplusplus - -/* This is the most reliable way to avoid incompatibilities - in available built-in functions on various systems. */ -static void -__yy_memcpy (to, from, count) - char *to; - char *from; - unsigned int count; -{ - register char *f = from; - register char *t = to; - register int i = count; - - while (i-- > 0) - *t++ = *f++; -} - -#else /* __cplusplus */ - -/* This is the most reliable way to avoid incompatibilities - in available built-in functions on various systems. */ -static void -__yy_memcpy (char *to, char *from, unsigned int count) -{ - register char *t = to; - register char *f = from; - register int i = count; - - while (i-- > 0) - *t++ = *f++; -} - -#endif -#endif - -#line 217 "/usr/lib/bison.simple" - -/* The user can define YYPARSE_PARAM as the name of an argument to be passed - into yyparse. The argument should have type void *. - It should actually point to an object. - Grammar actions can access the variable by casting it - to the proper pointer type. */ - -#ifdef YYPARSE_PARAM -#ifdef __cplusplus -#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM -#define YYPARSE_PARAM_DECL -#else /* not __cplusplus */ -#define YYPARSE_PARAM_ARG YYPARSE_PARAM -#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; -#endif /* not __cplusplus */ -#else /* not YYPARSE_PARAM */ -#define YYPARSE_PARAM_ARG -#define YYPARSE_PARAM_DECL -#endif /* not YYPARSE_PARAM */ - -/* Prevent warning if -Wstrict-prototypes. */ -#ifdef __GNUC__ -#ifdef YYPARSE_PARAM -int yyparse (void *); -#else -int yyparse (void); -#endif -#endif - -int -yyparse(YYPARSE_PARAM_ARG) - YYPARSE_PARAM_DECL -{ - register int yystate; - register int yyn; - register short *yyssp; - register YYSTYPE *yyvsp; - int yyerrstatus; /* number of tokens to shift before error messages enabled */ - int yychar1 = 0; /* lookahead token as an internal (translated) token number */ - - short yyssa[YYINITDEPTH]; /* the state stack */ - YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ - - short *yyss = yyssa; /* refer to the stacks thru separate pointers */ - YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */ - -#ifdef YYLSP_NEEDED - YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */ - YYLTYPE *yyls = yylsa; - YYLTYPE *yylsp; - -#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) -#else -#define YYPOPSTACK (yyvsp--, yyssp--) -#endif - - int yystacksize = YYINITDEPTH; - int yyfree_stacks = 0; - -#ifdef YYPURE - int yychar; - YYSTYPE yylval; - int yynerrs; -#ifdef YYLSP_NEEDED - YYLTYPE yylloc; -#endif -#endif - - YYSTYPE yyval; /* the variable used to return */ - /* semantic values from the action */ - /* routines */ - - int yylen; - -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Starting parse\n"); -#endif - - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - - /* Initialize stack pointers. - Waste one element of value and location stack - so that they stay on the same level as the state stack. - The wasted elements are never initialized. */ - - yyssp = yyss - 1; - yyvsp = yyvs; -#ifdef YYLSP_NEEDED - yylsp = yyls; -#endif - -/* Push a new state, which is found in yystate . */ -/* In all cases, when you get here, the value and location stacks - have just been pushed. so pushing a state here evens the stacks. */ -yynewstate: - - *++yyssp = yystate; - - if (yyssp >= yyss + yystacksize - 1) - { - /* Give user a chance to reallocate the stack */ - /* Use copies of these so that the &'s don't force the real ones into memory. */ - YYSTYPE *yyvs1 = yyvs; - short *yyss1 = yyss; -#ifdef YYLSP_NEEDED - YYLTYPE *yyls1 = yyls; -#endif - - /* Get the current used size of the three stacks, in elements. */ - int size = yyssp - yyss + 1; - -#ifdef yyoverflow - /* Each stack pointer address is followed by the size of - the data in use in that stack, in bytes. */ -#ifdef YYLSP_NEEDED - /* This used to be a conditional around just the two extra args, - but that might be undefined if yyoverflow is a macro. */ - yyoverflow("parser stack overflow", - &yyss1, size * sizeof (*yyssp), - &yyvs1, size * sizeof (*yyvsp), - &yyls1, size * sizeof (*yylsp), - &yystacksize); -#else - yyoverflow("parser stack overflow", - &yyss1, size * sizeof (*yyssp), - &yyvs1, size * sizeof (*yyvsp), - &yystacksize); -#endif - - yyss = yyss1; yyvs = yyvs1; -#ifdef YYLSP_NEEDED - yyls = yyls1; -#endif -#else /* no yyoverflow */ - /* Extend the stack our own way. */ - if (yystacksize >= YYMAXDEPTH) - { - yyerror("parser stack overflow"); - if (yyfree_stacks) - { - free (yyss); - free (yyvs); -#ifdef YYLSP_NEEDED - free (yyls); -#endif - } - return 2; - } - yystacksize *= 2; - if (yystacksize > YYMAXDEPTH) - yystacksize = YYMAXDEPTH; -#ifndef YYSTACK_USE_ALLOCA - yyfree_stacks = 1; -#endif - yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp)); - __yy_memcpy ((char *)yyss, (char *)yyss1, - size * (unsigned int) sizeof (*yyssp)); - yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp)); - __yy_memcpy ((char *)yyvs, (char *)yyvs1, - size * (unsigned int) sizeof (*yyvsp)); -#ifdef YYLSP_NEEDED - yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp)); - __yy_memcpy ((char *)yyls, (char *)yyls1, - size * (unsigned int) sizeof (*yylsp)); -#endif -#endif /* no yyoverflow */ - - yyssp = yyss + size - 1; - yyvsp = yyvs + size - 1; -#ifdef YYLSP_NEEDED - yylsp = yyls + size - 1; -#endif - -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Stack size increased to %d\n", yystacksize); -#endif - - if (yyssp >= yyss + yystacksize - 1) - YYABORT; - } - -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Entering state %d\n", yystate); -#endif - - goto yybackup; - yybackup: - -/* Do appropriate processing given the current state. */ -/* Read a lookahead token if we need one and don't already have one. */ -/* yyresume: */ - - /* First try to decide what to do without reference to lookahead token. */ - - yyn = yypact[yystate]; - if (yyn == YYFLAG) - goto yydefault; - - /* Not known => get a lookahead token if don't already have one. */ - - /* yychar is either YYEMPTY or YYEOF - or a valid token in external form. */ - - if (yychar == YYEMPTY) - { -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Reading a token: "); -#endif - yychar = YYLEX; - } - - /* Convert token to internal form (in yychar1) for indexing tables with */ - - if (yychar <= 0) /* This means end of input. */ - { - yychar1 = 0; - yychar = YYEOF; /* Don't call YYLEX any more */ - -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Now at end of input.\n"); -#endif - } - else - { - yychar1 = YYTRANSLATE(yychar); - -#if YYDEBUG != 0 - if (yydebug) - { - fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]); - /* Give the individual parser a way to print the precise meaning - of a token, for further debugging info. */ -#ifdef YYPRINT - YYPRINT (stderr, yychar, yylval); -#endif - fprintf (stderr, ")\n"); - } -#endif - } - - yyn += yychar1; - if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) - goto yydefault; - - yyn = yytable[yyn]; - - /* yyn is what to do for this token type in this state. - Negative => reduce, -yyn is rule number. - Positive => shift, yyn is new state. - New state is final state => don't bother to shift, - just return success. - 0, or most negative number => error. */ - - if (yyn < 0) - { - if (yyn == YYFLAG) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } - else if (yyn == 0) - goto yyerrlab; - - if (yyn == YYFINAL) - YYACCEPT; - - /* Shift the lookahead token. */ - -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]); -#endif - - /* Discard the token being shifted unless it is eof. */ - if (yychar != YYEOF) - yychar = YYEMPTY; - - *++yyvsp = yylval; -#ifdef YYLSP_NEEDED - *++yylsp = yylloc; -#endif - - /* count tokens shifted since error; after three, turn off error status. */ - if (yyerrstatus) yyerrstatus--; - - yystate = yyn; - goto yynewstate; - -/* Do the default action for the current state. */ -yydefault: - - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - -/* Do a reduction. yyn is the number of a rule to reduce with. */ -yyreduce: - yylen = yyr2[yyn]; - if (yylen > 0) - yyval = yyvsp[1-yylen]; /* implement default value of the action */ - -#if YYDEBUG != 0 - if (yydebug) - { - int i; - - fprintf (stderr, "Reducing via rule %d (line %d), ", - yyn, yyrline[yyn]); - - /* Print the symbols being reduced, and their result. */ - for (i = yyprhs[yyn]; yyrhs[i] > 0; i++) - fprintf (stderr, "%s ", yytname[yyrhs[i]]); - fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]); - } -#endif - - - switch (yyn) { - -case 9: -#line 121 "icalitip.y" -{ - icalparser_yy_value = 0; - icalparser_clear_flex_input(); - yyclearin; - ; - break;} -case 11: -#line 131 "icalitip.y" -{ icalparser_yy_value = icalvalue_new_boolean(1); ; - break;} -case 12: -#line 133 "icalitip.y" -{ icalparser_yy_value = icalvalue_new_boolean(0); ; - break;} -case 13: -#line 136 "icalitip.y" -{ - struct icaltimetype stm; - - stm = fill_datetime(yyvsp[0].v_string,0); - - stm.hour = -1; - stm.minute = -1; - stm.second = -1; - stm.is_utc = 0; - stm.is_date = 1; - - icalparser_yy_value = icalvalue_new_date(stm); - ; - break;} -case 14: -#line 151 "icalitip.y" -{utc = 0;; - break;} -case 15: -#line 152 "icalitip.y" -{utc = 1;; - break;} -case 16: -#line 156 "icalitip.y" -{utc_b = 0;; - break;} -case 17: -#line 157 "icalitip.y" -{utc_b = 1;; - break;} -case 18: -#line 161 "icalitip.y" -{ - struct icaltimetype stm; - stm = fill_datetime(yyvsp[-3].v_string, yyvsp[-1].v_string); - stm.is_utc = utc; - stm.is_date = 0; - - icalparser_yy_value = - icalvalue_new_datetime(stm); - ; - break;} -case 21: -#line 179 "icalitip.y" -{ - duration.weeks = atoi(yyvsp[-1].v_string); - ; - break;} -case 22: -#line 184 "icalitip.y" -{ - ; - break;} -case 23: -#line 187 "icalitip.y" -{ - ; - break;} -case 24: -#line 190 "icalitip.y" -{ - ; - break;} -case 25: -#line 194 "icalitip.y" -{ - duration.hours = atoi(yyvsp[-1].v_string); - ; - break;} -case 26: -#line 198 "icalitip.y" -{ - duration.hours = atoi(yyvsp[-2].v_string); - ; - break;} -case 27: -#line 203 "icalitip.y" -{ - duration.minutes = atoi(yyvsp[-1].v_string); - ; - break;} -case 28: -#line 207 "icalitip.y" -{ - duration.minutes = atoi(yyvsp[-2].v_string); - ; - break;} -case 29: -#line 212 "icalitip.y" -{ - duration.seconds = atoi(yyvsp[-1].v_string); - ; - break;} -case 30: -#line 217 "icalitip.y" -{ - duration.days = atoi(yyvsp[-1].v_string); - ; - break;} -case 31: -#line 222 "icalitip.y" -{ - ; - break;} -case 32: -#line 225 "icalitip.y" -{ - ; - break;} -case 33: -#line 228 "icalitip.y" -{ - ; - break;} -case 34: -#line 232 "icalitip.y" -{ - icalparser_yy_value = icalvalue_new_duration(duration); - memset(&duration,0, sizeof(duration)); - ; - break;} -case 35: -#line 237 "icalitip.y" -{ - icalparser_yy_value = icalvalue_new_duration(duration); - memset(&duration,0, sizeof(duration)); - ; - break;} -case 36: -#line 242 "icalitip.y" -{ - icalparser_yy_value = icalvalue_new_duration(duration); - memset(&duration,0, sizeof(duration)); - ; - break;} -case 37: -#line 251 "icalitip.y" -{ - struct icalperiodtype p; - - p.start = fill_datetime(yyvsp[-8].v_string,yyvsp[-6].v_string); - p.start.is_utc = utc; - p.start.is_date = 0; - - - p.end = fill_datetime(yyvsp[-3].v_string,yyvsp[-1].v_string); - p.end.is_utc = utc_b; - p.end.is_date = 0; - - p.duration.days = -1; - p.duration.weeks = -1; - p.duration.hours = -1; - p.duration.minutes = -1; - p.duration.seconds = -1; - - icalparser_yy_value = icalvalue_new_period(p); - ; - break;} -case 38: -#line 272 "icalitip.y" -{ - struct icalperiodtype p; - - p.start = fill_datetime(yyvsp[-5].v_string,yyvsp[-3].v_string); - p.start.is_utc = utc; - p.start.is_date = 0; - - p.end.year = -1; - p.end.month = -1; - p.end.day = -1; - p.end.hour = -1; - p.end.minute = -1; - p.end.second = -1; - - /* The duration_value rule setes the global 'duration' - variable, but it also creates a new value in - icalparser_yy_value. So, free that, then copy - 'duration' into the icalperiodtype struct. */ - - p.duration = icalvalue_get_duration(icalparser_yy_value); - icalvalue_free(icalparser_yy_value); - icalparser_yy_value = 0; - - icalparser_yy_value = icalvalue_new_period(p); - - ; - break;} -case 39: -#line 304 "icalitip.y" -{clear_recur();recur.freq = ICAL_SECONDLY_RECURRENCE;; - break;} -case 40: -#line 305 "icalitip.y" -{clear_recur();recur.freq = ICAL_MINUTELY_RECURRENCE;; - break;} -case 41: -#line 306 "icalitip.y" -{clear_recur();recur.freq = ICAL_HOURLY_RECURRENCE;; - break;} -case 42: -#line 307 "icalitip.y" -{clear_recur();recur.freq = ICAL_DAILY_RECURRENCE;; - break;} -case 43: -#line 308 "icalitip.y" -{clear_recur();recur.freq = ICAL_WEEKLY_RECURRENCE;; - break;} -case 44: -#line 309 "icalitip.y" -{clear_recur();recur.freq = ICAL_MONTHLY_RECURRENCE;; - break;} -case 45: -#line 310 "icalitip.y" -{clear_recur();recur.freq = ICAL_YEARLY_RECURRENCE;; - break;} -case 46: -#line 315 "icalitip.y" -{ skiplist[skippos]=ICAL_SUNDAY_WEEKDAY; if( skippos<8) skippos++;; - break;} -case 47: -#line 316 "icalitip.y" -{ skiplist[skippos]=ICAL_MONDAY_WEEKDAY;if( skippos<8) skippos++;; - break;} -case 48: -#line 317 "icalitip.y" -{ skiplist[skippos]=ICAL_TUESDAY_WEEKDAY;if( skippos<8) skippos++;; - break;} -case 49: -#line 318 "icalitip.y" -{ skiplist[skippos]=ICAL_WEDNESDAY_WEEKDAY;if( skippos<8) skippos++;; - break;} -case 50: -#line 319 "icalitip.y" -{ skiplist[skippos]=ICAL_THURSDAY_WEEKDAY;if( skippos<8) skippos++;; - break;} -case 51: -#line 320 "icalitip.y" -{ skiplist[skippos]=ICAL_FRIDAY_WEEKDAY;if( skippos<8) skippos++;; - break;} -case 52: -#line 321 "icalitip.y" -{ skiplist[skippos]=ICAL_SATURDAY_WEEKDAY;if( skippos<8) skippos++;; - break;} -case 54: -#line 327 "icalitip.y" -{ ; - break;} -case 56: -#line 332 "icalitip.y" -{ skiplist[skippos] = atoi(yyvsp[0].v_string); skippos++;; - break;} -case 57: -#line 333 "icalitip.y" -{ skiplist[skippos] = atoi(yyvsp[0].v_string); if (skippos<367) skippos++;; - break;} -case 58: -#line 337 "icalitip.y" -{recur.interval = atoi(yyvsp[0].v_string);; - break;} -case 59: -#line 338 "icalitip.y" -{recur.week_start = ICAL_SUNDAY_WEEKDAY;; - break;} -case 60: -#line 339 "icalitip.y" -{recur.week_start = ICAL_MONDAY_WEEKDAY;; - break;} -case 61: -#line 340 "icalitip.y" -{recur.week_start = ICAL_TUESDAY_WEEKDAY;; - break;} -case 62: -#line 341 "icalitip.y" -{recur.week_start = ICAL_WEDNESDAY_WEEKDAY;; - break;} -case 63: -#line 342 "icalitip.y" -{recur.week_start = ICAL_THURSDAY_WEEKDAY;; - break;} -case 64: -#line 343 "icalitip.y" -{recur.week_start = ICAL_FRIDAY_WEEKDAY;; - break;} -case 65: -#line 344 "icalitip.y" -{recur.week_start = ICAL_SATURDAY_WEEKDAY;; - break;} -case 66: -#line 345 "icalitip.y" -{copy_list(recur.by_second,60);; - break;} -case 67: -#line 346 "icalitip.y" -{copy_list(recur.by_minute,60);; - break;} -case 68: -#line 347 "icalitip.y" -{copy_list(recur.by_hour,24);; - break;} -case 69: -#line 348 "icalitip.y" -{copy_list(recur.by_day,7);; - break;} -case 70: -#line 349 "icalitip.y" -{copy_list(recur.by_month,12);; - break;} -case 71: -#line 350 "icalitip.y" -{copy_list(recur.by_month_day,31);; - break;} -case 72: -#line 351 "icalitip.y" -{copy_list(recur.by_year_day,366);; - break;} -case 73: -#line 352 "icalitip.y" -{copy_list(recur.by_week_no,53);; - break;} -case 74: -#line 353 "icalitip.y" -{copy_list(recur.by_set_pos,366);; - break;} -case 75: -#line 355 "icalitip.y" -{ recur.until = icalvalue_get_datetime(icalparser_yy_value); - icalvalue_free(icalparser_yy_value); icalparser_yy_value=0;; - break;} -case 76: -#line 358 "icalitip.y" -{ recur.until = icalvalue_get_date(icalparser_yy_value); - icalvalue_free(icalparser_yy_value); icalparser_yy_value=0;; - break;} -case 77: -#line 361 "icalitip.y" -{ recur.count = atoi(yyvsp[0].v_string); ; - break;} -case 80: -#line 370 "icalitip.y" -{ icalparser_yy_value = icalvalue_new_recur(recur); ; - break;} -case 81: -#line 376 "icalitip.y" -{ utcsign = 1; ; - break;} -case 82: -#line 377 "icalitip.y" -{ utcsign = -1; ; - break;} -case 83: -#line 381 "icalitip.y" -{ - icalparser_yy_value = icalvalue_new_utcoffset( utcsign * (yyvsp[-1].v_int*3600) + (yyvsp[0].v_int*60) ); - ; - break;} -case 84: -#line 386 "icalitip.y" -{ - icalparser_yy_value = icalvalue_new_utcoffset(utcsign * (yyvsp[-2].v_int*3600) + (yyvsp[-1].v_int*60) +(yyvsp[0].v_int)); - ; - break;} -} - /* the action file gets copied in in place of this dollarsign */ -#line 543 "/usr/lib/bison.simple" - - yyvsp -= yylen; - yyssp -= yylen; -#ifdef YYLSP_NEEDED - yylsp -= yylen; -#endif - -#if YYDEBUG != 0 - if (yydebug) - { - short *ssp1 = yyss - 1; - fprintf (stderr, "state stack now"); - while (ssp1 != yyssp) - fprintf (stderr, " %d", *++ssp1); - fprintf (stderr, "\n"); - } -#endif - - *++yyvsp = yyval; - -#ifdef YYLSP_NEEDED - yylsp++; - if (yylen == 0) - { - yylsp->first_line = yylloc.first_line; - yylsp->first_column = yylloc.first_column; - yylsp->last_line = (yylsp-1)->last_line; - yylsp->last_column = (yylsp-1)->last_column; - yylsp->text = 0; - } - else - { - yylsp->last_line = (yylsp+yylen-1)->last_line; - yylsp->last_column = (yylsp+yylen-1)->last_column; - } -#endif - - /* Now "shift" the result of the reduction. - Determine what state that goes to, - based on the state we popped back to - and the rule number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTBASE] + *yyssp; - if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTBASE]; - - goto yynewstate; - -yyerrlab: /* here on detecting error */ - - if (! yyerrstatus) - /* If not already recovering from an error, report this error. */ - { - ++yynerrs; - -#ifdef YYERROR_VERBOSE - yyn = yypact[yystate]; - - if (yyn > YYFLAG && yyn < YYLAST) - { - int size = 0; - char *msg; - int x, count; - - count = 0; - /* Start X at -yyn if nec to avoid negative indexes in yycheck. */ - for (x = (yyn < 0 ? -yyn : 0); - x < (sizeof(yytname) / sizeof(char *)); x++) - if (yycheck[x + yyn] == x) - size += strlen(yytname[x]) + 15, count++; - msg = (char *) malloc(size + 15); - if (msg != 0) - { - strcpy(msg, "parse error"); - - if (count < 5) - { - count = 0; - for (x = (yyn < 0 ? -yyn : 0); - x < (sizeof(yytname) / sizeof(char *)); x++) - if (yycheck[x + yyn] == x) - { - strcat(msg, count == 0 ? ", expecting `" : " or `"); - strcat(msg, yytname[x]); - strcat(msg, "'"); - count++; - } - } - yyerror(msg); - free(msg); - } - else - yyerror ("parse error; also virtual memory exceeded"); - } - else -#endif /* YYERROR_VERBOSE */ - yyerror("parse error"); - } - - goto yyerrlab1; -yyerrlab1: /* here on error raised explicitly by an action */ - - if (yyerrstatus == 3) - { - /* if just tried and failed to reuse lookahead token after an error, discard it. */ - - /* return failure if at end of input */ - if (yychar == YYEOF) - YYABORT; - -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]); -#endif - - yychar = YYEMPTY; - } - - /* Else will try to reuse lookahead token - after shifting the error token. */ - - yyerrstatus = 3; /* Each real token shifted decrements this */ - - goto yyerrhandle; - -yyerrdefault: /* current state does not do anything special for the error token. */ - -#if 0 - /* This is wrong; only states that explicitly want error tokens - should shift them. */ - yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/ - if (yyn) goto yydefault; -#endif - -yyerrpop: /* pop the current state because it cannot handle the error token */ - - if (yyssp == yyss) YYABORT; - yyvsp--; - yystate = *--yyssp; -#ifdef YYLSP_NEEDED - yylsp--; -#endif - -#if YYDEBUG != 0 - if (yydebug) - { - short *ssp1 = yyss - 1; - fprintf (stderr, "Error: state stack now"); - while (ssp1 != yyssp) - fprintf (stderr, " %d", *++ssp1); - fprintf (stderr, "\n"); - } -#endif - -yyerrhandle: - - yyn = yypact[yystate]; - if (yyn == YYFLAG) - goto yyerrdefault; - - yyn += YYTERROR; - if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) - goto yyerrdefault; - - yyn = yytable[yyn]; - if (yyn < 0) - { - if (yyn == YYFLAG) - goto yyerrpop; - yyn = -yyn; - goto yyreduce; - } - else if (yyn == 0) - goto yyerrpop; - - if (yyn == YYFINAL) - YYACCEPT; - -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Shifting error token, "); -#endif - - *++yyvsp = yylval; -#ifdef YYLSP_NEEDED - *++yylsp = yylloc; -#endif - - yystate = yyn; - goto yynewstate; - - yyacceptlab: - /* YYACCEPT comes here. */ - if (yyfree_stacks) - { - free (yyss); - free (yyvs); -#ifdef YYLSP_NEEDED - free (yyls); -#endif - } - return 0; - - yyabortlab: - /* YYABORT comes here. */ - if (yyfree_stacks) - { - free (yyss); - free (yyvs); -#ifdef YYLSP_NEEDED - free (yyls); -#endif - } - return 1; -} -#line 392 "icalitip.y" - - - -void clear_recur() -{ - memset(&skiplist, ICAL_RECURRENCE_ARRAY_MAX_BYTE, sizeof(skiplist)); - skippos = 0; - - icalrecurrencetype_clear(&recur); -} - -void copy_list(short* array, size_t size) -{ - memcpy(array, skiplist, size*sizeof(short)); - memset(&skiplist,ICAL_RECURRENCE_ARRAY_MAX_BYTE, sizeof(skiplist)); - skippos = 0; -} - -struct icaltimetype fill_datetime(char* datestr, char* timestr) -{ - struct icaltimetype stm; - - memset(&stm,0,sizeof(stm)); - - if (datestr != 0){ - sscanf(datestr,"%4d%2d%2d",&(stm.year), &(stm.month), - &(stm.day)); - } - - if (timestr != 0){ - sscanf(timestr,"%2d%2d%2d", &(stm.hour), &(stm.minute), - &(stm.second)); - } - - return stm; - -} - -void yyerror(char* s) -{ - /*fprintf(stderr,"Parse error \'%s\'\n", s);*/ -} - diff --git a/libical/src/libical/icalitip.tab.h b/libical/src/libical/icalitip.tab.h deleted file mode 100644 index 197bd1c292..0000000000 --- a/libical/src/libical/icalitip.tab.h +++ /dev/null @@ -1,137 +0,0 @@ -typedef union { - float v_float; - int v_int; - char* v_string; - -} YYSTYPE; -#define DIGITS 257 -#define INTNUMBER 258 -#define FLOATNUMBER 259 -#define STRING 260 -#define EOL 261 -#define EQUALS 262 -#define CHARACTER 263 -#define COLON 264 -#define COMMA 265 -#define SEMICOLON 266 -#define TIMESEPERATOR 267 -#define TRUE 268 -#define FALSE 269 -#define FREQ 270 -#define BYDAY 271 -#define BYHOUR 272 -#define BYMINUTE 273 -#define BYMONTH 274 -#define BYMONTHDAY 275 -#define BYSECOND 276 -#define BYSETPOS 277 -#define BYWEEKNO 278 -#define BYYEARDAY 279 -#define DAILY 280 -#define MINUTELY 281 -#define MONTHLY 282 -#define SECONDLY 283 -#define WEEKLY 284 -#define HOURLY 285 -#define YEARLY 286 -#define INTERVAL 287 -#define COUNT 288 -#define UNTIL 289 -#define WKST 290 -#define MO 291 -#define SA 292 -#define SU 293 -#define TU 294 -#define WE 295 -#define TH 296 -#define FR 297 -#define BIT8 298 -#define ACCEPTED 299 -#define ADD 300 -#define AUDIO 301 -#define BASE64 302 -#define BINARY 303 -#define BOOLEAN 304 -#define BUSY 305 -#define BUSYTENTATIVE 306 -#define BUSYUNAVAILABLE 307 -#define CALADDRESS 308 -#define CANCEL 309 -#define CANCELLED 310 -#define CHAIR 311 -#define CHILD 312 -#define COMPLETED 313 -#define CONFIDENTIAL 314 -#define CONFIRMED 315 -#define COUNTER 316 -#define DATE 317 -#define DATETIME 318 -#define DECLINECOUNTER 319 -#define DECLINED 320 -#define DELEGATED 321 -#define DISPLAY 322 -#define DRAFT 323 -#define DURATION 324 -#define EMAIL 325 -#define END 326 -#define FINAL 327 -#define FLOAT 328 -#define FREE 329 -#define GREGORIAN 330 -#define GROUP 331 -#define INDIVIDUAL 332 -#define INPROCESS 333 -#define INTEGER 334 -#define NEEDSACTION 335 -#define NONPARTICIPANT 336 -#define OPAQUE 337 -#define OPTPARTICIPANT 338 -#define PARENT 339 -#define PERIOD 340 -#define PRIVATE 341 -#define PROCEDURE 342 -#define PUBLIC 343 -#define PUBLISH 344 -#define RECUR 345 -#define REFRESH 346 -#define REPLY 347 -#define REQPARTICIPANT 348 -#define REQUEST 349 -#define RESOURCE 350 -#define ROOM 351 -#define SIBLING 352 -#define START 353 -#define TENTATIVE 354 -#define TEXT 355 -#define THISANDFUTURE 356 -#define THISANDPRIOR 357 -#define TIME 358 -#define TRANSPAENT 359 -#define UNKNOWN 360 -#define UTCOFFSET 361 -#define XNAME 362 -#define ALTREP 363 -#define CN 364 -#define CUTYPE 365 -#define DAYLIGHT 366 -#define DIR 367 -#define ENCODING 368 -#define EVENT 369 -#define FBTYPE 370 -#define FMTTYPE 371 -#define LANGUAGE 372 -#define MEMBER 373 -#define PARTSTAT 374 -#define RANGE 375 -#define RELATED 376 -#define RELTYPE 377 -#define ROLE 378 -#define RSVP 379 -#define SENTBY 380 -#define STANDARD 381 -#define URI 382 -#define TIME_CHAR 383 -#define UTC_CHAR 384 - - -extern YYSTYPE icalparser_yylval; diff --git a/libical/src/libical/icalitipl.l b/libical/src/libical/icalitipl.l deleted file mode 100644 index 9abe9538c9..0000000000 --- a/libical/src/libical/icalitipl.l +++ /dev/null @@ -1,283 +0,0 @@ -%{ -/* -*- Mode: C -*- - ====================================================================== - FILE: icalitip.y - CREATOR: eric 10 June 1999 - - DESCRIPTION: - - $Id: icalitipl.l,v 1.3 2000/05/15 06:18:17 ericb Exp $ - $Locker: $ - - (C) COPYRIGHT 1999 Eric Busboom - http://www.softwarestudio.org - - The contents of this file are subject to the Mozilla Public License - Version 1.0 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and - limitations under the License. - - The original author is Eric Busboom - The original code is icalitip.y - - - - ======================================================================*/ -#include "icalitipy.h" -#include "icalparser.h" -#include "icalenums.h" -#include "icalmemory.h" -#include "assert.h" - -#include /* For strdup() */ - -#define ICAL_MAX_STR_CONST 1024 - -#undef YY_INPUT -#define YY_INPUT(b,r,ms) ( r= icalparser_flex_input(b,ms)) -#undef yywrap - -#undef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) icalparser_yyerror(msg) - -icalvalue_kind value_kind=ICAL_NO_VALUE; -void set_parser_value_state(); -extern enum icalparser_state_enum icalparser_state; -extern int yydebug; - -void icalparser_yyerror(char *s); - -void init_str_buf(); - -int last_state; - -char *str_buf; -char *str_buf_p; -size_t buf_sz; /* = ICAL_MAX_STR_CONST;*/ - - -%} - -crlf \x0D\x0A -nl \n -lbreak \x0D\x0A\x20 -ulbreak \x0A\x20 -space [ ] -qsafechar [^\x00-\x1F\"] -safechar [^\x00-\x1F\"\:\;\,] -tsafechar [\x20-\x21\x23-\x2B\x2D-\x39\x3C-\x5B\x5D-\x7E] -valuechar [^\x00-\x08\x10-\x1F] -xname X-[a-zA-Z0-9\-]+ -xname2 [a-zA-Z0-9\-\ ] -paramtext {safechar}+ -value {valuechar}+ -quotedstring \"{qsafechar}+\" -digit [0-9] - -%array /* Make yytext an array. Slow, but handy. HACK */ - -%option caseless - - -%s quoted_string -%s binary_value boolean_value uri_value time_value duration_value number_value period_value recur_value text_value utcoffset_value -%s enum_param_value string_param_value stringlist_param_value keyword line_start component seperator parameter end_of_value paramtext - - - -%% - -%{ -%} - - -{ -.* { icalparser_yylval.v_string= icalmemory_tmp_copy(yytext); - return STRING;} -{crlf}|\n { return EOL;} - -} - -{ -. { return CHARACTER; } -{crlf}|\n { return EOL;} - -} - -{ -.* { icalparser_yylval.v_string= icalmemory_tmp_copy(yytext); - return STRING;} -{crlf}|\n { return EOL;} - -} - - -{ -{digit}* { icalparser_yylval.v_string= icalmemory_tmp_copy(yytext); - return DIGITS; } -T { return TIME_CHAR; } -Z { return UTC_CHAR; } -{crlf}|\n { return EOL;} -} - -{ -{digit}+ { icalparser_yylval.v_string =icalmemory_tmp_copy(yytext); - return DIGITS; } -T { return TIME_CHAR; } -[\+\-PTWHMSD] { return yytext[0]; } -{crlf}|\n { return EOL;} - -} - -{ -[\+\-\.0-9]+ { icalparser_yylval.v_int=atoi(yytext); return INTNUMBER; } -{crlf}|\n { return EOL;} -} - -{ -{digit}+ { icalparser_yylval.v_string =icalmemory_tmp_copy(yytext) ; - return DIGITS; } -T { return TIME_CHAR; } -Z { return UTC_CHAR; } -[\/\+\-PWHMSD] { return yytext[0]; } -{crlf}|\n { return EOL;} - -} - -{ -INTERVAL { return INTERVAL; } -COUNT { return COUNT; } -UNTIL { return UNTIL; } -FREQ { return FREQ; } -BYDAY { return BYDAY; } -BYHOUR { return BYHOUR; } -BYMINUTE { return BYMINUTE; } -BYMONTH { return BYMONTH; } -BYMONTHDAY { return BYMONTHDAY; } -BYSECOND { return BYSECOND; } -BYSETPOS { return BYSETPOS; } -BYWEEKNO { return BYWEEKNO; } -BYYEARDAY { return BYYEARDAY; } -DAILY { return DAILY; } -SECONDLY { return SECONDLY; } -MINUTELY { return MINUTELY; } -HOURLY { return HOURLY; } -MONTHLY { return MONTHLY; } -WEEKLY { return WEEKLY; } -YEARLY { return YEARLY; } -WKST { return WKST; } -MO { return MO; } -SA { return SA; } -SU { return SU; } -TU { return TU; } -WE { return WE; } -TH { return TH; } -FR { return FR; } -= { return EQUALS; } -, { return COMMA; } -; { return SEMICOLON; } -[\-\+0-9]+ { icalparser_yylval.v_string= icalmemory_tmp_copy(yytext); - return DIGITS; } -T { return TIME_CHAR; } -Z { return UTC_CHAR; } -{crlf}|\n { return EOL;} -} - -{ -{crlf}|\n { return EOL;} -\-|\+ { return yytext[0]; } -{digit}{digit} { icalparser_yylval.v_int=atoi(yytext); return INTNUMBER; } - -} - -{ -. { return CHARACTER; } -{crlf}|\n { return EOL;} - -} - -{ -, { BEGIN(last_state); return COMMA; } -} - - -%% - -int yywrap() -{ - return 1; -} - - -void set_parser_value_state(icalvalue_kind kind) -{ - - switch (kind){ - - case ICAL_ATTACH_VALUE: - case ICAL_BINARY_VALUE: - {BEGIN(binary_value);break;} - - case ICAL_BOOLEAN_VALUE: - case ICAL_INTEGER_VALUE: - case ICAL_FLOAT_VALUE: - {BEGIN(number_value);break;} - - case ICAL_UTCOFFSET_VALUE: - {BEGIN(utcoffset_value);break;} - - case ICAL_TEXT_VALUE: - {BEGIN(text_value); - init_str_buf(); - break;} - - case ICAL_CALADDRESS_VALUE: - case ICAL_URI_VALUE: - {BEGIN(uri_value);break;} - - case ICAL_DATE_VALUE: - case ICAL_DATETIME_VALUE: - case ICAL_DATETIMEDATE_VALUE: - case ICAL_DATETIMEPERIOD_VALUE: - case ICAL_TIME_VALUE: - {BEGIN(time_value);break;} - - case ICAL_DURATION_VALUE: - {BEGIN(duration_value);break;} - - case ICAL_PERIOD_VALUE: - {BEGIN(period_value);break;} - - case ICAL_GEO_VALUE: - case ICAL_QUERY_VALUE: - {BEGIN(text_value);break;} - - case ICAL_RECUR_VALUE: - {BEGIN(recur_value);break;} - - case ICAL_NO_VALUE: - { - /* The value is probably actually a component name */ - {BEGIN(component); break;} - } - default: - { - assert(1==0); - } - } -} - -void init_str_buf() -{ - str_buf = icalmemory_tmp_buffer(ICAL_MAX_STR_CONST); - str_buf_p = str_buf; - buf_sz = ICAL_MAX_STR_CONST; - - -} - diff --git a/libical/src/libical/icalitipy.y b/libical/src/libical/icalitipy.y deleted file mode 100644 index 07573d62cd..0000000000 --- a/libical/src/libical/icalitipy.y +++ /dev/null @@ -1,434 +0,0 @@ -%{ -/* -*- Mode: C -*- - ====================================================================== - FILE: icalitip.y - CREATOR: eric 10 June 1999 - - DESCRIPTION: - - $Id: icalitipy.y,v 1.3 2000/05/15 06:18:17 ericb Exp $ - $Locker: $ - - (C) COPYRIGHT 1999 Eric Busboom - http://www.softwarestudio.org - - The contents of this file are subject to the Mozilla Public License - Version 1.0 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and - limitations under the License. - - The original author is Eric Busboom - The original code is icalitip.y - - - - ================================b======================================*/ - -#include -#include /* for strdup() */ -#include /* for SHRT_MAX*/ -#include "icalparser.h" -#include "ical.h" -#include "pvl.h" - -#define YYERROR_VERBOSE -#define YYDEBUG 1 - -icalvalue *icalparser_yy_value; /* Current Value */ - -/* Globals for UTCOFFSET values */ -int utc; -int utc_b; -int utcsign; - -/* Globals for DURATION values */ -struct icaldurationtype duration; - -/* Globals for RECUR values */ -struct icalrecurrencetype recur; -short skiplist[367]; -short skippos; - -void copy_list(short* array, size_t size); -void clear_recur(); -void add_prop(icalproperty_kind); -void icalparser_fill_date(struct tm* t, char* dstr); -void icalparser_fill_time(struct tm* t, char* tstr); -void set_value_type(icalvalue_kind kind); -void yyerror(char *s); /* Don't know why I need this.... */ -int yylex(void); /* Or this. */ -void set_parser_value_state(); -struct icaltimetype fill_datetime(char* d, char* t); - - - -/* Set the state of the lexer so it will interpret values ( iCAL - VALUEs, that is, ) correctly. */ - -%} - -%union { - float v_float; - int v_int; - char* v_string; - -} - -%token DIGITS -%token INTNUMBER -%token FLOATNUMBER -%token STRING -%token EOL EQUALS CHARACTER COLON COMMA SEMICOLON TIMESEPERATOR - -%token TRUE FALSE - -%token FREQ BYDAY BYHOUR BYMINUTE BYMONTH BYMONTHDAY BYSECOND BYSETPOS BYWEEKNO -%token BYYEARDAY DAILY MINUTELY MONTHLY SECONDLY WEEKLY HOURLY YEARLY -%token INTERVAL COUNT UNTIL WKST MO SA SU TU WE TH FR - -%token BIT8 ACCEPTED ADD AUDIO BASE64 BINARY BOOLEAN BUSY BUSYTENTATIVE -%token BUSYUNAVAILABLE CALADDRESS CANCEL CANCELLED CHAIR CHILD COMPLETED -%token CONFIDENTIAL CONFIRMED COUNTER DATE DATETIME DECLINECOUNTER DECLINED -%token DELEGATED DISPLAY DRAFT DURATION EMAIL END FINAL FLOAT FREE GREGORIAN -%token GROUP INDIVIDUAL INPROCESS INTEGER NEEDSACTION NONPARTICIPANT -%token OPAQUE OPTPARTICIPANT PARENT PERIOD PRIVATE PROCEDURE PUBLIC PUBLISH -%token RECUR REFRESH REPLY REQPARTICIPANT REQUEST RESOURCE ROOM SIBLING -%token START TENTATIVE TEXT THISANDFUTURE THISANDPRIOR TIME TRANSPAENT -%token UNKNOWN UTCOFFSET XNAME - -%token ALTREP CN CUTYPE DAYLIGHT DIR ENCODING EVENT FBTYPE FMTTYPE LANGUAGE -%token MEMBER PARTSTAT RANGE RELATED RELTYPE ROLE RSVP SENTBY STANDARD URI - -%token TIME_CHAR UTC_CHAR - - -%% - -value: - binary_value - | boolean_value - | date_value - | datetime_value - | duration_value - | period_value - | recur_value - | utcoffset_value - | error { - icalparser_yy_value = 0; - icalparser_clear_flex_input(); - yyclearin; - } - -binary_value: "unimplemented2" - -boolean_value: - TRUE - { icalparser_yy_value = icalvalue_new_boolean(1); } - | FALSE - { icalparser_yy_value = icalvalue_new_boolean(0); } - -date_value: DIGITS - { - struct icaltimetype stm; - - stm = fill_datetime($1,0); - - stm.hour = -1; - stm.minute = -1; - stm.second = -1; - stm.is_utc = 0; - stm.is_date = 1; - - icalparser_yy_value = icalvalue_new_date(stm); - } - -utc_char: - /*empty*/ {utc = 0;} - | UTC_CHAR {utc = 1;} - -/* This is used in the period_value, where there may be two utc characters per rule. */ -utc_char_b: - /*empty*/ {utc_b = 0;} - | UTC_CHAR {utc_b = 1;} - -datetime_value: - DIGITS TIME_CHAR DIGITS utc_char - { - struct icaltimetype stm; - stm = fill_datetime($1, $3); - stm.is_utc = utc; - stm.is_date = 0; - - icalparser_yy_value = - icalvalue_new_datetime(stm); - } - - -/* Duration */ - - -dur_date: dur_day - | dur_day dur_time - -dur_week: DIGITS 'W' - { - duration.weeks = atoi($1); - } - -dur_time: TIME_CHAR dur_hour - { - } - | TIME_CHAR dur_minute - { - } - | TIME_CHAR dur_second - { - } - -dur_hour: DIGITS 'H' - { - duration.hours = atoi($1); - } - | DIGITS 'H' dur_minute - { - duration.hours = atoi($1); - } - -dur_minute: DIGITS 'M' - { - duration.minutes = atoi($1); - } - | DIGITS 'M' dur_second - { - duration.minutes = atoi($1); - } - -dur_second: DIGITS 'S' - { - duration.seconds = atoi($1); - } - -dur_day: DIGITS 'D' - { - duration.days = atoi($1); - } - -dur_prefix: /* empty */ - { - } - | '+' - { - } - | '-' - { - } - -duration_value: dur_prefix 'P' dur_date - { - icalparser_yy_value = icalvalue_new_duration(duration); - memset(&duration,0, sizeof(duration)); - } - | dur_prefix 'P' dur_time - { - icalparser_yy_value = icalvalue_new_duration(duration); - memset(&duration,0, sizeof(duration)); - } - | dur_prefix 'P' dur_week - { - icalparser_yy_value = icalvalue_new_duration(duration); - memset(&duration,0, sizeof(duration)); - } - - -/* Period */ - -period_value: DIGITS TIME_CHAR DIGITS utc_char '/' DIGITS TIME_CHAR DIGITS utc_char_b - { - struct icalperiodtype p; - - p.start = fill_datetime($1,$3); - p.start.is_utc = utc; - p.start.is_date = 0; - - - p.end = fill_datetime($6,$8); - p.end.is_utc = utc_b; - p.end.is_date = 0; - - p.duration.days = -1; - p.duration.weeks = -1; - p.duration.hours = -1; - p.duration.minutes = -1; - p.duration.seconds = -1; - - icalparser_yy_value = icalvalue_new_period(p); - } - | DIGITS TIME_CHAR DIGITS utc_char '/' duration_value - { - struct icalperiodtype p; - - p.start = fill_datetime($1,$3); - p.start.is_utc = utc; - p.start.is_date = 0; - - p.end.year = -1; - p.end.month = -1; - p.end.day = -1; - p.end.hour = -1; - p.end.minute = -1; - p.end.second = -1; - - /* The duration_value rule setes the global 'duration' - variable, but it also creates a new value in - icalparser_yy_value. So, free that, then copy - 'duration' into the icalperiodtype struct. */ - - p.duration = icalvalue_get_duration(icalparser_yy_value); - icalvalue_free(icalparser_yy_value); - icalparser_yy_value = 0; - - icalparser_yy_value = icalvalue_new_period(p); - - } - - - -/* Recur */ - -recur_start: - FREQ EQUALS SECONDLY {clear_recur();recur.freq = ICAL_SECONDLY_RECURRENCE;} - | FREQ EQUALS MINUTELY {clear_recur();recur.freq = ICAL_MINUTELY_RECURRENCE;} - | FREQ EQUALS HOURLY {clear_recur();recur.freq = ICAL_HOURLY_RECURRENCE;} - | FREQ EQUALS DAILY {clear_recur();recur.freq = ICAL_DAILY_RECURRENCE;} - | FREQ EQUALS WEEKLY {clear_recur();recur.freq = ICAL_WEEKLY_RECURRENCE;} - | FREQ EQUALS MONTHLY {clear_recur();recur.freq = ICAL_MONTHLY_RECURRENCE;} - | FREQ EQUALS YEARLY {clear_recur();recur.freq = ICAL_YEARLY_RECURRENCE;} - ; - - -weekday: - SU { skiplist[skippos]=ICAL_SUNDAY_WEEKDAY; if( skippos<8) skippos++;} - | MO { skiplist[skippos]=ICAL_MONDAY_WEEKDAY;if( skippos<8) skippos++;} - | TU { skiplist[skippos]=ICAL_TUESDAY_WEEKDAY;if( skippos<8) skippos++;} - | WE { skiplist[skippos]=ICAL_WEDNESDAY_WEEKDAY;if( skippos<8) skippos++;} - | TH { skiplist[skippos]=ICAL_THURSDAY_WEEKDAY;if( skippos<8) skippos++;} - | FR { skiplist[skippos]=ICAL_FRIDAY_WEEKDAY;if( skippos<8) skippos++;} - | SA { skiplist[skippos]=ICAL_SATURDAY_WEEKDAY;if( skippos<8) skippos++;} - ; - - -weekday_list: - weekday - | DIGITS weekday { } /* HACK Incorectly handles int in BYDAY */ - | weekday_list COMMA weekday - - -recur_list: - DIGITS { skiplist[skippos] = atoi($1); skippos++;} - | recur_list COMMA DIGITS { skiplist[skippos] = atoi($3); if (skippos<367) skippos++;} - ; - -recur_skip: - INTERVAL EQUALS DIGITS {recur.interval = atoi($3);} - | WKST EQUALS SU {recur.week_start = ICAL_SUNDAY_WEEKDAY;} - | WKST EQUALS MO {recur.week_start = ICAL_MONDAY_WEEKDAY;} - | WKST EQUALS TU {recur.week_start = ICAL_TUESDAY_WEEKDAY;} - | WKST EQUALS WE {recur.week_start = ICAL_WEDNESDAY_WEEKDAY;} - | WKST EQUALS TH {recur.week_start = ICAL_THURSDAY_WEEKDAY;} - | WKST EQUALS FR {recur.week_start = ICAL_FRIDAY_WEEKDAY;} - | WKST EQUALS SA {recur.week_start = ICAL_SATURDAY_WEEKDAY;} - | BYSECOND EQUALS recur_list{copy_list(recur.by_second,60);} - | BYMINUTE EQUALS recur_list{copy_list(recur.by_minute,60);} - | BYHOUR EQUALS recur_list{copy_list(recur.by_hour,24);} - | BYDAY EQUALS weekday_list{copy_list(recur.by_day,7);} - | BYMONTH EQUALS recur_list{copy_list(recur.by_month,12);} - | BYMONTHDAY EQUALS recur_list{copy_list(recur.by_month_day,31);} - | BYYEARDAY EQUALS recur_list{copy_list(recur.by_year_day,366);} - | BYWEEKNO EQUALS recur_list{copy_list(recur.by_week_no,53);} - | BYSETPOS EQUALS recur_list{copy_list(recur.by_set_pos,366);} - | UNTIL EQUALS datetime_value - { recur.until = icalvalue_get_datetime(icalparser_yy_value); - icalvalue_free(icalparser_yy_value); icalparser_yy_value=0;} - | UNTIL EQUALS date_value - { recur.until = icalvalue_get_date(icalparser_yy_value); - icalvalue_free(icalparser_yy_value); icalparser_yy_value=0;} - | COUNT EQUALS DIGITS - { recur.count = atoi($3); } - ; - -recur_skip_list: - /* empty */ - | recur_skip_list SEMICOLON recur_skip - -recur_value: - recur_start recur_skip_list - { icalparser_yy_value = icalvalue_new_recur(recur); } - - - -/* UTC Offset */ - -plusminus: '+' { utcsign = 1; } - | '-' { utcsign = -1; } - -utcoffset_value: - plusminus INTNUMBER INTNUMBER - { - icalparser_yy_value = icalvalue_new_utcoffset( utcsign * ($2*3600) + ($3*60) ); - } - - | plusminus INTNUMBER INTNUMBER INTNUMBER - { - icalparser_yy_value = icalvalue_new_utcoffset(utcsign * ($2*3600) + ($3*60) +($4)); - } - - - -%% - - -void clear_recur() -{ - memset(&skiplist, ICAL_RECURRENCE_ARRAY_MAX_BYTE, sizeof(skiplist)); - skippos = 0; - - icalrecurrencetype_clear(&recur); -} - -void copy_list(short* array, size_t size) -{ - memcpy(array, skiplist, size*sizeof(short)); - memset(&skiplist,ICAL_RECURRENCE_ARRAY_MAX_BYTE, sizeof(skiplist)); - skippos = 0; -} - -struct icaltimetype fill_datetime(char* datestr, char* timestr) -{ - struct icaltimetype stm; - - memset(&stm,0,sizeof(stm)); - - if (datestr != 0){ - sscanf(datestr,"%4d%2d%2d",&(stm.year), &(stm.month), - &(stm.day)); - } - - if (timestr != 0){ - sscanf(timestr,"%2d%2d%2d", &(stm.hour), &(stm.minute), - &(stm.second)); - } - - return stm; - -} - -void yyerror(char* s) -{ - /*fprintf(stderr,"Parse error \'%s\'\n", s);*/ -} - diff --git a/libical/src/libical/icallexer.l b/libical/src/libical/icallexer.l deleted file mode 100644 index 7f3358e079..0000000000 --- a/libical/src/libical/icallexer.l +++ /dev/null @@ -1,282 +0,0 @@ -%{ -/* -*- Mode: C -*- - ====================================================================== - FILE: icallexer.l - CREATOR: eric 10 June 1999 - - DESCRIPTION: - - $Id: icallexer.l,v 1.3 2000/05/15 06:18:17 ericb Exp $ - $Locker: $ - - (C) COPYRIGHT 1999 Eric Busboom - http://www.softwarestudio.org - - The contents of this file are subject to the Mozilla Public License - Version 1.0 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and - limitations under the License. - - The original author is Eric Busboom - The original code is icalitip.y - - - - ======================================================================*/ -#include "icalyacc.h" -#include "icalparser.h" -#include "icalenums.h" -#include "icalmemory.h" -#include "assert.h" - -#include /* For strdup() */ - -int icalparser_flex_input(char* buf, int max_size); -void icalparser_clear_flex_input(); - - -#define ICAL_MAX_STR_CONST 1024 - -#undef YY_INPUT -#define YY_INPUT(b,r,ms) ( r= icalparser_flex_input(b,ms)) -#undef yywrap - -#undef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yyerror(msg) - -icalvalue_kind value_kind=ICAL_NO_VALUE; -void set_parser_value_state(); -extern int yydebug; - -void yyerror(char *s); - -void init_str_buf(); - -int last_state; - -char *str_buf; -char *str_buf_p; -size_t buf_sz; /* = ICAL_MAX_STR_CONST;*/ - - -%} - -crlf \x0D?\x0A -space [ ] -qsafechar [^\x00-\x1F\"] -safechar [^\x00-\x1F\"\:\;\,] -tsafechar [\x20-\x21\x23-\x2B\x2D-\x39\x3C-\x5B\x5D-\x7E] -valuechar [^\x00-\x08\x10-\x1F] -xname X-[a-zA-Z0-9\-]+ -xname2 [a-zA-Z0-9\-\ ] -paramtext {safechar}+ -value {valuechar}+ -quotedstring \"{qsafechar}+\" -digit [0-9] - -%array /* Make yytext an array. Slow, but handy. HACK */ - -%option caseless - -%s quoted_string -%s binary_value boolean_value uri_value time_value duration_value number_value period_value recur_value text_value utcoffset_value -%s enum_param_value string_param_value stringlist_param_value keyword line_start component seperator parameter end_of_value paramtext - - - -%% - -%{ -%} - - -{ -.* { yylval.v_string= icalmemory_tmp_copy(yytext); - return STRING;} -{crlf} { return EOL;} - -} - -{ -. { return CHARACTER; } -{crlf} { return EOL;} - -} - -{ -.* { yylval.v_string= icalmemory_tmp_copy(yytext); - return STRING;} -{crlf} { return EOL;} - -} - - -{ -{digit}* { yylval.v_string= icalmemory_tmp_copy(yytext); - return DIGITS; } -T { return TIME_CHAR; } -Z { return UTC_CHAR; } -{crlf} { return EOL;} -} - -{ -{digit}+ { yylval.v_string =icalmemory_tmp_copy(yytext); - return DIGITS; } -T { return TIME_CHAR; } -[\+\-PTWHMSD] { return yytext[0]; } -{crlf} { return EOL;} - -} - -{ -[\+\-\.0-9]+ { yylval.v_int=atoi(yytext); return INTNUMBER; } -{crlf} { return EOL;} -} - -{ -{digit}+ { yylval.v_string =icalmemory_tmp_copy(yytext) ; - return DIGITS; } -T { return TIME_CHAR; } -Z { return UTC_CHAR; } -[\/\+\-PWHMSD] { return yytext[0]; } -{crlf} { return EOL;} - -} - -{ -INTERVAL { return INTERVAL; } -COUNT { return COUNT; } -UNTIL { return UNTIL; } -FREQ { return FREQ; } -BYDAY { return BYDAY; } -BYHOUR { return BYHOUR; } -BYMINUTE { return BYMINUTE; } -BYMONTH { return BYMONTH; } -BYMONTHDAY { return BYMONTHDAY; } -BYSECOND { return BYSECOND; } -BYSETPOS { return BYSETPOS; } -BYWEEKNO { return BYWEEKNO; } -BYYEARDAY { return BYYEARDAY; } -DAILY { return DAILY; } -SECONDLY { return SECONDLY; } -MINUTELY { return MINUTELY; } -HOURLY { return HOURLY; } -MONTHLY { return MONTHLY; } -WEEKLY { return WEEKLY; } -YEARLY { return YEARLY; } -WKST { return WKST; } -MO { return MO; } -SA { return SA; } -SU { return SU; } -TU { return TU; } -WE { return WE; } -TH { return TH; } -FR { return FR; } -= { return EQUALS; } -, { return COMMA; } -; { return SEMICOLON; } -[\-\+0-9]+ { yylval.v_string= icalmemory_tmp_copy(yytext); - return DIGITS; } -T { return TIME_CHAR; } -Z { return UTC_CHAR; } -{crlf} { return EOL;} -} - -{ -{crlf} { return EOL;} -\-|\+ { return yytext[0]; } -{digit}{digit} { yylval.v_int=atoi(yytext); return INTNUMBER; } - -} - -{ -. { return CHARACTER; } -{crlf} { return EOL;} - -} - -{ -, { BEGIN(last_state); return COMMA; } -} - - -%% - -int yywrap() -{ - return 1; -} - - -void set_parser_value_state(icalvalue_kind kind) -{ - - switch (kind){ - - case ICAL_ATTACH_VALUE: - case ICAL_BINARY_VALUE: - {BEGIN(binary_value);break;} - - case ICAL_BOOLEAN_VALUE: - case ICAL_INTEGER_VALUE: - case ICAL_FLOAT_VALUE: - {BEGIN(number_value);break;} - - case ICAL_UTCOFFSET_VALUE: - {BEGIN(utcoffset_value);break;} - - case ICAL_TEXT_VALUE: - {BEGIN(text_value); - init_str_buf(); - break;} - - case ICAL_CALADDRESS_VALUE: - case ICAL_URI_VALUE: - {BEGIN(uri_value);break;} - - case ICAL_DATE_VALUE: - case ICAL_DATETIME_VALUE: - case ICAL_DATETIMEDATE_VALUE: - case ICAL_DATETIMEPERIOD_VALUE: - case ICAL_TIME_VALUE: - {BEGIN(time_value);break;} - - case ICAL_DURATION_VALUE: - {BEGIN(duration_value);break;} - - case ICAL_PERIOD_VALUE: - {BEGIN(period_value);break;} - - case ICAL_GEO_VALUE: - case ICAL_QUERY_VALUE: - {BEGIN(text_value);break;} - - case ICAL_RECUR_VALUE: - {BEGIN(recur_value);break;} - - case ICAL_NO_VALUE: - { - /* The value is probably actually a component name */ - {BEGIN(component); break;} - } - default: - { - assert(1==0); - } - } -} - -void init_str_buf() -{ - str_buf = icalmemory_tmp_buffer(ICAL_MAX_STR_CONST); - str_buf_p = str_buf; - buf_sz = ICAL_MAX_STR_CONST; - - -} - diff --git a/libical/src/libical/icalmemory.c b/libical/src/libical/icalmemory.c deleted file mode 100644 index e89451fbce..0000000000 --- a/libical/src/libical/icalmemory.c +++ /dev/null @@ -1,244 +0,0 @@ -/* -*- Mode: C -*- - ====================================================================== - FILE: icalmemory.c - CREATOR: eric 30 June 1999 - - $Id$ - $Locker$ - - The contents of this file are subject to the Mozilla Public License - Version 1.0 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and - limitations under the License. - - The Original Code is icalmemory.h - The Initial Developer of the Original Code is Eric Busboom - - (C) COPYRIGHT 1999 The Software Studio. - http://www.softwarestudio.org - - ======================================================================*/ - -/* libical often passes strings back to the caller. To make these - * interfaces simple, I did not want the caller to have to pass in a - * memory buffer, but having libical pass out newly allocated memory - * makes it difficult to de-allocate the memory. - * - * The ring buffer in this scheme makes it possible for libical to pass - * out references to memory which the caller does not own, and be able - * to de-allocate the memory later. The ring allows libical to have - * several buffers active simultaneously, which is handy when creating - * string representations of components. */ - -#define ICALMEMORY_C - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - - -#include "icalmemory.h" -#include "icalerror.h" - -#include /* for printf (debugging) */ -#include /* for malloc, realloc */ -#include /* for memset() */ - -#define BUFFER_RING_SIZE 25 -#define MIN_BUFFER_SIZE 200 - -void* buffer_ring[BUFFER_RING_SIZE+1]; -int buffer_pos = 0; -int initialized = 0; - -/* Create a new temporary buffer on the ring. Libical owns these and wil deallocate them. */ -void* -icalmemory_tmp_buffer (size_t size) -{ - void *rtrn; - /* I don't think I need this -- I think static arrays are - initialized to 0 as a standard part of C, but I am not sure. */ - - if (initialized == 0){ - int i; - for(i=0; i BUFFER_RING_SIZE){ - buffer_pos = 0; - } - - return rtrn; -} - -void icalmemory_free_ring() -{ - - int i; - for(i=0; i (size_t) *buf_size ) { - - - *buf_size = (*buf_size) * 2 + final_length; - - new_buf = realloc(*buf,*buf_size); - - new_pos = (void*)((size_t)new_buf + data_length); - - *pos = new_pos; - *buf = new_buf; - } - - strcpy(*pos, string); - - *pos += string_length; -} - - -void -icalmemory_append_char(char** buf, char** pos, size_t* buf_size, - char ch) -{ - char *new_buf; - char *new_pos; - - size_t data_length, final_length; - -#ifndef ICAL_NO_INTERNAL_DEBUG - icalerror_check_arg_rv( (buf!=0),"buf"); - icalerror_check_arg_rv( (*buf!=0),"*buf"); - icalerror_check_arg_rv( (pos!=0),"pos"); - icalerror_check_arg_rv( (*pos!=0),"*pos"); - icalerror_check_arg_rv( (buf_size!=0),"buf_size"); - icalerror_check_arg_rv( (*buf_size!=0),"*buf_size"); -#endif - - data_length = (size_t)*pos - (size_t)*buf; - - final_length = data_length + 2; - - if ( final_length > (size_t) *buf_size ) { - - - *buf_size = (*buf_size) * 2 + final_length +1; - - new_buf = realloc(*buf,*buf_size); - - new_pos = (void*)((size_t)new_buf + data_length); - - *pos = new_pos; - *buf = new_buf; - } - - **pos = ch; - *pos += 1; - -} diff --git a/libical/src/libical/icalmemory.h b/libical/src/libical/icalmemory.h deleted file mode 100644 index 26d22b7316..0000000000 --- a/libical/src/libical/icalmemory.h +++ /dev/null @@ -1,76 +0,0 @@ -/* -*- Mode: C -*- */ -/*====================================================================== - FILE: icalmemory.h - CREATOR: eric 30 June 1999 - - - $Id$ - $Locker$ - - The contents of this file are subject to the Mozilla Public License - Version 1.0 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and - limitations under the License. - - The Original Code is icalmemory.h - The Initial Developer of the Original Code is Eric Busboom - - (C) COPYRIGHT 1999 The Software Studio. - http://www.softwarestudio.org - -======================================================================*/ - -#ifndef ICALMEMORY_H -#define ICALMEMORY_H - -#include /* for size_t */ - -/* Tmp buffers are managed by ical. References can be returned to the caller, although the caller will not own the memory. */ - -void* icalmemory_tmp_buffer(size_t size); -char* icalmemory_tmp_copy(char* str); - -/* Add an externally allocated buffer to the ring. */ -void icalmemory_add_tmp_buffer(void*); - - -/* Free all memory used in the ring */ -void icalmemory_free_ring(); - -/* Non-tmp buffers must be freed. These are mostly wrappers around - * malloc, etc, but are used so the caller can change the memory - * allocators in a future version of the library */ - -void* icalmemory_new_buffer(size_t size); -void* icalmemory_resize_buffer(void* buf, size_t size); -void icalmemory_free_buffer(void* buf); - -/* icalmemory_append_string will copy the string 'string' to the - buffer 'buf' starting at position 'pos', reallocing 'buf' if it is - too small. 'buf_size' is the size of 'buf' and will be changed if - 'buf' is reallocated. 'pos' will point to the last byte of the new - string in 'buf', usually a '\0' */ - -/* THESE ROUTINES CAN NOT BE USED ON TMP BUFFERS. Only use them on - normally allocated memory, or on buffers created from - icalmemory_new_buffer, never with buffers created by - icalmemory_tmp_buffer. If icalmemory_append_string has to resize a - buffer on the ring, the ring will loose track of it an you will - have memory problems. */ - -void icalmemory_append_string(char** buf, char** pos, size_t* buf_size, - char* string); - -/* icalmemory_append_char is similar, but is appends a character instead of a string */ -void icalmemory_append_char(char** buf, char** pos, size_t* buf_size, - char ch); - -#endif /* !ICALMEMORY_H */ - - - diff --git a/libical/src/libical/icalparameter.c b/libical/src/libical/icalparameter.c deleted file mode 100644 index cf37eb07b2..0000000000 --- a/libical/src/libical/icalparameter.c +++ /dev/null @@ -1,1913 +0,0 @@ -/* -*- Mode: C -*- - ====================================================================== - FILE: icalderivedparameters.{c,h} - CREATOR: eric 09 May 1999 - - $Id$ - $Locker$ - - - (C) COPYRIGHT 1999 Eric Busboom - http://www.softwarestudio.org - - The contents of this file are subject to the Mozilla Public License - Version 1.0 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and - limitations under the License. - - The original author is Eric Busboom - The original code is icalderivedparameters.{c,h} - - Contributions from: - Graham Davison (g.m.davison@computer.org) - - ======================================================================*/ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "ical.h" -#include "icalerror.h" -#include /* for malloc() */ -#include -#include /* for memset() */ -#include "icalmemory.h" - -struct icalparameter_impl -{ - icalparameter_kind kind; - char id[5]; - int size; - char* string; - char* x_name; - icalproperty* parent; - - union data { - int v_int; - int v_rsvp; - icalparameter_cutype v_cutype; - icalparameter_encoding v_encoding; - icalparameter_fbtype v_fbtype; - icalparameter_partstat v_partstat; - icalparameter_range v_range; - icalparameter_related v_related; - icalparameter_reltype v_reltype; - icalparameter_role v_role; - icalparameter_value v_value; - icalparameter_xlicerrortype v_xlicerrortype; - icalparameter_xliccomparetype v_xliccomparetype; - } data; -}; - -struct icalparameter_impl* icalparameter_new_impl(icalparameter_kind kind) -{ - struct icalparameter_impl* v; - - if ( ( v = (struct icalparameter_impl*) - malloc(sizeof(struct icalparameter_impl))) == 0) { - icalerror_set_errno(ICAL_NEWFAILED_ERROR); - return 0; - } - - strcpy(v->id,"para"); - - v->kind = kind; - v->size = 0; - v->string = 0; - v->x_name = 0; - v->parent = 0; - memset(&(v->data),0,sizeof(v->data)); - - return v; -} - -icalparameter* -icalparameter_new (icalparameter_kind kind) -{ - struct icalparameter_impl* v = icalparameter_new_impl(kind); - - return (icalparameter*) v; - -} - -icalparameter* -icalparameter_new_clone(icalparameter* param) -{ - struct icalparameter_impl *old; - struct icalparameter_impl *new; - - old = (struct icalparameter_impl *)param; - new = icalparameter_new_impl(old->kind); - - icalerror_check_arg_rz((param!=0),"param"); - - if (new == 0){ - return 0; - } - - memcpy(new,old,sizeof(struct icalparameter_impl)); - - if (old->string != 0){ - new->string = strdup(old->string); - if (new->string == 0){ - icalparameter_free(new); - return 0; - } - } - - if (old->x_name != 0){ - new->x_name = strdup(old->x_name); - if (new->x_name == 0){ - icalparameter_free(new); - return 0; - } - } - - return new; -} - - -icalparameter* icalparameter_new_from_string(icalparameter_kind kind, char* val) -{ - - icalparameter* param=0; - - icalerror_check_arg_rz((val!=0),"val"); - - switch (kind) { - case ICAL_ALTREP_PARAMETER: - { - param = icalparameter_new_altrep(val); - - break; - } - case ICAL_CN_PARAMETER: - { - param = icalparameter_new_cn(val); - - break; - } - case ICAL_CUTYPE_PARAMETER: - { - if(strcmp(val,"INDIVIDUAL") == 0){ - param = icalparameter_new_cutype(ICAL_CUTYPE_INDIVIDUAL); - } - else if(strcmp(val,"GROUP") == 0){ - param = icalparameter_new_cutype(ICAL_CUTYPE_GROUP); - } - else if(strcmp(val,"RESOURCE") == 0){ - param = icalparameter_new_cutype(ICAL_CUTYPE_RESOURCE); - } - else if(strcmp(val,"ROOM") == 0){ - param = icalparameter_new_cutype(ICAL_CUTYPE_ROOM); - } - else if(strcmp(val,"UNKNOWN") == 0){ - param = icalparameter_new_cutype(ICAL_CUTYPE_UNKNOWN); - } - else { - param = icalparameter_new_cutype(ICAL_CUTYPE_XNAME); - icalparameter_set_xvalue(param,val); - } - break; - } - - case ICAL_DELEGATEDFROM_PARAMETER: - { - param = icalparameter_new_delegatedfrom(val); - - break; - } - case ICAL_DELEGATEDTO_PARAMETER: - { - param = icalparameter_new_delegatedto(val); - - break; - } - case ICAL_DIR_PARAMETER: - { - param = icalparameter_new_dir(val); - - break; - } - case ICAL_ENCODING_PARAMETER: - { - if(strcmp(val,"BIT8") == 0){ - param = icalparameter_new_encoding(ICAL_ENCODING_8BIT); - } - else if(strcmp(val,"BASE64") == 0){ - param = icalparameter_new_encoding(ICAL_ENCODING_BASE64); - } - else { - param = icalparameter_new_encoding(ICAL_ENCODING_XNAME); - icalparameter_set_xvalue(param,val); - } - break; - } - case ICAL_FBTYPE_PARAMETER: - { - if(strcmp(val,"FREE") == 0){ - param = icalparameter_new_fbtype(ICAL_FBTYPE_FREE); - } - else if(strcmp(val,"BUSY") == 0){ - param = icalparameter_new_fbtype(ICAL_FBTYPE_BUSY); - } - else if(strcmp(val,"BUSYUNAVAILABLE") == 0){ - param = icalparameter_new_fbtype(ICAL_FBTYPE_BUSYUNAVAILABLE); - } - else if(strcmp(val,"BUSYTENTATIVE") == 0){ - param = icalparameter_new_fbtype(ICAL_FBTYPE_BUSYTENTATIVE); - } - else { - param = icalparameter_new_fbtype(ICAL_FBTYPE_XNAME); - icalparameter_set_xvalue(param,val); - } - break; - } - case ICAL_FMTTYPE_PARAMETER: - { - param = icalparameter_new_fmttype(val); - break; - } - case ICAL_LANGUAGE_PARAMETER: - { - param = icalparameter_new_language(val); - - break; - } - case ICAL_MEMBER_PARAMETER: - { - param = icalparameter_new_member(val); - - break; - } - case ICAL_PARTSTAT_PARAMETER: - { - if(strcmp(val,"NEEDSACTION") == 0){ - param = icalparameter_new_partstat(ICAL_PARTSTAT_NEEDSACTION); - } - else if(strcmp(val,"ACCEPTED") == 0){ - param = icalparameter_new_partstat(ICAL_PARTSTAT_ACCEPTED); - } - else if(strcmp(val,"DECLINED") == 0){ - param = icalparameter_new_partstat(ICAL_PARTSTAT_DECLINED); - } - else if(strcmp(val,"TENTATIVE") == 0){ - param = icalparameter_new_partstat(ICAL_PARTSTAT_TENTATIVE); - } - else if(strcmp(val,"DELEGATED") == 0){ - param = icalparameter_new_partstat(ICAL_PARTSTAT_DELEGATED); - } - else if(strcmp(val,"COMPLETED") == 0){ - param = icalparameter_new_partstat(ICAL_PARTSTAT_COMPLETED); - } - else if(strcmp(val,"INPROCESS") == 0){ - param = icalparameter_new_partstat(ICAL_PARTSTAT_INPROCESS); - } - else { - param = icalparameter_new_partstat(ICAL_PARTSTAT_XNAME); - icalparameter_set_xvalue(param,val); - } - break; - } - case ICAL_RANGE_PARAMETER: - { - if(strcmp(val,"THISANDFUTURE") == 0){ - param = icalparameter_new_range(ICAL_RANGE_THISANDFUTURE); - } - else if(strcmp(val,"THISANDPRIOR") == 0){ - param = icalparameter_new_range(ICAL_RANGE_THISANDPRIOR); - } - - break; - } - case ICAL_RELATED_PARAMETER: - { - if(strcmp(val,"START") == 0){ - param = icalparameter_new_related(ICAL_RELATED_START); - } - else if(strcmp(val,"END") == 0){ - param = icalparameter_new_related(ICAL_RELATED_END); - } - - break; - } - case ICAL_RELTYPE_PARAMETER: - { - if(strcmp(val,"PARENT") == 0){ - param = icalparameter_new_reltype(ICAL_RELTYPE_PARENT); - } - else if(strcmp(val,"CHILD") == 0){ - param = icalparameter_new_reltype(ICAL_RELTYPE_CHILD); - } - else if(strcmp(val,"SIBLING") == 0){ - param = icalparameter_new_reltype(ICAL_RELTYPE_SIBLING); - } - else { - param = icalparameter_new_reltype(ICAL_RELTYPE_XNAME); - icalparameter_set_xvalue(param,val); - } - break; - } - case ICAL_ROLE_PARAMETER: - { - if(strcmp(val,"CHAIR") == 0){ - param = icalparameter_new_role(ICAL_ROLE_CHAIR); - } - else if(strcmp(val,"REQ-PARTICIPANT") == 0){ - param = icalparameter_new_role(ICAL_ROLE_REQPARTICIPANT); - } - else if(strcmp(val,"OPT-PARTICIPANT") == 0){ - param = icalparameter_new_role(ICAL_ROLE_OPTPARTICIPANT); - } - else if(strcmp(val,"NON-PARTICIPANT") == 0){ - param = icalparameter_new_role(ICAL_ROLE_NONPARTICIPANT); - } - else { - param = icalparameter_new_role(ICAL_ROLE_XNAME); - icalparameter_set_xvalue(param,val); - } - break; - } - case ICAL_RSVP_PARAMETER: - { - if(strcmp(val,"TRUE") == 0){ - param = icalparameter_new_rsvp(1); - } - else if(strcmp(val,"FALSE") == 0){ - param = icalparameter_new_rsvp(0); - } - - break; - } - case ICAL_SENTBY_PARAMETER: - { - param = icalparameter_new_sentby(val); - - break; - } - case ICAL_TZID_PARAMETER: - { - param = icalparameter_new_tzid(val); - - break; - } - case ICAL_VALUE_PARAMETER: - { - if(strcmp(val,"BINARY") == 0){ - param = icalparameter_new_value(ICAL_VALUE_BINARY); - } - else if(strcmp(val,"BOOLEAN") == 0){ - param = icalparameter_new_value(ICAL_VALUE_BOOLEAN); - } - else if(strcmp(val,"CAL-ADDRESS") == 0){ - param = icalparameter_new_value(ICAL_VALUE_CALADDRESS); - } - else if(strcmp(val,"DATE") == 0){ - param = icalparameter_new_value(ICAL_VALUE_DATE); - } - else if(strcmp(val,"DATE-TIME") == 0){ - param = icalparameter_new_value(ICAL_VALUE_DATETIME); - } - else if(strcmp(val,"DURATION") == 0){ - param = icalparameter_new_value(ICAL_VALUE_DURATION); - } - else if(strcmp(val,"FLOAT") == 0){ - param = icalparameter_new_value(ICAL_VALUE_FLOAT); - } - else if(strcmp(val,"INTEGER") == 0){ - param = icalparameter_new_value(ICAL_VALUE_INTEGER); - } - else if(strcmp(val,"PERIOD") == 0){ - param = icalparameter_new_value(ICAL_VALUE_PERIOD); - } - else if(strcmp(val,"RECUR") == 0){ - param = icalparameter_new_value(ICAL_VALUE_RECUR); - } - else if(strcmp(val,"TEXT") == 0){ - param = icalparameter_new_value(ICAL_VALUE_TEXT); - } - else if(strcmp(val,"TIME") == 0){ - param = icalparameter_new_value(ICAL_VALUE_TIME); - } - else if(strcmp(val,"URI") == 0){ - param = icalparameter_new_value(ICAL_VALUE_URI); - } - else if(strcmp(val,"UTC-OFFSET") == 0){ - param = icalparameter_new_value(ICAL_VALUE_UTCOFFSET); - } - else { - param = 0; - } - break; - } - case ICAL_XLICERRORTYPE_PARAMETER: - { - - if(strcmp(val,"COMPONENT_PARSE_ERROR") == 0){ - param = icalparameter_new_xlicerrortype(ICAL_XLICERRORTYPE_COMPONENTPARSEERROR); - } - else if(strcmp(val,"PROPERTY_PARSE_ERROR") == 0){ - param = icalparameter_new_xlicerrortype(ICAL_XLICERRORTYPE_PROPERTYPARSEERROR); - } - else if(strcmp(val,"PARAMETER_NAME_PARSE_ERROR") == 0){ - param = icalparameter_new_xlicerrortype(ICAL_XLICERRORTYPE_PARAMETERNAMEPARSEERROR); - } - else if(strcmp(val,"PARAMETER_VALUE_PARSE_ERROR") == 0){ - param = icalparameter_new_xlicerrortype(ICAL_XLICERRORTYPE_PARAMETERVALUEPARSEERROR); - } - else if(strcmp(val,"VALUE_PARSE_ERROR") == 0){ - param = icalparameter_new_xlicerrortype(ICAL_XLICERRORTYPE_VALUEPARSEERROR); - } - else if(strcmp(val,"INVALID_ITIP") == 0){ - param = icalparameter_new_xlicerrortype(ICAL_XLICERRORTYPE_INVALIDITIP); - } - break; - } - - case ICAL_XLICCOMPARETYPE_PARAMETER: - { - - if(strcmp(val,"EQUAL") == 0){ - param = icalparameter_new_xliccomparetype(ICAL_XLICCOMPARETYPE_EQUAL); - } - else if(strcmp(val,"NOTEQUAL") == 0){ - param = icalparameter_new_xliccomparetype(ICAL_XLICCOMPARETYPE_NOTEQUAL); - } - else if(strcmp(val,"LESS") == 0){ - param = icalparameter_new_xliccomparetype(ICAL_XLICCOMPARETYPE_LESS); - } - else if(strcmp(val,"GREATER") == 0){ - param = icalparameter_new_xliccomparetype(ICAL_XLICCOMPARETYPE_GREATER); - } - else if(strcmp(val,"LESSEQUAL") == 0){ - param = icalparameter_new_xliccomparetype(ICAL_XLICCOMPARETYPE_LESSEQUAL); - } - else if(strcmp(val,"GREATEREQUAL") == 0){ - param = icalparameter_new_xliccomparetype(ICAL_XLICCOMPARETYPE_GREATEREQUAL); - } - else if(strcmp(val,"REGEX") == 0){ - param = icalparameter_new_xliccomparetype(ICAL_XLICCOMPARETYPE_REGEX); - } else { - param = 0; - } - break; - } - - - case ICAL_X_PARAMETER: - { - param = icalparameter_new(ICAL_FBTYPE_PARAMETER); - icalparameter_set_xvalue(param,val); - break; - } - - case ICAL_NO_PARAMETER: - default: - { - return 0; - } - - - } - - return param; -} - -void -icalparameter_free (icalparameter* parameter) -{ - struct icalparameter_impl * impl; - - impl = (struct icalparameter_impl*)parameter; - -/* HACK. This always triggers, even when parameter is non-zero - icalerror_check_arg_rv((parameter==0),"parameter");*/ - - -#ifdef ICAL_FREE_ON_LIST_IS_ERROR - icalerror_assert( (impl->parent ==0),"Tried to free a parameter that is still attached to a component. "); - -#else - if(impl->parent !=0){ - return; - } -#endif - - - if (impl->string != 0){ - free (impl->string); - } - - if (impl->x_name != 0){ - free (impl->x_name); - } - - memset(impl,0,sizeof(impl)); - - impl->parent = 0; - impl->id[0] = 'X'; - free(impl); -} - - -char no_parameter[]="Error: No Parameter"; -char* -icalparameter_as_ical_string (icalparameter* parameter) -{ - struct icalparameter_impl* impl; - size_t buf_size = 1024; - char* buf; - char* buf_ptr; - char *out_buf; - char *kind_string; - - char tend[1024]; /* HACK . Should be using memory buffer ring */ - - icalerror_check_arg_rz( (parameter!=0), "parameter"); - - /* Create new buffer that we can append names, parameters and a - value to, and reallocate as needed. Later, this buffer will be - copied to a icalmemory_tmp_buffer, which is managed internally - by libical, so it can be given to the caller without fear of - the caller forgetting to free it */ - - buf = icalmemory_new_buffer(buf_size); - buf_ptr = buf; - impl = (struct icalparameter_impl*)parameter; - - kind_string = icalenum_parameter_kind_to_string(impl->kind); - - if (impl->kind == ICAL_NO_PARAMETER || - impl->kind == ICAL_ANY_PARAMETER || - kind_string == 0) - { - icalerror_set_errno(ICAL_BADARG_ERROR); - return 0; - } - - /* Put the parameter name into the string */ - icalmemory_append_string(&buf, &buf_ptr, &buf_size, kind_string); - icalmemory_append_string(&buf, &buf_ptr, &buf_size, "="); - - switch (impl->kind) { - case ICAL_CUTYPE_PARAMETER: - { - switch (impl->data.v_cutype) { - case ICAL_CUTYPE_INDIVIDUAL: { - strcpy(tend,"INDIVIDUAL");break; - } - case ICAL_CUTYPE_GROUP:{ - strcpy(tend,"GROUP");break; - } - case ICAL_CUTYPE_RESOURCE: { - strcpy(tend,"RESOURCE");break; - } - case ICAL_CUTYPE_ROOM:{ - strcpy(tend,"ROOM");break; - } - case ICAL_CUTYPE_UNKNOWN:{ - strcpy(tend,"UNKNOWN");break; - } - case ICAL_CUTYPE_XNAME:{ - if (impl->string == 0){ return no_parameter;} - strcpy(tend,impl->string);break; - } - default:{ - icalerror_set_errno(ICAL_BADARG_ERROR);break; - } - } - break; - - } - case ICAL_ENCODING_PARAMETER: - { - switch (impl->data.v_encoding) { - case ICAL_ENCODING_8BIT: { - strcpy(tend,"8BIT");break; - } - case ICAL_ENCODING_BASE64:{ - strcpy(tend,"BASE64");break; - } - default:{ - icalerror_set_errno(ICAL_BADARG_ERROR);break; - } - } - break; - } - - case ICAL_FBTYPE_PARAMETER: - { - switch (impl->data.v_fbtype) { - case ICAL_FBTYPE_FREE:{ - strcpy(tend,"FREE");break; - } - case ICAL_FBTYPE_BUSY: { - strcpy(tend,"BUSY");break; - } - case ICAL_FBTYPE_BUSYUNAVAILABLE:{ - strcpy(tend,"BUSYUNAVAILABLE");break; - } - case ICAL_FBTYPE_BUSYTENTATIVE:{ - strcpy(tend,"BUSYTENTATIVE");break; - } - case ICAL_FBTYPE_XNAME:{ - if (impl->string == 0){ return no_parameter;} - strcpy(tend,impl->string);break; - } - default:{ - icalerror_set_errno(ICAL_BADARG_ERROR);break; - } - } - break; - - } - case ICAL_PARTSTAT_PARAMETER: - { - switch (impl->data.v_partstat) { - case ICAL_PARTSTAT_NEEDSACTION: { - strcpy(tend,"NEEDSACTION");break; - } - case ICAL_PARTSTAT_ACCEPTED: { - strcpy(tend,"ACCEPTED");break; - } - case ICAL_PARTSTAT_DECLINED:{ - strcpy(tend,"DECLINED");break; - } - case ICAL_PARTSTAT_TENTATIVE:{ - strcpy(tend,"TENTATIVE");break; - } - case ICAL_PARTSTAT_DELEGATED:{ - strcpy(tend,"DELEGATED");break; - } - case ICAL_PARTSTAT_COMPLETED:{ - strcpy(tend,"COMPLETED");break; - } - case ICAL_PARTSTAT_INPROCESS:{ - strcpy(tend,"INPROCESS");break; - } - case ICAL_PARTSTAT_XNAME:{ - if (impl->string == 0){ return no_parameter;} - strcpy(tend,impl->string);break; - } - default:{ - icalerror_set_errno(ICAL_BADARG_ERROR);break; - } - } - break; - - } - case ICAL_RANGE_PARAMETER: - { - switch (impl->data.v_range) { - case ICAL_RANGE_THISANDPRIOR: { - strcpy(tend,"THISANDPRIOR");break; - } - case ICAL_RANGE_THISANDFUTURE: { - strcpy(tend,"THISANDFUTURE");break; - } - default:{ - icalerror_set_errno(ICAL_BADARG_ERROR);break; - } - } - break; - } - case ICAL_RELATED_PARAMETER: - { - switch (impl->data.v_related) { - case ICAL_RELATED_START: { - strcpy(tend,"START");break; - } - case ICAL_RELATED_END: { - strcpy(tend,"END");break; - } - default:{ - icalerror_set_errno(ICAL_BADARG_ERROR);break; - } - } - break; - } - case ICAL_RELTYPE_PARAMETER: - { - switch (impl->data.v_reltype) { - case ICAL_RELTYPE_PARENT: { - strcpy(tend,"PARENT");break; - } - case ICAL_RELTYPE_CHILD:{ - strcpy(tend,"CHILD");break; - } - case ICAL_RELTYPE_SIBLING:{ - strcpy(tend,"SIBLING");break; - } - case ICAL_RELTYPE_XNAME:{ - if (impl->string == 0){ return no_parameter;} - strcpy(tend,impl->string);break; - } - default:{ - icalerror_set_errno(ICAL_BADARG_ERROR);break; - } - } - break; - } - case ICAL_ROLE_PARAMETER: - { - switch (impl->data.v_role) { - case ICAL_ROLE_CHAIR: { - strcpy(tend,"CHAIR");break; - } - case ICAL_ROLE_REQPARTICIPANT: { - strcpy(tend,"REQ-PARTICIPANT");break; - } - case ICAL_ROLE_OPTPARTICIPANT: { - strcpy(tend,"OPT-PARTICIPANT");break; - } - case ICAL_ROLE_NONPARTICIPANT: { - strcpy(tend,"NON-PARTICIPANT");break; - } - case ICAL_ROLE_XNAME:{ - if (impl->string == 0){ return no_parameter;} - strcpy(tend,impl->string);break; - } - default:{ - icalerror_set_errno(ICAL_BADARG_ERROR);break; - } - } - break; - } - case ICAL_RSVP_PARAMETER: - { - switch (impl->data.v_rsvp) { - case 1: { - strcpy(tend,"TRUE");break; - } - case 0: { - strcpy(tend,"FALSE");break; - } - default:{ - icalerror_set_errno(ICAL_BADARG_ERROR);break; - } - } - break; - } - case ICAL_VALUE_PARAMETER: - { - switch (impl->data.v_value) { - case ICAL_VALUE_BINARY: { - strcpy(tend,"BINARY");break; - } - case ICAL_VALUE_BOOLEAN: { - strcpy(tend,"BOOLEAN");break; - } - case ICAL_VALUE_CALADDRESS: { - strcpy(tend,"CAL-ADDRESS");break; - } - case ICAL_VALUE_DATE: { - strcpy(tend,"DATE");break; - } - case ICAL_VALUE_DATETIME: { - strcpy(tend,"DATE-TIME");break; - } - case ICAL_VALUE_DURATION: { - strcpy(tend,"DURATION");break; - } - case ICAL_VALUE_FLOAT: { - strcpy(tend,"FLOAT");break; - } - case ICAL_VALUE_INTEGER: { - strcpy(tend,"INTEGER");break; - } - case ICAL_VALUE_PERIOD: { - strcpy(tend,"PERIOD");break; - } - case ICAL_VALUE_RECUR: { - strcpy(tend,"RECUR");break; - } - case ICAL_VALUE_TEXT: { - strcpy(tend,"TEXT");break; - } - case ICAL_VALUE_TIME: { - strcpy(tend,"TIME");break; - } - case ICAL_VALUE_URI: { - strcpy(tend,"URI");break; - } - case ICAL_VALUE_UTCOFFSET: { - strcpy(tend,"UTC-OFFSET");break; - } - case ICAL_VALUE_XNAME: { - if (impl->string == 0){ return no_parameter;} - strcpy(tend,impl->string);break; - } - default:{ - strcpy(tend,"ERROR"); - icalerror_set_errno(ICAL_BADARG_ERROR);break; - } - } - break; - } - - - case ICAL_XLICERRORTYPE_PARAMETER: - { - switch (impl->data.v_xlicerrortype) { - case ICAL_XLICERRORTYPE_COMPONENTPARSEERROR: - { - strcpy(tend,"COMPONENT_PARSE_ERROR");break; - } - case ICAL_XLICERRORTYPE_PROPERTYPARSEERROR: - { - strcpy(tend,"PROPERTY_PARSE_ERROR");break; - } - case ICAL_XLICERRORTYPE_PARAMETERNAMEPARSEERROR: - { - strcpy(tend,"PARAMETER_NAME_PARSE_ERROR");break; - } - case ICAL_XLICERRORTYPE_PARAMETERVALUEPARSEERROR: - { - strcpy(tend,"PARAMETER_VALUE_PARSE_ERROR");break; - } - case ICAL_XLICERRORTYPE_VALUEPARSEERROR: - { - strcpy(tend,"VALUE_PARSE_ERROR");break; - } - case ICAL_XLICERRORTYPE_INVALIDITIP: - { - strcpy(tend,"INVALID_ITIP");break; - } - } - break; - } - - case ICAL_XLICCOMPARETYPE_PARAMETER: - { - switch (impl->data.v_xliccomparetype) { - case ICAL_XLICCOMPARETYPE_EQUAL: - { - strcpy(tend,"EQUAL");break; - } - case ICAL_XLICCOMPARETYPE_NOTEQUAL: - { - strcpy(tend,"NOTEQUAL");break; - } - case ICAL_XLICCOMPARETYPE_LESS: - { - strcpy(tend,"LESS");break; - } - case ICAL_XLICCOMPARETYPE_GREATER: - { - strcpy(tend,"GREATER");break; - } - case ICAL_XLICCOMPARETYPE_LESSEQUAL: - { - strcpy(tend,"LESSEQUAL");break; - } - case ICAL_XLICCOMPARETYPE_GREATEREQUAL: - { - strcpy(tend,"GREATEREQUAL");break; - } - case ICAL_XLICCOMPARETYPE_REGEX: - { - strcpy(tend,"REGEX");break; - } - break; - } - - default:{ - icalerror_set_errno(ICAL_BADARG_ERROR);break; - } - break; - } - - - case ICAL_SENTBY_PARAMETER: - case ICAL_TZID_PARAMETER: - case ICAL_X_PARAMETER: - case ICAL_FMTTYPE_PARAMETER: - case ICAL_LANGUAGE_PARAMETER: - case ICAL_MEMBER_PARAMETER: - case ICAL_DELEGATEDFROM_PARAMETER: - case ICAL_DELEGATEDTO_PARAMETER: - case ICAL_DIR_PARAMETER: - case ICAL_ALTREP_PARAMETER: - case ICAL_CN_PARAMETER: - { - if (impl->string == 0){ return no_parameter;} - strcpy(tend,impl->string);break; - break; - } - - case ICAL_NO_PARAMETER: - case ICAL_ANY_PARAMETER: - { - /* These are actually handled before the case/switch - clause */ - } - - } - - icalmemory_append_string(&buf, &buf_ptr, &buf_size, tend); - - /* Now, copy the buffer to a tmp_buffer, which is safe to give to - the caller without worring about de-allocating it. */ - - - out_buf = icalmemory_tmp_buffer(strlen(buf)); - strcpy(out_buf, buf); - - icalmemory_free_buffer(buf); - - return out_buf; - -} - - -int -icalparameter_is_valid (icalparameter* parameter); - - -icalparameter_kind -icalparameter_isa (icalparameter* parameter) -{ - if(parameter == 0){ - return ICAL_NO_PARAMETER; - } - - return ((struct icalparameter_impl *)parameter)->kind; -} - - -int -icalparameter_isa_parameter (void* parameter) -{ - struct icalparameter_impl *impl = (struct icalparameter_impl *)parameter; - - if (parameter == 0){ - return 0; - } - - if (strcmp(impl->id,"para") == 0) { - return 1; - } else { - return 0; - } -} - - -void -icalparameter_set_xname (icalparameter* param, char* v) -{ - struct icalparameter_impl *impl = (struct icalparameter_impl*)param; - icalerror_check_arg_rv( (param!=0),"param"); - icalerror_check_arg_rv( (v!=0),"v"); - - if (impl->x_name != 0){ - free(impl->x_name); - } - - impl->x_name = strdup(v); - - if (impl->x_name == 0){ - errno = ENOMEM; - } - -} - -char* -icalparameter_get_xname (icalparameter* param) -{ - struct icalparameter_impl *impl = (struct icalparameter_impl*)param; - icalerror_check_arg_rz( (param!=0),"param"); - - return impl->x_name; -} - -void -icalparameter_set_xvalue (icalparameter* param, char* v) -{ - struct icalparameter_impl *impl = (struct icalparameter_impl*)param; - - icalerror_check_arg_rv( (param!=0),"param"); - icalerror_check_arg_rv( (v!=0),"v"); - - if (impl->string != 0){ - free(impl->string); - } - - impl->string = strdup(v); - - if (impl->string == 0){ - errno = ENOMEM; - } - -} - -char* -icalparameter_get_xvalue (icalparameter* param) -{ - struct icalparameter_impl *impl = (struct icalparameter_impl*)param; - - icalerror_check_arg_rz( (param!=0),"param"); - - return impl->string; - -} - -void icalparameter_set_parent(icalparameter* param, - icalproperty* property) -{ - struct icalparameter_impl *impl = (struct icalparameter_impl*)param; - - icalerror_check_arg_rv( (param!=0),"param"); - - impl->parent = property; -} - -icalproperty* icalparameter_get_parent(icalparameter* param) -{ - struct icalparameter_impl *impl = (struct icalparameter_impl*)param; - - icalerror_check_arg_rv( (param!=0),"param"); - - return impl->parent; -} - - -/* Everything below this line is machine generated. Do not edit. */ -/* ALTREP */ -icalparameter* icalparameter_new_altrep(char* v) -{ - struct icalparameter_impl *impl; - icalerror_clear_errno(); - icalerror_check_arg_rz( (v!=0),"v"); - impl = icalparameter_new_impl(ICAL_ALTREP_PARAMETER); - if (impl == 0) { - return 0; - } - - icalparameter_set_altrep((icalparameter*) impl,v); - if (icalerrno != ICAL_NO_ERROR) { - icalparameter_free((icalparameter*) impl); - return 0; - } - - return (icalparameter*) impl; -} - -char* icalparameter_get_altrep(icalparameter* param) -{ - icalerror_clear_errno(); - icalerror_check_arg_rz( (param!=0), "param"); - return ((struct icalparameter_impl*)param)->string; -} - -void icalparameter_set_altrep(icalparameter* param, char* v) -{ - icalerror_check_arg_rv( (v!=0),"v"); - icalerror_check_arg_rv( (param!=0), "param"); - icalerror_clear_errno(); - - ((struct icalparameter_impl*)param)->string = strdup(v); -} - -/* CN */ -icalparameter* icalparameter_new_cn(char* v) -{ - struct icalparameter_impl *impl; - icalerror_clear_errno(); - icalerror_check_arg_rz( (v!=0),"v"); - impl = icalparameter_new_impl(ICAL_CN_PARAMETER); - if (impl == 0) { - return 0; - } - - icalparameter_set_cn((icalparameter*) impl,v); - if (icalerrno != ICAL_NO_ERROR) { - icalparameter_free((icalparameter*) impl); - return 0; - } - - return (icalparameter*) impl; -} - -char* icalparameter_get_cn(icalparameter* param) -{ - icalerror_clear_errno(); - icalerror_check_arg_rz( (param!=0), "param"); - return ((struct icalparameter_impl*)param)->string; -} - -void icalparameter_set_cn(icalparameter* param, char* v) -{ - icalerror_check_arg_rv( (v!=0),"v"); - icalerror_check_arg_rv( (param!=0), "param"); - icalerror_clear_errno(); - - ((struct icalparameter_impl*)param)->string = strdup(v); -} - -/* CUTYPE */ -icalparameter* icalparameter_new_cutype(icalparameter_cutype v) -{ - struct icalparameter_impl *impl; - icalerror_clear_errno(); - - impl = icalparameter_new_impl(ICAL_CUTYPE_PARAMETER); - if (impl == 0) { - return 0; - } - - icalparameter_set_cutype((icalparameter*) impl,v); - if (icalerrno != ICAL_NO_ERROR) { - icalparameter_free((icalparameter*) impl); - return 0; - } - - return (icalparameter*) impl; -} - -icalparameter_cutype icalparameter_get_cutype(icalparameter* param) -{ - icalerror_clear_errno(); - icalerror_check_arg( (param!=0), "param"); - if ( ((struct icalparameter_impl*)param)->string != 0){ - return ICAL_CUTYPE_XNAME; - } - - return ((struct icalparameter_impl*)param)->data.v_cutype; - -} - -void icalparameter_set_cutype(icalparameter* param, icalparameter_cutype v) -{ - - icalerror_check_arg_rv( (param!=0), "param"); - icalerror_clear_errno(); - - ((struct icalparameter_impl*)param)->data.v_cutype = v; -} - -/* DELEGATED-FROM */ -icalparameter* icalparameter_new_delegatedfrom(char* v) -{ - struct icalparameter_impl *impl; - icalerror_clear_errno(); - icalerror_check_arg_rz( (v!=0),"v"); - impl = icalparameter_new_impl(ICAL_DELEGATEDFROM_PARAMETER); - if (impl == 0) { - return 0; - } - - icalparameter_set_delegatedfrom((icalparameter*) impl,v); - if (icalerrno != ICAL_NO_ERROR) { - icalparameter_free((icalparameter*) impl); - return 0; - } - - return (icalparameter*) impl; -} - -char* icalparameter_get_delegatedfrom(icalparameter* param) -{ - icalerror_clear_errno(); - icalerror_check_arg_rz( (param!=0), "param"); - return ((struct icalparameter_impl*)param)->string; -} - -void icalparameter_set_delegatedfrom(icalparameter* param, char* v) -{ - icalerror_check_arg_rv( (v!=0),"v"); - icalerror_check_arg_rv( (param!=0), "param"); - icalerror_clear_errno(); - - ((struct icalparameter_impl*)param)->string = strdup(v); -} - -/* DELEGATED-TO */ -icalparameter* icalparameter_new_delegatedto(char* v) -{ - struct icalparameter_impl *impl; - icalerror_clear_errno(); - icalerror_check_arg_rz( (v!=0),"v"); - impl = icalparameter_new_impl(ICAL_DELEGATEDTO_PARAMETER); - if (impl == 0) { - return 0; - } - - icalparameter_set_delegatedto((icalparameter*) impl,v); - if (icalerrno != ICAL_NO_ERROR) { - icalparameter_free((icalparameter*) impl); - return 0; - } - - return (icalparameter*) impl; -} - -char* icalparameter_get_delegatedto(icalparameter* param) -{ - icalerror_clear_errno(); - icalerror_check_arg_rz( (param!=0), "param"); - return ((struct icalparameter_impl*)param)->string; -} - -void icalparameter_set_delegatedto(icalparameter* param, char* v) -{ - icalerror_check_arg_rv( (v!=0),"v"); - icalerror_check_arg_rv( (param!=0), "param"); - icalerror_clear_errno(); - - ((struct icalparameter_impl*)param)->string = strdup(v); -} - -/* DIR */ -icalparameter* icalparameter_new_dir(char* v) -{ - struct icalparameter_impl *impl; - icalerror_clear_errno(); - icalerror_check_arg_rz( (v!=0),"v"); - impl = icalparameter_new_impl(ICAL_DIR_PARAMETER); - if (impl == 0) { - return 0; - } - - icalparameter_set_dir((icalparameter*) impl,v); - if (icalerrno != ICAL_NO_ERROR) { - icalparameter_free((icalparameter*) impl); - return 0; - } - - return (icalparameter*) impl; -} - -char* icalparameter_get_dir(icalparameter* param) -{ - icalerror_clear_errno(); - icalerror_check_arg_rz( (param!=0), "param"); - return ((struct icalparameter_impl*)param)->string; -} - -void icalparameter_set_dir(icalparameter* param, char* v) -{ - icalerror_check_arg_rv( (v!=0),"v"); - icalerror_check_arg_rv( (param!=0), "param"); - icalerror_clear_errno(); - - ((struct icalparameter_impl*)param)->string = strdup(v); -} - -/* ENCODING */ -icalparameter* icalparameter_new_encoding(icalparameter_encoding v) -{ - struct icalparameter_impl *impl; - icalerror_clear_errno(); - - impl = icalparameter_new_impl(ICAL_ENCODING_PARAMETER); - if (impl == 0) { - return 0; - } - - icalparameter_set_encoding((icalparameter*) impl,v); - if (icalerrno != ICAL_NO_ERROR) { - icalparameter_free((icalparameter*) impl); - return 0; - } - - return (icalparameter*) impl; -} - -icalparameter_encoding icalparameter_get_encoding(icalparameter* param) -{ - icalerror_clear_errno(); - icalerror_check_arg( (param!=0), "param"); - if ( ((struct icalparameter_impl*)param)->string != 0){ - return ICAL_ENCODING_XNAME; - } - - return ((struct icalparameter_impl*)param)->data.v_encoding; - -} - -void icalparameter_set_encoding(icalparameter* param, icalparameter_encoding v) -{ - - icalerror_check_arg_rv( (param!=0), "param"); - icalerror_clear_errno(); - - ((struct icalparameter_impl*)param)->data.v_encoding = v; -} - -/* FBTYPE */ -icalparameter* icalparameter_new_fbtype(icalparameter_fbtype v) -{ - struct icalparameter_impl *impl; - icalerror_clear_errno(); - - impl = icalparameter_new_impl(ICAL_FBTYPE_PARAMETER); - if (impl == 0) { - return 0; - } - - icalparameter_set_fbtype((icalparameter*) impl,v); - if (icalerrno != ICAL_NO_ERROR) { - icalparameter_free((icalparameter*) impl); - return 0; - } - - return (icalparameter*) impl; -} - -icalparameter_fbtype icalparameter_get_fbtype(icalparameter* param) -{ - icalerror_clear_errno(); - icalerror_check_arg( (param!=0), "param"); - if ( ((struct icalparameter_impl*)param)->string != 0){ - return ICAL_FBTYPE_XNAME; - } - - return ((struct icalparameter_impl*)param)->data.v_fbtype; - -} - -void icalparameter_set_fbtype(icalparameter* param, icalparameter_fbtype v) -{ - - icalerror_check_arg_rv( (param!=0), "param"); - icalerror_clear_errno(); - - ((struct icalparameter_impl*)param)->data.v_fbtype = v; -} - -/* FMTTYPE */ -icalparameter* icalparameter_new_fmttype(char* v) -{ - struct icalparameter_impl *impl; - icalerror_clear_errno(); - icalerror_check_arg_rz( (v!=0),"v"); - impl = icalparameter_new_impl(ICAL_FMTTYPE_PARAMETER); - if (impl == 0) { - return 0; - } - - icalparameter_set_fmttype((icalparameter*) impl,v); - if (icalerrno != ICAL_NO_ERROR) { - icalparameter_free((icalparameter*) impl); - return 0; - } - - return (icalparameter*) impl; -} - -char* icalparameter_get_fmttype(icalparameter* param) -{ - icalerror_clear_errno(); - icalerror_check_arg_rz( (param!=0), "param"); - return ((struct icalparameter_impl*)param)->string; -} - -void icalparameter_set_fmttype(icalparameter* param, char* v) -{ - icalerror_check_arg_rv( (v!=0),"v"); - icalerror_check_arg_rv( (param!=0), "param"); - icalerror_clear_errno(); - - ((struct icalparameter_impl*)param)->string = strdup(v); -} - -/* LANGUAGE */ -icalparameter* icalparameter_new_language(char* v) -{ - struct icalparameter_impl *impl; - icalerror_clear_errno(); - icalerror_check_arg_rz( (v!=0),"v"); - impl = icalparameter_new_impl(ICAL_LANGUAGE_PARAMETER); - if (impl == 0) { - return 0; - } - - icalparameter_set_language((icalparameter*) impl,v); - if (icalerrno != ICAL_NO_ERROR) { - icalparameter_free((icalparameter*) impl); - return 0; - } - - return (icalparameter*) impl; -} - -char* icalparameter_get_language(icalparameter* param) -{ - icalerror_clear_errno(); - icalerror_check_arg_rz( (param!=0), "param"); - return ((struct icalparameter_impl*)param)->string; -} - -void icalparameter_set_language(icalparameter* param, char* v) -{ - icalerror_check_arg_rv( (v!=0),"v"); - icalerror_check_arg_rv( (param!=0), "param"); - icalerror_clear_errno(); - - ((struct icalparameter_impl*)param)->string = strdup(v); -} - -/* MEMBER */ -icalparameter* icalparameter_new_member(char* v) -{ - struct icalparameter_impl *impl; - icalerror_clear_errno(); - icalerror_check_arg_rz( (v!=0),"v"); - impl = icalparameter_new_impl(ICAL_MEMBER_PARAMETER); - if (impl == 0) { - return 0; - } - - icalparameter_set_member((icalparameter*) impl,v); - if (icalerrno != ICAL_NO_ERROR) { - icalparameter_free((icalparameter*) impl); - return 0; - } - - return (icalparameter*) impl; -} - -char* icalparameter_get_member(icalparameter* param) -{ - icalerror_clear_errno(); - icalerror_check_arg_rz( (param!=0), "param"); - return ((struct icalparameter_impl*)param)->string; -} - -void icalparameter_set_member(icalparameter* param, char* v) -{ - icalerror_check_arg_rv( (v!=0),"v"); - icalerror_check_arg_rv( (param!=0), "param"); - icalerror_clear_errno(); - - ((struct icalparameter_impl*)param)->string = strdup(v); -} - -/* PARTSTAT */ -icalparameter* icalparameter_new_partstat(icalparameter_partstat v) -{ - struct icalparameter_impl *impl; - icalerror_clear_errno(); - - impl = icalparameter_new_impl(ICAL_PARTSTAT_PARAMETER); - if (impl == 0) { - return 0; - } - - icalparameter_set_partstat((icalparameter*) impl,v); - if (icalerrno != ICAL_NO_ERROR) { - icalparameter_free((icalparameter*) impl); - return 0; - } - - return (icalparameter*) impl; -} - -icalparameter_partstat icalparameter_get_partstat(icalparameter* param) -{ - icalerror_clear_errno(); - icalerror_check_arg( (param!=0), "param"); - if ( ((struct icalparameter_impl*)param)->string != 0){ - return ICAL_PARTSTAT_XNAME; - } - - return ((struct icalparameter_impl*)param)->data.v_partstat; - -} - -void icalparameter_set_partstat(icalparameter* param, icalparameter_partstat v) -{ - - icalerror_check_arg_rv( (param!=0), "param"); - icalerror_clear_errno(); - - ((struct icalparameter_impl*)param)->data.v_partstat = v; -} - -/* RANGE */ -icalparameter* icalparameter_new_range(icalparameter_range v) -{ - struct icalparameter_impl *impl; - icalerror_clear_errno(); - - impl = icalparameter_new_impl(ICAL_RANGE_PARAMETER); - if (impl == 0) { - return 0; - } - - icalparameter_set_range((icalparameter*) impl,v); - if (icalerrno != ICAL_NO_ERROR) { - icalparameter_free((icalparameter*) impl); - return 0; - } - - return (icalparameter*) impl; -} - -icalparameter_range icalparameter_get_range(icalparameter* param) -{ - icalerror_clear_errno(); - icalerror_check_arg( (param!=0), "param"); - - return ((struct icalparameter_impl*)param)->data.v_range; - -} - -void icalparameter_set_range(icalparameter* param, icalparameter_range v) -{ - - icalerror_check_arg_rv( (param!=0), "param"); - icalerror_clear_errno(); - - ((struct icalparameter_impl*)param)->data.v_range = v; -} - -/* RELATED */ -icalparameter* icalparameter_new_related(icalparameter_related v) -{ - struct icalparameter_impl *impl; - icalerror_clear_errno(); - - impl = icalparameter_new_impl(ICAL_RELATED_PARAMETER); - if (impl == 0) { - return 0; - } - - icalparameter_set_related((icalparameter*) impl,v); - if (icalerrno != ICAL_NO_ERROR) { - icalparameter_free((icalparameter*) impl); - return 0; - } - - return (icalparameter*) impl; -} - -icalparameter_related icalparameter_get_related(icalparameter* param) -{ - icalerror_clear_errno(); - icalerror_check_arg( (param!=0), "param"); - - return ((struct icalparameter_impl*)param)->data.v_related; - -} - -void icalparameter_set_related(icalparameter* param, icalparameter_related v) -{ - - icalerror_check_arg_rv( (param!=0), "param"); - icalerror_clear_errno(); - - ((struct icalparameter_impl*)param)->data.v_related = v; -} - -/* RELTYPE */ -icalparameter* icalparameter_new_reltype(icalparameter_reltype v) -{ - struct icalparameter_impl *impl; - icalerror_clear_errno(); - - impl = icalparameter_new_impl(ICAL_RELTYPE_PARAMETER); - if (impl == 0) { - return 0; - } - - icalparameter_set_reltype((icalparameter*) impl,v); - if (icalerrno != ICAL_NO_ERROR) { - icalparameter_free((icalparameter*) impl); - return 0; - } - - return (icalparameter*) impl; -} - -icalparameter_reltype icalparameter_get_reltype(icalparameter* param) -{ - icalerror_clear_errno(); - icalerror_check_arg( (param!=0), "param"); - if ( ((struct icalparameter_impl*)param)->string != 0){ - return ICAL_RELTYPE_XNAME; - } - - return ((struct icalparameter_impl*)param)->data.v_reltype; - -} - -void icalparameter_set_reltype(icalparameter* param, icalparameter_reltype v) -{ - - icalerror_check_arg_rv( (param!=0), "param"); - icalerror_clear_errno(); - - ((struct icalparameter_impl*)param)->data.v_reltype = v; -} - -/* ROLE */ -icalparameter* icalparameter_new_role(icalparameter_role v) -{ - struct icalparameter_impl *impl; - icalerror_clear_errno(); - - impl = icalparameter_new_impl(ICAL_ROLE_PARAMETER); - if (impl == 0) { - return 0; - } - - icalparameter_set_role((icalparameter*) impl,v); - if (icalerrno != ICAL_NO_ERROR) { - icalparameter_free((icalparameter*) impl); - return 0; - } - - return (icalparameter*) impl; -} - -icalparameter_role icalparameter_get_role(icalparameter* param) -{ - icalerror_clear_errno(); - icalerror_check_arg( (param!=0), "param"); - if ( ((struct icalparameter_impl*)param)->string != 0){ - return ICAL_ROLE_XNAME; - } - - return ((struct icalparameter_impl*)param)->data.v_role; - -} - -void icalparameter_set_role(icalparameter* param, icalparameter_role v) -{ - - icalerror_check_arg_rv( (param!=0), "param"); - icalerror_clear_errno(); - - ((struct icalparameter_impl*)param)->data.v_role = v; -} - -/* RSVP */ -icalparameter* icalparameter_new_rsvp(int v) -{ - struct icalparameter_impl *impl; - icalerror_clear_errno(); - - impl = icalparameter_new_impl(ICAL_RSVP_PARAMETER); - if (impl == 0) { - return 0; - } - - icalparameter_set_rsvp((icalparameter*) impl,v); - if (icalerrno != ICAL_NO_ERROR) { - icalparameter_free((icalparameter*) impl); - return 0; - } - - return (icalparameter*) impl; -} - -int icalparameter_get_rsvp(icalparameter* param) -{ - icalerror_clear_errno(); - icalerror_check_arg( (param!=0), "param"); - - return ((struct icalparameter_impl*)param)->data.v_rsvp; - -} - -void icalparameter_set_rsvp(icalparameter* param, int v) -{ - - icalerror_check_arg_rv( (param!=0), "param"); - icalerror_clear_errno(); - - ((struct icalparameter_impl*)param)->data.v_rsvp = v; -} - -/* SENT-BY */ -icalparameter* icalparameter_new_sentby(char* v) -{ - struct icalparameter_impl *impl; - icalerror_clear_errno(); - icalerror_check_arg_rz( (v!=0),"v"); - impl = icalparameter_new_impl(ICAL_SENTBY_PARAMETER); - if (impl == 0) { - return 0; - } - - icalparameter_set_sentby((icalparameter*) impl,v); - if (icalerrno != ICAL_NO_ERROR) { - icalparameter_free((icalparameter*) impl); - return 0; - } - - return (icalparameter*) impl; -} - -char* icalparameter_get_sentby(icalparameter* param) -{ - icalerror_clear_errno(); - icalerror_check_arg_rz( (param!=0), "param"); - return ((struct icalparameter_impl*)param)->string; -} - -void icalparameter_set_sentby(icalparameter* param, char* v) -{ - icalerror_check_arg_rv( (v!=0),"v"); - icalerror_check_arg_rv( (param!=0), "param"); - icalerror_clear_errno(); - - ((struct icalparameter_impl*)param)->string = strdup(v); -} - -/* TZID */ -icalparameter* icalparameter_new_tzid(char* v) -{ - struct icalparameter_impl *impl; - icalerror_clear_errno(); - icalerror_check_arg_rz( (v!=0),"v"); - impl = icalparameter_new_impl(ICAL_TZID_PARAMETER); - if (impl == 0) { - return 0; - } - - icalparameter_set_tzid((icalparameter*) impl,v); - if (icalerrno != ICAL_NO_ERROR) { - icalparameter_free((icalparameter*) impl); - return 0; - } - - return (icalparameter*) impl; -} - -char* icalparameter_get_tzid(icalparameter* param) -{ - icalerror_clear_errno(); - icalerror_check_arg_rz( (param!=0), "param"); - return ((struct icalparameter_impl*)param)->string; -} - -void icalparameter_set_tzid(icalparameter* param, char* v) -{ - icalerror_check_arg_rv( (v!=0),"v"); - icalerror_check_arg_rv( (param!=0), "param"); - icalerror_clear_errno(); - - ((struct icalparameter_impl*)param)->string = strdup(v); -} - -/* VALUE */ -icalparameter* icalparameter_new_value(icalparameter_value v) -{ - struct icalparameter_impl *impl; - icalerror_clear_errno(); - - impl = icalparameter_new_impl(ICAL_VALUE_PARAMETER); - if (impl == 0) { - return 0; - } - - icalparameter_set_value((icalparameter*) impl,v); - if (icalerrno != ICAL_NO_ERROR) { - icalparameter_free((icalparameter*) impl); - return 0; - } - - return (icalparameter*) impl; -} - -icalparameter_value icalparameter_get_value(icalparameter* param) -{ - icalerror_clear_errno(); - icalerror_check_arg( (param!=0), "param"); - if ( ((struct icalparameter_impl*)param)->string != 0){ - return ICAL_VALUE_XNAME; - } - - return ((struct icalparameter_impl*)param)->data.v_value; - -} - -void icalparameter_set_value(icalparameter* param, icalparameter_value v) -{ - - icalerror_check_arg_rv( (param!=0), "param"); - icalerror_clear_errno(); - - ((struct icalparameter_impl*)param)->data.v_value = v; -} - -/* X */ -icalparameter* icalparameter_new_x(char* v) -{ - struct icalparameter_impl *impl; - icalerror_clear_errno(); - icalerror_check_arg_rz( (v!=0),"v"); - impl = icalparameter_new_impl(ICAL_X_PARAMETER); - if (impl == 0) { - return 0; - } - - icalparameter_set_x((icalparameter*) impl,v); - if (icalerrno != ICAL_NO_ERROR) { - icalparameter_free((icalparameter*) impl); - return 0; - } - - return (icalparameter*) impl; -} - -char* icalparameter_get_x(icalparameter* param) -{ - icalerror_clear_errno(); - icalerror_check_arg_rz( (param!=0), "param"); - return ((struct icalparameter_impl*)param)->string; -} - -void icalparameter_set_x(icalparameter* param, char* v) -{ - icalerror_check_arg_rv( (v!=0),"v"); - icalerror_check_arg_rv( (param!=0), "param"); - icalerror_clear_errno(); - - ((struct icalparameter_impl*)param)->string = strdup(v); -} - -/* X-LIC-ERRORTYPE */ -icalparameter* icalparameter_new_xlicerrortype(icalparameter_xlicerrortype v) -{ - struct icalparameter_impl *impl; - icalerror_clear_errno(); - - impl = icalparameter_new_impl(ICAL_XLICERRORTYPE_PARAMETER); - if (impl == 0) { - return 0; - } - - icalparameter_set_xlicerrortype((icalparameter*) impl,v); - if (icalerrno != ICAL_NO_ERROR) { - icalparameter_free((icalparameter*) impl); - return 0; - } - - return (icalparameter*) impl; -} - -icalparameter_xlicerrortype icalparameter_get_xlicerrortype(icalparameter* param) -{ - icalerror_clear_errno(); - icalerror_check_arg( (param!=0), "param"); - - return ((struct icalparameter_impl*)param)->data.v_xlicerrortype; - -} - -void icalparameter_set_xlicerrortype(icalparameter* param, icalparameter_xlicerrortype v) -{ - - icalerror_check_arg_rv( (param!=0), "param"); - icalerror_clear_errno(); - - ((struct icalparameter_impl*)param)->data.v_xlicerrortype = v; -} - -/* X-LIC-COMPARETYPE */ -icalparameter* icalparameter_new_xliccomparetype(icalparameter_xliccomparetype v) -{ - struct icalparameter_impl *impl; - icalerror_clear_errno(); - - impl = icalparameter_new_impl(ICAL_XLICCOMPARETYPE_PARAMETER); - if (impl == 0) { - return 0; - } - - icalparameter_set_xliccomparetype((icalparameter*) impl,v); - if (icalerrno != ICAL_NO_ERROR) { - icalparameter_free((icalparameter*) impl); - return 0; - } - - return (icalparameter*) impl; -} - -icalparameter_xliccomparetype icalparameter_get_xliccomparetype(icalparameter* param) -{ - icalerror_clear_errno(); - icalerror_check_arg( (param!=0), "param"); - - return ((struct icalparameter_impl*)param)->data.v_xliccomparetype; - -} - -void icalparameter_set_xliccomparetype(icalparameter* param, icalparameter_xliccomparetype v) -{ - - icalerror_check_arg_rv( (param!=0), "param"); - icalerror_clear_errno(); - - ((struct icalparameter_impl*)param)->data.v_xliccomparetype = v; -} - diff --git a/libical/src/libical/icalparameter.h b/libical/src/libical/icalparameter.h deleted file mode 100644 index 174cae6f3f..0000000000 --- a/libical/src/libical/icalparameter.h +++ /dev/null @@ -1,174 +0,0 @@ -/* -*- Mode: C -*- */ -/*====================================================================== - FILE: icalparam.h - CREATOR: eric 20 March 1999 - - - $Id$ - $Locker$ - - - - (C) COPYRIGHT 1999 Eric Busboom - http://www.softwarestudio.org - - The contents of this file are subject to the Mozilla Public License - Version 1.0 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and - limitations under the License. - - The original author is Eric Busboom - The original code is icalparam.h - - ======================================================================*/ - -#ifndef ICALPARAM_H -#define ICALPARAM_H - -#include "icalenums.h" /* defined icalparameter_kind and other enums */ - -typedef void icalparameter; - -icalparameter* icalparameter_new(icalparameter_kind kind); -icalparameter* icalparameter_new_clone(icalparameter* p); -icalparameter* icalparameter_new_from_string(icalparameter_kind kind, char* value); - -void icalparameter_free(icalparameter* parameter); - -char* icalparameter_as_ical_string(icalparameter* parameter); - -int icalparameter_is_valid(icalparameter* parameter); - -icalparameter_kind icalparameter_isa(icalparameter* parameter); - -int icalparameter_isa_parameter(void* param); - -/* Acess the name of an X parameer */ -void icalparameter_set_xname (icalparameter* param, char* v); -char* icalparameter_get_xname(icalparameter* param); -void icalparameter_set_xvalue (icalparameter* param, char* v); -char* icalparameter_get_xvalue(icalparameter* param); - - -/* Everything below this line is machine generated. Do not edit. */ -/* ALTREP */ -icalparameter* icalparameter_new_altrep(char* v); -char* icalparameter_get_altrep(icalparameter* value); -void icalparameter_set_altrep(icalparameter* value, char* v); - -/* CN */ -icalparameter* icalparameter_new_cn(char* v); -char* icalparameter_get_cn(icalparameter* value); -void icalparameter_set_cn(icalparameter* value, char* v); - -/* CUTYPE */ -icalparameter* icalparameter_new_cutype(icalparameter_cutype v); -icalparameter_cutype icalparameter_get_cutype(icalparameter* value); -void icalparameter_set_cutype(icalparameter* value, icalparameter_cutype v); - -/* DELEGATED-FROM */ -icalparameter* icalparameter_new_delegatedfrom(char* v); -char* icalparameter_get_delegatedfrom(icalparameter* value); -void icalparameter_set_delegatedfrom(icalparameter* value, char* v); - -/* DELEGATED-TO */ -icalparameter* icalparameter_new_delegatedto(char* v); -char* icalparameter_get_delegatedto(icalparameter* value); -void icalparameter_set_delegatedto(icalparameter* value, char* v); - -/* DIR */ -icalparameter* icalparameter_new_dir(char* v); -char* icalparameter_get_dir(icalparameter* value); -void icalparameter_set_dir(icalparameter* value, char* v); - -/* ENCODING */ -icalparameter* icalparameter_new_encoding(icalparameter_encoding v); -icalparameter_encoding icalparameter_get_encoding(icalparameter* value); -void icalparameter_set_encoding(icalparameter* value, icalparameter_encoding v); - -/* FBTYPE */ -icalparameter* icalparameter_new_fbtype(icalparameter_fbtype v); -icalparameter_fbtype icalparameter_get_fbtype(icalparameter* value); -void icalparameter_set_fbtype(icalparameter* value, icalparameter_fbtype v); - -/* FMTTYPE */ -icalparameter* icalparameter_new_fmttype(char* v); -char* icalparameter_get_fmttype(icalparameter* value); -void icalparameter_set_fmttype(icalparameter* value, char* v); - -/* LANGUAGE */ -icalparameter* icalparameter_new_language(char* v); -char* icalparameter_get_language(icalparameter* value); -void icalparameter_set_language(icalparameter* value, char* v); - -/* MEMBER */ -icalparameter* icalparameter_new_member(char* v); -char* icalparameter_get_member(icalparameter* value); -void icalparameter_set_member(icalparameter* value, char* v); - -/* PARTSTAT */ -icalparameter* icalparameter_new_partstat(icalparameter_partstat v); -icalparameter_partstat icalparameter_get_partstat(icalparameter* value); -void icalparameter_set_partstat(icalparameter* value, icalparameter_partstat v); - -/* RANGE */ -icalparameter* icalparameter_new_range(icalparameter_range v); -icalparameter_range icalparameter_get_range(icalparameter* value); -void icalparameter_set_range(icalparameter* value, icalparameter_range v); - -/* RELATED */ -icalparameter* icalparameter_new_related(icalparameter_related v); -icalparameter_related icalparameter_get_related(icalparameter* value); -void icalparameter_set_related(icalparameter* value, icalparameter_related v); - -/* RELTYPE */ -icalparameter* icalparameter_new_reltype(icalparameter_reltype v); -icalparameter_reltype icalparameter_get_reltype(icalparameter* value); -void icalparameter_set_reltype(icalparameter* value, icalparameter_reltype v); - -/* ROLE */ -icalparameter* icalparameter_new_role(icalparameter_role v); -icalparameter_role icalparameter_get_role(icalparameter* value); -void icalparameter_set_role(icalparameter* value, icalparameter_role v); - -/* RSVP */ -icalparameter* icalparameter_new_rsvp(int v); -int icalparameter_get_rsvp(icalparameter* value); -void icalparameter_set_rsvp(icalparameter* value, int v); - -/* SENT-BY */ -icalparameter* icalparameter_new_sentby(char* v); -char* icalparameter_get_sentby(icalparameter* value); -void icalparameter_set_sentby(icalparameter* value, char* v); - -/* TZID */ -icalparameter* icalparameter_new_tzid(char* v); -char* icalparameter_get_tzid(icalparameter* value); -void icalparameter_set_tzid(icalparameter* value, char* v); - -/* VALUE */ -icalparameter* icalparameter_new_value(icalparameter_value v); -icalparameter_value icalparameter_get_value(icalparameter* value); -void icalparameter_set_value(icalparameter* value, icalparameter_value v); - -/* X */ -icalparameter* icalparameter_new_x(char* v); -char* icalparameter_get_x(icalparameter* value); -void icalparameter_set_x(icalparameter* value, char* v); - -/* X-LIC-ERRORTYPE */ -icalparameter* icalparameter_new_xlicerrortype(icalparameter_xlicerrortype v); -icalparameter_xlicerrortype icalparameter_get_xlicerrortype(icalparameter* value); -void icalparameter_set_xlicerrortype(icalparameter* value, icalparameter_xlicerrortype v); - -/* X-LIC-COMPARETYPE */ -icalparameter* icalparameter_new_xliccomparetype(icalparameter_xliccomparetype v); -icalparameter_xliccomparetype icalparameter_get_xliccomparetype(icalparameter* value); -void icalparameter_set_xliccomparetype(icalparameter* value, icalparameter_xliccomparetype v); - -#endif ICALPARAMETER_H diff --git a/libical/src/libical/icalparser.c b/libical/src/libical/icalparser.c deleted file mode 100644 index 8541ae4fab..0000000000 --- a/libical/src/libical/icalparser.c +++ /dev/null @@ -1,990 +0,0 @@ -/* -*- Mode: C -*- - ====================================================================== - FILE: icalparser.c - CREATOR: eric 04 August 1999 - - $Id$ - $Locker$ - - The contents of this file are subject to the Mozilla Public License - Version 1.0 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and - limitations under the License. - - The Initial Developer of the Original Code is Eric Busboom - - (C) COPYRIGHT 1999 The Software Studio. - http://www.softwarestudio.org - - ======================================================================*/ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - - -#include "ical.h" -#include "pvl.h" -#include "icalparser.h" -#include "icalmemory.h" -#include /* For strncpy & size_t */ -#include /* For FILE and fgets and sprintf */ -#include /* for free */ - - -extern icalvalue* icalparser_yy_value; -void set_parser_value_state(icalvalue_kind kind); -int ical_yy_parse(void); - -char* icalparser_get_next_char(char c, char *str); -char* icalparser_get_next_parameter(char* line,char** end); -char* icalparser_get_next_value(char* line, char **end, icalvalue_kind kind); -char* icalparser_get_prop_name(char* line, char** end); -char* icalparser_get_param_name(char* line, char **end); - -#define TMP_BUF_SIZE 80 - -struct icalparser_impl -{ - int buffer_full; - size_t tmp_buf_size; - char temp[TMP_BUF_SIZE]; - icalcomponent *root_component; - icalcomponent *tail; - int version; - int level; - int lineno; - icalparser_state state; - pvl_list components; - - void *line_gen_data; - -}; - - -icalparser* icalparser_new() -{ - struct icalparser_impl* impl = 0; - - if ( ( impl = (struct icalparser_impl*) - malloc(sizeof(struct icalparser_impl))) == 0) { - icalerror_set_errno(ICAL_NEWFAILED_ERROR); - return 0; - } - - impl->root_component = 0; - impl->components = pvl_newlist(); - impl->level = 0; - impl->state = ICALPARSER_SUCCESS; - - impl->tmp_buf_size = TMP_BUF_SIZE; - impl->buffer_full = 0; - impl->lineno = 0; - - memset(impl->temp,0, TMP_BUF_SIZE); - - return (icalparser*)impl; -} - -void icalparser_free(icalparser* parser) -{ - struct icalparser_impl* impl = (struct icalparser_impl*)parser; - icalcomponent *c; - - if (impl->root_component != 0){ - icalcomponent_free(impl->root_component); - } - - while( (c=pvl_pop(impl->components)) != 0){ - icalcomponent_free(c); - } - - pvl_free(impl->components); -} - -void icalparser_set_gen_data(icalparser* parser, void* data) -{ - struct icalparser_impl* impl = (struct icalparser_impl*)parser; - - impl->line_gen_data = data; -} - - -icalvalue* icalvalue_new_from_string_with_error(icalvalue_kind kind, - char* str, - icalproperty **error); - - - -char* icalparser_get_next_char(char c, char *str) -{ - int quote_mode = 0; - char* p; - - - for(p=str; *p!=0; p++){ - - if ( quote_mode == 0 && *p=='"' && *(p-1) != '\\' ){ - quote_mode =1; - continue; - } - - if ( quote_mode == 1 && *p=='"' && *(p-1) != '\\' ){ - quote_mode =0; - continue; - } - - if (quote_mode == 0 && *p== c && *(p-1) != '\\' ){ - return p; - } - - } - - return 0; -} - -/* make a new tmp buffer out of a substring */ -char* make_segment(char* start, char* end) -{ - char *buf; - size_t size = (size_t)end - (size_t)start; - - buf = icalmemory_tmp_buffer(size+1); - - - strncpy(buf,start,size); - *(buf+size) = 0; - - return buf; - -} - -char* input_buffer; -char* input_buffer_p; -#define min(a,b) ((a) < (b) ? (a) : (b)) - -int icalparser_flex_input(char* buf, int max_size) -{ - int n = min(max_size,strlen(input_buffer_p)); - - if (n > 0){ - memcpy(buf, input_buffer_p, n); - input_buffer_p += n; - return n; - } else { - return 0; - } -} - -void icalparser_clear_flex_input() -{ - input_buffer_p = input_buffer+strlen(input_buffer); -} - -/* Cal the flex parser to parse a complex value */ - -icalvalue* icalparser_parse_value(icalvalue_kind kind, - char* str, icalproperty** error) -{ - int r; - input_buffer_p = input_buffer = str; - - set_parser_value_state(kind); - icalparser_yy_value = 0; - - r = ical_yy_parse(); - - /* Error. Parse failed */ - if( icalparser_yy_value == 0 || r != 0){ - - if(icalparser_yy_value !=0){ - icalvalue_free(icalparser_yy_value); - icalparser_yy_value = 0; - } - - return 0; - } - - if (error != 0){ - *error = 0; - } - - return icalparser_yy_value; -} - -char* icalparser_get_prop_name(char* line, char** end) -{ - char* p; - char* v; - char *str; - - p = icalparser_get_next_char(';',line); - v = icalparser_get_next_char(':',line); - if (p== 0 && v == 0) { - return 0; - } - - /* There is no ';' or, it is after the ';' that marks the beginning of - the value */ - if (v!=0 && ( p == 0 || p > v)){ - str = make_segment(line,v); - *end = v+1; - } else { - str = make_segment(line,p); - *end = p+1; - } - - return str; -} - -char* icalparser_get_param_name(char* line, char **end) -{ - - char* next; - char *str; - - next = icalparser_get_next_char('=',line); - - if (next == 0) { - return 0; - } - - str = make_segment(line,next); - *end = next+1; - return str; - -} - -char* icalparser_get_next_paramvalue(char* line, char **end) -{ - - char* next; - char *str; - - next = icalparser_get_next_char(',',line); - - if (next == 0){ - next = (char*)(size_t)line+(size_t)strlen(line);\ - } - - if (next == line){ - return 0; - } else { - str = make_segment(line,next); - *end = next+1; - return str; - } - -} - -/* A property may have multiple values, if the values are seperated by - commas in the content line. This routine will look for the next - comma after line and will set the next place to start searching in - end. */ - -char* icalparser_get_next_value(char* line, char **end, icalvalue_kind kind) -{ - - char* next; - char *p; - char *str; - size_t length = strlen(line); - - p = line; - while(1){ - - next = icalparser_get_next_char(',',p); - - /* Unforunately, RFC2445 says that for the RECUR value, COMMA - can both seperate digits in a list, and it can seperate - multiple recurrence specifications. This is not a friendly - part of the spec. This weirdness tries to - distinguish the two uses. it is probably a HACK*/ - - if( kind == ICAL_RECUR_VALUE ) { - if ( next != 0 && - (*end+length) > next+5 && - strncmp(next,"FREQ",4) == 0 - ) { - /* The COMMA was followed by 'FREQ', is it a real seperator*/ - /* Fall through */ - printf("%s\n",next); - } else if (next != 0){ - /* Not real, get the next COMMA */ - p = next+1; - next = 0; - continue; - } - } - - /* If the comma is preceeded by a '\', then it is a literal and - not a value seperator*/ - - if ( (next!=0 && *(next-1) == '\\') || - (next!=0 && *(next-3) == '\\') - ) - /*second clause for '/' is on prev line. HACK may be out of bounds */ - { - p = next+1; - } else { - break; - } - - } - - if (next == 0){ - next = (char*)(size_t)line+length; - *end = next; - } else { - *end = next+1; - } - - if (next == line){ - return 0; - } - - - str = make_segment(line,next); - return str; - -} - -char* icalparser_get_next_parameter(char* line,char** end) -{ - char *next; - char *v; - char *str; - - v = icalparser_get_next_char(':',line); - next = icalparser_get_next_char(';', line); - - /* There is no ';' or, it is after the ':' that marks the beginning of - the value */ - - if (next == 0 || next > v) { - next = icalparser_get_next_char(':', line); - } - - if (next != 0) { - str = make_segment(line,next); - *end = next+1; - return str; - } else { - *end = line; - return 0; - } -} - -/* Get a single property line, from the property name through the - final new line, and include any continuation lines */ - -char* icalparser_get_line(icalparser *parser, - char* (*line_gen_func)(char *s, size_t size, void *d)) -{ - char *line; - char *line_p; - struct icalparser_impl* impl = (struct icalparser_impl*)parser; - size_t buf_size = impl->tmp_buf_size; - - - line_p = line = icalmemory_new_buffer(buf_size); - line[0] = '\0'; - - while(1) { - - /* The buffer is not clear, so transfer the data in it to the - output. This may be left over from a previous call */ - if (impl->temp[0] != '\0' ) { - - /* If the last position in the temp buffer is occupied, - mark the buffer as full. The means we will do another - read later, because the line is not finished */ - if (impl->temp[impl->tmp_buf_size-1] == 0){ - impl->buffer_full = 1; - } else { - impl->buffer_full = 0; - } - - /* Copy the temp to the output and clear the temp buffer. */ - icalmemory_append_string(&line,&line_p,&buf_size,impl->temp); - impl->temp[0] = '\0' ; - } - - impl->temp[impl->tmp_buf_size-1] = 1; /* Mark end of buffer */ - - if ((*line_gen_func)(impl->temp,impl->tmp_buf_size,impl->line_gen_data) - ==0){/* Get more data */ - - /* If the first position is clear, it means we didn't get - any more data from the last call to line_ge_func*/ - if (impl->temp[0] == '\0'){ - - if(line[0] != '\0'){ - /* There is data in the output, so fall trhough and process it*/ - break; - } else { - /* No data in output; return and signal that there - is no more input*/ - free(line); - return 0; - } - } - } - - - /* If the output line ends in a '\n' and the temp buffer - begins with a ' ', then the buffer holds a continuation - line, so keep reading. */ - - if ( line_p > line+1 && *(line_p-1) == '\n' && impl->temp[0] == ' ') { - - /* back up the pointer to erase the continuation characters */ - line_p--; - - if ( *(line_p-1) == '\r'){ - line_p--; - } - - /* shift the temp buffer down to eliminate the leading space*/ - memmove(&(impl->temp[0]),&(impl->temp[1]),impl->tmp_buf_size); - - impl->temp[impl->tmp_buf_size-1] = impl->temp[impl->tmp_buf_size-2]; - - } else if ( impl->buffer_full == 1 ) { - - /* The buffer was filled on the last read, so read again */ - - } else { - - /* Looks like the end of this content line, so break */ - break; - } - - - } - - /* Erase the final newline and/or carriage return*/ - if ( line_p > line+1 && *(line_p-1) == '\n') { - *(line_p-1) = '\0'; - if ( *(line_p-2) == '\r'){ - *(line_p-2) = '\0'; - } - - } else { - *(line_p) = '\0'; - } - - return line; - -} - -void insert_error(icalcomponent* comp, char* text, - char* message, icalparameter_xlicerrortype type) -{ - char temp[1024]; - - if (strlen(text) > 256) { - sprintf(temp,"%s: \'%256s...\'",message,text); - } else { - sprintf(temp,"%s: \'%s\'",message,text); - } - - icalcomponent_add_property - (comp, - icalproperty_vanew_xlicerror( - temp, - icalparameter_new_xlicerrortype(type), - 0)); -} - -icalcomponent* icalparser_parse(icalparser *parser, - char* (*line_gen_func)(char *s, size_t size, - void* d)) -{ - - char* line; - icalcomponent *c=0; - icalcomponent *root_component=0; - - icalerror_check_arg_rz((parser !=0),"parser"); - - do{ - line = icalparser_get_line(parser, line_gen_func); - - if ((c = icalparser_add_line(parser,line)) != 0){ - if (root_component == 0){ - /* Just one component */ - icalparser_claim(parser); - root_component = c; - } else if(icalcomponent_isa(root_component) - != ICAL_XROOT_COMPONENT) { - /*Got a second component, so move the two components under - an XROOT container */ - icalcomponent *tempc; - tempc = icalcomponent_new(ICAL_XROOT_COMPONENT); - icalcomponent_add_component(tempc, root_component); - icalparser_claim(parser); - icalcomponent_add_component(tempc, c); - root_component = tempc; - } else { - /* Already have an XROOT container, so add the component - to it*/ - icalcomponent_add_component(root_component, c); - icalparser_claim(parser); - } - } - } while ( line != 0); - - return root_component; - -} - -icalcomponent* icalparser_add_line(icalparser* parser, - char* line) -{ - char *p; - char *str; - char *end; - int vcount = 0; - icalproperty *prop; - icalvalue *value; - icalvalue_kind value_kind = ICAL_NO_VALUE; - - - struct icalparser_impl *impl = (struct icalparser_impl*)parser; - icalerror_check_arg_rz((parser != 0),"parser"); - - - if (line == 0) - { - impl->state = ICALPARSER_ERROR; - return 0; - } - - /* Begin by getting the property name at the start of the line. The - property name may end up being "BEGIN" or "END" in which case it - is not really a property, but the market for the start or end of - a component */ - - end = 0; - str = icalparser_get_prop_name(line, &end); - - if (str == 0){ - /* Could not get a property name */ - icalcomponent *tail = pvl_data(pvl_tail(impl->components)); - - if (tail){ - insert_error(tail,line, - "Got a data line, but could not find a property name or component begin tag", - ICAL_XLICERRORTYPE_COMPONENTPARSEERROR); - } - tail = 0; - impl->state = ICALPARSER_ERROR; - return 0; - } - - /********************************************************************** - * Handle begin and end of components - **********************************************************************/ - - - /* If the property name is BEGIN or END, we are actually - starting or ending a new component */ - - if(strcmp(str,"BEGIN") == 0){ - icalcomponent *c; - - impl->level++; - str = icalparser_get_next_value(end,&end, value_kind); - - c = icalcomponent_new_from_string(str); - - if (c == 0){ - c = icalcomponent_new(ICAL_XLICINVALID_COMPONENT); - insert_error(c,str,"Parse error in component name", - ICAL_XLICERRORTYPE_COMPONENTPARSEERROR); - } - - pvl_push(impl->components,c); - - impl->state = ICALPARSER_BEGIN_COMP; - return 0; - - } else if (strcmp(str,"END") == 0 ) { - icalcomponent* tail; - - impl->level--; - str = icalparser_get_next_value(end,&end, value_kind); - - impl->root_component = pvl_pop(impl->components); - - tail = pvl_data(pvl_tail(impl->components)); - - if(tail != 0){ - icalcomponent_add_component(tail,impl->root_component); - } - - tail = 0; - - /* Return the component if we are back to the 0th level */ - if (impl->level == 0){ - impl->state = ICALPARSER_SUCCESS; - return impl->root_component; - } else { - impl->state = ICALPARSER_END_COMP; - return 0; - } - } - - - /* There is no point in continuing if we have not seen a - component yet */ - - if(pvl_data(pvl_tail(impl->components)) == 0){ - impl->state = ICALPARSER_ERROR; - return 0; - } - - - /********************************************************************** - * Handle property names - **********************************************************************/ - /* At this point, the property name really is a property name, - (Not a component name) so make a new property and add it to - the component */ - - prop = icalproperty_new_from_string(str); - - if (prop != 0){ - icalcomponent *tail = pvl_data(pvl_tail(impl->components)); - - icalcomponent_add_property(tail, prop); - - /* Set the value kind for the default for this type of - property. This may be re-set by a VALUE parameter */ - value_kind = - icalenum_property_kind_to_value_kind( - icalproperty_isa(prop)); - - } else { - icalcomponent* tail = pvl_data(pvl_tail(impl->components)); - - insert_error(tail,str,"Parse error in property name", - ICAL_XLICERRORTYPE_PROPERTYPARSEERROR); - - tail = 0; - impl->state = ICALPARSER_ERROR; - return 0; - } - - /********************************************************************** - * Handle parameter values - **********************************************************************/ - - /* Now, add any parameters to the last property */ - - p = 0; - while(1) { - - if (*(end-1) == ':'){ - /* if the last seperator was a ":" and the value is a - URL, icalparser_get_next_parameter will find the - ':' in the URL, so better break now. */ - break; - } - - str = icalparser_get_next_parameter(end,&end); - - if (str != 0){ - char* name; - char* pvalue; - - icalparameter *param = 0; - icalparameter_kind kind; - icalcomponent *tail = pvl_data(pvl_tail(impl->components)); - - name = icalparser_get_param_name(str,&pvalue); - - if (name == 0){ - /* 'tail' defined above */ - insert_error(tail, str, "Can't parse parameter name", - ICAL_XLICERRORTYPE_PARAMETERNAMEPARSEERROR); - tail = 0; - break; - } - - kind = icalenum_string_to_parameter_kind(name); - - if (kind != ICAL_NO_PARAMETER){ - param = icalparameter_new_from_string(kind,pvalue); - } else { - /* Error. Failed to parse the parameter*/ - /* 'tail' defined above */ - insert_error(tail, str, "Can't parse parameter name", - ICAL_XLICERRORTYPE_PARAMETERNAMEPARSEERROR); - tail = 0; - impl->state = ICALPARSER_ERROR; - return 0; - } - - if (param == 0){ - /* 'tail' defined above */ - insert_error(tail,str,"Can't parse parameter value", - ICAL_XLICERRORTYPE_PARAMETERVALUEPARSEERROR); - - tail = 0; - impl->state = ICALPARSER_ERROR; - continue; - } - - /* If it is a VALUE parameter, set the kind of value*/ - if (icalparameter_isa(param)==ICAL_VALUE_PARAMETER){ - - value_kind = (icalvalue_kind) - icalparameter_get_value(param); - - if (value_kind == ICAL_NO_VALUE){ - - /* Ooops, could not parse the value of the - parameter ( it was not one of the defined - values ), so reset the value_kind */ - - insert_error( - tail, str, - "Got a VALUE parameter with an unknown type", - ICAL_XLICERRORTYPE_PARAMETERVALUEPARSEERROR); - icalparameter_free(param); - - value_kind = - icalenum_property_kind_to_value_kind( - icalproperty_isa(prop)); - - icalparameter_free(param); - tail = 0; - impl->state = ICALPARSER_ERROR; - return 0; - } - } - - /* Everything is OK, so add the parameter */ - icalproperty_add_parameter(prop,param); - tail = 0; - - } else { /* if ( str != 0) */ - /* If we did not get a param string, go on to looking - for a value */ - break; - } /* if ( str != 0) */ - - } /* while(1) */ - - /********************************************************************** - * Handle values - **********************************************************************/ - - /* Look for values. If there are ',' characters in the values, - then there are multiple values, so clone the current - parameter and add one part of the value to each clone */ - - vcount=0; - while(1) { - str = icalparser_get_next_value(end,&end, value_kind); - - if (str != 0){ - - if (vcount > 0){ - /* Actually, only clone after the second value */ - icalproperty* clone = icalproperty_new_clone(prop); - icalcomponent* tail = pvl_data(pvl_tail(impl->components)); - - icalcomponent_add_property(tail, clone); - prop = clone; - tail = 0; - } - - value = icalvalue_new_from_string(value_kind, str); - - /* Don't add properties without value */ - if (value == 0){ - char temp[200]; /* HACK */ - - icalproperty_kind prop_kind = icalproperty_isa(prop); - icalcomponent* tail = pvl_data(pvl_tail(impl->components)); - - sprintf(temp,"Can't parse as %s value in %s property. Removing entire property", - icalenum_value_kind_to_string(value_kind), - icalenum_property_kind_to_string(prop_kind)); - - insert_error(tail, str, temp, - ICAL_XLICERRORTYPE_VALUEPARSEERROR); - - /* Remove the troublesome property */ - icalcomponent_remove_property(tail,prop); - icalproperty_free(prop); - prop = 0; - tail = 0; - impl->state = ICALPARSER_ERROR; - return 0; - - } else { - vcount++; - icalproperty_set_value(prop, value); - } - - - } else { - if (vcount == 0){ - char temp[200]; /* HACK */ - - icalproperty_kind prop_kind = icalproperty_isa(prop); - icalcomponent *tail = pvl_data(pvl_tail(impl->components)); - - sprintf(temp,"No value for %s property. Removing entire property", - icalenum_property_kind_to_string(prop_kind)); - - insert_error(tail, str, temp, - ICAL_XLICERRORTYPE_VALUEPARSEERROR); - - /* Remove the troublesome property */ - icalcomponent_remove_property(tail,prop); - icalproperty_free(prop); - prop = 0; - tail = 0; - impl->state = ICALPARSER_ERROR; - return 0; - } else { - - break; - } - } - } - - /**************************************************************** - * End of component parsing. - *****************************************************************/ - - if (pvl_data(pvl_tail(impl->components)) == 0 && - impl->level == 0){ - impl->state = ICALPARSER_SUCCESS; - return impl->root_component; - } else { - impl->state = ICALPARSER_IN_PROGRESS; - return 0; - } - -} - -icalparser_state icalparser_get_state(icalparser* parser) -{ - struct icalparser_impl* impl = (struct icalparser_impl*) parser; - return impl->state; - -} - -icalcomponent* icalparser_claim(icalparser* parser) -{ - struct icalparser_impl* impl = (struct icalparser_impl*) parser; - icalcomponent *c = impl->root_component; - - impl->root_component = 0; - - return c; - -} - - -icalcomponent* icalparser_clean(icalparser* parser) -{ - struct icalparser_impl* impl = (struct icalparser_impl*) parser; - icalcomponent *tail = pvl_data(pvl_tail(impl->components)); - - icalerror_check_arg_rz((parser != 0 ),"parser"); - - /* We won't get a clean exit if some components did not have an - "END" tag. Clear off any component that may be left in the list */ - - - while((tail=pvl_data(pvl_tail(impl->components))) != 0){ - - insert_error(tail," ", - "Missing END tag for this component. Closing component at end of input.", - ICAL_XLICERRORTYPE_COMPONENTPARSEERROR); - - - impl->root_component = pvl_pop(impl->components); - tail=pvl_data(pvl_tail(impl->components)); - - if(tail != 0){ - icalcomponent_add_component(tail,impl->root_component); - } - } - - return impl->root_component; - -} - -struct slg_data { - char* pos; - char* str; -}; - -char* string_line_generator(char *out, size_t buf_size, void *d) -{ - char *n; - size_t size; - struct slg_data* data = (struct slg_data*)d; - - if(data->pos==0){ - data->pos=data->str; - } - - /* If the pointer is at the end of the string, we are done */ - if (*(data->pos)==0){ - return 0; - } - - n = strchr(data->pos,'\n'); - - if (n == 0){ - size = strlen(data->pos); - } else { - n++; /* include newline in output */ - size = (n-data->pos); - } - - if (size > buf_size-1){ - size = buf_size-1; - } - - - strncpy(out,data->pos,size); - - *(out+size) = '\0'; - - data->pos += size; - - return out; -} - -icalcomponent* icalparser_parse_string(char* str) -{ - icalcomponent *c; - struct slg_data d; - icalparser *p; - - d.pos = 0; - d.str = str; - - p = icalparser_new(); - icalparser_set_gen_data(p,&d); - c = icalparser_parse(p,string_line_generator); - icalparser_free(p); - - return c; - -} diff --git a/libical/src/libical/icalparser.h b/libical/src/libical/icalparser.h deleted file mode 100644 index 25c07eca9f..0000000000 --- a/libical/src/libical/icalparser.h +++ /dev/null @@ -1,94 +0,0 @@ -/* -*- Mode: C -*- */ -/*====================================================================== - FILE: icalparser.h - CREATOR: eric 20 April 1999 - - $Id$ - - - (C) COPYRIGHT 1999 Eric Busboom - http://www.softwarestudio.org - - The contents of this file are subject to the Mozilla Public License - Version 1.0 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and - limitations under the License. - - The original author is Eric Busboom - The original code is icalparser.h - -======================================================================*/ - - -#ifndef ICALPARSER_H -#define ICALPARSER_H - -#include "ical.h" -#include /* For FILE* */ - -typedef void* icalparser; -typedef enum icalparser_state { - ICALPARSER_ERROR, - ICALPARSER_SUCCESS, - ICALPARSER_BEGIN_COMP, - ICALPARSER_END_COMP, - ICALPARSER_IN_PROGRESS -} icalparser_state; - - -/*********************************************************************** - * Message oriented parsing. icalparser_parse takes a string that - * holds the text ( in RFC 2445 format ) and returns a pointer to an - * icalcomponent. The caller owns the memory. line_gen_func is a - * pointer to a function that returns one content line per invocation - **********************************************************************/ - -icalcomponent* icalparser_parse(icalparser *parser, - char* (*line_gen_func)(char *s, size_t size, void *d)); - -/* A simple, and incorrect interface - can only return one component*/ -icalcomponent* icalparser_parse_string(char* str); - - -/*********************************************************************** - * Line-oriented parsing. - * - * Create a new parser via icalparse_new_parser, then add ines one at - * a time with icalparse_add_line(). icalparser_add_line() will return - * non-zero when it has finished with a component. - ***********************************************************************/ - -icalparser* icalparser_new(); -void icalparser_set_gen_data(icalparser* parser, void* data); -icalcomponent* icalparser_add_line(icalparser* parser, char* str ); -icalcomponent* icalparser_claim(icalparser* parser); -icalcomponent* icalparser_clean(icalparser* parser); -icalparser_state icalparser_get_state(icalparser* parser); -void icalparser_free(icalparser* parser); - -/*********************************************************************** - * Parser support functions - ***********************************************************************/ - -/* Use the flex/bison parser to turn a string into a value type */ -icalvalue* icalparser_parse_value(icalvalue_kind kind, char* str, icalcomponent** errors); - -/* Given a line generator function, return a single iCal content line.*/ -char* icalparser_get_line(icalparser* parser, char* (*line_gen_func)(char *s, size_t size, void *d)); - - -/* a line_gen_function that returns lines from a string. To use it, - set string_line_generator_str to point to the input string, and set - string_line_generator_pos to 0. These globals make the routine not - thead-safe. */ - -extern char* string_line_generator_str; -extern char* string_line_generator_pos; -char* string_line_generator(char *out, size_t buf_size, void *d); - -#endif /* !ICALPARSE_H */ diff --git a/libical/src/libical/icalproperty.c b/libical/src/libical/icalproperty.c deleted file mode 100644 index c3fe7c9073..0000000000 --- a/libical/src/libical/icalproperty.c +++ /dev/null @@ -1,3095 +0,0 @@ -/* -*- Mode: C -*- */ - -/*====================================================================== - FILE: icalproperty.c - CREATOR: eric 28 April 1999 - - $Id$ - - - (C) COPYRIGHT 1999 Eric Busboom - http://www.softwarestudio.org - - The contents of this file are subject to the Mozilla Public License - Version 1.0 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and - limitations under the License. - - The original author is Eric Busboom - The original code is icalproperty.c - -======================================================================*/ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include /* For strdup, rindex */ -#include -#include -#include -#include /* for printf */ -#include /* for va_list, va_start, etc. */ - -#include "ical.h" -#include "pvl.h" -#include "icalenums.h" -#include "icalerror.h" -#include "icalmemory.h" - -#define TMP_BUF_SIZE 1024 - -/* Private routines for icalproperty */ -void icalvalue_set_parent(icalvalue* value, - icalproperty* property); -icalproperty* icalvalue_get_parent(icalvalue* value); - -void icalparameter_set_parent(icalparameter* param, - icalproperty* property); -icalproperty* icalparameter_get_parent(icalparameter* value); - - -void icalproperty_set_x_name(icalproperty* prop, char* name); - -struct icalproperty_impl -{ - char id[5]; - icalproperty_kind kind; - char* x_name; - pvl_list parameters; - pvl_elem parameter_iterator; - icalvalue* value; - icalcomponent *parent; -}; - -void icalproperty_add_parameters(struct icalproperty_impl *impl,va_list args) -{ - - void* vp; - - while((vp = va_arg(args, void*)) != 0) { - - if (icalvalue_isa_value(vp) != 0 ){ - } else if (icalparameter_isa_parameter(vp) != 0 ){ - - icalproperty_add_parameter((icalproperty*)impl, - (icalparameter*)vp); - } else { - abort(); - } - - } - - -} - -struct icalproperty_impl* -icalproperty_new_impl (icalproperty_kind kind) -{ - struct icalproperty_impl* prop; - - if ( ( prop = (struct icalproperty_impl*) - malloc(sizeof(struct icalproperty_impl))) == 0) { - icalerror_set_errno(ICAL_NEWFAILED_ERROR); - return 0; - } - - strcpy(prop->id,"prop"); - - prop->kind = kind; - prop->parameters = pvl_newlist(); - prop->parameter_iterator = 0; - prop->value = 0; - prop->x_name = 0; - prop->parent = 0; - - return prop; -} - - -icalproperty* -icalproperty_new (icalproperty_kind kind) -{ - icalproperty *prop = (icalproperty*)icalproperty_new_impl(kind); - - return prop; -} - - -icalproperty* -icalproperty_new_clone(icalproperty* prop) -{ - struct icalproperty_impl *old = (struct icalproperty_impl*)prop; - struct icalproperty_impl *new = icalproperty_new_impl(old->kind); - pvl_elem p; - - icalerror_check_arg_rz((prop!=0),"Prop"); - icalerror_check_arg_rz((old!=0),"old"); - icalerror_check_arg_rz((new!=0),"new"); - - if (old->value !=0) { - new->value = icalvalue_new_clone(old->value); - } - - if (old->x_name != 0) { - - new->x_name = strdup(old->x_name); - - if (new->x_name == 0) { - icalproperty_free(new); - icalerror_set_errno(ICAL_NEWFAILED_ERROR); - return 0; - } - } - - for(p=pvl_head(old->parameters);p != 0; p = pvl_next(p)){ - icalparameter *param = icalparameter_new_clone(pvl_data(p)); - - if (param == 0){ - icalproperty_free(new); - icalerror_set_errno(ICAL_NEWFAILED_ERROR); - return 0; - } - - pvl_push(new->parameters,param); - - } - - return new; - -} - -/* This one works a little differently from the other *_from_string - routines; the string input is the name of the property, not the - data associated with the property, as it is in - icalvalue_from_string. All of the parsing associated with - properties is driven by routines in icalparse.c */ - -icalproperty* icalproperty_new_from_string(char* str) -{ - icalproperty_kind kind; - - icalerror_check_arg_rz( (str!=0),"str"); - - kind = icalenum_string_to_property_kind(str); - - if (kind == ICAL_NO_PROPERTY){ - - if( str[0] == 'X' && str[1] == '-'){ - icalproperty *p = icalproperty_new(ICAL_X_PROPERTY); - icalproperty_set_x_name(p,str); - return p; - } else { - icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR); - return 0; - } - - } else { - return icalproperty_new(kind); - } -} - -void -icalproperty_free (icalproperty* prop) -{ - struct icalproperty_impl *p; - - icalparameter* param; - - icalerror_check_arg_rv((prop!=0),"prop"); - - p = (struct icalproperty_impl*)prop; - -#ifdef ICAL_FREE_ON_LIST_IS_ERROR - icalerror_assert( (p->parent ==0),"Tried to free a property that is still attached to a component. "); - -#else - if(p->parent !=0){ - return; - } -#endif - - if (p->value != 0){ - icalvalue_set_parent(p->value,0); - icalvalue_free(p->value); - } - - while( (param = pvl_pop(p->parameters)) != 0){ - icalparameter_free(param); - } - - pvl_free(p->parameters); - - if (p->x_name != 0) { - free(p->x_name); - } - - p->kind = ICAL_NO_PROPERTY; - p->parameters = 0; - p->parameter_iterator = 0; - p->value = 0; - p->x_name = 0; - p->id[0] = 'X'; - - free(p); - -} - - -char* -icalproperty_as_ical_string (icalproperty* prop) -{ - icalparameter *param; - - /* Create new buffer that we can append names, parameters and a - value to, and reallocate as needed. Later, this buffer will be - copied to a icalmemory_tmp_buffer, which is managed internally - by libical, so it can be given to the caller without fear of - the caller forgetting to free it */ - - char* property_name = 0; - size_t buf_size = 1024; - char* buf = icalmemory_new_buffer(buf_size); - char* buf_ptr = buf; - icalvalue* value; - char *out_buf; - -#ifdef ICAL_UNIX_NEWLINE - char newline[] = "\n"; -#else - char newline[] = "\r\n"; -#endif - - struct icalproperty_impl *impl = (struct icalproperty_impl*)prop; - - icalerror_check_arg_rz( (prop!=0),"prop"); - - /* Append property name */ - - if (impl->kind == ICAL_X_PROPERTY && impl->x_name != 0){ - property_name = impl->x_name; - } else { - property_name = icalenum_property_kind_to_string(impl->kind); - } - - if (property_name == 0 ) { - icalerror_warn("Got a property of an unknown kind."); - icalmemory_free_buffer(buf); - return 0; - - } - - - icalmemory_append_string(&buf, &buf_ptr, &buf_size, property_name); - icalmemory_append_string(&buf, &buf_ptr, &buf_size, newline); - - /* Append parameters */ - for(param = icalproperty_get_first_parameter(prop,ICAL_ANY_PARAMETER); - param != 0; - param = icalproperty_get_next_parameter(prop,ICAL_ANY_PARAMETER)) { - - char* kind_string = icalparameter_as_ical_string(param); - - if (kind_string == 0 ) { - char temp[TMP_BUF_SIZE]; - snprintf(temp, TMP_BUF_SIZE,"Got a parameter of unknown kind in %s property",property_name); - icalerror_warn(temp); - continue; - } - - icalmemory_append_string(&buf, &buf_ptr, &buf_size, " ;"); - icalmemory_append_string(&buf, &buf_ptr, &buf_size, kind_string); - icalmemory_append_string(&buf, &buf_ptr, &buf_size, newline); - - } - - /* Append value */ - - icalmemory_append_string(&buf, &buf_ptr, &buf_size, " :"); - - value = icalproperty_get_value(prop); - - if (value != 0){ - icalmemory_append_string(&buf, &buf_ptr, &buf_size, - icalvalue_as_ical_string(icalproperty_get_value(prop))); - } else { - icalmemory_append_string(&buf, &buf_ptr, &buf_size,"ERROR: No Value"); - - } - - icalmemory_append_string(&buf, &buf_ptr, &buf_size, newline); - - /* Now, copy the buffer to a tmp_buffer, which is safe to give to - the caller without worring about de-allocating it. */ - - - out_buf = icalmemory_tmp_buffer(strlen(buf)+1); - strcpy(out_buf, buf); - - icalmemory_free_buffer(buf); - - return out_buf; -} - - - -icalproperty_kind -icalproperty_isa (icalproperty* property) -{ - struct icalproperty_impl *p = (struct icalproperty_impl*)property; - - if(property != 0){ - return p->kind; - } - - return ICAL_NO_PROPERTY; -} - -int -icalproperty_isa_property (void* property) -{ - struct icalproperty_impl *impl = (struct icalproperty_impl*)property; - - icalerror_check_arg_rz( (property!=0), "property"); - - if (strcmp(impl->id,"prop") == 0) { - return 1; - } else { - return 0; - } -} - - -void -icalproperty_add_parameter (icalproperty* prop,icalparameter* parameter) -{ - struct icalproperty_impl *p = (struct icalproperty_impl*)prop; - - icalerror_check_arg_rv( (prop!=0),"prop"); - icalerror_check_arg_rv( (parameter!=0),"parameter"); - - pvl_push(p->parameters, parameter); - -} - - -void -icalproperty_remove_parameter (icalproperty* prop, icalparameter_kind kind) -{ - icalerror_check_arg_rv((prop!=0),"prop"); - - assert(0); /* This routine is not implemented */ -} - - -int -icalproperty_count_parameters (icalproperty* prop) -{ - struct icalproperty_impl *p = (struct icalproperty_impl*)prop; - - if(prop != 0){ - return pvl_count(p->parameters); - } - - icalerror_set_errno(ICAL_USAGE_ERROR); - return -1; -} - - -icalparameter* -icalproperty_get_first_parameter (icalproperty* prop, icalparameter_kind kind) -{ - struct icalproperty_impl *p = (struct icalproperty_impl*)prop; - - icalerror_check_arg_rz( (prop!=0),"prop"); - - p->parameter_iterator = pvl_head(p->parameters); - - if (p->parameter_iterator == 0) { - return 0; - } - - return (icalparameter*) pvl_data(p->parameter_iterator); -} - - -icalparameter* -icalproperty_get_next_parameter (icalproperty* prop, icalparameter_kind kind) -{ - struct icalproperty_impl *p = (struct icalproperty_impl*)prop; - icalerror_check_arg_rz( (prop!=0),"prop"); - - if (p->parameter_iterator == 0 ) { - return 0; - } - - p->parameter_iterator = pvl_next(p->parameter_iterator); - - if (p->parameter_iterator == 0 ) { - return 0; - } - - return (icalparameter*) pvl_data(p->parameter_iterator); -} - -void -icalproperty_set_value (icalproperty* prop, icalvalue* value) -{ - struct icalproperty_impl *p = (struct icalproperty_impl*)prop; - - icalerror_check_arg_rv((prop !=0),"prop"); - icalerror_check_arg_rv((value !=0),"value"); - - if (p->value != 0){ - icalvalue_set_parent(p->value,0); - icalvalue_free(p->value); - p->value = 0; - } - - p->value = value; - - icalvalue_set_parent(value,prop); -} - - -icalvalue* -icalproperty_get_value (icalproperty* prop) -{ - struct icalproperty_impl *p = (struct icalproperty_impl*)prop; - - icalerror_check_arg_rz( (prop!=0),"prop"); - - return p->value; -} - - -void icalproperty_set_x_name(icalproperty* prop, char* name) -{ - struct icalproperty_impl *impl = (struct icalproperty_impl*)prop; - - icalerror_check_arg_rv( (name!=0),"name"); - icalerror_check_arg_rv( (prop!=0),"prop"); - - if (impl->x_name != 0) { - free(impl->x_name); - } - - impl->x_name = strdup(name); - - if(impl->x_name == 0){ - icalerror_set_errno(ICAL_ALLOCATION_ERROR); - } - -} - -char* icalproperty_get_x_name(icalproperty* prop){ - - struct icalproperty_impl *impl = (struct icalproperty_impl*)prop; - - icalerror_check_arg_rz( (prop!=0),"prop"); - - return impl->x_name; -} - - -void icalproperty_set_parent(icalproperty* property, - icalcomponent* component) -{ - struct icalproperty_impl *impl = (struct icalproperty_impl*)property; - - icalerror_check_arg_rv( (property!=0),"property"); - - impl->parent = component; -} - -icalcomponent* icalproperty_get_parent(icalproperty* property) -{ - struct icalproperty_impl *impl = (struct icalproperty_impl*)property; - - icalerror_check_arg_rv( (property!=0),"property"); - - return impl->parent; -} - - -/* Everything below this line is machine generated. Do not edit. */ - -/* METHOD */ - -icalproperty* icalproperty_new_method(icalproperty_method v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_METHOD_PROPERTY); - - - icalproperty_set_method((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_method(icalproperty_method v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_METHOD_PROPERTY); - - - icalproperty_set_method((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_method(icalproperty* prop, icalproperty_method v) -{ - icalvalue *value; - - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_method(v); - - icalproperty_set_value(prop,value); - -} - -icalproperty_method icalproperty_get_method(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_method(value); -} - -/* LAST-MODIFIED */ - -icalproperty* icalproperty_new_lastmodified(struct icaltimetype v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_LASTMODIFIED_PROPERTY); - - - icalproperty_set_lastmodified((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_lastmodified(struct icaltimetype v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_LASTMODIFIED_PROPERTY); - - - icalproperty_set_lastmodified((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_lastmodified(icalproperty* prop, struct icaltimetype v) -{ - icalvalue *value; - - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_datetime(v); - - icalproperty_set_value(prop,value); - -} - -struct icaltimetype icalproperty_get_lastmodified(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_datetime(value); -} - -/* UID */ - -icalproperty* icalproperty_new_uid(char* v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_UID_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_uid((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_uid(char* v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_UID_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_uid((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_uid(icalproperty* prop, char* v) -{ - icalvalue *value; - - icalerror_check_arg_rv( (v!=0),"v"); - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_text(v); - - icalproperty_set_value(prop,value); - -} - -char* icalproperty_get_uid(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_text(value); -} - -/* PRODID */ - -icalproperty* icalproperty_new_prodid(char* v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_PRODID_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_prodid((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_prodid(char* v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_PRODID_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_prodid((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_prodid(icalproperty* prop, char* v) -{ - icalvalue *value; - - icalerror_check_arg_rv( (v!=0),"v"); - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_text(v); - - icalproperty_set_value(prop,value); - -} - -char* icalproperty_get_prodid(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_text(value); -} - -/* STATUS */ - -icalproperty* icalproperty_new_status(char* v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_STATUS_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_status((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_status(char* v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_STATUS_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_status((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_status(icalproperty* prop, char* v) -{ - icalvalue *value; - - icalerror_check_arg_rv( (v!=0),"v"); - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_text(v); - - icalproperty_set_value(prop,value); - -} - -char* icalproperty_get_status(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_text(value); -} - -/* DESCRIPTION */ - -icalproperty* icalproperty_new_description(char* v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DESCRIPTION_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_description((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_description(char* v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DESCRIPTION_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_description((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_description(icalproperty* prop, char* v) -{ - icalvalue *value; - - icalerror_check_arg_rv( (v!=0),"v"); - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_text(v); - - icalproperty_set_value(prop,value); - -} - -char* icalproperty_get_description(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_text(value); -} - -/* DURATION */ - -icalproperty* icalproperty_new_duration(struct icaldurationtype v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DURATION_PROPERTY); - - - icalproperty_set_duration((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_duration(struct icaldurationtype v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DURATION_PROPERTY); - - - icalproperty_set_duration((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_duration(icalproperty* prop, struct icaldurationtype v) -{ - icalvalue *value; - - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_duration(v); - - icalproperty_set_value(prop,value); - -} - -struct icaldurationtype icalproperty_get_duration(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_duration(value); -} - -/* CATEGORIES */ - -icalproperty* icalproperty_new_categories(char* v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CATEGORIES_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_categories((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_categories(char* v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CATEGORIES_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_categories((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_categories(icalproperty* prop, char* v) -{ - icalvalue *value; - - icalerror_check_arg_rv( (v!=0),"v"); - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_text(v); - - icalproperty_set_value(prop,value); - -} - -char* icalproperty_get_categories(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_text(value); -} - -/* VERSION */ - -icalproperty* icalproperty_new_version(char* v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_VERSION_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_version((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_version(char* v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_VERSION_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_version((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_version(icalproperty* prop, char* v) -{ - icalvalue *value; - - icalerror_check_arg_rv( (v!=0),"v"); - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_text(v); - - icalproperty_set_value(prop,value); - -} - -char* icalproperty_get_version(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_text(value); -} - -/* TZOFFSETFROM */ - -icalproperty* icalproperty_new_tzoffsetfrom(int v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TZOFFSETFROM_PROPERTY); - - - icalproperty_set_tzoffsetfrom((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_tzoffsetfrom(int v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TZOFFSETFROM_PROPERTY); - - - icalproperty_set_tzoffsetfrom((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_tzoffsetfrom(icalproperty* prop, int v) -{ - icalvalue *value; - - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_utcoffset(v); - - icalproperty_set_value(prop,value); - -} - -int icalproperty_get_tzoffsetfrom(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_utcoffset(value); -} - -/* RRULE */ - -icalproperty* icalproperty_new_rrule(struct icalrecurrencetype v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_RRULE_PROPERTY); - - - icalproperty_set_rrule((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_rrule(struct icalrecurrencetype v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_RRULE_PROPERTY); - - - icalproperty_set_rrule((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_rrule(icalproperty* prop, struct icalrecurrencetype v) -{ - icalvalue *value; - - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_recur(v); - - icalproperty_set_value(prop,value); - -} - -struct icalrecurrencetype icalproperty_get_rrule(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_recur(value); -} - -/* ATTENDEE */ - -icalproperty* icalproperty_new_attendee(char* v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_ATTENDEE_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_attendee((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_attendee(char* v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_ATTENDEE_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_attendee((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_attendee(icalproperty* prop, char* v) -{ - icalvalue *value; - - icalerror_check_arg_rv( (v!=0),"v"); - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_caladdress(v); - - icalproperty_set_value(prop,value); - -} - -char* icalproperty_get_attendee(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_caladdress(value); -} - -/* CONTACT */ - -icalproperty* icalproperty_new_contact(char* v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CONTACT_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_contact((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_contact(char* v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CONTACT_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_contact((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_contact(icalproperty* prop, char* v) -{ - icalvalue *value; - - icalerror_check_arg_rv( (v!=0),"v"); - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_text(v); - - icalproperty_set_value(prop,value); - -} - -char* icalproperty_get_contact(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_text(value); -} - -/* RELATED-TO */ - -icalproperty* icalproperty_new_relatedto(char* v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_RELATEDTO_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_relatedto((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_relatedto(char* v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_RELATEDTO_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_relatedto((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_relatedto(icalproperty* prop, char* v) -{ - icalvalue *value; - - icalerror_check_arg_rv( (v!=0),"v"); - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_text(v); - - icalproperty_set_value(prop,value); - -} - -char* icalproperty_get_relatedto(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_text(value); -} - -/* ORGANIZER */ - -icalproperty* icalproperty_new_organizer(char* v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_ORGANIZER_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_organizer((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_organizer(char* v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_ORGANIZER_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_organizer((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_organizer(icalproperty* prop, char* v) -{ - icalvalue *value; - - icalerror_check_arg_rv( (v!=0),"v"); - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_caladdress(v); - - icalproperty_set_value(prop,value); - -} - -char* icalproperty_get_organizer(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_caladdress(value); -} - -/* COMMENT */ - -icalproperty* icalproperty_new_comment(char* v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_COMMENT_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_comment((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_comment(char* v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_COMMENT_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_comment((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_comment(icalproperty* prop, char* v) -{ - icalvalue *value; - - icalerror_check_arg_rv( (v!=0),"v"); - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_text(v); - - icalproperty_set_value(prop,value); - -} - -char* icalproperty_get_comment(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_text(value); -} - -/* TRIGGER */ - -icalproperty* icalproperty_new_trigger(union icaltriggertype v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TRIGGER_PROPERTY); - - - icalproperty_set_trigger((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_trigger(union icaltriggertype v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TRIGGER_PROPERTY); - - - icalproperty_set_trigger((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_trigger(icalproperty* prop, union icaltriggertype v) -{ - icalvalue *value; - - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_trigger(v); - - icalproperty_set_value(prop,value); - -} - -union icaltriggertype icalproperty_get_trigger(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_trigger(value); -} - -/* X-LIC-ERROR */ - -icalproperty* icalproperty_new_xlicerror(char* v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICERROR_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_xlicerror((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_xlicerror(char* v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICERROR_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_xlicerror((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_xlicerror(icalproperty* prop, char* v) -{ - icalvalue *value; - - icalerror_check_arg_rv( (v!=0),"v"); - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_text(v); - - icalproperty_set_value(prop,value); - -} - -char* icalproperty_get_xlicerror(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_text(value); -} - -/* CLASS */ - -icalproperty* icalproperty_new_class(char* v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CLASS_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_class((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_class(char* v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CLASS_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_class((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_class(icalproperty* prop, char* v) -{ - icalvalue *value; - - icalerror_check_arg_rv( (v!=0),"v"); - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_text(v); - - icalproperty_set_value(prop,value); - -} - -char* icalproperty_get_class(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_text(value); -} - -/* TZOFFSETTO */ - -icalproperty* icalproperty_new_tzoffsetto(int v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TZOFFSETTO_PROPERTY); - - - icalproperty_set_tzoffsetto((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_tzoffsetto(int v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TZOFFSETTO_PROPERTY); - - - icalproperty_set_tzoffsetto((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_tzoffsetto(icalproperty* prop, int v) -{ - icalvalue *value; - - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_utcoffset(v); - - icalproperty_set_value(prop,value); - -} - -int icalproperty_get_tzoffsetto(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_utcoffset(value); -} - -/* TRANSP */ - -icalproperty* icalproperty_new_transp(char* v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TRANSP_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_transp((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_transp(char* v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TRANSP_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_transp((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_transp(icalproperty* prop, char* v) -{ - icalvalue *value; - - icalerror_check_arg_rv( (v!=0),"v"); - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_text(v); - - icalproperty_set_value(prop,value); - -} - -char* icalproperty_get_transp(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_text(value); -} - -/* SEQUENCE */ - -icalproperty* icalproperty_new_sequence(int v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_SEQUENCE_PROPERTY); - - - icalproperty_set_sequence((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_sequence(int v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_SEQUENCE_PROPERTY); - - - icalproperty_set_sequence((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_sequence(icalproperty* prop, int v) -{ - icalvalue *value; - - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_integer(v); - - icalproperty_set_value(prop,value); - -} - -int icalproperty_get_sequence(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_integer(value); -} - -/* LOCATION */ - -icalproperty* icalproperty_new_location(char* v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_LOCATION_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_location((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_location(char* v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_LOCATION_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_location((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_location(icalproperty* prop, char* v) -{ - icalvalue *value; - - icalerror_check_arg_rv( (v!=0),"v"); - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_text(v); - - icalproperty_set_value(prop,value); - -} - -char* icalproperty_get_location(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_text(value); -} - -/* REQUEST-STATUS */ - -icalproperty* icalproperty_new_requeststatus(char* v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_REQUESTSTATUS_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_requeststatus((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_requeststatus(char* v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_REQUESTSTATUS_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_requeststatus((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_requeststatus(icalproperty* prop, char* v) -{ - icalvalue *value; - - icalerror_check_arg_rv( (v!=0),"v"); - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_string(v); - - icalproperty_set_value(prop,value); - -} - -char* icalproperty_get_requeststatus(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_string(value); -} - -/* EXDATE */ - -icalproperty* icalproperty_new_exdate(struct icaltimetype v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_EXDATE_PROPERTY); - - - icalproperty_set_exdate((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_exdate(struct icaltimetype v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_EXDATE_PROPERTY); - - - icalproperty_set_exdate((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_exdate(icalproperty* prop, struct icaltimetype v) -{ - icalvalue *value; - - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_datetimedate(v); - - icalproperty_set_value(prop,value); - -} - -struct icaltimetype icalproperty_get_exdate(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_datetimedate(value); -} - -/* TZID */ - -icalproperty* icalproperty_new_tzid(char* v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TZID_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_tzid((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_tzid(char* v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TZID_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_tzid((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_tzid(icalproperty* prop, char* v) -{ - icalvalue *value; - - icalerror_check_arg_rv( (v!=0),"v"); - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_text(v); - - icalproperty_set_value(prop,value); - -} - -char* icalproperty_get_tzid(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_text(value); -} - -/* RESOURCES */ - -icalproperty* icalproperty_new_resources(char* v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_RESOURCES_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_resources((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_resources(char* v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_RESOURCES_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_resources((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_resources(icalproperty* prop, char* v) -{ - icalvalue *value; - - icalerror_check_arg_rv( (v!=0),"v"); - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_text(v); - - icalproperty_set_value(prop,value); - -} - -char* icalproperty_get_resources(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_text(value); -} - -/* TZURL */ - -icalproperty* icalproperty_new_tzurl(char* v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TZURL_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_tzurl((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_tzurl(char* v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TZURL_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_tzurl((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_tzurl(icalproperty* prop, char* v) -{ - icalvalue *value; - - icalerror_check_arg_rv( (v!=0),"v"); - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_uri(v); - - icalproperty_set_value(prop,value); - -} - -char* icalproperty_get_tzurl(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_uri(value); -} - -/* REPEAT */ - -icalproperty* icalproperty_new_repeat(int v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_REPEAT_PROPERTY); - - - icalproperty_set_repeat((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_repeat(int v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_REPEAT_PROPERTY); - - - icalproperty_set_repeat((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_repeat(icalproperty* prop, int v) -{ - icalvalue *value; - - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_integer(v); - - icalproperty_set_value(prop,value); - -} - -int icalproperty_get_repeat(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_integer(value); -} - -/* PRIORITY */ - -icalproperty* icalproperty_new_priority(int v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_PRIORITY_PROPERTY); - - - icalproperty_set_priority((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_priority(int v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_PRIORITY_PROPERTY); - - - icalproperty_set_priority((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_priority(icalproperty* prop, int v) -{ - icalvalue *value; - - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_integer(v); - - icalproperty_set_value(prop,value); - -} - -int icalproperty_get_priority(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_integer(value); -} - -/* FREEBUSY */ - -icalproperty* icalproperty_new_freebusy(struct icalperiodtype v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_FREEBUSY_PROPERTY); - - - icalproperty_set_freebusy((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_freebusy(struct icalperiodtype v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_FREEBUSY_PROPERTY); - - - icalproperty_set_freebusy((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_freebusy(icalproperty* prop, struct icalperiodtype v) -{ - icalvalue *value; - - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_period(v); - - icalproperty_set_value(prop,value); - -} - -struct icalperiodtype icalproperty_get_freebusy(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_period(value); -} - -/* DTSTART */ - -icalproperty* icalproperty_new_dtstart(struct icaltimetype v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DTSTART_PROPERTY); - - - icalproperty_set_dtstart((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_dtstart(struct icaltimetype v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DTSTART_PROPERTY); - - - icalproperty_set_dtstart((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_dtstart(icalproperty* prop, struct icaltimetype v) -{ - icalvalue *value; - - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_datetimedate(v); - - icalproperty_set_value(prop,value); - -} - -struct icaltimetype icalproperty_get_dtstart(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_datetimedate(value); -} - -/* RECURRENCE-ID */ - -icalproperty* icalproperty_new_recurrenceid(struct icaltimetype v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_RECURRENCEID_PROPERTY); - - - icalproperty_set_recurrenceid((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_recurrenceid(struct icaltimetype v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_RECURRENCEID_PROPERTY); - - - icalproperty_set_recurrenceid((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_recurrenceid(icalproperty* prop, struct icaltimetype v) -{ - icalvalue *value; - - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_datetimedate(v); - - icalproperty_set_value(prop,value); - -} - -struct icaltimetype icalproperty_get_recurrenceid(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_datetimedate(value); -} - -/* SUMMARY */ - -icalproperty* icalproperty_new_summary(char* v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_SUMMARY_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_summary((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_summary(char* v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_SUMMARY_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_summary((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_summary(icalproperty* prop, char* v) -{ - icalvalue *value; - - icalerror_check_arg_rv( (v!=0),"v"); - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_text(v); - - icalproperty_set_value(prop,value); - -} - -char* icalproperty_get_summary(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_text(value); -} - -/* DTEND */ - -icalproperty* icalproperty_new_dtend(struct icaltimetype v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DTEND_PROPERTY); - - - icalproperty_set_dtend((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_dtend(struct icaltimetype v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DTEND_PROPERTY); - - - icalproperty_set_dtend((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_dtend(icalproperty* prop, struct icaltimetype v) -{ - icalvalue *value; - - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_datetimedate(v); - - icalproperty_set_value(prop,value); - -} - -struct icaltimetype icalproperty_get_dtend(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_datetimedate(value); -} - -/* TZNAME */ - -icalproperty* icalproperty_new_tzname(char* v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TZNAME_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_tzname((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_tzname(char* v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TZNAME_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_tzname((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_tzname(icalproperty* prop, char* v) -{ - icalvalue *value; - - icalerror_check_arg_rv( (v!=0),"v"); - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_text(v); - - icalproperty_set_value(prop,value); - -} - -char* icalproperty_get_tzname(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_text(value); -} - -/* RDATE */ - -icalproperty* icalproperty_new_rdate(struct icalperiodtype v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_RDATE_PROPERTY); - - - icalproperty_set_rdate((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_rdate(struct icalperiodtype v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_RDATE_PROPERTY); - - - icalproperty_set_rdate((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_rdate(icalproperty* prop, struct icalperiodtype v) -{ - icalvalue *value; - - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_datetimeperiod(v); - - icalproperty_set_value(prop,value); - -} - -struct icalperiodtype icalproperty_get_rdate(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_datetimeperiod(value); -} - -/* URL */ - -icalproperty* icalproperty_new_url(char* v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_URL_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_url((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_url(char* v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_URL_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_url((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_url(icalproperty* prop, char* v) -{ - icalvalue *value; - - icalerror_check_arg_rv( (v!=0),"v"); - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_uri(v); - - icalproperty_set_value(prop,value); - -} - -char* icalproperty_get_url(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_uri(value); -} - -/* ATTACH */ - -icalproperty* icalproperty_new_attach(struct icalattachtype v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_ATTACH_PROPERTY); - - - icalproperty_set_attach((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_attach(struct icalattachtype v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_ATTACH_PROPERTY); - - - icalproperty_set_attach((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_attach(icalproperty* prop, struct icalattachtype v) -{ - icalvalue *value; - - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_attach(v); - - icalproperty_set_value(prop,value); - -} - -struct icalattachtype icalproperty_get_attach(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_attach(value); -} - -/* X-LIC-CLUSTERCOUNT */ - -icalproperty* icalproperty_new_xlicclustercount(int v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICCLUSTERCOUNT_PROPERTY); - - - icalproperty_set_xlicclustercount((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_xlicclustercount(int v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICCLUSTERCOUNT_PROPERTY); - - - icalproperty_set_xlicclustercount((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_xlicclustercount(icalproperty* prop, int v) -{ - icalvalue *value; - - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_integer(v); - - icalproperty_set_value(prop,value); - -} - -int icalproperty_get_xlicclustercount(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_integer(value); -} - -/* EXRULE */ - -icalproperty* icalproperty_new_exrule(struct icalrecurrencetype v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_EXRULE_PROPERTY); - - - icalproperty_set_exrule((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_exrule(struct icalrecurrencetype v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_EXRULE_PROPERTY); - - - icalproperty_set_exrule((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_exrule(icalproperty* prop, struct icalrecurrencetype v) -{ - icalvalue *value; - - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_recur(v); - - icalproperty_set_value(prop,value); - -} - -struct icalrecurrencetype icalproperty_get_exrule(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_recur(value); -} - -/* QUERY */ - -icalproperty* icalproperty_new_query(char* v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_QUERY_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_query((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_query(char* v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_QUERY_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_query((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_query(icalproperty* prop, char* v) -{ - icalvalue *value; - - icalerror_check_arg_rv( (v!=0),"v"); - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_query(v); - - icalproperty_set_value(prop,value); - -} - -char* icalproperty_get_query(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_query(value); -} - -/* PERCENT-COMPLETE */ - -icalproperty* icalproperty_new_percentcomplete(int v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_PERCENTCOMPLETE_PROPERTY); - - - icalproperty_set_percentcomplete((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_percentcomplete(int v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_PERCENTCOMPLETE_PROPERTY); - - - icalproperty_set_percentcomplete((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_percentcomplete(icalproperty* prop, int v) -{ - icalvalue *value; - - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_integer(v); - - icalproperty_set_value(prop,value); - -} - -int icalproperty_get_percentcomplete(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_integer(value); -} - -/* CALSCALE */ - -icalproperty* icalproperty_new_calscale(char* v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CALSCALE_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_calscale((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_calscale(char* v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CALSCALE_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_calscale((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_calscale(icalproperty* prop, char* v) -{ - icalvalue *value; - - icalerror_check_arg_rv( (v!=0),"v"); - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_text(v); - - icalproperty_set_value(prop,value); - -} - -char* icalproperty_get_calscale(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_text(value); -} - -/* CREATED */ - -icalproperty* icalproperty_new_created(struct icaltimetype v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CREATED_PROPERTY); - - - icalproperty_set_created((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_created(struct icaltimetype v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CREATED_PROPERTY); - - - icalproperty_set_created((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_created(icalproperty* prop, struct icaltimetype v) -{ - icalvalue *value; - - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_datetime(v); - - icalproperty_set_value(prop,value); - -} - -struct icaltimetype icalproperty_get_created(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_datetime(value); -} - -/* GEO */ - -icalproperty* icalproperty_new_geo(struct icalgeotype v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_GEO_PROPERTY); - - - icalproperty_set_geo((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_geo(struct icalgeotype v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_GEO_PROPERTY); - - - icalproperty_set_geo((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_geo(icalproperty* prop, struct icalgeotype v) -{ - icalvalue *value; - - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_geo(v); - - icalproperty_set_value(prop,value); - -} - -struct icalgeotype icalproperty_get_geo(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_geo(value); -} - -/* COMPLETED */ - -icalproperty* icalproperty_new_completed(struct icaltimetype v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_COMPLETED_PROPERTY); - - - icalproperty_set_completed((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_completed(struct icaltimetype v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_COMPLETED_PROPERTY); - - - icalproperty_set_completed((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_completed(icalproperty* prop, struct icaltimetype v) -{ - icalvalue *value; - - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_datetime(v); - - icalproperty_set_value(prop,value); - -} - -struct icaltimetype icalproperty_get_completed(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_datetime(value); -} - -/* DTSTAMP */ - -icalproperty* icalproperty_new_dtstamp(struct icaltimetype v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DTSTAMP_PROPERTY); - - - icalproperty_set_dtstamp((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_dtstamp(struct icaltimetype v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DTSTAMP_PROPERTY); - - - icalproperty_set_dtstamp((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_dtstamp(icalproperty* prop, struct icaltimetype v) -{ - icalvalue *value; - - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_datetime(v); - - icalproperty_set_value(prop,value); - -} - -struct icaltimetype icalproperty_get_dtstamp(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_datetime(value); -} - -/* DUE */ - -icalproperty* icalproperty_new_due(struct icaltimetype v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DUE_PROPERTY); - - - icalproperty_set_due((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_due(struct icaltimetype v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DUE_PROPERTY); - - - icalproperty_set_due((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_due(icalproperty* prop, struct icaltimetype v) -{ - icalvalue *value; - - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_datetimedate(v); - - icalproperty_set_value(prop,value); - -} - -struct icaltimetype icalproperty_get_due(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_datetimedate(value); -} - -/* ACTION */ - -icalproperty* icalproperty_new_action(char* v) -{ - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_ACTION_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_action((icalproperty*)impl,v); - - return (icalproperty*)impl; -} - -icalproperty* icalproperty_vanew_action(char* v, ...) -{ - va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_ACTION_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - - - icalproperty_set_action((icalproperty*)impl,v); - - va_start(args,v); - icalproperty_add_parameters(impl, args); - va_end(args); - - return (icalproperty*)impl; -} - -void icalproperty_set_action(icalproperty* prop, char* v) -{ - icalvalue *value; - - icalerror_check_arg_rv( (v!=0),"v"); - - icalerror_check_arg_rv( (prop!=0),"prop"); - - value = icalvalue_new_text(v); - - icalproperty_set_value(prop,value); - -} - -char* icalproperty_get_action(icalproperty* prop) -{ - icalvalue *value; - icalerror_check_arg( (prop!=0),"prop"); - - value = icalproperty_get_value(prop); - - return icalvalue_get_text(value); -} diff --git a/libical/src/libical/icalproperty.h b/libical/src/libical/icalproperty.h deleted file mode 100644 index 2cd28fe179..0000000000 --- a/libical/src/libical/icalproperty.h +++ /dev/null @@ -1,368 +0,0 @@ -/* -*- Mode: C -*- - ====================================================================== - FILE: icalderivedproperties.{c,h} - CREATOR: eric 09 May 1999 - - $Id$ - - (C) COPYRIGHT 1999 Eric Busboom - http://www.softwarestudio.org - - The contents of this file are subject to the Mozilla Public License - Version 1.0 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and - limitations under the License. - - - ======================================================================*/ - - -#ifndef ICALPROPERTY_H -#define ICALPROPERTY_H - -#include - -typedef void icalproperty; - -icalproperty* icalproperty_new(icalproperty_kind kind); - -icalproperty* icalproperty_new_clone(icalproperty * prop); - -icalproperty* icalproperty_new_from_string(char* str); - -char* icalproperty_as_ical_string(icalproperty* prop); - -void icalproperty_free(icalproperty* prop); - -icalproperty_kind icalproperty_isa(icalproperty* property); -int icalproperty_isa_property(void* property); - -void icalproperty_add_parameter(icalproperty* prop,icalparameter* parameter); - -void icalproperty_remove_parameter(icalproperty* prop, - icalparameter_kind kind); - -int icalproperty_count_parameters(icalproperty* prop); - -/* Iterate through the parameters */ -icalparameter* icalproperty_get_first_parameter(icalproperty* prop, - icalparameter_kind kind); -icalparameter* icalproperty_get_next_parameter(icalproperty* prop, - icalparameter_kind kind); -/* Access the value of the property */ -void icalproperty_set_value(icalproperty* prop, icalvalue* value); -icalvalue* icalproperty_get_value(icalproperty* prop); - -/* Deal with X properties */ - -void icalproperty_set_x_name(icalproperty* prop, char* name); -char* icalproperty_get_x_name(icalproperty* prop); - - -/* Everything below this line is machine generated. Do not edit. */ - -/* METHOD */ -icalproperty* icalproperty_new_method(icalproperty_method v); -icalproperty* icalproperty_vanew_method(icalproperty_method v, ...); -void icalproperty_set_method(icalproperty* prop, icalproperty_method v); -icalproperty_method icalproperty_get_method(icalproperty* prop); - -/* LAST-MODIFIED */ -icalproperty* icalproperty_new_lastmodified(struct icaltimetype v); -icalproperty* icalproperty_vanew_lastmodified(struct icaltimetype v, ...); -void icalproperty_set_lastmodified(icalproperty* prop, struct icaltimetype v); -struct icaltimetype icalproperty_get_lastmodified(icalproperty* prop); - -/* UID */ -icalproperty* icalproperty_new_uid(char* v); -icalproperty* icalproperty_vanew_uid(char* v, ...); -void icalproperty_set_uid(icalproperty* prop, char* v); -char* icalproperty_get_uid(icalproperty* prop); - -/* PRODID */ -icalproperty* icalproperty_new_prodid(char* v); -icalproperty* icalproperty_vanew_prodid(char* v, ...); -void icalproperty_set_prodid(icalproperty* prop, char* v); -char* icalproperty_get_prodid(icalproperty* prop); - -/* STATUS */ -icalproperty* icalproperty_new_status(char* v); -icalproperty* icalproperty_vanew_status(char* v, ...); -void icalproperty_set_status(icalproperty* prop, char* v); -char* icalproperty_get_status(icalproperty* prop); - -/* DESCRIPTION */ -icalproperty* icalproperty_new_description(char* v); -icalproperty* icalproperty_vanew_description(char* v, ...); -void icalproperty_set_description(icalproperty* prop, char* v); -char* icalproperty_get_description(icalproperty* prop); - -/* DURATION */ -icalproperty* icalproperty_new_duration(struct icaldurationtype v); -icalproperty* icalproperty_vanew_duration(struct icaldurationtype v, ...); -void icalproperty_set_duration(icalproperty* prop, struct icaldurationtype v); -struct icaldurationtype icalproperty_get_duration(icalproperty* prop); - -/* CATEGORIES */ -icalproperty* icalproperty_new_categories(char* v); -icalproperty* icalproperty_vanew_categories(char* v, ...); -void icalproperty_set_categories(icalproperty* prop, char* v); -char* icalproperty_get_categories(icalproperty* prop); - -/* VERSION */ -icalproperty* icalproperty_new_version(char* v); -icalproperty* icalproperty_vanew_version(char* v, ...); -void icalproperty_set_version(icalproperty* prop, char* v); -char* icalproperty_get_version(icalproperty* prop); - -/* TZOFFSETFROM */ -icalproperty* icalproperty_new_tzoffsetfrom(int v); -icalproperty* icalproperty_vanew_tzoffsetfrom(int v, ...); -void icalproperty_set_tzoffsetfrom(icalproperty* prop, int v); -int icalproperty_get_tzoffsetfrom(icalproperty* prop); - -/* RRULE */ -icalproperty* icalproperty_new_rrule(struct icalrecurrencetype v); -icalproperty* icalproperty_vanew_rrule(struct icalrecurrencetype v, ...); -void icalproperty_set_rrule(icalproperty* prop, struct icalrecurrencetype v); -struct icalrecurrencetype icalproperty_get_rrule(icalproperty* prop); - -/* ATTENDEE */ -icalproperty* icalproperty_new_attendee(char* v); -icalproperty* icalproperty_vanew_attendee(char* v, ...); -void icalproperty_set_attendee(icalproperty* prop, char* v); -char* icalproperty_get_attendee(icalproperty* prop); - -/* CONTACT */ -icalproperty* icalproperty_new_contact(char* v); -icalproperty* icalproperty_vanew_contact(char* v, ...); -void icalproperty_set_contact(icalproperty* prop, char* v); -char* icalproperty_get_contact(icalproperty* prop); - -/* RELATED-TO */ -icalproperty* icalproperty_new_relatedto(char* v); -icalproperty* icalproperty_vanew_relatedto(char* v, ...); -void icalproperty_set_relatedto(icalproperty* prop, char* v); -char* icalproperty_get_relatedto(icalproperty* prop); - -/* ORGANIZER */ -icalproperty* icalproperty_new_organizer(char* v); -icalproperty* icalproperty_vanew_organizer(char* v, ...); -void icalproperty_set_organizer(icalproperty* prop, char* v); -char* icalproperty_get_organizer(icalproperty* prop); - -/* COMMENT */ -icalproperty* icalproperty_new_comment(char* v); -icalproperty* icalproperty_vanew_comment(char* v, ...); -void icalproperty_set_comment(icalproperty* prop, char* v); -char* icalproperty_get_comment(icalproperty* prop); - -/* TRIGGER */ -icalproperty* icalproperty_new_trigger(union icaltriggertype v); -icalproperty* icalproperty_vanew_trigger(union icaltriggertype v, ...); -void icalproperty_set_trigger(icalproperty* prop, union icaltriggertype v); -union icaltriggertype icalproperty_get_trigger(icalproperty* prop); - -/* X-LIC-ERROR */ -icalproperty* icalproperty_new_xlicerror(char* v); -icalproperty* icalproperty_vanew_xlicerror(char* v, ...); -void icalproperty_set_xlicerror(icalproperty* prop, char* v); -char* icalproperty_get_xlicerror(icalproperty* prop); - -/* CLASS */ -icalproperty* icalproperty_new_class(char* v); -icalproperty* icalproperty_vanew_class(char* v, ...); -void icalproperty_set_class(icalproperty* prop, char* v); -char* icalproperty_get_class(icalproperty* prop); - -/* TZOFFSETTO */ -icalproperty* icalproperty_new_tzoffsetto(int v); -icalproperty* icalproperty_vanew_tzoffsetto(int v, ...); -void icalproperty_set_tzoffsetto(icalproperty* prop, int v); -int icalproperty_get_tzoffsetto(icalproperty* prop); - -/* TRANSP */ -icalproperty* icalproperty_new_transp(char* v); -icalproperty* icalproperty_vanew_transp(char* v, ...); -void icalproperty_set_transp(icalproperty* prop, char* v); -char* icalproperty_get_transp(icalproperty* prop); - -/* SEQUENCE */ -icalproperty* icalproperty_new_sequence(int v); -icalproperty* icalproperty_vanew_sequence(int v, ...); -void icalproperty_set_sequence(icalproperty* prop, int v); -int icalproperty_get_sequence(icalproperty* prop); - -/* LOCATION */ -icalproperty* icalproperty_new_location(char* v); -icalproperty* icalproperty_vanew_location(char* v, ...); -void icalproperty_set_location(icalproperty* prop, char* v); -char* icalproperty_get_location(icalproperty* prop); - -/* REQUEST-STATUS */ -icalproperty* icalproperty_new_requeststatus(char* v); -icalproperty* icalproperty_vanew_requeststatus(char* v, ...); -void icalproperty_set_requeststatus(icalproperty* prop, char* v); -char* icalproperty_get_requeststatus(icalproperty* prop); - -/* EXDATE */ -icalproperty* icalproperty_new_exdate(struct icaltimetype v); -icalproperty* icalproperty_vanew_exdate(struct icaltimetype v, ...); -void icalproperty_set_exdate(icalproperty* prop, struct icaltimetype v); -struct icaltimetype icalproperty_get_exdate(icalproperty* prop); - -/* TZID */ -icalproperty* icalproperty_new_tzid(char* v); -icalproperty* icalproperty_vanew_tzid(char* v, ...); -void icalproperty_set_tzid(icalproperty* prop, char* v); -char* icalproperty_get_tzid(icalproperty* prop); - -/* RESOURCES */ -icalproperty* icalproperty_new_resources(char* v); -icalproperty* icalproperty_vanew_resources(char* v, ...); -void icalproperty_set_resources(icalproperty* prop, char* v); -char* icalproperty_get_resources(icalproperty* prop); - -/* TZURL */ -icalproperty* icalproperty_new_tzurl(char* v); -icalproperty* icalproperty_vanew_tzurl(char* v, ...); -void icalproperty_set_tzurl(icalproperty* prop, char* v); -char* icalproperty_get_tzurl(icalproperty* prop); - -/* REPEAT */ -icalproperty* icalproperty_new_repeat(int v); -icalproperty* icalproperty_vanew_repeat(int v, ...); -void icalproperty_set_repeat(icalproperty* prop, int v); -int icalproperty_get_repeat(icalproperty* prop); - -/* PRIORITY */ -icalproperty* icalproperty_new_priority(int v); -icalproperty* icalproperty_vanew_priority(int v, ...); -void icalproperty_set_priority(icalproperty* prop, int v); -int icalproperty_get_priority(icalproperty* prop); - -/* FREEBUSY */ -icalproperty* icalproperty_new_freebusy(struct icalperiodtype v); -icalproperty* icalproperty_vanew_freebusy(struct icalperiodtype v, ...); -void icalproperty_set_freebusy(icalproperty* prop, struct icalperiodtype v); -struct icalperiodtype icalproperty_get_freebusy(icalproperty* prop); - -/* DTSTART */ -icalproperty* icalproperty_new_dtstart(struct icaltimetype v); -icalproperty* icalproperty_vanew_dtstart(struct icaltimetype v, ...); -void icalproperty_set_dtstart(icalproperty* prop, struct icaltimetype v); -struct icaltimetype icalproperty_get_dtstart(icalproperty* prop); - -/* RECURRENCE-ID */ -icalproperty* icalproperty_new_recurrenceid(struct icaltimetype v); -icalproperty* icalproperty_vanew_recurrenceid(struct icaltimetype v, ...); -void icalproperty_set_recurrenceid(icalproperty* prop, struct icaltimetype v); -struct icaltimetype icalproperty_get_recurrenceid(icalproperty* prop); - -/* SUMMARY */ -icalproperty* icalproperty_new_summary(char* v); -icalproperty* icalproperty_vanew_summary(char* v, ...); -void icalproperty_set_summary(icalproperty* prop, char* v); -char* icalproperty_get_summary(icalproperty* prop); - -/* DTEND */ -icalproperty* icalproperty_new_dtend(struct icaltimetype v); -icalproperty* icalproperty_vanew_dtend(struct icaltimetype v, ...); -void icalproperty_set_dtend(icalproperty* prop, struct icaltimetype v); -struct icaltimetype icalproperty_get_dtend(icalproperty* prop); - -/* TZNAME */ -icalproperty* icalproperty_new_tzname(char* v); -icalproperty* icalproperty_vanew_tzname(char* v, ...); -void icalproperty_set_tzname(icalproperty* prop, char* v); -char* icalproperty_get_tzname(icalproperty* prop); - -/* RDATE */ -icalproperty* icalproperty_new_rdate(struct icalperiodtype v); -icalproperty* icalproperty_vanew_rdate(struct icalperiodtype v, ...); -void icalproperty_set_rdate(icalproperty* prop, struct icalperiodtype v); -struct icalperiodtype icalproperty_get_rdate(icalproperty* prop); - -/* URL */ -icalproperty* icalproperty_new_url(char* v); -icalproperty* icalproperty_vanew_url(char* v, ...); -void icalproperty_set_url(icalproperty* prop, char* v); -char* icalproperty_get_url(icalproperty* prop); - -/* ATTACH */ -icalproperty* icalproperty_new_attach(struct icalattachtype v); -icalproperty* icalproperty_vanew_attach(struct icalattachtype v, ...); -void icalproperty_set_attach(icalproperty* prop, struct icalattachtype v); -struct icalattachtype icalproperty_get_attach(icalproperty* prop); - -/* X-LIC-CLUSTERCOUNT */ -icalproperty* icalproperty_new_xlicclustercount(int v); -icalproperty* icalproperty_vanew_xlicclustercount(int v, ...); -void icalproperty_set_xlicclustercount(icalproperty* prop, int v); -int icalproperty_get_xlicclustercount(icalproperty* prop); - -/* EXRULE */ -icalproperty* icalproperty_new_exrule(struct icalrecurrencetype v); -icalproperty* icalproperty_vanew_exrule(struct icalrecurrencetype v, ...); -void icalproperty_set_exrule(icalproperty* prop, struct icalrecurrencetype v); -struct icalrecurrencetype icalproperty_get_exrule(icalproperty* prop); - -/* QUERY */ -icalproperty* icalproperty_new_query(char* v); -icalproperty* icalproperty_vanew_query(char* v, ...); -void icalproperty_set_query(icalproperty* prop, char* v); -char* icalproperty_get_query(icalproperty* prop); - -/* PERCENT-COMPLETE */ -icalproperty* icalproperty_new_percentcomplete(int v); -icalproperty* icalproperty_vanew_percentcomplete(int v, ...); -void icalproperty_set_percentcomplete(icalproperty* prop, int v); -int icalproperty_get_percentcomplete(icalproperty* prop); - -/* CALSCALE */ -icalproperty* icalproperty_new_calscale(char* v); -icalproperty* icalproperty_vanew_calscale(char* v, ...); -void icalproperty_set_calscale(icalproperty* prop, char* v); -char* icalproperty_get_calscale(icalproperty* prop); - -/* CREATED */ -icalproperty* icalproperty_new_created(struct icaltimetype v); -icalproperty* icalproperty_vanew_created(struct icaltimetype v, ...); -void icalproperty_set_created(icalproperty* prop, struct icaltimetype v); -struct icaltimetype icalproperty_get_created(icalproperty* prop); - -/* GEO */ -icalproperty* icalproperty_new_geo(struct icalgeotype v); -icalproperty* icalproperty_vanew_geo(struct icalgeotype v, ...); -void icalproperty_set_geo(icalproperty* prop, struct icalgeotype v); -struct icalgeotype icalproperty_get_geo(icalproperty* prop); - -/* COMPLETED */ -icalproperty* icalproperty_new_completed(struct icaltimetype v); -icalproperty* icalproperty_vanew_completed(struct icaltimetype v, ...); -void icalproperty_set_completed(icalproperty* prop, struct icaltimetype v); -struct icaltimetype icalproperty_get_completed(icalproperty* prop); - -/* DTSTAMP */ -icalproperty* icalproperty_new_dtstamp(struct icaltimetype v); -icalproperty* icalproperty_vanew_dtstamp(struct icaltimetype v, ...); -void icalproperty_set_dtstamp(icalproperty* prop, struct icaltimetype v); -struct icaltimetype icalproperty_get_dtstamp(icalproperty* prop); - -/* DUE */ -icalproperty* icalproperty_new_due(struct icaltimetype v); -icalproperty* icalproperty_vanew_due(struct icaltimetype v, ...); -void icalproperty_set_due(icalproperty* prop, struct icaltimetype v); -struct icaltimetype icalproperty_get_due(icalproperty* prop); - -/* ACTION */ -icalproperty* icalproperty_new_action(char* v); -icalproperty* icalproperty_vanew_action(char* v, ...); -void icalproperty_set_action(icalproperty* prop, char* v); -char* icalproperty_get_action(icalproperty* prop); -#endif ICALPROPERTY_H diff --git a/libical/src/libical/icalrestriction.c b/libical/src/libical/icalrestriction.c deleted file mode 100644 index d5ffb784ef..0000000000 --- a/libical/src/libical/icalrestriction.c +++ /dev/null @@ -1,1590 +0,0 @@ -/* -*- Mode: C -*- */ -/* ====================================================================== - File: icalrestriction.c - - (C) COPYRIGHT 1999 Eric Busboom - http://www.softwarestudio.org - - The contents of this file are subject to the Mozilla Public License - Version 1.0 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and - limitations under the License. - - - ======================================================================*/ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "icalenums.h" -#include "icalrestriction.h" - -#define TMP_BUF_SIZE 1024 - -/* Define the structs for the restrictions. these data are filled out -in machine generated code below */ - -typedef int (*restriction_func)(icalcomponent* comp); - -typedef struct icalrestriction_property_record { - icalproperty_method method; - icalcomponent_kind component; - icalproperty_kind property; - icalrestriction_kind restriction; - restriction_func function; -} icalrestriction_property_record; - - -typedef struct icalrestriction_component_record { - icalproperty_method method; - icalcomponent_kind component; - icalcomponent_kind subcomponent; - icalrestriction_kind restriction; - restriction_func function; -} icalrestriction_component_record; - -icalrestriction_component_record icalrestriction_component_records[]; -icalrestriction_property_record icalrestriction_property_records[]; - -/* The each row gives the result of comparing a restriction against a - count. The columns in each row represent 0,1,2+. '-1' indicates - 'invalid, 'don't care' or 'needs more analysis' So, for - ICAL_RESTRICTION_ONE, if there is 1 of a property with that - restriction, it passes, but if there are 0 or 2+, it fails. */ - -char compare_map[ICAL_RESTRICTION_UNKNOWN+1][3] = { - { 1, 1, 1},/*ICAL_RESTRICTION_NONE*/ - { 1, 0, 0},/*ICAL_RESTRICTION_ZERO*/ - { 0, 1, 0},/*ICAL_RESTRICTION_ONE*/ - { 1, 1, 1},/*ICAL_RESTRICTION_ZEROPLUS*/ - { 0, 1, 1},/*ICAL_RESTRICTION_ONEPLUS*/ - { 1, 1, 0},/*ICAL_RESTRICTION_ZEROORONE*/ - { 1, 1, 0},/*ICAL_RESTRICTION_ONEEXCLUSIVE*/ - { 1, 1, 0},/*ICAL_RESTRICTION_ONEMUTUAL*/ - { 1, 1, 1} /*ICAL_RESTRICTION_UNKNOWN*/ -}; - -char restr_string_map[ICAL_RESTRICTION_UNKNOWN+1][60] = { - "unknown number",/*ICAL_RESTRICTION_NONE*/ - "0",/*ICAL_RESTRICTION_ZERO*/ - "1",/*ICAL_RESTRICTION_ONE*/ - "zero or more",/*ICAL_RESTRICTION_ZEROPLUS*/ - "one or more" ,/*ICAL_RESTRICTION_ONEPLUS*/ - "zero or more",/*ICAL_RESTRICTION_ZEROORONE*/ - "zero or one, exclusive with another property",/*ICAL_RESTRICTION_ONEEXCLUSIVE*/ - "zero or one, mutual with another property",/*ICAL_RESTRICTION_ONEMUTUAL*/ - "unknown number" /*ICAL_RESTRICTION_UNKNOWN*/ -}; - - -int -icalrestriction_compare(icalrestriction_kind restr, int count){ - - if ( restr < ICAL_RESTRICTION_NONE || restr > ICAL_RESTRICTION_UNKNOWN - || count < 0){ - return -1; - } - - if (count > 2) { - count = 2; - } - - return compare_map[restr][count]; - -} - -int icalrestriction_check_component(icalproperty_method method, - icalcomponent* comp) -{ - icalproperty_kind kind; - icalcomponent_kind comp_kind; - icalrestriction_kind restr; - int count; - int compare; - int valid = 1; - - comp_kind = icalcomponent_isa(comp); - - /* Check all of the properties in this component */ - - for(kind = ICAL_ANY_PROPERTY+1; kind != ICAL_NO_PROPERTY; kind++){ - count = icalcomponent_count_properties(comp, kind); - - restr = icalrestriction_get_property_restriction(method, - comp_kind, - kind); - - - if(restr == ICAL_RESTRICTION_ONEEXCLUSIVE ) { - /* HACK. Treat this as a 0/1 restriction */ - restr = ICAL_RESTRICTION_ZEROORONE; - compare = icalrestriction_compare(restr,count); - } else if (restr == ICAL_RESTRICTION_ONEMUTUAL ) { - /* HACK. Treat this as a 0/1 restriction */ - restr = ICAL_RESTRICTION_ZEROORONE; - compare = icalrestriction_compare(restr,count); - } else { - compare = icalrestriction_compare(restr,count); - } - - assert(compare != -1); - - - if (compare == 0){ - char temp[TMP_BUF_SIZE]; - - snprintf(temp, TMP_BUF_SIZE,"Failed iTIP restrictions for property %s. Expected %s instances of the property and got %d", - icalenum_property_kind_to_string(kind), - restr_string_map[restr], count); - - icalcomponent_add_property - (comp, - icalproperty_vanew_xlicerror( - temp, - icalparameter_new_xlicerrortype(ICAL_XLICERRORTYPE_INVALIDITIP), - 0)); - } - - - valid = valid && compare; - } - - - - return valid; - - -} - -int icalrestriction_check(icalcomponent* outer_comp) -{ - icalcomponent_kind comp_kind; - icalproperty_method method; - icalcomponent* inner_comp; - icalproperty *method_prop; - int valid; - - icalerror_check_arg_rz( (outer_comp!=0), "outer comp"); - - - /* Get the Method value from the outer component */ - - comp_kind = icalcomponent_isa(outer_comp); - - if (comp_kind != ICAL_VCALENDAR_COMPONENT){ - icalerror_set_errno(ICAL_BADARG_ERROR); - return 0; - } - - method_prop = icalcomponent_get_first_property(outer_comp, - ICAL_METHOD_PROPERTY); - - if (method_prop == 0){ - method = ICAL_METHOD_NONE; - } else { - method = icalproperty_get_method(method_prop); - } - - - /* Check the VCALENDAR wrapper */ - valid = icalrestriction_check_component(ICAL_METHOD_NONE,outer_comp); - - - /* Now check the inner components */ - - for(inner_comp= icalcomponent_get_first_component(outer_comp, - ICAL_ANY_COMPONENT); - inner_comp != 0; - inner_comp= icalcomponent_get_next_component(outer_comp, - ICAL_ANY_COMPONENT)){ - - valid = valid && icalrestriction_check_component(method,inner_comp); - - } - - - return valid; - -} - -icalrestriction_kind -icalrestriction_get_property_restriction(icalproperty_method method, - icalcomponent_kind component, - icalproperty_kind property) -{ - int i; - - for(i = 0; - icalrestriction_property_records[i].restriction != ICAL_RESTRICTION_NONE; - i++){ - - if (method == icalrestriction_property_records[i].method && - component == icalrestriction_property_records[i].component && - property == icalrestriction_property_records[i].property ){ - return icalrestriction_property_records[i].restriction; - } - } - - return ICAL_RESTRICTION_UNKNOWN; -} - -icalrestriction_kind -icalrestriction_get_component_restriction(icalproperty_method method, - icalcomponent_kind component, - icalcomponent_kind subcomponent) -{ - - int i; - - for(i = 0; - icalrestriction_component_records[i].restriction != ICAL_RESTRICTION_NONE; - i++){ - - if (method == icalrestriction_component_records[i].method && - component == icalrestriction_component_records[i].component && - subcomponent == icalrestriction_component_records[i].subcomponent ){ - return icalrestriction_component_records[i].restriction; - } - } - - return ICAL_RESTRICTION_UNKNOWN; -} - -/* Everything below this line is machine generated. Do not edit. */ -icalrestriction_property_record icalrestriction_property_records[] = { - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ONEPLUS}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_FREEBUSY_PROPERTY,ICAL_RESTRICTION_ONEPLUS}, - {ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REQUEST,ICAL_VFREEBUSY_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ONEPLUS}, - {ICAL_METHOD_REQUEST,ICAL_VFREEBUSY_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_REQUEST,ICAL_VFREEBUSY_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_REQUEST,ICAL_VFREEBUSY_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_REQUEST,ICAL_VFREEBUSY_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_REQUEST,ICAL_VFREEBUSY_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_REQUEST,ICAL_VFREEBUSY_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REQUEST,ICAL_VFREEBUSY_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REQUEST,ICAL_VFREEBUSY_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REQUEST,ICAL_VFREEBUSY_COMPONENT,ICAL_FREEBUSY_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REQUEST,ICAL_VFREEBUSY_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REQUEST,ICAL_VFREEBUSY_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REQUEST,ICAL_VFREEBUSY_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REPLY,ICAL_VFREEBUSY_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_REPLY,ICAL_VFREEBUSY_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_REPLY,ICAL_VFREEBUSY_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_REPLY,ICAL_VFREEBUSY_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_REPLY,ICAL_VFREEBUSY_COMPONENT,ICAL_FREEBUSY_PROPERTY,ICAL_RESTRICTION_ONEPLUS}, - {ICAL_METHOD_REPLY,ICAL_VFREEBUSY_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_REPLY,ICAL_VFREEBUSY_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_REPLY,ICAL_VFREEBUSY_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REPLY,ICAL_VFREEBUSY_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REPLY,ICAL_VFREEBUSY_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REPLY,ICAL_VFREEBUSY_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REPLY,ICAL_VFREEBUSY_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REPLY,ICAL_VFREEBUSY_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REPLY,ICAL_VFREEBUSY_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ONEPLUS}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ONEPLUS}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ONEPLUS}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ONEPLUS}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ONEPLUS}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_ACTION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_CALSCALE_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_COMPLETED_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_FREEBUSY_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_METHOD_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_PRODID_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_REPEAT_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_TRIGGER_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_TZID_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_TZNAME_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_TZOFFSETFROM_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_TZOFFSETTO_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_TZURL_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_VERSION_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_NONE,ICAL_VCALENDAR_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_ACTION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_CALSCALE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_COMPLETED_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_FREEBUSY_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_METHOD_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_PRODID_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_REPEAT_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_TRIGGER_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_TZID_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_TZNAME_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_TZOFFSETFROM_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_TZOFFSETTO_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_TZURL_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_VERSION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_ACTION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_CALSCALE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_COMPLETED_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_FREEBUSY_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_METHOD_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_PRODID_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_REPEAT_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_TRIGGER_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_TZID_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_TZNAME_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_TZOFFSETFROM_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_TZOFFSETTO_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_TZURL_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_VERSION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_ACTION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_CALSCALE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_COMPLETED_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_FREEBUSY_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_METHOD_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_PRODID_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_REPEAT_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_TRIGGER_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_TZID_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_TZNAME_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_TZOFFSETFROM_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_TZOFFSETTO_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_TZURL_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_VERSION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_ACTION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_CALSCALE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_COMPLETED_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_FREEBUSY_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_METHOD_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_PRODID_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_REPEAT_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_TRIGGER_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_TZID_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_TZNAME_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_TZOFFSETFROM_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_TZOFFSETTO_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_TZURL_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_VERSION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VFREEBUSY_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_ACTION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_CALSCALE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_COMPLETED_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_FREEBUSY_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_METHOD_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_PRODID_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_REPEAT_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_TRIGGER_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_TZID_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_TZNAME_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_TZOFFSETFROM_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_TZOFFSETTO_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_TZURL_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_VERSION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_VTIMEZONE_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_ACTION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_CALSCALE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_COMPLETED_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_FREEBUSY_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_METHOD_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_PRODID_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_REPEAT_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_TRIGGER_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_TZID_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_TZNAME_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_TZOFFSETFROM_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_TZOFFSETTO_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_TZURL_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_VERSION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XSTANDARD_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_ACTION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_CALSCALE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_COMPLETED_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_FREEBUSY_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_METHOD_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_PRODID_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_REPEAT_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_TRIGGER_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_TZID_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_TZNAME_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_TZOFFSETFROM_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_TZOFFSETTO_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_TZURL_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_VERSION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDAYLIGHT_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_ACTION_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_CALSCALE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_COMPLETED_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEMUTUAL}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_FREEBUSY_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_METHOD_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_PRODID_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_REPEAT_PROPERTY,ICAL_RESTRICTION_ONEMUTUAL}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_TRIGGER_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_TZID_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_TZNAME_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_TZOFFSETFROM_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_TZOFFSETTO_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_TZURL_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_VERSION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_ACTION_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_CALSCALE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_COMPLETED_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEMUTUAL}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_FREEBUSY_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_METHOD_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_PRODID_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_REPEAT_PROPERTY,ICAL_RESTRICTION_ONEMUTUAL}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_TRIGGER_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_TZID_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_TZNAME_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_TZOFFSETFROM_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_TZOFFSETTO_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_TZURL_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_VERSION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_ACTION_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ONEPLUS}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_CALSCALE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_COMPLETED_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEMUTUAL}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_FREEBUSY_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_METHOD_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_PRODID_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_REPEAT_PROPERTY,ICAL_RESTRICTION_ONEMUTUAL}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_TRIGGER_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_TZID_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_TZNAME_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_TZOFFSETFROM_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_TZOFFSETTO_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_TZURL_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_VERSION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_ACTION_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_CALSCALE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_CLASS_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_COMPLETED_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEMUTUAL}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_FREEBUSY_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_METHOD_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_PRODID_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_REPEAT_PROPERTY,ICAL_RESTRICTION_ONEMUTUAL}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_TRIGGER_PROPERTY,ICAL_RESTRICTION_ONE}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_TZID_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_TZNAME_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_TZOFFSETFROM_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_TZOFFSETTO_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_TZURL_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_VERSION_PROPERTY,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_NONE,ICAL_NO_COMPONENT,ICAL_NO_PROPERTY,ICAL_RESTRICTION_NONE} -}; -icalrestriction_component_record icalrestriction_component_records[] = { - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_VJOURNAL_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_VTODO_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_VJOURNAL_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_VTODO_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_VJOURNAL_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_VTODO_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_VTODO_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_VJOURNAL_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_VTODO_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_VJOURNAL_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_VTODO_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_VJOURNAL_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_VTODO_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_VJOURNAL_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_VTODO_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_VJOURNAL_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_VEVENT_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_VTODO_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_VJOURNAL_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REQUEST,ICAL_VFREEBUSY_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REQUEST,ICAL_VFREEBUSY_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REQUEST,ICAL_VFREEBUSY_COMPONENT,ICAL_VEVENT_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REQUEST,ICAL_VFREEBUSY_COMPONENT,ICAL_VTODO_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REQUEST,ICAL_VFREEBUSY_COMPONENT,ICAL_VJOURNAL_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REQUEST,ICAL_VFREEBUSY_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REPLY,ICAL_VFREEBUSY_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REPLY,ICAL_VFREEBUSY_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REPLY,ICAL_VFREEBUSY_COMPONENT,ICAL_VEVENT_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REPLY,ICAL_VFREEBUSY_COMPONENT,ICAL_VTODO_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REPLY,ICAL_VFREEBUSY_COMPONENT,ICAL_VJOURNAL_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REPLY,ICAL_VFREEBUSY_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_VEVENT_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_VJOURNAL_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_VEVENT_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_VJOURNAL_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_VEVENT_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_VEVENT_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_VJOURNAL_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_VEVENT_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_VEVENT_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_VEVENT_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_VEVENT_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_VEVENT_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_VTODO_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROORONE}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_VEVENT_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_ADD,ICAL_VJOURNAL_COMPONENT,ICAL_VTODO_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_VEVENT_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_VTODO_COMPONENT,ICAL_RESTRICTION_ZERO}, - {ICAL_METHOD_NONE,ICAL_NO_COMPONENT,ICAL_NO_COMPONENT,ICAL_RESTRICTION_NONE} -}; diff --git a/libical/src/libical/icalrestriction.h b/libical/src/libical/icalrestriction.h deleted file mode 100644 index ca4beeea7b..0000000000 --- a/libical/src/libical/icalrestriction.h +++ /dev/null @@ -1,72 +0,0 @@ -/* -*- Mode: C -*- */ -/*====================================================================== - FILE: icalrestriction.h - CREATOR: eric 24 April 1999 - - $Id$ - - - (C) COPYRIGHT 1999 Eric Busboom - http://www.softwarestudio.org - - The contents of this file are subject to the Mozilla Public License - Version 1.0 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and - limitations under the License. - - The original author is Eric Busboom - The original code is icalrestriction.h - - Contributions from: - Graham Davison (g.m.davison@computer.org) - - -======================================================================*/ - -#include "ical.h" - -#ifndef ICALRESTRICTION_H -#define ICALRESTRICTION_H - -/* These must stay in this order for icalrestriction_compare to work */ -typedef enum icalrestriction_kind { - ICAL_RESTRICTION_NONE=0, /* 0 */ - ICAL_RESTRICTION_ZERO, /* 1 */ - ICAL_RESTRICTION_ONE, /* 2 */ - ICAL_RESTRICTION_ZEROPLUS, /* 3 */ - ICAL_RESTRICTION_ONEPLUS, /* 4 */ - ICAL_RESTRICTION_ZEROORONE, /* 5 */ - ICAL_RESTRICTION_ONEEXCLUSIVE, /* 6 */ - ICAL_RESTRICTION_ONEMUTUAL, /* 7 */ - ICAL_RESTRICTION_UNKNOWN /* 8 */ -} icalrestriction_kind; - -int -icalrestriction_compare(icalrestriction_kind restr, int count); - -icalrestriction_kind -icalrestriction_get_property_restriction(icalproperty_method method, - icalcomponent_kind component, - icalproperty_kind property); - -icalrestriction_kind -icalrestriction_get_component_restriction(icalproperty_method method, - icalcomponent_kind component, - icalcomponent_kind subcomponent); - -int -icalrestriction_is_parameter_allowed(icalproperty_kind property, - icalparameter_kind parameter); - -int icalrestriction_check(icalcomponent* comp); - - -#endif /* !ICALRESTRICTION_H */ - - - diff --git a/libical/src/libical/icaltypes.c b/libical/src/libical/icaltypes.c deleted file mode 100644 index 25e0e12b48..0000000000 --- a/libical/src/libical/icaltypes.c +++ /dev/null @@ -1,305 +0,0 @@ -/* -*- Mode: C -*- - ====================================================================== - FILE: icaltypes.c - CREATOR: eric 16 May 1999 - - $Id$ - $Locker$ - - - (C) COPYRIGHT 1999 Eric Busboom - http://www.softwarestudio.org - - The contents of this file are subject to the Mozilla Public License - Version 1.0 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and - limitations under the License. - - The original author is Eric Busboom - The original code is icaltypes.c - - ======================================================================*/ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "icaltypes.h" -#include "icalerror.h" -#include "icalmemory.h" -#include /* for malloc */ -#include /* for errno */ -#include /* for strdup */ -#include -#include /* for SHRT_MAX */ - -#define TEMP_MAX 1024 - -void* -icalattachtype_get_data (struct icalattachtype* type); - -struct icalattachtype* -icalattachtype_new() -{ - struct icalattachtype* v; - - if ( ( v = (struct icalattachtype*) - malloc(sizeof(struct icalattachtype))) == 0) { - errno = ENOMEM; - return 0; - } - - v->refcount = 1; - - v->binary = 0; - v->owns_binary = 0; - - v->base64 = 0; - v->owns_base64 = 0; - - v->url = 0; - - return v; -} - - -void -icalattachtype_free(struct icalattachtype* v) -{ - icalerror_check_arg( (v!=0),"v"); - - v->refcount--; - - if (v->refcount <= 0){ - - if (v->base64 != 0 && v->owns_base64 != 0){ - free(v->base64); - } - - if (v->binary != 0 && v->owns_binary != 0){ - free(v->binary); - } - - if (v->url != 0){ - free(v->url); - } - - free(v); - } -} - -void icalattachtype_add_reference(struct icalattachtype* v) -{ - icalerror_check_arg( (v!=0),"v"); - v->refcount++; -} - -void icalattachtype_set_url(struct icalattachtype* v, char* url) -{ - icalerror_check_arg( (v!=0),"v"); - - if (v->url != 0){ - free (v->url); - } - - v->url = strdup(url); - - /* HACK This routine should do something if strdup returns NULL */ - -} - -char* icalattachtype_get_url(struct icalattachtype* v) -{ - icalerror_check_arg( (v!=0),"v"); - return v->url; -} - -void icalattachtype_set_base64(struct icalattachtype* v, char* base64, - int owns) -{ - icalerror_check_arg( (v!=0),"v"); - - v->base64 = base64; - v->owns_base64 = !(owns != 0 ); - -} - -char* icalattachtype_get_base64(struct icalattachtype* v) -{ - icalerror_check_arg( (v!=0),"v"); - return v->base64; -} - -void icalattachtype_set_binary(struct icalattachtype* v, char* binary, - int owns) -{ - icalerror_check_arg( (v!=0),"v"); - - v->binary = binary; - v->owns_binary = !(owns != 0 ); - -} - -void* icalattachtype_get_binary(struct icalattachtype* v) -{ - icalerror_check_arg( (v!=0),"v"); - return v->binary; -} - - - -time_t -icalperiodtype_duration (struct icalperiodtype period); - - -time_t -icalperiodtype_end (struct icalperiodtype period); - -struct icaltimetype -icaltimetype_from_timet(time_t v, int date) -{ - struct icaltimetype tt; - struct tm t; - time_t tm = time(&v); - -/* HACK Does not properly consider timezone */ - t = *(gmtime(&tm)); - - tt.second = t.tm_sec; - tt.minute = t.tm_min; - tt.hour = t.tm_hour; - tt.day = t.tm_mday; - tt.month = t.tm_mon + 1; - tt.year = t.tm_year+ 1900; - - tt.is_utc = 1; - tt.is_date = date; - - return tt; -} - -/* From Russel Steinthal */ -time_t icaldurationtype_as_timet(struct icaldurationtype dur) -{ - return (time_t) (dur.seconds + - (60 * dur.minutes) + - (60 * 60 * dur.hours) + - (60 * 60 * 24 * dur.days) + - (60 * 60 * 24 * 7 * dur.weeks)); -} - - -struct icaldurationtype icaldurationtype_from_timet(time_t t) -{ - struct icaldurationtype dur; - time_t used = 0; - - dur.weeks = (t - used) / (60 * 60 * 24 * 7); - used += dur.weeks * (60 * 60 * 24 * 7); - dur.days = (t - used) / (60 * 60 * 24); - used += dur.days * (60 * 60 * 24); - dur.hours = (t - used) / (60 * 60); - used += dur.hours * (60 * 60); - dur.minutes = (t - used) / (60); - used += dur.minutes * (60); - dur.seconds = (t - used); - - return dur; -} - - -void icalrecurrencetype_clear(struct icalrecurrencetype *recur) -{ - memset(recur,ICAL_RECURRENCE_ARRAY_MAX_BYTE, - sizeof(struct icalrecurrencetype)); - - recur->week_start = ICAL_NO_WEEKDAY; - recur->freq = ICAL_NO_RECURRENCE; - recur->interval = 0; - recur->until.year = 0; - recur->count = 0; -} - - -struct icalreqstattype icalreqstattype_from_string(char* str) -{ - char *p1,*p2; - size_t len; - struct icalreqstattype stat; - int major, minor; - - icalerror_check_arg((str != 0),"str"); - - stat.code = ICAL_UNKNOWN_STATUS; - stat.debug = 0; - - stat.desc = 0; - - /* Get the status numbers */ - - sscanf(str, "%d.%d",&major, &minor); - - if (major <= 0 || minor < 0){ - icalerror_set_errno(ICAL_BADARG_ERROR); - return stat; - } - - stat.code = icalenum_num_to_reqstat(major, minor); - - if (stat.code == ICAL_UNKNOWN_STATUS){ - icalerror_set_errno(ICAL_BADARG_ERROR); - return stat; - } - - - p1 = strchr(str,';'); - - if (p1 == 0){ - icalerror_set_errno(ICAL_BADARG_ERROR); - return stat; - } - - /* Just ignore the second clause; it will be taken from inside the library - */ - - - - p2 = strchr(p1+1,';'); - if (p2 != 0 && *p2 != 0){ - stat.debug = p2+1; - } - - return stat; - -} - -char* icalreqstattype_as_string(struct icalreqstattype stat) -{ - char format[20]; - char *temp; - - temp = (char*)icalmemory_tmp_buffer(TEMP_MAX); - - icalerror_check_arg_rz((stat.code != ICAL_UNKNOWN_STATUS),"Status"); - - if (stat.desc == 0){ - stat.desc = icalenum_reqstat_desc(stat.code); - } - - if(stat.debug != 0){ - snprintf(temp,TEMP_MAX,"%d.%d;%s;%s", icalenum_reqstat_major(stat.code), - icalenum_reqstat_minor(stat.code), - stat.desc, stat.debug); - - } else { - snprintf(temp,TEMP_MAX,"%d.%d;%s", icalenum_reqstat_major(stat.code), - icalenum_reqstat_minor(stat.code), - stat.desc); - } - - return temp; -} diff --git a/libical/src/libical/icaltypes.h b/libical/src/libical/icaltypes.h deleted file mode 100644 index 77a67fae80..0000000000 --- a/libical/src/libical/icaltypes.h +++ /dev/null @@ -1,182 +0,0 @@ -/* -*- Mode: C -*- */ -/*====================================================================== - FILE: icaltypes.h - CREATOR: eric 20 March 1999 - - - (C) COPYRIGHT 1999 Eric Busboom - http://www.softwarestudio.org - - The contents of this file are subject to the Mozilla Public License - Version 1.0 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and - limitations under the License. - - The original author is Eric Busboom - The original code is icaltypes.h - -======================================================================*/ - -#ifndef ICALTYPES_H -#define ICALTYPES_H - -#include -#include "icalenums.h" /* for recurrence enums */ - -/* This type type should probably be an opaque type... */ -struct icalattachtype -{ - void* binary; - int owns_binary; - - char* base64; - int owns_base64; - - char* url; - - int refcount; - -}; - -/* converts base64 to binary, fetches url and stores as binary, or - just returns data */ - -struct icalattachtype* icalattachtype_new(); -void icalattachtype_add_reference(struct icalattachtype* v); -void icalattachtype_free(struct icalattachtype* v); - -void icalattachtype_set_url(struct icalattachtype* v, char* url); -char* icalattachtype_get_url(struct icalattachtype* v); - -void icalattachtype_set_base64(struct icalattachtype* v, char* base64, - int owns); -char* icalattachtype_get_base64(struct icalattachtype* v); - -void icalattachtype_set_binary(struct icalattachtype* v, char* binary, - int owns); -void* icalattachtype_get_binary(struct icalattachtype* v); - -struct icalgeotype -{ - float lat; - float lon; -}; - -struct icaltimetype -{ - int year; - int month; - int day; - int hour; - int minute; - int second; - - int is_utc; /* 1-> time is in UTC timezone */ - - int is_date; /* 1 -> interpret this as date. */ -}; - -struct icaltimetype icaltimetype_from_timet(time_t v, int is_date); - - -/* See RFC 2445 Section 4.3.10, RECUR Value, for an explaination of - the values and fields in struct icalrecurrencetype */ - - -struct icalrecurrencetype -{ - icalrecurrencetype_frequency freq; - - - /* until and count are mutually exclusive. */ - struct icaltimetype until; - int count; - - short interval; - - icalrecurrencetype_weekday week_start; - - /* The BY* parameters can each take a list of values. Here I - * assume that the list of values will not be larger than the - * range of the value -- that is, the client will not name a - * value more than once. - - * Each of the lists is terminated with the value SHRT_MAX - * unless the the list is full. */ - - short by_second[61]; - short by_minute[61]; - short by_hour[25]; - short by_day[8]; - short by_month_day[32]; - short by_year_day[367]; - short by_week_no[54]; - short by_month[13]; - short by_set_pos[367]; -}; - - -void icalrecurrencetype_clear(struct icalrecurrencetype *r); - -struct icaldurationtype -{ - unsigned int days; - unsigned int weeks; - unsigned int hours; - unsigned int minutes; - unsigned int seconds; -}; - -struct icaldurationtype icaldurationtype_from_timet(time_t t); -time_t icaldurationtype_as_timet(struct icaldurationtype duration); - -/* Return the next occurance of 'r' after the time specified by 'after' */ -struct icaltimetype icalrecurrencetype_next_occurance( - struct icalrecurrencetype *r, - struct icaltimetype *after); - - -struct icalperiodtype -{ - struct icaltimetype start; /* Must be absolute */ - struct icaltimetype end; /* Must be absolute */ - struct icaldurationtype duration; -}; - -time_t icalperiodtype_duration(struct icalperiodtype period); -time_t icalperiodtype_end(struct icalperiodtype period); - -union icaltriggertype -{ - struct icaltimetype time; - struct icaldurationtype duration; -}; - - -/* struct icalreqstattype. This struct contains two string pointers, -but don't try to free either of them. The "desc" string is a pointer -to a static table inside the library. Don't try to free it. The -"debug" string is a pointer into the string that the called passed -into to icalreqstattype_from_string. Don't try to free it either, and -don't use it after the original string has been freed. - -BTW, you would get that original string from -*icalproperty_get_requeststatus() or icalvalue_get_text(), when -operating on a the value of a request_status property. */ - -struct icalreqstattype { - - icalrequeststatus code; - char* desc; - char* debug; -}; - -struct icalreqstattype icalreqstattype_from_string(char* str); -char* icalreqstattype_as_string(struct icalreqstattype); - -#endif /* !ICALTYPES_H */ diff --git a/libical/src/libical/icalvalue.c b/libical/src/libical/icalvalue.c deleted file mode 100644 index ec332a0f04..0000000000 --- a/libical/src/libical/icalvalue.c +++ /dev/null @@ -1,2039 +0,0 @@ -/* -*- Mode: C -*- */ -/*====================================================================== - FILE: icalvalue.c - CREATOR: eric 02 May 1999 - - $Id$ - - - (C) COPYRIGHT 1999 Eric Busboom - http://www.softwarestudio.org - - The contents of this file are subject to the Mozilla Public License - Version 1.0 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and - limitations under the License. - - The original author is Eric Busboom - The original code is icalvalue.c - - Contributions from: - Graham Davison (g.m.davison@computer.org) - - -======================================================================*/ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - - -#include "ical.h" -#include "icalerror.h" -#include "icalmemory.h" -#include "icalparser.h" -#include "icalenums.h" - -#include /* for malloc */ -#include /* for sprintf */ -#include /* For memset, others */ -#include /* For offsetof() macro */ -#include -#include /* for mktime */ -#include /* for atoi and atof */ -#include /* for SHRT_MAX */ - -#if _MAC_OS_ -#include "strdup.h" -#endif - -#define TMP_BUF_SIZE 1024 - -void print_datetime_to_string(char* str, struct icaltimetype *data); -void print_date_to_string(char* str, struct icaltimetype *data); -void print_time_to_string(char* str, struct icaltimetype *data); -void print_recur_to_string(char* str, struct icaltimetype *data); - -struct icalvalue_impl { - icalvalue_kind kind; - char id[5]; - int size; - icalproperty* parent; - - union data { - struct icalattachtype v_attach; - /* void *v_binary; */ /* use v_attach */ - char *v_string; - /*char *v_text;*/ - /*char *v_caladdress;*/ - /*char *v_uri;*/ - float v_float; - int v_int; - /*int v_boolean;*/ - /*int v_integer;*/ - struct icaldurationtype v_duration; - /*int v_utcoffset;*/ - - struct icalperiodtype v_period; - /*struct icalperiodtype v_datetimeperiod;*/ - struct icalgeotype v_geo; - /*time_t v_time;*/ - struct icaltimetype v_time; - /*struct icaltimetype v_date;*/ - /*struct icaltimetype v_datetime;*/ - /*struct icaltimetype v_datetimedate;*/ - - /* struct icalrecurrencetype was once a value in this - union, but it contributes 2000 bytes to every*/ - - struct icalrecurrencetype *v_recur; - union icaltriggertype v_trigger; - icalproperty_method v_method; - - } data; -}; - -struct icalvalue_impl* icalvalue_new_impl(icalvalue_kind kind){ - - struct icalvalue_impl* v; - - if ( ( v = (struct icalvalue_impl*) - malloc(sizeof(struct icalvalue_impl))) == 0) { - icalerror_set_errno(ICAL_NEWFAILED_ERROR); - return 0; - } - - strcpy(v->id,"val"); - - v->kind = kind; - v->size = 0; - v->parent = 0; - memset(&(v->data),0,sizeof(v->data)); - - return v; - -} - - - -icalvalue* -icalvalue_new (icalvalue_kind kind) -{ - return (icalvalue*)icalvalue_new_impl(kind); -} - -icalvalue* icalvalue_new_clone(icalvalue* value){ - - struct icalvalue_impl* new; - struct icalvalue_impl* old = (struct icalvalue_impl*)value; - - new = icalvalue_new_impl(old->kind); - - if (new == 0){ - return 0; - } - - - strcpy(new->id, old->id); - new->kind = old->kind; - new->size = old->size; - - switch (new->kind){ - - /* The contents of the attach value may or may not be owned by the - * library. */ - case ICAL_ATTACH_VALUE: - case ICAL_BINARY_VALUE: - { - /* HACK ugh. I don't feel like impleenting this */ - } - - case ICAL_STRING_VALUE: - case ICAL_TEXT_VALUE: - case ICAL_CALADDRESS_VALUE: - case ICAL_URI_VALUE: - { - if (old->data.v_string != 0) { - new->data.v_string=strdup(old->data.v_string); - - if ( new->data.v_string == 0 ) { - return 0; - } - - } - break; - } - case ICAL_RECUR_VALUE: - { - if(old->data.v_recur != 0){ - new->data.v_recur = malloc(sizeof(struct icalrecurrencetype)); - - if(new->data.v_recur == 0){ - return 0; - } - - memcpy( new->data.v_recur, old->data.v_recur, - sizeof(struct icalrecurrencetype)); - } - break; - } - - default: - { - /* all of the other types are stored as values, not - pointers, so we can just copy the whole structure. */ - - new->data = old->data; - } - } - - return new; -} - -icalvalue* icalvalue_new_from_string_with_error(icalvalue_kind kind,char* str,icalproperty** error) -{ - - icalvalue *value = 0; - - icalerror_check_arg_rz(str!=0,"str"); - - if (error != 0){ - *error = 0; - } - - switch (kind){ - - case ICAL_ATTACH_VALUE: - { - /* HACK */ - value = 0; - - if (error != 0){ - char temp[TMP_BUF_SIZE]; - sprintf(temp,"ATTACH Values are not implemented"); - *error = icalproperty_vanew_xlicerror( - temp, - icalparameter_new_xlicerrortype( - ICAL_XLICERRORTYPE_VALUEPARSEERROR), - 0); - } - - icalerror_warn("Parsing ATTACH properties is unimplmeneted"); - break; - } - - case ICAL_BINARY_VALUE: - { - /* HACK */ - value = 0; - - if (error != 0){ - char temp[TMP_BUF_SIZE]; - sprintf(temp,"BINARY Values are not implemented"); - *error = icalproperty_vanew_xlicerror( - temp, - icalparameter_new_xlicerrortype( - ICAL_XLICERRORTYPE_VALUEPARSEERROR), - 0); - } - - icalerror_warn("Parsing BINARY values is unimplmeneted"); - break; - } - - case ICAL_BOOLEAN_VALUE: - { - /* HACK */ - value = 0; - - if (error != 0){ - char temp[TMP_BUF_SIZE]; - sprintf(temp,"BOOLEAN Values are not implemented"); - *error = icalproperty_vanew_xlicerror( - temp, - icalparameter_new_xlicerrortype( - ICAL_XLICERRORTYPE_VALUEPARSEERROR), - 0); - } - - icalerror_warn("Parsing BOOLEAN values is unimplmeneted"); - break; - } - - case ICAL_INTEGER_VALUE: - { - value = icalvalue_new_integer(atoi(str)); - break; - } - - case ICAL_FLOAT_VALUE: - { - value = icalvalue_new_float(atof(str)); - break; - } - - case ICAL_UTCOFFSET_VALUE: - { - value = icalparser_parse_value(kind,str,(icalcomponent*)0); - break; - } - - case ICAL_TEXT_VALUE: - { - value = icalvalue_new_text(str); - break; - } - - - case ICAL_STRING_VALUE: - { - value = icalvalue_new_string(str); - break; - } - - case ICAL_CALADDRESS_VALUE: - { - value = icalvalue_new_caladdress(str); - break; - } - - case ICAL_URI_VALUE: - { - value = icalvalue_new_uri(str); - break; - } - - case ICAL_METHOD_VALUE: - { - icalproperty_method method = icalenum_string_to_method(str); - value = icalvalue_new_method(method); - break; - - } - case ICAL_GEO_VALUE: - { - value = 0; - /* HACK */ - - if (error != 0){ - char temp[TMP_BUF_SIZE]; - sprintf(temp,"GEO Values are not implemented"); - *error = icalproperty_vanew_xlicerror( - temp, - icalparameter_new_xlicerrortype( - ICAL_XLICERRORTYPE_VALUEPARSEERROR), - 0); - } - - /*icalerror_warn("Parsing GEO properties is unimplmeneted");*/ - - break; - } - - case ICAL_RECUR_VALUE: - case ICAL_DATE_VALUE: - case ICAL_DATETIME_VALUE: - case ICAL_DATETIMEDATE_VALUE: - case ICAL_DATETIMEPERIOD_VALUE: - case ICAL_TIME_VALUE: - case ICAL_DURATION_VALUE: - case ICAL_PERIOD_VALUE: - case ICAL_TRIGGER_VALUE: - { - value = icalparser_parse_value(kind,str,error); - break; - } - - default: - { - - if (error != 0 ){ - char temp[TMP_BUF_SIZE]; - - snprintf(temp,TMP_BUF_SIZE,"Unknown type for \'%s\'",str); - - *error = icalproperty_vanew_xlicerror( - temp, - icalparameter_new_xlicerrortype( - ICAL_XLICERRORTYPE_VALUEPARSEERROR), - 0); - } - - icalerror_warn("icalvalue_new_from_string got an unknown value type"); - value=0; - } - } - - - if (error != 0 && *error == 0 && value == 0){ - char temp[TMP_BUF_SIZE]; - - snprintf(temp,TMP_BUF_SIZE,"Failed to parse value: \'%s\'",str); - - *error = icalproperty_vanew_xlicerror( - temp, - icalparameter_new_xlicerrortype( - ICAL_XLICERRORTYPE_VALUEPARSEERROR), - 0); - } - - - return value; - -} - -icalvalue* icalvalue_new_from_string(icalvalue_kind kind,char* str) -{ - return icalvalue_new_from_string_with_error(kind,str,(icalproperty*)0); -} - - - -void -icalvalue_free (icalvalue* value) -{ - struct icalvalue_impl* v = (struct icalvalue_impl*)value; - - icalerror_check_arg_rv((value != 0),"value"); - -#ifdef ICAL_FREE_ON_LIST_IS_ERROR - icalerror_assert( (v->parent ==0),"This value is still attached to a property"); - -#else - if(v->parent !=0){ - return; - } -#endif - - - switch (v->kind){ - case ICAL_BINARY_VALUE: - case ICAL_ATTACH_VALUE: { - /* HACK ugh. This will be tough to implement */ - } - case ICAL_TEXT_VALUE: - case ICAL_CALADDRESS_VALUE: - case ICAL_URI_VALUE: - { - if (v->data.v_string != 0) { - free(v->data.v_string); - v->data.v_string = 0; - } - break; - } - case ICAL_RECUR_VALUE: - { - if(v->data.v_recur != 0){ - free(v->data.v_recur); - v->data.v_recur = 0; - } - break; - } - - default: - { - /* Nothing to do */ - } - } - - v->kind = ICAL_NO_VALUE; - v->size = 0; - v->parent = 0; - memset(&(v->data),0,sizeof(v->data)); - v->id[0] = 'X'; - free(v); -} - -int -icalvalue_is_valid (icalvalue* value) -{ - /*struct icalvalue_impl* v = (struct icalvalue_impl*)value;*/ - - if(value == 0){ - return 0; - } - - return 1; -} - -char* icalvalue_binary_as_ical_string(icalvalue* value) { - - char* data; - char* str; - icalerror_check_arg_rz( (value!=0),"value"); - data = icalvalue_get_binary(value); - - str = (char*)icalmemory_tmp_buffer(60); - sprintf(str,"icalvalue_binary_as_ical_string is not implemented yet"); - - return str; -} - - -char* icalvalue_int_as_ical_string(icalvalue* value) { - - int data; - char* str = (char*)icalmemory_tmp_buffer(2); - icalerror_check_arg_rz( (value!=0),"value"); - data = icalvalue_get_integer(value); - - sprintf(str,"%d",data); - - return str; -} - -char* icalvalue_utcoffset_as_ical_string(icalvalue* value) -{ - int data,h,m,s; - char sign; - char* str = (char*)icalmemory_tmp_buffer(9); - icalerror_check_arg_rz( (value!=0),"value"); - data = icalvalue_get_utcoffset(value); - - if (abs(data) == data){ - sign = '+'; - } else { - sign = '-'; - } - - h = data/3600; - m = (data - (h*3600))/ 60; - s = (data - (h*3600) - (m*60)); - - sprintf(str,"%c%02d%02d%02d",sign,abs(h),abs(m),abs(s)); - - return str; -} - -char* icalvalue_string_as_ical_string(icalvalue* value) { - - char* data; - char* str = 0; - icalerror_check_arg_rz( (value!=0),"value"); - data = ((struct icalvalue_impl*)value)->data.v_string; - - str = (char*)icalmemory_tmp_buffer(strlen(data)+1); - - strcpy(str,data); - - return str; -} - - -char* icalvalue_recur_as_ical_string(icalvalue* value) -{ - char* str; - char *str_p; - size_t buf_sz = 200; - char temp[20]; - int i,j; - struct icalvalue_impl *impl = (struct icalvalue_impl*)value; - struct icalrecurrencetype *recur = impl->data.v_recur; - - struct { char* str;size_t offset; short limit; } recurmap[] = - { - {";BYSECOND=",offsetof(struct icalrecurrencetype,by_second),60}, - {";BYMINUTE=",offsetof(struct icalrecurrencetype,by_minute),60}, - {";BYHOUR=",offsetof(struct icalrecurrencetype,by_hour),24}, - {";BYDAY=",offsetof(struct icalrecurrencetype,by_day),7}, - {";BYMONTHDAY=",offsetof(struct icalrecurrencetype,by_month_day),31}, - {";BYYEARDAY=",offsetof(struct icalrecurrencetype,by_year_day),366}, - {";BYWEEKNO=",offsetof(struct icalrecurrencetype,by_week_no),52}, - {";BYMONTH=",offsetof(struct icalrecurrencetype,by_month),12}, - {";BYSETPOS=",offsetof(struct icalrecurrencetype,by_set_pos),366}, - {0,0,0}, - }; - - - - icalerror_check_arg_rz((value != 0),"value"); - - if(recur->freq == ICAL_NO_RECURRENCE){ - return 0; - } - - str = (char*)icalmemory_tmp_buffer(buf_sz); - str_p = str; - - icalmemory_append_string(&str,&str_p,&buf_sz,"FREQ="); - icalmemory_append_string(&str,&str_p,&buf_sz, - icalenum_recurrence_to_string(recur->freq)); - - if(recur->until.year != 0){ - - temp[0] = 0; - print_datetime_to_string(temp,&(recur->until)); - - icalmemory_append_string(&str,&str_p,&buf_sz,";UNTIL="); - icalmemory_append_string(&str,&str_p,&buf_sz, temp); - } - - if(recur->count != 0){ - sprintf(temp,"%d",recur->count); - icalmemory_append_string(&str,&str_p,&buf_sz,";COUNT="); - icalmemory_append_string(&str,&str_p,&buf_sz, temp); - } - - if(recur->interval != 0){ - sprintf(temp,"%d",recur->interval); - icalmemory_append_string(&str,&str_p,&buf_sz,";INTERVAL="); - icalmemory_append_string(&str,&str_p,&buf_sz, temp); - } - - for(j =0; recurmap[j].str != 0; j++){ - short* array = (short*)(recurmap[j].offset+ (size_t)recur); - short limit = recurmap[j].limit; - - /* Skip unused arrays */ - if( array[0] != ICAL_RECURRENCE_ARRAY_MAX ) { - - icalmemory_append_string(&str,&str_p,&buf_sz,recurmap[j].str); - - for(i=0; i< limit && array[i] != ICAL_RECURRENCE_ARRAY_MAX; - i++){ - if (j == 3) { /* BYDAY */ - icalmemory_append_string(&str,&str_p,&buf_sz, - icalenum_weekday_to_string(array[i])); - } else { - sprintf(temp,"%d",array[i]); - icalmemory_append_string(&str,&str_p,&buf_sz, temp); - } - - if( (i+1)data.v_string)+1; - - str_p = str = (char*)icalmemory_new_buffer(buf_sz); - - if (str_p == 0){ - return 0; - } - - for(p=((struct icalvalue_impl*)value)->data.v_string; *p!=0; p++){ - - switch(*p){ - case '\n': { - icalmemory_append_string(&str,&str_p,&buf_sz,"\\n"); - line_length+=3; - break; - } - - case '\t': { - icalmemory_append_string(&str,&str_p,&buf_sz,"\\t"); - line_length+=3; - break; - } - case '\r': { - icalmemory_append_string(&str,&str_p,&buf_sz,"\\r"); - line_length+=3; - break; - } - case '\b': { - icalmemory_append_string(&str,&str_p,&buf_sz,"\\b"); - line_length+=3; - break; - } - case '\f': { - icalmemory_append_string(&str,&str_p,&buf_sz,"\\f"); - line_length+=3; - break; - } - - case ';': - case ',':{ - icalmemory_append_char(&str,&str_p,&buf_sz,'\\'); - icalmemory_append_char(&str,&str_p,&buf_sz,*p); - line_length+=3; - break; - } - - case '"':{ - icalmemory_append_char(&str,&str_p,&buf_sz,'\\'); - icalmemory_append_char(&str,&str_p,&buf_sz,*p); - line_length+=3; - break; - } - - default: { - icalmemory_append_char(&str,&str_p,&buf_sz,*p); - line_length++; - } - } - - if (line_length > 65 && *p == ' '){ - icalmemory_append_string(&str,&str_p,&buf_sz,"\n "); - line_length=0; - } - - - if (line_length > 75){ - icalmemory_append_string(&str,&str_p,&buf_sz,"\n "); - line_length=0; - } - - } - - /* Assume the last character is not a '\0' and add one. We could - check *str_p != 0, but that would be an uninitialized memory - read. */ - - - icalmemory_append_char(&str,&str_p,&buf_sz,'\0'); - - rtrn = icalmemory_tmp_copy(str); - - icalmemory_free_buffer(str); - - return rtrn; -} - - -char* icalvalue_attach_as_ical_string(icalvalue* value) { - - struct icalattachtype a; - char * str; - - icalerror_check_arg_rz( (value!=0),"value"); - - a = icalvalue_get_attach(value); - - if (a.binary != 0) { - return icalvalue_binary_as_ical_string(value); - } else if (a.base64 != 0) { - str = (char*)icalmemory_tmp_buffer(strlen(a.base64)+1); - strcpy(str,a.base64); - return str; - } else if (a.url != 0){ - return icalvalue_string_as_ical_string(value); - } else { - icalerrno = ICAL_MALFORMEDDATA_ERROR; - return 0; - } -} - -void append_duration_segment(char** buf, char** buf_ptr, size_t* buf_size, - char* sep, unsigned int value) { - - char temp[TMP_BUF_SIZE]; - - sprintf(temp,"%d",value); - - icalmemory_append_string(buf, buf_ptr, buf_size, temp); - icalmemory_append_string(buf, buf_ptr, buf_size, sep); - -} - -char* icalvalue_duration_as_ical_string(icalvalue* value) { - - struct icaldurationtype data; - char *buf, *output_line; - size_t buf_size = 256; - char* buf_ptr = 0; - - icalerror_check_arg_rz( (value!=0),"value"); - data = icalvalue_get_duration(value); - - buf = (char*)icalmemory_new_buffer(buf_size); - buf_ptr = buf; - - icalmemory_append_string(&buf, &buf_ptr, &buf_size, "P"); - - - if (data.weeks != 0 ) { - append_duration_segment(&buf, &buf_ptr, &buf_size, "W", data.weeks); - } - - if (data.days != 0 ) { - append_duration_segment(&buf, &buf_ptr, &buf_size, "D", data.days); - } - - if (data.hours != 0 || data.minutes != 0 || data.seconds != 0) { - - icalmemory_append_string(&buf, &buf_ptr, &buf_size, "T"); - - if (data.hours != 0 ) { - append_duration_segment(&buf, &buf_ptr, &buf_size, "H", data.hours); - } - if (data.minutes != 0 ) { - append_duration_segment(&buf, &buf_ptr, &buf_size, "M", data.minutes); - } - if (data.seconds != 0 ) { - append_duration_segment(&buf, &buf_ptr, &buf_size, "S", data.seconds); - } - - } - - output_line = icalmemory_tmp_copy(buf); - icalmemory_free_buffer(buf); - - return output_line; - - -} - -void print_time_to_string(char* str, struct icaltimetype *data) -{ - char temp[20]; - - if (data->is_utc == 1){ - sprintf(temp,"%02d%02d%02dZ",data->hour,data->minute,data->second); - } else { - sprintf(temp,"%02d%02d%02d",data->hour,data->minute,data->second); - } - - strcat(str,temp); -} - - -char* icalvalue_time_as_ical_string(icalvalue* value) { - - struct icaltimetype data; - char* str; - icalerror_check_arg_rz( (value!=0),"value"); - data = icalvalue_get_time(value); - - str = (char*)icalmemory_tmp_buffer(8); - - str[0] = 0; - print_time_to_string(str,&data); - - return str; -} - -void print_date_to_string(char* str, struct icaltimetype *data) -{ - char temp[20]; - - sprintf(temp,"%04d%02d%02d",data->year,data->month,data->day); - - strcat(str,temp); -} - -char* icalvalue_date_as_ical_string(icalvalue* value) { - - struct icaltimetype data; - char* str; - icalerror_check_arg_rz( (value!=0),"value"); - data = icalvalue_get_date(value); - - str = (char*)icalmemory_tmp_buffer(9); - - str[0] = 0; - print_date_to_string(str,&data); - - return str; -} - -void print_datetime_to_string(char* str, struct icaltimetype *data) -{ - print_date_to_string(str,data); - strcat(str,"T"); - print_time_to_string(str,data); - -} - -char* icalvalue_datetime_as_ical_string(icalvalue* value) { - - struct icaltimetype data; - char* str; - icalerror_check_arg_rz( (value!=0),"value"); - data = icalvalue_get_date(value); - - str = (char*)icalmemory_tmp_buffer(20); - - str[0] = 0; - - print_datetime_to_string(str,&data); - - return str; - -} - - -char* icalvalue_datetimedate_as_ical_string(icalvalue* value) { - - struct icaltimetype data; - icalerror_check_arg_rz( (value!=0),"value"); - data = icalvalue_get_datetime(value); - - if (data.is_date == 1){ - return icalvalue_date_as_ical_string(value); - } else { - return icalvalue_datetime_as_ical_string(value); - } -} - - -char* icalvalue_float_as_ical_string(icalvalue* value) { - - float data; - char* str; - icalerror_check_arg_rz( (value!=0),"value"); - data = icalvalue_get_float(value); - - str = (char*)icalmemory_tmp_buffer(15); - - sprintf(str,"%f",data); - - return str; -} - -char* icalvalue_geo_as_ical_string(icalvalue* value) { - - struct icalgeotype data; - char* str; - icalerror_check_arg_rz( (value!=0),"value"); - - data = icalvalue_get_geo(value); - - str = (char*)icalmemory_tmp_buffer(25); - - sprintf(str,"%f;%f",data.lat,data.lon); - - return str; -} - -char* icalvalue_datetimeperiod_as_ical_string(icalvalue* value) { - - struct icalperiodtype data; - char* str; - icalerror_check_arg_rz( (value!=0),"value"); - data = icalvalue_get_datetimeperiod(value); - - str = (char*)icalmemory_tmp_buffer(60); - - if( data.end.second == -1){ - /* This is a DATE-TIME value, since there is no end value */ - icalvalue *v= icalvalue_new_datetime(data.start); - - strcpy(str,icalvalue_datetime_as_ical_string(v)); - - free(v); - - } else { - icalvalue *v1 = icalvalue_new_datetime(data.start); - icalvalue *v2 = icalvalue_new_datetime(data.end); - - sprintf(str,"%s/%s", - icalvalue_datetime_as_ical_string(v1), - icalvalue_datetime_as_ical_string(v2) - ); - - free(v1); - free(v2); - - } - - return str; -} - -char* icalvalue_period_as_ical_string(icalvalue* value) { - - struct icalperiodtype data; - char* str; - icalvalue *s,*e; - - icalerror_check_arg_rz( (value!=0),"value"); - data = icalvalue_get_period(value); - - str = (char*)icalmemory_tmp_buffer(60); - - s = icalvalue_new_datetime(data.start); - - if (data.end.second != -1){ - /* use the end date */ - e = icalvalue_new_datetime(data.end); - - sprintf(str,"%s/%s", - icalvalue_datetime_as_ical_string(s), - icalvalue_datetime_as_ical_string(e) - ); - - - } else { - /* use the duration */ - e = icalvalue_new_duration(data.duration); - - sprintf(str,"%s/%s", - icalvalue_datetime_as_ical_string(s), - icalvalue_duration_as_ical_string(e) - ); - - } - - icalvalue_free(e); - icalvalue_free(s); - return str; -} - -char* icalvalue_trigger_as_ical_string(icalvalue* value) { - - union icaltriggertype data; - char* str; - icalerror_check_arg_rz( (value!=0),"value"); - data = icalvalue_get_trigger(value); - - str = (char*)icalmemory_tmp_buffer(60); - sprintf(str,"icalvalue_trigger_as_ical_string is not implemented yet"); - - return str; -} - -char* -icalvalue_as_ical_string (icalvalue* value) -{ - struct icalvalue_impl* v = (struct icalvalue_impl*)value; - - v=v; - - if(value == 0){ - return 0; - } - - switch (v->kind){ - - case ICAL_ATTACH_VALUE: - return icalvalue_attach_as_ical_string(value); - - case ICAL_BINARY_VALUE: - return icalvalue_binary_as_ical_string(value); - - case ICAL_BOOLEAN_VALUE: - case ICAL_INTEGER_VALUE: - return icalvalue_int_as_ical_string(value); - - case ICAL_UTCOFFSET_VALUE: - return icalvalue_utcoffset_as_ical_string(value); - - case ICAL_TEXT_VALUE: - return icalvalue_text_as_ical_string(value); - - case ICAL_STRING_VALUE: - case ICAL_URI_VALUE: - case ICAL_CALADDRESS_VALUE: - return icalvalue_string_as_ical_string(value); - - case ICAL_DATE_VALUE: - return icalvalue_date_as_ical_string(value); - case ICAL_DATETIME_VALUE: - return icalvalue_datetime_as_ical_string(value); - case ICAL_DATETIMEDATE_VALUE: - return icalvalue_datetimedate_as_ical_string(value); - case ICAL_DURATION_VALUE: - return icalvalue_duration_as_ical_string(value); - case ICAL_TIME_VALUE: - return icalvalue_time_as_ical_string(value); - - case ICAL_PERIOD_VALUE: - return icalvalue_period_as_ical_string(value); - case ICAL_DATETIMEPERIOD_VALUE: - return icalvalue_datetimeperiod_as_ical_string(value); - - case ICAL_FLOAT_VALUE: - return icalvalue_float_as_ical_string(value); - - case ICAL_GEO_VALUE: - return icalvalue_geo_as_ical_string(value); - - case ICAL_RECUR_VALUE: - return icalvalue_recur_as_ical_string(value); - - case ICAL_TRIGGER_VALUE: - return icalvalue_trigger_as_ical_string(value); - - case ICAL_METHOD_VALUE: - return icalenum_method_to_string(v->data.v_method); - - case ICAL_NO_VALUE: - default: - { - return 0; - } - } -} - - -icalvalue_kind -icalvalue_isa (icalvalue* value) -{ - struct icalvalue_impl* v = (struct icalvalue_impl*)value; - - if(value == 0){ - return ICAL_NO_VALUE; - } - - return v->kind; -} - - -int -icalvalue_isa_value (void* value) -{ - struct icalvalue_impl *impl = (struct icalvalue_impl *)value; - - icalerror_check_arg_rz( (value!=0), "value"); - - if (strcmp(impl->id,"val") == 0) { - return 1; - } else { - return 0; - } -} - - -icalparameter_xliccomparetype -icalvalue_compare(icalvalue* a, icalvalue *b) -{ - struct icalvalue_impl *impla = (struct icalvalue_impl *)a; - struct icalvalue_impl *implb = (struct icalvalue_impl *)b; - - icalerror_check_arg_rz( (a!=0), "a"); - icalerror_check_arg_rz( (b!=0), "b"); - - /* Not the same type; they can only be unequal */ - if (icalvalue_isa(a) != icalvalue_isa(b)){ - return ICAL_XLICCOMPARETYPE_NOTEQUAL; - } - - switch (icalvalue_isa(a)){ - - case ICAL_ATTACH_VALUE: - case ICAL_BINARY_VALUE: - - case ICAL_BOOLEAN_VALUE: - { - if (icalvalue_get_boolean(a) == icalvalue_get_boolean(b)){ - return ICAL_XLICCOMPARETYPE_EQUAL; - } else { - return ICAL_XLICCOMPARETYPE_NOTEQUAL; - } - } - - case ICAL_FLOAT_VALUE: - { - if (impla->data.v_float > implb->data.v_float){ - return ICAL_XLICCOMPARETYPE_GREATER; - } else if (impla->data.v_float < implb->data.v_float){ - return ICAL_XLICCOMPARETYPE_LESS; - } else { - return ICAL_XLICCOMPARETYPE_EQUAL; - } - } - - case ICAL_INTEGER_VALUE: - case ICAL_UTCOFFSET_VALUE: - { - if (impla->data.v_int > implb->data.v_int){ - return ICAL_XLICCOMPARETYPE_GREATER; - } else if (impla->data.v_int < implb->data.v_int){ - return ICAL_XLICCOMPARETYPE_LESS; - } else { - return ICAL_XLICCOMPARETYPE_EQUAL; - } - } - - case ICAL_TEXT_VALUE: - case ICAL_URI_VALUE: - case ICAL_CALADDRESS_VALUE: - case ICAL_TRIGGER_VALUE: - case ICAL_DATE_VALUE: - case ICAL_DATETIME_VALUE: - case ICAL_DATETIMEDATE_VALUE: - case ICAL_DURATION_VALUE: /* HACK. Not correct for DURATION */ - case ICAL_TIME_VALUE: - case ICAL_DATETIMEPERIOD_VALUE: - { - int r; - - r = strcmp(icalvalue_as_ical_string(a), - icalvalue_as_ical_string(b)); - - if (r > 0) { - return ICAL_XLICCOMPARETYPE_GREATER; - } else if (r < 0){ - return ICAL_XLICCOMPARETYPE_LESS; - } else { - return 0; - } - - - } - - case ICAL_METHOD_VALUE: - { - if (icalvalue_get_method(a) == icalvalue_get_method(b)){ - return ICAL_XLICCOMPARETYPE_EQUAL; - } else { - return ICAL_XLICCOMPARETYPE_NOTEQUAL; - } - - } - case ICAL_PERIOD_VALUE: - case ICAL_GEO_VALUE: - case ICAL_RECUR_VALUE: - case ICAL_NO_VALUE: - default: - { - icalerror_warn("Comparison not implemented for value type"); - return ICAL_XLICCOMPARETYPE_REGEX+1; /* HACK */ - } - } - -} - -void icalvalue_set_parent(icalvalue* value, - icalproperty* property) -{ - struct icalvalue_impl* v = (struct icalvalue_impl*)value; - - v->parent = property; - -} - -icalproperty* icalvalue_get_parent(icalvalue* value) -{ - struct icalvalue_impl* v = (struct icalvalue_impl*)value; - - - return v->parent; -} - - - -/* Recur is a special case, so it is not auto generated. Well, - actually, it is auto-generated, but you will have to manually - remove the auto-generated version after each generation. */ -icalvalue* -icalvalue_new_recur (struct icalrecurrencetype v) -{ - struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_RECUR_VALUE); - - icalvalue_set_recur((icalvalue*)impl,v); - - return (icalvalue*)impl; -} - -void -icalvalue_set_recur(icalvalue* value, struct icalrecurrencetype v) -{ - struct icalvalue_impl* impl; - - icalerror_check_arg_rv( (value!=0),"value"); - icalerror_check_value_type(value, ICAL_RECUR_VALUE); - - impl = (struct icalvalue_impl*)value; - - if (impl->data.v_recur != 0){ - free(impl->data.v_recur); - impl->data.v_recur = 0; - } - - impl->data.v_recur = malloc(sizeof(struct icalrecurrencetype)); - - if (impl->data.v_recur == 0){ - icalerror_set_errno(ICAL_ALLOCATION_ERROR); - return; - } else { - memcpy(impl->data.v_recur, &v, sizeof(struct icalrecurrencetype)); - } - -} - -struct icalrecurrencetype -icalvalue_get_recur(icalvalue* value) -{ - icalerror_check_arg( (value!=0),"value"); - icalerror_check_value_type(value, ICAL_RECUR_VALUE); - - return *(((struct icalvalue_impl*)value)->data.v_recur); -} - - - - -/* The remaining interfaces are 'new', 'set' and 'get' for each of the value - types */ - - -/* Everything below this line is machine generated. Do not edit. */ - -icalvalue* -icalvalue_new_attach (struct icalattachtype v) -{ - struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_ATTACH_VALUE); - - - icalvalue_set_attach((icalvalue*)impl,v); - - return (icalvalue*)impl; -} - -void -icalvalue_set_attach(icalvalue* value, struct icalattachtype v) -{ - struct icalvalue_impl* impl; - - icalerror_check_arg_rv( (value!=0),"value"); - - icalerror_check_value_type(value, ICAL_ATTACH_VALUE); - - impl = (struct icalvalue_impl*)value; - impl->data.v_attach = v; -} - -struct icalattachtype -icalvalue_get_attach(icalvalue* value) -{ - icalerror_check_arg( (value!=0),"value"); - icalerror_check_value_type(value, ICAL_ATTACH_VALUE); - - return ((struct icalvalue_impl*)value)->data.v_attach; -} - - -icalvalue* -icalvalue_new_binary (char* v) -{ - struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_BINARY_VALUE); - - icalerror_check_arg_rz( (v!=0),"v"); - - icalvalue_set_binary((icalvalue*)impl,v); - - return (icalvalue*)impl; -} - -void -icalvalue_set_binary(icalvalue* value, char* v) -{ - struct icalvalue_impl* impl; - - icalerror_check_arg_rv( (value!=0),"value"); - icalerror_check_arg_rv( (v!=0),"v"); - - icalerror_check_value_type(value, ICAL_BINARY_VALUE); - - impl = (struct icalvalue_impl*)value; - impl->data.v_string = strdup(v); - - if (impl->data.v_string == 0){ - errno = ENOMEM; - } - -} - -char* -icalvalue_get_binary(icalvalue* value) -{ - icalerror_check_arg( (value!=0),"value"); - icalerror_check_value_type(value, ICAL_BINARY_VALUE); - - return ((struct icalvalue_impl*)value)->data.v_string; -} - - -icalvalue* -icalvalue_new_boolean (int v) -{ - struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_BOOLEAN_VALUE); - - - icalvalue_set_boolean((icalvalue*)impl,v); - - return (icalvalue*)impl; -} - -void -icalvalue_set_boolean(icalvalue* value, int v) -{ - struct icalvalue_impl* impl; - - icalerror_check_arg_rv( (value!=0),"value"); - - icalerror_check_value_type(value, ICAL_BOOLEAN_VALUE); - - impl = (struct icalvalue_impl*)value; - impl->data.v_int = v; -} - -int -icalvalue_get_boolean(icalvalue* value) -{ - icalerror_check_arg( (value!=0),"value"); - icalerror_check_value_type(value, ICAL_BOOLEAN_VALUE); - - return ((struct icalvalue_impl*)value)->data.v_int; -} - - -icalvalue* -icalvalue_new_caladdress (char* v) -{ - struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_CALADDRESS_VALUE); - - icalerror_check_arg_rz( (v!=0),"v"); - - icalvalue_set_caladdress((icalvalue*)impl,v); - - return (icalvalue*)impl; -} - -void -icalvalue_set_caladdress(icalvalue* value, char* v) -{ - struct icalvalue_impl* impl; - - icalerror_check_arg_rv( (value!=0),"value"); - icalerror_check_arg_rv( (v!=0),"v"); - - icalerror_check_value_type(value, ICAL_CALADDRESS_VALUE); - - impl = (struct icalvalue_impl*)value; - impl->data.v_string = strdup(v); - - if (impl->data.v_string == 0){ - errno = ENOMEM; - } - -} - -char* -icalvalue_get_caladdress(icalvalue* value) -{ - icalerror_check_arg( (value!=0),"value"); - icalerror_check_value_type(value, ICAL_CALADDRESS_VALUE); - - return ((struct icalvalue_impl*)value)->data.v_string; -} - - -icalvalue* -icalvalue_new_date (struct icaltimetype v) -{ - struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_DATE_VALUE); - - - icalvalue_set_date((icalvalue*)impl,v); - - return (icalvalue*)impl; -} - -void -icalvalue_set_date(icalvalue* value, struct icaltimetype v) -{ - struct icalvalue_impl* impl; - - icalerror_check_arg_rv( (value!=0),"value"); - - icalerror_check_value_type(value, ICAL_DATE_VALUE); - - impl = (struct icalvalue_impl*)value; - impl->data.v_time = v; -} - -struct icaltimetype -icalvalue_get_date(icalvalue* value) -{ - icalerror_check_arg( (value!=0),"value"); - icalerror_check_value_type(value, ICAL_DATE_VALUE); - - return ((struct icalvalue_impl*)value)->data.v_time; -} - - -icalvalue* -icalvalue_new_datetime (struct icaltimetype v) -{ - struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_DATETIME_VALUE); - - - icalvalue_set_datetime((icalvalue*)impl,v); - - return (icalvalue*)impl; -} - -void -icalvalue_set_datetime(icalvalue* value, struct icaltimetype v) -{ - struct icalvalue_impl* impl; - - icalerror_check_arg_rv( (value!=0),"value"); - - icalerror_check_value_type(value, ICAL_DATETIME_VALUE); - - impl = (struct icalvalue_impl*)value; - impl->data.v_time = v; -} - -struct icaltimetype -icalvalue_get_datetime(icalvalue* value) -{ - icalerror_check_arg( (value!=0),"value"); - icalerror_check_value_type(value, ICAL_DATETIME_VALUE); - - return ((struct icalvalue_impl*)value)->data.v_time; -} - - -icalvalue* -icalvalue_new_datetimedate (struct icaltimetype v) -{ - struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_DATETIMEDATE_VALUE); - - - icalvalue_set_datetimedate((icalvalue*)impl,v); - - return (icalvalue*)impl; -} - -void -icalvalue_set_datetimedate(icalvalue* value, struct icaltimetype v) -{ - struct icalvalue_impl* impl; - - icalerror_check_arg_rv( (value!=0),"value"); - - icalerror_check_value_type(value, ICAL_DATETIMEDATE_VALUE); - - impl = (struct icalvalue_impl*)value; - impl->data.v_time = v; -} - -struct icaltimetype -icalvalue_get_datetimedate(icalvalue* value) -{ - icalerror_check_arg( (value!=0),"value"); - icalerror_check_value_type(value, ICAL_DATETIMEDATE_VALUE); - - return ((struct icalvalue_impl*)value)->data.v_time; -} - - -icalvalue* -icalvalue_new_datetimeperiod (struct icalperiodtype v) -{ - struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_DATETIMEPERIOD_VALUE); - - - icalvalue_set_datetimeperiod((icalvalue*)impl,v); - - return (icalvalue*)impl; -} - -void -icalvalue_set_datetimeperiod(icalvalue* value, struct icalperiodtype v) -{ - struct icalvalue_impl* impl; - - icalerror_check_arg_rv( (value!=0),"value"); - - icalerror_check_value_type(value, ICAL_DATETIMEPERIOD_VALUE); - - impl = (struct icalvalue_impl*)value; - impl->data.v_period = v; -} - -struct icalperiodtype -icalvalue_get_datetimeperiod(icalvalue* value) -{ - icalerror_check_arg( (value!=0),"value"); - icalerror_check_value_type(value, ICAL_DATETIMEPERIOD_VALUE); - - return ((struct icalvalue_impl*)value)->data.v_period; -} - - -icalvalue* -icalvalue_new_duration (struct icaldurationtype v) -{ - struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_DURATION_VALUE); - - - icalvalue_set_duration((icalvalue*)impl,v); - - return (icalvalue*)impl; -} - -void -icalvalue_set_duration(icalvalue* value, struct icaldurationtype v) -{ - struct icalvalue_impl* impl; - - icalerror_check_arg_rv( (value!=0),"value"); - - icalerror_check_value_type(value, ICAL_DURATION_VALUE); - - impl = (struct icalvalue_impl*)value; - impl->data.v_duration = v; -} - -struct icaldurationtype -icalvalue_get_duration(icalvalue* value) -{ - icalerror_check_arg( (value!=0),"value"); - icalerror_check_value_type(value, ICAL_DURATION_VALUE); - - return ((struct icalvalue_impl*)value)->data.v_duration; -} - - -icalvalue* -icalvalue_new_float (float v) -{ - struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_FLOAT_VALUE); - - - icalvalue_set_float((icalvalue*)impl,v); - - return (icalvalue*)impl; -} - -void -icalvalue_set_float(icalvalue* value, float v) -{ - struct icalvalue_impl* impl; - - icalerror_check_arg_rv( (value!=0),"value"); - - icalerror_check_value_type(value, ICAL_FLOAT_VALUE); - - impl = (struct icalvalue_impl*)value; - impl->data.v_float = v; -} - -float -icalvalue_get_float(icalvalue* value) -{ - icalerror_check_arg( (value!=0),"value"); - icalerror_check_value_type(value, ICAL_FLOAT_VALUE); - - return ((struct icalvalue_impl*)value)->data.v_float; -} - - -icalvalue* -icalvalue_new_geo (struct icalgeotype v) -{ - struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_GEO_VALUE); - - - icalvalue_set_geo((icalvalue*)impl,v); - - return (icalvalue*)impl; -} - -void -icalvalue_set_geo(icalvalue* value, struct icalgeotype v) -{ - struct icalvalue_impl* impl; - - icalerror_check_arg_rv( (value!=0),"value"); - - icalerror_check_value_type(value, ICAL_GEO_VALUE); - - impl = (struct icalvalue_impl*)value; - impl->data.v_geo = v; -} - -struct icalgeotype -icalvalue_get_geo(icalvalue* value) -{ - icalerror_check_arg( (value!=0),"value"); - icalerror_check_value_type(value, ICAL_GEO_VALUE); - - return ((struct icalvalue_impl*)value)->data.v_geo; -} - - -icalvalue* -icalvalue_new_integer (int v) -{ - struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_INTEGER_VALUE); - - - icalvalue_set_integer((icalvalue*)impl,v); - - return (icalvalue*)impl; -} - -void -icalvalue_set_integer(icalvalue* value, int v) -{ - struct icalvalue_impl* impl; - - icalerror_check_arg_rv( (value!=0),"value"); - - icalerror_check_value_type(value, ICAL_INTEGER_VALUE); - - impl = (struct icalvalue_impl*)value; - impl->data.v_int = v; -} - -int -icalvalue_get_integer(icalvalue* value) -{ - icalerror_check_arg( (value!=0),"value"); - icalerror_check_value_type(value, ICAL_INTEGER_VALUE); - - return ((struct icalvalue_impl*)value)->data.v_int; -} - - -icalvalue* -icalvalue_new_method (icalproperty_method v) -{ - struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_METHOD_VALUE); - - - icalvalue_set_method((icalvalue*)impl,v); - - return (icalvalue*)impl; -} - -void -icalvalue_set_method(icalvalue* value, icalproperty_method v) -{ - struct icalvalue_impl* impl; - - icalerror_check_arg_rv( (value!=0),"value"); - - icalerror_check_value_type(value, ICAL_METHOD_VALUE); - - impl = (struct icalvalue_impl*)value; - impl->data.v_method = v; -} - -icalproperty_method -icalvalue_get_method(icalvalue* value) -{ - icalerror_check_arg( (value!=0),"value"); - icalerror_check_value_type(value, ICAL_METHOD_VALUE); - - return ((struct icalvalue_impl*)value)->data.v_method; -} - - -icalvalue* -icalvalue_new_period (struct icalperiodtype v) -{ - struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_PERIOD_VALUE); - - - icalvalue_set_period((icalvalue*)impl,v); - - return (icalvalue*)impl; -} - -void -icalvalue_set_period(icalvalue* value, struct icalperiodtype v) -{ - struct icalvalue_impl* impl; - - icalerror_check_arg_rv( (value!=0),"value"); - - icalerror_check_value_type(value, ICAL_PERIOD_VALUE); - - impl = (struct icalvalue_impl*)value; - impl->data.v_period = v; -} - -struct icalperiodtype -icalvalue_get_period(icalvalue* value) -{ - icalerror_check_arg( (value!=0),"value"); - icalerror_check_value_type(value, ICAL_PERIOD_VALUE); - - return ((struct icalvalue_impl*)value)->data.v_period; -} - - -icalvalue* -icalvalue_new_string (char* v) -{ - struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_STRING_VALUE); - - icalerror_check_arg_rz( (v!=0),"v"); - - icalvalue_set_string((icalvalue*)impl,v); - - return (icalvalue*)impl; -} - -void -icalvalue_set_string(icalvalue* value, char* v) -{ - struct icalvalue_impl* impl; - - icalerror_check_arg_rv( (value!=0),"value"); - icalerror_check_arg_rv( (v!=0),"v"); - - icalerror_check_value_type(value, ICAL_STRING_VALUE); - - impl = (struct icalvalue_impl*)value; - impl->data.v_string = strdup(v); - - if (impl->data.v_string == 0){ - errno = ENOMEM; - } - -} - -char* -icalvalue_get_string(icalvalue* value) -{ - icalerror_check_arg( (value!=0),"value"); - icalerror_check_value_type(value, ICAL_STRING_VALUE); - - return ((struct icalvalue_impl*)value)->data.v_string; -} - - -icalvalue* -icalvalue_new_text (char* v) -{ - struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_TEXT_VALUE); - - icalerror_check_arg_rz( (v!=0),"v"); - - icalvalue_set_text((icalvalue*)impl,v); - - return (icalvalue*)impl; -} - -void -icalvalue_set_text(icalvalue* value, char* v) -{ - struct icalvalue_impl* impl; - - icalerror_check_arg_rv( (value!=0),"value"); - icalerror_check_arg_rv( (v!=0),"v"); - - icalerror_check_value_type(value, ICAL_TEXT_VALUE); - - impl = (struct icalvalue_impl*)value; - impl->data.v_string = strdup(v); - - if (impl->data.v_string == 0){ - errno = ENOMEM; - } - -} - -char* -icalvalue_get_text(icalvalue* value) -{ - icalerror_check_arg( (value!=0),"value"); - icalerror_check_value_type(value, ICAL_TEXT_VALUE); - - return ((struct icalvalue_impl*)value)->data.v_string; -} - - -icalvalue* -icalvalue_new_time (struct icaltimetype v) -{ - struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_TIME_VALUE); - - - icalvalue_set_time((icalvalue*)impl,v); - - return (icalvalue*)impl; -} - -void -icalvalue_set_time(icalvalue* value, struct icaltimetype v) -{ - struct icalvalue_impl* impl; - - icalerror_check_arg_rv( (value!=0),"value"); - - icalerror_check_value_type(value, ICAL_TIME_VALUE); - - impl = (struct icalvalue_impl*)value; - impl->data.v_time = v; -} - -struct icaltimetype -icalvalue_get_time(icalvalue* value) -{ - icalerror_check_arg( (value!=0),"value"); - icalerror_check_value_type(value, ICAL_TIME_VALUE); - - return ((struct icalvalue_impl*)value)->data.v_time; -} - - -icalvalue* -icalvalue_new_trigger (union icaltriggertype v) -{ - struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_TRIGGER_VALUE); - - - icalvalue_set_trigger((icalvalue*)impl,v); - - return (icalvalue*)impl; -} - -void -icalvalue_set_trigger(icalvalue* value, union icaltriggertype v) -{ - struct icalvalue_impl* impl; - - icalerror_check_arg_rv( (value!=0),"value"); - - icalerror_check_value_type(value, ICAL_TRIGGER_VALUE); - - impl = (struct icalvalue_impl*)value; - impl->data.v_trigger = v; -} - -union icaltriggertype -icalvalue_get_trigger(icalvalue* value) -{ - icalerror_check_arg( (value!=0),"value"); - icalerror_check_value_type(value, ICAL_TRIGGER_VALUE); - - return ((struct icalvalue_impl*)value)->data.v_trigger; -} - - -icalvalue* -icalvalue_new_uri (char* v) -{ - struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_URI_VALUE); - - icalerror_check_arg_rz( (v!=0),"v"); - - icalvalue_set_uri((icalvalue*)impl,v); - - return (icalvalue*)impl; -} - -void -icalvalue_set_uri(icalvalue* value, char* v) -{ - struct icalvalue_impl* impl; - - icalerror_check_arg_rv( (value!=0),"value"); - icalerror_check_arg_rv( (v!=0),"v"); - - icalerror_check_value_type(value, ICAL_URI_VALUE); - - impl = (struct icalvalue_impl*)value; - impl->data.v_string = strdup(v); - - if (impl->data.v_string == 0){ - errno = ENOMEM; - } - -} - -char* -icalvalue_get_uri(icalvalue* value) -{ - icalerror_check_arg( (value!=0),"value"); - icalerror_check_value_type(value, ICAL_URI_VALUE); - - return ((struct icalvalue_impl*)value)->data.v_string; -} - - -icalvalue* -icalvalue_new_utcoffset (int v) -{ - struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_UTCOFFSET_VALUE); - - - icalvalue_set_utcoffset((icalvalue*)impl,v); - - return (icalvalue*)impl; -} - -void -icalvalue_set_utcoffset(icalvalue* value, int v) -{ - struct icalvalue_impl* impl; - - icalerror_check_arg_rv( (value!=0),"value"); - - icalerror_check_value_type(value, ICAL_UTCOFFSET_VALUE); - - impl = (struct icalvalue_impl*)value; - impl->data.v_int = v; -} - -int -icalvalue_get_utcoffset(icalvalue* value) -{ - icalerror_check_arg( (value!=0),"value"); - icalerror_check_value_type(value, ICAL_UTCOFFSET_VALUE); - - return ((struct icalvalue_impl*)value)->data.v_int; -} - - -icalvalue* -icalvalue_new_query (char* v) -{ - struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_QUERY_VALUE); - - icalerror_check_arg_rz( (v!=0),"v"); - - icalvalue_set_query((icalvalue*)impl,v); - - return (icalvalue*)impl; -} - -void -icalvalue_set_query(icalvalue* value, char* v) -{ - struct icalvalue_impl* impl; - - icalerror_check_arg_rv( (value!=0),"value"); - icalerror_check_arg_rv( (v!=0),"v"); - - icalerror_check_value_type(value, ICAL_QUERY_VALUE); - - impl = (struct icalvalue_impl*)value; - impl->data.v_string = strdup(v); - - if (impl->data.v_string == 0){ - errno = ENOMEM; - } - -} - -char* -icalvalue_get_query(icalvalue* value) -{ - icalerror_check_arg( (value!=0),"value"); - icalerror_check_value_type(value, ICAL_QUERY_VALUE); - - return ((struct icalvalue_impl*)value)->data.v_string; -} - diff --git a/libical/src/libical/icalvalue.h b/libical/src/libical/icalvalue.h deleted file mode 100644 index ec7457d6aa..0000000000 --- a/libical/src/libical/icalvalue.h +++ /dev/null @@ -1,169 +0,0 @@ -/* -*- Mode: C -*- */ -/*====================================================================== - FILE: icalvalue.h - CREATOR: eric 20 March 1999 - - - $Id$ - $Locker$ - - - - (C) COPYRIGHT 1999 Eric Busboom - http://www.softwarestudio.org - - The contents of this file are subject to the Mozilla Public License - Version 1.0 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and - limitations under the License. - - The original author is Eric Busboom - The original code is icalvalue.h - - ======================================================================*/ - -#ifndef ICALVALUE_H -#define ICALVALUE_H - -#include -#include "icalenums.h" -#include "icaltypes.h" - -typedef void icalvalue; - -icalvalue* icalvalue_new(icalvalue_kind kind); - -icalvalue* icalvalue_new_clone(icalvalue* value); - -icalvalue* icalvalue_new_from_string(icalvalue_kind kind, char* str); - -void icalvalue_free(icalvalue* value); - -int icalvalue_is_valid(icalvalue* value); - -char* icalvalue_as_ical_string(icalvalue* value); - -icalvalue_kind icalvalue_isa(icalvalue* value); - -int icalvalue_isa_value(void*); - -icalparameter_xliccomparetype -icalvalue_compare(icalvalue* a, icalvalue *b); - -/* Everything below this line is machine generated. Do not edit. */ -/* ATTACH # Non-std */ -icalvalue* icalvalue_new_attach(struct icalattachtype v); -struct icalattachtype icalvalue_get_attach(icalvalue* value); -void icalvalue_set_attach(icalvalue* value, struct icalattachtype v); - -/* BINARY */ -icalvalue* icalvalue_new_binary(char* v); -char* icalvalue_get_binary(icalvalue* value); -void icalvalue_set_binary(icalvalue* value, char* v); - -/* BOOLEAN */ -icalvalue* icalvalue_new_boolean(int v); -int icalvalue_get_boolean(icalvalue* value); -void icalvalue_set_boolean(icalvalue* value, int v); - -/* CAL-ADDRESS */ -icalvalue* icalvalue_new_caladdress(char* v); -char* icalvalue_get_caladdress(icalvalue* value); -void icalvalue_set_caladdress(icalvalue* value, char* v); - -/* DATE */ -icalvalue* icalvalue_new_date(struct icaltimetype v); -struct icaltimetype icalvalue_get_date(icalvalue* value); -void icalvalue_set_date(icalvalue* value, struct icaltimetype v); - -/* DATE-TIME */ -icalvalue* icalvalue_new_datetime(struct icaltimetype v); -struct icaltimetype icalvalue_get_datetime(icalvalue* value); -void icalvalue_set_datetime(icalvalue* value, struct icaltimetype v); - -/* DATE-TIME-DATE # Non-std */ -icalvalue* icalvalue_new_datetimedate(struct icaltimetype v); -struct icaltimetype icalvalue_get_datetimedate(icalvalue* value); -void icalvalue_set_datetimedate(icalvalue* value, struct icaltimetype v); - -/* DATE-TIME-PERIOD # Non-std */ -icalvalue* icalvalue_new_datetimeperiod(struct icalperiodtype v); -struct icalperiodtype icalvalue_get_datetimeperiod(icalvalue* value); -void icalvalue_set_datetimeperiod(icalvalue* value, struct icalperiodtype v); - -/* DURATION */ -icalvalue* icalvalue_new_duration(struct icaldurationtype v); -struct icaldurationtype icalvalue_get_duration(icalvalue* value); -void icalvalue_set_duration(icalvalue* value, struct icaldurationtype v); - -/* FLOAT */ -icalvalue* icalvalue_new_float(float v); -float icalvalue_get_float(icalvalue* value); -void icalvalue_set_float(icalvalue* value, float v); - -/* GEO # Non-std */ -icalvalue* icalvalue_new_geo(struct icalgeotype v); -struct icalgeotype icalvalue_get_geo(icalvalue* value); -void icalvalue_set_geo(icalvalue* value, struct icalgeotype v); - -/* INTEGER */ -icalvalue* icalvalue_new_integer(int v); -int icalvalue_get_integer(icalvalue* value); -void icalvalue_set_integer(icalvalue* value, int v); - -/* METHOD # Non-std */ -icalvalue* icalvalue_new_method(icalproperty_method v); -icalproperty_method icalvalue_get_method(icalvalue* value); -void icalvalue_set_method(icalvalue* value, icalproperty_method v); - -/* PERIOD */ -icalvalue* icalvalue_new_period(struct icalperiodtype v); -struct icalperiodtype icalvalue_get_period(icalvalue* value); -void icalvalue_set_period(icalvalue* value, struct icalperiodtype v); - -/* RECUR */ -icalvalue* icalvalue_new_recur(struct icalrecurrencetype v); -struct icalrecurrencetype icalvalue_get_recur(icalvalue* value); -void icalvalue_set_recur(icalvalue* value, struct icalrecurrencetype v); - -/* STRING # Non-std */ -icalvalue* icalvalue_new_string(char* v); -char* icalvalue_get_string(icalvalue* value); -void icalvalue_set_string(icalvalue* value, char* v); - -/* TEXT */ -icalvalue* icalvalue_new_text(char* v); -char* icalvalue_get_text(icalvalue* value); -void icalvalue_set_text(icalvalue* value, char* v); - -/* TIME */ -icalvalue* icalvalue_new_time(struct icaltimetype v); -struct icaltimetype icalvalue_get_time(icalvalue* value); -void icalvalue_set_time(icalvalue* value, struct icaltimetype v); - -/* TRIGGER # Non-std */ -icalvalue* icalvalue_new_trigger(union icaltriggertype v); -union icaltriggertype icalvalue_get_trigger(icalvalue* value); -void icalvalue_set_trigger(icalvalue* value, union icaltriggertype v); - -/* URI */ -icalvalue* icalvalue_new_uri(char* v); -char* icalvalue_get_uri(icalvalue* value); -void icalvalue_set_uri(icalvalue* value, char* v); - -/* UTC-OFFSET */ -icalvalue* icalvalue_new_utcoffset(int v); -int icalvalue_get_utcoffset(icalvalue* value); -void icalvalue_set_utcoffset(icalvalue* value, int v); - -/* QUERY */ -icalvalue* icalvalue_new_query(char* v); -char* icalvalue_get_query(icalvalue* value); -void icalvalue_set_query(icalvalue* value, char* v); - -#endif ICALVALUE_H diff --git a/libical/src/libical/icalvcal.h b/libical/src/libical/icalvcal.h deleted file mode 100644 index 3a1098e6c2..0000000000 --- a/libical/src/libical/icalvcal.h +++ /dev/null @@ -1,39 +0,0 @@ -/* -*- Mode: C -*- */ -/*====================================================================== - FILE: icalvcal.h - CREATOR: eric 13 January 2000 - - - $Id$ - $Locker$ - - (C) COPYRIGHT 2000 Eric Busboom - http://www.softwarestudio.org - - The contents of this file are subject to the Mozilla Public License - Version 1.0 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and - limitations under the License. - - The Original Code is eric. The Initial Developer of the Original - Code is Eric Busboom - - -======================================================================*/ - -#ifndef ICALVCAL_H -#define ICALVCAL_H - -VCalObject* icalvcal_new_vcal_from_ical(icalcomponent* component); -icalcomponent* icalvcal_new_ical_from_vcal(VCalObject* vcal); - - -#endif /* !ICALVCAL_H */ - - - diff --git a/libical/src/libical/icalversion.h.in b/libical/src/libical/icalversion.h.in deleted file mode 100644 index aaeeed6666..0000000000 --- a/libical/src/libical/icalversion.h.in +++ /dev/null @@ -1,3 +0,0 @@ - -#define ICAL_PACKAGE "@PACKAGE@" -#define ICAL_VERSION "@VERSION@" diff --git a/libical/src/libical/icalyacc.y b/libical/src/libical/icalyacc.y deleted file mode 100644 index cffcec96d6..0000000000 --- a/libical/src/libical/icalyacc.y +++ /dev/null @@ -1,480 +0,0 @@ -%{ -/* -*- Mode: C -*- - ====================================================================== - FILE: icalitip.y - CREATOR: eric 10 June 1999 - - DESCRIPTION: - - $Id: icalyacc.y,v 1.3 2000/05/15 06:18:18 ericb Exp $ - $Locker: $ - - (C) COPYRIGHT 1999 Eric Busboom - http://www.softwarestudio.org - - The contents of this file are subject to the Mozilla Public License - Version 1.0 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and - limitations under the License. - - The original author is Eric Busboom - The original code is icalitip.y - - - - ================================b======================================*/ - -#include -#include /* for strdup() */ -#include /* for SHRT_MAX*/ -#include "icalparser.h" -#include "ical.h" -#include "pvl.h" -#define YYERROR_VERBOSE -#define YYDEBUG 1 - - -icalvalue *icalparser_yy_value; /* Current Value */ - -/* Globals for UTCOFFSET values */ -int utc; -int utc_b; -int utcsign; - -/* Globals for DURATION values */ -struct icaldurationtype duration; - -/* Globals for RECUR values */ -struct icalrecurrencetype recur; -short skiplist[367]; -short skippos; - -void copy_list(short* array, size_t size); -void clear_recur(); -void add_prop(icalproperty_kind); -void icalparser_fill_date(struct tm* t, char* dstr); -void icalparser_fill_time(struct tm* t, char* tstr); -void set_value_type(icalvalue_kind kind); -void set_parser_value_state(); -struct icaltimetype fill_datetime(char* d, char* t); -void ical_yy_error(char *s); /* Don't know why I need this.... */ -/*int yylex(void); /* Or this. */ - - - -/* Set the state of the lexer so it will interpret values ( iCAL - VALUEs, that is, ) correctly. */ - -%} - -%union { - float v_float; - int v_int; - char* v_string; - - /* Renaming hack */ -#define yymaxdepth ical_yy_maxdepth -#define yyparse ical_yy_parse -#define yylex ical_yy_lex -#define yyerror ical_yy_error -#define yylval ical_yy_lval -#define yychar ical_yy_char -#define yydebug ical_yy_debug -#define yypact ical_yy_pact -#define yyr1 ical_yy_r1 -#define yyr2 ical_yy_r2 -#define yydef ical_yy_def -#define yychk ical_yy_chk -#define yypgo ical_yy_pgo -#define yyact ical_yy_act -#define yyexca ical_yy_exca -#define yyerrflag ical_yy_errflag -#define yynerrs ical_yy_nerrs -#define yyps ical_yy_ps -#define yypv ical_yy_pv -#define yys ical_yy_s -#define yy_yys ical_yy_yys -#define yystate ical_yy_state -#define yytmp ical_yy_tmp -#define yyv ical_yy_v -#define yy_yyv ical_yy_yyv -#define yyval ical_yy_val -#define yylloc ical_yy_lloc -#define yyreds ical_yy_reds -#define yytoks ical_yy_toks -#define yylhs ical_yy_yylhs -#define yylen ical_yy_yylen -#define yydefred ical_yy_yydefred -#define yydgoto ical_yy_yydgoto -#define yydefred ical_yy_yydefred -#define yydgoto ical_yy_yydgoto -#define yysindex ical_yy_yysindex -#define yyrindex ical_yy_yyrindex -#define yygindex ical_yy_yygindex -#define yytable ical_yy_yytable -#define yycheck ical_yy_yycheck -#define yyname ical_yy_yyname -#define yyrule ical_yy_yyrule - - - -} - -%token DIGITS -%token INTNUMBER -%token FLOATNUMBER -%token STRING -%token EOL EQUALS CHARACTER COLON COMMA SEMICOLON TIMESEPERATOR - -%token TRUE FALSE - -%token FREQ BYDAY BYHOUR BYMINUTE BYMONTH BYMONTHDAY BYSECOND BYSETPOS BYWEEKNO -%token BYYEARDAY DAILY MINUTELY MONTHLY SECONDLY WEEKLY HOURLY YEARLY -%token INTERVAL COUNT UNTIL WKST MO SA SU TU WE TH FR - -%token BIT8 ACCEPTED ADD AUDIO BASE64 BINARY BOOLEAN BUSY BUSYTENTATIVE -%token BUSYUNAVAILABLE CALADDRESS CANCEL CANCELLED CHAIR CHILD COMPLETED -%token CONFIDENTIAL CONFIRMED COUNTER DATE DATETIME DECLINECOUNTER DECLINED -%token DELEGATED DISPLAY DRAFT DURATION EMAIL END FINAL FLOAT FREE GREGORIAN -%token GROUP INDIVIDUAL INPROCESS INTEGER NEEDSACTION NONPARTICIPANT -%token OPAQUE OPTPARTICIPANT PARENT PERIOD PRIVATE PROCEDURE PUBLIC PUBLISH -%token RECUR REFRESH REPLY REQPARTICIPANT REQUEST RESOURCE ROOM SIBLING -%token START TENTATIVE TEXT THISANDFUTURE THISANDPRIOR TIME TRANSPAENT -%token UNKNOWN UTCOFFSET XNAME - -%token ALTREP CN CUTYPE DAYLIGHT DIR ENCODING EVENT FBTYPE FMTTYPE LANGUAGE -%token MEMBER PARTSTAT RANGE RELATED RELTYPE ROLE RSVP SENTBY STANDARD URI - -%token TIME_CHAR UTC_CHAR - - -%% - -value: - binary_value - | boolean_value - | date_value - | datetime_value - | duration_value - | period_value - | recur_value - | utcoffset_value - | error { - icalparser_yy_value = 0; - icalparser_clear_flex_input(); - yyclearin; - } - -binary_value: "unimplemented2" - -boolean_value: - TRUE - { icalparser_yy_value = icalvalue_new_boolean(1); } - | FALSE - { icalparser_yy_value = icalvalue_new_boolean(0); } - -date_value: DIGITS - { - struct icaltimetype stm; - - stm = fill_datetime($1,0); - - stm.hour = -1; - stm.minute = -1; - stm.second = -1; - stm.is_utc = 0; - stm.is_date = 1; - - icalparser_yy_value = icalvalue_new_date(stm); - } - -utc_char: - /*empty*/ {utc = 0;} - | UTC_CHAR {utc = 1;} - -/* This is used in the period_value, where there may be two utc characters per rule. */ -utc_char_b: - /*empty*/ {utc_b = 0;} - | UTC_CHAR {utc_b = 1;} - -datetime_value: - DIGITS TIME_CHAR DIGITS utc_char - { - struct icaltimetype stm; - stm = fill_datetime($1, $3); - stm.is_utc = utc; - stm.is_date = 0; - - icalparser_yy_value = - icalvalue_new_datetime(stm); - } - - -/* Duration */ - - -dur_date: dur_day - | dur_day dur_time - -dur_week: DIGITS 'W' - { - duration.weeks = atoi($1); - } - -dur_time: TIME_CHAR dur_hour - { - } - | TIME_CHAR dur_minute - { - } - | TIME_CHAR dur_second - { - } - -dur_hour: DIGITS 'H' - { - duration.hours = atoi($1); - } - | DIGITS 'H' dur_minute - { - duration.hours = atoi($1); - } - -dur_minute: DIGITS 'M' - { - duration.minutes = atoi($1); - } - | DIGITS 'M' dur_second - { - duration.minutes = atoi($1); - } - -dur_second: DIGITS 'S' - { - duration.seconds = atoi($1); - } - -dur_day: DIGITS 'D' - { - duration.days = atoi($1); - } - -dur_prefix: /* empty */ - { - } - | '+' - { - } - | '-' - { - } - -duration_value: dur_prefix 'P' dur_date - { - icalparser_yy_value = icalvalue_new_duration(duration); - memset(&duration,0, sizeof(duration)); - } - | dur_prefix 'P' dur_time - { - icalparser_yy_value = icalvalue_new_duration(duration); - memset(&duration,0, sizeof(duration)); - } - | dur_prefix 'P' dur_week - { - icalparser_yy_value = icalvalue_new_duration(duration); - memset(&duration,0, sizeof(duration)); - } - - -/* Period */ - -period_value: DIGITS TIME_CHAR DIGITS utc_char '/' DIGITS TIME_CHAR DIGITS utc_char_b - { - struct icalperiodtype p; - - p.start = fill_datetime($1,$3); - p.start.is_utc = utc; - p.start.is_date = 0; - - - p.end = fill_datetime($6,$8); - p.end.is_utc = utc_b; - p.end.is_date = 0; - - p.duration.days = -1; - p.duration.weeks = -1; - p.duration.hours = -1; - p.duration.minutes = -1; - p.duration.seconds = -1; - - icalparser_yy_value = icalvalue_new_period(p); - } - | DIGITS TIME_CHAR DIGITS utc_char '/' duration_value - { - struct icalperiodtype p; - - p.start = fill_datetime($1,$3); - p.start.is_utc = utc; - p.start.is_date = 0; - - p.end.year = -1; - p.end.month = -1; - p.end.day = -1; - p.end.hour = -1; - p.end.minute = -1; - p.end.second = -1; - - /* The duration_value rule setes the global 'duration' - variable, but it also creates a new value in - icalparser_yy_value. So, free that, then copy - 'duration' into the icalperiodtype struct. */ - - p.duration = icalvalue_get_duration(icalparser_yy_value); - icalvalue_free(icalparser_yy_value); - icalparser_yy_value = 0; - - icalparser_yy_value = icalvalue_new_period(p); - - } - - - -/* Recur */ - -recur_start: - FREQ EQUALS SECONDLY {clear_recur();recur.freq = ICAL_SECONDLY_RECURRENCE;} - | FREQ EQUALS MINUTELY {clear_recur();recur.freq = ICAL_MINUTELY_RECURRENCE;} - | FREQ EQUALS HOURLY {clear_recur();recur.freq = ICAL_HOURLY_RECURRENCE;} - | FREQ EQUALS DAILY {clear_recur();recur.freq = ICAL_DAILY_RECURRENCE;} - | FREQ EQUALS WEEKLY {clear_recur();recur.freq = ICAL_WEEKLY_RECURRENCE;} - | FREQ EQUALS MONTHLY {clear_recur();recur.freq = ICAL_MONTHLY_RECURRENCE;} - | FREQ EQUALS YEARLY {clear_recur();recur.freq = ICAL_YEARLY_RECURRENCE;} - ; - - -weekday: - SU { skiplist[skippos]=ICAL_SUNDAY_WEEKDAY; if( skippos<8) skippos++;} - | MO { skiplist[skippos]=ICAL_MONDAY_WEEKDAY;if( skippos<8) skippos++;} - | TU { skiplist[skippos]=ICAL_TUESDAY_WEEKDAY;if( skippos<8) skippos++;} - | WE { skiplist[skippos]=ICAL_WEDNESDAY_WEEKDAY;if( skippos<8) skippos++;} - | TH { skiplist[skippos]=ICAL_THURSDAY_WEEKDAY;if( skippos<8) skippos++;} - | FR { skiplist[skippos]=ICAL_FRIDAY_WEEKDAY;if( skippos<8) skippos++;} - | SA { skiplist[skippos]=ICAL_SATURDAY_WEEKDAY;if( skippos<8) skippos++;} - ; - - -weekday_list: - weekday - | DIGITS weekday { } /* HACK Incorectly handles int in BYDAY */ - | weekday_list COMMA weekday - - -recur_list: - DIGITS { skiplist[skippos] = atoi($1); skippos++;} - | recur_list COMMA DIGITS { skiplist[skippos] = atoi($3); if (skippos<367) skippos++;} - ; - -recur_skip: - INTERVAL EQUALS DIGITS {recur.interval = atoi($3);} - | WKST EQUALS SU {recur.week_start = ICAL_SUNDAY_WEEKDAY;} - | WKST EQUALS MO {recur.week_start = ICAL_MONDAY_WEEKDAY;} - | WKST EQUALS TU {recur.week_start = ICAL_TUESDAY_WEEKDAY;} - | WKST EQUALS WE {recur.week_start = ICAL_WEDNESDAY_WEEKDAY;} - | WKST EQUALS TH {recur.week_start = ICAL_THURSDAY_WEEKDAY;} - | WKST EQUALS FR {recur.week_start = ICAL_FRIDAY_WEEKDAY;} - | WKST EQUALS SA {recur.week_start = ICAL_SATURDAY_WEEKDAY;} - | BYSECOND EQUALS recur_list{copy_list(recur.by_second,60);} - | BYMINUTE EQUALS recur_list{copy_list(recur.by_minute,60);} - | BYHOUR EQUALS recur_list{copy_list(recur.by_hour,24);} - | BYDAY EQUALS weekday_list{copy_list(recur.by_day,7);} - | BYMONTH EQUALS recur_list{copy_list(recur.by_month,12);} - | BYMONTHDAY EQUALS recur_list{copy_list(recur.by_month_day,31);} - | BYYEARDAY EQUALS recur_list{copy_list(recur.by_year_day,366);} - | BYWEEKNO EQUALS recur_list{copy_list(recur.by_week_no,53);} - | BYSETPOS EQUALS recur_list{copy_list(recur.by_set_pos,366);} - | UNTIL EQUALS datetime_value - { recur.until = icalvalue_get_datetime(icalparser_yy_value); - icalvalue_free(icalparser_yy_value); icalparser_yy_value=0;} - | UNTIL EQUALS date_value - { recur.until = icalvalue_get_date(icalparser_yy_value); - icalvalue_free(icalparser_yy_value); icalparser_yy_value=0;} - | COUNT EQUALS DIGITS - { recur.count = atoi($3); } - ; - -recur_skip_list: - /* empty */ - | recur_skip_list SEMICOLON recur_skip - -recur_value: - recur_start recur_skip_list - { icalparser_yy_value = icalvalue_new_recur(recur); } - - - -/* UTC Offset */ - -plusminus: '+' { utcsign = 1; } - | '-' { utcsign = -1; } - -utcoffset_value: - plusminus INTNUMBER INTNUMBER - { - icalparser_yy_value = icalvalue_new_utcoffset( utcsign * ($2*3600) + ($3*60) ); - } - - | plusminus INTNUMBER INTNUMBER INTNUMBER - { - icalparser_yy_value = icalvalue_new_utcoffset(utcsign * ($2*3600) + ($3*60) +($4)); - } - - - -%% - - -void clear_recur() -{ - memset(&skiplist, ICAL_RECURRENCE_ARRAY_MAX_BYTE, sizeof(skiplist)); - skippos = 0; - - icalrecurrencetype_clear(&recur); -} - -void copy_list(short* array, size_t size) -{ - memcpy(array, skiplist, size*sizeof(short)); - memset(&skiplist,ICAL_RECURRENCE_ARRAY_MAX_BYTE, sizeof(skiplist)); - skippos = 0; -} - -struct icaltimetype fill_datetime(char* datestr, char* timestr) -{ - struct icaltimetype stm; - - memset(&stm,0,sizeof(stm)); - - if (datestr != 0){ - sscanf(datestr,"%4d%2d%2d",&(stm.year), &(stm.month), - &(stm.day)); - } - - if (timestr != 0){ - sscanf(timestr,"%2d%2d%2d", &(stm.hour), &(stm.minute), - &(stm.second)); - } - - return stm; - -} - -void yyerror(char* s) -{ - /*fprintf(stderr,"Parse error \'%s\'\n", s);*/ -} - diff --git a/libical/src/libical/locking.c b/libical/src/libical/locking.c deleted file mode 100644 index 0376bc2bec..0000000000 --- a/libical/src/libical/locking.c +++ /dev/null @@ -1,143 +0,0 @@ - -/* - I Stole this from: - http://www.cis.temple.edu/~ingargio/old/cis307s96/readings/rwlockexample.html - - CIS 307: An example using Read/Write File Locks - [fcntl.h], [fcntl.c], [fcntlmain.c] - -In Stevens "Advanced Programming in the Unix Environment" we see ways to use -the Unix service fcntl to lock portions of a file for reading and writing in -the manner stated in the Reader and Writer problem [any number of readers at -a time, but writers must operate alone]. Here we have three files that adapt -and use the code from Stevens: - -*fcntl.h: Specification of the locking functions. -*fcntl.c: Implementation of the locking functions. -*fcntlmain.c: Driver that does a simple test of the locking functions. - -WARNING: A file lock request which is blocked can be interrupted by a -signal. In this case the lock operation returns EINTR. Thus we may think we -got a lock when we really don't. A solution is to block signals when -locking. Another solution is to test the value returned by the lock -operation and relock if the value is EINTR. Another solution, which we adopt -here, is to do nothing about it. - -/* fcntl.c -- Defines mutexes in terms of read/write locks on files. - * (code is mostly from Stevens: Advanced Programming in the - * Unix environment. See from page 367 on. - * filerwlock, filerwlockCreate, filerwlockDelete, - * filerwreadlock, filerwlongreadlock, filerwlongunlock, - * filerwlockUnlock - */ - -#include -#include -#include -#include - -int lock_reg(int, int, int, off_t, int, off_t); - -#define read_lock(fd, offset, whence, len) \ - lock_reg(fd, F_SETLK, F_RDLCK, offset, whence, len) - -#define readw_lock(fd, offset, whence, len) \ - lock_reg(fd, F_SETLKW, F_RDLCK, offset, whence, len) - -#define write_lock(fd, offset, whence, len) \ - lock_reg(fd, F_SETLK, F_WRLCK, offset, whence, len) - -#define writew_lock(fd, offset, whence, len) \ - lock_reg(fd, F_SETLKW, F_WRLCK, offset, whence, len) - -#define un_lock(fd, offset, whence, len) \ - lock_reg(fd, F_SETLK, F_UNLCK, offset, whence, len) - -pid_t lock_test(int, int , off_t , int , off_t ); - -#define is_readlock(fd, offset, whence, len) \ - lock_test(fd, F_RDLCK, offset, whence, len) - -#define is_writelock(fd, offset, whence, len) \ - lock_test(fd, F_WRLCK, offset, whence, len) - -int lock_reg(int fd, int cmd, int type, off_t offset, int whence, off_t len) -{ - struct flock lock; - lock.l_type = type; /* F_RDLCK, F_WRLCK, F_UNLCK */ - lock.l_start = offset; /* byte offset relative to l_whence */ - lock.l_whence = whence; /* SEEK_SET, SEEK_CUR, SEEK_END */ - lock.l_len = len; /* #bytes (0 means to EOF) */ - return (fcntl(fd, cmd, &lock)); -} - -pid_t lock_test(int fd, int type, off_t offset, int whence, off_t len) -{ - struct flock lock; - lock.l_type = type; /* F_RDLCK or F_WRLCK */ - lock.l_start = offset; /* byte offset relative to l_whence */ - lock.l_whence = whence; /* SEEK_SET, SEEK_CUR, SEEK_END */ - lock.l_len = len; /* #bytes (0 means to EOF) */ - if (fcntl(fd,F_GETLK,&lock) < 0){ - perror("fcntl"); exit(1);} - if (lock.l_type == F_UNLCK) - return (0); /* false, region is not locked by another process */ - return (lock.l_pid); /* true, return pid of lock owner */ -} - -typedef struct { - int fd; - int n;} filerwlock; - -/* Create N read/write locks and returns the id of this cluster of locks. */ -filerwlock * filerwlockCreate(char *filename, int n) { - filerwlock *fl = (filerwlock *)malloc(sizeof(filerwlock)); - if (((fl->fd) = open(filename, O_RDWR | O_CREAT | O_TRUNC, S_IWUSR)) < 0) { - perror("open"); - exit(1);} - fl->n = n; - return fl; - } - -/* Delete the cluster of read/write locks associated with fl. */ -int filerwlockDelete(filerwlock *fl) { - if (close(fl->fd) < 0) { - perror("close"); - exit(1);} - return free(fl); - } - -/* Given the read/write lock cluster fl, lock its ith element */ -int filerwreadlock(filerwlock *fl, int i) { - if ((i < 0) | (i >= fl->n)) { - printf("filerwlockLock needs i in range 0 .. %d\n", (fl->n)-1); - exit(0);} - readw_lock(fl->fd, i, SEEK_SET, 1); - } - -int filerwwritelock(filerwlock *fl, int i) { - if ((i < 0) | (i >= fl->n)) { - printf("filerwlockLock needs i in range 0 .. %d\n", (fl->n)-1); - exit(0);} - writew_lock(fl->fd, i, SEEK_SET, 1); - } - -/* Given the lock cluster fl, unlock its ith element */ -int filerwunlock(filerwlock *fl, int i){ - - if ((i < 0) | (i >= fl->n)) { - printf("filerwlockUnlock needs i in range 0 .. %d\n", (fl->n)-1); - exit(0);} - un_lock(fl->fd, i, SEEK_SET, 1); - } - -/* Given the lock cluster fl, it read locks all its elements */ -int filerwlongreadlock(filerwlock *fl) { - readw_lock(fl->fd, 0, SEEK_SET, fl->n); -} - -/* Given the lock cluster fl, it unlocks all its elements */ -int filerwlongunlock(filerwlock *fl) { - un_lock(fl->fd, 0, SEEK_SET, fl->n); -} - diff --git a/libical/src/libical/pvl.c b/libical/src/libical/pvl.c deleted file mode 100644 index d5225a541e..0000000000 --- a/libical/src/libical/pvl.c +++ /dev/null @@ -1,768 +0,0 @@ -/*====================================================================== - FILE: pvl.c - CREATOR: eric November, 1995 - - - (C) COPYRIGHT 1999 Eric Busboom - http://www.softwarestudio.org - - The contents of this file are subject to the Mozilla Public License - Version 1.0 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and - limitations under the License. -======================================================================*/ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "pvl.h" -#include -#include -#include - - - -/* - struct pvl_list_t - - The list structure. This is the hanlde for the entire list - - This type is also private. Use pvl_list instead - - */ - -typedef struct pvl_list_t -{ - int MAGIC; /* Magic Identifier */ - struct pvl_elem_t *head; /* Head of list */ - struct pvl_elem_t *tail; /* Tail of list */ - int count; /* Number of items in the list */ - struct pvl_elem_t *p; /* Pointer used for iterators */ -} pvl_list_t; - - - - -/* This global is incremented for each call to pvl_new_element(); it gives each - * list a unique identifer */ - -int pvl_elem_count = 0; -int pvl_list_count = 0; - - -/*---------------------------------------------------------------------- - Function: pvl_list pvl_newlist() - - Purpose: - - Creates a new list, clears the pointers and assigns a magic number - - Returns: - - Pointer to the new list - 0 if there is no available memory. - *----------------------------------------------------------------------*/ - -pvl_list -pvl_newlist() -{ - struct pvl_list_t *L; - - if ( ( L = (struct pvl_list_t*)malloc(sizeof(struct pvl_list_t))) == 0) - { - errno = ENOMEM; - return 0; - } - - L->MAGIC = pvl_list_count; - pvl_list_count++; - L->head = 0; - L->tail = 0; - L->count = 0; - L->p = 0; - - return L; -} - -void -pvl_free(pvl_list l) -{ - struct pvl_list_t *L = (struct pvl_list_t *)l; - - pvl_clear(l); - - free(L); -} - -/*---------------------------------------------------------------------- - Function: pvl_new_element(void *d, struct pvl_elem_t *next,struct pvl_elem_t *prior) - - Purpose: - Creates a new list element, assigns a magic number, and assigns - the next and previous pointers. - - Passing in the next and previous points may seem odd, but it allos the user - to set them while keeping the internal data hidden. In nearly all cases, - the user is the pvl library itself. - - Parameters: - - d The data item to be stored in the list - next Pointer value to assign to the member "next" - prior Pointer value to assign to the member "prior" - - Returns: - - A pointer to the new element. - 0 if there is no memory available. - - *----------------------------------------------------------------------*/ - -pvl_elem -pvl_new_element(void *d, pvl_elem next,pvl_elem prior) -{ - struct pvl_elem_t *E; - - if ( ( E = (struct pvl_elem_t*)malloc(sizeof(struct pvl_elem_t))) == 0) - { - errno = ENOMEM; - return 0; - } - - E->MAGIC = pvl_elem_count++; - E->d = d; - E->next = next; - E->prior = prior; - - return (pvl_elem)E; -} - -/*---------------------------------------------------------------------- - Function: pvl_unshift(pvl_list l,void *d) - - Purpose: - - Add a new element to the from of the list - - Parameters: - - l The list to add the item to - d Pointer to the item to add - - Returns: - *----------------------------------------------------------------------*/ - -void -pvl_unshift(pvl_list l,void *d) -{ - struct pvl_list_t *L = (struct pvl_list_t *)l; - struct pvl_elem_t *E = pvl_new_element(d,L->head,0); - - if (E->next != 0) - { - /* Link the head node to it */ - E->next->prior = E; - } - - /* move the head */ - L->head = E; - - /* maybe move the tail */ - - if (L->tail == 0) - { - L->tail = E; - } - - L->count++; -} - -/*---------------------------------------------------------------------- - Function: pvl_shift(pvl_list l) - - Purpose: - - Remove an element from the front of the list - - Parameters: - - l The list to operate on - - Returns: - *----------------------------------------------------------------------*/ - -void* -pvl_shift(pvl_list l) -{ - struct pvl_list_t *L = (struct pvl_list_t *)l; - - if (L->head == 0) - { - return 0; - } - - return pvl_remove(l,(void*)L->head); - -} - -/*---------------------------------------------------------------------- - Function: void pvl_push(pvl_list l,void *d) - - Purpose: - - Add a new item to the tail of the list - - Paramters: - - l The list to operate on - d Pointer to the item to add - - Returns: - *----------------------------------------------------------------------*/ - -void -pvl_push(pvl_list l,void *d) -{ - struct pvl_list_t *L = (struct pvl_list_t *)l; - struct pvl_elem_t *E = pvl_new_element(d,0,L->tail); - - /* These are done in pvl_new_element - E->next = 0; - E->prior = L->tail; - */ - - if (L->tail != 0) - { - L->tail->next = E; - } - - if (L->head == 0) - { - L->head = E; - } - - L->tail = E; - - L->count++; - -} - -/*---------------------------------------------------------------------- - Function: void* pvl_pop(pvl_list l) - - Purpose: - - Remove an element from the tail of the list - - Paramters: - - l The list to operate on - - Returns: - *----------------------------------------------------------------------*/ - -void* -pvl_pop(pvl_list l) -{ - - struct pvl_list_t *L = (struct pvl_list_t *)l; - - if ( L->tail == 0) - { - return 0; - } - - return pvl_remove(l,(void*) L->tail);; - -} - - -/*---------------------------------------------------------------------- - Function: void pvl_insert_ordered(pvl_list l,pvl_comparef f,void *d) - - Purpose: - - Add a new item to a list that is ordered by a comparison function. - This routine assumes that the list is properly ordered. - - l The list to operate on - f Pointer to a comparison function - d Pointer to data to pass to the comparison function - - Returns: - - void - - *----------------------------------------------------------------------*/ - -void -pvl_insert_ordered(pvl_list l,pvl_comparef f,void *d) -{ - struct pvl_list_t *L = (struct pvl_list_t *)l; - - struct pvl_elem_t *P; - - L->count++; - - /* Empty list, add to head */ - - if(L->head == 0) - { - pvl_unshift(l,d); - return; - } - - /* smaller than head, add to head */ - - if ( ((*f)(d,L->head->d)) < 0) - { - pvl_unshift(l,d); - return; - } - - /* larger than tail, add to tail */ - if ( (*f)(d,L->tail->d) > 0) - { - pvl_push(l,d); - return; - } - - - /* Search for the first element that is smaller, and add before it */ - - for (P=L->head; P != 0; P = P->next) - { - if ( (*f)(P->d,d) > 0) - { - pvl_insert_before(l,P,d); - return; - } - } - - /* badness, choke */ - - assert(0); - -} - -/*---------------------------------------------------------------------- - Function: void pvl_insert_after(pvl_list l,pvl_elem p,void *d) - - Purpose: - - Add a new item after the referenced element. - - Parameters: - - l The list to operate on - p The list element to add the item after - d Pointer to the item to add. - - Returns: - - void - - *----------------------------------------------------------------------*/ - -void -pvl_insert_after(pvl_list l,pvl_elem p,void *d) -{ - struct pvl_list_t *L = (struct pvl_list_t *)l; - struct pvl_elem_t *P = (struct pvl_elem_t *)p; - struct pvl_elem_t *E = 0; - - L->count++; - - if (P == 0) - { - pvl_unshift(l,d); - return; - } - - if ( P == L->tail) - { - E = pvl_new_element(d,0,P); - L->tail = E; - E->prior->next = E; - } - else - { - E = pvl_new_element(d,P->next,P); - E->next->prior = E; - E->prior->next = E; - } -} - -/*---------------------------------------------------------------------- - Function: void pvl_insert_before(pvl_list l,pvl_elem p,void *d) - - Purpose: - - Add an item after a referenced item - - Parameters: - - l The list to operate on - p The list element to add the item before - d Pointer to the data to be added. - - Returns: - *----------------------------------------------------------------------*/ - -void -pvl_insert_before(pvl_list l,pvl_elem p,void *d) -{ - struct pvl_list_t *L = (struct pvl_list_t *)l; - struct pvl_elem_t *P = (struct pvl_elem_t *)p; - struct pvl_elem_t *E = 0; - - L->count++; - - if (P == 0) - { - pvl_unshift(l,d); - return; - } - - if ( P == L->head) - { - E = pvl_new_element(d,P,0); - E->next->prior = E; - L->head = E; - } - else - { - E = pvl_new_element(d,P,P->prior); - E->prior->next = E; - E->next->prior = E; - } -} - -/*---------------------------------------------------------------------- - Function: void pvl_remove(pvl_list l,pvl_elem e) - - Purpose: - - Remove the referenced item from the list - - This routine will free the element, but not the data item that the - element contains. - - Parameters: - - l The list to operate on - e The element to remove. - - Returns: - *----------------------------------------------------------------------*/ - -void* -pvl_remove(pvl_list l,pvl_elem e) -{ - struct pvl_list_t *L = (struct pvl_list_t *)l; - struct pvl_elem_t *E = (struct pvl_elem_t *)e; - void* data; - - if (E == L->head) - { - if (E->next != 0) - { - E->next->prior = 0; - L->head = E->next; - } else { - /* E Also points to tail -> only one element in list */ - L->tail = 0; - L->head = 0; - } - } - else if (E == L->tail) - { - if (E->prior != 0) - { - E->prior->next = 0; - L->tail = E->prior; - } else { - /* E points to the head, so it was the last element */ - /* This case should be taken care of in the previous clause */ - L->head = 0; - L->tail = 0; - } - } - else - { - E->prior->next = E->next; - E->next->prior = E->prior; - } - - - L->count--; - - data = E->d; - - free(E); - - return data; - -} - -/*---------------------------------------------------------------------- - Function: pvl_elem pvl_find(pvl_list l,pvl_findf f,void* v) - - Purpose: - - Return a pointer to data that satisfies a function - - This routine will interate through the entire list and call the - find function for each item. It will break and return a pointer to the - data that causes the find function to return 1. - - Parameters: - - l The list to operate on - f Pointer to the find function - v Pointer to constant data to pass into the function - - Returns: - - Pointer to the element that the find function found. - - *----------------------------------------------------------------------*/ - -pvl_elem -pvl_find(pvl_list l,pvl_findf f,void* v) -{ - pvl_elem e; - - for (e=pvl_head(l); e!= 0; e = pvl_next(e)) - { - if ( (*f)(((struct pvl_elem_t *)e)->d,v) == 1) - { - /* Save this elem for a call to find_next */ - ((struct pvl_list_t *)l)->p = e; - return e; - } - } - - return 0; - -} -/*---------------------------------------------------------------------- - Function: void* pvl_find_next(pvl_list l,pvl_findf f,void* v) - - Purpose: - - Like pvl_find(), but continues the search where the last find() or - find_next() left off - - Parameters: - - l The list to operate on - f Pointer to the find function - v Pointer to constant data to pass into the function - - Returns: - - Pointer to the element that the find function found. - - *----------------------------------------------------------------------*/ - -pvl_elem -pvl_find_next(pvl_list l,pvl_findf f,void* v) -{ - - pvl_elem e; - - for (e=pvl_head(l); e!= 0; e = pvl_next(e)) - { - if ( (*f)(((struct pvl_elem_t *)e)->d,v) == 1) - { - /* Save this elem for a call to find_next */ - ((struct pvl_list_t *)l)->p = e; - return e; - } - } - - return 0; - -} - -/*---------------------------------------------------------------------- - Function: void pvl_clear(pvl_list l) - - Purpose: - - Remove the all the elements in the list. The does not free the data items - the elements hold. - - - Returns: - *----------------------------------------------------------------------*/ - -void -pvl_clear(pvl_list l) -{ - pvl_elem e = pvl_head(l); - pvl_elem next; - - if (e == 0) { - return; - } - - while(e != 0) - { - next = pvl_next(e); - pvl_remove(l,e); - e = next; - } -} - -/*---------------------------------------------------------------------- - Function: int pvl_count(pvl_list l) - - Purpose: - - Returns the number of items in the list. - - Returns: - *----------------------------------------------------------------------*/ - -int -pvl_count(pvl_list l) -{ - struct pvl_list_t *L = (struct pvl_list_t *)l; - - return L->count; -} - - -/*---------------------------------------------------------------------- - Function: pvl_elem pvl_next(pvl_elem e) - - Purpose: - Returns a pointer to the given element - - Returns: - *----------------------------------------------------------------------*/ - -pvl_elem -pvl_next(pvl_elem e) -{ - struct pvl_elem_t *E = (struct pvl_elem_t *)e; - - if (E == 0){ - return 0; - } - - return (pvl_elem)E->next; -} - -/*---------------------------------------------------------------------- - Function: pvl_elem pvl_prior(pvl_elem e) - - Purpose: - - Returns a pointer to the element previous to the element given. - - Returns: - *----------------------------------------------------------------------*/ - -pvl_elem -pvl_prior(pvl_elem e) -{ - struct pvl_elem_t *E = (struct pvl_elem_t *)e; - - return (pvl_elem)E->prior; -} - -/*---------------------------------------------------------------------- - Function: pvl_elem pvl_head(pvl_list l ) - - Purpose: - - Returns a pointer to the first item in the list. - - Returns: - *----------------------------------------------------------------------*/ -pvl_elem -pvl_head(pvl_list l ) -{ - struct pvl_list_t *L = (struct pvl_list_t *)l; - - return (pvl_elem)L->head; -} - -/*---------------------------------------------------------------------- - Function: pvl_elem pvl_tail(pvl_list l) - - Purpose: - - Returns a pointer to the last item in the list. - - Returns: - *----------------------------------------------------------------------*/ -pvl_elem -pvl_tail(pvl_list l) -{ - struct pvl_list_t *L = (struct pvl_list_t *)l; - return (pvl_elem)L->tail; -} - -/*---------------------------------------------------------------------- - Function: - - - Purpose: - - - Returns: - *----------------------------------------------------------------------*/ - -#ifndef PVL_USE_MACROS -void* -pvl_data(pvl_elem e) -{ - struct pvl_elem_t *E = (struct pvl_elem_t *)e; - - if ( e == 0){ - return 0; - } - - return E->d; -} -#endif - -/*---------------------------------------------------------------------- - Function: void pvl_apply(pvl_list l,pvl_applyf f, void *v) - - Purpose: - - Call a function for every item in the list. - - Paramters: - - l The list to operate on - f Pointer to the function to call - v Data to pass to the function on every iteration - - Returns: - - void - *----------------------------------------------------------------------*/ - -void -pvl_apply(pvl_list l,pvl_applyf f, void *v) -{ - pvl_elem e; - - for (e=pvl_head(l); e!= 0; e = pvl_next(e)) - { - (*f)(((struct pvl_elem_t *)e)->d,v); - } - -} diff --git a/libical/src/libical/pvl.h b/libical/src/libical/pvl.h deleted file mode 100644 index 8113f7495a..0000000000 --- a/libical/src/libical/pvl.h +++ /dev/null @@ -1,104 +0,0 @@ -/*====================================================================== - FILE: pvl.h - CREATOR: eric November, 1995 - - - (C) COPYRIGHT 1999 Eric Busboom - http://www.softwarestudio.org - - The contents of this file are subject to the Mozilla Public License - Version 1.0 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and - limitations under the License. - -======================================================================*/ - -/* - struct pvl_elem_t - - This type is private. Always use pvl_elem instead - - */ - -#ifndef __PVL_H__ -#define __PVL_H__ - -typedef void* pvl_list; -typedef void* pvl_elem; - -typedef struct pvl_elem_t -{ - int MAGIC; /* Magic Identifier */ - void *d; /* Pointer to data user is storing */ - struct pvl_elem_t *next; /* Next element */ - struct pvl_elem_t *prior; /* prior element */ -} pvl_elem_t; - - - -/* This global is incremented for each call to pvl_new_element(); it gives each - * list a unique identifer */ - -extern int pvl_elem_count; -extern int pvl_list_count; - -/* Create new lists or elements */ -pvl_elem pvl_new_element(void* d, pvl_elem next,pvl_elem prior); -pvl_list pvl_newlist(); -void pvl_free(pvl_list); - -/* Add, remove, or get the head of the list */ -void pvl_unshift(pvl_list l,void *d); -void* pvl_shift(pvl_list l); -pvl_elem pvl_head(pvl_list); - -/* Add, remove or get the tail of the list */ -void pvl_push(pvl_list l,void *d); -void* pvl_pop(pvl_list l); -pvl_elem pvl_tail(pvl_list); - -/* Insert elements in random places */ -typedef int (*pvl_comparef)(void* a, void* b); /* a, b are of the data type*/ -void pvl_insert_ordered(pvl_list l,pvl_comparef f,void *d); -void pvl_insert_after(pvl_list l,pvl_elem e,void *d); -void pvl_insert_before(pvl_list l,pvl_elem e,void *d); - -/* Remove an element, or clear the entire list */ -void* pvl_remove(pvl_list,pvl_elem); /* Remove element, return data */ -void pvl_clear(pvl_list); /* Remove all elements, de-allocate all data */ - -int pvl_count(pvl_list); - -/* Navagate the list */ -pvl_elem pvl_next(pvl_elem e); -pvl_elem pvl_prior(pvl_elem e); - -/* get the data in the list */ -#ifndef PVL_USE_MACROS -void* pvl_data(pvl_elem); -#else -#define pvl_data(x) x==0 ? 0 : ((struct pvl_elem_t *)x)->d; -#endif - - -/* Find an element for which a function returns true */ -typedef int (*pvl_findf)(void* a, void* b); /*a is list elem, b is other data*/ -pvl_elem pvl_find(pvl_list l,pvl_findf f,void* v); -pvl_elem pvl_find_next(pvl_list l,pvl_findf f,void* v); - -/* Pass each element in the list to a function */ -typedef void (*pvl_applyf)(void* a, void* b); /*a is list elem, b is other data*/ -void pvl_apply(pvl_list l,pvl_applyf f, void *v); - - -#endif /* __PVL_H__ */ - - - - - diff --git a/libical/src/libical/testlocks.c b/libical/src/libical/testlocks.c deleted file mode 100644 index d3e9e55cec..0000000000 --- a/libical/src/libical/testlocks.c +++ /dev/null @@ -1,70 +0,0 @@ -/* This is just a driver to test the filerwlock objects defined in fcntl.c */ -/* MAXCHILD processes are forked. They take turns in using LOCKSSIZE locks.*/ -/* I compiled the program as follows */ -/* cc fcntlmain.c fcntl.c -o fcntlmain */ -/* and then run the image fcntlmain. */ -/* Notice that after the program has run I find the file "mylock" in my */ -/* directory. Not very desirable. Perhaps there is a way to avoid that? */ - -#include -#include -#include "fcntl.h" - -#define LOCKFILE "mylock" -#define LOCKSSIZE 5 -#define MAXCHILD 4 - -void child (int self); - -pid_t cldrn[4]; -filerwlock *fl; - -int -main(void){ - int i; - - fl = filerwlockCreate(LOCKFILE, LOCKSSIZE); - - for (i=0;i < MAXCHILD; i++) { - if ((cldrn[i]=fork()) < 0) { - perror("fork"); - exit(1);} - if (cldrn[i]==0) - child(i); - } - for (i=0; i < MAXCHILD; i++) - wait(); - - filerwlockDelete(fl); - exit(0); -} - -void child (int self) { - int i, j; - char s[256]; - for (j=0; j<8; j++) { - - if (self == 0) { - filerwwritelock(fl,1); - } else if (self == (MAXCHILD-1)) { - filerwlongreadlock(fl); - } else { - filerwreadlock(fl,1); - } - - printf("Child %d starts to sleep on lock %d\n", self, 1); - - sleep(3); - - printf("Child %d ends sleep on lock %d\n", self, 1); - - if (self == (MAXCHILD-1)) { - filerwlongunlock(fl); - } else { - filerwunlock(fl,1); - } - - sleep(1); - } - exit(0); -} diff --git a/libical/src/libicalss/.cvsignore b/libical/src/libicalss/.cvsignore deleted file mode 100644 index 732c1577b6..0000000000 --- a/libical/src/libicalss/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -Makefile -.deps -Makefile.in -*.lo -*.la -.libs \ No newline at end of file diff --git a/libical/src/libicalss/Makefile.am b/libical/src/libicalss/Makefile.am deleted file mode 100644 index ea37380688..0000000000 --- a/libical/src/libicalss/Makefile.am +++ /dev/null @@ -1,23 +0,0 @@ - - -#noinst_LTLIBRARIES = libicalss.la -lib_LTLIBRARIES = libicalss.la - -libicalss_la_SOURCES =\ - icalcalendar.c \ - icalcalendar.h \ - icalcluster.c \ - icalcluster.h \ - icalstore.c \ - icalstore.h - -include_HEADERS =\ - icalcalendar.h \ - icalcluster.h \ - icalstore.h - - -INCLUDES = \ - -I $(srcdir)/../libical/ \ - -I ../libical - diff --git a/libical/src/libicalss/icalcalendar.c b/libical/src/libicalss/icalcalendar.c deleted file mode 100644 index 0f2231b1d7..0000000000 --- a/libical/src/libicalss/icalcalendar.c +++ /dev/null @@ -1,268 +0,0 @@ -/* -*- Mode: C -*- - ====================================================================== - FILE: icalcalendar.c - CREATOR: eric 23 December 1999 - - $Id$ - $Locker$ - - (C) COPYRIGHT 1999 Eric Busboom - http://www.softwarestudio.org - - The contents of this file are subject to the Mozilla Public License - Version 1.0 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and - limitations under the License. - - The Original Code is eric. The Initial Developer of the Original - Code is Eric Busboom - - - ======================================================================*/ - - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - - -#include "icalcalendar.h" -#include "icalcluster.h" -#include -#include /* For mkdir, stat */ -#include /* For mkdir */ -#include /* For mkdir */ -#include /* For mkdir, stat */ -#include /* for malloc */ -#include /* for strcat */ -#include - -#define BOOKED_DIR "booked" -#define INCOMING_FILE "incoming.ics" -#define PROP_FILE "properties.ics" -#define FBLIST_FILE "freebusy.ics" - -struct icalcalendar_impl -{ - char* dir; - icalcomponent* freebusy; - icalcomponent* properties; - icalstore* booked; - icalstore* incoming; -}; - -struct icalcalendar_impl* icalcalendar_new_impl() -{ - struct icalcalendar_impl* impl; - - if ( ( impl = (struct icalcalendar_impl*) - malloc(sizeof(struct icalcalendar_impl))) == 0) { - icalerror_set_errno(ICAL_NEWFAILED_ERROR); - return 0; - } - - return impl; -} - - -icalerrorenum icalcalendar_create(struct icalcalendar_impl* impl) -{ - char path[PATH_MAX]; - struct stat sbuf; - int r; - - icalerror_check_arg_re((impl != 0),"impl",ICAL_BADARG_ERROR); - - path[0] = '\0'; - strcpy(path,impl->dir); - strcat(path,"/"); - strcat(path,BOOKED_DIR); - - r = stat(path,&sbuf); - - if( r != 0 && errno == ENOENT){ - - if(mkdir(path,0777)!=0){ - icalerror_set_errno(ICAL_FILE_ERROR); - return ICAL_FILE_ERROR; - } - } - - return ICAL_NO_ERROR; -} - -icalcalendar* icalcalendar_new(char* dir) -{ - struct icalcalendar_impl* impl; - - icalerror_check_arg_rz((dir != 0),"dir"); - - impl = icalcalendar_new_impl(); - - if (impl == 0){ - return 0; - } - - impl->dir = (char*)strdup(dir); - impl->freebusy = 0; - impl->properties = 0; - impl->booked = 0; - impl->incoming = 0; - - if (icalcalendar_create(impl) != ICAL_NO_ERROR){ - free(impl); - return 0; - } - - return impl; -} - -void icalcalendar_free(icalcalendar* calendar) -{ - - struct icalcalendar_impl *impl = (struct icalcalendar_impl*)calendar; - - if (impl->dir !=0){ - free(impl->dir); - } - - if (impl->freebusy !=0){ - icalcluster_free(impl->freebusy); - } - - if (impl->properties !=0){ - icalcluster_free(impl->properties); - } - - if (impl->booked !=0){ - icalstore_free(impl->booked); - } - - if (impl->incoming !=0){ - icalstore_free(impl->incoming); - } - - impl->dir = 0; - impl->freebusy = 0; - impl->properties = 0; - impl->booked = 0; - impl->incoming = 0; - - - free(impl); -} - - -int icalcalendar_lock(icalcalendar* calendar) -{ - struct icalcalendar_impl *impl = (struct icalcalendar_impl*)calendar; - icalerror_check_arg_rz((impl != 0),"impl"); - return 0; -} - -int icalcalendar_unlock(icalcalendar* calendar) -{ - struct icalcalendar_impl *impl = (struct icalcalendar_impl*)calendar; - icalerror_check_arg_rz((impl != 0),"impl"); - return 0; -} - -int icalcalendar_islocked(icalcalendar* calendar) -{ - struct icalcalendar_impl *impl = (struct icalcalendar_impl*)calendar; - icalerror_check_arg_rz((impl != 0),"impl"); - return 0; -} - -int icalcalendar_ownlock(icalcalendar* calendar) -{ - struct icalcalendar_impl *impl = (struct icalcalendar_impl*)calendar; - icalerror_check_arg_rz((impl != 0),"impl"); - return 0; -} - -icalstore* icalcalendar_get_booked(icalcalendar* calendar) -{ - struct icalcalendar_impl *impl = (struct icalcalendar_impl*)calendar; - char dir[PATH_MAX]; - - icalerror_check_arg_rz((impl != 0),"impl"); - - dir[0] = '\0'; - strcpy(dir,impl->dir); - strcat(dir,"/"); - strcat(dir,BOOKED_DIR); - - if (impl->booked == 0){ - icalerror_clear_errno(); - impl->booked = icalstore_new(dir); - assert(icalerrno == ICAL_NO_ERROR); - } - - return impl->booked; - -} - -icalcluster* icalcalendar_get_incoming(icalcalendar* calendar) -{ - char path[PATH_MAX]; - struct icalcalendar_impl *impl = (struct icalcalendar_impl*)calendar; - icalerror_check_arg_rz((impl != 0),"impl"); - - path[0] = '\0'; - strcpy(path,impl->dir); - strcat(path,"/"); - strcat(path,INCOMING_FILE); - - if (impl->properties == 0){ - impl->properties = icalcluster_new(path); - } - - return impl->properties; -} - -icalcluster* icalcalendar_get_properties(icalcalendar* calendar) -{ - char path[PATH_MAX]; - struct icalcalendar_impl *impl = (struct icalcalendar_impl*)calendar; - icalerror_check_arg_rz((impl != 0),"impl"); - - path[0] = '\0'; - strcpy(path,impl->dir); - strcat(path,"/"); - strcat(path,PROP_FILE); - - if (impl->properties == 0){ - impl->properties = icalcluster_new(path); - } - - return impl->properties; -} - -icalcluster* icalcalendar_get_freebusy(icalcalendar* calendar) -{ - char path[PATH_MAX]; - struct icalcalendar_impl *impl = (struct icalcalendar_impl*)calendar; - icalerror_check_arg_rz((impl != 0),"impl"); - - path[0] = '\0'; - strcpy(path,impl->dir); - strcat(path,"/"); - strcat(path,FBLIST_FILE); - - - if (impl->freebusy == 0){ - impl->freebusy = icalcluster_new(path); - } - - return impl->freebusy; -} - - - - diff --git a/libical/src/libicalss/icalcalendar.h b/libical/src/libicalss/icalcalendar.h deleted file mode 100644 index 90e7b33c22..0000000000 --- a/libical/src/libicalss/icalcalendar.h +++ /dev/null @@ -1,68 +0,0 @@ -/* -*- Mode: C -*- */ -/*====================================================================== - FILE: icalcalendar.h - CREATOR: eric 23 December 1999 - - - $Id$ - $Locker$ - - (C) COPYRIGHT 1999 Eric Busboom - http://www.softwarestudio.org - - The contents of this file are subject to the Mozilla Public License - Version 1.0 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and - limitations under the License. - - The Original Code is eric. The Initial Developer of the Original - Code is Eric Busboom - - -======================================================================*/ - -#ifndef ICALCALENDAR_H -#define ICALCALENDAR_H - -#include "ical.h" -#include "icalstore.h" -#include "icalcluster.h" - -/* icalcalendar - * Routines for storing calendar data in a file system. The calendar - * has two icalstores, one for incoming components and one for booked - * components. It also has interfaces to access the free/busy list - * and a list of calendar properties */ - -typedef void icalcalendar; - -icalcalendar* icalcalendar_new(char* dir); - -void icalcalendar_free(icalcalendar* calendar); - -int icalcalendar_lock(icalcalendar* calendar); - -int icalcalendar_unlock(icalcalendar* calendar); - -int icalcalendar_islocked(icalcalendar* calendar); - -int icalcalendar_ownlock(icalcalendar* calendar); - -icalstore* icalcalendar_get_booked(icalcalendar* calendar); - -icalcluster* icalcalendar_get_incoming(icalcalendar* calendar); - -icalcluster* icalcalendar_get_properties(icalcalendar* calendar); - -icalcluster* icalcalendar_get_freebusy(icalcalendar* calendar); - - -#endif /* !ICALCALENDAR_H */ - - - diff --git a/libical/src/libicalss/icalcluster.c b/libical/src/libicalss/icalcluster.c deleted file mode 100644 index 36bdccc743..0000000000 --- a/libical/src/libicalss/icalcluster.c +++ /dev/null @@ -1,423 +0,0 @@ -/* -*- Mode: C -*- - ====================================================================== - FILE: icalcluster.c - CREATOR: eric 23 December 1999 - - $Id$ - $Locker$ - - (C) COPYRIGHT 1999 Eric Busboom - http://www.softwarestudio.org - - The contents of this file are subject to the Mozilla Public License - Version 1.0 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and - limitations under the License. - - The Original Code is eric. The Initial Developer of the Original - Code is Eric Busboom - - - ======================================================================*/ - - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - - -#include "icalcluster.h" -#include -#include /* For PATH_MAX */ -#include /* for stat */ -#include /* for stat, getpid */ -#include -#include -#include /* for fcntl */ -#include /* for fcntl */ - -icalerrorenum icalcluster_create_cluster(char *path); - -struct icalcluster_impl { - char *path; - icalcomponent* cluster; - int changed; - FILE* stream; -}; - -icalcluster* icalcluster_new_impl() -{ - struct icalcluster_impl* comp; - - if ( ( comp = (struct icalcluster_impl*) - malloc(sizeof(struct icalcluster_impl))) == 0) { - icalerror_set_errno(ICAL_NEWFAILED_ERROR); - errno = ENOMEM; - return 0; - } - - return comp; -} - -char* read_from_file(char *s, size_t size, void *d) -{ - char *c = fgets(s,size, (FILE*)d); - return c; -} - -icalcluster* icalcluster_new(char* path) -{ - struct icalcluster_impl *impl = icalcluster_new_impl(); - struct stat sbuf; - int createclusterfile = 0; - icalerrorenum error = ICAL_NO_ERROR; - icalparser *parser; - struct icaltimetype tt; - off_t cluster_file_size; - - memset(&tt,0,sizeof(struct icaltimetype)); - - icalerror_clear_errno(); - icalerror_check_arg_rz( (path!=0), "path"); - - if (impl == 0){ - return 0; - } - - /*impl->path = strdup(path); icalcluster_load does this */ - impl->changed = 0; - - impl->cluster = 0; - - impl->path = 0; - impl->stream = 0; - - /* Check if the path already exists and if it is a regular file*/ - if (stat(path,&sbuf) != 0){ - - /* A file by the given name does not exist, or there was - another error */ - cluster_file_size = 0; - if (errno == ENOENT) { - /* It was because the file does not exist */ - createclusterfile = 1; - } else { - /* It was because of another error */ - icalerror_set_errno(ICAL_FILE_ERROR); - return 0; - } - } else { - /* A file by the given name exists, but is it a regular file */ - - if (!S_ISREG(sbuf.st_mode)){ - /* Nope, not a directory */ - icalerror_set_errno(ICAL_FILE_ERROR); - return 0; - } else { - /* Lets assume that it is a file of the right type */ - cluster_file_size = sbuf.st_size; - createclusterfile = 0; - } - } - - /* if cluster does not already exist, create it */ - - if (createclusterfile == 1) { - error = icalcluster_create_cluster(path); - - if (error != ICAL_NO_ERROR){ - icalerror_set_errno(error); - return 0; - } - } - - impl->path = (char*)strdup(path); - - errno = 0; - impl->stream = fopen(impl->path,"r"); - - if (impl->stream ==0 || errno != 0){ - impl->cluster = 0; - icalerror_set_errno(ICAL_FILE_ERROR); /* Redundant, actually */ - return 0; - } - - icalcluster_lock(impl); - - if(cluster_file_size > 0){ - parser = icalparser_new(); - icalparser_set_gen_data(parser,impl->stream); - impl->cluster = icalparser_parse(parser,read_from_file); - icalparser_free(parser); - - if (icalcomponent_isa(impl->cluster) != ICAL_XROOT_COMPONENT){ - /* The parser got a single component, so it did not put it in - an XROOT. */ - icalcomponent *cl = impl->cluster; - impl->cluster = icalcomponent_new(ICAL_XROOT_COMPONENT); - icalcomponent_add_component(impl->cluster,cl); - } - - } else { - - impl->cluster = icalcomponent_new(ICAL_XROOT_COMPONENT); - } - - if (impl->cluster == 0){ - icalerror_set_errno(ICAL_PARSE_ERROR); - return 0; - } - - if (error != ICAL_NO_ERROR){ - return 0; - } - - return impl; -} - -void icalcluster_free(icalcluster* cluster) -{ - struct icalcluster_impl *impl = (struct icalcluster_impl*)cluster; - - icalerror_check_arg_rv((cluster!=0),"cluster"); - - if (impl->cluster != 0){ - icalcluster_commit(cluster); - icalcomponent_free(impl->cluster); - impl->cluster=0; - } - - if(impl->path != 0){ - free(impl->path); - impl->path = 0; - } - - if(impl->stream != 0){ - icalcluster_unlock(impl); - fclose(impl->stream); - impl->stream = 0; - } - - free(impl); -} - -char* icalcluster_path(icalcluster* cluster) -{ - struct icalcluster_impl *impl = (struct icalcluster_impl*)cluster; - icalerror_check_arg_rz((cluster!=0),"cluster"); - - return impl->path; -} - - -int icalcluster_lock(icalcluster *cluster) -{ - struct icalcluster_impl *impl = (struct icalcluster_impl*)cluster; - struct flock lock; - int fd; - - icalerror_check_arg_rz((impl->stream!=0),"impl->stream"); - - fd = fileno(impl->stream); - - lock.l_type = F_WRLCK; /* F_RDLCK, F_WRLCK, F_UNLCK */ - lock.l_start = 0; /* byte offset relative to l_whence */ - lock.l_whence = SEEK_SET; /* SEEK_SET, SEEK_CUR, SEEK_END */ - lock.l_len = 0; /* #bytes (0 means to EOF) */ - - return (fcntl(fd, F_SETLKW, &lock)); -} - -int icalcluster_unlock(icalcluster *cluster) -{ - struct icalcluster_impl *impl = (struct icalcluster_impl*)cluster; - int fd; - struct flock lock; - icalerror_check_arg_rz((impl->stream!=0),"impl->stream"); - - fd = fileno(impl->stream); - - lock.l_type = F_WRLCK; /* F_RDLCK, F_WRLCK, F_UNLCK */ - lock.l_start = 0; /* byte offset relative to l_whence */ - lock.l_whence = SEEK_SET; /* SEEK_SET, SEEK_CUR, SEEK_END */ - lock.l_len = 0; /* #bytes (0 means to EOF) */ - - return (fcntl(fd, F_UNLCK, &lock)); - -} - -icalerrorenum icalcluster_create_cluster(char *path) -{ - - FILE* f; - int r; - icalcomponent *c; - - icalerror_clear_errno(); - - f = fopen(path,"w"); - - if (f == 0){ - icalerror_set_errno(ICAL_FILE_ERROR); - return ICAL_FILE_ERROR; - } - - - /* This used to write data to the file... */ - - - fclose(f); - - return ICAL_NO_ERROR; -} - -icalerrorenum icalcluster_commit(icalcluster* cluster) -{ - FILE *f; - char tmp[PATH_MAX]; /* HACK Buffer overflow potential */ - char *str; - icalparser *parser; - icalcomponent *c; - - struct icalcluster_impl *impl = (struct icalcluster_impl*)cluster; - - icalerror_check_arg_re((impl!=0),"cluster",ICAL_BADARG_ERROR); - - if (impl->changed == 0 ){ - return ICAL_NO_ERROR; - } - -#ifdef ICAL_SAFESAVES - snprintf(tmp,PATH_MAX,"%s-tmp",impl->path); -#else - strcpy(tmp,impl->path); -#endif - - if ( (f = fopen(tmp,"w")) < 0 ){ - icalerror_set_errno(ICAL_FILE_ERROR); - return ICAL_FILE_ERROR; - } - - for(c = icalcomponent_get_first_component(impl->cluster,ICAL_ANY_COMPONENT); - c != 0; - c = icalcomponent_get_next_component(impl->cluster,ICAL_ANY_COMPONENT)){ - - str = icalcomponent_as_ical_string(c); - - if ( fwrite(str,sizeof(char),strlen(str),f) < strlen(str)){ - fclose(f); - return ICAL_FILE_ERROR; - } - } - - fclose(f); - impl->changed = 0; - -#ifdef ICAL_SAFESAVES - rename(tmp,impl->path); /* HACK, should check for error here */ -#endif - - return ICAL_NO_ERROR; - -} - -void icalcluster_mark(icalcluster* cluster){ - - struct icalcluster_impl *impl = (struct icalcluster_impl*)cluster; - - icalerror_check_arg_rv((impl!=0),"cluster"); - - impl->changed = 1; - -} - -icalcomponent* icalcluster_get_component(icalcluster* cluster){ - struct icalcluster_impl *impl = (struct icalcluster_impl*)cluster; - - icalerror_check_arg_re((impl!=0),"cluster",ICAL_BADARG_ERROR); - - return impl->cluster; -} - - -/* manipulate the components in the cluster */ - -icalerrorenum icalcluster_add_component(icalcluster *cluster, - icalcomponent* child) -{ - struct icalcluster_impl* impl = (struct icalcluster_impl*)cluster; - - icalerror_check_arg_rv((cluster!=0),"cluster"); - icalerror_check_arg_rv((child!=0),"child"); - - icalcomponent_add_component(impl->cluster,child); - - icalcluster_mark(cluster); - - return ICAL_NO_ERROR; - -} - -icalerrorenum icalcluster_remove_component(icalcluster *cluster, - icalcomponent* child) -{ - struct icalcluster_impl* impl = (struct icalcluster_impl*)cluster; - - icalerror_check_arg_rv((cluster!=0),"cluster"); - icalerror_check_arg_rv((child!=0),"child"); - - icalcomponent_remove_component(impl->cluster,child); - - icalcluster_mark(cluster); - - return ICAL_NO_ERROR; -} - -int icalcluster_count_components(icalcluster *cluster, - icalcomponent_kind kind) -{ - struct icalcluster_impl* impl = (struct icalcluster_impl*)cluster; - - if(cluster == 0){ - icalerror_set_errno(ICAL_BADARG_ERROR); - return -1; - } - - return icalcomponent_count_components(impl->cluster,kind); -} - -/* Iterate through components */ -icalcomponent* icalcluster_get_current_component (icalcluster* cluster) -{ - struct icalcluster_impl* impl = (struct icalcluster_impl*)cluster; - - icalerror_check_arg_rz((cluster!=0),"cluster"); - - return icalcomponent_get_current_component(impl->cluster); -} - -icalcomponent* icalcluster_get_first_component(icalcluster* cluster, - icalcomponent_kind kind) -{ - struct icalcluster_impl* impl = (struct icalcluster_impl*)cluster; - - icalerror_check_arg_rz((cluster!=0),"cluster"); - - return icalcomponent_get_first_component(impl->cluster,kind); -} - -icalcomponent* icalcluster_get_next_component(icalcluster* cluster, - icalcomponent_kind kind) -{ - struct icalcluster_impl* impl = (struct icalcluster_impl*)cluster; - - icalerror_check_arg_rz((cluster!=0),"cluster"); - - return icalcomponent_get_next_component(impl->cluster,kind); -} - diff --git a/libical/src/libicalss/icalcluster.h b/libical/src/libicalss/icalcluster.h deleted file mode 100644 index 39fe542027..0000000000 --- a/libical/src/libicalss/icalcluster.h +++ /dev/null @@ -1,73 +0,0 @@ -/* -*- Mode: C -*- */ -/*====================================================================== - FILE: icalcluster.h - CREATOR: eric 23 December 1999 - - - $Id$ - $Locker$ - - (C) COPYRIGHT 1999 Eric Busboom - http://www.softwarestudio.org - - The contents of this file are subject to the Mozilla Public License - Version 1.0 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and - limitations under the License. - - The Original Code is eric. The Initial Developer of the Original - Code is Eric Busboom - - -======================================================================*/ - -#ifndef ICALCLUSTER_H -#define ICALCLUSTER_H - -#include "ical.h" - -typedef void icalcluster; - - -icalcluster* icalcluster_new(char* path); -void icalcluster_free(icalcluster* cluster); - -char* icalcluster_path(icalcluster* cluster); - -/* Return a reference to the internal component. */ -icalcomponent* icalcluster_get_component(icalcluster* cluster); - -/* Mark the cluster as changed, so it will be written to disk when it - is freed*/ -void icalcluster_mark(icalcluster* cluster); - -/* Write the cluster data back to disk */ -icalerrorenum icalcluster_commit(icalcluster* cluster); - -/* manipulate the components in the cluster */ -icalerrorenum icalcluster_add_component(icalcomponent* parent, - icalcomponent* child); - -icalerrorenum icalcluster_remove_component(icalcomponent* parent, - icalcomponent* child); - -int icalcluster_count_components(icalcomponent* component, - icalcomponent_kind kind); - -/* Iterate through components */ -icalcomponent* icalcluster_get_current_component (icalcomponent* component); - -icalcomponent* icalcluster_get_first_component(icalcomponent* component, - icalcomponent_kind kind); -icalcomponent* icalcluster_get_next_component(icalcomponent* component, - icalcomponent_kind kind); - -#endif /* !ICALCLUSTER_H */ - - - diff --git a/libical/src/libicalss/icalcomponent.h b/libical/src/libicalss/icalcomponent.h deleted file mode 100644 index 9e0e9f5a9f..0000000000 --- a/libical/src/libicalss/icalcomponent.h +++ /dev/null @@ -1,115 +0,0 @@ -/* -*- Mode: C -*- */ -/*====================================================================== - FILE: icalcomponent.h - CREATOR: eric 20 March 1999 - - - (C) COPYRIGHT 1999 Eric Busboom - http://www.softwarestudio.org - - The contents of this file are subject to the Mozilla Public License - Version 1.0 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and - limitations under the License. - - The original author is Eric Busboom - The original code is icalcomponent.h - -======================================================================*/ - -#ifndef ICALCOMPONENT_H -#define ICALCOMPONENT_H - -#include "icalproperty.h" -#include "icalvalue.h" -#include "icalenums.h" /* defines icalcomponent_kind */ - -typedef void icalcomponent; - -icalcomponent* icalcomponent_new(icalcomponent_kind kind); -icalcomponent* icalcomponent_new_clone(icalcomponent* component); -icalcomponent* icalcomponent_new_from_string(char* str); -icalcomponent* icalcomponent_vanew(icalcomponent_kind kind, ...); -void icalcomponent_free(icalcomponent* component); - -char* icalcomponent_as_ical_string(icalcomponent* component); - -int icalcomponent_is_valid(icalcomponent* component); - -icalcomponent_kind icalcomponent_isa(icalcomponent* component); - -int icalcomponent_isa_component (void* component); - -/* - * Working with properties - */ - -void icalcomponent_add_property(icalcomponent* component, - icalproperty* property); - -void icalcomponent_remove_property(icalcomponent* component, - icalproperty* property); - -int icalcomponent_count_properties(icalcomponent* component, - icalproperty_kind kind); - -/* Iterate through the properties */ -icalproperty* icalcomponent_get_current_property(icalcomponent* component); - -icalproperty* icalcomponent_get_first_property(icalcomponent* component, - icalproperty_kind kind); -icalproperty* icalcomponent_get_next_property(icalcomponent* component, - icalproperty_kind kind); - -/* Return a null-terminated array of icalproperties*/ - -icalproperty** icalcomponent_get_properties(icalcomponent* component, - icalproperty_kind kind); - - -/* - * Working with components - */ - - -void icalcomponent_add_component(icalcomponent* parent, - icalcomponent* child); - -void icalcomponent_remove_component(icalcomponent* parent, - icalcomponent* child); - -int icalcomponent_count_components(icalcomponent* component, - icalcomponent_kind kind); - -/* Iterate through components */ -icalcomponent* icalcomponent_get_current_component (icalcomponent* component); - -icalcomponent* icalcomponent_get_first_component(icalcomponent* component, - icalcomponent_kind kind); -icalcomponent* icalcomponent_get_next_component(icalcomponent* component, - icalcomponent_kind kind); - -/* Return a null-terminated array of icalproperties*/ -icalproperty** icalcomponent_get_component(icalcomponent* component, - icalproperty_kind kind); - -/* Working with embedded error properties */ - -int icalcomponent_count_errors(icalcomponent* component); -void icalcomponent_strip_errors(icalcomponent* component); - - -/* Internal operations. You don't see these... */ -icalcomponent* icalcomponent_get_parent(icalcomponent* component); -void icalcomponent_set_parent(icalcomponent* component, - icalcomponent* parent); - -#endif /* !ICALCOMPONENT_H */ - - - diff --git a/libical/src/libicalss/icalstore.c b/libical/src/libicalss/icalstore.c deleted file mode 100644 index 382464e476..0000000000 --- a/libical/src/libicalss/icalstore.c +++ /dev/null @@ -1,858 +0,0 @@ -/* -*- Mode: C -*- - ====================================================================== - FILE: icalstore.c - CREATOR: eric 28 November 1999 - - $Id$ - $Locker$ - - (C) COPYRIGHT 1999 Eric Busboom - http://www.softwarestudio.org - - The contents of this file are subject to the Mozilla Public License - Version 1.0 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and - limitations under the License. - - The Original Code is eric. The Initial Developer of the Original - Code is Eric Busboom - - - ======================================================================*/ - - -/* - - icalstore manages a database of ical components and offers - interfaces for reading, writting and searching for components. - - icalstore groups components in to clusters based on their DTSTART - time -- all components that start in the same month are grouped - together in a single file. All files in a sotre are kept in a single - directory. ( If a component does not have DTSTART, the store uses - DTSTAMP or CREATE ) - - The primary interfaces are icalstore_first and icalstore_next. These - routine iterate through all of the components in the store, subject - to the current gauge. A gauge is an icalcomponent that is tested - against other componets for a match. If a gauge has been set with - icalstore_select, icalstore_first and icalstore_next will only - return componentes that match the gauge. - - The Store generated UIDs for all objects that are stored if they do - not already have a UID. The UID is the name of the cluster (month & - year as MMYYYY) plus a unique serial number. The serial number is - stored as a property of the cluster. - -*/ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - - -#include "ical.h" -#include "icalstore.h" -#include "pvl.h" -#include "icalerror.h" -#include "icalparser.h" -#include "icalcluster.h" - -#include -#include /* for opendir() */ -#include -#include /* for opendir() */ -#include /* for stat */ -#include /* for stat, getpid */ -#include /* for clock() */ -#include /* for rand(), srand() */ -#include /* for uname */ -#include /* for strdup */ - - -struct icalstore_impl -{ - char* dir; - icalcomponent* gauge; - icalcluster* cluster; - int first_component; - pvl_list directory; - pvl_elem directory_iterator; -}; - -struct icalstore_impl* icalstore_new_impl() -{ - struct icalstore_impl* comp; - - if ( ( comp = (struct icalstore_impl*) - malloc(sizeof(struct icalstore_impl))) == 0) { - icalerror_set_errno(ICAL_NEWFAILED_ERROR); - return 0; - } - - return comp; -} - -void icalstore_lock(char* dir) -{ -} - - -void icalstore_unlock(char* dir) -{ -} - -/* Load the contents of the store directory into the store's internal directory list*/ -icalerrorenum icalstore_read_directory(struct icalstore_impl* impl) -{ - struct dirent *de; - DIR* dp; - char *str; - - dp = opendir(impl->dir); - - if ( dp == 0) { - icalerror_set_errno(ICAL_FILE_ERROR); - return ICAL_FILE_ERROR; - } - - /* clear contents of directory list */ - while((str = pvl_pop(impl->directory))){ - free(str); - } - - /* load all of the cluster names in the directory list */ - for(de = readdir(dp); - de != 0; - de = readdir(dp)){ - - /* Remove known directory names '.' and '..'*/ - if (strcmp(de->d_name,".") == 0 || - strcmp(de->d_name,"..") == 0 ){ - continue; - } - - pvl_push(impl->directory, (void*)strdup(de->d_name)); - } - - closedir(dp); - - return ICAL_NO_ERROR; -} - -icalstore* icalstore_new(char* dir) -{ - struct icalstore_impl *impl = icalstore_new_impl(); - struct stat sbuf; - - if (impl == 0){ - return 0; - } - - icalerror_check_arg_rz( (dir!=0), "dir"); - - if (stat(dir,&sbuf) != 0){ - icalerror_set_errno(ICAL_FILE_ERROR); - return 0; - } - - /* dir is not the name of a direectory*/ - if (!S_ISDIR(sbuf.st_mode)){ - icalerror_set_errno(ICAL_USAGE_ERROR); - return 0; - } - - icalstore_lock(dir); - - impl = icalstore_new_impl(); - - if (impl ==0){ - icalerror_set_errno(ICAL_ALLOCATION_ERROR); - return 0; - } - - impl->directory = pvl_newlist(); - impl->directory_iterator = 0; - impl->dir = (char*)strdup(dir); - impl->gauge = 0; - impl->first_component = 0; - impl->cluster = 0; - - icalstore_read_directory(impl); - - return (icalstore*) impl; -} - -void icalstore_free(icalstore* s) -{ - struct icalstore_impl *impl = (struct icalstore_impl*)s; - char* str; - - icalstore_unlock(impl->dir); - - if(impl->dir !=0){ - free(impl->dir); - } - - if(impl->gauge !=0){ - icalcomponent_free(impl->gauge); - } - - if(impl->cluster !=0){ - icalcluster_free(impl->cluster); - } - - while(impl->directory !=0 && (str=pvl_pop(impl->directory)) != 0){ - free(str); - } - - if(impl->directory != 0){ - pvl_free(impl->directory); - } - - impl->directory = 0; - impl->directory_iterator = 0; - impl->dir = 0; - impl->gauge = 0; - impl->first_component = 0; - - free(impl); - -} - -/* icalstore_next_uid_number updates a serial number in the Store - directory in a file called SEQUENCE */ - -int icalstore_next_uid_number(icalstore* store) -{ - struct icalstore_impl *impl = (struct icalstore_impl*)store; - char sequence = 0; - char temp[128]; - char filename[PATH_MAX]; - char *r; - FILE *f; - struct stat sbuf; - - icalerror_check_arg_rz( (store!=0), "store"); - - sprintf(filename,"%s/%s",impl->dir,"SEQUENCE"); - - /* Create the file if it does not exist.*/ - if (stat(filename,&sbuf) == -1 || !S_ISREG(sbuf.st_mode)){ - - f = fopen(filename,"w"); - if (f != 0){ - fprintf(f,"0"); - fclose(f); - } else { - icalerror_warn("Can't create SEQUENCE file in icalstore_next_uid_number"); - return 0; - } - - } - - if ( (f = fopen(filename,"r+")) != 0){ - - rewind(f); - r = fgets(temp,128,f); - - if (r == 0){ - sequence = 1; - } else { - sequence = atoi(temp)+1; - } - - rewind(f); - - fprintf(f,"%d",sequence); - - fclose(f); - - return sequence; - - } else { - icalerror_warn("Can't create SEQUENCE file in icalstore_next_uid_number"); - return 0; - } - -} - -icalerrorenum icalstore_next_cluster(icalstore* store) -{ - struct icalstore_impl *impl = (struct icalstore_impl*)store; - char path[PATH_MAX]; - - if (impl->directory_iterator == 0){ - icalerror_set_errno(ICAL_INTERNAL_ERROR); - return ICAL_INTERNAL_ERROR; - } - impl->directory_iterator = pvl_next(impl->directory_iterator); - - if (impl->directory_iterator == 0){ - /* There are no more clusters */ - impl->cluster = 0; - return ICAL_NO_ERROR; - } - - sprintf(path,"%s/%s",impl->dir,(char*)pvl_data(impl->directory_iterator)); - - icalcluster_free(impl->cluster); - - impl->cluster = icalcluster_new(path); - - return icalerrno; -} - -void icalstore_add_uid(icalstore* store, icalstore* comp) -{ - char uidstring[PATH_MAX]; - icalproperty *uid; - struct utsname unamebuf; - - icalerror_check_arg_rv( (store!=0), "store"); - icalerror_check_arg_rv( (comp!=0), "comp"); - - uid = icalcomponent_get_first_property(comp,ICAL_UID_PROPERTY); - - if (uid == 0) { - - uname(&unamebuf); - - sprintf(uidstring,"%d-%s",(int)getpid(),unamebuf.nodename); - - uid = icalproperty_new_uid(uidstring); - icalcomponent_add_property(comp,uid); - } else { - - strcpy(uidstring,icalproperty_get_uid(uid)); - } -} - - -/* This assumes that the top level component is a VCALENDAR, and there - is an inner component of type VEVENT, VTODO or VJOURNAL. The inner - component must have a DTSTART property */ - -icalerrorenum icalstore_add_component(icalstore* store, icalstore* comp) -{ - struct icalstore_impl *impl; - char clustername[PATH_MAX]; - icalproperty *dt, *count; - icalvalue *v; - struct icaltimetype tm; - icalerrorenum error = ICAL_NO_ERROR; - icalcomponent *inner; - - impl = (struct icalstore_impl*)store; - icalerror_check_arg_rz( (store!=0), "store"); - icalerror_check_arg_rz( (comp!=0), "comp"); - - errno = 0; - - icalstore_add_uid(store,comp); - - /* Determine which cluster this object belongs in. This is a HACK */ - - for(inner = icalcomponent_get_first_component(comp,ICAL_ANY_COMPONENT); - inner != 0; - inner = icalcomponent_get_next_component(comp,ICAL_ANY_COMPONENT)){ - - dt = icalcomponent_get_first_property(inner,ICAL_DTSTART_PROPERTY); - - if (dt != 0){ - break; - } - } - - if (dt == 0){ - icalerror_warn("The component does not have a DTSTART property, so it cannot be added to the store"); - icalerror_set_errno(ICAL_BADARG_ERROR); - return ICAL_BADARG_ERROR; - } - - v = icalproperty_get_value(dt); - - tm = icalvalue_get_datetime(v); - - snprintf(clustername,PATH_MAX,"%s/%04d%02d",impl->dir,tm.year,tm.month); - - /* Load the cluster and insert the object */ - - if(impl->cluster != 0 && - strcmp(clustername,icalcluster_path(impl->cluster)) != 0 ){ - icalcluster_free(impl->cluster); - impl->cluster = 0; - } - - if (impl->cluster == 0){ - impl->cluster = icalcluster_new(clustername); - - if (impl->cluster == 0){ - error = icalerrno; - } - } - - if (error != ICAL_NO_ERROR){ - icalerror_set_errno(error); - return error; - } - - /* Add the component to the cluster */ - - icalcluster_add_component(impl->cluster,comp); - - - /* Increment the clusters count value */ - count = icalcomponent_get_first_property( - icalcluster_get_component(impl->cluster), - ICAL_XLICCLUSTERCOUNT_PROPERTY); - - if (count == 0){ - icalerror_set_errno(ICAL_INTERNAL_ERROR); - return ICAL_INTERNAL_ERROR; - } - - icalproperty_set_xlicclustercount(count, - icalproperty_get_xlicclustercount(count)+1); - - - icalcluster_mark(impl->cluster); - - return ICAL_NO_ERROR; -} - -/* Remove a component in the current cluster */ -icalerrorenum icalstore_remove_component(icalstore* store, icalstore* comp) -{ - struct icalstore_impl *impl = (struct icalstore_impl*)store; - icalproperty *count; - - icalerror_check_arg_re((store!=0),"store",ICAL_BADARG_ERROR); - icalerror_check_arg_re((comp!=0),"comp",ICAL_BADARG_ERROR); - icalerror_check_arg_re((impl->cluster!=0),"Cluster pointer",ICAL_USAGE_ERROR); - -/* HACK The following code should be used to ensure that the component - the caller is trying to remove is actually in the cluster, but it - resets the internal iterators, which immediately ends any loops over - the cluster the caller may have in progress - - for(c = icalcluster_get_first_component( - impl->cluster, - ICAL_ANY_COMPONENT); - c != 0; - c = icalcluster_get_next_component( - impl->cluster, - ICAL_ANY_COMPONENT)){ - - if (c == comp){ - found = 1; - } - - } - - if (found != 1){ - icalerror_warn("icalstore_remove_component: component is not part of current cluster"); - icalerror_set_errno(ICAL_USAGE_ERROR); - return ICAL_USAGE_ERROR; - } - -*/ - - icalcluster_remove_component(impl->cluster, - comp); - - icalcluster_mark(impl->cluster); - - /* Decrement the clusters count value */ - count = icalcomponent_get_first_property( - icalcluster_get_component(impl->cluster), - ICAL_XLICCLUSTERCOUNT_PROPERTY); - - if (count == 0){ - icalerror_set_errno(ICAL_INTERNAL_ERROR); - return ICAL_INTERNAL_ERROR; - } - - icalproperty_set_xlicclustercount(count, - icalproperty_get_xlicclustercount(count)-1); - - return ICAL_NO_ERROR; -} - -/* Convert a VQUERY component into a gauge */ -icalcomponent* icalstore_make_gauge(icalcomponent* query); - -/* icalstore_test compares a component against a gauge, and returns - true if the component passes the test - - The gauge is a VCALENDAR component that specifies how to test the - target components. The guage holds a collection of VEVENT, VTODO or - VJOURNAL sub-components. Each of the sub-components has a - collection of properties that are compared to corresponding - properties in the target component, according to the - X-LIC-COMPARETYPE parameters to the gauge's properties. - - When a gauge has several sub-components, the results of testing the - target against each of them is ORed together - the target - component will pass if it matches any of the sub-components in the - gauge. However, the results of matching the proeprties in a - sub-component are ANDed -- the target must match every property in - a gauge sub-component to match the sub-component. - - Here is an example: - - BEGIN:XROOT - BEGIN:VCOMPONENT - BEGIN:VEVENT - DTSTART;X-LIC-COMPARETYPE=LESS:19981025T020000 - ORGANIZER;X-LIC-COMPARETYPE=EQUAL:mrbig@host.com - END:VEVENT - BEGIN:VEVENT - LOCATION;X-LIC-COMPARETYPE=EQUAL:McNary's Pub - END:VEVENT - END:VCALENDAR - END:XROOT - - This gauge has two sub-components; one which will match a VEVENT - based on start time, and organizer, and another that matches based - on LOCATION. A target component will pass the test if it matched - either of the sub-components. - - */ - - -int icalstore_test_recurse(icalcomponent* comp, icalcomponent* gauge) -{ - int pass = 1,localpass = 0; - icalproperty *p; - icalcomponent *child,*subgauge; - icalcomponent_kind gaugekind, compkind; - - icalerror_check_arg_rz( (comp!=0), "comp"); - icalerror_check_arg_rz( (gauge!=0), "gauge"); - - gaugekind = icalcomponent_isa(gauge); - compkind = icalcomponent_isa(comp); - - if( ! (gaugekind == compkind || gaugekind == ICAL_ANY_COMPONENT) ){ - return 0; - } - - /* Test properties. For each property in the gauge, search through - the component for a similar property. If one is found, compare - the two properties value with the comparison specified in the - gauge with the X-LIC-COMPARETYPE parameter */ - - for(p = icalcomponent_get_first_property(gauge,ICAL_ANY_PROPERTY); - p != 0; - p = icalcomponent_get_next_property(gauge,ICAL_ANY_PROPERTY)){ - - icalproperty* targetprop; - icalparameter* compareparam; - icalparameter_xliccomparetype compare; - int rel; /* The relationship between the gauge and target values.*/ - - /* Extract the comparison type from the gauge. If there is no - comparison type, assume that it is "EQUAL" */ - - compareparam = icalproperty_get_first_parameter( - p, - ICAL_XLICCOMPARETYPE_PARAMETER); - - if (compareparam!=0){ - compare = icalparameter_get_xliccomparetype(compareparam); - } else { - compare = ICAL_XLICCOMPARETYPE_EQUAL; - } - - /* Find a property in the component that has the same type - as the gauge property. HACK -- multiples of a single - property type in the gauge will match only the first - instance in the component */ - - targetprop = icalcomponent_get_first_property(comp, - icalproperty_isa(p)); - - if(targetprop != 0){ - - /* Compare the values of the gauge property and the target - property */ - - rel = icalvalue_compare(icalproperty_get_value(p), - icalproperty_get_value(targetprop)); - - /* Now see if the comparison is equavalent to the comparison - specified in the gauge */ - - if (rel == compare){ - localpass++; - } else if (compare == ICAL_XLICCOMPARETYPE_LESSEQUAL && - ( rel == ICAL_XLICCOMPARETYPE_LESS || - rel == ICAL_XLICCOMPARETYPE_EQUAL)) { - localpass++; - } else if (compare == ICAL_XLICCOMPARETYPE_GREATEREQUAL && - ( rel == ICAL_XLICCOMPARETYPE_GREATER || - rel == ICAL_XLICCOMPARETYPE_EQUAL)) { - localpass++; - } else if (compare == ICAL_XLICCOMPARETYPE_NOTEQUAL && - ( rel == ICAL_XLICCOMPARETYPE_GREATER || - rel == ICAL_XLICCOMPARETYPE_LESS)) { - localpass++; - } else { - localpass = 0; - } - - pass = pass && (localpass>0); - } - } - - /* Test subcomponents. Look for a child component that has a - counterpart in the gauge. If one is found, recursively call - icalstore_test */ - - for(subgauge = icalcomponent_get_first_component(gauge,ICAL_ANY_COMPONENT); - subgauge != 0; - subgauge = icalcomponent_get_next_component(gauge,ICAL_ANY_COMPONENT)){ - - gaugekind = icalcomponent_isa(subgauge); - - if (gaugekind == ICAL_ANY_COMPONENT){ - child = icalcomponent_get_first_component(comp,ICAL_ANY_COMPONENT); - } else { - child = icalcomponent_get_first_component(comp,gaugekind); - } - - if(child !=0){ - localpass = icalstore_test_recurse(child,subgauge); - pass = pass && localpass; - } else { - pass = 0; - } - } - - return pass; -} - -/* guagecontainer is an XROOT component that holds several gauges. The - results of comparing against these gauges are ORed together in this - routine */ -int icalstore_test(icalcomponent* comp, icalcomponent* gaugecontainer) -{ - int pass = 0; - icalcomponent *gauge; - - icalerror_check_arg_rz( (comp!=0), "comp"); - icalerror_check_arg_rz( (gauge!=0), "gauge"); - - for(gauge = icalcomponent_get_first_component(gaugecontainer,ICAL_ANY_COMPONENT); - gauge != 0; - gauge = icalcomponent_get_next_component(gaugecontainer,ICAL_ANY_COMPONENT)){ - - pass += icalstore_test_recurse(comp, gauge); - } - - return pass>0; - -} - -icalcomponent* icalstore_query(icalstore* store, icalstore* query); - - -icalcomponent* icalstore_fetch(icalstore* store, char* uid) -{ - icalcomponent *gauge; - icalcomponent *old_gauge; - icalcomponent *c; - struct icalstore_impl *impl = (struct icalstore_impl*)store; - - icalerror_check_arg_rz( (store!=0), "store"); - icalerror_check_arg_rz( (uid!=0), "uid"); - - gauge = - icalcomponent_vanew( - ICAL_VCALENDAR_COMPONENT, - icalcomponent_vanew( - ICAL_VEVENT_COMPONENT, - icalproperty_vanew_uid( - uid, - icalparameter_new_xliccomparetype( - ICAL_XLICCOMPARETYPE_EQUAL), - 0), - 0), - 0); - - old_gauge = impl->gauge; - impl->gauge = gauge; - - c= icalstore_get_first_component(store); - - impl->gauge = old_gauge; - - icalcomponent_free(gauge); - - return c; -} - - -int icalstore_has_uid(icalstore* store, char* uid) -{ - icalcomponent *c; - - icalerror_check_arg_rz( (store!=0), "store"); - icalerror_check_arg_rz( (uid!=0), "uid"); - - /* HACK. This is a temporary implementation. _has_uid should use a - database, and _fetch should use _has_uid, not the other way - around */ - c = icalstore_fetch(store,uid); - - return c!=0; - -} - - -icalerrorenum icalstore_select(icalstore* store, icalcomponent* gauge) -{ - struct icalstore_impl *impl = (struct icalstore_impl*)store; - - icalerror_check_arg_re( (store!=0), "store",ICAL_BADARG_ERROR); - icalerror_check_arg_re( (gauge!=0), "gauge",ICAL_BADARG_ERROR); - - if (!icalcomponent_is_valid(gauge)){ - return ICAL_BADARG_ERROR; - } - - impl->gauge = gauge; - - return ICAL_NO_ERROR; -} - - - -icalcomponent* icalstore_get_first_component(icalstore* store) -{ - struct icalstore_impl *impl = (struct icalstore_impl*)store; - icalerrorenum error; - char path[PATH_MAX]; - - error = icalstore_read_directory(impl); - - if (error != ICAL_NO_ERROR){ - icalerror_set_errno(error); - return 0; - } - - impl->directory_iterator = pvl_head(impl->directory); - - if (impl->directory_iterator == 0){ - icalerror_set_errno(error); - return 0; - } - - sprintf(path,"%s/%s",impl->dir,(char*)pvl_data(impl->directory_iterator)); - - /* If the next cluster we need is different than the current cluster, - delete the current one and get a new one */ - - if(impl->cluster != 0 && strcmp(path,icalcluster_path(impl->cluster)) != 0 ){ - icalcluster_free(impl->cluster); - impl->cluster = 0; - } - - if (impl->cluster == 0){ - impl->cluster = icalcluster_new(path); - - if (impl->cluster == 0){ - error = icalerrno; - } - } - - if (error != ICAL_NO_ERROR){ - icalerror_set_errno(error); - return 0; - } - - impl->first_component = 1; - - return icalstore_get_next_component(store); -} - -icalcomponent* icalstore_get_next_component(icalstore* store) -{ - struct icalstore_impl *impl; - icalcomponent *c; - icalerrorenum error; - - icalerror_check_arg_rz( (store!=0), "store"); - - impl = (struct icalstore_impl*)store; - - if(impl->cluster == 0){ - - icalerror_warn("icalstore_get_next_component called with a NULL cluster (Caller must call icalstore_get_first_component first"); - icalerror_set_errno(ICAL_USAGE_ERROR); - return 0; - - } - - /* Set the component iterator for the following for loop */ - if (impl->first_component == 1){ - icalcluster_get_first_component( - impl->cluster, - ICAL_ANY_COMPONENT); - impl->first_component = 0; - } else { - icalcluster_get_next_component( - impl->cluster, - ICAL_ANY_COMPONENT); - } - - - while(1){ - /* Iterate through all of the objects in the cluster*/ - for( c = icalcluster_get_current_component( - impl->cluster); - c != 0; - c = icalcluster_get_next_component( - impl->cluster, - ICAL_ANY_COMPONENT)){ - - /* If there is a gauge defined and the component does not - pass the gauge, skip the rest of the loop */ - if (impl->gauge != 0 && icalstore_test(c,impl->gauge) == 0){ - continue; - } - - /* Either there is no gauge, or the component passed the - gauge, so return it*/ - - return c; - } - - /* Fell through the loop, so the component we want is not - in this cluster. Load a new cluster and try again.*/ - - error = icalstore_next_cluster(store); - - if(impl->cluster == 0 || error != ICAL_NO_ERROR){ - /* No more clusters */ - return 0; - } else { - c = icalcluster_get_first_component( - impl->cluster, - ICAL_ANY_COMPONENT); - } - } -} - - - - - - - diff --git a/libical/src/libicalss/icalstore.h b/libical/src/libicalss/icalstore.h deleted file mode 100644 index 13e0a182b5..0000000000 --- a/libical/src/libicalss/icalstore.h +++ /dev/null @@ -1,78 +0,0 @@ -/* -*- Mode: C -*- */ -/*====================================================================== - FILE: icalstore.h - CREATOR: eric 28 November 1999 - - - $Id$ - $Locker$ - - (C) COPYRIGHT 1999 Eric Busboom - http://www.softwarestudio.org - - The contents of this file are subject to the Mozilla Public License - Version 1.0 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and - limitations under the License. - - The Original Code is eric. The Initial Developer of the Original - Code is Eric Busboom - - -======================================================================*/ - -#ifndef ICALSTORE_H -#define ICALSTORE_H - -#include "ical.h" -#include "icalerror.h" -typedef void icalstore; - -/* icalstore Routines for storing, fetching, and searching for ical - * objects in a database */ - -icalstore* icalstore_new(char* dir); - -void icalstore_free(icalstore* store); - -/* Add a new component to the store */ -icalerrorenum icalstore_add_component(icalstore* store, icalstore* comp); - -/* Remove a component from the store */ -icalerrorenum icalstore_remove_component(icalstore* store, icalstore* comp); - -/* Restrict the component returned by icalstore_first, _next to those - that pass the gauge */ -icalerrorenum icalstore_select(icalstore* store, icalcomponent* gauge); - -/* Return true if a component passes the gauge */ -int icalstore_test(icalcomponent* comp, icalcomponent* gauge); - -/* Clear the restrictions set by icalstore_select */ -void icalstore_clear(icalstore* store); - -/* Get a single component by uid */ -icalcomponent* icalstore_fetch(icalstore* store, char* uid); - -/* Return true of the store has an object with the given UID */ -int icalstore_has_uid(icalstore* store, char* uid); - -/* Return the first component in the store, or first that passes the gauge.*/ -icalcomponent* icalstore_get_first_component(icalstore* store); - -/* Return the next component in the store, or next that passes the gauge.*/ -icalcomponent* icalstore_get_next_component(icalstore* store); - - -int icalstore_next_uid_number(icalstore* store); - - -#endif /* !ICALSTORE_H */ - - - diff --git a/libical/src/pvl/Makefile b/libical/src/pvl/Makefile deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/libical/src/test/.cvsignore b/libical/src/test/.cvsignore deleted file mode 100644 index 6b1e8fab06..0000000000 --- a/libical/src/test/.cvsignore +++ /dev/null @@ -1,11 +0,0 @@ -Makefile -usecases -copycluster -regression -icalparser -findobj -.deps -.libs -parser -storage -Makefile.in diff --git a/libical/src/test/Makefile.am b/libical/src/test/Makefile.am deleted file mode 100644 index 50810f4b95..0000000000 --- a/libical/src/test/Makefile.am +++ /dev/null @@ -1,12 +0,0 @@ - -noinst_PROGRAMS = usecases copycluster regression parser findobj storage - -LDADD = ../libical/libical.la ../libicalss/libicalss.la -INCLUDES = -I$(srcdir) -I$(srcdir)/../libical -I$(srcdir)/../libicalss -I../libical - -findobj_SOURCES = findobj.c -usecases_SOURCES = usecases.c -copycluster_SOURCES = copycluster.c -regression_SOURCES = regression.c -parser_SOURCES = icaltestparser.c -storage_SOURCES = storage.c \ No newline at end of file diff --git a/libical/src/test/Makefile.in b/libical/src/test/Makefile.in deleted file mode 100644 index 7cb60bdc26..0000000000 --- a/libical/src/test/Makefile.in +++ /dev/null @@ -1,376 +0,0 @@ -# Makefile.in generated automatically by automake 1.4 from Makefile.am - -# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - - -SHELL = @SHELL@ - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -prefix = @prefix@ -exec_prefix = @exec_prefix@ - -bindir = @bindir@ -sbindir = @sbindir@ -libexecdir = @libexecdir@ -datadir = @datadir@ -sysconfdir = @sysconfdir@ -sharedstatedir = @sharedstatedir@ -localstatedir = @localstatedir@ -libdir = @libdir@ -infodir = @infodir@ -mandir = @mandir@ -includedir = @includedir@ -oldincludedir = /usr/include - -DESTDIR = - -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ - -top_builddir = ../.. - -ACLOCAL = @ACLOCAL@ -AUTOCONF = @AUTOCONF@ -AUTOMAKE = @AUTOMAKE@ -AUTOHEADER = @AUTOHEADER@ - -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -transform = @program_transform_name@ - -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -host_alias = @host_alias@ -host_triplet = @host@ -AR = @AR@ -AS = @AS@ -CC = @CC@ -DLLTOOL = @DLLTOOL@ -LEX = @LEX@ -LIBTOOL = @LIBTOOL@ -LN_S = @LN_S@ -MAKEINFO = @MAKEINFO@ -OBJDUMP = @OBJDUMP@ -PACKAGE = @PACKAGE@ -RANLIB = @RANLIB@ -VERSION = @VERSION@ -YACC = @YACC@ - -noinst_PROGRAMS = usecases copycluster regression parser findobj storage - -LDADD = ../libical/libical.la ../libicalss/libicalss.la -INCLUDES = -I$(srcdir) -I$(srcdir)/../libical -I$(srcdir)/../libicalss -I../libical - -findobj_SOURCES = findobj.c -usecases_SOURCES = usecases.c -copycluster_SOURCES = copycluster.c -regression_SOURCES = regression.c -parser_SOURCES = icaltestparser.c -storage_SOURCES = storage.c -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = ../../config.h -CONFIG_CLEAN_FILES = -PROGRAMS = $(noinst_PROGRAMS) - - -DEFS = @DEFS@ -I. -I$(srcdir) -I../.. -CPPFLAGS = @CPPFLAGS@ -LDFLAGS = @LDFLAGS@ -LIBS = @LIBS@ -usecases_OBJECTS = usecases.o -usecases_LDADD = $(LDADD) -usecases_DEPENDENCIES = ../libical/libical.la ../libicalss/libicalss.la -usecases_LDFLAGS = -copycluster_OBJECTS = copycluster.o -copycluster_LDADD = $(LDADD) -copycluster_DEPENDENCIES = ../libical/libical.la \ -../libicalss/libicalss.la -copycluster_LDFLAGS = -regression_OBJECTS = regression.o -regression_LDADD = $(LDADD) -regression_DEPENDENCIES = ../libical/libical.la \ -../libicalss/libicalss.la -regression_LDFLAGS = -parser_OBJECTS = icaltestparser.o -parser_LDADD = $(LDADD) -parser_DEPENDENCIES = ../libical/libical.la ../libicalss/libicalss.la -parser_LDFLAGS = -findobj_OBJECTS = findobj.o -findobj_LDADD = $(LDADD) -findobj_DEPENDENCIES = ../libical/libical.la ../libicalss/libicalss.la -findobj_LDFLAGS = -storage_OBJECTS = storage.o -storage_LDADD = $(LDADD) -storage_DEPENDENCIES = ../libical/libical.la ../libicalss/libicalss.la -storage_LDFLAGS = -CFLAGS = @CFLAGS@ -COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ -DIST_COMMON = Makefile.am Makefile.in - - -DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) - -TAR = gtar -GZIP_ENV = --best -DEP_FILES = .deps/copycluster.P .deps/findobj.P .deps/icaltestparser.P \ -.deps/regression.P .deps/storage.P .deps/usecases.P -SOURCES = $(usecases_SOURCES) $(copycluster_SOURCES) $(regression_SOURCES) $(parser_SOURCES) $(findobj_SOURCES) $(storage_SOURCES) -OBJECTS = $(usecases_OBJECTS) $(copycluster_OBJECTS) $(regression_OBJECTS) $(parser_OBJECTS) $(findobj_OBJECTS) $(storage_OBJECTS) - -all: all-redirect -.SUFFIXES: -.SUFFIXES: .S .c .lo .o .s -$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu src/test/Makefile - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status - - -mostlyclean-noinstPROGRAMS: - -clean-noinstPROGRAMS: - -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) - -distclean-noinstPROGRAMS: - -maintainer-clean-noinstPROGRAMS: - -.s.o: - $(COMPILE) -c $< - -.S.o: - $(COMPILE) -c $< - -mostlyclean-compile: - -rm -f *.o core *.core - -clean-compile: - -distclean-compile: - -rm -f *.tab.c - -maintainer-clean-compile: - -.s.lo: - $(LIBTOOL) --mode=compile $(COMPILE) -c $< - -.S.lo: - $(LIBTOOL) --mode=compile $(COMPILE) -c $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -maintainer-clean-libtool: - -usecases: $(usecases_OBJECTS) $(usecases_DEPENDENCIES) - @rm -f usecases - $(LINK) $(usecases_LDFLAGS) $(usecases_OBJECTS) $(usecases_LDADD) $(LIBS) - -copycluster: $(copycluster_OBJECTS) $(copycluster_DEPENDENCIES) - @rm -f copycluster - $(LINK) $(copycluster_LDFLAGS) $(copycluster_OBJECTS) $(copycluster_LDADD) $(LIBS) - -regression: $(regression_OBJECTS) $(regression_DEPENDENCIES) - @rm -f regression - $(LINK) $(regression_LDFLAGS) $(regression_OBJECTS) $(regression_LDADD) $(LIBS) - -parser: $(parser_OBJECTS) $(parser_DEPENDENCIES) - @rm -f parser - $(LINK) $(parser_LDFLAGS) $(parser_OBJECTS) $(parser_LDADD) $(LIBS) - -findobj: $(findobj_OBJECTS) $(findobj_DEPENDENCIES) - @rm -f findobj - $(LINK) $(findobj_LDFLAGS) $(findobj_OBJECTS) $(findobj_LDADD) $(LIBS) - -storage: $(storage_OBJECTS) $(storage_DEPENDENCIES) - @rm -f storage - $(LINK) $(storage_LDFLAGS) $(storage_OBJECTS) $(storage_LDADD) $(LIBS) - -tags: TAGS - -ID: $(HEADERS) $(SOURCES) $(LISP) - list='$(SOURCES) $(HEADERS)'; \ - unique=`for i in $$list; do echo $$i; done | \ - awk ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - here=`pwd` && cd $(srcdir) \ - && mkid -f$$here/ID $$unique $(LISP) - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS)'; \ - unique=`for i in $$list; do echo $$i; done | \ - awk ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ - || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) - -mostlyclean-tags: - -clean-tags: - -distclean-tags: - -rm -f TAGS ID - -maintainer-clean-tags: - -distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) - -subdir = src/test - -distdir: $(DISTFILES) - here=`cd $(top_builddir) && pwd`; \ - top_distdir=`cd $(top_distdir) && pwd`; \ - distdir=`cd $(distdir) && pwd`; \ - cd $(top_srcdir) \ - && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu src/test/Makefile - @for file in $(DISTFILES); do \ - d=$(srcdir); \ - if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ - else \ - test -f $(distdir)/$$file \ - || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ - || cp -p $$d/$$file $(distdir)/$$file || :; \ - fi; \ - done - -DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :) - --include $(DEP_FILES) - -mostlyclean-depend: - -clean-depend: - -distclean-depend: - -rm -rf .deps - -maintainer-clean-depend: - -%.o: %.c - @echo '$(COMPILE) -c $<'; \ - $(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $< - @-cp .deps/$(*F).pp .deps/$(*F).P; \ - tr ' ' '\012' < .deps/$(*F).pp \ - | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ - >> .deps/$(*F).P; \ - rm .deps/$(*F).pp - -%.lo: %.c - @echo '$(LTCOMPILE) -c $<'; \ - $(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $< - @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \ - < .deps/$(*F).pp > .deps/$(*F).P; \ - tr ' ' '\012' < .deps/$(*F).pp \ - | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ - >> .deps/$(*F).P; \ - rm -f .deps/$(*F).pp -info-am: -info: info-am -dvi-am: -dvi: dvi-am -check-am: all-am -check: check-am -installcheck-am: -installcheck: installcheck-am -install-exec-am: -install-exec: install-exec-am - -install-data-am: -install-data: install-data-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -install: install-am -uninstall-am: -uninstall: uninstall-am -all-am: Makefile $(PROGRAMS) -all-redirect: all-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install -installdirs: - - -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -rm -f Makefile $(CONFIG_CLEAN_FILES) - -rm -f config.cache config.log stamp-h stamp-h[0-9]* - -maintainer-clean-generic: -mostlyclean-am: mostlyclean-noinstPROGRAMS mostlyclean-compile \ - mostlyclean-libtool mostlyclean-tags mostlyclean-depend \ - mostlyclean-generic - -mostlyclean: mostlyclean-am - -clean-am: clean-noinstPROGRAMS clean-compile clean-libtool clean-tags \ - clean-depend clean-generic mostlyclean-am - -clean: clean-am - -distclean-am: distclean-noinstPROGRAMS distclean-compile \ - distclean-libtool distclean-tags distclean-depend \ - distclean-generic clean-am - -rm -f libtool - -distclean: distclean-am - -maintainer-clean-am: maintainer-clean-noinstPROGRAMS \ - maintainer-clean-compile maintainer-clean-libtool \ - maintainer-clean-tags maintainer-clean-depend \ - maintainer-clean-generic distclean-am - @echo "This command is intended for maintainers to use;" - @echo "it deletes files that may require special tools to rebuild." - -maintainer-clean: maintainer-clean-am - -.PHONY: mostlyclean-noinstPROGRAMS distclean-noinstPROGRAMS \ -clean-noinstPROGRAMS maintainer-clean-noinstPROGRAMS \ -mostlyclean-compile distclean-compile clean-compile \ -maintainer-clean-compile mostlyclean-libtool distclean-libtool \ -clean-libtool maintainer-clean-libtool tags mostlyclean-tags \ -distclean-tags clean-tags maintainer-clean-tags distdir \ -mostlyclean-depend distclean-depend clean-depend \ -maintainer-clean-depend info-am info dvi-am dvi check check-am \ -installcheck-am installcheck install-exec-am install-exec \ -install-data-am install-data install-am install uninstall-am uninstall \ -all-redirect all-am all installdirs mostlyclean-generic \ -distclean-generic clean-generic maintainer-clean-generic clean \ -mostlyclean distclean maintainer-clean - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/libical/src/test/alice/booked/199706 b/libical/src/test/alice/booked/199706 deleted file mode 100644 index 8ad5c7d8b1..0000000000 --- a/libical/src/test/alice/booked/199706 +++ /dev/null @@ -1,317 +0,0 @@ -BEGIN:VCALENDAR -X-LIC-CLUSTERCOUNT - :13 -DTSTART - :00000000T000000 -DTEND - :00000000T000000 -BEGIN:VEVENT -ORGANIZER - :mailto:a@example.com -COMMENT - :DUKES forfeit the game -SEQUENCE - :2 -UID - :0981234-1234234-23@example.com -DTSTAMP - :19970613T190000Z -LAST-MODIFIED - :20000209T060027Z -END:VEVENT -BEGIN:VEVENT -ATTENDEE - ;PARTSTAT=ACCEPTED - :Mailto:B@example.com -ORGANIZER - :MAILTO:A@example.com -UID - :calsrv.example.com-873970198738777@example.com -SEQUENCE - :0 -REQUEST-STATUS - :2.0\;Success -DTSTAMP - :19970612T190000Z -LAST-MODIFIED - :20000209T060027Z -END:VEVENT -BEGIN:VEVENT -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:B@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -COMMENT - :Sorry -COMMENT - : I cannot change this meeting time -UID - :calsrv.example.com-873970198738777@example.com -SEQUENCE - :0 -DTSTAMP - :19970614T190000Z -LAST-MODIFIED - :20000209T060027Z -END:VEVENT -BEGIN:VEVENT -ORGANIZER - :MAILTO:A@Example.com -ATTENDEE - ;PARTSTAT=DELEGATED - ;DELEGATED-TO="Mailto:E@example.com" - :Mailto:C@example.com -UID - :calsrv.example.com-873970198738777@example.com -SEQUENCE - :0 -REQUEST-STATUS - :2.0\;Success -DTSTAMP - :19970611T190000Z -LAST-MODIFIED - :20000209T060027Z -END:VEVENT -BEGIN:VEVENT -ORGANIZER - :MAILTO:A@Example.com -ATTENDEE - ;PARTSTAT=ACCEPTED - ;DELEGATED-FROM="Mailto:C@example.com" - :Mailto:E@example.com -ATTENDEE - ;PARTSTAT=DELEGATED - ;DELEGATED-TO="Mailto:E@example.com" - :Mailto:C@example.com -UID - :calsrv.example.com-873970198738777@example.com -SEQUENCE - :0 -REQUEST-STATUS - :2.0\;Success -DTSTAMP - :19970614T190000Z -LAST-MODIFIED - :20000209T060027Z -END:VEVENT -BEGIN:VEVENT -ORGANIZER - :MAILTO:A@Example.com -ATTENDEE - ;PARTSTAT=DELEGATED - ;DELEGATED-TO="Mailto:E@example.com" - :Mailto:C@example.com -ATTENDEE - ;PARTSTAT=DECLINED - ;DELEGATED-FROM="Mailto:C@example.com" - :Mailto:E@example.com -COMMENT - :Sorry -COMMENT - : I will be out of town at that time. -UID - :calsrv.example.com-873970198738777@example.com -SEQUENCE - :0 -REQUEST-STATUS - :2.0\;Success -DTSTAMP - :19970614T190000Z -LAST-MODIFIED - :20000209T060027Z -END:VEVENT -BEGIN:VEVENT -ORGANIZER - :Mailto:A@example.com -ATTENDEE - :A@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'Mailto' -ATTENDEE - :Mailto:B@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -ATTENDEE - :Mailto:C@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -ATTENDEE - :Mailto:D@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -COMMENT - :Mr. B cannot attend. It's raining. Lets cancel. -UID - :calsrv.example.com-873970198738777@example.com -SEQUENCE - :1 -STATUS - :CANCELLED -DTSTAMP - :19970613T190000Z -LAST-MODIFIED - :20000209T060027Z -END:VEVENT -BEGIN:VEVENT -ORGANIZER - :Mailto:A@example.com -ATTENDEE - :mailto:B@example.com -COMMENT - :You're off the hook for this meeting -UID - :calsrv.example.com-873970198738777@example.com -DTSTAMP - :19970613T193000Z -SEQUENCE - :1 -LAST-MODIFIED - :20000209T060027Z -END:VEVENT -BEGIN:VEVENT -UID - :guid-1@host1.com -SEQUENCE - :0 -X-LIC-ERROR - ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR - :Can't parse as RECUR value in RRULE property. Removing entire property: - 'FREQ=MONTHLY\;BYMONTHDAY=1\;UNTIL=19980901T210000Z' -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - ;PARTSTAT=ACCEPTED - :Mailto:A@example.com -ATTENDEE - :Mailto:B@example.com -ATTENDEE - :Mailto:C@example.com -ATTENDEE - :Mailto:D@example.com -DESCRIPTION - :IETF-C&S Conference Call -CLASS - :PUBLIC -SUMMARY - :IETF Calendaring Working Group Meeting -DTSTART - :19970601T210000Z -DTEND - :19970601T220000Z -LOCATION - :Conference Call -DTSTAMP - :19970526T083000Z -STATUS - :CONFIRMED -LAST-MODIFIED - :20000209T060027Z -END:VEVENT -BEGIN:VEVENT -UID - :guid-1@host1.com -SEQUENCE - :0 -X-LIC-ERROR - ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR - :Can't parse as RECUR value in RRULE property. Removing entire property: - 'FREQ=MONTHLY\;BYMONTHDAY=1' -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - :Mailto:A@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:B@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:C@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:D@example.com -DESCRIPTION - :IETF-C&S Conference Call -CLASS - :PUBLIC -SUMMARY - :IETF Calendaring Working Group Meeting -DTSTART - :19970601T210000Z -DTEND - :19970601T220000Z -DTSTAMP - :19970602T094000Z -LOCATION - :Conference Call -STATUS - :CONFIRMED -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PROPERTY_PARSE_ERROR - :Parse error in property name: 'FOO' -LAST-MODIFIED - :20000209T060027Z -END:VEVENT -BEGIN:VEVENT -ORGANIZER - :Mailto:A@example.com -ATTENDEE - :Mailto:B@example.com -REQUEST-STATUS - :2.8\;Repeating event ignored. Scheduled as a single event\;RRULE -REQUEST-STATUS - :3.0\;Invalid Property Name\;FOO -UID - :guid-1@host1.com -SEQUENCE - :0 -DTSTAMP - :19970603T094000Z -LAST-MODIFIED - :20000209T060027Z -END:VEVENT -BEGIN:VEVENT -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - ;PARTSTAT=ACCEPTED - :Mailto:A@example.com -ATTENDEE - :Mailto:B@example.com -ATTENDEE - :Mailto:C@example.com -ATTENDEE - :Mailto:D@example.com -UID - : guid-1-12345@host1.com -DTSTAMP - :19970603T094000 -LAST-MODIFIED - :20000209T060027Z -END:VEVENT -BEGIN:VEVENT -ORGANIZER - :Mailto:A@example.com -ATTENDEE - :Mailto:B@example.com -UID - :acme-12345@host1.com -DTSTAMP - :19970603T094000 -LAST-MODIFIED - :20000209T060028Z -END:VEVENT -END:VCALENDAR diff --git a/libical/src/test/alice/booked/199707 b/libical/src/test/alice/booked/199707 deleted file mode 100644 index c52d27aa91..0000000000 --- a/libical/src/test/alice/booked/199707 +++ /dev/null @@ -1,701 +0,0 @@ -BEGIN:VCALENDAR -X-LIC-CLUSTERCOUNT - :19 -DTSTART - :00000000T000000 -DTEND - :00000000T000000 -BEGIN:VEVENT -ORGANIZER - :mailto:a@example.com -DTSTART - :19970701T200000Z -DTSTAMP - :19970611T190000Z -SUMMARY - :ST. PAUL SAINTS -VS- DULUTH-SUPERIOR DUKES -UID - :0981234-1234234-23@example.com -LAST-MODIFIED - :20000209T060027Z -END:VEVENT -BEGIN:VEVENT -ORGANIZER - :mailto:a@example.com -DTSTAMP - :19970612T190000Z -DTSTART - :19970701T210000Z -DTEND - :19970701T230000Z -SEQUENCE - :1 -UID - :0981234-1234234-23@example.com -SUMMARY - :ST. PAUL SAINTS -VS- DULUTH-SUPERIOR DUKES -LAST-MODIFIED - :20000209T060027Z -END:VEVENT -BEGIN:VEVENT -ORGANIZER - :mailto:a@example.com -ATTACH - :http://www.dukes.com/ -CATEGORIES - :SPORTS EVENT -CATEGORIES - :ENTERTAINMENT -CLASS - :PRIVATE -DESCRIPTION - :MIDWAY STADIUM\nBig time game. MUST see.\nExpected duration:2 hours\n -DTEND - ;TZID=America-Chicago - :19970701T180000 -DTSTART - ;TZID=America-Chicago - :19970702T160000 -DTSTAMP - :19970614T190000Z -STATUS - :CONFIRMED -LOCATION - :http://www.midwaystadium.com/ -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter value: 'VALUE=America-Chicago' -PRIORITY - :2 -RESOURCES - :SCOREBOARD -SEQUENCE - :3 -SUMMARY - :ST. PAUL SAINTS -VS- DULUTH-SUPERIOR DUKES -UID - :0981234-1234234-23@example.com -RELATED-TO - :0981234-1234234-14@example.com -LAST-MODIFIED - :20000209T060027Z -BEGIN:VALARM -TRIGGER - :PT2H -ACTION - :DISPLAY -DESCRIPTION - :You should be leaving for the game now. -END:VALARM -BEGIN:VALARM -TRIGGER - :PT30M -ACTION - :AUDIO -END:VALARM -END:VEVENT -BEGIN:VEVENT -ORGANIZER - :mailto:a@example.com -DTSTAMP - :19970614T190000Z -UID - :0981234-1234234-23@example.com -DTSTART - ;VALUE=DATE - :19970714 -X-LIC-ERROR - ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR - :Can't parse as RECUR value in RRULE property. Removing entire property: - 'FREQ=YEARLY\;INTERVAL=1' -SUMMARY - : Bastille Day -LAST-MODIFIED - :20000209T060027Z -END:VEVENT -BEGIN:VEVENT -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - ;PARTSTAT=ACCEPTED - ;CN=BIG A - :Mailto:A@example.com -ATTENDEE - ;RSVP=TRUE - ;CN=B - :Mailto:B@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -ATTENDEE - ;RSVP=TRUE - ;CN=C - :Mailto:C@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -ATTENDEE - ;RSVP=TRUE - ;CN=Hal - :Mailto:D@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -ATTENDEE - ;RSVP=FALSE - :conf_Big@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=ROOM' -ATTENDEE - ;ROLE=NON-PARTICIPANT - ;RSVP=FALSE - :Mailto:E@example.com -DTSTAMP - :19970611T190000Z -DTSTART - :19970701T200000Z -DTEND - :19970701T200000Z -SUMMARY - :Conference -UID - :calsrv.example.com-873970198738777@example.com -SEQUENCE - :0 -STATUS - :CONFIRMED -LAST-MODIFIED - :20000209T060027Z -END:VEVENT -BEGIN:VEVENT -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - ;PARTSTAT=ACCEPTED - :Mailto:A@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:B@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -ATTENDEE - ;RSVP=TRUE - :Mailto:C@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -ATTENDEE - ;RSVP=TRUE - ;CN=Hal - :Mailto:D@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -ATTENDEE - ;ROLE=NON-PARTICIPANT - ;RSVP=FALSE - ;CUTYPE=ROOM - :Mailto:Conf@example.com -ATTENDEE - ;ROLE=NON-PARTICIPANT - ;RSVP=FALSE - :Mailto:E@example.com -DTSTART - :19970701T180000Z -DTEND - :19970701T190000Z -SUMMARY - :Phone Conference -UID - :calsrv.example.com-873970198738777@example.com -SEQUENCE - :1 -DTSTAMP - :19970613T190000Z -STATUS - :CONFIRMED -LAST-MODIFIED - :20000209T060027Z -END:VEVENT -BEGIN:VEVENT -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - ;PARTSTAT=ACCEPTED - :Mailto:A@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:B@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -ATTENDEE - ;RSVP=TRUE - :Mailto:C@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -DTSTART - :19970701T190000Z -DTEND - :19970701T200000Z -SUMMARY - :Discuss the Merits of the election results -LOCATION - :Green Conference Room -UID - :calsrv.example.com-873970198738777a@example.com -SEQUENCE - :0 -DTSTAMP - :19970611T190000Z -STATUS - :CONFIRMED -LAST-MODIFIED - :20000209T060027Z -END:VEVENT -BEGIN:VEVENT -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - ;PARTSTAT=ACCEPTED - :Mailto:A@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:B@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -ATTENDEE - ;RSVP=TRUE - :Mailto:C@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -DTSTART - :19970701T160000Z -DTEND - :19970701T190000Z -DTSTAMP - :19970612T190000Z -SUMMARY - :Discuss the Merits of the election results -LOCATION - :Green Conference Room -COMMENT - :This time works much better and I think the big conference room is - too big -UID - :calsrv.example.com-873970198738777a@example.com -SEQUENCE - :0 -DTSTAMP - :19970611T190000Z -LAST-MODIFIED - :20000209T060027Z -END:VEVENT -BEGIN:VEVENT -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - ;PARTSTAT=ACCEPTED - :Mailto:A@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:B@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -ATTENDEE - ;RSVP=TRUE - :Mailto:C@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -DTSTAMP - :19970613T190000Z -DTSTART - :19970701T160000Z -DTEND - :19970701T190000Z -SUMMARY - :Discuss the Merits of the election results - changed to meet B's schedule -LOCATION - :Green Conference Room -UID - :calsrv.example.com-873970198738777@example.com -SEQUENCE - :1 -STATUS - :CONFIRMED -LAST-MODIFIED - :20000209T060027Z -END:VEVENT -BEGIN:VEVENT -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;PARTSTAT=DELEGATED - ;DELEGATED-TO="Mailto:E@example.com" - :Mailto:C@example.com -ATTENDEE - ;RSVP=TRUE - ;DELEGATED-FROM="Mailto:C@example.com" - :Mailto:E@example.com -DTSTART - :19970701T180000Z -DTEND - :19970701T200000Z -SUMMARY - :Phone Conference -UID - :calsrv.example.com-873970198738777@example.com -SEQUENCE - :0 -STATUS - :CONFIRMED -DTSTAMP - :19970611T190000Z -LAST-MODIFIED - :20000209T060027Z -END:VEVENT -BEGIN:VEVENT -ORGANIZER - :MAILTO:A@Example.com -ATTENDEE - ;PARTSTAT=DECLINED - ;DELEGATED-FROM="Mailto:C@example.com" - :Mailto:E@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:C@example.com -UID - :calsrv.example.com-873970198738777@example.com -SEQUENCE - :0 -SUMMARY - :Phone Conference -DTSTART - :19970701T180000Z -DTEND - :19970701T200000Z -DTSTAMP - :19970614T200000Z -COMMENT - :DELEGATE (ATTENDEE Mailto:E@example.com) DECLINED YOURINVITATION -LAST-MODIFIED - :20000209T060027Z -END:VEVENT -BEGIN:VEVENT -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - ;PARTSTAT=ACCEPTED - :Mailto:A@example.com -ATTENDEE - :Mailto:C@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -ATTENDEE - :Mailto:D@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -ATTENDEE - :CR_Big@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=ROOM' -ATTENDEE - ;ROLE=NON-PARTICIPANT - ;RSVP=FALSE - :Mailto:E@example.com -DTSTAMP - :19970611T190000Z -DTSTART - :19970701T200000Z -DTEND - :19970701T203000Z -SUMMARY - :Phone Conference -UID - :calsrv.example.com-873970198738777@example.com -SEQUENCE - :2 -STATUS - :CONFIRMED -LAST-MODIFIED - :20000209T060027Z -END:VEVENT -BEGIN:VEVENT -ORGANIZER - :Mailto:B@example.com -ATTENDEE - ;ROLE=CHAIR - :Mailto:B@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'STATUS=ACCEPTED' -ATTENDEE - :Mailto:C@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -ATTENDEE - :Mailto:D@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -DTSTAMP - :19970611T190000Z -DTSTART - :19970701T200000Z -DTEND - :19970701T203000Z -X-LIC-ERROR - ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR - :Can't parse as RECUR value in RRULE property. Removing entire property: - 'FREQ=WEEKLY' -SUMMARY - :Phone Conference -UID - :123456@example.com -SEQUENCE - :1 -STATUS - :CONFIRMED -LAST-MODIFIED - :20000209T060027Z -END:VEVENT -BEGIN:VEVENT -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - ;PARTSTAT=ACCEPTED - :A@example.COM -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -ATTENDEE - ;RSVP=TRUE - :B@example.fr -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -ATTENDEE - ;RSVP=TRUE - :c@example.jp -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -DTSTAMP - :19970613T190030Z -DTSTART - ;TZID=America-SanJose - :19970701T140000 -DTEND - ;TZID=America-SanJose - :19970701T150000 -X-LIC-ERROR - ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR - :Can't parse as RECUR value in RRULE property. Removing entire property: - 'FREQ=WEEKLY\;INTERVAL=20\;WKST=SU\;BYDAY=TU' -RDATE - ;TZID=America-SanJose - :19970910T140000 -EXDATE - ;TZID=America-SanJose - :19970909T140000 -EXDATE - ;TZID=America-SanJose - :19971028T140000 -SUMMARY - :Weekly Phone Conference -UID - :calsrv.example.com-873970198738777@example.com -SEQUENCE - :0 -STATUS - :CONFIRMED -LAST-MODIFIED - :20000209T060027Z -END:VEVENT -BEGIN:VEVENT -UID - :guid-1@host1com -RECURRENCE-ID - :19970701T210000Z -SEQUENCE - :1 -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - ;PARTSTAT=ACCEPTED - :Mailto:A@example.com -ATTENDEE - :Mailto:B@example.com -ATTENDEE - :Mailto:C@example.com -ATTENDEE - :Mailto:D@example.com -DESCRIPTION - :IETF-C&S Conference Call -CLASS - :PUBLIC -SUMMARY - :IETF Calendaring Working Group Meeting -DTSTART - :19970703T210000Z -DTEND - :19970703T220000Z -LOCATION - :Conference Call -DTSTAMP - :19970626T093000Z -STATUS - :CONFIRMED -LAST-MODIFIED - :20000209T060027Z -END:VEVENT -BEGIN:VEVENT -UID - :guid-1@host1.com -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - ;PARTSTAT=ACCEPTED - :Mailto:A@example.com -ATTENDEE - :Mailto:B@example.com -ATTENDEE - :Mailto:C@example.com -ATTENDEE - :Mailto:D@example.com -RECURRENCE-ID - :19970801T210000Z -SEQUENCE - :2 -STATUS - :CANCELLED -DTSTAMP - :19970721T093000Z -LAST-MODIFIED - :20000209T060027Z -END:VEVENT -BEGIN:VEVENT -UID - :guid-1@host1.com -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - ;PARTSTAT=ACCEPTED - :Mailto:A@example.com -ATTENDEE - :Mailto:B@example.com -ATTENDEE - :Mailto:C@example.com -ATTENDEE - :Mailto:D@example.com -DTSTAMP - :19970721T103000Z -STATUS - :CANCELLED -SEQUENCE - :3 -LAST-MODIFIED - :20000209T060027Z -END:VEVENT -BEGIN:VEVENT -UID - :123456789@host1.com -SEQUENCE - :4 -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - ;PARTSTAT=ACCEPTED - :Mailto:A@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:B@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:C@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:D@example.com -DESCRIPTION - :IETF-C&S Conference Call -CLASS - :PUBLIC -SUMMARY - :IETF Calendaring Working Group Meeting -DTSTART - :19970715T210000Z -DTEND - :19970715T220000Z -LOCATION - :Conference Call -DTSTAMP - :19970629T093000Z -STATUS - :CONFIRMED -LAST-MODIFIED - :20000209T060027Z -END:VEVENT -BEGIN:VEVENT -UID - :guid-1@host1.com -RECURRENCE-ID - :19970715T210000Z -SEQUENCE - :4 -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - ;RSVP=TRUE - :Mailto:A@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:B@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:C@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:D@example.com -DESCRIPTION - :IETF-C&S Conference Call -CLASS - :PUBLIC -SUMMARY - :IETF Calendaring Working Group Meeting -DTSTART - :19970715T220000Z -DTEND - :19970715T230000Z -LOCATION - :Conference Call -COMMENT - :May we bump this by an hour? I have a conflict -DTSTAMP - :19970629T094000Z -LAST-MODIFIED - :20000209T060027Z -END:VEVENT -END:VCALENDAR diff --git a/libical/src/test/alice/booked/199708 b/libical/src/test/alice/booked/199708 deleted file mode 100644 index 2db95cabcf..0000000000 --- a/libical/src/test/alice/booked/199708 +++ /dev/null @@ -1,45 +0,0 @@ -BEGIN:VCALENDAR -X-LIC-CLUSTERCOUNT - :1 -DTSTART - :00000000T000000 -DTEND - :00000000T000000 -BEGIN:VEVENT -UID - :acme-12345@host1.com -SEQUENCE - :3 -X-LIC-ERROR - ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR - :Can't parse as RECUR value in RRULE property. Removing entire property: - 'FREQ=WEEKLY' -RDATE - ;VALUE=PERIOD - :19970819T210000Z/19970081T220000Z -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - ;PARTSTAT=ACCEPTED - :Mailto:A@example.com -ATTENDEE - :Mailto:B@example.com -DESCRIPTION - :IETF-C&S Conference Call -SUMMARY - :IETF Calendaring Working Group Meeting -DTSTART - :19970801T210000Z -DTEND - :19970801T220000Z -RECURRENCE-ID - :19970809T210000Z -DTSTAMP - :19970726T083000 -STATUS - :CONFIRMED -LAST-MODIFIED - :20000209T060028Z -END:VEVENT -END:VCALENDAR diff --git a/libical/src/test/alice/booked/199709 b/libical/src/test/alice/booked/199709 deleted file mode 100644 index 30a4471bde..0000000000 --- a/libical/src/test/alice/booked/199709 +++ /dev/null @@ -1,58 +0,0 @@ -BEGIN:VCALENDAR -X-LIC-CLUSTERCOUNT - :1 -DTSTART - :00000000T000000 -DTEND - :00000000T000000 -BEGIN:VEVENT -UID - :guid-1@host1.com -RECURRENCE-ID - :19970901T210000Z -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'THISANDFUTURE' -SEQUENCE - :3 -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - ;PARTSTAT=ACCEPTED - :Mailto:A@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:B@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:C@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:D@example.com -DESCRIPTION - :IETF-C&S Discussion -CLASS - :PUBLIC -SUMMARY - :IETF Calendaring Working Group Meeting -DTSTART - :19970901T210000Z -DTEND - :19970901T220000Z -LOCATION - :Building 32 -LOCATION - : Microsoft -LOCATION - : Seattle -LOCATION - : WA -DTSTAMP - :19970526T083000Z -STATUS - :CONFIRMED -LAST-MODIFIED - :20000209T060027Z -END:VEVENT -END:VCALENDAR diff --git a/libical/src/test/alice/booked/199803 b/libical/src/test/alice/booked/199803 deleted file mode 100644 index 4b673d7ccc..0000000000 --- a/libical/src/test/alice/booked/199803 +++ /dev/null @@ -1,241 +0,0 @@ -BEGIN:VCALENDAR -X-LIC-CLUSTERCOUNT - :7 -DTSTART - :00000000T000000 -DTEND - :00000000T000000 -BEGIN:VEVENT -UID - :123456789@host1.com -SEQUENCE - :0 -X-LIC-ERROR - ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR - :Can't parse as RECUR value in RRULE property. Removing entire property: - 'WKST=SU\;BYDAY=TU\;FREQ=WEEKLY' -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - ;PARTSTAT=ACCEPTED - :Mailto:A@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:B@example.com -SUMMARY - :Review Accounts -DTSTART - :19980303T210000Z -DTEND - :19980303T220000Z -LOCATION - :The White Room -DTSTAMP - :19980301T093000Z -STATUS - :CONFIRMED -LAST-MODIFIED - :20000209T060027Z -END:VEVENT -BEGIN:VEVENT -UID - :123456789@host1.com -SEQUENCE - :7 -X-LIC-ERROR - ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR - :Can't parse as RECUR value in RRULE property. Removing entire property: - 'WKST=SU\;BYDAY=TH\;FREQ=WEEKLY' -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - ;PARTSTAT=ACCEPTED - :Mailto:A@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:B@example.com -SUMMARY - :Review Accounts -DTSTART - :19980303T210000Z -DTEND - :19980303T220000Z -DTSTAMP - :19980303T193000Z -LOCATION - :The Usual conference room -STATUS - :CONFIRMED -LAST-MODIFIED - :20000209T060027Z -END:VEVENT -BEGIN:VEVENT -UID - :123456789@host1.com -SEQUENCE - :7 -X-LIC-ERROR - ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR - :Can't parse as RECUR value in RRULE property. Removing entire property: - 'WKST=SU\;BYDAY=TU' -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - ;PARTSTAT=ACCEPTED - :Mailto:A@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:B@example.com -SUMMARY - :Review Accounts -DTSTART - :19980303T210000Z -DTEND - :19980303T220000Z -DTSTAMP - :19980303T193000Z -LOCATION - :The White Room -STATUS - :CONFIRMED -LAST-MODIFIED - :20000209T060027Z -END:VEVENT -BEGIN:VEVENT -UID - :123456789@host1.com -SEQUENCE - :0 -RDATE - :19980304T180000Z -RDATE - :19980311T180000Z -RDATE - :19980318T180000Z -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - ;PARTSTAT=ACCEPTED - :Mailto:A@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:B@example.com -SUMMARY - :Review Accounts -DTSTART - :19980304T180000Z -DTEND - :19980304T200000Z -DTSTAMP - :19980303T193000Z -LOCATION - :Conference Room A -STATUS - :CONFIRMED -LAST-MODIFIED - :20000209T060027Z -END:VEVENT -BEGIN:VEVENT -UID - :123456789@host1.com -SEQUENCE - :1 -RECURRENCE-ID - :19980311T180000Z -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - ;PARTSTAT=ACCEPTED - :Mailto:A@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:B@example.com -SUMMARY - :Review Accounts -DTSTART - :19980311T160000Z -DTEND - :19980311T180000Z -DTSTAMP - :19980306T193000Z -LOCATION - :The Small conference room -STATUS - :CONFIRMED -LAST-MODIFIED - :20000209T060027Z -END:VEVENT -BEGIN:VEVENT -UID - :123456789@host1.com -SEQUENCE - :2 -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - ;PARTSTAT=ACCEPTED - :Mailto:A@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:B@example.com -SUMMARY - :Review Accounts -DTSTART - :19980315T180000Z -DTEND - :19980315T200000Z -DTSTAMP - :19980307T193000Z -LOCATION - :Conference Room A -STATUS - :CONFIRMED -LAST-MODIFIED - :20000209T060027Z -END:VEVENT -BEGIN:VEVENT -UID - :123456789@host1.com -SEQUENCE - :2 -RDATE - :19980304T180000Z -RDATE - :19980311T160000Z -RDATE - :19980315T180000Z -X-LIC-ERROR - ;X-LIC-ERRORTYPE=COMPONENT_PARSE_ERROR - :Got a data line\, but could not find a property name or component - begin tag: 'Error! Bookmark not defined.' -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - ;PARTSTAT=ACCEPTED - :Mailto:A@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:B@example.com -SUMMARY - :Review Accounts -DTSTART - :19980304T180000Z -DTEND - :19980304T200000Z -DTSTAMP - :19980303T193000Z -LOCATION - :Conference Room A -STATUS - :CONFIRMED -LAST-MODIFIED - :20000209T060027Z -END:VEVENT -END:VCALENDAR diff --git a/libical/src/test/alice/incoming.ics b/libical/src/test/alice/incoming.ics deleted file mode 100644 index c25b6b11c3..0000000000 --- a/libical/src/test/alice/incoming.ics +++ /dev/null @@ -1,2164 +0,0 @@ -BEGIN:VCALENDAR -X-LIC-CLUSTERCOUNT - :0 -DTSTART - :00000000T000000 -DTEND - :00000000T000000 -BEGIN:VCALENDAR -METHOD - :PUBLISH -PRODID - :-//ACME/DesktopCalendar//EN -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VEVENT -ORGANIZER - :mailto:a@example.com -DTSTART - :19970701T200000Z -DTSTAMP - :19970611T190000Z -SUMMARY - :ST. PAUL SAINTS -VS- DULUTH-SUPERIOR DUKES -UID - :0981234-1234234-23@example.com -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD - :PUBLISH -VERSION - :2.0 -PRODID - :-//ACME/DesktopCalendar//EN -X-LIC-SENDER - :eric@busboom.org -BEGIN:VEVENT -ORGANIZER - :mailto:a@example.com -DTSTAMP - :19970612T190000Z -DTSTART - :19970701T210000Z -DTEND - :19970701T230000Z -SEQUENCE - :1 -UID - :0981234-1234234-23@example.com -SUMMARY - :ST. PAUL SAINTS -VS- DULUTH-SUPERIOR DUKES -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD - :CANCEL -VERSION - :2.0 -PRODID - :-//ACME/DesktopCalendar//EN -X-LIC-SENDER - :eric@busboom.org -BEGIN:VEVENT -ORGANIZER - :mailto:a@example.com -COMMENT - :DUKES forfeit the game -SEQUENCE - :2 -UID - :0981234-1234234-23@example.com -DTSTAMP - :19970613T190000Z -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID - :-//ACME/DesktopCalendar//EN -METHOD - :PUBLISH -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PROPERTY_PARSE_ERROR - :Parse error in property name: 'SCALE' -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VTIMEZONE -TZID - :America-Chicago -TZURL - :http://zones.stds_r_us.net/tz/America-Chicago -BEGIN:STANDARD -DTSTART - :19671029T020000 -X-LIC-ERROR - ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR - :Can't parse as RECUR value in RRULE property. Removing entire property: - 'FREQ=YEARLY\;BYDAY=-1SU\;BYMONTH=10' -TZOFFSETFROM - :-050000 -TZOFFSETTO - :-060000 -TZNAME - :CST -END:STANDARD -BEGIN:DAYLIGHT -DTSTART - :19870405T020000 -X-LIC-ERROR - ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR - :Can't parse as RECUR value in RRULE property. Removing entire property: - 'FREQ=YEARLY\;BYDAY=1SU\;BYMONTH=4' -TZOFFSETFROM - :-060000 -TZOFFSETTO - :-050000 -TZNAME - :CDT -END:DAYLIGHT -END:VTIMEZONE -BEGIN:VEVENT -ORGANIZER - :mailto:a@example.com -ATTACH - :http://www.dukes.com/ -CATEGORIES - :SPORTS EVENT -CATEGORIES - :ENTERTAINMENT -CLASS - :PRIVATE -DESCRIPTION - :MIDWAY STADIUM\nBig time game. MUST see.\nExpected duration:2 hours\n -DTEND - ;TZID=America-Chicago - :19970701T180000 -DTSTART - ;TZID=America-Chicago - :19970702T160000 -DTSTAMP - :19970614T190000Z -STATUS - :CONFIRMED -LOCATION - :http://www.midwaystadium.com/ -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter value: 'VALUE=America-Chicago' -PRIORITY - :2 -RESOURCES - :SCOREBOARD -SEQUENCE - :3 -SUMMARY - :ST. PAUL SAINTS -VS- DULUTH-SUPERIOR DUKES -UID - :0981234-1234234-23@example.com -RELATED-TO - :0981234-1234234-14@example.com -BEGIN:VALARM -TRIGGER - :PT2H -ACTION - :DISPLAY -DESCRIPTION - :You should be leaving for the game now. -END:VALARM -BEGIN:VALARM -TRIGGER - :PT30M -ACTION - :AUDIO -END:VALARM -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID - :-//ACME/DesktopCalendar//EN -METHOD - :PUBLISH -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VEVENT -ORGANIZER - :mailto:a@example.com -DTSTAMP - :19970614T190000Z -UID - :0981234-1234234-23@example.com -DTSTART - ;VALUE=DATE - :19970714 -X-LIC-ERROR - ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR - :Can't parse as RECUR value in RRULE property. Removing entire property: - 'FREQ=YEARLY\;INTERVAL=1' -SUMMARY - : Bastille Day -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID - :-//ACME/DesktopCalendar//EN -METHOD - :REQUEST -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VEVENT -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - ;PARTSTAT=ACCEPTED - ;CN=BIG A - :Mailto:A@example.com -ATTENDEE - ;RSVP=TRUE - ;CN=B - :Mailto:B@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -ATTENDEE - ;RSVP=TRUE - ;CN=C - :Mailto:C@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -ATTENDEE - ;RSVP=TRUE - ;CN=Hal - :Mailto:D@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -ATTENDEE - ;RSVP=FALSE - :conf_Big@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=ROOM' -ATTENDEE - ;ROLE=NON-PARTICIPANT - ;RSVP=FALSE - :Mailto:E@example.com -DTSTAMP - :19970611T190000Z -DTSTART - :19970701T200000Z -DTEND - :19970701T200000Z -SUMMARY - :Conference -UID - :calsrv.example.com-873970198738777@example.com -SEQUENCE - :0 -STATUS - :CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID - :-//ACME/DesktopCalendar//EN -METHOD - :REPLY -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VEVENT -ATTENDEE - ;PARTSTAT=ACCEPTED - :Mailto:B@example.com -ORGANIZER - :MAILTO:A@example.com -UID - :calsrv.example.com-873970198738777@example.com -SEQUENCE - :0 -REQUEST-STATUS - :2.0\;Success -DTSTAMP - :19970612T190000Z -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID - :-//ACME/DesktopCalendar//EN -METHOD - :REQUEST -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VEVENT -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - ;PARTSTAT=ACCEPTED - :Mailto:A@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:B@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -ATTENDEE - ;RSVP=TRUE - :Mailto:C@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -ATTENDEE - ;RSVP=TRUE - ;CN=Hal - :Mailto:D@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -ATTENDEE - ;ROLE=NON-PARTICIPANT - ;RSVP=FALSE - ;CUTYPE=ROOM - :Mailto:Conf@example.com -ATTENDEE - ;ROLE=NON-PARTICIPANT - ;RSVP=FALSE - :Mailto:E@example.com -DTSTART - :19970701T180000Z -DTEND - :19970701T190000Z -SUMMARY - :Phone Conference -UID - :calsrv.example.com-873970198738777@example.com -SEQUENCE - :1 -DTSTAMP - :19970613T190000Z -STATUS - :CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID - :-//ACME/DesktopCalendar//EN -METHOD - :REQUEST -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VEVENT -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - ;PARTSTAT=ACCEPTED - :Mailto:A@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:B@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -ATTENDEE - ;RSVP=TRUE - :Mailto:C@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -DTSTART - :19970701T190000Z -DTEND - :19970701T200000Z -SUMMARY - :Discuss the Merits of the election results -LOCATION - :Green Conference Room -UID - :calsrv.example.com-873970198738777a@example.com -SEQUENCE - :0 -DTSTAMP - :19970611T190000Z -STATUS - :CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID - :-//ACME/DesktopCalendar//EN -METHOD - :COUNTER -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VEVENT -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - ;PARTSTAT=ACCEPTED - :Mailto:A@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:B@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -ATTENDEE - ;RSVP=TRUE - :Mailto:C@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -DTSTART - :19970701T160000Z -DTEND - :19970701T190000Z -DTSTAMP - :19970612T190000Z -SUMMARY - :Discuss the Merits of the election results -LOCATION - :Green Conference Room -COMMENT - :This time works much better and I think the big conference room is - too big -UID - :calsrv.example.com-873970198738777a@example.com -SEQUENCE - :0 -DTSTAMP - :19970611T190000Z -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID - :-//ACME/DesktopCalendar//EN -METHOD - :REQUEST -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VEVENT -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - ;PARTSTAT=ACCEPTED - :Mailto:A@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:B@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -ATTENDEE - ;RSVP=TRUE - :Mailto:C@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -DTSTAMP - :19970613T190000Z -DTSTART - :19970701T160000Z -DTEND - :19970701T190000Z -SUMMARY - :Discuss the Merits of the election results - changed to meet B's schedule -LOCATION - :Green Conference Room -UID - :calsrv.example.com-873970198738777@example.com -SEQUENCE - :1 -STATUS - :CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID - :-//ACME/DesktopCalendar//EN -METHOD - :DECLINECOUNTER -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VEVENT -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:B@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -COMMENT - :Sorry -COMMENT - : I cannot change this meeting time -UID - :calsrv.example.com-873970198738777@example.com -SEQUENCE - :0 -DTSTAMP - :19970614T190000Z -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID - :-//ACME/DesktopCalendar//EN -METHOD - :REPLY -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VEVENT -ORGANIZER - :MAILTO:A@Example.com -ATTENDEE - ;PARTSTAT=DELEGATED - ;DELEGATED-TO="Mailto:E@example.com" - :Mailto:C@example.com -UID - :calsrv.example.com-873970198738777@example.com -SEQUENCE - :0 -REQUEST-STATUS - :2.0\;Success -DTSTAMP - :19970611T190000Z -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID - :-//ACME/DesktopCalendar//EN -METHOD - :REQUEST -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VEVENT -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;PARTSTAT=DELEGATED - ;DELEGATED-TO="Mailto:E@example.com" - :Mailto:C@example.com -ATTENDEE - ;RSVP=TRUE - ;DELEGATED-FROM="Mailto:C@example.com" - :Mailto:E@example.com -DTSTART - :19970701T180000Z -DTEND - :19970701T200000Z -SUMMARY - :Phone Conference -UID - :calsrv.example.com-873970198738777@example.com -SEQUENCE - :0 -STATUS - :CONFIRMED -DTSTAMP - :19970611T190000Z -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID - :-//ACME/DesktopCalendar//EN -METHOD - :REPLY -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VEVENT -ORGANIZER - :MAILTO:A@Example.com -ATTENDEE - ;PARTSTAT=ACCEPTED - ;DELEGATED-FROM="Mailto:C@example.com" - :Mailto:E@example.com -ATTENDEE - ;PARTSTAT=DELEGATED - ;DELEGATED-TO="Mailto:E@example.com" - :Mailto:C@example.com -UID - :calsrv.example.com-873970198738777@example.com -SEQUENCE - :0 -REQUEST-STATUS - :2.0\;Success -DTSTAMP - :19970614T190000Z -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID - :-//ACME/DesktopCalendar//EN -METHOD - :REPLY -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VEVENT -ORGANIZER - :MAILTO:A@Example.com -ATTENDEE - ;PARTSTAT=DELEGATED - ;DELEGATED-TO="Mailto:E@example.com" - :Mailto:C@example.com -ATTENDEE - ;PARTSTAT=DECLINED - ;DELEGATED-FROM="Mailto:C@example.com" - :Mailto:E@example.com -COMMENT - :Sorry -COMMENT - : I will be out of town at that time. -UID - :calsrv.example.com-873970198738777@example.com -SEQUENCE - :0 -REQUEST-STATUS - :2.0\;Success -DTSTAMP - :19970614T190000Z -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID - :-//ACME/DesktopCalendar//EN -METHOD - :REQUEST -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VEVENT -ORGANIZER - :MAILTO:A@Example.com -ATTENDEE - ;PARTSTAT=DECLINED - ;DELEGATED-FROM="Mailto:C@example.com" - :Mailto:E@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:C@example.com -UID - :calsrv.example.com-873970198738777@example.com -SEQUENCE - :0 -SUMMARY - :Phone Conference -DTSTART - :19970701T180000Z -DTEND - :19970701T200000Z -DTSTAMP - :19970614T200000Z -COMMENT - :DELEGATE (ATTENDEE Mailto:E@example.com) DECLINED YOURINVITATION -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID - :-//ACME/DesktopCalendar//EN -METHOD - :CANCEL -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VEVENT -ORGANIZER - :Mailto:A@example.com -ATTENDEE - :A@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'Mailto' -ATTENDEE - :Mailto:B@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -ATTENDEE - :Mailto:C@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -ATTENDEE - :Mailto:D@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -COMMENT - :Mr. B cannot attend. It's raining. Lets cancel. -UID - :calsrv.example.com-873970198738777@example.com -SEQUENCE - :1 -STATUS - :CANCELLED -DTSTAMP - :19970613T190000Z -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID - :-//ACME/DesktopCalendar//EN -METHOD - :CANCEL -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VEVENT -ORGANIZER - :Mailto:A@example.com -ATTENDEE - :mailto:B@example.com -COMMENT - :You're off the hook for this meeting -UID - :calsrv.example.com-873970198738777@example.com -DTSTAMP - :19970613T193000Z -SEQUENCE - :1 -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID - :-//ACME/DesktopCalendar//EN -METHOD - :REQUEST -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VEVENT -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - ;PARTSTAT=ACCEPTED - :Mailto:A@example.com -ATTENDEE - :Mailto:C@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -ATTENDEE - :Mailto:D@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -ATTENDEE - :CR_Big@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=ROOM' -ATTENDEE - ;ROLE=NON-PARTICIPANT - ;RSVP=FALSE - :Mailto:E@example.com -DTSTAMP - :19970611T190000Z -DTSTART - :19970701T200000Z -DTEND - :19970701T203000Z -SUMMARY - :Phone Conference -UID - :calsrv.example.com-873970198738777@example.com -SEQUENCE - :2 -STATUS - :CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID - :-//ACME/DesktopCalendar//EN -METHOD - :REQUEST -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VEVENT -ORGANIZER - :Mailto:B@example.com -ATTENDEE - ;ROLE=CHAIR - :Mailto:B@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'STATUS=ACCEPTED' -ATTENDEE - :Mailto:C@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -ATTENDEE - :Mailto:D@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -DTSTAMP - :19970611T190000Z -DTSTART - :19970701T200000Z -DTEND - :19970701T203000Z -X-LIC-ERROR - ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR - :Can't parse as RECUR value in RRULE property. Removing entire property: - 'FREQ=WEEKLY' -SUMMARY - :Phone Conference -UID - :123456@example.com -SEQUENCE - :1 -STATUS - :CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID - :-//ACME/DesktopCalendar//EN -VERSION - :2.0 -METHOD - :PUBLISH -X-LIC-SENDER - :eric@busboom.org -BEGIN:VFREEBUSY -DTSTAMP - :19980101T124100Z -ORGANIZER - :MAILTO:A@Example.com -DTSTART - :19980101T124200Z -DTEND - :19980107T124200Z -FREEBUSY - :19980101T180000Z/19980101T190000Z -FREEBUSY - :19980103T020000Z/19980103T050000Z -FREEBUSY - :19980107T020000Z/19980107T050000Z -FREEBUSY - :19980113T000000Z/19980113T010000Z -FREEBUSY - :19980115T190000Z/19980115T200000Z -FREEBUSY - :19980115T220000Z/19980115T230000Z -FREEBUSY - :19980116T013000Z/19980116T043000Z -END:VFREEBUSY -END:VCALENDAR -BEGIN:VCALENDAR -PRODID - :-//ACME/DesktopCalendar//EN -METHOD - :REQUEST -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VFREEBUSY -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - :Mailto:A@example.com -ATTENDEE - :Mailto:B@example.com -ATTENDEE - :Mailto:C@example.com -DTSTAMP - :19970613T190000Z -DTSTART - :19970701T080000Z -DTEND - :19970701T200000 -UID - :calsrv.example.com-873970198738777@example.com -END:VFREEBUSY -END:VCALENDAR -BEGIN:VCALENDAR -PRODID - :-//ACME/DesktopCalendar//EN -METHOD - :REPLY -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VFREEBUSY -ORGANIZER - :MAILTO:A@example.com -ATTENDEE - :Mailto:B@example.com -DTSTART - :19970701T080000Z -DTEND - :19970701T200000Z -UID - :calsrv.example.com-873970198738777@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR - :Can't parse as PERIOD value in FREEBUSY property. Removing entire - property: '19970701T090000Z/PT1H' -DTSTAMP - :19970613T190030Z -END:VFREEBUSY -END:VCALENDAR -BEGIN:VCALENDAR -PRODID - :-//ACME/DesktopCalendar//EN -METHOD - :REQUEST -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VTIMEZONE -TZID - :America-SanJose -TZURL - :http://zones.stds_r_us.net/tz/America-SanJose -BEGIN:STANDARD -DTSTART - :19671029T020000 -X-LIC-ERROR - ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR - :Can't parse as RECUR value in RRULE property. Removing entire property: - 'FREQ=YEARLY\;BYDAY=-1SU\;BYMONTH=10' -TZOFFSETFROM - :-070000 -TZOFFSETTO - :-080000 -TZNAME - :PST -END:STANDARD -BEGIN:DAYLIGHT -DTSTART - :19870405T020000 -X-LIC-ERROR - ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR - :Can't parse as RECUR value in RRULE property. Removing entire property: - 'FREQ=YEARLY\;BYDAY=1SU\;BYMONTH=4' -TZOFFSETFROM - :-080000 -TZOFFSETTO - :-070000 -TZNAME - :PDT -END:DAYLIGHT -END:VTIMEZONE -BEGIN:VEVENT -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - ;PARTSTAT=ACCEPTED - :A@example.COM -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -ATTENDEE - ;RSVP=TRUE - :B@example.fr -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -ATTENDEE - ;RSVP=TRUE - :c@example.jp -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -DTSTAMP - :19970613T190030Z -DTSTART - ;TZID=America-SanJose - :19970701T140000 -DTEND - ;TZID=America-SanJose - :19970701T150000 -X-LIC-ERROR - ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR - :Can't parse as RECUR value in RRULE property. Removing entire property: - 'FREQ=WEEKLY\;INTERVAL=20\;WKST=SU\;BYDAY=TU' -RDATE - ;TZID=America-SanJose - :19970910T140000 -EXDATE - ;TZID=America-SanJose - :19970909T140000 -EXDATE - ;TZID=America-SanJose - :19971028T140000 -SUMMARY - :Weekly Phone Conference -UID - :calsrv.example.com-873970198738777@example.com -SEQUENCE - :0 -STATUS - :CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD - :REQUEST -PRODID - :-//RDU Software//NONSGML HandCal//EN -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VEVENT -UID - :guid-1@host1.com -SEQUENCE - :0 -X-LIC-ERROR - ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR - :Can't parse as RECUR value in RRULE property. Removing entire property: - 'FREQ=MONTHLY\;BYMONTHDAY=1\;UNTIL=19980901T210000Z' -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - ;PARTSTAT=ACCEPTED - :Mailto:A@example.com -ATTENDEE - :Mailto:B@example.com -ATTENDEE - :Mailto:C@example.com -ATTENDEE - :Mailto:D@example.com -DESCRIPTION - :IETF-C&S Conference Call -CLASS - :PUBLIC -SUMMARY - :IETF Calendaring Working Group Meeting -DTSTART - :19970601T210000Z -DTEND - :19970601T220000Z -LOCATION - :Conference Call -DTSTAMP - :19970526T083000Z -STATUS - :CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD - :REQUEST -PRODID - :-//RDU Software//NONSGML HandCal//EN -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VEVENT -UID - :guid-1@host1com -RECURRENCE-ID - :19970701T210000Z -SEQUENCE - :1 -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - ;PARTSTAT=ACCEPTED - :Mailto:A@example.com -ATTENDEE - :Mailto:B@example.com -ATTENDEE - :Mailto:C@example.com -ATTENDEE - :Mailto:D@example.com -DESCRIPTION - :IETF-C&S Conference Call -CLASS - :PUBLIC -SUMMARY - :IETF Calendaring Working Group Meeting -DTSTART - :19970703T210000Z -DTEND - :19970703T220000Z -LOCATION - :Conference Call -DTSTAMP - :19970626T093000Z -STATUS - :CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD - :CANCEL -PRODID - :-//RDU Software//NONSGML HandCal//EN -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VEVENT -UID - :guid-1@host1.com -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - ;PARTSTAT=ACCEPTED - :Mailto:A@example.com -ATTENDEE - :Mailto:B@example.com -ATTENDEE - :Mailto:C@example.com -ATTENDEE - :Mailto:D@example.com -RECURRENCE-ID - :19970801T210000Z -SEQUENCE - :2 -STATUS - :CANCELLED -DTSTAMP - :19970721T093000Z -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD - :CANCEL -PRODID - :-//RDU Software//NONSGML HandCal//EN -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VEVENT -UID - :guid-1@host1.com -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - ;PARTSTAT=ACCEPTED - :Mailto:A@example.com -ATTENDEE - :Mailto:B@example.com -ATTENDEE - :Mailto:C@example.com -ATTENDEE - :Mailto:D@example.com -DTSTAMP - :19970721T103000Z -STATUS - :CANCELLED -SEQUENCE - :3 -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD - :REQUEST -PRODID - :-//RDU Software//NONSGML HandCal//EN -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VEVENT -UID - :guid-1@host1.com -RECURRENCE-ID - :19970901T210000Z -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'THISANDFUTURE' -SEQUENCE - :3 -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - ;PARTSTAT=ACCEPTED - :Mailto:A@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:B@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:C@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:D@example.com -DESCRIPTION - :IETF-C&S Discussion -CLASS - :PUBLIC -SUMMARY - :IETF Calendaring Working Group Meeting -DTSTART - :19970901T210000Z -DTEND - :19970901T220000Z -LOCATION - :Building 32 -LOCATION - : Microsoft -LOCATION - : Seattle -LOCATION - : WA -DTSTAMP - :19970526T083000Z -STATUS - :CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD - :ADD -PRODID - :-//RDU Software//NONSGML HandCal//EN -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VEVENT -UID - :123456789@host1.com -SEQUENCE - :4 -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - ;PARTSTAT=ACCEPTED - :Mailto:A@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:B@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:C@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:D@example.com -DESCRIPTION - :IETF-C&S Conference Call -CLASS - :PUBLIC -SUMMARY - :IETF Calendaring Working Group Meeting -DTSTART - :19970715T210000Z -DTEND - :19970715T220000Z -LOCATION - :Conference Call -DTSTAMP - :19970629T093000Z -STATUS - :CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD - :REQUEST -PRODID - :-//RDU Software//NONSGML HandCal//EN -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VEVENT -UID - :123456789@host1.com -SEQUENCE - :0 -X-LIC-ERROR - ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR - :Can't parse as RECUR value in RRULE property. Removing entire property: - 'WKST=SU\;BYDAY=TU\;FREQ=WEEKLY' -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - ;PARTSTAT=ACCEPTED - :Mailto:A@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:B@example.com -SUMMARY - :Review Accounts -DTSTART - :19980303T210000Z -DTEND - :19980303T220000Z -LOCATION - :The White Room -DTSTAMP - :19980301T093000Z -STATUS - :CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD - :ADD -PRODID - :-//RDU Software//NONSGML HandCal//EN -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VEVENT -UID - :123456789@host1.com -SEQUENCE - :7 -X-LIC-ERROR - ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR - :Can't parse as RECUR value in RRULE property. Removing entire property: - 'WKST=SU\;BYDAY=TH\;FREQ=WEEKLY' -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - ;PARTSTAT=ACCEPTED - :Mailto:A@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:B@example.com -SUMMARY - :Review Accounts -DTSTART - :19980303T210000Z -DTEND - :19980303T220000Z -DTSTAMP - :19980303T193000Z -LOCATION - :The Usual conference room -STATUS - :CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD - :REQUEST -PRODID - :-//RDU Software//NONSGML HandCal//EN -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VEVENT -UID - :123456789@host1.com -SEQUENCE - :7 -X-LIC-ERROR - ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR - :Can't parse as RECUR value in RRULE property. Removing entire property: - 'WKST=SU\;BYDAY=TU' -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - ;PARTSTAT=ACCEPTED - :Mailto:A@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:B@example.com -SUMMARY - :Review Accounts -DTSTART - :19980303T210000Z -DTEND - :19980303T220000Z -DTSTAMP - :19980303T193000Z -LOCATION - :The White Room -STATUS - :CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD - :REQUEST -PRODID - :-//RDU Software//NONSGML HandCal//EN -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VEVENT -UID - :123456789@host1.com -SEQUENCE - :0 -RDATE - :19980304T180000Z -RDATE - :19980311T180000Z -RDATE - :19980318T180000Z -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - ;PARTSTAT=ACCEPTED - :Mailto:A@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:B@example.com -SUMMARY - :Review Accounts -DTSTART - :19980304T180000Z -DTEND - :19980304T200000Z -DTSTAMP - :19980303T193000Z -LOCATION - :Conference Room A -STATUS - :CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD - :REQUEST -PRODID - :-//RDU Software//NONSGML HandCal//EN -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VEVENT -UID - :123456789@host1.com -SEQUENCE - :1 -RECURRENCE-ID - :19980311T180000Z -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - ;PARTSTAT=ACCEPTED - :Mailto:A@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:B@example.com -SUMMARY - :Review Accounts -DTSTART - :19980311T160000Z -DTEND - :19980311T180000Z -DTSTAMP - :19980306T193000Z -LOCATION - :The Small conference room -STATUS - :CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD - :ADD -PRODID - :-//RDU Software//NONSGML HandCal//EN -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VEVENT -UID - :123456789@host1.com -SEQUENCE - :2 -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - ;PARTSTAT=ACCEPTED - :Mailto:A@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:B@example.com -SUMMARY - :Review Accounts -DTSTART - :19980315T180000Z -DTEND - :19980315T200000Z -DTSTAMP - :19980307T193000Z -LOCATION - :Conference Room A -STATUS - :CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD - :REQUEST -PRODID - :-//RDU Software//NONSGML HandCal//EN -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VEVENT -UID - :123456789@host1.com -SEQUENCE - :2 -RDATE - :19980304T180000Z -RDATE - :19980311T160000Z -RDATE - :19980315T180000Z -X-LIC-ERROR - ;X-LIC-ERRORTYPE=COMPONENT_PARSE_ERROR - :Got a data line\, but could not find a property name or component - begin tag: 'Error! Bookmark not defined.' -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - ;PARTSTAT=ACCEPTED - :Mailto:A@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:B@example.com -SUMMARY - :Review Accounts -DTSTART - :19980304T180000Z -DTEND - :19980304T200000Z -DTSTAMP - :19980303T193000Z -LOCATION - :Conference Room A -STATUS - :CONFIRMED -END:VEVENT -BEGIN:VEVENT -X-LIC-ERROR - ;X-LIC-ERRORTYPE=COMPONENT_PARSE_ERROR - :Got a data line\, but could not find a property name or component - begin tag: 'Error! Bookmark not defined.' -SEQUENCE - :2 -RECURRENCE-ID - :19980311T160000Z -X-LIC-ERROR - ;X-LIC-ERRORTYPE=COMPONENT_PARSE_ERROR - :Got a data line\, but could not find a property name or component - begin tag: 'Error! Bookmark not defined.' -ATTENDEE - :ROLE=CHAIR;Error! Bookmark not defined. -ATTENDEE - :Error! Bookmark not defined. -SUMMARY - :Review Accounts -DTSTART - :19980311T160000Z -DTEND - :19980304T180000Z -DTSTAMP - :19980306T193000Z -LOCATION - :The Small conference room -STATUS - :CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD - :COUNTER -PRODID - :-//RDU Software//NONSGML HandCal//EN -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VEVENT -UID - :guid-1@host1.com -RECURRENCE-ID - :19970715T210000Z -SEQUENCE - :4 -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - ;RSVP=TRUE - :Mailto:A@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:B@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:C@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:D@example.com -DESCRIPTION - :IETF-C&S Conference Call -CLASS - :PUBLIC -SUMMARY - :IETF Calendaring Working Group Meeting -DTSTART - :19970715T220000Z -DTEND - :19970715T230000Z -LOCATION - :Conference Call -COMMENT - :May we bump this by an hour? I have a conflict -DTSTAMP - :19970629T094000Z -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD - :REQUEST -PRODID - :-//RDU Software//NONSGML HandCal//EN -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VEVENT -UID - :guid-1@host1.com -SEQUENCE - :0 -X-LIC-ERROR - ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR - :Can't parse as RECUR value in RRULE property. Removing entire property: - 'FREQ=MONTHLY\;BYMONTHDAY=1' -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - :Mailto:A@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:B@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:C@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:D@example.com -DESCRIPTION - :IETF-C&S Conference Call -CLASS - :PUBLIC -SUMMARY - :IETF Calendaring Working Group Meeting -DTSTART - :19970601T210000Z -DTEND - :19970601T220000Z -DTSTAMP - :19970602T094000Z -LOCATION - :Conference Call -STATUS - :CONFIRMED -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PROPERTY_PARSE_ERROR - :Parse error in property name: 'FOO' -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID - :-//RDU Software//NONSGML HandCal//EN -METHOD - :REPLY -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VEVENT -ORGANIZER - :Mailto:A@example.com -ATTENDEE - :Mailto:B@example.com -REQUEST-STATUS - :2.8\;Repeating event ignored. Scheduled as a single event\;RRULE -REQUEST-STATUS - :3.0\;Invalid Property Name\;FOO -UID - :guid-1@host1.com -SEQUENCE - :0 -DTSTAMP - :19970603T094000Z -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID - :-//ACME/DesktopCalendar//EN -METHOD - :REQUEST -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VTODO -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - :Mailto:A@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:B@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:C@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:D@example.com -DTSTART - :19970701T170000Z -DUE - :19970722T170000Z -PRIORITY - :1 -SUMMARY - :Create the requirements document -UID - :calsrv.example.com-873970198738777-00@example.com -SEQUENCE - :0 -DTSTAMP - :19970717T200000Z -STATUS - :Needs Action -END:VTODO -END:VCALENDAR -BEGIN:VCALENDAR -PRODID - :-//ACME/DesktopCalendar//EN -METHOD - :REPLY -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VTODO -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;PARTSTAT=ACCEPTED - :Mailto:B@example.com -UID - :calsrv.example.com-873970198738777-00@example.com -COMMENT - :I'll send you my input by e-mail -SEQUENCE - :0 -DTSTAMP - :19970717T203000Z -REQUEST-STATUS - :2.0\;Success -END:VTODO -END:VCALENDAR -BEGIN:VCALENDAR -PRODID - :-//ACME/DesktopCalendar//EN -METHOD - :REQUEST -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VTODO -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - :Mailto:A@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:B@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -ATTENDEE - ;RSVP=TRUE - :Mailto:D@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -UID - :calsrv.example.com-873970198738777-00@example.com -SUMMARY - :Create the requirements document -PRIORITY - :1 -SEQUENCE - :0 -STATUS - :IN-PROCESS -DTSTART - :19970701T170000Z -DTSTAMP - :19970717T230000Z -END:VTODO -END:VCALENDAR -BEGIN:VCALENDAR -PRODID - :-//ACME/DesktopCalendar//EN -METHOD - :REPLY -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VTODO -ORGANIZER - :MAILTO:A@example.com -ATTENDEE - ;PARTSTAT=IN-PROCESS - :Mailto:B@example.com -PERCENT-COMPLETE - :75 -UID - :calsrv.example.com-873970198738777-00@example.com -DTSTAMP - :19970717T233000Z -SEQUENCE - :0 -END:VTODO -END:VCALENDAR -BEGIN:VCALENDAR -PRODID - :-//ACME/DesktopCalendar//EN -METHOD - :REPLY -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VTODO -ORGANIZER - :MAILTO:A@example.com -ATTENDEE - ;PARTSTAT=COMPLETED - :Mailto:D@example.com -UID - :calsrv.example.com-873970198738777-00@example.com -DTSTAMP - :19970717T233000Z -SEQUENCE - :0 -END:VTODO -END:VCALENDAR -BEGIN:VCALENDAR -PRODID - :-//ACME/DesktopCalendar//EN -METHOD - :REQUEST -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VTODO -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - ;PARTSTAT=ACCEPTED - :Mailto:A@example.com -ATTENDEE - ;PARTSTAT=ACCEPTED - :Mailto:B@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -ATTENDEE - ;PARTSTAT=IN-PROCESS - :Mailto:D@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -DTSTART - :19970701T170000Z -DUE - :19970722T170000Z -PRIORITY - :1 -SUMMARY - :Create the requirements document -UID - :calsrv.example.com-873970198738777-00@example.com -SEQUENCE - :1 -DTSTAMP - :19970718T100000Z -STATUS - :IN-PROGRESS -PERCENT-COMPLETE - :40 -END:VTODO -END:VCALENDAR -BEGIN:VCALENDAR -PRODID - :-//ACME/DesktopCalendar//EN -METHOD - :REQUEST -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VTODO -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - :Mailto:A@example.com -ATTENDEE - ;RSVP=TRUE - :Mailto:B@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -ATTENDEE - ;RSVP=TRUE - :Mailto:D@example.com -X-LIC-ERROR - ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR - :Can't parse parameter name: 'TYPE=INDIVIDUAL' -X-LIC-ERROR - ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR - :Can't parse as RECUR value in RRULE property. Removing entire property: - 'FREQ=MONTHLY\;COUNT=10\;BYDAY=1FR' -X-LIC-ERROR - ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR - :Can't parse as DATE-TIME value in DTSTART property. Removing entire - property: '19980101T100000-0700' -X-LIC-ERROR - ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR - :Can't parse as DATE-TIME value in DUE property. Removing entire property: - '19980103T100000-0700' -SUMMARY - :Send Status Reports to Area Managers -UID - :calsrv.example.com-873970198738777-00@example.com -SEQUENCE - :0 -DTSTAMP - :19970717T200000Z -STATUS - :NEEDS ACTION -PRIORITY - :1 -END:VTODO -END:VCALENDAR -BEGIN:VCALENDAR -PRODID - :-//ACME/DesktopCalendar//EN -METHOD - :REPLY -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VTODO -ATTENDEE - ;PARTSTAT=IN-PROCESS - :Mailto:B@example.com -PERCENT-COMPLETE - :75 -UID - :calsrv.example.com-873970198738777-00@example.com -DTSTAMP - :19970717T233000Z -RECURRENCE-ID - :19980101T170000Z -SEQUENCE - :1 -END:VTODO -END:VCALENDAR -BEGIN:VCALENDAR -METHOD - :PUBLISH -PRODID - :-//ACME/DesktopCalendar//EN -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VJOURNAL -DTSTART - :19971002T200000Z -ORGANIZER - :MAILTO:A@Example.com -SUMMARY - :Phone conference minutes -DESCRIPTION - :The editors meeting was held on October 1 -DESCRIPTION - : 1997. Details are in the attached document. -UID - :0981234-1234234-2410@example.com -RELATED-TO - :0981234-1234234-2402-35@example.com -ATTACH - :ftp://ftp.example.com/pub/ed/minutes100197.txt -END:VJOURNAL -END:VCALENDAR -BEGIN:VCALENDAR -PRODID - :-//RDU Software//NONSGML HandCal//EN -METHOD - :REFRESH -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VEVENT -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - ;PARTSTAT=ACCEPTED - :Mailto:A@example.com -ATTENDEE - :Mailto:B@example.com -ATTENDEE - :Mailto:C@example.com -ATTENDEE - :Mailto:D@example.com -UID - : guid-1-12345@host1.com -DTSTAMP - :19970603T094000 -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD - :REQUEST -PRODID - :-//RDU Software//NONSGML HandCal//EN -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VEVENT -UID - :acme-12345@host1.com -SEQUENCE - :3 -X-LIC-ERROR - ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR - :Can't parse as RECUR value in RRULE property. Removing entire property: - 'FREQ=WEEKLY' -RDATE - ;VALUE=PERIOD - :19970819T210000Z/19970081T220000Z -ORGANIZER - :Mailto:A@example.com -ATTENDEE - ;ROLE=CHAIR - ;PARTSTAT=ACCEPTED - :Mailto:A@example.com -ATTENDEE - :Mailto:B@example.com -DESCRIPTION - :IETF-C&S Conference Call -SUMMARY - :IETF Calendaring Working Group Meeting -DTSTART - :19970801T210000Z -DTEND - :19970801T220000Z -RECURRENCE-ID - :19970809T210000Z -DTSTAMP - :19970726T083000 -STATUS - :CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID - :-//RDU Software//NONSGML HandCal//EN -METHOD - :REFRESH -VERSION - :2.0 -X-LIC-SENDER - :eric@busboom.org -BEGIN:VEVENT -ORGANIZER - :Mailto:A@example.com -ATTENDEE - :Mailto:B@example.com -UID - :acme-12345@host1.com -DTSTAMP - :19970603T094000 -END:VEVENT -END:VCALENDAR -END:VCALENDAR diff --git a/libical/src/test/copycluster.c b/libical/src/test/copycluster.c deleted file mode 100644 index b059130c13..0000000000 --- a/libical/src/test/copycluster.c +++ /dev/null @@ -1,113 +0,0 @@ -/* -*- Mode: C -*- - ====================================================================== - FILE: copycluster.c - CREATOR: eric 15 January 2000 - - $Id$ - $Locker$ - - (C) COPYRIGHT 2000 Eric Busboom - http://www.softwarestudio.org - - The contents of this file are subject to the Mozilla Public License - Version 1.0 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and - limitations under the License. - - The Original Code is eric. The Initial Developer of the Original - Code is Eric Busboom - - - ======================================================================*/ - -#include /* for printf */ -#include "ical.h" -#include "icalcluster.h" -#include -#include /* For strerror */ -#include "icalrestriction.h" - -/* This program copies a file that holds iCal components to an other file. */ - - -void usage(char* arg0) { - printf("usage: %s cluster-file1 cluster-file2\n",arg0); -} - -int main(int c, char *argv[]){ - - icalcluster *clusterin, *clusterout; - icalcomponent *itr; - int count=0; - int tostdout = 0; - - if(c < 2 || c > 3){ - usage(argv[0]); - exit(1); - } - - if (c == 2){ - tostdout = 1; - } - - clusterin = icalcluster_new(argv[1]); - - if (clusterin == 0){ - printf("Could not open input cluster \"%s\"",argv[1]); - - exit(1); - } - - if (!tostdout){ - clusterout = icalcluster_new(argv[2]); - if (clusterout == 0){ - printf("Could not open output cluster \"%s\"\n",argv[2]); - exit(1); - } - } - - - for (itr = icalcluster_get_first_component(clusterin, - ICAL_ANY_COMPONENT); - itr != 0; - itr = icalcluster_get_next_component(clusterin, - ICAL_ANY_COMPONENT)){ - - icalrestriction_check(itr); - - if (itr != 0){ - - if(tostdout){ - - printf("--------------\n%s\n",icalcomponent_as_ical_string(itr)); - } else { - - icalcluster_add_component(clusterout, - icalcomponent_new_clone(itr)); - } - - count++; - - } else { - printf("Got NULL component"); - } - } - - - printf("Transfered %d components\n",count); - - icalcluster_free(clusterin); - - if (!tostdout){ - icalcluster_mark(clusterout); - icalcluster_free(clusterout); - } - - return 0; -} - diff --git a/libical/src/test/findobj.c b/libical/src/test/findobj.c deleted file mode 100644 index e7ec59169a..0000000000 --- a/libical/src/test/findobj.c +++ /dev/null @@ -1,71 +0,0 @@ -/* -*- Mode: C -*- - ====================================================================== - FILE: findobj.c - CREATOR: eric 11 February 2000 - - $Id$ - $Locker$ - - (C) COPYRIGHT 2000 Eric Busboom - http://www.softwarestudio.org - - The contents of this file are subject to the Mozilla Public License - Version 1.0 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and - limitations under the License. - - The Original Code is eric. The Initial Developer of the Original - Code is Eric Busboom - - - ======================================================================*/ - -#include /* for printf */ -#include "ical.h" -#include "icalcalendar.h" -#include -#include /* For strerror */ -#include "icalrestriction.h" - -/* This program finds an object stored in a calendar */ - -void usage(char* arg0) { - printf("usage: %s calendar-dir uid\n",arg0); -} - -int main(int c, char *argv[]){ - - icalcalendar *cal; - icalstore *booked; - icalcomponent *itr; - - if(c < 2 || c > 3){ - usage(argv[0]); - exit(1); - } - - cal = icalcalendar_new(argv[1]); - - if(cal == 0){ - fprintf(stderr,"%s: error in opening calendar \"%s\": %s. errno is \"%s\"\n", - argv[0],argv[1],icalerror_strerror(icalerrno), - strerror(errno)); - } - - booked = icalcalendar_get_booked(cal); - - itr = icalstore_fetch(booked,argv[2]); - - - if(itr != 0){ - printf("%s",icalcomponent_as_ical_string(itr)); - } - - return 0; -} - diff --git a/libical/src/test/icaltestparser.c b/libical/src/test/icaltestparser.c deleted file mode 100644 index 3f07fcd044..0000000000 --- a/libical/src/test/icaltestparser.c +++ /dev/null @@ -1,123 +0,0 @@ -/* -*- Mode: C -*- - ====================================================================== - FILE: icaltestparser.c - CREATOR: eric 20 June 1999 - - $Id$ - $Locker$ - - The contents of this file are subject to the Mozilla Public License - Version 1.0 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and - limitations under the License. - - The original author is Eric Busboom - The original code is icaltestparser.c - - - (C) COPYRIGHT 1999 The Software Studio. - http://www.softwarestudio.org - - ======================================================================*/ - -#include -#include -#include -#include -#include "ical.h" - -#include - -char str[] = "BEGIN:VCALENDAR\ -PRODID:\"-//RDU Software//NONSGML HandCal//EN\"\ -VERSION:2.0\ -BEGIN:VTIMEZONE\ -TZID:US-Eastern\ -BEGIN:STANDARD\ -DTSTART:19990404T020000\ -RDATE:19990u404xT020000\ -TZOFFSETFROM:-0500\ -TZOFFSETTO:-0400\ -END:STANDARD\ -BEGIN:DAYLIGHT\ -DTSTART:19990404T020000\ -RDATE:19990404T020000\ -TZOFFSETFROM:-0500\ -TZOFFSETTO:-0400\ -TZNAME:EDT\ -Dkjhgri:derhvnv;\ -BEGIN:dfkjh\ -END:dfdfkjh\ -END:DAYLIGHT\ -END:VTIMEZONE\ -BEGIN:VEVENT\ -GEO:Bongo\ -DTSTAMP:19980309T231000Z\ -UID:guid-1.host1.com\ -ORGANIZER;ROLE=CHAIR:MAILTO:mrbig@host.com\ -ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=GROUP\ - :MAILTO:employee-A@host.com\ -DESCRIPTION:Project XYZ Review Meeting\ -CATEGORIES:MEETING\ -CLASS:PUBLIC\ -CREATED:19980309T130000Z\ -SUMMARY:XYZ Project Review\ -DTSTART;TZID=US-Eastern:19980312T083000\ -DTEND;TZID=US-Eastern:19980312T093000\ -LOCATION:1CP Conference Room 4350\ -END:VEVENT\ -END:VCALENDAR\ -"; - -extern int yydebug; - -/* Have the parser fetch data from stdin */ - -char* read_stream(char *s, size_t size, void *d) -{ - char *c = fgets(s,size, (FILE*)d); - - return c; - -} - - - -int main(int argc, char* argv[]) -{ - - int lineno = 0; - char* line; - FILE* stream; - icalcomponent *c; - icalparser *parser = icalparser_new(); - - stream = fopen(argv[1],"r"); - - assert(stream != 0); - - icalparser_set_gen_data(parser,stream); - - do{ - - line = icalparser_get_line(parser,read_stream); - - c = icalparser_add_line(parser,line); - - if (c != 0){ - icalcomponent_convert_errors(c); - printf("%s",icalcomponent_as_ical_string(c)); - icalparser_claim(parser); - printf("\n---------------\n"); - icalcomponent_free(c); - } - - } while ( line != 0); - - -} diff --git a/libical/src/test/regression.c b/libical/src/test/regression.c deleted file mode 100644 index 7b1606d432..0000000000 --- a/libical/src/test/regression.c +++ /dev/null @@ -1,1334 +0,0 @@ -/* -*- Mode: C -*- - ====================================================================== - FILE: usecases.c - CREATOR: eric 03 April 1999 - - DESCRIPTION: - - $Id$ - $Locker$ - - (C) COPYRIGHT 1999 Eric Busboom - http://www.softwarestudio.org - - The contents of this file are subject to the Mozilla Public License - Version 1.0 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and - limitations under the License. - - The original author is Eric Busboom - The original code is usecases.c - - - ======================================================================*/ - -#include "ical.h" -#include -#include /* for strdup */ -#include /* for malloc */ -#include /* for printf */ -#include /* for time() */ -#include "icalmemory.h" -#include "icalstore.h" -#include "icalcluster.h" -#include "icalerror.h" -#include "icalrestriction.h" -#include "icalcalendar.h" - -/* This example creates and minipulates the ical object that appears - * in rfc 2445, page 137 */ - -char str[] = "BEGIN:VCALENDAR\ -PRODID:\"-//RDU Software//NONSGML HandCal//EN\"\ -VERSION:2.0\ -BEGIN:VTIMEZONE\ -TZID:US-Eastern\ -BEGIN:STANDARD\ -DTSTART:19981025T020000\ -RDATE:19981025T020000\ -TZOFFSETFROM:-0400\ -TZOFFSETTO:-0500\ -TZNAME:EST\ -END:STANDARD\ -BEGIN:DAYLIGHT\ -DTSTART:19990404T020000\ -RDATE:19990404T020000\ -TZOFFSETFROM:-0500\ -TZOFFSETTO:-0400\ -TZNAME:EDT\ -END:DAYLIGHT\ -END:VTIMEZONE\ -BEGIN:VEVENT\ -DTSTAMP:19980309T231000Z\ -UID:guid-1.host1.com\ -ORGANIZER;ROLE=CHAIR:MAILTO:mrbig@host.com\ -ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=GROUP:MAILTO:employee-A@host.com\ -DESCRIPTION:Project XYZ Review Meeting\ -CATEGORIES:MEETING\ -CLASS:PUBLIC\ -CREATED:19980309T130000Z\ -SUMMARY:XYZ Project Review\ -DTSTART;TZID=US-Eastern:19980312T083000\ -DTEND;TZID=US-Eastern:19980312T093000\ -LOCATION:1CP Conference Room 4350\ -END:VEVENT\ -BEGIN:BOOGA\ -DTSTAMP:19980309T231000Z\ -X-LIC-FOO:Booga\ -DTSTOMP:19980309T231000Z\ -UID:guid-1.host1.com\ -END:BOOGA\ -END:VCALENDAR"; - - -icalcomponent* create_simple_component() -{ - - icalcomponent* calendar; - struct icalperiodtype rtime; - - rtime.start = icaltimetype_from_timet( time(0),0); - rtime.end = icaltimetype_from_timet( time(0),0); - - rtime.end.hour++; - - - - /* Create calendar and add properties */ - calendar = icalcomponent_new(ICAL_VCALENDAR_COMPONENT); - - - icalcomponent_add_property( - calendar, - icalproperty_new_version("2.0") - ); - - printf("%s\n",icalcomponent_as_ical_string(calendar)); - - return calendar; - -} - -/* Create a new component */ -icalcomponent* create_new_component() -{ - - icalcomponent* calendar; - icalcomponent* timezone; - icalcomponent* tzc; - icalcomponent* event; - struct icaltimetype atime = icaltimetype_from_timet( time(0),0); - struct icalperiodtype rtime; - icalproperty* property; - - rtime.start = icaltimetype_from_timet( time(0),0); - rtime.end = icaltimetype_from_timet( time(0),0); - - rtime.end.hour++; - - - - /* Create calendar and add properties */ - calendar = icalcomponent_new(ICAL_VCALENDAR_COMPONENT); - - - icalcomponent_add_property( - calendar, - icalproperty_new_version("2.0") - ); - - icalcomponent_add_property( - calendar, - icalproperty_new_prodid("-//RDU Software//NONSGML HandCal//EN") - ); - - /* Create a timezone object and add it to the calendar */ - - timezone = icalcomponent_new(ICAL_VTIMEZONE_COMPONENT); - - icalcomponent_add_property( - timezone, - icalproperty_new_tzid("US_Eastern") - ); - - /* Add a sub-component of the timezone */ - tzc = icalcomponent_new(ICAL_XDAYLIGHT_COMPONENT); - - icalcomponent_add_property( - tzc, - icalproperty_new_dtstart(atime) - ); - - icalcomponent_add_property( - tzc, - icalproperty_new_rdate(rtime) - ); - - icalcomponent_add_property( - tzc, - icalproperty_new_tzoffsetfrom(-4.0) - ); - - icalcomponent_add_property( - tzc, - icalproperty_new_tzoffsetto(-5.0) - ); - - icalcomponent_add_property( - tzc, - icalproperty_new_tzname("EST") - ); - - icalcomponent_add_component(timezone,tzc); - - icalcomponent_add_component(calendar,timezone); - - /* Add a second subcomponent */ - tzc = icalcomponent_new(ICAL_XSTANDARD_COMPONENT); - - icalcomponent_add_property( - tzc, - icalproperty_new_dtstart(atime) - ); - - icalcomponent_add_property( - tzc, - icalproperty_new_rdate(rtime) - ); - - icalcomponent_add_property( - tzc, - icalproperty_new_tzoffsetfrom(-4.0) - ); - - icalcomponent_add_property( - tzc, - icalproperty_new_tzoffsetto(-5.0) - ); - - icalcomponent_add_property( - tzc, - icalproperty_new_tzname("EST") - ); - - icalcomponent_add_component(timezone,tzc); - - /* Add an event */ - - event = icalcomponent_new(ICAL_VEVENT_COMPONENT); - - icalcomponent_add_property( - event, - icalproperty_new_dtstamp(atime) - ); - - icalcomponent_add_property( - event, - icalproperty_new_uid("guid-1.host1.com") - ); - - /* add a property that has parameters */ - property = icalproperty_new_organizer("mrbig@host.com"); - - icalproperty_add_parameter( - property, - icalparameter_new_role(ICAL_ROLE_CHAIR) - ); - - icalcomponent_add_property(event,property); - - /* add another property that has parameters */ - property = icalproperty_new_attendee("employee-A@host.com"); - - icalproperty_add_parameter( - property, - icalparameter_new_role(ICAL_ROLE_REQPARTICIPANT) - ); - - icalproperty_add_parameter( - property, - icalparameter_new_rsvp(1) - ); - - icalproperty_add_parameter( - property, - icalparameter_new_cutype(ICAL_CUTYPE_GROUP) - ); - - icalcomponent_add_property(event,property); - - - /* more properties */ - - icalcomponent_add_property( - event, - icalproperty_new_description("Project XYZ Review Meeting") - ); - - icalcomponent_add_property( - event, - icalproperty_new_categories("MEETING") - ); - - icalcomponent_add_property( - event, - icalproperty_new_class("PUBLIC") - ); - - icalcomponent_add_property( - event, - icalproperty_new_created(atime) - ); - - icalcomponent_add_property( - event, - icalproperty_new_summary("XYZ Project Review") - ); - - - property = icalproperty_new_dtstart(atime); - - icalproperty_add_parameter( - property, - icalparameter_new_tzid("US-Eastern") - ); - - icalcomponent_add_property(event,property); - - - property = icalproperty_new_dtend(atime); - - icalproperty_add_parameter( - property, - icalparameter_new_tzid("US-Eastern") - ); - - icalcomponent_add_property(event,property); - - icalcomponent_add_property( - event, - icalproperty_new_location("1CP Conference Room 4350") - ); - - icalcomponent_add_component(calendar,event); - - printf("%s\n",icalcomponent_as_ical_string(calendar)); - - icalcomponent_free(calendar); - - return 0; -} - - -/* Create a new component, using the va_args list */ - -icalcomponent* create_new_component_with_va_args() -{ - - icalcomponent* calendar; - struct icaltimetype atime = icaltimetype_from_timet( time(0),0); - struct icalperiodtype rtime; - - rtime.start = icaltimetype_from_timet( time(0),0); - rtime.end = icaltimetype_from_timet( time(0),0); - - rtime.end.hour++; - - calendar = - icalcomponent_vanew( - ICAL_VCALENDAR_COMPONENT, - icalproperty_new_version("2.0"), - icalproperty_new_prodid("-//RDU Software//NONSGML HandCal//EN"), - icalcomponent_vanew( - ICAL_VTIMEZONE_COMPONENT, - icalproperty_new_tzid("US_Eastern"), - icalcomponent_vanew( - ICAL_XDAYLIGHT_COMPONENT, - icalproperty_new_dtstart(atime), - icalproperty_new_rdate(rtime), - icalproperty_new_tzoffsetfrom(-4.0), - icalproperty_new_tzoffsetto(-5.0), - icalproperty_new_tzname("EST"), - 0 - ), - icalcomponent_vanew( - ICAL_XSTANDARD_COMPONENT, - icalproperty_new_dtstart(atime), - icalproperty_new_rdate(rtime), - icalproperty_new_tzoffsetfrom(-5.0), - icalproperty_new_tzoffsetto(-4.0), - icalproperty_new_tzname("EST"), - 0 - ), - 0 - ), - icalcomponent_vanew( - ICAL_VEVENT_COMPONENT, - icalproperty_new_dtstamp(atime), - icalproperty_new_uid("guid-1.host1.com"), - icalproperty_vanew_organizer( - "mrbig@host.com", - icalparameter_new_role(ICAL_ROLE_CHAIR), - 0 - ), - icalproperty_vanew_attendee( - "employee-A@host.com", - icalparameter_new_role(ICAL_ROLE_REQPARTICIPANT), - icalparameter_new_rsvp(1), - icalparameter_new_cutype(ICAL_CUTYPE_GROUP), - 0 - ), - icalproperty_new_description("Project XYZ Review Meeting"), - icalproperty_new_categories("MEETING"), - icalproperty_new_class("PUBLIC"), - icalproperty_new_created(atime), - icalproperty_new_summary("XYZ Project Review"), - icalproperty_vanew_dtstart( - atime, - icalparameter_new_tzid("US-Eastern"), - 0 - ), - icalproperty_vanew_dtend( - atime, - icalparameter_new_tzid("US-Eastern"), - 0 - ), - icalproperty_new_location("1CP Conference Room 4350"), - 0 - ), - 0 - ); - - printf("%s\n",icalcomponent_as_ical_string(calendar)); - - - icalcomponent_free(calendar); - - return 0; -} - - -/* Return a list of all attendees who are required. */ - -char** get_required_attendees(icalproperty* event) -{ - icalproperty* p; - icalparameter* parameter; - - char **attendees; - int max = 10; - int c = 0; - - attendees = malloc(max * (sizeof (char *))); - - assert(event != 0); - assert(icalcomponent_isa(event) == ICAL_VEVENT_COMPONENT); - - for( - p = icalcomponent_get_first_property(event,ICAL_ATTENDEE_PROPERTY); - p != 0; - p = icalcomponent_get_next_property(event,ICAL_ATTENDEE_PROPERTY) - ) { - - parameter = icalproperty_get_first_parameter(p,ICAL_ROLE_PARAMETER); - - if ( icalparameter_get_role(parameter) == ICAL_ROLE_REQPARTICIPANT) - { - attendees[c++] = strdup(icalproperty_get_attendee(p)); - - if (c >= max) { - max *= 2; - attendees = realloc(attendees, max * (sizeof (char *))); - } - - } - } - - return attendees; -} - -/* If an attendee has a PARTSTAT of NEEDSACTION or has no PARTSTAT - parameter, change it to TENTATIVE. */ - -void update_attendees(icalproperty* event) -{ - icalproperty* p; - icalparameter* parameter; - - - assert(event != 0); - assert(icalcomponent_isa(event) == ICAL_VEVENT_COMPONENT); - - for( - p = icalcomponent_get_first_property(event,ICAL_ATTENDEE_PROPERTY); - p != 0; - p = icalcomponent_get_next_property(event,ICAL_ATTENDEE_PROPERTY) - ) { - - parameter = icalproperty_get_first_parameter(p,ICAL_PARTSTAT_PARAMETER); - - if (parameter == 0) { - - icalproperty_add_parameter( - p, - icalparameter_new_partstat(ICAL_PARTSTAT_TENTATIVE) - ); - - } else if (icalparameter_get_partstat(parameter) == ICAL_PARTSTAT_NEEDSACTION) { - - icalproperty_remove_parameter(p,ICAL_PARTSTAT_PARAMETER); - - icalparameter_free(parameter); - - icalproperty_add_parameter( - p, - icalparameter_new_partstat(ICAL_PARTSTAT_TENTATIVE) - ); - } - - } -} - - -void test_values() -{ - icalvalue *v; - icalvalue *copy; - - v = icalvalue_new_caladdress("cap://value/1"); - printf("caladdress 1: %s\n",icalvalue_get_caladdress(v)); - icalvalue_set_caladdress(v,"cap://value/2"); - printf("caladdress 2: %s\n",icalvalue_get_caladdress(v)); - printf("String: %s\n",icalvalue_as_ical_string(v)); - - copy = icalvalue_new_clone(v); - printf("Clone: %s\n",icalvalue_as_ical_string(v)); - icalvalue_free(v); - icalvalue_free(copy); - - - v = icalvalue_new_boolean(1); - printf("caladdress 1: %d\n",icalvalue_get_boolean(v)); - icalvalue_set_boolean(v,2); - printf("caladdress 2: %d\n",icalvalue_get_boolean(v)); - printf("String: %s\n",icalvalue_as_ical_string(v)); - - copy = icalvalue_new_clone(v); - printf("Clone: %s\n",icalvalue_as_ical_string(v)); - icalvalue_free(v); - icalvalue_free(copy); - - - v = icalvalue_new_date(icaltimetype_from_timet( time(0),0)); - printf("date 1: %s\n",icalvalue_as_ical_string(v)); - icalvalue_set_date(v,icaltimetype_from_timet( time(0)+3600,0)); - printf("date 2: %s\n",icalvalue_as_ical_string(v)); - - copy = icalvalue_new_clone(v); - printf("Clone: %s\n",icalvalue_as_ical_string(v)); - icalvalue_free(v); - icalvalue_free(copy); - - - v = icalvalue_new(-1); - - printf("Invalid type: %p\n",v); - - if (v!=0) icalvalue_free(v); - - - /* v = icalvalue_new_caladdress(0); - - printf("Bad string: %p\n",v); - - if (v!=0) icalvalue_free(v); */ - -} - -void test_properties() -{ - icalproperty *prop; - icalparameter *param; - - icalproperty *clone; - - prop = icalproperty_vanew_comment( - "Another Comment", - icalparameter_new_cn("A Common Name 1"), - icalparameter_new_cn("A Common Name 2"), - icalparameter_new_cn("A Common Name 3"), - icalparameter_new_cn("A Common Name 4"), - 0); - - for(param = icalproperty_get_first_parameter(prop,ICAL_ANY_PARAMETER); - param != 0; - param = icalproperty_get_next_parameter(prop,ICAL_ANY_PARAMETER)) { - - printf("Prop parameter: %s\n",icalparameter_get_cn(param)); - } - - printf("Prop value: %s\n",icalproperty_get_comment(prop)); - - - printf("As iCAL string:\n %s\n",icalproperty_as_ical_string(prop)); - - clone = icalproperty_new_clone(prop); - - printf("Clone:\n %s\n",icalproperty_as_ical_string(prop)); - - icalproperty_free(clone); - icalproperty_free(prop); - - prop = icalproperty_new(-1); - - printf("Invalid type: %p\n",prop); - - if (prop!=0) icalproperty_free(prop); - - /* - prop = icalproperty_new_method(0); - - printf("Bad string: %p\n",prop); - - - if (prop!=0) icalproperty_free(prop); - */ -} - -void test_parameters() -{ - icalparameter *p; - - p = icalparameter_new_cn("A Common Name"); - - printf("Common Name: %s\n",icalparameter_get_cn(p)); - - printf("As String: %s\n",icalparameter_as_ical_string(p)); - - icalparameter_free(p); -} - - -void test_components() -{ - - icalcomponent* c; - icalcomponent* child; - - c = icalcomponent_vanew( - ICAL_VCALENDAR_COMPONENT, - icalproperty_new_version("2.0"), - icalproperty_new_prodid("-//RDU Software//NONSGML HandCal//EN"), - icalproperty_vanew_comment( - "A Comment", - icalparameter_new_cn("A Common Name 1"), - 0), - icalcomponent_vanew( - ICAL_VEVENT_COMPONENT, - icalproperty_new_version("2.0"), - icalproperty_new_description("This is an event"), - icalproperty_vanew_comment( - "Another Comment", - icalparameter_new_cn("A Common Name 1"), - icalparameter_new_cn("A Common Name 2"), - icalparameter_new_cn("A Common Name 3"), - icalparameter_new_cn("A Common Name 4"), - 0), - icalproperty_vanew_xlicerror( - "This is only a test", - icalparameter_new_xlicerrortype(ICAL_XLICERRORTYPE_COMPONENTPARSEERROR), - 0), - - 0 - ), - 0 - ); - - printf("Original Component:\n%s\n\n",icalcomponent_as_ical_string(c)); - - child = icalcomponent_get_first_component(c,ICAL_VEVENT_COMPONENT); - - printf("Child Component:\n%s\n\n",icalcomponent_as_ical_string(child)); - - icalcomponent_free(c); - -} - -void test_memory() -{ - size_t bufsize = 256; - char *p; - - char S1[] = "1) When in the Course of human events, "; - char S2[] = "2) it becomes necessary for one people to dissolve the political bands which have connected them with another, "; - char S3[] = "3) and to assume among the powers of the earth, "; - char S4[] = "4) the separate and equal station to which the Laws of Nature and of Nature's God entitle them, "; - char S5[] = "5) a decent respect to the opinions of mankind requires that they "; - char S6[] = "6) should declare the causes which impel them to the separation. "; - char S7[] = "7) We hold these truths to be self-evident, "; - char S8[] = "8) that all men are created equal, "; - -/* char S9[] = "9) that they are endowed by their Creator with certain unalienable Rights, "; - char S10[] = "10) that among these are Life, Liberty, and the pursuit of Happiness. "; - char S11[] = "11) That to secure these rights, Governments are instituted among Men, "; - char S12[] = "12) deriving their just powers from the consent of the governed. "; -*/ - - - char *f, *b1, *b2, *b3, *b4, *b5, *b6, *b7, *b8; - - #define BUFSIZE 1024 - - - f = icalmemory_new_buffer(bufsize); - p = f; - b1 = icalmemory_tmp_buffer(BUFSIZE); - strcpy(b1, S1); - icalmemory_append_string(&f, &p, &bufsize, b1); - - b2 = icalmemory_tmp_buffer(BUFSIZE); - strcpy(b2, S2); - icalmemory_append_string(&f, &p, &bufsize, b2); - - b3 = icalmemory_tmp_buffer(BUFSIZE); - strcpy(b3, S3); - icalmemory_append_string(&f, &p, &bufsize, b3); - - b4 = icalmemory_tmp_buffer(BUFSIZE); - strcpy(b4, S4); - icalmemory_append_string(&f, &p, &bufsize, b4); - - b5 = icalmemory_tmp_buffer(BUFSIZE); - strcpy(b5, S5); - icalmemory_append_string(&f, &p, &bufsize, b5); - - b6 = icalmemory_tmp_buffer(BUFSIZE); - strcpy(b6, S6); - icalmemory_append_string(&f, &p, &bufsize, b6); - - b7 = icalmemory_tmp_buffer(BUFSIZE); - strcpy(b7, S7); - icalmemory_append_string(&f, &p, &bufsize, b7); - - b8 = icalmemory_tmp_buffer(BUFSIZE); - strcpy(b8, S8); - icalmemory_append_string(&f, &p, &bufsize, b8); - - - printf("1: %p %s \n",b1,b1); - printf("2: %p %s\n",b2,b2); - printf("3: %p %s\n",b3,b3); - printf("4: %p %s\n",b4,b4); - printf("5: %p %s\n",b5,b5); - printf("6: %p %s\n",b6,b6); - printf("7: %p %s\n",b7,b7); - printf("8: %p %s\n",b8,b8); - - - printf("Final: %s\n", f); - - printf("Final buffer size: %d\n",bufsize); - - free(f); - - bufsize = 4; - f = icalmemory_new_buffer(bufsize); - p = f; - - icalmemory_append_char(&f, &p, &bufsize, 'a'); - icalmemory_append_char(&f, &p, &bufsize, 'b'); - icalmemory_append_char(&f, &p, &bufsize, 'c'); - icalmemory_append_char(&f, &p, &bufsize, 'd'); - icalmemory_append_char(&f, &p, &bufsize, 'e'); - icalmemory_append_char(&f, &p, &bufsize, 'f'); - icalmemory_append_char(&f, &p, &bufsize, 'g'); - icalmemory_append_char(&f, &p, &bufsize, 'h'); - icalmemory_append_char(&f, &p, &bufsize, 'i'); - icalmemory_append_char(&f, &p, &bufsize, 'j'); - icalmemory_append_char(&f, &p, &bufsize, 'a'); - icalmemory_append_char(&f, &p, &bufsize, 'b'); - icalmemory_append_char(&f, &p, &bufsize, 'c'); - icalmemory_append_char(&f, &p, &bufsize, 'd'); - icalmemory_append_char(&f, &p, &bufsize, 'e'); - icalmemory_append_char(&f, &p, &bufsize, 'f'); - icalmemory_append_char(&f, &p, &bufsize, 'g'); - icalmemory_append_char(&f, &p, &bufsize, 'h'); - icalmemory_append_char(&f, &p, &bufsize, 'i'); - icalmemory_append_char(&f, &p, &bufsize, 'j'); - - printf("Char-by-Char buffer: %s\n", f); - -} - - -int test_store() -{ - - icalcomponent *c, *gauge; - icalerrorenum error; - icalcomponent *next, *itr; - icalcluster* cluster; - struct icalperiodtype rtime; - icalstore *s = icalstore_new("store"); - int i; - - rtime.start = icaltimetype_from_timet( time(0),0); - - cluster = icalcluster_new("clusterin.vcd"); - - if (cluster == 0){ - printf("Failed to create cluster: %s\n",icalerror_strerror(icalerrno)); - return 0; - } - -#define NUMCOMP 4 - - /* Duplicate every component in the cluster NUMCOMP times */ - - icalerror_clear_errno(); - - for (i = 1; i 5 */ - - assert(icalrestriction_get_property_restriction( - ICAL_METHOD_PUBLISH, - ICAL_VEVENT_COMPONENT, - ICAL_ATTACH_PROPERTY)==3); /* ZEROPLUS -> 3 */ - - assert(icalrestriction_get_property_restriction( - ICAL_METHOD_DECLINECOUNTER, - ICAL_VEVENT_COMPONENT, - ICAL_SEQUENCE_PROPERTY)==1); /* ZERO -> 1 */ - - /* Component restrictions */ - assert(icalrestriction_get_component_restriction( - ICAL_METHOD_PUBLISH, - ICAL_VJOURNAL_COMPONENT, - ICAL_X_COMPONENT) == 3); /* ZEROPLUS */ - - assert(icalrestriction_get_component_restriction( - ICAL_METHOD_CANCEL, - ICAL_VJOURNAL_COMPONENT, - ICAL_VEVENT_COMPONENT) == 1); /* ZERO */ - - comp = - icalcomponent_vanew( - ICAL_VCALENDAR_COMPONENT, - icalproperty_new_version("2.0"), - icalproperty_new_prodid("-//RDU Software//NONSGML HandCal//EN"), - icalproperty_new_method(ICAL_METHOD_REQUEST), - icalcomponent_vanew( - ICAL_VTIMEZONE_COMPONENT, - icalproperty_new_tzid("US_Eastern"), - icalcomponent_vanew( - ICAL_XDAYLIGHT_COMPONENT, - icalproperty_new_dtstart(atime), - icalproperty_new_rdate(rtime), - icalproperty_new_tzoffsetfrom(-4.0), - icalproperty_new_tzoffsetto(-5.0), - icalproperty_new_tzname("EST"), - 0 - ), - icalcomponent_vanew( - ICAL_XSTANDARD_COMPONENT, - icalproperty_new_dtstart(atime), - icalproperty_new_rdate(rtime), - icalproperty_new_tzoffsetfrom(-5.0), - icalproperty_new_tzoffsetto(-4.0), - icalproperty_new_tzname("EST"), - 0 - ), - 0 - ), - icalcomponent_vanew( - ICAL_VEVENT_COMPONENT, - icalproperty_new_dtstamp(atime), - icalproperty_new_uid("guid-1.host1.com"), - icalproperty_vanew_organizer( - "mrbig@host.com", - icalparameter_new_role(ICAL_ROLE_CHAIR), - 0 - ), - icalproperty_vanew_attendee( - "employee-A@host.com", - icalparameter_new_role(ICAL_ROLE_REQPARTICIPANT), - icalparameter_new_rsvp(1), - icalparameter_new_cutype(ICAL_CUTYPE_GROUP), - 0 - ), - icalproperty_new_description("Project XYZ Review Meeting"), - icalproperty_new_categories("MEETING"), - icalproperty_new_class("PUBLIC"), - icalproperty_new_created(atime), - icalproperty_new_summary("XYZ Project Review"), -/* icalproperty_vanew_dtstart( - atime, - icalparameter_new_tzid("US-Eastern"), - 0 - ),*/ - icalproperty_vanew_dtend( - atime, - icalparameter_new_tzid("US-Eastern"), - 0 - ), - icalproperty_new_location("1CP Conference Room 4350"), - 0 - ), - 0 - ); - - valid = icalrestriction_check(comp); - - printf("#### %d ####\n%s\n",valid, icalcomponent_as_ical_string(comp)); - -} - -void test_calendar() -{ - icalcomponent *comp; - icalcluster *c; - icalstore *s; - icalcalendar* calendar = icalcalendar_new("calendar"); - icalerrorenum error; - struct icaltimetype atime = icaltimetype_from_timet( time(0),0); - - comp = icalcomponent_vanew( - ICAL_VEVENT_COMPONENT, - icalproperty_new_version("2.0"), - icalproperty_new_description("This is an event"), - icalproperty_new_dtstart(atime), - icalproperty_vanew_comment( - "Another Comment", - icalparameter_new_cn("A Common Name 1"), - icalparameter_new_cn("A Common Name 2"), - icalparameter_new_cn("A Common Name 3"), - icalparameter_new_cn("A Common Name 4"), - 0), - icalproperty_vanew_xlicerror( - "This is only a test", - icalparameter_new_xlicerrortype(ICAL_XLICERRORTYPE_COMPONENTPARSEERROR), - 0), - - 0); - - - s = icalcalendar_get_booked(calendar); - - error = icalstore_add_component(s,comp); - - assert(error == ICAL_NO_ERROR); - - c = icalcalendar_get_properties(calendar); - - error = icalcluster_add_component(c,icalcomponent_new_clone(comp)); - - assert(error == ICAL_NO_ERROR); - - icalcalendar_free(calendar); - -} - -void test_recur() -{ - icalvalue *v; - - v = icalvalue_new_from_string(ICAL_RECUR_VALUE, - "FREQ=DAILY;COUNT=5;BYDAY=MO,TU,WE,TH,FR"); - - printf("%s\n",icalvalue_as_ical_string(v)); - - v = icalvalue_new_from_string(ICAL_RECUR_VALUE, - "FREQ=YEARLY;UNTIL=123456T123456;BYSETPOS=-1,2"); - - printf("%s\n",icalvalue_as_ical_string(v)); - - v = icalvalue_new_from_string(ICAL_RECUR_VALUE, - "FREQ=YEARLY;UNTIL=123456T123456;INTERVAL=2;BYMONTH=1;BYDAY=SU;BYHOUR=8,9;BYMINUTE=30"); - - printf("%s\n",icalvalue_as_ical_string(v)); - - v = icalvalue_new_from_string(ICAL_RECUR_VALUE, - "FREQ=MONTHLY;BYDAY=-1MO,TU,WE,TH,FR"); - - printf("%s\n",icalvalue_as_ical_string(v)); - - v = icalvalue_new_from_string(ICAL_RECUR_VALUE, - "FREQ=WEEKLY;INTERVAL=20;WKST=SU;BYDAY=TU"); - - printf("%s\n",icalvalue_as_ical_string(v)); - -} - -void test_duration() -{ - - icalvalue *v; - - v = icalvalue_new_from_string(ICAL_DURATION_VALUE, - "PT8H30M"); - - printf("%s\n",icalvalue_as_ical_string(v)); - - icalvalue_free(v); - v = icalvalue_new_from_string(ICAL_PERIOD_VALUE, - "19971015T050000Z/PT8H30M"); - - printf("%s\n",icalvalue_as_ical_string(v)); - - icalvalue_free(v); - v = icalvalue_new_from_string(ICAL_PERIOD_VALUE, - "19971015T050000Z/19971015T060000Z"); - - printf("%s\n",icalvalue_as_ical_string(v)); - icalvalue_free(v); - - -} - - -void test_strings(){ - - icalvalue *v; - - v = icalvalue_new_text("foo;bar;bats"); - - printf("%s\n",icalvalue_as_ical_string(v)); - - icalvalue_free(v); - - v = icalvalue_new_text("foo\\;b\nar\\;ba\tts"); - - printf("%s\n",icalvalue_as_ical_string(v)); - - icalvalue_free(v); - - -} - -void test_requeststat() -{ - icalrequeststatus s; - struct icalreqstattype st, st2; - char temp[1024]; - - s = icalenum_num_to_reqstat(2,1); - - assert(s == ICAL_2_1_FALLBACK_STATUS); - - assert(icalenum_reqstat_major(s) == 2); - assert(icalenum_reqstat_minor(s) == 1); - - printf("2.1: %s\n",icalenum_reqstat_desc(s)); - - st.code = s; - st.debug = "booga"; - st.desc = 0; - - printf("%s\n",icalreqstattype_as_string(st)); - - st.desc = " A non-standard description"; - - printf("%s\n",icalreqstattype_as_string(st)); - - - st.desc = 0; - - sprintf(temp,"%s\n",icalreqstattype_as_string(st)); - - - st2 = icalreqstattype_from_string("2.1;Success but fallback taken on one or more property values.;booga"); - - printf("%d -- %d -- %s -- %s\n",icalenum_reqstat_major(st2.code), - icalenum_reqstat_minor(st2.code), - icalenum_reqstat_desc(st2.code), - st2.debug); - - st2 = icalreqstattype_from_string("2.1;Success but fallback taken on one or more property values.;booga"); - printf("%s\n",icalreqstattype_as_string(st2)); - - st2 = icalreqstattype_from_string("2.1;Success but fallback taken on one or more property values.;"); - printf("%s\n",icalreqstattype_as_string(st2)); - - st2 = icalreqstattype_from_string("2.1;Success but fallback taken on one or more property values."); - printf("%s\n",icalreqstattype_as_string(st2)); - - st2 = icalreqstattype_from_string("2.1;"); - printf("%s\n",icalreqstattype_as_string(st2)); - - st2 = icalreqstattype_from_string("2.1"); - printf("%s\n",icalreqstattype_as_string(st2)); - - st2 = icalreqstattype_from_string("16.4"); - assert(st2.code == ICAL_UNKNOWN_STATUS); - - st2 = icalreqstattype_from_string("1."); - assert(st2.code == ICAL_UNKNOWN_STATUS); - -} - - -int main(int argc, char *argv[]) -{ - - - printf("\n------------Test Restriction---------------\n"); - test_restriction(); - - exit(0); - - printf("\n------------Test request status-------\n"); - test_requeststat(); - - - printf("\n------------Test strings---------------\n"); - test_strings(); - - printf("\n------------Test recur---------------\n"); - test_recur(); - - printf("\n------------Test duration---------------\n"); - test_duration(); - - printf("\n------------Test Compare---------------\n"); - test_compare(); - - printf("\n------------Test Memory---------------\n"); - test_memory(); - - printf("\n------------Test Values---------------\n"); - test_values(); - - printf("\n------------Test Parameters-----------\n"); - test_parameters(); - - printf("\n------------Test Properties-----------\n"); - test_properties(); - - printf("\n------------Test Components ----------\n"); - test_components(); - - printf("\n------------Create Components --------\n"); - create_new_component(); - - printf("\n----- Create Components with vaargs ---\n"); - create_new_component_with_va_args(); - - - - - return 0; -} - - - diff --git a/libical/src/test/storage.c b/libical/src/test/storage.c deleted file mode 100644 index f6d0dd69e5..0000000000 --- a/libical/src/test/storage.c +++ /dev/null @@ -1,460 +0,0 @@ -/* -*- Mode: C -*- - ====================================================================== - FILE: usecases.c - CREATOR: eric 03 April 1999 - - DESCRIPTION: - - $Id$ - $Locker$ - - (C) COPYRIGHT 1999 Eric Busboom - http://www.softwarestudio.org - - The contents of this file are subject to the Mozilla Public License - Version 1.0 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and - limitations under the License. - - The original author is Eric Busboom - The original code is usecases.c - - - ======================================================================*/ - -#include "ical.h" -#include -#include /* for strdup */ -#include /* for malloc */ -#include /* for printf */ -#include /* for time() */ -#include "icalmemory.h" -#include "icalstore.h" -#include "icalcluster.h" -#include "icalerror.h" -#include "icalrestriction.h" -#include "icalcalendar.h" - -/* This example creates and minipulates the ical object that appears - * in rfc 2445, page 137 */ - -char str[] = "BEGIN:VCALENDAR\n\ -PRODID:\"-//RDU Software//NONSGML HandCal//EN\"\n\ -VERSION:2.0\n\ -BEGIN:VTIMEZONE\n\ -TZID:US-Eastern\n\ -BEGIN:STANDARD\n\ -DTSTART:19981025T020000\n\ -RDATE:19981025T020000\n\ -TZOFFSETFROM:-0400\n\ -TZOFFSETTO:-0500\n\ -TZNAME:EST\n\ -END:STANDARD\n\ -BEGIN:DAYLIGHT\n\ -DTSTART:19990404T020000\n\ -RDATE:19990404T020000\n\ -TZOFFSETFROM:-0500\n\ -TZOFFSETTO:-0400\n\ -TZNAME:EDT\n\ -END:DAYLIGHT\n\ -END:VTIMEZONE\n\ -BEGIN:VEVENT\n\ -DTSTAMP:19980309T231000Z\n\ -UID:guid-1.host1.com\n\ -ORGANIZER;ROLE=CHAIR:MAILTO:mrbig@host.com\n\ -ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=GROUP:MAILTO:employee-A@host.com\n\ -DESCRIPTION:Project XYZ Review Meeting\n\ -CATEGORIES:MEETING\n\ -CLASS:PUBLIC\n\ -CREATED:19980309T130000Z\n\ -SUMMARY:XYZ Project Review\n\ -DTSTART;TZID=US-Eastern:19980312T083000\n\ -DTEND;TZID=US-Eastern:19980312T093000\n\ -LOCATION:1CP Conference Room 4350\n\ -END:VEVENT\n\ -BEGIN:BOOGA\n\ -DTSTAMP:19980309T231000Z\n\ -X-LIC-FOO:Booga\n\ -DTSTOMP:19980309T231000Z\n\ -UID:guid-1.host1.com\n\ -END:BOOGA\n\ -END:VCALENDAR"; - -char str2[] = "BEGIN:VCALENDAR\n\ -PRODID:\"-//RDU Software//NONSGML HandCal//EN\"\n\ -VERSION:2.0\n\ -BEGIN:VEVENT\n\ -DTSTAMP:19980309T231000Z\n\ -UID:guid-1.host1.com\n\ -ORGANIZER;ROLE=CHAIR:MAILTO:mrbig@host.com\n\ -ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=GROUP:MAILTO:employee-A@host.com\n\ -DESCRIPTION:Project XYZ Review Meeting\n\ -CATEGORIES:MEETING\n\ -CLASS:PUBLIC\n\ -CREATED:19980309T130000Z\n\ -SUMMARY:XYZ Project Review\n\ -DTSTART;TZID=US-Eastern:19980312T083000\n\ -DTEND;TZID=US-Eastern:19980312T093000\n\ -LOCATION:1CP Conference Room 4350\n\ -END:VEVENT\n\ -END:VCALENDAR\n\ -"; - - -void test_cluster() -{ - icalcluster *cin, *cout; - int month = 0; - int count=0; - struct icaltimetype start, end; - icalcomponent *c,*clone, *itr; - - start = icaltimetype_from_timet( time(0),0); - end = start; - end.hour++; - - cout = icalcluster_new("clusterout.ics"); - assert(cout != 0); - - c = icalparser_parse_string(str2); - assert(c != 0); - - for(month = 1; month < 2; month++){ - icalcomponent *event; - icalproperty *dtstart, *dtend; - - cout = icalcluster_new("clusterout.ics"); - assert(cout != 0); - - start.month = month; - end.month = month; - - clone = icalcomponent_new_clone(c); - assert(clone !=0); - event = icalcomponent_get_first_component(clone,ICAL_VEVENT_COMPONENT); - assert(event != 0); - - dtstart = icalcomponent_get_first_property(event,ICAL_DTSTART_PROPERTY); - assert(dtstart!=0); - icalproperty_set_dtstart(dtstart,start); - - dtend = icalcomponent_get_first_property(event,ICAL_DTEND_PROPERTY); - assert(dtend!=0); - icalproperty_set_dtend(dtend,end); - - icalcluster_add_component(cout,clone); - icalcluster_commit(cout); - - icalcluster_free(cout); - - } - - - /* Print them out */ - - - cout = icalcluster_new("clusterout.ics"); - assert(cout != 0); - - for (itr = icalcluster_get_first_component(cout, - ICAL_ANY_COMPONENT); - itr != 0; - itr = icalcluster_get_next_component(cout, - ICAL_ANY_COMPONENT)){ - - icalcomponent *event; - icalproperty *dtstart, *dtend; - - count++; - - event = icalcomponent_get_first_component(itr,ICAL_VEVENT_COMPONENT); - - dtstart = icalcomponent_get_first_property(event,ICAL_DTSTART_PROPERTY); - dtend = icalcomponent_get_first_property(event,ICAL_DTEND_PROPERTY); - - printf("%d %s %s\n",count, icalproperty_as_ical_string(dtstart), - icalproperty_as_ical_string(dtend)); - - } - - /* Remove all of them */ - - icalcluster_free(cout); - - cout = icalcluster_new("clusterout.ics"); - assert(cout != 0); - - for (itr = icalcluster_get_first_component(cout, - ICAL_ANY_COMPONENT); - itr != 0; - itr = icalcluster_get_next_component(cout, - ICAL_ANY_COMPONENT)){ - - - icalcluster_remove_component(cout, itr); - } - - icalcluster_free(cout); - - - /* Print them out again */ - - cout = icalcluster_new("clusterout.ics"); - assert(cout != 0); - count =0; - - for (itr = icalcluster_get_first_component(cout, - ICAL_ANY_COMPONENT); - itr != 0; - itr = icalcluster_get_next_component(cout, - ICAL_ANY_COMPONENT)){ - - icalcomponent *event; - icalproperty *dtstart, *dtend; - - count++; - - event = icalcomponent_get_first_component(itr,ICAL_VEVENT_COMPONENT); - - dtstart = icalcomponent_get_first_property(event,ICAL_DTSTART_PROPERTY); - dtend = icalcomponent_get_first_property(event,ICAL_DTEND_PROPERTY); - - printf("%d %s %s\n",count, icalproperty_as_ical_string(dtstart), - icalproperty_as_ical_string(dtend)); - - } - - icalcluster_free(cout); - - -} - - - -int test_store() -{ - - icalcomponent *c, *gauge; - icalerrorenum error; - icalcomponent *next, *itr; - icalcluster* cluster; - struct icalperiodtype rtime; - icalstore *s = icalstore_new("store"); - int i; - - assert(s != 0); - - rtime.start = icaltimetype_from_timet( time(0),0); - - cluster = icalcluster_new("clusterout.ics"); - - assert(cluster != 0); - -#define NUMCOMP 4 - - /* Duplicate every component in the cluster NUMCOMP times */ - - icalerror_clear_errno(); - - for (i = 1; i -#include /* for strdup */ -#include /* for malloc */ -#include /* for printf */ -#include /* for time() */ -#include "icalmemory.h" - -/* - - Here is the example iCal object that the examples routines in this - file will use: - - BEGIN:VCALENDAR - PRODID:-//RDU Software//NONSGML HandCal//EN - VERSION:2.0 - BEGIN:VTIMEZONE - BEGIN:VEVENT - DTSTAMP:19980309T231000Z - UID:guid-1.host1.com - ORGANIZER;ROLE=CHAIR:MAILTO:mrbig@host.com - ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=GROUP: - MAILTO:employee-A@host.com - DESCRIPTION:Project XYZ Review Meeting - CREATED:19980309T130000Z - SUMMARY:XYZ Project Review - DTSTART;TZID=US-Eastern:19980312T083000 - DTEND;TZID=US-Eastern:19980312T093000 - END:VEVENT - END:VCALENDAR - -*/ - -char str[] = "BEGIN:VCALENDAR\ -PRODID:\"-//RDU Software//NONSGML HandCal//EN\"\ -VERSION:2.0\ -BEGIN:VEVENT\ -DTSTAMP:19980309T231000Z\ -UID:guid-1.host1.com\ -ORGANIZER;ROLE=CHAIR:MAILTO:mrbig@host.com\ -ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=GROUP:MAILTO:employee-A@host.com\ -DESCRIPTION:Project XYZ Review Meeting\ -CATEGORIES:MEETING\ -CREATED:19980309T130000Z\ -SUMMARY:XYZ Project Review\ -DTSTART;TZID=US-Eastern:19980312T083000\ -DTEND;TZID=US-Eastern:19980312T093000\ -END:VEVENT\ -END:VCALENDAR"; - -/* Creating iCal Components - - There are two ways to create new component in libical. You can - build the component from primitive parts, or you can create it - from a string. - - There are two variations of the API for building the component from - primitive parts. In the first variation, you add each parameter and - value to a property, and then add each property to a - component. This results in a long series of function calls. This - style is show in create_new_component() - - The second variation uses vargs lists to nest many primitive part - constructors, resulting in a compact, neatly formated way to create - components. This style is shown in create_new_component_with_va_args() - - - -*/ - -icalcomponent* create_new_component() -{ - - /* variable definitions */ - icalcomponent* calendar; - icalcomponent* event; - struct icaltimetype atime = icaltimetype_from_timet( time(0),0); - struct icalperiodtype rtime; - icalproperty* property; - - /* Define a time type that will use as data later. */ - rtime.start = icaltimetype_from_timet( time(0),0); - rtime.end = icaltimetype_from_timet( time(0),0); - rtime.end.hour++; - - /* Create calendar and add properties */ - - calendar = icalcomponent_new(ICAL_VCALENDAR_COMPONENT); - - /* Nearly every libical function call has the same general - form. The first part of the name defines the 'class' for the - function, and the first argument will be a pointer to a struct - of that class. So, icalcomponent_ functions will all take - icalcomponent* as their first argument. */ - - /* The next call creates a new proeprty and immediately adds it to the - 'calendar' component. */ - - icalcomponent_add_property( - calendar, - icalproperty_new_version(strdup("2.0")) - ); - - /* Note the use of strdup() in the previous and next call. All - properties constructors for properties with value types of - TEXT will take control of the string you pass into them. Since - the string '2.0' is a static string, we need to duplicate it in - new memory before giving it to the property */ - - /* Here is the short version of the memory rules: - - If the routine name has "new" in it: - Caller owns the returned memory. - If you pass in a string, the routine takes the memory. - - If the routine name has "add" in it: - The routine takes control of the component, property, - parameter or value memory. - - If the routine returns a string ( "get" and "as_ical_string" ) - The library owns the returned memory. - - There are more rules, so refer to the documentation for more - details. - - */ - - icalcomponent_add_property( - calendar, - icalproperty_new_prodid(strdup("-//RDU Software//NONSGML HandCal//EN")) - ); - - /* Add an event */ - - event = icalcomponent_new(ICAL_VEVENT_COMPONENT); - - icalcomponent_add_property( - event, - icalproperty_new_dtstamp(atime) - ); - - /* In the previous call, atime is a struct, and it is passed in by value. - This is how all compound types of values are handled. */ - - icalcomponent_add_property( - event, - icalproperty_new_uid(strdup("guid-1.host1.com")) - ); - - /* add a property that has parameters */ - property = icalproperty_new_organizer(strdup("mrbig@host.com")); - - icalproperty_add_parameter( - property, - icalparameter_new_role(ICAL_ROLE_CHAIR) - ); - - icalcomponent_add_property(event,property); - - /* In this style of component creation, you need to use an extra - call to add parameters to properties, but the form of this - operation is the same as adding a property to a component */ - - /* add another property that has parameters */ - property = icalproperty_new_attendee(strdup("employee-A@host.com")); - - icalproperty_add_parameter( - property, - icalparameter_new_role(ICAL_ROLE_REQPARTICIPANT) - ); - - icalproperty_add_parameter( - property, - icalparameter_new_rsvp(1) - ); - - icalproperty_add_parameter( - property, - icalparameter_new_cutype(ICAL_CUTYPE_GROUP) - ); - - icalcomponent_add_property(event,property); - - - /* more properties */ - - icalcomponent_add_property( - event, - icalproperty_new_description(strdup("Project XYZ Review Meeting")) - ); - - icalcomponent_add_property( - event, - icalproperty_new_categories(strdup("MEETING")) - ); - - icalcomponent_add_property( - event, - icalproperty_new_class(strdup("PUBLIC")) - ); - - icalcomponent_add_property( - event, - icalproperty_new_created(atime) - ); - - icalcomponent_add_property( - event, - icalproperty_new_summary(strdup("XYZ Project Review")) - ); - - property = icalproperty_new_dtstart(atime); - - icalproperty_add_parameter( - property, - icalparameter_new_tzid(strdup("US-Eastern")) - ); - - icalcomponent_add_property(event,property); - - - property = icalproperty_new_dtend(atime); - - icalproperty_add_parameter( - property, - icalparameter_new_tzid(strdup("US-Eastern")) - ); - - icalcomponent_add_property(event,property); - - icalcomponent_add_property( - event, - icalproperty_new_location(strdup("1CP Conference Room 4350")) - ); - - icalcomponent_add_component(calendar,event); - - return calendar; -} - - -/* Now, create the same component as in the previous routine, but use -the constructor style. */ - -icalcomponent* create_new_component_with_va_args() -{ - - /* This is a similar set up to the last routine */ - icalcomponent* calendar; - struct icaltimetype atime = icaltimetype_from_timet( time(0),0); - struct icalperiodtype rtime; - - rtime.start = icaltimetype_from_timet( time(0),0); - rtime.end = icaltimetype_from_timet( time(0),0); - rtime.end.hour++; - - /* Some of these routines are the same as those in the previous - routine, but we've also added several 'vanew' routines. These - 'vanew' routines take a list of properties, parameters or - values and add each of them to the parent property or - component. */ - - calendar = - icalcomponent_vanew( - ICAL_VCALENDAR_COMPONENT, - icalproperty_new_version(strdup("2.0")), - icalproperty_new_prodid(strdup("-//RDU Software//NONSGML HandCal//EN")), - icalcomponent_vanew( - ICAL_VEVENT_COMPONENT, - icalproperty_new_dtstamp(atime), - icalproperty_new_uid(strdup("guid-1.host1.com")), - icalproperty_vanew_organizer( - strdup("mrbig@host.com"), - icalparameter_new_role(ICAL_ROLE_CHAIR), - 0 - ), - icalproperty_vanew_attendee( - strdup("employee-A@host.com"), - icalparameter_new_role(ICAL_ROLE_REQPARTICIPANT), - icalparameter_new_rsvp(1), - icalparameter_new_cutype(ICAL_CUTYPE_GROUP), - 0 - ), - icalproperty_new_description(strdup("Project XYZ Review Meeting")), - icalproperty_new_categories(strdup("MEETING")), - icalproperty_new_class(strdup("PUBLIC")), - icalproperty_new_created(atime), - icalproperty_new_summary(strdup("XYZ Project Review")), - icalproperty_vanew_dtstart( - atime, - icalparameter_new_tzid(strdup("US-Eastern")), - 0 - ), - icalproperty_vanew_dtend( - atime, - icalparameter_new_tzid(strdup("US-Eastern")), - 0 - ), - icalproperty_new_location(strdup("1CP Conference Room 4350")), - 0 - ), - 0 - ); - - - /* Note that properties with no parameters can use the regular - 'new' constructor, while those with parameters use the 'vanew' - constructor. And, be sure that the last argument in the 'vanew' - call is a zero. Without, your program will probably crash. */ - - return calendar; -} - - -/* Now, lets try to get a particular parameter out of a - component. This routine will return a list of strings of all - attendees who are required. Note that this routine assumes that the - component that we pass in is a VEVENT; the top level component we - created in the above two routines is a VCALENDAR */ - -char *attendees[10]; -#define MAX_ATTENDEES 10; - -char** get_required_attendees(icalcomponent* event) -{ - icalproperty* p; - icalparameter* parameter; - int c=0; - - assert(event != 0); - assert(icalcomponent_isa(event) == ICAL_VEVENT_COMPONENT); - - /* This loop iterates over all of the ATTENDEE properties in the - event */ - - /* Yes, the iteration routines save their state in the event - struct, so the are not thread safe unless you lock the whole - event. */ - - for( - p = icalcomponent_get_first_property(event,ICAL_ATTENDEE_PROPERTY); - p != 0; - p = icalcomponent_get_next_property(event,ICAL_ATTENDEE_PROPERTY) - ) { - - /* Get the first ROLE parameter in the property. There should - only be one, so we wont bother to iterate over them. */ - - parameter = icalproperty_get_first_parameter(p,ICAL_ROLE_PARAMETER); - - /* If the parameter indicates the participant is required, get - the attendees name and stick a copy of it into the output - array */ - - if ( icalparameter_get_role(parameter) == ICAL_ROLE_REQPARTICIPANT) - { - attendees[c++] = strdup(icalproperty_get_attendee(p)); - } - } - - return attendees; -} - -/* Here is a similar example. If an attendee has a PARTSTAT of - NEEDSACTION or has no PARTSTAT parameter, change it to - TENTATIVE. */ - -void update_attendees(icalcomponent* event) -{ - icalproperty* p; - icalparameter* parameter; - - assert(event != 0); - assert(icalcomponent_isa(event) == ICAL_VEVENT_COMPONENT); - - for( - p = icalcomponent_get_first_property(event,ICAL_ATTENDEE_PROPERTY); - p != 0; - p = icalcomponent_get_next_property(event,ICAL_ATTENDEE_PROPERTY) - ) { - - parameter = icalproperty_get_first_parameter(p,ICAL_PARTSTAT_PARAMETER); - - if (parameter == 0) { - - /* There was no PARTSTAT parameter, so add one. */ - icalproperty_add_parameter( - p, - icalparameter_new_partstat(ICAL_PARTSTAT_TENTATIVE) - ); - - } else if (icalparameter_get_partstat(parameter) == ICAL_PARTSTAT_NEEDSACTION) { - /* Remove the NEEDSACTION parameter and replace it with - TENTATIVE */ - - icalproperty_remove_parameter(p,ICAL_PARTSTAT_PARAMETER); - - /* Don't forget to free it */ - icalparameter_free(parameter); - - /* Add a new one */ - icalproperty_add_parameter( - p, - icalparameter_new_partstat(ICAL_PARTSTAT_TENTATIVE) - ); - } - - } -} - -/* Here are some examples of manipulating properties */ - -void test_properties() -{ - icalproperty *prop; - icalparameter *param; - icalvalue *value; - - icalproperty *clone; - - /* Create a new property */ - prop = icalproperty_vanew_comment( - strdup("Another Comment"), - icalparameter_new_cn("A Common Name 1"), - icalparameter_new_cn("A Common Name 2"), - icalparameter_new_cn("A Common Name 3"), - icalparameter_new_cn("A Common Name 4"), - 0); - - /* Iterate through all of the parameters in the property */ - for(param = icalproperty_get_first_parameter(prop,ICAL_ANY_PROPERTY); - param != 0; - param = icalproperty_get_next_parameter(prop,ICAL_ANY_PROPERTY)) { - - printf("Prop parameter: %s\n",icalparameter_get_cn(param)); - } - - /* Get a string representation of the property's value */ - printf("Prop value: %s\n",icalproperty_get_comment(prop)); - - /* Spit out the property in its RFC 2445 representation */ - printf("As iCAL string:\n %s\n",icalproperty_as_ical_string(prop)); - - /* Make a copy of the property. Caller owns the memory */ - clone = icalproperty_new_clone(prop); - - /* Get a reference to the value within the clone property */ - value = icalproperty_get_value(clone); - - printf("Value: %s",icalvalue_as_ical_string(value)); - - /* Free the original and the clone */ - icalproperty_free(clone); - icalproperty_free(prop); - -} - - - -/* Here are some ways to work with values. */ -void test_values() -{ - icalvalue *v; - icalvalue *copy; - - v = icalvalue_new_caladdress(strdup("cap://value/1")); - printf("caladdress 1: %s\n",icalvalue_get_caladdress(v)); - - icalvalue_set_caladdress(v,strdup("cap://value/2")); - printf("caladdress 2: %s\n",icalvalue_get_caladdress(v)); - printf("String: %s\n",icalvalue_as_ical_string(v)); - - copy = icalvalue_new_clone(v); - printf("Clone: %s\n",icalvalue_as_ical_string(v)); - icalvalue_free(v); - icalvalue_free(copy); - - -} - -void test_parameters() -{ - icalparameter *p; - - p = icalparameter_new_cn("A Common Name"); - - printf("Common Name: %s\n",icalparameter_get_cn(p)); - - printf("As String: %s\n",icalparameter_as_ical_string(p)); -} - - -int main(int argc, char *argv[]) -{ - icalcomponent *c1; - icalcomponent *c2; - icalcomponent *vevent; - char **attendees; - - c1 = create_new_component(); - c2 = create_new_component_with_va_args(); - - /* Extract the VEVENT component from the component */ - - vevent = icalcomponent_get_first_component(c1,ICAL_VEVENT_COMPONENT); - - attendees = get_required_attendees(vevent); - - printf("Attendees: %s\n",attendees[0]); - - /* Now print out the component as a string. Remember that the - library retains control of the memory returned by - icalcomponent_as_ical_string. Do not sotre references to it or - try to free it. It is stored on an internal ring buffer,and the - library will eventuall reclaim it. */ - - printf("%s\n",icalcomponent_as_ical_string(c1)); - - return 0; - -} - - - diff --git a/libical/test-data/.cvsignore b/libical/test-data/.cvsignore deleted file mode 100644 index b840c21800..0000000000 --- a/libical/test-data/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile.in -Makefile \ No newline at end of file diff --git a/libical/test-data/0 b/libical/test-data/0 deleted file mode 100644 index e30493fcc0..0000000000 --- a/libical/test-data/0 +++ /dev/null @@ -1,21 +0,0 @@ -BEGIN:VCALENDAR -PRODID:-//GNOME//NONSGML GnomeCalendar//EN -VERSION:0.0.1 -BEGIN:VEVENT -UID:20000216T083142-31506-500-2714-0@twitch -SEQUENCE:0 -DTSTART:19970714T170000 -DTEND:19970715T035959 -DCREATED:19691231T160000 -LAST-MODIFIED:20000216T083142 -SUMMARY:Bastille Day Party -STATUS:NEEDS ACTION -CLASS:PUBLIC -PRIORITY:0 -TRANSP:0 -X-PILOTID:0 -X-PILOTSTAT:1 -END:VEVENT - -END:VCALENDAR - diff --git a/libical/test-data/1 b/libical/test-data/1 deleted file mode 100644 index 213b37d916..0000000000 --- a/libical/test-data/1 +++ /dev/null @@ -1,36 +0,0 @@ -BEGIN:VCALENDAR -PRODID:"-//RDU Software//NONSGML HandCal//EN" -VERSION:2.0 -BEGIN:VTIMEZONE -TZID:US-Eastern -BEGIN:STANDARD -DTSTART:19981025T020000 -RDATE:19981025T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -TZNAME:EST -END:STANDARD -BEGIN:DAYLIGHT -DTSTART:19990404T020000 -RDATE:19990404T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -TZNAME:EDT -END:DAYLIGHT -END:VTIMEZONE -BEGIN:VEVENT -DTSTAMP:19980309T231000Z -UID:guid-1.host1.com -ORGANIZER;ROLE=CHAIR:MAILTO:mrbig@host.com -ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=GROUP:MAILTO:employee-A@host.com -DESCRIPTION:Project XYZ Review Meeting -CATEGORIES:MEETING -CLASS:PUBLIC -CREATED:19980309T130000Z -SUMMARY:XYZ Project Review -DTSTART;TZID=US-Eastern:19980312T083000 -DTEND;TZID=US-Eastern:19980312T093000 -LOCATION:1CP Conference Room 4350 -END:VEVENT -END:VCALENDAR - diff --git a/libical/test-data/1.1 b/libical/test-data/1.1 deleted file mode 100644 index a7c92c33bd..0000000000 --- a/libical/test-data/1.1 +++ /dev/null @@ -1,13 +0,0 @@ -BEGIN:VCALENDAR -DURATION:P15DT5H0M20S -DURATION:P7W -URL;CN=John Smith:http://example.com/urivalue.html -X-SKI-TITLE;RSVP=TRUE: This is an extension property -SUMMARY:"No Property" -SUMMARY;RSVP=TRUE;RSVP=FALSE:Calendaring Interoperability Planning Meeting -SUMMARY;ALTREP=This is an xname:altrep -SUMMARY;CUTYPE=DESCRIPTION is a keyword:Xname parameter -DTEND:19990605 -DTSTART:19990605T103012 -CATEGORIES;RSVP=TRUE;RSVP=FALSE:one,two -END:VCALENDAR diff --git a/libical/test-data/2 b/libical/test-data/2 deleted file mode 100644 index 50ba609ab3..0000000000 --- a/libical/test-data/2 +++ /dev/null @@ -1,22 +0,0 @@ -BEGIN:VCALENDAR -METHOD:xyz -VERSION:2.0 -PRODID:-//ABC Corporation//NONSGML - My Product//EN -BEGIN:VEVENT -DTSTAMP:19970324T1200Z -SEQUENCE:0 -UID:uid3@host1.com -ORGANIZER:MAILTO:jdoe@host1.com -ATTENDEE;RSVP=TRUE:MAILTO:jsmith@host1.com -DTSTART:19970324T123000Z -DTEND:19970324T210000Z -CATEGORIES:MEETING,PROJECT -CLASS:PUBLIC -SUMMARY:Calendaring Interoperability Planning Meeting -DESCRIPTION:Discuss how we can test c&s interoperability\n - using iCalendar and other IETF standards. -LOCATION:LDB Lobby -ATTACH;FMTTYPE=application/postscript:ftp://xyzCorp.com/pub/conf/bkgrnd.ps -END:VEVENT -END:VCALENDAR diff --git a/libical/test-data/2445.ics b/libical/test-data/2445.ics deleted file mode 100644 index 1168324d88..0000000000 --- a/libical/test-data/2445.ics +++ /dev/null @@ -1,329 +0,0 @@ -BEGIN:VCALENDAR -X-LIC-CLUSTERCOUNT - :0 -DTSTART - :00000000T000000 -DTEND - :00000000T000000 -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//hacksw/handcal//NONSGML v1.0//EN -BEGIN:VEVENT -DTSTART:19970714T170000Z -DTEND:19970715T035959Z -SUMMARY:Bastille Day Party -END:VEVENT -END:VCALENDAR - -BEGIN:VEVENT -UID:19970901T130000Z-123401@host.com -DTSTAMP:19970901T1300Z -DTSTART:19970903T163000Z -DTEND:19970903T190000Z -SUMMARY:Annual Employee Review -CLASS:PRIVATE -CATEGORIES:BUSINESS,HUMAN RESOURCES -END:VEVENT - -BEGIN:VEVENT -UID:19970901T130000Z-123402@host.com -DTSTAMP:19970901T1300Z -DTSTART:19970401T163000Z -DTEND:19970402T010000Z -SUMMARY:Laurel is in sensitivity awareness class. -CLASS:PUBLIC -CATEGORIES:BUSINESS,HUMAN RESOURCES -TRANSP:TRANSPARENT -END:VEVENT - -BEGIN:VEVENT -UID:19970901T130000Z-123403@host.com -DTSTAMP:19970901T1300Z -DTSTART:19971102 -SUMMARY:Our Blissful Anniversary -CLASS:CONFIDENTIAL -CATEGORIES:ANNIVERSARY,PERSONAL,SPECIAL OCCASION -RRULE:FREQ=YEARLY -END:VEVENT - -BEGIN:VTODO -UID:19970901T130000Z-123404@host.com -DTSTAMP:19970901T1300Z -DTSTART:19970415T133000Z -DUE:19970416T045959Z -SUMMARY:1996 Income Tax Preparation -CLASS:CONFIDENTIAL -CATEGORIES:FAMILY,FINANCE -PRIORITY:1 -STATUS:NEEDS-ACTION -END:VTODO -BEGIN:VJOURNAL -UID:19970901T130000Z-123405@host.com -DTSTAMP:19970901T1300Z -DTSTART;VALUE=DATE:19970317 -SUMMARY:Staff meeting minutes -DESCRIPTION:1. Staff meeting: Participants include Joe\, Lisa - and Bob. Aurora project plans were reviewed. There is currently - no budget reserves for this project. Lisa will escalate to - management. Next meeting on Tuesday.\n - 2. Telephone Conference: ABC Corp. sales representative called - to discuss new printer. Promised to get us a demo by Friday.\n - 3. Henry Miller (Handsoff Insurance): Car was totaled by tree. - Is looking into a loaner car. 654-2323 (tel). -END:VJOURNAL -BEGIN:VFREEBUSY -ORGANIZER:MAILTO:jane_doe@host1.com -ATTENDEE:MAILTO:john_public@host2.com -DTSTART:19971015T050000Z -DTEND:19971016T050000Z -DTSTAMP:19970901T083000Z -END:VFREEBUSY -BEGIN:VFREEBUSY -ORGANIZER:MAILTO:jane_doe@host1.com -ATTENDEE:MAILTO:john_public@host2.com -DTSTAMP:19970901T100000Z -FREEBUSY;VALUE=PERIOD:19971015T050000Z/PT8H30M, - 19971015T160000Z/PT5H30M,19971015T223000Z/PT6H30M -URL:http://host2.com/pub/busy/jpublic-01.ifb -COMMENT:This iCalendar file contains busy time information for - the next three months. -END:VFREEBUSY -BEGIN:VFREEBUSY -ORGANIZER:jsmith@host.com -DTSTART:19980313T141711Z -DTEND:19980410T141711Z -FREEBUSY:19980314T233000Z/19980315T003000Z -FREEBUSY:19980316T153000Z/19980316T163000Z -FREEBUSY:19980318T030000Z/19980318T040000Z -URL:http://www.host.com/calendar/busytime/jsmith.ifb -END:VFREEBUSY -BEGIN:VTIMEZONE -TZID:US-Eastern -LAST-MODIFIED:19870101T000000Z -BEGIN:STANDARD -DTSTART:19971026T020000 -RDATE:19971026T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -TZNAME:EST -END:STANDARD -BEGIN:DAYLIGHT -DTSTART:19971026T020000 -RDATE:19970406T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -TZNAME:EDT -END:DAYLIGHT -END:VTIMEZONE -BEGIN:VTIMEZONE -TZID:US-Eastern -LAST-MODIFIED:19870101T000000Z -TZURL:http://zones.stds_r_us.net/tz/US-Eastern -BEGIN:STANDARD -DTSTART:19671029T020000 -RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -TZNAME:EST -END:STANDARD -BEGIN:DAYLIGHT -DTSTART:19870405T020000 -RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -TZNAME:EDT -END:DAYLIGHT -END:VTIMEZONE -BEGIN:VTIMEZONE -TZID:US--Fictitious-Eastern -LAST-MODIFIED:19870101T000000Z -BEGIN:STANDARD -DTSTART:19671029T020000 -RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -TZNAME:EST -END:STANDARD -BEGIN:DAYLIGHT -DTSTART:19870405T020000 -RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4;UNTIL=19980404T070000Z -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -TZNAME:EDT -END:DAYLIGHT -END:VTIMEZONE -BEGIN:VTIMEZONE -TZID:US--Fictitious-Eastern -LAST-MODIFIED:19870101T000000Z -BEGIN:STANDARD -DTSTART:19671029T020000 -RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -TZNAME:EST -END:STANDARD -BEGIN:DAYLIGHT -DTSTART:19870405T020000 -RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4;UNTIL=19980404T070000Z -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -TZNAME:EDT -END:DAYLIGHT -BEGIN:DAYLIGHT -DTSTART:19990424T020000 -RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=4 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -TZNAME:EDT -END:DAYLIGHT -END:VTIMEZONE -BEGIN:VALARM -TRIGGER;VALUE=DATE-TIME:19970317T133000Z -REPEAT:4 -DURATION:PT15M -ACTION:AUDIO -ATTACH;FMTTYPE=audio/basic:ftp://host.com/pub/sounds/bell-01.aud -END:VALARM -BEGIN:VALARM -TRIGGER:-PT30M -REPEAT:2 -DURATION:PT15M -ACTION:DISPLAY -DESCRIPTION:Breakfast meeting with executive\n - team at 8:30 AM EST. -END:VALARM -BEGIN:VALARM -TRIGGER:-P2D -ACTION:EMAIL -ATTENDEE:MAILTO:john_doe@host.com -SUMMARY:*** REMINDER: SEND AGENDA FOR WEEKLY STAFF MEETING *** -DESCRIPTION:A draft agenda needs to be sent out to the attendees - to the weekly managers meeting (MGR-LIST). Attached is a - pointer the document template for the agenda file. -ATTACH;FMTTYPE=application/binary:http://host.com/templates/agen - da.doc -END:VALARM -BEGIN:VALARM -TRIGGER;VALUE=DATE-TIME:19980101T050000Z -REPEAT:23 -DURATION:PT1H -ACTION:PROCEDURE -ATTACH;FMTTYPE=application/binary:ftp://host.com/novo- - procs/felizano.exe -END:VALARM -BEGIN:VCALENDAR -PRODID:-//RDU Software//NONSGML HandCal//EN -VERSION:2.0 -BEGIN:VTIMEZONE -TZID:US-Eastern -BEGIN:STANDARD -DTSTART:19981025T020000 -RDATE:19981025T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -TZNAME:EST -END:STANDARD -BEGIN:DAYLIGHT -DTSTART:19990404T020000 -RDATE:19990404T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -TZNAME:EDT -END:DAYLIGHT -END:VTIMEZONE -BEGIN:VEVENT -DTSTAMP:19980309T231000Z -UID:guid-1.host1.com -ORGANIZER;ROLE=CHAIR:MAILTO:mrbig@host.com -ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=GROUP: - MAILTO:employee-A@host.com -DESCRIPTION:Project XYZ Review Meeting -CATEGORIES:MEETING -CLASS:PUBLIC -CREATED:19980309T130000Z -SUMMARY:XYZ Project Review -DTSTART;TZID=US-Eastern:19980312T083000 -DTEND;TZID=US-Eastern:19980312T093000 -LOCATION:1CP Conference Room 4350 -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD:xyz -VERSION:2.0 -PRODID:-//ABC Corporation//NONSGML My Product//EN -BEGIN:VEVENT -DTSTAMP:19970324T1200Z -SEQUENCE:0 -UID:uid3@host1.com -ORGANIZER:MAILTO:jdoe@host1.com -ATTENDEE;RSVP=TRUE:MAILTO:jsmith@host1.com -DTSTART:19970324T123000Z -DTEND:19970324T210000Z -CATEGORIES:MEETING,PROJECT -CLASS:PUBLIC -SUMMARY:Calendaring Interoperability Planning Meeting -DESCRIPTION:Discuss how we can test c&s interoperability\n - using iCalendar and other IETF standards. -LOCATION:LDB Lobby -ATTACH;FMTTYPE=application/postscript:ftp://xyzCorp.com/pub/ - conf/bkgrnd.ps -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//ABC Corporation//NONSGML My Product//EN -BEGIN:VTODO -DTSTAMP:19980130T134500Z -SEQUENCE:2 -UID:uid4@host1.com -ORGANIZER:MAILTO:unclesam@us.gov -ATTENDEE;PARTSTAT=ACCEPTED:MAILTO:jqpublic@host.com -DUE:19980415T235959 -STATUS:NEEDS-ACTION -SUMMARY:Submit Income Taxes -BEGIN:VALARM -ACTION:AUDIO -TRIGGER;VALUE=DATE-TIME:19980403T120000Z -ATTACH;FMTTYPE=audio/basic:http://host.com/pub/audio- - files/ssbanner.aud -REPEAT:4 -DURATION:PT1H -END:VALARM -END:VTODO -END:VCALENDAR -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//ABC Corporation//NONSGML My Product//EN -BEGIN:VJOURNAL -DTSTAMP:19970324T120000Z -UID:uid5@host1.com -ORGANIZER:MAILTO:jsmith@host.com -STATUS:DRAFT -CLASS:PUBLIC -CATEGORIES:Project Report, XYZ, Weekly Meeting -DESCRIPTION:Project xyz Review Meeting Minutes\n - Agenda\n1. Review of project version 1.0 requirements.\n2. - Definition of project processes.\n3. Review of project schedule.\n - Participants: John Smith, Jane Doe, Jim Dandy\n-It was - decided that the requirements need to be signed off by - product marketing.\n-Project processes were accepted.\n - -Project schedule needs to account for scheduled holidays - and employee vacation time. Check with HR for specific - dates.\n-New schedule will be distributed by Friday.\n- - Next weeks meeting is cancelled. No meeting until 3/23. -END:VJOURNAL -END:VCALENDAR -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//RDU Software//NONSGML HandCal//EN -BEGIN:VFREEBUSY -ORGANIZER:MAILTO:jsmith@host.com -DTSTART:19980313T141711Z -DTEND:19980410T141711Z -FREEBUSY:19980314T233000Z/19980315T003000Z -FREEBUSY:19980316T153000Z/19980316T163000Z -FREEBUSY:19980318T030000Z/19980318T040000Z -URL:http://www.host.com/calendar/busytime/jsmith.ifb -END:VFREEBUSY -END:VCALENDAR -END:VCALENDAR \ No newline at end of file diff --git a/libical/test-data/2445.vcd b/libical/test-data/2445.vcd deleted file mode 100644 index 1168324d88..0000000000 --- a/libical/test-data/2445.vcd +++ /dev/null @@ -1,329 +0,0 @@ -BEGIN:VCALENDAR -X-LIC-CLUSTERCOUNT - :0 -DTSTART - :00000000T000000 -DTEND - :00000000T000000 -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//hacksw/handcal//NONSGML v1.0//EN -BEGIN:VEVENT -DTSTART:19970714T170000Z -DTEND:19970715T035959Z -SUMMARY:Bastille Day Party -END:VEVENT -END:VCALENDAR - -BEGIN:VEVENT -UID:19970901T130000Z-123401@host.com -DTSTAMP:19970901T1300Z -DTSTART:19970903T163000Z -DTEND:19970903T190000Z -SUMMARY:Annual Employee Review -CLASS:PRIVATE -CATEGORIES:BUSINESS,HUMAN RESOURCES -END:VEVENT - -BEGIN:VEVENT -UID:19970901T130000Z-123402@host.com -DTSTAMP:19970901T1300Z -DTSTART:19970401T163000Z -DTEND:19970402T010000Z -SUMMARY:Laurel is in sensitivity awareness class. -CLASS:PUBLIC -CATEGORIES:BUSINESS,HUMAN RESOURCES -TRANSP:TRANSPARENT -END:VEVENT - -BEGIN:VEVENT -UID:19970901T130000Z-123403@host.com -DTSTAMP:19970901T1300Z -DTSTART:19971102 -SUMMARY:Our Blissful Anniversary -CLASS:CONFIDENTIAL -CATEGORIES:ANNIVERSARY,PERSONAL,SPECIAL OCCASION -RRULE:FREQ=YEARLY -END:VEVENT - -BEGIN:VTODO -UID:19970901T130000Z-123404@host.com -DTSTAMP:19970901T1300Z -DTSTART:19970415T133000Z -DUE:19970416T045959Z -SUMMARY:1996 Income Tax Preparation -CLASS:CONFIDENTIAL -CATEGORIES:FAMILY,FINANCE -PRIORITY:1 -STATUS:NEEDS-ACTION -END:VTODO -BEGIN:VJOURNAL -UID:19970901T130000Z-123405@host.com -DTSTAMP:19970901T1300Z -DTSTART;VALUE=DATE:19970317 -SUMMARY:Staff meeting minutes -DESCRIPTION:1. Staff meeting: Participants include Joe\, Lisa - and Bob. Aurora project plans were reviewed. There is currently - no budget reserves for this project. Lisa will escalate to - management. Next meeting on Tuesday.\n - 2. Telephone Conference: ABC Corp. sales representative called - to discuss new printer. Promised to get us a demo by Friday.\n - 3. Henry Miller (Handsoff Insurance): Car was totaled by tree. - Is looking into a loaner car. 654-2323 (tel). -END:VJOURNAL -BEGIN:VFREEBUSY -ORGANIZER:MAILTO:jane_doe@host1.com -ATTENDEE:MAILTO:john_public@host2.com -DTSTART:19971015T050000Z -DTEND:19971016T050000Z -DTSTAMP:19970901T083000Z -END:VFREEBUSY -BEGIN:VFREEBUSY -ORGANIZER:MAILTO:jane_doe@host1.com -ATTENDEE:MAILTO:john_public@host2.com -DTSTAMP:19970901T100000Z -FREEBUSY;VALUE=PERIOD:19971015T050000Z/PT8H30M, - 19971015T160000Z/PT5H30M,19971015T223000Z/PT6H30M -URL:http://host2.com/pub/busy/jpublic-01.ifb -COMMENT:This iCalendar file contains busy time information for - the next three months. -END:VFREEBUSY -BEGIN:VFREEBUSY -ORGANIZER:jsmith@host.com -DTSTART:19980313T141711Z -DTEND:19980410T141711Z -FREEBUSY:19980314T233000Z/19980315T003000Z -FREEBUSY:19980316T153000Z/19980316T163000Z -FREEBUSY:19980318T030000Z/19980318T040000Z -URL:http://www.host.com/calendar/busytime/jsmith.ifb -END:VFREEBUSY -BEGIN:VTIMEZONE -TZID:US-Eastern -LAST-MODIFIED:19870101T000000Z -BEGIN:STANDARD -DTSTART:19971026T020000 -RDATE:19971026T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -TZNAME:EST -END:STANDARD -BEGIN:DAYLIGHT -DTSTART:19971026T020000 -RDATE:19970406T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -TZNAME:EDT -END:DAYLIGHT -END:VTIMEZONE -BEGIN:VTIMEZONE -TZID:US-Eastern -LAST-MODIFIED:19870101T000000Z -TZURL:http://zones.stds_r_us.net/tz/US-Eastern -BEGIN:STANDARD -DTSTART:19671029T020000 -RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -TZNAME:EST -END:STANDARD -BEGIN:DAYLIGHT -DTSTART:19870405T020000 -RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -TZNAME:EDT -END:DAYLIGHT -END:VTIMEZONE -BEGIN:VTIMEZONE -TZID:US--Fictitious-Eastern -LAST-MODIFIED:19870101T000000Z -BEGIN:STANDARD -DTSTART:19671029T020000 -RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -TZNAME:EST -END:STANDARD -BEGIN:DAYLIGHT -DTSTART:19870405T020000 -RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4;UNTIL=19980404T070000Z -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -TZNAME:EDT -END:DAYLIGHT -END:VTIMEZONE -BEGIN:VTIMEZONE -TZID:US--Fictitious-Eastern -LAST-MODIFIED:19870101T000000Z -BEGIN:STANDARD -DTSTART:19671029T020000 -RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -TZNAME:EST -END:STANDARD -BEGIN:DAYLIGHT -DTSTART:19870405T020000 -RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4;UNTIL=19980404T070000Z -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -TZNAME:EDT -END:DAYLIGHT -BEGIN:DAYLIGHT -DTSTART:19990424T020000 -RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=4 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -TZNAME:EDT -END:DAYLIGHT -END:VTIMEZONE -BEGIN:VALARM -TRIGGER;VALUE=DATE-TIME:19970317T133000Z -REPEAT:4 -DURATION:PT15M -ACTION:AUDIO -ATTACH;FMTTYPE=audio/basic:ftp://host.com/pub/sounds/bell-01.aud -END:VALARM -BEGIN:VALARM -TRIGGER:-PT30M -REPEAT:2 -DURATION:PT15M -ACTION:DISPLAY -DESCRIPTION:Breakfast meeting with executive\n - team at 8:30 AM EST. -END:VALARM -BEGIN:VALARM -TRIGGER:-P2D -ACTION:EMAIL -ATTENDEE:MAILTO:john_doe@host.com -SUMMARY:*** REMINDER: SEND AGENDA FOR WEEKLY STAFF MEETING *** -DESCRIPTION:A draft agenda needs to be sent out to the attendees - to the weekly managers meeting (MGR-LIST). Attached is a - pointer the document template for the agenda file. -ATTACH;FMTTYPE=application/binary:http://host.com/templates/agen - da.doc -END:VALARM -BEGIN:VALARM -TRIGGER;VALUE=DATE-TIME:19980101T050000Z -REPEAT:23 -DURATION:PT1H -ACTION:PROCEDURE -ATTACH;FMTTYPE=application/binary:ftp://host.com/novo- - procs/felizano.exe -END:VALARM -BEGIN:VCALENDAR -PRODID:-//RDU Software//NONSGML HandCal//EN -VERSION:2.0 -BEGIN:VTIMEZONE -TZID:US-Eastern -BEGIN:STANDARD -DTSTART:19981025T020000 -RDATE:19981025T020000 -TZOFFSETFROM:-0400 -TZOFFSETTO:-0500 -TZNAME:EST -END:STANDARD -BEGIN:DAYLIGHT -DTSTART:19990404T020000 -RDATE:19990404T020000 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0400 -TZNAME:EDT -END:DAYLIGHT -END:VTIMEZONE -BEGIN:VEVENT -DTSTAMP:19980309T231000Z -UID:guid-1.host1.com -ORGANIZER;ROLE=CHAIR:MAILTO:mrbig@host.com -ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=GROUP: - MAILTO:employee-A@host.com -DESCRIPTION:Project XYZ Review Meeting -CATEGORIES:MEETING -CLASS:PUBLIC -CREATED:19980309T130000Z -SUMMARY:XYZ Project Review -DTSTART;TZID=US-Eastern:19980312T083000 -DTEND;TZID=US-Eastern:19980312T093000 -LOCATION:1CP Conference Room 4350 -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD:xyz -VERSION:2.0 -PRODID:-//ABC Corporation//NONSGML My Product//EN -BEGIN:VEVENT -DTSTAMP:19970324T1200Z -SEQUENCE:0 -UID:uid3@host1.com -ORGANIZER:MAILTO:jdoe@host1.com -ATTENDEE;RSVP=TRUE:MAILTO:jsmith@host1.com -DTSTART:19970324T123000Z -DTEND:19970324T210000Z -CATEGORIES:MEETING,PROJECT -CLASS:PUBLIC -SUMMARY:Calendaring Interoperability Planning Meeting -DESCRIPTION:Discuss how we can test c&s interoperability\n - using iCalendar and other IETF standards. -LOCATION:LDB Lobby -ATTACH;FMTTYPE=application/postscript:ftp://xyzCorp.com/pub/ - conf/bkgrnd.ps -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//ABC Corporation//NONSGML My Product//EN -BEGIN:VTODO -DTSTAMP:19980130T134500Z -SEQUENCE:2 -UID:uid4@host1.com -ORGANIZER:MAILTO:unclesam@us.gov -ATTENDEE;PARTSTAT=ACCEPTED:MAILTO:jqpublic@host.com -DUE:19980415T235959 -STATUS:NEEDS-ACTION -SUMMARY:Submit Income Taxes -BEGIN:VALARM -ACTION:AUDIO -TRIGGER;VALUE=DATE-TIME:19980403T120000Z -ATTACH;FMTTYPE=audio/basic:http://host.com/pub/audio- - files/ssbanner.aud -REPEAT:4 -DURATION:PT1H -END:VALARM -END:VTODO -END:VCALENDAR -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//ABC Corporation//NONSGML My Product//EN -BEGIN:VJOURNAL -DTSTAMP:19970324T120000Z -UID:uid5@host1.com -ORGANIZER:MAILTO:jsmith@host.com -STATUS:DRAFT -CLASS:PUBLIC -CATEGORIES:Project Report, XYZ, Weekly Meeting -DESCRIPTION:Project xyz Review Meeting Minutes\n - Agenda\n1. Review of project version 1.0 requirements.\n2. - Definition of project processes.\n3. Review of project schedule.\n - Participants: John Smith, Jane Doe, Jim Dandy\n-It was - decided that the requirements need to be signed off by - product marketing.\n-Project processes were accepted.\n - -Project schedule needs to account for scheduled holidays - and employee vacation time. Check with HR for specific - dates.\n-New schedule will be distributed by Friday.\n- - Next weeks meeting is cancelled. No meeting until 3/23. -END:VJOURNAL -END:VCALENDAR -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//RDU Software//NONSGML HandCal//EN -BEGIN:VFREEBUSY -ORGANIZER:MAILTO:jsmith@host.com -DTSTART:19980313T141711Z -DTEND:19980410T141711Z -FREEBUSY:19980314T233000Z/19980315T003000Z -FREEBUSY:19980316T153000Z/19980316T163000Z -FREEBUSY:19980318T030000Z/19980318T040000Z -URL:http://www.host.com/calendar/busytime/jsmith.ifb -END:VFREEBUSY -END:VCALENDAR -END:VCALENDAR \ No newline at end of file diff --git a/libical/test-data/2446.ics b/libical/test-data/2446.ics deleted file mode 100644 index 679f6c7920..0000000000 --- a/libical/test-data/2446.ics +++ /dev/null @@ -1,1007 +0,0 @@ -BEGIN:VCALENDAR -X-LIC-CLUSTERCOUNT - :0 -DTSTART - :00000000T000000 -DTEND - :00000000T000000 -BEGIN:VCALENDAR -METHOD:PUBLISH -PRODID:-//ACME/DesktopCalendar//EN -VERSION:2.0 -BEGIN:VEVENT -ORGANIZER:mailto:a@example.com -DTSTART:19970701T200000Z -DTSTAMP:19970611T190000Z -SUMMARY:ST. PAUL SAINTS -VS- DULUTH-SUPERIOR DUKES -UID:0981234-1234234-23@example.com -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD:PUBLISH -VERSION:2.0 -PRODID:-//ACME/DesktopCalendar//EN -BEGIN:VEVENT -ORGANIZER:mailto:a@example.com -DTSTAMP:19970612T190000Z -DTSTART:19970701T210000Z -DTEND:19970701T230000Z -SEQUENCE:1 -UID:0981234-1234234-23@example.com -SUMMARY:ST. PAUL SAINTS -VS- DULUTH-SUPERIOR DUKES -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD:CANCEL -VERSION:2.0 -PRODID:-//ACME/DesktopCalendar//EN -BEGIN:VEVENT -ORGANIZER:mailto:a@example.com -COMMENT:DUKES forfeit the game -SEQUENCE:2 -UID:0981234-1234234-23@example.com -DTSTAMP:19970613T190000Z -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:PUBLISH -SCALE:GREGORIAN -VERSION:2.0 -BEGIN:VTIMEZONE -TZID:America-Chicago -TZURL:http://zones.stds_r_us.net/tz/America-Chicago -BEGIN:STANDARD -DTSTART:19671029T020000 -RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0600 -TZNAME:CST -END:STANDARD -BEGIN:DAYLIGHT -DTSTART:19870405T020000 -RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4 -TZOFFSETFROM:-0600 -TZOFFSETTO:-0500 -TZNAME:CDT -END:DAYLIGHT -END:VTIMEZONE -BEGIN:VEVENT -ORGANIZER:mailto:a@example.com -ATTACH:http://www.dukes.com/ -CATEGORIES:SPORTS EVENT,ENTERTAINMENT -CLASS:PRIVATE -DESCRIPTION:MIDWAY STADIUM\n - Big time game. MUST see.\n - Expected duration:2 hours\n -DTEND;TZID=America-Chicago:19970701T180000 -DTSTART;TZID=America-Chicago:19970702T160000 -DTSTAMP:19970614T190000Z -STATUS:CONFIRMED -LOCATION;VALUE=URI:http://www.midwaystadium.com/ -PRIORITY:2 -RESOURCES:SCOREBOARD -SEQUENCE:3 -SUMMARY:ST. PAUL SAINTS -VS- DULUTH-SUPERIOR DUKES -UID:0981234-1234234-23@example.com -RELATED-TO:0981234-1234234-14@example.com -BEGIN:VALARM -TRIGGER:-PT2H -ACTION:DISPLAY -DESCRIPTION:You should be leaving for the game now. -END:VALARM -BEGIN:VALARM -TRIGGER:-PT30M -ACTION:AUDIO -END:VALARM -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:PUBLISH -VERSION:2.0 -BEGIN:VEVENT -ORGANIZER:mailto:a@example.com -DTSTAMP:19970614T190000Z -UID:0981234-1234234-23@example.com -DTSTART;VALUE=DATE:19970714 -RRULE:FREQ=YEARLY;INTERVAL=1 -SUMMARY: Bastille Day -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:REQUEST -VERSION:2.0 -BEGIN:VEVENT -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED;CN=BIG A:Mailto:A@example.com -ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL;CN=B:Mailto:B@example.com -ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL;CN=C:Mailto:C@example.com -ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL;CN=Hal:Mailto:D@example.com -ATTENDEE;RSVP=FALSE;CUTYPE=ROOM:conf_Big@example.com -ATTENDEE;ROLE=NON-PARTICIPANT;RSVP=FALSE:Mailto:E@example.com -DTSTAMP:19970611T190000Z -DTSTART:19970701T200000Z -DTEND:19970701T2000000Z -SUMMARY:Conference -UID:calsrv.example.com-873970198738777@example.com -SEQUENCE:0 -STATUS:CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:REPLY -VERSION:2.0 -BEGIN:VEVENT -ATTENDEE;PARTSTAT=ACCEPTED:Mailto:B@example.com -ORGANIZER:MAILTO:A@example.com -UID:calsrv.example.com-873970198738777@example.com -SEQUENCE:0 -REQUEST-STATUS:2.0;Success -DTSTAMP:19970612T190000Z -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:REQUEST -VERSION:2.0 -BEGIN:VEVENT -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com -ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:Mailto:B@example.com -ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:Mailto:C@example.com -ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL;CN=Hal:Mailto:D@example.com -ATTENDEE;ROLE=NON-PARTICIPANT;RSVP=FALSE; - CUTYPE=ROOM:Mailto:Conf@example.com -ATTENDEE;ROLE=NON-PARTICIPANT;RSVP=FALSE:Mailto:E@example.com -DTSTART:19970701T180000Z -DTEND:19970701T190000Z -SUMMARY:Phone Conference -UID:calsrv.example.com-873970198738777@example.com -SEQUENCE:1 -DTSTAMP:19970613T190000Z -STATUS:CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:REQUEST -VERSION:2.0 -BEGIN:VEVENT -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com -ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:Mailto:B@example.com -ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:Mailto:C@example.com -DTSTART:19970701T190000Z -DTEND:19970701T200000Z -SUMMARY:Discuss the Merits of the election results -LOCATION:Green Conference Room -UID:calsrv.example.com-873970198738777a@example.com -SEQUENCE:0 -DTSTAMP:19970611T190000Z -STATUS:CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:COUNTER -VERSION:2.0 -BEGIN:VEVENT -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com -ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:Mailto:B@example.com -ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:Mailto:C@example.com -DTSTART:19970701T160000Z -DTEND:19970701T190000Z -DTSTAMP:19970612T190000Z -SUMMARY:Discuss the Merits of the election results -LOCATION:Green Conference Room -COMMENT:This time works much better and I think the big conference - room is too big -UID:calsrv.example.com-873970198738777a@example.com -SEQUENCE:0 -DTSTAMP:19970611T190000Z -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:REQUEST -VERSION:2.0 -BEGIN:VEVENT -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com -ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:Mailto:B@example.com -ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:Mailto:C@example.com -DTSTAMP:19970613T190000Z -DTSTART:19970701T160000Z -DTEND:19970701T190000Z -SUMMARY:Discuss the Merits of the election results - changed to - meet B's schedule -LOCATION:Green Conference Room -UID:calsrv.example.com-873970198738777@example.com -SEQUENCE:1 -STATUS:CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:DECLINECOUNTER -VERSION:2.0 -BEGIN:VEVENT -ORGANIZER:Mailto:A@example.com -ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:Mailto:B@example.com -COMMENT:Sorry, I cannot change this meeting time -UID:calsrv.example.com-873970198738777@example.com -SEQUENCE:0 -DTSTAMP:19970614T190000Z -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:REPLY -VERSION:2.0 -BEGIN:VEVENT -ORGANIZER:MAILTO:A@Example.com -ATTENDEE;PARTSTAT=DELEGATED;DELEGATED- - TO="Mailto:E@example.com":Mailto:C@example.com -UID:calsrv.example.com-873970198738777@example.com -SEQUENCE:0 -REQUEST-STATUS:2.0;Success -DTSTAMP:19970611T190000Z -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:REQUEST -VERSION:2.0 -BEGIN:VEVENT -ORGANIZER:Mailto:A@example.com -ATTENDEE;PARTSTAT=DELEGATED;DELEGATED- - TO="Mailto:E@example.com":Mailto:C@example.com -ATTENDEE;RSVP=TRUE; - DELEGATED-FROM="Mailto:C@example.com":Mailto:E@example.com -DTSTART:19970701T180000Z -DTEND:19970701T200000Z -SUMMARY:Phone Conference -UID:calsrv.example.com-873970198738777@example.com -SEQUENCE:0 -STATUS:CONFIRMED -DTSTAMP:19970611T190000Z -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:REPLY -VERSION:2.0 -BEGIN:VEVENT -ORGANIZER:MAILTO:A@Example.com -ATTENDEE;PARTSTAT=ACCEPTED;DELEGATED- - FROM="Mailto:C@example.com":Mailto:E@example.com -ATTENDEE;PARTSTAT=DELEGATED; - DELEGATED-TO="Mailto:E@example.com":Mailto:C@example.com -UID:calsrv.example.com-873970198738777@example.com -SEQUENCE:0 -REQUEST-STATUS:2.0;Success -DTSTAMP:19970614T190000Z -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:REPLY -VERSION:2.0 -BEGIN:VEVENT -ORGANIZER:MAILTO:A@Example.com -ATTENDEE;PARTSTAT=DELEGATED; - DELEGATED-TO="Mailto:E@example.com":Mailto:C@example.com -ATTENDEE;PARTSTAT=DECLINED; - DELEGATED-FROM="Mailto:C@example.com":Mailto:E@example.com -COMMENT:Sorry, I will be out of town at that time. -UID:calsrv.example.com-873970198738777@example.com -SEQUENCE:0 -REQUEST-STATUS:2.0;Success -DTSTAMP:19970614T190000Z -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:REQUEST -VERSION:2.0 -BEGIN:VEVENT -ORGANIZER:MAILTO:A@Example.com -ATTENDEE;PARTSTAT=DECLINED; - DELEGATED-FROM="Mailto:C@example.com":Mailto:E@example.com -ATTENDEE;RSVP=TRUE:Mailto:C@example.com -UID:calsrv.example.com-873970198738777@example.com -SEQUENCE:0 -SUMMARY:Phone Conference -DTSTART:19970701T180000Z -DTEND:19970701T200000Z -DTSTAMP:19970614T200000Z -COMMENT:DELEGATE (ATTENDEE Mailto:E@example.com) DECLINED YOUR - INVITATION -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:CANCEL -VERSION:2.0 -BEGIN:VEVENT -ORGANIZER:Mailto:A@example.com -ATTENDEE;CUTYPE=INDIVIDUAL:Mailto:A@example.com -ATTENDEE;CUTYPE=INDIVIDUAL:Mailto:B@example.com -ATTENDEE;CUTYPE=INDIVIDUAL:Mailto:C@example.com -ATTENDEE;CUTYPE=INDIVIDUAL:Mailto:D@example.com -COMMENT:Mr. B cannot attend. It's raining. Lets cancel. -UID:calsrv.example.com-873970198738777@example.com -SEQUENCE:1 -STATUS:CANCELLED -DTSTAMP:19970613T190000Z -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:CANCEL -VERSION:2.0 -BEGIN:VEVENT -ORGANIZER:Mailto:A@example.com -ATTENDEE:mailto:B@example.com -COMMENT:You're off the hook for this meeting -UID:calsrv.example.com-873970198738777@example.com -DTSTAMP:19970613T193000Z -SEQUENCE:1 -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:REQUEST -VERSION:2.0 -BEGIN:VEVENT -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com -ATTENDEE;CUTYPE=INDIVIDUAL:Mailto:C@example.com -ATTENDEE;CUTYPE=INDIVIDUAL:Mailto:D@example.com -ATTENDEE;CUTYPE=ROOM:CR_Big@example.com -ATTENDEE;ROLE=NON-PARTICIPANT; - RSVP=FALSE:Mailto:E@example.com -DTSTAMP:19970611T190000Z -DTSTART:19970701T200000Z -DTEND:19970701T203000Z -SUMMARY:Phone Conference -UID:calsrv.example.com-873970198738777@example.com -SEQUENCE:2 -STATUS:CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:REQUEST -VERSION:2.0 -BEGIN:VEVENT -ORGANIZER:Mailto:B@example.com -ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:B@example.com -ATTENDEE;CUTYPE=INDIVIDUAL:Mailto:C@example.com -ATTENDEE;CUTYPE=INDIVIDUAL:Mailto:D@example.com -DTSTAMP:19970611T190000Z -DTSTART:19970701T200000Z -DTEND:19970701T203000Z -RRULE:FREQ=WEEKLY -SUMMARY:Phone Conference -UID:123456@example.com -SEQUENCE:1 -STATUS:CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -VERSION:2.0 -METHOD:PUBLISH -BEGIN:VFREEBUSY -DTSTAMP:19980101T124100Z -ORGANIZER:MAILTO:A@Example.com -DTSTART:19980101T124200Z -DTEND:19980107T124200Z -FREEBUSY:19980101T180000Z/19980101T190000Z -FREEBUSY:19980103T020000Z/19980103T050000Z -FREEBUSY:19980107T020000Z/19980107T050000Z -FREEBUSY:19980113T000000Z/19980113T010000Z -FREEBUSY:19980115T190000Z/19980115T200000Z -FREEBUSY:19980115T220000Z/19980115T230000Z -FREEBUSY:19980116T013000Z/19980116T043000Z -END:VFREEBUSY -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:REQUEST -VERSION:2.0 -BEGIN:VFREEBUSY -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR:Mailto:A@example.com -ATTENDEE:Mailto:B@example.com -ATTENDEE:Mailto:C@example.com -DTSTAMP:19970613T190000Z -DTSTART:19970701T080000Z -DTEND:19970701T200000 -UID:calsrv.example.com-873970198738777@example.com -END:VFREEBUSY -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:REPLY -VERSION:2.0 -BEGIN:VFREEBUSY -ORGANIZER:MAILTO:A@example.com -ATTENDEE:Mailto:B@example.com -DTSTART:19970701T080000Z -DTEND:19970701T200000Z -UID:calsrv.example.com-873970198738777@example.com -FREEBUSY:19970701T090000Z/PT1H,19970701T140000Z/PT30M -DTSTAMP:19970613T190030Z -END:VFREEBUSY -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:REQUEST -VERSION:2.0 -BEGIN:VTIMEZONE -TZID:America-SanJose -TZURL:http://zones.stds_r_us.net/tz/America-SanJose -BEGIN:STANDARD -DTSTART:19671029T020000 -RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10 -TZOFFSETFROM:-0700 -TZOFFSETTO:-0800 -TZNAME:PST -END:STANDARD -BEGIN:DAYLIGHT -DTSTART:19870405T020000 -RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4 -TZOFFSETFROM:-0800 -TZOFFSETTO:-0700 -TZNAME:PDT -END:DAYLIGHT -END:VTIMEZONE -BEGIN:VEVENT -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED;CUTYPE=INDIVIDUAL:A@example.COM -ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:B@example.fr -ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:c@example.jp -DTSTAMP:19970613T190030Z -DTSTART;TZID=America-SanJose:19970701T140000 -DTEND;TZID=America-SanJose:19970701T150000 -RRULE:FREQ=WEEKLY;INTERVAL=20;WKST=SU;BYDAY=TU -RDATE;TZID=America-SanJose:19970910T140000 -EXDATE;TZID=America-SanJose:19970909T140000 -EXDATE;TZID=America-SanJose:19971028T140000 -SUMMARY:Weekly Phone Conference -UID:calsrv.example.com-873970198738777@example.com -SEQUENCE:0 -STATUS:CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD:REQUEST -PRODID:-//RDU Software//NONSGML HandCal//EN -VERSION:2.0 -BEGIN:VEVENT -UID:guid-1@host1.com -SEQUENCE:0 -RRULE:FREQ=MONTHLY;BYMONTHDAY=1;UNTIL=19980901T210000Z -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com -ATTENDEE:Mailto:B@example.com -ATTENDEE:Mailto:C@example.com -ATTENDEE:Mailto:D@example.com -DESCRIPTION:IETF-C&S Conference Call -CLASS:PUBLIC -SUMMARY:IETF Calendaring Working Group Meeting -DTSTART:19970601T210000Z -DTEND:19970601T220000Z -LOCATION:Conference Call -DTSTAMP:19970526T083000Z -STATUS:CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD:REQUEST -PRODID:-//RDU Software//NONSGML HandCal//EN -VERSION:2.0 -BEGIN:VEVENT -UID:guid-1@host1com -RECURRENCE-ID:19970701T210000Z -SEQUENCE:1 -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com -ATTENDEE:Mailto:B@example.com -ATTENDEE:Mailto:C@example.com -ATTENDEE:Mailto:D@example.com -DESCRIPTION:IETF-C&S Conference Call -CLASS:PUBLIC -SUMMARY:IETF Calendaring Working Group Meeting -DTSTART:19970703T210000Z -DTEND:19970703T220000Z -LOCATION:Conference Call -DTSTAMP:19970626T093000Z -STATUS:CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD:CANCEL -PRODID:-//RDU Software//NONSGML HandCal//EN -VERSION:2.0 -BEGIN:VEVENT -UID:guid-1@host1.com -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com -ATTENDEE:Mailto:B@example.com -ATTENDEE:Mailto:C@example.com -ATTENDEE:Mailto:D@example.com -RECURRENCE-ID:19970801T210000Z -SEQUENCE:2 -STATUS:CANCELLED -DTSTAMP:19970721T093000Z -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD:CANCEL -PRODID:-//RDU Software//NONSGML HandCal//EN -VERSION:2.0 -BEGIN:VEVENT -UID:guid-1@host1.com -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com -ATTENDEE:Mailto:B@example.com -ATTENDEE:Mailto:C@example.com -ATTENDEE:Mailto:D@example.com -DTSTAMP:19970721T103000Z -STATUS:CANCELLED -SEQUENCE:3 -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD:REQUEST -PRODID:-//RDU Software//NONSGML HandCal//EN -VERSION:2.0 -BEGIN:VEVENT -UID:guid-1@host1.com -RECURRENCE-ID;RANGE=THISANDFUTURE:19970901T210000Z -SEQUENCE:3 -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com -ATTENDEE;RSVP=TRUE:Mailto:B@example.com -ATTENDEE;RSVP=TRUE:Mailto:C@example.com -ATTENDEE;RSVP=TRUE:Mailto:D@example.com -DESCRIPTION:IETF-C&S Discussion -CLASS:PUBLIC -SUMMARY:IETF Calendaring Working Group Meeting -DTSTART:19970901T210000Z -DTEND:19970901T220000Z -LOCATION:Building 32, Microsoft, Seattle, WA -DTSTAMP:19970526T083000Z -STATUS:CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD:ADD -PRODID:-//RDU Software//NONSGML HandCal//EN -VERSION:2.0 -BEGIN:VEVENT -UID:123456789@host1.com -SEQUENCE:4 -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com -ATTENDEE;RSVP=TRUE:Mailto:B@example.com -ATTENDEE;RSVP=TRUE:Mailto:C@example.com -ATTENDEE;RSVP=TRUE:Mailto:D@example.com -DESCRIPTION:IETF-C&S Conference Call -CLASS:PUBLIC -SUMMARY:IETF Calendaring Working Group Meeting -DTSTART:19970715T210000Z -DTEND:19970715T220000Z -LOCATION:Conference Call -DTSTAMP:19970629T093000Z -STATUS:CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD:REQUEST -PRODID:-//RDU Software//NONSGML HandCal//EN -VERSION:2.0 -BEGIN:VEVENT -UID:123456789@host1.com -SEQUENCE:0 -RRULE:FREQ=WEEKLY;WKST=SU;BYDAY=TU -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com -ATTENDEE;RSVP=TRUE:Mailto:B@example.com -SUMMARY:Review Accounts -DTSTART:19980303T210000Z -DTEND:19980303T220000Z -LOCATION:The White Room -DTSTAMP:19980301T093000Z -STATUS:CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD:ADD -PRODID:-//RDU Software//NONSGML HandCal//EN -VERSION:2.0 -BEGIN:VEVENT -UID:123456789@host1.com -SEQUENCE:7 -RRULE:WKST=SU;BYDAY=TH;FREQ=WEEKLY -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com -ATTENDEE;RSVP=TRUE:Mailto:B@example.com -SUMMARY:Review Accounts -DTSTART:19980303T210000Z -DTEND:19980303T220000Z -DTSTAMP:19980303T193000Z -LOCATION:The Usual conference room -STATUS:CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD:REQUEST -PRODID:-//RDU Software//NONSGML HandCal//EN -VERSION:2.0 -BEGIN:VEVENT -UID:123456789@host1.com -SEQUENCE:7 -RRULE:WKST=SU;BYDAY=TU,TH;FREQ=WEEKLY -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com -ATTENDEE;RSVP=TRUE:Mailto:B@example.com -SUMMARY:Review Accounts -DTSTART:19980303T210000Z -DTEND:19980303T220000Z -DTSTAMP:19980303T193000Z -LOCATION:The White Room -STATUS:CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD:REQUEST -PRODID:-//RDU Software//NONSGML HandCal//EN -VERSION:2.0 -BEGIN:VEVENT -UID:123456789@host1.com -SEQUENCE:0 -RDATE:19980304T180000Z -RDATE:19980311T180000Z -RDATE:19980318T180000Z -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com -ATTENDEE;RSVP=TRUE:Mailto:B@example.com -SUMMARY:Review Accounts -DTSTART:19980304T180000Z -DTEND:19980304T200000Z -DTSTAMP:19980303T193000Z -LOCATION:Conference Room A -STATUS:CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD:REQUEST -PRODID:-//RDU Software//NONSGML HandCal//EN -VERSION:2.0 -BEGIN:VEVENT -UID:123456789@host1.com -SEQUENCE:1 -RECURRENCE-ID:19980311T180000Z -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com -ATTENDEE;RSVP=TRUE:Mailto:B@example.com -SUMMARY:Review Accounts -DTSTART:19980311T160000Z -DTEND:19980311T180000Z -DTSTAMP:19980306T193000Z -LOCATION:The Small conference room -STATUS:CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD:ADD -PRODID:-//RDU Software//NONSGML HandCal//EN -VERSION:2.0 -BEGIN:VEVENT -UID:123456789@host1.com -SEQUENCE:2 -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com -ATTENDEE;RSVP=TRUE:Mailto:B@example.com -SUMMARY:Review Accounts -DTSTART:19980315T180000Z -DTEND:19980315T200000Z -DTSTAMP:19980307T193000Z -LOCATION:Conference Room A -STATUS:CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD:REQUEST -PRODID:-//RDU Software//NONSGML HandCal//EN -VERSION:2.0 -BEGIN:VEVENT -UID:123456789@host1.com -SEQUENCE:2 -RDATE:19980304T180000Z -RDATE:19980311T160000Z -RDATE:19980315T180000Z -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com -ATTENDEE;RSVP=TRUE:Mailto:B@example.com -SUMMARY:Review Accounts -DTSTART:19980304T180000Z -DTEND:19980304T200000Z -DTSTAMP:19980303T193000Z -LOCATION:Conference Room A -STATUS:CONFIRMED -END:VEVENT -BEGIN:VEVENT -SEQUENCE:2 -RECURRENCE-ID:19980311T160000Z -ATTENDEE;ROLE=CHAIR;RSVP=TRUE:Mailto:A@example.com -ATTENDEE;RSVP=TRUE:Mailto:B@example.com -SUMMARY:Review Accounts -DTSTART:19980311T160000Z -DTEND:19980304T180000Z -DTSTAMP:19980306T193000Z -LOCATION:The Small conference room -STATUS:CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD:COUNTER -PRODID:-//RDU Software//NONSGML HandCal//EN -VERSION:2.0 -BEGIN:VEVENT -UID:guid-1@host1.com -RECURRENCE-ID:19970715T210000Z -SEQUENCE:4 -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR;RSVP=TRUE:Mailto:A@example.com -ATTENDEE;RSVP=TRUE:Mailto:B@example.com -ATTENDEE;RSVP=TRUE:Mailto:C@example.com -ATTENDEE;RSVP=TRUE:Mailto:D@example.com -DESCRIPTION:IETF-C&S Conference Call -CLASS:PUBLIC -SUMMARY:IETF Calendaring Working Group Meeting -DTSTART:19970715T220000Z -DTEND:19970715T230000Z -LOCATION:Conference Call -COMMENT:May we bump this by an hour? I have a conflict -DTSTAMP:19970629T094000Z -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD:REQUEST -PRODID:-//RDU Software//NONSGML HandCal//EN -VERSION:2.0 -BEGIN:VEVENT -UID:guid-1@host1.com -SEQUENCE:0 -RRULE:FREQ=MONTHLY;BYMONTHDAY=1 -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR:Mailto:A@example.com -ATTENDEE;RSVP=TRUE:Mailto:B@example.com -ATTENDEE;RSVP=TRUE:Mailto:C@example.com -ATTENDEE;RSVP=TRUE:Mailto:D@example.com -DESCRIPTION:IETF-C&S Conference Call -CLASS:PUBLIC -SUMMARY:IETF Calendaring Working Group Meeting -DTSTART:19970601T210000Z -DTEND:19970601T220000Z -DTSTAMP:19970602T094000Z -LOCATION:Conference Call -STATUS:CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//RDU Software//NONSGML HandCal//EN -METHOD:REPLY -VERSION:2.0 -BEGIN:VEVENT -ORGANIZER:Mailto:A@example.com -ATTENDEE:Mailto:B@example.com -REQUEST-STATUS:2.8;Repeating event ignored. Scheduled as a single - event;RRULE -REQUEST-STATUS:3.0;Invalid Property Name;FOO -UID:guid-1@host1.com -SEQUENCE:0 -DTSTAMP:19970603T094000Z -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:REQUEST -VERSION:2.0 -BEGIN:VTODO -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR:Mailto:A@example.com -ATTENDEE;RSVP=TRUE:Mailto:B@example.com -ATTENDEE;RSVP=TRUE:Mailto:C@example.com -ATTENDEE;RSVP=TRUE:Mailto:D@example.com -DTSTART:19970701T170000Z -DUE:19970722T170000Z -PRIORITY:1 -SUMMARY:Create the requirements document -UID:calsrv.example.com-873970198738777-00@example.com -SEQUENCE:0 -DTSTAMP:19970717T200000Z -STATUS:Needs Action -END:VTODO -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:REPLY -VERSION:2.0 -BEGIN:VTODO -ORGANIZER:Mailto:A@example.com -ATTENDEE;PARTSTAT=ACCEPTED:Mailto:B@example.com -UID:calsrv.example.com-873970198738777-00@example.com -COMMENT:I'll send you my input by e-mail -SEQUENCE:0 -DTSTAMP:19970717T203000Z -REQUEST-STATUS:2.0;Success -END:VTODO -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:REQUEST -VERSION:2.0 -BEGIN:VTODO -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR:Mailto:A@example.com -ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:Mailto:B@example.com -ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:Mailto:D@example.com -UID:calsrv.example.com-873970198738777-00@example.com -SUMMARY:Create the requirements document -PRIORITY:1 -SEQUENCE:0 -STATUS:IN-PROCESS -DTSTART:19970701T170000Z -DTSTAMP:19970717T230000Z -END:VTODO -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:REPLY -VERSION:2.0 -BEGIN:VTODO -ORGANIZER:MAILTO:A@example.com -ATTENDEE;PARTSTAT=IN-PROCESS:Mailto:B@example.com -PERCENT-COMPLETE:75 -UID:calsrv.example.com-873970198738777-00@example.com -DTSTAMP:19970717T233000Z -SEQUENCE:0 -END:VTODO -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:REPLY -VERSION:2.0 -BEGIN:VTODO -ORGANIZER:MAILTO:A@example.com -ATTENDEE;PARTSTAT=COMPLETED:Mailto:D@example.com -UID:calsrv.example.com-873970198738777-00@example.com -DTSTAMP:19970717T233000Z -SEQUENCE:0 -END:VTODO -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:REQUEST -VERSION:2.0 -BEGIN:VTODO -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com -ATTENDEE;PARTSTAT=ACCEPTED;CUTYPE=INDIVIDUAL:Mailto:B@example.com -ATTENDEE;PARTSTAT=IN-PROCESS;CUTYPE=INDIVIDUAL:Mailto:D@example.com -DTSTART:19970701T170000Z -DUE:19970722T170000Z -PRIORITY:1 -SUMMARY:Create the requirements document -UID:calsrv.example.com-873970198738777-00@example.com -SEQUENCE:1 -DTSTAMP:19970718T100000Z -STATUS:IN-PROGRESS -PERCENT-COMPLETE:40 -END:VTODO -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:REQUEST -VERSION:2.0 -BEGIN:VTODO -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR:Mailto:A@example.com -ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:Mailto:B@example.com -ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:Mailto:D@example.com -RRULE:FREQ=MONTHLY;COUNT=10;BYDAY=1FR -DTSTART:19980101T100000 -DUE:19980103T100000 -SUMMARY:Send Status Reports to Area Managers -UID:calsrv.example.com-873970198738777-00@example.com -SEQUENCE:0 -DTSTAMP:19970717T200000Z -STATUS:NEEDS ACTION -PRIORITY:1 -END:VTODO -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:REPLY -VERSION:2.0 -BEGIN:VTODO -ATTENDEE;PARTSTAT=IN-PROCESS:Mailto:B@example.com -PERCENT-COMPLETE:75 -UID:calsrv.example.com-873970198738777-00@example.com -DTSTAMP:19970717T233000Z -RECURRENCE-ID:19980101T170000Z -SEQUENCE:1 -END:VTODO -END:VCALENDAR -BEGIN:VCALENDAR -METHOD:PUBLISH -PRODID:-//ACME/DesktopCalendar//EN -VERSION:2.0 -BEGIN:VJOURNAL -DTSTART:19971002T200000Z -ORGANIZER:MAILTO:A@Example.com -SUMMARY:Phone conference minutes -DESCRIPTION:The editors meeting was held on October 1, 1997. - Details are in the attached document. -UID:0981234-1234234-2410@example.com -RELATED-TO:0981234-1234234-2402-35@example.com -ATTACH:ftp://ftp.example.com/pub/ed/minutes100197.txt -END:VJOURNAL -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//RDU Software//NONSGML HandCal//EN -METHOD:REFRESH -VERSION:2.0 -BEGIN:VEVENT -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com -ATTENDEE:Mailto:B@example.com -ATTENDEE:Mailto:C@example.com -ATTENDEE:Mailto:D@example.com -UID: guid-1-12345@host1.com -DTSTAMP:19970603T094000 -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD:REQUEST -PRODID:-//RDU Software//NONSGML HandCal//EN -VERSION:2.0 -BEGIN:VEVENT -UID:acme-12345@host1.com -SEQUENCE:3 -RRULE:FREQ=WEEKLY -RDATE;VALUE=PERIOD:19970819T210000Z/199700819T220000Z -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com -ATTENDEE:Mailto:B@example.com -DESCRIPTION:IETF-C&S Conference Call -SUMMARY:IETF Calendaring Working Group Meeting -DTSTART:19970801T210000Z -DTEND:19970801T220000Z -RECURRENCE-ID:19970809T210000Z -DTSTAMP:19970726T083000 -STATUS:CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//RDU Software//NONSGML HandCal//EN -METHOD:REFRESH -VERSION:2.0 -BEGIN:VEVENT -ORGANIZER:Mailto:A@example.com -ATTENDEE:Mailto:B@example.com -UID:acme-12345@host1.com -DTSTAMP:19970603T094000 -END:VEVENT -END:VCALENDAR -END:VCALENDAR \ No newline at end of file diff --git a/libical/test-data/2446.vcd b/libical/test-data/2446.vcd deleted file mode 100644 index 679f6c7920..0000000000 --- a/libical/test-data/2446.vcd +++ /dev/null @@ -1,1007 +0,0 @@ -BEGIN:VCALENDAR -X-LIC-CLUSTERCOUNT - :0 -DTSTART - :00000000T000000 -DTEND - :00000000T000000 -BEGIN:VCALENDAR -METHOD:PUBLISH -PRODID:-//ACME/DesktopCalendar//EN -VERSION:2.0 -BEGIN:VEVENT -ORGANIZER:mailto:a@example.com -DTSTART:19970701T200000Z -DTSTAMP:19970611T190000Z -SUMMARY:ST. PAUL SAINTS -VS- DULUTH-SUPERIOR DUKES -UID:0981234-1234234-23@example.com -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD:PUBLISH -VERSION:2.0 -PRODID:-//ACME/DesktopCalendar//EN -BEGIN:VEVENT -ORGANIZER:mailto:a@example.com -DTSTAMP:19970612T190000Z -DTSTART:19970701T210000Z -DTEND:19970701T230000Z -SEQUENCE:1 -UID:0981234-1234234-23@example.com -SUMMARY:ST. PAUL SAINTS -VS- DULUTH-SUPERIOR DUKES -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD:CANCEL -VERSION:2.0 -PRODID:-//ACME/DesktopCalendar//EN -BEGIN:VEVENT -ORGANIZER:mailto:a@example.com -COMMENT:DUKES forfeit the game -SEQUENCE:2 -UID:0981234-1234234-23@example.com -DTSTAMP:19970613T190000Z -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:PUBLISH -SCALE:GREGORIAN -VERSION:2.0 -BEGIN:VTIMEZONE -TZID:America-Chicago -TZURL:http://zones.stds_r_us.net/tz/America-Chicago -BEGIN:STANDARD -DTSTART:19671029T020000 -RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10 -TZOFFSETFROM:-0500 -TZOFFSETTO:-0600 -TZNAME:CST -END:STANDARD -BEGIN:DAYLIGHT -DTSTART:19870405T020000 -RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4 -TZOFFSETFROM:-0600 -TZOFFSETTO:-0500 -TZNAME:CDT -END:DAYLIGHT -END:VTIMEZONE -BEGIN:VEVENT -ORGANIZER:mailto:a@example.com -ATTACH:http://www.dukes.com/ -CATEGORIES:SPORTS EVENT,ENTERTAINMENT -CLASS:PRIVATE -DESCRIPTION:MIDWAY STADIUM\n - Big time game. MUST see.\n - Expected duration:2 hours\n -DTEND;TZID=America-Chicago:19970701T180000 -DTSTART;TZID=America-Chicago:19970702T160000 -DTSTAMP:19970614T190000Z -STATUS:CONFIRMED -LOCATION;VALUE=URI:http://www.midwaystadium.com/ -PRIORITY:2 -RESOURCES:SCOREBOARD -SEQUENCE:3 -SUMMARY:ST. PAUL SAINTS -VS- DULUTH-SUPERIOR DUKES -UID:0981234-1234234-23@example.com -RELATED-TO:0981234-1234234-14@example.com -BEGIN:VALARM -TRIGGER:-PT2H -ACTION:DISPLAY -DESCRIPTION:You should be leaving for the game now. -END:VALARM -BEGIN:VALARM -TRIGGER:-PT30M -ACTION:AUDIO -END:VALARM -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:PUBLISH -VERSION:2.0 -BEGIN:VEVENT -ORGANIZER:mailto:a@example.com -DTSTAMP:19970614T190000Z -UID:0981234-1234234-23@example.com -DTSTART;VALUE=DATE:19970714 -RRULE:FREQ=YEARLY;INTERVAL=1 -SUMMARY: Bastille Day -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:REQUEST -VERSION:2.0 -BEGIN:VEVENT -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED;CN=BIG A:Mailto:A@example.com -ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL;CN=B:Mailto:B@example.com -ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL;CN=C:Mailto:C@example.com -ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL;CN=Hal:Mailto:D@example.com -ATTENDEE;RSVP=FALSE;CUTYPE=ROOM:conf_Big@example.com -ATTENDEE;ROLE=NON-PARTICIPANT;RSVP=FALSE:Mailto:E@example.com -DTSTAMP:19970611T190000Z -DTSTART:19970701T200000Z -DTEND:19970701T2000000Z -SUMMARY:Conference -UID:calsrv.example.com-873970198738777@example.com -SEQUENCE:0 -STATUS:CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:REPLY -VERSION:2.0 -BEGIN:VEVENT -ATTENDEE;PARTSTAT=ACCEPTED:Mailto:B@example.com -ORGANIZER:MAILTO:A@example.com -UID:calsrv.example.com-873970198738777@example.com -SEQUENCE:0 -REQUEST-STATUS:2.0;Success -DTSTAMP:19970612T190000Z -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:REQUEST -VERSION:2.0 -BEGIN:VEVENT -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com -ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:Mailto:B@example.com -ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:Mailto:C@example.com -ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL;CN=Hal:Mailto:D@example.com -ATTENDEE;ROLE=NON-PARTICIPANT;RSVP=FALSE; - CUTYPE=ROOM:Mailto:Conf@example.com -ATTENDEE;ROLE=NON-PARTICIPANT;RSVP=FALSE:Mailto:E@example.com -DTSTART:19970701T180000Z -DTEND:19970701T190000Z -SUMMARY:Phone Conference -UID:calsrv.example.com-873970198738777@example.com -SEQUENCE:1 -DTSTAMP:19970613T190000Z -STATUS:CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:REQUEST -VERSION:2.0 -BEGIN:VEVENT -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com -ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:Mailto:B@example.com -ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:Mailto:C@example.com -DTSTART:19970701T190000Z -DTEND:19970701T200000Z -SUMMARY:Discuss the Merits of the election results -LOCATION:Green Conference Room -UID:calsrv.example.com-873970198738777a@example.com -SEQUENCE:0 -DTSTAMP:19970611T190000Z -STATUS:CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:COUNTER -VERSION:2.0 -BEGIN:VEVENT -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com -ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:Mailto:B@example.com -ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:Mailto:C@example.com -DTSTART:19970701T160000Z -DTEND:19970701T190000Z -DTSTAMP:19970612T190000Z -SUMMARY:Discuss the Merits of the election results -LOCATION:Green Conference Room -COMMENT:This time works much better and I think the big conference - room is too big -UID:calsrv.example.com-873970198738777a@example.com -SEQUENCE:0 -DTSTAMP:19970611T190000Z -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:REQUEST -VERSION:2.0 -BEGIN:VEVENT -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com -ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:Mailto:B@example.com -ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:Mailto:C@example.com -DTSTAMP:19970613T190000Z -DTSTART:19970701T160000Z -DTEND:19970701T190000Z -SUMMARY:Discuss the Merits of the election results - changed to - meet B's schedule -LOCATION:Green Conference Room -UID:calsrv.example.com-873970198738777@example.com -SEQUENCE:1 -STATUS:CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:DECLINECOUNTER -VERSION:2.0 -BEGIN:VEVENT -ORGANIZER:Mailto:A@example.com -ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:Mailto:B@example.com -COMMENT:Sorry, I cannot change this meeting time -UID:calsrv.example.com-873970198738777@example.com -SEQUENCE:0 -DTSTAMP:19970614T190000Z -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:REPLY -VERSION:2.0 -BEGIN:VEVENT -ORGANIZER:MAILTO:A@Example.com -ATTENDEE;PARTSTAT=DELEGATED;DELEGATED- - TO="Mailto:E@example.com":Mailto:C@example.com -UID:calsrv.example.com-873970198738777@example.com -SEQUENCE:0 -REQUEST-STATUS:2.0;Success -DTSTAMP:19970611T190000Z -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:REQUEST -VERSION:2.0 -BEGIN:VEVENT -ORGANIZER:Mailto:A@example.com -ATTENDEE;PARTSTAT=DELEGATED;DELEGATED- - TO="Mailto:E@example.com":Mailto:C@example.com -ATTENDEE;RSVP=TRUE; - DELEGATED-FROM="Mailto:C@example.com":Mailto:E@example.com -DTSTART:19970701T180000Z -DTEND:19970701T200000Z -SUMMARY:Phone Conference -UID:calsrv.example.com-873970198738777@example.com -SEQUENCE:0 -STATUS:CONFIRMED -DTSTAMP:19970611T190000Z -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:REPLY -VERSION:2.0 -BEGIN:VEVENT -ORGANIZER:MAILTO:A@Example.com -ATTENDEE;PARTSTAT=ACCEPTED;DELEGATED- - FROM="Mailto:C@example.com":Mailto:E@example.com -ATTENDEE;PARTSTAT=DELEGATED; - DELEGATED-TO="Mailto:E@example.com":Mailto:C@example.com -UID:calsrv.example.com-873970198738777@example.com -SEQUENCE:0 -REQUEST-STATUS:2.0;Success -DTSTAMP:19970614T190000Z -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:REPLY -VERSION:2.0 -BEGIN:VEVENT -ORGANIZER:MAILTO:A@Example.com -ATTENDEE;PARTSTAT=DELEGATED; - DELEGATED-TO="Mailto:E@example.com":Mailto:C@example.com -ATTENDEE;PARTSTAT=DECLINED; - DELEGATED-FROM="Mailto:C@example.com":Mailto:E@example.com -COMMENT:Sorry, I will be out of town at that time. -UID:calsrv.example.com-873970198738777@example.com -SEQUENCE:0 -REQUEST-STATUS:2.0;Success -DTSTAMP:19970614T190000Z -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:REQUEST -VERSION:2.0 -BEGIN:VEVENT -ORGANIZER:MAILTO:A@Example.com -ATTENDEE;PARTSTAT=DECLINED; - DELEGATED-FROM="Mailto:C@example.com":Mailto:E@example.com -ATTENDEE;RSVP=TRUE:Mailto:C@example.com -UID:calsrv.example.com-873970198738777@example.com -SEQUENCE:0 -SUMMARY:Phone Conference -DTSTART:19970701T180000Z -DTEND:19970701T200000Z -DTSTAMP:19970614T200000Z -COMMENT:DELEGATE (ATTENDEE Mailto:E@example.com) DECLINED YOUR - INVITATION -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:CANCEL -VERSION:2.0 -BEGIN:VEVENT -ORGANIZER:Mailto:A@example.com -ATTENDEE;CUTYPE=INDIVIDUAL:Mailto:A@example.com -ATTENDEE;CUTYPE=INDIVIDUAL:Mailto:B@example.com -ATTENDEE;CUTYPE=INDIVIDUAL:Mailto:C@example.com -ATTENDEE;CUTYPE=INDIVIDUAL:Mailto:D@example.com -COMMENT:Mr. B cannot attend. It's raining. Lets cancel. -UID:calsrv.example.com-873970198738777@example.com -SEQUENCE:1 -STATUS:CANCELLED -DTSTAMP:19970613T190000Z -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:CANCEL -VERSION:2.0 -BEGIN:VEVENT -ORGANIZER:Mailto:A@example.com -ATTENDEE:mailto:B@example.com -COMMENT:You're off the hook for this meeting -UID:calsrv.example.com-873970198738777@example.com -DTSTAMP:19970613T193000Z -SEQUENCE:1 -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:REQUEST -VERSION:2.0 -BEGIN:VEVENT -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com -ATTENDEE;CUTYPE=INDIVIDUAL:Mailto:C@example.com -ATTENDEE;CUTYPE=INDIVIDUAL:Mailto:D@example.com -ATTENDEE;CUTYPE=ROOM:CR_Big@example.com -ATTENDEE;ROLE=NON-PARTICIPANT; - RSVP=FALSE:Mailto:E@example.com -DTSTAMP:19970611T190000Z -DTSTART:19970701T200000Z -DTEND:19970701T203000Z -SUMMARY:Phone Conference -UID:calsrv.example.com-873970198738777@example.com -SEQUENCE:2 -STATUS:CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:REQUEST -VERSION:2.0 -BEGIN:VEVENT -ORGANIZER:Mailto:B@example.com -ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:B@example.com -ATTENDEE;CUTYPE=INDIVIDUAL:Mailto:C@example.com -ATTENDEE;CUTYPE=INDIVIDUAL:Mailto:D@example.com -DTSTAMP:19970611T190000Z -DTSTART:19970701T200000Z -DTEND:19970701T203000Z -RRULE:FREQ=WEEKLY -SUMMARY:Phone Conference -UID:123456@example.com -SEQUENCE:1 -STATUS:CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -VERSION:2.0 -METHOD:PUBLISH -BEGIN:VFREEBUSY -DTSTAMP:19980101T124100Z -ORGANIZER:MAILTO:A@Example.com -DTSTART:19980101T124200Z -DTEND:19980107T124200Z -FREEBUSY:19980101T180000Z/19980101T190000Z -FREEBUSY:19980103T020000Z/19980103T050000Z -FREEBUSY:19980107T020000Z/19980107T050000Z -FREEBUSY:19980113T000000Z/19980113T010000Z -FREEBUSY:19980115T190000Z/19980115T200000Z -FREEBUSY:19980115T220000Z/19980115T230000Z -FREEBUSY:19980116T013000Z/19980116T043000Z -END:VFREEBUSY -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:REQUEST -VERSION:2.0 -BEGIN:VFREEBUSY -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR:Mailto:A@example.com -ATTENDEE:Mailto:B@example.com -ATTENDEE:Mailto:C@example.com -DTSTAMP:19970613T190000Z -DTSTART:19970701T080000Z -DTEND:19970701T200000 -UID:calsrv.example.com-873970198738777@example.com -END:VFREEBUSY -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:REPLY -VERSION:2.0 -BEGIN:VFREEBUSY -ORGANIZER:MAILTO:A@example.com -ATTENDEE:Mailto:B@example.com -DTSTART:19970701T080000Z -DTEND:19970701T200000Z -UID:calsrv.example.com-873970198738777@example.com -FREEBUSY:19970701T090000Z/PT1H,19970701T140000Z/PT30M -DTSTAMP:19970613T190030Z -END:VFREEBUSY -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:REQUEST -VERSION:2.0 -BEGIN:VTIMEZONE -TZID:America-SanJose -TZURL:http://zones.stds_r_us.net/tz/America-SanJose -BEGIN:STANDARD -DTSTART:19671029T020000 -RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10 -TZOFFSETFROM:-0700 -TZOFFSETTO:-0800 -TZNAME:PST -END:STANDARD -BEGIN:DAYLIGHT -DTSTART:19870405T020000 -RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4 -TZOFFSETFROM:-0800 -TZOFFSETTO:-0700 -TZNAME:PDT -END:DAYLIGHT -END:VTIMEZONE -BEGIN:VEVENT -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED;CUTYPE=INDIVIDUAL:A@example.COM -ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:B@example.fr -ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:c@example.jp -DTSTAMP:19970613T190030Z -DTSTART;TZID=America-SanJose:19970701T140000 -DTEND;TZID=America-SanJose:19970701T150000 -RRULE:FREQ=WEEKLY;INTERVAL=20;WKST=SU;BYDAY=TU -RDATE;TZID=America-SanJose:19970910T140000 -EXDATE;TZID=America-SanJose:19970909T140000 -EXDATE;TZID=America-SanJose:19971028T140000 -SUMMARY:Weekly Phone Conference -UID:calsrv.example.com-873970198738777@example.com -SEQUENCE:0 -STATUS:CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD:REQUEST -PRODID:-//RDU Software//NONSGML HandCal//EN -VERSION:2.0 -BEGIN:VEVENT -UID:guid-1@host1.com -SEQUENCE:0 -RRULE:FREQ=MONTHLY;BYMONTHDAY=1;UNTIL=19980901T210000Z -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com -ATTENDEE:Mailto:B@example.com -ATTENDEE:Mailto:C@example.com -ATTENDEE:Mailto:D@example.com -DESCRIPTION:IETF-C&S Conference Call -CLASS:PUBLIC -SUMMARY:IETF Calendaring Working Group Meeting -DTSTART:19970601T210000Z -DTEND:19970601T220000Z -LOCATION:Conference Call -DTSTAMP:19970526T083000Z -STATUS:CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD:REQUEST -PRODID:-//RDU Software//NONSGML HandCal//EN -VERSION:2.0 -BEGIN:VEVENT -UID:guid-1@host1com -RECURRENCE-ID:19970701T210000Z -SEQUENCE:1 -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com -ATTENDEE:Mailto:B@example.com -ATTENDEE:Mailto:C@example.com -ATTENDEE:Mailto:D@example.com -DESCRIPTION:IETF-C&S Conference Call -CLASS:PUBLIC -SUMMARY:IETF Calendaring Working Group Meeting -DTSTART:19970703T210000Z -DTEND:19970703T220000Z -LOCATION:Conference Call -DTSTAMP:19970626T093000Z -STATUS:CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD:CANCEL -PRODID:-//RDU Software//NONSGML HandCal//EN -VERSION:2.0 -BEGIN:VEVENT -UID:guid-1@host1.com -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com -ATTENDEE:Mailto:B@example.com -ATTENDEE:Mailto:C@example.com -ATTENDEE:Mailto:D@example.com -RECURRENCE-ID:19970801T210000Z -SEQUENCE:2 -STATUS:CANCELLED -DTSTAMP:19970721T093000Z -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD:CANCEL -PRODID:-//RDU Software//NONSGML HandCal//EN -VERSION:2.0 -BEGIN:VEVENT -UID:guid-1@host1.com -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com -ATTENDEE:Mailto:B@example.com -ATTENDEE:Mailto:C@example.com -ATTENDEE:Mailto:D@example.com -DTSTAMP:19970721T103000Z -STATUS:CANCELLED -SEQUENCE:3 -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD:REQUEST -PRODID:-//RDU Software//NONSGML HandCal//EN -VERSION:2.0 -BEGIN:VEVENT -UID:guid-1@host1.com -RECURRENCE-ID;RANGE=THISANDFUTURE:19970901T210000Z -SEQUENCE:3 -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com -ATTENDEE;RSVP=TRUE:Mailto:B@example.com -ATTENDEE;RSVP=TRUE:Mailto:C@example.com -ATTENDEE;RSVP=TRUE:Mailto:D@example.com -DESCRIPTION:IETF-C&S Discussion -CLASS:PUBLIC -SUMMARY:IETF Calendaring Working Group Meeting -DTSTART:19970901T210000Z -DTEND:19970901T220000Z -LOCATION:Building 32, Microsoft, Seattle, WA -DTSTAMP:19970526T083000Z -STATUS:CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD:ADD -PRODID:-//RDU Software//NONSGML HandCal//EN -VERSION:2.0 -BEGIN:VEVENT -UID:123456789@host1.com -SEQUENCE:4 -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com -ATTENDEE;RSVP=TRUE:Mailto:B@example.com -ATTENDEE;RSVP=TRUE:Mailto:C@example.com -ATTENDEE;RSVP=TRUE:Mailto:D@example.com -DESCRIPTION:IETF-C&S Conference Call -CLASS:PUBLIC -SUMMARY:IETF Calendaring Working Group Meeting -DTSTART:19970715T210000Z -DTEND:19970715T220000Z -LOCATION:Conference Call -DTSTAMP:19970629T093000Z -STATUS:CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD:REQUEST -PRODID:-//RDU Software//NONSGML HandCal//EN -VERSION:2.0 -BEGIN:VEVENT -UID:123456789@host1.com -SEQUENCE:0 -RRULE:FREQ=WEEKLY;WKST=SU;BYDAY=TU -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com -ATTENDEE;RSVP=TRUE:Mailto:B@example.com -SUMMARY:Review Accounts -DTSTART:19980303T210000Z -DTEND:19980303T220000Z -LOCATION:The White Room -DTSTAMP:19980301T093000Z -STATUS:CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD:ADD -PRODID:-//RDU Software//NONSGML HandCal//EN -VERSION:2.0 -BEGIN:VEVENT -UID:123456789@host1.com -SEQUENCE:7 -RRULE:WKST=SU;BYDAY=TH;FREQ=WEEKLY -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com -ATTENDEE;RSVP=TRUE:Mailto:B@example.com -SUMMARY:Review Accounts -DTSTART:19980303T210000Z -DTEND:19980303T220000Z -DTSTAMP:19980303T193000Z -LOCATION:The Usual conference room -STATUS:CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD:REQUEST -PRODID:-//RDU Software//NONSGML HandCal//EN -VERSION:2.0 -BEGIN:VEVENT -UID:123456789@host1.com -SEQUENCE:7 -RRULE:WKST=SU;BYDAY=TU,TH;FREQ=WEEKLY -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com -ATTENDEE;RSVP=TRUE:Mailto:B@example.com -SUMMARY:Review Accounts -DTSTART:19980303T210000Z -DTEND:19980303T220000Z -DTSTAMP:19980303T193000Z -LOCATION:The White Room -STATUS:CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD:REQUEST -PRODID:-//RDU Software//NONSGML HandCal//EN -VERSION:2.0 -BEGIN:VEVENT -UID:123456789@host1.com -SEQUENCE:0 -RDATE:19980304T180000Z -RDATE:19980311T180000Z -RDATE:19980318T180000Z -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com -ATTENDEE;RSVP=TRUE:Mailto:B@example.com -SUMMARY:Review Accounts -DTSTART:19980304T180000Z -DTEND:19980304T200000Z -DTSTAMP:19980303T193000Z -LOCATION:Conference Room A -STATUS:CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD:REQUEST -PRODID:-//RDU Software//NONSGML HandCal//EN -VERSION:2.0 -BEGIN:VEVENT -UID:123456789@host1.com -SEQUENCE:1 -RECURRENCE-ID:19980311T180000Z -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com -ATTENDEE;RSVP=TRUE:Mailto:B@example.com -SUMMARY:Review Accounts -DTSTART:19980311T160000Z -DTEND:19980311T180000Z -DTSTAMP:19980306T193000Z -LOCATION:The Small conference room -STATUS:CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD:ADD -PRODID:-//RDU Software//NONSGML HandCal//EN -VERSION:2.0 -BEGIN:VEVENT -UID:123456789@host1.com -SEQUENCE:2 -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com -ATTENDEE;RSVP=TRUE:Mailto:B@example.com -SUMMARY:Review Accounts -DTSTART:19980315T180000Z -DTEND:19980315T200000Z -DTSTAMP:19980307T193000Z -LOCATION:Conference Room A -STATUS:CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD:REQUEST -PRODID:-//RDU Software//NONSGML HandCal//EN -VERSION:2.0 -BEGIN:VEVENT -UID:123456789@host1.com -SEQUENCE:2 -RDATE:19980304T180000Z -RDATE:19980311T160000Z -RDATE:19980315T180000Z -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com -ATTENDEE;RSVP=TRUE:Mailto:B@example.com -SUMMARY:Review Accounts -DTSTART:19980304T180000Z -DTEND:19980304T200000Z -DTSTAMP:19980303T193000Z -LOCATION:Conference Room A -STATUS:CONFIRMED -END:VEVENT -BEGIN:VEVENT -SEQUENCE:2 -RECURRENCE-ID:19980311T160000Z -ATTENDEE;ROLE=CHAIR;RSVP=TRUE:Mailto:A@example.com -ATTENDEE;RSVP=TRUE:Mailto:B@example.com -SUMMARY:Review Accounts -DTSTART:19980311T160000Z -DTEND:19980304T180000Z -DTSTAMP:19980306T193000Z -LOCATION:The Small conference room -STATUS:CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD:COUNTER -PRODID:-//RDU Software//NONSGML HandCal//EN -VERSION:2.0 -BEGIN:VEVENT -UID:guid-1@host1.com -RECURRENCE-ID:19970715T210000Z -SEQUENCE:4 -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR;RSVP=TRUE:Mailto:A@example.com -ATTENDEE;RSVP=TRUE:Mailto:B@example.com -ATTENDEE;RSVP=TRUE:Mailto:C@example.com -ATTENDEE;RSVP=TRUE:Mailto:D@example.com -DESCRIPTION:IETF-C&S Conference Call -CLASS:PUBLIC -SUMMARY:IETF Calendaring Working Group Meeting -DTSTART:19970715T220000Z -DTEND:19970715T230000Z -LOCATION:Conference Call -COMMENT:May we bump this by an hour? I have a conflict -DTSTAMP:19970629T094000Z -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD:REQUEST -PRODID:-//RDU Software//NONSGML HandCal//EN -VERSION:2.0 -BEGIN:VEVENT -UID:guid-1@host1.com -SEQUENCE:0 -RRULE:FREQ=MONTHLY;BYMONTHDAY=1 -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR:Mailto:A@example.com -ATTENDEE;RSVP=TRUE:Mailto:B@example.com -ATTENDEE;RSVP=TRUE:Mailto:C@example.com -ATTENDEE;RSVP=TRUE:Mailto:D@example.com -DESCRIPTION:IETF-C&S Conference Call -CLASS:PUBLIC -SUMMARY:IETF Calendaring Working Group Meeting -DTSTART:19970601T210000Z -DTEND:19970601T220000Z -DTSTAMP:19970602T094000Z -LOCATION:Conference Call -STATUS:CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//RDU Software//NONSGML HandCal//EN -METHOD:REPLY -VERSION:2.0 -BEGIN:VEVENT -ORGANIZER:Mailto:A@example.com -ATTENDEE:Mailto:B@example.com -REQUEST-STATUS:2.8;Repeating event ignored. Scheduled as a single - event;RRULE -REQUEST-STATUS:3.0;Invalid Property Name;FOO -UID:guid-1@host1.com -SEQUENCE:0 -DTSTAMP:19970603T094000Z -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:REQUEST -VERSION:2.0 -BEGIN:VTODO -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR:Mailto:A@example.com -ATTENDEE;RSVP=TRUE:Mailto:B@example.com -ATTENDEE;RSVP=TRUE:Mailto:C@example.com -ATTENDEE;RSVP=TRUE:Mailto:D@example.com -DTSTART:19970701T170000Z -DUE:19970722T170000Z -PRIORITY:1 -SUMMARY:Create the requirements document -UID:calsrv.example.com-873970198738777-00@example.com -SEQUENCE:0 -DTSTAMP:19970717T200000Z -STATUS:Needs Action -END:VTODO -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:REPLY -VERSION:2.0 -BEGIN:VTODO -ORGANIZER:Mailto:A@example.com -ATTENDEE;PARTSTAT=ACCEPTED:Mailto:B@example.com -UID:calsrv.example.com-873970198738777-00@example.com -COMMENT:I'll send you my input by e-mail -SEQUENCE:0 -DTSTAMP:19970717T203000Z -REQUEST-STATUS:2.0;Success -END:VTODO -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:REQUEST -VERSION:2.0 -BEGIN:VTODO -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR:Mailto:A@example.com -ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:Mailto:B@example.com -ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:Mailto:D@example.com -UID:calsrv.example.com-873970198738777-00@example.com -SUMMARY:Create the requirements document -PRIORITY:1 -SEQUENCE:0 -STATUS:IN-PROCESS -DTSTART:19970701T170000Z -DTSTAMP:19970717T230000Z -END:VTODO -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:REPLY -VERSION:2.0 -BEGIN:VTODO -ORGANIZER:MAILTO:A@example.com -ATTENDEE;PARTSTAT=IN-PROCESS:Mailto:B@example.com -PERCENT-COMPLETE:75 -UID:calsrv.example.com-873970198738777-00@example.com -DTSTAMP:19970717T233000Z -SEQUENCE:0 -END:VTODO -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:REPLY -VERSION:2.0 -BEGIN:VTODO -ORGANIZER:MAILTO:A@example.com -ATTENDEE;PARTSTAT=COMPLETED:Mailto:D@example.com -UID:calsrv.example.com-873970198738777-00@example.com -DTSTAMP:19970717T233000Z -SEQUENCE:0 -END:VTODO -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:REQUEST -VERSION:2.0 -BEGIN:VTODO -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com -ATTENDEE;PARTSTAT=ACCEPTED;CUTYPE=INDIVIDUAL:Mailto:B@example.com -ATTENDEE;PARTSTAT=IN-PROCESS;CUTYPE=INDIVIDUAL:Mailto:D@example.com -DTSTART:19970701T170000Z -DUE:19970722T170000Z -PRIORITY:1 -SUMMARY:Create the requirements document -UID:calsrv.example.com-873970198738777-00@example.com -SEQUENCE:1 -DTSTAMP:19970718T100000Z -STATUS:IN-PROGRESS -PERCENT-COMPLETE:40 -END:VTODO -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:REQUEST -VERSION:2.0 -BEGIN:VTODO -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR:Mailto:A@example.com -ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:Mailto:B@example.com -ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:Mailto:D@example.com -RRULE:FREQ=MONTHLY;COUNT=10;BYDAY=1FR -DTSTART:19980101T100000 -DUE:19980103T100000 -SUMMARY:Send Status Reports to Area Managers -UID:calsrv.example.com-873970198738777-00@example.com -SEQUENCE:0 -DTSTAMP:19970717T200000Z -STATUS:NEEDS ACTION -PRIORITY:1 -END:VTODO -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//ACME/DesktopCalendar//EN -METHOD:REPLY -VERSION:2.0 -BEGIN:VTODO -ATTENDEE;PARTSTAT=IN-PROCESS:Mailto:B@example.com -PERCENT-COMPLETE:75 -UID:calsrv.example.com-873970198738777-00@example.com -DTSTAMP:19970717T233000Z -RECURRENCE-ID:19980101T170000Z -SEQUENCE:1 -END:VTODO -END:VCALENDAR -BEGIN:VCALENDAR -METHOD:PUBLISH -PRODID:-//ACME/DesktopCalendar//EN -VERSION:2.0 -BEGIN:VJOURNAL -DTSTART:19971002T200000Z -ORGANIZER:MAILTO:A@Example.com -SUMMARY:Phone conference minutes -DESCRIPTION:The editors meeting was held on October 1, 1997. - Details are in the attached document. -UID:0981234-1234234-2410@example.com -RELATED-TO:0981234-1234234-2402-35@example.com -ATTACH:ftp://ftp.example.com/pub/ed/minutes100197.txt -END:VJOURNAL -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//RDU Software//NONSGML HandCal//EN -METHOD:REFRESH -VERSION:2.0 -BEGIN:VEVENT -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com -ATTENDEE:Mailto:B@example.com -ATTENDEE:Mailto:C@example.com -ATTENDEE:Mailto:D@example.com -UID: guid-1-12345@host1.com -DTSTAMP:19970603T094000 -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -METHOD:REQUEST -PRODID:-//RDU Software//NONSGML HandCal//EN -VERSION:2.0 -BEGIN:VEVENT -UID:acme-12345@host1.com -SEQUENCE:3 -RRULE:FREQ=WEEKLY -RDATE;VALUE=PERIOD:19970819T210000Z/199700819T220000Z -ORGANIZER:Mailto:A@example.com -ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:Mailto:A@example.com -ATTENDEE:Mailto:B@example.com -DESCRIPTION:IETF-C&S Conference Call -SUMMARY:IETF Calendaring Working Group Meeting -DTSTART:19970801T210000Z -DTEND:19970801T220000Z -RECURRENCE-ID:19970809T210000Z -DTSTAMP:19970726T083000 -STATUS:CONFIRMED -END:VEVENT -END:VCALENDAR -BEGIN:VCALENDAR -PRODID:-//RDU Software//NONSGML HandCal//EN -METHOD:REFRESH -VERSION:2.0 -BEGIN:VEVENT -ORGANIZER:Mailto:A@example.com -ATTENDEE:Mailto:B@example.com -UID:acme-12345@host1.com -DTSTAMP:19970603T094000 -END:VEVENT -END:VCALENDAR -END:VCALENDAR \ No newline at end of file diff --git a/libical/test-data/3 b/libical/test-data/3 deleted file mode 100644 index 008373ebfa..0000000000 --- a/libical/test-data/3 +++ /dev/null @@ -1,21 +0,0 @@ -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//ABC Corporation//NONSGML My Product//EN -BEGIN:VTODO -DTSTAMP:19980130T134500Z -SEQUENCE:2 -UID:uid4@host1.com -ORGANIZER:MAILTO:unclesam@us.gov -ATTENDEE;PARTSTAT=ACCEPTED:MAILTO:jqpublic@host.com -DUE:19980415T235959 -STATUS:NEEDS-ACTION -SUMMARY:Submit Income Taxes -BEGIN:VALARM -ACTION:AUDIO -TRIGGER;VALUE=DATE-TIME:19980403T120000 -ATTACH;FMTTYPE=audio/basic:http://host.com/pub/audio-files/ssbanner.aud -REPEAT:4 -DURATION:PT1H -END:VALARM -END:VTODO -END:VCALENDAR diff --git a/libical/test-data/4 b/libical/test-data/4 deleted file mode 100644 index 59c3d6917b..0000000000 --- a/libical/test-data/4 +++ /dev/null @@ -1,23 +0,0 @@ -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//ABC Corporation//NONSGML My Product//EN -BEGIN:VJOURNAL -DTSTAMP:19970324T120000Z -UID:uid5@host1.com -ORGANIZER:MAILTO:jsmith@host.com -STATUS:DRAFT -CLASS:PUBLIC -CATEGORIES:Project Report, XYZ: Weekly Meeting -DESCRIPTION:Project xyz Review Meeting Minutes\n - Agenda\n1. Review of project version 1.0 requirements.\n2. - Definition - of project processes.\n3. Review of project schedule.\n - Participants: John Smith\, Jane Doe\, Jim Dandy\n-It was - decided that the requirements need to be signed off by - product marketing.\n-Project processes were accepted.\n - -Project schedule needs to account for scheduled holidays - and employee vacation time. Check with HR for specific - dates.\n-New schedule will be distributed by Friday.\n- - Next weeks meeting is cancelled. No meeting until 3/23. -END:VJOURNAL -END:VCALENDAR diff --git a/libical/test-data/5 b/libical/test-data/5 deleted file mode 100644 index ba1fd09f7f..0000000000 --- a/libical/test-data/5 +++ /dev/null @@ -1,16 +0,0 @@ -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//RDU Software//NONSGML HandCal//EN -BEGIN:VFREEBUSY -ORGANIZER:MAILTO:jsmith@host.com -DTSTART:19980313T141711Z -DTEND:19980410T141711 -FREEBUSY:19980314T233000Z/19980315T003000Z -FREEBUSY:19980316T153000Z/19980316T163000Z -FREEBUSY:19980318T030000/19980318T040000,19980318T030000/19980318T040000 -URL:http://www.host.com/calendar/busytime/jsmith.ifb -END:VFREEBUSY -END:VCALENDAR - - - diff --git a/libical/test-data/6 b/libical/test-data/6 deleted file mode 100644 index e0214b5021..0000000000 --- a/libical/test-data/6 +++ /dev/null @@ -1,21 +0,0 @@ -BEGIN:VCALENDAR -PRODID:-//GNOME//NONSGML GnomeCalendar//EN -VERSION:0.0.1 -BEGIN:VEVENT -UID:0981234-1234234-23@example.com -SEQUENCE:0 -DTSTART:19970701T200000 -DTEND:19691231T160000 -DCREATED:19691231T160000 -LAST-MODIFIED:20000216T083225 -SUMMARY:ST. PAUL SAINTS -VS- DULUTH-SUPERIOR DUKES -STATUS:NEEDS ACTION -CLASS:PUBLIC -PRIORITY:0 -TRANSP:0 -X-PILOTID:0 -X-PILOTSTAT:1 -END:VEVENT - -END:VCALENDAR - diff --git a/libical/test-data/7 b/libical/test-data/7 deleted file mode 100644 index 0a255fc514..0000000000 --- a/libical/test-data/7 +++ /dev/null @@ -1,14 +0,0 @@ -BEGIN:VCALENDAR -METHOD:PUBLISH -VERSION:2.0 -PRODID:-//ACME/DesktopCalendar//EN -BEGIN:VEVENT -ORGANIZER:mailto:a@example.com -DTSTAMP:19970612T190000Z -DTSTART:19970701T210000Z -DTEND:19970701T230000Z -SEQUENCE:1 -UID:0981234-1234234-23@example.com -SUMMARY:ST. PAUL SAINTS -VS- DULUTH-SUPERIOR DUKES -END:VEVENT -END:VCALENDAR diff --git a/libical/test-data/Makefile.am b/libical/test-data/Makefile.am deleted file mode 100644 index bf2079606c..0000000000 --- a/libical/test-data/Makefile.am +++ /dev/null @@ -1,13 +0,0 @@ -EXTRA_DIST = \ -0 \ -1 \ -1.1 \ -2 \ -2445.ics \ -2446.ics \ -3 \ -4 \ -5 \ -6 \ -7 \ -smallcluster.ics \ No newline at end of file diff --git a/libical/test-data/smallcluster.ics b/libical/test-data/smallcluster.ics deleted file mode 100644 index c4e2dbae50..0000000000 --- a/libical/test-data/smallcluster.ics +++ /dev/null @@ -1,18 +0,0 @@ -BEGIN:VCALENDAR -X-LIC-CLUSTERCOUNT - :0 -DTSTART - :00000000T000000 -DTEND - :00000000T000000 -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//hacksw/handcal//NONSGML v1.0//EN -BEGIN:VEVENT -DTSTART:19970714T170000Z -DTEND:19970715T035959Z -SUMMARY:Bastille Day Party -RRULE:FREQ=YEARLY;UNTIL=123456T123456;BYSETPOS=-1,2,-3,4,-5,6,-7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,4,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54;BYSECOND=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,4,25,26 -END:VEVENT -END:VCALENDAR -END:VCALENDAR diff --git a/libical/test-data/smallcluster.vcd b/libical/test-data/smallcluster.vcd deleted file mode 100644 index c4e2dbae50..0000000000 --- a/libical/test-data/smallcluster.vcd +++ /dev/null @@ -1,18 +0,0 @@ -BEGIN:VCALENDAR -X-LIC-CLUSTERCOUNT - :0 -DTSTART - :00000000T000000 -DTEND - :00000000T000000 -BEGIN:VCALENDAR -VERSION:2.0 -PRODID:-//hacksw/handcal//NONSGML v1.0//EN -BEGIN:VEVENT -DTSTART:19970714T170000Z -DTEND:19970715T035959Z -SUMMARY:Bastille Day Party -RRULE:FREQ=YEARLY;UNTIL=123456T123456;BYSETPOS=-1,2,-3,4,-5,6,-7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,4,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54;BYSECOND=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,4,25,26 -END:VEVENT -END:VCALENDAR -END:VCALENDAR diff --git a/libversit/.cvsignore b/libversit/.cvsignore deleted file mode 100644 index 36a99050c8..0000000000 --- a/libversit/.cvsignore +++ /dev/null @@ -1,9 +0,0 @@ -.deps -Makefile -Makefile.in -.libs -vcc.c -vcc.lo -vobject.lo -vcaltmp.lo -libversit.la \ No newline at end of file diff --git a/libversit/Makefile.am b/libversit/Makefile.am deleted file mode 100644 index 5d42636c1c..0000000000 --- a/libversit/Makefile.am +++ /dev/null @@ -1,15 +0,0 @@ - -noinst_LTLIBRARIES = libversit.la - -libversit_la_SOURCES = \ - vcc.y \ - vcc.h \ - vobject.c \ - vobject.h \ - port.h \ - vcaltmp.c \ - vcaltmp.h - -EXTRA_DIST = README.TXT vcaltest.c vctest.c - -YFLAGS=-pversit_ diff --git a/libversit/README.TXT b/libversit/README.TXT deleted file mode 100644 index c8ce8b0979..0000000000 --- a/libversit/README.TXT +++ /dev/null @@ -1,951 +0,0 @@ -NOTE: If you used the earlier APIs released by Versit -then you will want to look at the document "migrate.doc" -included with this package. It contains a discussion of -the differences between the old API and this one. - ----------------------------------------------------------------- - -The vCard/vCalendar C interface is implemented in the set -of files as follows: - -vcc.y, yacc source, and vcc.c, the yacc output you will use -implements the core parser - -vobject.c implements an API that insulates the caller from -the parser and changes in the vCard/vCalendar BNF - -port.h defines compilation environment dependent stuff - -vcc.h and vobject.h are header files for their .c counterparts - -vcaltmp.h and vcaltmp.c implement vCalendar "macro" functions -which you may find useful. - -test.c is a standalone test driver that exercises some of -the features of the APIs provided. Invoke test.exe on a -VCARD/VCALENDAR input text file and you will see the pretty -print output of the internal representation (this pretty print -output should give you a good idea of how the internal -representation looks like -- there is one such output in the -following too). Also, a file with the .out suffix is generated -to show that the internal representation can be written back -in the original text format. - ------------------------------------------------------------------ - - - VObject for VCard/VCalendar - -Table of Contents -================= -1. VObject -2. Internal Representations of VCard/VCalendar -3. Iterating Through VObject's Properties or Values -4. Pretty Printing a VObject Tree -5. Building A VObject Representation of A VCard/VCalendar -6. Converting A VObject Representation Into Its Textual Representation -7. Miscellaneous Notes On VObject APIs usages -8. Brief descriptions of each APIs -9. Additional Programming Notes. - -This document is mainly about the VObject and its APIs. The main -use of a VObject is to represent a VCard or a VCalendar inside -a program. However, its use is not limited to aforemention as it -can represent an arbitrary information that makes up of a tree or -forest of properties/values. - -1. VObject - ======= -A VObject can have a name (id) and a list of associated properties and -a value. Each property is itself a VObject. - -2. Internal Representations of VCard/VCalendar - =========================================== -A list of VCard or a VCalendar is represented by a list of VObjects. -The name (id) of the VObjects in the list is either VCCardProp or -VCCalProp. Each of these VObjects can have a list of properties. -Since a property is represented as a VObject, each of these properties -can have a name, a list of properties, and a value. - -For example, the input file "vobject.vcf": - -BEGIN:VCARD -N:Alden;Roland -FN:Roland H. Alden -ORG:AT&T;Versit Project Office -TITLE:Consultant -EMAIL;WORK;PREF;INTERNET:sf!rincon!ralden@alden.attmail.com -EMAIL;INTERNET:ralden@sfgate.com -EMAIL;MCIMail:242-2200 -LABEL;DOM;POSTAL;PARCEL;HOME;WORK;QUOTED-PRINTABLE:Roland H. Alden=0A= -Suite 2208=0A= -One Pine Street=0A= -San Francisco, CA 94111 -LABEL;POSTAL;PARCEL;HOME;WORK;QUOTED-PRINTABLE:Roland H. Alden=0A= -Suite 2208=0A= -One Pine Street=0A= -San Francisco, CA 94111=0A= -U.S.A. -TEL;WORK;PREF;MSG:+1 415 296 9106 -TEL;WORK;FAX:+1 415 296 9016 -TEL;MSG;CELL:+1 415 608 5981 -ADR:;Suite 2208;One Pine Street;San Francisco;CA;94111;U.S.A. -SOUND:ROW-LAND H ALL-DIN -LOGO;GIF;BASE64: - R0lGODdhpgBOAMQAAP///+/v797e3s7Ozr29va2trZycnIyMjHt7e2NjY1JSUkJC - QjExMSEhIRAQEO///87v9973/73n95zW71K13jGl1nvG50Kt3iGc1gCMzq3e94zO - 7xCU1nO952O15wAAACwAAAAApgBOAAAF/yAgjmRpnmiqrmzrvnAsz3Rt33iu73zv - /8CgcEj8QTaeywWTyWCUno2kSK0KI5tLc8vtNi+WiHVMlj0mFK96nalsxOW4fPSw - cNj4tQc+7xcjGh4WExJTJYUTFkp3eU0eEH6RkpOUlTARhRoWm5ydFpCWoS0QEqAu - ARKaHRcVjV0borEoFl0cSre4Sq67FA+yvwAeTU8XHZ7HmxS6u2wVfMCVpAE3pJoW - ylrMptDcOqSF4OHg3eQ5pInInb7lcc86mNbLzBXsZbRfUOn6ucyNHvVWJHCpQFDf - MWwEEzLqx2YCQCqF3OnItClJNmYcJD7cSAKTuI/gtnEcOQKkyVIk6/+ds5CkFcMM - 61LiENikwi1jBnNyuvUSjwWZOS5uIZarqNFcNl32XMMB6I06GgoJ+bZp1ZKeDl8E - +MC1K1cBIhZ4HUu2LAsCZdOWRQDt20lxIlccSHsgrNq7Xc/ixcsWmNu34WKyYJCW - gQjCe9XqTZy2L4pv04gg2sSKSc8OLgTcBSuWsdkVaD2TdXyiQxebFyjo1Gnx6tJm - LuaqrdtZtNfFtruSNmF5IKujwIsmJbjwtRqNJhrcNVw79wcRAgogmE4ArIjQzj/s - JvHAGCFDQR4UqigPK4sBe62XwO51OwADiMcqUG+iOdcFAL+hW20BfAoEexlwAnu6 - mZDAXQ1EVh//WfhxJB5gIbHgwFgOTOiVAgOuVQKAfKFg3weGwSBYFZMp4hpDGKyA - 3lgJKECWgiMQyBVpW+0V4oJjNfhCNkR1IgWEb21QlRK9GdfFCgeOZYBsXgm4noYj - GEBhAQHYh0J8XenoQnFGdrkUciJY6FUAK15ogozakcBhliKsyZWHDMZQ0wWC/Aim - DB6h01KRr/lXQgFxAqDcWDACgCZpUnrVQJtjwTnWjS6MWAYqqfDnSaEkJOlVXQBo - 2pWTMUJ53WgAuPncCR9q6VQMAYjZlXWJmknCoSUM2p4BC+SaKwG88hoZlvfFMM4f - hQh5TXkv+RklWYtC91mopJIAKFkJlDAW/wF25ShnLbeo5gmQ+1FGkJdrKCuCi2OR - BuwHBcwqKgABrMtVAgpem61XkLbAJ7n8uiIpvGVhO4KpH1QLbbpqLheZvQCkGoNL - thSzSTg2UGVBBzbtaxwKsYrmgLvRAlCmWgwMAADD66rKAgR3XlGspcdkZYK8ibU7 - asgEl+XAyB8I7PCqMWiWncGGimpfAgO4ypXSPpOVLwsRCDJxRD2AoyeRRv5kApO5 - fXwzwvfOKLKtaTWtbQxccmGLTZy8xYlVSvXbhbk0M2YzrYfJJ0K8m+V9NgxpyC04 - UycI/aiuiH9Y8NftDUwWp1Wm5UABnAUKwwRsPFGBt4Oc9PZvGvNLwf8JOZt8Arpe - eY23yDovwIDiBX74NAsPVLDJj3Hh4JEExsKcjrlKf9DsCVx3ZfLqAKBuG1s/A90C - z2KjYHjjyPOdG1spz6BBUr+BcUxUb1nDCTa/VZD2Uv+YkLPAKJC9dNEh7628WgqI - ybzlaA+ufxMa6bxC6ciLUQLcx5UGIAAsAkDA6wQkOxrcY39yo4cQMNWCAPTKV1R4 - wPkgaBxzOc8FtMiF1NoGoXBRJjgoPApmPsjCFlbMdzCM4TFy50IXxI2DPcHAv2rY - gghsEIeu8CAPW6ABIPYEFkOsAeaMyIz0JfGJUExBBGRIRX0IMYovWCIT1eBELNpA - i1vcgta8iANPCIQOghzQABl30J0tXqBla4wjFLFQxZzAUY42CIAd5OYBCuKxB2c4 - I0b28EcrQKADgmSKB9RYyDhA4BqCxIBqrtjIMTwoFeCjYSU3KZMQAAA7 - -BEGIN:VCALENDAR -DCREATED:19960523T100522 -PRODID:-//Alden Roland/Hand Crafted In North Carolina//NONSGML Made By Hand//EN -VERSION:0.3 -BEGIN:VEVENT -START:19960523T120000 -END:19960523T130000 -SUBTYPE:PHONE CALL -SUMMARY:VERSIT PDI PR Teleconference/Interview -DESCRIPTION:VERSIT PDI PR Teleconference/Interview With Tom Streeter and Alden Roland -END:VEVENT -BEGIN:VEVENT -START:19960523T113000 -END:19960523T115500 -SUBTYPE:LUNCH -SUMMARY:Eat in the cafeteria today -END:VEVENT -END:VCALENDAR - -END:VCARD - - -will conceptually be be represented as - vcard - VCNameProp - VCFamilyNameProp=Alden - VCGivenNameProp=Roland - VCFullNameProp=Roland H.Alden - .... - -note that - EMAIL;WORK;PREF;INTERNET:sf!rincon!ralden@alden.attmail.com -will be represented as: - VCEmailAddress=sf!rincon!ralden@alden.attmail.com - VCWork - VCPreferred - VCInternet -where the lower level properties are properties of the property -VCEmailAddress. - -Groupings are flattened out in the VObject representation such -that: - a.b:blah - a.c:blahblah -are represented as: - b=blah - VCGrouping=a - c=blahblah - VCGrouping=a -i.e. one can read the above as: - the property "b" has value "blah" and property "VCGrouping" - with the value "a". - the property "c" has value "blahblah" and property "VCGrouping" - with the value "a". -likewise, multi-level groupings are flatten similarly. e.g. - a.b.c:blah - a.b.e:blahblah ---> - c=blah - VCGrouping=b - VCGrouping=a - e=blahblah - VCGrouping=b - VCGrouping=a -which read: - the property "c" has value "blah" and property "VCGrouping" - with the value "b" which has property "VCGrouping" - with value "a". - the property "e" has value "blahblah" and property "VCGrouping" - with the value "b" which has property "VCGrouping" - with value "a". - -3. Iterating Through VObject's Properties or Values - ================================================ -The following is a skeletal form of iterating through -all properties of a vobject, o: - - // assume the object of interest, o, is of type VObject - VObjectIterator i; - initPropIterator(&i,o); - while (moreIteration(&i)) { - VObject *each = nextVObject(&i); - // ... do something with "each" property - } - -Use the API vObjectName() to access a VObject's name. -Use the API vObjectValueType() to determine if a VObject has - a value. For VCard/VCalendar application, you - should not need this function as practically - all values are either of type VCVT_USTRINGZ or - VCVT_RAW (i.e set by setVObjectUStringZValue and - setVObjectAnyValue APIs respectively), and the - value returned by calls to vObjectUStringZValue - and vObjectAnyValue are 0 if a VObject has no - value. (There is a minor exception where VObject with - VCDataSizeProp has value that is set by - setVObjectLongValue). -Use the APIs vObject???Value() to access a VObject's value. - where ??? is the expected type. -Use the APIs setvObject???Value() to set or modify a VObject's value. - where ??? is the expected type. -Use the API isAPropertyOf() to query if a name match the name of - a property of a VObject. Since isAPropertyOf() return - the matching property, we can use that to retrieve - a property and subsequently the value of the property. - -4. Pretty Printing a VObject Tree - ============================== -VObject tree can be pretty printed with the printVObject() function. -The output of pretty printing a VObject representation of the input -test file "vobject.vcf" is shown below. Note that the indentation -indicates the tree hirerarchy where the immediate children nodes -of a parent node is all at the same indentation level and the -immediate children nodes are the immediate properties of the -associated parent nodes. In the following, {N,FN,ORG,TITLE,...} -are immediate properties of VCARD. {F and G} are properties of N -with value {"Alden" and "Roland"} respectively; FN has no property -but has the value "Roland H. Alden"; EMAIL has value and -the properties WORK, PREF, and INTERNET. - - -VCARD - N - F="Alden" - G="Roland" - FN="Roland H. Alden" - ORG - ORGNAME="AT&T" - OUN="Versit Project Office" - TITLE="Consultant" - EMAIL="sf!rincon!ralden@alden.attmail.com" - WORK - PREF - INTERNET - EMAIL="ralden@sfgate.com" - INTERNET - EMAIL="242-2200" - MCIMail - LABEL="Roland H. Alden - Suite 2208 - One Pine Street - San Francisco, CA 94111" - DOM - POSTAL - PARCEL - HOME - WORK - QP - LABEL="Roland H. Alden - Suite 2208 - One Pine Street - San Francisco, CA 94111 - U.S.A." - POSTAL - PARCEL - HOME - WORK - QP - TEL="+1 415 296 9106" - WORK - PREF - MSG - TEL="+1 415 296 9016" - WORK - FAX - TEL="+1 415 608 5981" - MSG - CELL - ADR - EXT ADD="Suite 2208" - STREET="One Pine Street" - L="San Francisco" - R="CA" - PC="94111" - C="U.S.A." - SOUND="ROW-LAND H ALL-DIN" - LOGO=[raw data] - GIF - BASE64 - DataSize=1482 -VCALENDAR - DCREATED="19960523T100522" - PRODID="-//Alden Roland/Hand Crafted In North Carolina//NONSGML Made By Hand//EN" - VERSION="0.3" - VEVENT - START="19960523T120000" - END="19960523T130000" - SUBTYPE="PHONE CALL" - SUMMARY="VERSIT PDI PR Teleconference/Interview" - DESCRIPTION="VERSIT PDI PR Teleconference/Interview With Tom Streeter and Alden Roland" - VEVENT - START="19960523T113000" - END="19960523T115500" - SUBTYPE="LUNCH" - SUMMARY="Eat in the cafeteria today" - -5. Building A VObject Representation of A VCard/VCalendar - ====================================================== -The parser in vcc.y converts an input file with one or more -VCard/VCalendar that is in their textual representation -into their corresponding VObject representation. - -VObject representation of a VCard/VCalendar can also be built -directly with calls to the VObject building APIs. e.g. - - VObject *prop; - VObject *vcard = newVObject(VCCardProp); - prop = addProp(vcard,VCNameProp); - addPropValue(prop,VCFamilyNameProp,"Alden"); - addPropValue(prop,VCGivenNameProp,"Roland"); - addPropValue(vcard,VCFullNameProp,"Roland H. Alden"); - .... - -6. Converting A VObject Representation Into Its Textual Representation - =================================================================== -The VObject representation can be converted back to its textual -representation via the call to writeVObject() or writeMemVObject() -API. e.g. - a. to write to a file: - // assume vcard is of type VObject - FILE *fp = fopen("alden.vcf","w"); - writeVObject(fp,vcard); - a. to write to memory, and let the API allocate the required memory. - char* clipboard = writeVObject(0,0,vcard); - ... do something to clipboard - free(clipboard); - b. to write to a user allocated buffer: - char clipboard[16384]; - int len = 16384; - char *buf = writeVObject(clipboard,&len,vcard); - ... buf will be equal to clipboard if the write - is successful otherwise 0. - -In the case of writing to memory, the memory buffer can be either -allocated by the API or the user. If the user allocate the -memory for the buffer, then the length of the buffer needs to be -communicated to the API via a variable. The variable passed as -the length argument will be overwritten with the actual size -of the text output. A 0 return value from writeMemVObject() -indicates an error which could be caused by overflowing the -size of the buffer or lack of heap memory. - -7. Miscellaneous Notes On VObject APIs usages - ========================================== -a. vcc.h -- contains basic interfaces to the parser: - VObject* Parse_MIME(const char *input, unsigned long len); - VObject* Parse_MIME_FromFile(FILE *file); - -- both of this return a null-terminated list of - VObject that is either a VCARD or VCALENDAR. - To iterate through this list, do - VObject *t, *v; - v = Parse_Mime_FromFile(fp); - while (v) { - // ... do something to v. - t = v; - v = nextVObjectInList(v); - cleanVObject(t); - } - note that call to cleanVObject will release - resource used to represent the VObject. - -b. vobject.h -- contains basic interfaces to the VObject APIs. - see the header for more details. - The structure of VObject is purposely (hiddened) not exposed - to the user. Every access has to be done via - the APIs. This way, if we need to change the - structure or implementation, the client need not - recompile as long as the interfaces remain the - same. - -c. values of a property is determined by the property definition - itself. The vobject APIs does not attempt to enforce - any of such definition. It is the consumer responsibility - to know what value is expected from a property. e.g - most properties have unicode string value, so to access - the value of these type of properties, you will use - the vObjectUStringZValue() to read the value and - setVObjectUStringZValue() to set or modify the value. - Refer to the VCard and VCalendar specifications for - the definition of each property. - -d. properties name (id) are case incensitive. - -8. Brief descriptions of each APIs - =============================== - * the predefined properties' names (id) are listed under vobject.h - each is of the form VC*Prop. e.g. - #define VC7bitProp "7BIT" - #define VCAAlarmProp "AALARM" - .... - - * consumer of a VObject can only define pointers to VObject. - - * a variable of type VObjectIterator, say "i", can be used to iterate - through a VObject's properties, say "o". The APIs related to - VObjectIterator are: - void initPropIterator(VObjectIterator *i, VObject *o); - -- e.g. usage - initPropIterator(&i,o); - int moreIteration(VObjectIterator *i); - -- e.g. usage - while (moreIteration(&i)) { ... } - VObject* nextVObject(VObjectIterator *i); - -- e.g. usage - while (moreIteration(&i)) { - VObject *each = nextVObject(&i); - } - - * VObject can be chained together to form a list. e.g. of such - use is in the parser where the return value of the parser is - a link list of VObject. A link list of VObject can be - built by: - void addList(VObject **o, VObject *p); - and iterated by - VObject* nextVObjectInList(VObject *o); - -- next VObjectInList return 0 if the list - is exhausted. - - * the following APIs are mainly used to construct a VObject tree: - VObject* newVObject(const char *id); - -- used extensively internally by VObject APIs but when - used externally, its use is mainly limited to the - construction of top level object (e.g. an object - with VCCardProp or VCCalendarProp id). - - void deleteVObject(VObject *p); - -- to deallocate single VObject, for most user, use - cleanVObject(VObject *o) instead for freeing all - resources associated with the VObject. - - char* dupStr(const char *s, unsigned int size); - -- duplicate a string s. If size is 0, the string is - assume to be a null-terminated. - - void deleteStr(const char *p); - -- used to deallocate a string allocated by dupStr(); - - void setVObjectName(VObject *o, const char* id); - -- set the id of VObject o. This function is not - normally used by the user. The setting of id - is normally done as part of other APIs (e.g. - addProp()). - - void setVObjectStringZValue(VObject *o, const char *s); - -- set a string value of a VObject. - - void setVObjectUStringZValue(VObject *o, const wchar_t *s); - -- set a Unicode string value of a VObject. - - void setVObjectIntegerValue(VObject *o, unsigned int i); - -- set an integer value of a VObject. - - void setVObjectLongValue(VObject *o, unsigned long l); - -- set an long integer value of a VObject. - - void setVObjectAnyValue(VObject *o, void *t); - -- set any value of a VObject. The value type is - unspecified. - - VObject* setValueWithSize(VObject *prop, void *val, unsigned int size); - -- set a raw data (stream of bytes) value of a VObject - whose size is size. The internal VObject representation - is - this object = val - VCDataSizeProp=size - i.e. the value val will be attached to the VObject prop - and a property of VCDataSize whose value is size - is also added to the object. - - void setVObjectVObjectValue(VObject *o, VObject *p); - -- set a VObject as the value of another VObject. - - const char* vObjectName(VObject *o); - -- retrieve the VObject's Name (i.e. id). - - const char* vObjectStringZValue(VObject *o); - -- retrieve the VObject's value interpreted as - null-terminated string. - - const wchar_t* vObjectUStringZValue(VObject *o); - -- retrieve the VObject's value interpreted as - null-terminated unicode string. - - unsigned int vObjectIntegerValue(VObject *o); - -- retrieve the VObject's value interpreted as - integer. - - unsigned long vObjectLongValue(VObject *o); - -- retrieve the VObject's value interpreted as - long integer. - - void* vObjectAnyValue(VObject *o); - -- retrieve the VObject's value interpreted as - any value. - - VObject* vObjectVObjectValue(VObject *o); - -- retrieve the VObject's value interpreted as - a VObject. - - VObject* addVObjectProp(VObject *o, VObject *p); - -- add a VObject p as a property of VObject o. - (not normally used externally for building a - VObject). - - VObject* addProp(VObject *o, const char *id); - -- add a property whose name is id to VObject o. - - VObject* addPropValue(VObject *o, const char *id, const char *v); - -- add a property whose name is id and whose value - is a null-terminated string to VObject o. - - VObject* addPropSizedValue(VObject *o, const char *id, - const char *v, unsigned int size); - -- add a property whose name is id and whose value - is a stream of bytes of size size, to VObject o. - - VObject* addGroup(VObject *o, const char *g); - -- add a group g to VObject o. - e.g. if g is a.b.c, you will have - o - c - VCGroupingProp=b - VCGroupingProp=a - and the object c is returned. - - VObject* isAPropertyOf(VObject *o, const char *id); - -- query if a property by the name id is in o and - return the VObject that represent that property. - - void printVObject(VObject *o); - -- pretty print VObject o to stdout (for debugging use). - - void writeVObject(FILE *fp, VObject *o); - -- convert VObject o to its textual representation and - write it to file. - - char* writeMemVObject(char *s, int *len, VObject *o); - -- convert VObject o to its textual representation and - write it to memory. If s is 0, then memory required - to hold the textual representation will be allocated - by this API. If a variable len is passed, len will - be overwriten with the byte size of the textual - representation. If s is non-zero, then s has to - be a user allocated buffer whose size has be passed - in len as a variable. Memory allocated by the API - has to be freed with call to free. The return value - of this API is either the user supplied buffer, - the memory allocated by the API, or 0 (in case of - failure). - - void cleanStrTbl(); - -- this function has to be called when all - VObject has been destroyed. - - void cleanVObject(VObject *o); - -- release all resources used by VObject o. - - wchar_t* fakeUnicode(const char *ps, int *bytes); - -- convert char* to wchar_t*. - - extern int uStrLen(const wchar_t *u); - -- length of unicode u. - - char *fakeCString(const wchar_t *u); - -- convert wchar_t to CString (blindly assumes that - this could be done). - -9. Additional Programming Notes - ============================ -In the following notes, please refers to the listing -of Example.vcf and its VObject Representation -(shown at the end of this section). - -* Handling the Return Value of the VCard/VCalendar Parser - The example input text file contains two root VObjects - (a VCalendar and a VCard). The output of the VCard/VCalendar - parser is a null-terminated list of VObjects. For this - particular input file, the list will have two VObjects. - The following shows a template for iterating through the - output of the Parser: - - VObject *t, *v; - v = Parse_Mime_fromFileName("example.vcf"); - while (v) { - // currently, v will either be a VCard or a VCalendar - // do whatever your application need to do to - // v here ... - t = v; - v = nextVObjectInList(v); - cleanVObject(t); - } - -* Iterating Through a VCard/VCalendar VObject - From the VObject APIs point of view, a VCard VObject - is the same as a VCalendar VObject. However, the application - needs to know what are in a VCard or a VCalendar. - For example, A VCalendar VObject can have VCDCreatedProp, - a VCGEOLocationProp, etc, and one or more VCEventProp and - or VCTodoProp. The VCEventProp and VCTodoProp can have - many properties of their own, which in turn could have - more properties (e.g. VCDAlarmProp can be a VCEventProp - VObject's property, and VCRunTimeProp can be a - VCDAlarmProp VObject's property. Because a VObject tree - can be arbitrarily complex, in general, to process all - properties and values of a VObject tree, a recursive walk - is desirable. An example recursive VObject tree walk - can be found in the vobject.c source lines for printVObject* - and writeVObject* APIs. Depending on what the application need - to do with a VCard or a VCalendar, a recursive walk - of the VObject tree may or may not be desirable. An example - template of a non-recursive walk is shown below: - - void processVCardVCalendar(char *inputFile) - { - VObject *t, *v; - v = Parse_Mime_fromFileName(inputFile); - while (v) { - char *n = vObjectName(v); - if (strcmp(n,VCCardProp) == 0) { - do_VCard(v); - } - else if (strcmp(n,VCCalendarProp) == 0) { - do_VCalendar(v); - } - else { - // don't know how to handle anything else! - } - t = v; - v = nextVObjectInList(v); - cleanVObject(t); - } - } - - void do_VCard(VObject *vcard) - { - VObjectIterator t; - initPropIterator(&t,vcard); - while (moreIteration(&t)) { - VObject *eachProp = nextVObject(&t); - // The primarly purpose of this example is to - // show how to iterate through a VCard VObject, - // it is not meant to be efficient at all. - char *n = vObjectName(eachProp); - if (strcmp(n,VCNameProp)==0) { - do_name(eachProp); - } - else if (strcmp(n,VCEmailProp)==0) { - do_email(eachProp); - } - else if (strcmp(n,VCLabelProp)==0) { - do_label(eachProp); - } - else if .... - } - } - - void do_VCalendar(VObject *vcal) - { - VObjectIterator t; - initPropIterator(&t,vcard); - while (moreIteration(&t)) { - VObject *eachProp = nextVObject(&t); - // The primarly purpose of this example is to - // show how to iterate through a VCalendar VObject, - // it is not meant to be efficient at all. - char *n = vObjectName(eachProp); - if (strcmp(n,VCDCreatedProp)==0) { - do_DCreated(eachProp); - } - else if (strcmp(n,VCVersionProp)==0) { - do_Version(eachProp); - } - else if (strcmp(n,VCTodoProp)==0) { - do_Todo(eachProp); - } - else if (strcmp(n,VCEventProp)==0) { - do_Event(eachProp); - } - else if .... - } - } - - void do_Todo(VObject *vtodo) { ... } - - void do_Event(VObject *vevent) { ... } - - ... - -* Property's Values and Properties - The VObject APIs do not attempt to check for the - correctness of the values of a property. Nor do they - will prevent the user from attaching a non-VCard/VCalendar - standard property to a VCard/VCalendar property. Take - the example of line [11] of the example, "O.K" is not - a valid value of VCStatusProp. It is up to the application - to accept or reject the value of a property. - -* Output of printVObject - PrintVObject pretty prints a VObject tree in human - readable form. See the listing at the end of the file - for an example output of printVObject on the example - input file "Example.vcf". - - Note that binary data are not shown in the output of - printVObject. Instead, a note is made ([raw data]) to - indicate that there exists such a binary data. - -* Note on Binary Data - When the value of a property is a binary data, it is only - useful to know the size of the binary data. - - In the case of the VCard/VCalendar parser, it chooses - to represent the size information as a separate property - called VCDataSizeProp whose value is the size of the binary - data. The APIs sequence to construct the VObject subtree - of line [44] of Example.vcf is - - // VObject *vcard; - VObject *p1 = addProp(vcard,VCLogoProp); - (void) addProp(p1,VCGIFProp); - (void) addProp(p1,VCBASE64Prop); - VObject *p2 = addProp(p1,VCDataSizeProp); - (void) setVObjectLongValue(p2,1482); - setVObjectAnyValue(vcard,...pointer to binary data); - - Note the presence of VCBase64Prop will cause the - writeVObject API to output the binary data as BASE64 text. - For VCard/VCalendar application, having the VCBase64Prop - property is pratically always neccessary for property with - binary data as its value. - -* Note on Quoted-Printable String - String value with embedded newline are written out as - quoted-prinatable string. It is therefore important - to mark a property with a string value that has - one or more embedded newlines, with the VCQutedPrintableProp - property. e.g. - - // VObject *root; - char *msg="To be\nor\nnot to be"; - VObject *p = addPropValue(root,VCDescriptionProp,msg); - // the following is how you mark a property with - // a property. In this case, the marker is - // VCQuotedPrintableProp - addProp(p,VCQuotedPrintableProp); - -* Note on Unicode - Although, the current parser takes ASCII text file only, - string values are all stored as Unicode in the VObject tree. - For now, when using the VObject APIs to construct a - VObject tree, one should always convert ASCII string value - to a Unicode string value: - - // VObject *root; - VObject *p = addProp(root,VCSomeProp); - setVObjectUStringZValue(p,fakeUnicode(someASCIIStringZvalue)); - - An API is provided to simplify the above process: - - addPropValue(root,VCSomeProp,someASCIIStringZValue); - - Note that someASCIISTringZValue is automatically converted to - Unicode by addPropValue API, where as, the former code - sequence do an explicit call to fakeUnicode. - - To read back the value, one should use the vObjectUStringZValue - API not vObjectStringZValue API. The value returned by the - vObjectUStringZValue API is a Unicode string. If the application - do not know how to handle Unicode string, it can use the - fakeCString API to convert it back to ASCII string (as long - as the conversion is meaningful). - - Note that fakeCString return a heap allocated memory. It is - important to call deleteStr on fakeCString return value if - it is not longer required (or there will be memory leak). - - NOTE: Unfortunately, at the point when this document is written, - there is still no consensus on how Unicode is to be handled - in the textual representation of VCard/VCalendar. So, there - is no version of writeVObject and the parser to output and - input Unicode textual representation of VCard/VCalendar. - - -Example.vcf ------------ -line -number Input Text (example.vcf) ------- ---------- -1 BEGIN:VCALENDAR -2 DCREATED:19961102T100522 -3 GEO:0,0 -4 VERSION:1.0 -5 BEGIN:VEVENT -6 DTSTART:19961103T000000 -7 DTEND:20000101T000000 -8 DESCRIPTION;QUOTED-PRINTABLE:To be =0A= -9 or =0A= -10 not to be -11 STATUS:O.K. -12 X-ACTION:No action required -13 DALARM:19961103T114500;5;3;Enjoy -14 MALARM:19970101T120000;;;johny@nowhere.com;Call Mom. -15 END:VEVENT -16 -17 BEGIN:VTODO -18 DUE:19960614T0173000 -19 DESCRIPTION:Relex. -20 END:VTODO -21 -22 END:VCALENDAR -23 -24 BEGIN:VCARD -25 N:Alden;Roland -26 FN:Roland H. Alden -27 ORG:AT&T;Versit Project Office -28 TITLE:Consultant -29 EMAIL;WORK;PREF;INTERNET:ralden@ralden.com -30 LABEL;DOM;POSTAL;PARCEL;HOME;WORK;QUOTED-PRINTABLE:Roland H. Alden=0A= -31 Suite 2208=0A= -32 One Pine Street=0A= -33 San Francisco, CA 94111 -34 LABEL;POSTAL;PARCEL;HOME;WORK;QUOTED-PRINTABLE:Roland H. Alden=0A= -35 Suite 2208=0A= -36 One Pine Street=0A= -37 San Francisco, CA 94111=0A= -38 U.S.A. -39 TEL;WORK;PREF;MSG:+1 415 296 9106 -40 TEL;WORK;FAX:+1 415 296 9016 -41 TEL;MSG;CELL:+1 415 608 5981 -42 ADR:;Suite 2208;One Pine Street;San Francisco;CA;94111;U.S.A. -43 SOUND:ROW-LAND H ALL-DIN -44 LOGO;GIF;BASE64: -45 R0lGODdhpgBOAMQAAP///+/v797e3s7Ozr29va2trZycnIyMjHt7e2NjY1JSUkJC - ... 30 lines of BASE64 data not shown here. -76 END:VCARD - - -VObject Representation of Example.vcf: -------------------------------------- -line -in -text -file VObject Tree as Printed by printVObject API ----- ------------------------------------------- -1 VCALENDAR -2 DCREATED="19961102T100522" -3 GEO="0,0" -4 VERSION="1.0" -5 VEVENT -6 DTSTART="19961103T000000" -7 DTEND="20000101T000000" -8 DESCRIPTION="To be -9 or -10 not to be" -8 QUOTED-PRINTABLE -11 STATUS="O.K." -12 X-ACTION="No action required" -13 DALARM -13 RUNTIME="19961103T114500" -13 SNOOZETIME="5" -13 REPEATCOUNT="3" -13 DISPLAYSTRING="Enjoy" -14 MALARM -14 RUNTIME="19970101T120000" -14 EMAIL="johny@nowhere.com" -14 NOTE="Call Mom" -17 VTODO -18 DUE="19960614T0173000" -19 DESCRIPTION="Relex." -24 VCARD -25 N -25 F="Alden" -25 G="Roland" -26 FN="Roland H. Alden" -27 ORG -27 ORGNAME="AT&T" -27 OUN="Versit Project Office" -28 TITLE="Consultant" -29 EMAIL="ralden@alden.com" -29 WORK -29 PREF -29 INTERNET -30 LABEL="Roland H. Alden -31 Suite 2208 -32 One Pine Street -33 San Francisco, CA 94111" -30 DOM -30 POSTAL -30 PARCEL -30 HOME -30 WORK -30 QUOTED-PRINTABLE -34 LABEL="Roland H. Alden -35 Suite 2208 -36 One Pine Street -37 San Francisco, CA 94111 -38 U.S.A." -34 POSTAL -34 PARCEL -34 HOME -34 WORK -34 QUOTED-PRINTABLE -39 TEL="+1 415 296 9106" -39 WORK -39 PREF -39 MSG -40 TEL="+1 415 296 9016" -40 WORK -40 FAX -41 TEL="+1 415 608 5981" -41 MSG -41 CELL -42 ADR -42 EXT ADD="Suite 2208" -42 STREET="One Pine Street" -42 L="San Francisco" -42 R="CA" -42 PC="94111" -42 C="U.S.A." -43 SOUND="ROW-LAND H ALL-DIN" -44 LOGO=[raw data] -44 GIF -44 BASE64 -44 DATASIZE=1482 - diff --git a/libversit/port.h b/libversit/port.h deleted file mode 100644 index 1768beebd8..0000000000 --- a/libversit/port.h +++ /dev/null @@ -1,88 +0,0 @@ -/*************************************************************************** -(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International -Business Machines Corporation and Siemens Rolm Communications Inc. - -For purposes of this license notice, the term Licensors shall mean, -collectively, Apple Computer, Inc., AT&T Corp., International -Business Machines Corporation and Siemens Rolm Communications Inc. -The term Licensor shall mean any of the Licensors. - -Subject to acceptance of the following conditions, permission is hereby -granted by Licensors without the need for written agreement and without -license or royalty fees, to use, copy, modify and distribute this -software for any purpose. - -The above copyright notice and the following four paragraphs must be -reproduced in all copies of this software and any software including -this software. - -THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE -ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR -MODIFICATIONS. - -IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT, -INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT -OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -DAMAGE. - -EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED, -INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. - -The software is provided with RESTRICTED RIGHTS. Use, duplication, or -disclosure by the government are subject to restrictions set forth in -DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable. - -***************************************************************************/ - -#ifndef __PORT_H__ -#define __PORT_H__ 1 - - -#if defined(__CPLUSPLUS__) || defined(__cplusplus) -extern "C" { -#endif - -/* some of these #defines are commented out because */ -/* Visual C++ sets them on the compiler command line instead */ - -/* #define _DEBUG */ -/* #define WIN32 */ -/* #define WIN16 */ -/* #define _WINDOWS */ -/* #define __MWERKS__ */ -/* #define INCLUDEMFC */ - -#define vCardClipboardFormat "+//ISBN 1-887687-00-9::versit::PDI//vCard" -#define vCalendarClipboardFormat "+//ISBN 1-887687-00-9::versit::PDI//vCalendar" - -/* The above strings vCardClipboardFormat and vCalendarClipboardFormat -are globally unique IDs which can be used to generate clipboard format -ID's as per the requirements of a specific platform. For example, in -Windows they are used as the parameter in a call to RegisterClipboardFormat. -For example: - - CLIPFORMAT foo = RegisterClipboardFormat(vCardClipboardFormat); - -*/ - -#define vCardMimeType "text/x-vCard" -#define vCalendarMimeType "text/x-vCalendar" - -#define DLLEXPORT(t) t - -#ifndef FALSE -#define FALSE 0 -#endif -#ifndef TRUE -#define TRUE 1 -#endif - -#define stricmp strcasecmp - -#if defined(__CPLUSPLUS__) || defined(__cplusplus) -} -#endif - -#endif /* __PORT_H__ */ diff --git a/libversit/vcaltest.c b/libversit/vcaltest.c deleted file mode 100644 index 5528aab1d1..0000000000 --- a/libversit/vcaltest.c +++ /dev/null @@ -1,118 +0,0 @@ -#include -#include -#include "vcaltmp.h" - -#if 0 -This testcase would generate a file call "frankcal.vcf" with -the following content: - -BEGIN:VCALENDAR -DCREATED:19960523T100522 -GEO:37.24,-17.87 -PRODID:-//Frank Dawson/Hand Crafted In North Carolina//NONSGML Made By Hand//EN -VERSION:0.3 -BEGIN:VEVENT -DTSTART:19960523T120000 -DTEND:19960523T130000 -DESCRIPTION;QUOTED-PRINTABLE:VERSIT PDI PR Teleconference/Interview =0A= -With Tom Streeter and Frank Dawson - Discuss VERSIT PDI project and vCard and vCalendar=0A= -activities with European Press representatives. -SUMMARY:VERSIT PDI PR Teleconference/Interview -SUBTYPE:PHONE CALL -STATUS:CONFIRMED -TRANSP:19960523T100522-4000F100582713-009251 -UID:http://www.ibm.com/raleigh/fdawson/~c:\or2\orgfiles\versit.or2 -DALARM:19960523T114500;5;3;Your Telecon Starts At Noon!!!; -MALARM:19960522T120000;;;fdawson@raleigh.ibm.com;Remember 05/23 Noon Telecon!!!; -PALARM:19960523T115500;;;c:\or2\organize.exe c:\or2\orgfiles\versit.or2; -X-LDC-OR2-OLE:c:\temp\agenda.doc -END:VEVENT - -BEGIN:VTODO -DUE:19960614T0173000 -DESCRIPTION:Review VCalendar helper API. -END:VTODO - -END:VCALENDAR - -#endif - -FILE *cfp; - -void testVcalAPIs() { - FILE *fp; - VObject *vcal, *vevent; -#if _CONSOLE - cfp = stdout; -#else - cfp = fopen("vcaltest.out","w"); -#endif - if (cfp == 0) return; - vcal = vcsCreateVCal( - "19960523T100522", - "37.24,-17.87", - "-//Frank Dawson/Hand Crafted In North Carolina//NONSGML Made By Hand//EN", - 0, - "0.3" - ); - - vevent = vcsAddEvent( - vcal, - "19960523T120000", - "19960523T130000", - "VERSIT PDI PR Teleconference/Interview \nWith Tom Streeter and Frank Dawson - Discuss VERSIT PDI project and vCard and vCalendar\nactivities with European Press representatives.", - "VERSIT PDI PR Teleconference/Interview", - "PHONE CALL", - 0, - "CONFIRMED", - "19960523T100522-4000F100582713-009251", - "http://www.ibm.com/raleigh/fdawson/~c:\\or2\\orgfiles\\versit.or2", - 0 - ); - - vcsAddDAlarm(vevent, "19960523T114500", "5", "3", - "Your Telecon Starts At Noon!!!"); - vcsAddMAlarm(vevent, "19960522T120000", 0, 0, "fdawson@raleigh.ibm.com", - "Remember 05/23 Noon Telecon!!!"); - vcsAddPAlarm(vevent, "19960523T115500", 0 ,0, - "c:\\or2\\organize.exe c:\\or2\\orgfiles\\versit.or2"); - - addPropValue(vevent, "X-LDC-OR2-OLE", "c:\\temp\\agenda.doc"); - - vcsAddTodo( - vcal, - 0, - "19960614T0173000", - 0, - "Review VCalendar helper API.", - 0, - 0, - 0, - 0, - 0, - 0 - ); - - /* now do something to the resulting VObject */ - /* pretty print on stdout for fun */ - printVObject(cfp,vcal); - /* open the output text file */ - -#define OUTFILE "frankcal.vcf" - - fp = fopen(OUTFILE, "w"); - if (fp) { - /* write it in text form */ - writeVObject(fp,vcal); - fclose(fp); - } - else { - fprintf(cfp,"open output file '%s' failed\n", OUTFILE); - } - if (cfp != stdout) fclose(cfp); - } - -void main() { - testVcalAPIs(); - } - diff --git a/libversit/vcaltmp.c b/libversit/vcaltmp.c deleted file mode 100644 index ccb21a649a..0000000000 --- a/libversit/vcaltmp.c +++ /dev/null @@ -1,337 +0,0 @@ -/* -This module provides some helper APIs for creating -a VCalendar object. - -Note on APIs: - 1. The APIs does not attempt to verify if the arguments - passed are correct. - 2. Where the argument to an API is not applicable, pass - the value 0. - 3. See the test program at the bottom of this file as an - example of usage. - 4. This code calls APIs in vobject.c. - -*/ - -/*************************************************************************** -(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International -Business Machines Corporation and Siemens Rolm Communications Inc. - -For purposes of this license notice, the term Licensors shall mean, -collectively, Apple Computer, Inc., AT&T Corp., International -Business Machines Corporation and Siemens Rolm Communications Inc. -The term Licensor shall mean any of the Licensors. - -Subject to acceptance of the following conditions, permission is hereby -granted by Licensors without the need for written agreement and without -license or royalty fees, to use, copy, modify and distribute this -software for any purpose. - -The above copyright notice and the following four paragraphs must be -reproduced in all copies of this software and any software including -this software. - -THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE -ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR -MODIFICATIONS. - -IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT, -INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT -OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -DAMAGE. - -EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED, -INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. - -The software is provided with RESTRICTED RIGHTS. Use, duplication, or -disclosure by the government are subject to restrictions set forth in -DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable. - -***************************************************************************/ - - -#include -#include -#include "vcaltmp.h" - - -DLLEXPORT(VObject*) vcsCreateVCal( - char *date_created, - char *location, - char *product_id, - char *time_zone, - char *version - ) - { - VObject *vcal = newVObject(VCCalProp); -#define Z(p,v) if (v) addPropValue(vcal,p,v); - Z(VCDCreatedProp, date_created); - Z(VCLocationProp, location) - Z(VCProdIdProp, product_id) - Z(VCTimeZoneProp, time_zone) - Z(VCVersionProp, version) -#undef Z - return vcal; - } - - -DLLEXPORT(VObject*) vcsAddEvent( - VObject *vcal, - char *start_date_time, - char *end_date_time, - char *description, - char *summary, - char *categories, - char *classification, - char *status, - char *transparency, - char *uid, - char *url - ) - { - VObject *vevent = addProp(vcal,VCEventProp); -#define Z(p,v) if (v) addPropValue(vevent,p,v); - Z(VCDTstartProp,start_date_time); - Z(VCDTendProp,end_date_time); - if (description) { - VObject *p = addPropValue(vevent,VCDescriptionProp,description); - if (strchr(description,'\n')) - addProp(p,VCQuotedPrintableProp); - } - Z(VCSummaryProp,summary); - Z(VCCategoriesProp,categories); - Z(VCClassProp,classification); - Z(VCStatusProp,status); - Z(VCTranspProp,transparency); - Z(VCUniqueStringProp,uid); - Z(VCURLProp,url); -#undef Z - return vevent; - } - - -DLLEXPORT(VObject*) vcsAddTodo( - VObject *vcal, - char *start_date_time, - char *due_date_time, - char *date_time_complete, - char *description, - char *summary, - char *priority, - char *classification, - char *status, - char *uid, - char *url - ) - { - VObject *vtodo = addProp(vcal,VCTodoProp); -#define Z(p,v) if (v) addPropValue(vtodo,p,v); - Z(VCDTstartProp,start_date_time); - Z(VCDueProp,due_date_time); - Z(VCCompletedProp,date_time_complete); - if (description) { - VObject *p = addPropValue(vtodo,VCDescriptionProp,description); - if (strchr(description,'\n')) - addProp(p,VCQuotedPrintableProp); - } - Z(VCSummaryProp,summary); - Z(VCPriorityProp,priority); - Z(VCClassProp,classification); - Z(VCStatusProp,status); - Z(VCUniqueStringProp,uid); - Z(VCURLProp,url); -#undef Z - return vtodo; - } - - -DLLEXPORT(VObject*) vcsAddAAlarm( - VObject *vevent, - char *run_time, - char *snooze_time, - char *repeat_count, - char *audio_content - ) - { - VObject *aalarm= addProp(vevent,VCAAlarmProp); -#define Z(p,v) if (v) addPropValue(aalarm,p,v); - Z(VCRunTimeProp,run_time); - Z(VCSnoozeTimeProp,snooze_time); - Z(VCRepeatCountProp,repeat_count); - Z(VCAudioContentProp,audio_content); -#undef Z - return aalarm; - } - - -DLLEXPORT(VObject*) vcsAddMAlarm( - VObject *vevent, - char *run_time, - char *snooze_time, - char *repeat_count, - char *email_address, - char *note - ) - { - VObject *malarm= addProp(vevent,VCMAlarmProp); -#define Z(p,v) if (v) addPropValue(malarm,p,v); - Z(VCRunTimeProp,run_time); - Z(VCSnoozeTimeProp,snooze_time); - Z(VCRepeatCountProp,repeat_count); - Z(VCEmailAddressProp,email_address); - Z(VCNoteProp,note); -#undef Z - return malarm; - } - - -DLLEXPORT(VObject*) vcsAddDAlarm( - VObject *vevent, - char *run_time, - char *snooze_time, - char *repeat_count, - char *display_string - ) - { - VObject *dalarm= addProp(vevent,VCDAlarmProp); -#define Z(p,v) if (v) addPropValue(dalarm,p,v); - Z(VCRunTimeProp,run_time); - Z(VCSnoozeTimeProp,snooze_time); - Z(VCRepeatCountProp,repeat_count); - Z(VCDisplayStringProp,display_string); -#undef Z - return dalarm; - } - - -DLLEXPORT(VObject*) vcsAddPAlarm( - VObject *vevent, - char *run_time, - char *snooze_time, - char *repeat_count, - char *procedure_name - ) - { - VObject *palarm= addProp(vevent,VCPAlarmProp); -#define Z(p,v) if (v) addPropValue(palarm,p,v); - Z(VCRunTimeProp,run_time); - Z(VCSnoozeTimeProp,snooze_time); - Z(VCRepeatCountProp,repeat_count); - Z(VCProcedureNameProp,procedure_name); -#undef Z - return palarm; - } - - -#ifdef _TEST - -#if 0 -This testcase would generate a file call "frankcal.vcf" with -the following content: - -BEGIN:VCALENDAR -DCREATED:19960523T100522 -GEO:37.24,-17.87 -PRODID:-//Frank Dawson/Hand Crafted In North Carolina//NONSGML Made By Hand//EN -VERSION:0.3 -BEGIN:VEVENT -DTSTART:19960523T120000 -DTEND:19960523T130000 -DESCRIPTION;QUOTED-PRINTABLE:VERSIT PDI PR Teleconference/Interview =0A= -With Tom Streeter and Frank Dawson - Discuss VERSIT PDI project and vCard and vCalendar=0A= -activities with European Press representatives. -SUMMARY:VERSIT PDI PR Teleconference/Interview -CATEGORIES:PHONE CALL -STATUS:CONFIRMED -TRANSP:19960523T100522-4000F100582713-009251 -UID:http://www.ibm.com/raleigh/fdawson/~c:\or2\orgfiles\versit.or2 -DALARM:19960523T114500;5;3;Your Telecon Starts At Noon!!!; -MALARM:19960522T120000;;;fdawson@raleigh.ibm.com;Remember 05/23 Noon Telecon!!!; -PALARM:19960523T115500;;;c:\or2\organize.exe c:\or2\orgfiles\versit.or2; -X-LDC-OR2-OLE:c:\temp\agenda.doc -END:VEVENT - -BEGIN:VTODO -DUE:19960614T0173000 -DESCRIPTION:Review VCalendar helper API. -END:VTODO - -END:VCALENDAR - -#endif - -void testVcalAPIs() { - FILE *fp; - VObject *vcal = vcsCreateVCal( - "19960523T100522", - "37.24,-17.87", - "-//Frank Dawson/Hand Crafted In North Carolina//NONSGML Made By Hand//EN", - 0, - "0.3" - ); - - VObject *vevent = vcsAddEvent( - vcal, - "19960523T120000", - "19960523T130000", - "VERSIT PDI PR Teleconference/Interview \nWith Tom Streeter and Frank Dawson - Discuss VERSIT PDI project and vCard and vCalendar\nactivities with European Press representatives.", - "VERSIT PDI PR Teleconference/Interview", - "PHONE CALL", - 0, - "CONFIRMED", - "19960523T100522-4000F100582713-009251", - "http://www.ibm.com/raleigh/fdawson/~c:\\or2\\orgfiles\\versit.or2", - 0 - ); - - vcsAddDAlarm(vevent, "19960523T114500", "5", "3", - "Your Telecon Starts At Noon!!!"); - vcsAddMAlarm(vevent, "19960522T120000", 0, 0, "fdawson@raleigh.ibm.com", - "Remember 05/23 Noon Telecon!!!"); - vcsAddPAlarm(vevent, "19960523T115500", 0 ,0, - "c:\\or2\\organize.exe c:\\or2\\orgfiles\\versit.or2"); - - addPropValue(vevent, "X-LDC-OR2-OLE", "c:\\temp\\agenda.doc"); - - vcsAddTodo( - vcal, - 0, - "19960614T0173000", - 0, - "Review VCalendar helper API.", - 0, - 0, - 0, - 0, - 0, - 0 - ); - - /* now do something to the resulting VObject */ - /* pretty print on stdout for fun */ - printVObject(vcal); - /* open the output text file */ - -#define OUTFILE "frankcal.vcf" - - fp = fopen(OUTFILE, "w"); - if (fp) { - /* write it in text form */ - writeVObject(fp,vcal); - fclose(fp); - } - else { - printf("open output file '%s' failed\n", OUTFILE); - } - } - -void main() { - testVcalAPIs(); - } - -#endif - - -/* end of source file vcaltmp.c */ diff --git a/libversit/vcaltmp.h b/libversit/vcaltmp.h deleted file mode 100644 index 4c4afde963..0000000000 --- a/libversit/vcaltmp.h +++ /dev/null @@ -1,128 +0,0 @@ -/*************************************************************************** -(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International -Business Machines Corporation and Siemens Rolm Communications Inc. - -For purposes of this license notice, the term Licensors shall mean, -collectively, Apple Computer, Inc., AT&T Corp., International -Business Machines Corporation and Siemens Rolm Communications Inc. -The term Licensor shall mean any of the Licensors. - -Subject to acceptance of the following conditions, permission is hereby -granted by Licensors without the need for written agreement and without -license or royalty fees, to use, copy, modify and distribute this -software for any purpose. - -The above copyright notice and the following four paragraphs must be -reproduced in all copies of this software and any software including -this software. - -THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE -ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR -MODIFICATIONS. - -IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT, -INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT -OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -DAMAGE. - -EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED, -INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. - -The software is provided with RESTRICTED RIGHTS. Use, duplication, or -disclosure by the government are subject to restrictions set forth in -DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable. - -***************************************************************************/ - -#include "vcc.h" - -#ifndef __VCALTMP_H__ -#define __VCALTMP_H__ - -#if defined(__CPLUSPLUS__) || defined(__cplusplus) -extern "C" { -#endif - -extern DLLEXPORT(VObject*) vcsCreateVCal( - char *date_created, - char *location, - char *product_id, - char *time_zone, - char *version - ); - -extern DLLEXPORT(VObject*) vcsAddEvent( - VObject *vcal, - char *start_date_time, - char *end_date_time, - char *description, - char *summary, - char *categories, - char *classification, - char *status, - char *transparency, - char *uid, - char *url - ); - - -extern DLLEXPORT(VObject*) vcsAddTodo( - VObject *vcal, - char *start_date_time, - char *due_date_time, - char *date_time_complete, - char *description, - char *summary, - char *priority, - char *classification, - char *status, - char *uid, - char *url - ); - - -extern DLLEXPORT(VObject*) vcsAddAAlarm( - VObject *vevent, - char *run_time, - char *snooze_time, - char *repeat_count, - char *audio_content - ); - - -extern DLLEXPORT(VObject*) vcsAddMAlarm( - VObject *vevent, - char *run_time, - char *snooze_time, - char *repeat_count, - char *email_address, - char *note - ); - - -extern DLLEXPORT(VObject*) vcsAddDAlarm( - VObject *vevent, - char *run_time, - char *snooze_time, - char *repeat_count, - char *display_string - ); - - -extern DLLEXPORT(VObject*) vcsAddPAlarm( - VObject *vevent, - char *run_time, - char *snooze_time, - char *repeat_count, - char *procedure_name - ); - -#if defined(__CPLUSPLUS__) || defined(__cplusplus) -} -#endif - -#endif /* __VCALTMP_H__ */ - - diff --git a/libversit/vcc.h b/libversit/vcc.h deleted file mode 100644 index 0e52034710..0000000000 --- a/libversit/vcc.h +++ /dev/null @@ -1,80 +0,0 @@ -/*************************************************************************** -(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International -Business Machines Corporation and Siemens Rolm Communications Inc. - -For purposes of this license notice, the term Licensors shall mean, -collectively, Apple Computer, Inc., AT&T Corp., International -Business Machines Corporation and Siemens Rolm Communications Inc. -The term Licensor shall mean any of the Licensors. - -Subject to acceptance of the following conditions, permission is hereby -granted by Licensors without the need for written agreement and without -license or royalty fees, to use, copy, modify and distribute this -software for any purpose. - -The above copyright notice and the following four paragraphs must be -reproduced in all copies of this software and any software including -this software. - -THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE -ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR -MODIFICATIONS. - -IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT, -INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT -OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -DAMAGE. - -EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED, -INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. - -The software is provided with RESTRICTED RIGHTS. Use, duplication, or -disclosure by the government are subject to restrictions set forth in -DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable. - -***************************************************************************/ - -#ifndef __VCC_H__ -#define __VCC_H__ 1 - -#include "vobject.h" - - -#if defined(__CPLUSPLUS__) || defined(__cplusplus) -extern "C" { -#endif - -typedef void (*MimeErrorHandler)(char *); - -extern DLLEXPORT(void) registerMimeErrorHandler(MimeErrorHandler); - -extern DLLEXPORT(VObject*) Parse_MIME(const char *input, unsigned long len); -extern DLLEXPORT(VObject*) Parse_MIME_FromFileName(char* fname); - - -/* NOTE regarding Parse_MIME_FromFile -The function above, Parse_MIME_FromFile, comes in two flavors, -neither of which is exported from the DLL. Each version takes -a CFile or FILE* as a parameter, neither of which can be -passed across a DLL interface (at least that is my experience). -If you are linking this code into your build directly then -you may find them a more convenient API that the other flavors -that take a file name. If you use them with the DLL LIB you -will get a link error. -*/ - - -#if INCLUDEMFC -extern VObject* Parse_MIME_FromFile(CFile *file); -#else -extern VObject* Parse_MIME_FromFile(FILE *file); -#endif - -#if defined(__CPLUSPLUS__) || defined(__cplusplus) -} -#endif - -#endif /* __VCC_H__ */ - diff --git a/libversit/vcc.y b/libversit/vcc.y deleted file mode 100644 index f8eb9e6556..0000000000 --- a/libversit/vcc.y +++ /dev/null @@ -1,1257 +0,0 @@ -%{ - -/*************************************************************************** -(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International -Business Machines Corporation and Siemens Rolm Communications Inc. - -For purposes of this license notice, the term Licensors shall mean, -collectively, Apple Computer, Inc., AT&T Corp., International -Business Machines Corporation and Siemens Rolm Communications Inc. -The term Licensor shall mean any of the Licensors. - -Subject to acceptance of the following conditions, permission is hereby -granted by Licensors without the need for written agreement and without -license or royalty fees, to use, copy, modify and distribute this -software for any purpose. - -The above copyright notice and the following four paragraphs must be -reproduced in all copies of this software and any software including -this software. - -THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE -ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR -MODIFICATIONS. - -IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT, -INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT -OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -DAMAGE. - -EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED, -INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. - -The software is provided with RESTRICTED RIGHTS. Use, duplication, or -disclosure by the government are subject to restrictions set forth in -DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable. - -***************************************************************************/ - -/* - * src: vcc.c - * doc: Parser for vCard and vCalendar. Note that this code is - * generated by a yacc parser generator. Generally it should not - * be edited by hand. The real source is vcc.y. The #line directives - * can be commented out here to make it easier to trace through - * in a debugger. However, if a bug is found it should - * be fixed in vcc.y and this file regenerated. - */ - - -/* debugging utilities */ -#if __DEBUG -#define DBG_(x) printf x -#else -#define DBG_(x) -#endif - -/**** External Functions ****/ - -/* assign local name to parser variables and functions so that - we can use more than one yacc based parser. -*/ - -#define yyparse mime_parse -#define yylex mime_lex -#define yyerror mime_error -#define yychar mime_char -/* #define p_yyval p_mime_val */ -#undef yyval -#define yyval mime_yyval -/* #define p_yylval p_mime_lval */ -#undef yylval -#define yylval mime_yylval -#define yydebug mime_debug -#define yynerrs mime_nerrs -#define yyerrflag mime_errflag -#define yyss mime_ss -#define yyssp mime_ssp -#define yyvs mime_vs -#define yyvsp mime_vsp -#define yylhs mime_lhs -#define yylen mime_len -#define yydefred mime_defred -#define yydgoto mime_dgoto -#define yysindex mime_sindex -#define yyrindex mime_rindex -#define yygindex mime_gindex -#define yytable mime_table -#define yycheck mime_check -#define yyname mime_name -#define yyrule mime_rule -#define YYPREFIX "mime_" - - -#ifndef _NO_LINE_FOLDING -#define _SUPPORT_LINE_FOLDING 1 -#endif - -/* undef below if compile with MFC */ -/* #define INCLUDEMFC 1 */ - -#if defined(WIN32) || defined(_WIN32) -#ifdef INCLUDEMFC -#include -#endif -#endif - -#include -#ifndef __MWERKS__ -#include -#endif -#include -#include -#include -#include "vcc.h" - -/**** Types, Constants ****/ - -#define YYDEBUG 1 /* 1 to compile in some debugging code */ -#define MAXTOKEN 256 /* maximum token (line) length */ -#define YYSTACKSIZE 50 /* ~unref ? */ -#define MAXLEVEL 10 /* max # of nested objects parseable */ - /* (includes outermost) */ - - -/**** Global Variables ****/ -int mime_lineNum, mime_numErrors; /* yyerror() can use these */ -static VObject* vObjList; -static VObject *curProp; -static VObject *curObj; -static VObject* ObjStack[MAXLEVEL]; -static int ObjStackTop; - - -/* A helpful utility for the rest of the app. */ -#if __CPLUSPLUS__ -extern "C" { -#endif - - extern void Parse_Debug(const char *s); - extern void yyerror(char *s); - -#if __CPLUSPLUS__ - }; -#endif - -int yyparse(); - -enum LexMode { - L_NORMAL, - L_VCARD, - L_VCAL, - L_VEVENT, - L_VTODO, - L_VALUES, - L_BASE64, - L_QUOTED_PRINTABLE - }; - -/**** Private Forward Declarations ****/ -static int pushVObject(const char *prop); -static VObject* popVObject(); -static char* lexDataFromBase64(); -static void lexPopMode(int top); -static int lexWithinMode(enum LexMode mode); -static void lexPushMode(enum LexMode mode); -static void enterProps(const char *s); -static void enterAttr(const char *s1, const char *s2); -static void enterValues(const char *value); -static void mime_error_(char *s); - static void appendValue(const char *value); - -%} - -/***************************************************************************/ -/*** The grammar ****/ -/***************************************************************************/ - -%union { - char *str; - VObject *vobj; - } - -%token - EQ COLON DOT SEMICOLON SPACE HTAB LINESEP NEWLINE - BEGIN_VCARD END_VCARD BEGIN_VCAL END_VCAL - BEGIN_VEVENT END_VEVENT BEGIN_VTODO END_VTODO - ID - -/* - * NEWLINE is the token that would occur outside a vCard, - * while LINESEP is the token that would occur inside a vCard. - */ - -%token - STRING ID - -%type name value - -%type vcard vcal vobject - -%start mime - -%% - - -mime: vobjects - ; - -vobjects: vobject - { addList(&vObjList, $1); curObj = 0; } - vobjects - | vobject - { addList(&vObjList, $1); curObj = 0; } - ; - -vobject: vcard - | vcal - ; - -vcard: - BEGIN_VCARD - { - lexPushMode(L_VCARD); - if (!pushVObject(VCCardProp)) YYERROR; - } - items END_VCARD - { - lexPopMode(0); - $$ = popVObject(); - } - | BEGIN_VCARD - { - lexPushMode(L_VCARD); - if (!pushVObject(VCCardProp)) YYERROR; - } - END_VCARD - { - lexPopMode(0); - $$ = popVObject(); - } - ; - -items: item items - | item - ; - -item: prop COLON - { - lexPushMode(L_VALUES); - } - values LINESEP - { - if (lexWithinMode(L_BASE64) || lexWithinMode(L_QUOTED_PRINTABLE)) - lexPopMode(0); - lexPopMode(0); - } - | error - ; - -prop: name - { - enterProps($1); - } - attr_params - | name - { - enterProps($1); - } - ; - -attr_params: attr_param attr_params - | attr_param - ; - -attr_param: SEMICOLON attr - ; - -attr: name - { - enterAttr($1,0); - } - | name EQ name - { - enterAttr($1,$3); - - } - ; - -name: ID - ; - -values: value SEMICOLON { appendValue($1); } values - | value - { appendValue($1); } - ; - -value: STRING - | { $$ = 0; } - ; - -vcal: - BEGIN_VCAL - { if (!pushVObject(VCCalProp)) YYERROR; } - calitems - END_VCAL - { $$ = popVObject(); } - | BEGIN_VCAL - { if (!pushVObject(VCCalProp)) YYERROR; } - END_VCAL - { $$ = popVObject(); } - ; - -calitems: calitem calitems - | calitem - ; - -calitem: - eventitem - | todoitem - | items - ; - -eventitem: - BEGIN_VEVENT - { - lexPushMode(L_VEVENT); - if (!pushVObject(VCEventProp)) YYERROR; - } - items - END_VEVENT - { - lexPopMode(0); - popVObject(); - } - | BEGIN_VEVENT - { - lexPushMode(L_VEVENT); - if (!pushVObject(VCEventProp)) YYERROR; - } - END_VEVENT - { - lexPopMode(0); - popVObject(); - } - ; - -todoitem: - BEGIN_VTODO - { - lexPushMode(L_VTODO); - if (!pushVObject(VCTodoProp)) YYERROR; - } - items - END_VTODO - { - lexPopMode(0); - popVObject(); - } - | BEGIN_VTODO - { - lexPushMode(L_VTODO); - if (!pushVObject(VCTodoProp)) YYERROR; - } - END_VTODO - { - lexPopMode(0); - popVObject(); - } - ; - -%% -/*/////////////////////////////////////////////////////////////////////////*/ -static int pushVObject(const char *prop) - { - VObject *newObj; - if (ObjStackTop == MAXLEVEL) - return FALSE; - - ObjStack[++ObjStackTop] = curObj; - - if (curObj) { - newObj = addProp(curObj,prop); - curObj = newObj; - } - else - curObj = newVObject(prop); - - return TRUE; - } - - -/*/////////////////////////////////////////////////////////////////////////*/ -/* This pops the recently built vCard off the stack and returns it. */ -static VObject* popVObject() - { - VObject *oldObj; - if (ObjStackTop < 0) { - yyerror("pop on empty Object Stack\n"); - return 0; - } - oldObj = curObj; - curObj = ObjStack[ObjStackTop--]; - - return oldObj; - } - -static void appendValue(const char *value) -{ - char *p1, *p2; - wchar_t *p3; - int i; - - if (fieldedProp && *fieldedProp) { - if (value) { - addPropValue(curProp, *fieldedProp, value); - } - /* else this field is empty, advance to next field */ - fieldedProp++; - } else { - if (value) { - if (vObjectUStringZValue(curProp)) { - p1 = fakeCString(vObjectUStringZValue(curProp)); - p2 = malloc(sizeof(char *) * (strlen(p1)+strlen(value)+1)); - strcpy(p2, p1); - deleteStr(p1); - - i = strlen(p2); - p2[i] = ';'; - p2[i+1] = '\0'; - p2 = strcat(p2, value); - p3 = (wchar_t *) vObjectUStringZValue(curProp); - free(p3); - setVObjectUStringZValue_(curProp,fakeUnicode(p2,0)); - deleteStr(p2); - } else { - setVObjectUStringZValue_(curProp,fakeUnicode(value,0)); - } - } - } - deleteStr(value); -} - -static void enterValues(const char *value) - { - if (fieldedProp && *fieldedProp) { - if (value) { - addPropValue(curProp,*fieldedProp,value); - } - /* else this field is empty, advance to next field */ - fieldedProp++; - } - else { - if (value) { - setVObjectUStringZValue_(curProp,fakeUnicode(value,0)); - } - } - deleteStr(value); - } - -static void enterProps(const char *s) - { - curProp = addGroup(curObj,s); - deleteStr(s); - } - -static void enterAttr(const char *s1, const char *s2) - { - const char *p1, *p2; - p1 = lookupProp_(s1); - if (s2) { - VObject *a; - p2 = lookupProp_(s2); - a = addProp(curProp,p1); - setVObjectStringZValue(a,p2); - } - else - addProp(curProp,p1); - if (stricmp(p1,VCBase64Prop) == 0 || (s2 && stricmp(p2,VCBase64Prop)==0)) - lexPushMode(L_BASE64); - else if (stricmp(p1,VCQuotedPrintableProp) == 0 - || (s2 && stricmp(p2,VCQuotedPrintableProp)==0)) - lexPushMode(L_QUOTED_PRINTABLE); - deleteStr(s1); deleteStr(s2); - } - - -#define MAX_LEX_LOOKAHEAD_0 32 -#define MAX_LEX_LOOKAHEAD 64 -#define MAX_LEX_MODE_STACK_SIZE 10 -#define LEXMODE() (lexBuf.lexModeStack[lexBuf.lexModeStackTop]) - -struct LexBuf { - /* input */ -#ifdef INCLUDEMFC - CFile *inputFile; -#else - FILE *inputFile; -#endif - char *inputString; - unsigned long curPos; - unsigned long inputLen; - /* lookahead buffer */ - /* -- lookahead buffer is short instead of char so that EOF - / can be represented correctly. - */ - unsigned long len; - short buf[MAX_LEX_LOOKAHEAD]; - unsigned long getPtr; - /* context stack */ - unsigned long lexModeStackTop; - enum LexMode lexModeStack[MAX_LEX_MODE_STACK_SIZE]; - /* token buffer */ - unsigned long maxToken; - char *strs; - unsigned long strsLen; - } lexBuf; - -static void lexPushMode(enum LexMode mode) - { - if (lexBuf.lexModeStackTop == (MAX_LEX_MODE_STACK_SIZE-1)) - yyerror("lexical context stack overflow"); - else { - lexBuf.lexModeStack[++lexBuf.lexModeStackTop] = mode; - } - } - -static void lexPopMode(int top) - { - /* special case of pop for ease of error recovery -- this - version will never underflow */ - if (top) - lexBuf.lexModeStackTop = 0; - else - if (lexBuf.lexModeStackTop > 0) lexBuf.lexModeStackTop--; - } - -static int lexWithinMode(enum LexMode mode) { - unsigned long i; - for (i=0;iRead(&result, 1) == 1 ? result : EOF; -#else - return fgetc(lexBuf.inputFile); -#endif - } - } - -static int lexGeta() - { - ++lexBuf.len; - return (lexBuf.buf[lexBuf.getPtr] = lexGetc_()); - } - -static int lexGeta_(int i) - { - ++lexBuf.len; - return (lexBuf.buf[(lexBuf.getPtr+i)%MAX_LEX_LOOKAHEAD] = lexGetc_()); - } - -static void lexSkipLookahead() { - if (lexBuf.len > 0 && lexBuf.buf[lexBuf.getPtr]!=EOF) { - /* don't skip EOF. */ - lexBuf.getPtr = (lexBuf.getPtr + 1) % MAX_LEX_LOOKAHEAD; - lexBuf.len--; - } - } - -static int lexLookahead() { - int c = (lexBuf.len)? - lexBuf.buf[lexBuf.getPtr]: - lexGeta(); - /* do the \r\n -> \n or \r -> \n translation here */ - if (c == '\r') { - int a = (lexBuf.len>1)? - lexBuf.buf[(lexBuf.getPtr+1)%MAX_LEX_LOOKAHEAD]: - lexGeta_(1); - if (a == '\n') { - lexSkipLookahead(); - } - lexBuf.buf[lexBuf.getPtr] = c = '\n'; - } - else if (c == '\n') { - int a = (lexBuf.len>1)? - lexBuf.buf[lexBuf.getPtr+1]: - lexGeta_(1); - if (a == '\r') { - lexSkipLookahead(); - } - lexBuf.buf[lexBuf.getPtr] = '\n'; - } - return c; - } - -static int lexGetc() { - int c = lexLookahead(); - if (lexBuf.len > 0 && lexBuf.buf[lexBuf.getPtr]!=EOF) { - /* EOF will remain in lookahead buffer */ - lexBuf.getPtr = (lexBuf.getPtr + 1) % MAX_LEX_LOOKAHEAD; - lexBuf.len--; - } - return c; - } - -static void lexSkipLookaheadWord() { - if (lexBuf.strsLen <= lexBuf.len) { - lexBuf.len -= lexBuf.strsLen; - lexBuf.getPtr = (lexBuf.getPtr + lexBuf.strsLen) % MAX_LEX_LOOKAHEAD; - } - } - -static void lexClearToken() - { - lexBuf.strsLen = 0; - } - -static void lexAppendc(int c) - { - lexBuf.strs[lexBuf.strsLen] = c; - /* append up to zero termination */ - if (c == 0) return; - lexBuf.strsLen++; - if (lexBuf.strsLen >= lexBuf.maxToken) { - /* double the token string size */ - lexBuf.maxToken <<= 1; - lexBuf.strs = (char*) realloc(lexBuf.strs,(size_t)lexBuf.maxToken); - } - } - -static char* lexStr() { - return dupStr(lexBuf.strs,(size_t)lexBuf.strsLen+1); - } - -static void lexSkipWhite() { - int c = lexLookahead(); - while (c == ' ' || c == '\t') { - lexSkipLookahead(); - c = lexLookahead(); - } - } - -static char* lexGetWord() { - int c; - lexSkipWhite(); - lexClearToken(); - c = lexLookahead(); - while (c != EOF && !strchr("\t\n ;:=",c)) { - lexAppendc(c); - lexSkipLookahead(); - c = lexLookahead(); - } - lexAppendc(0); - return lexStr(); - } - -static void lexPushLookahead(char *s, int len) { - int putptr; - if (len == 0) len = strlen(s); - putptr = (int)lexBuf.getPtr - len; - /* this function assumes that length of word to push back - / is not greater than MAX_LEX_LOOKAHEAD. - */ - if (putptr < 0) putptr += MAX_LEX_LOOKAHEAD; - lexBuf.getPtr = putptr; - while (*s) { - lexBuf.buf[putptr] = *s++; - putptr = (putptr + 1) % MAX_LEX_LOOKAHEAD; - } - lexBuf.len += len; - } - -static void lexPushLookaheadc(int c) { - int putptr; - /* can't putback EOF, because it never leaves lookahead buffer */ - if (c == EOF) return; - putptr = (int)lexBuf.getPtr - 1; - if (putptr < 0) putptr += MAX_LEX_LOOKAHEAD; - lexBuf.getPtr = putptr; - lexBuf.buf[putptr] = c; - lexBuf.len += 1; - } - -static char* lexLookaheadWord() { - /* this function can lookahead word with max size of MAX_LEX_LOOKAHEAD_0 - / and thing bigger than that will stop the lookahead and return 0; - / leading white spaces are not recoverable. - */ - int c; - int len = 0; - int curgetptr = 0; - lexSkipWhite(); - lexClearToken(); - curgetptr = (int)lexBuf.getPtr; /* remember! */ - while (len < (MAX_LEX_LOOKAHEAD_0)) { - c = lexGetc(); - len++; - if (c == EOF || strchr("\t\n ;:=", c)) { - lexAppendc(0); - /* restore lookahead buf. */ - lexBuf.len += len; - lexBuf.getPtr = curgetptr; - return lexStr(); - } - else - lexAppendc(c); - } - lexBuf.len += len; /* char that has been moved to lookahead buffer */ - lexBuf.getPtr = curgetptr; - return 0; - } - -#ifdef _SUPPORT_LINE_FOLDING -static void handleMoreRFC822LineBreak(int c) { - /* suport RFC 822 line break in cases like - * ADR: foo; - * morefoo; - * more foo; - */ - if (c == ';') { - int a; - lexSkipLookahead(); - /* skip white spaces */ - a = lexLookahead(); - while (a == ' ' || a == '\t') { - lexSkipLookahead(); - a = lexLookahead(); - } - if (a == '\n') { - lexSkipLookahead(); - a = lexLookahead(); - if (a == ' ' || a == '\t') { - /* continuation, throw away all the \n and spaces read so - * far - */ - lexSkipWhite(); - lexPushLookaheadc(';'); - } - else { - lexPushLookaheadc('\n'); - lexPushLookaheadc(';'); - } - } - else { - lexPushLookaheadc(';'); - } - } - } - -static char* lexGet1Value() { - int size = 0; - int c; - lexSkipWhite(); - c = lexLookahead(); - lexClearToken(); - while (c != EOF && c != ';') { - if (c == '\n') { - int a; - lexSkipLookahead(); - a = lexLookahead(); - if (a == ' ' || a == '\t') { - lexAppendc(' '); - lexSkipLookahead(); - } - else { - lexPushLookaheadc('\n'); - break; - } - } - else { - lexAppendc(c); - lexSkipLookahead(); - } - c = lexLookahead(); - } - lexAppendc(0); - handleMoreRFC822LineBreak(c); - return c==EOF?0:lexStr(); - } -#endif - -static char* lexGetStrUntil(char *termset) { - int size = 0; - int c = lexLookahead(); - lexClearToken(); - while (c != EOF && !strchr(termset,c)) { - lexAppendc(c); - lexSkipLookahead(); - c = lexLookahead(); - } - lexAppendc(0); - return c==EOF?0:lexStr(); - } - -static int match_begin_name(int end) { - char *n = lexLookaheadWord(); - int token = ID; - if (n) { - if (!stricmp(n,"vcard")) token = end?END_VCARD:BEGIN_VCARD; - else if (!stricmp(n,"vcalendar")) token = end?END_VCAL:BEGIN_VCAL; - else if (!stricmp(n,"vevent")) token = end?END_VEVENT:BEGIN_VEVENT; - else if (!stricmp(n,"vtodo")) token = end?END_VTODO:BEGIN_VTODO; - deleteStr(n); - return token; - } - return 0; - } - - -#ifdef INCLUDEMFC -void initLex(const char *inputstring, unsigned long inputlen, CFile *inputfile) -#else -void initLex(const char *inputstring, unsigned long inputlen, FILE *inputfile) -#endif - { - /* initialize lex mode stack */ - lexBuf.lexModeStack[lexBuf.lexModeStackTop=0] = L_NORMAL; - - /* iniatialize lex buffer. */ - lexBuf.inputString = (char*) inputstring; - lexBuf.inputLen = inputlen; - lexBuf.curPos = 0; - lexBuf.inputFile = inputfile; - - lexBuf.len = 0; - lexBuf.getPtr = 0; - - lexBuf.maxToken = MAXTOKEN; - lexBuf.strs = (char*)malloc(MAXTOKEN); - lexBuf.strsLen = 0; - - } - -static void finiLex() { - free(lexBuf.strs); - } - - -/*/////////////////////////////////////////////////////////////////////////*/ -/* This parses and converts the base64 format for binary encoding into - * a decoded buffer (allocated with new). See RFC 1521. - */ -static char * lexGetDataFromBase64() - { - unsigned long bytesLen = 0, bytesMax = 0; - int quadIx = 0, pad = 0; - unsigned long trip = 0; - unsigned char b; - int c; - unsigned char *bytes = NULL; - unsigned char *oldBytes = NULL; - - DBG_(("db: lexGetDataFromBase64\n")); - while (1) { - c = lexGetc(); - if (c == '\n') { - ++mime_lineNum; - if (lexLookahead() == '\n') { - /* a '\n' character by itself means end of data */ - break; - } - else continue; /* ignore '\n' */ - } - else { - if ((c >= 'A') && (c <= 'Z')) - b = (unsigned char)(c - 'A'); - else if ((c >= 'a') && (c <= 'z')) - b = (unsigned char)(c - 'a') + 26; - else if ((c >= '0') && (c <= '9')) - b = (unsigned char)(c - '0') + 52; - else if (c == '+') - b = 62; - else if (c == '/') - b = 63; - else if (c == '=') { - b = 0; - pad++; - } else if ((c == ' ') || (c == '\t')) { - continue; - } else { /* error condition */ - if (bytes) free(bytes); - else if (oldBytes) free(oldBytes); - /* error recovery: skip until 2 adjacent newlines. */ - DBG_(("db: invalid character 0x%x '%c'\n", c,c)); - if (c != EOF) { - c = lexGetc(); - while (c != EOF) { - if (c == '\n' && lexLookahead() == '\n') { - ++mime_lineNum; - break; - } - c = lexGetc(); - } - } - return NULL; - } - trip = (trip << 6) | b; - if (++quadIx == 4) { - unsigned char outBytes[3]; - int numOut; - int i; - for (i = 0; i < 3; i++) { - outBytes[2-i] = (unsigned char)(trip & 0xFF); - trip >>= 8; - } - numOut = 3 - pad; - if (bytesLen + numOut > bytesMax) { - if (!bytes) { - bytesMax = 1024; - bytes = (unsigned char*)malloc((size_t)bytesMax); - } - else { - bytesMax <<= 2; - oldBytes = bytes; - bytes = (unsigned char*)realloc(bytes,(size_t)bytesMax); - } - if (bytes == 0) { - mime_error("out of memory while processing BASE64 data\n"); - } - } - if (bytes) { - memcpy(bytes + bytesLen, outBytes, numOut); - bytesLen += numOut; - } - trip = 0; - quadIx = 0; - } - } - } /* while */ - DBG_(("db: bytesLen = %d\n", bytesLen)); - /* kludge: all this won't be necessary if we have tree form - representation */ - if (bytes) { - setValueWithSize(curProp,bytes,(unsigned int)bytesLen); - free(bytes); - } - else if (oldBytes) { - setValueWithSize(curProp,oldBytes,(unsigned int)bytesLen); - free(oldBytes); - } - return 0; - } - -static int match_begin_end_name(int end) { - int token; - lexSkipWhite(); - if (lexLookahead() != ':') return ID; - lexSkipLookahead(); - lexSkipWhite(); - token = match_begin_name(end); - if (token == ID) { - lexPushLookaheadc(':'); - DBG_(("db: ID '%s'\n", yylval.str)); - return ID; - } - else if (token != 0) { - lexSkipLookaheadWord(); - deleteStr(yylval.str); - DBG_(("db: begin/end %d\n", token)); - return token; - } - return 0; - } - -static char* lexGetQuotedPrintable() - { - char cur; - unsigned long len = 0; - - lexClearToken(); - do { - cur = lexGetc(); - switch (cur) { - case '=': { - int c = 0; - int next[2]; - int i; - for (i = 0; i < 2; i++) { - next[i] = lexGetc(); - if (next[i] >= '0' && next[i] <= '9') - c = c * 16 + next[i] - '0'; - else if (next[i] >= 'A' && next[i] <= 'F') - c = c * 16 + next[i] - 'A' + 10; - else - break; - } - if (i == 0) { - /* single '=' follow by LINESEP is continuation sign? */ - if (next[0] == '\n') { - ++mime_lineNum; - } - else { - lexPushLookaheadc('='); - goto EndString; - } - } - else if (i == 1) { - lexPushLookaheadc(next[1]); - lexPushLookaheadc(next[0]); - lexAppendc('='); - } else { - lexAppendc(c); - } - break; - } /* '=' */ - case '\n': { - lexPushLookaheadc('\n'); - goto EndString; - } - case (char)EOF: - break; - default: - lexAppendc(cur); - break; - } /* switch */ - } while (cur != (char)EOF); - -EndString: - lexAppendc(0); - return lexStr(); - } /* LexQuotedPrintable */ - -static int yylex() { - int token = 0; - - int lexmode = LEXMODE(); - if (lexmode == L_VALUES) { - int c = lexGetc(); - if (c == ';') { - DBG_(("db: SEMICOLON\n")); - lexPushLookaheadc(c); -#ifdef _SUPPORT_LINE_FOLDING - handleMoreRFC822LineBreak(c); -#endif - lexSkipLookahead(); - return SEMICOLON; - } - else if (strchr("\n",c)) { - ++mime_lineNum; - /* consume all line separator(s) adjacent to each other */ - c = lexLookahead(); - while (strchr("\n",c)) { - lexSkipLookahead(); - c = lexLookahead(); - ++mime_lineNum; - } - DBG_(("db: LINESEP\n")); - return LINESEP; - } - else { - char *p = 0; - lexPushLookaheadc(c); - if (lexWithinMode(L_BASE64)) { - /* get each char and convert to bin on the fly... */ - p = lexGetDataFromBase64(); - yylval.str = p; - return STRING; - } - else if (lexWithinMode(L_QUOTED_PRINTABLE)) { - p = lexGetQuotedPrintable(); - } - else { -#ifdef _SUPPORT_LINE_FOLDING - p = lexGet1Value(); -#else - p = lexGetStrUntil(";\n"); -#endif - } - if (p) { - DBG_(("db: STRING: '%s'\n", p)); - yylval.str = p; - return STRING; - } - else return 0; - } - } - else { - /* normal mode */ - while (1) { - int c = lexGetc(); - switch(c) { - case ':': { - /* consume all line separator(s) adjacent to each other */ - /* ignoring linesep immediately after colon. */ -/* c = lexLookahead(); - while (strchr("\n",c)) { - lexSkipLookahead(); - c = lexLookahead(); - ++mime_lineNum; - }*/ - DBG_(("db: COLON\n")); - return COLON; - } - case ';': - DBG_(("db: SEMICOLON\n")); - return SEMICOLON; - case '=': - DBG_(("db: EQ\n")); - return EQ; - /* ignore whitespace in this mode */ - case '\t': - case ' ': continue; - case '\n': { - ++mime_lineNum; - continue; - } - case EOF: return 0; - break; - default: { - lexPushLookaheadc(c); - if (isalpha(c)) { - char *t = lexGetWord(); - yylval.str = t; - if (!stricmp(t, "begin")) { - return match_begin_end_name(0); - } - else if (!stricmp(t,"end")) { - return match_begin_end_name(1); - } - else { - DBG_(("db: ID '%s'\n", t)); - return ID; - } - } - else { - /* unknow token */ - return 0; - } - break; - } - } - } - } - return 0; - } - - -/***************************************************************************/ -/*** Public Functions ****/ -/***************************************************************************/ - -static VObject* Parse_MIMEHelper() - { - ObjStackTop = -1; - mime_numErrors = 0; - mime_lineNum = 1; - vObjList = 0; - curObj = 0; - - if (yyparse() != 0) { - finiLex(); - return 0; - } - - finiLex(); - return vObjList; - } - -/*/////////////////////////////////////////////////////////////////////////*/ -DLLEXPORT(VObject*) Parse_MIME(const char *input, unsigned long len) - { - initLex(input, len, 0); - return Parse_MIMEHelper(); - } - - -#if INCLUDEMFC - -DLLEXPORT(VObject*) Parse_MIME_FromFile(CFile *file) - { - unsigned long startPos; - VObject *result; - - initLex(0,-1,file); - startPos = file->GetPosition(); - if (!(result = Parse_MIMEHelper())) - file->Seek(startPos, CFile::begin); - return result; - } - -#else - -VObject* Parse_MIME_FromFile(FILE *file) - { - VObject *result; - long startPos; - - initLex(0,(unsigned long)-1,file); - startPos = ftell(file); - if (!(result = Parse_MIMEHelper())) { - fseek(file,startPos,SEEK_SET); - } - return result; - } - -DLLEXPORT(VObject*) Parse_MIME_FromFileName(char *fname) - { - FILE *fp = fopen(fname,"r"); - if (fp) { - VObject* o = Parse_MIME_FromFile(fp); - fclose(fp); - return o; - } - else { - char msg[256]; - snprintf(msg, sizeof(msg), "can't open file '%s' for reading\n", fname); - mime_error_(msg); - return 0; - } - } - -#endif - -/*/////////////////////////////////////////////////////////////////////////*/ -static void YYDebug(const char *s) -{ -/* Parse_Debug(s); */ -} - - -static MimeErrorHandler mimeErrorHandler; - -DLLEXPORT(void) registerMimeErrorHandler(MimeErrorHandler me) - { - mimeErrorHandler = me; - } - -static void mime_error(char *s) - { - char msg[256]; - if (mimeErrorHandler) { - sprintf(msg,"%s at line %d", s, mime_lineNum); - mimeErrorHandler(msg); - } - } - -static void mime_error_(char *s) - { - if (mimeErrorHandler) { - mimeErrorHandler(s); - } - } - - diff --git a/libversit/vctest.c b/libversit/vctest.c deleted file mode 100644 index 7975d1e200..0000000000 --- a/libversit/vctest.c +++ /dev/null @@ -1,95 +0,0 @@ - -#include -#include -#include "vcc.h" - -FILE *cfp; - -void myMimeErrorHandler(char *s) -{ - printf("%s\n", s); -} - -void main(int argc, char **argv) -{ - int testmem = 0; - - char * foo[2] = {"foo","alden.vcf"}; - -argc = 2; -argv = foo; - -#ifdef _CONSOLE - cfp = stdout; - registerMimeErrorHandler(myMimeErrorHandler); -#else - cfp = fopen("vctest.out", "w"); - if (!cfp) return; -#endif - ++argv; - while (--argc) { - FILE *fp; - if (strcmp(*argv,"-testmem") == 0) { - testmem = 1; - argv++; - continue; - } - fprintf(cfp,"processing %s\n",*argv); - fp = fopen(*argv,"r"); - if (!fp) { - fprintf(cfp,"error opening file\n"); - } - else { - VObject *v, *t; - FILE *ofp; - char buf[256]; - char *p; - strcpy(buf,*argv); - p = strchr(buf,'.'); - if (p) *p = 0; - strcat(buf,".out"); - fprintf(cfp,"reading text input from '%s'...\n", *argv); - /*v = Parse_MIME_FromFile(fp); */ - v = Parse_MIME_FromFileName(*argv); - writeVObjectToFile(buf,v); - cleanVObject(v); - - /* - fprintf(cfp,"pretty print internal format of '%s'...\n", *argv); - ofp = fopen(buf,"w"); - while (v) { - printVObject(cfp,v); - if (testmem) { - char *s, *p; - fprintf(cfp,"test writing to mem...\n"); - p = s = writeMemVObject(0,0,v); - if (s) { - while (*s) { - fputc(*s,ofp); - s++; - } - free(p); - } - } - else { - writeVObject(ofp,v); - } - t = v; - v = nextVObjectInList(v); - cleanVObject(t); - } - - fclose(ofp); - fclose(fp); - */ - } - - cleanStrTbl(); - argv++; - - } - - if (cfp != stdout) fclose(cfp); - -} - diff --git a/libversit/vobject.c b/libversit/vobject.c deleted file mode 100644 index d685b04278..0000000000 --- a/libversit/vobject.c +++ /dev/null @@ -1,1452 +0,0 @@ -/*************************************************************************** -(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International -Business Machines Corporation and Siemens Rolm Communications Inc. - -For purposes of this license notice, the term Licensors shall mean, -collectively, Apple Computer, Inc., AT&T Corp., International -Business Machines Corporation and Siemens Rolm Communications Inc. -The term Licensor shall mean any of the Licensors. - -Subject to acceptance of the following conditions, permission is hereby -granted by Licensors without the need for written agreement and without -license or royalty fees, to use, copy, modify and distribute this -software for any purpose. - -The above copyright notice and the following four paragraphs must be -reproduced in all copies of this software and any software including -this software. - -THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE -ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR -MODIFICATIONS. - -IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT, -INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT -OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -DAMAGE. - -EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED, -INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. - -The software is provided with RESTRICTED RIGHTS. Use, duplication, or -disclosure by the government are subject to restrictions set forth in -DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable. - -***************************************************************************/ - -/* - * src: vobject.c - * doc: vobject and APIs to construct vobject, APIs pretty print - * vobject, and convert a vobject into its textual representation. - */ - -#ifndef MWERKS -#include -#endif - -#include "vobject.h" -#include -#include -#include - - -#define NAME_OF(o) o->id -#define VALUE_TYPE(o) o->valType -#define STRINGZ_VALUE_OF(o) o->val.strs -#define USTRINGZ_VALUE_OF(o) o->val.ustrs -#define INTEGER_VALUE_OF(o) o->val.i -#define LONG_VALUE_OF(o) o->val.l -#define ANY_VALUE_OF(o) o->val.any -#define VOBJECT_VALUE_OF(o) o->val.vobj - -typedef union ValueItem { - const char *strs; - const wchar_t *ustrs; - unsigned int i; - unsigned long l; - void *any; - VObject *vobj; - } ValueItem; - -struct VObject { - VObject *next; - const char *id; - VObject *prop; - unsigned short valType; - ValueItem val; - }; - -typedef struct StrItem StrItem; - -struct StrItem { - StrItem *next; - const char *s; - unsigned int refCnt; - }; - -const char** fieldedProp; - - - -/*---------------------------------------------------------------------- - The following functions involve with memory allocation: - newVObject - deleteVObject - dupStr - deleteStr - newStrItem - deleteStrItem - ----------------------------------------------------------------------*/ - -DLLEXPORT(VObject*) newVObject_(const char *id) -{ - VObject *p = (VObject*)malloc(sizeof(VObject)); - p->next = 0; - p->id = id; - p->prop = 0; - VALUE_TYPE(p) = 0; - ANY_VALUE_OF(p) = 0; - return p; -} - -DLLEXPORT(VObject*) newVObject(const char *id) -{ - return newVObject_(lookupStr(id)); -} - -DLLEXPORT(void) deleteVObject(VObject *p) -{ - unUseStr(p->id); - free(p); -} - -DLLEXPORT(char*) dupStr(const char *s, unsigned int size) -{ - char *t; - if (size == 0) { - size = strlen(s); - } - t = (char*)malloc(size+1); - if (t) { - memcpy(t,s,size); - t[size] = 0; - return t; - } - else { - return (char*)0; - } -} - -DLLEXPORT(void) deleteStr(const char *p) -{ - if (p) free((void*)p); -} - - -static StrItem* newStrItem(const char *s, StrItem *next) -{ - StrItem *p = (StrItem*)malloc(sizeof(StrItem)); - p->next = next; - p->s = s; - p->refCnt = 1; - return p; -} - -static void deleteStrItem(StrItem *p) -{ - free((void*)p); -} - - -/*---------------------------------------------------------------------- - The following function provide accesses to VObject's value. - ----------------------------------------------------------------------*/ - -DLLEXPORT(const char*) vObjectName(VObject *o) -{ - return NAME_OF(o); -} - -DLLEXPORT(void) setVObjectName(VObject *o, const char* id) -{ - NAME_OF(o) = id; -} - -DLLEXPORT(const char*) vObjectStringZValue(VObject *o) -{ - return STRINGZ_VALUE_OF(o); -} - -DLLEXPORT(void) setVObjectStringZValue(VObject *o, const char *s) -{ - STRINGZ_VALUE_OF(o) = dupStr(s,0); - VALUE_TYPE(o) = VCVT_STRINGZ; -} - -DLLEXPORT(void) setVObjectStringZValue_(VObject *o, const char *s) -{ - STRINGZ_VALUE_OF(o) = s; - VALUE_TYPE(o) = VCVT_STRINGZ; -} - -DLLEXPORT(const wchar_t*) vObjectUStringZValue(VObject *o) -{ - return USTRINGZ_VALUE_OF(o); -} - -DLLEXPORT(void) setVObjectUStringZValue(VObject *o, const wchar_t *s) -{ - USTRINGZ_VALUE_OF(o) = (wchar_t*) dupStr((char*)s,(uStrLen(s)+1)*2); - VALUE_TYPE(o) = VCVT_USTRINGZ; -} - -DLLEXPORT(void) setVObjectUStringZValue_(VObject *o, const wchar_t *s) -{ - USTRINGZ_VALUE_OF(o) = s; - VALUE_TYPE(o) = VCVT_USTRINGZ; -} - -DLLEXPORT(unsigned int) vObjectIntegerValue(VObject *o) -{ - return INTEGER_VALUE_OF(o); -} - -DLLEXPORT(void) setVObjectIntegerValue(VObject *o, unsigned int i) -{ - INTEGER_VALUE_OF(o) = i; - VALUE_TYPE(o) = VCVT_UINT; -} - -DLLEXPORT(unsigned long) vObjectLongValue(VObject *o) -{ - return LONG_VALUE_OF(o); -} - -DLLEXPORT(void) setVObjectLongValue(VObject *o, unsigned long l) -{ - LONG_VALUE_OF(o) = l; - VALUE_TYPE(o) = VCVT_ULONG; -} - -DLLEXPORT(void*) vObjectAnyValue(VObject *o) -{ - return ANY_VALUE_OF(o); -} - -DLLEXPORT(void) setVObjectAnyValue(VObject *o, void *t) -{ - ANY_VALUE_OF(o) = t; - VALUE_TYPE(o) = VCVT_RAW; -} - -DLLEXPORT(VObject*) vObjectVObjectValue(VObject *o) -{ - return VOBJECT_VALUE_OF(o); -} - -DLLEXPORT(void) setVObjectVObjectValue(VObject *o, VObject *p) -{ - VOBJECT_VALUE_OF(o) = p; - VALUE_TYPE(o) = VCVT_VOBJECT; -} - -DLLEXPORT(int) vObjectValueType(VObject *o) -{ - return VALUE_TYPE(o); -} - - -/*---------------------------------------------------------------------- - The following functions can be used to build VObject. - ----------------------------------------------------------------------*/ - -DLLEXPORT(VObject*) addVObjectProp(VObject *o, VObject *p) -{ - /* circular link list pointed to tail */ - /* - o {next,id,prop,val} - V - pn {next,id,prop,val} - V - ... - p1 {next,id,prop,val} - V - pn - --> - o {next,id,prop,val} - V - pn {next,id,prop,val} - V - p {next,id,prop,val} - ... - p1 {next,id,prop,val} - V - pn - */ - - VObject *tail = o->prop; - if (tail) { - p->next = tail->next; - o->prop = tail->next = p; - } - else { - o->prop = p->next = p; - } - return p; -} - -DLLEXPORT(VObject*) addProp(VObject *o, const char *id) -{ - return addVObjectProp(o,newVObject(id)); -} - -DLLEXPORT(VObject*) addProp_(VObject *o, const char *id) -{ - return addVObjectProp(o,newVObject_(id)); -} - -DLLEXPORT(void) addList(VObject **o, VObject *p) -{ - p->next = 0; - if (*o == 0) { - *o = p; - } - else { - VObject *t = *o; - while (t->next) { - t = t->next; - } - t->next = p; - } -} - -DLLEXPORT(VObject*) nextVObjectInList(VObject *o) -{ - return o->next; -} - -DLLEXPORT(VObject*) setValueWithSize_(VObject *prop, void *val, unsigned int size) -{ - VObject *sizeProp; - setVObjectAnyValue(prop, val); - sizeProp = addProp(prop,VCDataSizeProp); - setVObjectLongValue(sizeProp, size); - return prop; -} - -DLLEXPORT(VObject*) setValueWithSize(VObject *prop, void *val, unsigned int size) -{ - void *p = dupStr((const char *)val,size); - return setValueWithSize_(prop,p,p?size:0); -} - -DLLEXPORT(void) initPropIterator(VObjectIterator *i, VObject *o) -{ - i->start = o->prop; - i->next = 0; -} - -DLLEXPORT(void) initVObjectIterator(VObjectIterator *i, VObject *o) -{ - i->start = o->next; - i->next = 0; -} - -DLLEXPORT(int) moreIteration(VObjectIterator *i) -{ - return (i->start && (i->next==0 || i->next!=i->start)); -} - -DLLEXPORT(VObject*) nextVObject(VObjectIterator *i) -{ - if (i->start && i->next != i->start) { - if (i->next == 0) { - i->next = i->start->next; - return i->next; - } - else { - i->next = i->next->next; - return i->next; - } - } - else return (VObject*)0; -} - -DLLEXPORT(VObject*) isAPropertyOf(VObject *o, const char *id) -{ - VObjectIterator i; - initPropIterator(&i,o); - while (moreIteration(&i)) { - VObject *each = nextVObject(&i); - if (!stricmp(id,each->id)) - return each; - } - return (VObject*)0; -} - -DLLEXPORT(VObject*) addGroup(VObject *o, const char *g) -{ - /* - a.b.c - --> - prop(c) - prop(VCGrouping=b) - prop(VCGrouping=a) - */ - char *dot = strrchr(g,'.'); - if (dot) { - VObject *p, *t; - char *gs, *n = dot+1; - gs = dupStr(g,0); /* so we can write to it. */ - /* used to be - * t = p = addProp_(o,lookupProp_(n)); - */ - t = p = addProp_(o,lookupProp(n)); - dot = strrchr(gs,'.'); - *dot = 0; - do { - dot = strrchr(gs,'.'); - if (dot) { - n = dot+1; - *dot=0; - } - else - n = gs; - /* property(VCGroupingProp=n); - * and the value may have VCGrouping property - */ - t = addProp(t,VCGroupingProp); - setVObjectStringZValue(t,lookupProp_(n)); - } while (n != gs); - deleteStr(gs); - return p; - } - else - return addProp_(o,lookupProp(g)); -} - -DLLEXPORT(VObject*) addPropValue(VObject *o, const char *p, const char *v) -{ - VObject *prop; - prop = addProp(o,p); - setVObjectUStringZValue_(prop, fakeUnicode(v,0)); - return prop; -} - -DLLEXPORT(VObject*) addPropSizedValue_(VObject *o, const char *p, const char *v, - unsigned int size) -{ - VObject *prop; - prop = addProp(o,p); - setValueWithSize_(prop, (void*)v, size); - return prop; -} - -DLLEXPORT(VObject*) addPropSizedValue(VObject *o, const char *p, const char *v, - unsigned int size) -{ - return addPropSizedValue_(o,p,dupStr(v,size),size); -} - - - -/*---------------------------------------------------------------------- - The following pretty print a VObject - ----------------------------------------------------------------------*/ - -static void printVObject_(FILE *fp, VObject *o, int level); - -static void indent(FILE *fp, int level) -{ - int i; - for (i=0;i */ - appendcOFile_(fp,0xd); - appendcOFile_(fp,0xa); - } - else - appendcOFile_(fp,c); -} - -static void appendsOFile(OFile *fp, const char *s) -{ - int i, slen; - slen = strlen(s); - for (i=0; ifp = ofp; - fp->s = 0; - fp->len = 0; - fp->limit = 0; - fp->alloc = 0; - fp->fail = 0; -} - -static void initMemOFile(OFile *fp, char *s, int len) -{ - fp->fp = 0; - fp->s = s; - fp->len = 0; - fp->limit = s?len:0; - fp->alloc = s?0:1; - fp->fail = 0; -} - - -static int writeBase64(OFile *fp, unsigned char *s, long len) -{ - long cur = 0; - int i, numQuads = 0; - unsigned long trip; - unsigned char b; - char quad[5]; -#define MAXQUADS 16 - - quad[4] = 0; - - while (cur < len) { - /* collect the triplet of bytes into 'trip' */ - trip = 0; - for (i = 0; i < 3; i++) { - b = (cur < len) ? *(s + cur) : 0; - cur++; - trip = trip << 8 | b; - } - /* fill in 'quad' with the appropriate four characters */ - for (i = 3; i >= 0; i--) { - b = (unsigned char)(trip & 0x3F); - trip = trip >> 6; - if ((3 - i) < (cur - len)) - quad[i] = '='; /* pad char */ - else if (b < 26) quad[i] = (char)b + 'A'; - else if (b < 52) quad[i] = (char)(b - 26) + 'a'; - else if (b < 62) quad[i] = (char)(b - 52) + '0'; - else if (b == 62) quad[i] = '+'; - else quad[i] = '/'; - } - /* now output 'quad' with appropriate whitespace and line ending */ - appendsOFile(fp, (numQuads == 0 ? " " : "")); - appendsOFile(fp, quad); - appendsOFile(fp, ((cur >= len)?"\n" :(numQuads==MAXQUADS-1?"\n" : ""))); - numQuads = (numQuads + 1) % MAXQUADS; - } - appendcOFile(fp,'\n'); - - return 1; -} - -static void writeString(OFile *fp, const char *s) -{ - appendsOFile(fp,s); -} - -static void writeQPString(OFile *fp, const char *s) -{ - char buf[4]; - int count=0; - const char *p = s; - - while (*p) { - /* break up lines biggger than 75 chars */ - if(count >=74){ - count=0; - appendsOFile(fp,"=\n"); - } - - /* escape any non ASCII characters and '=' as per rfc1521 */ - if (*p<= 0x1f || *p >=0x7f || *p == '=' ) { - sprintf(buf,"=%02X",(unsigned char)*p); - appendsOFile(fp,buf); - count+=3; - } else { - appendcOFile(fp,*p); - count++; - } - p++; - } -} - - - -static void writeVObject_(OFile *fp, VObject *o); - -static void writeValue(OFile *fp, VObject *o, unsigned long size,int quote) -{ - if (o == 0) return; - switch (VALUE_TYPE(o)) { - case VCVT_USTRINGZ: { - char *s = fakeCString(USTRINGZ_VALUE_OF(o)); - if(quote) writeQPString(fp, s); - else writeString(fp,s); - deleteStr(s); - break; - } - case VCVT_STRINGZ: { - if(quote) writeQPString(fp, STRINGZ_VALUE_OF(o)); - else writeString(fp,STRINGZ_VALUE_OF(o)); - break; - } - case VCVT_UINT: { - char buf[16]; - sprintf(buf,"%u", INTEGER_VALUE_OF(o)); - appendsOFile(fp,buf); - break; - } - case VCVT_ULONG: { - char buf[16]; - sprintf(buf,"%lu", LONG_VALUE_OF(o)); - appendsOFile(fp,buf); - break; - } - case VCVT_RAW: { - appendcOFile(fp,'\n'); - writeBase64(fp,(unsigned char*)(ANY_VALUE_OF(o)),size); - break; - } - case VCVT_VOBJECT: - appendcOFile(fp,'\n'); - writeVObject_(fp,VOBJECT_VALUE_OF(o)); - break; - } -} - -static void writeAttrValue(OFile *fp, VObject *o) -{ - if (NAME_OF(o)) { - struct PreDefProp *pi; - pi = lookupPropInfo(NAME_OF(o)); - if (pi && ((pi->flags & PD_INTERNAL) != 0)) return; - appendcOFile(fp,';'); - appendsOFile(fp,NAME_OF(o)); - } - else - appendcOFile(fp,';'); - if (VALUE_TYPE(o)) { - appendcOFile(fp,'='); - writeValue(fp,o,0,0); - } -} - -static void writeGroup(OFile *fp, VObject *o) -{ - char buf1[256]; - char buf2[256]; - strcpy(buf1,NAME_OF(o)); - while ((o=isAPropertyOf(o,VCGroupingProp)) != 0) { - strcpy(buf2,STRINGZ_VALUE_OF(o)); - strcat(buf2,"."); - strcat(buf2,buf1); - strcpy(buf1,buf2); - } - appendsOFile(fp,buf1); -} - -static int inList(const char **list, const char *s) -{ - if (list == 0) return 0; - while (*list) { - if (stricmp(*list,s) == 0) return 1; - list++; - } - return 0; -} - -static void writeProp(OFile *fp, VObject *o) -{ - int isQuoted=0; - if (NAME_OF(o)) { - struct PreDefProp *pi; - VObjectIterator t; - const char **fields_ = 0; - pi = lookupPropInfo(NAME_OF(o)); - if (pi && ((pi->flags & PD_BEGIN) != 0)) { - writeVObject_(fp,o); - return; - } - if (isAPropertyOf(o,VCGroupingProp)) - writeGroup(fp,o); - else - appendsOFile(fp,NAME_OF(o)); - if (pi) fields_ = pi->fields; - initPropIterator(&t,o); - while (moreIteration(&t)) { - const char *s; - VObject *eachProp = nextVObject(&t); - s = NAME_OF(eachProp); - if (stricmp(VCGroupingProp,s) && !inList(fields_,s)) - writeAttrValue(fp,eachProp); - if (stricmp(VCQPProp,s)==0 || stricmp(VCQuotedPrintableProp,s)==0) - isQuoted=1; - } - if (fields_) { - int i = 0, n = 0; - const char** fields = fields_; - /* output prop as fields */ - appendcOFile(fp,':'); - while (*fields) { - VObject *t = isAPropertyOf(o,*fields); - i++; - if (t) n = i; - fields++; - } - fields = fields_; - for (i=0;iflags & PD_BEGIN) != 0)) { - VObjectIterator t; - const char *begin = NAME_OF(o); - appendsOFile(fp,"BEGIN:"); - appendsOFile(fp,begin); - appendcOFile(fp,'\n'); - initPropIterator(&t,o); - while (moreIteration(&t)) { - VObject *eachProp = nextVObject(&t); - writeProp(fp, eachProp); - } - appendsOFile(fp,"END:"); - appendsOFile(fp,begin); - appendsOFile(fp,"\n\n"); - } - } -} - -void writeVObject(FILE *fp, VObject *o) -{ - OFile ofp; - initOFile(&ofp,fp); - writeVObject_(&ofp,o); -} - -DLLEXPORT(void) writeVObjectToFile(char *fname, VObject *o) -{ - FILE *fp = fopen(fname,"w"); - if (fp) { - writeVObject(fp,o); - fclose(fp); - } -} - -DLLEXPORT(void) writeVObjectsToFile(char *fname, VObject *list) -{ - FILE *fp = fopen(fname,"w"); - if (fp) { - while (list) { - writeVObject(fp,list); - list = nextVObjectInList(list); - } - fclose(fp); - } -} - -DLLEXPORT(char*) writeMemVObject(char *s, int *len, VObject *o) -{ - OFile ofp; - initMemOFile(&ofp,s,len?*len:0); - writeVObject_(&ofp,o); - if (len) *len = ofp.len; - appendcOFile(&ofp,0); - return ofp.s; -} - -DLLEXPORT(char*) writeMemVObjects(char *s, int *len, VObject *list) -{ - OFile ofp; - initMemOFile(&ofp,s,len?*len:0); - while (list) { - writeVObject_(&ofp,list); - list = nextVObjectInList(list); - } - if (len) *len = ofp.len; - appendcOFile(&ofp,0); - return ofp.s; -} - -/*---------------------------------------------------------------------- - APIs to do fake Unicode stuff. - ----------------------------------------------------------------------*/ -DLLEXPORT(wchar_t*) fakeUnicode(const char *ps, int *bytes) -{ - wchar_t *r, *pw; - int len = strlen(ps)+1; - - pw = r = (wchar_t*)malloc(sizeof(wchar_t)*len); - if (bytes) - *bytes = len * sizeof(wchar_t); - - while (*ps) { - if (*ps == '\n') - *pw = (wchar_t)0x2028; - else if (*ps == '\r') - *pw = (wchar_t)0x2029; - else - *pw = (wchar_t)(unsigned char)*ps; - ps++; pw++; - } - *pw = (wchar_t)0; - - return r; -} - -DLLEXPORT(int) uStrLen(const wchar_t *u) -{ - int i = 0; - while (*u != (wchar_t)0) { u++; i++; } - return i; -} - -DLLEXPORT(char*) fakeCString(const wchar_t *u) -{ - char *s, *t; - int len = uStrLen(u) + 1; - t = s = (char*)malloc(len); - while (*u) { - if (*u == (wchar_t)0x2028) - *t = '\n'; - else if (*u == (wchar_t)0x2029) - *t = '\r'; - else - *t = (char)*u; - u++; t++; - } - *t = 0; - return s; -} - -/* end of source file vobject.c */ diff --git a/libversit/vobject.h b/libversit/vobject.h deleted file mode 100644 index bc31dc8297..0000000000 --- a/libversit/vobject.h +++ /dev/null @@ -1,366 +0,0 @@ -/*************************************************************************** -(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International -Business Machines Corporation and Siemens Rolm Communications Inc. - -For purposes of this license notice, the term Licensors shall mean, -collectively, Apple Computer, Inc., AT&T Corp., International -Business Machines Corporation and Siemens Rolm Communications Inc. -The term Licensor shall mean any of the Licensors. - -Subject to acceptance of the following conditions, permission is hereby -granted by Licensors without the need for written agreement and without -license or royalty fees, to use, copy, modify and distribute this -software for any purpose. - -The above copyright notice and the following four paragraphs must be -reproduced in all copies of this software and any software including -this software. - -THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE -ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR -MODIFICATIONS. - -IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT, -INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT -OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -DAMAGE. - -EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED, -INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. - -The software is provided with RESTRICTED RIGHTS. Use, duplication, or -disclosure by the government are subject to restrictions set forth in -DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable. - -***************************************************************************/ - -/* - -The vCard/vCalendar C interface is implemented in the set -of files as follows: - -vcc.y, yacc source, and vcc.c, the yacc output you will use -implements the core parser - -vobject.c implements an API that insulates the caller from -the parser and changes in the vCard/vCalendar BNF - -port.h defines compilation environment dependent stuff - -vcc.h and vobject.h are header files for their .c counterparts - -vcaltmp.h and vcaltmp.c implement vCalendar "macro" functions -which you may find useful. - -test.c is a standalone test driver that exercises some of -the features of the APIs provided. Invoke test.exe on a -VCARD/VCALENDAR input text file and you will see the pretty -print output of the internal representation (this pretty print -output should give you a good idea of how the internal -representation looks like -- there is one such output in the -following too). Also, a file with the .out suffix is generated -to show that the internal representation can be written back -in the original text format. - -For more information on this API see the readme.txt file -which accompanied this distribution. - - Also visit: - - http://www.versit.com - http://www.ralden.com - -*/ - - -#ifndef __VOBJECT_H__ -#define __VOBJECT_H__ 1 - - -#include "port.h" -#include -#include - -#if defined(__CPLUSPLUS__) || defined(__cplusplus) -extern "C" { -#endif - - -#define VC7bitProp "7BIT" -#define VC8bitProp "8BIT" -#define VCAAlarmProp "AALARM" -#define VCAdditionalNamesProp "ADDN" -#define VCAdrProp "ADR" -#define VCAgentProp "AGENT" -#define VCAIFFProp "AIFF" -#define VCAOLProp "AOL" -#define VCAppleLinkProp "APPLELINK" -#define VCAttachProp "ATTACH" -#define VCAttendeeProp "ATTENDEE" -#define VCATTMailProp "ATTMAIL" -#define VCAudioContentProp "AUDIOCONTENT" -#define VCAVIProp "AVI" -#define VCBase64Prop "BASE64" -#define VCBBSProp "BBS" -#define VCBirthDateProp "BDAY" -#define VCBMPProp "BMP" -#define VCBodyProp "BODY" -#define VCBusinessRoleProp "ROLE" -#define VCCalProp "VCALENDAR" -#define VCCaptionProp "CAP" -#define VCCardProp "VCARD" -#define VCCarProp "CAR" -#define VCCategoriesProp "CATEGORIES" -#define VCCellularProp "CELL" -#define VCCGMProp "CGM" -#define VCCharSetProp "CS" -#define VCCIDProp "CID" -#define VCCISProp "CIS" -#define VCCityProp "L" -#define VCClassProp "CLASS" -#define VCCommentProp "NOTE" -#define VCCompletedProp "COMPLETED" -#define VCContentIDProp "CONTENT-ID" -#define VCCountryNameProp "C" -#define VCDAlarmProp "DALARM" -#define VCDataSizeProp "DATASIZE" -#define VCDayLightProp "DAYLIGHT" -#define VCDCreatedProp "DCREATED" -#define VCDeliveryLabelProp "LABEL" -#define VCDescriptionProp "DESCRIPTION" -#define VCDIBProp "DIB" -#define VCDisplayStringProp "DISPLAYSTRING" -#define VCDomesticProp "DOM" -#define VCDTendProp "DTEND" -#define VCDTstartProp "DTSTART" -#define VCDueProp "DUE" -#define VCEmailAddressProp "EMAIL" -#define VCEncodingProp "ENCODING" -#define VCEndProp "END" -#define VCEventProp "VEVENT" -#define VCEWorldProp "EWORLD" -#define VCExNumProp "EXNUM" -#define VCExpDateProp "EXDATE" -#define VCExpectProp "EXPECT" -#define VCExtAddressProp "EXT ADD" -#define VCFamilyNameProp "F" -#define VCFaxProp "FAX" -#define VCFullNameProp "FN" -#define VCGeoProp "GEO" -#define VCGeoLocationProp "GEO" -#define VCGIFProp "GIF" -#define VCGivenNameProp "G" -#define VCGroupingProp "Grouping" -#define VCHomeProp "HOME" -#define VCIBMMailProp "IBMMail" -#define VCInlineProp "INLINE" -#define VCInternationalProp "INTL" -#define VCInternetProp "INTERNET" -#define VCISDNProp "ISDN" -#define VCJPEGProp "JPEG" -#define VCLanguageProp "LANG" -#define VCLastModifiedProp "LAST-MODIFIED" -#define VCLastRevisedProp "REV" -#define VCLocationProp "LOCATION" -#define VCLogoProp "LOGO" -#define VCMailerProp "MAILER" -#define VCMAlarmProp "MALARM" -#define VCMCIMailProp "MCIMAIL" -#define VCMessageProp "MSG" -#define VCMETProp "MET" -#define VCModemProp "MODEM" -#define VCMPEG2Prop "MPEG2" -#define VCMPEGProp "MPEG" -#define VCMSNProp "MSN" -#define VCNamePrefixesProp "NPRE" -#define VCNameProp "N" -#define VCNameSuffixesProp "NSUF" -#define VCNoteProp "NOTE" -#define VCOrgNameProp "ORGNAME" -#define VCOrgProp "ORG" -#define VCOrgUnit2Prop "OUN2" -#define VCOrgUnit3Prop "OUN3" -#define VCOrgUnit4Prop "OUN4" -#define VCOrgUnitProp "OUN" -#define VCPagerProp "PAGER" -#define VCPAlarmProp "PALARM" -#define VCParcelProp "PARCEL" -#define VCPartProp "PART" -#define VCPCMProp "PCM" -#define VCPDFProp "PDF" -#define VCPGPProp "PGP" -#define VCPhotoProp "PHOTO" -#define VCPICTProp "PICT" -#define VCPMBProp "PMB" -#define VCPostalBoxProp "BOX" -#define VCPostalCodeProp "PC" -#define VCPostalProp "POSTAL" -#define VCPowerShareProp "POWERSHARE" -#define VCPreferredProp "PREF" -#define VCPriorityProp "PRIORITY" -#define VCProcedureNameProp "PROCEDURENAME" -#define VCProdIdProp "PRODID" -#define VCProdigyProp "PRODIGY" -#define VCPronunciationProp "SOUND" -#define VCPSProp "PS" -#define VCPublicKeyProp "KEY" -#define VCQPProp "QP" -#define VCQuickTimeProp "QTIME" -#define VCQuotedPrintableProp "QUOTED-PRINTABLE" -#define VCRDateProp "RDATE" -#define VCRegionProp "R" -#define VCRelatedToProp "RELATED-TO" -#define VCRepeatCountProp "REPEATCOUNT" -#define VCResourcesProp "RESOURCES" -#define VCRNumProp "RNUM" -#define VCRoleProp "ROLE" -#define VCRRuleProp "RRULE" -#define VCRSVPProp "RSVP" -#define VCRunTimeProp "RUNTIME" -#define VCSequenceProp "SEQUENCE" -#define VCSnoozeTimeProp "SNOOZETIME" -#define VCStartProp "START" -#define VCStatusProp "STATUS" -#define VCStreetAddressProp "STREET" -#define VCSubTypeProp "SUBTYPE" -#define VCSummaryProp "SUMMARY" -#define VCTelephoneProp "TEL" -#define VCTIFFProp "TIFF" -#define VCTimeZoneProp "TZ" -#define VCTitleProp "TITLE" -#define VCTLXProp "TLX" -#define VCTodoProp "VTODO" -#define VCTranspProp "TRANSP" -#define VCUniqueStringProp "UID" -#define VCURLProp "URL" -#define VCURLValueProp "URLVAL" -#define VCValueProp "VALUE" -#define VCVersionProp "VERSION" -#define VCVideoProp "VIDEO" -#define VCVoiceProp "VOICE" -#define VCWAVEProp "WAVE" -#define VCWMFProp "WMF" -#define VCWorkProp "WORK" -#define VCX400Prop "X400" -#define VCX509Prop "X509" -#define VCXRuleProp "XRULE" - -/* Extensions */ - -#define XPilotIdProp "X-PILOTID" -#define XPilotStatusProp "X-PILOTSTAT" - -typedef struct VObject VObject; - -typedef struct VObjectIterator { - VObject* start; - VObject* next; - } VObjectIterator; - -extern DLLEXPORT(VObject*) newVObject(const char *id); -extern DLLEXPORT(void) deleteVObject(VObject *p); -extern DLLEXPORT(char*) dupStr(const char *s, unsigned int size); -extern DLLEXPORT(void) deleteStr(const char *p); -extern DLLEXPORT(void) unUseStr(const char *s); - -extern DLLEXPORT(void) setVObjectName(VObject *o, const char* id); -extern DLLEXPORT(void) setVObjectStringZValue(VObject *o, const char *s); -extern DLLEXPORT(void) setVObjectStringZValue_(VObject *o, const char *s); -extern DLLEXPORT(void) setVObjectUStringZValue(VObject *o, const wchar_t *s); -extern DLLEXPORT(void) setVObjectUStringZValue_(VObject *o, const wchar_t *s); -extern DLLEXPORT(void) setVObjectIntegerValue(VObject *o, unsigned int i); -extern DLLEXPORT(void) setVObjectLongValue(VObject *o, unsigned long l); -extern DLLEXPORT(void) setVObjectAnyValue(VObject *o, void *t); -extern DLLEXPORT(VObject*) setValueWithSize(VObject *prop, void *val, unsigned int size); -extern DLLEXPORT(VObject*) setValueWithSize_(VObject *prop, void *val, unsigned int size); - -extern DLLEXPORT(const char*) vObjectName(VObject *o); -extern DLLEXPORT(const char*) vObjectStringZValue(VObject *o); -extern DLLEXPORT(const wchar_t*) vObjectUStringZValue(VObject *o); -extern DLLEXPORT(unsigned int) vObjectIntegerValue(VObject *o); -extern DLLEXPORT(unsigned long) vObjectLongValue(VObject *o); -extern DLLEXPORT(void*) vObjectAnyValue(VObject *o); -extern DLLEXPORT(VObject*) vObjectVObjectValue(VObject *o); -extern DLLEXPORT(void) setVObjectVObjectValue(VObject *o, VObject *p); - -extern DLLEXPORT(VObject*) addVObjectProp(VObject *o, VObject *p); -extern DLLEXPORT(VObject*) addProp(VObject *o, const char *id); -extern DLLEXPORT(VObject*) addProp_(VObject *o, const char *id); -extern DLLEXPORT(VObject*) addPropValue(VObject *o, const char *p, const char *v); -extern DLLEXPORT(VObject*) addPropSizedValue_(VObject *o, const char *p, const char *v, unsigned int size); -extern DLLEXPORT(VObject*) addPropSizedValue(VObject *o, const char *p, const char *v, unsigned int size); -extern DLLEXPORT(VObject*) addGroup(VObject *o, const char *g); -extern DLLEXPORT(void) addList(VObject **o, VObject *p); - -extern DLLEXPORT(VObject*) isAPropertyOf(VObject *o, const char *id); - -extern DLLEXPORT(VObject*) nextVObjectInList(VObject *o); -extern DLLEXPORT(void) initPropIterator(VObjectIterator *i, VObject *o); -extern DLLEXPORT(int) moreIteration(VObjectIterator *i); -extern DLLEXPORT(VObject*) nextVObject(VObjectIterator *i); - -extern DLLEXPORT(char*) writeMemVObject(char *s, int *len, VObject *o); -extern DLLEXPORT(char*) writeMemVObjects(char *s, int *len, VObject *list); - -extern DLLEXPORT(const char*) lookupStr(const char *s); -extern DLLEXPORT(void) cleanStrTbl(); - -extern DLLEXPORT(void) cleanVObject(VObject *o); -extern DLLEXPORT(void) cleanVObjects(VObject *list); - -extern DLLEXPORT(const char*) lookupProp(const char* str); -extern DLLEXPORT(const char*) lookupProp_(const char* str); - -extern DLLEXPORT(wchar_t*) fakeUnicode(const char *ps, int *bytes); -extern DLLEXPORT(int) uStrLen(const wchar_t *u); -extern DLLEXPORT(char*) fakeCString(const wchar_t *u); - -extern DLLEXPORT(void) printVObjectToFile(char *fname,VObject *o); -extern DLLEXPORT(void) printVObjectsToFile(char *fname,VObject *list); -extern DLLEXPORT(void) writeVObjectToFile(char *fname, VObject *o); -extern DLLEXPORT(void) writeVObjectsToFile(char *fname, VObject *list); - -extern DLLEXPORT(int) vObjectValueType(VObject *o); - -/* return type of vObjectValueType: */ -#define VCVT_NOVALUE 0 - /* if the VObject has no value associated with it. */ -#define VCVT_STRINGZ 1 - /* if the VObject has value set by setVObjectStringZValue. */ -#define VCVT_USTRINGZ 2 - /* if the VObject has value set by setVObjectUStringZValue. */ -#define VCVT_UINT 3 - /* if the VObject has value set by setVObjectIntegerValue. */ -#define VCVT_ULONG 4 - /* if the VObject has value set by setVObjectLongValue. */ -#define VCVT_RAW 5 - /* if the VObject has value set by setVObjectAnyValue. */ -#define VCVT_VOBJECT 6 - /* if the VObject has value set by setVObjectVObjectValue. */ - -extern const char** fieldedProp; - -/* NOTE regarding printVObject and writeVObject - -The functions below are not exported from the DLL because they -take a FILE* as a parameter, which cannot be passed across a DLL -interface (at least that is my experience). Instead you can use -their companion functions which take file names or pointers -to memory. However, if you are linking this code into -your build directly then you may find them a more convenient API -and you can go ahead and use them. If you try to use them with -the DLL LIB you will get a link error. -*/ -extern void printVObject(FILE *fp,VObject *o); -extern void writeVObject(FILE *fp, VObject *o); - - -#if defined(__CPLUSPLUS__) || defined(__cplusplus) -} -#endif - -#endif /* __VOBJECT_H__ */ - - diff --git a/mail/.cvsignore b/mail/.cvsignore deleted file mode 100644 index 898d2ab6fc..0000000000 --- a/mail/.cvsignore +++ /dev/null @@ -1,13 +0,0 @@ -.deps -.libs -.pure -Makefile -Makefile.in -Mail-stubs.c -Mail-skels.c -Mail-common.c -Mail.h -evolution-mail -evolution-mail.pure -test-mail -test-sources diff --git a/mail/ChangeLog b/mail/ChangeLog deleted file mode 100644 index f4c9dc1172..0000000000 --- a/mail/ChangeLog +++ /dev/null @@ -1,1000 +0,0 @@ -2000-05-28 Dan Winship - - * mail-config.c (error_dialog): helper function since we need to - set "modal" on the dialogs returned by gnome_error_dialog to make - them work when popped up from the modal Druid. - (service_acceptable): New function to check if the info entered on - a store/transport page actually checks out. - (mail_config_druid): Connect to the "next" signal on the store and - transport pages and don't let the user continue if the data is - bad and "check this before continuing" is checked. Also, only - display sources/transports in the "mail" domain. (Ie, not - "vfolder".) - - * mail-format.c (write_recipients_to_stream): Use `foo@bar' rather - than `' for recipient with no name. - - * mail-ops.c (fetch_mail): don't put up an error message if the - user cancels the password dialog. - -2000-05-27 Not Zed - - * Makefile.am (SHELL_OBJS): Include mail storage so we can - initialise folders. - - * component-factory.c (create_test_storage): Parses vfolder - defintions and adds them to the storage. Definetly needs more - work. - - * folder-browser-factory.c (control_activate): Add the VFolder - druid menu item. - (control_deactivate): And remove it. - - * mail-ops.c (vfolder_editor_clicked): For editing vfolder - definitions (rather like filters, oddly enough :). Tries to - update the shell but it doesn't seem to work properly - requires a - mail component restart to take effect. - - * folder-browser.c (folder_browser_load_folder): Handle vfolder: - urls' appropriately and map to camel. Still needs a way to tell - the vfolder what folders to search! (all vfolders come up empty!). - -2000-05-28 Christopher James Lahey - - * message-list.c, message-list.h: Added a COL_DELETED and made it - the strikeout column for both text renderers. - -2000-05-27 Dan Winship - - * mail-format.c: Various improvements: - - (call_handler_function, etc): Add a "mime_type" argument to the - handlers, so that if a part is tagged as - "application/octet-stream", and we figure out that it's really - something else, the handler we call can know what that something - else is. - - (handle_text_enriched): Small fixes to make this not do - text/enriched-specific syntax in text/richtext or vice versa. - - (handle_mystery): Allow for mystery data that can't even be saved - to disk. (ie, unrecognized external-body). Let the caller specify - the URL to use. - - (handle_message_external_body): New function to deal with - message/external-body parts. Generates URLs for anon-ftp, - local-file, and URL access-types, and a more-useful-than-before - descriptive message for other types. - - (handle_audio, handle_undisplayable): Use gnome_mime_get_value to - try to get a description of the MIME type to display to the user - rather than the raw form. (This will only work if the user has - recent gnome-vfs installed. [If they don't, it works just like - it used to.]) - -2000-05-26 Dan Winship - - * mail-format.c (handle_text_html): Fix a bug (security/stability) - in its usage of mail_html_write. - - * mail-ops.c (composer_send_cb, reply): set CAMEL_MESSAGE_ANSWERED - on a message after a successful reply. - - * message-list.c (folder_changed): free the summary with - camel_folder_free_summary rather than g_ptr_array_free. - - * mail-format.c (handle_via_bonobo): Update for PersistStream - changes - -2000-05-25 Ettore Perazzoli - - * main.c (main): Initialize the component factory. - - * Makefile.am (evolution_mail_LDADD): Link with - `evolution-shell-component.o' from the shell directory. - - * evolution-mail.oafinfo: Updated with the - Evolution::ShellComponent OAFIID. - - * evolution-mail.gnorba: Updated with the - Evolution::ShellComponent GOAD ID. - - * folder-browser-factory.c (folder_browser_factory_new_control): - New function; code moved out from `folder_browser_factory'. - (folder_browser_factory): Use it. - - * component-factory.c: New. - * component-factory.h: New. - -2000-05-24 Dan Winship - - * mail-ops.c (composer_send_cb): connect to and disconnect from - the transport. - -2000-05-24 Christopher James Lahey - - * Makefile.am: Added libepaned.a. - - * folder-browser.c: Switched from GtkPaned to EPaned. - -2000-05-23 Ettore Perazzoli - - * Makefile.am: Don't link to `evolution-service-repository.o' - anymore. - - * folder-browser-factory.c: Don't use crufty service-repository - anymore. - -2000-05-21 Ettore Perazzoli - - * message-list.c (get_message_info): Made static. - (ml_initialize_value): Return NULL to placate compiler. - - * folder-browser.c (folder_browser_gui_init): Add cast. - - * mail-display.c (mail_html_new): Don't pass an empty URL to - `gtk_html_begin()' anymore. - - * mail-config.c (put_html): Don't pass an empty URL to - `gtk_html_begin()' anymore. - - * mail-display.h: Updated for the new GtkHTML API that uses - `GtkHTMLStream *' instead of `GtkHTMLStreamHandle'. - * mail-display.c: Likewise. - * mail-config.c: Likewise. - * mail-format.c: Likewise. - -2000-05-19 NotZed - - * mail-format.c: Fixes for stream stuff. - - * mail-display.c (save_data_cb): Remove exception stuff on streams. - -2000-05-19 Christopher James Lahey - - * message-list.c: Added initialize_value and value_is_empty - callbacks. - -2000-05-18 Dan Winship - - * folder-browser-factory.c (folder_browser_factory): Remove - development_warning (moved to shell) - - * message-list.c (select_msg): Update for camel_folder_get_uids - (folder_changed, message_list_set_folder): Update for - camel_folder_get_summary - - * mail-ops.c (fetch_mail): Update for camel_folder_get_uids - -2000-05-17 Dan Winship - - * mail-component.c: This seems to be cruft. Nuke it. - - * mail-display.c (save_data_cb, save_data, on_url_requested): - * mail-format.c (handle_text_plain_flowed, handle_text_html): - Use camel_data_wrapper_write_to_stream rather than - camel_data_wrapper_get_output_stream. - -2000-05-16 NotZed - - * mail-ops.c (filter_edit): Function to bring up the filter editor. - (filter_druid_clicked): Save/close dialogue. - (fetch_mail): Apply filters to incoming mail ... *hold breath* - If we are coming from a non-indexed/searchable/etc source, then - copy it to an mbox first. When copying mail from an mbox source, - dont remove it aftewards, open it for append, so partially - filtered mail isn't lost. - - * Makefile.am (evolution_mail_LDADD): Added libfilter. - (INCLUDES): Add EVOLUTION_DATADIR, and fix matt's brokeneditor(tm) - for putting spaces instead of tabs in. - -2000-05-16 Christopher James Lahey - - * mail-format.c: Removed usage of bonobo_object_destroy. - -2000-05-14 Christopher James Lahey - - * message-list.c: Updated to work with new ETable resizing. - -2000-05-12 NotZed - - * mail-ops.c (fetch_mail): Use 6 X's to mkstemp, as required by - the man page, just a temp fix, this should probably change to a - known filename. - -2000-05-11 Dan Winship - - * folder-browser-factory.c (control_activate): Now that we depend - on current gnome-libs we can make the toolbar detachable again. - -2000-05-11 Federico Mena Quintero - - * folder-browser-factory.c (development_warning): Left-justify the - message. - -2000-05-10 Christopher James Lahey - - * folder-browser-factory.c (development_warning): Made this dialog - have fewer buttons. - -2000-05-10 Christopher James Lahey - - * folder-browser-factory.c (development_warning): New development - warning text from Nat. - -2000-05-10 Larry Ewing - - * mail-config.c (html_new): only set the default background color - if style is not NULL. - -2000-05-09 Christopher James Lahey - - * Makefile.am: Removed folder-browser-factory.h since it doesn't - exist. Added mail-display.h, mail-types.h, pixmaps.h. - -2000-05-09 Matt Loper - - * folder-browser-factory.c (control_activate): Remove "File->mail" - menuitem. - - * mail-config.c (mail_config_druid): Fill in "blah blah blah". - -2000-05-09 Dan Winship - - * folder-browser.c (folder_browser_load_folder): make this a - little less kludgy. Use gnome_error_dialog rather than printf on - errors. - - * mail-ops.c (fetch_mail): Fix to work with the new shell stuff... - sorta. Will need more fixing later when the new shell framework is - more done. - - * mail-config.c (finish): Call gnome_config_sync so the data - actually gets written. - -2000-05-08 Dan Winship - - * mail-display.c (save_data_cb): - (on_url_requested): Update for CamelStream CamelException changes. - - * mail-format.c: Pass NULL for a CamelException in a bunch of - places... the user will see that the data is not being displayed, - and there's not a lot we can do, and none of these things should - be failing anyway. Maybe fix this later. - -2000-05-07 NotZed - - * message-list.c (ml_value_at): Size moved to message info, rather - than content info structure. - -2000-05-07 Dan Winship - - * message-list.c (select_msg): unref the message after displaying - it. - - * mail-format.c (get_data_wrapper_text): - (handle_text_plain_flowed): - (handle_via_bonobo): Replace camel_stream_close calls. - -2000-05-07 Matt Loper - - * folder-browser-factory.c: Changed a toolbar button from saying - "New mail" (which suggests you might be composing new mail) to - "Get mail". - -2000-05-06 Dan Winship - - * folder-browser-factory.c (folder_browser_factory): Don't - hardcode "inbox" here. - - * folder-browser.c (folder_browser_set_uri): Don't hardcode - "inbox" here either. - (folder_browser_load_folder): Create a new store according to the - folder browser's URI, and load the mbox file from that store. - Parts of this are temporary. - - * session.c, mail.h: There is no longer a global store, just a - global session. - - * mail-config.c, mail-ops.c: Update for default_session -> session - change. fetch_mail is currently broken. - -2000-05-06 Dan Winship - - * mail-config.c: New code to configure identity, mail source, and - mail transport. - (mail_config_druid): A druid using the config widgets. (Only - allows configuration of a single identity, source, and transport.) - - * mail-ops.c (check_configured): New function to make sure the - user has configured stuff, and call the druid if not. - (fetch_mail, send_msg, send_to_url, reply, forward_msg): Call - check_configured - (composer_send_cb): Make this pass the message to a CamelTransport - rather than just printing it to stdout. - - * folder-browser-factory.c (development_warning): Add a warning - about sending mail, since you can do that now. - -2000-05-06 Chris Toshok - - * .cvsignore: ignore evolution-mail.pure - - * Makefile.am: add support for building evolution-mail.pure - -2000-05-06 Dan Winship - - * mail.h: consolidate mail-format.h, mail-identify.h, mail-ops.h, - main.h and session.h into this new file. There's no reason to have - a .h for every .c. - -2000-05-05 Anders Carlsson - - * test-mail.c (create_container): Use the OAFIID when using an - OAF-enabled build of bonobo. - -2000-05-04 NotZed - - * message-list.c (message_list_set_folder): Get the whole message - summary right away. - (folder_changed): And if we change too. - (ml_row_count): Use the match count or summary table length as the - row count. - (get_message_info): Use array references to lookup message summary - info. For the search result list, use the summary_search_cache to - cache the info lookup. - (message_list_init): Allocate the summary search cache. - (message_list_destroy): Free the summary search cache and the - summary table, if there is one to free. - (message_list_set_search): Save the match count, and clear the - summary search cache for reuse. - (folder_changed): Re-retrieve the summary list if the folder has - changed. - (message_list_set_folder): Retrieve the summary list when opening - the folder. - -2000-05-03 Jason Leach - - * Makefile.am (evolution_mail_LDADD): s/-lunicode/$(UNICODE_LIBS)/ - in the LDADD section. - -2000-05-03 Dan Winship - - * mail-format.c (write_recipients_to_stream, write_headers): Make - the "Cc:" field optional again. (Before, we could check if - camel_mime_message_get_recipients returned NULL, but now we need - to actually look into the returned CamelInternetAddress object.) - -2000-05-03 Larry Ewing - - * folder-browser.c (folder_browser_gui_init): comment out the - changed signal for now. - -2000-05-02 Matt Loper - - * Makefile.am: set G_LOG_DOMAIN. - -2000-05-02 Larry Ewing - - * message-list.c (message_list_set_search): only free search if it - is not NULL. - -2000-05-02 NotZed - - * folder-browser.c (folder_browser_gui_init): Connect the changed - signal to search, so it searched immediately? - -2000-05-01 NotZed - - * pixmaps.h: Added envelope-deleted state. - - * folder-browser-factory.c: Setup callback for actual delete op. - (control_activate): Setup a tool menu item to expnge deleted - messages. - - * mail-ops.c (delete_msg): Toggle the delete flag on a message. - (expunge_folder): New function to expunge deleted messages from - the current folder. - - * folder-browser.c (folder_browser_gui_init): A hackish little - quick-search entry. - (search_activate): Perform a quick-search on the folder subject - only. - (folder_browser_gui_init): Add an option meny to the search line. - (create_option_menu): Build the option menu from a table. - (search_set): Build a search from another string whent he option - menu or text item is changed. 5 search options are defined so - far. - - * message-list.c (get_message_info): If there is an active search, - then get the data from that ... use this instead of - _get_message_info(). - (ml_row_count): If we have an active search, get the info from its - result. - (select_msg): Changed to use get_message_info, so searches work. - (ml_value_at): And same here. - (message_list_init_renderers): Added a 3rd state to message_status - = deleted. - (ml_value_at): Show the message state as deleted, if it is marked - for deletion. - (folder_changed): When the folder changes, update the display. - (message_list_set_folder): Connect to the folder_changed event - here. - (message_changed): Callback to update the display when the message - changes. - (select_msg): And connect to the message_changed signal so we know - when it cahgnes. - (message_list_set_search): Save the search string. - (folder_changed): If the folder changes, re-run the search, - otherwise we may end up with invalid entries in the display. - - * mail-display.c: Include missing errno.h. - -2000-04-30 Dan Winship - - * session.c (session_providers_init): This is no longer necessary. - - * mail-ops.c (fetch_mail): Remove kludge to load remote provider, - as camel can do it by itself now. - -2000-04-29 Dan Winship - - * mail-display.c (on_link_clicked): Handle clicks on "cid" URLs by - popping up a "Save Attachment" dialog. - - * mail-format.c (get_cid): if the part has a Content-Disposition - with a filename specified, record (a sanitized version of) that on - the wrapper when creating the cid reference, so the "save - attachment" code can use it later. - (handle_mystery): fix a bug in the cid generation here. - -2000-04-29 Dan Winship - - * mail-format.c (lookup_handler, etc): Improve the builtin vs - bonobo selection code. - (handle_mystery): Include name and Content-Description in the - "mystery data" info, when available - (handle_unknown_type): Call mail_identify_mime_part before - giving up. - (handle_undisplayable): Split out of handle_unknown_type now - that handle_unknown_type can try alternate viewers. - (handle_via_bonobo): Fall back to handle_undisplayable if the - bonobo control fails. - - * mail-identify.c (mail_identify_mime_part): New function to - attempt to identify a MIME part that we can't identify based on - Content-Type alone. - - * mail-display.c (on_url_requested): redo the mystery data icon - display stuff less kludgily. - -2000-04-28 Dan Winship - - * mail-format.c (write_recipients_to_stream, write_headers, - mail_generate_reply): Update (minimally) for Camel recipient - changes. - -2000-04-28 Ettore Perazzoli - - * main.c (init_bonobo): Don't call `init_corba()' and don't get - any args. - (init_corba) [!USING_OAF]: Fix args. - -2000-04-27 Ettore Perazzoli - - * folder-browser-factory.c: New macro `CONTROL_FACTORY_ID', which - is #defined to a different value according to whether we are - `USING_OAF' or not. - (folder_browser_factory_init): Use `CONTROL_FACTORY_ID'. - - * test-mail.c - (init_corba): New helper function, implemented differently - according to `USING_OAF'. - (main): Use `init_corba()'. - - * main.c - (init_corba): New helper function, implemented differently - according to `USING_OAF'. - (init_bonobo): Use `init_corba()'. - - * Makefile.am: Install OAF stuff if `USING_OAF'. Add - `-I$(datadir)/idl' to the `orbit-idl' command-line so that we can - use Bonobo IDL files installed under our prefix as well. Also, - use `$(ORBIT_IDL)' instead of hardcoded `orbit-idl'. - - * evolution-mail.oafinfo: New file. - -2000-04-27 Dan Winship - - * mail-format.c: Move text_to_html to e-util. - - * mail-ops.c (send_to_url): New routine. Thin wrapper for - e_msg_composer_new_from_url. - - * mail-display.c (on_link_clicked): print a warning for news or - nntp URLs (which we'll deal with some day), and call send_to_url - for mailto URLs. - - * mail-format.c (text_to_html): Improve URL conversion code. - Recognize https, recognize "www\..*" without a prefixed "http://". - Properly escape &, <, >, etc in URL strings. Don't be fooled by - "mailto:", "http://", etc with no following data. - -2000-04-26 Dan Winship - - * mail-format.c (text_to_html): Reorganize a bit and add a new - flag, TEXT_TO_HTML_CONVERT_URLS to recognize and wrap URLs - in text. - - * mail-display.c (mail_html_new): Add link_clicked signal handler. - (on_link_clicked): Use gnome_url_show to launch a browser. - - * mail-format.c: update for CamelStream changes. Update for - CamelMimeBodyPart -> CamelMimePart - -2000-04-25 Dan Winship - - * mail-display.c, mail-format.c: Redo large chunks of this. The - mail display now consists of a vbox in a scrolled window, in which - we put multiple GtkHTML objects. This means broken HTML in one - part can't corrupt other parts. The headers now scroll with the - body. Unrecognized attachments look prettier, but still don't do - anything, and will probably be changed later. We can also now - display nested message/rfc822 parts and multipart/alternatives - with multipart subparts. Oh, and text/{richtext,enriched}, since - we had all these ancient sample messages that use it and the lack - of support annoyed me. :) - - Bonobo embeddables are broken right now, but I don't think that's - my fault. - - * mail-format.c (reply_body): Fix some bugs that crept into reply - generation. This needs a lot more work to deal correctly with - complicated bodies. - (setup_function_table): pass unknown text subtypes to - handle_text_plain. - (handle_multipart_appledouble): new handler. Just ignores the - first (application/applefile) part and tries to display the - second part. Since the second part is usually - application/octet-stream, this doesn't work very well still - usually. - (reply_body): Make this deal better with multiparts. - - * mail-format.c, mail-display.c: Now that we're not limited to - a single GtkHTML for the display, there's no reason to embed - Bonobo objects for unrecognized content-types in GtkHTML rather - than embedded them into the vbox directly. So do that. - - Meanwhile, fix up the handler-selection code so that we can - declare which built-in handlers are more desirable than external - handlers and which are less. (Of course, eventually we'll want - this to be customizable.) Add some cleverness to - handle_multipart_alternative as well so it doesn't accept an - alternative which we can display generically over one we can - display specifically. - - * mail-format.c (text_to_html): add a convert_space_hack flag, - which turns N spaces into N-1  s and a space. - (handle_text_plain): Check for "format=flowed" in the - Content-Type. - (handle_text_plain_flowed): Spinoff of handle_text_plain to deal - with RFC 2646 flowed text. (All the examples I can find of it - are generated by Eudora, but it's a pretty cool idea that ought - to be used more widely.) - -2000-04-23 Dan Winship - - * folder-browser-factory.c: rename "send" to "send_msg", to avoid - name clash with the tcp function. Connect the "forward" button. - - * mail-ops.c: rename "send" to "send_msg", to avoid name clash - with the tcp function. Add forward_msg function. - - * mail-format.c (mail_generate_forward): support function for - forward_msg. Pretty much a big kludge right now, pending the - attachment/attachment-bar changes. - -2000-04-22 Dan Winship - - * mail-display.c (on_url_requested): Change cid expectations to - match current camel reality. - - * main.c (main): call glade_gnome_init, for composer. - - * folder-browser-factory.c: move msg_composer_cb and - msg_composer_send_cb to mail-ops. Attach send, reply, and "reply - to all" buttons. - - * mail-ops.c (composer_send_cb, send): moved from - folder-browser-factory.c. - (reply_to_sender, reply_to_all): new functions to do replies. - - * mail-format.c (text_to_html): Add an "add_pre" flag, to make - it wrap the output in
.
-	(mail_generate_reply): New function to create a composer and build
-	a reply in it.
-
-2000-04-21  Dan Winship  
-
-	* mail-display.c (on_url_requested): deal with cid: URLs.
-	(find_cid): helper routine for above. (This could be much better.)
-	(mail_display_init): connect url_requested signal
-
-	* mail-format.c (handle_multipart_related): Make this work.
-
-	* mail-display.c (mail_display_set_message): ref the message we
-	display, since we're going to unref it when we remove it. Fixes a
-	bug that showed up with the new camel code, but it's not obvious
-	if it's due to a bug or a feature in the new code.
-
-2000-04-20  NotZed  
-
-	* Makefile.am (evolution_mail_LDADD): Add libibex.la to link.
-
-	* message-list.h: Removed folder summary.
-
-	* message-list.c: Dont include folder-summary anymore.
-	(select_msg): Changed to use folder, not summary in
-	summary_get_message_info().  God this code is grotty.
-	(ml_value_at): Ditto.
-	(ml_value_at): Changed to use new interface.  Hmm, this returns a
-	static variable, that seems wrong.
-	(message_list_set_folder): Remove folder summary.
-	(ml_row_count): Oops, remove some debug i put there.
-
-2000-04-20  Dan Winship  
-
-	* mail-display.c: update for bonobo change, and remove a
-	now-unused variable.
-
-2000-04-17  Chris Toshok  
-
-	* message-list.c (on_row_selection_idle): new function, actually
-	calls select_msg.
-	(on_row_selection_cmd): register an idle instead of calling
-	select_msg directly.  this fixes the lag before the row is
-	selected - selection is instantaneous now, with message loading
-	happening afterward.
-
-	* message-list.h: add row_to_select and an idle_id to the message
-	list to make the select_msg call happen in an idle func.
-
-	* message-list.c (message_list_init_renderers): no more
-	e_cell_set_editable.  this info always comes from the model.
-
-2000-04-14  Dan Winship  
-
-	* mail-format.[ch]: Moved from camel/camel-formatter, and changed
-	slightly. (More to come.)
-
-	* html-stream.[ch]: No longer necessary. mail-format uses
-	GtkHTMLStreamHandles directly.
-
-	* mail-display.[ch]: update for new message formatting code.
-
-2000-04-14  Chris Toshok  
-
-	* folder-browser-factory.c (control_activate): use
-	gnome_app_fill_toolbar_with_data, so we get the beautiful gnome
-	toolbar.
-
-2000-04-14  Dan Winship  
-
-	* folder-browser-factory.c (development_warning): Fix up the
-	warning message a bit.
-	(folder_browser_factory): Make the warning bypassable.
-
-2000-04-12  Miguel de Icaza  
-
-	* main.c (main): Call e_cursors_init.
-
-2000-04-10  Dan Winship  
-
-	* mail-ops.c (fetch_mail): use camel_movemail when fetching mail
-	from an mbox store. This leaves behind temp files for now,
-	because CamelMboxFolder::delete is too confused to use, and NotZed
-	is rewriting CamelMboxFolder, so I'm not going to bother to try to
-	fix it.
-
-	* mail-ops.c: Add some #includes for the non-HAVE_MKSTEMP case
-
-2000-04-09  Matt Loper  
-
-	* folder-browser.c (folder_browser_new): set folder_browser->uri
-	to NULL, so that we know when to free it.
-
-2000-04-07  Miguel de Icaza  
-
-	* message-list.c (states_pixmaps): Add more beautiful art from
-	Miggue, the Diego Rivera of the next millenium.
-	(message_list_init_header): Use the beautiful art.
-
-	* pixmaps: Miguel rediscovers the "transparent" concept.
-
-2000-04-07  Matt Loper  
-
-	* folder-browser.c (folder_browser_destroy): Unref the shell
-	interface that we have a handle to.
-
-	* folder-browser-factory.c (control_destroy_cb): New function;
-	destroys a folder-browser when its control is destroyed.
-	(folder_browser_factory): Hook up to the above.
-
-2000-04-07  Dan Winship  
-
-	* mail-ops.c: new file, for toolbar/menu callbacks
-	(fetch_mail): fetch mail. Doesn't do mbox locking. Many kludges.
-
-	* folder-browser-factory.c (control_activate): use new fetch_mail
-	function as the callback for the "New mail" icon. Rename check_cb
-	to random_cb.
-
-	* Makefile.am: don't build test-sources since the version in
-	CVS doesn't do much and once I've fixed it it won't be a separate
-	program. Add mail-ops.[ch].
-
-2000-04-06  Miguel de Icaza  
-
-	* message-list.c: Stick pixmaps here.
-
-	* mail-display.c (embeddable_destroy_cb): Replaced C++ comments
-	with C comments.
-
-	* message-list.c (load_internal_images): New function, loads images.
-	(message_list_init_renderers): Load images, fix previous attempt
-	at loading images. 
-
-	* Makefile.am (dist-hook): Added distribution of pixmaps.
-
-	* pixmaps: New directory, used to hold the XPMs we ship with. 
-
-	* pixmaps/envelope-closed.xpm, pixmaps/envelope-open.xpm: Tigert's
-	envelopes incorporated.
-
-2000-03-31  Miguel de Icaza  
-
-	* message-list.c (ml_value_at): Fix miss-used variable. 
-
-2000-04-01  Michael Meeks  
-
-	* folder-browser.c (folder_browser_properties_init): update to
-	new property  (folder_browser_property_changed): kill.
-	(get_prop, set_prop): do the donkey work + make properly RW.
-
-2000-03-31  Dan Winship  
-
-	* folder-browser-factory.c (folder_browser_set_shell):
-	* folder-browser.c (folder_browser_new):
-	* message-list.c (on_row_selection_cmd, select_msg,
-	message_list_init, message_list_set_folder):
-
-	remove debugging printf()s that no longer seem useful
-
-2000-03-29  Dan Winship  
-
-	* folder-browser-factory.c (control_activate): build a toolbar.
-	(control_deactivate): and hide it.
-
-2000-03-27  Chris Toshok 
-	* mail-display.c: quiet warnings when building in ../po
-
-2000-03-26  Miguel de Icaza  
-
-	* folder-browser-factory.c (folder_browser_set_shell): Memory leak
-	fix. 
-
-2000-03-25  Dan Winship  
-
-	* message-list.c (select_msg, ml_value_at): update for summary
-	changes. Hey, neat, it really does make it more efficient.
-
-2000-03-22  Christopher James Lahey  
-
-	* .cvsignore: Updated .cvsignore.
-
-2000-03-21  Matt Loper  
-
-	* mail-display.c: Minor cleanup & commenting.
-
-	* folder-browser-factory.c: Minor cleanup & warning elimination.
-
-2000-03-21  bertrand  
-
-	* message-list.c (ml_value_at): display message size
-
-2000-03-20  Christopher James Lahey  
-
-	* message-list.c: Properly ref & sink the table and header models.
-
-2000-03-14  Dan Winship  
-
-	* mail-sources.c: First cut at a mail source selection wizard.
-	Basically a rigged demo at this point. Doesn't use camel to get
-	its information, and is not yet complete or integrated with the
-	mail component. Did I mention that the code is ugly?
-
-2000-03-13  bertrand  
-
-	* folder-browser-factory.c (folder_browser_set_shell): 
-	for testing and demonstration purpose, immediately 
-	register a fake service.
-
-2000-03-12  bertrand  
-
-	* folder-browser-factory.c (folder_browser_factory_init): 
-	name change.
-	(control_activate_cb): when the control is activated, 
-	it merges its own UI with the remote UIHandler.
-	(control_add_menu): sample menu merging.
-	(folder_browser_factory): connect the control "activate" signal.
-
-	* evolution-mail.gnorba: 
-	name changes
-
-	* folder-browser.h: added a reference to an 
-	Evolution::Shell object. 
-
-	* folder-browser-factory.c (folder_browser_set_shell): 
-	(folder_browser_control_add_service_repository_interface): 
-	(folder_browser_factory): the folder-browser control now
-	implements the Evolution/ServiceRepository interface.
-
-2000-03-07  bertrand  
-
-	* folder-browser-factory.c (development_warning): 
-	added a warning so that the user knows that this 
-	version may crash his mails.
-
-2000-03-05  bertrand  
-
-	* message-list.h: include a referrence to the parent 
-	folder browser.
-
-	* message-list.c (ml_value_at): use the message summary 
-	from the 
-
-	* html-stream.c (html_stream_close): when the stream 
-	is closed, set the html stream to NULL
-	(html_stream_write): don't write anything if the 
-	html handle does not exist. 
-	(html_stream_reset): implemented. close the current 
-	html handle and begins a new html parser. 
-
-	* session.c (session_store_new): use static exception
-	here. 
-
-2000-03-05  Christopher James Lahey  
-
-	* message-list.c: Added a prototype message listing.
-
-2000-03-04  Christopher James Lahey  
-
-	* message-list.c: Set up the column headers properly.
-
-	* folder-browser.c: Show the folder_browser widget.
-
-2000-03-04  Christopher James Lahey  
-
-	* message-list.c: Define ml_duplicate_value and ml_free_value
-	correctly.
-	
-2000-03-04  Christopher James Lahey  
-
-	* message-list.c: Use g_int_compare and g_str_compare as we should
-	be instead of g_int_equal and g_str_equal.
-	
-2000-03-04  bertrand  
-
-	* test-mail.c (main): replace the bonobo-active/gtk-main
-	by bonobo-main.
-	Include Gnorba headers.
-	(main): don't call the container creation routine 
-	before we entered the main loop. Use idle for that.
-
-2000-03-04  Christopher James Lahey  
-
-	* message-list.c: Change this to use the ETable widget itself
-	instead of building it from all the parts.
-
-2000-03-03  Christopher James Lahey  
-
-	* message-list.c: Ref the table columns since we unref them at the
-	end.
-
-2000-03-01  Ettore Perazzoli  
-
-	* Makefile.am (INCLUDES): Add `$(top_srcdir)'.  Also, the
-	`top_srcdir' includes must come first everything else to avoid
-	including installed headers instead of our fresh ones.
-
-2000-02-28  NotZed  
-
-	* Makefile.am (evolution_mail_LDADD): Fixed references to eutil.
-
-2000-02-24  Christopher James Lahey  
-
-	* message-list.c: Changed to match new e_table_simple interface.
-
-2000-02-24  Dan Winship  
-
-	* message-list.c (message_list_set_folder): update for CamelFolder
-	changes
-
-2000-02-24  Christopher James Lahey  
-
-	* message-list.c: Changed this to not use the "x" and "y"
-	arguments to e-table-item.
-
-2000-02-23  Matt Loper  
-
-	* message-list.c (message_list_set_folder): Check 'desc'riptions
-	of exceptions.
-
-2000-02-22  bertrand  
-
-	* message-list.c (message_list_set_folder): 
-	fix to show a sample correct implementation. 
-
-2000-02-21  Matt Loper  
-
-	* Makefile.am: added -lunicode to evolution_mail_LDADD.
-
-2000-02-21  Dan Winship  
-
-	* session.c (session_store_new): Pass a CamelAuthCallback
-	(evolution_auth_callback) to camel_session_new.
-	
-2000-02-21  Dan Winship  
-
-	* session.c (session_store_new): Update session_store_new to
-	deal with the fact that camel_session_get_store takes a
-	CamelException now. Doesn't actually do anything with the
-	exception yet, because nothing else does yet either.
-
-2000-02-19  Matt Loper  
-
-	* .cvsignore: added test-mail.
-
-2000-02-14  Miguel de Icaza  
-
-	* folder-browser.c (folder_browser_load_folder): New routine,
-	loads a camel folder.
-	(folder_browser_set_uri): redo.
-
-	* session.c: new file.  Implements SessionStores to keep track of
-	a Session/Store tuple.  
-
-2000-02-13  Matt Loper  
-
-	* html-stream.c (html_stream_new): Second param of gtk_html_begin
-	should be "", not NULL.
-	(html_stream_new): gtk_html_parse() is deprecated, so the call was
-	removed.
-
-	* html-stream.h: HTMLStreamClass's parent changed to
-	CamelStreamClass, not CamelStream.
-
-2000-02-11  Christopher James Lahey  
-
-	* Makefile.am: Add the e-text directory to the includes list.
-
-	* message-list.c: Change the call to e_cell_text_new, since
-	there's an added argument.
-
-2000-02-09  Christopher James Lahey  
-
-	* Makefile.am: Added libetext as libetable depends on it.
-
-2000-02-08  Iain Holmes  
-
-	* Makefile.am: Changed the order of the compilation so the CORBA stuff
-	was made before it was needed.
-
-2000-01-19  Miguel de Icaza  
-
-	* Started work on the mail display engine.
-
-	* html-stream.c, html-stream.h: New files, they are CamelStreams
-	used to write to the GtkHTML widget. 
-
diff --git a/mail/GNOME_Evolution_Mail.oaf.in b/mail/GNOME_Evolution_Mail.oaf.in
deleted file mode 100644
index 2be622f3f6..0000000000
--- a/mail/GNOME_Evolution_Mail.oaf.in
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
-
-
-	
-		
-	
-
-	
-
-
-
-
-	
-		
-		
-	
-
-	
-
-
-
-
-	
-		
-	
-
-	
-
-
-
-
-
-	
-		
-	
-
-	
-
-
-
-
diff --git a/mail/GNOME_Evolution_Mail.oafinfo b/mail/GNOME_Evolution_Mail.oafinfo
deleted file mode 100644
index 2be622f3f6..0000000000
--- a/mail/GNOME_Evolution_Mail.oafinfo
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
-
-
-	
-		
-	
-
-	
-
-
-
-
-	
-		
-		
-	
-
-	
-
-
-
-
-	
-		
-	
-
-	
-
-
-
-
-
-	
-		
-	
-
-	
-
-
-
-
diff --git a/mail/Mail.idl b/mail/Mail.idl
deleted file mode 100644
index 1d12a39c5c..0000000000
--- a/mail/Mail.idl
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * mail.idl: Mail interfaces for Evolution
- *
- * Author:
- *   Miguel de Icaza (miguel@helixcode.com)
- * 
- * (C) 2000 Helix Code, Inc.
- */
-
-#include 
-
-module Evolution {
-	
-	interface MessageList : Bonobo::Unknown {
-		
-		void select_message (in long message_number);
-		void open_message   (in long message_number);
-	};
-	
-	/*
-	 * FolderBrowser object.
-	 *
-	 * configuration of this widget is done trough 
-	 * Bonobo Properties
-	 */
-	interface FolderBrowser : Bonobo::Unknown {
-		MessageList get_message_list ();
-	};
-};
-
diff --git a/mail/Makefile.am b/mail/Makefile.am
deleted file mode 100644
index 2c3bb34251..0000000000
--- a/mail/Makefile.am
+++ /dev/null
@@ -1,111 +0,0 @@
-bin_PROGRAMS =	evolution-mail test-mail
-
-providerdir = $(libdir)/evolution/camel-providers/$(VERSION)
-
-#imagesdir = $(datadir)/images/evolution
-#images_DATA = e-attchmt.png
-#EXTRA_DIST = $(image_DATA)
-
-INCLUDES = \
-	-I$(top_srcdir)/widgets				\
-	-I$(top_srcdir)/widgets/e-text			\
-	-I$(top_srcdir)					\
-	-I$(top_srcdir)/camel				\
-	-I$(top_builddir)/shell				\
-	-I$(top_srcdir)/shell				\
-	$(BONOBO_HTML_GNOME_CFLAGS)			\
-	-DEVOLUTION_VERSION=\""$(VERSION)"\"		\
-	-DEVOLUTION_GLADEDIR=\""$(gladedir)"\"		\
-	-DEVOLUTION_ICONSDIR=\""$(iconsdir)"\"		\
-	-DEVOLUTION_LOCALEDIR=\""$(datadir)/locale"\"	\
-	-DEVOLUTION_DATADIR=\""$(datadir)"\"            \
-	-DCAMEL_PROVIDERDIR=\""$(providerdir)"\"	\
-	-DG_LOG_DOMAIN=\"evolution-mail\"
-
-EVOLUTION_MAIL_CORBA_GENERATED = \
-	Mail.h			\
-	Mail-common.c		\
-	Mail-skels.c		\
-	Mail-stubs.c
-
-# FIXME We should make a libeshell library instead of this gross hack.
-SHELL_OBJS =					\
-	$(top_builddir)/shell/Evolution-common.o \
-	$(top_builddir)/shell/Evolution-stubs.o	\
-	$(top_builddir)/shell/Evolution-skels.o	\
-	$(top_builddir)/shell/evolution-shell-component.o \
-	$(top_builddir)/shell/evolution-storage.o
-
-evolution_mail_SOURCES =		\
-	$(EVOLUTION_MAIL_CORBA_GENERATED)	\
-	component-factory.c		\
-	component-factory.h		\
-	folder-browser.c		\
-	folder-browser.h		\
-	folder-browser-factory.c	\
-	mail-config.c			\
-	mail-display.c			\
-	mail-display.h			\
-	mail-format.c			\
-	mail-identify.c			\
-	mail-ops.c			\
-	mail-types.h			\
-	main.c				\
-	message-list.c			\
-	message-list.h			\
-	session.c			\
-	mail.h				\
-	pixmaps.h
-
-
-evolution_mail_LDADD = 					\
-	$(SHELL_OBJS)					\
-	../composer/libcomposer.la		 	\
-	$(top_builddir)/widgets/e-paned/libepaned.a	\
-	../widgets/e-table/libetable.a			\
-	../widgets/e-text/libetext.a			\
-	../camel/libcamel.la				\
-	../e-util/libeutil.la				\
-	../libibex/libibex.la				\
-	../filter/libfilter.la				\
-	$(BONOBO_HTML_GNOME_LIBS)			\
-	$(UNICODE_LIBS)
-
-test_mail_SOURCES = \
-	test-mail.c
-
-test_mail_LDADD = \
-	$(BONOBO_HTML_GNOME_LIBS)
-
-
-GOAD_FILES = evolution-mail.gnorba
-OAF_FILES = evolution-mail.oafinfo
-
-if USING_OAF
-oafdir = $(datadir)/oaf
-oaf_DATA = $(OAF_FILES)
-else
-gnorbadir = $(sysconfdir)/CORBA/servers
-gnorba_DATA = $(GOAD_FILES)
-endif
-
-$(EVOLUTION_MAIL_CORBA_GENERATED): Mail.idl 
-	$(ORBIT_IDL) -I$(datadir)/idl -I`$(GNOME_CONFIG) --datadir`/idl -I$(srcdir) $(srcdir)/Mail.idl
-
-EXTRA_DIST = Mail.idl $(GOAD_FILES) $(OAF_FILES)
-
-dist-hook:
-	-mkdir $(distdir)/pixmaps
-	cp $(srcdir)/pixmaps/*.xpm $(distdir)/pixmaps
-
-if ENABLE_PURIFY
-PLINK = $(LIBTOOL) --mode=link $(PURIFY) $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-
-all-local: evolution-mail.pure
-
-evolution-mail.pure: evolution-mail
-	@rm -f evolution-mail.pure
-	$(PLINK) $(evolution_mail_LDFLAGS) $(evolution_mail_OBJECTS) $(evolution_mail_LDADD) $(LIBS)
-
-endif
-
diff --git a/mail/component-factory.c b/mail/component-factory.c
deleted file mode 100644
index 749fc3c080..0000000000
--- a/mail/component-factory.c
+++ /dev/null
@@ -1,196 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* component-factory.c
- *
- * Copyright (C) 2000  Helix Code, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * 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., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Author: Ettore Perazzoli
- */
-
-#ifdef HAVE_CONFIG_H
-#include 
-#endif
-
-#include 
-
-#include "Evolution.h"
-#include "evolution-storage.h"
-
-#include "evolution-shell-component.h"
-#include "folder-browser.h"
-#include "mail.h"		/* YUCK FIXME */
-
-#include "filter/filter-driver.h"
-#include "component-factory.h"
-
-static void create_test_storage (EvolutionShellComponent *shell_component);
-
-
-#ifdef USING_OAF
-#define COMPONENT_FACTORY_ID "OAFIID:evolution-shell-component-factory:evolution-mail:0ea887d5-622b-4b8c-b525-18aa1cbe18a6"
-#else
-#define COMPONENT_FACTORY_ID "evolution-shell-component-factory:evolution-mail"
-#endif
-
-static BonoboGenericFactory *factory = NULL;
-
-static const EvolutionShellComponentFolderType folder_types[] = {
-	{ "mail", "evolution-inbox.png" },
-	{ NULL, NULL }
-};
-
-
-/* EvolutionShellComponent methods and signals.  */
-
-static BonoboControl *
-create_view (EvolutionShellComponent *shell_component,
-	     const char *physical_uri,
-	     void *closure)
-{
-	BonoboControl *control;
-	GtkWidget *folder_browser_widget;
-
-	control = folder_browser_factory_new_control ();
-
-	folder_browser_widget = bonobo_control_get_widget (control);
-
-	g_assert (folder_browser_widget != NULL);
-	g_assert (IS_FOLDER_BROWSER (folder_browser_widget));
-
-	/* dum de dum, hack to let the folder browser know the storage its in */
-	gtk_object_set_data((GtkObject *)folder_browser_widget, "e-storage",
-			    gtk_object_get_data((GtkObject *)shell_component, "e-storage"));
-
-	/* FIXME: This never fails.  :-/  */
-	folder_browser_set_uri (FOLDER_BROWSER (folder_browser_widget), physical_uri);
-
-	return control;
-}
-
-static void
-owner_set_cb (EvolutionShellComponent *shell_component,
-	      Evolution_Shell shell_interface)
-{
-	g_print ("evolution-mail: Yeeeh! We have an owner!\n");	/* FIXME */
-
-	create_test_storage (shell_component);
-}
-
-
-/* The factory function.  */
-
-static BonoboObject *
-factory_fn (BonoboGenericFactory *factory,
-	    void *closure)
-{
-	EvolutionShellComponent *shell_component;
-
-	shell_component = evolution_shell_component_new (folder_types, create_view, NULL);
-
-	gtk_signal_connect (GTK_OBJECT (shell_component), "owner_set",
-			    GTK_SIGNAL_FUNC (owner_set_cb), NULL);
-
-	return BONOBO_OBJECT (shell_component);
-}
-
-
-void
-component_factory_init (void)
-{
-	if (factory != NULL)
-		return;
-
-	factory = bonobo_generic_factory_new (COMPONENT_FACTORY_ID, factory_fn, NULL);
-
-	if (factory == NULL) {
-		e_notice (NULL, GNOME_MESSAGE_BOX_ERROR,
-			  _("Cannot initialize Evolution's mail component."));
-		exit (1);
-	}
-}
-
-static void
-create_test_storage (EvolutionShellComponent *shell_component)
-{
-	Evolution_Shell corba_shell;
-	EvolutionStorage *storage;
-	
-	corba_shell = evolution_shell_component_get_owner (shell_component);
-	if (corba_shell == CORBA_OBJECT_NIL) {
-		g_warning ("We have no shell!?");
-		return;
-	}
-    
-	storage = evolution_storage_new ("storage_name");
-	if (evolution_storage_register_on_shell (storage, corba_shell)
-	    != EVOLUTION_STORAGE_OK) {
-		g_warning ("Cannot register storage");
-		return;
-	}
-
-	/* save the storage for later */
-	gtk_object_set_data((GtkObject *)shell_component, "e-storage", storage);
-
-	/* this is totally not the way we want to do this - but the
-	   filter stuff needs work before we can remove it */
-	{
-		FilterDriver *fe;
-		int i, count;
-		char *user, *system;
-		extern char *evolution_dir;
-
-		fe = filter_driver_new();
-		user = g_strdup_printf ("%s/vfolders.xml", evolution_dir);
-		system = g_strdup_printf("%s/evolution/vfoldertypes.xml", EVOLUTION_DATADIR);
-		filter_driver_set_rules(fe, system, user);
-		g_free(user);
-		g_free(system);
-		count = filter_driver_rule_count(fe);
-		for (i=0;idescription)
-				desc = fo->description->data;
-			if (desc)
-				desctext = desc->data;
-			else {
-				sprintf(descunknown, "volder-%p", fo);
-				desctext = descunknown;
-			}
-			g_string_sprintf(query, "vfolder:/%s/vfolder/%s?", evolution_dir, desctext);
-			filter_driver_expand_option(fe, query, NULL, fo);
-			name = g_strdup_printf("/%s", desctext);
-			printf("Adding new vfolder: %s\n", query->str);
-			evolution_storage_new_folder (storage, name,
-						      "mail",
-						      query->str,
-						      name+1);
-			g_string_free(query, TRUE);
-			g_free(name);
-		}
-		gtk_object_unref((GtkObject *)fe);
-	}
-}
-
diff --git a/mail/component-factory.h b/mail/component-factory.h
deleted file mode 100644
index 1f5a33f407..0000000000
--- a/mail/component-factory.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* component-factory.h
- *
- * Copyright (C) 2000  Helix Code, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * 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., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Author: Ettore Perazzoli
- */
-
-#ifndef COMPONENT_FACTORY_H
-#define COMPONENT_FACTORY_H
-
-void  component_factory_init  (void);
-
-#endif
diff --git a/mail/e-attchmt.png b/mail/e-attchmt.png
deleted file mode 100644
index b4bac8db67..0000000000
Binary files a/mail/e-attchmt.png and /dev/null differ
diff --git a/mail/evolution-mail.gnorba b/mail/evolution-mail.gnorba
deleted file mode 100644
index b799a57aa2..0000000000
--- a/mail/evolution-mail.gnorba
+++ /dev/null
@@ -1,23 +0,0 @@
-[control-factory:evolution-mail]
-type=exe
-repo_id=IDL:GNOME/GenericFactory:1.0
-description=Evolution mail folder factory component.
-location_info=evolution-mail
-
-[control:evolution-mail]
-type=factory
-repo_id=IDL:BonoboControl/evolution-mail:1.0 IDL:GNOME/Control:1.0
-description=Evolution mail folder display component.
-location_info=control-factory:evolution-mail
-
-[evolution-shell-component-factory:evolution-mail]
-type=exe
-repo_id=IDL:GNOME/GenericFactory:1.0
-description=Factory for the Evolution mail component.
-location_info=evolution-mail
-
-[evolution-shell-component:evolution-mail]
-type=factory
-repo_id=IDL:Evolution/ShellComponent:1.0
-description=Evolution component for handling mail.
-location_info=evolution-shell-component-factory:evolution-mail
diff --git a/mail/evolution-mail.oafinfo b/mail/evolution-mail.oafinfo
deleted file mode 100644
index 2be622f3f6..0000000000
--- a/mail/evolution-mail.oafinfo
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
-
-
-	
-		
-	
-
-	
-
-
-
-
-	
-		
-		
-	
-
-	
-
-
-
-
-	
-		
-	
-
-	
-
-
-
-
-
-	
-		
-	
-
-	
-
-
-
-
diff --git a/mail/folder-browser-factory.c b/mail/folder-browser-factory.c
deleted file mode 100644
index 2be6a06179..0000000000
--- a/mail/folder-browser-factory.c
+++ /dev/null
@@ -1,196 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * folder-browser-factory.c: A Bonobo Control factory for Folder Browsers
- *
- * Author:
- *   Miguel de Icaza (miguel@helixcode.com)
- *
- * (C) 2000 Helix Code, Inc.
- */
-#include 
-#include 
-#include 
-#include 
-#include 
-#include  
-#include "e-util/e-util.h"
-#include "e-util/e-gui-utils.h"
-#include "folder-browser.h"
-#include "mail.h"
-#include "shell/Evolution.h"
-
-#ifdef USING_OAF
-#define CONTROL_FACTORY_ID "OAFIID:control-factory:evolution-mail:25902062-543b-4f44-8702-d90145fcdbf2"
-#else
-#define CONTROL_FACTORY_ID "control-factory:evolution-mail"
-#endif
-			
-static void
-random_cb (GtkWidget *button, gpointer user_data)
-{
-	printf ("Yow! I am called back!\n");
-}
-
-static GnomeUIInfo gnome_toolbar [] = {
-	GNOMEUIINFO_ITEM_STOCK (N_("Get mail"), N_("Check for new mail"), fetch_mail, GNOME_STOCK_PIXMAP_MAIL_RCV),
-	GNOMEUIINFO_ITEM_STOCK (N_("Send"), N_("Send a new message"), send_msg, GNOME_STOCK_PIXMAP_MAIL_SND),
-	GNOMEUIINFO_ITEM_STOCK (N_("Find"), N_("Find messages"), random_cb, GNOME_STOCK_PIXMAP_SEARCH),
-
-	GNOMEUIINFO_SEPARATOR,
-
-	GNOMEUIINFO_ITEM_STOCK (N_("Reply"), N_("Reply to the sender of this message"), reply_to_sender, GNOME_STOCK_PIXMAP_MAIL_RPL),
-	GNOMEUIINFO_ITEM_STOCK (N_("Reply to All"), N_("Reply to all recipients of this message"), reply_to_all, GNOME_STOCK_PIXMAP_MAIL_RPL),
-
-	GNOMEUIINFO_ITEM_STOCK (N_("Forward"), N_("Forward this message"), forward_msg, GNOME_STOCK_PIXMAP_MAIL_FWD),
-
-	GNOMEUIINFO_SEPARATOR,
-
-	GNOMEUIINFO_ITEM_STOCK (N_("Print"), N_("Print the selected message"), random_cb, GNOME_STOCK_PIXMAP_PRINT),
-
-	GNOMEUIINFO_ITEM_STOCK (N_("Delete"), N_("Delete this message"), delete_msg, GNOME_STOCK_PIXMAP_TRASH),
-
-	GNOMEUIINFO_END
-};
-
-static void
-control_activate (BonoboControl *control, BonoboUIHandler *uih)
-{
-	Bonobo_UIHandler  remote_uih;
-	BonoboControl *toolbar_control;
-	GtkWidget *toolbar, *folder_browser;
-
-	remote_uih = bonobo_control_get_remote_ui_handler (control);
-	bonobo_ui_handler_set_container (uih, remote_uih);		
-
-	folder_browser = bonobo_control_get_widget (control);
-
-	bonobo_ui_handler_menu_new_item (uih, "/Tools/Expunge", N_("_Expunge"),
-					 NULL, -1,
-					 BONOBO_UI_HANDLER_PIXMAP_STOCK,
-					 GNOME_STOCK_PIXMAP_TRASH,
-					 0, 0, expunge_folder, folder_browser);
-
-	bonobo_ui_handler_menu_new_item (uih, "/Tools/Filter Druid ...", N_("_Filter Druid ..."),
-					 NULL, -1,
-					 BONOBO_UI_HANDLER_PIXMAP_NONE,
-					 0,
-					 0, 0, filter_edit, folder_browser);
-
-	bonobo_ui_handler_menu_new_item (uih, "/Tools/Vfolder Druid ...", N_("_Vfolder Druid ..."),
-					 NULL, -1,
-					 BONOBO_UI_HANDLER_PIXMAP_NONE,
-					 0,
-					 0, 0, vfolder_edit, folder_browser);
-
-	toolbar = gtk_toolbar_new (GTK_ORIENTATION_HORIZONTAL,
-				   GTK_TOOLBAR_BOTH);
-
-	gnome_app_fill_toolbar_with_data (GTK_TOOLBAR (toolbar),
-					  gnome_toolbar,
-					  NULL, folder_browser);
-
-	gtk_widget_show_all (toolbar);
-
-	toolbar_control = bonobo_control_new (toolbar);
-	bonobo_ui_handler_dock_add (uih, "/Toolbar",
-				    bonobo_object_corba_objref (BONOBO_OBJECT (toolbar_control)),
-				    GNOME_DOCK_ITEM_BEH_EXCLUSIVE,
-				    GNOME_DOCK_TOP,
-				    1, 1, 0);
-}
-
-static void
-control_deactivate (BonoboControl *control, BonoboUIHandler *uih)
-{
-	bonobo_ui_handler_menu_remove (uih, "/File/Mail");
-	bonobo_ui_handler_menu_remove (uih, "/Tools/Expunge");
-	bonobo_ui_handler_menu_remove (uih, "/Tools/Filter Druid ...");
-	bonobo_ui_handler_menu_remove (uih, "/Tools/VFolder Druid ...");
-	bonobo_ui_handler_dock_remove (uih, "/Toolbar");
-}
-
-static void
-control_activate_cb (BonoboControl *control, 
-		     gboolean activate, 
-		     gpointer user_data)
-{
-	BonoboUIHandler  *uih;
-
-	uih = bonobo_control_get_ui_handler (control);
-	g_assert (uih);
-	
-	if (activate)
-		control_activate (control, uih);
-	else
-		control_deactivate (control, uih);
-}
-
-static void
-control_destroy_cb (BonoboControl *control,
-		    gpointer       user_data)
-{
-	GtkWidget *folder_browser = user_data;
-
-	gtk_object_destroy (GTK_OBJECT (folder_browser));
-}
-
-BonoboControl *
-folder_browser_factory_new_control (void)
-{
-	BonoboControl *control;
-	GtkWidget *folder_browser;
-
-	folder_browser = folder_browser_new ();
-	if (folder_browser == NULL)
-		return NULL;
-
-	gtk_widget_show(folder_browser);
-	
-	control = bonobo_control_new (folder_browser);
-	
-	if (control == NULL){
-		gtk_object_destroy (GTK_OBJECT (folder_browser));
-		return NULL;
-	}
-	
-	gtk_signal_connect (GTK_OBJECT (control), "activate",
-			    control_activate_cb, NULL);
-
-	gtk_signal_connect (GTK_OBJECT (control), "destroy",
-			    control_destroy_cb, folder_browser);	
-	
-	bonobo_control_set_property_bag (control,
-					 FOLDER_BROWSER (folder_browser)->properties);
-
-	return control;
-}
-
-/*
- * Creates the Folder Browser, wraps it in a Bonobo Control, and
- * sets the Bonobo Control properties to point to the Folder Browser
- * Properties
- */
-static BonoboObject *
-folder_browser_factory (BonoboGenericFactory *factory, void *closure)
-{
-	return BONOBO_OBJECT (folder_browser_factory_new_control ());
-}
-
-void
-folder_browser_factory_init (void)
-{
-	static BonoboGenericFactory *bonobo_folder_browser_factory = NULL;
-	
-	if (bonobo_folder_browser_factory != NULL)
-		return;
-
-	bonobo_folder_browser_factory = bonobo_generic_factory_new (CONTROL_FACTORY_ID,
-								    folder_browser_factory,
-								    NULL);
-
-	if (bonobo_folder_browser_factory == NULL){
-		e_notice (NULL, GNOME_MESSAGE_BOX_ERROR,
-			  _("We are sorry, Evolution's Folder Browser can not be initialized.")); 
-		exit (1);
-	}
-}
diff --git a/mail/folder-browser.c b/mail/folder-browser.c
deleted file mode 100644
index f435d0cf50..0000000000
--- a/mail/folder-browser.c
+++ /dev/null
@@ -1,425 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * folder-browser.c: Folder browser top level component
- *
- * Author:
- *   Miguel de Icaza (miguel@kernel.org)
- *
- * (C) 2000 Helix Code, Inc.
- */
-#include 
-#include 
-#include "e-util/e-util.h"
-#include "folder-browser.h"
-#include "mail.h"
-#include "message-list.h"
-#include 
-
-
-#define PARENT_TYPE (gtk_table_get_type ())
-
-static GtkObjectClass *folder_browser_parent_class;
-
-
-#define PROPERTY_FOLDER_URI          "folder_uri"
-#define PROPERTY_MESSAGE_PREVIEW     "message_preview"
-
-#define PROPERTY_FOLDER_URI_IDX      1
-#define PROPERTY_MESSAGE_PREVIEW_IDX 2
-
-
-
-static void
-folder_browser_destroy (GtkObject *object)
-{
-	FolderBrowser *folder_browser = FOLDER_BROWSER (object);
-	
-	if (folder_browser->shell) {
-		CORBA_Environment ev;
-
-		CORBA_exception_init (&ev);
-		Bonobo_Unknown_unref (folder_browser->shell, &ev);
-		CORBA_exception_free (&ev);
-	}
-	
-	if (folder_browser->uri)
-		g_free (folder_browser->uri);
-
-	if (folder_browser->folder)
-		gtk_object_unref (GTK_OBJECT (folder_browser->folder));
-	
-	if (folder_browser->message_list)
-		bonobo_object_unref (BONOBO_OBJECT (folder_browser->message_list));
-
-	folder_browser_parent_class->destroy (object);
-}
-
-static void
-folder_browser_class_init (GtkObjectClass *object_class)
-{
-	object_class->destroy = folder_browser_destroy;
-
-	folder_browser_parent_class = gtk_type_class (PARENT_TYPE);
-}
-
-static gboolean
-folder_browser_load_folder (FolderBrowser *fb, const char *name)
-{
-	char *store_name, *msg;
-	CamelStore *store;
-	CamelFolder *new_folder = NULL;
-	CamelException *ex;
-	gboolean new_folder_exists = FALSE;
-
-	ex = camel_exception_new ();
-
-	if (!strncmp(name, "vfolder:", 8)) {
-		char *query, *newquery;
-		store_name = g_strdup(name);
-		query = strchr(store_name, '?');
-		if (query) {
-			*query++ = 0;
-		} else {
-			query = "";
-		}
-		newquery = g_strdup_printf("mbox?%s", query);
-		store = camel_session_get_store (session, store_name, ex);
-
-		if (store) {
-			new_folder = camel_store_get_folder (store, newquery, ex);
-		}
-		g_free(newquery);
-		g_free(store_name);
-
-		/* FIXME: Add the mbox folders we search!!! */
-	} else if (!strncmp(name, "file:", 5)) {
-		/* Change "file:" to "mbox:". */
-		store_name = g_strdup_printf ("mbox:%s", name + 5);
-		store = camel_session_get_store (session, store_name, ex);
-		g_free (store_name);
-		if (store) {
-			new_folder = camel_store_get_folder (store, "mbox", ex);
-		}
-	} else {
-		char *msg;
-
-		msg = g_strdup_printf ("Can't open URI %s", name);
-		gnome_error_dialog (msg);
-		g_free (msg);
-		camel_exception_free (ex);
-		return FALSE;
-	}
-	
-	if (store)
-		gtk_object_unref (GTK_OBJECT (store));
-
-	if (camel_exception_get_id (ex)) {
-		msg = g_strdup_printf ("Unable to get folder %s: %s\n", name,
-				       camel_exception_get_description (ex));
-		gnome_error_dialog (msg);
-		camel_exception_free (ex);
-		if (new_folder)
-			gtk_object_unref((GtkObject *)new_folder);
-		return FALSE;
-	}
-	
-	/* If the folder does not exist, we don't want to show it */
-	new_folder_exists = camel_folder_exists (new_folder, ex);
-	if (camel_exception_get_id (ex)) {
-		msg = g_strdup_printf ("Unable to test if folder %s "
-				       "exists: %s\n", name,
-				       camel_exception_get_description (ex));
-		gnome_error_dialog (msg);
-		camel_exception_free (ex);
-		return FALSE;
-	}
-	camel_exception_free (ex);
-		
-	if (!new_folder_exists) {
-		gtk_object_unref (GTK_OBJECT (new_folder));
-		return FALSE;
-	}
-	
-	if (fb->folder)
-		gtk_object_unref (GTK_OBJECT (fb->folder));
-	
-	fb->folder = new_folder;
-	
-	message_list_set_folder (fb->message_list, new_folder);
-
-	return TRUE;
-}
-
-#define EQUAL(a,b) (strcmp (a,b) == 0)
-
-void
-folder_browser_set_uri (FolderBrowser *folder_browser, const char *uri)
-{
-	if (folder_browser->uri)
-		g_free (folder_browser->uri);
-
-	folder_browser->uri = g_strdup (uri);
-	folder_browser_load_folder (folder_browser, folder_browser->uri);
-}
-
-void
-folder_browser_set_message_preview (FolderBrowser *folder_browser, gboolean show_message_preview)
-{
-	if (folder_browser->preview_shown == show_message_preview)
-		return;
-
-	g_warning ("FIXME: implement me");
-}
-
-static void
-get_prop (BonoboPropertyBag *bag,
-	  BonoboArg         *arg,
-	  guint              arg_id,
-	  gpointer           user_data)
-{
-	FolderBrowser *fb = user_data;
-
-	switch (arg_id) {
-
-	case PROPERTY_FOLDER_URI_IDX:
-		if (fb && fb->uri)
-			BONOBO_ARG_SET_STRING (arg, fb->uri);
-		else
-			BONOBO_ARG_SET_STRING (arg, "");
-		break;
-
-	case PROPERTY_MESSAGE_PREVIEW_IDX:
-		g_warning ("Implement me; no return value");
-		BONOBO_ARG_SET_BOOLEAN (arg, FALSE);
-		break;
-
-	default:
-		g_warning ("Unhandled arg %d\n", arg_id);
-	}
-}
-
-static void
-set_prop (BonoboPropertyBag *bag,
-	  const BonoboArg   *arg,
-	  guint              arg_id,
-	  gpointer           user_data)
-{
-	FolderBrowser *fb = user_data;
-
-	switch (arg_id) {
-
-	case PROPERTY_FOLDER_URI_IDX:
-		folder_browser_set_uri (fb, BONOBO_ARG_GET_STRING (arg));
-		break;
-
-	case PROPERTY_MESSAGE_PREVIEW_IDX:
-		folder_browser_set_message_preview (fb, BONOBO_ARG_GET_BOOLEAN (arg));
-		break;
-
-	default:
-		g_warning ("Unhandled arg %d\n", arg_id);
-		break;
-	}
-}
-
-static void
-folder_browser_properties_init (FolderBrowser *fb)
-{
-	fb->properties = bonobo_property_bag_new (get_prop, set_prop, fb);
-
-	bonobo_property_bag_add (
-		fb->properties, PROPERTY_FOLDER_URI, PROPERTY_FOLDER_URI_IDX,
-		BONOBO_ARG_STRING, NULL, _("The URI that the Folder Browser will display"), 0);
-	bonobo_property_bag_add (
-		fb->properties, PROPERTY_MESSAGE_PREVIEW, PROPERTY_MESSAGE_PREVIEW_IDX,
-		BONOBO_ARG_BOOLEAN, NULL, _("Whether a message preview should be shown"), 0);
-}
-
-static char * search_options[] = {
-	"Body or subject contains",
-	"Body contains",
-	"Subject contains",
-	"Body does not contain",
-	"Subject does not contain",
-	NULL
-};
-
-/* %s is replaced by the whole search string in quotes ...
-   possibly could split the search string into words as well ? */
-static char * search_string[] = {
-	"(or (body-contains %s) (match-all (header-contains \"Subject\" %s)))",
-	"(body-contains %s)",
-	"(match-all (header-contains \"Subject\" %s)",
-	"(match-all (not (body-contains %s)))",
-	"(match-all (not (header-contains \"Subject\" %s)))"
-};
-
-static void
-search_set(FolderBrowser *fb)
-{
-	GtkWidget *widget;
-	GString *out;
-	char *str;
-	int index;
-	char *text;
-
-	text = gtk_entry_get_text((GtkEntry *)fb->search_entry);
-
-	if (text == NULL || text[0] == 0) {
-		message_list_set_search (fb->message_list, NULL);
-		return;
-	}
-
-	widget = gtk_menu_get_active (GTK_MENU(GTK_OPTION_MENU(fb->search_menu)->menu));
-	index = (int)gtk_object_get_data((GtkObject *)widget, "search_option");
-	if (index > sizeof(search_string)/sizeof(search_string[0]))
-		index = 0;
-	str = search_string[index];
-
-	out = g_string_new("");
-	while (*str) {
-		if (str[0] == '%' && str[1]=='s') {
-			str+=2;
-			g_string_sprintfa(out, "\"%s\"", text);
-		} else {
-			g_string_append_c(out, *str);
-			str++;
-		}
-	}
-	message_list_set_search (fb->message_list, out->str);
-	g_string_free(out, TRUE);
-}
-
-static void
-search_menu_deactivate(GtkWidget *menu, FolderBrowser *fb)
-{
-	search_set(fb);
-}
-
-static GtkWidget *
-create_option_menu (char **menu_list, int item, void *data)
-{
-	GtkWidget *omenu;
-	GtkWidget *menu;
-	int i = 0;
-       
-	omenu = gtk_option_menu_new ();
-	menu = gtk_menu_new ();
-	while (*menu_list){
-		GtkWidget *entry;
-
-		entry = gtk_menu_item_new_with_label (*menu_list);
-		gtk_widget_show (entry);
-		gtk_object_set_data((GtkObject *)entry, "search_option", (void *)i);
-		gtk_menu_append (GTK_MENU (menu), entry);
-		menu_list++;
-		i++;
-	}
-	gtk_option_menu_set_menu (GTK_OPTION_MENU (omenu), menu);
-	gtk_option_menu_set_history (GTK_OPTION_MENU (omenu), item);
-	gtk_widget_show (omenu);
-
-	gtk_signal_connect (GTK_OBJECT (menu), 
-			    "deactivate",
-			    GTK_SIGNAL_FUNC (search_menu_deactivate), data);
-
-	return omenu;
-}
-
-static void
-search_activate(GtkEntry *entry, FolderBrowser *fb)
-{
-	search_set(fb);
-}
-
-static void
-folder_browser_gui_init (FolderBrowser *fb)
-{
-	GtkWidget *hbox, *label;
-
-	/*
-	 * The panned container
-	 */
-	fb->vpaned = e_vpaned_new ();
-	gtk_widget_show (fb->vpaned);
-
-	gtk_table_attach (
-		GTK_TABLE (fb), fb->vpaned,
-		0, 1, 1, 3,
-		GTK_FILL | GTK_EXPAND,
-		GTK_FILL | GTK_EXPAND,
-		0, 0);
-
-	/* quick-search entry */
-	hbox = gtk_hbox_new(FALSE, 3);
-	gtk_widget_show(hbox);
-	fb->search_entry = gtk_entry_new();
-	gtk_widget_show(fb->search_entry);
-	gtk_signal_connect(GTK_OBJECT (fb->search_entry), "activate", search_activate, fb);
-	/* gtk_signal_connect(fb->search_entry, "changed", search_activate, fb); */
-	label = gtk_label_new("Search");
-	gtk_widget_show(label);
-	fb->search_menu = create_option_menu(search_options, 0, fb);
-	gtk_box_pack_end((GtkBox *)hbox, fb->search_entry, FALSE, FALSE, 3);
-	gtk_box_pack_end((GtkBox *)hbox, fb->search_menu, FALSE, FALSE, 3);
-	gtk_box_pack_end((GtkBox *)hbox, label, FALSE, FALSE, 3);
-	gtk_table_attach (
-		GTK_TABLE (fb), hbox,
-		0, 1, 0, 1,
-		GTK_FILL | GTK_EXPAND,
-		0,
-		0, 0);
-
-	fb->message_list_w = message_list_get_widget (fb->message_list);
-	e_paned_add1 (E_PANED (fb->vpaned), fb->message_list_w);
-	gtk_widget_show (fb->message_list_w);
-
-	e_paned_add2 (E_PANED (fb->vpaned), GTK_WIDGET (fb->mail_display));
-	e_paned_set_position (E_PANED (fb->vpaned), 200);
-
-	gtk_widget_show (GTK_WIDGET (fb->mail_display));
-	gtk_widget_show (GTK_WIDGET (fb));
-
-}
-
-static void
-folder_browser_init (GtkObject *object)
-{
-}
-
-static void
-my_folder_browser_init (GtkObject *object)
-{
-	FolderBrowser *fb = FOLDER_BROWSER (object);
-
-	/*
-	 * Setup parent class fields.
-	 */ 
-	GTK_TABLE (fb)->homogeneous = FALSE;
-	gtk_table_resize (GTK_TABLE (fb), 1, 2);
-
-	/*
-	 * Our instance data
-	 */
-	fb->message_list = MESSAGE_LIST (message_list_new (fb));
-	fb->mail_display = MAIL_DISPLAY (mail_display_new (fb));
-
-	folder_browser_properties_init (fb);
-	folder_browser_gui_init (fb);
-}
-
-GtkWidget *
-folder_browser_new (void)
-{
-	FolderBrowser *folder_browser = gtk_type_new (folder_browser_get_type ());
-
-	my_folder_browser_init (GTK_OBJECT (folder_browser));
-	folder_browser->uri = NULL;
-
-	return GTK_WIDGET (folder_browser);
-}
-
-
-E_MAKE_TYPE (folder_browser, "FolderBrowser", FolderBrowser, folder_browser_class_init, folder_browser_init, PARENT_TYPE);
-
-
diff --git a/mail/folder-browser.h b/mail/folder-browser.h
deleted file mode 100644
index 6e9c66a0cd..0000000000
--- a/mail/folder-browser.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-
-#ifndef _FOLDER_BROWSER_H_
-#define _FOLDER_BROWSER_H_
-
-#include "mail-types.h"
-#include 
-#include "camel/camel-stream.h"
-#include 
-#include "message-list.h"
-#include "mail-display.h"
-#include "shell/Evolution.h"
-
-
-#define FOLDER_BROWSER_TYPE        (folder_browser_get_type ())
-#define FOLDER_BROWSER(o)          (GTK_CHECK_CAST ((o), FOLDER_BROWSER_TYPE, FolderBrowser))
-#define FOLDER_BROWSER_CLASS(k)    (GTK_CHECK_CLASS_CAST((k), FOLDER_BROWSER_TYPE, FolderBrowserClass))
-#define IS_FOLDER_BROWSER(o)       (GTK_CHECK_TYPE ((o), FOLDER_BROWSER_TYPE))
-#define IS_FOLDER_BROWSER_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), FOLDER_BROWSER_TYPE))
-
-
-struct  _FolderBrowser {
-	GtkTable parent;
-
-	BonoboPropertyBag *properties;
-
-	Evolution_Shell shell;
-
-	/*
-	 * The current URI being displayed by the FolderBrowser
-	 */
-	char        *uri;
-	CamelFolder *folder;
-	
-	MessageList *message_list;
-	GtkWidget   *message_list_w;
-	MailDisplay *mail_display;
-	GtkWidget   *vpaned;
-	GtkWidget   *search_menu;
-	GtkWidget   *search_entry;
-
-	gboolean     preview_shown;
-
-};
-
-
-typedef struct {
-	GtkTableClass parent_class;
-} FolderBrowserClass;
-
-
-
-
-GtkType        folder_browser_get_type (void);
-GtkWidget     *folder_browser_new      (void);
-void           folder_browser_set_uri  (FolderBrowser *folder_browser,
-					const char *uri);
-void           folder_browser_set_message_preview (FolderBrowser *folder_browser,
-						   gboolean show_message_preview);
-
-#endif /* _FOLDER_BROWSER_H_ */
diff --git a/mail/mail-config.c b/mail/mail-config.c
deleted file mode 100644
index cc5b840ef5..0000000000
--- a/mail/mail-config.c
+++ /dev/null
@@ -1,1088 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* mail-config.c: Mail configuration dialogs/wizard. */
-
-/* 
- * Author: 
- *  Dan Winship 
- *
- * Copyright 2000 Helix Code, Inc. (http://www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU General Public License as 
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#include 
-#include 
-
-#include 
-#include 
-
-#include "mail.h"
-#include "e-util/e-html-utils.h"
-#include "e-util/e-setup.h"
-
-struct service_type {
-	CamelProvider *provider;
-	CamelService *service;
-	GList *authtypes;
-};
-
-struct identity_record {
-	char *name, *address, *organization, *sigfile;
-};
-
-static char *username = NULL;
-
-
-/* HTML Helpers */
-
-static void
-html_size_req (GtkWidget *widget, GtkRequisition *requisition)
-{
-	requisition->height = GTK_LAYOUT (widget)->height;
-}
-
-/* Returns a GtkHTML which is already inside a GtkScrolledWindow. If
- * @white is TRUE, the GtkScrolledWindow will be inside a GtkFrame.
- */
-static GtkWidget *
-html_new (gboolean white)
-{
-	GtkWidget *html, *scrolled, *frame;
-	GtkStyle *style;
-
-	html = gtk_html_new ();
-	GTK_LAYOUT (html)->height = 0;
-	gtk_signal_connect (GTK_OBJECT (html), "size_request",
-			    GTK_SIGNAL_FUNC (html_size_req), NULL);
-	gtk_html_set_editable (GTK_HTML (html), FALSE);
-	style = gtk_rc_get_style (html);
-	if (style) {
-		gtk_html_set_default_background_color (GTK_HTML (html),
-						       white ? &style->white :
-						       &style->bg[0]);
-	}
-	gtk_widget_set_sensitive (html, FALSE);
-	scrolled = gtk_scrolled_window_new (NULL, NULL);
-	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled),
-					GTK_POLICY_NEVER,
-					GTK_POLICY_NEVER);
-	gtk_container_add (GTK_CONTAINER (scrolled), html);
-
-	if (white) {
-		frame = gtk_frame_new (NULL);
-		gtk_frame_set_shadow_type (GTK_FRAME (frame),
-					   GTK_SHADOW_ETCHED_IN);
-		gtk_container_add (GTK_CONTAINER (frame), scrolled);
-		gtk_widget_show_all (frame);
-	} else
-		gtk_widget_show_all (scrolled);
-
-	return html;
-}
-
-static void
-put_html (GtkHTML *html, char *text)
-{
-	GtkHTMLStream *handle;
-
-	text = e_text_to_html (text, E_TEXT_TO_HTML_CONVERT_NL);
-	handle = gtk_html_begin (html);
-	gtk_html_write (html, handle, "", 12);
-	gtk_html_write (html, handle, text, strlen (text));
-	gtk_html_write (html, handle, "", 14);
-	g_free (text);
-	gtk_html_end (html, handle, GTK_HTML_STREAM_OK);
-}
-
-
-/* Error helper */
-static void
-error_dialog (GtkWidget *parent_finder, const char *fmt, ...)
-{
-	GtkWidget *parent, *dialog;
-	char *msg;
-	va_list ap;
-
-	parent = gtk_widget_get_ancestor (parent_finder, GTK_TYPE_WINDOW);
-
-	ap = va_start (ap, fmt);
-	msg = g_strdup_vprintf (fmt, ap);
-	va_end (ap);
-
-	dialog = gnome_error_dialog_parented (msg, GTK_WINDOW (parent));
-	gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
-	g_free (msg);
-}
-
-
-/* Identity page */
-
-static void
-identity_note_doneness (GtkObject *page, gpointer user_data)
-{
-	GtkWidget *exit_button;
-	GtkEntry *entry;
-	char *data;
-
-	exit_button = gtk_object_get_data (page, "exit_button");
-
-	entry = gtk_object_get_data (page, "name");
-	data = gtk_entry_get_text (entry);
-	if (data && *data) {
-		entry = gtk_object_get_data (page, "addr");
-		data = gtk_entry_get_text (entry);
-	}
-
-	gtk_widget_set_sensitive (exit_button, data && *data);
-}
-
-static void
-prepare_identity (GnomeDruidPage *page, gpointer arg1, gpointer user_data)
-{
-	identity_note_doneness (user_data, NULL);
-}
-
-static gboolean
-identity_next (GnomeDruidPage *page, gpointer arg1, gpointer user_data)
-{
-	GtkObject *box = user_data;
-	GtkEntry *addr = gtk_object_get_data (box, "addr");
-	char *data, *at;
-
-	/* FIXME: we need more sanity checking than this. */
-
-	data = gtk_entry_get_text (addr);
-	at = strchr (data, '@');
-	if (!at || !strchr (at + 1, '.')) {
-		error_dialog (GTK_WIDGET (page), "Email address must be "
-			      "of the form \"user@domain\".");
-		return TRUE;
-	}
-
-	g_free (username);
-	username = g_strndup (data, at - data);
-
-	return FALSE;
-}
-
-static void
-destroy_identity (GtkObject *table, gpointer idrecp)
-{
-	struct identity_record *idrec = idrecp;
-	GtkEditable *editable;
-
-	editable = gtk_object_get_data (table, "name");
-	idrec->name = gtk_editable_get_chars (editable, 0, -1);
-	editable = gtk_object_get_data (table, "addr");
-	idrec->address = gtk_editable_get_chars (editable, 0, -1);
-	editable = gtk_object_get_data (table, "org");
-	idrec->organization = gtk_editable_get_chars (editable, 0, -1);
-	editable = gtk_object_get_data (table, "sig");
-	idrec->sigfile = gtk_editable_get_chars (editable, 0, -1);
-}
-
-static void
-create_identity_page (GtkWidget *vbox, struct identity_record *idrec)
-{
-	GtkWidget *html, *table;
-	GtkWidget *name, *addr, *org, *sig;
-	GtkWidget *name_entry, *addr_entry, *org_entry, *sig_entry;
-	GtkWidget *hsep;
-	char *user;
-	struct passwd *pw;
-
-	html = html_new (FALSE);
-	put_html (GTK_HTML (html),
-		  _("Enter your name and email address to be used in "
-		    "outgoing mail. You may also, optionally, enter the "
-		    "name of your organization, and the name of a file "
-		    "to read your signature from."));
-	gtk_box_pack_start (GTK_BOX (vbox), html->parent, FALSE, TRUE, 0);
-
-	table = gtk_table_new (5, 2, FALSE);
-	gtk_table_set_row_spacings (GTK_TABLE (table), 10);
-	gtk_table_set_col_spacings (GTK_TABLE (table), 6);
-	gtk_container_set_border_width (GTK_CONTAINER (table), 8);
-	gtk_box_pack_start (GTK_BOX (vbox), table, TRUE, TRUE, 0);
-	gtk_signal_connect (GTK_OBJECT (vbox), "destroy",
-			    GTK_SIGNAL_FUNC (destroy_identity), idrec);
-
-	name = gtk_label_new (_("Full name:"));
-	gtk_table_attach (GTK_TABLE (table), name, 0, 1, 0, 1,
-			  GTK_FILL, 0, 0, 0);
-	gtk_misc_set_alignment (GTK_MISC (name), 1, 0.5);
-
-	name_entry = gtk_entry_new ();
-	gtk_table_attach (GTK_TABLE (table), name_entry, 1, 2, 0, 1,
-			  GTK_EXPAND | GTK_FILL, 0, 0, 0);
-	gtk_object_set_data (GTK_OBJECT (vbox), "name", name_entry);
-
-	user = getenv ("USER");
-	if (user)
-		pw = getpwnam (user);
-	else
-		pw = getpwuid (getuid ());
-	if (pw && pw->pw_gecos && *pw->pw_gecos) {
-		char *name;
-		int pos = 0;
-
-		name = g_strndup (pw->pw_gecos, strcspn (pw->pw_gecos, ","));
-		gtk_editable_insert_text (GTK_EDITABLE (name_entry),
-					  name, strlen (name), &pos);
-	}
-
-	addr = gtk_label_new (_("Email address:"));
-	gtk_table_attach (GTK_TABLE (table), addr, 0, 1, 1, 2,
-			  GTK_FILL, 0, 0, 0);
-	gtk_misc_set_alignment (GTK_MISC (addr), 1, 0.5);
-
-	addr_entry = gtk_entry_new ();
-	gtk_table_attach (GTK_TABLE (table), addr_entry, 1, 2, 1, 2,
-			  GTK_EXPAND | GTK_FILL, 0, 0, 0);
-	gtk_object_set_data (GTK_OBJECT (vbox), "addr", addr_entry);
-
-	gtk_signal_connect_object (GTK_OBJECT (name_entry), "changed",
-				   GTK_SIGNAL_FUNC (identity_note_doneness),
-				   GTK_OBJECT (vbox));
-	gtk_signal_connect_object (GTK_OBJECT (addr_entry), "changed",
-				   GTK_SIGNAL_FUNC (identity_note_doneness),
-				   GTK_OBJECT (vbox));
-
-	hsep = gtk_hseparator_new ();
-	gtk_table_attach (GTK_TABLE (table), hsep, 0, 2, 2, 3,
-			  GTK_FILL, 0, 0, 8);
-
-	org = gtk_label_new (_("Organization:"));
-	gtk_table_attach (GTK_TABLE (table), org, 0, 1, 3, 4,
-			  GTK_FILL, 0, 0, 0);
-	gtk_misc_set_alignment (GTK_MISC (org), 1, 0.5);
-
-	org_entry = gtk_entry_new ();
-	gtk_table_attach (GTK_TABLE (table), org_entry, 1, 2, 3, 4,
-			  GTK_EXPAND | GTK_FILL, 0, 0, 0);
-	gtk_object_set_data (GTK_OBJECT (vbox), "org", org_entry);
-
-	sig = gtk_label_new (_("Signature file:"));
-	gtk_table_attach (GTK_TABLE (table), sig, 0, 1, 4, 5,
-			  GTK_FILL, GTK_FILL, 0, 0);
-	gtk_misc_set_alignment (GTK_MISC (sig), 1, 0);
-
-	sig_entry = gnome_file_entry_new (NULL, _("Signature File"));
-	gtk_table_attach (GTK_TABLE (table), sig_entry, 1, 2, 4, 5,
-			  GTK_FILL, 0, 0, 0);
-	gnome_file_entry_set_default_path (GNOME_FILE_ENTRY (sig_entry),
-					   g_get_home_dir ());
-	gtk_object_set_data (GTK_OBJECT (vbox), "sig",
-			     gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (sig_entry)));
-
-	gtk_widget_show_all (table);
-}
-
-
-/* Source/Transport pages */
-
-static void
-service_note_doneness (GtkObject *page, gpointer user_data)
-{
-	GtkObject *box;
-	GtkWidget *button;
-	GtkEntry *entry;
-	char *data;
-	gboolean sensitive = TRUE;
-
-	entry = gtk_object_get_data (page, "server_entry");
-	if (entry) {
-		data = gtk_entry_get_text (entry);
-		if (!data || !*data)
-			sensitive = FALSE;
-	}
-
-	if (sensitive) {
-		entry = gtk_object_get_data (page, "user_entry");
-		if (entry) {
-			data = gtk_entry_get_text (entry);
-			if (!data || !*data)
-				sensitive = FALSE;
-		}
-	}
-
-	if (sensitive) {
-		entry = gtk_object_get_data (page, "path_entry");
-		if (entry) {
-			data = gtk_entry_get_text (entry);
-			if (!data || !*data)
-				sensitive = FALSE;
-		}
-	}
-
-	button = gtk_object_get_data (page, "autodetect");
-	if (button)
-		gtk_widget_set_sensitive (button, sensitive);
-
-	box = gtk_object_get_data (page, "box");
-	button = gtk_object_get_data (box, "exit_button");
-	if (button)
-		gtk_widget_set_sensitive (button, sensitive);
-}
-
-static void
-prepare_service (GnomeDruidPage *page, gpointer arg1, gpointer user_data)
-{
-	GtkObject *box = user_data;
-	GtkNotebook *notebook = gtk_object_get_data (box, "notebook");
-	GtkWidget *table;
-	GtkEntry *entry;
-
-	table = gtk_notebook_get_nth_page (
-		notebook, gtk_notebook_get_current_page (notebook));
-
-	if (username) {
-		char *data = NULL;
-
-		entry = gtk_object_get_data (GTK_OBJECT (table), "user_entry");
-		if (entry) {
-			data = gtk_entry_get_text (entry);
-			if (!data || !*data)
-				gtk_entry_set_text (entry, username);
-		}
-	}
-
-	service_note_doneness (GTK_OBJECT (table), NULL);
-}
-
-static void
-auth_menuitem_activate (GtkObject *menuitem, GtkHTML *html)
-{
-	CamelServiceAuthType *authtype;
-
-	authtype = gtk_object_get_data (menuitem, "authtype");
-	put_html (html, authtype->description);
-}
-
-static void
-fill_auth_menu (GtkOptionMenu *optionmenu, GtkHTML *html, GList *authtypes)
-{
-	CamelServiceAuthType *authtype;
-	GtkWidget *menu, *item, *firstitem = NULL;
-
-	menu = gtk_menu_new ();
-	gtk_option_menu_set_menu (optionmenu, menu);
-	for (; authtypes; authtypes = authtypes->next) {
-		authtype = authtypes->data;
-		item = gtk_menu_item_new_with_label (_(authtype->name));
-		if (!firstitem)
-			firstitem = item;
-		gtk_menu_append (GTK_MENU (menu), item);
-		gtk_object_set_data (GTK_OBJECT (item), "authtype", authtype);
-		gtk_signal_connect (GTK_OBJECT (item), "activate",
-				    GTK_SIGNAL_FUNC (auth_menuitem_activate),
-				    html);
-	}
-	gtk_widget_show_all (menu);
-	gtk_option_menu_set_history (optionmenu, 0);
-	if (firstitem)
-		auth_menuitem_activate (GTK_OBJECT (firstitem), html);
-}
-
-static char *
-get_service_url (GtkObject *table)
-{
-	CamelURL *url;
-	GtkEditable *editable;
-	GtkOptionMenu *auth_optionmenu;
-	char *url_str;
-
-	url = g_new0 (CamelURL, 1);
-	url->protocol = g_strdup (gtk_object_get_data (table, "protocol"));
-	editable = gtk_object_get_data (table, "user_entry");
-	if (editable)
-		url->user = gtk_editable_get_chars (editable, 0, -1);
-	editable = gtk_object_get_data (table, "server_entry");
-	if (editable)
-		url->host = gtk_editable_get_chars (editable, 0, -1);
-	editable = gtk_object_get_data (table, "path_entry");
-	if (editable)
-		url->path = gtk_editable_get_chars (editable, 0, -1);
-
-	auth_optionmenu = gtk_object_get_data (table, "auth_optionmenu");
-	if (auth_optionmenu) {
-		GtkWidget *menu, *item;
-		CamelServiceAuthType *authtype;
-
-		menu = gtk_option_menu_get_menu (auth_optionmenu);
-		if (menu) {
-			item = gtk_menu_get_active (GTK_MENU (menu));
-			authtype = gtk_object_get_data (GTK_OBJECT (item),
-							"authtype");
-			if (*authtype->authproto)
-				url->authmech = g_strdup (authtype->authproto);
-		}
-	}
-
-	url_str = camel_url_to_string (url, FALSE);
-	camel_url_free (url);
-	return url_str;
-}
-
-static void
-autodetect_cb (GtkWidget *button, GtkObject *table)
-{
-	char *url;
-	CamelException *ex;
-	CamelService *service;
-	GList *authtypes;
-	GtkHTML *html;
-	GtkOptionMenu *optionmenu;
-	int type;
-
-	type = GPOINTER_TO_UINT (gtk_object_get_data (table, "service_type"));
-	url = get_service_url (table);
-
-	ex = camel_exception_new ();
-	service = camel_session_get_service (session, url, type, ex);
-	g_free (url);
-	if (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE)
-		goto error;
-
-	authtypes = camel_service_query_auth_types (service, ex);
-	if (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE)
-		goto error;
-
-	html = gtk_object_get_data (table, "auth_html");
-	optionmenu = gtk_object_get_data (table, "auth_optionmenu");
-	fill_auth_menu (optionmenu, html, authtypes);
-	return;
-
- error:
-	error_dialog (button, "Could not detect supported authentication "
-		      "types:\n%s", camel_exception_get_description (ex));
-	camel_exception_free (ex);
-}
-
-static gboolean
-service_acceptable (GtkNotebook *notebook)
-{
-	char *url;
-	GtkWidget *table;
-	GtkToggleButton *check;
-	int page, type;
-	CamelService *service;
-	CamelException *ex;
-	gboolean ok;
-
-	page = gtk_notebook_get_current_page (notebook);
-	table = gtk_notebook_get_nth_page (notebook, page);
-	check = gtk_object_get_data (GTK_OBJECT (table), "check");
-	if (!check || !gtk_toggle_button_get_active (check))
-		return TRUE;
-
-	type = GPOINTER_TO_UINT (gtk_object_get_data (GTK_OBJECT (table),
-						      "service_type"));
-	url = get_service_url (GTK_OBJECT (table));
-
-	ex = camel_exception_new ();
-	service = camel_session_get_service (session, url, type, ex);
-	g_free (url);
-	if (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE)
-		goto error;
-
-	ok = camel_service_connect (service, ex);
-	if (ok)
-		camel_service_disconnect (service, ex);
-	gtk_object_unref (GTK_OBJECT (service));
-
-	if (ok)
-		return TRUE;
-
- error:
-	error_dialog (GTK_WIDGET (notebook),
-		      camel_exception_get_description (ex));
-	camel_exception_free (ex);
-	return FALSE;
-}
-
-static gboolean
-service_next (GnomeDruidPage *page, gpointer arg1, gpointer user_data)
-{
-	return !service_acceptable (user_data);
-}
-
-static void
-destroy_service (GtkObject *notebook, gpointer urlp)
-{
-	char **url = urlp;
-	GtkWidget *table;
-	int page;
-
-	page = gtk_notebook_get_current_page (GTK_NOTEBOOK (notebook));
-	table = gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), page);
-	*url = get_service_url (GTK_OBJECT (table));
-}
-
-static void
-add_row (GtkWidget *table, int row, const char *label_text,
-	 const char *tag, int flag)
-{
-	GtkWidget *label, *entry;
-
-	label = gtk_label_new (label_text);
-	gtk_table_attach (GTK_TABLE (table), label, 0, 1, row, row + 1,
-			  GTK_FILL, 0, 0, 0);
-	gtk_misc_set_alignment (GTK_MISC (label), 1, 0.5);
-
-	entry = gtk_entry_new ();
-	gtk_table_attach (GTK_TABLE (table), entry, 1, 3, row, row + 1,
-			  GTK_EXPAND | GTK_FILL, 0, 0, 0);
-	gtk_signal_connect_object (GTK_OBJECT (entry), "changed",
-				   GTK_SIGNAL_FUNC (service_note_doneness),
-				   GTK_OBJECT (table));
-	gtk_object_set_data (GTK_OBJECT (table), tag, entry);
-}
-
-static GtkWidget *
-create_source (struct service_type *st)
-{
-	GtkWidget *table;
-	GtkWidget *auth, *auth_optionmenu, *auth_html;
-	GtkWidget *autodetect;
-	int row, service_flags;
-
-	table = gtk_table_new (5, 3, FALSE);
-	gtk_table_set_row_spacings (GTK_TABLE (table), 2);
-	gtk_table_set_col_spacings (GTK_TABLE (table), 10);
-	gtk_container_set_border_width (GTK_CONTAINER (table), 8);
-	gtk_object_set_data (GTK_OBJECT (table), "protocol",
-			     st->provider->protocol);
-	gtk_object_set_data (GTK_OBJECT (table), "service_type",
-			     GUINT_TO_POINTER (CAMEL_PROVIDER_STORE));
-
-	row = 0;
-	service_flags = st->service->url_flags &
-		~CAMEL_SERVICE_URL_NEED_AUTH;
-
-	if (service_flags & CAMEL_SERVICE_URL_NEED_HOST) {
-		add_row (table, row, _("Server:"), "server_entry",
-			 CAMEL_SERVICE_URL_NEED_HOST);
-		row++;
-	}
-
-	if (service_flags & CAMEL_SERVICE_URL_NEED_USER) {
-		add_row (table, row, _("Username:"), "user_entry",
-			 CAMEL_SERVICE_URL_NEED_USER);
-		row++;
-	}
-
-	if (service_flags & CAMEL_SERVICE_URL_NEED_PATH) {
-		add_row (table, row, _("Path:"), "path_entry",
-			 CAMEL_SERVICE_URL_NEED_PATH);
-		row++;
-	}
-
-	if (st->authtypes) {
-		auth = gtk_label_new (_("Authentication:"));
-		gtk_table_attach (GTK_TABLE (table), auth, 0, 1,
-				  row, row + 1, GTK_FILL, 0, 0, 0);
-		gtk_misc_set_alignment (GTK_MISC (auth), 1, 0.5);
-
-		auth_optionmenu = gtk_option_menu_new ();
-		gtk_table_attach (GTK_TABLE (table), auth_optionmenu, 1, 2,
-				  row, row + 1, GTK_FILL | GTK_EXPAND,
-				  0, 0, 0);
-		gtk_object_set_data (GTK_OBJECT (table), "auth_optionmenu",
-				     auth_optionmenu);
-
-		autodetect = gtk_button_new_with_label (_("Detect supported types..."));
-		gtk_table_attach (GTK_TABLE (table), autodetect, 2, 3,
-				  row, row + 1, 0, 0, 0, 0);
-		gtk_widget_set_sensitive (autodetect, FALSE);
-		gtk_signal_connect (GTK_OBJECT (autodetect), "clicked",
-				    GTK_SIGNAL_FUNC (autodetect_cb), table);
-		gtk_object_set_data (GTK_OBJECT (table), "autodetect",
-				     autodetect);
-
-		auth_html = html_new (TRUE);
-		gtk_table_attach (GTK_TABLE (table), auth_html->parent->parent,
-				  0, 3, row + 1, row + 2,
-				  GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-		gtk_object_set_data (GTK_OBJECT (table), "auth_html",
-				     auth_html);
-
-		fill_auth_menu (GTK_OPTION_MENU (auth_optionmenu),
-				GTK_HTML (auth_html), st->authtypes);
-
-		row += 2;
-	}
-
-	if (row != 0) {
-		GtkWidget *check;
-
-		check = gtk_check_button_new_with_label (
-			_("Test these values before continuing"));
-		gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), TRUE);
-		gtk_table_attach (GTK_TABLE (table), check, 0, 3,
-				  row, row + 1, GTK_FILL, GTK_FILL, 0, 0);
-		gtk_object_set_data (GTK_OBJECT (table), "check", check);
-		row += 1;
-	}
-
-	gtk_table_resize (GTK_TABLE (table), row, 3);
-	gtk_widget_show_all (table);
-
-	return table;
-}
-
-static GtkWidget *
-create_transport (struct service_type *st)
-{
-	GtkWidget *table;
-	GtkWidget *auth, *auth_optionmenu, *auth_html;
-	GtkWidget *autodetect;
-	int row, service_flags;
-
-	table = gtk_table_new (5, 3, FALSE);
-	gtk_table_set_row_spacings (GTK_TABLE (table), 2);
-	gtk_table_set_col_spacings (GTK_TABLE (table), 10);
-	gtk_container_set_border_width (GTK_CONTAINER (table), 8);
-	gtk_object_set_data (GTK_OBJECT (table), "protocol",
-			     st->provider->protocol);
-	gtk_object_set_data (GTK_OBJECT (table), "service_type",
-			     GUINT_TO_POINTER (CAMEL_PROVIDER_TRANSPORT));
-
-	row = 0;
-	service_flags = st->service->url_flags &
-		~CAMEL_SERVICE_URL_NEED_AUTH;
-
-	if (service_flags & CAMEL_SERVICE_URL_NEED_HOST) {
-		add_row (table, row, _("Server:"), "server_entry",
-			 CAMEL_SERVICE_URL_NEED_HOST);
-		row++;
-	}
-
-	if (st->authtypes) {
-		auth = gtk_label_new (_("Authentication:"));
-		gtk_table_attach (GTK_TABLE (table), auth, 0, 1,
-				  row, row + 1, GTK_FILL, 0, 0, 0);
-		gtk_misc_set_alignment (GTK_MISC (auth), 1, 0.5);
-
-		auth_optionmenu = gtk_option_menu_new ();
-		gtk_table_attach (GTK_TABLE (table), auth_optionmenu, 1, 2,
-				  row, row + 1, GTK_FILL | GTK_EXPAND,
-				  0, 0, 0);
-		gtk_object_set_data (GTK_OBJECT (table), "auth_optionmenu",
-				     auth_optionmenu);
-
-		autodetect = gtk_button_new_with_label (_("Detect supported types..."));
-		gtk_table_attach (GTK_TABLE (table), autodetect, 2, 3,
-				  row, row + 1, 0, 0, 0, 0);
-		gtk_widget_set_sensitive (autodetect, FALSE);
-		gtk_object_set_data (GTK_OBJECT (table), "autodetect",
-				     autodetect);
-
-		auth_html = html_new (TRUE);
-		gtk_table_attach (GTK_TABLE (table), auth_html->parent->parent,
-				  0, 3, row + 1, row + 2,
-				  GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-
-		fill_auth_menu (GTK_OPTION_MENU (auth_optionmenu),
-				GTK_HTML (auth_html), st->authtypes);
-
-		row += 2;
-	}
-
-	if (row != 0) {
-		GtkWidget *check;
-
-		check = gtk_check_button_new_with_label (
-			_("Test these values before continuing"));
-		gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), TRUE);
-		gtk_table_attach (GTK_TABLE (table), check, 0, 3,
-				  row, row + 1, GTK_FILL | GTK_EXPAND,
-				  GTK_FILL, 0, 0);
-		gtk_object_set_data (GTK_OBJECT (table), "check", check);
-		row += 1;
-	}
-
-	gtk_table_resize (GTK_TABLE (table), row, 3);
-	gtk_widget_show_all (table);
-
-	return table;
-}
-
-static void
-stype_menuitem_activate (GtkObject *menuitem, GtkObject *table)
-{
-	GtkHTML *html;
-	char *text;
-	int page;
-	GtkNotebook *notebook;
-
-	text = gtk_object_get_data (menuitem, "description");
-	html = gtk_object_get_data (table, "html");
-	put_html (html, text);
-
-	page = GPOINTER_TO_UINT (gtk_object_get_data (menuitem, "page"));
-	notebook = gtk_object_get_data (table, "notebook");
-	gtk_notebook_set_page (notebook, page);
-	service_note_doneness (GTK_OBJECT (gtk_notebook_get_nth_page (notebook,
-								      page)),
-			       NULL);			       
-}
-
-/* Create the mail source/transport page. */
-static void
-create_service_page (GtkWidget *vbox, const char *label_text, GList *services,
-		     GtkWidget *(*create_service)(struct service_type *),
-		     char **urlp)
-{
-	GtkWidget *hbox, *stype, *stype_optionmenu, *stype_menu;
-	GtkWidget *menuitem, *first_menuitem = NULL;
-	GtkWidget *stype_html, *notebook, *service;
-	int page;
-	GList *s;
-
-	hbox = gtk_hbox_new (FALSE, 8);
-	gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 0);
-
-	stype = gtk_label_new (label_text);
-	gtk_box_pack_start (GTK_BOX (hbox), stype, FALSE, FALSE, 0);
-	gtk_misc_set_alignment (GTK_MISC (stype), 1, 0.5);
-
-	stype_optionmenu = gtk_option_menu_new ();
-	gtk_box_pack_start (GTK_BOX (hbox), stype_optionmenu, TRUE, TRUE, 0);
-	stype_menu = gtk_menu_new ();
-	gtk_option_menu_set_menu (GTK_OPTION_MENU (stype_optionmenu),
-				  stype_menu);
-
-	stype_html = html_new (TRUE);
-	gtk_object_set_data (GTK_OBJECT (vbox), "html", stype_html);
-	gtk_box_pack_start (GTK_BOX (vbox), stype_html->parent->parent,
-			    TRUE, TRUE, 0);
-
-	notebook = gtk_notebook_new ();
-	gtk_notebook_set_show_tabs (GTK_NOTEBOOK (notebook), FALSE);
-	gtk_box_pack_start (GTK_BOX (vbox), notebook, TRUE, TRUE, 0);
-	gtk_object_set_data (GTK_OBJECT (vbox), "notebook", notebook);
-	gtk_signal_connect (GTK_OBJECT (notebook), "destroy",
-			    GTK_SIGNAL_FUNC (destroy_service), urlp);
-
-	for (s = services, page = 0; s; s = s->next, page++) {
-		struct service_type *st = s->data;
-
-		menuitem = gtk_menu_item_new_with_label (_(st->provider->name));
-		if (!first_menuitem)
-			first_menuitem = menuitem;
-		gtk_signal_connect (GTK_OBJECT (menuitem), "activate",
-				    GTK_SIGNAL_FUNC (stype_menuitem_activate),
-				    vbox);
-		gtk_menu_append (GTK_MENU (stype_menu), menuitem);
-
-		service = (*create_service) (st);
-		gtk_notebook_append_page (GTK_NOTEBOOK (notebook), service,
-					  NULL);
-		gtk_object_set_data (GTK_OBJECT (service), "box", vbox);
-
-		gtk_object_set_data (GTK_OBJECT (menuitem), "page",
-				     GUINT_TO_POINTER (page));
-		gtk_object_set_data (GTK_OBJECT (menuitem), "description",
-				     st->provider->description);
-	}
-
-	stype_menuitem_activate (GTK_OBJECT (first_menuitem),
-				 GTK_OBJECT (vbox));
-	gtk_option_menu_set_history (GTK_OPTION_MENU (stype_optionmenu), 0);
-
-	gtk_widget_show_all (vbox);
-}
-
-static void
-create_source_page (GtkWidget *vbox, GList *sources, char **urlp)
-{
-	GtkWidget *html;
-
-	html = html_new (FALSE);
-	put_html (GTK_HTML (html),
-		  _("Select the kind of mail server you have, and enter "
-		    "the relevant information about it.\n\nIf the server "
-		    "requires authentication, you can click the "
-		    "\"Detect supported types...\" button after entering "
-		    "the other information."));
-	gtk_box_pack_start (GTK_BOX (vbox), html->parent, FALSE, TRUE, 0);
-
-	create_service_page (vbox, "Mail source type:", sources,
-			     create_source, urlp);
-}
-
-static void
-create_transport_page (GtkWidget *vbox, GList *transports, char **urlp)
-{
-	GtkWidget *html;
-
-	html = html_new (FALSE);
-	put_html (GTK_HTML (html),
-		  _("Select the method you would like to use to deliver "
-		    "your mail."));
-	gtk_box_pack_start (GTK_BOX (vbox), html->parent, FALSE, TRUE, 0);
-
-	create_service_page (vbox, "Mail transport type:", transports,
-			     create_transport, urlp);
-}
-
-
-/* Generic stuff */
-
-static GList *
-add_service (GList *services, CamelProviderType type, CamelProvider *prov)
-{
-	CamelService *service;
-	CamelException *ex;
-	char *url;
-	struct service_type *st;
-
-	ex = camel_exception_new ();
-
-	url = g_strdup_printf ("%s:", prov->protocol);
-	service = camel_session_get_service (session, url, type, ex);
-	g_free (url);
-	if (!service) {
-		camel_exception_free (ex);
-		return services;
-	}
-
-	st = g_new (struct service_type, 1);
-	st->provider = prov;
-	st->service = service;
-	st->authtypes = camel_service_query_auth_types (st->service, ex);
-	camel_exception_free (ex);
-
-	return g_list_append (services, st);
-}
-
-static GdkImlibImage *
-load_image (const char *name)
-{
-	char *path;
-	GdkImlibImage *image;
-
-	path = g_strdup_printf ("/usr/local/share/images/evolution/%s", name);
-	image = gdk_imlib_load_image (path);
-	g_free (path);
-
-	return image;
-}
-
-static void
-prepare_first (GnomeDruidPage *page, GnomeDruid *druid, gpointer user_data)
-{
-	gnome_druid_set_buttons_sensitive (druid, TRUE, TRUE, TRUE);
-}
-
-static struct identity_record idrec;
-static char *source, *transport;
-
-static void
-cancel (GnomeDruid *druid, gpointer window)
-{
-	gtk_window_set_modal (window, FALSE);
-	gtk_widget_destroy (window);
-	gtk_main_quit ();
-}
-
-static void
-finish (GnomeDruidPage *page, gpointer arg1, gpointer window)
-{
-	char *path;
-
-	cancel (arg1, window);
-
-	/* According to the API docs, there's an easier way to do this,
-	 * except that it doesn't work. Anyway, this will be replaced
-	 * by GConf eventually. FIXME.
-	 */
-
-	path = g_strdup_printf ("=%s/config=/mail/configured", evolution_dir);
-	gnome_config_set_bool (path, TRUE);
-	g_free (path);
-
-	path = g_strdup_printf ("=%s/config=/mail/id_name", evolution_dir);
-	gnome_config_set_string (path, idrec.name);
-	g_free (path);
-
-	path = g_strdup_printf ("=%s/config=/mail/id_addr", evolution_dir);
-	gnome_config_set_string (path, idrec.address);
-	g_free (path);
-
-	path = g_strdup_printf ("=%s/config=/mail/id_org", evolution_dir);
-	gnome_config_set_string (path, idrec.organization);
-	g_free (path);
-
-	path = g_strdup_printf ("=%s/config=/mail/id_sig", evolution_dir);
-	gnome_config_set_string (path, idrec.sigfile);
-	g_free (path);
-
-	path = g_strdup_printf ("=%s/config=/mail/source", evolution_dir);
-	gnome_config_set_string (path, source);
-	g_free (path);
-
-	path = g_strdup_printf ("=%s/config=/mail/transport", evolution_dir);
-	gnome_config_set_string (path, transport);
-	g_free (path);
-
-	gnome_config_sync ();
-}
-
-void
-mail_config_druid (void)
-{
-	GnomeDruid *druid;
-	GtkWidget *page, *window;
-	GnomeDruidPageStandard *dpage;
-	GList *providers, *p, *sources, *transports;
-	GdkImlibImage *mail_logo, *identity_logo;
-	GdkImlibImage *source_logo, *transport_logo;
-
-	/* Fetch list of all providers. */
-	providers = camel_session_list_providers (session, TRUE);
-	sources = transports = NULL;
-	for (p = providers; p; p = p->next) {
-		CamelProvider *prov = p->data;
-
-		if (strcmp (prov->domain, "mail") != 0)
-			continue;
-
-		if (prov->object_types[CAMEL_PROVIDER_STORE]) {
-			sources = add_service (sources,
-					       CAMEL_PROVIDER_STORE,
-					       prov);
-		} else if (prov->object_types[CAMEL_PROVIDER_TRANSPORT]) {
-			transports = add_service (transports,
-						  CAMEL_PROVIDER_TRANSPORT,
-						  prov);
-		}
-	}
-
-	mail_logo = load_image ("evolution-inbox.png");
-	identity_logo = load_image ("malehead.png");
-	source_logo = mail_logo;
-	transport_logo = load_image ("envelope.png");
-
-	window = gtk_window_new (GTK_WINDOW_DIALOG);
-	druid = GNOME_DRUID (gnome_druid_new ());
-	gtk_signal_connect (GTK_OBJECT (druid), "cancel",
-			    GTK_SIGNAL_FUNC (cancel), window);
-
-	/* Start page */
-	page = gnome_druid_page_start_new_with_vals (
-		_("Mail Configuration"),
-		"Welcome to the Evolution Mail configuration wizard!\n"
-		"By filling in some information about your email\n"
-		"settings,you can start sending and receiving email\n"
-		"right away. Click \"Next\" to continue.",
-		mail_logo, NULL);
-
-	gnome_druid_page_start_set_logo_bg_color (
-		GNOME_DRUID_PAGE_START (page),
-		&GNOME_DRUID_PAGE_START (page)->background_color);
-	gnome_druid_append_page (druid, GNOME_DRUID_PAGE (page));
-	gtk_signal_connect (GTK_OBJECT (page), "prepare",
-			    GTK_SIGNAL_FUNC (prepare_first), NULL);
-	gtk_widget_show_all (page);
-
-
-	/* Identity page */
-	page = gnome_druid_page_standard_new_with_vals (_("Identity"),
-							identity_logo);
-	dpage = GNOME_DRUID_PAGE_STANDARD (page);
-	gnome_druid_page_standard_set_logo_bg_color (dpage,
-						     &dpage->background_color);
-	gtk_container_set_border_width (GTK_CONTAINER (dpage->vbox), 8);
-	gtk_box_set_spacing (GTK_BOX (dpage->vbox), 5);
-	create_identity_page (dpage->vbox, &idrec);
-	gtk_object_set_data (GTK_OBJECT (dpage->vbox), "exit_button",
-			     druid->next);
-	gnome_druid_append_page (druid, GNOME_DRUID_PAGE (page));
-	gtk_signal_connect (GTK_OBJECT (page), "prepare",
-			    GTK_SIGNAL_FUNC (prepare_identity), dpage->vbox);
-	gtk_signal_connect (GTK_OBJECT (page), "next",
-			    GTK_SIGNAL_FUNC (identity_next), dpage->vbox);
-	gtk_widget_show (page);
-
-
-	/* Source page */
-	page = gnome_druid_page_standard_new_with_vals (_("Mail Source"),
-							source_logo);
-	dpage = GNOME_DRUID_PAGE_STANDARD (page);
-	gnome_druid_page_standard_set_logo_bg_color (dpage,
-						     &dpage->background_color);
-	gtk_container_set_border_width (GTK_CONTAINER (dpage->vbox), 8);
-	gtk_box_set_spacing (GTK_BOX (dpage->vbox), 5);
-	create_source_page (dpage->vbox, sources, &source);
-	gtk_object_set_data (GTK_OBJECT (dpage->vbox), "exit_button",
-			     druid->next);
-	gnome_druid_append_page (druid, GNOME_DRUID_PAGE (page));
-	gtk_signal_connect (GTK_OBJECT (page), "prepare", 
-			    GTK_SIGNAL_FUNC (prepare_service), dpage->vbox);
-	gtk_signal_connect (GTK_OBJECT (page), "next", 
-			    GTK_SIGNAL_FUNC (service_next),
-			    gtk_object_get_data (GTK_OBJECT (dpage->vbox),
-						 "notebook"));
-	gtk_widget_show (page);
-
-
-	/* Transport page */
-	page = gnome_druid_page_standard_new_with_vals (_("Mail Transport"),
-							transport_logo);
-	dpage = GNOME_DRUID_PAGE_STANDARD (page);
-	gnome_druid_page_standard_set_logo_bg_color (dpage,
-						     &dpage->background_color);
-	gtk_container_set_border_width (GTK_CONTAINER (dpage->vbox), 8);
-	gtk_box_set_spacing (GTK_BOX (dpage->vbox), 5);
-	create_transport_page (dpage->vbox, transports, &transport);
-	gtk_object_set_data (GTK_OBJECT (dpage->vbox), "exit_button",
-			     druid->next);
-	gnome_druid_append_page (druid, GNOME_DRUID_PAGE (page));
-	gtk_signal_connect (GTK_OBJECT (page), "prepare", 
-			    GTK_SIGNAL_FUNC (prepare_service), dpage->vbox);
-	gtk_signal_connect (GTK_OBJECT (page), "next", 
-			    GTK_SIGNAL_FUNC (service_next),
-			    gtk_object_get_data (GTK_OBJECT (dpage->vbox),
-						 "notebook"));
-	gtk_widget_show (page);
-
-
-	/* Finish page */
-	page = gnome_druid_page_finish_new_with_vals (
-		_("Mail Configuration"),
-		"Your email configuration is now complete.\n"
-		"Click \"finish\" to save your new settings",
-		mail_logo, NULL);
-	gnome_druid_page_finish_set_logo_bg_color (
-		GNOME_DRUID_PAGE_FINISH (page),
-		&GNOME_DRUID_PAGE_FINISH (page)->background_color);
-	gnome_druid_append_page (druid, GNOME_DRUID_PAGE (page));
-	gtk_signal_connect (GTK_OBJECT (page), "finish",
-			    GTK_SIGNAL_FUNC (finish), window);
-	gtk_widget_show_all (page);
-
-	gtk_container_add (GTK_CONTAINER (window), GTK_WIDGET (druid));
-
-	gtk_widget_show (GTK_WIDGET (druid));
-	gtk_widget_show (window);
-	gtk_widget_queue_resize (window);
-	gnome_druid_set_buttons_sensitive (druid, FALSE, TRUE, TRUE);
-
-	gtk_window_set_modal (GTK_WINDOW (window), TRUE);
-	gtk_main ();
-}
diff --git a/mail/mail-display.c b/mail/mail-display.c
deleted file mode 100644
index b72169327e..0000000000
--- a/mail/mail-display.c
+++ /dev/null
@@ -1,365 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * mail-display.c: Mail display widget
- *
- * Author:
- *   Miguel de Icaza
- *   Bertrand Guiheneuf (bg@aful.org)
- *
- * (C) 2000 Helix Code, Inc.
- */
-#include 
-#include 
-#include 
-#include 
-#include 
-#include "e-util/e-setup.h"
-#include "e-util/e-util.h"
-#include "mail-display.h"
-#include "mail.h"
-
-#define PARENT_TYPE (gtk_vbox_get_type ())
-
-static GtkObjectClass *mail_display_parent_class;
-
-
-/*----------------------------------------------------------------------*
- *                        Callbacks
- *----------------------------------------------------------------------*/
-
-static void
-save_data_eexist_cb (int reply, gpointer user_data)
-{
-	gboolean *ok = user_data;
-
-	*ok = reply == 0;
-	gtk_main_quit ();
-}
-
-static void
-save_data_cb (GtkWidget *widget, gpointer user_data)
-{
-	CamelDataWrapper *data = user_data;
-	CamelStream *stream_fs;
-	GtkFileSelection *file_select = (GtkFileSelection *)
-		gtk_widget_get_ancestor (widget, GTK_TYPE_FILE_SELECTION);
-	char *name;
-	int fd;
-
-	name = gtk_file_selection_get_filename (file_select);
-
-	fd = open (name, O_WRONLY | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
-	if (fd == -1 && errno == EEXIST) {
-		gboolean ok = FALSE;
-
-		gnome_ok_cancel_dialog_modal_parented (
-			"A file by that name already exists.\nOverwrite it?",
-			save_data_eexist_cb, &ok, GTK_WINDOW (file_select));
-		gtk_main ();
-		if (!ok)
-			return;
-		fd = open (name, O_WRONLY | O_TRUNC);
-	}
-
-	if (fd == -1) {
-		char *msg;
-
-		msg = g_strdup_printf ("Could not open file %s:\n%s",
-				       name, g_strerror (errno));
-		gnome_error_dialog_parented (msg, GTK_WINDOW (file_select));
-		return;
-	}
-
-	stream_fs = camel_stream_fs_new_with_fd (fd);
-	if (camel_data_wrapper_write_to_stream (data, stream_fs) == -1
-	    || camel_stream_flush (stream_fs) == -1) {
-		char *msg;
-
-		msg = g_strdup_printf ("Could not write data: %s", strerror(errno));
-		gnome_error_dialog_parented (msg, GTK_WINDOW (file_select));
-	}
-	gtk_object_unref (GTK_OBJECT (stream_fs));
-
-	gtk_widget_destroy (GTK_WIDGET (file_select));
-}
-
-static void
-save_data (const char *cid, CamelMimeMessage *message)
-{
-	CamelDataWrapper *data;
-	GtkFileSelection *file_select;
-	char *filename;
-
-	g_return_if_fail (CAMEL_IS_MIME_MESSAGE (message));
-	data = gtk_object_get_data (GTK_OBJECT (message), cid);
-	g_return_if_fail (CAMEL_IS_DATA_WRAPPER (data));
-
-	file_select = GTK_FILE_SELECTION (gtk_file_selection_new ("Save Attachment"));
-	filename = gtk_object_get_data (GTK_OBJECT (data), "filename");
-	if (filename)
-		filename = g_strdup_printf ("%s/%s", evolution_dir, filename);
-	else
-		filename = g_strdup_printf ("%s/attachment", evolution_dir);
-	gtk_file_selection_set_filename (file_select, filename);
-	g_free (filename);
-
-	gtk_signal_connect (GTK_OBJECT (file_select->ok_button), "clicked", 
-			    GTK_SIGNAL_FUNC (save_data_cb), data);
-	gtk_signal_connect_object (GTK_OBJECT (file_select->cancel_button),
-				   "clicked",
-				   GTK_SIGNAL_FUNC (gtk_widget_destroy),
-				   GTK_OBJECT (file_select));
-
-	gtk_widget_show (GTK_WIDGET (file_select));
-}
-
-static void
-on_link_clicked (GtkHTML *html, const char *url, gpointer user_data)
-{
-	if (!strncasecmp (url, "news:", 5) ||
-	    !strncasecmp (url, "nntp:", 5))
-		g_warning ("Can't handle news URLs yet.");
-	else if (!strncasecmp (url, "mailto:", 7))
-		send_to_url (url);
-	else if (!strncasecmp (url, "cid:", 4))
-		save_data (url + 4, user_data);
-	else
-		gnome_url_show (url);
-}
-
-static void
-on_url_requested (GtkHTML *html, const char *url, GtkHTMLStream *handle,
-		  gpointer user_data)
-{
-	CamelMimeMessage *message = CAMEL_MIME_MESSAGE (user_data);
-
-	if (strncmp (url, "x-gnome-icon:", 13) == 0) {
-		const char *name = url + 13;
-		/* FIXME: gnome_pixmap_file will cheerily accept icon
-		 * names like "../../../dev/zero". Anyway, this whole
-		 * hack needs to be replaced with something more
-		 * efficient anyway.
-		 */
-		char *path = gnome_pixmap_file (name), buf[1024];
-		int fd, nread;
-
-		g_return_if_fail (path != NULL);
-		fd = open (path, O_RDONLY);
-		g_free (path);
-		g_return_if_fail (fd != -1);
-
-		while (1) {
-			nread = read (fd, buf, sizeof (buf));
-			if (nread < 1)
-				break;
-			gtk_html_write (html, handle, buf, nread);
-		}
-		close (fd);
-	} else if (strncmp (url, "cid:", 4) == 0) {
-		const char *cid = url + 4;
-		CamelDataWrapper *data;
-		CamelStream *stream_mem;
-		GByteArray *ba;
-
-		data = gtk_object_get_data (GTK_OBJECT (message), cid);
-		g_return_if_fail (CAMEL_IS_DATA_WRAPPER (data));
-
-		ba = g_byte_array_new ();
-		stream_mem = camel_stream_mem_new_with_byte_array (ba);
-		camel_data_wrapper_write_to_stream (data, stream_mem);
-		gtk_html_write (html, handle, ba->data, ba->len);
-		gtk_object_unref (GTK_OBJECT (stream_mem));
-	} else
-		return;
-}
-
-/* HTML part code */
-static void
-html_size_req (GtkWidget *widget, GtkRequisition *requisition)
-{
-	requisition->height = GTK_LAYOUT (widget)->height;
-	requisition->width = GTK_LAYOUT (widget)->width;
-}
-
-void
-mail_html_new (GtkHTML **html, GtkHTMLStream **stream,
-	       CamelMimeMessage *root, gboolean init)
-{
-	*html = GTK_HTML (gtk_html_new ());
-	gtk_html_set_editable (*html, FALSE);
-	gtk_signal_connect (GTK_OBJECT (*html), "size_request",
-			    GTK_SIGNAL_FUNC (html_size_req), NULL);
-	gtk_signal_connect (GTK_OBJECT (*html), "url_requested",
-			    GTK_SIGNAL_FUNC (on_url_requested), root);
-	gtk_signal_connect (GTK_OBJECT (*html), "link_clicked",
-			    GTK_SIGNAL_FUNC (on_link_clicked), root);
-
-	*stream = gtk_html_begin (*html);
-	if (init) {
-		mail_html_write (*html, *stream, HTML_HEADER
-				 "\n");
-	}
-}
-
-void
-mail_html_write (GtkHTML *html, GtkHTMLStream *stream,
-		 const char *format, ...)
-{
-	char *buf;
-	va_list ap;
-
-	va_start (ap, format);
-	buf = g_strdup_vprintf (format, ap);
-	va_end (ap);
-	gtk_html_write (html, stream, buf, strlen (buf));
-	g_free (buf);
-}
-
-void
-mail_html_end (GtkHTML *html, GtkHTMLStream *stream, gboolean finish, GtkBox *box)
-{
-	GtkWidget *scroll;
-
-	scroll = gtk_scrolled_window_new (NULL, NULL);
-	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroll),
-					GTK_POLICY_NEVER,
-					GTK_POLICY_NEVER);
-	gtk_container_add (GTK_CONTAINER (scroll), GTK_WIDGET (html));
-
-	if (finish)
-		mail_html_write (html, stream, "\n");
-	gtk_html_end (html, stream, GTK_HTML_STREAM_OK);
-
-	gtk_box_pack_start (box, scroll, FALSE, TRUE, 0);
-	gtk_widget_show (GTK_WIDGET (html));
-	gtk_widget_show (scroll);
-}
-
-
-
-
-/**
- * mail_display_set_message:
- * @mail_display: the mail display object
- * @mime_message: the input camel medium
- *
- * Makes the mail_display object show the contents of the medium
- * param. This means feeding mail_display->body_stream and
- * mail_display->headers_stream with html.
- *
- **/
-void 
-mail_display_set_message (MailDisplay *mail_display, 
-			  CamelMedium *medium)
-{
-	GtkAdjustment *adj;
-
-	/*
-	 * for the moment, camel-formatter deals only with 
-	 * mime messages, but in the future, it should be 
-	 * able to deal with any medium.
-	 * It can work on pretty much data wrapper, but in 
-	 * fact, only the medium class has the distinction 
-	 * header / body 
-	 */
-	if (!CAMEL_IS_MIME_MESSAGE (medium))
-		return;
-
-	/* Clean up from previous message. */
-	if (mail_display->current_message) {
-		GtkContainer *container =
-			GTK_CONTAINER (mail_display->inner_box);
-		GList *htmls;
-
-		htmls = gtk_container_children (container);
-		while (htmls) {
-			gtk_container_remove (container, htmls->data);
-			htmls = htmls->next;
-		}
-
-		gtk_object_unref (GTK_OBJECT (mail_display->current_message));
-	}
-
-	mail_display->current_message = CAMEL_MIME_MESSAGE (medium);
-	gtk_object_ref (GTK_OBJECT (medium));
-
-	mail_format_mime_message (CAMEL_MIME_MESSAGE (medium),
-				  mail_display->inner_box);
-
-	adj = gtk_scrolled_window_get_vadjustment (mail_display->scroll);
-	gtk_adjustment_set_value (adj, 0);
-	gtk_scrolled_window_set_vadjustment (mail_display->scroll, adj);
-
-	adj = gtk_scrolled_window_get_hadjustment (mail_display->scroll);
-	gtk_adjustment_set_value (adj, 0);
-	gtk_scrolled_window_set_hadjustment (mail_display->scroll, adj);
-}
-
-
-/*----------------------------------------------------------------------*
- *                     Standard Gtk+ Class functions
- *----------------------------------------------------------------------*/
-
-static void
-mail_display_init (GtkObject *object)
-{
-	MailDisplay *mail_display = MAIL_DISPLAY (object);
-
-	/* various other initializations */
-	mail_display->current_message = NULL;
-}
-
-static void
-mail_display_destroy (GtkObject *object)
-{
-	/* MailDisplay *mail_display = MAIL_DISPLAY (object); */
-
-	mail_display_parent_class->destroy (object);
-}
-
-static void
-mail_display_class_init (GtkObjectClass *object_class)
-{
-	object_class->destroy = mail_display_destroy;
-	mail_display_parent_class = gtk_type_class (PARENT_TYPE);
-}
-
-GtkWidget *
-mail_display_new (FolderBrowser *parent_folder_browser)
-{
-	MailDisplay *mail_display = gtk_type_new (mail_display_get_type ());
-	GtkWidget *scroll, *vbox;
-
-	g_assert (parent_folder_browser);
-
-	mail_display->parent_folder_browser = parent_folder_browser;
-
-	gtk_box_set_homogeneous (GTK_BOX (mail_display), FALSE);
-	gtk_widget_show (GTK_WIDGET (mail_display));
-
-	/* For now, the box only contains a single scrolled window,
-	 * which in turn contains a vbox itself.
-	 */
-	scroll = gtk_scrolled_window_new (NULL, NULL);
-	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroll),
-					GTK_POLICY_AUTOMATIC,
-					GTK_POLICY_ALWAYS);
-	gtk_box_pack_start_defaults (GTK_BOX (mail_display),
-				     GTK_WIDGET (scroll));
-	gtk_widget_show (GTK_WIDGET (scroll));
-
-	vbox = gtk_vbox_new (FALSE, 2);
-	gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scroll),
-					       vbox);
-	gtk_widget_show (GTK_WIDGET (vbox));
-
-	mail_display->scroll = GTK_SCROLLED_WINDOW (scroll);
-	mail_display->inner_box = GTK_BOX (vbox);
-
-	return GTK_WIDGET (mail_display);
-}
-
-
-
-E_MAKE_TYPE (mail_display, "MailDisplay", MailDisplay, mail_display_class_init, mail_display_init, PARENT_TYPE);
diff --git a/mail/mail-display.h b/mail/mail-display.h
deleted file mode 100644
index 0d38d4e432..0000000000
--- a/mail/mail-display.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-#ifndef _MAIL_DISPLAY_H_
-#define _MAIL_DISPLAY_H_
-
-#include 
-#include 
-#include "camel/camel-stream.h"
-#include "camel/camel-mime-message.h"
-#include "folder-browser.h"
-
-
-#define MAIL_DISPLAY_TYPE        (mail_display_get_type ())
-#define MAIL_DISPLAY(o)          (GTK_CHECK_CAST ((o), MAIL_DISPLAY_TYPE, MailDisplay))
-#define MAIL_DISPLAY_CLASS(k)    (GTK_CHECK_CLASS_CAST((k), MAIL_DISPLAY_TYPE, MailDisplayClass))
-#define IS_MAIL_DISPLAY(o)       (GTK_CHECK_TYPE ((o), MAIL_DISPLAY_TYPE))
-#define IS_MAIL_DISPLAY_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), MAIL_DISPLAY_TYPE))
-
-struct _MailDisplay {
-	GtkVBox parent;
-
-	GtkScrolledWindow *scroll;
-	GtkBox *inner_box;
-
-	FolderBrowser *parent_folder_browser;
-	CamelMimeMessage *current_message;
-};
-
-typedef struct {
-	GtkVBoxClass parent_class;
-} MailDisplayClass;
-
-GtkType        mail_display_get_type    (void);
-GtkWidget *    mail_display_new         (FolderBrowser *parent_folder_browser);
-
-void           mail_display_set_message (MailDisplay *mail_display, 
-					 CamelMedium *medium);
-
-
-#define HTML_HEADER "\n\n\n\n\n"
-
-void           mail_html_new            (GtkHTML **html,
-					 GtkHTMLStream **stream,
-					 CamelMimeMessage *root,
-					 gboolean init);
-void           mail_html_write          (GtkHTML *html,
-					 GtkHTMLStream *stream,
-					 const char *format, ...);
-void           mail_html_end            (GtkHTML *html,
-					 GtkHTMLStream *stream,
-					 gboolean finish,
-					 GtkBox *box);
-
-#endif /* _MAIL_DISPLAY_H_ */
diff --git a/mail/mail-format.c b/mail/mail-format.c
deleted file mode 100644
index 429e94f2d0..0000000000
--- a/mail/mail-format.c
+++ /dev/null
@@ -1,1532 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Authors:
- *  Matt Loper 
- *  Dan Winship 
- *
- *  Copyright 2000, Helix Code, Inc. (http://www.helixcode.com)
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  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., 59 Temple Street #330, Boston, MA 02111-1307, USA.
- *
- */
-
-#include 
-#include "mail-display.h"
-#include "mail.h"
-#include "e-util/e-html-utils.h"
-
-#include 
-#include 
-#include 
-#include 
-
-#include     /* for isprint */
-#include    /* for strstr  */
-#include 
-
-static void handle_text_plain            (CamelMimePart *part,
-					  const char *mime_type,
-					  CamelMimeMessage *root,
-					  GtkBox *box);
-static void handle_text_plain_flowed     (CamelMimePart *part,
-					  const char *mime_type,
-					  CamelMimeMessage *root,
-					  GtkBox *box);
-static void handle_text_enriched         (CamelMimePart *part,
-					  const char *mime_type,
-					  CamelMimeMessage *root,
-					  GtkBox *box);
-static void handle_text_html             (CamelMimePart *part,
-					  const char *mime_type,
-					  CamelMimeMessage *root,
-					  GtkBox *box);
-static void handle_image                 (CamelMimePart *part,
-					  const char *mime_type,
-					  CamelMimeMessage *root,
-					  GtkBox *box);
-static void handle_multipart_mixed       (CamelMimePart *part,
-					  const char *mime_type,
-					  CamelMimeMessage *root,
-					  GtkBox *box);
-static void handle_multipart_related     (CamelMimePart *part,
-					  const char *mime_type,
-					  CamelMimeMessage *root,
-					  GtkBox *box);
-static void handle_multipart_alternative (CamelMimePart *part,
-					  const char *mime_type,
-					  CamelMimeMessage *root,
-					  GtkBox *box);
-static void handle_multipart_appledouble (CamelMimePart *part,
-					  const char *mime_type,
-					  CamelMimeMessage *root,
-					  GtkBox *box);
-static void handle_audio                 (CamelMimePart *part,
-					  const char *mime_type,
-					  CamelMimeMessage *root,
-					  GtkBox *box);
-static void handle_message_rfc822        (CamelMimePart *part,
-					  const char *mime_type,
-					  CamelMimeMessage *root,
-					  GtkBox *box);
-static void handle_message_external_body (CamelMimePart *part,
-					  const char *mime_type,
-					  CamelMimeMessage *root,
-					  GtkBox *box);
-
-static void handle_unknown_type          (CamelMimePart *part,
-					  const char *mime_type,
-					  CamelMimeMessage *root,
-					  GtkBox *box);
-static void handle_via_bonobo            (CamelMimePart *part,
-					  const char *mime_type,
-					  CamelMimeMessage *root,
-					  GtkBox *box);
-
-/* writes the header info for a mime message into an html stream */
-static void write_headers (CamelMimeMessage *mime_message, GtkBox *box);
-
-/* dispatch html printing via mimetype */
-static void call_handler_function (CamelMimePart *part,
-				   CamelMimeMessage *root,
-				   GtkBox *box);
-
-
-/**
- * mail_format_mime_message: 
- * @mime_message: the input mime message
- * @box: GtkBox to stack elements into.
- *
- * Writes a CamelMimeMessage out, as a series of GtkHTML objects,
- * into the provided box.
- **/
-void
-mail_format_mime_message (CamelMimeMessage *mime_message, GtkBox *box)
-{
-	g_return_if_fail (CAMEL_IS_MIME_MESSAGE (mime_message));
-	g_return_if_fail (GTK_IS_BOX (box));
-
-	write_headers (mime_message, box);
-	call_handler_function (CAMEL_MIME_PART (mime_message),
-			       mime_message, box);
-}
-
-static char *
-get_cid (CamelMimePart *part, CamelMimeMessage *root)
-{
-	CamelDataWrapper *wrapper =
-		camel_medium_get_content_object (CAMEL_MEDIUM (part));
-	char *cid;
-	const char *filename;
-
-	/* If we have a real Content-ID, use it. If we don't,
-	 * make a (syntactically invalid) fake one.
-	 */
-	if (camel_mime_part_get_content_id (part))
-		cid = g_strdup (camel_mime_part_get_content_id (part));
-	else
-		cid = g_strdup_printf ("@@@%p", wrapper);
-
-	gtk_object_set_data (GTK_OBJECT (root), cid, wrapper);
-
-	/* Record the filename, in case the user wants to save this
-	 * data later.
-	 */
-	filename = camel_mime_part_get_filename (part);
-	if (filename) {
-		char *safe, *p;
-
-		safe = strrchr (filename, '/');
-		if (safe)
-			safe = g_strdup (safe + 1);
-		else
-			safe = g_strdup (filename);
-
-		for (p = safe; *p; p++) {
-			if (!isascii ((unsigned char)*p) ||
-			    strchr (" /'\"`&();|<>${}!", *p))
-				*p = '_';
-		}
-
-		gtk_object_set_data (GTK_OBJECT (wrapper), "filename", safe);
-	}
-
-	return cid;
-}
-
-
-/* We're maintaining a hashtable of mimetypes -> functions;
- * Those functions have the following signature...
- */
-typedef void (*mime_handler_fn) (CamelMimePart *part, const char *mime_type,
-				 CamelMimeMessage *root, GtkBox *box);
-
-static GHashTable *mime_function_table, *mime_fallback_table;
-
-static void
-setup_function_table (void)
-{
-	mime_function_table = g_hash_table_new (g_str_hash, g_str_equal);
-	mime_fallback_table = g_hash_table_new (g_str_hash, g_str_equal);
-
-	g_hash_table_insert (mime_function_table, "text/plain",
-			     handle_text_plain);
-	g_hash_table_insert (mime_function_table, "text/richtext",
-			     handle_text_enriched);
-	g_hash_table_insert (mime_function_table, "text/enriched",
-			     handle_text_enriched);
-	g_hash_table_insert (mime_function_table, "text/html",
-			     handle_text_html);
-
-	g_hash_table_insert (mime_function_table, "image/*",
-			     handle_image);
-
-	g_hash_table_insert (mime_function_table, "audio/*",
-			     handle_audio);
-
-	g_hash_table_insert (mime_function_table, "message/rfc822",
-			     handle_message_rfc822);
-	g_hash_table_insert (mime_function_table, "message/external-body",
-			     handle_message_external_body);
-
-	g_hash_table_insert (mime_function_table, "multipart/alternative",
-			     handle_multipart_alternative);
-	g_hash_table_insert (mime_function_table, "multipart/related",
-			     handle_multipart_related);
-	g_hash_table_insert (mime_function_table, "multipart/mixed",
-			     handle_multipart_mixed);
-	g_hash_table_insert (mime_function_table, "multipart/appledouble",
-			     handle_multipart_appledouble);
-
-	/* RFC 2046 says unrecognized text subtypes can be treated
-	 * as text/plain (as long as you recognize the character set),
-	 * and unrecognized multipart subtypes as multipart/mixed.
-	 */
-	g_hash_table_insert (mime_fallback_table, "text/*",
-			     handle_text_plain);
-	g_hash_table_insert (mime_function_table, "multipart/*",
-			     handle_multipart_mixed);
-}
-
-static mime_handler_fn
-lookup_handler (const char *mime_type, gboolean *generic)
-{
-	mime_handler_fn handler_function;
-	const char *whole_goad_id, *generic_goad_id;
-	char *mime_type_main;
-
-	if (mime_function_table == NULL)
-		setup_function_table ();
-
-	mime_type_main = g_strdup_printf ("%.*s/*",
-					  (int)strcspn (mime_type, "/"),
-					  mime_type);
-
-	/* OK. There are 6 possibilities, which we try in this order:
-	 *   1) full match in the main table
-	 *   2) partial match in the main table
-	 *   3) full match in bonobo
-	 *   4) full match in the fallback table
-	 *   5) partial match in the fallback table
-	 *   6) partial match in bonobo
-	 *
-	 * Of these, 1-4 are considered exact matches, and 5 and 6 are
-	 * considered generic.
-	 */
-
-	/* Check for full match in mime_function_table. */
-	handler_function = g_hash_table_lookup (mime_function_table,
-						mime_type);
-	if (!handler_function) {
-		handler_function = g_hash_table_lookup (mime_function_table,
-							mime_type_main);
-		if (handler_function) {
-			/* Optimize this for the next time through. */
-			g_hash_table_insert (mime_function_table,
-					     g_strdup (mime_type),
-					     handler_function);
-		}
-	}
-
-	if (handler_function) {
-		g_free (mime_type_main);
-		*generic = FALSE;
-		return handler_function;
-	}
-
-	whole_goad_id = gnome_mime_get_value (mime_type, "bonobo-goad-id");
-	generic_goad_id = gnome_mime_get_value (mime_type_main,
-						"bonobo-goad-id");
-
-	if (whole_goad_id && (!generic_goad_id ||
-			      strcmp (whole_goad_id, generic_goad_id) != 0)) {
-		/* Optimize this for the next time through. */
-		g_hash_table_insert (mime_function_table,
-				     g_strdup (mime_type),
-				     handle_via_bonobo);
-		g_free (mime_type_main);
-		*generic = FALSE;
-		return handle_via_bonobo;
-	}
-
-	handler_function = g_hash_table_lookup (mime_fallback_table,
-						mime_type);
-	if (handler_function)
-		*generic = FALSE;
-	else {
-		handler_function = g_hash_table_lookup (mime_fallback_table,
-							mime_type_main);
-		if (!handler_function && generic_goad_id)
-			handler_function = handle_via_bonobo;
-		*generic = TRUE;
-	}
-
-	g_free (mime_type_main);
-	return handler_function;
-}
-
-static void
-call_handler_function (CamelMimePart *part, CamelMimeMessage *root,
-		       GtkBox *box)
-{
-	CamelDataWrapper *wrapper;
-	char *mime_type;
-	mime_handler_fn handler_function = NULL;
-	gboolean generic;
-
-	wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (part));
-	mime_type = camel_data_wrapper_get_mime_type (wrapper);
-	g_strdown (mime_type);
-
-	handler_function = lookup_handler (mime_type, &generic);
-	if (handler_function)
-		(*handler_function) (part, mime_type, root, box);
-	else
-		handle_unknown_type (part, mime_type, root, box);
-
-	g_free (mime_type);
-}
-
-static void
-write_field_to_stream (const char *description, const char *value,
-		       gboolean bold, GtkHTML *html,
-		       GtkHTMLStream *stream)
-{
-	char *encoded_value;
-
-	if (value) {
-		unsigned char *p;
-
-		encoded_value = e_text_to_html (value,
-						E_TEXT_TO_HTML_CONVERT_NL |
-						E_TEXT_TO_HTML_CONVERT_URLS);
-		for (p = (unsigned char *)encoded_value; *p; p++) {
-			if (!isprint (*p))
-				*p = '?';
-		}
-	} else
-		encoded_value = "";
-
-	mail_html_write (html, stream,
-			 "<%s align=right>%s"
-			 "%s", bold ? "th" : "td",
-			 description, bold ? "th" : "td", encoded_value);
-	if (value)
-		g_free (encoded_value);
-}
-
-static void
-write_recipients_to_stream (const gchar *recipient_type,
-			    const CamelInternetAddress *recipients,
-			    gboolean optional, gboolean bold,
-			    GtkHTML *html, GtkHTMLStream *stream)
-{
-	int i;
-	char *recipients_string = NULL;
-	const char *name, *addr;
-
-	i = 0;
-	while (camel_internet_address_get (recipients, i++, &name, &addr)) {
-		char *old_string = recipients_string;
-
-		if (*name) {
-			recipients_string = g_strdup_printf (
-				"%s%s\"%s\" <%s>",
-				old_string ? old_string : "",
-				old_string ? ", " : "",
-				name, addr);
-		} else {
-			recipients_string = g_strdup_printf (
-				"%s%s%s", old_string ? old_string : "",
-				old_string ? ", " : "", addr);
-		}
-		g_free (old_string);
-	}
-
-	if (recipients_string || !optional) {
-		write_field_to_stream (recipient_type, recipients_string,
-				       bold, html, stream);
-	}
-	g_free (recipients_string);
-}
-
-
-
-static void
-write_headers (CamelMimeMessage *mime_message, GtkBox *box)
-{
-	const CamelInternetAddress *recipients;
-	GtkHTML *html;
-	GtkHTMLStream *stream;
-
-	mail_html_new (&html, &stream, mime_message, FALSE);
-	mail_html_write (html, stream, "%s%s", HTML_HEADER,
-			 "\n");
-
-	mail_html_write (html, stream, "");
-
-	/* A few fields will probably be available from the mime_message;
-	 * for each one that's available, write it to the output stream
-	 * with a helper function, 'write_field_to_stream'.
-	 */
-
-	write_field_to_stream ("From:",
-			       camel_mime_message_get_from (mime_message),
-			       TRUE, html, stream);
-
-	if (camel_mime_message_get_reply_to (mime_message)) {
-		write_field_to_stream ("Reply-To:",
-				       camel_mime_message_get_reply_to (mime_message),
-				       FALSE, html, stream);
-	}
-
-	write_recipients_to_stream ("To:",
-				    camel_mime_message_get_recipients (mime_message, CAMEL_RECIPIENT_TYPE_TO),
-				    FALSE, TRUE, html, stream);
-
-	recipients = camel_mime_message_get_recipients (mime_message, CAMEL_RECIPIENT_TYPE_CC);
-	write_recipients_to_stream ("Cc:", recipients, TRUE, TRUE,
-				    html, stream);
-	write_field_to_stream ("Subject:",
-			       camel_mime_message_get_subject (mime_message),
-			       TRUE, html, stream);
-
-	mail_html_write (html, stream, "
"); - - mail_html_end (html, stream, TRUE, box); -} - -#define MIME_TYPE_WHOLE(a) (gmime_content_field_get_mime_type ( \ - camel_mime_part_get_content_type (CAMEL_MIME_PART (a)))) -#define MIME_TYPE_MAIN(a) ((camel_mime_part_get_content_type (CAMEL_MIME_PART (a)))->type) -#define MIME_TYPE_SUB(a) ((camel_mime_part_get_content_type (CAMEL_MIME_PART (a)))->subtype) - - -static char * -get_data_wrapper_text (CamelDataWrapper *data) -{ - CamelStream *memstream; - GByteArray *ba; - char *text; - - ba = g_byte_array_new (); - memstream = camel_stream_mem_new_with_byte_array (ba); - - camel_data_wrapper_write_to_stream (data, memstream); - text = g_malloc (ba->len + 1); - memcpy (text, ba->data, ba->len); - text[ba->len] = '\0'; - - gtk_object_unref (GTK_OBJECT (memstream)); - return text; -} - -/*----------------------------------------------------------------------* - * Mime handling functions - *----------------------------------------------------------------------*/ - -static void -handle_text_plain (CamelMimePart *part, const char *mime_type, - CamelMimeMessage *root, GtkBox *box) -{ - GtkHTML *html; - GtkHTMLStream *stream; - CamelDataWrapper *wrapper = - camel_medium_get_content_object (CAMEL_MEDIUM (part)); - char *text, *htmltext; - GMimeContentField *type; - const char *format; - - mail_html_new (&html, &stream, root, TRUE); - mail_html_write (html, stream, "\n\n
\n");
-
-	/* Check for RFC 2646 flowed text. */
-	type = camel_mime_part_get_content_type (part);
-	format = gmime_content_field_get_parameter (type, "format");
-	if (format && !g_strcasecmp (format, "flowed")) {
-		handle_text_plain_flowed (part, mime_type, root, box);
-		return;
-	}
-
-	text = get_data_wrapper_text (wrapper);
-	if (text && *text) {
-		htmltext = e_text_to_html (text, E_TEXT_TO_HTML_CONVERT_URLS);
-		mail_html_write (html, stream, "%s", htmltext);
-		g_free (htmltext);
-	} else
-		mail_html_write (html, stream, "(empty)");
-	g_free (text);
-
-	mail_html_write (html, stream, "
\n"); - mail_html_end (html, stream, TRUE, box); -} - -static void -handle_text_plain_flowed (CamelMimePart *part, const char *mime_type, - CamelMimeMessage *root, GtkBox *box) -{ - GtkHTML *html; - GtkHTMLStream *stream; - CamelDataWrapper *wrapper = - camel_medium_get_content_object (CAMEL_MEDIUM (part)); - char *buf, *text, *line, *eol, *p; - int prevquoting = 0, quoting, len; - gboolean br_pending = FALSE; - - mail_html_new (&html, &stream, root, TRUE); - mail_html_write (html, stream, - "\n\n\n"); - - buf = get_data_wrapper_text (wrapper); - for (line = buf; *line; line = eol + 1) { - /* Process next line */ - eol = strchr (line, '\n'); - if (eol) - *eol = '\0'; - - quoting = 0; - for (p = line; *p == '>'; p++) - quoting++; - if (quoting != prevquoting) { - mail_html_write (html, stream, "%s\n", - prevquoting == 0 ? "\n" : ""); - while (quoting > prevquoting) { - mail_html_write (html, stream, "
"); - prevquoting++; - } - while (quoting < prevquoting) { - mail_html_write (html, stream, - "
"); - prevquoting--; - } - mail_html_write (html, stream, "%s\n", - prevquoting == 0 ? "
\n" : ""); - } else if (br_pending) { - mail_html_write (html, stream, "
\n"); - br_pending = FALSE; - } - - if (*p == ' ') - p++; - - /* replace '<' with '<', etc. */ - text = e_text_to_html (p, E_TEXT_TO_HTML_CONVERT_SPACES | - E_TEXT_TO_HTML_CONVERT_URLS); - if (text && *text) - mail_html_write (html, stream, "%s", text); - g_free (text); - - len = strlen (p); - if (len == 0 || p[len - 1] != ' ' || !strcmp (p, "-- ")) - br_pending = TRUE; - - if (!eol) - break; - } - g_free (buf); - - mail_html_write (html, stream, "
\n"); - mail_html_end (html, stream, TRUE, box); -} - -/* text/enriched (RFC 1896) or text/richtext (included in RFC 1341) */ -static void -handle_text_enriched (CamelMimePart *part, const char *mime_type, - CamelMimeMessage *root, GtkBox *box) -{ - static GHashTable *translations = NULL; - GtkHTML *html; - GtkHTMLStream *stream; - CamelDataWrapper *wrapper = - camel_medium_get_content_object (CAMEL_MEDIUM (part)); - CamelStream *memstream; - GByteArray *ba; - char *p; - int len, nofill = 0; - gboolean enriched; - - if (!translations) { - translations = g_hash_table_new (g_strcase_hash, - g_strcase_equal); - g_hash_table_insert (translations, "bold", ""); - g_hash_table_insert (translations, "/bold", ""); - g_hash_table_insert (translations, "italic", ""); - g_hash_table_insert (translations, "/italic", ""); - g_hash_table_insert (translations, "fixed", ""); - g_hash_table_insert (translations, "/fixed", ""); - g_hash_table_insert (translations, "smaller", ""); - g_hash_table_insert (translations, "/smaller", ""); - g_hash_table_insert (translations, "bigger", ""); - g_hash_table_insert (translations, "/bigger", ""); - g_hash_table_insert (translations, "underline", ""); - g_hash_table_insert (translations, "/underline", ""); - g_hash_table_insert (translations, "center", "

"); - g_hash_table_insert (translations, "/center", "

"); - g_hash_table_insert (translations, "flushleft", "

"); - g_hash_table_insert (translations, "/flushleft", "

"); - g_hash_table_insert (translations, "flushright", "

"); - g_hash_table_insert (translations, "/flushright", "

"); - g_hash_table_insert (translations, "excerpt", "
"); - g_hash_table_insert (translations, "/excerpt", "
"); - g_hash_table_insert (translations, "paragraph", "

"); - g_hash_table_insert (translations, "signature", "

"); - g_hash_table_insert (translations, "/signature", "
"); - g_hash_table_insert (translations, "comment", ""); - g_hash_table_insert (translations, "param", ""); - g_hash_table_insert (translations, "np", "
"); - } - - mail_html_new (&html, &stream, root, TRUE); - if (!g_strcasecmp (mime_type, "text/richtext")) { - enriched = FALSE; - mail_html_write (html, stream, "\n\n"); - } else { - enriched = TRUE; - mail_html_write (html, stream, "\n\n"); - } - - ba = g_byte_array_new (); - memstream = camel_stream_mem_new_with_byte_array (ba); - camel_data_wrapper_write_to_stream (wrapper, memstream); - g_byte_array_append (ba, "", 1); - - p = ba->data; - - while (p) { - len = strcspn (p, " <>&\n"); - if (len) - gtk_html_write (html, stream, p, len); - - p += len; - if (!*p) - break; - - switch (*p++) { - case ' ': - while (*p == ' ') { - mail_html_write (html, stream, " "); - p++; - } - mail_html_write (html, stream, " "); - break; - - case '\n': - mail_html_write (html, stream, " "); - if (enriched && nofill <= 0) { - while (*p == '\n') { - mail_html_write (html, stream, "
"); - p++; - } - } - break; - - case '>': - mail_html_write (html, stream, ">"); - break; - - case '&': - mail_html_write (html, stream, "&"); - break; - - case '<': - if (enriched) { - if (*p == '<') { - mail_html_write (html, stream, "<"); - p++; - break; - } - } else { - if (strncmp (p, "lt>", 3) == 0) { - mail_html_write (html, stream, "<"); - p += 3; - break; - } else if (strncmp (p, "nl>", 3) == 0) { - mail_html_write (html, stream, "
"); - p += 3; - break; - } - } - - if (strncmp (p, "nofill>", 7) == 0) { - nofill++; - mail_html_write (html, stream, "
");
-			} else if (strncmp (p, "/nofill>", 8) == 0) {
-				nofill--;
-				mail_html_write (html, stream, "
"); - } else { - char *copy, *match; - - len = strcspn (p, ">"); - copy = g_strndup (p, len); - match = g_hash_table_lookup (translations, - copy); - g_free (copy); - if (match) { - mail_html_write (html, stream, "%s", - match); - } - } - - p = strchr (p, '>'); - if (p) - p++; - } - } - - mail_html_end (html, stream, TRUE, box); -} - -static void -handle_text_html (CamelMimePart *part, const char *mime_type, - CamelMimeMessage *root, GtkBox *box) -{ - GtkHTML *html; - GtkHTMLStream *stream; - CamelDataWrapper *wrapper = - camel_medium_get_content_object (CAMEL_MEDIUM (part)); - char *text; - - mail_html_new (&html, &stream, root, FALSE); - mail_html_write (html, stream, "\n\n"); - - text = get_data_wrapper_text (wrapper); - mail_html_write (html, stream, "%s", text); - g_free (text); - - mail_html_end (html, stream, FALSE, box); -} - -static void -handle_image (CamelMimePart *part, const char *mime_type, - CamelMimeMessage *root, GtkBox *box) -{ - GtkHTML *html; - GtkHTMLStream *stream; - char *cid; - - cid = get_cid (part, root); - mail_html_new (&html, &stream, root, TRUE); - mail_html_write (html, stream, "", cid); - mail_html_end (html, stream, TRUE, box); - g_free (cid); -} - -static void -handle_multipart_mixed (CamelMimePart *part, const char *mime_type, - CamelMimeMessage *root, GtkBox *box) -{ - CamelDataWrapper *wrapper = - camel_medium_get_content_object (CAMEL_MEDIUM (part)); - CamelMultipart *mp; - int i, nparts; - - g_return_if_fail (CAMEL_IS_MULTIPART (wrapper)); - mp = CAMEL_MULTIPART (wrapper); - - nparts = camel_multipart_get_number (mp); - for (i = 0; i < nparts; i++) { - part = camel_multipart_get_part (mp, i); - - call_handler_function (part, root, box); - } -} - -/* As seen in RFC 2387! */ -static void -handle_multipart_related (CamelMimePart *part, const char *mime_type, - CamelMimeMessage *root, GtkBox *box) -{ - CamelDataWrapper *wrapper = - camel_medium_get_content_object (CAMEL_MEDIUM (part)); - CamelMultipart *mp; - CamelMimePart *body_part, *display_part = NULL; - GMimeContentField *content_type; - const char *start; - int i, nparts; - - g_return_if_fail (CAMEL_IS_MULTIPART (wrapper)); - mp = CAMEL_MULTIPART (wrapper); - nparts = camel_multipart_get_number (mp); - - content_type = camel_mime_part_get_content_type (part); - start = gmime_content_field_get_parameter (content_type, "start"); - if (start) { - int len; - - /* The "start" parameter includes <>s, which Content-Id - * does not. - */ - len = strlen (start) - 2; - - for (i = 0; i < nparts; i++) { - const char *cid; - - body_part = camel_multipart_get_part (mp, i); - cid = camel_mime_part_get_content_id (body_part); - - if (!strncmp (cid, start + 1, len) && - strlen (cid) == len) { - display_part = body_part; - break; - } - } - - if (!display_part) { - /* Oops. Hrmph. */ - handle_multipart_mixed (part, mime_type, root, box); - } - } else { - /* No start parameter, so it defaults to the first part. */ - display_part = camel_multipart_get_part (mp, 0); - } - - /* Record the Content-IDs of any non-displayed parts. */ - for (i = 0; i < nparts; i++) { - char *cid; - - body_part = camel_multipart_get_part (mp, i); - if (body_part == display_part) - continue; - - cid = get_cid (body_part, root); - g_free (cid); - } - - /* Now, display the displayed part. */ - call_handler_function (display_part, root, box); -} - -/* RFC 2046 says "display the last part that you are able to display". */ -static CamelMimePart * -find_preferred_alternative (CamelMultipart *multipart) -{ - int i, nparts; - CamelMimePart *preferred_part = NULL; - gboolean generic; - - nparts = camel_multipart_get_number (multipart); - for (i = 0; i < nparts; i++) { - CamelMimePart *part = camel_multipart_get_part (multipart, i); - char *mime_type = gmime_content_field_get_mime_type ( - camel_mime_part_get_content_type (part)); - - g_strdown (mime_type); - if (lookup_handler (mime_type, &generic) && - (!preferred_part || !generic)) - preferred_part = part; - g_free (mime_type); - } - - return preferred_part; -} - -static void -handle_multipart_alternative (CamelMimePart *part, const char *mime_type, - CamelMimeMessage *root, GtkBox *box) -{ - CamelDataWrapper *wrapper = - camel_medium_get_content_object (CAMEL_MEDIUM (part)); - CamelMultipart *multipart; - CamelMimePart *mime_part; - - g_return_if_fail (CAMEL_IS_MULTIPART (wrapper)); - multipart = CAMEL_MULTIPART (wrapper); - - mime_part = find_preferred_alternative (multipart); - if (mime_part) - call_handler_function (mime_part, root, box); - else - handle_unknown_type (part, mime_type, root, box); -} - -/* RFC 1740 */ -static void -handle_multipart_appledouble (CamelMimePart *part, const char *mime_type, - CamelMimeMessage *root, GtkBox *box) -{ - CamelDataWrapper *wrapper = - camel_medium_get_content_object (CAMEL_MEDIUM (part)); - CamelMultipart *multipart; - - g_return_if_fail (CAMEL_IS_MULTIPART (wrapper)); - multipart = CAMEL_MULTIPART (wrapper); - - /* The first part is application/applefile and is not useful - * to us. The second part _may_ be displayable data. Most - * likely it's application/octet-stream though. - */ - part = camel_multipart_get_part (multipart, 1); - call_handler_function (part, root, box); -} - -static void -handle_mystery (CamelMimePart *part, CamelMimeMessage *root, GtkBox *box, - const char *url, const char *icon_name, const char *id, - const char *action) -{ - GtkHTML *html; - GtkHTMLStream *stream; - const char *info; - char *htmlinfo; - GMimeContentField *content_type; - - mail_html_new (&html, &stream, root, TRUE); - mail_html_write (html, stream, "
"); - - /* Draw the icon, surrounded by an if we have a URL, - * or a plain inactive border if not. - */ - if (url) - mail_html_write (html, stream, "", url); - else - mail_html_write (html, stream, "
"); - mail_html_write (html, stream, "", - icon_name); - if (url) - mail_html_write (html, stream, ""); - else - mail_html_write (html, stream, "
"); - mail_html_write (html, stream, "
%s
", id); - - /* Write a description, if we have one. */ - info = camel_mime_part_get_description (part); - if (info) { - htmlinfo = e_text_to_html (info, E_TEXT_TO_HTML_CONVERT_URLS); - mail_html_write (html, stream, "Description: %s
", - htmlinfo); - g_free (htmlinfo); - } - - /* Write the name, if we have it. */ - content_type = camel_mime_part_get_content_type (part); - info = gmime_content_field_get_parameter (content_type, "name"); - if (!info) - info = camel_mime_part_get_filename (part); - if (info) { - htmlinfo = e_text_to_html (info, 0); - mail_html_write (html, stream, "Name: %s
", - htmlinfo); - g_free (htmlinfo); - } - - /* Describe the click action, if any. */ - if (action) { - mail_html_write (html, stream, - "
Click on the icon to %s.", action); - } - - mail_html_write (html, stream, "
"); - mail_html_end (html, stream, TRUE, box); -} - -static void -handle_audio (CamelMimePart *part, const char *mime_type, - CamelMimeMessage *root, GtkBox *box) -{ - char *id, *cid; - const char *desc; - - desc = gnome_mime_get_value (mime_type, "description"); - if (desc) - id = g_strdup_printf ("%s data", desc); - else { - id = g_strdup_printf ("Audio data in \"%s\" format.", - mime_type); - } - cid = g_strdup_printf ("cid:%s", get_cid (part, root)); - handle_mystery (part, root, box, cid, "gnome-audio2.png", - id, "play it"); - g_free (cid); - g_free (id); -} - -static void -handle_message_rfc822 (CamelMimePart *part, const char *mime_type, - CamelMimeMessage *root, GtkBox *box) -{ - CamelDataWrapper *wrapper = - camel_medium_get_content_object (CAMEL_MEDIUM (part)); - GtkWidget *subbox, *frame; - - g_return_if_fail (CAMEL_IS_MIME_MESSAGE (wrapper)); - - subbox = gtk_vbox_new (FALSE, 2); - mail_format_mime_message (CAMEL_MIME_MESSAGE (wrapper), - GTK_BOX (subbox)); - - frame = gtk_frame_new (NULL); - gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN); - gtk_container_set_border_width (GTK_CONTAINER (frame), 8); - gtk_box_pack_start (box, frame, FALSE, FALSE, 0); - gtk_container_add (GTK_CONTAINER (frame), subbox); - gtk_widget_show_all (frame); -} - -static void -handle_message_external_body (CamelMimePart *part, const char *mime_type, - CamelMimeMessage *root, GtkBox *box) -{ - GMimeContentField *type; - const char *access_type; - char *url = NULL, *desc = NULL; - - type = camel_mime_part_get_content_type (part); - access_type = gmime_content_field_get_parameter (type, "access-type"); - if (!access_type) - goto fallback; - - if (!g_strcasecmp (access_type, "ftp") || - !g_strcasecmp (access_type, "anon-ftp")) { - const char *name, *site, *dir, *mode, *ftype; - char *path; - - name = gmime_content_field_get_parameter (type, "name"); - site = gmime_content_field_get_parameter (type, "site"); - if (name == NULL || site == NULL) - goto fallback; - dir = gmime_content_field_get_parameter (type, "directory"); - mode = gmime_content_field_get_parameter (type, "mode"); - - /* Generate the path. */ - if (dir) { - const char *p = dir + strlen (dir); - - path = g_strdup_printf ("%s%s%s%s", - *dir == '/' ? "" : "/", - dir, - *p == '/' ? "" : "/", - name); - } else { - path = g_strdup_printf ("%s%s", - *name == '/' ? "" : "/", - name); - } - - if (mode && *mode == 'A') - ftype = ";type=A"; - else if (mode && *mode == 'I') - ftype = ";type=I"; - else - ftype = ""; - - url = g_strdup_printf ("ftp://%s%s%s", site, path, ftype); - g_free (path); - desc = g_strdup_printf ("Pointer to FTP site (%s)", url); - } else if (!g_strcasecmp (access_type, "local-file")) { - const char *name, *site; - - name = gmime_content_field_get_parameter (type, "name"); - if (name == NULL) - goto fallback; - site = gmime_content_field_get_parameter (type, "site"); - - url = g_strdup_printf ("file://%s%s", *name == '/' ? "" : "/", - name); - desc = g_strdup_printf ("Pointer to local file (%s)%s%s%s", - name, site ? " valid at site \"" : "", - site ? site : "", site ? "\"" : ""); - } else if (!g_strcasecmp (access_type, "URL")) { - const char *urlparam; - char *s, *d; - - /* RFC 2017 */ - - urlparam = gmime_content_field_get_parameter (type, "url"); - if (urlparam == NULL) - goto fallback; - - /* For obscure MIMEy reasons, the URL may be split into - * multiple words, and needs to be rejoined. (The URL - * must have any real whitespace %-encoded, so we just - * get rid of all of it. - */ - url = g_strdup (urlparam); - s = d = url; - - while (*s) { - if (!isspace ((unsigned char)*s)) - *d++ = *s; - s++; - } - *d = *s; - - desc = g_strdup_printf ("Pointer to remote data (%s)", url); - } - - fallback: - if (!desc) { - if (access_type) { - desc = g_strdup_printf ("Pointer to unknown external " - "data (\"%s\" type)", - access_type); - } else - desc = g_strdup ("Malformed external-body part."); - } - - handle_mystery (part, root, box, url, "gnome-globe.png", desc, - url ? "open it in a browser" : NULL); - - g_free (desc); - g_free (url); -} - -static void -handle_undisplayable (CamelMimePart *part, const char *mime_type, - CamelMimeMessage *root, GtkBox *box) -{ - const char *desc; - char *id, *cid; - - desc = gnome_mime_get_value (mime_type, "description"); - if (desc) - id = g_strdup (desc); - else - id = g_strdup_printf ("Data of type \"%s\".", mime_type); - cid = g_strdup_printf ("cid:%s", get_cid (part, root)); - handle_mystery (part, root, box, cid, "gnome-question.png", id, - "save it to disk"); - g_free (cid); - g_free (id); -} - -static void -handle_unknown_type (CamelMimePart *part, const char *mime_type, - CamelMimeMessage *root, GtkBox *box) -{ - char *type; - - /* Don't give up quite yet. */ - type = mail_identify_mime_part (part); - if (type) { - mime_handler_fn handler_function; - gboolean generic; - - handler_function = lookup_handler (type, &generic); - if (handler_function && - handler_function != handle_unknown_type) { - (*handler_function) (part, type, root, box); - g_free (type); - return; - } - } else - type = g_strdup (mime_type); - - /* OK. Give up. */ - handle_undisplayable (part, type, root, box); - g_free (type); -} - -static void -embeddable_destroy_cb (GtkObject *obj, gpointer user_data) -{ - BonoboWidget *be; /* bonobo embeddable */ - BonoboViewFrame *vf; /* the embeddable view frame */ - BonoboObjectClient* server; - CORBA_Environment ev; - - be = BONOBO_WIDGET (obj); - server = bonobo_widget_get_server (be); - - vf = bonobo_widget_get_view_frame (be); - bonobo_control_frame_control_deactivate ( - BONOBO_CONTROL_FRAME (vf)); - /* w = bonobo_control_frame_get_widget (BONOBO_CONTROL_FRAME (vf)); */ - - /* gtk_widget_destroy (w); */ - - CORBA_exception_init (&ev); - Bonobo_Unknown_unref ( - bonobo_object_corba_objref (BONOBO_OBJECT(server)), &ev); - CORBA_Object_release ( - bonobo_object_corba_objref (BONOBO_OBJECT(server)), &ev); - - CORBA_exception_free (&ev); - bonobo_object_unref (BONOBO_OBJECT (vf)); -} - -static void -handle_via_bonobo (CamelMimePart *part, const char *mime_type, - CamelMimeMessage *root, GtkBox *box) -{ - CamelDataWrapper *wrapper = - camel_medium_get_content_object (CAMEL_MEDIUM (part)); - const char *goad_id; - GtkWidget *embedded; - BonoboObjectClient *server; - Bonobo_PersistStream persist; - CORBA_Environment ev; - GByteArray *ba; - CamelStream *cstream; - BonoboStream *bstream; - - goad_id = gnome_mime_get_value (mime_type, "bonobo-goad-id"); - - if (!goad_id) { - char *main_type = g_strndup (mime_type, - strcspn (mime_type, "/")); - - goad_id = gnome_mime_get_value (main_type, - "bonobo-goad-id"); - g_free (main_type); - } - if (!goad_id) { - handle_undisplayable (part, mime_type, root, box); - return; - } - - embedded = bonobo_widget_new_subdoc (goad_id, NULL); - if (!embedded) { - handle_undisplayable (part, mime_type, root, box); - return; - } - server = bonobo_widget_get_server (BONOBO_WIDGET (embedded)); - - persist = (Bonobo_PersistStream) bonobo_object_client_query_interface ( - server, "IDL:Bonobo/PersistStream:1.0", NULL); - if (persist == CORBA_OBJECT_NIL) { - bonobo_object_unref (BONOBO_OBJECT (embedded)); - handle_undisplayable (part, mime_type, root, box); - return; - } - - /* Write the data to a CamelStreamMem... */ - ba = g_byte_array_new (); - cstream = camel_stream_mem_new_with_byte_array (ba); - camel_data_wrapper_write_to_stream (wrapper, cstream); - - /* ...convert the CamelStreamMem to a BonoboStreamMem... */ - bstream = bonobo_stream_mem_create (ba->data, ba->len, TRUE, FALSE); - gtk_object_unref (GTK_OBJECT (cstream)); - - /* ...and hydrate the PersistStream from the BonoboStream. */ - CORBA_exception_init (&ev); - Bonobo_PersistStream_load (persist, - bonobo_object_corba_objref ( - BONOBO_OBJECT (bstream)), - mime_type, &ev); - bonobo_object_unref (BONOBO_OBJECT (bstream)); - Bonobo_Unknown_unref (persist, &ev); - CORBA_Object_release (persist, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) { - bonobo_object_unref (BONOBO_OBJECT (embedded)); - CORBA_exception_free (&ev); - handle_undisplayable (part, mime_type, root, box); - return; - } - CORBA_exception_free (&ev); - - /* Embed the widget. */ - gtk_widget_show (embedded); - gtk_box_pack_start (box, embedded, FALSE, FALSE, 0); - gtk_signal_connect (GTK_OBJECT (embedded), "destroy", - embeddable_destroy_cb, NULL); -} - - -static char * -reply_body (CamelDataWrapper *data, gboolean *html) -{ - CamelMultipart *mp; - CamelMimePart *subpart; - int i, nparts; - char *subtext, *old; - const char *boundary, *disp; - char *text = NULL; - GMimeContentField *mime_type; - - /* We only include text, message, and multipart bodies. */ - mime_type = camel_data_wrapper_get_mime_type_field (data); - - /* FIXME: This is wrong. We don't want to include large - * images. But if we don't do it this way, we don't get - * the headers... - */ - if (g_strcasecmp (mime_type->type, "message") == 0) { - *html = FALSE; - return get_data_wrapper_text (data); - } - - if (g_strcasecmp (mime_type->type, "text") == 0) { - *html = !g_strcasecmp (mime_type->subtype, "html"); - return get_data_wrapper_text (data); - } - - /* If it's not message and it's not text, and it's not - * multipart, we don't want to deal with it. - */ - if (g_strcasecmp (mime_type->type, "multipart") != 0) - return NULL; - - mp = CAMEL_MULTIPART (data); - - if (g_strcasecmp (mime_type->subtype, "alternative") == 0) { - /* Pick our favorite alternative and reply to it. */ - - subpart = find_preferred_alternative (mp); - if (!subpart) - return NULL; - - data = camel_medium_get_content_object ( - CAMEL_MEDIUM (subpart)); - return reply_body (data, html); - } - - nparts = camel_multipart_get_number (mp); - - /* Otherwise, concatenate all the parts that we can. If we find - * an HTML part in there though, return just that: We don't want - * to deal with merging HTML and non-HTML parts. - */ - boundary = camel_multipart_get_boundary (mp); - for (i = 0; i < nparts; i++) { - subpart = camel_multipart_get_part (mp, i); - - disp = camel_mime_part_get_disposition (subpart); - if (disp && g_strcasecmp (disp, "inline") != 0) - continue; - - data = camel_medium_get_content_object ( - CAMEL_MEDIUM (subpart)); - subtext = reply_body (data, html); - if (!subtext) - continue; - if (*html) { - g_free (text); - return subtext; - } - - if (text) { - old = text; - text = g_strdup_printf ("%s\n--%s\n%s", text, - boundary, subtext); - g_free (subtext); - g_free (old); - } else - text = subtext; - } - - if (!text) - return NULL; - - return text; -} - -EMsgComposer * -mail_generate_reply (CamelMimeMessage *message, gboolean to_all) -{ - CamelDataWrapper *contents; - char *text, *subject; - EMsgComposer *composer; - gboolean html; - const char *repl_to, *message_id, *references; - GList *to, *cc; - - contents = camel_medium_get_content_object (CAMEL_MEDIUM (message)); - text = reply_body (contents, &html); - - composer = E_MSG_COMPOSER (e_msg_composer_new ()); - - /* Set the quoted reply text. */ - if (text) { - char *repl_text; - - if (html) { - repl_text = g_strdup_printf ("
\n%s\n" - "
\n", - text); - } else { - char *s, *d, *quoted_text; - int lines, len; - - /* Count the number of lines in the body. If - * the text ends with a \n, this will be one - * too high, but that's ok. Allocate enough - * space for the text and the "> "s. - */ - for (s = text, lines = 0; s; s = strchr (s + 1, '\n')) - lines++; - quoted_text = g_malloc (strlen (text) + lines * 2); - - s = text; - d = quoted_text; - - /* Copy text to quoted_text line by line, - * prepending "> ". - */ - while (1) { - len = strcspn (s, "\n"); - if (len == 0 && !*s) - break; - sprintf (d, "> %.*s\n", len, s); - s += len; - if (!*s++) - break; - d += len + 3; - } - - /* Now convert that to HTML. */ - repl_text = e_text_to_html (quoted_text, - E_TEXT_TO_HTML_PRE); - g_free (quoted_text); - } - e_msg_composer_set_body_text (composer, repl_text); - g_free (repl_text); - g_free (text); - } - - /* Set the recipients */ - repl_to = camel_mime_message_get_reply_to (message); - if (!repl_to) - repl_to = camel_mime_message_get_from (message); - to = g_list_append (NULL, (gpointer)repl_to); - - if (to_all) { - const CamelInternetAddress *recip; - const char *name, *addr; - char *fulladdr; - int i; - - recip = camel_mime_message_get_recipients (message, - CAMEL_RECIPIENT_TYPE_TO); - i = 0; - cc = NULL; - while (camel_internet_address_get (recip, i++, &name, &addr)) { - fulladdr = g_strdup_printf ("%s <%s>", name, addr); - cc = g_list_append (cc, fulladdr); - } - - recip = camel_mime_message_get_recipients (message, - CAMEL_RECIPIENT_TYPE_CC); - i = 0; - while (camel_internet_address_get (recip, i++, &name, &addr)) { - fulladdr = g_strdup_printf ("%s <%s>", name, addr); - cc = g_list_append (cc, fulladdr); - } - } else - cc = NULL; - - /* Set the subject of the new message. */ - subject = (char *)camel_mime_message_get_subject (message); - if (!subject) - subject = g_strdup (""); - else if (!strncasecmp (subject, "Re: ", 4)) - subject = g_strdup (subject); - else - subject = g_strdup_printf ("Re: %s", subject); - - e_msg_composer_set_headers (composer, to, cc, NULL, subject); - g_list_free (to); - g_list_free (cc); - g_free (subject); - - /* Add In-Reply-To and References. */ - message_id = camel_medium_get_header (CAMEL_MEDIUM (message), - "Message-Id"); - references = camel_medium_get_header (CAMEL_MEDIUM (message), - "References"); - if (message_id) { - e_msg_composer_add_header (composer, "In-Reply-To", - message_id); - if (references) { - char *reply_refs; - reply_refs = g_strdup_printf ("%s %s", references, - message_id); - e_msg_composer_add_header (composer, "References", - reply_refs); - g_free (reply_refs); - } - } else if (references) - e_msg_composer_add_header (composer, "References", references); - - return composer; -} - -/* This is part of the temporary kludge below. */ -#ifndef HAVE_MKSTEMP -#include -#include -#endif - -EMsgComposer * -mail_generate_forward (CamelMimeMessage *mime_message, - gboolean forward_as_attachment, - gboolean keep_attachments) -{ - EMsgComposer *composer; - char *tmpfile; - int fd; - CamelStream *stream; - - if (!forward_as_attachment) - g_warning ("Forward as non-attachment not implemented."); - if (!keep_attachments) - g_warning ("Forwarding without attachments not implemented."); - - /* For now, we kludge by writing out a temp file. Later, - * EMsgComposer will support attaching CamelMimeParts directly, - * or something. FIXME. - */ - tmpfile = g_strdup ("/tmp/evolution-kludge-XXXX"); -#ifdef HAVE_MKSTEMP - fd = mkstemp (tmpfile); -#else - if (mktemp (tmpfile)) { - fd = open (tmpfile, O_RDWR | O_CREAT | O_EXCL, - S_IRUSR | S_IWUSR); - } else - fd = -1; -#endif - if (fd == -1) { - g_warning ("Couldn't create temp file for forwarding"); - g_free (tmpfile); - return NULL; - } - - stream = camel_stream_fs_new_with_fd (fd); - camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (mime_message), stream); - camel_stream_flush (stream); - gtk_object_unref (GTK_OBJECT (stream)); - - composer = E_MSG_COMPOSER (e_msg_composer_new ()); - e_msg_composer_attachment_bar_attach (E_MSG_COMPOSER_ATTACHMENT_BAR (composer->attachment_bar), tmpfile); - g_free (tmpfile); - - /* FIXME: should we default a subject? */ - - return composer; -} diff --git a/mail/mail-identify.c b/mail/mail-identify.c deleted file mode 100644 index 8b8e61487d..0000000000 --- a/mail/mail-identify.c +++ /dev/null @@ -1,80 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -/* - * Author : - * Dan Winship - * - * Copyright 2000, Helix Code, Inc. (http://www.helixcode.com) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Street #330, Boston, MA 02111-1307, USA. - * - */ - -#include - -#include -#include - -#include -#include -#include "mail.h" - -/** - * mail_identify_mime_part: - * @part: a CamelMimePart - * - * Try to identify the MIME type of the data in @part (which presumably - * doesn't have a useful Content-Type). - **/ -char * -mail_identify_mime_part (CamelMimePart *part) -{ - GMimeContentField *content_type; - const char *filename, *type; - - content_type = camel_mime_part_get_content_type (part); - - - /* Try identifying based on name in Content-Type or - * filename in Content-Disposition. - */ - filename = gmime_content_field_get_parameter (content_type, "name"); - if (filename) { - type = gnome_mime_type_or_default (filename, NULL); - if (type) - return g_strdup (type); - } - - filename = camel_mime_part_get_filename (part); - if (filename) { - type = gnome_mime_type_or_default (filename, NULL); - if (type) - return g_strdup (type); - } - - - /* Try file magic. */ - /* FIXME */ - - - /* Another possibility to try is the x-mac-type / x-mac-creator - * parameter to Content-Type used by some Mac email clients. That - * would require a Mac type to mime type conversion table. - */ - - - /* We give up. */ - return NULL; -} diff --git a/mail/mail-ops.c b/mail/mail-ops.c deleted file mode 100644 index 150231297e..0000000000 --- a/mail/mail-ops.c +++ /dev/null @@ -1,607 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* mail-ops.c: callbacks for the mail toolbar/menus */ - -/* - * Author : - * Dan Winship - * - * Copyright 2000 Helix Code, Inc. (http://www.helixcode.com) - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ - -#include -#include -#include -#include "mail.h" -#include "folder-browser.h" -#include "e-util/e-setup.h" -#include "filter/filter-editor.h" -#include "filter/filter-driver.h" - -/* FIXME: is there another way to do this? */ -#include "Evolution.h" -#include "evolution-storage.h" - -#ifndef HAVE_MKSTEMP -#include -#include -#endif - -static void -mail_exception_dialog (char *head, CamelException *ex, gpointer widget) -{ - char *msg; - GtkWindow *window = - GTK_WINDOW (gtk_widget_get_ancestor (widget, GTK_TYPE_WINDOW)); - - msg = g_strdup_printf ("%s:\n%s", head, - camel_exception_get_description (ex)); - gnome_error_dialog_parented (msg, window); - g_free (msg); -} - -static gboolean -check_configured (void) -{ - char *path; - gboolean configured; - - path = g_strdup_printf ("=%s/config=/mail/configured", evolution_dir); - if (gnome_config_get_bool (path)) { - g_free (path); - return TRUE; - } - - mail_config_druid (); - - configured = gnome_config_get_bool (path); - g_free (path); - return configured; -} - -/* FIXME: This is BROKEN! It fetches mail into whatever folder you're - * currently viewing. - */ -void -fetch_mail (GtkWidget *button, gpointer user_data) -{ - FolderBrowser *fb = FOLDER_BROWSER (user_data); - CamelException *ex; - CamelStore *store = NULL; - CamelFolder *folder = NULL; - char *path, *url = NULL; - FilterDriver *filter = NULL; - char *userrules, *systemrules; - char *tmp_mbox = NULL, *source; - - if (!check_configured ()) - return; - - path = g_strdup_printf ("=%s/config=/mail/source", evolution_dir); - url = gnome_config_get_string (path); - g_free (path); - if (!url) { - GtkWidget *win = gtk_widget_get_ancestor (GTK_WIDGET (fb), - GTK_TYPE_WINDOW); - - gnome_error_dialog_parented ("You have no remote mail source " - "configured", GTK_WINDOW (win)); - return; - } - - path = CAMEL_SERVICE (fb->folder->parent_store)->url->path; - ex = camel_exception_new (); - - tmp_mbox = g_strdup_printf ("%s/movemail", path); - - /* If fetching mail from an mbox store, safely copy it to a - * temporary store first. - */ - if (!strncmp (url, "mbox:", 5)) { - int tmpfd; - - printf("moving from a local mbox\n"); - - tmpfd = open (tmp_mbox, O_RDWR | O_CREAT | O_APPEND, S_IRUSR | S_IWUSR); - - if (tmpfd == -1) { - camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, - "Couldn't create temporary " - "mbox: %s", g_strerror (errno)); - mail_exception_dialog ("Unable to move mail", ex, fb); - goto cleanup; - } - close (tmpfd); - - /* Skip over "mbox:" plus host part (if any) of url. */ - source = url + 5; - if (!strncmp (source, "//", 2)) - source = strchr (source + 2, '/'); - - switch (camel_movemail (source, tmp_mbox, ex)) { - case -1: - mail_exception_dialog ("Unable to move mail", ex, fb); - /* FALL THROUGH */ - - case 0: - goto cleanup; - } - - folder = camel_store_get_folder (fb->folder->parent_store, - strrchr (tmp_mbox, '/') + 1, - ex); - camel_folder_open (folder, FOLDER_OPEN_READ, ex); - - if (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE) { - mail_exception_dialog ("Unable to move mail", ex, fb); - goto cleanup; - } - } else { - CamelFolder *sourcefolder; - - store = camel_session_get_store (session, url, ex); - if (!store) { - mail_exception_dialog ("Unable to get new mail", ex, fb); - goto cleanup; - } - camel_service_connect_with_url (CAMEL_SERVICE (store), - url, ex); - if (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE) { - if (camel_exception_get_id (ex) != CAMEL_EXCEPTION_USER_CANCEL) - mail_exception_dialog ("Unable to get new mail", ex, fb); - goto cleanup; - } - - sourcefolder = camel_store_get_folder (store, "inbox", ex); - camel_folder_open (sourcefolder, FOLDER_OPEN_READ, ex); - if (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE) { - mail_exception_dialog ("Unable to get new mail", ex, fb); - goto cleanup; - } - - /* can we perform filtering on this source? */ - if (!(sourcefolder->has_summary_capability - && sourcefolder->has_search_capability)) { - GPtrArray *uids; - int i; - - printf("folder isn't searchable, performing movemail ...\n"); - - folder = camel_store_get_folder (fb->folder->parent_store, - strrchr (tmp_mbox, '/') + 1, - ex); - - if (!camel_folder_exists(folder, ex)) { - camel_folder_create(folder, ex); - } - - camel_folder_open(folder, FOLDER_OPEN_RW, ex); - - if (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE) { - mail_exception_dialog ("Unable to move mail", ex, fb); - goto cleanup; - } - - uids = camel_folder_get_uids (sourcefolder, ex); - printf("got %d messages in source\n", uids->len); - for (i = 0; i < uids->len; i++) { - CamelMimeMessage *msg; - printf("copying message %d to dest\n", i + 1); - msg = camel_folder_get_message_by_uid (sourcefolder, uids->pdata[i], ex); - if (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE) { - mail_exception_dialog ("Unable to read message", ex, fb); - gtk_object_unref((GtkObject *)msg); - gtk_object_unref((GtkObject *)sourcefolder); - goto cleanup; - } - - camel_folder_append_message (folder, msg, ex); - if (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE) { - mail_exception_dialog ("Unable to write message", ex, fb); - gtk_object_unref((GtkObject *)msg); - gtk_object_unref((GtkObject *)sourcefolder); - goto cleanup; - } - - camel_folder_delete_message_by_uid(sourcefolder, uids->pdata[i], ex); - gtk_object_unref((GtkObject *)msg); - } - camel_folder_free_uids (sourcefolder, uids); - gtk_object_unref((GtkObject *)sourcefolder); - } else { - printf("we can search on this folder, performing search!\n"); - folder = sourcefolder; - } - } - - /* apply filtering rules to this inbox */ - filter = filter_driver_new(); - userrules = g_strdup_printf ("%s/filters.xml", evolution_dir); - systemrules = g_strdup_printf("%s/evolution/filtertypes.xml", EVOLUTION_DATADIR); - filter_driver_set_rules(filter, systemrules, userrules); - filter_driver_set_session(filter, session); - g_free(userrules); - g_free(systemrules); - - if (filter_driver_run(filter, folder, fb->folder) == -1) { - mail_exception_dialog ("Unable to get new mail", ex, fb); - goto cleanup; - } - - /* Redisplay. Ick. FIXME */ - path = g_strdup_printf ("file://%s", path); - folder_browser_set_uri (fb, path); - g_free (path); - - cleanup: - g_free(tmp_mbox); - - if (filter) - gtk_object_unref((GtkObject *)filter); - if (url) - g_free (url); - if (folder) { - if (camel_folder_is_open (folder)) - camel_folder_close (folder, TRUE, ex); - gtk_object_unref (GTK_OBJECT (folder)); - } - if (store) { - camel_service_disconnect (CAMEL_SERVICE (store), ex); - gtk_object_unref (GTK_OBJECT (store)); - } - camel_exception_free (ex); -} - - -struct post_send_data { - CamelMimeMessage *message; - guint32 flags; -}; - -static void -composer_send_cb (EMsgComposer *composer, gpointer data) -{ - static CamelTransport *transport = NULL; - struct post_send_data *psd = data; - static char *from = NULL; - CamelException *ex; - CamelMimeMessage *message; - char *name, *addr, *path; - - ex = camel_exception_new (); - - if (!from) { - CamelInternetAddress *ciaddr; - - path = g_strdup_printf ("=%s/config=/mail/id_name", - evolution_dir); - name = gnome_config_get_string (path); - g_assert (name); - g_free (path); - path = g_strdup_printf ("=%s/config=/mail/id_addr", - evolution_dir); - addr = gnome_config_get_string (path); - g_assert (addr); - g_free (path); - - ciaddr = camel_internet_address_new (); - camel_internet_address_add (ciaddr, name, addr); - - from = camel_address_encode (CAMEL_ADDRESS (ciaddr)); - } - - if (!transport) { - char *url; - - path = g_strdup_printf ("=%s/config=/mail/transport", - evolution_dir); - url = gnome_config_get_string (path); - g_assert (url); - g_free (path); - - transport = camel_session_get_transport (session, url, ex); - if (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE) { - mail_exception_dialog ("Could not load mail transport", - ex, composer); - camel_exception_free (ex); - goto free_psd; - } - } - - message = e_msg_composer_get_message (composer); - gtk_object_destroy (GTK_OBJECT (composer)); - - camel_mime_message_set_from (message, from); - camel_medium_add_header (CAMEL_MEDIUM (message), "X-Mailer", - "Evolution (Developer Preview)"); - camel_mime_message_set_date (message, CAMEL_MESSAGE_DATE_CURRENT, 0); - - camel_service_connect (CAMEL_SERVICE (transport), ex); - if (!camel_exception_is_set (ex)) - camel_transport_send (transport, CAMEL_MEDIUM (message), ex); - if (!camel_exception_is_set (ex)) - camel_service_disconnect (CAMEL_SERVICE (transport), ex); - if (camel_exception_is_set (ex)) - mail_exception_dialog ("Could not send message", ex, composer); - else if (psd) { - guint32 set; - - set = camel_mime_message_get_flags (psd->message); - camel_mime_message_set_flags (psd->message, psd->flags, ~set); - } - - camel_exception_free (ex); - gtk_object_unref (GTK_OBJECT (message)); - - free_psd: - if (psd) { - gtk_object_unref (GTK_OBJECT (psd->message)); - g_free (psd); - } -} - - -void -send_msg (GtkWidget *widget, gpointer user_data) -{ - GtkWidget *composer; - - if (!check_configured ()) - return; - - composer = e_msg_composer_new (); - - gtk_signal_connect (GTK_OBJECT (composer), "send", - GTK_SIGNAL_FUNC (composer_send_cb), NULL); - gtk_widget_show (composer); -} - -/* Send according to a mailto (RFC 2368) URL. */ -void -send_to_url (const char *url) -{ - GtkWidget *composer; - - if (!check_configured ()) - return; - - composer = e_msg_composer_new_from_url (url); - - gtk_signal_connect (GTK_OBJECT (composer), "send", - GTK_SIGNAL_FUNC (composer_send_cb), NULL); - gtk_widget_show (composer); -} - -static void -reply (FolderBrowser *fb, gboolean to_all) -{ - EMsgComposer *composer; - struct post_send_data *psd; - - if (!check_configured ()) - return; - - psd = g_new (struct post_send_data, 1); - psd->message = fb->mail_display->current_message; - gtk_object_ref (GTK_OBJECT (psd->message)); - psd->flags = CAMEL_MESSAGE_ANSWERED; - - composer = mail_generate_reply (psd->message, to_all); - - gtk_signal_connect (GTK_OBJECT (composer), "send", - GTK_SIGNAL_FUNC (composer_send_cb), psd); - - gtk_widget_show (GTK_WIDGET (composer)); -} - -void -reply_to_sender (GtkWidget *button, gpointer user_data) -{ - reply (FOLDER_BROWSER (user_data), FALSE); -} - -void -reply_to_all (GtkWidget *button, gpointer user_data) -{ - reply (FOLDER_BROWSER (user_data), TRUE); -} - - -void -forward_msg (GtkWidget *button, gpointer user_data) -{ - FolderBrowser *fb; - EMsgComposer *composer; - - if (!check_configured ()) - return; - - fb = FOLDER_BROWSER (user_data); - composer = mail_generate_forward (fb->mail_display->current_message, - TRUE, TRUE); - - gtk_signal_connect (GTK_OBJECT (composer), "send", - GTK_SIGNAL_FUNC (composer_send_cb), NULL); - - gtk_widget_show (GTK_WIDGET (composer)); -} - -void -delete_msg (GtkWidget *button, gpointer user_data) -{ - FolderBrowser *fb = user_data; - - if (fb->mail_display->current_message) { - guint32 flags; - - /* FIXME: table should watch the message with a signal and update display! */ - - flags = camel_mime_message_get_flags(fb->mail_display->current_message); - camel_mime_message_set_flags(fb->mail_display->current_message, CAMEL_MESSAGE_DELETED, ~flags); - printf("Message %s set to %s\n", fb->mail_display->current_message->message_uid, flags&CAMEL_MESSAGE_DELETED?"UNDELETED":"DELETED"); - } -} - -void -expunge_folder (GtkWidget *button, gpointer user_data) -{ - FolderBrowser *fb = FOLDER_BROWSER(user_data); - CamelException ex; - - if (fb->message_list->folder) { - camel_exception_init(&ex); - - camel_folder_expunge(fb->message_list->folder, &ex); - - /* FIXME: is there a better way to force an update? */ - /* FIXME: Folder should raise a signal to say its contents has changed ... */ - e_table_model_changed (fb->message_list->table_model); - -/* this always throws an error, when it shouldn't? */ -#if 0 - if (camel_exception_get_id (&ex) != CAMEL_EXCEPTION_NONE) { - mail_exception_dialog ("Unable to expunge deleted messages", &ex, fb); - } -#endif - } -} - -static void -filter_druid_clicked(FilterEditor *fe, int button, FolderBrowser *fb) -{ - printf("closing dialog\n"); - if (button == 0) { - char *user; - - user = g_strdup_printf ("%s/filters.xml", evolution_dir); - filter_editor_save_rules(fe, user); - printf("saving filter options to '%s'\n", user); - g_free(user); - } - if (button != -1) { - gnome_dialog_close((GnomeDialog *)fe); - } -} - -void filter_edit (GtkWidget *button, gpointer user_data) -{ - FolderBrowser *fb = FOLDER_BROWSER(user_data); - FilterEditor *fe; - char *user, *system; - - printf("Editing filters ...\n"); - fe = filter_editor_new(); - - user = g_strdup_printf ("%s/filters.xml", evolution_dir); - system = g_strdup_printf("%s/evolution/filtertypes.xml", EVOLUTION_DATADIR); - filter_editor_set_rule_files(fe, system, user); - g_free(user); - g_free(system); - gnome_dialog_append_buttons((GnomeDialog *)fe, GNOME_STOCK_BUTTON_OK, GNOME_STOCK_BUTTON_CANCEL, 0); - gtk_signal_connect((GtkObject *)fe, "clicked", filter_druid_clicked, fb); - gtk_widget_show((GtkWidget *)fe); -} - -static void -vfolder_editor_clicked(FilterEditor *fe, int button, FolderBrowser *fb) -{ - printf("closing dialog\n"); - if (button == 0) { - char *user; - - user = g_strdup_printf ("%s/vfolders.xml", evolution_dir); - filter_editor_save_rules(fe, user); - printf("saving vfolders to '%s'\n", user); - g_free(user); - - /* FIXME: this is also not the way to do this, see also - component-factory.c */ - { - EvolutionStorage *storage; - FilterDriver *fe; - int i, count; - char *user, *system; - extern char *evolution_dir; - - storage = gtk_object_get_data((GtkObject *)fb, "e-storage"); - - fe = filter_driver_new(); - user = g_strdup_printf ("%s/vfolders.xml", evolution_dir); - system = g_strdup_printf("%s/evolution/vfoldertypes.xml", EVOLUTION_DATADIR); - filter_driver_set_rules(fe, system, user); - g_free(user); - g_free(system); - count = filter_driver_rule_count(fe); - for (i=0;idescription) - desc = fo->description->data; - if (desc) - desctext = desc->data; - else { - sprintf(descunknown, "volder-%p", fo); - desctext = descunknown; - } - g_string_sprintf(query, "vfolder:/%s/vfolder/%s?", evolution_dir, desctext); - filter_driver_expand_option(fe, query, NULL, fo); - name = g_strdup_printf("/%s", desctext); - printf("Adding new vfolder: %s\n", query->str); - evolution_storage_new_folder (storage, name, - "mail", - query->str, - name+1); - g_string_free(query, TRUE); - g_free(name); - } - gtk_object_unref((GtkObject *)fe); - } - - } - if (button != -1) { - gnome_dialog_close((GnomeDialog *)fe); - } -} - -void vfolder_edit (GtkWidget *button, gpointer user_data) -{ - FolderBrowser *fb = FOLDER_BROWSER(user_data); - FilterEditor *fe; - char *user, *system; - - printf("Editing vfolders ...\n"); - fe = filter_editor_new(); - - user = g_strdup_printf ("%s/vfolders.xml", evolution_dir); - system = g_strdup_printf("%s/evolution/vfoldertypes.xml", EVOLUTION_DATADIR); - filter_editor_set_rule_files(fe, system, user); - g_free(user); - g_free(system); - gnome_dialog_append_buttons((GnomeDialog *)fe, GNOME_STOCK_BUTTON_OK, GNOME_STOCK_BUTTON_CANCEL, 0); - gtk_signal_connect((GtkObject *)fe, "clicked", vfolder_editor_clicked, fb); - gtk_widget_show((GtkWidget *)fe); -} - - diff --git a/mail/mail-sources.c b/mail/mail-sources.c deleted file mode 100644 index 3e5fbaed91..0000000000 --- a/mail/mail-sources.c +++ /dev/null @@ -1,771 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* mail-sources.c: Mail source selection wizard */ - -/* - * Author : - * Dan Winship - * - * Copyright 2000 Helix Code, Inc. (http://www.helixcode.com) - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ - -#include - -#include -#include - -/* XXX */ -#define default_mail_path "/var/mail" - -struct { - char *protocol, *name, *description, *authname[4], *authproto[4]; - gboolean authpasswd[4]; -} providers[] = { - { "POP3", "Post Office Protocol, version 3", - "For connecting to POP3 servers. Some web mail providers and " - "proprietary email systems also provide POP3 interfaces.", - { "Password/APOP", "Kerberos 4" }, - { NULL, "KERBEROS_V4" }, - { TRUE, FALSE } - }, - { "IMAP", "Internet Mail Access Protocol", - "For connecting to IMAP servers. Allows you to keep all of " - "your mail on the IMAP server so that you can access it from " - "anywhere.", - { "Password/CRAM-MD5", "S/Key", "Kerberos 4", "GSSAPI" }, - { NULL, "SKEY", "KERBEROS_V4", "GSSAPI" }, - { TRUE, TRUE, FALSE, FALSE }, - } -}; -#define nproviders 2 - -struct msinfo { - GtkHTML *html; - GtkWidget *prev, *next; - int page; - - /* Locally-delivered mail. */ - gboolean get_local_mail, default_local_mail_path; - char *local_mail_path; - gboolean use_movemail; - - /* Remotely-delivered mail. */ - gboolean get_remote_mail; - int remote_provider; - char *remote_host, *remote_user, *remote_password; - int remote_auth; - gboolean remember_password; - gboolean copy_local; - - /* Local store. */ - gboolean store_local; - char *local_store_path; -}; - -static void display_intro (struct msinfo *msi); -static int finish_intro (struct msinfo *msi, int direction); -static void display_local (struct msinfo *msi); -static int finish_local (struct msinfo *msi, int direction); -static void display_remote (struct msinfo *msi); -static int finish_remote (struct msinfo *msi, int direction); -static void display_remconf (struct msinfo *msi); -static int finish_remconf (struct msinfo *msi, int direction); - -static struct { - void (*display) (struct msinfo *msi); - int (*finish) (struct msinfo *msi, int direction); -} pages[] = { - { display_intro, finish_intro }, - { display_local, finish_local }, -#if 0 - { display_movemail, finish_movemail }, -#endif - { display_remote, finish_remote }, - { display_remconf, finish_remconf }, - { NULL, NULL } -}; - - -/* Wrappers around gtkhtml */ - -static void -write_html (GtkHTML *html, GtkHTMLStreamHandle handle, const char *text) -{ - gtk_html_write (html, handle, text, strlen (text)); -} - -static GtkHTMLStreamHandle -start_html (GtkHTML *html) -{ - GtkHTMLStreamHandle handle; - - handle = gtk_html_begin (html, ""); - write_html (html, handle, "\n"); - return handle; -} - -void -end_html (GtkHTML *html, GtkHTMLStreamHandle handle) -{ - write_html (html, handle, ""); - gtk_html_end (html, handle, GTK_HTML_STREAM_OK); -} - - -/* Button callbacks */ - -static void -prev_clicked (GtkButton *button, gpointer data) -{ - struct msinfo *msi = data; - - if (msi->page == 3) - gtk_widget_set_sensitive (msi->next, TRUE); - msi->page = pages[msi->page].finish (data, -1); - pages[msi->page].display (data); - if (msi->page == 0) - gtk_widget_set_sensitive (msi->prev, FALSE); -} - -static void -next_clicked (GtkButton *button, gpointer data) -{ - struct msinfo *msi = data; - - if (msi->page == 0) - gtk_widget_set_sensitive (msi->prev, TRUE); - msi->page = pages[msi->page].finish (data, 1); - pages[msi->page].display (data); - if (msi->page == 3) - gtk_widget_set_sensitive (msi->next, FALSE); -} - -static void -cancel_clicked (GtkButton *button, gpointer data) -{ - exit (1); -} - -static void -object_requested(GtkHTML *html, GtkHTMLEmbedded *eb) -{ - GtkWidget *w; - - w = gtk_object_get_data (GTK_OBJECT(html), eb->classid); - gtk_container_add (GTK_CONTAINER(eb), w); - gtk_widget_show_all (GTK_WIDGET(eb)); -} - - - -int -main (int argc, char **argv) -{ - struct msinfo *msi; - GtkWidget *window, *vbox, *frame, *scrolled, *hbbox; - GtkWidget *cancel; - int page; - - gtk_init (&argc, &argv); - gdk_imlib_init (); - gdk_rgb_init (); - gtk_widget_set_default_colormap (gdk_rgb_get_cmap ()); - gtk_widget_set_default_visual (gdk_rgb_get_visual ()); - - msi = g_new (struct msinfo, 1); - - /* Build window */ - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); - gtk_window_set_title (GTK_WINDOW (window), - "Mail Source Configuration"); - gtk_window_set_default_size (GTK_WINDOW (window), 600, 400); - - vbox = gtk_vbox_new (FALSE, 5); - gtk_container_set_border_width (GTK_CONTAINER (vbox), 8); - gtk_container_add (GTK_CONTAINER (window), vbox); - - frame = gtk_frame_new (NULL); - gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0); - - scrolled = gtk_scrolled_window_new (NULL, NULL); - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled), - GTK_POLICY_AUTOMATIC, - GTK_POLICY_ALWAYS); - gtk_container_add (GTK_CONTAINER (frame), scrolled); - - msi->html = GTK_HTML (gtk_html_new()); - gtk_html_set_editable (msi->html, FALSE); - gtk_container_add (GTK_CONTAINER (scrolled), GTK_WIDGET (msi->html)); - gtk_signal_connect (GTK_OBJECT (msi->html), "object_requested", - GTK_SIGNAL_FUNC (object_requested), NULL); - - hbbox= gtk_hbutton_box_new (); - gtk_button_box_set_layout (GTK_BUTTON_BOX (hbbox), - GTK_BUTTONBOX_END); - gtk_box_pack_end (GTK_BOX (vbox), hbbox, FALSE, FALSE, 0); - - msi->prev = gnome_stock_button (GNOME_STOCK_BUTTON_PREV); - msi->next = gnome_stock_button (GNOME_STOCK_BUTTON_NEXT); - cancel = gnome_stock_button (GNOME_STOCK_BUTTON_CANCEL); - - gtk_box_pack_start (GTK_BOX (hbbox), msi->prev, TRUE, FALSE, 0); - gtk_box_pack_end (GTK_BOX (hbbox), msi->next, TRUE, FALSE, 0); - gtk_box_pack_end (GTK_BOX (hbbox), cancel, TRUE, FALSE, 0); - - GTK_WIDGET_SET_FLAGS (msi->prev, GTK_CAN_DEFAULT); - GTK_WIDGET_SET_FLAGS (msi->next, GTK_CAN_DEFAULT); - GTK_WIDGET_SET_FLAGS (cancel, GTK_CAN_DEFAULT); - gtk_widget_grab_default (msi->next); - - gtk_signal_connect (GTK_OBJECT (msi->prev), "clicked", - prev_clicked, msi); - gtk_signal_connect (GTK_OBJECT (msi->next), "clicked", - next_clicked, msi); - gtk_signal_connect (GTK_OBJECT (cancel), "clicked", - cancel_clicked, NULL); - - msi->page = 0; - msi->get_local_mail = msi->default_local_mail_path = -1; - msi->use_movemail = -1; - msi->get_remote_mail = msi->store_local = -1; - msi->remember_password = msi->copy_local = -1; - msi->local_mail_path = msi->local_store_path = NULL; - msi->remote_provider = msi->remote_auth = -1; - msi->remote_host = msi->remote_user = msi->remote_password = NULL; - - display_intro (msi); - - gtk_widget_show_all (window); - gtk_main (); - exit (0); -} - -#define intro_text \ - "

Evolution Mail Source Wizard

\n" \ - "

Welcome to the Evolution Mail Source Wizard. This will " \ - "help you blah blah blah blah blah.

" - -static void -display_intro (struct msinfo *msi) -{ - GtkHTMLStreamHandle handle; - - handle = start_html (msi->html); - write_html (msi->html, handle, intro_text); - end_html (msi->html, handle); -} - -static int -finish_intro (struct msinfo *msi, int direction) -{ - return msi->page + direction; -} - -#define local_text_1 \ - "

Local mail source

\n
\n" \ - "

First you need to tell Evolution whether or not you " \ - "receive mail locally, and if so, where.

\n" \ - "

Your default mail file on this system is " - -#define local_text_2 \ - ".

\n" - -#define local_text_3_file \ - "

That file exists, so you almost certainly want to use it " \ - "as a mail source.

\n" - -#define local_text_3_dir \ - "

That directory exists, but you currently have no mail " \ - "there. If you aren't sure whether or not you receive mail " \ - "on this machine, it's safest to leave it selected.

\n" - -#define local_text_3_none \ - "

However, that directory does not exist.

\n" - -#define local_text_label_1 \ - "Don't fetch local mail." - -#define local_text_label_2 \ - "Fetch local mail from the default location." - -#define local_text_label_3 \ - "Fetch local mail from an alternate location:" - -void -display_local (struct msinfo *msi) -{ - GtkHTMLStreamHandle handle; - struct stat st; - char *default_user_mail_path; - GtkWidget *radio, *text; - GSList *group = NULL; - - default_user_mail_path = g_strdup_printf ("%s/%s", default_mail_path, - getenv ("USER")); - - handle = start_html (msi->html); - write_html (msi->html, handle, local_text_1); - write_html (msi->html, handle, default_user_mail_path); - write_html (msi->html, handle, local_text_2); - - if (stat (default_mail_path, &st) == 0) { - if (stat (default_user_mail_path, &st) == 0) - write_html (msi->html, handle, local_text_3_file); - else - write_html (msi->html, handle, local_text_3_dir); - if (msi->get_local_mail == -1) - msi->get_local_mail = TRUE; - } else { - write_html (msi->html, handle, local_text_3_none); - if (msi->get_local_mail == -1) - msi->get_local_mail = FALSE; - } - g_free (default_user_mail_path); - - radio = gtk_radio_button_new_with_label (group, local_text_label_1); - group = gtk_radio_button_group (GTK_RADIO_BUTTON (radio)); - if (!msi->get_local_mail) - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radio), TRUE); - gtk_object_set_data (GTK_OBJECT (msi->html), "local:no", radio); - write_html (msi->html, handle, - "
\n"); - - radio = gtk_radio_button_new_with_label (group, local_text_label_2); - group = gtk_radio_button_group (GTK_RADIO_BUTTON (radio)); - if (msi->get_local_mail && msi->default_local_mail_path) - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radio), TRUE); - gtk_object_set_data (GTK_OBJECT (msi->html), "local:default", radio); - write_html (msi->html, handle, - "
\n"); - - radio = gtk_radio_button_new_with_label (group, local_text_label_3); - text = gtk_entry_new (); - if (msi->get_local_mail && !msi->default_local_mail_path) { - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radio), TRUE); - gtk_entry_set_text (GTK_ENTRY (text), msi->local_mail_path); - } - gtk_object_set_data (GTK_OBJECT (msi->html), "local:alt", radio); - gtk_object_set_data (GTK_OBJECT (msi->html), "local:text", text); - write_html (msi->html, handle, - " " - ""); - - end_html (msi->html, handle); -} - -static int -finish_local (struct msinfo *msi, int direction) -{ - GtkWidget *radio, *text; - - radio = gtk_object_get_data (GTK_OBJECT (msi->html), "local:no"); - msi->get_local_mail = - !gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (radio)); - - g_free (msi->local_mail_path); - if (!msi->get_local_mail) - msi->local_mail_path = NULL; - else { - radio = gtk_object_get_data (GTK_OBJECT (msi->html), - "local:default"); - msi->default_local_mail_path = - gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (radio)); - if (msi->default_local_mail_path) - msi->local_mail_path = NULL; - else { - text = gtk_object_get_data (GTK_OBJECT (msi->html), - "local:text"); - msi->local_mail_path = - g_strdup (gtk_entry_get_text (GTK_ENTRY (text))); - } - } - - return msi->page + direction; -} - -#define remote_text_1 \ - "

Remote mail source

\n
\n

Now you need to " \ - "configure a remote mail source, if you have one.

\n" \ - "

Evolution supports the following protocols for reading " \ - "mail from remote servers:

" - -#define remote_text_2 \ - "

To add a remote mail source, choose a protocol from " \ - "the list below and click \"Next\".

" - -#define remote_text_3_must \ - "

You have not configured a local mail source, so you " \ - "must configure a remote one.

" - -#define remote_label_none \ - "No remote mail source" - -void -display_remote (struct msinfo *msi) -{ - GtkHTMLStreamHandle handle; - char *table, *item, *button, *nolabel; - GtkWidget *widget; - int i; - GSList *group = NULL; - - handle = start_html (msi->html); - write_html (msi->html, handle, remote_text_1); - - /* Write the table of available providers */ - table = "
\n"; - write_html (msi->html, handle, table); - for (i = 0; i < nproviders; i++) { - table = g_strdup_printf ("" - "\n" - "\n", - providers[i].protocol, - providers[i].name, - providers[i].description); - write_html (msi->html, handle, table); - g_free (table); - } - table = "
%s%s
%s
\n"; - write_html (msi->html, handle, table); - - write_html (msi->html, handle, remote_text_2); - if (!msi->get_local_mail) - write_html (msi->html, handle, remote_text_3_must); - - /* Write the list of configurable sources */ - write_html (msi->html, handle, "
"); - if (msi->get_local_mail) { - widget = gtk_radio_button_new_with_label (NULL, - remote_label_none); - group = gtk_radio_button_group (GTK_RADIO_BUTTON (widget)); - gtk_object_set_data (GTK_OBJECT (msi->html), "remote:no", - widget); - write_html (msi->html, handle, - "\n
"); - } - - for (i = 0; i < nproviders; i++) { - button = g_strdup_printf ("remote:%s", providers[i].protocol); - widget = gtk_radio_button_new_with_label (group, providers[i].protocol); - if (msi->remote_provider == i) { - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), - TRUE); - } - group = gtk_radio_button_group (GTK_RADIO_BUTTON (widget)); - gtk_object_set_data (GTK_OBJECT (msi->html), button, widget); - g_free (button); - - button = g_strdup_printf ("\n" - "
", - providers[i].protocol); - write_html (msi->html, handle, button); - g_free (button); - } - write_html (msi->html, handle, "
"); - - end_html (msi->html, handle); -} - -static int -finish_remote (struct msinfo *msi, int direction) -{ - GtkToggleButton *radio; - char *button; - int i; - - radio = gtk_object_get_data (GTK_OBJECT (msi->html), "remote:no"); - msi->get_remote_mail = !radio || !gtk_toggle_button_get_active (radio); - if (msi->get_remote_mail) { - for (i = 0; i < nproviders; i++) { - button = g_strdup_printf ("remote:%s", - providers[i].protocol); - radio = gtk_object_get_data (GTK_OBJECT (msi->html), - button); - if (gtk_toggle_button_get_active (radio)) - break; - } - - msi->remote_provider = i; - } else if (direction == 1) - direction = 2; /* Skip remconf page. */ - - return msi->page + direction; -} - -#define remconf_text_title \ - "

Configure a remote mail source: %s


" - -#define remconf_text_host_label "Server name:" -#define remconf_text_user_label "Account name:" -#define remconf_text_path_label "Path to mail on server:" -#define remconf_text_auth_label "Authentication method:" - -#define remconf_text_password \ - "

If you would like to have Evolution remember the password " \ - "for this account, enter it below. If you would rather be " \ - "prompted for the password when Evolution needs it, choose " \ - "one of the other options.

\n" - -#define remconf_text_password_remember "Remember my password" -#define remconf_text_password_confirm "Enter password again for confirmation" -#define remconf_text_password_once \ - "Prompt me for the password once each Evolution session." -#define remconf_text_password_forget \ - "Prompt me for the password every time it is needed." - -static void -resize_password (GtkWidget *html, GtkAllocation *alloc, gpointer data) -{ - GtkWidget *scrolled; - - scrolled = gtk_object_get_data (GTK_OBJECT (html), "remconf:htmlwin"); - gtk_widget_set_usize (scrolled, alloc->width - 20, 300); -} - -static void -frob_password (GtkMenuItem *menuitem, gpointer data) -{ - struct msinfo *msi = data; - GtkHTML *subhtml; - GtkHTMLStreamHandle handle; - GtkWidget *radio, *table, *text, *label; - GSList *group = NULL; - int id; - - id = GPOINTER_TO_UINT (gtk_object_get_data (GTK_OBJECT (menuitem), - "id")); - gtk_object_set_data (GTK_OBJECT (msi->html), "remconf:authproto", - GUINT_TO_POINTER (id)); - subhtml = gtk_object_get_data (GTK_OBJECT (msi->html), "remconf:html"); - handle = start_html (subhtml); - if (providers[msi->remote_provider].authpasswd[id]) { - write_html (subhtml, handle, remconf_text_password); - - table = gtk_table_new (2, 2, FALSE); - radio = gtk_radio_button_new_with_label (NULL, remconf_text_password_remember); - group = gtk_radio_button_group (GTK_RADIO_BUTTON (radio)); - gtk_object_set_data (GTK_OBJECT (subhtml), "sub:remember", - radio); - gtk_table_attach (GTK_TABLE (table), radio, 0, 1, 0, 1, - GTK_FILL, GTK_SHRINK, 0, 0); - text = gtk_entry_new (); - gtk_entry_set_visibility (GTK_ENTRY (text), FALSE); - if (msi->remote_password) - gtk_entry_set_text (GTK_ENTRY (text), msi->remote_password); - gtk_object_set_data (GTK_OBJECT (subhtml), "sub:passwd1", - text); - gtk_table_attach (GTK_TABLE (table), text, 1, 2, 0, 1, - GTK_EXPAND, GTK_SHRINK, 0, 0); - label = gtk_label_new (remconf_text_password_confirm); - gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_RIGHT); - gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, - GTK_SHRINK, GTK_SHRINK, 5, 0); - text = gtk_entry_new (); - gtk_entry_set_visibility (GTK_ENTRY (text), FALSE); - if (msi->remote_password) - gtk_entry_set_text (GTK_ENTRY (text), msi->remote_password); - gtk_object_set_data (GTK_OBJECT (subhtml), "sub:passwd2", - text); - gtk_table_attach (GTK_TABLE (table), text, 1, 2, 1, 2, - GTK_EXPAND, GTK_SHRINK, 0, 0); - - gtk_object_set_data (GTK_OBJECT (subhtml), "sub:table", table); - - write_html (subhtml, handle, "" - "\n"); - - radio = gtk_radio_button_new_with_label (group, remconf_text_password_once); - group = gtk_radio_button_group (GTK_RADIO_BUTTON (radio)); - gtk_object_set_data (GTK_OBJECT (subhtml), "sub:once", - radio); - write_html (subhtml, handle, "" - "\n"); - - radio = gtk_radio_button_new_with_label (group, remconf_text_password_forget); - group = gtk_radio_button_group (GTK_RADIO_BUTTON (radio)); - gtk_object_set_data (GTK_OBJECT (subhtml), "sub:forget", - radio); - write_html (subhtml, handle, "" - "\n"); - } else { - gtk_object_set_data (GTK_OBJECT (subhtml), "sub:remember", NULL); - gtk_object_set_data (GTK_OBJECT (subhtml), "sub:once", NULL); - gtk_object_set_data (GTK_OBJECT (subhtml), "sub:forget", NULL); - } - end_html (subhtml, handle); -} - -void -display_remconf (struct msinfo *msi) -{ - GtkHTMLStreamHandle handle; - char *text; - int prov = msi->remote_provider; - GtkWidget *widget, *menu, *menuitem, *mi1 = NULL; - GtkWidget *scrolled, *subhtml; - - handle = start_html (msi->html); - - text = g_strdup_printf (remconf_text_title, providers[prov].protocol); - write_html (msi->html, handle, text); - g_free (text); - - write_html (msi->html, handle, "\n"); - - if (1) { - write_html (msi->html, handle, ""); - } - - if (1) { - write_html (msi->html, handle, ""); - } - - if (0) { - write_html (msi->html, handle, ""); - } - - if (1) { - int i; - - write_html (msi->html, handle, ""); - } - write_html (msi->html, handle, "
"); - write_html (msi->html, handle, remconf_text_host_label); - widget = gtk_entry_new (); - if (msi->remote_host) { - gtk_entry_set_text (GTK_ENTRY (widget), - msi->remote_host); - } - gtk_object_set_data (GTK_OBJECT (msi->html), "remconf:host", - widget); - write_html (msi->html, handle, "
"); - write_html (msi->html, handle, remconf_text_user_label); - widget = gtk_entry_new (); - if (msi->remote_user) { - gtk_entry_set_text (GTK_ENTRY (widget), - msi->remote_user); - } - gtk_object_set_data (GTK_OBJECT (msi->html), "remconf:user", - widget); - write_html (msi->html, handle, "
"); - write_html (msi->html, handle, remconf_text_path_label); - widget = gtk_entry_new (); -#if 0 - if (msi->remote_path) { - gtk_entry_set_text (GTK_ENTRY (widget), - msi->remote_path); - } -#endif - gtk_object_set_data (GTK_OBJECT (msi->html), "remconf:path", - widget); - write_html (msi->html, handle, "
"); - write_html (msi->html, handle, remconf_text_auth_label); - menu = gtk_menu_new (); - for (i = 0; i < 4 && providers[prov].authname[i]; i++) { - menuitem = gtk_menu_item_new_with_label (providers[prov].authname[i]); - gtk_widget_show (menuitem); - gtk_signal_connect (GTK_OBJECT (menuitem), "activate", - GTK_SIGNAL_FUNC (frob_password), - msi); - gtk_object_set_data (GTK_OBJECT (menuitem), "id", - GUINT_TO_POINTER (i)); - if (!mi1) - mi1 = menuitem; - gtk_menu_append (GTK_MENU (menu), menuitem); - } - widget = gtk_option_menu_new (); - gtk_option_menu_set_menu (GTK_OPTION_MENU (widget), menu); - gtk_option_menu_set_history (GTK_OPTION_MENU (widget), - msi->remote_auth ? - msi->remote_auth : 0); - gtk_object_set_data (GTK_OBJECT (msi->html), "remconf:auth", - widget); - write_html (msi->html, handle, "
\n"); - - subhtml = gtk_html_new (); - gtk_html_set_editable (GTK_HTML (subhtml), FALSE); - gtk_signal_connect (GTK_OBJECT (subhtml), "object_requested", - GTK_SIGNAL_FUNC (object_requested), NULL); - gtk_object_set_data (GTK_OBJECT (msi->html), "remconf:html", - subhtml); - frob_password (GTK_MENU_ITEM (mi1), msi); - scrolled = gtk_scrolled_window_new (NULL, NULL); - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled), - GTK_POLICY_NEVER, GTK_POLICY_NEVER); - gtk_container_add (GTK_CONTAINER (scrolled), subhtml); - gtk_object_set_data (GTK_OBJECT (msi->html), "remconf:htmlwin", - scrolled); - write_html (msi->html, handle, "" - "\n"); - write_html (msi->html, handle, "

foo

"); - - gtk_signal_connect (GTK_OBJECT (msi->html), "size-allocate", - GTK_SIGNAL_FUNC (resize_password), NULL); - - end_html (msi->html, handle); -} - -static int -finish_remconf (struct msinfo *msi, int direction) -{ - GtkEntry *host, *user, *passwd1, *passwd2; - char *data; - GtkWidget *menu, *menuitem; - GtkObject *subhtml; - GtkToggleButton *radio; - - gtk_signal_disconnect_by_func (GTK_OBJECT (msi->html), - GTK_SIGNAL_FUNC (resize_password), - NULL); - - host = gtk_object_get_data (GTK_OBJECT (msi->html), "remconf:host"); - data = gtk_entry_get_text (GTK_ENTRY (host)); - if (data && *data) - msi->remote_host = g_strdup (data); - - user = gtk_object_get_data (GTK_OBJECT (msi->html), "remconf:user"); - data = gtk_entry_get_text (GTK_ENTRY (user)); - if (data && *data) - msi->remote_user = g_strdup (data); - - msi->remote_auth = GPOINTER_TO_UINT (gtk_object_get_data (GTK_OBJECT (msi->html), "remconf:authproto")); - - subhtml = gtk_object_get_data (GTK_OBJECT (msi->html), "remconf:html"); - radio = gtk_object_get_data (subhtml, "sub:remember"); - if (radio && gtk_toggle_button_get_active (radio)) { - passwd1 = gtk_object_get_data (subhtml, "sub:passwd1"); - passwd2 = gtk_object_get_data (subhtml, "sub:passwd2"); - - /* XXX compare */ - data = gtk_entry_get_text (GTK_ENTRY (passwd1)); - printf ("%s\n", data); - if (data && *data) { - msi->remote_password = g_strdup (data); - msi->remember_password = TRUE; - } - } else { - radio = gtk_object_get_data (subhtml, "sub:once"); - msi->remember_password = gtk_toggle_button_get_active (radio); - } - - return msi->page + direction; -} diff --git a/mail/mail-types.h b/mail/mail-types.h deleted file mode 100644 index c5b690563d..0000000000 --- a/mail/mail-types.h +++ /dev/null @@ -1,39 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -/* - * Copyright 2000 Helix Code, Inc. (http://www.helixcode.com) - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ - -#ifndef MAIL_TYPES_H -#define MAIL_TYPES_H 1 - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus }*/ - - -typedef struct _FolderBrowser FolderBrowser; -typedef struct _MessageList MessageList; -typedef struct _MailDisplay MailDisplay; - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* MAIL_TYPES_H */ diff --git a/mail/mail.h b/mail/mail.h deleted file mode 100644 index cfbe74b801..0000000000 --- a/mail/mail.h +++ /dev/null @@ -1,62 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -/* - * Copyright 2000, Helix Code, Inc. (http://www.helixcode.com) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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., 59 Temple Street #330, Boston, MA 02111-1307, USA. - */ - -#include -#include "camel/camel.h" -#include "composer/e-msg-composer.h" - -/* FIXME FIXME FIXME this sucks sucks sucks sucks */ - -/* folder-browser-factory */ -void folder_browser_factory_init (void); -BonoboControl *folder_browser_factory_new_control (void); - -/* mail-config */ -void mail_config_druid (void); - -/* mail-format */ -void mail_format_mime_message (CamelMimeMessage *mime_message, GtkBox *box); - -EMsgComposer *mail_generate_reply (CamelMimeMessage *mime_message, - gboolean to_all); - -EMsgComposer *mail_generate_forward (CamelMimeMessage *mime_message, - gboolean forward_as_attachment, - gboolean keep_attachments); - -/* mail-identify */ -char *mail_identify_mime_part (CamelMimePart *part); - -/* mail-ops */ -void fetch_mail (GtkWidget *button, gpointer user_data); -void send_msg (GtkWidget *button, gpointer user_data); -void send_to_url (const char *url); -void forward_msg (GtkWidget *button, gpointer user_data); -void reply_to_sender (GtkWidget *button, gpointer user_data); -void reply_to_all (GtkWidget *button, gpointer user_data); -void delete_msg (GtkWidget *button, gpointer user_data); -void expunge_folder (GtkWidget *button, gpointer user_data); - -void filter_edit (GtkWidget *button, gpointer user_data); -void vfolder_edit (GtkWidget *button, gpointer user_data); - -/* session */ -void session_init (void); -extern CamelSession *session; diff --git a/mail/main.c b/mail/main.c deleted file mode 100644 index 0355c5534c..0000000000 --- a/mail/main.c +++ /dev/null @@ -1,83 +0,0 @@ -/* - * mail-component.c: The core of the mail component - * - * Author: - * Miguel de Icaza (miguel@helixcode.com) - * - * (C) 2000 Helix Code, Inc. - */ - -#include -#include -#include -#include - -#include "e-util/e-gui-utils.h" -#include "e-util/e-cursors.h" - -#include "component-factory.h" -#include "mail.h" - -#ifdef USING_OAF - -#include - -static void -init_corba (int *argc, char *argv []) -{ - gnome_init_with_popt_table ("evolution-mail-component", VERSION, *argc, argv, - oaf_popt_options, 0, NULL); - oaf_init (*argc, argv); -} - -#else /* USING_OAF */ - -#include - -static void -init_corba (int *argc, char *argv []) -{ - CORBA_Environment ev; - - CORBA_exception_init (&ev); - - gnome_CORBA_init_with_popt_table ( - "evolution-mail-component", "1.0", - argc, argv, NULL, 0, NULL, GNORBA_INIT_SERVER_FUNC, &ev); - - CORBA_exception_free (&ev); -} - -#endif /* USING_OAF */ - -static void -init_bonobo (void) -{ - if (bonobo_init (CORBA_OBJECT_NIL, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL) == FALSE){ - e_notice (NULL, GNOME_MESSAGE_BOX_ERROR, - _("Mail Component: I could not initialize Bonobo")); - exit (1); - } -} - -int -main (int argc, char *argv []) -{ - bindtextdomain (PACKAGE, EVOLUTION_LOCALEDIR); - textdomain (PACKAGE); - - init_corba (&argc, argv); - init_bonobo (); - - glade_gnome_init (); - - session_init (); - e_cursors_init (); - - folder_browser_factory_init (); - component_factory_init (); - - bonobo_main (); - - return 0; -} diff --git a/mail/message-list.c b/mail/message-list.c deleted file mode 100644 index 1d6e898a7c..0000000000 --- a/mail/message-list.c +++ /dev/null @@ -1,885 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * message-list.c: Displays the messages. - * Implements CORBA's Evolution::MessageList - * - * Author: - * Miguel de Icaza (miguel@helixcode.com) - * Bertrand Guiheneuf (bg@aful.org) - * - * (C) 2000 Helix Code, Inc. - */ -#include -#include -#include -#include "e-util/e-util.h" -#include "camel/camel-exception.h" -#include -#include "message-list.h" -#include "Mail.h" -#include "widgets/e-table/e-table-header-item.h" -#include "widgets/e-table/e-table-item.h" - -#include "pixmaps.h" - -/* - * Default sizes for the ETable display - * - */ -#define N_CHARS(x) (CHAR_WIDTH * (x)) - -#define COL_ICON_WIDTH (16) -#define COL_CHECK_BOX_WIDTH (16) -#define COL_FROM_EXPANSION (24.0) -#define COL_FROM_WIDTH_MIN (32) -#define COL_SUBJECT_EXPANSION (30.0) -#define COL_SUBJECT_WIDTH_MIN (32) -#define COL_SENT_EXPANSION (4.0) -#define COL_SENT_WIDTH_MIN (1) -#define COL_RECEIVE_EXPANSION (20.0) -#define COL_RECEIVE_WIDTH_MIN (32) -#define COL_TO_EXPANSION (24.0) -#define COL_TO_WIDTH_MIN (32) -#define COL_SIZE_EXPANSION (6.0) -#define COL_SIZE_WIDTH_MIN (32) - -#define PARENT_TYPE (bonobo_object_get_type ()) - -static BonoboObjectClass *message_list_parent_class; -static POA_Evolution_MessageList__vepv evolution_message_list_vepv; - -static void -on_row_selection_cmd (ETable *table, - int row, - gboolean selected, - gpointer user_data); - - -static CamelMessageInfo *get_message_info(MessageList *message_list, gint row) -{ - CamelMessageInfo *info = NULL; - - if (message_list->search) { - if (rowmatch_count) { - info = message_list->summary_search_cache->pdata[row]; - if (info == NULL) { - char *uid = g_list_nth_data(message_list->matches, row); - if (uid) { - info = message_list->summary_search_cache->pdata[row] = - (CamelMessageInfo *) camel_folder_summary_get_by_uid(message_list->folder, uid); - } - } - } - } else { - if (rowsummary_table->len) - info = message_list->summary_table->pdata[row]; - } - - return info; -} - -static void -message_changed(CamelMimeMessage *m, enum _MessageChangeType type, MessageList *message_list) -{ - e_table_model_changed (message_list->table_model); -} - -/* select a message and display it */ -static void -select_msg (MessageList *message_list, gint row) -{ - CamelException ex; - CamelMimeMessage *message = NULL; - CamelMessageInfo *msg_info; - - camel_exception_init (&ex); - - msg_info = get_message_info(message_list, row); - if (msg_info) { - message = camel_folder_get_message_by_uid (message_list->folder, - msg_info->uid, - &ex); - if (camel_exception_get_id (&ex)) { - printf ("Unable to get message: %s\n", - ex.desc?ex.desc:"unknown_reason"); - return; - } - } - - if (message) { - gtk_signal_connect((GtkObject *)message, "message_changed", - message_changed, message_list); - mail_display_set_message (message_list->parent_folder_browser->mail_display, - CAMEL_MEDIUM (message)); - gtk_object_unref (GTK_OBJECT (message)); - } -} - -/* - * SimpleTableModel::col_count - */ -static int -ml_col_count (ETableModel *etm, void *data) -{ - return COL_LAST; -} - -/* - * SimpleTableModel::row_count - */ -static int -ml_row_count (ETableModel *etm, void *data) -{ - MessageList *message_list = data; - int v; - - if (!message_list->folder) { - return 0; - } - - if (message_list->search) { - v = message_list->match_count; - } else { - v = message_list->summary_table->len; - } - - /* in the case where no message is available, return 1 - * however, cause we want to be able to show a text */ - return (v ? v:1); - -} - -static void * -ml_value_at (ETableModel *etm, int col, int row, void *data) -{ - static char buffer [10]; - MessageList *message_list = data; - CamelFolder *folder; - CamelMessageInfo *msg_info; - CamelException ex; - void *retval = NULL; - - camel_exception_init (&ex); - - folder = message_list->folder; - if (!folder) - goto nothing_to_see; - - - /* retrieve the message information array */ - msg_info = get_message_info(message_list, row); - - /* - * in the case where it is zero message long - * display nothing - */ - if (msg_info == NULL) - goto nothing_to_see; - - switch (col){ - case COL_ONLINE_STATUS: - retval = GINT_TO_POINTER (0); - break; - - case COL_MESSAGE_STATUS: - if (msg_info->flags & CAMEL_MESSAGE_DELETED) - retval = GINT_TO_POINTER (2); - else - retval = GINT_TO_POINTER (1); - break; - - case COL_PRIORITY: - retval = GINT_TO_POINTER (1); - break; - - case COL_ATTACHMENT: - retval = GINT_TO_POINTER (0); - break; - - case COL_FROM: - if (msg_info->from) - retval = msg_info->from; - else - retval = ""; - break; - - case COL_SUBJECT: - if (msg_info->subject) - retval = msg_info->subject; - else - retval = ""; - break; - - case COL_SENT: - retval = "sent"; - break; - - case COL_RECEIVE: - retval = "receive"; - break; - - case COL_TO: - retval = "dudes@server"; - break; - - case COL_SIZE: - sprintf (buffer, "%d", msg_info->size); - retval = buffer; - break; - - case COL_DELETED: - retval = GINT_TO_POINTER(!!(msg_info->flags & CAMEL_MESSAGE_DELETED)); - break; - - default: - g_assert_not_reached (); - } - - return retval; - - - nothing_to_see: - /* - * in the case there is nothing to look at, - * notify the user. - */ - if (col == COL_SUBJECT) - return "No item in this view"; - else - return NULL; -} - -static void -ml_set_value_at (ETableModel *etm, int col, int row, const void *value, void *data) -{ -} - -static gboolean -ml_is_cell_editable (ETableModel *etm, int col, int row, void *data) -{ - return FALSE; -} - -static void * -ml_duplicate_value (ETableModel *etm, int col, const void *value, void *data) -{ - switch (col){ - case COL_ONLINE_STATUS: - case COL_MESSAGE_STATUS: - case COL_PRIORITY: - case COL_ATTACHMENT: - case COL_DELETED: - return (void *) value; - - case COL_FROM: - case COL_SUBJECT: - case COL_SENT: - case COL_RECEIVE: - case COL_TO: - case COL_SIZE: - return g_strdup (value); - default: - g_assert_not_reached (); - } - return NULL; -} - -static void -ml_free_value (ETableModel *etm, int col, void *value, void *data) -{ - switch (col){ - case COL_ONLINE_STATUS: - case COL_MESSAGE_STATUS: - case COL_PRIORITY: - case COL_ATTACHMENT: - case COL_DELETED: - break; - - case COL_FROM: - case COL_SUBJECT: - case COL_SENT: - case COL_RECEIVE: - case COL_TO: - case COL_SIZE: - g_free (value); - break; - default: - g_assert_not_reached (); - } -} - -static void * -ml_initialize_value (ETableModel *etm, int col, void *data) -{ - switch (col){ - case COL_ONLINE_STATUS: - case COL_MESSAGE_STATUS: - case COL_PRIORITY: - case COL_ATTACHMENT: - case COL_DELETED: - return NULL; - - case COL_FROM: - case COL_SUBJECT: - case COL_SENT: - case COL_RECEIVE: - case COL_TO: - case COL_SIZE: - return g_strdup(""); - default: - g_assert_not_reached (); - } - - return NULL; -} - -static gboolean -ml_value_is_empty (ETableModel *etm, int col, const void *value, void *data) -{ - switch (col){ - case COL_ONLINE_STATUS: - case COL_MESSAGE_STATUS: - case COL_PRIORITY: - case COL_ATTACHMENT: - case COL_DELETED: - return value == NULL; - - case COL_FROM: - case COL_SUBJECT: - case COL_SENT: - case COL_RECEIVE: - case COL_TO: - case COL_SIZE: - return !(value && *(char *)value); - default: - g_assert_not_reached (); - return FALSE; - } -} - -static void -ml_thaw (ETableModel *etm, void *data) -{ - e_table_model_changed (etm); -} - -static struct { - char **image_base; - GdkPixbuf *pixbuf; -} states_pixmaps [] = { - { envelope_opened_xpm, NULL }, - { envelope_closed_xpm, NULL }, - { empty_xpm, NULL }, - { attachment_xpm, NULL }, - { attachment_header_xpm, NULL }, - { online_status_xpm, NULL }, - { message_status_xpm, NULL }, - { envelope_deleted_xpm, NULL }, - { NULL, NULL }, -}; - -static void -message_list_init_images (void) -{ - int i; - - /* - * Only load once, and share - */ - if (states_pixmaps [0].pixbuf) - return; - - for (i = 0; states_pixmaps [i].image_base; i++){ - states_pixmaps [i].pixbuf = gdk_pixbuf_new_from_xpm_data ( - (const char **) states_pixmaps [i].image_base); - } -} - -static void -message_list_init_renderers (MessageList *message_list) -{ - g_assert (message_list); - g_assert (message_list->table_model); - - message_list->render_text = e_cell_text_new ( - message_list->table_model, - NULL, GTK_JUSTIFY_LEFT); - - gtk_object_set(GTK_OBJECT(message_list->render_text), - "strikeout_column", COL_DELETED, - NULL); - - message_list->render_online_status = e_cell_checkbox_new (); - - /* - * Message status - */ - { - GdkPixbuf *images [3]; - - images [0] = states_pixmaps [0].pixbuf; - images [1] = states_pixmaps [1].pixbuf; - images [2] = states_pixmaps [7].pixbuf; - - message_list->render_message_status = e_cell_toggle_new (0, 3, images); - } - - /* - * Attachment - */ - { - GdkPixbuf *images [2]; - - images [0] = states_pixmaps [2].pixbuf; - images [1] = states_pixmaps [3].pixbuf; - - message_list->render_attachment = e_cell_toggle_new (0, 2, images); - } - - /* - * FIXME: We need a real renderer here - */ - message_list->render_priority = e_cell_checkbox_new (); -} - -static void -message_list_init_header (MessageList *message_list) -{ - int i; - - /* - * FIXME: - * - * Use the font metric to compute this. - */ - - message_list->header_model = e_table_header_new (); - gtk_object_ref (GTK_OBJECT (message_list->header_model)); - gtk_object_sink (GTK_OBJECT (message_list->header_model)); - - message_list->table_cols [COL_ONLINE_STATUS] = - e_table_col_new_with_pixbuf ( - COL_ONLINE_STATUS, states_pixmaps [5].pixbuf, - 0.0, COL_CHECK_BOX_WIDTH, - message_list->render_online_status, - g_int_compare, FALSE); - - message_list->table_cols [COL_MESSAGE_STATUS] = - e_table_col_new_with_pixbuf ( - COL_MESSAGE_STATUS, states_pixmaps [0].pixbuf, - 0.0, COL_CHECK_BOX_WIDTH, - message_list->render_message_status, - g_int_compare, FALSE); - - message_list->table_cols [COL_PRIORITY] = - e_table_col_new ( - COL_PRIORITY, _("Priority"), - 0.0, COL_CHECK_BOX_WIDTH, - message_list->render_priority, - g_int_compare, FALSE); - - message_list->table_cols [COL_ATTACHMENT] = - e_table_col_new_with_pixbuf ( - COL_ATTACHMENT, states_pixmaps [4].pixbuf, - 0.0, COL_ICON_WIDTH, - message_list->render_attachment, - g_int_compare, FALSE); - - message_list->table_cols [COL_FROM] = - e_table_col_new ( - COL_FROM, _("From"), - COL_FROM_EXPANSION, COL_FROM_WIDTH_MIN, - message_list->render_text, - g_str_compare, TRUE); - - message_list->table_cols [COL_SUBJECT] = - e_table_col_new ( - COL_SUBJECT, _("Subject"), - COL_SUBJECT_EXPANSION, COL_SUBJECT_WIDTH_MIN, - message_list->render_text, - g_str_compare, TRUE); - - message_list->table_cols [COL_SENT] = - e_table_col_new ( - COL_SENT, _("Sent"), - COL_SENT_EXPANSION, COL_SENT_WIDTH_MIN, - message_list->render_text, - g_str_compare, TRUE); - - message_list->table_cols [COL_RECEIVE] = - e_table_col_new ( - COL_RECEIVE, _("Receive"), - COL_RECEIVE_EXPANSION, COL_RECEIVE_WIDTH_MIN, - message_list->render_text, - g_str_compare, TRUE); - - message_list->table_cols [COL_TO] = - e_table_col_new ( - COL_TO, _("To"), - COL_TO_EXPANSION, COL_TO_WIDTH_MIN, - message_list->render_text, - g_str_compare, TRUE); - - message_list->table_cols [COL_SIZE] = - e_table_col_new ( - COL_SIZE, _("Size"), - COL_SIZE_EXPANSION, COL_SIZE_WIDTH_MIN, - message_list->render_text, - g_str_compare, TRUE); - - /* - * Dummy init: It setups the headers to match the order in which - * they are defined. In the future e-table widget will take care - * of this. - */ - for (i = 0; i < COL_LAST; i++) { - if (i != COL_DELETED) { - gtk_object_ref (GTK_OBJECT (message_list->table_cols [i])); - e_table_header_add_column (message_list->header_model, - message_list->table_cols [i], i); - } - } -} - -static char * -message_list_get_layout (MessageList *message_list) -{ - if (0) - return g_strdup (" 0 1 2 3 4 5 6 7 8 9 "); - else { - /* Message status, From, Sent, Subject */ - return g_strdup (" 1 4 5 "); - } -} - -/* - * GtkObject::init - */ -static void -message_list_init (GtkObject *object) -{ - MessageList *message_list = MESSAGE_LIST (object); - char *spec; - - message_list->table_model = e_table_simple_new ( - ml_col_count, ml_row_count, ml_value_at, - ml_set_value_at, ml_is_cell_editable, - ml_duplicate_value, ml_free_value, - ml_initialize_value, ml_value_is_empty, - ml_thaw, message_list); - - message_list_init_renderers (message_list); - message_list_init_header (message_list); - - /* - * The etable - */ - - spec = message_list_get_layout (message_list); - message_list->etable = e_table_new ( - message_list->header_model, message_list->table_model, spec); - g_free (spec); - - gtk_signal_connect (GTK_OBJECT (message_list->etable), "row_selection", - GTK_SIGNAL_FUNC (on_row_selection_cmd), message_list); - - gtk_widget_show (message_list->etable); - - gtk_object_ref (GTK_OBJECT (message_list->table_model)); - gtk_object_sink (GTK_OBJECT (message_list->table_model)); - - /* - * We do own the Etable, not some widget container - */ - gtk_object_ref (GTK_OBJECT (message_list->etable)); - gtk_object_sink (GTK_OBJECT (message_list->etable)); - - message_list->summary_search_cache = g_ptr_array_new(); -} - -static void -message_list_destroy (GtkObject *object) -{ - MessageList *message_list = MESSAGE_LIST (object); - int i; - - - gtk_object_unref (GTK_OBJECT (message_list->table_model)); - gtk_object_unref (GTK_OBJECT (message_list->header_model)); - - /* - * Renderers - */ - gtk_object_unref (GTK_OBJECT (message_list->render_text)); - gtk_object_unref (GTK_OBJECT (message_list->render_online_status)); - gtk_object_unref (GTK_OBJECT (message_list->render_message_status)); - gtk_object_unref (GTK_OBJECT (message_list->render_priority)); - gtk_object_unref (GTK_OBJECT (message_list->render_attachment)); - - gtk_object_unref (GTK_OBJECT (message_list->etable)); - - if (message_list->summary_search_cache) - g_ptr_array_free(message_list->summary_search_cache, TRUE); - if (message_list->summary_table) - g_ptr_array_free(message_list->summary_table, TRUE); - - for (i = 0; i < COL_LAST; i++) - gtk_object_unref (GTK_OBJECT (message_list->table_cols [i])); - - GTK_OBJECT_CLASS (message_list_parent_class)->destroy (object); -} - -/* - * CORBA method: Evolution::MessageList::select_message - */ -static void -MessageList_select_message (PortableServer_Servant _servant, - const CORBA_long message_number, - CORBA_Environment *ev) -{ - printf ("FIXME: select message method\n"); -} - -/* - * CORBA method: Evolution::MessageList::open_message - */ -static void -MessageList_open_message (PortableServer_Servant _servant, - const CORBA_long message_number, - CORBA_Environment *ev) -{ - printf ("FIXME: open message method\n"); -} - -static POA_Evolution_MessageList__epv * -evolution_message_list_get_epv (void) -{ - POA_Evolution_MessageList__epv *epv; - - epv = g_new0 (POA_Evolution_MessageList__epv, 1); - - epv->select_message = MessageList_select_message; - epv->open_message = MessageList_open_message; - - return epv; -} - -static void -message_list_corba_class_init (void) -{ - evolution_message_list_vepv.Bonobo_Unknown_epv = bonobo_object_get_epv (); - evolution_message_list_vepv.Evolution_MessageList_epv = evolution_message_list_get_epv (); -} - -/* - * GtkObjectClass::init - */ -static void -message_list_class_init (GtkObjectClass *object_class) -{ - message_list_parent_class = gtk_type_class (PARENT_TYPE); - - object_class->destroy = message_list_destroy; - - message_list_corba_class_init (); - - message_list_init_images (); -} - -static void -message_list_construct (MessageList *message_list, Evolution_MessageList corba_message_list) -{ - bonobo_object_construct (BONOBO_OBJECT (message_list), corba_message_list); -} - -static Evolution_MessageList -create_corba_message_list (BonoboObject *object) -{ - POA_Evolution_MessageList *servant; - CORBA_Environment ev; - - servant = (POA_Evolution_MessageList *) g_new0 (BonoboObjectServant, 1); - servant->vepv = &evolution_message_list_vepv; - - CORBA_exception_init (&ev); - POA_Evolution_MessageList__init ((PortableServer_Servant) servant, &ev); - if (ev._major != CORBA_NO_EXCEPTION){ - g_free (servant); - CORBA_exception_free (&ev); - return CORBA_OBJECT_NIL; - } - - CORBA_exception_free (&ev); - return (Evolution_MessageList) bonobo_object_activate_servant (object, servant); -} - -BonoboObject * -message_list_new (FolderBrowser *parent_folder_browser) -{ - Evolution_MessageList corba_object; - MessageList *message_list; - - g_assert (parent_folder_browser); - - message_list = gtk_type_new (message_list_get_type ()); - - corba_object = create_corba_message_list (BONOBO_OBJECT (message_list)); - if (corba_object == CORBA_OBJECT_NIL){ - gtk_object_destroy (GTK_OBJECT (message_list)); - return NULL; - } - - message_list->parent_folder_browser = parent_folder_browser; - - message_list->idle_id = 0; - - message_list_construct (message_list, corba_object); - - return BONOBO_OBJECT (message_list); -} - -void -message_list_set_search (MessageList *message_list, const char *search) -{ - if (message_list->matches) { - /* FIXME: free contents too ... */ - g_list_free(message_list->matches); - message_list->matches = NULL; - } - - if (message_list->search) { - g_free(message_list->search); - message_list->search = NULL; - } - - if (search) { - CamelException ex; - - camel_exception_init (&ex); - message_list->matches = camel_folder_search_by_expression(message_list->folder, search, &ex); - message_list->search = g_strdup(search); - message_list->match_count = g_list_length(message_list->matches); - g_ptr_array_set_size(message_list->summary_search_cache, message_list->match_count); - memset(message_list->summary_search_cache->pdata, 0, sizeof(message_list->summary_search_cache->pdata[0]) * message_list->match_count); - } - - e_table_model_changed (message_list->table_model); - select_msg (message_list, 0); -} - -static void -folder_changed(CamelFolder *f, int type, MessageList *message_list) -{ - if (message_list->summary_table) - camel_folder_free_summary(f, message_list->summary_table); - message_list->summary_table = camel_folder_get_summary (f, NULL); - - message_list_set_search(message_list, message_list->search); -} - -void -message_list_set_folder (MessageList *message_list, CamelFolder *camel_folder) -{ - CamelException ex; - gboolean folder_exists; - - g_return_if_fail (message_list != NULL); - g_return_if_fail (camel_folder != NULL); - g_return_if_fail (IS_MESSAGE_LIST (message_list)); - g_return_if_fail (CAMEL_IS_FOLDER (camel_folder)); - g_return_if_fail (camel_folder_has_summary_capability (camel_folder)); - - if (message_list->matches) { - /* FIXME: free contents too ... */ - g_list_free(message_list->matches); - message_list->matches = NULL; - } - - if (message_list->summary_table) - g_ptr_array_free(message_list->summary_table, TRUE); - message_list->summary_table = NULL; - - camel_exception_init (&ex); - - if (message_list->folder) - gtk_object_unref (GTK_OBJECT (message_list->folder)); - - message_list->folder = camel_folder; - - folder_exists = camel_folder_exists (camel_folder, NULL); - - if (camel_exception_get_id (&ex)) { - printf ("Unable to test for folder existence: %s\n", - ex.desc?ex.desc:"unknown reason"); - return; - } - - if (!folder_exists) { - g_warning ("Folder does not exist, creating it\n"); - /* - if you don't want the directory to be created - automatically here remove this. - */ - camel_folder_create (camel_folder, &ex); - if (camel_exception_get_id (&ex)) { - printf ("Unable to create folder: %s\n", - ex.desc?ex.desc:"unknown_reason"); - return; - } - - } - - camel_folder_open (camel_folder, FOLDER_OPEN_RW, &ex); - if (camel_exception_get_id (&ex)) { - printf ("Unable to open folder: %s\n", - ex.desc?ex.desc:"unknown_reason"); - return; - } - - gtk_signal_connect((GtkObject *)camel_folder, "folder_changed", folder_changed, message_list); - - gtk_object_ref (GTK_OBJECT (camel_folder)); - - message_list->summary_table = camel_folder_get_summary (message_list->folder, NULL); - e_table_model_changed (message_list->table_model); - - select_msg (message_list, 0); -} - -GtkWidget * -message_list_get_widget (MessageList *message_list) -{ - return message_list->etable; -} - -E_MAKE_TYPE (message_list, "MessageList", MessageList, message_list_class_init, message_list_init, PARENT_TYPE); - -static gboolean -on_row_selection_idle (gpointer data) -{ - MessageList *message_list = data; - - select_msg (message_list, message_list->row_to_select); - - message_list->idle_id = 0; - return FALSE; -} - -static void -on_row_selection_cmd (ETable *table, - int row, - gboolean selected, - gpointer user_data) -{ - if (selected) { - MessageList *message_list; - - message_list = MESSAGE_LIST (user_data); - - message_list->row_to_select = row; - - if (!message_list->idle_id) - g_idle_add_full (G_PRIORITY_LOW, on_row_selection_idle, message_list, NULL); - } -} - diff --git a/mail/message-list.h b/mail/message-list.h deleted file mode 100644 index 21d51875f8..0000000000 --- a/mail/message-list.h +++ /dev/null @@ -1,87 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -#ifndef _MESSAGE_LIST_H_ -#define _MESSAGE_LIST_H_ - -#include "mail-types.h" -#include -#include -#include "camel/camel-folder.h" -#include "e-table/e-table.h" -#include "e-table/e-table-simple.h" -#include "e-table/e-cell-text.h" -#include "e-table/e-cell-toggle.h" -#include "e-table/e-cell-checkbox.h" -#include "folder-browser.h" - - -#define MESSAGE_LIST_TYPE (message_list_get_type ()) -#define MESSAGE_LIST(o) (GTK_CHECK_CAST ((o), MESSAGE_LIST_TYPE, MessageList)) -#define MESSAGE_LIST_CLASS(k) (GTK_CHECK_CLASS_CAST((k), MESSAGE_LIST_TYPE, MessageListClass)) -#define IS_MESSAGE_LIST(o) (GTK_CHECK_TYPE ((o), MESSAGE_LIST_TYPE)) -#define IS_MESSAGE_LIST_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), MESSAGE_LIST_TYPE)) - -typedef struct _Renderer Renderer; - - -enum { - COL_ONLINE_STATUS, - COL_MESSAGE_STATUS, - COL_PRIORITY, - COL_ATTACHMENT, - COL_FROM, - COL_SUBJECT, - COL_SENT, - COL_RECEIVE, - COL_TO, - COL_SIZE, - COL_DELETED, - - COL_LAST -}; - -struct _MessageList { - BonoboObject parent; - - /* the folder browser that contains the - * this message list */ - FolderBrowser *parent_folder_browser; - - ETableModel *table_model; - ETableHeader *header_model; - ETableCol *table_cols [COL_LAST]; - - ECell *render_text; - ECell *render_online_status; - ECell *render_message_status; - ECell *render_priority; - ECell *render_attachment; - - GtkWidget *etable; - - CamelFolder *folder; - - GPtrArray *summary_table; /* the summary of all messages */ - - char *search; /* search string */ - /* FIXME: This should use a better format ... */ - GList *matches; /* when a search has been performed ... */ - int match_count; - GPtrArray *summary_search_cache; /* summary info cache for searches */ - - /* used by the idle-call to select a row */ - int row_to_select; - guint idle_id; -} ; - -typedef struct { - BonoboObjectClass parent_class; -} MessageListClass; - -GtkType message_list_get_type (void); -BonoboObject *message_list_new (FolderBrowser *parent_folder_browser); -void message_list_set_folder (MessageList *message_list, - CamelFolder *camel_folder); -void message_list_set_search (MessageList *message_list, const char *search); -GtkWidget *message_list_get_widget (MessageList *message_list); - -#endif /* _MESSAGE_LIST_H_ */ diff --git a/mail/pixmaps.h b/mail/pixmaps.h deleted file mode 100644 index fdbb932771..0000000000 --- a/mail/pixmaps.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef EVOLUTION_PIXMAPS_H -#define EVOLUTION_PIXMAPS_H - -#include "pixmaps/envelope-opened.xpm" -#include "pixmaps/envelope-closed.xpm" -#include "pixmaps/empty.xpm" -#include "pixmaps/attachment.xpm" -#include "pixmaps/attachment-header.xpm" -#include "pixmaps/online-status.xpm" -#include "pixmaps/message-status.xpm" -#include "pixmaps/envelope-deleted.xpm" - -#endif /* EVOLUTION_PIXMAPS_H */ - diff --git a/mail/pixmaps/attachment-header.xpm b/mail/pixmaps/attachment-header.xpm deleted file mode 100644 index d3b0f96301..0000000000 --- a/mail/pixmaps/attachment-header.xpm +++ /dev/null @@ -1,22 +0,0 @@ -/* XPM */ -static char * attachment_header_xpm[] = { -"16 16 3 1", -" c None", -". c #000000", -"+ c #FFFFFF", -" ", -" ", -" ", -" .. ", -" + .. ..... ", -" .. .. . ", -" . .. . ", -" .. . .. ", -" . . . ", -" .. . ", -" . .. ", -" . .. ", -" ....... ", -" ", -" ", -" "}; diff --git a/mail/pixmaps/attachment.xpm b/mail/pixmaps/attachment.xpm deleted file mode 100644 index f154cceb18..0000000000 --- a/mail/pixmaps/attachment.xpm +++ /dev/null @@ -1,21 +0,0 @@ -/* XPM */ -static char * attachment_xpm[] = { -"16 16 2 1", -" c None", -". c #000000", -" ", -" .. ", -" . . . ", -" . . .. ", -" . . . ", -" . . . ", -" . . . ", -" . . . ", -" . . . ", -" . . ", -" . . ", -" .. .. ", -" .. .. ", -" .. ", -" ", -" "}; diff --git a/mail/pixmaps/empty.xpm b/mail/pixmaps/empty.xpm deleted file mode 100644 index 93b02c0164..0000000000 --- a/mail/pixmaps/empty.xpm +++ /dev/null @@ -1,21 +0,0 @@ -/* XPM */ -static char * empty_xpm[] = { -"16 16 2 1", -" c None", -". c #FFFFFF", -"................", -"................", -"................", -"................", -"................", -"................", -"................", -"................", -"................", -"................", -"................", -"................", -"................", -"................", -"................", -"................"}; diff --git a/mail/pixmaps/envelope-closed.xpm b/mail/pixmaps/envelope-closed.xpm deleted file mode 100644 index 060b659c78..0000000000 --- a/mail/pixmaps/envelope-closed.xpm +++ /dev/null @@ -1,65 +0,0 @@ -/* XPM */ -static char * envelope_closed_xpm[] = { -"16 16 46 1", -" c None", -". c #000000", -"+ c #837D71", -"@ c #FFFFFF", -"# c #4E4B42", -"$ c #767165", -"% c #FFFEFE", -"& c #FFF4DB", -"* c #FFFEFD", -"= c #F4E9D1", -"- c #625D54", -"; c #D0C7B2", -"> c #767166", -", c #FFFDFA", -"' c #F2E7CF", -") c #666257", -"! c #C8BFAB", -"~ c #736D63", -"{ c #FFFEFC", -"] c #F6EBD3", -"^ c #EEE3CC", -"/ c #FAEFD6", -"( c #918A7C", -"_ c #7E786B", -": c #E0D6C0", -"< c #C7BEAA", -"[ c #FDF2D9", -"} c #8A8476", -"| c #746F63", -"1 c #CEC4B0", -"2 c #8C8678", -"3 c #F9EED5", -"4 c #F1E6CE", -"5 c #F7ECD3", -"6 c #EFE4CD", -"7 c #D1C7B2", -"8 c #555149", -"9 c #CDC4B0", -"0 c #666258", -"a c #C1B8A5", -"b c #C2B9A6", -"c c #C0B7A4", -"d c #C3BAA7", -"e c #C4BBA8", -"f c #CAC1AD", -"g c #4E4B43", -" ", -" ", -" ", -" ", -" ", -" ........... ", -" .+@@@@@@@@@#. ", -" .@$%&@&*&=-;. ", -" .@&>%&,&')'!. ", -" .@&&~{&])&^!. ", -" .@&/()@)_=:<. ", -" .@[}&&)]]|1<. ", -" .@2&^3456789. ", -" .0abbbcddefg. ", -" ........... ", -" "}; diff --git a/mail/pixmaps/envelope-deleted.xpm b/mail/pixmaps/envelope-deleted.xpm deleted file mode 100644 index 9588ad2f0b..0000000000 --- a/mail/pixmaps/envelope-deleted.xpm +++ /dev/null @@ -1,54 +0,0 @@ -/* XPM */ -static char * envelope_deleted_xpm[] = { -"16 16 35 1", -" c None", -". c #FF0000", -"+ c #000000", -"@ c #837D71", -"# c #FFFFFF", -"$ c #4E4B42", -"% c #767165", -"& c #FFFEFE", -"* c #FFF4DB", -"= c #F4E9D1", -"- c #625D54", -"; c #D0C7B2", -"> c #767166", -", c #FFFDFA", -"' c #666257", -") c #F2E7CF", -"! c #C8BFAB", -"~ c #FFFEFC", -"{ c #F6EBD3", -"] c #EEE3CC", -"^ c #918A7C", -"/ c #E0D6C0", -"( c #C7BEAA", -"_ c #8A8476", -": c #F9EED5", -"< c #F1E6CE", -"[ c #F7ECD3", -"} c #EFE4CD", -"| c #D1C7B2", -"1 c #C1B8A5", -"2 c #C2B9A6", -"3 c #C0B7A4", -"4 c #C3BAA7", -"5 c #C4BBA8", -"6 c #CAC1AD", -" ", -" ", -" . ", -" ... ... ", -" ... .. ", -" ++..++..+++ ", -" +@###...###$+ ", -" +#%&*...*=-;+ ", -" +#*>..,..')!+ ", -" +#*..~*{.*]!+ ", -" +#..^'#'../(+ ", -" +#._**'{{..(+ ", -" +..*]:<[}|..+ ", -" +.122234456.+ ", -" +++++++++++ ", -" "}; diff --git a/mail/pixmaps/envelope-opened.xpm b/mail/pixmaps/envelope-opened.xpm deleted file mode 100644 index 40de0d743d..0000000000 --- a/mail/pixmaps/envelope-opened.xpm +++ /dev/null @@ -1,74 +0,0 @@ -/* XPM */ -static char * envelope_opened_xpm[] = { -"16 16 55 1", -" c None", -". c #000000", -"+ c #F4EDDD", -"@ c #F1EBDB", -"# c #F1EAD8", -"$ c #EAE3CB", -"% c #F4EAD5", -"& c #F1E6CF", -"* c #DDD4BE", -"= c #ECE3CD", -"- c #D3CAB6", -"; c #C1C1C1", -"> c #BDBDBD", -", c #BFBFBF", -"' c #12110F", -") c #FFFFFF", -"! c #514D45", -"~ c #767165", -"{ c #D0C7B2", -"] c #FFF4DB", -"^ c #625D54", -"/ c #565249", -"( c #F2E7CF", -"_ c #C8BFAB", -": c #3B3732", -"< c #837D71", -"[ c #807A6D", -"} c #45423B", -"| c #EEE3CC", -"1 c #FBF0D7", -"2 c #918A7C", -"3 c #7E786B", -"4 c #F4E9D1", -"5 c #E0D6C0", -"6 c #C7BEAA", -"7 c #FDF2D9", -"8 c #6A665B", -"9 c #F6EBD3", -"0 c #656157", -"a c #CEC4B0", -"b c #6D675D", -"c c #F9EED5", -"d c #F1E6CE", -"e c #F7ECD3", -"f c #EFE4CD", -"g c #D1C7B2", -"h c #CDC4B0", -"i c #080707", -"j c #C1B8A5", -"k c #C2B9A6", -"l c #C0B7A4", -"m c #C3BAA7", -"n c #C4BBA8", -"o c #CAC1AD", -"p c #1E1D1A", -" ", -" ", -" ..... ", -" .+@##$. ", -" .%&&&&&*. ", -" .=&&&&&&&-. ", -" ..;>>>>>>>,'. ", -" .)!)))))))~{. ", -" .)]^)))))/(_. ", -" .)]]:<<[}]|_. ", -" .)]12]]]3456. ", -" .)78]]]990a6. ", -" .)b]|cdefg0h. ", -" .ijkkklmmnop. ", -" ........... ", -" "}; diff --git a/mail/pixmaps/message-status.xpm b/mail/pixmaps/message-status.xpm deleted file mode 100644 index a0c4414f3f..0000000000 --- a/mail/pixmaps/message-status.xpm +++ /dev/null @@ -1,22 +0,0 @@ -/* XPM */ -static char * message_status_xpm[] = { -"16 16 3 1", -" c None", -". c #09B0F2", -"+ c #33A8D6", -" ", -" .. ", -" .. ", -" ++++ ", -" ++++ ", -" ++++ ", -" +++++++++++ ", -"..+++++..++++.. ", -"..+++++..++++.. ", -" +++++++++++ ", -" ++++ ", -" ++++ ", -" ++++ ", -" .. ", -" .. ", -" "}; diff --git a/mail/pixmaps/online-status.xpm b/mail/pixmaps/online-status.xpm deleted file mode 100644 index 88009ea480..0000000000 --- a/mail/pixmaps/online-status.xpm +++ /dev/null @@ -1,23 +0,0 @@ -/* XPM */ -static char * online_status_xpm[] = { -"16 16 4 1", -" c None", -". c #000000", -"+ c #9B9B9B", -"@ c #5CE537", -" ", -" . ", -" . ", -" . ", -" . +........+ ", -" . .++++++++. ", -" .. .++++++@+. ", -" ...++++++++. ", -" .. .++++++++. ", -" . .++++++++. ", -" . +........+ ", -" . ", -" . ", -" . ", -" . ", -" "}; diff --git a/mail/session.c b/mail/session.c deleted file mode 100644 index b7b24920b0..0000000000 --- a/mail/session.c +++ /dev/null @@ -1,62 +0,0 @@ -/* - * session.c: handles the session infomration and resource manipulation - * - * Author: - * Miguel de Icaza (miguel@gnu.org) - * - * (C) 2000 Helix Code, Inc. http://www.helixcode.com - */ -#include -#include -#include "mail.h" -#include "e-util/e-setup.h" - -CamelSession *session; - -static void -request_callback (gchar *string, gpointer data) -{ - char **ans = data; - - if (string) - *ans = g_strdup(string); - else - *ans = NULL; -} - -static char * -evolution_auth_callback (char *prompt, gboolean secret, - CamelService *service, char *item, - CamelException *ex) -{ - GtkWidget *dialog; - char *ans; - - /* XXX look up stored passwords */ - - /* XXX parent window? */ - dialog = gnome_request_dialog (secret, prompt, NULL, 0, - request_callback, &ans, NULL); - if (!dialog) { - camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM, - "Could not create dialog box."); - return NULL; - } - if (gnome_dialog_run_and_close (GNOME_DIALOG (dialog)) == -1 || - ans == NULL) { - camel_exception_set (ex, CAMEL_EXCEPTION_USER_CANCEL, - "User cancelled query."); - return NULL; - } - - return ans; -} - -void -session_init (void) -{ - e_setup_base_dir (); - camel_init (); - - session = camel_session_new (evolution_auth_callback); -} diff --git a/mail/test-mail.c b/mail/test-mail.c deleted file mode 100644 index f2a39bf104..0000000000 --- a/mail/test-mail.c +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Tests the mail summary display bonobo component - * - * Author: - * Miguel de Icaza (miguel@kernel.org) - * - * (C) 2000 Helix Code, Inc. - */ - -#include - -#include -#include - -#ifdef USING_OAF - -#include - -static void -init_corba (int *argc, char *argv[]) -{ - gnome_init ("sample-control-container", "1.0", *argc, argv); - oaf_init (*argc, argv); -} - -#else /* USING_OAF */ - -#include - -static void -init_corba (int *argc, char *argv []) -{ - CORBA_Environment ev; - - CORBA_exception_init (&ev); - - gnome_CORBA_init ("sample-control-container", "1.0", argc, argv, 0, &ev); - - CORBA_exception_free (&ev); -} - -#endif /* USING_OAF */ - -static guint -create_container (void) -{ - GtkWidget *window, *control; - BonoboUIHandler *uih; - - gdk_rgb_init (); - - gtk_widget_set_default_colormap (gdk_rgb_get_cmap ()); - gtk_widget_set_default_visual (gdk_rgb_get_visual ()); - - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); - gtk_widget_set_usize (GTK_WIDGET (window), 640, 480); - gtk_widget_show (GTK_WIDGET (window)); - - uih = bonobo_ui_handler_new (); - -#ifdef USING_OAF - control = bonobo_widget_new_control ("OAFIID:control:evolution-mail:833d5a71-a201-4a0e-b7e6-5475c5c4cb45", - bonobo_object_corba_objref (BONOBO_OBJECT (uih))); -#else - control = bonobo_widget_new_control ("control:evolution-mail", - bonobo_object_corba_objref (BONOBO_OBJECT (uih))); -#endif - - if (control == NULL){ - printf ("Could not launch mail control\n"); - exit (1); - } - gtk_container_add (GTK_CONTAINER (window), control); - - gtk_widget_show (window); - gtk_widget_show (control); - - - return FALSE; -} - -int -main (int argc, char *argv []) -{ - init_corba (&argc, argv); - - if (bonobo_init (CORBA_OBJECT_NIL, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL) == FALSE) - g_error ("Could not initialize Bonobo\n"); - - gtk_idle_add ((GtkFunction) create_container, NULL); - - /* - * Main loop - */ - bonobo_main (); - - return 0; -} - - - - - diff --git a/po/.cvsignore b/po/.cvsignore deleted file mode 100644 index 3d5b22df60..0000000000 --- a/po/.cvsignore +++ /dev/null @@ -1,12 +0,0 @@ -*.gmo -*.mo -Makefile -Makefile.in -Makefile.in.in -POTFILES -cat-id-tbl.c -gnome-objc.pot -gnome.pot -stamp-cat-id -evolution.pot - diff --git a/po/ChangeLog b/po/ChangeLog deleted file mode 100644 index a9293a6d67..0000000000 --- a/po/ChangeLog +++ /dev/null @@ -1,234 +0,0 @@ -2000-05-28 Fatih Demir - - * tr.po: Updated the Turkish translation. - -2000-05-28 Valek Filippov - - * ru.po: updated russian translation. - -2000-05-27 Valek Filippov - - * ru.po: updated russian translation. - -2000-05-26 Kjartan Maraas - - * no.po: Updated Norwegian translation. - -2000-05-23 Kjartan Maraas - - * no.po: Updated Norwegian translation. - -2000-05-23 Andreas Hyden - - * sv.po: Updated Swedish translation. - -2000-05-22 Yukihiro Nakai - - * ja.po: Update from Akira TAGOH. - -2000-05-18 Kjartan Maraas - - * no.po: Updated Norwegian translation. - -2000-05-18 Yukihiro Nakai - - * ja.po: Update from Akira TAGOH. - -2000-05-14 Valek Filippov - - * ru.po: updated russian translation. - -2000-05-14 Andreas Hyden - - * sv.po: Updated Swedish translation. - -2000-05-13 Andreas Hyden - - * sv.po: Updated Swedish translation. - -2000-05-13 Kjartan Maraas - - * no.po: Updated Norwegian translation. - -2000-05-13 Valek Filippov - - * POTFILES.in: added *.glade.h and *-strings.h files. - * ru.po: updated russian translation. - -2000-05-12 Andreas Hyden - - * sv.po: Updated Swedish translation. - -2000-05-12 Kjartan Maraas - - * no.po: Updated Norwegian translation. - -2000-05-10 Christopher James Lahey - - * POTFILES.in: Removed mail/mail-component.c. - -2000-05-09 Andreas Hyden - - * sv.po: Updated Swedish translation. - * update.sh: Updated. - -2000-05-08 Andreas Hyden - - * New update.sh script from Kenneth. - -2000-05-08 Andreas Hyden - - * sv.po: Updated Swedish translation. - -2000-05-08 Héctor García Álvarez - - * es.po: added translation to spanish. - -2000-05-07 Kjartan Maraas - - * no.po: Updated Norwegian translation. - -2000-05-07 Ettore Perazzoli - - * POTFILES.in: Remove `shell/e-shell-shortcut.c'. - -2000-05-05 Jesus Bravo Alvarez - - * gl.po: Updated Galician translation. - -2000-05-04 Fatih Demir - - * tr.po : Updated the Turkish translation . - -2000-05-03 Kjartan Maraas - - * no.po: Updated Norwegian translation. - -2000-05-03 Valek Filippov - - * ru.po: updated. - -2000-05-02 Ettore Perazzoli - - * POTFILES.in: Removed `shell/e-service.c'. - -2000-05-02 Andreas Hyden - - * sv.po: Updated Swedish translation. - -2000-05-01 Valek Filippov - - * ru.po: Updated russian translation. - -2000-04-30 Arjan Scherpenisse - - * nl.po: Added Dutch translation - -2000-04-25 Kjartan Maraas - - * no.po: Updated Norwegian translation. - -2000-04-21 Andreas Hyden - - * sv.po: Updated Swedish translation. - -2000-04-20 Fatih Demir - - * tr.po : Added the Turkish translation . - -2000-04-20 Yukihiro Nakai - - * ja.po: Initial Japanese translation from Akira Tagoh - -2000-04-19 Pablo Saratxaga - - * da.po: Updated Danish file - -2000-04-19 Andreas Hyden - - * sv.po: Updated Swedish translation. - -2000-04-18 Vincent Renardias - - * fr.po: creation. - -2000-04-18 Kjartan Maraas - - * no.po: Updated Norwegian translation. - -2000-04-15 Valek Filippov - - * ru.po: Updated russian translation. - -2000-04-15 Ettore Perazzoli - - * POTFILES.in: Removed `libversit/vcc.c' as its auto-generated and - breaks. - -2000-04-12 Pablo Saratxaga - - * da.po: Updated Danish file - -2000-04-10 Kjartan Maraas - - * no.po: Updated Norwegian translation. - -2000-04-08 Jesus Bravo Alvarez - - * gl.po: Added Galician translation. - -2000-04-07 Yuri Syrota - - * uk.po: Updated Ukrainian translation. - -2000-04-06 Andreas Hyden - - * sv.po: Updated Swedish translation. - -2000-04-04 Spiros Papadimitriou - - * el.po: Added Greek translation. - -2000-04-04 Kjartan Maraas - - * da.po: Added Danish translation from Kenneth Christiansen - . - * no.po: Updated Norwegian translation. - * ru.po: Added Russian translation from Valek Filippov - . - -2000-04-04 Andreas Hyden - - * sv.po: Updated Swedish translation. - -2000-04-04 Yuri Syrota - - * uk.po: Added Ukrainian translation. - -2000-04-03 Richard Hult - - * sv.po: Updated Swedish translation. - -2000-04-03 Andreas Hyden - - * sv.po: Added Swedish translation. - -2000-04-01 Kjartan Maraas - - * no.po: Added Norwegian translation. - -2000-04-01 Matt Loper - - * .cvsignore: Added evolution.pot. - -2000-03-27 Federico Mena Quintero - - * POTFILES.in: Removed the calendar files for now. - -1998-07-23 Nuno Ferreira - - * pt.po: Added Portuguese translation. - -1996-06-12 Tristan Tarrant - - * it.po : Italian translations added diff --git a/po/POTFILES.in b/po/POTFILES.in deleted file mode 100644 index e0faf95f73..0000000000 --- a/po/POTFILES.in +++ /dev/null @@ -1,23 +0,0 @@ -addressbook/contact-editor/e-contact-editor-strings.h -addressbook/contact-editor/fullname-strings.h -addressbook/gui/component/ldap-server-dialog.glade.h -addressbook/printing/e-contact-print.glade.h -composer/e-msg-composer-address-dialog.c -composer/e-msg-composer-address-dialog.glade.h -composer/e-msg-composer-attachment-bar.c -composer/e-msg-composer-attachment.c -composer/e-msg-composer-attachment.glade.h -composer/e-msg-composer-hdrs.c -composer/e-msg-composer.c -e-util/e-setup.c -mail/folder-browser-factory.c -mail/folder-browser.c -mail/mail-display.c -mail/main.c -mail/message-list.c -shell/e-folder.c -shell/e-shell-view-menu.c -shell/e-shell.c -shell/main.c -widgets/e-table/e-table-config.glade.h -widgets/e-table/e-table-group.glade.h \ No newline at end of file diff --git a/po/da.po b/po/da.po deleted file mode 100644 index 2f45ec2214..0000000000 --- a/po/da.po +++ /dev/null @@ -1,1029 +0,0 @@ -# Danish translation of evolution -# Copyright (C) 2000 Free Software Foundation, Inc. -# Kenneth Christiansen , 2000. -# Keld Simonsen , 2000. -# -msgid "" -msgstr "" -"Project-Id-Version: evolution beta\n" -"POT-Creation-Date: 2000-05-27 20:01+0100\n" -"PO-Revision-Date: 2000-05-27 23:38+0200\n" -"Last-Translator: Keld Simonsen \n" -"Language-Team: Danish \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=iso-8859-1\n" -"Content-Transfer-Encoding: 8-bit\n" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/contact-editor/e-contact-editor-strings.h:7 -msgid "Contact Editor" -msgstr "Kontakt redaktør" - -#: addressbook/contact-editor/e-contact-editor-strings.h:8 -msgid "_Full Name..." -msgstr "_Fulde navn" - -#: addressbook/contact-editor/e-contact-editor-strings.h:9 -msgid "Company:" -msgstr "Firma:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:10 -msgid "File As:" -msgstr "Opbevar som:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:11 -msgid "Web page address:" -msgstr "Web-side adresse:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:12 -msgid "Wants to receive _HTML mail" -msgstr "Ønsker at modtage _HTML post" - -#: addressbook/contact-editor/e-contact-editor-strings.h:13 -msgid "Address:" -msgstr "Adresse:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:14 -msgid "_Business" -msgstr "_Arbejde" - -#: addressbook/contact-editor/e-contact-editor-strings.h:15 -msgid "_Home" -msgstr "_Hjem" - -#: addressbook/contact-editor/e-contact-editor-strings.h:16 -msgid "Business _Fax" -msgstr "Firma _fax" - -#: addressbook/contact-editor/e-contact-editor-strings.h:17 -msgid "_Mobile" -msgstr "_Mobil" - -#: addressbook/contact-editor/e-contact-editor-strings.h:18 -msgid "Primary Email" -msgstr "Primær epost" - -#: addressbook/contact-editor/e-contact-editor-strings.h:19 -msgid "Business" -msgstr "Firma" - -#: addressbook/contact-editor/e-contact-editor-strings.h:20 -msgid "This is the _mailing address" -msgstr "Dette er _postadressen" - -#: addressbook/contact-editor/e-contact-editor-strings.h:21 -msgid "_Contacts..." -msgstr "_Kontakter..." - -#: addressbook/contact-editor/e-contact-editor-strings.h:22 -msgid "Ca_tegories..." -msgstr "Ka_tegorier..." - -#: addressbook/contact-editor/e-contact-editor-strings.h:23 -msgid "Job Title" -msgstr "Job titel" - -#: addressbook/contact-editor/e-contact-editor-strings.h:24 -msgid "General" -msgstr "generel" - -#: addressbook/contact-editor/e-contact-editor-strings.h:25 -msgid "Department:" -msgstr "Afdeling:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:26 -msgid "Office:" -msgstr "Kontor:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:27 -msgid "Profession:" -msgstr "Beskæftigelse:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:28 -msgid "Nickname:" -msgstr "Kaldenavn:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:29 -msgid "Spouse:" -msgstr "Ægtefælle:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:30 -msgid "Birthday:" -msgstr "Fødselsdag:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:31 -msgid "Assistant's name:" -msgstr "Sekretærs navn:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:32 -msgid "Manager's Name:" -msgstr "Chefs navn:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:33 -msgid "Anniversary:" -msgstr "Bryllupsdag:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:34 -msgid "Notes:" -msgstr "Notat:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:35 -msgid "Details" -msgstr "Detaljer" - -#: addressbook/contact-editor/e-contact-editor-strings.h:36 -#: addressbook/contact-editor/e-contact-editor-strings.h:41 -msgid "Add" -msgstr "Tilføj" - -#: addressbook/contact-editor/e-contact-editor-strings.h:37 -#: mail/folder-browser-factory.c:50 -msgid "Delete" -msgstr "Slet" - -#: addressbook/contact-editor/e-contact-editor-strings.h:38 -msgid "Phone Types" -msgstr "Telefon-typer" - -#: addressbook/contact-editor/e-contact-editor-strings.h:39 -#: addressbook/contact-editor/e-contact-editor-strings.h:40 -msgid "New phone type" -msgstr "Ny telefontype" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/contact-editor/fullname-strings.h:7 -msgid "Check Full Name" -msgstr "Tjek fulde navn" - -#: addressbook/contact-editor/fullname-strings.h:8 -msgid "_Title:" -msgstr "_Titel:" - -#: addressbook/contact-editor/fullname-strings.h:9 -msgid "_First:" -msgstr "_Første:" - -#: addressbook/contact-editor/fullname-strings.h:10 -msgid "_Middle:" -msgstr "_Mellem:" - -#: addressbook/contact-editor/fullname-strings.h:11 -msgid "_Last:" -msgstr "_Sidste:" - -#: addressbook/contact-editor/fullname-strings.h:12 -msgid "_Suffix:" -msgstr "_Endelse:" - -#: addressbook/contact-editor/fullname-strings.h:13 -msgid "" -"\n" -"Mr.\n" -"Mrs.\n" -"Dr.\n" -msgstr "" -"\n" -"Hr.\n" -"Fr.\n" -"Dr.\n" - -#: addressbook/contact-editor/fullname-strings.h:18 -msgid "" -"\n" -"Sr.\n" -"Jr.\n" -"I\n" -"II\n" -"III\n" -"Esq.\n" -msgstr "" -"\n" -"Sr.\n" -"Jr.\n" -"I\n" -"II\n" -"III\n" -"Esq.\n" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/gui/component/ldap-server-dialog.glade.h:7 -#: composer/e-msg-composer-attachment.glade.h:8 -msgid "Description:" -msgstr "Beskrivelse:" - -#: addressbook/gui/component/ldap-server-dialog.glade.h:8 -msgid "LDAP Server:" -msgstr "LDAP tjener:" - -#: addressbook/gui/component/ldap-server-dialog.glade.h:9 -msgid "Port Number:" -msgstr "Port nummer:" - -#: addressbook/gui/component/ldap-server-dialog.glade.h:10 -msgid "Root DN:" -msgstr "Root DN:" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/printing/e-contact-print.glade.h:7 -msgid "Page Setup:" -msgstr "Sideopsætning" - -#: addressbook/printing/e-contact-print.glade.h:8 -msgid "Style name:" -msgstr "Stilnavn:" - -#: addressbook/printing/e-contact-print.glade.h:9 -msgid "Preview:" -msgstr "Forhåndsvisning:" - -#: addressbook/printing/e-contact-print.glade.h:10 -msgid "Options" -msgstr "Valgmuligheder" - -#: addressbook/printing/e-contact-print.glade.h:11 -msgid "Include:" -msgstr "Inkluder:" - -#: addressbook/printing/e-contact-print.glade.h:12 -msgid "Sections:" -msgstr "Afdelinger:" - -#: addressbook/printing/e-contact-print.glade.h:13 -msgid "Immediately follow each other" -msgstr "Følg umiddelbart efter hinanden" - -#: addressbook/printing/e-contact-print.glade.h:14 -msgid "Letter tabs on side" -msgstr "Bogstavsmærker til siden" - -#: addressbook/printing/e-contact-print.glade.h:15 -msgid "Headings for each letter" -msgstr "Overskrift for hvert brev" - -#: addressbook/printing/e-contact-print.glade.h:16 -msgid "Start on a new page" -msgstr "Send en ny side" - -#: addressbook/printing/e-contact-print.glade.h:17 -msgid "Number of columns:" -msgstr "Antal kolonner" - -#: addressbook/printing/e-contact-print.glade.h:18 -msgid "Blank forms at end:" -msgstr "Tomme formularer i slutningen:" - -#: addressbook/printing/e-contact-print.glade.h:19 -msgid "Fonts" -msgstr "Skrifttyper" - -#: addressbook/printing/e-contact-print.glade.h:20 -#: addressbook/printing/e-contact-print.glade.h:21 -#: addressbook/printing/e-contact-print.glade.h:51 -#: addressbook/printing/e-contact-print.glade.h:54 -msgid "Font..." -msgstr "Skrifttype..." - -#: addressbook/printing/e-contact-print.glade.h:22 -msgid "Headings" -msgstr "Overskrifter" - -#: addressbook/printing/e-contact-print.glade.h:23 -msgid "10 pt. Tahoma" -msgstr "10 punkt Tahoma" - -#: addressbook/printing/e-contact-print.glade.h:24 -msgid "Body" -msgstr "Krop" - -#: addressbook/printing/e-contact-print.glade.h:25 -msgid "8 pt. Tahoma" -msgstr "8 punkt Tahoma" - -#: addressbook/printing/e-contact-print.glade.h:26 -msgid "Shading" -msgstr "Toning" - -#: addressbook/printing/e-contact-print.glade.h:27 -msgid "Print using gray shading" -msgstr "Udskriv med grå toning" - -#: addressbook/printing/e-contact-print.glade.h:28 -msgid "Format" -msgstr "Format" - -#: addressbook/printing/e-contact-print.glade.h:29 -#: addressbook/printing/e-contact-print.glade.h:50 -msgid "Paper" -msgstr "Papir" - -#: addressbook/printing/e-contact-print.glade.h:30 -msgid "Type:" -msgstr "Type:" - -#: addressbook/printing/e-contact-print.glade.h:31 -#: addressbook/printing/e-contact-print.glade.h:43 -msgid "label26" -msgstr "label26" - -#: addressbook/printing/e-contact-print.glade.h:32 -#: addressbook/printing/e-contact-print.glade.h:44 -msgid "Dimensions:" -msgstr "Dimensioner:" - -#: addressbook/printing/e-contact-print.glade.h:33 -#: addressbook/printing/e-contact-print.glade.h:45 -msgid "Width:" -msgstr "Bredde:" - -#: addressbook/printing/e-contact-print.glade.h:34 -#: addressbook/printing/e-contact-print.glade.h:46 -msgid "Height:" -msgstr "Højde:" - -#: addressbook/printing/e-contact-print.glade.h:35 -msgid "Paper source:" -msgstr "Papirkilde:" - -#: addressbook/printing/e-contact-print.glade.h:36 -msgid "Margins" -msgstr "Marginer" - -#: addressbook/printing/e-contact-print.glade.h:37 -msgid "Top:" -msgstr "Top:" - -#: addressbook/printing/e-contact-print.glade.h:38 -msgid "Bottom:" -msgstr "Bund:" - -#: addressbook/printing/e-contact-print.glade.h:39 -msgid "Left:" -msgstr "Venstre:" - -#: addressbook/printing/e-contact-print.glade.h:40 -msgid "Right:" -msgstr "Højre:" - -#: addressbook/printing/e-contact-print.glade.h:41 -msgid "Page" -msgstr "Side" - -#: addressbook/printing/e-contact-print.glade.h:42 -msgid "Size:" -msgstr "Størrelse:" - -#: addressbook/printing/e-contact-print.glade.h:47 -msgid "Orientation" -msgstr "Orientering" - -#: addressbook/printing/e-contact-print.glade.h:48 -msgid "Portrait" -msgstr "Portræt" - -#: addressbook/printing/e-contact-print.glade.h:49 -msgid "Landscape" -msgstr "Landskab" - -#: addressbook/printing/e-contact-print.glade.h:52 -msgid "Header" -msgstr "Hoved" - -#: addressbook/printing/e-contact-print.glade.h:53 -msgid "Footer:" -msgstr "Fod:" - -#: addressbook/printing/e-contact-print.glade.h:55 -msgid "Reverse on even pages" -msgstr "Omvendt på lige sider" - -#: addressbook/printing/e-contact-print.glade.h:56 -msgid "Header/Footer" -msgstr "Hoved/fod" - -#: composer/e-msg-composer-address-dialog.c:183 composer/e-msg-composer.c:533 -msgid "Cut" -msgstr "Klip" - -#: composer/e-msg-composer-address-dialog.c:184 -msgid "Cut selected item into clipboard" -msgstr "Klip valgt punkt ud til klippebordet" - -#: composer/e-msg-composer-address-dialog.c:187 composer/e-msg-composer.c:534 -msgid "Copy" -msgstr "Kopiér" - -#: composer/e-msg-composer-address-dialog.c:188 -msgid "Copy selected item into clipboard" -msgstr "Kopiér valgt punkt til klippebordet" - -#: composer/e-msg-composer-address-dialog.c:191 -#: composer/e-msg-composer-address-dialog.c:199 composer/e-msg-composer.c:535 -msgid "Paste" -msgstr "Indsæt" - -#: composer/e-msg-composer-address-dialog.c:192 -#: composer/e-msg-composer-address-dialog.c:200 -msgid "Paste item from clipboard" -msgstr "Indsæt fra klippebordet" - -#: composer/e-msg-composer-address-dialog.c:528 -msgid "Select recipients' addresses" -msgstr "Vælg modtagernes adresser" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: composer/e-msg-composer-address-dialog.glade.h:7 -msgid "Recipient list:" -msgstr "Modtagelsesliste" - -#: composer/e-msg-composer-address-dialog.glade.h:8 -msgid "Name:" -msgstr "Navn:" - -#: composer/e-msg-composer-address-dialog.glade.h:9 -msgid "Search..." -msgstr "Søg..." - -#: composer/e-msg-composer-address-dialog.glade.h:10 -msgid "Name" -msgstr "Navn" - -#: composer/e-msg-composer-address-dialog.glade.h:11 -msgid "Address" -msgstr "Adresse" - -#: composer/e-msg-composer-address-dialog.glade.h:12 -msgid "Properties..." -msgstr "Egenskaber..." - -#: composer/e-msg-composer-address-dialog.glade.h:13 -msgid "Add..." -msgstr "Tilføj..." - -#: composer/e-msg-composer-address-dialog.glade.h:14 -msgid "To: >>" -msgstr "Til: >>" - -#: composer/e-msg-composer-address-dialog.glade.h:15 -msgid "Cc: >>" -msgstr "Cc: >>" - -#: composer/e-msg-composer-address-dialog.glade.h:16 -msgid "Bcc: >>" -msgstr "Bcc: >>" - -#: composer/e-msg-composer-address-dialog.glade.h:17 -msgid "label9" -msgstr "label9" - -#: composer/e-msg-composer-address-dialog.glade.h:18 -msgid "label7" -msgstr "label7" - -#: composer/e-msg-composer-address-dialog.glade.h:19 -msgid "label8" -msgstr "label8" - -#: composer/e-msg-composer-attachment-bar.c:76 -msgid "1 byte" -msgstr "1 byte" - -#: composer/e-msg-composer-attachment-bar.c:78 -#, c-format -msgid "%u bytes" -msgstr "%u byte" - -#: composer/e-msg-composer-attachment-bar.c:85 -#, c-format -msgid "%.1fK" -msgstr "%.1fk" - -#: composer/e-msg-composer-attachment-bar.c:89 -#, c-format -msgid "%.1fM" -msgstr "%.1fM" - -#: composer/e-msg-composer-attachment-bar.c:93 -#, c-format -msgid "%.1fG" -msgstr "%.1fG" - -#: composer/e-msg-composer-attachment-bar.c:307 -msgid "Add attachment" -msgstr "Vedhæft bilag" - -#: composer/e-msg-composer-attachment-bar.c:364 -msgid "Remove" -msgstr "Fjern" - -#: composer/e-msg-composer-attachment-bar.c:365 -msgid "Remove selected items from the attachment list" -msgstr "Fjern valgte punkter fra bilagslisten" - -#: composer/e-msg-composer-attachment-bar.c:396 -msgid "Add attachment..." -msgstr "Vedhæft bilag..." - -#: composer/e-msg-composer-attachment-bar.c:397 -msgid "Attach a file to the message" -msgstr "Vedhæft bilag til meddelelsen" - -#: composer/e-msg-composer-attachment.c:259 -msgid "Select attachment" -msgstr "Vælg bilag" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: composer/e-msg-composer-attachment.glade.h:7 -msgid "Attachment properties" -msgstr "Egenskaber for bilag" - -#: composer/e-msg-composer-attachment.glade.h:9 -msgid "MIME type:" -msgstr "MIME type:" - -#: composer/e-msg-composer-attachment.glade.h:10 -msgid "File name:" -msgstr "Filnavn:" - -#: composer/e-msg-composer-attachment.glade.h:11 -msgid "Browse..." -msgstr "Bladr..." - -#: composer/e-msg-composer-hdrs.c:89 -msgid "Click here for the address book" -msgstr "Klik her for adressebogen" - -#: composer/e-msg-composer-hdrs.c:124 -msgid "To:" -msgstr "Til:" - -#: composer/e-msg-composer-hdrs.c:125 -msgid "Enter the recipients of the message" -msgstr "Indtast modtagerene for meddelelsen" - -#: composer/e-msg-composer-hdrs.c:129 -msgid "Cc:" -msgstr "Cc:" - -#: composer/e-msg-composer-hdrs.c:130 -msgid "Enter the addresses that will receive a carbon copy of the message" -msgstr "Indtast adresserne som skal modtage en kopi af meddelelsen" - -#: composer/e-msg-composer-hdrs.c:135 -msgid "Bcc:" -msgstr "Bcc:" - -#: composer/e-msg-composer-hdrs.c:136 -msgid "" -"Enter the addresses that will receive a carbon copy of the message without " -"appearing in the recipient list of the message." -msgstr "" -"Indtast adresserne som skal modtage en kopi af meddelelsen uden at komme til " -"syne i meddelelsens modtagerliste." - -#: composer/e-msg-composer-hdrs.c:142 -msgid "Subject:" -msgstr "Emne:" - -#: composer/e-msg-composer-hdrs.c:143 -msgid "Enter the subject of the mail" -msgstr "Indtast emnet for meddelelsen" - -#: composer/e-msg-composer.c:491 -msgid "Save in _folder..." -msgstr "Gem i _mappe..." - -#: composer/e-msg-composer.c:491 -msgid "Save the message in a specified folder" -msgstr "Gem meddelelsen i en specificeret mappe" - -#: composer/e-msg-composer.c:494 composer/e-msg-composer.c:531 -#: mail/folder-browser-factory.c:36 -msgid "Send" -msgstr "Send" - -#: composer/e-msg-composer.c:494 -msgid "Send the message" -msgstr "Send meddelelsen" - -#: composer/e-msg-composer.c:502 -msgid "View _attachments" -msgstr "Vis _bilag" - -#: composer/e-msg-composer.c:502 -msgid "View/hide attachments" -msgstr "Vis/skjul bilag" - -#: composer/e-msg-composer.c:531 -msgid "Send this message" -msgstr "Send denne meddelelse" - -#: composer/e-msg-composer.c:533 -msgid "Cut selected region into the clipboard" -msgstr "Klip valgt område ud til klippebordet" - -#: composer/e-msg-composer.c:534 -msgid "Copy selected region into the clipboard" -msgstr "Kopiér valgt område til klippebordet" - -#: composer/e-msg-composer.c:535 -msgid "Paste selected region into the clipboard" -msgstr "Indsæt valgt område til klippebordet" - -#: composer/e-msg-composer.c:536 -msgid "Undo" -msgstr "Fortryd" - -#: composer/e-msg-composer.c:536 -msgid "Undo last operation" -msgstr "Fortryd sidste operation" - -#: composer/e-msg-composer.c:538 -msgid "Attach" -msgstr "Vedhæft" - -#: composer/e-msg-composer.c:538 -msgid "Attach a file" -msgstr "Vedhæft en fil" - -#: mail/folder-browser-factory.c:35 -msgid "Get mail" -msgstr "Hent post" - -#: mail/folder-browser-factory.c:35 -msgid "Check for new mail" -msgstr "Tjek for ny e-post" - -#: mail/folder-browser-factory.c:36 -msgid "Send a new message" -msgstr "Send en ny meddelelse" - -#: mail/folder-browser-factory.c:37 -msgid "Find" -msgstr "Find" - -#: mail/folder-browser-factory.c:37 -msgid "Find messages" -msgstr "Find meddelelser" - -#: mail/folder-browser-factory.c:41 -msgid "Reply" -msgstr "Svar" - -#: mail/folder-browser-factory.c:41 -msgid "Reply to the sender of this message" -msgstr "Svar til afsenderen af denne meddelelse" - -#: mail/folder-browser-factory.c:42 -msgid "Reply to All" -msgstr "Svar til alle" - -#: mail/folder-browser-factory.c:42 -msgid "Reply to all recipients of this message" -msgstr "Svar til alle modtagere af denne meddelelse" - -#: mail/folder-browser-factory.c:44 -msgid "Forward" -msgstr "Videresend" - -#: mail/folder-browser-factory.c:44 -msgid "Forward this message" -msgstr "Videresend denne meddelelse" - -#: mail/folder-browser-factory.c:48 -msgid "Print" -msgstr "Udskriv" - -#: mail/folder-browser-factory.c:48 -msgid "Print the selected message" -msgstr "Udskriv den valgte meddelelse" - -#: mail/folder-browser-factory.c:50 -msgid "Delete this message" -msgstr "Slet denne meddelelse" - -#: mail/folder-browser-factory.c:67 -msgid "_Expunge" -msgstr "_Udslet" - -#: mail/folder-browser-factory.c:73 -msgid "_Filter Druid" -msgstr "_Filter Druid" - -#: mail/folder-browser-factory.c:186 -msgid "We are sorry, Evolution's Folder Browser can not be initialized." -msgstr "Beklager, Evolutions mappebladrer kan ikke initialiseres." - -#: mail/folder-browser.c:208 -msgid "The URI that the Folder Browser will display" -msgstr "URI'en som mappebladreren vil vise" - -#: mail/folder-browser.c:211 -msgid "Whether a message preview should be shown" -msgstr "Om en forkig-besked skal vises" - -#: mail/main.c:58 -msgid "Mail Component: I could not initialize Bonobo" -msgstr "Postdelen: kunne ikke initialisere Bonobo" - -#: mail/message-list.c:464 -msgid "Priority" -msgstr "Prioritet" - -#: mail/message-list.c:478 -msgid "From" -msgstr "Fra" - -#: mail/message-list.c:485 -msgid "Subject" -msgstr "Emne" - -#: mail/message-list.c:492 -msgid "Sent" -msgstr "Sendt" - -#: mail/message-list.c:499 -msgid "Receive" -msgstr "Modtag" - -#: mail/message-list.c:506 -msgid "To" -msgstr "Til" - -#: mail/message-list.c:513 -msgid "Size" -msgstr "Størrelse" - -#. you might have to call gnome_dialog_run() on the -#. * dialog returned here, I don't remember... -#. -#: shell/e-shell-view-menu.c:62 -msgid "Bug buddy was not found in your $PATH." -msgstr "Bug buddy fandtes ikke i din $PATH" - -#. same as above -#: shell/e-shell-view-menu.c:68 -msgid "Bug buddy could not be run." -msgstr "Bug buddy kunne ikke køres" - -#: shell/e-shell-view-menu.c:111 -msgid "Evolution" -msgstr "Evolution" - -#: shell/e-shell-view-menu.c:113 -msgid "Copyright 1999, 2000 Helix Code, Inc." -msgstr "Ophavsrettigheder 1999, 2000 Helix Code, Inc." - -#: shell/e-shell-view-menu.c:115 -msgid "" -"Evolution is a suite of groupware applications\n" -"for mail, calendaring, and contact management\n" -"within the GNOME desktop environment." -msgstr "" -"Evolution er en samling af gruppeorienterede anvendelser\n" -"til administrering af post, kalender og aftaler\n" -"indenfor GNOMEs skrivebordsmiljø." - -#: shell/e-shell-view-menu.c:185 shell/e-shell-view-menu.c:251 -msgid "_Folder" -msgstr "_Mappe" - -#: shell/e-shell-view-menu.c:189 -msgid "Evolution _Bar Shortcut" -msgstr "Evolution _genvejslinie" - -#: shell/e-shell-view-menu.c:195 -msgid "_Mail message" -msgstr "E-post _meddelelse" - -#: shell/e-shell-view-menu.c:196 shell/e-shell-view-menu.c:199 -msgid "Composes a new mail message" -msgstr "Skriv en ny e-postmeddelelse" - -#: shell/e-shell-view-menu.c:198 -msgid "_Appointment" -msgstr "_Aftale" - -#: shell/e-shell-view-menu.c:201 -msgid "Meeting Re_quest" -msgstr "Møde-forespørgsel" - -#: shell/e-shell-view-menu.c:204 -msgid "_Contact" -msgstr "_Kontakt" - -#: shell/e-shell-view-menu.c:207 -msgid "_Task" -msgstr "_Opgave" - -#: shell/e-shell-view-menu.c:210 -msgid "Task _Request" -msgstr "Opgave _forespørgsel" - -#: shell/e-shell-view-menu.c:213 -msgid "_Journal Entry" -msgstr "_Journal-indgang" - -#: shell/e-shell-view-menu.c:216 -msgid "_Note" -msgstr "_Notat" - -#: shell/e-shell-view-menu.c:226 -msgid "_Selected Items" -msgstr "_Valgte ting" - -#: shell/e-shell-view-menu.c:234 -msgid "_New Folder" -msgstr "_Ny mappe" - -#: shell/e-shell-view-menu.c:242 -msgid "_New" -msgstr "_Ny" - -#: shell/e-shell-view-menu.c:243 -msgid "_Open" -msgstr "_Åbn" - -#: shell/e-shell-view-menu.c:244 -msgid "Clos_e All Items" -msgstr "Luk all_e ting" - -#: shell/e-shell-view-menu.c:244 -msgid "Closes all the open items" -msgstr "Lukker alle åbne ting" - -#: shell/e-shell-view-menu.c:265 -msgid "Show _Shortcut Bar" -msgstr "Vis _genvejs-bjælke" - -#: shell/e-shell-view-menu.c:266 -msgid "Shows the shortcut bar" -msgstr "Viser bjælke med genveje" - -#: shell/e-shell-view-menu.c:268 -msgid "Show _Treeview" -msgstr "Vis _træ" - -#: shell/e-shell-view-menu.c:269 -msgid "Shows the tree view" -msgstr "Viser underpunkter på træ-facon" - -#: shell/e-shell-view-menu.c:284 -msgid "_Submit bug" -msgstr "_Indsend fejlrapport" - -#: shell/e-shell-view-menu.c:285 -msgid "Submit bug-report via bug-buddy" -msgstr "Indsend fejlrapport via bug-buddy" - -#. FIXME: add Favorites here -#: shell/e-shell-view-menu.c:300 -msgid "_Tools" -msgstr "_Værktøj" - -#: shell/e-shell-view-menu.c:301 -msgid "_Actions" -msgstr "H_andlinger" - -#: shell/e-shell.c:157 -#, c-format -msgid "Cannot set up local storage -- %s" -msgstr "Kan ikke opsætte lokal lagring -- %s" - -#: shell/main.c:100 -msgid "" -"Hi. Thanks for taking the time to download this preview release of\n" -"the Evolution groupware suite.\n" -"\n" -"The Evolution team has worked hard to make Evolution as robust,\n" -"extensible, pretty, fast and well-suited to heavy internet users as\n" -"possible. And we're very tired. But we're not done -- not yet.\n" -"\n" -"As you explore Evolution, please understand that most of our work has\n" -"been focused on the backend engine which drives the entire system and\n" -"not on the user interface. We are just cresting the hill now, though,\n" -"and will be pouring most of our love and attention into the UI from\n" -"here out. But at least you know that you're not using demoware.\n" -"\n" -"So, time for the nerdy disclaimer. Evolution will: crash, lose your\n" -"mail, leave stray processes running, consume 100% CPU, race, lock,\n" -"send HTML mail to random mailing lists, and embarass you in front of\n" -"your friends and co-workers. Use at your own risk.\n" -"\n" -"We hope that you enjoy the results of our hard work, and we eagerly\n" -"await your contributions!\n" -msgstr "" -"Hejsa. Tak for at du har taget tid til at hente denne forsøgsudgave \n" -"af Evolution gruppevare samlingen.\n" -"\n" -"Holdet bag Evolution har arbejdet hårdt for at gøre Evolution så robust,\n" -"udvideligt, smukt, hurtigt og veltilpasset til tunge Internet brugere\n" -"som muligt. Og vi er meget trætte. Men vi er ikke færdige - endnu.\n" -"\n" -"Når du udforsker Evolution så fårstå venligst at det meste af vores\n" -"arbejde har været koncentreret omkring de underliggende mekanismer,\n" -"der driver hele systemet, og ikke på brugerfladen. Men vi er netop\n" -"lige kommet over denne bakke, så fra nu af vil vi udøse det meste af vores\n" -"kærlighed og opmærksomhed på brugerfladen. Men i det mindste véd du\n" -"nu at du ikke bruger demonstrationsprogrammel.\n" -"\n" -"So, her er den nørdede ansvarsfraskrivelse. Evolution vil: gå ned,\n" -"tabe din post, efterlade vildfarne kørende processer, bruge 100 %% CPU,\n" -"sende HTML til tilfældige postlister, og ydmyge dig overfor dine\n" -"venner og kolleger. Brug det på eget ansvar.\n" -"\n" -"Vi håber du vil nyde resultaterne af vores hårde arbejde, og vi\n" -"venter ivrigt på dine bidrag!\n" - -#: shell/main.c:129 -msgid "" -"Thanks\n" -"The Evolution Team\n" -msgstr "" -"Tak\n" -"Holdet bag Evolution\n" - -#: shell/main.c:156 -msgid "Cannot initialize the Evolution shell." -msgstr "Kan ikke initialisere Evolution skallen." - -#: shell/main.c:186 -msgid "Cannot initialize the Bonobo component system." -msgstr "Kunne ikke initialisere Bonobo komponentsystemet." - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: widgets/e-table/e-table-config.glade.h:7 -msgid "Fields" -msgstr "Felter" - -#: widgets/e-table/e-table-config.glade.h:8 -msgid "Grouping" -msgstr "Grupering" - -#: widgets/e-table/e-table-config.glade.h:9 -msgid "Sort" -msgstr "Sortér" - -#: widgets/e-table/e-table-config.glade.h:10 -msgid "Filter" -msgstr "Filter" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: widgets/e-table/e-table-group.glade.h:7 -msgid "window1" -msgstr "vindue1" - -#: widgets/e-table/e-table-group.glade.h:8 -msgid "Available fields" -msgstr "Tilgængelige felter" - -#: widgets/e-table/e-table-group.glade.h:9 -msgid "label1" -msgstr "label1" - -#: widgets/e-table/e-table-group.glade.h:10 -msgid "Show in this order" -msgstr "Vis i denne orden" - -#: widgets/e-table/e-table-group.glade.h:11 -msgid "label2" -msgstr "label2" - -#: widgets/e-table/e-table-group.glade.h:12 -msgid "Add >>" -msgstr "Tilføj >>" - -#: widgets/e-table/e-table-group.glade.h:13 -msgid "<< Remove" -msgstr "<< Fjern" diff --git a/po/el.po b/po/el.po deleted file mode 100644 index 4949238aa7..0000000000 --- a/po/el.po +++ /dev/null @@ -1,1173 +0,0 @@ -# Greek translation of evolution. -# Copyright (C) 2000 Free Software Foundation, Inc. -# Spiros Papadimitriou , 2000. -# -msgid "" -msgstr "" -"Project-Id-Version: evolution 0.1\n" -"POT-Creation-Date: 2000-05-27 20:01+0100\n" -"PO-Revision-Date: 2000-04-04 19:42-0500\n" -"Last-Translator: Spiros Papadimitriou \n" -"Language-Team: Greek \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=iso-8859-7\n" -"Content-Transfer-Encoding: 8bit\n" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/contact-editor/e-contact-editor-strings.h:7 -#, fuzzy -msgid "Contact Editor" -msgstr "_Ãíùñéìßá" - -#: addressbook/contact-editor/e-contact-editor-strings.h:8 -msgid "_Full Name..." -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:9 -#, fuzzy -msgid "Company:" -msgstr "ÁíôéãñáöÞ" - -#: addressbook/contact-editor/e-contact-editor-strings.h:10 -msgid "File As:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:11 -msgid "Web page address:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:12 -msgid "Wants to receive _HTML mail" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:13 -msgid "Address:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:14 -msgid "_Business" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:15 -#, fuzzy -msgid "_Home" -msgstr "Óçìåßù_ìá" - -#: addressbook/contact-editor/e-contact-editor-strings.h:16 -msgid "Business _Fax" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:17 -#, fuzzy -msgid "_Mobile" -msgstr "_ÌÞíõìá" - -#: addressbook/contact-editor/e-contact-editor-strings.h:18 -msgid "Primary Email" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:19 -msgid "Business" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:20 -msgid "This is the _mailing address" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:21 -#, fuzzy -msgid "_Contacts..." -msgstr "_Ãíùñéìßá" - -#: addressbook/contact-editor/e-contact-editor-strings.h:22 -msgid "Ca_tegories..." -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:23 -msgid "Job Title" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:24 -msgid "General" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:25 -msgid "Department:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:26 -msgid "Office:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:27 -msgid "Profession:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:28 -msgid "Nickname:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:29 -msgid "Spouse:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:30 -msgid "Birthday:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:31 -msgid "Assistant's name:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:32 -msgid "Manager's Name:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:33 -msgid "Anniversary:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:34 -#, fuzzy -msgid "Notes:" -msgstr "Óçìåßù_ìá" - -#: addressbook/contact-editor/e-contact-editor-strings.h:35 -msgid "Details" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:36 -#: addressbook/contact-editor/e-contact-editor-strings.h:41 -msgid "Add" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:37 -#: mail/folder-browser-factory.c:50 -msgid "Delete" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:38 -msgid "Phone Types" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:39 -#: addressbook/contact-editor/e-contact-editor-strings.h:40 -msgid "New phone type" -msgstr "" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/contact-editor/fullname-strings.h:7 -msgid "Check Full Name" -msgstr "" - -#: addressbook/contact-editor/fullname-strings.h:8 -msgid "_Title:" -msgstr "" - -#: addressbook/contact-editor/fullname-strings.h:9 -msgid "_First:" -msgstr "" - -#: addressbook/contact-editor/fullname-strings.h:10 -#, fuzzy -msgid "_Middle:" -msgstr "_ÌÞíõìá" - -#: addressbook/contact-editor/fullname-strings.h:11 -msgid "_Last:" -msgstr "" - -#: addressbook/contact-editor/fullname-strings.h:12 -msgid "_Suffix:" -msgstr "" - -#: addressbook/contact-editor/fullname-strings.h:13 -msgid "" -"\n" -"Mr.\n" -"Mrs.\n" -"Dr.\n" -msgstr "" - -#: addressbook/contact-editor/fullname-strings.h:18 -msgid "" -"\n" -"Sr.\n" -"Jr.\n" -"I\n" -"II\n" -"III\n" -"Esq.\n" -msgstr "" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/gui/component/ldap-server-dialog.glade.h:7 -#: composer/e-msg-composer-attachment.glade.h:8 -msgid "Description:" -msgstr "" - -#: addressbook/gui/component/ldap-server-dialog.glade.h:8 -msgid "LDAP Server:" -msgstr "" - -#: addressbook/gui/component/ldap-server-dialog.glade.h:9 -msgid "Port Number:" -msgstr "" - -#: addressbook/gui/component/ldap-server-dialog.glade.h:10 -msgid "Root DN:" -msgstr "" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/printing/e-contact-print.glade.h:7 -msgid "Page Setup:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:8 -msgid "Style name:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:9 -msgid "Preview:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:10 -#, fuzzy -msgid "Options" -msgstr "Å_íÝñãåéåò" - -#: addressbook/printing/e-contact-print.glade.h:11 -msgid "Include:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:12 -#, fuzzy -msgid "Sections:" -msgstr "Å_íÝñãåéåò" - -#: addressbook/printing/e-contact-print.glade.h:13 -msgid "Immediately follow each other" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:14 -msgid "Letter tabs on side" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:15 -msgid "Headings for each letter" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:16 -msgid "Start on a new page" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:17 -msgid "Number of columns:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:18 -msgid "Blank forms at end:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:19 -#, fuzzy -msgid "Fonts" -msgstr "Ãíùñéìßåò" - -#: addressbook/printing/e-contact-print.glade.h:20 -#: addressbook/printing/e-contact-print.glade.h:21 -#: addressbook/printing/e-contact-print.glade.h:51 -#: addressbook/printing/e-contact-print.glade.h:54 -msgid "Font..." -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:22 -msgid "Headings" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:23 -msgid "10 pt. Tahoma" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:24 -#, fuzzy -msgid "Body" -msgstr "ÓÞìåñá" - -#: addressbook/printing/e-contact-print.glade.h:25 -msgid "8 pt. Tahoma" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:26 -msgid "Shading" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:27 -msgid "Print using gray shading" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:28 -#, fuzzy -msgid "Format" -msgstr "Áðü" - -#: addressbook/printing/e-contact-print.glade.h:29 -#: addressbook/printing/e-contact-print.glade.h:50 -#, fuzzy -msgid "Paper" -msgstr "Åðéêüëëçóç" - -#: addressbook/printing/e-contact-print.glade.h:30 -msgid "Type:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:31 -#: addressbook/printing/e-contact-print.glade.h:43 -msgid "label26" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:32 -#: addressbook/printing/e-contact-print.glade.h:44 -msgid "Dimensions:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:33 -#: addressbook/printing/e-contact-print.glade.h:45 -msgid "Width:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:34 -#: addressbook/printing/e-contact-print.glade.h:46 -msgid "Height:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:35 -msgid "Paper source:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:36 -msgid "Margins" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:37 -#, fuzzy -msgid "Top:" -msgstr "Ðñïò:" - -#: addressbook/printing/e-contact-print.glade.h:38 -msgid "Bottom:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:39 -msgid "Left:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:40 -msgid "Right:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:41 -#, fuzzy -msgid "Page" -msgstr "Åðéêüëëçóç" - -#: addressbook/printing/e-contact-print.glade.h:42 -#, fuzzy -msgid "Size:" -msgstr "ÌÝãåèïò" - -#: addressbook/printing/e-contact-print.glade.h:47 -msgid "Orientation" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:48 -#, fuzzy -msgid "Portrait" -msgstr "Ðñïôåñáéüôçôá" - -#: addressbook/printing/e-contact-print.glade.h:49 -msgid "Landscape" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:52 -msgid "Header" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:53 -msgid "Footer:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:55 -msgid "Reverse on even pages" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:56 -msgid "Header/Footer" -msgstr "" - -#: composer/e-msg-composer-address-dialog.c:183 composer/e-msg-composer.c:533 -msgid "Cut" -msgstr "ÊïðÞ" - -#: composer/e-msg-composer-address-dialog.c:184 -msgid "Cut selected item into clipboard" -msgstr "ÊïðÞ åðéëåãìÝíïõ áíôéêåéìÝíïõ óôï ðñü÷åéñï" - -#: composer/e-msg-composer-address-dialog.c:187 composer/e-msg-composer.c:534 -msgid "Copy" -msgstr "ÁíôéãñáöÞ" - -#: composer/e-msg-composer-address-dialog.c:188 -msgid "Copy selected item into clipboard" -msgstr "ÁíôéãñáöÞ åðéëåãìÝíïõ áíôéêåéìÝíïõ óôï ðñü÷åéñï" - -#: composer/e-msg-composer-address-dialog.c:191 -#: composer/e-msg-composer-address-dialog.c:199 composer/e-msg-composer.c:535 -msgid "Paste" -msgstr "Åðéêüëëçóç" - -#: composer/e-msg-composer-address-dialog.c:192 -#: composer/e-msg-composer-address-dialog.c:200 -msgid "Paste item from clipboard" -msgstr "Åðéêüëëçóç áíôéêåéìÝíïõ áðï ôï ðñü÷åéñï" - -#: composer/e-msg-composer-address-dialog.c:528 -msgid "Select recipients' addresses" -msgstr "ÅðéëÝîôå ôç äéåýèõíóç ôïõ ðáñáëÞðôç" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: composer/e-msg-composer-address-dialog.glade.h:7 -msgid "Recipient list:" -msgstr "" - -#: composer/e-msg-composer-address-dialog.glade.h:8 -msgid "Name:" -msgstr "" - -#: composer/e-msg-composer-address-dialog.glade.h:9 -msgid "Search..." -msgstr "" - -#: composer/e-msg-composer-address-dialog.glade.h:10 -msgid "Name" -msgstr "" - -#: composer/e-msg-composer-address-dialog.glade.h:11 -msgid "Address" -msgstr "" - -#: composer/e-msg-composer-address-dialog.glade.h:12 -#, fuzzy -msgid "Properties..." -msgstr "Éäéüôçôåò" - -#: composer/e-msg-composer-address-dialog.glade.h:13 -msgid "Add..." -msgstr "" - -#: composer/e-msg-composer-address-dialog.glade.h:14 -#, fuzzy -msgid "To: >>" -msgstr "Ðñïò:" - -#: composer/e-msg-composer-address-dialog.glade.h:15 -#, fuzzy -msgid "Cc: >>" -msgstr "Áíôßãñáöï:" - -#: composer/e-msg-composer-address-dialog.glade.h:16 -#, fuzzy -msgid "Bcc: >>" -msgstr "Êñõöü áíôßãñáöï:" - -#: composer/e-msg-composer-address-dialog.glade.h:17 -msgid "label9" -msgstr "" - -#: composer/e-msg-composer-address-dialog.glade.h:18 -msgid "label7" -msgstr "" - -#: composer/e-msg-composer-address-dialog.glade.h:19 -msgid "label8" -msgstr "" - -#: composer/e-msg-composer-attachment-bar.c:76 -msgid "1 byte" -msgstr "1 byte" - -#: composer/e-msg-composer-attachment-bar.c:78 -#, c-format -msgid "%u bytes" -msgstr "%u byte" - -#: composer/e-msg-composer-attachment-bar.c:85 -#, c-format -msgid "%.1fK" -msgstr "%.1fK" - -#: composer/e-msg-composer-attachment-bar.c:89 -#, c-format -msgid "%.1fM" -msgstr "%.1fM" - -#: composer/e-msg-composer-attachment-bar.c:93 -#, c-format -msgid "%.1fG" -msgstr "%.1fG" - -#: composer/e-msg-composer-attachment-bar.c:307 -msgid "Add attachment" -msgstr "Íåá åðéóýíáøç" - -#: composer/e-msg-composer-attachment-bar.c:364 -msgid "Remove" -msgstr "ÄéáãñáöÞ" - -#: composer/e-msg-composer-attachment-bar.c:365 -msgid "Remove selected items from the attachment list" -msgstr "ÄéáãñáöÞ åðéëåãìÝíùí áíôéêåéìÝíùí áðü ôïí êáôÜëïãï åðéóõíÜøåùí" - -#: composer/e-msg-composer-attachment-bar.c:396 -msgid "Add attachment..." -msgstr "ÍÝá åðéóýíáøç..." - -#: composer/e-msg-composer-attachment-bar.c:397 -msgid "Attach a file to the message" -msgstr "Åðéóýíáøç áñ÷åßïõ óôï ìÞíõìá" - -#: composer/e-msg-composer-attachment.c:259 -msgid "Select attachment" -msgstr "ÅðéëÝîôå åðéóýíáøç" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: composer/e-msg-composer-attachment.glade.h:7 -#, fuzzy -msgid "Attachment properties" -msgstr "Åðéóýíáøç" - -#: composer/e-msg-composer-attachment.glade.h:9 -msgid "MIME type:" -msgstr "" - -#: composer/e-msg-composer-attachment.glade.h:10 -msgid "File name:" -msgstr "" - -#: composer/e-msg-composer-attachment.glade.h:11 -msgid "Browse..." -msgstr "" - -#: composer/e-msg-composer-hdrs.c:89 -msgid "Click here for the address book" -msgstr "Êëßê åäþ ãéá ôï äéåõèõíóéïëüãéï" - -#: composer/e-msg-composer-hdrs.c:124 -msgid "To:" -msgstr "Ðñïò:" - -#: composer/e-msg-composer-hdrs.c:125 -msgid "Enter the recipients of the message" -msgstr "ÅéóÜãåôå ôïí ðáñáëÞðôç ôïõ ìçíýìáôïò" - -#: composer/e-msg-composer-hdrs.c:129 -msgid "Cc:" -msgstr "Áíôßãñáöï:" - -#: composer/e-msg-composer-hdrs.c:130 -msgid "Enter the addresses that will receive a carbon copy of the message" -msgstr "ÅéóÜãåôå ôéò äéåõèýíóåéò üðïõ èá óôáëåß áíôßãñáöï ôïõ ìçíýìáôïò" - -#: composer/e-msg-composer-hdrs.c:135 -msgid "Bcc:" -msgstr "Êñõöü áíôßãñáöï:" - -#: composer/e-msg-composer-hdrs.c:136 -msgid "" -"Enter the addresses that will receive a carbon copy of the message without " -"appearing in the recipient list of the message." -msgstr "" -"ÅéóÜãåôå ôéò äéåõèýíóåéò üðïõ èá óôáëåß áíôßãñáöï ôïõ ìçíýìáôïò ÷ùñßò áõôÝò " -"íá åìöáíéóôïýí óôïí êáôÜëïãï ðáñáëçðôþí ôïõ ìçíýìáôïò." - -#: composer/e-msg-composer-hdrs.c:142 -msgid "Subject:" -msgstr "ÈÝìá:" - -#: composer/e-msg-composer-hdrs.c:143 -msgid "Enter the subject of the mail" -msgstr "ÅéóÜãåôå ôï èÝìá ôïõ ìçíýìáôïò" - -#: composer/e-msg-composer.c:491 -msgid "Save in _folder..." -msgstr "ÁðïèÞêåõóç óôï öÜêåëëï..." - -#: composer/e-msg-composer.c:491 -msgid "Save the message in a specified folder" -msgstr "ÁðïèÞêåõóç ôïõ ìçíýìáôïò óôïí êáèïñéóìÝíï öÜêåëëï" - -#: composer/e-msg-composer.c:494 composer/e-msg-composer.c:531 -#: mail/folder-browser-factory.c:36 -msgid "Send" -msgstr "ÁðïóôïëÞ" - -#: composer/e-msg-composer.c:494 -msgid "Send the message" -msgstr "ÁðïóôïëÞ ôïõ ìçíýìáôïò" - -#: composer/e-msg-composer.c:502 -msgid "View _attachments" -msgstr "ÅìöÜíéóç åðéóõíÜ_øåùí" - -#: composer/e-msg-composer.c:502 -msgid "View/hide attachments" -msgstr "ÅìöÜíéóç/áðüêñõøç åðéóõíÜøåùí" - -#: composer/e-msg-composer.c:531 -msgid "Send this message" -msgstr "ÁðïóôïëÞ ðáñüíôïò ìçíýìáôïò" - -#: composer/e-msg-composer.c:533 -msgid "Cut selected region into the clipboard" -msgstr "ÊïðÞ åðéëåãìÝíçò ðåñéï÷Þò óôï ðñü÷åéñï" - -#: composer/e-msg-composer.c:534 -msgid "Copy selected region into the clipboard" -msgstr "ÁíôéãñáöÞ åðéëåãìÝíçò ðåñéï÷Þò óôï ðñü÷åéñï" - -#: composer/e-msg-composer.c:535 -msgid "Paste selected region into the clipboard" -msgstr "Åðéêüëëçóç åðéëåãìÝíçò ðåñéï÷Þò áðü ôï ðñü÷åéñï" - -#: composer/e-msg-composer.c:536 -msgid "Undo" -msgstr "Áêýñùóç" - -#: composer/e-msg-composer.c:536 -msgid "Undo last operation" -msgstr "Áêýñùóç ôåëåõôáßáò ëåéôïõñãßáò" - -#: composer/e-msg-composer.c:538 -msgid "Attach" -msgstr "Åðéóýíáøç" - -#: composer/e-msg-composer.c:538 -msgid "Attach a file" -msgstr "Åðéóýíáøç áñ÷åßïõ" - -#: mail/folder-browser-factory.c:35 -msgid "Get mail" -msgstr "" - -#: mail/folder-browser-factory.c:35 -msgid "Check for new mail" -msgstr "" - -#: mail/folder-browser-factory.c:36 -#, fuzzy -msgid "Send a new message" -msgstr "ÁðïóôïëÞ ôïõ ìçíýìáôïò" - -#: mail/folder-browser-factory.c:37 -msgid "Find" -msgstr "" - -#: mail/folder-browser-factory.c:37 -#, fuzzy -msgid "Find messages" -msgstr "ÁðåóôáëìÝíá ìçíýìáôá" - -#: mail/folder-browser-factory.c:41 -msgid "Reply" -msgstr "" - -#: mail/folder-browser-factory.c:41 -#, fuzzy -msgid "Reply to the sender of this message" -msgstr "ÅéóÜãåôå ôïí ðáñáëÞðôç ôïõ ìçíýìáôïò" - -#: mail/folder-browser-factory.c:42 -msgid "Reply to All" -msgstr "" - -#: mail/folder-browser-factory.c:42 -#, fuzzy -msgid "Reply to all recipients of this message" -msgstr "ÅéóÜãåôå ôïí ðáñáëÞðôç ôïõ ìçíýìáôïò" - -#: mail/folder-browser-factory.c:44 -msgid "Forward" -msgstr "" - -#: mail/folder-browser-factory.c:44 -#, fuzzy -msgid "Forward this message" -msgstr "ÁðïóôïëÞ ðáñüíôïò ìçíýìáôïò" - -#: mail/folder-browser-factory.c:48 -#, fuzzy -msgid "Print" -msgstr "Ðñïôåñáéüôçôá" - -#: mail/folder-browser-factory.c:48 -#, fuzzy -msgid "Print the selected message" -msgstr "ÅéóÜãåôå ôïí ðáñáëÞðôç ôïõ ìçíýìáôïò" - -#: mail/folder-browser-factory.c:50 -#, fuzzy -msgid "Delete this message" -msgstr "ÁðïóôïëÞ ðáñüíôïò ìçíýìáôïò" - -#: mail/folder-browser-factory.c:67 -msgid "_Expunge" -msgstr "" - -#: mail/folder-browser-factory.c:73 -msgid "_Filter Druid" -msgstr "" - -#: mail/folder-browser-factory.c:186 -msgid "We are sorry, Evolution's Folder Browser can not be initialized." -msgstr "" -"Ìáò óõã÷øñåßôå, ç áñ÷éêïðïßçóç ôïõ åîåñåõíçôÞ öáêÝëëùí ôïõ Evolution áðÝôõ÷å." - -#: mail/folder-browser.c:208 -msgid "The URI that the Folder Browser will display" -msgstr "Ôï URI ðïõ èá åìöáíßóåé ï ÅîåñåõíçôÞò ÖáêÝëëùí" - -#: mail/folder-browser.c:211 -msgid "Whether a message preview should be shown" -msgstr "¸áí èÝëåôå Þ ï÷é ðñïåðéóêüðéóç ìçíõìÜôùí" - -#: mail/main.c:58 -msgid "Mail Component: I could not initialize Bonobo" -msgstr "ÌïíÜäá Ôá÷/ìåßïõ: Áñ÷éêïðïßçóç ôïõ Bonobo áäýíáôç" - -#: mail/message-list.c:464 -msgid "Priority" -msgstr "Ðñïôåñáéüôçôá" - -#: mail/message-list.c:478 -msgid "From" -msgstr "Áðü" - -#: mail/message-list.c:485 -msgid "Subject" -msgstr "ÈÝìá" - -#: mail/message-list.c:492 -msgid "Sent" -msgstr "ÅóôÜëç" - -#: mail/message-list.c:499 -msgid "Receive" -msgstr "ÅëÞöèç" - -#: mail/message-list.c:506 -msgid "To" -msgstr "Ðñïò" - -#: mail/message-list.c:513 -msgid "Size" -msgstr "ÌÝãåèïò" - -#. you might have to call gnome_dialog_run() on the -#. * dialog returned here, I don't remember... -#. -#: shell/e-shell-view-menu.c:62 -msgid "Bug buddy was not found in your $PATH." -msgstr "" - -#. same as above -#: shell/e-shell-view-menu.c:68 -msgid "Bug buddy could not be run." -msgstr "" - -#: shell/e-shell-view-menu.c:111 -msgid "Evolution" -msgstr "" - -#: shell/e-shell-view-menu.c:113 -msgid "Copyright 1999, 2000 Helix Code, Inc." -msgstr "" - -#: shell/e-shell-view-menu.c:115 -msgid "" -"Evolution is a suite of groupware applications\n" -"for mail, calendaring, and contact management\n" -"within the GNOME desktop environment." -msgstr "" - -#: shell/e-shell-view-menu.c:185 shell/e-shell-view-menu.c:251 -msgid "_Folder" -msgstr "_ÖÜêåëëïò" - -#: shell/e-shell-view-menu.c:189 -msgid "Evolution _Bar Shortcut" -msgstr "Ã_ñáììÞ Óõíôïìåýóåùí ôïõ Evolution" - -#: shell/e-shell-view-menu.c:195 -msgid "_Mail message" -msgstr "_ÌÞíõìá" - -#: shell/e-shell-view-menu.c:196 shell/e-shell-view-menu.c:199 -msgid "Composes a new mail message" -msgstr "ÓõããñáöÞ íÝïõ ìçíýìáôïò" - -#: shell/e-shell-view-menu.c:198 -msgid "_Appointment" -msgstr "Ñ_áíôåâïý" - -#: shell/e-shell-view-menu.c:201 -msgid "Meeting Re_quest" -msgstr "Áß_ôçóç ÓõíÜíôçóçò" - -#: shell/e-shell-view-menu.c:204 -msgid "_Contact" -msgstr "_Ãíùñéìßá" - -#: shell/e-shell-view-menu.c:207 -msgid "_Task" -msgstr "Åêêñåìü_ôçôá" - -#: shell/e-shell-view-menu.c:210 -msgid "Task _Request" -msgstr "Áßôç_óç Åêêñåìüôçôáò" - -#: shell/e-shell-view-menu.c:213 -msgid "_Journal Entry" -msgstr "Êáôá÷þñçóç Çìåñï_ëïãßïõ" - -#: shell/e-shell-view-menu.c:216 -msgid "_Note" -msgstr "Óçìåßù_ìá" - -#: shell/e-shell-view-menu.c:226 -msgid "_Selected Items" -msgstr "Åðéëå_ãìÝíá Áíôéêåßìåíá" - -#: shell/e-shell-view-menu.c:234 -msgid "_New Folder" -msgstr "_ÍÝïò ÖÜêåëëïò" - -#: shell/e-shell-view-menu.c:242 -msgid "_New" -msgstr "_ÍÝï" - -#: shell/e-shell-view-menu.c:243 -msgid "_Open" -msgstr "¶íïé_ãìá" - -#: shell/e-shell-view-menu.c:244 -msgid "Clos_e All Items" -msgstr "Êë_åßóéìï ¼ëùí" - -#: shell/e-shell-view-menu.c:244 -msgid "Closes all the open items" -msgstr "Êëåßóéìï üëùí ôùí áíïé÷ôþí áíôéêåéìÝíùí" - -#: shell/e-shell-view-menu.c:265 -#, fuzzy -msgid "Show _Shortcut Bar" -msgstr "ÄéáãñáöÞ áðü ÃñáììÞ Óõíôïìåýóåùí" - -#: shell/e-shell-view-menu.c:266 -msgid "Shows the shortcut bar" -msgstr "" - -#: shell/e-shell-view-menu.c:268 -msgid "Show _Treeview" -msgstr "" - -#: shell/e-shell-view-menu.c:269 -msgid "Shows the tree view" -msgstr "" - -#: shell/e-shell-view-menu.c:284 -msgid "_Submit bug" -msgstr "" - -#: shell/e-shell-view-menu.c:285 -msgid "Submit bug-report via bug-buddy" -msgstr "" - -#. FIXME: add Favorites here -#: shell/e-shell-view-menu.c:300 -msgid "_Tools" -msgstr "Å_ñãáëåßá" - -#: shell/e-shell-view-menu.c:301 -msgid "_Actions" -msgstr "Å_íÝñãåéåò" - -#: shell/e-shell.c:157 -#, c-format -msgid "Cannot set up local storage -- %s" -msgstr "" - -#: shell/main.c:100 -msgid "" -"Hi. Thanks for taking the time to download this preview release of\n" -"the Evolution groupware suite.\n" -"\n" -"The Evolution team has worked hard to make Evolution as robust,\n" -"extensible, pretty, fast and well-suited to heavy internet users as\n" -"possible. And we're very tired. But we're not done -- not yet.\n" -"\n" -"As you explore Evolution, please understand that most of our work has\n" -"been focused on the backend engine which drives the entire system and\n" -"not on the user interface. We are just cresting the hill now, though,\n" -"and will be pouring most of our love and attention into the UI from\n" -"here out. But at least you know that you're not using demoware.\n" -"\n" -"So, time for the nerdy disclaimer. Evolution will: crash, lose your\n" -"mail, leave stray processes running, consume 100% CPU, race, lock,\n" -"send HTML mail to random mailing lists, and embarass you in front of\n" -"your friends and co-workers. Use at your own risk.\n" -"\n" -"We hope that you enjoy the results of our hard work, and we eagerly\n" -"await your contributions!\n" -msgstr "" - -#: shell/main.c:129 -msgid "" -"Thanks\n" -"The Evolution Team\n" -msgstr "" - -#: shell/main.c:156 -msgid "Cannot initialize the Evolution shell." -msgstr "" - -#: shell/main.c:186 -#, fuzzy -msgid "Cannot initialize the Bonobo component system." -msgstr "Áñ÷éêïðïßçóçò ôïõ óõóôÞìáôïò ìïíÜäùí Bonobo áíåðéôõ÷Þò" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: widgets/e-table/e-table-config.glade.h:7 -msgid "Fields" -msgstr "" - -#: widgets/e-table/e-table-config.glade.h:8 -msgid "Grouping" -msgstr "" - -#: widgets/e-table/e-table-config.glade.h:9 -msgid "Sort" -msgstr "" - -#: widgets/e-table/e-table-config.glade.h:10 -#, fuzzy -msgid "Filter" -msgstr "_ÖÜêåëëïò" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: widgets/e-table/e-table-group.glade.h:7 -msgid "window1" -msgstr "" - -#: widgets/e-table/e-table-group.glade.h:8 -msgid "Available fields" -msgstr "" - -#: widgets/e-table/e-table-group.glade.h:9 -msgid "label1" -msgstr "" - -#: widgets/e-table/e-table-group.glade.h:10 -msgid "Show in this order" -msgstr "" - -#: widgets/e-table/e-table-group.glade.h:11 -msgid "label2" -msgstr "" - -#: widgets/e-table/e-table-group.glade.h:12 -msgid "Add >>" -msgstr "" - -#: widgets/e-table/e-table-group.glade.h:13 -#, fuzzy -msgid "<< Remove" -msgstr "ÄéáãñáöÞ" - -#~ msgid "" -#~ "Evolution detected that the file `%s' is a not a directory.\n" -#~ "\n" -#~ "Evolution can rename the file, delete the file or shutdown and\n" -#~ "let you fix the problem." -#~ msgstr "" -#~ "Ôï Evolution âñÞêå üôé ôï áñ÷åßï \"%s\" äåí åßíáé êáôÜëïãïò.\n" -#~ "\n" -#~ "Ôï Evolution ìðïñåß íá ìåôïíïìÜóåé ôï áñ÷åßï, íá ôï äéáãñÜøåé Þ íá\n" -#~ "ôåñìáôßóåé þóôå íá äéïñèþóåôå ôï ðñüâëçìá." - -#~ msgid "" -#~ "This is a development version of Evolution.\n" -#~ " Using the mail component on your mail files\n" -#~ " is extremely hazardous.\n" -#~ "Please backup all your mails before trying\n" -#~ " this program. \n" -#~ " You have been warned\n" -#~ msgstr "" -#~ "ÁõôÞ åßíáé ðåéñáìáôéêÞ Ýêäïóç ôïõ Evolution.\n" -#~ " Ç ÷ñÞóç ôïõ ôìÞìáôïò çë. ôá÷õäñïìåßïõ ãéá ôá áñ÷åßá\n" -#~ " ìçíõìÜôùí åßíáé éäéáßôåñá åðéêßíäõíç.\n" -#~ "Ðáñáêáëïýìå êÜíôå áíôßãñáöá ôùí ìçíõìÜôùí óáò ðñßí\n" -#~ " äïêéìÜóåôå ôï ðáñüí ðñüãñáììá. \n" -#~ " ¸÷åôå ðñïåéäïðïéçèåß!\n" - -#~ msgid "" -#~ "An exception occured while trying to load data into the component with " -#~ "PersistStream" -#~ msgstr "" -#~ "ÐñïÝêõøå åîáßñåóç êáôÜ ôçí áðüðåéñá áíÜãíùóçò äåäïìÝíùí ìå PersistStream áðü " -#~ "ôç ìïíÜäá" - -#~ msgid "The %s component doesn't support PersistStream!\n" -#~ msgstr "Ç ìïíÜäá %s äåí õðïóôçñßæåé ôá PersistStream!\n" - -#~ msgid "Online status" -#~ msgstr "ÊáôÜóôáóç óýíäåóçò" - -#~ msgid "Message status" -#~ msgstr "ÊáôÜóôáóç ìçíõìÜôùí" - -#~ msgid "A folder containing mail items" -#~ msgstr "ÖÜêåëëïò ðïõ ðåñéÝ÷åé ìçíýìáôá" - -#~ msgid "A folder containing contacts" -#~ msgstr "ÖÜêåëëïò ðïõ ðåñéÝ÷åé ãíùñéìßåò" - -#~ msgid "A folder containing calendar entries" -#~ msgstr "ÖÜêåëëïò ðïõ ðåñéÝ÷åé óôïé÷åßá çìåñïëïãßïõ" - -#~ msgid "A folder containing tasks" -#~ msgstr "ÖÜêåëïò ðïõ ðåñéÝ÷åé åêêñåìüôçôåò" - -#~ msgid "Evolution can not create its local folders" -#~ msgstr "Ôï Evolution äå ìðïñåß íá äçìéïõñãÞóåé ôïõò ôïðéêïýò öáêÝëëïõò" - -#~ msgid "A service containing mail items" -#~ msgstr "Õðçñåóßá ðïõ ðåñéÝ÷åé ìçíýìáôá" - -#~ msgid "A service containing contacts" -#~ msgstr "Õðçñåóßá ðïõ ðåñéÝ÷åé ãíùñéìßåò" - -#~ msgid "A service containing calendar entries" -#~ msgstr "Õðçñåóßá ðïõ ðåñéÝ÷åé óôïé÷åßá çìåñïëïãßïõ" - -#~ msgid "A service containing tasks" -#~ msgstr "Õðçñåóßá ðïõ ðåñéÝ÷åé åêêñåìüôçôåò" - -#~ msgid "Large Icons" -#~ msgstr "ÌåãÜëá Åéêïíßäéá" - -#~ msgid "Small Icons" -#~ msgstr "ÌéêñÜ Åéêïíßäéá" - -#~ msgid "Add New Group" -#~ msgstr "ÍÝá ÏìÜäá" - -#~ msgid "Remove Group" -#~ msgstr "ÄéáãñáöÞ ÏìÜäáò" - -#~ msgid "Rename Group" -#~ msgstr "Ìåôïíïìáóßá ÏìÜäáò" - -#~ msgid "Add Shortcut" -#~ msgstr "ÍÝá Óõíôüìåõóç" - -#~ msgid "Open Folder" -#~ msgstr "¶íïéãìá ÖáêÝëëïõ" - -#~ msgid "Open in New Window" -#~ msgstr "¶íïéãìá óå ÍÝï ÐáñÜèõñï" - -#~ msgid "Advanced Find" -#~ msgstr "ÁíáæÞôçóç ãéá Ðñï÷ùñçìÝíïõò" - -#~ msgid "Rename Shortcut" -#~ msgstr "Ìåôïíïìáóßá Óõíôüìåõóçò" - -#~ msgid "Executive Summary" -#~ msgstr "Ðåñßëçøç" - -#~ msgid "Inbox" -#~ msgstr "Åéóåñ÷üìåíá" - -#~ msgid "New mail messages" -#~ msgstr "ÍÝá ìçíýìáôá" - -#~ msgid "Sent mail messages" -#~ msgstr "ÁðåóôáëìÝíá ìçíýìáôá" - -#~ msgid "Drafts" -#~ msgstr "Ðñü÷åéñá" - -#~ msgid "Draft mail messages" -#~ msgstr "Ðñü÷åéñá ìçíýìáôá" - -#~ msgid "Calendar" -#~ msgstr "Çìåñïëüãéï" - -#~ msgid "Your calendar" -#~ msgstr "Ôï çìåñïëüãéü óáò" - -#~ msgid "Your contacts list" -#~ msgstr "Ï êáôÜëïãïò ãíùñéìéþí óáò" - -#~ msgid "Tasks" -#~ msgstr "Åêêñåìüôçôåò" - -#~ msgid "Tasks list" -#~ msgstr "ÊáôÜëïãïò åêêñåìïôÞôùí" - -#~ msgid "Main Shortcuts" -#~ msgstr "Êõñßùò Óõíôïìåýóåéò" - -#~ msgid "Other Shortcuts" -#~ msgstr "ËïéðÝò Óõíôïìåýóåéò" - -#~ msgid "New group" -#~ msgstr "ÍÝá ÏìÜäá" - -#~ msgid "Enables some debugging functions" -#~ msgstr "Åíåñãïðïßçóç ìåñéêþí ëåéôïõñãéþí áðïóöáëìÜôùóçò" - -#~ msgid "LEVEL" -#~ msgstr "ÅÐÉÐÅÄÏ" diff --git a/po/es.po b/po/es.po deleted file mode 100644 index ab43402b8f..0000000000 --- a/po/es.po +++ /dev/null @@ -1,1036 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Free Software Foundation, Inc. -# Héctor García Álvarez , 2000. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: evolution VERSION\n" -"POT-Creation-Date: 2000-05-27 20:01+0100\n" -"PO-Revision-Date: 2000-05-03 14:26+0200\n" -"Last-Translator: Héctor García Alvarez \n" -"Language-Team: LANGUAGE \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=iso-8859-1\n" -"Content-Transfer-Encoding: 8bit\n" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/contact-editor/e-contact-editor-strings.h:7 -msgid "Contact Editor" -msgstr "Editor de contactos" - -#: addressbook/contact-editor/e-contact-editor-strings.h:8 -msgid "_Full Name..." -msgstr "_Nombre completo..." - -#: addressbook/contact-editor/e-contact-editor-strings.h:9 -msgid "Company:" -msgstr "Compañia:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:10 -msgid "File As:" -msgstr "Archivar como:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:11 -msgid "Web page address:" -msgstr "Dirección de la página web:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:12 -msgid "Wants to receive _HTML mail" -msgstr "Prefiere recivir el correo como _HTML" - -#: addressbook/contact-editor/e-contact-editor-strings.h:13 -msgid "Address:" -msgstr "Direccion:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:14 -msgid "_Business" -msgstr "_Trabajo" - -#: addressbook/contact-editor/e-contact-editor-strings.h:15 -msgid "_Home" -msgstr "_Casa" - -#: addressbook/contact-editor/e-contact-editor-strings.h:16 -msgid "Business _Fax" -msgstr "_Fax del trabajo" - -#: addressbook/contact-editor/e-contact-editor-strings.h:17 -msgid "_Mobile" -msgstr "_Movil" - -#: addressbook/contact-editor/e-contact-editor-strings.h:18 -msgid "Primary Email" -msgstr "Correo electrónico principal" - -#: addressbook/contact-editor/e-contact-editor-strings.h:19 -msgid "Business" -msgstr "Trabajo" - -#: addressbook/contact-editor/e-contact-editor-strings.h:20 -msgid "This is the _mailing address" -msgstr "Esta es la direción de _correo" - -#: addressbook/contact-editor/e-contact-editor-strings.h:21 -msgid "_Contacts..." -msgstr "_Contactos..." - -#: addressbook/contact-editor/e-contact-editor-strings.h:22 -msgid "Ca_tegories..." -msgstr "Ca_tegorias..." - -#: addressbook/contact-editor/e-contact-editor-strings.h:23 -msgid "Job Title" -msgstr "Puesto" - -#: addressbook/contact-editor/e-contact-editor-strings.h:24 -msgid "General" -msgstr "General" - -#: addressbook/contact-editor/e-contact-editor-strings.h:25 -msgid "Department:" -msgstr "Departamento:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:26 -msgid "Office:" -msgstr "Oficina:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:27 -msgid "Profession:" -msgstr "Profesión:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:28 -msgid "Nickname:" -msgstr "Nick:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:29 -msgid "Spouse:" -msgstr "Conyuge:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:30 -msgid "Birthday:" -msgstr "Fecha de nacimiento:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:31 -msgid "Assistant's name:" -msgstr "Nombre del asistente:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:32 -msgid "Manager's Name:" -msgstr "Nombre del manager:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:33 -msgid "Anniversary:" -msgstr "Aniversario:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:34 -msgid "Notes:" -msgstr "Notas:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:35 -msgid "Details" -msgstr "Detalles" - -#: addressbook/contact-editor/e-contact-editor-strings.h:36 -#: addressbook/contact-editor/e-contact-editor-strings.h:41 -msgid "Add" -msgstr "Añadir" - -#: addressbook/contact-editor/e-contact-editor-strings.h:37 -#: mail/folder-browser-factory.c:50 -msgid "Delete" -msgstr "Borrar" - -#: addressbook/contact-editor/e-contact-editor-strings.h:38 -msgid "Phone Types" -msgstr "Tipo de teléfono" - -#: addressbook/contact-editor/e-contact-editor-strings.h:39 -#: addressbook/contact-editor/e-contact-editor-strings.h:40 -msgid "New phone type" -msgstr "Nuevo tipo de teléfono" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/contact-editor/fullname-strings.h:7 -msgid "Check Full Name" -msgstr "Comprobar nombre completo" - -#: addressbook/contact-editor/fullname-strings.h:8 -msgid "_Title:" -msgstr "_Título:" - -#: addressbook/contact-editor/fullname-strings.h:9 -msgid "_First:" -msgstr "_Primero:" - -#: addressbook/contact-editor/fullname-strings.h:10 -msgid "_Middle:" -msgstr "_Mediano:" - -#: addressbook/contact-editor/fullname-strings.h:11 -msgid "_Last:" -msgstr "_Último:" - -#: addressbook/contact-editor/fullname-strings.h:12 -msgid "_Suffix:" -msgstr "_Sufijo:" - -#: addressbook/contact-editor/fullname-strings.h:13 -msgid "" -"\n" -"Mr.\n" -"Mrs.\n" -"Dr.\n" -msgstr "" -"\n" -"Sr.\n" -"Sra.\n" -"Dr.\n" - -#: addressbook/contact-editor/fullname-strings.h:18 -msgid "" -"\n" -"Sr.\n" -"Jr.\n" -"I\n" -"II\n" -"III\n" -"Esq.\n" -msgstr "" -"\n" -"Sr.\n" -"Jr.\n" -"I\n" -"II\n" -"III\n" -"Esq.\n" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/gui/component/ldap-server-dialog.glade.h:7 -#: composer/e-msg-composer-attachment.glade.h:8 -msgid "Description:" -msgstr "Descripción:" - -#: addressbook/gui/component/ldap-server-dialog.glade.h:8 -msgid "LDAP Server:" -msgstr "Servidor LDAP:" - -#: addressbook/gui/component/ldap-server-dialog.glade.h:9 -msgid "Port Number:" -msgstr "Número de puerto:" - -#: addressbook/gui/component/ldap-server-dialog.glade.h:10 -msgid "Root DN:" -msgstr "" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/printing/e-contact-print.glade.h:7 -msgid "Page Setup:" -msgstr "Configuración de la página:" - -#: addressbook/printing/e-contact-print.glade.h:8 -msgid "Style name:" -msgstr "Nombre del estilo:" - -#: addressbook/printing/e-contact-print.glade.h:9 -msgid "Preview:" -msgstr "Vista previa:" - -#: addressbook/printing/e-contact-print.glade.h:10 -msgid "Options" -msgstr "Opciones" - -#: addressbook/printing/e-contact-print.glade.h:11 -msgid "Include:" -msgstr "Incluye:" - -#: addressbook/printing/e-contact-print.glade.h:12 -msgid "Sections:" -msgstr "Secciones:" - -#: addressbook/printing/e-contact-print.glade.h:13 -msgid "Immediately follow each other" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:14 -msgid "Letter tabs on side" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:15 -msgid "Headings for each letter" -msgstr "Cabaceras para cada carta" - -#: addressbook/printing/e-contact-print.glade.h:16 -msgid "Start on a new page" -msgstr "Comenzar en una nueva página" - -#: addressbook/printing/e-contact-print.glade.h:17 -msgid "Number of columns:" -msgstr "Número de columnas:" - -#: addressbook/printing/e-contact-print.glade.h:18 -msgid "Blank forms at end:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:19 -msgid "Fonts" -msgstr "Fuentes" - -#: addressbook/printing/e-contact-print.glade.h:20 -#: addressbook/printing/e-contact-print.glade.h:21 -#: addressbook/printing/e-contact-print.glade.h:51 -#: addressbook/printing/e-contact-print.glade.h:54 -msgid "Font..." -msgstr "Fuente..." - -#: addressbook/printing/e-contact-print.glade.h:22 -msgid "Headings" -msgstr "Cabecera" - -#: addressbook/printing/e-contact-print.glade.h:23 -msgid "10 pt. Tahoma" -msgstr "10 pt. Tahoma" - -#: addressbook/printing/e-contact-print.glade.h:24 -msgid "Body" -msgstr "Cuerpo" - -#: addressbook/printing/e-contact-print.glade.h:25 -msgid "8 pt. Tahoma" -msgstr "8 pt. Tahoma" - -#: addressbook/printing/e-contact-print.glade.h:26 -msgid "Shading" -msgstr "Oscureciendo" - -#: addressbook/printing/e-contact-print.glade.h:27 -msgid "Print using gray shading" -msgstr "Imprimir usando un oscurecimiento gris" - -#: addressbook/printing/e-contact-print.glade.h:28 -msgid "Format" -msgstr "Formatear" - -#: addressbook/printing/e-contact-print.glade.h:29 -#: addressbook/printing/e-contact-print.glade.h:50 -msgid "Paper" -msgstr "Papel" - -#: addressbook/printing/e-contact-print.glade.h:30 -msgid "Type:" -msgstr "Tipo:" - -#: addressbook/printing/e-contact-print.glade.h:31 -#: addressbook/printing/e-contact-print.glade.h:43 -msgid "label26" -msgstr "label26" - -#: addressbook/printing/e-contact-print.glade.h:32 -#: addressbook/printing/e-contact-print.glade.h:44 -msgid "Dimensions:" -msgstr "Dimensiones:" - -#: addressbook/printing/e-contact-print.glade.h:33 -#: addressbook/printing/e-contact-print.glade.h:45 -msgid "Width:" -msgstr "Ancho:" - -#: addressbook/printing/e-contact-print.glade.h:34 -#: addressbook/printing/e-contact-print.glade.h:46 -msgid "Height:" -msgstr "Alto:" - -#: addressbook/printing/e-contact-print.glade.h:35 -msgid "Paper source:" -msgstr "Fuente del papel:" - -#: addressbook/printing/e-contact-print.glade.h:36 -msgid "Margins" -msgstr "Margenes" - -#: addressbook/printing/e-contact-print.glade.h:37 -msgid "Top:" -msgstr "Encabezado:" - -#: addressbook/printing/e-contact-print.glade.h:38 -msgid "Bottom:" -msgstr "Pie:" - -#: addressbook/printing/e-contact-print.glade.h:39 -msgid "Left:" -msgstr "Izquierda:" - -#: addressbook/printing/e-contact-print.glade.h:40 -msgid "Right:" -msgstr "Derecha:" - -#: addressbook/printing/e-contact-print.glade.h:41 -msgid "Page" -msgstr "Pagina" - -#: addressbook/printing/e-contact-print.glade.h:42 -msgid "Size:" -msgstr "Tamaño:" - -#: addressbook/printing/e-contact-print.glade.h:47 -msgid "Orientation" -msgstr "Orientación" - -#: addressbook/printing/e-contact-print.glade.h:48 -msgid "Portrait" -msgstr "Vertical" - -#: addressbook/printing/e-contact-print.glade.h:49 -msgid "Landscape" -msgstr "Horizontal" - -#: addressbook/printing/e-contact-print.glade.h:52 -msgid "Header" -msgstr "Cabecera" - -#: addressbook/printing/e-contact-print.glade.h:53 -msgid "Footer:" -msgstr "Pie:" - -#: addressbook/printing/e-contact-print.glade.h:55 -msgid "Reverse on even pages" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:56 -msgid "Header/Footer" -msgstr "Cabecera/Pie" - -#: composer/e-msg-composer-address-dialog.c:183 composer/e-msg-composer.c:533 -msgid "Cut" -msgstr "Cortar" - -#: composer/e-msg-composer-address-dialog.c:184 -msgid "Cut selected item into clipboard" -msgstr "Corta la selección y la coloca en el portapapeles" - -#: composer/e-msg-composer-address-dialog.c:187 composer/e-msg-composer.c:534 -msgid "Copy" -msgstr "Copiar" - -#: composer/e-msg-composer-address-dialog.c:188 -msgid "Copy selected item into clipboard" -msgstr "Copia la selección y la coloca en el portapapeles" - -#: composer/e-msg-composer-address-dialog.c:191 -#: composer/e-msg-composer-address-dialog.c:199 composer/e-msg-composer.c:535 -msgid "Paste" -msgstr "Pegar" - -#: composer/e-msg-composer-address-dialog.c:192 -#: composer/e-msg-composer-address-dialog.c:200 -msgid "Paste item from clipboard" -msgstr "Pega desde el portapapeles" - -#: composer/e-msg-composer-address-dialog.c:528 -msgid "Select recipients' addresses" -msgstr "Seleccione la dirección del destinatario" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: composer/e-msg-composer-address-dialog.glade.h:7 -msgid "Recipient list:" -msgstr "Lista de destinatarios:" - -#: composer/e-msg-composer-address-dialog.glade.h:8 -msgid "Name:" -msgstr "Nombre:" - -#: composer/e-msg-composer-address-dialog.glade.h:9 -msgid "Search..." -msgstr "Buscar..." - -#: composer/e-msg-composer-address-dialog.glade.h:10 -msgid "Name" -msgstr "Nombre" - -#: composer/e-msg-composer-address-dialog.glade.h:11 -msgid "Address" -msgstr "Dirección" - -#: composer/e-msg-composer-address-dialog.glade.h:12 -msgid "Properties..." -msgstr "Propiedades..." - -#: composer/e-msg-composer-address-dialog.glade.h:13 -msgid "Add..." -msgstr "Añadir..." - -#: composer/e-msg-composer-address-dialog.glade.h:14 -msgid "To: >>" -msgstr "A: >>" - -#: composer/e-msg-composer-address-dialog.glade.h:15 -msgid "Cc: >>" -msgstr "Cc: >>" - -#: composer/e-msg-composer-address-dialog.glade.h:16 -msgid "Bcc: >>" -msgstr "Bcc: >>" - -#: composer/e-msg-composer-address-dialog.glade.h:17 -msgid "label9" -msgstr "label9" - -#: composer/e-msg-composer-address-dialog.glade.h:18 -msgid "label7" -msgstr "label7" - -#: composer/e-msg-composer-address-dialog.glade.h:19 -msgid "label8" -msgstr "label8" - -#: composer/e-msg-composer-attachment-bar.c:76 -msgid "1 byte" -msgstr "1 byte" - -#: composer/e-msg-composer-attachment-bar.c:78 -#, c-format -msgid "%u bytes" -msgstr "%u bytes" - -#: composer/e-msg-composer-attachment-bar.c:85 -#, c-format -msgid "%.1fK" -msgstr "" - -#: composer/e-msg-composer-attachment-bar.c:89 -#, c-format -msgid "%.1fM" -msgstr "" - -#: composer/e-msg-composer-attachment-bar.c:93 -#, c-format -msgid "%.1fG" -msgstr "" - -#: composer/e-msg-composer-attachment-bar.c:307 -msgid "Add attachment" -msgstr "Incluir adjunto" - -#: composer/e-msg-composer-attachment-bar.c:364 -msgid "Remove" -msgstr "Quitar" - -#: composer/e-msg-composer-attachment-bar.c:365 -msgid "Remove selected items from the attachment list" -msgstr "Quitar los elementos seleccionados de la lista de adjuntos" - -#: composer/e-msg-composer-attachment-bar.c:396 -msgid "Add attachment..." -msgstr "Incluir adjunto..." - -#: composer/e-msg-composer-attachment-bar.c:397 -msgid "Attach a file to the message" -msgstr "Adjuntar un fichero al mensaje" - -#: composer/e-msg-composer-attachment.c:259 -msgid "Select attachment" -msgstr "Seleccionar un adjunto" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: composer/e-msg-composer-attachment.glade.h:7 -msgid "Attachment properties" -msgstr "Propiedades del adjunto" - -#: composer/e-msg-composer-attachment.glade.h:9 -msgid "MIME type:" -msgstr "Tipo MIME:" - -#: composer/e-msg-composer-attachment.glade.h:10 -msgid "File name:" -msgstr "Nombre del fichero:" - -#: composer/e-msg-composer-attachment.glade.h:11 -msgid "Browse..." -msgstr "" - -#: composer/e-msg-composer-hdrs.c:89 -msgid "Click here for the address book" -msgstr "Presione aquí para acceder a la agenda" - -#: composer/e-msg-composer-hdrs.c:124 -msgid "To:" -msgstr "A:" - -#: composer/e-msg-composer-hdrs.c:125 -msgid "Enter the recipients of the message" -msgstr "Escriba los destinatarios del mensaje" - -#: composer/e-msg-composer-hdrs.c:129 -msgid "Cc:" -msgstr "Cc:" - -#: composer/e-msg-composer-hdrs.c:130 -msgid "Enter the addresses that will receive a carbon copy of the message" -msgstr "Escriba las direcciones que recivirán una copia del mensaje" - -#: composer/e-msg-composer-hdrs.c:135 -msgid "Bcc:" -msgstr "Bcc:" - -#: composer/e-msg-composer-hdrs.c:136 -msgid "" -"Enter the addresses that will receive a carbon copy of the message without " -"appearing in the recipient list of the message." -msgstr "" -"Escriba las direcciones que recivirán una copia del mensaje sin aparecer en " -"la lista de destinatarios del mensaje." - -#: composer/e-msg-composer-hdrs.c:142 -msgid "Subject:" -msgstr "Asunto:" - -#: composer/e-msg-composer-hdrs.c:143 -msgid "Enter the subject of the mail" -msgstr "Escriba el asunto del mensaje" - -#: composer/e-msg-composer.c:491 -msgid "Save in _folder..." -msgstr "Guardar en _carpeta..." - -#: composer/e-msg-composer.c:491 -msgid "Save the message in a specified folder" -msgstr "Guardar el mensaje en una carpeta especificada" - -#: composer/e-msg-composer.c:494 composer/e-msg-composer.c:531 -#: mail/folder-browser-factory.c:36 -msgid "Send" -msgstr "Enviar" - -#: composer/e-msg-composer.c:494 -msgid "Send the message" -msgstr "Enviar el mensaje" - -#: composer/e-msg-composer.c:502 -msgid "View _attachments" -msgstr "Ver _adjuntos" - -#: composer/e-msg-composer.c:502 -msgid "View/hide attachments" -msgstr "Ver/ocultar adjuntos" - -#: composer/e-msg-composer.c:531 -msgid "Send this message" -msgstr "Enviar este mensaje" - -#: composer/e-msg-composer.c:533 -msgid "Cut selected region into the clipboard" -msgstr "Corta la región seleccionada y la coloca en el portapapeles" - -#: composer/e-msg-composer.c:534 -msgid "Copy selected region into the clipboard" -msgstr "Copia la región seleccionada y la coloca en el portapapeles" - -#: composer/e-msg-composer.c:535 -msgid "Paste selected region into the clipboard" -msgstr "" - -#: composer/e-msg-composer.c:536 -msgid "Undo" -msgstr "Deshacer" - -#: composer/e-msg-composer.c:536 -msgid "Undo last operation" -msgstr "Deshacer la ultima operación" - -#: composer/e-msg-composer.c:538 -msgid "Attach" -msgstr "Adjuntar" - -#: composer/e-msg-composer.c:538 -msgid "Attach a file" -msgstr "Adjuntar un fichero" - -#: mail/folder-browser-factory.c:35 -msgid "Get mail" -msgstr "Correo nuevo" - -#: mail/folder-browser-factory.c:35 -msgid "Check for new mail" -msgstr "Comprobar correo" - -#: mail/folder-browser-factory.c:36 -msgid "Send a new message" -msgstr "Enviar un nuevo mensaje" - -#: mail/folder-browser-factory.c:37 -msgid "Find" -msgstr "Buscar" - -#: mail/folder-browser-factory.c:37 -msgid "Find messages" -msgstr "Buscar mensajes" - -#: mail/folder-browser-factory.c:41 -msgid "Reply" -msgstr "Responder" - -#: mail/folder-browser-factory.c:41 -msgid "Reply to the sender of this message" -msgstr "Responder al remitente de este mensaje" - -#: mail/folder-browser-factory.c:42 -msgid "Reply to All" -msgstr "Responder a todos" - -#: mail/folder-browser-factory.c:42 -msgid "Reply to all recipients of this message" -msgstr "Responder a todos los destinatarios de este mensaje" - -#: mail/folder-browser-factory.c:44 -msgid "Forward" -msgstr "Reenviar" - -#: mail/folder-browser-factory.c:44 -msgid "Forward this message" -msgstr "Reenviar este mensaje" - -#: mail/folder-browser-factory.c:48 -msgid "Print" -msgstr "Imprimir" - -#: mail/folder-browser-factory.c:48 -msgid "Print the selected message" -msgstr "Imprimir el mensaje seleccionado" - -#: mail/folder-browser-factory.c:50 -msgid "Delete this message" -msgstr "Borrar este mensaje" - -#: mail/folder-browser-factory.c:67 -msgid "_Expunge" -msgstr "_Comprimir" - -#: mail/folder-browser-factory.c:73 -msgid "_Filter Druid" -msgstr "Asistente para _filtros" - -#: mail/folder-browser-factory.c:186 -msgid "We are sorry, Evolution's Folder Browser can not be initialized." -msgstr "" -"Lo sentimos, el visor de carpetas de Evolution no ha podido ser inicializado" - -#: mail/folder-browser.c:208 -msgid "The URI that the Folder Browser will display" -msgstr "La URI que mostrará el visor de carpetas" - -#: mail/folder-browser.c:211 -msgid "Whether a message preview should be shown" -msgstr "Si debe ser mostrada una vista previa del mensaje" - -#: mail/main.c:58 -msgid "Mail Component: I could not initialize Bonobo" -msgstr "Componenete de correo: No pude inicializar Bonobo" - -#: mail/message-list.c:464 -msgid "Priority" -msgstr "Prioridad" - -#: mail/message-list.c:478 -msgid "From" -msgstr "De" - -#: mail/message-list.c:485 -msgid "Subject" -msgstr "Asunto" - -#: mail/message-list.c:492 -msgid "Sent" -msgstr "Enviado" - -#: mail/message-list.c:499 -msgid "Receive" -msgstr "Recivido" - -#: mail/message-list.c:506 -msgid "To" -msgstr "A" - -#: mail/message-list.c:513 -msgid "Size" -msgstr "Tamaño" - -#. you might have to call gnome_dialog_run() on the -#. * dialog returned here, I don't remember... -#. -#: shell/e-shell-view-menu.c:62 -msgid "Bug buddy was not found in your $PATH." -msgstr "No se ha encontrado a bug buddy en su $PATH." - -#. same as above -#: shell/e-shell-view-menu.c:68 -msgid "Bug buddy could not be run." -msgstr "No se ha podido ejecutar bug buddy" - -#: shell/e-shell-view-menu.c:111 -msgid "Evolution" -msgstr "Evolution" - -#: shell/e-shell-view-menu.c:113 -msgid "Copyright 1999, 2000 Helix Code, Inc." -msgstr "Copyright 1999, 2000 Helix Code, Inc." - -#: shell/e-shell-view-menu.c:115 -msgid "" -"Evolution is a suite of groupware applications\n" -"for mail, calendaring, and contact management\n" -"within the GNOME desktop environment." -msgstr "" -"Evolution es un conjunto de applicaciones de\n" -"groupware para manejar el correo, el calendario y la\n" -"lista de contactos en el entorno del escritorio GNOME." - -#: shell/e-shell-view-menu.c:185 shell/e-shell-view-menu.c:251 -msgid "_Folder" -msgstr "_Carpeta" - -#: shell/e-shell-view-menu.c:189 -msgid "Evolution _Bar Shortcut" -msgstr "_Barra de atajos de Evolution" - -#: shell/e-shell-view-menu.c:195 -msgid "_Mail message" -msgstr "_Mensaje de correo" - -#: shell/e-shell-view-menu.c:196 shell/e-shell-view-menu.c:199 -msgid "Composes a new mail message" -msgstr "Compone un nuevo mensaje de correo" - -#: shell/e-shell-view-menu.c:198 -msgid "_Appointment" -msgstr "C_ita" - -#: shell/e-shell-view-menu.c:201 -msgid "Meeting Re_quest" -msgstr "_Petición de reunión" - -#: shell/e-shell-view-menu.c:204 -msgid "_Contact" -msgstr "C_ontacto" - -#: shell/e-shell-view-menu.c:207 -msgid "_Task" -msgstr "_Tarea" - -#: shell/e-shell-view-menu.c:210 -msgid "Task _Request" -msgstr "P_etición de tarea" - -#: shell/e-shell-view-menu.c:213 -msgid "_Journal Entry" -msgstr "" - -#: shell/e-shell-view-menu.c:216 -msgid "_Note" -msgstr "_Nota" - -#: shell/e-shell-view-menu.c:226 -msgid "_Selected Items" -msgstr "_Seleccionar elementos" - -#: shell/e-shell-view-menu.c:234 -msgid "_New Folder" -msgstr "_Nueva carpeta" - -#: shell/e-shell-view-menu.c:242 -msgid "_New" -msgstr "Correo _nuevo" - -#: shell/e-shell-view-menu.c:243 -msgid "_Open" -msgstr "_Abrir" - -#: shell/e-shell-view-menu.c:244 -msgid "Clos_e All Items" -msgstr "_Cerrar todos los elementos" - -#: shell/e-shell-view-menu.c:244 -msgid "Closes all the open items" -msgstr "Cerrar todos los elementos abiertos" - -#: shell/e-shell-view-menu.c:265 -#, fuzzy -msgid "Show _Shortcut Bar" -msgstr "_Ocultar la barra de atajos" - -#: shell/e-shell-view-menu.c:266 -#, fuzzy -msgid "Shows the shortcut bar" -msgstr "Oculta la barra de atajos" - -#: shell/e-shell-view-menu.c:268 -msgid "Show _Treeview" -msgstr "" - -#: shell/e-shell-view-menu.c:269 -msgid "Shows the tree view" -msgstr "" - -#: shell/e-shell-view-menu.c:284 -msgid "_Submit bug" -msgstr "_Enviar un reporte de error" - -#: shell/e-shell-view-menu.c:285 -msgid "Submit bug-report via bug-buddy" -msgstr "Enviar un reporte de error a traves de bug-buddy" - -#. FIXME: add Favorites here -#: shell/e-shell-view-menu.c:300 -msgid "_Tools" -msgstr "_Herramientas" - -#: shell/e-shell-view-menu.c:301 -msgid "_Actions" -msgstr "_Acciones" - -#: shell/e-shell.c:157 -#, c-format -msgid "Cannot set up local storage -- %s" -msgstr "No puedo configurar una carpeta local -- %s" - -#: shell/main.c:100 -msgid "" -"Hi. Thanks for taking the time to download this preview release of\n" -"the Evolution groupware suite.\n" -"\n" -"The Evolution team has worked hard to make Evolution as robust,\n" -"extensible, pretty, fast and well-suited to heavy internet users as\n" -"possible. And we're very tired. But we're not done -- not yet.\n" -"\n" -"As you explore Evolution, please understand that most of our work has\n" -"been focused on the backend engine which drives the entire system and\n" -"not on the user interface. We are just cresting the hill now, though,\n" -"and will be pouring most of our love and attention into the UI from\n" -"here out. But at least you know that you're not using demoware.\n" -"\n" -"So, time for the nerdy disclaimer. Evolution will: crash, lose your\n" -"mail, leave stray processes running, consume 100% CPU, race, lock,\n" -"send HTML mail to random mailing lists, and embarass you in front of\n" -"your friends and co-workers. Use at your own risk.\n" -"\n" -"We hope that you enjoy the results of our hard work, and we eagerly\n" -"await your contributions!\n" -msgstr "" -"Hola. Gracias por tomarse la molestia de descargar esta liberación de " -"prueba\n" -"de la suit de groupware Evolution.\n" -"\n" -"El equipo de Evolution ha trabajado duro para hacer Evolution tan robusto,\n" -"extensible, bonito, rápido y adecuado para los usuarios de internet como a\n" -"sido posible. Y estamos muy cansados. Pero no hemos acabado -- todavia " -"no.\n" -"\n" -"Mientras esplora Evolution, por favor comprenda que la mayoria de nuestro\n" -"trabajo se ha centrado en el motor que maneja todo el sistema y no en la\n" -"interfaz de usuario. Ahora estamos empezando a coronar la colina, y desde\n" -"ahora vamos a poner todo nuestro cariño y atención a la interfaz de usuario\n" -"Por lo menos sabe que no está usando un software de demostración.\n" -"\n" -"Asi que, es hora para las escusas. Evolution: se rompera, perderá su " -"correo\n" -"dejará procesos corriendo, consumirá el 100% de la CPU, se bloqueará,\n" -"enviará correo en formato HTML a listas de correo al azar, y le pondrá en\n" -"situación embarazosa delante de sus amigos y compañeros de trabajo. Uselo\n" -"asumiendo usted las consecuencias.\n" -"\n" -"Esperamos que le gusten los resultados de nuestro duro trabajo, y " -"¡esperamos\n" -"contribuciones!\n" - -#: shell/main.c:129 -msgid "" -"Thanks\n" -"The Evolution Team\n" -msgstr "" -"Gracias\n" -"El equipo de Evolution\n" - -#: shell/main.c:156 -msgid "Cannot initialize the Evolution shell." -msgstr "No pued inicializar la shell de Evolution." - -#: shell/main.c:186 -msgid "Cannot initialize the Bonobo component system." -msgstr "No puedo inicializar el sistema de componentes Bonobo." - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: widgets/e-table/e-table-config.glade.h:7 -msgid "Fields" -msgstr "Campos" - -#: widgets/e-table/e-table-config.glade.h:8 -msgid "Grouping" -msgstr "Agrupando" - -#: widgets/e-table/e-table-config.glade.h:9 -msgid "Sort" -msgstr "Ordenar" - -#: widgets/e-table/e-table-config.glade.h:10 -msgid "Filter" -msgstr "Filtro" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: widgets/e-table/e-table-group.glade.h:7 -msgid "window1" -msgstr "window1" - -#: widgets/e-table/e-table-group.glade.h:8 -msgid "Available fields" -msgstr "Campos disponibles" - -#: widgets/e-table/e-table-group.glade.h:9 -msgid "label1" -msgstr "label1" - -#: widgets/e-table/e-table-group.glade.h:10 -msgid "Show in this order" -msgstr "Mostrar en este orden" - -#: widgets/e-table/e-table-group.glade.h:11 -msgid "label2" -msgstr "label2" - -#: widgets/e-table/e-table-group.glade.h:12 -msgid "Add >>" -msgstr "Añadir >>" - -#: widgets/e-table/e-table-group.glade.h:13 -msgid "<< Remove" -msgstr "<< Quitar" diff --git a/po/flu-danish b/po/flu-danish deleted file mode 100644 index 51953e5980..0000000000 --- a/po/flu-danish +++ /dev/null @@ -1,114 +0,0 @@ -#~ msgid "A folder containing mail items" -#~ msgstr "En mappe som indeholder e-post ting" - -#~ msgid "A folder containing contacts" -#~ msgstr "En mappe med kontakter" - -#~ msgid "A folder containing calendar entries" -#~ msgstr "En mappe med kalenderting" - -#~ msgid "A folder containing tasks" -#~ msgstr "En mappe med opgaver" - -#~ msgid "Evolution can not create its local folders" -#~ msgstr "Evolution kan ikke oprette sine lokale mapper" - -#~ msgid "Large Icons" -#~ msgstr "Store ikoner" - -#~ msgid "Small Icons" -#~ msgstr "Små ikoner" - -#~ msgid "Add New Group" -#~ msgstr "Tilføj ny gruppe" - -#~ msgid "Remove Group" -#~ msgstr "Fjern gruppe" - -#~ msgid "Rename Group" -#~ msgstr "Omdøb gruppe" - -#~ msgid "Add Shortcut" -#~ msgstr "Tilføj genvej" - -#~ msgid "Open Folder" -#~ msgstr "Åbn mappe" - -#~ msgid "Open in New Window" -#~ msgstr "Åbn i et nyt vindue" - -#~ msgid "Advanced Find" -#~ msgstr "Avanceret søgning" - -#~ msgid "Remove From Shortcut Bar" -#~ msgstr "Fjern fra genvejslinjen" - -#~ msgid "Rename Shortcut" -#~ msgstr "Omdøb genvej" - -#~ msgid "Properties" -#~ msgstr "Egenskaber" - -#~ msgid "Today" -#~ msgstr "I dag" - -#~ msgid "Executive Summary" -#~ msgstr "Oversigt" - -#~ msgid "Inbox" -#~ msgstr "Indboks" - -#~ msgid "New mail messages" -#~ msgstr "Nye e-post meddelelser" - -#~ msgid "Sent messages" -#~ msgstr "Sendte meddelelser" - -#~ msgid "Sent mail messages" -#~ msgstr "Sendte e-post meddelelser" - -#~ msgid "Drafts" -#~ msgstr "Kladder" - -#~ msgid "Draft mail messages" -#~ msgstr "E-post-kladder" - -#~ msgid "Calendar" -#~ msgstr "Kalender" - -#~ msgid "Your calendar" -#~ msgstr "Din kalender" - -#~ msgid "Contacts" -#~ msgstr "Kontakter" - -#~ msgid "Your contacts list" -#~ msgstr "Din kontaktliste" - -#~ msgid "Tasks" -#~ msgstr "Opgaver" - -#~ msgid "Tasks list" -#~ msgstr "Opgaveliste" - -#~ msgid "Main Shortcuts" -#~ msgstr "Hovedgenveje" - -#~ msgid "Other Shortcuts" -#~ msgstr "Andre genveje" - -#~ msgid "New group" -#~ msgstr "Ny gruppe" - -#~ msgid "Enables some debugging functions" -#~ msgstr "Aktivér fejlsøgningsfunktioner" - -#~ msgid "LEVEL" -#~ msgstr "LEVEL" - -#~ msgid "" -#~ "It was not possible to setup the Evolution startup files. Please\n" -#~ "fix the problem, and restart Evolution" -#~ msgstr "" -#~ "Det var ikke muligt at sætte Evolutions opstartsfiler op. Venligst\n" -#~ "ret problemet, og genstart Evolution" diff --git a/po/fr.po b/po/fr.po deleted file mode 100644 index 5020093989..0000000000 --- a/po/fr.po +++ /dev/null @@ -1,1000 +0,0 @@ -# evolution fr.po -# Copyright (C) 2000 Free Software Foundation, Inc. -# Vincent Renardias , 2000. -# -msgid "" -msgstr "" -"Project-Id-Version: evolution VERSION\n" -"POT-Creation-Date: 2000-05-27 20:01+0100\n" -"PO-Revision-Date: 2000-04-18 17:50+0200\n" -"Last-Translator: Vincent Renardias \n" -"Language-Team: GNOME French Team \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=iso-8859-1\n" -"Content-Transfer-Encoding: 8bit\n" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/contact-editor/e-contact-editor-strings.h:7 -msgid "Contact Editor" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:8 -msgid "_Full Name..." -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:9 -#, fuzzy -msgid "Company:" -msgstr "Copier" - -#: addressbook/contact-editor/e-contact-editor-strings.h:10 -msgid "File As:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:11 -msgid "Web page address:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:12 -msgid "Wants to receive _HTML mail" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:13 -msgid "Address:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:14 -msgid "_Business" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:15 -msgid "_Home" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:16 -msgid "Business _Fax" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:17 -msgid "_Mobile" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:18 -msgid "Primary Email" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:19 -msgid "Business" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:20 -msgid "This is the _mailing address" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:21 -msgid "_Contacts..." -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:22 -msgid "Ca_tegories..." -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:23 -msgid "Job Title" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:24 -msgid "General" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:25 -msgid "Department:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:26 -msgid "Office:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:27 -msgid "Profession:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:28 -msgid "Nickname:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:29 -msgid "Spouse:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:30 -msgid "Birthday:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:31 -msgid "Assistant's name:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:32 -msgid "Manager's Name:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:33 -msgid "Anniversary:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:34 -msgid "Notes:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:35 -msgid "Details" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:36 -#: addressbook/contact-editor/e-contact-editor-strings.h:41 -msgid "Add" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:37 -#: mail/folder-browser-factory.c:50 -msgid "Delete" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:38 -msgid "Phone Types" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:39 -#: addressbook/contact-editor/e-contact-editor-strings.h:40 -msgid "New phone type" -msgstr "" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/contact-editor/fullname-strings.h:7 -msgid "Check Full Name" -msgstr "" - -#: addressbook/contact-editor/fullname-strings.h:8 -msgid "_Title:" -msgstr "" - -#: addressbook/contact-editor/fullname-strings.h:9 -msgid "_First:" -msgstr "" - -#: addressbook/contact-editor/fullname-strings.h:10 -msgid "_Middle:" -msgstr "" - -#: addressbook/contact-editor/fullname-strings.h:11 -msgid "_Last:" -msgstr "" - -#: addressbook/contact-editor/fullname-strings.h:12 -msgid "_Suffix:" -msgstr "" - -#: addressbook/contact-editor/fullname-strings.h:13 -msgid "" -"\n" -"Mr.\n" -"Mrs.\n" -"Dr.\n" -msgstr "" - -#: addressbook/contact-editor/fullname-strings.h:18 -msgid "" -"\n" -"Sr.\n" -"Jr.\n" -"I\n" -"II\n" -"III\n" -"Esq.\n" -msgstr "" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/gui/component/ldap-server-dialog.glade.h:7 -#: composer/e-msg-composer-attachment.glade.h:8 -msgid "Description:" -msgstr "" - -#: addressbook/gui/component/ldap-server-dialog.glade.h:8 -msgid "LDAP Server:" -msgstr "" - -#: addressbook/gui/component/ldap-server-dialog.glade.h:9 -msgid "Port Number:" -msgstr "" - -#: addressbook/gui/component/ldap-server-dialog.glade.h:10 -msgid "Root DN:" -msgstr "" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/printing/e-contact-print.glade.h:7 -msgid "Page Setup:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:8 -msgid "Style name:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:9 -msgid "Preview:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:10 -msgid "Options" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:11 -msgid "Include:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:12 -msgid "Sections:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:13 -msgid "Immediately follow each other" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:14 -msgid "Letter tabs on side" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:15 -msgid "Headings for each letter" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:16 -msgid "Start on a new page" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:17 -msgid "Number of columns:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:18 -msgid "Blank forms at end:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:19 -msgid "Fonts" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:20 -#: addressbook/printing/e-contact-print.glade.h:21 -#: addressbook/printing/e-contact-print.glade.h:51 -#: addressbook/printing/e-contact-print.glade.h:54 -msgid "Font..." -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:22 -msgid "Headings" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:23 -msgid "10 pt. Tahoma" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:24 -msgid "Body" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:25 -msgid "8 pt. Tahoma" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:26 -msgid "Shading" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:27 -msgid "Print using gray shading" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:28 -msgid "Format" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:29 -#: addressbook/printing/e-contact-print.glade.h:50 -#, fuzzy -msgid "Paper" -msgstr "Coller" - -#: addressbook/printing/e-contact-print.glade.h:30 -msgid "Type:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:31 -#: addressbook/printing/e-contact-print.glade.h:43 -msgid "label26" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:32 -#: addressbook/printing/e-contact-print.glade.h:44 -msgid "Dimensions:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:33 -#: addressbook/printing/e-contact-print.glade.h:45 -msgid "Width:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:34 -#: addressbook/printing/e-contact-print.glade.h:46 -msgid "Height:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:35 -msgid "Paper source:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:36 -msgid "Margins" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:37 -#, fuzzy -msgid "Top:" -msgstr "À :" - -#: addressbook/printing/e-contact-print.glade.h:38 -msgid "Bottom:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:39 -msgid "Left:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:40 -msgid "Right:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:41 -#, fuzzy -msgid "Page" -msgstr "Coller" - -#: addressbook/printing/e-contact-print.glade.h:42 -msgid "Size:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:47 -msgid "Orientation" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:48 -msgid "Portrait" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:49 -msgid "Landscape" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:52 -msgid "Header" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:53 -msgid "Footer:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:55 -msgid "Reverse on even pages" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:56 -msgid "Header/Footer" -msgstr "" - -#: composer/e-msg-composer-address-dialog.c:183 composer/e-msg-composer.c:533 -msgid "Cut" -msgstr "Couper" - -#: composer/e-msg-composer-address-dialog.c:184 -msgid "Cut selected item into clipboard" -msgstr "" - -#: composer/e-msg-composer-address-dialog.c:187 composer/e-msg-composer.c:534 -msgid "Copy" -msgstr "Copier" - -#: composer/e-msg-composer-address-dialog.c:188 -msgid "Copy selected item into clipboard" -msgstr "" - -#: composer/e-msg-composer-address-dialog.c:191 -#: composer/e-msg-composer-address-dialog.c:199 composer/e-msg-composer.c:535 -msgid "Paste" -msgstr "Coller" - -#: composer/e-msg-composer-address-dialog.c:192 -#: composer/e-msg-composer-address-dialog.c:200 -msgid "Paste item from clipboard" -msgstr "" - -#: composer/e-msg-composer-address-dialog.c:528 -msgid "Select recipients' addresses" -msgstr "" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: composer/e-msg-composer-address-dialog.glade.h:7 -msgid "Recipient list:" -msgstr "" - -#: composer/e-msg-composer-address-dialog.glade.h:8 -msgid "Name:" -msgstr "" - -#: composer/e-msg-composer-address-dialog.glade.h:9 -msgid "Search..." -msgstr "" - -#: composer/e-msg-composer-address-dialog.glade.h:10 -msgid "Name" -msgstr "" - -#: composer/e-msg-composer-address-dialog.glade.h:11 -msgid "Address" -msgstr "" - -#: composer/e-msg-composer-address-dialog.glade.h:12 -msgid "Properties..." -msgstr "" - -#: composer/e-msg-composer-address-dialog.glade.h:13 -msgid "Add..." -msgstr "" - -#: composer/e-msg-composer-address-dialog.glade.h:14 -#, fuzzy -msgid "To: >>" -msgstr "À :" - -#: composer/e-msg-composer-address-dialog.glade.h:15 -#, fuzzy -msgid "Cc: >>" -msgstr "Cc :" - -#: composer/e-msg-composer-address-dialog.glade.h:16 -#, fuzzy -msgid "Bcc: >>" -msgstr "Bcc :" - -#: composer/e-msg-composer-address-dialog.glade.h:17 -msgid "label9" -msgstr "" - -#: composer/e-msg-composer-address-dialog.glade.h:18 -msgid "label7" -msgstr "" - -#: composer/e-msg-composer-address-dialog.glade.h:19 -msgid "label8" -msgstr "" - -#: composer/e-msg-composer-attachment-bar.c:76 -msgid "1 byte" -msgstr "1 octet" - -#: composer/e-msg-composer-attachment-bar.c:78 -#, c-format -msgid "%u bytes" -msgstr "%u octets" - -#: composer/e-msg-composer-attachment-bar.c:85 -#, c-format -msgid "%.1fK" -msgstr "%.1fKo" - -#: composer/e-msg-composer-attachment-bar.c:89 -#, c-format -msgid "%.1fM" -msgstr "%.1fMo" - -#: composer/e-msg-composer-attachment-bar.c:93 -#, c-format -msgid "%.1fG" -msgstr "%.1fGo" - -#: composer/e-msg-composer-attachment-bar.c:307 -msgid "Add attachment" -msgstr "Ajouter attachement" - -#: composer/e-msg-composer-attachment-bar.c:364 -msgid "Remove" -msgstr "Enlever" - -#: composer/e-msg-composer-attachment-bar.c:365 -msgid "Remove selected items from the attachment list" -msgstr "" - -#: composer/e-msg-composer-attachment-bar.c:396 -msgid "Add attachment..." -msgstr "Ajouter attachement..." - -#: composer/e-msg-composer-attachment-bar.c:397 -msgid "Attach a file to the message" -msgstr "" - -#: composer/e-msg-composer-attachment.c:259 -msgid "Select attachment" -msgstr "" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: composer/e-msg-composer-attachment.glade.h:7 -msgid "Attachment properties" -msgstr "" - -#: composer/e-msg-composer-attachment.glade.h:9 -msgid "MIME type:" -msgstr "" - -#: composer/e-msg-composer-attachment.glade.h:10 -msgid "File name:" -msgstr "" - -#: composer/e-msg-composer-attachment.glade.h:11 -msgid "Browse..." -msgstr "" - -#: composer/e-msg-composer-hdrs.c:89 -msgid "Click here for the address book" -msgstr "" - -#: composer/e-msg-composer-hdrs.c:124 -msgid "To:" -msgstr "À :" - -#: composer/e-msg-composer-hdrs.c:125 -msgid "Enter the recipients of the message" -msgstr "" - -#: composer/e-msg-composer-hdrs.c:129 -msgid "Cc:" -msgstr "Cc :" - -#: composer/e-msg-composer-hdrs.c:130 -msgid "Enter the addresses that will receive a carbon copy of the message" -msgstr "" - -#: composer/e-msg-composer-hdrs.c:135 -msgid "Bcc:" -msgstr "Bcc :" - -#: composer/e-msg-composer-hdrs.c:136 -msgid "" -"Enter the addresses that will receive a carbon copy of the message without " -"appearing in the recipient list of the message." -msgstr "" - -#: composer/e-msg-composer-hdrs.c:142 -msgid "Subject:" -msgstr "" - -#: composer/e-msg-composer-hdrs.c:143 -msgid "Enter the subject of the mail" -msgstr "" - -#: composer/e-msg-composer.c:491 -msgid "Save in _folder..." -msgstr "" - -#: composer/e-msg-composer.c:491 -msgid "Save the message in a specified folder" -msgstr "" - -#: composer/e-msg-composer.c:494 composer/e-msg-composer.c:531 -#: mail/folder-browser-factory.c:36 -msgid "Send" -msgstr "" - -#: composer/e-msg-composer.c:494 -msgid "Send the message" -msgstr "" - -#: composer/e-msg-composer.c:502 -msgid "View _attachments" -msgstr "" - -#: composer/e-msg-composer.c:502 -msgid "View/hide attachments" -msgstr "" - -#: composer/e-msg-composer.c:531 -msgid "Send this message" -msgstr "" - -#: composer/e-msg-composer.c:533 -msgid "Cut selected region into the clipboard" -msgstr "" - -#: composer/e-msg-composer.c:534 -msgid "Copy selected region into the clipboard" -msgstr "" - -#: composer/e-msg-composer.c:535 -msgid "Paste selected region into the clipboard" -msgstr "" - -#: composer/e-msg-composer.c:536 -msgid "Undo" -msgstr "" - -#: composer/e-msg-composer.c:536 -msgid "Undo last operation" -msgstr "" - -#: composer/e-msg-composer.c:538 -msgid "Attach" -msgstr "" - -#: composer/e-msg-composer.c:538 -msgid "Attach a file" -msgstr "" - -#: mail/folder-browser-factory.c:35 -msgid "Get mail" -msgstr "" - -#: mail/folder-browser-factory.c:35 -msgid "Check for new mail" -msgstr "" - -#: mail/folder-browser-factory.c:36 -msgid "Send a new message" -msgstr "" - -#: mail/folder-browser-factory.c:37 -msgid "Find" -msgstr "" - -#: mail/folder-browser-factory.c:37 -msgid "Find messages" -msgstr "" - -#: mail/folder-browser-factory.c:41 -msgid "Reply" -msgstr "" - -#: mail/folder-browser-factory.c:41 -msgid "Reply to the sender of this message" -msgstr "" - -#: mail/folder-browser-factory.c:42 -msgid "Reply to All" -msgstr "" - -#: mail/folder-browser-factory.c:42 -msgid "Reply to all recipients of this message" -msgstr "" - -#: mail/folder-browser-factory.c:44 -msgid "Forward" -msgstr "" - -#: mail/folder-browser-factory.c:44 -msgid "Forward this message" -msgstr "" - -#: mail/folder-browser-factory.c:48 -msgid "Print" -msgstr "" - -#: mail/folder-browser-factory.c:48 -msgid "Print the selected message" -msgstr "" - -#: mail/folder-browser-factory.c:50 -msgid "Delete this message" -msgstr "" - -#: mail/folder-browser-factory.c:67 -msgid "_Expunge" -msgstr "" - -#: mail/folder-browser-factory.c:73 -msgid "_Filter Druid" -msgstr "" - -#: mail/folder-browser-factory.c:186 -msgid "We are sorry, Evolution's Folder Browser can not be initialized." -msgstr "" - -#: mail/folder-browser.c:208 -msgid "The URI that the Folder Browser will display" -msgstr "" - -#: mail/folder-browser.c:211 -msgid "Whether a message preview should be shown" -msgstr "" - -#: mail/main.c:58 -msgid "Mail Component: I could not initialize Bonobo" -msgstr "" - -#: mail/message-list.c:464 -msgid "Priority" -msgstr "" - -#: mail/message-list.c:478 -msgid "From" -msgstr "" - -#: mail/message-list.c:485 -msgid "Subject" -msgstr "" - -#: mail/message-list.c:492 -msgid "Sent" -msgstr "" - -#: mail/message-list.c:499 -msgid "Receive" -msgstr "" - -#: mail/message-list.c:506 -msgid "To" -msgstr "" - -#: mail/message-list.c:513 -msgid "Size" -msgstr "" - -#. you might have to call gnome_dialog_run() on the -#. * dialog returned here, I don't remember... -#. -#: shell/e-shell-view-menu.c:62 -msgid "Bug buddy was not found in your $PATH." -msgstr "" - -#. same as above -#: shell/e-shell-view-menu.c:68 -msgid "Bug buddy could not be run." -msgstr "" - -#: shell/e-shell-view-menu.c:111 -msgid "Evolution" -msgstr "" - -#: shell/e-shell-view-menu.c:113 -msgid "Copyright 1999, 2000 Helix Code, Inc." -msgstr "" - -#: shell/e-shell-view-menu.c:115 -msgid "" -"Evolution is a suite of groupware applications\n" -"for mail, calendaring, and contact management\n" -"within the GNOME desktop environment." -msgstr "" - -#: shell/e-shell-view-menu.c:185 shell/e-shell-view-menu.c:251 -msgid "_Folder" -msgstr "" - -#: shell/e-shell-view-menu.c:189 -msgid "Evolution _Bar Shortcut" -msgstr "" - -#: shell/e-shell-view-menu.c:195 -msgid "_Mail message" -msgstr "" - -#: shell/e-shell-view-menu.c:196 shell/e-shell-view-menu.c:199 -msgid "Composes a new mail message" -msgstr "" - -#: shell/e-shell-view-menu.c:198 -msgid "_Appointment" -msgstr "" - -#: shell/e-shell-view-menu.c:201 -msgid "Meeting Re_quest" -msgstr "" - -#: shell/e-shell-view-menu.c:204 -msgid "_Contact" -msgstr "" - -#: shell/e-shell-view-menu.c:207 -msgid "_Task" -msgstr "" - -#: shell/e-shell-view-menu.c:210 -msgid "Task _Request" -msgstr "" - -#: shell/e-shell-view-menu.c:213 -msgid "_Journal Entry" -msgstr "" - -#: shell/e-shell-view-menu.c:216 -msgid "_Note" -msgstr "" - -#: shell/e-shell-view-menu.c:226 -msgid "_Selected Items" -msgstr "" - -#: shell/e-shell-view-menu.c:234 -msgid "_New Folder" -msgstr "" - -#: shell/e-shell-view-menu.c:242 -msgid "_New" -msgstr "" - -#: shell/e-shell-view-menu.c:243 -msgid "_Open" -msgstr "" - -#: shell/e-shell-view-menu.c:244 -msgid "Clos_e All Items" -msgstr "" - -#: shell/e-shell-view-menu.c:244 -msgid "Closes all the open items" -msgstr "" - -#: shell/e-shell-view-menu.c:265 -msgid "Show _Shortcut Bar" -msgstr "" - -#: shell/e-shell-view-menu.c:266 -msgid "Shows the shortcut bar" -msgstr "" - -#: shell/e-shell-view-menu.c:268 -msgid "Show _Treeview" -msgstr "" - -#: shell/e-shell-view-menu.c:269 -msgid "Shows the tree view" -msgstr "" - -#: shell/e-shell-view-menu.c:284 -msgid "_Submit bug" -msgstr "" - -#: shell/e-shell-view-menu.c:285 -msgid "Submit bug-report via bug-buddy" -msgstr "" - -#. FIXME: add Favorites here -#: shell/e-shell-view-menu.c:300 -msgid "_Tools" -msgstr "" - -#: shell/e-shell-view-menu.c:301 -msgid "_Actions" -msgstr "" - -#: shell/e-shell.c:157 -#, c-format -msgid "Cannot set up local storage -- %s" -msgstr "" - -#: shell/main.c:100 -msgid "" -"Hi. Thanks for taking the time to download this preview release of\n" -"the Evolution groupware suite.\n" -"\n" -"The Evolution team has worked hard to make Evolution as robust,\n" -"extensible, pretty, fast and well-suited to heavy internet users as\n" -"possible. And we're very tired. But we're not done -- not yet.\n" -"\n" -"As you explore Evolution, please understand that most of our work has\n" -"been focused on the backend engine which drives the entire system and\n" -"not on the user interface. We are just cresting the hill now, though,\n" -"and will be pouring most of our love and attention into the UI from\n" -"here out. But at least you know that you're not using demoware.\n" -"\n" -"So, time for the nerdy disclaimer. Evolution will: crash, lose your\n" -"mail, leave stray processes running, consume 100% CPU, race, lock,\n" -"send HTML mail to random mailing lists, and embarass you in front of\n" -"your friends and co-workers. Use at your own risk.\n" -"\n" -"We hope that you enjoy the results of our hard work, and we eagerly\n" -"await your contributions!\n" -msgstr "" - -#: shell/main.c:129 -msgid "" -"Thanks\n" -"The Evolution Team\n" -msgstr "" - -#: shell/main.c:156 -msgid "Cannot initialize the Evolution shell." -msgstr "" - -#: shell/main.c:186 -msgid "Cannot initialize the Bonobo component system." -msgstr "" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: widgets/e-table/e-table-config.glade.h:7 -msgid "Fields" -msgstr "" - -#: widgets/e-table/e-table-config.glade.h:8 -msgid "Grouping" -msgstr "" - -#: widgets/e-table/e-table-config.glade.h:9 -msgid "Sort" -msgstr "" - -#: widgets/e-table/e-table-config.glade.h:10 -msgid "Filter" -msgstr "" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: widgets/e-table/e-table-group.glade.h:7 -msgid "window1" -msgstr "" - -#: widgets/e-table/e-table-group.glade.h:8 -msgid "Available fields" -msgstr "" - -#: widgets/e-table/e-table-group.glade.h:9 -msgid "label1" -msgstr "" - -#: widgets/e-table/e-table-group.glade.h:10 -msgid "Show in this order" -msgstr "" - -#: widgets/e-table/e-table-group.glade.h:11 -msgid "label2" -msgstr "" - -#: widgets/e-table/e-table-group.glade.h:12 -msgid "Add >>" -msgstr "" - -#: widgets/e-table/e-table-group.glade.h:13 -#, fuzzy -msgid "<< Remove" -msgstr "Enlever" - -#~ msgid "New group" -#~ msgstr "Nouveau groupe" diff --git a/po/gl.po b/po/gl.po deleted file mode 100644 index 5c002de3f5..0000000000 --- a/po/gl.po +++ /dev/null @@ -1,1042 +0,0 @@ -# Galician translation of Evolution. -# Copyright (C) 2000 Jesús Bravo Álvarez. -# Jesús Bravo Álvarez , 2000. -# -# Se desexas colaborar connosco na traducción de programas libres ó galego, -# vai mira-la páxina do noso grupo: http://www.ctv.es/USERS/jtarrio/trans -# -# First Version: 2000-04-07 22:14+0200 -# -msgid "" -msgstr "" -"Project-Id-Version: Evolution 0.0.1\n" -"POT-Creation-Date: 2000-05-27 20:01+0100\n" -"PO-Revision-Date: 2000-05-10 03:08+0200\n" -"Last-Translator: Jesús Bravo Álvarez \n" -"Language-Team: Galician \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=iso-8859-1\n" -"Content-Transfer-Encoding: 8bit\n" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/contact-editor/e-contact-editor-strings.h:7 -#, fuzzy -msgid "Contact Editor" -msgstr "_Contacto" - -#: addressbook/contact-editor/e-contact-editor-strings.h:8 -msgid "_Full Name..." -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:9 -#, fuzzy -msgid "Company:" -msgstr "Copiar" - -#: addressbook/contact-editor/e-contact-editor-strings.h:10 -msgid "File As:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:11 -msgid "Web page address:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:12 -msgid "Wants to receive _HTML mail" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:13 -msgid "Address:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:14 -msgid "_Business" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:15 -#, fuzzy -msgid "_Home" -msgstr "_Nota" - -#: addressbook/contact-editor/e-contact-editor-strings.h:16 -msgid "Business _Fax" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:17 -msgid "_Mobile" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:18 -msgid "Primary Email" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:19 -msgid "Business" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:20 -msgid "This is the _mailing address" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:21 -#, fuzzy -msgid "_Contacts..." -msgstr "_Contacto" - -#: addressbook/contact-editor/e-contact-editor-strings.h:22 -msgid "Ca_tegories..." -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:23 -msgid "Job Title" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:24 -msgid "General" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:25 -msgid "Department:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:26 -msgid "Office:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:27 -msgid "Profession:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:28 -msgid "Nickname:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:29 -msgid "Spouse:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:30 -msgid "Birthday:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:31 -msgid "Assistant's name:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:32 -msgid "Manager's Name:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:33 -msgid "Anniversary:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:34 -#, fuzzy -msgid "Notes:" -msgstr "_Nota" - -#: addressbook/contact-editor/e-contact-editor-strings.h:35 -#, fuzzy -msgid "Details" -msgstr "Baixar correo" - -#: addressbook/contact-editor/e-contact-editor-strings.h:36 -#: addressbook/contact-editor/e-contact-editor-strings.h:41 -msgid "Add" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:37 -#: mail/folder-browser-factory.c:50 -msgid "Delete" -msgstr "Borrar" - -#: addressbook/contact-editor/e-contact-editor-strings.h:38 -msgid "Phone Types" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:39 -#: addressbook/contact-editor/e-contact-editor-strings.h:40 -msgid "New phone type" -msgstr "" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/contact-editor/fullname-strings.h:7 -msgid "Check Full Name" -msgstr "" - -#: addressbook/contact-editor/fullname-strings.h:8 -msgid "_Title:" -msgstr "" - -#: addressbook/contact-editor/fullname-strings.h:9 -msgid "_First:" -msgstr "" - -#: addressbook/contact-editor/fullname-strings.h:10 -msgid "_Middle:" -msgstr "" - -#: addressbook/contact-editor/fullname-strings.h:11 -msgid "_Last:" -msgstr "" - -#: addressbook/contact-editor/fullname-strings.h:12 -msgid "_Suffix:" -msgstr "" - -#: addressbook/contact-editor/fullname-strings.h:13 -msgid "" -"\n" -"Mr.\n" -"Mrs.\n" -"Dr.\n" -msgstr "" - -#: addressbook/contact-editor/fullname-strings.h:18 -msgid "" -"\n" -"Sr.\n" -"Jr.\n" -"I\n" -"II\n" -"III\n" -"Esq.\n" -msgstr "" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/gui/component/ldap-server-dialog.glade.h:7 -#: composer/e-msg-composer-attachment.glade.h:8 -msgid "Description:" -msgstr "" - -#: addressbook/gui/component/ldap-server-dialog.glade.h:8 -msgid "LDAP Server:" -msgstr "" - -#: addressbook/gui/component/ldap-server-dialog.glade.h:9 -msgid "Port Number:" -msgstr "" - -#: addressbook/gui/component/ldap-server-dialog.glade.h:10 -msgid "Root DN:" -msgstr "" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/printing/e-contact-print.glade.h:7 -msgid "Page Setup:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:8 -msgid "Style name:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:9 -msgid "Preview:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:10 -#, fuzzy -msgid "Options" -msgstr "_Accións" - -#: addressbook/printing/e-contact-print.glade.h:11 -msgid "Include:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:12 -#, fuzzy -msgid "Sections:" -msgstr "_Accións" - -#: addressbook/printing/e-contact-print.glade.h:13 -msgid "Immediately follow each other" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:14 -msgid "Letter tabs on side" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:15 -msgid "Headings for each letter" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:16 -#, fuzzy -msgid "Start on a new page" -msgstr "Enviar unha nova mensaxe" - -#: addressbook/printing/e-contact-print.glade.h:17 -msgid "Number of columns:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:18 -msgid "Blank forms at end:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:19 -msgid "Fonts" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:20 -#: addressbook/printing/e-contact-print.glade.h:21 -#: addressbook/printing/e-contact-print.glade.h:51 -#: addressbook/printing/e-contact-print.glade.h:54 -msgid "Font..." -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:22 -msgid "Headings" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:23 -msgid "10 pt. Tahoma" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:24 -msgid "Body" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:25 -msgid "8 pt. Tahoma" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:26 -msgid "Shading" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:27 -msgid "Print using gray shading" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:28 -#, fuzzy -msgid "Format" -msgstr "Re-enviar" - -#: addressbook/printing/e-contact-print.glade.h:29 -#: addressbook/printing/e-contact-print.glade.h:50 -#, fuzzy -msgid "Paper" -msgstr "Pegar" - -#: addressbook/printing/e-contact-print.glade.h:30 -msgid "Type:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:31 -#: addressbook/printing/e-contact-print.glade.h:43 -msgid "label26" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:32 -#: addressbook/printing/e-contact-print.glade.h:44 -msgid "Dimensions:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:33 -#: addressbook/printing/e-contact-print.glade.h:45 -msgid "Width:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:34 -#: addressbook/printing/e-contact-print.glade.h:46 -msgid "Height:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:35 -msgid "Paper source:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:36 -msgid "Margins" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:37 -#, fuzzy -msgid "Top:" -msgstr "A:" - -#: addressbook/printing/e-contact-print.glade.h:38 -msgid "Bottom:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:39 -msgid "Left:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:40 -msgid "Right:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:41 -#, fuzzy -msgid "Page" -msgstr "Pegar" - -#: addressbook/printing/e-contact-print.glade.h:42 -#, fuzzy -msgid "Size:" -msgstr "Tamaño" - -#: addressbook/printing/e-contact-print.glade.h:47 -msgid "Orientation" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:48 -#, fuzzy -msgid "Portrait" -msgstr "Prioridade" - -#: addressbook/printing/e-contact-print.glade.h:49 -msgid "Landscape" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:52 -msgid "Header" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:53 -msgid "Footer:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:55 -msgid "Reverse on even pages" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:56 -msgid "Header/Footer" -msgstr "" - -#: composer/e-msg-composer-address-dialog.c:183 composer/e-msg-composer.c:533 -msgid "Cut" -msgstr "Cortar" - -#: composer/e-msg-composer-address-dialog.c:184 -msgid "Cut selected item into clipboard" -msgstr "Borrar e copiar o elemento seleccionado ó cartafol" - -#: composer/e-msg-composer-address-dialog.c:187 composer/e-msg-composer.c:534 -msgid "Copy" -msgstr "Copiar" - -#: composer/e-msg-composer-address-dialog.c:188 -msgid "Copy selected item into clipboard" -msgstr "Copiar o elemento seleccionado ó cartafol" - -#: composer/e-msg-composer-address-dialog.c:191 -#: composer/e-msg-composer-address-dialog.c:199 composer/e-msg-composer.c:535 -msgid "Paste" -msgstr "Pegar" - -#: composer/e-msg-composer-address-dialog.c:192 -#: composer/e-msg-composer-address-dialog.c:200 -msgid "Paste item from clipboard" -msgstr "Pegar elemento do cartafol" - -#: composer/e-msg-composer-address-dialog.c:528 -msgid "Select recipients' addresses" -msgstr "Seleccionar os enderezos dos destinatarios" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: composer/e-msg-composer-address-dialog.glade.h:7 -msgid "Recipient list:" -msgstr "" - -#: composer/e-msg-composer-address-dialog.glade.h:8 -msgid "Name:" -msgstr "" - -#: composer/e-msg-composer-address-dialog.glade.h:9 -msgid "Search..." -msgstr "" - -#: composer/e-msg-composer-address-dialog.glade.h:10 -msgid "Name" -msgstr "" - -#: composer/e-msg-composer-address-dialog.glade.h:11 -msgid "Address" -msgstr "" - -#: composer/e-msg-composer-address-dialog.glade.h:12 -msgid "Properties..." -msgstr "" - -#: composer/e-msg-composer-address-dialog.glade.h:13 -msgid "Add..." -msgstr "" - -#: composer/e-msg-composer-address-dialog.glade.h:14 -#, fuzzy -msgid "To: >>" -msgstr "A:" - -#: composer/e-msg-composer-address-dialog.glade.h:15 -#, fuzzy -msgid "Cc: >>" -msgstr "Cc:" - -#: composer/e-msg-composer-address-dialog.glade.h:16 -#, fuzzy -msgid "Bcc: >>" -msgstr "Bcc:" - -#: composer/e-msg-composer-address-dialog.glade.h:17 -msgid "label9" -msgstr "" - -#: composer/e-msg-composer-address-dialog.glade.h:18 -msgid "label7" -msgstr "" - -#: composer/e-msg-composer-address-dialog.glade.h:19 -msgid "label8" -msgstr "" - -#: composer/e-msg-composer-attachment-bar.c:76 -msgid "1 byte" -msgstr "1 byte" - -#: composer/e-msg-composer-attachment-bar.c:78 -#, c-format -msgid "%u bytes" -msgstr "%u bytes" - -#: composer/e-msg-composer-attachment-bar.c:85 -#, c-format -msgid "%.1fK" -msgstr "%.1fK" - -#: composer/e-msg-composer-attachment-bar.c:89 -#, c-format -msgid "%.1fM" -msgstr "%.1fM" - -#: composer/e-msg-composer-attachment-bar.c:93 -#, c-format -msgid "%.1fG" -msgstr "%.1fG" - -#: composer/e-msg-composer-attachment-bar.c:307 -msgid "Add attachment" -msgstr "Engadir adxunto" - -#: composer/e-msg-composer-attachment-bar.c:364 -msgid "Remove" -msgstr "Quitar" - -#: composer/e-msg-composer-attachment-bar.c:365 -msgid "Remove selected items from the attachment list" -msgstr "Quitar os elementos seleccionados da lista de adxuntos" - -#: composer/e-msg-composer-attachment-bar.c:396 -msgid "Add attachment..." -msgstr "Engadir adxunto..." - -#: composer/e-msg-composer-attachment-bar.c:397 -msgid "Attach a file to the message" -msgstr "Adxuntar un ficheiro á mensaxe" - -#: composer/e-msg-composer-attachment.c:259 -msgid "Select attachment" -msgstr "Seleccionar adxunto" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: composer/e-msg-composer-attachment.glade.h:7 -msgid "Attachment properties" -msgstr "" - -#: composer/e-msg-composer-attachment.glade.h:9 -msgid "MIME type:" -msgstr "" - -#: composer/e-msg-composer-attachment.glade.h:10 -msgid "File name:" -msgstr "" - -#: composer/e-msg-composer-attachment.glade.h:11 -msgid "Browse..." -msgstr "" - -#: composer/e-msg-composer-hdrs.c:89 -msgid "Click here for the address book" -msgstr "Prema aquí para o libro de enderezos" - -#: composer/e-msg-composer-hdrs.c:124 -msgid "To:" -msgstr "A:" - -#: composer/e-msg-composer-hdrs.c:125 -msgid "Enter the recipients of the message" -msgstr "Introduza os destinatarios da mensaxe" - -#: composer/e-msg-composer-hdrs.c:129 -msgid "Cc:" -msgstr "Cc:" - -#: composer/e-msg-composer-hdrs.c:130 -msgid "Enter the addresses that will receive a carbon copy of the message" -msgstr "Introduza os enderezos que recibirán unha copia da mensaxe" - -#: composer/e-msg-composer-hdrs.c:135 -msgid "Bcc:" -msgstr "Bcc:" - -#: composer/e-msg-composer-hdrs.c:136 -msgid "" -"Enter the addresses that will receive a carbon copy of the message without " -"appearing in the recipient list of the message." -msgstr "" -"Introduza os enderezos que recibirán unha copia da mensaxe sen apareceren na " -"lista de destinatarios." - -#: composer/e-msg-composer-hdrs.c:142 -msgid "Subject:" -msgstr "Asunto:" - -#: composer/e-msg-composer-hdrs.c:143 -msgid "Enter the subject of the mail" -msgstr "Introduza o asunto da mensaxe" - -#: composer/e-msg-composer.c:491 -msgid "Save in _folder..." -msgstr "Gardar en _carpeta..." - -#: composer/e-msg-composer.c:491 -msgid "Save the message in a specified folder" -msgstr "Garda-la mensaxe na carpeta indicada" - -#: composer/e-msg-composer.c:494 composer/e-msg-composer.c:531 -#: mail/folder-browser-factory.c:36 -msgid "Send" -msgstr "Enviar" - -#: composer/e-msg-composer.c:494 -msgid "Send the message" -msgstr "Enviar a mensaxe" - -#: composer/e-msg-composer.c:502 -msgid "View _attachments" -msgstr "Mirar _adxuntos" - -#: composer/e-msg-composer.c:502 -msgid "View/hide attachments" -msgstr "Mirar/ocultar adxuntos" - -#: composer/e-msg-composer.c:531 -msgid "Send this message" -msgstr "Enviar esta mensaxe" - -#: composer/e-msg-composer.c:533 -msgid "Cut selected region into the clipboard" -msgstr "Corta-la rexión seleccionada ó cartafol" - -#: composer/e-msg-composer.c:534 -msgid "Copy selected region into the clipboard" -msgstr "Copia-la rexión seleccionada ó cartafol" - -#: composer/e-msg-composer.c:535 -msgid "Paste selected region into the clipboard" -msgstr "Pega-la rexión seleccionada ó cartafol" - -#: composer/e-msg-composer.c:536 -msgid "Undo" -msgstr "Desfacer" - -#: composer/e-msg-composer.c:536 -msgid "Undo last operation" -msgstr "Desface-la última operación" - -#: composer/e-msg-composer.c:538 -msgid "Attach" -msgstr "Adxuntar" - -#: composer/e-msg-composer.c:538 -msgid "Attach a file" -msgstr "Adxuntar un ficheiro" - -#: mail/folder-browser-factory.c:35 -msgid "Get mail" -msgstr "Baixar correo" - -#: mail/folder-browser-factory.c:35 -msgid "Check for new mail" -msgstr "Comprobar o novo correo" - -#: mail/folder-browser-factory.c:36 -msgid "Send a new message" -msgstr "Enviar unha nova mensaxe" - -#: mail/folder-browser-factory.c:37 -msgid "Find" -msgstr "Buscar" - -#: mail/folder-browser-factory.c:37 -msgid "Find messages" -msgstr "Buscar mensaxes" - -#: mail/folder-browser-factory.c:41 -msgid "Reply" -msgstr "Responder" - -#: mail/folder-browser-factory.c:41 -msgid "Reply to the sender of this message" -msgstr "Responder ó autor desta mensaxe" - -#: mail/folder-browser-factory.c:42 -msgid "Reply to All" -msgstr "Responder a Todos" - -#: mail/folder-browser-factory.c:42 -msgid "Reply to all recipients of this message" -msgstr "Responder a tódolos destinatarios desta mensaxe" - -#: mail/folder-browser-factory.c:44 -msgid "Forward" -msgstr "Re-enviar" - -#: mail/folder-browser-factory.c:44 -msgid "Forward this message" -msgstr "Re-enviar esta mensaxe" - -#: mail/folder-browser-factory.c:48 -msgid "Print" -msgstr "Imprimir" - -#: mail/folder-browser-factory.c:48 -msgid "Print the selected message" -msgstr "Imprimir a mensaxe seleccionada" - -#: mail/folder-browser-factory.c:50 -msgid "Delete this message" -msgstr "Borrar esta mensaxe" - -#: mail/folder-browser-factory.c:67 -msgid "_Expunge" -msgstr "_Eliminar" - -#: mail/folder-browser-factory.c:73 -msgid "_Filter Druid" -msgstr "" - -#: mail/folder-browser-factory.c:186 -msgid "We are sorry, Evolution's Folder Browser can not be initialized." -msgstr "O navegador de carpetas de Evolution non pode ser inicializado." - -#: mail/folder-browser.c:208 -msgid "The URI that the Folder Browser will display" -msgstr "O URI que amosará o navegador de carpetas" - -#: mail/folder-browser.c:211 -msgid "Whether a message preview should be shown" -msgstr "Amosar unha previsualización de mensaxe" - -#: mail/main.c:58 -msgid "Mail Component: I could not initialize Bonobo" -msgstr "Compoñente de Correo: Non se pode inicializar Bonobo" - -#: mail/message-list.c:464 -msgid "Priority" -msgstr "Prioridade" - -#: mail/message-list.c:478 -msgid "From" -msgstr "De" - -#: mail/message-list.c:485 -msgid "Subject" -msgstr "Asunto" - -#: mail/message-list.c:492 -msgid "Sent" -msgstr "Enviado" - -#: mail/message-list.c:499 -msgid "Receive" -msgstr "Recibido" - -#: mail/message-list.c:506 -msgid "To" -msgstr "A" - -#: mail/message-list.c:513 -msgid "Size" -msgstr "Tamaño" - -#. you might have to call gnome_dialog_run() on the -#. * dialog returned here, I don't remember... -#. -#: shell/e-shell-view-menu.c:62 -msgid "Bug buddy was not found in your $PATH." -msgstr "Bug buddy non foi atopado no seu $PATH." - -#. same as above -#: shell/e-shell-view-menu.c:68 -msgid "Bug buddy could not be run." -msgstr "Non se puido executar Bug buddy." - -#: shell/e-shell-view-menu.c:111 -msgid "Evolution" -msgstr "" - -#: shell/e-shell-view-menu.c:113 -msgid "Copyright 1999, 2000 Helix Code, Inc." -msgstr "" - -#: shell/e-shell-view-menu.c:115 -msgid "" -"Evolution is a suite of groupware applications\n" -"for mail, calendaring, and contact management\n" -"within the GNOME desktop environment." -msgstr "" - -#: shell/e-shell-view-menu.c:185 shell/e-shell-view-menu.c:251 -msgid "_Folder" -msgstr "_Carpeta" - -#: shell/e-shell-view-menu.c:189 -msgid "Evolution _Bar Shortcut" -msgstr "_Barra de Atallos de Evolution" - -#: shell/e-shell-view-menu.c:195 -msgid "_Mail message" -msgstr "Enviar _Mensaxe" - -#: shell/e-shell-view-menu.c:196 shell/e-shell-view-menu.c:199 -msgid "Composes a new mail message" -msgstr "Compoñer unha nova mensaxe de correo" - -#: shell/e-shell-view-menu.c:198 -msgid "_Appointment" -msgstr "_Cita" - -#: shell/e-shell-view-menu.c:201 -msgid "Meeting Re_quest" -msgstr "Solicitar _Reunión" - -#: shell/e-shell-view-menu.c:204 -msgid "_Contact" -msgstr "_Contacto" - -#: shell/e-shell-view-menu.c:207 -msgid "_Task" -msgstr "_Tarefa" - -#: shell/e-shell-view-menu.c:210 -msgid "Task _Request" -msgstr "Solicitar _Tarefa" - -#: shell/e-shell-view-menu.c:213 -msgid "_Journal Entry" -msgstr "Entrada de _Xornal" - -#: shell/e-shell-view-menu.c:216 -msgid "_Note" -msgstr "_Nota" - -#: shell/e-shell-view-menu.c:226 -msgid "_Selected Items" -msgstr "Elementos _Seleccionados" - -#: shell/e-shell-view-menu.c:234 -msgid "_New Folder" -msgstr "_Nova Carpeta" - -#: shell/e-shell-view-menu.c:242 -msgid "_New" -msgstr "_Nova" - -#: shell/e-shell-view-menu.c:243 -msgid "_Open" -msgstr "_Abrir" - -#: shell/e-shell-view-menu.c:244 -msgid "Clos_e All Items" -msgstr "_Pechar Tódolos Elementos" - -#: shell/e-shell-view-menu.c:244 -msgid "Closes all the open items" -msgstr "Pechar tódolos elementos abertos" - -#: shell/e-shell-view-menu.c:265 -#, fuzzy -msgid "Show _Shortcut Bar" -msgstr "_Trocar Barra de Atallos" - -#: shell/e-shell-view-menu.c:266 -#, fuzzy -msgid "Shows the shortcut bar" -msgstr "Troca a barra de atallos" - -#: shell/e-shell-view-menu.c:268 -#, fuzzy -msgid "Show _Treeview" -msgstr "_Trocar Vista de Árbore" - -#: shell/e-shell-view-menu.c:269 -#, fuzzy -msgid "Shows the tree view" -msgstr "Troca a visualización da árbore" - -#: shell/e-shell-view-menu.c:284 -msgid "_Submit bug" -msgstr "_Enviar erro" - -#: shell/e-shell-view-menu.c:285 -msgid "Submit bug-report via bug-buddy" -msgstr "Enviar un informe de erro con bug-buddy" - -#. FIXME: add Favorites here -#: shell/e-shell-view-menu.c:300 -msgid "_Tools" -msgstr "_Utilidades" - -#: shell/e-shell-view-menu.c:301 -msgid "_Actions" -msgstr "_Accións" - -#: shell/e-shell.c:157 -#, c-format -msgid "Cannot set up local storage -- %s" -msgstr "Non se pode activar o almacenamento local -- %s" - -#: shell/main.c:100 -msgid "" -"Hi. Thanks for taking the time to download this preview release of\n" -"the Evolution groupware suite.\n" -"\n" -"The Evolution team has worked hard to make Evolution as robust,\n" -"extensible, pretty, fast and well-suited to heavy internet users as\n" -"possible. And we're very tired. But we're not done -- not yet.\n" -"\n" -"As you explore Evolution, please understand that most of our work has\n" -"been focused on the backend engine which drives the entire system and\n" -"not on the user interface. We are just cresting the hill now, though,\n" -"and will be pouring most of our love and attention into the UI from\n" -"here out. But at least you know that you're not using demoware.\n" -"\n" -"So, time for the nerdy disclaimer. Evolution will: crash, lose your\n" -"mail, leave stray processes running, consume 100% CPU, race, lock,\n" -"send HTML mail to random mailing lists, and embarass you in front of\n" -"your friends and co-workers. Use at your own risk.\n" -"\n" -"We hope that you enjoy the results of our hard work, and we eagerly\n" -"await your contributions!\n" -msgstr "" - -#: shell/main.c:129 -msgid "" -"Thanks\n" -"The Evolution Team\n" -msgstr "" - -#: shell/main.c:156 -msgid "Cannot initialize the Evolution shell." -msgstr "Non se pode inicializar a shell de Evolution." - -#: shell/main.c:186 -msgid "Cannot initialize the Bonobo component system." -msgstr "Non se pode inicializar o sistema de compoñentes de Bonobo" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: widgets/e-table/e-table-config.glade.h:7 -#, fuzzy -msgid "Fields" -msgstr "Buscar" - -#: widgets/e-table/e-table-config.glade.h:8 -msgid "Grouping" -msgstr "" - -#: widgets/e-table/e-table-config.glade.h:9 -msgid "Sort" -msgstr "" - -#: widgets/e-table/e-table-config.glade.h:10 -#, fuzzy -msgid "Filter" -msgstr "_Carpeta" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: widgets/e-table/e-table-group.glade.h:7 -msgid "window1" -msgstr "" - -#: widgets/e-table/e-table-group.glade.h:8 -msgid "Available fields" -msgstr "" - -#: widgets/e-table/e-table-group.glade.h:9 -msgid "label1" -msgstr "" - -#: widgets/e-table/e-table-group.glade.h:10 -msgid "Show in this order" -msgstr "" - -#: widgets/e-table/e-table-group.glade.h:11 -msgid "label2" -msgstr "" - -#: widgets/e-table/e-table-group.glade.h:12 -msgid "Add >>" -msgstr "" - -#: widgets/e-table/e-table-group.glade.h:13 -#, fuzzy -msgid "<< Remove" -msgstr "Quitar" - -#~ msgid "" -#~ "This is a development version of Evolution.\n" -#~ "Using the mail component on your mail files\n" -#~ "is extremely hazardous.\n" -#~ "\n" -#~ "Do not run this program on your real mail,\n" -#~ "do not give it access to your real mail server,\n" -#~ "and do not send mail to real people with it.\n" -#~ "\n" -#~ "You have been warned\n" -#~ msgstr "" -#~ "Esta é unha versión de desenvolvemento de Evolution.\n" -#~ "Usa-lo compoñente de correo nos seus ficheiros de\n" -#~ "correo pode ser perxudicial.\n" -#~ "\n" -#~ "Non execute este programa no seu correo real, non\n" -#~ "lle dea acceso ó seu servidor de correo real, e\n" -#~ "non envíe mensaxes a xente real con el.\n" -#~ "\n" -#~ "Vostede está avisado\n" diff --git a/po/hu.po b/po/hu.po deleted file mode 100644 index 90b0f91384..0000000000 --- a/po/hu.po +++ /dev/null @@ -1,1028 +0,0 @@ -# Evolution Hungarian translations -# Copyright (C) 2000 Free Software Foundation, Inc. -# Szabolcs BAN , 2000. -# -msgid "" -msgstr "" -"Project-Id-Version: evolution VERSION\n" -"POT-Creation-Date: 2000-05-27 20:01+0100\n" -"PO-Revision-Date: 2000-05-19 19:06+0100\n" -"Last-Translator: Szabolcs BAN \n" -"Language-Team: Hungarian \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=8859-2\n" -"Content-Transfer-Encoding: 8bits\n" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/contact-editor/e-contact-editor-strings.h:7 -msgid "Contact Editor" -msgstr "Névjegy szerkesztõ" - -#: addressbook/contact-editor/e-contact-editor-strings.h:8 -msgid "_Full Name..." -msgstr "_Teljes név..." - -#: addressbook/contact-editor/e-contact-editor-strings.h:9 -msgid "Company:" -msgstr "Vállalat:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:10 -msgid "File As:" -msgstr "Fájl mint:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:11 -msgid "Web page address:" -msgstr "Weblap cím:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:12 -#, fuzzy -msgid "Wants to receive _HTML mail" -msgstr "_HTML levelet kér" - -#: addressbook/contact-editor/e-contact-editor-strings.h:13 -msgid "Address:" -msgstr "Cím:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:14 -msgid "_Business" -msgstr "Ü_zleti" - -#: addressbook/contact-editor/e-contact-editor-strings.h:15 -msgid "_Home" -msgstr "_Otthoni" - -#: addressbook/contact-editor/e-contact-editor-strings.h:16 -msgid "Business _Fax" -msgstr "Üzleti _fax" - -#: addressbook/contact-editor/e-contact-editor-strings.h:17 -msgid "_Mobile" -msgstr "_Mobil" - -#: addressbook/contact-editor/e-contact-editor-strings.h:18 -msgid "Primary Email" -msgstr "Elsõdleges email" - -#: addressbook/contact-editor/e-contact-editor-strings.h:19 -msgid "Business" -msgstr "Üzleti" - -#: addressbook/contact-editor/e-contact-editor-strings.h:20 -msgid "This is the _mailing address" -msgstr "Ez a _levelezési cím" - -#: addressbook/contact-editor/e-contact-editor-strings.h:21 -msgid "_Contacts..." -msgstr "_Névjegyek..." - -#: addressbook/contact-editor/e-contact-editor-strings.h:22 -msgid "Ca_tegories..." -msgstr "Ka_tegóriák..." - -#: addressbook/contact-editor/e-contact-editor-strings.h:23 -msgid "Job Title" -msgstr "Beosztás" - -#: addressbook/contact-editor/e-contact-editor-strings.h:24 -msgid "General" -msgstr "Alap" - -#: addressbook/contact-editor/e-contact-editor-strings.h:25 -msgid "Department:" -msgstr "Osztály:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:26 -msgid "Office:" -msgstr "Hivatal:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:27 -msgid "Profession:" -msgstr "Foglalkozás:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:28 -msgid "Nickname:" -msgstr "Becenév:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:29 -msgid "Spouse:" -msgstr "Házastárs:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:30 -msgid "Birthday:" -msgstr "Születésnap:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:31 -msgid "Assistant's name:" -msgstr "Asszisztens neve:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:32 -msgid "Manager's Name:" -msgstr "Fõnök neve:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:33 -msgid "Anniversary:" -msgstr "Évforduló:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:34 -msgid "Notes:" -msgstr "Feljegyzések:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:35 -msgid "Details" -msgstr "Részletek" - -#: addressbook/contact-editor/e-contact-editor-strings.h:36 -#: addressbook/contact-editor/e-contact-editor-strings.h:41 -msgid "Add" -msgstr "Hozzáad" - -#: addressbook/contact-editor/e-contact-editor-strings.h:37 -#: mail/folder-browser-factory.c:50 -msgid "Delete" -msgstr "Töröl" - -#: addressbook/contact-editor/e-contact-editor-strings.h:38 -msgid "Phone Types" -msgstr "Telefon típusok" - -#: addressbook/contact-editor/e-contact-editor-strings.h:39 -#: addressbook/contact-editor/e-contact-editor-strings.h:40 -msgid "New phone type" -msgstr "Új telefon típus" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/contact-editor/fullname-strings.h:7 -msgid "Check Full Name" -msgstr "A teljes név ellenõrzése" - -#: addressbook/contact-editor/fullname-strings.h:8 -msgid "_Title:" -msgstr "_Beosztás:" - -#: addressbook/contact-editor/fullname-strings.h:9 -msgid "_First:" -msgstr "_Keresztnév:" - -#: addressbook/contact-editor/fullname-strings.h:10 -msgid "_Middle:" -msgstr "_Utónév:" - -#: addressbook/contact-editor/fullname-strings.h:11 -msgid "_Last:" -msgstr "_Vezetéknév:" - -#: addressbook/contact-editor/fullname-strings.h:12 -msgid "_Suffix:" -msgstr "_Elõtag:" - -#: addressbook/contact-editor/fullname-strings.h:13 -msgid "" -"\n" -"Mr.\n" -"Mrs.\n" -"Dr.\n" -msgstr "" -"\n" -"Dr.\n" -"Prof.\n" - -#: addressbook/contact-editor/fullname-strings.h:18 -msgid "" -"\n" -"Sr.\n" -"Jr.\n" -"I\n" -"II\n" -"III\n" -"Esq.\n" -msgstr "" -"\n" -"Ifj.\n" -"Özv.\n" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/gui/component/ldap-server-dialog.glade.h:7 -#: composer/e-msg-composer-attachment.glade.h:8 -msgid "Description:" -msgstr "Leírás:" - -#: addressbook/gui/component/ldap-server-dialog.glade.h:8 -msgid "LDAP Server:" -msgstr "LDAP szerver:" - -#: addressbook/gui/component/ldap-server-dialog.glade.h:9 -msgid "Port Number:" -msgstr "Portszám:" - -#: addressbook/gui/component/ldap-server-dialog.glade.h:10 -msgid "Root DN:" -msgstr "Root DN:" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/printing/e-contact-print.glade.h:7 -msgid "Page Setup:" -msgstr "Oldal beállítás:" - -#: addressbook/printing/e-contact-print.glade.h:8 -msgid "Style name:" -msgstr "Stílus neve:" - -#: addressbook/printing/e-contact-print.glade.h:9 -msgid "Preview:" -msgstr "Elõnézet:" - -#: addressbook/printing/e-contact-print.glade.h:10 -msgid "Options" -msgstr "Beállítások" - -#: addressbook/printing/e-contact-print.glade.h:11 -msgid "Include:" -msgstr "Beleértve:" - -#: addressbook/printing/e-contact-print.glade.h:12 -msgid "Sections:" -msgstr "Szekciók:" - -#: addressbook/printing/e-contact-print.glade.h:13 -msgid "Immediately follow each other" -msgstr "Rögtön egymás után következnek" - -#: addressbook/printing/e-contact-print.glade.h:14 -msgid "Letter tabs on side" -msgstr "Levél címkék minden lapon" - -#: addressbook/printing/e-contact-print.glade.h:15 -msgid "Headings for each letter" -msgstr "Fejléc minden levélnek" - -#: addressbook/printing/e-contact-print.glade.h:16 -msgid "Start on a new page" -msgstr "Új lapon kezdd" - -#: addressbook/printing/e-contact-print.glade.h:17 -msgid "Number of columns:" -msgstr "Oszlopok száma:" - -#: addressbook/printing/e-contact-print.glade.h:18 -msgid "Blank forms at end:" -msgstr "A végén a formok ürítése:" - -#: addressbook/printing/e-contact-print.glade.h:19 -msgid "Fonts" -msgstr "Betûtípusok" - -#: addressbook/printing/e-contact-print.glade.h:20 -#: addressbook/printing/e-contact-print.glade.h:21 -#: addressbook/printing/e-contact-print.glade.h:51 -#: addressbook/printing/e-contact-print.glade.h:54 -msgid "Font..." -msgstr "Betûtípus..." - -#: addressbook/printing/e-contact-print.glade.h:22 -msgid "Headings" -msgstr "Fejlécek" - -#: addressbook/printing/e-contact-print.glade.h:23 -msgid "10 pt. Tahoma" -msgstr "10 pt. Tahoma" - -#: addressbook/printing/e-contact-print.glade.h:24 -msgid "Body" -msgstr "Törzs" - -#: addressbook/printing/e-contact-print.glade.h:25 -msgid "8 pt. Tahoma" -msgstr "8 pt. Tahoma" - -#: addressbook/printing/e-contact-print.glade.h:26 -msgid "Shading" -msgstr "Árnyalás" - -#: addressbook/printing/e-contact-print.glade.h:27 -msgid "Print using gray shading" -msgstr "Nyomatás szürkeskálás árnyalással" - -#: addressbook/printing/e-contact-print.glade.h:28 -msgid "Format" -msgstr "Formátum" - -#: addressbook/printing/e-contact-print.glade.h:29 -#: addressbook/printing/e-contact-print.glade.h:50 -msgid "Paper" -msgstr "Papír" - -#: addressbook/printing/e-contact-print.glade.h:30 -msgid "Type:" -msgstr "Típus" - -#: addressbook/printing/e-contact-print.glade.h:31 -#: addressbook/printing/e-contact-print.glade.h:43 -msgid "label26" -msgstr "label26" - -#: addressbook/printing/e-contact-print.glade.h:32 -#: addressbook/printing/e-contact-print.glade.h:44 -msgid "Dimensions:" -msgstr "Dimenziók:" - -#: addressbook/printing/e-contact-print.glade.h:33 -#: addressbook/printing/e-contact-print.glade.h:45 -msgid "Width:" -msgstr "Szélesség:" - -#: addressbook/printing/e-contact-print.glade.h:34 -#: addressbook/printing/e-contact-print.glade.h:46 -msgid "Height:" -msgstr "Magasság:" - -#: addressbook/printing/e-contact-print.glade.h:35 -msgid "Paper source:" -msgstr "Papír forrás:" - -#: addressbook/printing/e-contact-print.glade.h:36 -msgid "Margins" -msgstr "Margók" - -#: addressbook/printing/e-contact-print.glade.h:37 -msgid "Top:" -msgstr "Felsõ:" - -#: addressbook/printing/e-contact-print.glade.h:38 -msgid "Bottom:" -msgstr "Alsó:" - -#: addressbook/printing/e-contact-print.glade.h:39 -msgid "Left:" -msgstr "Bal:" - -#: addressbook/printing/e-contact-print.glade.h:40 -msgid "Right:" -msgstr "Jobb:" - -#: addressbook/printing/e-contact-print.glade.h:41 -msgid "Page" -msgstr "Lap" - -#: addressbook/printing/e-contact-print.glade.h:42 -msgid "Size:" -msgstr "Méret:" - -#: addressbook/printing/e-contact-print.glade.h:47 -msgid "Orientation" -msgstr "Elhelyezkedés" - -#: addressbook/printing/e-contact-print.glade.h:48 -msgid "Portrait" -msgstr "Álló" - -#: addressbook/printing/e-contact-print.glade.h:49 -msgid "Landscape" -msgstr "Fekvõ" - -#: addressbook/printing/e-contact-print.glade.h:52 -msgid "Header" -msgstr "Fejléc" - -#: addressbook/printing/e-contact-print.glade.h:53 -msgid "Footer:" -msgstr "Lábléc:" - -#: addressbook/printing/e-contact-print.glade.h:55 -msgid "Reverse on even pages" -msgstr "Páros lapokon fordított" - -#: addressbook/printing/e-contact-print.glade.h:56 -msgid "Header/Footer" -msgstr "Fejléc/lábléc" - -#: composer/e-msg-composer-address-dialog.c:183 composer/e-msg-composer.c:533 -msgid "Cut" -msgstr "Kivág" - -#: composer/e-msg-composer-address-dialog.c:184 -msgid "Cut selected item into clipboard" -msgstr "Kivágja a kiválasztott elemet a vágólapra" - -#: composer/e-msg-composer-address-dialog.c:187 composer/e-msg-composer.c:534 -msgid "Copy" -msgstr "Másol" - -#: composer/e-msg-composer-address-dialog.c:188 -msgid "Copy selected item into clipboard" -msgstr "Másolja a kiválasztott elemet a vágólapra" - -#: composer/e-msg-composer-address-dialog.c:191 -#: composer/e-msg-composer-address-dialog.c:199 composer/e-msg-composer.c:535 -msgid "Paste" -msgstr "Beilleszt" - -#: composer/e-msg-composer-address-dialog.c:192 -#: composer/e-msg-composer-address-dialog.c:200 -msgid "Paste item from clipboard" -msgstr "Beilleszti az elemet a vágólapról" - -#: composer/e-msg-composer-address-dialog.c:528 -msgid "Select recipients' addresses" -msgstr "A címzettek címeinek kiválasztása" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: composer/e-msg-composer-address-dialog.glade.h:7 -msgid "Recipient list:" -msgstr "Címzett lista:" - -#: composer/e-msg-composer-address-dialog.glade.h:8 -msgid "Name:" -msgstr "Név:" - -#: composer/e-msg-composer-address-dialog.glade.h:9 -msgid "Search..." -msgstr "Keres..." - -#: composer/e-msg-composer-address-dialog.glade.h:10 -msgid "Name" -msgstr "Név" - -#: composer/e-msg-composer-address-dialog.glade.h:11 -msgid "Address" -msgstr "Cím" - -#: composer/e-msg-composer-address-dialog.glade.h:12 -msgid "Properties..." -msgstr "Tulajdonságok..." - -#: composer/e-msg-composer-address-dialog.glade.h:13 -msgid "Add..." -msgstr "Hozzáad..." - -#: composer/e-msg-composer-address-dialog.glade.h:14 -msgid "To: >>" -msgstr "To: >>" - -#: composer/e-msg-composer-address-dialog.glade.h:15 -msgid "Cc: >>" -msgstr "Cc: >>" - -#: composer/e-msg-composer-address-dialog.glade.h:16 -msgid "Bcc: >>" -msgstr "Bcc: >>" - -#: composer/e-msg-composer-address-dialog.glade.h:17 -msgid "label9" -msgstr "label9" - -#: composer/e-msg-composer-address-dialog.glade.h:18 -msgid "label7" -msgstr "label7" - -#: composer/e-msg-composer-address-dialog.glade.h:19 -msgid "label8" -msgstr "label8" - -#: composer/e-msg-composer-attachment-bar.c:76 -msgid "1 byte" -msgstr "1 bájt" - -#: composer/e-msg-composer-attachment-bar.c:78 -#, c-format -msgid "%u bytes" -msgstr "%u bájt" - -#: composer/e-msg-composer-attachment-bar.c:85 -#, c-format -msgid "%.1fK" -msgstr "%.1fK" - -#: composer/e-msg-composer-attachment-bar.c:89 -#, c-format -msgid "%.1fM" -msgstr "%.1fM" - -#: composer/e-msg-composer-attachment-bar.c:93 -#, c-format -msgid "%.1fG" -msgstr "%.1fG" - -#: composer/e-msg-composer-attachment-bar.c:307 -msgid "Add attachment" -msgstr "Csatolás hozzáadása" - -#: composer/e-msg-composer-attachment-bar.c:364 -msgid "Remove" -msgstr "Törlés" - -#: composer/e-msg-composer-attachment-bar.c:365 -msgid "Remove selected items from the attachment list" -msgstr "Törli a kiválasztott elemeket a csatolási listáról" - -#: composer/e-msg-composer-attachment-bar.c:396 -msgid "Add attachment..." -msgstr "Csatol..." - -#: composer/e-msg-composer-attachment-bar.c:397 -msgid "Attach a file to the message" -msgstr "Csatolj egy fájlt a levélhez" - -#: composer/e-msg-composer-attachment.c:259 -msgid "Select attachment" -msgstr "Csatolás kiválasztása" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: composer/e-msg-composer-attachment.glade.h:7 -msgid "Attachment properties" -msgstr "Csatolás beállítások" - -#: composer/e-msg-composer-attachment.glade.h:9 -msgid "MIME type:" -msgstr "MIME típus:" - -#: composer/e-msg-composer-attachment.glade.h:10 -msgid "File name:" -msgstr "Fájlnév:" - -#: composer/e-msg-composer-attachment.glade.h:11 -msgid "Browse..." -msgstr "Keres..." - -#: composer/e-msg-composer-hdrs.c:89 -msgid "Click here for the address book" -msgstr "Címjegyzékben való kereséshez kattints ide" - -#: composer/e-msg-composer-hdrs.c:124 -msgid "To:" -msgstr "To:" - -#: composer/e-msg-composer-hdrs.c:125 -msgid "Enter the recipients of the message" -msgstr "Írd be a levél címzettjét" - -#: composer/e-msg-composer-hdrs.c:129 -msgid "Cc:" -msgstr "Cc:" - -#: composer/e-msg-composer-hdrs.c:130 -msgid "Enter the addresses that will receive a carbon copy of the message" -msgstr "Írd be, kik kapjanak másolatot a levélrõl" - -#: composer/e-msg-composer-hdrs.c:135 -msgid "Bcc:" -msgstr "Bcc:" - -#: composer/e-msg-composer-hdrs.c:136 -msgid "" -"Enter the addresses that will receive a carbon copy of the message without " -"appearing in the recipient list of the message." -msgstr "" -"Írd be azokat a címeket, akik rejtett másolatot kapnak a levélrõl, azaz a " -"címzettnél nem jelenik meg a címük" - -#: composer/e-msg-composer-hdrs.c:142 -msgid "Subject:" -msgstr "Téma:" - -#: composer/e-msg-composer-hdrs.c:143 -msgid "Enter the subject of the mail" -msgstr "Írd be a levél címét (subject)" - -#: composer/e-msg-composer.c:491 -msgid "Save in _folder..." -msgstr "Mentsd _mappába" - -#: composer/e-msg-composer.c:491 -msgid "Save the message in a specified folder" -msgstr "A levél elmentése másik mappába" - -#: composer/e-msg-composer.c:494 composer/e-msg-composer.c:531 -#: mail/folder-browser-factory.c:36 -msgid "Send" -msgstr "Elküld" - -#: composer/e-msg-composer.c:494 -msgid "Send the message" -msgstr "Levél elküldése" - -#: composer/e-msg-composer.c:502 -msgid "View _attachments" -msgstr "Csatolások _nézete" - -#: composer/e-msg-composer.c:502 -msgid "View/hide attachments" -msgstr "Csatolások megtekintése" - -#: composer/e-msg-composer.c:531 -msgid "Send this message" -msgstr "Küldd el a levelet" - -#: composer/e-msg-composer.c:533 -msgid "Cut selected region into the clipboard" -msgstr "Vágd ki a kiválasztott részt a vágólapra" - -#: composer/e-msg-composer.c:534 -msgid "Copy selected region into the clipboard" -msgstr "Másold ki a kiválasztott részt a vágólapra" - -#: composer/e-msg-composer.c:535 -msgid "Paste selected region into the clipboard" -msgstr "Másold be a kiválasztott részt a vágólapról" - -#: composer/e-msg-composer.c:536 -msgid "Undo" -msgstr "Visszavon" - -#: composer/e-msg-composer.c:536 -msgid "Undo last operation" -msgstr "Az utolsó mûvelet visszavonása" - -#: composer/e-msg-composer.c:538 -msgid "Attach" -msgstr "Csatolás" - -#: composer/e-msg-composer.c:538 -msgid "Attach a file" -msgstr "Fájl csatolása" - -#: mail/folder-browser-factory.c:35 -msgid "Get mail" -msgstr "Levél letöltése" - -#: mail/folder-browser-factory.c:35 -msgid "Check for new mail" -msgstr "Új levél jött-e?" - -#: mail/folder-browser-factory.c:36 -msgid "Send a new message" -msgstr "Új levél küldése" - -#: mail/folder-browser-factory.c:37 -msgid "Find" -msgstr "Keres" - -#: mail/folder-browser-factory.c:37 -msgid "Find messages" -msgstr "Levelek keresése" - -#: mail/folder-browser-factory.c:41 -msgid "Reply" -msgstr "Válasz" - -#: mail/folder-browser-factory.c:41 -msgid "Reply to the sender of this message" -msgstr "Válasz küldése a feladónak erre a levélre" - -#: mail/folder-browser-factory.c:42 -msgid "Reply to All" -msgstr "Válasz mindenkinek" - -#: mail/folder-browser-factory.c:42 -msgid "Reply to all recipients of this message" -msgstr "Válasz a feladónak és az összes címzettnek" - -#: mail/folder-browser-factory.c:44 -msgid "Forward" -msgstr "Továbbít" - -#: mail/folder-browser-factory.c:44 -msgid "Forward this message" -msgstr "A levél továbbítása" - -#: mail/folder-browser-factory.c:48 -msgid "Print" -msgstr "Nyomtat" - -#: mail/folder-browser-factory.c:48 -msgid "Print the selected message" -msgstr "A levél nyomtatása" - -#: mail/folder-browser-factory.c:50 -msgid "Delete this message" -msgstr "A levél törlése" - -#: mail/folder-browser-factory.c:67 -msgid "_Expunge" -msgstr "_Tisztít" - -#: mail/folder-browser-factory.c:73 -msgid "_Filter Druid" -msgstr "_Szûrõ varázsló" - -#: mail/folder-browser-factory.c:186 -msgid "We are sorry, Evolution's Folder Browser can not be initialized." -msgstr "Bocs, az Evolution Mappa Böngészõjét nem tudom elindítani." - -#: mail/folder-browser.c:208 -msgid "The URI that the Folder Browser will display" -msgstr "Az URI amit a Mappa Böngészõ meg fog nyitni" - -#: mail/folder-browser.c:211 -msgid "Whether a message preview should be shown" -msgstr "Akár egy üzenet elõnézete is megmutatható" - -#: mail/main.c:58 -msgid "Mail Component: I could not initialize Bonobo" -msgstr "Levél komponens: Nem tudom a bonobo-t elindítani" - -#: mail/message-list.c:464 -msgid "Priority" -msgstr "Prioritás" - -#: mail/message-list.c:478 -msgid "From" -msgstr "Feladó" - -#: mail/message-list.c:485 -msgid "Subject" -msgstr "Téma" - -#: mail/message-list.c:492 -msgid "Sent" -msgstr "Elküld" - -#: mail/message-list.c:499 -msgid "Receive" -msgstr "Fogad" - -#: mail/message-list.c:506 -msgid "To" -msgstr "Címzett" - -#: mail/message-list.c:513 -msgid "Size" -msgstr "Méret" - -#. you might have to call gnome_dialog_run() on the -#. * dialog returned here, I don't remember... -#. -#: shell/e-shell-view-menu.c:62 -msgid "Bug buddy was not found in your $PATH." -msgstr "Bug buddy nem található a $PATH-odban." - -#. same as above -#: shell/e-shell-view-menu.c:68 -msgid "Bug buddy could not be run." -msgstr "A Bug buddy-t nem tudom futtatni." - -#: shell/e-shell-view-menu.c:111 -msgid "Evolution" -msgstr "Evolution" - -#: shell/e-shell-view-menu.c:113 -msgid "Copyright 1999, 2000 Helix Code, Inc." -msgstr "Copyright 1999, 2000 Helix Code, Inc." - -#: shell/e-shell-view-menu.c:115 -msgid "" -"Evolution is a suite of groupware applications\n" -"for mail, calendaring, and contact management\n" -"within the GNOME desktop environment." -msgstr "" -"Az Evolution egy munkacsoport program \n" -"levelezéshez, naptár és címjegyzék funkciókkal\n" -"a GNOME grafikus környezethez." - -#: shell/e-shell-view-menu.c:185 shell/e-shell-view-menu.c:251 -msgid "_Folder" -msgstr "_Mappa" - -#: shell/e-shell-view-menu.c:189 -msgid "Evolution _Bar Shortcut" -msgstr "Evolution _Indítósáv" - -#: shell/e-shell-view-menu.c:195 -msgid "_Mail message" -msgstr "_Levél" - -#: shell/e-shell-view-menu.c:196 shell/e-shell-view-menu.c:199 -msgid "Composes a new mail message" -msgstr "Egy új levelet készít" - -#: shell/e-shell-view-menu.c:198 -msgid "_Appointment" -msgstr "_Idõpont" - -#: shell/e-shell-view-menu.c:201 -msgid "Meeting Re_quest" -msgstr "Találkozó _felhívás" - -#: shell/e-shell-view-menu.c:204 -msgid "_Contact" -msgstr "_Címjegyzék" - -#: shell/e-shell-view-menu.c:207 -msgid "_Task" -msgstr "Fe_ladatok" - -#: shell/e-shell-view-menu.c:210 -msgid "Task _Request" -msgstr "Feladat f_elhívás" - -#: shell/e-shell-view-menu.c:213 -msgid "_Journal Entry" -msgstr "_Napló bejegyzés" - -#: shell/e-shell-view-menu.c:216 -msgid "_Note" -msgstr "_Megjegyzés" - -#: shell/e-shell-view-menu.c:226 -msgid "_Selected Items" -msgstr "_Kiválasztott elemek" - -#: shell/e-shell-view-menu.c:234 -msgid "_New Folder" -msgstr "Ú_j mappa" - -#: shell/e-shell-view-menu.c:242 -msgid "_New" -msgstr "Ú_j" - -#: shell/e-shell-view-menu.c:243 -msgid "_Open" -msgstr "_Megnyit" - -#: shell/e-shell-view-menu.c:244 -msgid "Clos_e All Items" -msgstr "_Bezár minden elemet" - -#: shell/e-shell-view-menu.c:244 -msgid "Closes all the open items" -msgstr "Az összes megnyitott elemet bezárja" - -#: shell/e-shell-view-menu.c:265 -#, fuzzy -msgid "Show _Shortcut Bar" -msgstr "_Indítósáv használata" - -#: shell/e-shell-view-menu.c:266 -#, fuzzy -msgid "Shows the shortcut bar" -msgstr "Az indítósávot kapcsolja ki/be" - -#: shell/e-shell-view-menu.c:268 -#, fuzzy -msgid "Show _Treeview" -msgstr "Fanézet használata" - -#: shell/e-shell-view-menu.c:269 -#, fuzzy -msgid "Shows the tree view" -msgstr "A mappa struktúra nézetét kapcsolja ki/be" - -#: shell/e-shell-view-menu.c:284 -msgid "_Submit bug" -msgstr "_Hibajelentés küldése" - -#: shell/e-shell-view-menu.c:285 -msgid "Submit bug-report via bug-buddy" -msgstr "Hibajelentés feladása bug-buddy-val" - -#. FIXME: add Favorites here -#: shell/e-shell-view-menu.c:300 -msgid "_Tools" -msgstr "_Eszközök" - -#: shell/e-shell-view-menu.c:301 -msgid "_Actions" -msgstr "_Mûveletek" - -#: shell/e-shell.c:157 -#, c-format -msgid "Cannot set up local storage -- %s" -msgstr "Nem tudom beállítani a helyi tárterületet -- %s" - -#: shell/main.c:100 -msgid "" -"Hi. Thanks for taking the time to download this preview release of\n" -"the Evolution groupware suite.\n" -"\n" -"The Evolution team has worked hard to make Evolution as robust,\n" -"extensible, pretty, fast and well-suited to heavy internet users as\n" -"possible. And we're very tired. But we're not done -- not yet.\n" -"\n" -"As you explore Evolution, please understand that most of our work has\n" -"been focused on the backend engine which drives the entire system and\n" -"not on the user interface. We are just cresting the hill now, though,\n" -"and will be pouring most of our love and attention into the UI from\n" -"here out. But at least you know that you're not using demoware.\n" -"\n" -"So, time for the nerdy disclaimer. Evolution will: crash, lose your\n" -"mail, leave stray processes running, consume 100% CPU, race, lock,\n" -"send HTML mail to random mailing lists, and embarass you in front of\n" -"your friends and co-workers. Use at your own risk.\n" -"\n" -"We hope that you enjoy the results of our hard work, and we eagerly\n" -"await your contributions!\n" -msgstr "" -"Helló, köszönjük, hogy letöltötted az Evolution csomag fejlesztõi \n" -"verzióját.\n" -"\n" -"Az Evolution csapat sokat és keményen dolgozott hogy az Evolution-t \n" -"robusztussá, széppé, jól használhatóvá, gyorssá és jól tervezetté \n" -"tegye, ahogy csak lehetett. Nagyon fáradtak vagyunk. Még nem vagyunk \n" -"kész, még nem.\n" -"\n" -"As you explore Evolution, please understand that most of our work has\n" -"been focused on the backend engine which drives the entire system and\n" -"not on the user interface. We are just cresting the hill now, though,\n" -"and will be pouring most of our love and attention into the UI from\n" -"here out. But at least you know that you're not using demoware.\n" -"\n" -"So, time for the nerdy disclaimer. Evolution will: crash, lose your\n" -"mail, leave stray processes running, consume 100% CPU, race, lock,\n" -"send HTML mail to random mailing lists, and embarass you in front of\n" -"your friends and co-workers. Use at your own risk.\n" -"\n" -"We hope that you enjoy the results of our hard work, and we eagerly\n" -"await your contributions!\n" - -#: shell/main.c:129 -msgid "" -"Thanks\n" -"The Evolution Team\n" -msgstr "" -"Köszönettel\n" -"Az Evolution Csapat\n" - -#: shell/main.c:156 -msgid "Cannot initialize the Evolution shell." -msgstr "Nem tudom elindítani az Evolution shell-t." - -#: shell/main.c:186 -msgid "Cannot initialize the Bonobo component system." -msgstr "Nem tudom elindítani a Bonobo komponens rendszert." - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: widgets/e-table/e-table-config.glade.h:7 -msgid "Fields" -msgstr "Mezõk" - -#: widgets/e-table/e-table-config.glade.h:8 -msgid "Grouping" -msgstr "Csoportosítás" - -#: widgets/e-table/e-table-config.glade.h:9 -msgid "Sort" -msgstr "Rendezés" - -#: widgets/e-table/e-table-config.glade.h:10 -msgid "Filter" -msgstr "Szûrõ" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: widgets/e-table/e-table-group.glade.h:7 -msgid "window1" -msgstr "window1" - -#: widgets/e-table/e-table-group.glade.h:8 -msgid "Available fields" -msgstr "Meglévõ mezõk" - -#: widgets/e-table/e-table-group.glade.h:9 -msgid "label1" -msgstr "label1" - -#: widgets/e-table/e-table-group.glade.h:10 -msgid "Show in this order" -msgstr "Ilyen rendezésben mutasd" - -#: widgets/e-table/e-table-group.glade.h:11 -msgid "label2" -msgstr "label2" - -#: widgets/e-table/e-table-group.glade.h:12 -msgid "Add >>" -msgstr "Hozzáad >>" - -#: widgets/e-table/e-table-group.glade.h:13 -msgid "<< Remove" -msgstr "<< Töröl" diff --git a/po/ja.po b/po/ja.po deleted file mode 100644 index 6ffc3f4400..0000000000 --- a/po/ja.po +++ /dev/null @@ -1,1033 +0,0 @@ -# evolution ja.po -# Copyright (C) 2000 Free Software Foundation, Inc. -# Akira TAGOH , 2000. -# -msgid "" -msgstr "" -"Project-Id-Version: evolution CVS-20000518\n" -"POT-Creation-Date: 2000-05-27 20:01+0100\n" -"PO-Revision-Date: 2000-05-22 03:09+0900\n" -"Last-Translator: Akira TAGOH \n" -"Language-Team: Japanese \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=euc-jp\n" -"Content-Transfer-Encoding: 8bit\n" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/contact-editor/e-contact-editor-strings.h:7 -msgid "Contact Editor" -msgstr "¥³¥ó¥¿¥¯¥È¥¨¥Ç¥£¥¿" - -#: addressbook/contact-editor/e-contact-editor-strings.h:8 -msgid "_Full Name..." -msgstr "¥Õ¥ë¥Í¡¼¥à(_F)..." - -#: addressbook/contact-editor/e-contact-editor-strings.h:9 -msgid "Company:" -msgstr "²ñ¼Ò:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:10 -msgid "File As:" -msgstr "¥Õ¥¡¥¤¥ë̾:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:11 -msgid "Web page address:" -msgstr "Web ¥Ú¡¼¥¸¥¢¥É¥ì¥¹:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:12 -msgid "Wants to receive _HTML mail" -msgstr "HTML ¥á¡¼¥ë¤Î¼õ¿®¤ò˾¤à(_H)" - -#: addressbook/contact-editor/e-contact-editor-strings.h:13 -msgid "Address:" -msgstr "¥¢¥É¥ì¥¹:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:14 -msgid "_Business" -msgstr "»Å»ö(_B)" - -#: addressbook/contact-editor/e-contact-editor-strings.h:15 -msgid "_Home" -msgstr "²È(_H)" - -#: addressbook/contact-editor/e-contact-editor-strings.h:16 -msgid "Business _Fax" -msgstr "»Å»ö¤Î Fax(_F)" - -#: addressbook/contact-editor/e-contact-editor-strings.h:17 -msgid "_Mobile" -msgstr "¥â¥Ð¥¤¥ë(_M)" - -#: addressbook/contact-editor/e-contact-editor-strings.h:18 -msgid "Primary Email" -msgstr "¼çÍ×¤Ê email" - -#: addressbook/contact-editor/e-contact-editor-strings.h:19 -msgid "Business" -msgstr "»Å»ö" - -#: addressbook/contact-editor/e-contact-editor-strings.h:20 -msgid "This is the _mailing address" -msgstr "¤³¤ì¤Ï¥á¡¼¥ë¥¢¥É¥ì¥¹¤Ç¤¹(_m)" - -#: addressbook/contact-editor/e-contact-editor-strings.h:21 -msgid "_Contacts..." -msgstr "Ï¢Íí(_C)..." - -#: addressbook/contact-editor/e-contact-editor-strings.h:22 -msgid "Ca_tegories..." -msgstr "¼ïÎà(_t)..." - -#: addressbook/contact-editor/e-contact-editor-strings.h:23 -msgid "Job Title" -msgstr "»Å»ö¤Î¥¿¥¤¥È¥ë" - -#: addressbook/contact-editor/e-contact-editor-strings.h:24 -msgid "General" -msgstr "°ìÈÌ" - -#: addressbook/contact-editor/e-contact-editor-strings.h:25 -msgid "Department:" -msgstr "ÉôÌç:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:26 -msgid "Office:" -msgstr "´±¿¦:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:27 -msgid "Profession:" -msgstr "ÀìÌç:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:28 -msgid "Nickname:" -msgstr "¥Ë¥Ã¥¯¥Í¡¼¥à:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:29 -msgid "Spouse:" -msgstr "ÇÛ¶ö¼Ô:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:30 -msgid "Birthday:" -msgstr "ÃÂÀ¸Æü:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:31 -msgid "Assistant's name:" -msgstr "¥¢¥·¥¹¥¿¥ó¥È¤Î̾Á°:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:32 -msgid "Manager's Name:" -msgstr "·Ð±Ä¼Ô¤Î̾Á°:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:33 -msgid "Anniversary:" -msgstr "µ­Ç°Æü:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:34 -msgid "Notes:" -msgstr "¥Î¡¼¥È:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:35 -msgid "Details" -msgstr "¾ÜºÙ" - -#: addressbook/contact-editor/e-contact-editor-strings.h:36 -#: addressbook/contact-editor/e-contact-editor-strings.h:41 -msgid "Add" -msgstr "ÄɲÃ" - -#: addressbook/contact-editor/e-contact-editor-strings.h:37 -#: mail/folder-browser-factory.c:50 -msgid "Delete" -msgstr "ºï½ü" - -#: addressbook/contact-editor/e-contact-editor-strings.h:38 -msgid "Phone Types" -msgstr "ÅÅÏäμïÊÌ" - -#: addressbook/contact-editor/e-contact-editor-strings.h:39 -#: addressbook/contact-editor/e-contact-editor-strings.h:40 -msgid "New phone type" -msgstr "¿·¤·¤¤ÅÅÏäμïÊÌ" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/contact-editor/fullname-strings.h:7 -msgid "Check Full Name" -msgstr "¥Õ¥ë¥Í¡¼¥à¤Î¥Á¥§¥Ã¥¯" - -#: addressbook/contact-editor/fullname-strings.h:8 -msgid "_Title:" -msgstr "¸ª½ñ(_T):" - -#: addressbook/contact-editor/fullname-strings.h:9 -msgid "_First:" -msgstr "̾(_F):" - -#: addressbook/contact-editor/fullname-strings.h:10 -msgid "_Middle:" -msgstr "Ãæ´Ö̾(_M):" - -#: addressbook/contact-editor/fullname-strings.h:11 -msgid "_Last:" -msgstr "À«(_L):" - -#: addressbook/contact-editor/fullname-strings.h:12 -msgid "_Suffix:" -msgstr "ÀÜÈø¼­(_S):" - -#: addressbook/contact-editor/fullname-strings.h:13 -msgid "" -"\n" -"Mr.\n" -"Mrs.\n" -"Dr.\n" -msgstr "" -"\n" -"Mr.\n" -"Mrs.\n" -"Dr.\n" - -#: addressbook/contact-editor/fullname-strings.h:18 -msgid "" -"\n" -"Sr.\n" -"Jr.\n" -"I\n" -"II\n" -"III\n" -"Esq.\n" -msgstr "" -"\n" -"Sr.\n" -"Jr.\n" -"I\n" -"II\n" -"III\n" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/gui/component/ldap-server-dialog.glade.h:7 -#: composer/e-msg-composer-attachment.glade.h:8 -msgid "Description:" -msgstr "ÀâÌÀ:" - -#: addressbook/gui/component/ldap-server-dialog.glade.h:8 -msgid "LDAP Server:" -msgstr "LDAP ¥µ¡¼¥Ð:" - -#: addressbook/gui/component/ldap-server-dialog.glade.h:9 -msgid "Port Number:" -msgstr "¥Ý¡¼¥ÈÈÖ¹æ:" - -#: addressbook/gui/component/ldap-server-dialog.glade.h:10 -msgid "Root DN:" -msgstr "¥ë¡¼¥È¥Ç¥£¥ì¥¯¥È¥ê̾:" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/printing/e-contact-print.glade.h:7 -msgid "Page Setup:" -msgstr "¥Ú¡¼¥¸ÀßÄê:" - -#: addressbook/printing/e-contact-print.glade.h:8 -msgid "Style name:" -msgstr "¥¹¥¿¥¤¥ë̾:" - -#: addressbook/printing/e-contact-print.glade.h:9 -msgid "Preview:" -msgstr "»î¼Ì:" - -#: addressbook/printing/e-contact-print.glade.h:10 -msgid "Options" -msgstr "¥ª¥×¥·¥ç¥ó" - -#: addressbook/printing/e-contact-print.glade.h:11 -msgid "Include:" -msgstr "ƱÉõ:" - -#: addressbook/printing/e-contact-print.glade.h:12 -msgid "Sections:" -msgstr "¶èʬ:" - -#: addressbook/printing/e-contact-print.glade.h:13 -msgid "Immediately follow each other" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:14 -msgid "Letter tabs on side" -msgstr "¦Ì̾å¤Î¥¿¥Ö¤ò½ñ¤­Æþ¤ì¤ë" - -#: addressbook/printing/e-contact-print.glade.h:15 -msgid "Headings for each letter" -msgstr "¸Ä¡¹¤Î¥ì¥¿¡¼¤Î¸«½Ð¤·" - -#: addressbook/printing/e-contact-print.glade.h:16 -msgid "Start on a new page" -msgstr "¿·¤·¤¤¥Ú¡¼¥¸¤Ç³«»Ï" - -#: addressbook/printing/e-contact-print.glade.h:17 -msgid "Number of columns:" -msgstr "¹Ô¿ô:" - -#: addressbook/printing/e-contact-print.glade.h:18 -msgid "Blank forms at end:" -msgstr "ºÇ¸å¤Î¶õÇòÍÑ»æ:" - -#: addressbook/printing/e-contact-print.glade.h:19 -msgid "Fonts" -msgstr "¥Õ¥©¥ó¥È" - -#: addressbook/printing/e-contact-print.glade.h:20 -#: addressbook/printing/e-contact-print.glade.h:21 -#: addressbook/printing/e-contact-print.glade.h:51 -#: addressbook/printing/e-contact-print.glade.h:54 -msgid "Font..." -msgstr "¥Õ¥©¥ó¥È..." - -#: addressbook/printing/e-contact-print.glade.h:22 -msgid "Headings" -msgstr "¸«½Ð¤·" - -#: addressbook/printing/e-contact-print.glade.h:23 -msgid "10 pt. Tahoma" -msgstr "10 pt. Tahoma" - -#: addressbook/printing/e-contact-print.glade.h:24 -msgid "Body" -msgstr "ËÜʸ" - -#: addressbook/printing/e-contact-print.glade.h:25 -msgid "8 pt. Tahoma" -msgstr "8 pt. Tahoma" - -#: addressbook/printing/e-contact-print.glade.h:26 -msgid "Shading" -msgstr "¥·¥§¡¼¥Ç¥£¥ó¥°" - -#: addressbook/printing/e-contact-print.glade.h:27 -msgid "Print using gray shading" -msgstr "¥°¥ì¥¤¥·¥§¡¼¥Ç¥£¥ó¥°¤ò»È¤Ã¤Æ°õºþ¤¹¤ë" - -#: addressbook/printing/e-contact-print.glade.h:28 -msgid "Format" -msgstr "¥Õ¥©¡¼¥Þ¥Ã¥È" - -#: addressbook/printing/e-contact-print.glade.h:29 -#: addressbook/printing/e-contact-print.glade.h:50 -msgid "Paper" -msgstr "¥Ú¡¼¥¸¥ã" - -#: addressbook/printing/e-contact-print.glade.h:30 -msgid "Type:" -msgstr "¥¿¥¤¥×:" - -#: addressbook/printing/e-contact-print.glade.h:31 -#: addressbook/printing/e-contact-print.glade.h:43 -msgid "label26" -msgstr "label26" - -#: addressbook/printing/e-contact-print.glade.h:32 -#: addressbook/printing/e-contact-print.glade.h:44 -msgid "Dimensions:" -msgstr "À£Ë¡:" - -#: addressbook/printing/e-contact-print.glade.h:33 -#: addressbook/printing/e-contact-print.glade.h:45 -msgid "Width:" -msgstr "Éý:" - -#: addressbook/printing/e-contact-print.glade.h:34 -#: addressbook/printing/e-contact-print.glade.h:46 -msgid "Height:" -msgstr "¹â¤µ:" - -#: addressbook/printing/e-contact-print.glade.h:35 -msgid "Paper source:" -msgstr "¥Ú¡¼¥¸¥ã¥½¡¼¥¹:" - -#: addressbook/printing/e-contact-print.glade.h:36 -msgid "Margins" -msgstr "¥Þ¡¼¥¸¥ó" - -#: addressbook/printing/e-contact-print.glade.h:37 -msgid "Top:" -msgstr "¾å:" - -#: addressbook/printing/e-contact-print.glade.h:38 -msgid "Bottom:" -msgstr "²¼:" - -#: addressbook/printing/e-contact-print.glade.h:39 -msgid "Left:" -msgstr "º¸:" - -#: addressbook/printing/e-contact-print.glade.h:40 -msgid "Right:" -msgstr "±¦:" - -#: addressbook/printing/e-contact-print.glade.h:41 -msgid "Page" -msgstr "¥Ú¡¼¥¸" - -#: addressbook/printing/e-contact-print.glade.h:42 -msgid "Size:" -msgstr "¥µ¥¤¥º:" - -#: addressbook/printing/e-contact-print.glade.h:47 -msgid "Orientation" -msgstr "¸þ¤­" - -#: addressbook/printing/e-contact-print.glade.h:48 -msgid "Portrait" -msgstr "½ÄĹ" - -#: addressbook/printing/e-contact-print.glade.h:49 -msgid "Landscape" -msgstr "²£Ä¹" - -#: addressbook/printing/e-contact-print.glade.h:52 -msgid "Header" -msgstr "¥Ø¥Ã¥À" - -#: addressbook/printing/e-contact-print.glade.h:53 -msgid "Footer:" -msgstr "¥Õ¥Ã¥¿:" - -#: addressbook/printing/e-contact-print.glade.h:55 -msgid "Reverse on even pages" -msgstr "¶ö¿ô¥Ú¡¼¥¸¤òȿž" - -#: addressbook/printing/e-contact-print.glade.h:56 -msgid "Header/Footer" -msgstr "¥Ø¥Ã¥À/¥Õ¥Ã¥¿" - -#: composer/e-msg-composer-address-dialog.c:183 composer/e-msg-composer.c:533 -msgid "Cut" -msgstr "ÀÚ¤ê¼è¤ê" - -#: composer/e-msg-composer-address-dialog.c:184 -msgid "Cut selected item into clipboard" -msgstr "¥¯¥ê¥Ã¥×¥Ü¡¼¥É¤ÎÃæ¤ØÁªÂò¤µ¤ì¤¿¥¢¥¤¥Æ¥à¤òÀÚ¤ê¼è¤ë" - -#: composer/e-msg-composer-address-dialog.c:187 composer/e-msg-composer.c:534 -msgid "Copy" -msgstr "¥³¥Ô¡¼" - -#: composer/e-msg-composer-address-dialog.c:188 -msgid "Copy selected item into clipboard" -msgstr "¥¯¥ê¥Ã¥×¥Ü¡¼¥É¤ÎÃæ¤ØÁªÂò¤µ¤ì¤¿¥¢¥¤¥Æ¥à¤ò¥³¥Ô¡¼¤¹¤ë" - -#: composer/e-msg-composer-address-dialog.c:191 -#: composer/e-msg-composer-address-dialog.c:199 composer/e-msg-composer.c:535 -msgid "Paste" -msgstr "Ž¤êÉÕ¤±" - -#: composer/e-msg-composer-address-dialog.c:192 -#: composer/e-msg-composer-address-dialog.c:200 -msgid "Paste item from clipboard" -msgstr "¥¯¥ê¥Ã¥×¥Ü¡¼¥É¤«¤é¥¢¥¤¥Æ¥à¤òŽ¤êÉÕ¤±¤ë" - -#: composer/e-msg-composer-address-dialog.c:528 -msgid "Select recipients' addresses" -msgstr "¼õ¼è¿Í¤Î¥¢¥É¥ì¥¹¤òÁªÂò¤·¤Þ¤¹" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: composer/e-msg-composer-address-dialog.glade.h:7 -msgid "Recipient list:" -msgstr "¼õ¼è¥ê¥¹¥È:" - -#: composer/e-msg-composer-address-dialog.glade.h:8 -msgid "Name:" -msgstr "̾Á°:" - -#: composer/e-msg-composer-address-dialog.glade.h:9 -msgid "Search..." -msgstr "¸¡º÷..." - -#: composer/e-msg-composer-address-dialog.glade.h:10 -msgid "Name" -msgstr "̾Á°" - -#: composer/e-msg-composer-address-dialog.glade.h:11 -msgid "Address" -msgstr "¥¢¥É¥ì¥¹" - -#: composer/e-msg-composer-address-dialog.glade.h:12 -msgid "Properties..." -msgstr "¥×¥í¥Ñ¥Æ¥£..." - -#: composer/e-msg-composer-address-dialog.glade.h:13 -msgid "Add..." -msgstr "ÄɲÃ..." - -#: composer/e-msg-composer-address-dialog.glade.h:14 -msgid "To: >>" -msgstr "To: >>" - -#: composer/e-msg-composer-address-dialog.glade.h:15 -msgid "Cc: >>" -msgstr "Cc: >>" - -#: composer/e-msg-composer-address-dialog.glade.h:16 -msgid "Bcc: >>" -msgstr "Bcc: >>" - -#: composer/e-msg-composer-address-dialog.glade.h:17 -msgid "label9" -msgstr "label9" - -#: composer/e-msg-composer-address-dialog.glade.h:18 -msgid "label7" -msgstr "label7" - -#: composer/e-msg-composer-address-dialog.glade.h:19 -msgid "label8" -msgstr "label8" - -#: composer/e-msg-composer-attachment-bar.c:76 -msgid "1 byte" -msgstr "1 ¥Ð¥¤¥È" - -#: composer/e-msg-composer-attachment-bar.c:78 -#, c-format -msgid "%u bytes" -msgstr "%u ¥Ð¥¤¥È" - -#: composer/e-msg-composer-attachment-bar.c:85 -#, c-format -msgid "%.1fK" -msgstr "%.1fK" - -#: composer/e-msg-composer-attachment-bar.c:89 -#, c-format -msgid "%.1fM" -msgstr "%.1fM" - -#: composer/e-msg-composer-attachment-bar.c:93 -#, c-format -msgid "%.1fG" -msgstr "%.1fG" - -#: composer/e-msg-composer-attachment-bar.c:307 -msgid "Add attachment" -msgstr "źÉÕʪ¤ÎÄɲÃ" - -#: composer/e-msg-composer-attachment-bar.c:364 -msgid "Remove" -msgstr "ºï½ü" - -#: composer/e-msg-composer-attachment-bar.c:365 -msgid "Remove selected items from the attachment list" -msgstr "źÉÕʪ¥ê¥¹¥È¤«¤éÁªÂò¤·¤¿¥¢¥¤¥Æ¥à¤òºï½ü¤¹¤ë" - -#: composer/e-msg-composer-attachment-bar.c:396 -msgid "Add attachment..." -msgstr "źÉÕʪ¤ÎÄɲÃ..." - -#: composer/e-msg-composer-attachment-bar.c:397 -msgid "Attach a file to the message" -msgstr "¥á¥Ã¥»¡¼¥¸¤Ø¥Õ¥¡¥¤¥ë¤òźÉÕ¤¹¤ë" - -#: composer/e-msg-composer-attachment.c:259 -msgid "Select attachment" -msgstr "źÉÕʪ¤òÁªÂò" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: composer/e-msg-composer-attachment.glade.h:7 -msgid "Attachment properties" -msgstr "źÉÕ¥Õ¥¡¥¤¥ë¤Î¥×¥í¥Ñ¥Æ¥£" - -#: composer/e-msg-composer-attachment.glade.h:9 -msgid "MIME type:" -msgstr "MIME ¥¿¥¤¥×:" - -#: composer/e-msg-composer-attachment.glade.h:10 -msgid "File name:" -msgstr "¥Õ¥¡¥¤¥ë̾:" - -#: composer/e-msg-composer-attachment.glade.h:11 -msgid "Browse..." -msgstr "±ÜÍ÷..." - -#: composer/e-msg-composer-hdrs.c:89 -msgid "Click here for the address book" -msgstr "¥¢¥É¥ì¥¹Ä¢¤Î¤¿¤á¤Ë¤³¤³¤Ç¥¯¥ê¥Ã¥¯" - -#: composer/e-msg-composer-hdrs.c:124 -msgid "To:" -msgstr "To:" - -#: composer/e-msg-composer-hdrs.c:125 -msgid "Enter the recipients of the message" -msgstr "¥á¥Ã¥»¡¼¥¸¤Î¼õ¼è¿Í¤òÆþÎÏ" - -#: composer/e-msg-composer-hdrs.c:129 -msgid "Cc:" -msgstr "Cc:" - -#: composer/e-msg-composer-hdrs.c:130 -msgid "Enter the addresses that will receive a carbon copy of the message" -msgstr "¥á¥Ã¥»¡¼¥¸¤Î¥«¡¼¥Ü¥ó¥³¥Ô¡¼¤ò¼õ¿®¤¹¤ë¥¢¥É¥ì¥¹¤òÆþÎÏ" - -#: composer/e-msg-composer-hdrs.c:135 -msgid "Bcc:" -msgstr "Bcc:" - -#: composer/e-msg-composer-hdrs.c:136 -msgid "" -"Enter the addresses that will receive a carbon copy of the message without " -"appearing in the recipient list of the message." -msgstr "" -"¥á¥Ã¥»¡¼¥¸¤Î¼õ¼è¿Í¥ê¥¹¥È¤ÎÃæ¤Ë¸½¤ì¤Ê¤¤¤Ç, " -"¥á¥Ã¥»¡¼¥¸¤Î¥«¡¼¥Ü¥ó¥³¥Ô¡¼¤ò¼õ¿®¤¹¤ë¥¢¥É¥ì¥¹¤òÆþÎÏ" - -#: composer/e-msg-composer-hdrs.c:142 -msgid "Subject:" -msgstr "Subject:" - -#: composer/e-msg-composer-hdrs.c:143 -msgid "Enter the subject of the mail" -msgstr "¥á¡¼¥ë¤ÎɽÂê¤òÆþÎÏ" - -#: composer/e-msg-composer.c:491 -msgid "Save in _folder..." -msgstr "¥Õ¥©¥ë¥ÀÆâ¤òÊݸ(_f)..." - -#: composer/e-msg-composer.c:491 -msgid "Save the message in a specified folder" -msgstr "»ØÄꤷ¤¿¥Õ¥©¥ë¥ÀÆâ¤Î¥á¥Ã¥»¡¼¥¸¤òÊݸ¤¹¤ë" - -#: composer/e-msg-composer.c:494 composer/e-msg-composer.c:531 -#: mail/folder-browser-factory.c:36 -msgid "Send" -msgstr "Á÷¿®" - -#: composer/e-msg-composer.c:494 -msgid "Send the message" -msgstr "¥á¥Ã¥»¡¼¥¸¤òÁ÷¿®¤¹¤ë" - -#: composer/e-msg-composer.c:502 -msgid "View _attachments" -msgstr "źÉÕʪ¤òɽ¼¨ (_a)" - -#: composer/e-msg-composer.c:502 -msgid "View/hide attachments" -msgstr "źÉÕʪ¤òɽ¼¨/±£¤¹" - -#: composer/e-msg-composer.c:531 -msgid "Send this message" -msgstr "¤³¤Î¥á¥Ã¥»¡¼¥¸¤òÁ÷¿®¤¹¤ë" - -#: composer/e-msg-composer.c:533 -msgid "Cut selected region into the clipboard" -msgstr "¥¯¥ê¥Ã¥×¥Ü¡¼¥É¤ÎÃæ¤ØÁªÂò¤µ¤ì¤¿Îΰè¤òÀÚ¤ê¼è¤ë" - -#: composer/e-msg-composer.c:534 -msgid "Copy selected region into the clipboard" -msgstr "¥¯¥ê¥Ã¥×¥Ü¡¼¥É¤ÎÃæ¤ØÁªÂò¤µ¤ì¤¿Îΰè¤ò¥³¥Ô¡¼¤¹¤ë" - -#: composer/e-msg-composer.c:535 -msgid "Paste selected region into the clipboard" -msgstr "¥¯¥ê¥Ã¥×¥Ü¡¼¥É¤ÎÃæ¤ØÁªÂò¤µ¤ì¤¿Îΰè¤òŽ¤êÉÕ¤±¤ë" - -#: composer/e-msg-composer.c:536 -msgid "Undo" -msgstr "¸µ¤ËÌ᤹" - -#: composer/e-msg-composer.c:536 -msgid "Undo last operation" -msgstr "ºÇ¸å¤ÎÁàºî¤ò¸µ¤ËÌ᤹" - -#: composer/e-msg-composer.c:538 -msgid "Attach" -msgstr "źÉÕ" - -#: composer/e-msg-composer.c:538 -msgid "Attach a file" -msgstr "¥Õ¥¡¥¤¥ë¤òźÉÕ¤¹¤ë" - -#: mail/folder-browser-factory.c:35 -msgid "Get mail" -msgstr "¿·Ãå¥á¡¼¥ë" - -#: mail/folder-browser-factory.c:35 -msgid "Check for new mail" -msgstr "¿·Ãå¥á¡¼¥ë¤Î¥Á¥§¥Ã¥¯" - -#: mail/folder-browser-factory.c:36 -msgid "Send a new message" -msgstr "¥á¥Ã¥»¡¼¥¸¤òÁ÷¿®¤¹¤ë" - -#: mail/folder-browser-factory.c:37 -msgid "Find" -msgstr "¸¡º÷" - -#: mail/folder-browser-factory.c:37 -msgid "Find messages" -msgstr "¥á¥Ã¥»¡¼¥¸¤ò¸¡º÷¤¹¤ë" - -#: mail/folder-browser-factory.c:41 -msgid "Reply" -msgstr "ÊÖ¿®" - -#: mail/folder-browser-factory.c:41 -msgid "Reply to the sender of this message" -msgstr "¥á¥Ã¥»¡¼¥¸¤Îº¹½Ð¿Í¤ØÊÖ¿®¤¹¤ë" - -#: mail/folder-browser-factory.c:42 -msgid "Reply to All" -msgstr "Á´°÷¤ØÊÖ¿®" - -#: mail/folder-browser-factory.c:42 -msgid "Reply to all recipients of this message" -msgstr "¤³¤Î¥á¥Ã¥»¡¼¥¸¤Î¼õ¼è¿ÍÁ´°÷¤ØÊÖ¿®¤¹¤ë" - -#: mail/folder-browser-factory.c:44 -msgid "Forward" -msgstr "žÁ÷" - -#: mail/folder-browser-factory.c:44 -msgid "Forward this message" -msgstr "¤³¤Î¥á¥Ã¥»¡¼¥¸¤òžÁ÷¤¹¤ë" - -#: mail/folder-browser-factory.c:48 -msgid "Print" -msgstr "°õºþ" - -#: mail/folder-browser-factory.c:48 -msgid "Print the selected message" -msgstr "ÁªÂò¤µ¤ì¤¿¥á¥Ã¥»¡¼¥¸¤ò°õºþ¤¹¤ë" - -#: mail/folder-browser-factory.c:50 -msgid "Delete this message" -msgstr "¤³¤Î¥á¥Ã¥»¡¼¥¸¤òºï½ü¤¹¤ë" - -#: mail/folder-browser-factory.c:67 -msgid "_Expunge" -msgstr "Ëõ¾Ã(_E)" - -#: mail/folder-browser-factory.c:73 -msgid "_Filter Druid" -msgstr "¥Õ¥£¥ë¥¿¥É¥ë¥¤¥É(_F)" - -#: mail/folder-browser-factory.c:186 -msgid "We are sorry, Evolution's Folder Browser can not be initialized." -msgstr "¤¹¤¤¤Þ¤»¤ó¤¬¡¤Evolution ¤Î¥Õ¥©¥ë¥À¥Ö¥é¥¦¥¶¤Ï½é´ü²½¤¹¤ë¤³¤È¤¬½ÐÍè¤Þ¤»¤ó" - -#: mail/folder-browser.c:208 -msgid "The URI that the Folder Browser will display" -msgstr "¥Õ¥©¥ë¥À¥Ö¥é¥¦¥¶¤¬É½¼¨¤¹¤ë URI" - -#: mail/folder-browser.c:211 -msgid "Whether a message preview should be shown" -msgstr "¥á¥Ã¥»¡¼¥¸¥×¥ì¥Ó¥å¡¼¤Ïɽ¼¨¤¹¤Ù¤­¤«¤É¤¦¤«" - -#: mail/main.c:58 -msgid "Mail Component: I could not initialize Bonobo" -msgstr "¥á¡¼¥ë¥³¥ó¥Ý¡¼¥Í¥ó¥È: Bonobo ¤Î½é´ü²½¤¬½ÐÍè¤Þ¤»¤ó¤Ç¤·¤¿" - -#: mail/message-list.c:464 -msgid "Priority" -msgstr "Í¥ÀèÅÙ" - -#: mail/message-list.c:478 -msgid "From" -msgstr "º¹½Ð¿Í" - -#: mail/message-list.c:485 -msgid "Subject" -msgstr "ɽÂê" - -#: mail/message-list.c:492 -msgid "Sent" -msgstr "Á÷¿®" - -#: mail/message-list.c:499 -msgid "Receive" -msgstr "¼õ¿®" - -#: mail/message-list.c:506 -msgid "To" -msgstr "¼õ¼è¿Í" - -#: mail/message-list.c:513 -msgid "Size" -msgstr "¥µ¥¤¥º" - -#. you might have to call gnome_dialog_run() on the -#. * dialog returned here, I don't remember... -#. -#: shell/e-shell-view-menu.c:62 -msgid "Bug buddy was not found in your $PATH." -msgstr "Bug buddy ¤Ï¤¢¤Ê¤¿¤Î $PATH ¤Ë¤Ï¸«¤Ä¤«¤ê¤Þ¤»¤ó" - -#. same as above -#: shell/e-shell-view-menu.c:68 -msgid "Bug buddy could not be run." -msgstr "Bug buddy ¤Ï¼Â¹Ô¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿" - -#: shell/e-shell-view-menu.c:111 -msgid "Evolution" -msgstr "Evolution" - -#: shell/e-shell-view-menu.c:113 -msgid "Copyright 1999, 2000 Helix Code, Inc." -msgstr "Copyright 1999, 2000 Helix Code, Inc." - -#: shell/e-shell-view-menu.c:115 -msgid "" -"Evolution is a suite of groupware applications\n" -"for mail, calendaring, and contact management\n" -"within the GNOME desktop environment." -msgstr "" -"Evolution ¤Ï GNOME ¥Ç¥¹¥¯¥È¥Ã¥×´Ä¶­¤ÎÃæ¤Ç¤Î\n" -"¥á¡¼¥ë¡¤¥«¥ì¥ó¥À¡¤¤½¤·¤Æ¥³¥ó¥¿¥¯¥È¥Þ¥Í¡¼¥¸¥á¥ó¥È¤Î¤¿¤á¤Î\n" -"¥°¥ë¡¼¥×¥¦¥§¥¢¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Î¥Ñ¥Ã¥±¡¼¥¸¥½¥Õ¥È¤Ç¤¹" - -#: shell/e-shell-view-menu.c:185 shell/e-shell-view-menu.c:251 -msgid "_Folder" -msgstr "¥Õ¥©¥ë¥À(_F)" - -#: shell/e-shell-view-menu.c:189 -msgid "Evolution _Bar Shortcut" -msgstr "Evolution ¥Ð¡¼¥·¥ç¡¼¥È¥«¥Ã¥È(_B)" - -#: shell/e-shell-view-menu.c:195 -msgid "_Mail message" -msgstr "¥á¡¼¥ë¥á¥Ã¥»¡¼¥¸(_M)" - -#: shell/e-shell-view-menu.c:196 shell/e-shell-view-menu.c:199 -msgid "Composes a new mail message" -msgstr "¿·µ¬¥á¡¼¥ë¤òºîÀ®" - -#: shell/e-shell-view-menu.c:198 -msgid "_Appointment" -msgstr "Ìó«(_A)" - -#: shell/e-shell-view-menu.c:201 -msgid "Meeting Re_quest" -msgstr "²ñµÄ°ÍÍê(_q)" - -#: shell/e-shell-view-menu.c:204 -msgid "_Contact" -msgstr "Ï¢Íí(_C)" - -#: shell/e-shell-view-menu.c:207 -msgid "_Task" -msgstr "»Å»ö(_T)" - -#: shell/e-shell-view-menu.c:210 -msgid "Task _Request" -msgstr "»Å»ö°ÍÍê(_R)" - -#: shell/e-shell-view-menu.c:213 -msgid "_Journal Entry" -msgstr "»ÅÌõµ­Æþ(_J)" - -#: shell/e-shell-view-menu.c:216 -msgid "_Note" -msgstr "¥Î¡¼¥È(_N)" - -#: shell/e-shell-view-menu.c:226 -msgid "_Selected Items" -msgstr "ÁªÂò¤µ¤ì¤¿¥¢¥¤¥Æ¥à(_S)" - -#: shell/e-shell-view-menu.c:234 -msgid "_New Folder" -msgstr "¿·¤·¤¤¥Õ¥©¥ë¥À(_N)" - -#: shell/e-shell-view-menu.c:242 -msgid "_New" -msgstr "¿·µ¬(_N)" - -#: shell/e-shell-view-menu.c:243 -msgid "_Open" -msgstr "³«¤¯(_O)" - -#: shell/e-shell-view-menu.c:244 -msgid "Clos_e All Items" -msgstr "¤¹¤Ù¤Æ¤Î¥¢¥¤¥Æ¥à¤òÊĤ¸¤ë(_e)" - -#: shell/e-shell-view-menu.c:244 -msgid "Closes all the open items" -msgstr "¤¹¤Ù¤Æ¤Î³«¤¤¤¿¥¢¥¤¥Æ¥à¤òÊĤ¸¤ë" - -#: shell/e-shell-view-menu.c:265 -#, fuzzy -msgid "Show _Shortcut Bar" -msgstr "¥·¥ç¡¼¥È¥«¥Ã¥È¥Ð¡¼¤òɽ¼¨/Èóɸ¼¨(_T)" - -#: shell/e-shell-view-menu.c:266 -#, fuzzy -msgid "Shows the shortcut bar" -msgstr "¥·¥ç¡¼¥È¥«¥Ã¥È¥Ð¡¼¤Îɽ¼¨/Èóɸ¼¨¤òÀÚÂؤ¨¤ë" - -#: shell/e-shell-view-menu.c:268 -#, fuzzy -msgid "Show _Treeview" -msgstr "¥Ä¥ê¡¼¥Ó¥å¡¼¤òɽ¼¨/Èóɸ¼¨(_T)" - -#: shell/e-shell-view-menu.c:269 -#, fuzzy -msgid "Shows the tree view" -msgstr "¥Ä¥ê¡¼¥Ó¥å¡¼¤Îɽ¼¨/Èóɸ¼¨¤òÀÚÂؤ¨¤ë" - -#: shell/e-shell-view-menu.c:284 -msgid "_Submit bug" -msgstr "ÉÔ¶ñ¹çÄó½Ð(_S)" - -#: shell/e-shell-view-menu.c:285 -msgid "Submit bug-report via bug-buddy" -msgstr "bug-buddy ¤ò·Ðͳ¤·¤ÆÉÔ¶ñ¹çÊó¹ð¤òÄó½Ð¤¹¤ë" - -#. FIXME: add Favorites here -#: shell/e-shell-view-menu.c:300 -msgid "_Tools" -msgstr "¥Ä¡¼¥ë(_T)" - -#: shell/e-shell-view-menu.c:301 -msgid "_Actions" -msgstr "¹ÔÆ°(_A)" - -#: shell/e-shell.c:157 -#, c-format -msgid "Cannot set up local storage -- %s" -msgstr "¶ÉÉôµ­²±ÁõÃ֤Υ»¥Ã¥È¥¢¥Ã¥×¤¬½ÐÍè¤Þ¤»¤ó -- %s" - -#: shell/main.c:100 -msgid "" -"Hi. Thanks for taking the time to download this preview release of\n" -"the Evolution groupware suite.\n" -"\n" -"The Evolution team has worked hard to make Evolution as robust,\n" -"extensible, pretty, fast and well-suited to heavy internet users as\n" -"possible. And we're very tired. But we're not done -- not yet.\n" -"\n" -"As you explore Evolution, please understand that most of our work has\n" -"been focused on the backend engine which drives the entire system and\n" -"not on the user interface. We are just cresting the hill now, though,\n" -"and will be pouring most of our love and attention into the UI from\n" -"here out. But at least you know that you're not using demoware.\n" -"\n" -"So, time for the nerdy disclaimer. Evolution will: crash, lose your\n" -"mail, leave stray processes running, consume 100% CPU, race, lock,\n" -"send HTML mail to random mailing lists, and embarass you in front of\n" -"your friends and co-workers. Use at your own risk.\n" -"\n" -"We hope that you enjoy the results of our hard work, and we eagerly\n" -"await your contributions!\n" -msgstr "" -"¤ä¤¢¡¤Evolution ¥°¥ë¡¼¥×¥¦¥§¥¢¥¹¥¤¡¼¥È¤Î¤³¤Î preview release ¤Î\n" -"¥À¥¦¥ó¥í¡¼¥É¤Ë»þ´Ö¤ò³ä¤¤¤Æ¤¯¤ì¤Æ¤¢¤ê¤¬¤È¤¦\n" -"\n" -"Evolution ¥Á¡¼¥à¤Ï Evolution ¤ò¥Ø¥Ó¡¼¥¤¥ó¥¿¡¼¥Í¥Ã¥È¥æ¡¼¥¶¤Ë²Äǽ\n" -"¤Ê¸Â¤ê¡¤¾æÉפǡ¤³ÈÄ¥À­¤¬¤¢¤ê¡¤Î©Çɤǡ¤¤·¤Ã¤«¤ê¤È¤·¤¿¤½¤·¤ÆÊØÍø¤Ë\n" -"¤¹¤ë¤¿¤á¤Ë°ìÀ¸·üÌ¿ºî¶È¤·¤ÆÍè¤Þ¤·¤¿. ¤½¤·¤Æ²æ¡¹¤Ï¤Ò¤É¤¯Èè¤ì¤Þ¤·¤¿¡¥\n" -"¤·¤«¤·¤Þ¤À½ª¤ï¤Ã¤Æ¤¤¤Þ¤»¤ó¡Ä¤Þ¤À¤Ç¤¹.\n" -"\n" -"¤¢¤Ê¤¿¤¬ Evolution ¤òõµá¤¹¤ë»þ¡¤¤É¤¦¤«²æ¡¹¤Îºî¶È¤ÎÂçÉôʬ¤¬¥æ¡¼¥¶\n" -"¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤Ë¾ÇÅÀ¤ò¹ç¤ï¤»¤é¤ì¤¿¤Î¤Ç¤Ï¤Ê¤¯¡¤Á´ÂΤΥ·¥¹¥Æ¥à¤ò\n" -"¶îÆ°¤¹¤ë¥Ð¥Ã¥¯¥¨¥ó¥É¥¨¥ó¥¸¥ó¤Ë¾ÇÅÀ¤ò¹ç¤ï¤»¤é¤ì¤¿¤È¤¤¤¦¤³¤È¤òÍý²ò\n" -"¤·¤Æ²¼¤µ¤¤. ²æ¡¹¤Ï¸½ºß¤Á¤ç¤¦¤ÉµÖ¤Îĺ¾å¤Ë㤷¤Æ¤¤¤Æ¤³¤³¤«¤é UI ¤Ë\n" -"²æ¡¹¤Î°¦¤ÈÃíÌܤÎÂçÉôʬ¤òÃí¤¤¤Ç¤¤¤ë¤Ç¤·¤ç¤¦¡¥¤·¤«¤·¾¯¤Ê¤¯¤È¤â¤¢¤Ê¤¿\n" -"¤Ï¥Ç¥â¥¦¥§¥¢¤ò»ÈÍѤ·¤Æ¤¤¤Ê¤¤¤Î¤òÃΤäƤ¤¤Þ¤¹¡¥\n" -"\n" -"¤À¤«¤é¡¤ÌîÊë¤ÊÈÝǧ¤Ë¤ÏÄ´Àᤷ¤Æ¤¯¤À¤µ¤¤¡¥Evolution ¤Ï: ¥¯¥é¥Ã¥·¥å\n" -"¤·¤¿¤ê¡¤¤¢¤Ê¤¿¤Î¥á¡¼¥ë¤òʶ¼º¤·¤¿¤ê¡¤¥×¥í¥»¥¹¤¬Æ°ºî¤·¤¿¤Þ¤Þ¤¿¤Þ¤Ë\n" -"»Ä¤Ã¤¿¤ê¡¤100% ¤Î CPU ¥Ñ¥ï¡¼¤ò¾ÃÈñ¤·¤¿¤ê¡¤Â®¤¯Æ°¤¤¤¿¤ê¡¤¥í¥Ã¥¯¤·\n" -"¤¿¤ê¡¤Ç¤°Õ¤Î¥á¡¼¥ê¥ó¥°¥ê¥¹¥È¤Ë HTML ¥á¡¼¥ë¤òÁ÷¤Ã¤¿¤ê¡¤¤½¤·¤Æ¡¤\n" -"¤¢¤Ê¤¿¤Îͧ¿Í¤È»Å»öÃç´Ö¤ÎÁ°¤Ç embarass ¤¹¤ë¤è¤¦¤Ë¤Ê¤ë¤Ç¤·¤ç¤¦¡¥\n" -"\n" -"²æ¡¹¤Ï¤¢¤Ê¤¿¤¬²æ¡¹¤Îº¤Æñ¤Êºî¶È¤Î·ë²Ì¤ò³Ú¤·¤à¤³¤È¤ò˾¤ó¤Ç¤¤¤Æ¡¤¤½\n" -"¤·¤Æ¤¢¤Ê¤¿¤Î¹×¸¥¤òÇ®¿´¤ËÂÔ¤Á¼õ¤±¤Þ¤¹¡¥\n" - -#: shell/main.c:129 -msgid "" -"Thanks\n" -"The Evolution Team\n" -msgstr "" -"¤¢¤ê¤¬¤È¤¦\n" -"Evolution ¥Á¡¼¥à\n" - -#: shell/main.c:156 -msgid "Cannot initialize the Evolution shell." -msgstr "Evolution ¥·¥§¥ë¤Î½é´ü²½¤¬½ÐÍè¤Þ¤»¤ó" - -#: shell/main.c:186 -msgid "Cannot initialize the Bonobo component system." -msgstr "Bonobo ¥³¥ó¥Ý¡¼¥Í¥ó¥È¥·¥¹¥Æ¥à¤ò½é´ü²½½ÐÍè¤Þ¤»¤ó" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: widgets/e-table/e-table-config.glade.h:7 -msgid "Fields" -msgstr "¥Õ¥£¡¼¥ë¥É" - -#: widgets/e-table/e-table-config.glade.h:8 -msgid "Grouping" -msgstr "¥°¥ë¡¼¥×²½" - -#: widgets/e-table/e-table-config.glade.h:9 -msgid "Sort" -msgstr "¥½¡¼¥È" - -#: widgets/e-table/e-table-config.glade.h:10 -msgid "Filter" -msgstr "¥Õ¥£¥ë¥¿" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: widgets/e-table/e-table-group.glade.h:7 -msgid "window1" -msgstr "window1" - -#: widgets/e-table/e-table-group.glade.h:8 -msgid "Available fields" -msgstr "¥Õ¥£¡¼¥ë¥É¤òÍøÍÑ" - -#: widgets/e-table/e-table-group.glade.h:9 -msgid "label1" -msgstr "label1" - -#: widgets/e-table/e-table-group.glade.h:10 -msgid "Show in this order" -msgstr "¤³¤Î¥ª¡¼¥À¤òɽ¼¨¤¹¤ë" - -#: widgets/e-table/e-table-group.glade.h:11 -msgid "label2" -msgstr "label2" - -#: widgets/e-table/e-table-group.glade.h:12 -msgid "Add >>" -msgstr "Äɲà >>" - -#: widgets/e-table/e-table-group.glade.h:13 -msgid "<< Remove" -msgstr "<< ºï½ü" diff --git a/po/ko.po b/po/ko.po deleted file mode 100644 index 8695f78ede..0000000000 --- a/po/ko.po +++ /dev/null @@ -1,1020 +0,0 @@ -# evolution ko.po -# Copyright (C) 2000 Free Software Foundation, Inc. -# Young-Ho, Cha , 2000. -msgid "" -msgstr "" -"Project-Id-Version: evolution 0.0\n" -"POT-Creation-Date: 2000-05-27 20:01+0100\n" -"PO-Revision-Date: 2000-05-16 09:53:35+0900\n" -"Last-Translator: Sung-Hyun Nam \n" -"Language-Team: korean \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=euc-kr\n" -"Content-Transfer-Encoding: 8bit\n" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/contact-editor/e-contact-editor-strings.h:7 -msgid "Contact Editor" -msgstr "¿¬¶ôó ÆíÁý±â" - -#: addressbook/contact-editor/e-contact-editor-strings.h:8 -msgid "_Full Name..." -msgstr "Àüü À̸§(_F)..." - -#: addressbook/contact-editor/e-contact-editor-strings.h:9 -msgid "Company:" -msgstr "ȸ»ç:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:10 -msgid "File As:" -msgstr "ÆÄÀÏ·Î ÀúÀå:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:11 -msgid "Web page address:" -msgstr "ȨÆäÀÌÁö ÁÖ¼Ò:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:12 -#, fuzzy -msgid "Wants to receive _HTML mail" -msgstr "HTMLÇü½Ä ÆíÁö »ç¿ë(_H)" - -#: addressbook/contact-editor/e-contact-editor-strings.h:13 -msgid "Address:" -msgstr "ÁÖ¼Ò:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:14 -msgid "_Business" -msgstr "Á÷Àå(_B)" - -#: addressbook/contact-editor/e-contact-editor-strings.h:15 -msgid "_Home" -msgstr "Áý(_H)" - -#: addressbook/contact-editor/e-contact-editor-strings.h:16 -msgid "Business _Fax" -msgstr "Á÷Àå Æѽº(_F)" - -#: addressbook/contact-editor/e-contact-editor-strings.h:17 -msgid "_Mobile" -msgstr "ÈÞ´ëÀüÈ­(_M)" - -#: addressbook/contact-editor/e-contact-editor-strings.h:18 -msgid "Primary Email" -msgstr "ÀÚÁÖ¾²´Â Email" - -#: addressbook/contact-editor/e-contact-editor-strings.h:19 -msgid "Business" -msgstr "Á÷Àå" - -#: addressbook/contact-editor/e-contact-editor-strings.h:20 -msgid "This is the _mailing address" -msgstr "ÀÌ°ÍÀº ÀüÀÚ¿ìÆí ÁÖ¼ÒÀÔ´Ï´Ù(_m)" - -#: addressbook/contact-editor/e-contact-editor-strings.h:21 -msgid "_Contacts..." -msgstr "¿¬¶ôó(_C)..." - -#: addressbook/contact-editor/e-contact-editor-strings.h:22 -msgid "Ca_tegories..." -msgstr "¸ñ·Ï(_t)..." - -#: addressbook/contact-editor/e-contact-editor-strings.h:23 -msgid "Job Title" -msgstr "Á÷ÇÔ" - -#: addressbook/contact-editor/e-contact-editor-strings.h:24 -msgid "General" -msgstr "ÀÏ¹Ý Á¤º¸" - -#: addressbook/contact-editor/e-contact-editor-strings.h:25 -msgid "Department:" -msgstr "ºÎ¼­:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:26 -msgid "Office:" -msgstr "»ç¹«½Ç:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:27 -msgid "Profession:" -msgstr "Á÷¾÷:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:28 -msgid "Nickname:" -msgstr "º°¸í:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:29 -msgid "Spouse:" -msgstr "¹è¿ìÀÚ:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:30 -msgid "Birthday:" -msgstr "»ýÀÏ:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:31 -msgid "Assistant's name:" -msgstr "Á¶¼ö À̸§:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:32 -msgid "Manager's Name:" -msgstr "¸Å´ÏÀú À̸§:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:33 -msgid "Anniversary:" -msgstr "±â³äÀÏ:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:34 -msgid "Notes:" -msgstr "³ëÆ®:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:35 -msgid "Details" -msgstr "ÀÚ¼¼È÷" - -#: addressbook/contact-editor/e-contact-editor-strings.h:36 -#: addressbook/contact-editor/e-contact-editor-strings.h:41 -msgid "Add" -msgstr "Ãß°¡" - -#: addressbook/contact-editor/e-contact-editor-strings.h:37 -#: mail/folder-browser-factory.c:50 -msgid "Delete" -msgstr "»èÁ¦" - -#: addressbook/contact-editor/e-contact-editor-strings.h:38 -msgid "Phone Types" -msgstr "ÀüÈ­ ÇüÅÂ" - -#: addressbook/contact-editor/e-contact-editor-strings.h:39 -#: addressbook/contact-editor/e-contact-editor-strings.h:40 -msgid "New phone type" -msgstr "»õ ÀüÈ­ ÇüÅÂ" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/contact-editor/fullname-strings.h:7 -msgid "Check Full Name" -msgstr "Àüü À̸§ È®ÀÎ" - -#: addressbook/contact-editor/fullname-strings.h:8 -msgid "_Title:" -msgstr "" - -#: addressbook/contact-editor/fullname-strings.h:9 -msgid "_First:" -msgstr "¼º(_F):" - -#: addressbook/contact-editor/fullname-strings.h:10 -msgid "_Middle:" -msgstr "" - -#: addressbook/contact-editor/fullname-strings.h:11 -msgid "_Last:" -msgstr "À̸§(_L):" - -#: addressbook/contact-editor/fullname-strings.h:12 -msgid "_Suffix:" -msgstr "" - -#: addressbook/contact-editor/fullname-strings.h:13 -msgid "" -"\n" -"Mr.\n" -"Mrs.\n" -"Dr.\n" -msgstr "" - -#: addressbook/contact-editor/fullname-strings.h:18 -msgid "" -"\n" -"Sr.\n" -"Jr.\n" -"I\n" -"II\n" -"III\n" -"Esq.\n" -msgstr "" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/gui/component/ldap-server-dialog.glade.h:7 -#: composer/e-msg-composer-attachment.glade.h:8 -msgid "Description:" -msgstr "¼³¸í:" - -#: addressbook/gui/component/ldap-server-dialog.glade.h:8 -msgid "LDAP Server:" -msgstr "LDAP ¼­¹ö:" - -#: addressbook/gui/component/ldap-server-dialog.glade.h:9 -msgid "Port Number:" -msgstr "Æ÷Æ® ¹øÈ£:" - -#: addressbook/gui/component/ldap-server-dialog.glade.h:10 -msgid "Root DN:" -msgstr "·çÆ® DN:" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/printing/e-contact-print.glade.h:7 -msgid "Page Setup:" -msgstr "ÂÊ ¼³Á¤:" - -#: addressbook/printing/e-contact-print.glade.h:8 -msgid "Style name:" -msgstr "Çü½Ä À̸§:" - -#: addressbook/printing/e-contact-print.glade.h:9 -msgid "Preview:" -msgstr "¹Ì¸®º¸±â:" - -#: addressbook/printing/e-contact-print.glade.h:10 -msgid "Options" -msgstr "¼³Á¤" - -#: addressbook/printing/e-contact-print.glade.h:11 -msgid "Include:" -msgstr "Æ÷ÇÔ:" - -#: addressbook/printing/e-contact-print.glade.h:12 -msgid "Sections:" -msgstr "¼½¼Ç:" - -#: addressbook/printing/e-contact-print.glade.h:13 -msgid "Immediately follow each other" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:14 -msgid "Letter tabs on side" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:15 -msgid "Headings for each letter" -msgstr "°¢ À帶´Ù Ç¥Á¦´Þ±â" - -#: addressbook/printing/e-contact-print.glade.h:16 -msgid "Start on a new page" -msgstr "»õ ÂÊÀ» ½ÃÀÛÇÕ´Ï´Ù" - -#: addressbook/printing/e-contact-print.glade.h:17 -msgid "Number of columns:" -msgstr "¿­ ¼ö:" - -#: addressbook/printing/e-contact-print.glade.h:18 -msgid "Blank forms at end:" -msgstr "³¡´Ü ºñ¿ì±â:" - -#: addressbook/printing/e-contact-print.glade.h:19 -msgid "Fonts" -msgstr "±Û²Ã" - -#: addressbook/printing/e-contact-print.glade.h:20 -#: addressbook/printing/e-contact-print.glade.h:21 -#: addressbook/printing/e-contact-print.glade.h:51 -#: addressbook/printing/e-contact-print.glade.h:54 -msgid "Font..." -msgstr "±Û²Ã..." - -#: addressbook/printing/e-contact-print.glade.h:22 -msgid "Headings" -msgstr "¸Ó¸´¸»" - -#: addressbook/printing/e-contact-print.glade.h:23 -msgid "10 pt. Tahoma" -msgstr "10 Æ÷ÀÎÆ® Tahoma" - -#: addressbook/printing/e-contact-print.glade.h:24 -msgid "Body" -msgstr "º»¹®" - -#: addressbook/printing/e-contact-print.glade.h:25 -msgid "8 pt. Tahoma" -msgstr "8 Æ÷ÀÎÆ® Tahoma" - -#: addressbook/printing/e-contact-print.glade.h:26 -msgid "Shading" -msgstr "¸í¾Ï" - -#: addressbook/printing/e-contact-print.glade.h:27 -msgid "Print using gray shading" -msgstr "ȸ»ö ¸í¾ÏÀ¸·Î Àμâ" - -#: addressbook/printing/e-contact-print.glade.h:28 -msgid "Format" -msgstr "Çü½Ä" - -#: addressbook/printing/e-contact-print.glade.h:29 -#: addressbook/printing/e-contact-print.glade.h:50 -msgid "Paper" -msgstr "Á¾ÀÌ" - -#: addressbook/printing/e-contact-print.glade.h:30 -msgid "Type:" -msgstr "ÇüÅÂ:" - -#: addressbook/printing/e-contact-print.glade.h:31 -#: addressbook/printing/e-contact-print.glade.h:43 -msgid "label26" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:32 -#: addressbook/printing/e-contact-print.glade.h:44 -msgid "Dimensions:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:33 -#: addressbook/printing/e-contact-print.glade.h:45 -msgid "Width:" -msgstr "Æø:" - -#: addressbook/printing/e-contact-print.glade.h:34 -#: addressbook/printing/e-contact-print.glade.h:46 -msgid "Height:" -msgstr "³ôÀÌ:" - -#: addressbook/printing/e-contact-print.glade.h:35 -msgid "Paper source:" -msgstr "±ÞÁö¹æ¹ý:" - -#: addressbook/printing/e-contact-print.glade.h:36 -msgid "Margins" -msgstr "¿©¹é" - -#: addressbook/printing/e-contact-print.glade.h:37 -msgid "Top:" -msgstr "À§:" - -#: addressbook/printing/e-contact-print.glade.h:38 -msgid "Bottom:" -msgstr "¾Æ·¡:" - -#: addressbook/printing/e-contact-print.glade.h:39 -msgid "Left:" -msgstr "¿ÞÂÊ:" - -#: addressbook/printing/e-contact-print.glade.h:40 -msgid "Right:" -msgstr "¿À¸¥ÂÊ:" - -#: addressbook/printing/e-contact-print.glade.h:41 -msgid "Page" -msgstr "ÂÊ" - -#: addressbook/printing/e-contact-print.glade.h:42 -msgid "Size:" -msgstr "Å©±â:" - -#: addressbook/printing/e-contact-print.glade.h:47 -msgid "Orientation" -msgstr "¹æÇâ" - -#: addressbook/printing/e-contact-print.glade.h:48 -msgid "Portrait" -msgstr "¼¼·Î" - -#: addressbook/printing/e-contact-print.glade.h:49 -msgid "Landscape" -msgstr "°¡·Î" - -#: addressbook/printing/e-contact-print.glade.h:52 -msgid "Header" -msgstr "¸Ó¸®¸»:" - -#: addressbook/printing/e-contact-print.glade.h:53 -msgid "Footer:" -msgstr "²¿¸®¸»:" - -#: addressbook/printing/e-contact-print.glade.h:55 -msgid "Reverse on even pages" -msgstr "¦¼ö ÂÊ µÚÁý±â" - -#: addressbook/printing/e-contact-print.glade.h:56 -msgid "Header/Footer" -msgstr "¸Ó¸®¸»/²¿¸®¸»" - -#: composer/e-msg-composer-address-dialog.c:183 composer/e-msg-composer.c:533 -msgid "Cut" -msgstr "ÀÚ¸£±â" - -#: composer/e-msg-composer-address-dialog.c:184 -msgid "Cut selected item into clipboard" -msgstr "¼±ÅÃÇÑ Ç׸ñÀ» Ŭ¸³º¸µå·Î ÀÚ¸¨´Ï´Ù" - -#: composer/e-msg-composer-address-dialog.c:187 composer/e-msg-composer.c:534 -msgid "Copy" -msgstr "º¹»ç" - -#: composer/e-msg-composer-address-dialog.c:188 -msgid "Copy selected item into clipboard" -msgstr "¼±ÅÃÇÑ Ç׸ñÀ» Ŭ¸³º¸µå·Î º¹»çÇÕ´Ï´Ù" - -#: composer/e-msg-composer-address-dialog.c:191 -#: composer/e-msg-composer-address-dialog.c:199 composer/e-msg-composer.c:535 -msgid "Paste" -msgstr "ºÙÀ̱â" - -#: composer/e-msg-composer-address-dialog.c:192 -#: composer/e-msg-composer-address-dialog.c:200 -msgid "Paste item from clipboard" -msgstr "Ŭ¸³º¸µå¿¡¼­ Ç׸ñÀ» º¹»çÇÕ´Ï´Ù" - -#: composer/e-msg-composer-address-dialog.c:528 -msgid "Select recipients' addresses" -msgstr "¹ÞÀ» »ç¶÷ÀÇ ÁÖ¼Ò ¼±ÅÃ" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: composer/e-msg-composer-address-dialog.glade.h:7 -msgid "Recipient list:" -msgstr "¹Þ´Â»ç¶÷ ¸ñ·Ï:" - -#: composer/e-msg-composer-address-dialog.glade.h:8 -msgid "Name:" -msgstr "À̸§:" - -#: composer/e-msg-composer-address-dialog.glade.h:9 -msgid "Search..." -msgstr "°Ë»ö..." - -#: composer/e-msg-composer-address-dialog.glade.h:10 -msgid "Name" -msgstr "À̸§" - -#: composer/e-msg-composer-address-dialog.glade.h:11 -msgid "Address" -msgstr "ÁÖ¼Ò" - -#: composer/e-msg-composer-address-dialog.glade.h:12 -msgid "Properties..." -msgstr "¼³Á¤..." - -#: composer/e-msg-composer-address-dialog.glade.h:13 -msgid "Add..." -msgstr "Ãß°¡..." - -#: composer/e-msg-composer-address-dialog.glade.h:14 -msgid "To: >>" -msgstr "¹Þ´Â»ç¶÷: >>" - -#: composer/e-msg-composer-address-dialog.glade.h:15 -msgid "Cc: >>" -msgstr "ÂüÁ¶: >>" - -#: composer/e-msg-composer-address-dialog.glade.h:16 -msgid "Bcc: >>" -msgstr "" - -#: composer/e-msg-composer-address-dialog.glade.h:17 -msgid "label9" -msgstr "" - -#: composer/e-msg-composer-address-dialog.glade.h:18 -msgid "label7" -msgstr "" - -#: composer/e-msg-composer-address-dialog.glade.h:19 -msgid "label8" -msgstr "" - -#: composer/e-msg-composer-attachment-bar.c:76 -msgid "1 byte" -msgstr "1 ¹ÙÀÌÆ®" - -#: composer/e-msg-composer-attachment-bar.c:78 -#, c-format -msgid "%u bytes" -msgstr "%u ¹ÙÀÌÆ®" - -#: composer/e-msg-composer-attachment-bar.c:85 -#, c-format -msgid "%.1fK" -msgstr "" - -#: composer/e-msg-composer-attachment-bar.c:89 -#, c-format -msgid "%.1fM" -msgstr "" - -#: composer/e-msg-composer-attachment-bar.c:93 -#, c-format -msgid "%.1fG" -msgstr "" - -#: composer/e-msg-composer-attachment-bar.c:307 -msgid "Add attachment" -msgstr "÷ºÎÆÄÀÏ Ãß°¡" - -#: composer/e-msg-composer-attachment-bar.c:364 -msgid "Remove" -msgstr "Á¦°Å" - -#: composer/e-msg-composer-attachment-bar.c:365 -msgid "Remove selected items from the attachment list" -msgstr "÷ºÎÆÄÀÏ ¸ñ·Ï¿¡¼­ ¼±ÅÃÇÑ Ç׸ñÀ» Á¦°ÅÇÕ´Ï´Ù" - -#: composer/e-msg-composer-attachment-bar.c:396 -msgid "Add attachment..." -msgstr "÷ºÎÆÄÀÏ Ãß°¡..." - -#: composer/e-msg-composer-attachment-bar.c:397 -msgid "Attach a file to the message" -msgstr "¸Þ¼¼Áö¿¡ ÆÄÀÏÀ» ÷ºÎÇÕ´Ï´Ù" - -#: composer/e-msg-composer-attachment.c:259 -msgid "Select attachment" -msgstr "÷ºÎÆÄÀÏ ¼±ÅÃ" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: composer/e-msg-composer-attachment.glade.h:7 -msgid "Attachment properties" -msgstr "÷ºÎ ¼Ó¼º" - -#: composer/e-msg-composer-attachment.glade.h:9 -msgid "MIME type:" -msgstr "MIME Çü½Ä:" - -#: composer/e-msg-composer-attachment.glade.h:10 -msgid "File name:" -msgstr "ÆÄÀÏ À̸§:" - -#: composer/e-msg-composer-attachment.glade.h:11 -msgid "Browse..." -msgstr "Ž»ö..." - -#: composer/e-msg-composer-hdrs.c:89 -msgid "Click here for the address book" -msgstr "ÁÖ¼Ò·Ï" - -#: composer/e-msg-composer-hdrs.c:124 -msgid "To:" -msgstr "¹Þ´Â»ç¶÷:" - -#: composer/e-msg-composer-hdrs.c:125 -msgid "Enter the recipients of the message" -msgstr "¸Þ¼¼Áö¸¦ ¹ÞÀ»»ç¶÷À» ÀÔ·ÂÇϼ¼¿ä" - -#: composer/e-msg-composer-hdrs.c:129 -msgid "Cc:" -msgstr "ÂüÁ¶:" - -#: composer/e-msg-composer-hdrs.c:130 -msgid "Enter the addresses that will receive a carbon copy of the message" -msgstr "¸Þ¼¼ÁöÀÇ »çº»À» ¹ÞÀ» »ç¶÷ÀÇ ÁÖ¼Ò¸¦ ÀÔ·ÂÇϼ¼¿ä" - -#: composer/e-msg-composer-hdrs.c:135 -msgid "Bcc:" -msgstr "" - -#: composer/e-msg-composer-hdrs.c:136 -msgid "" -"Enter the addresses that will receive a carbon copy of the message without " -"appearing in the recipient list of the message." -msgstr "ÂüÁ¶ ¸ñ·Ï¿¡´Â ¾øÁö¸¸ ¸Þ¼¼ÁöÀÇ »çº»À» ¹ÞÀ» »ç¶÷µéÀÇ ÁÖ¼Ò¸¦ ÀÔ·ÂÇϼ¼¿ä" - -#: composer/e-msg-composer-hdrs.c:142 -msgid "Subject:" -msgstr "Á¦¸ñ:" - -#: composer/e-msg-composer-hdrs.c:143 -msgid "Enter the subject of the mail" -msgstr "ÆíÁöÀÇ Á¦¸ñÀ» ÀÔ·ÂÇϼ¼¿ä" - -#: composer/e-msg-composer.c:491 -msgid "Save in _folder..." -msgstr "Æú´õ·Î ÀúÀå(_f)..." - -#: composer/e-msg-composer.c:491 -msgid "Save the message in a specified folder" -msgstr "¸Þ¼¼Áö¸¦ ÁöÁ¤ÇÑ Æú´õ·Î ÀúÀåÇÕ´Ï´Ù" - -#: composer/e-msg-composer.c:494 composer/e-msg-composer.c:531 -#: mail/folder-browser-factory.c:36 -msgid "Send" -msgstr "º¸³¿" - -#: composer/e-msg-composer.c:494 -msgid "Send the message" -msgstr "¸Þ¼¼Áö¸¦ º¸³À´Ï´Ù" - -#: composer/e-msg-composer.c:502 -msgid "View _attachments" -msgstr "÷ºÎ¹° º¸±â(_a)" - -#: composer/e-msg-composer.c:502 -msgid "View/hide attachments" -msgstr "÷ºÎ¹°À» º¸°Å³ª ¼û±é´Ï´Ù" - -#: composer/e-msg-composer.c:531 -msgid "Send this message" -msgstr "ÀÌ ¸Þ¼¼Áö¸¦ º¸³¿" - -#: composer/e-msg-composer.c:533 -msgid "Cut selected region into the clipboard" -msgstr "¼±ÅÃÇÑ ¿µ¿ªÀ» Ŭ¸³º¸µå·Î ÀÚ¸¨´Ï´Ù" - -#: composer/e-msg-composer.c:534 -msgid "Copy selected region into the clipboard" -msgstr "¼±ÅÃÇÑ ¿µ¿ªÀ» Ŭ¸³º¸µå·Î º¹»çÇÕ´Ï´Ù" - -#: composer/e-msg-composer.c:535 -msgid "Paste selected region into the clipboard" -msgstr "Ŭ¸³º¸µå¿¡ ¼±ÅÃµÈ ¿µ¿ªÀ» ºÙÀÔ´Ï´Ù" - -#: composer/e-msg-composer.c:536 -msgid "Undo" -msgstr "Ãë¼Ò" - -#: composer/e-msg-composer.c:536 -msgid "Undo last operation" -msgstr "¸¶Áö¸· ÀÛ¾÷ Ãë¼Ò" - -#: composer/e-msg-composer.c:538 -msgid "Attach" -msgstr "÷ºÎ" - -#: composer/e-msg-composer.c:538 -msgid "Attach a file" -msgstr "ÆÄÀÏÀ» ÷ºÎÇÕ´Ï´Ù" - -#: mail/folder-browser-factory.c:35 -msgid "Get mail" -msgstr "ÆíÁö ¹Þ±â" - -#: mail/folder-browser-factory.c:35 -msgid "Check for new mail" -msgstr "»õ ÆíÁö¸¦ È®ÀÎÇÕ´Ï´Ù" - -#: mail/folder-browser-factory.c:36 -msgid "Send a new message" -msgstr "»õ ¸Þ¼¼Áö¸¦ º¸³À´Ï´Ù" - -#: mail/folder-browser-factory.c:37 -msgid "Find" -msgstr "ã±â" - -#: mail/folder-browser-factory.c:37 -msgid "Find messages" -msgstr "¸Þ¼¼Áö¸¦ ã½À´Ï´Ù" - -#: mail/folder-browser-factory.c:41 -msgid "Reply" -msgstr "´äÀå" - -#: mail/folder-browser-factory.c:41 -msgid "Reply to the sender of this message" -msgstr "ÀÌ ¸Þ¼¼Áö¸¦ º¸³½»ç¶÷¿¡°Ô ´äÀåÀ» ÇÕ´Ï´Ù" - -#: mail/folder-browser-factory.c:42 -msgid "Reply to All" -msgstr "¸ðµÎ ´äÀå" - -#: mail/folder-browser-factory.c:42 -msgid "Reply to all recipients of this message" -msgstr "ÀÌ ¸Þ¼¼Áö¸¦ ¹ÞÀº ¸ðµç »ç¶÷¿¡°Ô ´äÀåÀ» ÇÕ´Ï´Ù" - -#: mail/folder-browser-factory.c:44 -msgid "Forward" -msgstr "Àü´Þ" - -#: mail/folder-browser-factory.c:44 -msgid "Forward this message" -msgstr "ÀÌ ¸Þ¼¼Áö¸¦ ´Ù¸¥»ç¶÷¿¡°Ô Àü´ÞÇÕ´Ï´Ù" - -#: mail/folder-browser-factory.c:48 -msgid "Print" -msgstr "Àμâ" - -#: mail/folder-browser-factory.c:48 -msgid "Print the selected message" -msgstr "¼±ÅÃÇÑ ¸Þ¼¼Áö¸¦ ÀμâÇÕ´Ï´Ù" - -#: mail/folder-browser-factory.c:50 -msgid "Delete this message" -msgstr "ÀÌ ¸Þ¼¼Áö¸¦ »èÁ¦ÇÕ´Ï´Ù" - -#: mail/folder-browser-factory.c:67 -msgid "_Expunge" -msgstr "Á¦°Å(_E)" - -#: mail/folder-browser-factory.c:73 -#, fuzzy -msgid "_Filter Druid" -msgstr "ÇÊÅÍ" - -#: mail/folder-browser-factory.c:186 -msgid "We are sorry, Evolution's Folder Browser can not be initialized." -msgstr "EvolutionÀÇ Æú´õ Ž»ö±â¸¦ ÃʱâÈ­ ÇÒ¼ö ¾ø½À´Ï´Ù." - -#: mail/folder-browser.c:208 -msgid "The URI that the Folder Browser will display" -msgstr "Æú´õ Ž»ö±â°¡ Ç¥½ÃÇÒ URI" - -#: mail/folder-browser.c:211 -msgid "Whether a message preview should be shown" -msgstr "" - -#: mail/main.c:58 -msgid "Mail Component: I could not initialize Bonobo" -msgstr "¸ÞÀÏ ÄÄÆ÷³ÍÆ®: Bonobo¸¦ ÃʱâÈ­ ÇÒ¼ö ¾ø½À´Ï´Ù" - -#: mail/message-list.c:464 -msgid "Priority" -msgstr "¿ì¼±¼øÀ§" - -#: mail/message-list.c:478 -msgid "From" -msgstr "º¸³½ »ç¶÷" - -#: mail/message-list.c:485 -msgid "Subject" -msgstr "Á¦¸ñ" - -#: mail/message-list.c:492 -msgid "Sent" -msgstr "º¸³Â½¿" - -#: mail/message-list.c:499 -msgid "Receive" -msgstr "¹Þ¾Ò½¿" - -#: mail/message-list.c:506 -msgid "To" -msgstr "¹Þ´Â »ç¶÷" - -#: mail/message-list.c:513 -msgid "Size" -msgstr "Å©±â" - -#. you might have to call gnome_dialog_run() on the -#. * dialog returned here, I don't remember... -#. -#: shell/e-shell-view-menu.c:62 -msgid "Bug buddy was not found in your $PATH." -msgstr "½Ã½ºÅÛÀÇ °æ·Î¿¡ Bug buddy¸¦ ãÀ»¼ö ¾ø½À´Ï´Ù." - -#. same as above -#: shell/e-shell-view-menu.c:68 -msgid "Bug buddy could not be run." -msgstr "Bug buddy¸¦ ½ÇÇàÇÒ¼ö ¾ø½À´Ï´Ù." - -#: shell/e-shell-view-menu.c:111 -msgid "Evolution" -msgstr "" - -#: shell/e-shell-view-menu.c:113 -msgid "Copyright 1999, 2000 Helix Code, Inc." -msgstr "" - -#: shell/e-shell-view-menu.c:115 -msgid "" -"Evolution is a suite of groupware applications\n" -"for mail, calendaring, and contact management\n" -"within the GNOME desktop environment." -msgstr "" -"Evolution Àº ±×³ð µ¥½ºÅ©Å¾ ȯ°æ¿¡¼­ ÀüÀÚ¿ìÆí, \n" -"ÀÏÁ¤, ¿¬¶ôó °ü¸®¸¦ ÇÏ´Â ±×·ì¿þ¾î ÀÀ¿ëÇÁ·Î±×·¥\n" -"¸ðÀ½ ÀÔ´Ï´Ù." - -#: shell/e-shell-view-menu.c:185 shell/e-shell-view-menu.c:251 -msgid "_Folder" -msgstr "Æú´õ(_F)" - -#: shell/e-shell-view-menu.c:189 -msgid "Evolution _Bar Shortcut" -msgstr "Evolution ´ÜÃà ¸·´ë(_B)" - -#: shell/e-shell-view-menu.c:195 -msgid "_Mail message" -msgstr "ÆíÁö ¸Þ¼¼Áö(_M)" - -#: shell/e-shell-view-menu.c:196 shell/e-shell-view-menu.c:199 -msgid "Composes a new mail message" -msgstr "»õ ¸ÞÀÏ ¸Þ¼¼Áö¸¦ ÀÛ¼ºÇÕ´Ï´Ù" - -#: shell/e-shell-view-menu.c:198 -msgid "_Appointment" -msgstr "¾à¼Ó(_A)" - -#: shell/e-shell-view-menu.c:201 -msgid "Meeting Re_quest" -msgstr "ȸÀÇ ¿äû(_q)" - -#: shell/e-shell-view-menu.c:204 -msgid "_Contact" -msgstr "¿¬°á(_C)" - -#: shell/e-shell-view-menu.c:207 -msgid "_Task" -msgstr "ÀÛ¾÷(_T)" - -#: shell/e-shell-view-menu.c:210 -msgid "Task _Request" -msgstr "ÀÛ¾÷ ¿äû(_R)" - -#: shell/e-shell-view-menu.c:213 -msgid "_Journal Entry" -msgstr "¿©Çà ÀÏÁ¤(_J)" - -#: shell/e-shell-view-menu.c:216 -msgid "_Note" -msgstr "³ëÆ®(_N)" - -#: shell/e-shell-view-menu.c:226 -msgid "_Selected Items" -msgstr "¼±ÅÃÇÑ Ç׸ñ(_S)" - -#: shell/e-shell-view-menu.c:234 -msgid "_New Folder" -msgstr "»õ Æú´õ(_N)" - -#: shell/e-shell-view-menu.c:242 -msgid "_New" -msgstr "»õ·Î¿î(_N)" - -#: shell/e-shell-view-menu.c:243 -msgid "_Open" -msgstr "¿­±â(_O)" - -#: shell/e-shell-view-menu.c:244 -msgid "Clos_e All Items" -msgstr "¸ðµç Ç׸ñ ´Ý±â(_e)" - -#: shell/e-shell-view-menu.c:244 -msgid "Closes all the open items" -msgstr "¿­·ÁÀÖ´Â ¸ðµç Ç׸ñÀ» ´Ý½À´Ï´Ù" - -#: shell/e-shell-view-menu.c:265 -#, fuzzy -msgid "Show _Shortcut Bar" -msgstr "´ÜÃà ¸·´ë Åä±Û" - -#: shell/e-shell-view-menu.c:266 -#, fuzzy -msgid "Shows the shortcut bar" -msgstr "´ÜÃื´ë¸¦ Åä±ÛÇÕ´Ï´Ù" - -#: shell/e-shell-view-menu.c:268 -#, fuzzy -msgid "Show _Treeview" -msgstr "³ª¹«¸ð¾çº¸±â Åä±Û(_T)" - -#: shell/e-shell-view-menu.c:269 -#, fuzzy -msgid "Shows the tree view" -msgstr "³ª¹« ¸ð¾çº¸±â·Î Åä±ÛÇÕ´Ï´Ù" - -#: shell/e-shell-view-menu.c:284 -msgid "_Submit bug" -msgstr "¹ö±× Á¦º¸(_S)" - -#: shell/e-shell-view-menu.c:285 -msgid "Submit bug-report via bug-buddy" -msgstr "bug-buddy·Î ¹ö±×Á¦º¸¸¦ ÇÕ´Ï´Ù" - -#. FIXME: add Favorites here -#: shell/e-shell-view-menu.c:300 -msgid "_Tools" -msgstr "µµ±¸(_T)" - -#: shell/e-shell-view-menu.c:301 -msgid "_Actions" -msgstr "Çൿ(_A)" - -#: shell/e-shell.c:157 -#, c-format -msgid "Cannot set up local storage -- %s" -msgstr "½Ã½ºÅÛ ÀúÀåÀåÄ¡¸¦ ÁöÁ¤ÇÒ¼ö ¾ø½À´Ï´Ù -- %s" - -#: shell/main.c:100 -msgid "" -"Hi. Thanks for taking the time to download this preview release of\n" -"the Evolution groupware suite.\n" -"\n" -"The Evolution team has worked hard to make Evolution as robust,\n" -"extensible, pretty, fast and well-suited to heavy internet users as\n" -"possible. And we're very tired. But we're not done -- not yet.\n" -"\n" -"As you explore Evolution, please understand that most of our work has\n" -"been focused on the backend engine which drives the entire system and\n" -"not on the user interface. We are just cresting the hill now, though,\n" -"and will be pouring most of our love and attention into the UI from\n" -"here out. But at least you know that you're not using demoware.\n" -"\n" -"So, time for the nerdy disclaimer. Evolution will: crash, lose your\n" -"mail, leave stray processes running, consume 100% CPU, race, lock,\n" -"send HTML mail to random mailing lists, and embarass you in front of\n" -"your friends and co-workers. Use at your own risk.\n" -"\n" -"We hope that you enjoy the results of our hard work, and we eagerly\n" -"await your contributions!\n" -msgstr "" -"¾È³çÇϼ¼¿ä. Evolution ±×·ì¿þ¾î ½´Æ®ÀÇ ¹Ì¸®º¸±â ÆÇÀ» ´Ù¿î·Îµå ¹Þ¾ÆÁּż­\n" -"°¨»çÇÕ´Ï´Ù. \n" -"\n" -"Evolution ÆÀÀº ÀÎÅÍ³Ý »ç¿ëÀÚ¿¡°Ô °¡´ÉÇÑÇÑ °­·ÂÇÑ, È®À强ÀÖ°í ¿¹»Û, \n" -"ºü¸£°í Àß ¿¬µ¿µÇ°Ô EvolutionÀ» ¸¸µå´Âµ¥ ÃÖ¼±À» ´ÙÇؼ­ ÀÛ¾÷ÇÏ°í \n" -"ÀÖ½À´Ï´Ù. ¾ÆÁÖ ÈûµçÀÛ¾÷ÀÌÁö¸¸ ¾ÆÁ÷ ¿Ï·áµÇÁö´Â ¾Ê¾Ò½À´Ï´Ù. \n" -"\n" -"EvolutionÀ» ÀÌÇØÇÏ·Á¸é, »ç¿ëÀÚÀÎÅÍÆäÀ̽º »Ó¸¸ ¾Æ´Ï¶ó Àüü ½Ã½ºÅÛÀ»\n" -"Á¦¾îÇÏ´Â ±â¹Ý ¿£ÁøÀ» ¸¸µå´Âµ¥ ¿ì¸®ÀÛ¾÷ÀÇ ´ëºÎºÐÀÌÀÌ ÃÐÁ¡ÀÌ ¸ÂÃß¾îÁ®\n" -"Àִٴ°ÍÀ» ÀÌÇØÇÏ°í ÀÖ¾î¾ß ÇÕ´Ï´Ù. We are just cresting the hill now,\n" -"though, and will be pouring most of our love and attention into the UI\n" -"from here out. ÇÏÁö¸¸ Àû¾îµµ µ¥¸ðÆÇÀ» »ç¿ëÇÏÁö ¾Ê´Â´Ù´Â°ÍÀ» ¾Ë²®´Ï´Ù.\n" -"\n" -"¹Ùº¸°°Àº ±Ç¸®Æ÷±â ¼­¾à¼­ÀÔ´Ï´Ù. EvolutionÀº :½Ã½ºÅÛÀ» Æı«ÇÒ¼ö ÀÖÀ¸¸ç\n" -"´ç½ÅÀÇ ¸ÞÀÏÀ» Àоî¹ö¸±¼öµµ, ÇÁ·Î¼¼½º ½ÇÇàÀÌ Çì¸á¼öµµ CPUÁ¡À¯¸¦ 100% \n" -"»ç¿ëÇÒ¼öµµ, ¿Àµ¿ÀÛ Çϰųª ¸ØÃâ¼öµµ, ¾Æ¹« ¸ÞÀϸµ ¸ñ·Ï¿¡³ª HTMLÇü½ÄÀÇ \n" -"¸ÞÀÏÀ» º¸³»¼­ ´ç½ÅÀÇ Ä£±¸³ª µ¿·áÁ÷¿øÀ» ³î·¡ÄÑ ÁÙ¼öµµ ÀÖÀ¸³ª ÀÌ·±°ÍµéÀ»\n" -"°¨¼öÇÒ¼ö ÀÖ¾î¾ß ÇÕ´Ï´Ù.\n" -"\n" -"¿ì¸®ÀÇ Èûµç ÀÛ¾÷ÀÇ °á°ú°¡ ´ç½ÅÀ» ±â»Ú°Ô ÇÏ¿´À¸¸é ÁÁ°ÚÀ¸¸ç, ¶ÇÇÑ ´ç½ÅÀÇ\n" -"µµ¿òÀ» °£ÀýÈ÷ ±â´Ù¸®°í ÀÖ½À´Ï´Ù.\n" - -#: shell/main.c:129 -msgid "" -"Thanks\n" -"The Evolution Team\n" -msgstr "" -"°¨»çÇÕ´Ï´Ù\n" -"Evolution ÆÀ\n" - -#: shell/main.c:156 -msgid "Cannot initialize the Evolution shell." -msgstr "Evolution ½©À» ÃʱâÈ­ ÇÒ¼ö ¾ø½À´Ï´Ù." - -#: shell/main.c:186 -msgid "Cannot initialize the Bonobo component system." -msgstr "º¸³ëº¸ ÄÄÆ÷³ÍÆ® ½Ã½ºÅÛÀ» ÃʱâÈ­ ÇÒ¼ö ¾ø½À´Ï´Ù." - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: widgets/e-table/e-table-config.glade.h:7 -msgid "Fields" -msgstr "Çʵå" - -#: widgets/e-table/e-table-config.glade.h:8 -msgid "Grouping" -msgstr "¹­±â" - -#: widgets/e-table/e-table-config.glade.h:9 -msgid "Sort" -msgstr "Á¤·Ä" - -#: widgets/e-table/e-table-config.glade.h:10 -msgid "Filter" -msgstr "ÇÊÅÍ" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: widgets/e-table/e-table-group.glade.h:7 -msgid "window1" -msgstr "" - -#: widgets/e-table/e-table-group.glade.h:8 -msgid "Available fields" -msgstr "°¡´ÉÇÑ Çʵå" - -#: widgets/e-table/e-table-group.glade.h:9 -msgid "label1" -msgstr "" - -#: widgets/e-table/e-table-group.glade.h:10 -msgid "Show in this order" -msgstr "ÀÌ ¼ø¼­·Î º¸±â" - -#: widgets/e-table/e-table-group.glade.h:11 -msgid "label2" -msgstr "" - -#: widgets/e-table/e-table-group.glade.h:12 -msgid "Add >>" -msgstr "Ãß°¡ >>" - -#: widgets/e-table/e-table-group.glade.h:13 -msgid "<< Remove" -msgstr "<< Á¦°Å" diff --git a/po/nl.po b/po/nl.po deleted file mode 100644 index df15fe488b..0000000000 --- a/po/nl.po +++ /dev/null @@ -1,1159 +0,0 @@ -# Evolution - Dutch translation -# Copyright (C) 2000 Free Software Foundation, Inc. -# Arjan Scherpenisse , 2000 -msgid "" -msgstr "" -"Project-Id-Version: Evolution VERSION\n" -"POT-Creation-Date: 2000-05-27 20:01+0100\n" -"PO-Revision-Date: 2000-04-20 01:24+0100\n" -"Last-Translator: Arjan Scherpenisse \n" -"Language-Team: Dutch \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=iso-8859-1\n" -"Content-Transfer-Encoding: 8-bit\n" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/contact-editor/e-contact-editor-strings.h:7 -#, fuzzy -msgid "Contact Editor" -msgstr "_Contact" - -#: addressbook/contact-editor/e-contact-editor-strings.h:8 -msgid "_Full Name..." -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:9 -#, fuzzy -msgid "Company:" -msgstr "Kopieren" - -#: addressbook/contact-editor/e-contact-editor-strings.h:10 -msgid "File As:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:11 -msgid "Web page address:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:12 -msgid "Wants to receive _HTML mail" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:13 -msgid "Address:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:14 -msgid "_Business" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:15 -#, fuzzy -msgid "_Home" -msgstr "_Notitie" - -#: addressbook/contact-editor/e-contact-editor-strings.h:16 -msgid "Business _Fax" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:17 -#, fuzzy -msgid "_Mobile" -msgstr "_Mail" - -#: addressbook/contact-editor/e-contact-editor-strings.h:18 -msgid "Primary Email" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:19 -msgid "Business" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:20 -msgid "This is the _mailing address" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:21 -#, fuzzy -msgid "_Contacts..." -msgstr "_Contact" - -#: addressbook/contact-editor/e-contact-editor-strings.h:22 -msgid "Ca_tegories..." -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:23 -msgid "Job Title" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:24 -msgid "General" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:25 -msgid "Department:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:26 -msgid "Office:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:27 -msgid "Profession:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:28 -msgid "Nickname:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:29 -msgid "Spouse:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:30 -msgid "Birthday:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:31 -msgid "Assistant's name:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:32 -msgid "Manager's Name:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:33 -msgid "Anniversary:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:34 -#, fuzzy -msgid "Notes:" -msgstr "_Notitie" - -#: addressbook/contact-editor/e-contact-editor-strings.h:35 -msgid "Details" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:36 -#: addressbook/contact-editor/e-contact-editor-strings.h:41 -msgid "Add" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:37 -#: mail/folder-browser-factory.c:50 -msgid "Delete" -msgstr "Verwijderen" - -#: addressbook/contact-editor/e-contact-editor-strings.h:38 -msgid "Phone Types" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:39 -#: addressbook/contact-editor/e-contact-editor-strings.h:40 -msgid "New phone type" -msgstr "" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/contact-editor/fullname-strings.h:7 -msgid "Check Full Name" -msgstr "" - -#: addressbook/contact-editor/fullname-strings.h:8 -msgid "_Title:" -msgstr "" - -#: addressbook/contact-editor/fullname-strings.h:9 -msgid "_First:" -msgstr "" - -#: addressbook/contact-editor/fullname-strings.h:10 -#, fuzzy -msgid "_Middle:" -msgstr "_Mail" - -#: addressbook/contact-editor/fullname-strings.h:11 -msgid "_Last:" -msgstr "" - -#: addressbook/contact-editor/fullname-strings.h:12 -msgid "_Suffix:" -msgstr "" - -#: addressbook/contact-editor/fullname-strings.h:13 -msgid "" -"\n" -"Mr.\n" -"Mrs.\n" -"Dr.\n" -msgstr "" - -#: addressbook/contact-editor/fullname-strings.h:18 -msgid "" -"\n" -"Sr.\n" -"Jr.\n" -"I\n" -"II\n" -"III\n" -"Esq.\n" -msgstr "" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/gui/component/ldap-server-dialog.glade.h:7 -#: composer/e-msg-composer-attachment.glade.h:8 -msgid "Description:" -msgstr "" - -#: addressbook/gui/component/ldap-server-dialog.glade.h:8 -msgid "LDAP Server:" -msgstr "" - -#: addressbook/gui/component/ldap-server-dialog.glade.h:9 -msgid "Port Number:" -msgstr "" - -#: addressbook/gui/component/ldap-server-dialog.glade.h:10 -msgid "Root DN:" -msgstr "" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/printing/e-contact-print.glade.h:7 -msgid "Page Setup:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:8 -msgid "Style name:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:9 -msgid "Preview:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:10 -#, fuzzy -msgid "Options" -msgstr "_Acties" - -#: addressbook/printing/e-contact-print.glade.h:11 -msgid "Include:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:12 -#, fuzzy -msgid "Sections:" -msgstr "_Acties" - -#: addressbook/printing/e-contact-print.glade.h:13 -msgid "Immediately follow each other" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:14 -msgid "Letter tabs on side" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:15 -msgid "Headings for each letter" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:16 -#, fuzzy -msgid "Start on a new page" -msgstr "Stuur een bericht" - -#: addressbook/printing/e-contact-print.glade.h:17 -msgid "Number of columns:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:18 -msgid "Blank forms at end:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:19 -#, fuzzy -msgid "Fonts" -msgstr "Contacten" - -#: addressbook/printing/e-contact-print.glade.h:20 -#: addressbook/printing/e-contact-print.glade.h:21 -#: addressbook/printing/e-contact-print.glade.h:51 -#: addressbook/printing/e-contact-print.glade.h:54 -msgid "Font..." -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:22 -msgid "Headings" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:23 -msgid "10 pt. Tahoma" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:24 -#, fuzzy -msgid "Body" -msgstr "Vandaag" - -#: addressbook/printing/e-contact-print.glade.h:25 -msgid "8 pt. Tahoma" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:26 -msgid "Shading" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:27 -msgid "Print using gray shading" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:28 -#, fuzzy -msgid "Format" -msgstr "Doorsturen" - -#: addressbook/printing/e-contact-print.glade.h:29 -#: addressbook/printing/e-contact-print.glade.h:50 -#, fuzzy -msgid "Paper" -msgstr "Plakken" - -#: addressbook/printing/e-contact-print.glade.h:30 -msgid "Type:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:31 -#: addressbook/printing/e-contact-print.glade.h:43 -msgid "label26" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:32 -#: addressbook/printing/e-contact-print.glade.h:44 -msgid "Dimensions:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:33 -#: addressbook/printing/e-contact-print.glade.h:45 -msgid "Width:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:34 -#: addressbook/printing/e-contact-print.glade.h:46 -msgid "Height:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:35 -msgid "Paper source:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:36 -msgid "Margins" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:37 -#, fuzzy -msgid "Top:" -msgstr "Aan:" - -#: addressbook/printing/e-contact-print.glade.h:38 -msgid "Bottom:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:39 -msgid "Left:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:40 -msgid "Right:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:41 -#, fuzzy -msgid "Page" -msgstr "Plakken" - -#: addressbook/printing/e-contact-print.glade.h:42 -#, fuzzy -msgid "Size:" -msgstr "Grootte" - -#: addressbook/printing/e-contact-print.glade.h:47 -msgid "Orientation" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:48 -#, fuzzy -msgid "Portrait" -msgstr "Prioriteit" - -#: addressbook/printing/e-contact-print.glade.h:49 -msgid "Landscape" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:52 -msgid "Header" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:53 -msgid "Footer:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:55 -msgid "Reverse on even pages" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:56 -msgid "Header/Footer" -msgstr "" - -#: composer/e-msg-composer-address-dialog.c:183 composer/e-msg-composer.c:533 -msgid "Cut" -msgstr "Knippen" - -#: composer/e-msg-composer-address-dialog.c:184 -msgid "Cut selected item into clipboard" -msgstr "Knip het geselecteerde item naar het klembord" - -#: composer/e-msg-composer-address-dialog.c:187 composer/e-msg-composer.c:534 -msgid "Copy" -msgstr "Kopieren" - -#: composer/e-msg-composer-address-dialog.c:188 -msgid "Copy selected item into clipboard" -msgstr "Kopieer het geseleceteerde item naar het klembord" - -#: composer/e-msg-composer-address-dialog.c:191 -#: composer/e-msg-composer-address-dialog.c:199 composer/e-msg-composer.c:535 -msgid "Paste" -msgstr "Plakken" - -#: composer/e-msg-composer-address-dialog.c:192 -#: composer/e-msg-composer-address-dialog.c:200 -msgid "Paste item from clipboard" -msgstr "Plak een item vanaf het klembord" - -#: composer/e-msg-composer-address-dialog.c:528 -msgid "Select recipients' addresses" -msgstr "Selecteer de geadresseerden" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: composer/e-msg-composer-address-dialog.glade.h:7 -msgid "Recipient list:" -msgstr "" - -#: composer/e-msg-composer-address-dialog.glade.h:8 -msgid "Name:" -msgstr "" - -#: composer/e-msg-composer-address-dialog.glade.h:9 -msgid "Search..." -msgstr "" - -#: composer/e-msg-composer-address-dialog.glade.h:10 -msgid "Name" -msgstr "" - -#: composer/e-msg-composer-address-dialog.glade.h:11 -msgid "Address" -msgstr "" - -#: composer/e-msg-composer-address-dialog.glade.h:12 -#, fuzzy -msgid "Properties..." -msgstr "Eigenschappen" - -#: composer/e-msg-composer-address-dialog.glade.h:13 -msgid "Add..." -msgstr "" - -#: composer/e-msg-composer-address-dialog.glade.h:14 -#, fuzzy -msgid "To: >>" -msgstr "Aan:" - -#: composer/e-msg-composer-address-dialog.glade.h:15 -#, fuzzy -msgid "Cc: >>" -msgstr "Cc:" - -#: composer/e-msg-composer-address-dialog.glade.h:16 -#, fuzzy -msgid "Bcc: >>" -msgstr "Bcc:" - -#: composer/e-msg-composer-address-dialog.glade.h:17 -msgid "label9" -msgstr "" - -#: composer/e-msg-composer-address-dialog.glade.h:18 -msgid "label7" -msgstr "" - -#: composer/e-msg-composer-address-dialog.glade.h:19 -msgid "label8" -msgstr "" - -#: composer/e-msg-composer-attachment-bar.c:76 -msgid "1 byte" -msgstr "1 byte" - -#: composer/e-msg-composer-attachment-bar.c:78 -#, c-format -msgid "%u bytes" -msgstr "%u bytes" - -#: composer/e-msg-composer-attachment-bar.c:85 -#, c-format -msgid "%.1fK" -msgstr "%.1fK" - -#: composer/e-msg-composer-attachment-bar.c:89 -#, c-format -msgid "%.1fM" -msgstr "%.1fM" - -#: composer/e-msg-composer-attachment-bar.c:93 -#, c-format -msgid "%.1fG" -msgstr "%.1fG" - -#: composer/e-msg-composer-attachment-bar.c:307 -msgid "Add attachment" -msgstr "Bestand bijvoegen" - -#: composer/e-msg-composer-attachment-bar.c:364 -msgid "Remove" -msgstr "Verwijderen" - -#: composer/e-msg-composer-attachment-bar.c:365 -msgid "Remove selected items from the attachment list" -msgstr "Verwijder het geselecteerde bestand uit de lijst van attachments" - -#: composer/e-msg-composer-attachment-bar.c:396 -msgid "Add attachment..." -msgstr "Bestand bijvoegen..." - -#: composer/e-msg-composer-attachment-bar.c:397 -msgid "Attach a file to the message" -msgstr "Voeg een bestand bij het bericht" - -#: composer/e-msg-composer-attachment.c:259 -msgid "Select attachment" -msgstr "Selecteer het bestand" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: composer/e-msg-composer-attachment.glade.h:7 -msgid "Attachment properties" -msgstr "" - -#: composer/e-msg-composer-attachment.glade.h:9 -msgid "MIME type:" -msgstr "" - -#: composer/e-msg-composer-attachment.glade.h:10 -msgid "File name:" -msgstr "" - -#: composer/e-msg-composer-attachment.glade.h:11 -msgid "Browse..." -msgstr "" - -#: composer/e-msg-composer-hdrs.c:89 -msgid "Click here for the address book" -msgstr "Klik hier voor het adresboek" - -#: composer/e-msg-composer-hdrs.c:124 -msgid "To:" -msgstr "Aan:" - -#: composer/e-msg-composer-hdrs.c:125 -msgid "Enter the recipients of the message" -msgstr "Geef de geaddreseerden" - -#: composer/e-msg-composer-hdrs.c:129 -msgid "Cc:" -msgstr "Cc:" - -#: composer/e-msg-composer-hdrs.c:130 -msgid "Enter the addresses that will receive a carbon copy of the message" -msgstr "Geef de adressen die een 'carbon copy' van het bericht moeten krijgen" - -#: composer/e-msg-composer-hdrs.c:135 -msgid "Bcc:" -msgstr "Bcc:" - -#: composer/e-msg-composer-hdrs.c:136 -msgid "" -"Enter the addresses that will receive a carbon copy of the message without " -"appearing in the recipient list of the message." -msgstr "" -"Geef de adressen die een 'carbon copy' van het bericht moeten krijgen " -"zonder\n" -"dat ze op de geadresseerden-lijst van het bericht verschijnen." - -#: composer/e-msg-composer-hdrs.c:142 -msgid "Subject:" -msgstr "Onderwerp:" - -#: composer/e-msg-composer-hdrs.c:143 -msgid "Enter the subject of the mail" -msgstr "Geef het onderwerp van het bericht" - -#: composer/e-msg-composer.c:491 -msgid "Save in _folder..." -msgstr "Opslaan in _map..." - -#: composer/e-msg-composer.c:491 -msgid "Save the message in a specified folder" -msgstr "Sla het bericht op in een bepaalde map" - -#: composer/e-msg-composer.c:494 composer/e-msg-composer.c:531 -#: mail/folder-browser-factory.c:36 -msgid "Send" -msgstr "Versturen" - -#: composer/e-msg-composer.c:494 -msgid "Send the message" -msgstr "Verstuurt het bericht" - -#: composer/e-msg-composer.c:502 -msgid "View _attachments" -msgstr "Bekijk _attachments" - -#: composer/e-msg-composer.c:502 -msgid "View/hide attachments" -msgstr "Toon/verberg de attachments" - -#: composer/e-msg-composer.c:531 -msgid "Send this message" -msgstr "Dit bericht versturen" - -#: composer/e-msg-composer.c:533 -msgid "Cut selected region into the clipboard" -msgstr "Knip het geselecteerde gebied naar het klembord" - -#: composer/e-msg-composer.c:534 -msgid "Copy selected region into the clipboard" -msgstr "Kopieer het geselecteerde gebied naar het klembord" - -#: composer/e-msg-composer.c:535 -msgid "Paste selected region into the clipboard" -msgstr "Plak het geselecteerde gebied vanuit het klembord" - -#: composer/e-msg-composer.c:536 -msgid "Undo" -msgstr "Ongedaan maken" - -#: composer/e-msg-composer.c:536 -msgid "Undo last operation" -msgstr "Maak de laatste bewerking ongedaan" - -#: composer/e-msg-composer.c:538 -msgid "Attach" -msgstr "Bijvoegen" - -#: composer/e-msg-composer.c:538 -msgid "Attach a file" -msgstr "Voeg een bestand bij" - -#: mail/folder-browser-factory.c:35 -#, fuzzy -msgid "Get mail" -msgstr "Nieuwe mail" - -#: mail/folder-browser-factory.c:35 -msgid "Check for new mail" -msgstr "Controleer op nieuwe mail" - -#: mail/folder-browser-factory.c:36 -msgid "Send a new message" -msgstr "Stuur een bericht" - -#: mail/folder-browser-factory.c:37 -msgid "Find" -msgstr "Zoeken" - -#: mail/folder-browser-factory.c:37 -msgid "Find messages" -msgstr "Zoek naar berichten" - -#: mail/folder-browser-factory.c:41 -msgid "Reply" -msgstr "Beantwoorden" - -#: mail/folder-browser-factory.c:41 -msgid "Reply to the sender of this message" -msgstr "Beantwoord dit bericht" - -#: mail/folder-browser-factory.c:42 -msgid "Reply to All" -msgstr "Alle beantwoorden" - -#: mail/folder-browser-factory.c:42 -msgid "Reply to all recipients of this message" -msgstr "Stuur antwoord naar alle geadresseerden van dit bericht" - -#: mail/folder-browser-factory.c:44 -msgid "Forward" -msgstr "Doorsturen" - -#: mail/folder-browser-factory.c:44 -msgid "Forward this message" -msgstr "Dit bericht doorsturen" - -#: mail/folder-browser-factory.c:48 -msgid "Print" -msgstr "Afdrukken" - -#: mail/folder-browser-factory.c:48 -msgid "Print the selected message" -msgstr "Druk dit bericht af" - -#: mail/folder-browser-factory.c:50 -msgid "Delete this message" -msgstr "Verwijdert dit bericht" - -#: mail/folder-browser-factory.c:67 -msgid "_Expunge" -msgstr "" - -#: mail/folder-browser-factory.c:73 -msgid "_Filter Druid" -msgstr "" - -#: mail/folder-browser-factory.c:186 -msgid "We are sorry, Evolution's Folder Browser can not be initialized." -msgstr "Het spijt ons, Evolution's Map Bladeraar kon niet worden geladen." - -#: mail/folder-browser.c:208 -msgid "The URI that the Folder Browser will display" -msgstr "De URI die de Map Bladeraar weer zal geven" - -#: mail/folder-browser.c:211 -msgid "Whether a message preview should be shown" -msgstr "Of een voorbeeld-bericht getoond moet worden" - -#: mail/main.c:58 -msgid "Mail Component: I could not initialize Bonobo" -msgstr "Mail gedeelte: Ik kon Bonobo niet initializeren" - -#: mail/message-list.c:464 -msgid "Priority" -msgstr "Prioriteit" - -#: mail/message-list.c:478 -msgid "From" -msgstr "Van" - -#: mail/message-list.c:485 -msgid "Subject" -msgstr "Onderwerp" - -#: mail/message-list.c:492 -msgid "Sent" -msgstr "Verzonden" - -#: mail/message-list.c:499 -msgid "Receive" -msgstr "Ontvangen" - -#: mail/message-list.c:506 -msgid "To" -msgstr "Aan" - -#: mail/message-list.c:513 -msgid "Size" -msgstr "Grootte" - -#. you might have to call gnome_dialog_run() on the -#. * dialog returned here, I don't remember... -#. -#: shell/e-shell-view-menu.c:62 -msgid "Bug buddy was not found in your $PATH." -msgstr "" - -#. same as above -#: shell/e-shell-view-menu.c:68 -msgid "Bug buddy could not be run." -msgstr "" - -#: shell/e-shell-view-menu.c:111 -msgid "Evolution" -msgstr "" - -#: shell/e-shell-view-menu.c:113 -msgid "Copyright 1999, 2000 Helix Code, Inc." -msgstr "" - -#: shell/e-shell-view-menu.c:115 -msgid "" -"Evolution is a suite of groupware applications\n" -"for mail, calendaring, and contact management\n" -"within the GNOME desktop environment." -msgstr "" - -#: shell/e-shell-view-menu.c:185 shell/e-shell-view-menu.c:251 -msgid "_Folder" -msgstr "_Map" - -#: shell/e-shell-view-menu.c:189 -msgid "Evolution _Bar Shortcut" -msgstr "Evolution _Balk Snelkoppeling" - -#: shell/e-shell-view-menu.c:195 -msgid "_Mail message" -msgstr "_Mail bericht" - -#: shell/e-shell-view-menu.c:196 shell/e-shell-view-menu.c:199 -msgid "Composes a new mail message" -msgstr "Stelt een nieuw bericht op" - -#: shell/e-shell-view-menu.c:198 -msgid "_Appointment" -msgstr "_Afspraak" - -#: shell/e-shell-view-menu.c:201 -msgid "Meeting Re_quest" -msgstr "Verzoek tot _Vergadering" - -#: shell/e-shell-view-menu.c:204 -msgid "_Contact" -msgstr "_Contact" - -#: shell/e-shell-view-menu.c:207 -msgid "_Task" -msgstr "_Taak" - -#: shell/e-shell-view-menu.c:210 -msgid "Task _Request" -msgstr "Taak _Verzoek" - -#: shell/e-shell-view-menu.c:213 -msgid "_Journal Entry" -msgstr "_Dagboek Item" - -#: shell/e-shell-view-menu.c:216 -msgid "_Note" -msgstr "_Notitie" - -#: shell/e-shell-view-menu.c:226 -msgid "_Selected Items" -msgstr "_Geselecteerde Items" - -#: shell/e-shell-view-menu.c:234 -msgid "_New Folder" -msgstr "_Nieuwe Map" - -#: shell/e-shell-view-menu.c:242 -msgid "_New" -msgstr "_Nieuw" - -#: shell/e-shell-view-menu.c:243 -msgid "_Open" -msgstr "_Openen" - -#: shell/e-shell-view-menu.c:244 -msgid "Clos_e All Items" -msgstr "Alle Items _Sluiten" - -#: shell/e-shell-view-menu.c:244 -msgid "Closes all the open items" -msgstr "Sluit alle geopende items" - -#: shell/e-shell-view-menu.c:265 -#, fuzzy -msgid "Show _Shortcut Bar" -msgstr "Snelkoppelingenbalk Tonen/Verbergen" - -#: shell/e-shell-view-menu.c:266 -#, fuzzy -msgid "Shows the shortcut bar" -msgstr "Toont of verbergt de snelkoppelingenbalk" - -#: shell/e-shell-view-menu.c:268 -#, fuzzy -msgid "Show _Treeview" -msgstr "_Boomoverzicht Tonen/Verbergen" - -#: shell/e-shell-view-menu.c:269 -#, fuzzy -msgid "Shows the tree view" -msgstr "Toont of verbergt het boomoverzicht" - -#: shell/e-shell-view-menu.c:284 -msgid "_Submit bug" -msgstr "" - -#: shell/e-shell-view-menu.c:285 -msgid "Submit bug-report via bug-buddy" -msgstr "" - -#. FIXME: add Favorites here -#: shell/e-shell-view-menu.c:300 -msgid "_Tools" -msgstr "_Gereedschap" - -#: shell/e-shell-view-menu.c:301 -msgid "_Actions" -msgstr "_Acties" - -#: shell/e-shell.c:157 -#, c-format -msgid "Cannot set up local storage -- %s" -msgstr "" - -#: shell/main.c:100 -msgid "" -"Hi. Thanks for taking the time to download this preview release of\n" -"the Evolution groupware suite.\n" -"\n" -"The Evolution team has worked hard to make Evolution as robust,\n" -"extensible, pretty, fast and well-suited to heavy internet users as\n" -"possible. And we're very tired. But we're not done -- not yet.\n" -"\n" -"As you explore Evolution, please understand that most of our work has\n" -"been focused on the backend engine which drives the entire system and\n" -"not on the user interface. We are just cresting the hill now, though,\n" -"and will be pouring most of our love and attention into the UI from\n" -"here out. But at least you know that you're not using demoware.\n" -"\n" -"So, time for the nerdy disclaimer. Evolution will: crash, lose your\n" -"mail, leave stray processes running, consume 100% CPU, race, lock,\n" -"send HTML mail to random mailing lists, and embarass you in front of\n" -"your friends and co-workers. Use at your own risk.\n" -"\n" -"We hope that you enjoy the results of our hard work, and we eagerly\n" -"await your contributions!\n" -msgstr "" - -#: shell/main.c:129 -msgid "" -"Thanks\n" -"The Evolution Team\n" -msgstr "" - -#: shell/main.c:156 -msgid "Cannot initialize the Evolution shell." -msgstr "" - -#: shell/main.c:186 -#, fuzzy -msgid "Cannot initialize the Bonobo component system." -msgstr "Niet in geslaagd om het Bonobo componentensysteem te initializeren" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: widgets/e-table/e-table-config.glade.h:7 -#, fuzzy -msgid "Fields" -msgstr "Zoeken" - -#: widgets/e-table/e-table-config.glade.h:8 -msgid "Grouping" -msgstr "" - -#: widgets/e-table/e-table-config.glade.h:9 -msgid "Sort" -msgstr "" - -#: widgets/e-table/e-table-config.glade.h:10 -#, fuzzy -msgid "Filter" -msgstr "_Map" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: widgets/e-table/e-table-group.glade.h:7 -msgid "window1" -msgstr "" - -#: widgets/e-table/e-table-group.glade.h:8 -msgid "Available fields" -msgstr "" - -#: widgets/e-table/e-table-group.glade.h:9 -msgid "label1" -msgstr "" - -#: widgets/e-table/e-table-group.glade.h:10 -msgid "Show in this order" -msgstr "" - -#: widgets/e-table/e-table-group.glade.h:11 -msgid "label2" -msgstr "" - -#: widgets/e-table/e-table-group.glade.h:12 -msgid "Add >>" -msgstr "" - -#: widgets/e-table/e-table-group.glade.h:13 -#, fuzzy -msgid "<< Remove" -msgstr "Verwijderen" - -#~ msgid "" -#~ "This is a development version of Evolution.\n" -#~ "Using the mail component on your mail files\n" -#~ "is extremely hazardous.\n" -#~ "\n" -#~ "Do not run this program on your real mail\n" -#~ " and do not give it access to your real mail server.\n" -#~ "\n" -#~ "You have been warned\n" -#~ msgstr "" -#~ "Dit is een ontwikkel-versie van Evolution.\n" -#~ "Het gebruik van het email-gedeelte op uw mail bestanden\n" -#~ "is erg af te raden.\n" -#~ "\n" -#~ "Gebruik dit programma niet om uw echte email mee\n" -#~ "te lezen en geef het geen toegang tot uw echte mail server.\n" -#~ "\n" -#~ "U bent gewaarschuwd\n" - -#~ msgid "A folder containing mail items" -#~ msgstr "Een map die de mail items bevat" - -#~ msgid "A folder containing contacts" -#~ msgstr "Een map die de contacten bevat" - -#~ msgid "A folder containing calendar entries" -#~ msgstr "Een map die kalender entries bevat" - -#~ msgid "A folder containing tasks" -#~ msgstr "Een map die taken bevat" - -#~ msgid "Evolution can not create its local folders" -#~ msgstr "Evolution kan zijn lokale mappen niet maken" - -#~ msgid "A service containing mail items" -#~ msgstr "Een dienst die mail items bevat" - -#~ msgid "A service containing contacts" -#~ msgstr "Een dienst die contacten bevat" - -#~ msgid "A service containing calendar entries" -#~ msgstr "Een dienst die kalender entries bevat" - -#~ msgid "A service containing tasks" -#~ msgstr "Een dienst die taken bevat" - -#~ msgid "Large Icons" -#~ msgstr "Grote Iconen" - -#~ msgid "Small Icons" -#~ msgstr "Kleine Iconen" - -#~ msgid "Add New Group" -#~ msgstr "Nieuwe Groep Toevoegen" - -#~ msgid "Remove Group" -#~ msgstr "Groep Verwijderen" - -#~ msgid "Rename Group" -#~ msgstr "Naam Wijzigen Groep" - -#~ msgid "Add Shortcut" -#~ msgstr "Snelkoppeling Toevoegen" - -#~ msgid "Open Folder" -#~ msgstr "Map Openen" - -#~ msgid "Open in New Window" -#~ msgstr "Openen in Nieuw Venster" - -#~ msgid "Advanced Find" -#~ msgstr "Geavanceerd Zoeken" - -#~ msgid "Remove From Shortcut Bar" -#~ msgstr "Verwijderen van Snelkoppelingenbalk" - -#~ msgid "Rename Shortcut" -#~ msgstr "Naam Wijzigen Snelkoppeling" - -#~ msgid "Executive Summary" -#~ msgstr "Samenvatting" - -#~ msgid "Inbox" -#~ msgstr "Postvak In" - -#~ msgid "New mail messages" -#~ msgstr "Nieuwe email-berichten" - -#~ msgid "Sent messages" -#~ msgstr "Verzonden berichten" - -#~ msgid "Sent mail messages" -#~ msgstr "Verzonden email-berichten" - -#~ msgid "Drafts" -#~ msgstr "Klad" - -#~ msgid "Draft mail messages" -#~ msgstr "Klad mail berichten" - -#~ msgid "Calendar" -#~ msgstr "Kalender" - -#~ msgid "Your calendar" -#~ msgstr "Uw kalender" - -#~ msgid "Your contacts list" -#~ msgstr "Uw contactenlijst" - -#~ msgid "Tasks" -#~ msgstr "Taken" - -#~ msgid "Tasks list" -#~ msgstr "Taaklisjt" - -#~ msgid "Main Shortcuts" -#~ msgstr "Belangrijkste Snelkoppelingen" - -#~ msgid "Other Shortcuts" -#~ msgstr "Andere Snelkoppelingen" - -#~ msgid "New group" -#~ msgstr "Nieuwe groep" - -#~ msgid "Enables some debugging functions" -#~ msgstr "Zet wat debugging functies aan" - -#~ msgid "LEVEL" -#~ msgstr "LEVEL" - -#~ msgid "" -#~ "It was not possible to setup the Evolution startup files. Please\n" -#~ "fix the problem, and restart Evolution" -#~ msgstr "" -#~ "Het was niet mogelijk om de Evolution opstartbestanden de installeren.\n" -#~ "Repareer het probleem, en start Evolution overnieuw." diff --git a/po/no.po b/po/no.po deleted file mode 100644 index b7f9ebaf10..0000000000 --- a/po/no.po +++ /dev/null @@ -1,1027 +0,0 @@ -# Norwegian translation of evolution (bokmål dialect). -# Copyright (C) 2000 Free Software Foundation, Inc. -# Kjartan Maraas , 2000. -# -msgid "" -msgstr "" -"Project-Id-Version: evolution 0.1\n" -"POT-Creation-Date: 2000-05-27 20:01+0100\n" -"PO-Revision-Date: 2000-05-26 23:59+02:00\n" -"Last-Translator: Kjartan Maraas \n" -"Language-Team: Norwegian \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=iso-8859-1\n" -"Content-Transfer-Encoding: 8-bit\n" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/contact-editor/e-contact-editor-strings.h:7 -msgid "Contact Editor" -msgstr "Kontakteditor" - -#: addressbook/contact-editor/e-contact-editor-strings.h:8 -msgid "_Full Name..." -msgstr "_Fullt navn..." - -#: addressbook/contact-editor/e-contact-editor-strings.h:9 -msgid "Company:" -msgstr "Firma:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:10 -msgid "File As:" -msgstr "Lagre som:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:11 -msgid "Web page address:" -msgstr "Hjemmeside:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:12 -msgid "Wants to receive _HTML mail" -msgstr "Ønsker å motta _HTML e-post" - -#: addressbook/contact-editor/e-contact-editor-strings.h:13 -msgid "Address:" -msgstr "Adresse:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:14 -msgid "_Business" -msgstr "_Arbeid" - -#: addressbook/contact-editor/e-contact-editor-strings.h:15 -msgid "_Home" -msgstr "_Hjemme" - -#: addressbook/contact-editor/e-contact-editor-strings.h:16 -msgid "Business _Fax" -msgstr "_Faks på arbeid" - -#: addressbook/contact-editor/e-contact-editor-strings.h:17 -msgid "_Mobile" -msgstr "_Mobil" - -#: addressbook/contact-editor/e-contact-editor-strings.h:18 -msgid "Primary Email" -msgstr "Primær e-post" - -#: addressbook/contact-editor/e-contact-editor-strings.h:19 -msgid "Business" -msgstr "Jobb" - -#: addressbook/contact-editor/e-contact-editor-strings.h:20 -msgid "This is the _mailing address" -msgstr "Dette er _postadressen" - -#: addressbook/contact-editor/e-contact-editor-strings.h:21 -msgid "_Contacts..." -msgstr "_Kontakter..." - -#: addressbook/contact-editor/e-contact-editor-strings.h:22 -msgid "Ca_tegories..." -msgstr "Ka_tegorier..." - -#: addressbook/contact-editor/e-contact-editor-strings.h:23 -msgid "Job Title" -msgstr "Jobbtittel" - -#: addressbook/contact-editor/e-contact-editor-strings.h:24 -msgid "General" -msgstr "Generelt" - -#: addressbook/contact-editor/e-contact-editor-strings.h:25 -msgid "Department:" -msgstr "Avdeling:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:26 -msgid "Office:" -msgstr "Kontor:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:27 -msgid "Profession:" -msgstr "Yrke:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:28 -msgid "Nickname:" -msgstr "Kallenavn:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:29 -msgid "Spouse:" -msgstr "Ektefelle:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:30 -msgid "Birthday:" -msgstr "Fødselsdag:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:31 -msgid "Assistant's name:" -msgstr "Assistents navn:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:32 -msgid "Manager's Name:" -msgstr "Leders navn:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:33 -msgid "Anniversary:" -msgstr "Bryllupsdag:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:34 -msgid "Notes:" -msgstr "Notater:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:35 -msgid "Details" -msgstr "Detaljer" - -#: addressbook/contact-editor/e-contact-editor-strings.h:36 -#: addressbook/contact-editor/e-contact-editor-strings.h:41 -msgid "Add" -msgstr "Legg til" - -#: addressbook/contact-editor/e-contact-editor-strings.h:37 -#: mail/folder-browser-factory.c:50 -msgid "Delete" -msgstr "Slett" - -#: addressbook/contact-editor/e-contact-editor-strings.h:38 -msgid "Phone Types" -msgstr "Telefontyper" - -#: addressbook/contact-editor/e-contact-editor-strings.h:39 -#: addressbook/contact-editor/e-contact-editor-strings.h:40 -msgid "New phone type" -msgstr "Ny telefontype" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/contact-editor/fullname-strings.h:7 -msgid "Check Full Name" -msgstr "Sjekk fullt navn" - -#: addressbook/contact-editor/fullname-strings.h:8 -msgid "_Title:" -msgstr "_Tittel:" - -#: addressbook/contact-editor/fullname-strings.h:9 -msgid "_First:" -msgstr "_Første:" - -#: addressbook/contact-editor/fullname-strings.h:10 -msgid "_Middle:" -msgstr "_Mellom:" - -#: addressbook/contact-editor/fullname-strings.h:11 -msgid "_Last:" -msgstr "_Etter:" - -#: addressbook/contact-editor/fullname-strings.h:12 -msgid "_Suffix:" -msgstr "_Suffiks:" - -#: addressbook/contact-editor/fullname-strings.h:13 -msgid "" -"\n" -"Mr.\n" -"Mrs.\n" -"Dr.\n" -msgstr "" -"\n" -"Hr.\n" -"Fru.\n" -"Dr.\n" - -#: addressbook/contact-editor/fullname-strings.h:18 -msgid "" -"\n" -"Sr.\n" -"Jr.\n" -"I\n" -"II\n" -"III\n" -"Esq.\n" -msgstr "" -"\n" -"Sr.\n" -"Jr.\n" -"I\n" -"II\n" -"III\n" -"Esq.\n" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/gui/component/ldap-server-dialog.glade.h:7 -#: composer/e-msg-composer-attachment.glade.h:8 -msgid "Description:" -msgstr "Beskrivelse:" - -#: addressbook/gui/component/ldap-server-dialog.glade.h:8 -msgid "LDAP Server:" -msgstr "LDAP-tjener:" - -#: addressbook/gui/component/ldap-server-dialog.glade.h:9 -msgid "Port Number:" -msgstr "Portnummer:" - -#: addressbook/gui/component/ldap-server-dialog.glade.h:10 -msgid "Root DN:" -msgstr "Rot-DN:" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/printing/e-contact-print.glade.h:7 -msgid "Page Setup:" -msgstr "Sideoppsett:" - -#: addressbook/printing/e-contact-print.glade.h:8 -msgid "Style name:" -msgstr "Stilnavn:" - -#: addressbook/printing/e-contact-print.glade.h:9 -msgid "Preview:" -msgstr "Forhåndsvisning:" - -#: addressbook/printing/e-contact-print.glade.h:10 -msgid "Options" -msgstr "Alternativer" - -#: addressbook/printing/e-contact-print.glade.h:11 -msgid "Include:" -msgstr "Inkluder:" - -#: addressbook/printing/e-contact-print.glade.h:12 -msgid "Sections:" -msgstr "Seksjoner:" - -#: addressbook/printing/e-contact-print.glade.h:13 -msgid "Immediately follow each other" -msgstr "Rett etter hverandre" - -#: addressbook/printing/e-contact-print.glade.h:14 -msgid "Letter tabs on side" -msgstr "Bokstavfaner på siden" - -#: addressbook/printing/e-contact-print.glade.h:15 -msgid "Headings for each letter" -msgstr "Topptekst for hver bokstav" - -#: addressbook/printing/e-contact-print.glade.h:16 -msgid "Start on a new page" -msgstr "Send på en ny side" - -#: addressbook/printing/e-contact-print.glade.h:17 -msgid "Number of columns:" -msgstr "Antall kolonner:" - -#: addressbook/printing/e-contact-print.glade.h:18 -msgid "Blank forms at end:" -msgstr "Blanke skjema ved slutten:" - -#: addressbook/printing/e-contact-print.glade.h:19 -msgid "Fonts" -msgstr "Skrifttyper" - -#: addressbook/printing/e-contact-print.glade.h:20 -#: addressbook/printing/e-contact-print.glade.h:21 -#: addressbook/printing/e-contact-print.glade.h:51 -#: addressbook/printing/e-contact-print.glade.h:54 -msgid "Font..." -msgstr "Skrifttype..." - -#: addressbook/printing/e-contact-print.glade.h:22 -msgid "Headings" -msgstr "Topptekster" - -#: addressbook/printing/e-contact-print.glade.h:23 -msgid "10 pt. Tahoma" -msgstr "10 pt. Tahoma" - -#: addressbook/printing/e-contact-print.glade.h:24 -msgid "Body" -msgstr "Kropp" - -#: addressbook/printing/e-contact-print.glade.h:25 -msgid "8 pt. Tahoma" -msgstr "8 pt. Tahoma" - -#: addressbook/printing/e-contact-print.glade.h:26 -msgid "Shading" -msgstr "Skygger" - -#: addressbook/printing/e-contact-print.glade.h:27 -msgid "Print using gray shading" -msgstr "Skriv ut med grå skygge" - -#: addressbook/printing/e-contact-print.glade.h:28 -msgid "Format" -msgstr "Format" - -#: addressbook/printing/e-contact-print.glade.h:29 -#: addressbook/printing/e-contact-print.glade.h:50 -msgid "Paper" -msgstr "Papir" - -#: addressbook/printing/e-contact-print.glade.h:30 -msgid "Type:" -msgstr "Type:" - -#: addressbook/printing/e-contact-print.glade.h:31 -#: addressbook/printing/e-contact-print.glade.h:43 -msgid "label26" -msgstr "etikett26" - -#: addressbook/printing/e-contact-print.glade.h:32 -#: addressbook/printing/e-contact-print.glade.h:44 -msgid "Dimensions:" -msgstr "Størrelser:" - -#: addressbook/printing/e-contact-print.glade.h:33 -#: addressbook/printing/e-contact-print.glade.h:45 -msgid "Width:" -msgstr "Bredde:" - -#: addressbook/printing/e-contact-print.glade.h:34 -#: addressbook/printing/e-contact-print.glade.h:46 -msgid "Height:" -msgstr "Høyde:" - -#: addressbook/printing/e-contact-print.glade.h:35 -msgid "Paper source:" -msgstr "Papirkilde:" - -#: addressbook/printing/e-contact-print.glade.h:36 -msgid "Margins" -msgstr "Marger" - -#: addressbook/printing/e-contact-print.glade.h:37 -msgid "Top:" -msgstr "Topp:" - -#: addressbook/printing/e-contact-print.glade.h:38 -msgid "Bottom:" -msgstr "Bunn:" - -#: addressbook/printing/e-contact-print.glade.h:39 -msgid "Left:" -msgstr "Venstre:" - -#: addressbook/printing/e-contact-print.glade.h:40 -msgid "Right:" -msgstr "Høyre:" - -#: addressbook/printing/e-contact-print.glade.h:41 -msgid "Page" -msgstr "Side" - -#: addressbook/printing/e-contact-print.glade.h:42 -msgid "Size:" -msgstr "Størrelse:" - -#: addressbook/printing/e-contact-print.glade.h:47 -msgid "Orientation" -msgstr "Orientering" - -#: addressbook/printing/e-contact-print.glade.h:48 -msgid "Portrait" -msgstr "Portrett" - -#: addressbook/printing/e-contact-print.glade.h:49 -msgid "Landscape" -msgstr "Landskap" - -#: addressbook/printing/e-contact-print.glade.h:52 -msgid "Header" -msgstr "Topptekst" - -#: addressbook/printing/e-contact-print.glade.h:53 -msgid "Footer:" -msgstr "Bunntekst:" - -#: addressbook/printing/e-contact-print.glade.h:55 -msgid "Reverse on even pages" -msgstr "Motsatt på like sider" - -#: addressbook/printing/e-contact-print.glade.h:56 -msgid "Header/Footer" -msgstr "Topp-/bunntekst" - -#: composer/e-msg-composer-address-dialog.c:183 composer/e-msg-composer.c:533 -msgid "Cut" -msgstr "Klipp ut" - -#: composer/e-msg-composer-address-dialog.c:184 -msgid "Cut selected item into clipboard" -msgstr "Klipp ut valgt oppføring til utklippstavlen" - -#: composer/e-msg-composer-address-dialog.c:187 composer/e-msg-composer.c:534 -msgid "Copy" -msgstr "Kopiér" - -#: composer/e-msg-composer-address-dialog.c:188 -msgid "Copy selected item into clipboard" -msgstr "Kopiér valgt oppføring til utklippstavlen" - -#: composer/e-msg-composer-address-dialog.c:191 -#: composer/e-msg-composer-address-dialog.c:199 composer/e-msg-composer.c:535 -msgid "Paste" -msgstr "Lim inn" - -#: composer/e-msg-composer-address-dialog.c:192 -#: composer/e-msg-composer-address-dialog.c:200 -msgid "Paste item from clipboard" -msgstr "Lim inn fra utklippstavlen" - -#: composer/e-msg-composer-address-dialog.c:528 -msgid "Select recipients' addresses" -msgstr "Velg mottakerenes adresser" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: composer/e-msg-composer-address-dialog.glade.h:7 -msgid "Recipient list:" -msgstr "Mottakerliste:" - -#: composer/e-msg-composer-address-dialog.glade.h:8 -msgid "Name:" -msgstr "Navn:" - -#: composer/e-msg-composer-address-dialog.glade.h:9 -msgid "Search..." -msgstr "Søk..." - -#: composer/e-msg-composer-address-dialog.glade.h:10 -msgid "Name" -msgstr "Navn" - -#: composer/e-msg-composer-address-dialog.glade.h:11 -msgid "Address" -msgstr "Adresse" - -#: composer/e-msg-composer-address-dialog.glade.h:12 -msgid "Properties..." -msgstr "Egenskaper..." - -#: composer/e-msg-composer-address-dialog.glade.h:13 -msgid "Add..." -msgstr "Legg til..." - -#: composer/e-msg-composer-address-dialog.glade.h:14 -msgid "To: >>" -msgstr "Til: >>" - -#: composer/e-msg-composer-address-dialog.glade.h:15 -msgid "Cc: >>" -msgstr "Cc: >>" - -#: composer/e-msg-composer-address-dialog.glade.h:16 -msgid "Bcc: >>" -msgstr "Bcc: >>" - -#: composer/e-msg-composer-address-dialog.glade.h:17 -msgid "label9" -msgstr "etikett9" - -#: composer/e-msg-composer-address-dialog.glade.h:18 -msgid "label7" -msgstr "etikett7" - -#: composer/e-msg-composer-address-dialog.glade.h:19 -msgid "label8" -msgstr "etikett8" - -#: composer/e-msg-composer-attachment-bar.c:76 -msgid "1 byte" -msgstr "1 byte" - -#: composer/e-msg-composer-attachment-bar.c:78 -#, c-format -msgid "%u bytes" -msgstr "%u bytes" - -#: composer/e-msg-composer-attachment-bar.c:85 -#, c-format -msgid "%.1fK" -msgstr "%.1fK" - -#: composer/e-msg-composer-attachment-bar.c:89 -#, c-format -msgid "%.1fM" -msgstr "%.1fM" - -#: composer/e-msg-composer-attachment-bar.c:93 -#, c-format -msgid "%.1fG" -msgstr "%.1fG" - -#: composer/e-msg-composer-attachment-bar.c:307 -msgid "Add attachment" -msgstr "Legg til vedlegg" - -#: composer/e-msg-composer-attachment-bar.c:364 -msgid "Remove" -msgstr "Fjern" - -#: composer/e-msg-composer-attachment-bar.c:365 -msgid "Remove selected items from the attachment list" -msgstr "Fjern valgte oppføringer fra vedleggslisten" - -#: composer/e-msg-composer-attachment-bar.c:396 -msgid "Add attachment..." -msgstr "Legg til vedlegg..." - -#: composer/e-msg-composer-attachment-bar.c:397 -msgid "Attach a file to the message" -msgstr "Legg en fil ved meldingen" - -#: composer/e-msg-composer-attachment.c:259 -msgid "Select attachment" -msgstr "Velg vedlegg" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: composer/e-msg-composer-attachment.glade.h:7 -msgid "Attachment properties" -msgstr "Egenskaper for vedlegg" - -#: composer/e-msg-composer-attachment.glade.h:9 -msgid "MIME type:" -msgstr "MIME-type:" - -#: composer/e-msg-composer-attachment.glade.h:10 -msgid "File name:" -msgstr "Filnavn:" - -#: composer/e-msg-composer-attachment.glade.h:11 -msgid "Browse..." -msgstr "Bla gjennom..." - -#: composer/e-msg-composer-hdrs.c:89 -msgid "Click here for the address book" -msgstr "Klikk her for å få opp adresseboken" - -#: composer/e-msg-composer-hdrs.c:124 -msgid "To:" -msgstr "Til:" - -#: composer/e-msg-composer-hdrs.c:125 -msgid "Enter the recipients of the message" -msgstr "Skriv inn mottakerene for meldingen" - -#: composer/e-msg-composer-hdrs.c:129 -msgid "Cc:" -msgstr "Cc:" - -#: composer/e-msg-composer-hdrs.c:130 -msgid "Enter the addresses that will receive a carbon copy of the message" -msgstr "Skriv inn adressene som skal motta en kopi av meldingen" - -#: composer/e-msg-composer-hdrs.c:135 -msgid "Bcc:" -msgstr "Bcc:" - -#: composer/e-msg-composer-hdrs.c:136 -msgid "" -"Enter the addresses that will receive a carbon copy of the message without " -"appearing in the recipient list of the message." -msgstr "" -"Skriv inn adressene som skal motta en kopi av meldingen uten å komme til " -"syne i mottakerlisten for meldingen." - -#: composer/e-msg-composer-hdrs.c:142 -msgid "Subject:" -msgstr "Emne:" - -#: composer/e-msg-composer-hdrs.c:143 -msgid "Enter the subject of the mail" -msgstr "Skriv inn emnet for meldingen" - -#: composer/e-msg-composer.c:491 -msgid "Save in _folder..." -msgstr "Lagre i _mappe..." - -#: composer/e-msg-composer.c:491 -msgid "Save the message in a specified folder" -msgstr "Lagre meldingen i en spesifisert mappe" - -#: composer/e-msg-composer.c:494 composer/e-msg-composer.c:531 -#: mail/folder-browser-factory.c:36 -msgid "Send" -msgstr "Send" - -#: composer/e-msg-composer.c:494 -msgid "Send the message" -msgstr "Send meldingen" - -#: composer/e-msg-composer.c:502 -msgid "View _attachments" -msgstr "Vis _vedlegg" - -#: composer/e-msg-composer.c:502 -msgid "View/hide attachments" -msgstr "Vis/skjul vedlegg" - -#: composer/e-msg-composer.c:531 -msgid "Send this message" -msgstr "Send denne meldingen" - -#: composer/e-msg-composer.c:533 -msgid "Cut selected region into the clipboard" -msgstr "Klipp ut valgt område til utklippstavlen" - -#: composer/e-msg-composer.c:534 -msgid "Copy selected region into the clipboard" -msgstr "Kopiér valgt område til utklippstavlen" - -#: composer/e-msg-composer.c:535 -msgid "Paste selected region into the clipboard" -msgstr "Lim inn valgt område til utklippstavlen" - -#: composer/e-msg-composer.c:536 -msgid "Undo" -msgstr "Angre" - -#: composer/e-msg-composer.c:536 -msgid "Undo last operation" -msgstr "Angre siste operasjon" - -#: composer/e-msg-composer.c:538 -msgid "Attach" -msgstr "Legg ved" - -#: composer/e-msg-composer.c:538 -msgid "Attach a file" -msgstr "Legg ved en fil" - -#: mail/folder-browser-factory.c:35 -msgid "Get mail" -msgstr "Hent e-post" - -#: mail/folder-browser-factory.c:35 -msgid "Check for new mail" -msgstr "Sjekk etter ny e-post" - -#: mail/folder-browser-factory.c:36 -msgid "Send a new message" -msgstr "Send en ny melding" - -#: mail/folder-browser-factory.c:37 -msgid "Find" -msgstr "Finn" - -#: mail/folder-browser-factory.c:37 -msgid "Find messages" -msgstr "Finn meldinger" - -#: mail/folder-browser-factory.c:41 -msgid "Reply" -msgstr "Svar" - -#: mail/folder-browser-factory.c:41 -msgid "Reply to the sender of this message" -msgstr "Svar til avsender av denne meldingen" - -#: mail/folder-browser-factory.c:42 -msgid "Reply to All" -msgstr "Svar til alle" - -#: mail/folder-browser-factory.c:42 -msgid "Reply to all recipients of this message" -msgstr "Svar til alle mottakere av denne meldingen" - -#: mail/folder-browser-factory.c:44 -msgid "Forward" -msgstr "Videresend" - -#: mail/folder-browser-factory.c:44 -msgid "Forward this message" -msgstr "Videresend denne meldingen" - -#: mail/folder-browser-factory.c:48 -msgid "Print" -msgstr "Skriv ut" - -#: mail/folder-browser-factory.c:48 -msgid "Print the selected message" -msgstr "Skriv ut den valgte meldingen" - -#: mail/folder-browser-factory.c:50 -msgid "Delete this message" -msgstr "Slett denne meldingen" - -#: mail/folder-browser-factory.c:67 -msgid "_Expunge" -msgstr "_Fjern" - -#: mail/folder-browser-factory.c:73 -msgid "_Filter Druid" -msgstr "_Filter-druide" - -#: mail/folder-browser-factory.c:186 -msgid "We are sorry, Evolution's Folder Browser can not be initialized." -msgstr "Vi beklager, Evolution's mappeutforsker kan ikke initialiseres." - -#: mail/folder-browser.c:208 -msgid "The URI that the Folder Browser will display" -msgstr "URIen som mappeutforskeren vil vise" - -#: mail/folder-browser.c:211 -msgid "Whether a message preview should be shown" -msgstr "Om forhåndsvisning av meldinger skal brukes" - -#: mail/main.c:58 -msgid "Mail Component: I could not initialize Bonobo" -msgstr "E-post komponent: Kunne ikke initialisere Bonobo" - -#: mail/message-list.c:464 -msgid "Priority" -msgstr "Prioritet" - -#: mail/message-list.c:478 -msgid "From" -msgstr "Fra" - -#: mail/message-list.c:485 -msgid "Subject" -msgstr "Emne" - -#: mail/message-list.c:492 -msgid "Sent" -msgstr "Sendt" - -#: mail/message-list.c:499 -msgid "Receive" -msgstr "Motta" - -#: mail/message-list.c:506 -msgid "To" -msgstr "Til" - -#: mail/message-list.c:513 -msgid "Size" -msgstr "Størrelse" - -#. you might have to call gnome_dialog_run() on the -#. * dialog returned here, I don't remember... -#. -#: shell/e-shell-view-menu.c:62 -msgid "Bug buddy was not found in your $PATH." -msgstr "Bug buddy ble ikke funnet i din $PATH." - -#. same as above -#: shell/e-shell-view-menu.c:68 -msgid "Bug buddy could not be run." -msgstr "Bug buddy kunne ikke kjøres." - -#: shell/e-shell-view-menu.c:111 -msgid "Evolution" -msgstr "Evolution" - -#: shell/e-shell-view-menu.c:113 -msgid "Copyright 1999, 2000 Helix Code, Inc." -msgstr "Copyright 1999, 2000 Helix Code, Inc." - -#: shell/e-shell-view-menu.c:115 -msgid "" -"Evolution is a suite of groupware applications\n" -"for mail, calendaring, and contact management\n" -"within the GNOME desktop environment." -msgstr "" -"Evolution er en suite av gruppevareapplikasjoner\n" -"for e-post, kalender og kontaktdatabaser for\n" -"GNOME skrivebordsmiljøet." - -#: shell/e-shell-view-menu.c:185 shell/e-shell-view-menu.c:251 -msgid "_Folder" -msgstr "_Mappe" - -#: shell/e-shell-view-menu.c:189 -msgid "Evolution _Bar Shortcut" -msgstr "Evolution s_narveilinje" - -#: shell/e-shell-view-menu.c:195 -msgid "_Mail message" -msgstr "E-post _melding" - -#: shell/e-shell-view-menu.c:196 shell/e-shell-view-menu.c:199 -msgid "Composes a new mail message" -msgstr "Lager en ny e-post melding" - -#: shell/e-shell-view-menu.c:198 -msgid "_Appointment" -msgstr "_Avtale" - -#: shell/e-shell-view-menu.c:201 -msgid "Meeting Re_quest" -msgstr "Møteforesp_ørsel" - -#: shell/e-shell-view-menu.c:204 -msgid "_Contact" -msgstr "_Kontakt" - -#: shell/e-shell-view-menu.c:207 -msgid "_Task" -msgstr "_Oppgave" - -#: shell/e-shell-view-menu.c:210 -msgid "Task _Request" -msgstr "Oppgavefo_respørsel" - -#: shell/e-shell-view-menu.c:213 -msgid "_Journal Entry" -msgstr "_Journaloppføring" - -#: shell/e-shell-view-menu.c:216 -msgid "_Note" -msgstr "_Notat" - -#: shell/e-shell-view-menu.c:226 -msgid "_Selected Items" -msgstr "_Valgte oppføringer" - -#: shell/e-shell-view-menu.c:234 -msgid "_New Folder" -msgstr "_Ny mappe" - -#: shell/e-shell-view-menu.c:242 -msgid "_New" -msgstr "_Ny" - -#: shell/e-shell-view-menu.c:243 -msgid "_Open" -msgstr "_Åpne" - -#: shell/e-shell-view-menu.c:244 -msgid "Clos_e All Items" -msgstr "Lukk all_e oppføringer" - -#: shell/e-shell-view-menu.c:244 -msgid "Closes all the open items" -msgstr "Lukker alle åpne oppføringer" - -#: shell/e-shell-view-menu.c:265 -msgid "Show _Shortcut Bar" -msgstr "Vis _snarveilinje" - -#: shell/e-shell-view-menu.c:266 -msgid "Shows the shortcut bar" -msgstr "Viser snarveilinjen" - -#: shell/e-shell-view-menu.c:268 -msgid "Show _Treeview" -msgstr "Vis _trevisning" - -#: shell/e-shell-view-menu.c:269 -msgid "Shows the tree view" -msgstr "Viser trevisning" - -#: shell/e-shell-view-menu.c:284 -msgid "_Submit bug" -msgstr "_Send feilrapport" - -#: shell/e-shell-view-menu.c:285 -msgid "Submit bug-report via bug-buddy" -msgstr "Send feilrapport med bug-buddy" - -#. FIXME: add Favorites here -#: shell/e-shell-view-menu.c:300 -msgid "_Tools" -msgstr "_Verktøy" - -#: shell/e-shell-view-menu.c:301 -msgid "_Actions" -msgstr "H_andlinger" - -#: shell/e-shell.c:157 -#, c-format -msgid "Cannot set up local storage -- %s" -msgstr "Kan ikke sette opp lokal lagring -- %s" - -#: shell/main.c:100 -msgid "" -"Hi. Thanks for taking the time to download this preview release of\n" -"the Evolution groupware suite.\n" -"\n" -"The Evolution team has worked hard to make Evolution as robust,\n" -"extensible, pretty, fast and well-suited to heavy internet users as\n" -"possible. And we're very tired. But we're not done -- not yet.\n" -"\n" -"As you explore Evolution, please understand that most of our work has\n" -"been focused on the backend engine which drives the entire system and\n" -"not on the user interface. We are just cresting the hill now, though,\n" -"and will be pouring most of our love and attention into the UI from\n" -"here out. But at least you know that you're not using demoware.\n" -"\n" -"So, time for the nerdy disclaimer. Evolution will: crash, lose your\n" -"mail, leave stray processes running, consume 100% CPU, race, lock,\n" -"send HTML mail to random mailing lists, and embarass you in front of\n" -"your friends and co-workers. Use at your own risk.\n" -"\n" -"We hope that you enjoy the results of our hard work, and we eagerly\n" -"await your contributions!\n" -msgstr "" -"Hei. Takk for at du har tatt deg tid til å laste ned denne prøveversjonen\n" -"av Evolution gruppevare-suiten.\n" -"\n" -"Evolution utviklerene har arbeidet hardt for å gjøre Evolution så\n" -"robust, utvidbart, pent, raskt og passende for tunge internettbrukere\n" -"som overhodet mulig. Og vi er utslitt. Men vi er ikke ferdig -- ikke ennå.\n" -"\n" -"Ettersom du utforsker Evolution, vennligst prøv å forstå at det meste av\n" -"arbeidet har vært fokusert på fundamentet som ligger under hele systemet\n" -"og ikke på brukergrensesnittet. Vi er i ferd med å bestige denne høyden \n" -"nå, og vil bruke det meste av vår tid og kjærlighet på brukergrensesnittet\n" -"fra nå av. Men du vil i det minste ikke måtte bruke en ren demoversjon.\n" -"\n" -"Så, nå det det dags for den nerdete meldingen: Evolution vil: krasje,\n" -"ødelegge din mail, etterlate seg tapte prosesser, oppta 100% av din CPU,\n" -"låse seg, sende HTML e-post til tilfeldige e-post lister, og drite deg ut\n" -"foran dine venner og kolleger. Bruk det på egen risiko.\n" -"\n" -"Vi håper at du nyter resultatene av vårt harde arbeid, og vi venter i\n" -"spenning på at du tilbyr din hjelp!\n" - -#: shell/main.c:129 -msgid "" -"Thanks\n" -"The Evolution Team\n" -msgstr "" -"Takk\n" -"Evolution utviklerene\n" - -#: shell/main.c:156 -msgid "Cannot initialize the Evolution shell." -msgstr "Kan ikke initialisere Evolution skallet." - -#: shell/main.c:186 -msgid "Cannot initialize the Bonobo component system." -msgstr "Kunne ikke initialisere Bonobo komponentsystemet." - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: widgets/e-table/e-table-config.glade.h:7 -msgid "Fields" -msgstr "Felter" - -#: widgets/e-table/e-table-config.glade.h:8 -msgid "Grouping" -msgstr "Gruppering" - -#: widgets/e-table/e-table-config.glade.h:9 -msgid "Sort" -msgstr "Sorter" - -#: widgets/e-table/e-table-config.glade.h:10 -msgid "Filter" -msgstr "Filter" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: widgets/e-table/e-table-group.glade.h:7 -msgid "window1" -msgstr "vindu1" - -#: widgets/e-table/e-table-group.glade.h:8 -msgid "Available fields" -msgstr "Tilgjengelige felter" - -#: widgets/e-table/e-table-group.glade.h:9 -msgid "label1" -msgstr "etikett1" - -#: widgets/e-table/e-table-group.glade.h:10 -msgid "Show in this order" -msgstr "Vis i denne rekkefølge" - -#: widgets/e-table/e-table-group.glade.h:11 -msgid "label2" -msgstr "etikett2" - -#: widgets/e-table/e-table-group.glade.h:12 -msgid "Add >>" -msgstr "Legg til >>" - -#: widgets/e-table/e-table-group.glade.h:13 -msgid "<< Remove" -msgstr "<< Fjern" diff --git a/po/ru.po b/po/ru.po deleted file mode 100644 index 89b0f01f28..0000000000 --- a/po/ru.po +++ /dev/null @@ -1,1032 +0,0 @@ -# Copyright (C) 2000 Free Software Foundation, Inc. -# Valek Filippov , 2000. -# -msgid "" -msgstr "" -"Project-Id-Version: E-volution\n" -"POT-Creation-Date: 2000-05-28 21:25+0000\n" -"PO-Revision-Date: 2000-05-28 21:27+00:00\n" -"Last-Translator: Valek Filippov \n" -"Language-Team: Russian \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=koi8-r\n" -"Content-Transfer-Encoding: 8-bit\n" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/contact-editor/e-contact-editor-strings.h:7 -msgid "Contact Editor" -msgstr "òÅÄÁËÔÏÒ ËÏÎÔÁËÔÏ×" - -#: addressbook/contact-editor/e-contact-editor-strings.h:8 -msgid "_Full Name..." -msgstr "ðÏÌÎÏÅ ÉÍÑ..." - -#: addressbook/contact-editor/e-contact-editor-strings.h:9 -msgid "Company:" -msgstr "ëÏÍÐÁÎÉÑ:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:10 -msgid "File As:" -msgstr "óÏÈÒÁÎÉÔØ ËÁË:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:11 -msgid "Web page address:" -msgstr "áÄÒÅÓ Web-ÓÔÒÁÎÉÃÙ:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:12 -msgid "Wants to receive _HTML mail" -msgstr "ðÒÉÎÉÍÁÅÔ HTML-ÐÏÞÔÕ" - -#: addressbook/contact-editor/e-contact-editor-strings.h:13 -msgid "Address:" -msgstr "áÄÒÅÓ:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:14 -msgid "_Business" -msgstr "òÁÂÏÞÉÊ" - -#: addressbook/contact-editor/e-contact-editor-strings.h:15 -msgid "_Home" -msgstr "äÏÍÁÛÎÉÊ" - -#: addressbook/contact-editor/e-contact-editor-strings.h:16 -msgid "Business _Fax" -msgstr "òÁÂÏÞÉÊ ÆÁËÓ" - -#: addressbook/contact-editor/e-contact-editor-strings.h:17 -msgid "_Mobile" -msgstr "íÏÂÉÌØÎÙÊ" - -#: addressbook/contact-editor/e-contact-editor-strings.h:18 -msgid "Primary Email" -msgstr "ðÅÒ×ÙÊ ÜÌ.ÁÄÒÅÓ" - -#: addressbook/contact-editor/e-contact-editor-strings.h:19 -msgid "Business" -msgstr "òÁÂÏÞÉÊ" - -#: addressbook/contact-editor/e-contact-editor-strings.h:20 -msgid "This is the _mailing address" -msgstr "üÔÏ ÁÄÒÅÓ ÜÌÅËÔÒÏÎÎÏÊ ÐÏÞÔÙ" - -#: addressbook/contact-editor/e-contact-editor-strings.h:21 -msgid "_Contacts..." -msgstr "ëÏÎÔÁËÔÙ..." - -#: addressbook/contact-editor/e-contact-editor-strings.h:22 -msgid "Ca_tegories..." -msgstr "ëÁÔÅÇÏÒÉÉ..." - -#: addressbook/contact-editor/e-contact-editor-strings.h:23 -msgid "Job Title" -msgstr "äÏÌÖÎÏÓÔØ" - -#: addressbook/contact-editor/e-contact-editor-strings.h:24 -msgid "General" -msgstr "ïÂÝÅÅ" - -#: addressbook/contact-editor/e-contact-editor-strings.h:25 -msgid "Department:" -msgstr "ïÔÄÅÌ:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:26 -msgid "Office:" -msgstr "ïÆÉÓ:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:27 -msgid "Profession:" -msgstr "ðÒÏÆÅÓÓÉÑ:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:28 -msgid "Nickname:" -msgstr "ðÓÅ×ÄÏÎÉÍ:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:29 -msgid "Spouse:" -msgstr "óÕÐÒÕÇ(Á):" - -#: addressbook/contact-editor/e-contact-editor-strings.h:30 -msgid "Birthday:" -msgstr "äÅÎØ ÒÏÖÄÅÎØÑ:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:31 -msgid "Assistant's name:" -msgstr "éÍÑ ÐÏÍÏÝÎÉËÁ:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:32 -msgid "Manager's Name:" -msgstr "éÍÑ ÍÅÎÅÄÖÅÒÁ:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:33 -msgid "Anniversary:" -msgstr "çÏÄÏ×ÝÉÎÁ:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:34 -msgid "Notes:" -msgstr "úÁÍÅÔËÉ:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:35 -msgid "Details" -msgstr "äÅÔÁÌÉ" - -#: addressbook/contact-editor/e-contact-editor-strings.h:36 -#: addressbook/contact-editor/e-contact-editor-strings.h:41 -msgid "Add" -msgstr "äÏÂÁ×ÉÔØ" - -#: addressbook/contact-editor/e-contact-editor-strings.h:37 -#: mail/folder-browser-factory.c:50 -msgid "Delete" -msgstr "õÄÁÌÉÔØ" - -#: addressbook/contact-editor/e-contact-editor-strings.h:38 -msgid "Phone Types" -msgstr "ôÉÐ ÔÅÌÅÆÏÎÁ" - -#: addressbook/contact-editor/e-contact-editor-strings.h:39 -#: addressbook/contact-editor/e-contact-editor-strings.h:40 -msgid "New phone type" -msgstr "îÏ×ÙÊ ÔÉÐ ÔÅÌÅÆÏÎÁ" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/contact-editor/fullname-strings.h:7 -msgid "Check Full Name" -msgstr "ðÒÏ×ÅÒÑÔØ ÐÏÌÎÏÅ ÉÍÑ" - -#: addressbook/contact-editor/fullname-strings.h:8 -msgid "_Title:" -msgstr "úÁÇÏÌÏ×ÏË:" - -#: addressbook/contact-editor/fullname-strings.h:9 -msgid "_First:" -msgstr "éÍÑ:" - -#: addressbook/contact-editor/fullname-strings.h:10 -msgid "_Middle:" -msgstr "ïÔÞÅÓÔ×Ï:" - -#: addressbook/contact-editor/fullname-strings.h:11 -msgid "_Last:" -msgstr "æÁÍÉÌÉÑ:" - -#: addressbook/contact-editor/fullname-strings.h:12 -msgid "_Suffix:" -msgstr "óÕÆÆÉËÓ:" - -#: addressbook/contact-editor/fullname-strings.h:13 -msgid "" -"\n" -"Mr.\n" -"Mrs.\n" -"Dr.\n" -msgstr "" -"\n" -"Mr.\n" -"Mrs.\n" -"Dr.\n" - -#: addressbook/contact-editor/fullname-strings.h:18 -msgid "" -"\n" -"Sr.\n" -"Jr.\n" -"I\n" -"II\n" -"III\n" -"Esq.\n" -msgstr "" -"\n" -"Sr.\n" -"Jr.\n" -"I\n" -"II\n" -"III\n" -"Esq.\n" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/gui/component/ldap-server-dialog.glade.h:7 -#: composer/e-msg-composer-attachment.glade.h:8 -msgid "Description:" -msgstr "õòï÷åîø" - -#: addressbook/gui/component/ldap-server-dialog.glade.h:8 -msgid "LDAP Server:" -msgstr "LDAP ÓÅÒ×ÅÒ:" - -#: addressbook/gui/component/ldap-server-dialog.glade.h:9 -msgid "Port Number:" -msgstr "îÏÍÅÒ ÐÏÒÔÁ:" - -#: addressbook/gui/component/ldap-server-dialog.glade.h:10 -msgid "Root DN:" -msgstr "îÏÍÅÒ ËÏÒÎÅ×ÏÇÏ ÕÓÔÒÏÊÓÔ×Á:" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/printing/e-contact-print.glade.h:7 -msgid "Page Setup:" -msgstr "îÁÓÔÒÏÊËÁ ÓÔÒÁÎÉÃÙ:" - -#: addressbook/printing/e-contact-print.glade.h:8 -msgid "Style name:" -msgstr "îÁÚ×ÁÎÉÅ ÓÔÉÌÑ:" - -#: addressbook/printing/e-contact-print.glade.h:9 -msgid "Preview:" -msgstr "ðÒÏÓÍÏÔÒ:" - -#: addressbook/printing/e-contact-print.glade.h:10 -msgid "Options" -msgstr "äÅÊÓÔ×ÉÑ" - -#: addressbook/printing/e-contact-print.glade.h:11 -msgid "Include:" -msgstr "÷ËÌÀÞÉÔØ:" - -#: addressbook/printing/e-contact-print.glade.h:12 -msgid "Sections:" -msgstr "òÁÚÄÅÌÙ:" - -#: addressbook/printing/e-contact-print.glade.h:13 -msgid "Immediately follow each other" -msgstr "îÅÍÅÄÌÅÎÎÏ ÓÌÅÄÕÀÝÉÅ ÏÄÉÎ ÚÁ ÄÒÕÇÉÍ" - -#: addressbook/printing/e-contact-print.glade.h:14 -msgid "Letter tabs on side" -msgstr "ñÒÌÙËÉ ÐÉÓÅÍ ÓÂÏËÕ" - -#: addressbook/printing/e-contact-print.glade.h:15 -msgid "Headings for each letter" -msgstr "úÁÇÏÌÏ×ËÉ ÄÌÑ ËÁÖÄÏÇÏ ÐÉÓØÍÁ" - -#: addressbook/printing/e-contact-print.glade.h:16 -msgid "Start on a new page" -msgstr "îÁÞÉÎÁÔØ ÎÁ ÎÏ×ÏÊ ÓÔÒÁÎÉÃÅ" - -#: addressbook/printing/e-contact-print.glade.h:17 -msgid "Number of columns:" -msgstr "þÉÓÌÏ ÓÔÏÌÂÃÏ×:" - -#: addressbook/printing/e-contact-print.glade.h:18 -msgid "Blank forms at end:" -msgstr "ðÕÓÔÁÑ ÆÏÒÍÁ × ËÏÎÃÅ:" - -#: addressbook/printing/e-contact-print.glade.h:19 -msgid "Fonts" -msgstr "ûÒÉÆÔÙ" - -#: addressbook/printing/e-contact-print.glade.h:20 -#: addressbook/printing/e-contact-print.glade.h:21 -#: addressbook/printing/e-contact-print.glade.h:51 -#: addressbook/printing/e-contact-print.glade.h:54 -msgid "Font..." -msgstr "ûÒÉÆÔ..." - -#: addressbook/printing/e-contact-print.glade.h:22 -msgid "Headings" -msgstr "úÁÇÏÌÏ×ËÉ" - -#: addressbook/printing/e-contact-print.glade.h:23 -msgid "10 pt. Tahoma" -msgstr "10 ÐÔ. Tahoma" - -#: addressbook/printing/e-contact-print.glade.h:24 -msgid "Body" -msgstr "ôÅÌÏ" - -#: addressbook/printing/e-contact-print.glade.h:25 -msgid "8 pt. Tahoma" -msgstr "8 ÐÔ. Tahoma" - -#: addressbook/printing/e-contact-print.glade.h:26 -msgid "Shading" -msgstr "ôÏÎÉÒÏ×ÁÎÉÅ" - -#: addressbook/printing/e-contact-print.glade.h:27 -msgid "Print using gray shading" -msgstr "ðÅÞÁÔØ Ó ÉÓÐÏÌØÚÏ×ÁÎÉÅÍ ÓÅÒÏÇÏ ÔÏÎÉÒÏ×ÁÎÉÑ" - -#: addressbook/printing/e-contact-print.glade.h:28 -msgid "Format" -msgstr "æÏÒÍÁÔ" - -#: addressbook/printing/e-contact-print.glade.h:29 -#: addressbook/printing/e-contact-print.glade.h:50 -msgid "Paper" -msgstr "âÕÍÁÇÁ" - -#: addressbook/printing/e-contact-print.glade.h:30 -msgid "Type:" -msgstr "ôÉÐ:" - -#: addressbook/printing/e-contact-print.glade.h:31 -#: addressbook/printing/e-contact-print.glade.h:43 -msgid "label26" -msgstr "label26" - -#: addressbook/printing/e-contact-print.glade.h:32 -#: addressbook/printing/e-contact-print.glade.h:44 -msgid "Dimensions:" -msgstr "òÁÚÍÅÒÙ:" - -#: addressbook/printing/e-contact-print.glade.h:33 -#: addressbook/printing/e-contact-print.glade.h:45 -msgid "Width:" -msgstr "ûÉÒÉÎÁ:" - -#: addressbook/printing/e-contact-print.glade.h:34 -#: addressbook/printing/e-contact-print.glade.h:46 -msgid "Height:" -msgstr "÷ÙÓÏÔÁ:" - -#: addressbook/printing/e-contact-print.glade.h:35 -msgid "Paper source:" -msgstr "éÓÔÏÞÎÉË ÂÕÍÁÇÉ:" - -#: addressbook/printing/e-contact-print.glade.h:36 -msgid "Margins" -msgstr "ïÔÓÔÕÐÙ:" - -#: addressbook/printing/e-contact-print.glade.h:37 -msgid "Top:" -msgstr "ó×ÅÒÈÕ:" - -#: addressbook/printing/e-contact-print.glade.h:38 -msgid "Bottom:" -msgstr "óÎÉÚÕ:" - -#: addressbook/printing/e-contact-print.glade.h:39 -msgid "Left:" -msgstr "óÌÅ×Á:" - -#: addressbook/printing/e-contact-print.glade.h:40 -msgid "Right:" -msgstr "óÐÒÁ×Á:" - -#: addressbook/printing/e-contact-print.glade.h:41 -msgid "Page" -msgstr "óÔÒÁÎÉÃÁ" - -#: addressbook/printing/e-contact-print.glade.h:42 -msgid "Size:" -msgstr "òÁÚÍÅÒ:" - -#: addressbook/printing/e-contact-print.glade.h:47 -msgid "Orientation" -msgstr "ïÒÉÅÎÔÁÃÉÑ" - -#: addressbook/printing/e-contact-print.glade.h:48 -msgid "Portrait" -msgstr "ðÏÒÔÒÅÔ" - -#: addressbook/printing/e-contact-print.glade.h:49 -msgid "Landscape" -msgstr "âÌÏËÎÏÔ" - -#: addressbook/printing/e-contact-print.glade.h:52 -msgid "Header" -msgstr "ûÁÐËÁ" - -#: addressbook/printing/e-contact-print.glade.h:53 -msgid "Footer:" -msgstr "óÎÏÓËÁ:" - -#: addressbook/printing/e-contact-print.glade.h:55 -msgid "Reverse on even pages" -msgstr "ïÂÒÁÔÎÏÅ ÎÁ ÞÅÔÎÙÈ ÓÔÒÁÎÉÃÁÈ" - -#: addressbook/printing/e-contact-print.glade.h:56 -msgid "Header/Footer" -msgstr "ûÁÐËÁ/óÎÏÓËÁ" - -#: composer/e-msg-composer-address-dialog.c:183 composer/e-msg-composer.c:533 -msgid "Cut" -msgstr "÷ÙÒÅÚÁÔØ" - -#: composer/e-msg-composer-address-dialog.c:184 -msgid "Cut selected item into clipboard" -msgstr "÷ÙÒÅÚÁÅÔ ×ÙÄÅÌÅÎÎÙÊ ÜÌÅÍÅÎÔ × ÂÕÆÅÒ ÏÂÍÅÎÁ" - -#: composer/e-msg-composer-address-dialog.c:187 composer/e-msg-composer.c:534 -msgid "Copy" -msgstr "óËÏÐÉÒÏ×ÁÔØ" - -#: composer/e-msg-composer-address-dialog.c:188 -msgid "Copy selected item into clipboard" -msgstr "ëÏÐÉÒÕÅÔ ×ÙÄÅÌÅÎÎÙÊ ÜÌÅÍÅÎÔ × ÂÕÆÅÒ ÏÂÍÅÎÁ" - -#: composer/e-msg-composer-address-dialog.c:191 -#: composer/e-msg-composer-address-dialog.c:199 composer/e-msg-composer.c:535 -msgid "Paste" -msgstr "÷ÓÔÁ×ÉÔØ" - -#: composer/e-msg-composer-address-dialog.c:192 -#: composer/e-msg-composer-address-dialog.c:200 -msgid "Paste item from clipboard" -msgstr "÷ÓÔÁ×ÉÔØ ÜÌÅÍÅÎÔ ÉÚ ÂÕÆÅÒÁ ÏÂÍÅÎÁ" - -#: composer/e-msg-composer-address-dialog.c:528 -msgid "Select recipients' addresses" -msgstr "÷ÙÂÒÁÔØ ÁÄÒÅÓÁ ÐÏÌÕÞÁÔÅÌÅÊ" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: composer/e-msg-composer-address-dialog.glade.h:7 -msgid "Recipient list:" -msgstr "óÐÉÓÏË ÐÏÌÕÞÁÔÅÌÅÊ:" - -#: composer/e-msg-composer-address-dialog.glade.h:8 -msgid "Name:" -msgstr "éÍÑ:" - -#: composer/e-msg-composer-address-dialog.glade.h:9 -msgid "Search..." -msgstr "ðÏÉÓË..." - -#: composer/e-msg-composer-address-dialog.glade.h:10 -msgid "Name" -msgstr "éÍÑ" - -#: composer/e-msg-composer-address-dialog.glade.h:11 -msgid "Address" -msgstr "áÄÒÅÓ" - -#: composer/e-msg-composer-address-dialog.glade.h:12 -msgid "Properties..." -msgstr "ó×ÏÊÓÔ×Á..." - -#: composer/e-msg-composer-address-dialog.glade.h:13 -msgid "Add..." -msgstr "äÏÂÁ×ÉÔØ..." - -#: composer/e-msg-composer-address-dialog.glade.h:14 -msgid "To: >>" -msgstr "ëÏÍÕ:>>" - -#: composer/e-msg-composer-address-dialog.glade.h:15 -msgid "Cc: >>" -msgstr "ëÏÐÉÑ:>>" - -#: composer/e-msg-composer-address-dialog.glade.h:16 -msgid "Bcc: >>" -msgstr "óËÒ.ËÏÐÉÑ:>>" - -#: composer/e-msg-composer-address-dialog.glade.h:17 -msgid "label9" -msgstr "label9" - -#: composer/e-msg-composer-address-dialog.glade.h:18 -msgid "label7" -msgstr "label7" - -#: composer/e-msg-composer-address-dialog.glade.h:19 -msgid "label8" -msgstr "label8" - -#: composer/e-msg-composer-attachment-bar.c:76 -msgid "1 byte" -msgstr "1 ÂÁÊÔ" - -#: composer/e-msg-composer-attachment-bar.c:78 -#, c-format -msgid "%u bytes" -msgstr "%u ÂÁÊÔ" - -#: composer/e-msg-composer-attachment-bar.c:85 -#, c-format -msgid "%.1fK" -msgstr "%.1fë" - -#: composer/e-msg-composer-attachment-bar.c:89 -#, c-format -msgid "%.1fM" -msgstr "%.1fM" - -#: composer/e-msg-composer-attachment-bar.c:93 -#, c-format -msgid "%.1fG" -msgstr "%.1fG" - -#: composer/e-msg-composer-attachment-bar.c:307 -msgid "Add attachment" -msgstr "äÏÂÁ×ÉÔØ ×ÌÏÖÅÎÉÅ" - -#: composer/e-msg-composer-attachment-bar.c:364 -msgid "Remove" -msgstr "õÄÁÌÉÔØ" - -#: composer/e-msg-composer-attachment-bar.c:365 -msgid "Remove selected items from the attachment list" -msgstr "õÄÁÌÉÔØ ×ÙÂÒÁÎÎÙÅ ÜÌÅÍÅÎÔÙ ÉÚ ÓÐÉÓËÁ ×ÌÏÖÅÎÉÊ" - -#: composer/e-msg-composer-attachment-bar.c:396 -msgid "Add attachment..." -msgstr "äÏÂÁ×ÉÔØ ×ÌÏÖÅÎÉÅ..." - -#: composer/e-msg-composer-attachment-bar.c:397 -msgid "Attach a file to the message" -msgstr "ðÒÉÓÏÅÄÉÎÉÔØ ÆÁÊÌ Ë ÓÏÏÂÝÅÎÉÀ" - -#: composer/e-msg-composer-attachment.c:259 -msgid "Select attachment" -msgstr "÷ÙÂÒÁÔØ ×ÌÏÖÅÎÉÅ" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: composer/e-msg-composer-attachment.glade.h:7 -msgid "Attachment properties" -msgstr "ó×ÏÊÓÔ×Á ×ÌÏÖÅÎÉÊ" - -#: composer/e-msg-composer-attachment.glade.h:9 -msgid "MIME type:" -msgstr "ôÉÐ MIME:" - -#: composer/e-msg-composer-attachment.glade.h:10 -msgid "File name:" -msgstr "éÍÑ ÆÁÊÌÁ:" - -#: composer/e-msg-composer-attachment.glade.h:11 -msgid "Browse..." -msgstr "ðÒÏÓÍÏÔÒ..." - -#: composer/e-msg-composer-hdrs.c:89 -msgid "Click here for the address book" -msgstr "ýÅÌËÎÉÔÅ ÚÄÅÓØ ÄÌÑ ÁÄÒÅÓÎÏÊ ËÎÉÇÉ" - -#: composer/e-msg-composer-hdrs.c:124 -msgid "To:" -msgstr "ëÏÍÕ:" - -#: composer/e-msg-composer-hdrs.c:125 -msgid "Enter the recipients of the message" -msgstr "÷×ÅÄÉÔÅ ÐÏÌÕÞÁÔÅÌÅÊ ÓÏÏÂÝÅÎÉÑ" - -#: composer/e-msg-composer-hdrs.c:129 -msgid "Cc:" -msgstr "ëÏÐÉÑ:" - -#: composer/e-msg-composer-hdrs.c:130 -msgid "Enter the addresses that will receive a carbon copy of the message" -msgstr "÷×ÅÄÉÔÅ ÁÄÒÅÓÁÔÏ×, ËÏÔÏÒÙÅ ÐÏÌÕÞÁÔ ËÏÐÉÀ ÓÏÏÂÝÅÎÉÑ" - -#: composer/e-msg-composer-hdrs.c:135 -msgid "Bcc:" -msgstr "óËÒ.ËÏÐÉÑ:" - -#: composer/e-msg-composer-hdrs.c:136 -msgid "" -"Enter the addresses that will receive a carbon copy of the message without " -"appearing in the recipient list of the message." -msgstr "" -"÷×ÅÄÉÔÅ ÁÄÒÅÓÁÔÏ×, ËÏÔÏÒÙÅ ÐÏÌÕÞÁÔ ËÏÐÉÀ ÓÏÏÂÝÅÎÉÑ ÎÅ ÐÏÐÁ× × ÓÐÉÓÏË " -"ÐÏÌÕÞÁÔÅÌÅÊ." - -#: composer/e-msg-composer-hdrs.c:142 -msgid "Subject:" -msgstr "ôÅÍÁ:" - -#: composer/e-msg-composer-hdrs.c:143 -msgid "Enter the subject of the mail" -msgstr "÷×ÅÄÉÔÅ ÔÅÍÕ ÐÉÓØÍÁ" - -#: composer/e-msg-composer.c:491 -msgid "Save in _folder..." -msgstr "óÏÈÒÁÎÉÔØ × ÐÁÐËÅ..." - -#: composer/e-msg-composer.c:491 -msgid "Save the message in a specified folder" -msgstr "óÏÈÒÁÎÉÔØ ÓÏÏÂÝÅÎÉÅ × ÕËÁÚÁÎÎÏÊ ÐÁÐËÅ" - -#: composer/e-msg-composer.c:494 composer/e-msg-composer.c:531 -#: mail/folder-browser-factory.c:36 -msgid "Send" -msgstr "ïÔÐÒÁ×ÉÔØ" - -#: composer/e-msg-composer.c:494 -msgid "Send the message" -msgstr "ïÔÐÒÁ×ÉÔØ ÓÏÏÂÝÅÎÉÅ" - -#: composer/e-msg-composer.c:502 -msgid "View _attachments" -msgstr "ðÒÏÓÍÏÔÒÅÔØ ×ÌÏÖÅÎÉÑ" - -#: composer/e-msg-composer.c:502 -msgid "View/hide attachments" -msgstr "ðÏËÁÚÁÔØ/ÓËÒÙÔØ ×ÌÏÖÅÎÉÑ" - -#: composer/e-msg-composer.c:531 -msgid "Send this message" -msgstr "ïÔÐÒÁ×ÉÔØ ÜÔÏ ÓÏÏÂÝÅÎÉÅ" - -#: composer/e-msg-composer.c:533 -msgid "Cut selected region into the clipboard" -msgstr "÷ÙÒÅÚÁÔØ ×ÙÄÅÌÅÎÎÕÀ ÏÂÌÁÓÔØ × ÂÕÆÅÒ ÏÂÍÅÎÁ" - -#: composer/e-msg-composer.c:534 -msgid "Copy selected region into the clipboard" -msgstr "óËÏÐÉÒÏ×ÁÔØ ×ÙÄÅÌÅÎÎÕÀ ÏÂÌÁÓÔØ × ÂÕÆÅÒ ÏÂÍÅÎÁ" - -#: composer/e-msg-composer.c:535 -msgid "Paste selected region into the clipboard" -msgstr "÷ÓÔÁ×ÉÔØ ×ÙÄÅÌÅÎÎÕÀ ÏÂÌÁÓÔØ × ÂÕÆÅÒ ÏÂÍÅÎÁ" - -#: composer/e-msg-composer.c:536 -msgid "Undo" -msgstr "ïÔËÁÔ" - -#: composer/e-msg-composer.c:536 -msgid "Undo last operation" -msgstr "ïÔÍÅÎÉÔØ ÐÏÓÌÅÄÎÀÀ ÏÐÅÒÁÃÉÀ" - -#: composer/e-msg-composer.c:538 -msgid "Attach" -msgstr "ðÒÉÓÏÅÄÉÎÉÔØ" - -#: composer/e-msg-composer.c:538 -msgid "Attach a file" -msgstr "ðÒÉÓÏÅÄÉÎÉÔØ ÆÁÊÌ" - -#: mail/folder-browser-factory.c:35 -msgid "Get mail" -msgstr "ðÏÌÕÞÉÔØ ÐÏÞÔÕ" - -#: mail/folder-browser-factory.c:35 -msgid "Check for new mail" -msgstr "ðÒÏ×ÅÒÉÔØ ÐÏÞÔÏ×ÙÊ ÑÝÉË" - -#: mail/folder-browser-factory.c:36 -msgid "Send a new message" -msgstr "ïÔÐÒÁ×ÉÔØ ÎÏ×ÏÅ ÓÏÏÂÝÅÎÉÅ" - -#: mail/folder-browser-factory.c:37 -msgid "Find" -msgstr "îÁÊÔÉ" - -#: mail/folder-browser-factory.c:37 -msgid "Find messages" -msgstr "îÁÊÔÉ ÓÏÏÂÝÅÎÉÑ" - -#: mail/folder-browser-factory.c:41 -msgid "Reply" -msgstr "ïÔ×ÅÔÉÔØ" - -#: mail/folder-browser-factory.c:41 -msgid "Reply to the sender of this message" -msgstr "ïÔ×ÅÔÉÔØ ÏÔÐÒÁ×ÉÔÅÌÀ ÜÔÏÇÏ ÓÏÏÂÝÅÎÉÑ" - -#: mail/folder-browser-factory.c:42 -msgid "Reply to All" -msgstr "ïÔ×ÅÔÉÔØ ×ÓÅÍ" - -#: mail/folder-browser-factory.c:42 -msgid "Reply to all recipients of this message" -msgstr "ïÔ×ÅÔÉÔØ ×ÓÅÍ ÐÏÌÕÞÁÔÅÌÑÍ ÜÔÏÇÏ ÓÏÏÂÝÅÎÉÑ" - -#: mail/folder-browser-factory.c:44 -msgid "Forward" -msgstr "ðÅÒÅÓÌÁÔØ" - -#: mail/folder-browser-factory.c:44 -msgid "Forward this message" -msgstr "ðÅÒÅÓÌÁÔØ ÜÔÏ ÓÏÏÂÝÅÎÉÅ" - -#: mail/folder-browser-factory.c:48 -msgid "Print" -msgstr "ðÅÞÁÔØ" - -#: mail/folder-browser-factory.c:48 -msgid "Print the selected message" -msgstr "òÁÓÐÅÞÁÔÁÔØ ×ÙÄÅÌÅÎÎÏÅ ÓÏÏÂÝÅÎÉÅ" - -#: mail/folder-browser-factory.c:50 -msgid "Delete this message" -msgstr "õÄÁÌÉÔØ ÜÔÏ ÓÏÏÂÝÅÎÉÅ" - -#: mail/folder-browser-factory.c:67 -msgid "_Expunge" -msgstr "÷ÙÞÅÒËÎÕÔØ" - -#: mail/folder-browser-factory.c:73 -msgid "_Filter Druid ..." -msgstr "ðÏÍÏÝÎÉË ÐÏ ÆÉÌØÔÒÁÍ ..." - -#: mail/folder-browser-factory.c:79 -msgid "_Vfolder Druid ..." -msgstr "ðÏÍÏÝÎÉË ÐÏ V-ÐÁÐËÁÍ ..." - -#: mail/folder-browser-factory.c:193 -msgid "We are sorry, Evolution's Folder Browser can not be initialized." -msgstr "" -"éÚ×ÉÎÉÔÅ, ÐÒÏÇÒÁÍÍÁ ÐÒÏÓÍÏÔÒÁ ÐÁÐÏË \"ü×ÏÌÀÃÉÉ\" ÎÅ ÍÏÖÅÔ ÂÙÔØ " -"ÉÎÉÃÉÁÌÉÚÉÒÏ×ÁÎÁ." - -#: mail/folder-browser.c:232 -msgid "The URI that the Folder Browser will display" -msgstr "URI, ËÏÔÏÒÙÊ ÂÕÄÅÔ ÐÏËÁÚÙ×ÁÔØ ÐÒÏÇÒÁÍÍÁ ÐÒÏÓÍÏÔÒÁ ÐÁÐÏË" - -#: mail/folder-browser.c:235 -msgid "Whether a message preview should be shown" -msgstr "âÕÄÅÔ ÌÉ ÐÏËÁÚÙ×ÁÔØÓÑ ÏËÎÏ ÐÒÏÓÍÏÔÒÁ ÓÏÏÂÝÅÎÉÑ" - -#: mail/main.c:58 -msgid "Mail Component: I could not initialize Bonobo" -msgstr "ðÏÞÔÏ×ÙÊ ËÏÍÐÏÎÅÎÔ: ÎÅ ÕÄÁÌÏÓØ ÉÎÉÃÉÁÌÉÚÉÒÏ×ÁÔØ Bonobo" - -#: mail/message-list.c:476 -msgid "Priority" -msgstr "ðÒÉÏÒÉÔÅÔ" - -#: mail/message-list.c:490 -msgid "From" -msgstr "ïÔ" - -#: mail/message-list.c:497 -msgid "Subject" -msgstr "ôÅÍÁ" - -#: mail/message-list.c:504 -msgid "Sent" -msgstr "ïÔÐÒÁ×ÌÅÎÏ" - -#: mail/message-list.c:511 -msgid "Receive" -msgstr "ðÏÌÕÞÅÎÏ" - -#: mail/message-list.c:518 -msgid "To" -msgstr "ëÏÍÕ" - -#: mail/message-list.c:525 -msgid "Size" -msgstr "òÁÚÍÅÒ" - -#. you might have to call gnome_dialog_run() on the -#. * dialog returned here, I don't remember... -#. -#: shell/e-shell-view-menu.c:62 -msgid "Bug buddy was not found in your $PATH." -msgstr "Bug-buddy ÎÅ ÂÙÌ ÎÁÊÄÅÎ × ×ÁÛÅÍ $PATH." - -#. same as above -#: shell/e-shell-view-menu.c:68 -msgid "Bug buddy could not be run." -msgstr "Bug-buddy ÎÅ ÍÏÖÅÔ ÂÙÔØ ÚÁÐÕÝÅÎ." - -#: shell/e-shell-view-menu.c:111 -msgid "Evolution" -msgstr "ü×ÏÌÀÃÉÑ" - -#: shell/e-shell-view-menu.c:113 -msgid "Copyright 1999, 2000 Helix Code, Inc." -msgstr "Copyright 1999, 2000 Helix Code, Inc." - -#: shell/e-shell-view-menu.c:115 -msgid "" -"Evolution is a suite of groupware applications\n" -"for mail, calendaring, and contact management\n" -"within the GNOME desktop environment." -msgstr "" -"\"ü×ÏÌÀÃÉÑ\" ÜÔÏ ÎÁÂÏÒ ÐÒÉÌÏÖÅÎÉÊ ÜÌÅËÔÒÏÎÎÏÊ ÐÏÞÔÙ,\n" -"×ÅÄÅÎÉÑ ËÁÌÅÎÄÁÒÅÊ É ËÏÎÔÁËÔÎÏÊ ÉÎÆÏÒÍÁÃÉÉ ÄÌÑ\n" -"ÇÒÕÐÐÏ×ÏÊ ÒÁÂÏÔÙ × ÓÒÅÄÅ GNOME." - -#: shell/e-shell-view-menu.c:185 shell/e-shell-view-menu.c:251 -msgid "_Folder" -msgstr "ðÁÐËÁ" - -#: shell/e-shell-view-menu.c:189 -msgid "Evolution _Bar Shortcut" -msgstr "óÔÒÏËÁ ÑÒÌÙËÏ× Evolution" - -#: shell/e-shell-view-menu.c:195 -msgid "_Mail message" -msgstr "ðÏÞÔÏ×ÏÅ ÓÏÏÂÝÅÎÉÅ" - -#: shell/e-shell-view-menu.c:196 shell/e-shell-view-menu.c:199 -msgid "Composes a new mail message" -msgstr "óÏÚÄÁÔØ ÎÏ×ÏÅ ÓÏÏÂÝÅÎÉÅ" - -#: shell/e-shell-view-menu.c:198 -msgid "_Appointment" -msgstr "÷ÓÔÒÅÞÁ" - -#: shell/e-shell-view-menu.c:201 -msgid "Meeting Re_quest" -msgstr "úÁÐÒÏÓ ×ÓÔÒÅÞÉ" - -#: shell/e-shell-view-menu.c:204 -msgid "_Contact" -msgstr "ëÏÎÔÁËÔ" - -#: shell/e-shell-view-menu.c:207 -msgid "_Task" -msgstr "úÁÄÁÎÉÅ" - -#: shell/e-shell-view-menu.c:210 -msgid "Task _Request" -msgstr "úÁÐÒÏÓ ÚÁÄÁÎÉÑ" - -#: shell/e-shell-view-menu.c:213 -msgid "_Journal Entry" -msgstr "öÕÒÎÁÌØÎÁÑ ÓÔÒÏËÁ" - -#: shell/e-shell-view-menu.c:216 -msgid "_Note" -msgstr "úÁÍÅÔËÁ" - -#: shell/e-shell-view-menu.c:226 -msgid "_Selected Items" -msgstr "÷ÙÄÅÌÅÎÎÙÅ ÜÌÅÍÅÎÔÙ" - -#: shell/e-shell-view-menu.c:234 -msgid "_New Folder" -msgstr "îÏ×ÁÑ ÐÁÐËÁ" - -#: shell/e-shell-view-menu.c:242 -msgid "_New" -msgstr "îÏ×ÏÅ" - -#: shell/e-shell-view-menu.c:243 -msgid "_Open" -msgstr "ïÔËÒÙÔØ" - -#: shell/e-shell-view-menu.c:244 -msgid "Clos_e All Items" -msgstr "úÁËÒÙÔØ ×ÓÅ" - -#: shell/e-shell-view-menu.c:244 -msgid "Closes all the open items" -msgstr "úÁËÒÙÔØ ×ÓÅ ÞÔÏ ÏÔËÒÙÔÏ" - -#: shell/e-shell-view-menu.c:265 -msgid "Show _Shortcut Bar" -msgstr "ðÏËÁÚÁÔØ ÓÔÒÏËÕ ÑÒÌÙËÏ×" - -#: shell/e-shell-view-menu.c:266 -msgid "Shows the shortcut bar" -msgstr "ðÏËÁÚÁÔØ ÓÔÒÏËÕ ÑÒÌÙËÏ×" - -#: shell/e-shell-view-menu.c:268 -msgid "Show _Treeview" -msgstr "ðÏËÁÚÁÔØ ÐÒÏÓÍÏÔÒ ÄÅÒÅ×Á" - -#: shell/e-shell-view-menu.c:269 -msgid "Shows the tree view" -msgstr "ðÏËÁÚÁÔØ ÐÒÏÓÍÏÔÒ ÄÅÒÅ×Á" - -#: shell/e-shell-view-menu.c:284 -msgid "_Submit bug" -msgstr "ïÔÐÒÁ×ÉÔØ ÓÏÏÂÝÅÎÉÅ Ï ÏÛÉÂËÅ" - -#: shell/e-shell-view-menu.c:285 -msgid "Submit bug-report via bug-buddy" -msgstr "ïÐÒÁ×ÉÔØ ÓÏÏÂÝÅÎÉÅ Ï ÏÛÉÂËÅ ÞÅÒÅÚ bug-buddy" - -#. FIXME: add Favorites here -#: shell/e-shell-view-menu.c:300 -msgid "_Tools" -msgstr "éÎÓÔÒÕÍÅÎÔÙ" - -#: shell/e-shell-view-menu.c:301 -msgid "_Actions" -msgstr "äÅÊÓÔ×ÉÑ" - -#: shell/e-shell.c:157 -#, c-format -msgid "Cannot set up local storage -- %s" -msgstr "îÅ×ÏÚÍÏÖÎÏ ÕÓÔÁÎÏ×ÉÔØ ÌÏËÁÌØÎÏÅ ÈÒÁÎÉÌÉÝÅ -- %s" - -#: shell/main.c:100 -msgid "" -"Hi. Thanks for taking the time to download this preview release of\n" -"the Evolution groupware suite.\n" -"\n" -"The Evolution team has worked hard to make Evolution as robust,\n" -"extensible, pretty, fast and well-suited to heavy internet users as\n" -"possible. And we're very tired. But we're not done -- not yet.\n" -"\n" -"As you explore Evolution, please understand that most of our work has\n" -"been focused on the backend engine which drives the entire system and\n" -"not on the user interface. We are just cresting the hill now, though,\n" -"and will be pouring most of our love and attention into the UI from\n" -"here out. But at least you know that you're not using demoware.\n" -"\n" -"So, time for the nerdy disclaimer. Evolution will: crash, lose your\n" -"mail, leave stray processes running, consume 100% CPU, race, lock,\n" -"send HTML mail to random mailing lists, and embarass you in front of\n" -"your friends and co-workers. Use at your own risk.\n" -"\n" -"We hope that you enjoy the results of our hard work, and we eagerly\n" -"await your contributions!\n" -msgstr "" -"ðÒÉ×ÅÔ! óÐÁÓÉÂÏ, ÞÔÏ ÎÁÛÌÉ ×ÒÅÍÑ ÓËÁÞÁÔØ ÜÔÕ ÐÒÅÄ×ÁÒÉÔÅÌØÎÕÀ ×ÅÒÓÉÀ\n" -"ÎÁÂÏÒÁ ÇÒÕÐÐÏ×ÙÈ ÐÒÉÌÏÖÅÎÉÊ \"ü×ÏÌÀÃÉÑ\"\n" -"ëÏÍÁÎÄÁ \"ü×ÏÌÀÃÉÉ\" ÕÐÏÒÎÏ ÒÁÂÏÔÁÅÔ, ÞÔÏÂÙ ÓÄÅÌÁÔØ ÐÒÏÇÒÁÍÍÕ ÎÁÓÔÏÌØËÏ\n" -"ÕÓÔÏÊÞÉ×ÏÊ, ÒÁÓÛÉÒÑÅÍÏÊ, ËÒÁÓÉ×ÏÊ, ÂÙÓÔÒÏÊ É ÆÕÎËÃÉÏÎÁÌØÎÏÊ ÄÌÑ\n" -"ÉÚÏÝÒÅÎÎÏÇÏ ÐÏÌØÚÏ×ÁÔÅÌÑ éÎÔÅÒÎÅÔ, ÎÁÓËÏÌØËÏ ×ÏÚÍÏÖÎÏ. é ÍÙ ÕÓÔÁÌÉ.\n" -"îÏ ÍÙ ÅÝÅ ÎÅ ÇÏÔÏ×Ù -- ÐÏËÁ ÎÅÔ.\n" -"\n" -"ëÏÇÄÁ ×Ù ÉÓÓÌÅÄÕÀÔÅ \"ü×ÏÌÀÃÉÀ\", ÐÏÖÁÌÕÊÓÔÁ ÕÞÉÔÙ×ÁÊÔÅ, ÞÔÏ ÂÏÌØÛÁÑ ÞÁÓÔØ\n" -"ÎÁÛÅÊ ÒÁÂÏÔÙ ÂÙÌÁ ÎÁÐÒÁ×ÌÅÎÁ ÎÁ ÓÏÚÄÁÎÉÅ ÍÏÝÎÏÇÏ Ä×ÉÖËÁ, ËÏÔÏÒÙÊ ÂÕÄÅÔ\n" -"ÕÐÒÁ×ÌÑÔØ ×ÓÅÊ ÓÉÓÔÅÍÏÊ, Á ÎÅ ÐÏÌØÚÏ×ÁÔÅÌØÓËÏÇÏ ÉÎÔÅÒÆÅÊÓÁ. We are just\n" -"cresting the hill now, though, and will be pouring most of our love and\n" -"attention into the UI from here out. îÏ ×Ù ÕÚÎÁÅÔÅ ÞÔÏ ÜÔÏ ÎÅ ÄÅÍÏÎÓÔÒÁÛËÁ.\n" -"\n" -"÷ÒÅÍÑ ÄÌÑ ÚÁÎÕÄÎÏÇÏ \"ïÐÒÏ×ÅÒÖÅÎÉÑ\". \"ü×ÏÌÀÃÉÑ ÂÕÄÅÔ: ÐÁÄÁÔØ, ÕÎÉÞÔÏÖÁÔØ\n" -"×ÁÛÕ ÐÏÞÔÕ, ÏÓÔÁ×ÌÑÔØ ÚÁÐÕÝÅÎÎÙÍÉ ÚÁÂÌÕÄÉ×ÛÉÅÓÑ ÐÒÏÃÅÓÓÙ, ÐÏÇÌÁÝÁÔØ 100%\n" -"ãðõ, ÚÁ×ÉÓÁÔØ, ÏÔÐÒÁ×ÌÑÔØ HTML-ÐÏÞÔÕ × ÓÌÕÞÁÊÎÙÅ ÓÐÉÓËÉ ÒÁÓÓÙÌËÉ É ÓÔÁ×ÉÔØ\n" -"×ÁÓ × ÎÅÌÏ×ËÏÅ ÐÏÌÏÖÅÎÉÅ ÐÅÒÅÄ ÄÒÕÚØÑÍÉ É ËÏÌÌÅÇÁÍÉ. éÓÐÏÌØÚÕÊÔÅ ÎÁ Ó×ÏÊ\n" -"ÓÔÒÁÈ É ÒÉÓË.\n" -"íÙ ÎÁÄÅÅÍÓÑ, ÞÔÏ ×ÁÍ ÐÏÎÒÁ×ÑÔÓÑ ÒÅÚÕÌØÔÁÔÙ ÎÁÛÅÊ ÕÐÏÒÎÏÊ ÒÁÂÏÔÙ É ÍÙ\n" -"ÒÁÓÓÞÉÔÙ×ÁÅÍ ÎÁ ×ÁÛÅ ÕÞÁÓÔÉÅ!\n" - -#: shell/main.c:129 -msgid "" -"Thanks\n" -"The Evolution Team\n" -msgstr "" -"ó ÂÌÁÇÏÄÁÒÎÏÓÔØÀ\n" -"ëÏÍÁÎÄÁ Evolution\n" - -#: shell/main.c:156 -msgid "Cannot initialize the Evolution shell." -msgstr "îÅ×ÏÚÍÏÖÎÏ ÉÎÉÃÉÁÌÉÚÉÒÏ×ÁÔØ ÏÂÏÌÏÞËÕ \"ü×ÏÌÀÃÉÉ\"." - -#: shell/main.c:186 -msgid "Cannot initialize the Bonobo component system." -msgstr "îÅ ÕÄÁÌÏÓØ ÉÎÉÃÉÁÌÉÚÉÒÏ×ÁÔØ ËÏÍÐÏÎÅÎÔÎÕÀ ÓÉÓÔÅÍÕ Bonobo." - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: widgets/e-table/e-table-config.glade.h:7 -msgid "Fields" -msgstr "ðÏÌÑ" - -#: widgets/e-table/e-table-config.glade.h:8 -msgid "Grouping" -msgstr "çÒÕÐÐÉÒÏ×ÁÎÉÅ" - -#: widgets/e-table/e-table-config.glade.h:9 -msgid "Sort" -msgstr "óÏÒÔÉÒÏ×ËÁ" - -#: widgets/e-table/e-table-config.glade.h:10 -msgid "Filter" -msgstr "æÉÌØÔÒ" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: widgets/e-table/e-table-group.glade.h:7 -msgid "window1" -msgstr "window1" - -#: widgets/e-table/e-table-group.glade.h:8 -msgid "Available fields" -msgstr "äÏÓÔÕÐÎÙÅ ÐÏÌÑ" - -#: widgets/e-table/e-table-group.glade.h:9 -msgid "label1" -msgstr "label1" - -#: widgets/e-table/e-table-group.glade.h:10 -msgid "Show in this order" -msgstr "ðÏËÁÚÙ×ÁÔØ × ÔÁËÏÍ ÐÏÒÑÄËÅ" - -#: widgets/e-table/e-table-group.glade.h:11 -msgid "label2" -msgstr "label2" - -#: widgets/e-table/e-table-group.glade.h:12 -msgid "Add >>" -msgstr "äÏÂÁ×ÉÔØ >>" - -#: widgets/e-table/e-table-group.glade.h:13 -msgid "<< Remove" -msgstr "<< õÄÁÌÉÔØ" diff --git a/po/sv.po b/po/sv.po deleted file mode 100644 index 892dcce094..0000000000 --- a/po/sv.po +++ /dev/null @@ -1,1201 +0,0 @@ -# Swedish translation of evolution. -# Copyright (C) 2000 Free Software Foundation, Inc. -# Andreas Hyden , 2000. -# -msgid "" -msgstr "" -"Project-Id-Version: evolution 0.1\n" -"POT-Creation-Date: 2000-05-27 20:01+0100\n" -"PO-Revision-Date: 2000-04-04 19:23+0200\n" -"Last-Translator: Andreas Hyden \n" -"Language-Team: Swedish \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=iso-8859-1\n" -"Content-Transfer-Encoding: 8-bit\n" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/contact-editor/e-contact-editor-strings.h:7 -msgid "Contact Editor" -msgstr "_Kontakt editor" - -#: addressbook/contact-editor/e-contact-editor-strings.h:8 -msgid "_Full Name..." -msgstr "Hela namet..." - -#: addressbook/contact-editor/e-contact-editor-strings.h:9 -msgid "Company:" -msgstr "Företag:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:10 -msgid "File As:" -msgstr "Spara som:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:11 -msgid "Web page address:" -msgstr "Webbsajt adress:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:12 -msgid "Wants to receive _HTML mail" -msgstr "Vill ha _HTML-post" - -#: addressbook/contact-editor/e-contact-editor-strings.h:13 -msgid "Address:" -msgstr "Adress:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:14 -msgid "_Business" -msgstr "_Företag" - -#: addressbook/contact-editor/e-contact-editor-strings.h:15 -msgid "_Home" -msgstr "_Hem" - -#: addressbook/contact-editor/e-contact-editor-strings.h:16 -msgid "Business _Fax" -msgstr "Företags_fax" - -#: addressbook/contact-editor/e-contact-editor-strings.h:17 -msgid "_Mobile" -msgstr "_Mobil" - -#: addressbook/contact-editor/e-contact-editor-strings.h:18 -msgid "Primary Email" -msgstr "Primär epost" - -#: addressbook/contact-editor/e-contact-editor-strings.h:19 -msgid "Business" -msgstr "Företag" - -#: addressbook/contact-editor/e-contact-editor-strings.h:20 -msgid "This is the _mailing address" -msgstr "Detta är _epostadresserna" - -#: addressbook/contact-editor/e-contact-editor-strings.h:21 -msgid "_Contacts..." -msgstr "_Kontakter..." - -#: addressbook/contact-editor/e-contact-editor-strings.h:22 -msgid "Ca_tegories..." -msgstr "Ka_tegorier..." - -#: addressbook/contact-editor/e-contact-editor-strings.h:23 -msgid "Job Title" -msgstr "Jobbtitel" - -#: addressbook/contact-editor/e-contact-editor-strings.h:24 -msgid "General" -msgstr "Generellt" - -#: addressbook/contact-editor/e-contact-editor-strings.h:25 -msgid "Department:" -msgstr "Avdelning:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:26 -msgid "Office:" -msgstr "Kontor:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:27 -msgid "Profession:" -msgstr "Yrke:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:28 -msgid "Nickname:" -msgstr "Smeknamn:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:29 -msgid "Spouse:" -msgstr "Make:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:30 -msgid "Birthday:" -msgstr "Födelsedag:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:31 -msgid "Assistant's name:" -msgstr "Assistantnamn:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:32 -msgid "Manager's Name:" -msgstr "Chefens namn:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:33 -msgid "Anniversary:" -msgstr "Jubileum:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:34 -msgid "Notes:" -msgstr "Anteckningar:" - -#: addressbook/contact-editor/e-contact-editor-strings.h:35 -msgid "Details" -msgstr "Detaljer" - -#: addressbook/contact-editor/e-contact-editor-strings.h:36 -#: addressbook/contact-editor/e-contact-editor-strings.h:41 -msgid "Add" -msgstr "Lägg till" - -#: addressbook/contact-editor/e-contact-editor-strings.h:37 -#: mail/folder-browser-factory.c:50 -msgid "Delete" -msgstr "Ta bort" - -#: addressbook/contact-editor/e-contact-editor-strings.h:38 -msgid "Phone Types" -msgstr "Telefontyper" - -#: addressbook/contact-editor/e-contact-editor-strings.h:39 -#: addressbook/contact-editor/e-contact-editor-strings.h:40 -msgid "New phone type" -msgstr "Ny telefontyp" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/contact-editor/fullname-strings.h:7 -msgid "Check Full Name" -msgstr "Kolla hela namnet" - -#: addressbook/contact-editor/fullname-strings.h:8 -msgid "_Title:" -msgstr "_Titel:" - -#: addressbook/contact-editor/fullname-strings.h:9 -msgid "_First:" -msgstr "_Första:" - -#: addressbook/contact-editor/fullname-strings.h:10 -msgid "_Middle:" -msgstr "_Mellan:" - -#: addressbook/contact-editor/fullname-strings.h:11 -msgid "_Last:" -msgstr "_Senaste:" - -#: addressbook/contact-editor/fullname-strings.h:12 -msgid "_Suffix:" -msgstr "_Suffix:" - -#: addressbook/contact-editor/fullname-strings.h:13 -msgid "" -"\n" -"Mr.\n" -"Mrs.\n" -"Dr.\n" -msgstr "" -"\n" -"Mr.\n" -"Mrs.\n" -"Dr.\n" - -#: addressbook/contact-editor/fullname-strings.h:18 -msgid "" -"\n" -"Sr.\n" -"Jr.\n" -"I\n" -"II\n" -"III\n" -"Esq.\n" -msgstr "" -"\n" -"Sr.\n" -"Jr.\n" -"I\n" -"II\n" -"III\n" -"Esq.\n" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/gui/component/ldap-server-dialog.glade.h:7 -#: composer/e-msg-composer-attachment.glade.h:8 -msgid "Description:" -msgstr "Beskrivning:" - -#: addressbook/gui/component/ldap-server-dialog.glade.h:8 -msgid "LDAP Server:" -msgstr "LDAP-server:" - -#: addressbook/gui/component/ldap-server-dialog.glade.h:9 -msgid "Port Number:" -msgstr "Portnummer:" - -#: addressbook/gui/component/ldap-server-dialog.glade.h:10 -msgid "Root DN:" -msgstr "Rot DN:" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/printing/e-contact-print.glade.h:7 -msgid "Page Setup:" -msgstr "Inställningar för sida:" - -#: addressbook/printing/e-contact-print.glade.h:8 -msgid "Style name:" -msgstr "Bladnamn:" - -#: addressbook/printing/e-contact-print.glade.h:9 -msgid "Preview:" -msgstr "Förhandsgranskning:" - -#: addressbook/printing/e-contact-print.glade.h:10 -msgid "Options" -msgstr "Alternativ" - -#: addressbook/printing/e-contact-print.glade.h:11 -msgid "Include:" -msgstr "Inkludera:" - -#: addressbook/printing/e-contact-print.glade.h:12 -msgid "Sections:" -msgstr "Sektioner:" - -#: addressbook/printing/e-contact-print.glade.h:13 -msgid "Immediately follow each other" -msgstr "Följ efter varandra omedelbart" - -#: addressbook/printing/e-contact-print.glade.h:14 -msgid "Letter tabs on side" -msgstr "Brevtabbar på sidan" - -#: addressbook/printing/e-contact-print.glade.h:15 -msgid "Headings for each letter" -msgstr "Rubriker för varje brev" - -#: addressbook/printing/e-contact-print.glade.h:16 -msgid "Start on a new page" -msgstr "Börja på en ny sida" - -#: addressbook/printing/e-contact-print.glade.h:17 -msgid "Number of columns:" -msgstr "Antal kolumner" - -#: addressbook/printing/e-contact-print.glade.h:18 -msgid "Blank forms at end:" -msgstr "Tomma blanketter vid slutet:" - -#: addressbook/printing/e-contact-print.glade.h:19 -msgid "Fonts" -msgstr "Typsnitt" - -#: addressbook/printing/e-contact-print.glade.h:20 -#: addressbook/printing/e-contact-print.glade.h:21 -#: addressbook/printing/e-contact-print.glade.h:51 -#: addressbook/printing/e-contact-print.glade.h:54 -msgid "Font..." -msgstr "Typsnitt..." - -#: addressbook/printing/e-contact-print.glade.h:22 -msgid "Headings" -msgstr "Rubriker" - -#: addressbook/printing/e-contact-print.glade.h:23 -msgid "10 pt. Tahoma" -msgstr "10 pt. Tahoma" - -#: addressbook/printing/e-contact-print.glade.h:24 -msgid "Body" -msgstr "Kropp" - -#: addressbook/printing/e-contact-print.glade.h:25 -msgid "8 pt. Tahoma" -msgstr "8 pt. Tahoma" - -#: addressbook/printing/e-contact-print.glade.h:26 -msgid "Shading" -msgstr "Skuggning" - -#: addressbook/printing/e-contact-print.glade.h:27 -msgid "Print using gray shading" -msgstr "Skriv ut med grå skuggning" - -#: addressbook/printing/e-contact-print.glade.h:28 -msgid "Format" -msgstr "Format" - -#: addressbook/printing/e-contact-print.glade.h:29 -#: addressbook/printing/e-contact-print.glade.h:50 -msgid "Paper" -msgstr "Papper" - -#: addressbook/printing/e-contact-print.glade.h:30 -msgid "Type:" -msgstr "Typ:" - -#: addressbook/printing/e-contact-print.glade.h:31 -#: addressbook/printing/e-contact-print.glade.h:43 -msgid "label26" -msgstr "label26" - -#: addressbook/printing/e-contact-print.glade.h:32 -#: addressbook/printing/e-contact-print.glade.h:44 -msgid "Dimensions:" -msgstr "Geometri:" - -#: addressbook/printing/e-contact-print.glade.h:33 -#: addressbook/printing/e-contact-print.glade.h:45 -msgid "Width:" -msgstr "Bredd:" - -#: addressbook/printing/e-contact-print.glade.h:34 -#: addressbook/printing/e-contact-print.glade.h:46 -msgid "Height:" -msgstr "Höjd:" - -#: addressbook/printing/e-contact-print.glade.h:35 -msgid "Paper source:" -msgstr "Papperskälla:" - -#: addressbook/printing/e-contact-print.glade.h:36 -msgid "Margins" -msgstr "Marginaler" - -#: addressbook/printing/e-contact-print.glade.h:37 -msgid "Top:" -msgstr "Topp:" - -#: addressbook/printing/e-contact-print.glade.h:38 -msgid "Bottom:" -msgstr "Botten:" - -#: addressbook/printing/e-contact-print.glade.h:39 -msgid "Left:" -msgstr "Vänster:" - -#: addressbook/printing/e-contact-print.glade.h:40 -msgid "Right:" -msgstr "Höger:" - -#: addressbook/printing/e-contact-print.glade.h:41 -msgid "Page" -msgstr "Sida" - -#: addressbook/printing/e-contact-print.glade.h:42 -msgid "Size:" -msgstr "Storlek:" - -#: addressbook/printing/e-contact-print.glade.h:47 -msgid "Orientation" -msgstr "Orientation" - -#: addressbook/printing/e-contact-print.glade.h:48 -msgid "Portrait" -msgstr "Stående" - -#: addressbook/printing/e-contact-print.glade.h:49 -msgid "Landscape" -msgstr "Liggande" - -#: addressbook/printing/e-contact-print.glade.h:52 -msgid "Header" -msgstr "Rubrik" - -#: addressbook/printing/e-contact-print.glade.h:53 -msgid "Footer:" -msgstr "Sidfot:" - -#: addressbook/printing/e-contact-print.glade.h:55 -msgid "Reverse on even pages" -msgstr "Backa vid jämna sidor" - -#: addressbook/printing/e-contact-print.glade.h:56 -msgid "Header/Footer" -msgstr "Rubrik/sidfot" - -#: composer/e-msg-composer-address-dialog.c:183 composer/e-msg-composer.c:533 -msgid "Cut" -msgstr "Klipp ut" - -#: composer/e-msg-composer-address-dialog.c:184 -msgid "Cut selected item into clipboard" -msgstr "Klipp ut markerat objekt till urklipp" - -#: composer/e-msg-composer-address-dialog.c:187 composer/e-msg-composer.c:534 -msgid "Copy" -msgstr "Kopiera" - -#: composer/e-msg-composer-address-dialog.c:188 -msgid "Copy selected item into clipboard" -msgstr "Kopiera markerat objekt till urklipp" - -#: composer/e-msg-composer-address-dialog.c:191 -#: composer/e-msg-composer-address-dialog.c:199 composer/e-msg-composer.c:535 -msgid "Paste" -msgstr "Klistra in" - -#: composer/e-msg-composer-address-dialog.c:192 -#: composer/e-msg-composer-address-dialog.c:200 -msgid "Paste item from clipboard" -msgstr "Klistra in objekt från urklipp" - -#: composer/e-msg-composer-address-dialog.c:528 -msgid "Select recipients' addresses" -msgstr "Välj mottagaradresser" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: composer/e-msg-composer-address-dialog.glade.h:7 -msgid "Recipient list:" -msgstr "Mottagarlista:" - -#: composer/e-msg-composer-address-dialog.glade.h:8 -msgid "Name:" -msgstr "Namn:" - -#: composer/e-msg-composer-address-dialog.glade.h:9 -msgid "Search..." -msgstr "Sök..." - -#: composer/e-msg-composer-address-dialog.glade.h:10 -msgid "Name" -msgstr "Namn" - -#: composer/e-msg-composer-address-dialog.glade.h:11 -msgid "Address" -msgstr "Adress" - -#: composer/e-msg-composer-address-dialog.glade.h:12 -msgid "Properties..." -msgstr "Egenskaper..." - -#: composer/e-msg-composer-address-dialog.glade.h:13 -msgid "Add..." -msgstr "Lägg till..." - -#: composer/e-msg-composer-address-dialog.glade.h:14 -msgid "To: >>" -msgstr "Till: >>" - -#: composer/e-msg-composer-address-dialog.glade.h:15 -msgid "Cc: >>" -msgstr "Cc: >>" - -#: composer/e-msg-composer-address-dialog.glade.h:16 -msgid "Bcc: >>" -msgstr "Bcc: >>" - -#: composer/e-msg-composer-address-dialog.glade.h:17 -msgid "label9" -msgstr "label9" - -#: composer/e-msg-composer-address-dialog.glade.h:18 -msgid "label7" -msgstr "label7" - -#: composer/e-msg-composer-address-dialog.glade.h:19 -msgid "label8" -msgstr "label8" - -#: composer/e-msg-composer-attachment-bar.c:76 -msgid "1 byte" -msgstr "1 byte" - -#: composer/e-msg-composer-attachment-bar.c:78 -#, c-format -msgid "%u bytes" -msgstr "%u byte" - -#: composer/e-msg-composer-attachment-bar.c:85 -#, c-format -msgid "%.1fK" -msgstr "%.1fK" - -#: composer/e-msg-composer-attachment-bar.c:89 -#, c-format -msgid "%.1fM" -msgstr "%.1fM" - -#: composer/e-msg-composer-attachment-bar.c:93 -#, c-format -msgid "%.1fG" -msgstr "%.1fG" - -#: composer/e-msg-composer-attachment-bar.c:307 -msgid "Add attachment" -msgstr "Lägg till bilaga" - -#: composer/e-msg-composer-attachment-bar.c:364 -msgid "Remove" -msgstr "Ta bort" - -#: composer/e-msg-composer-attachment-bar.c:365 -msgid "Remove selected items from the attachment list" -msgstr "Ta bort markerade objekt från bifogningslistan" - -#: composer/e-msg-composer-attachment-bar.c:396 -msgid "Add attachment..." -msgstr "Lägg till bilaga..." - -#: composer/e-msg-composer-attachment-bar.c:397 -msgid "Attach a file to the message" -msgstr "Bifoga en fil till meddelandet" - -#: composer/e-msg-composer-attachment.c:259 -msgid "Select attachment" -msgstr "Välj bilaga" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: composer/e-msg-composer-attachment.glade.h:7 -msgid "Attachment properties" -msgstr "Egenskaper hos bilagan" - -#: composer/e-msg-composer-attachment.glade.h:9 -msgid "MIME type:" -msgstr "Mime-typ:" - -#: composer/e-msg-composer-attachment.glade.h:10 -msgid "File name:" -msgstr "Filnamn:" - -#: composer/e-msg-composer-attachment.glade.h:11 -msgid "Browse..." -msgstr "Bläddra..." - -#: composer/e-msg-composer-hdrs.c:89 -msgid "Click here for the address book" -msgstr "Klicka här för att ta fram adressboken" - -#: composer/e-msg-composer-hdrs.c:124 -msgid "To:" -msgstr "Till:" - -#: composer/e-msg-composer-hdrs.c:125 -msgid "Enter the recipients of the message" -msgstr "Ange meddelandets mottagare" - -#: composer/e-msg-composer-hdrs.c:129 -msgid "Cc:" -msgstr "Cc:" - -#: composer/e-msg-composer-hdrs.c:130 -msgid "Enter the addresses that will receive a carbon copy of the message" -msgstr "Ange adresserna som ska få en kopia av meddelandet" - -#: composer/e-msg-composer-hdrs.c:135 -msgid "Bcc:" -msgstr "Bcc:" - -#: composer/e-msg-composer-hdrs.c:136 -msgid "" -"Enter the addresses that will receive a carbon copy of the message without " -"appearing in the recipient list of the message." -msgstr "" -"Ange adressen till den som ska ta emot extrakopian av meddelandet utan att " -"den visas i mottagandelistan av meddelandet." - -#: composer/e-msg-composer-hdrs.c:142 -msgid "Subject:" -msgstr "Ämne:" - -#: composer/e-msg-composer-hdrs.c:143 -msgid "Enter the subject of the mail" -msgstr "Ange brevets ämne" - -#: composer/e-msg-composer.c:491 -msgid "Save in _folder..." -msgstr "Spara i _mapp..." - -#: composer/e-msg-composer.c:491 -msgid "Save the message in a specified folder" -msgstr "Spara meddelandet i en viss mapp" - -#: composer/e-msg-composer.c:494 composer/e-msg-composer.c:531 -#: mail/folder-browser-factory.c:36 -msgid "Send" -msgstr "Skicka" - -#: composer/e-msg-composer.c:494 -msgid "Send the message" -msgstr "Skicka meddelandet" - -#: composer/e-msg-composer.c:502 -msgid "View _attachments" -msgstr "Visa _bilagor" - -#: composer/e-msg-composer.c:502 -msgid "View/hide attachments" -msgstr "Visa/göm bilagor" - -#: composer/e-msg-composer.c:531 -msgid "Send this message" -msgstr "Skicka detta meddelandet" - -#: composer/e-msg-composer.c:533 -msgid "Cut selected region into the clipboard" -msgstr "Klipp ut markerat område till urklipp" - -#: composer/e-msg-composer.c:534 -msgid "Copy selected region into the clipboard" -msgstr "Kopiera markerat område till urklipp" - -#: composer/e-msg-composer.c:535 -msgid "Paste selected region into the clipboard" -msgstr "Klistra in markerat område till urklipp" - -#: composer/e-msg-composer.c:536 -msgid "Undo" -msgstr "Ångra" - -#: composer/e-msg-composer.c:536 -msgid "Undo last operation" -msgstr "Ångra senaste ändringen" - -#: composer/e-msg-composer.c:538 -msgid "Attach" -msgstr "Bifoga" - -#: composer/e-msg-composer.c:538 -msgid "Attach a file" -msgstr "Bifoga en fil" - -#: mail/folder-browser-factory.c:35 -msgid "Get mail" -msgstr "Hämta post" - -#: mail/folder-browser-factory.c:35 -msgid "Check for new mail" -msgstr "Kolla efter ny post" - -#: mail/folder-browser-factory.c:36 -msgid "Send a new message" -msgstr "Skicka ett nytt meddelande" - -#: mail/folder-browser-factory.c:37 -msgid "Find" -msgstr "Hitta" - -#: mail/folder-browser-factory.c:37 -msgid "Find messages" -msgstr "Hitta meddelanden" - -#: mail/folder-browser-factory.c:41 -msgid "Reply" -msgstr "Svara" - -#: mail/folder-browser-factory.c:41 -msgid "Reply to the sender of this message" -msgstr "Svara till sändaren av det här meddelandet" - -#: mail/folder-browser-factory.c:42 -msgid "Reply to All" -msgstr "Svara till alla" - -#: mail/folder-browser-factory.c:42 -msgid "Reply to all recipients of this message" -msgstr "Svara till alla mottagare av det här meddelandet" - -#: mail/folder-browser-factory.c:44 -msgid "Forward" -msgstr "Skicka vidare" - -#: mail/folder-browser-factory.c:44 -msgid "Forward this message" -msgstr "Skicka detta meddelandet vidare" - -#: mail/folder-browser-factory.c:48 -msgid "Print" -msgstr "Skriv ut" - -#: mail/folder-browser-factory.c:48 -msgid "Print the selected message" -msgstr "Skriv ut markerat meddelande" - -#: mail/folder-browser-factory.c:50 -msgid "Delete this message" -msgstr "Ta bort detta meddelandet" - -#: mail/folder-browser-factory.c:67 -msgid "_Expunge" -msgstr "Rad_era" - -#: mail/folder-browser-factory.c:73 -msgid "_Filter Druid" -msgstr "_Filter guide" - -#: mail/folder-browser-factory.c:186 -msgid "We are sorry, Evolution's Folder Browser can not be initialized." -msgstr "Tyvärr, Evolutions mappbläddrare kan inte initialiseras." - -#: mail/folder-browser.c:208 -msgid "The URI that the Folder Browser will display" -msgstr "URL:en som mappbläddraden kommer att visa" - -#: mail/folder-browser.c:211 -msgid "Whether a message preview should be shown" -msgstr "Huruvida meddelanden ska förhandsgranskas" - -#: mail/main.c:58 -msgid "Mail Component: I could not initialize Bonobo" -msgstr "Postkomponent: Jag kunde inte initialisera Bonobo" - -#: mail/message-list.c:464 -msgid "Priority" -msgstr "Prioritet" - -#: mail/message-list.c:478 -msgid "From" -msgstr "Från" - -#: mail/message-list.c:485 -msgid "Subject" -msgstr "Ämne" - -#: mail/message-list.c:492 -msgid "Sent" -msgstr "Skickat" - -#: mail/message-list.c:499 -msgid "Receive" -msgstr "Mottag" - -#: mail/message-list.c:506 -msgid "To" -msgstr "Till" - -#: mail/message-list.c:513 -msgid "Size" -msgstr "Storlek" - -#. you might have to call gnome_dialog_run() on the -#. * dialog returned here, I don't remember... -#. -#: shell/e-shell-view-menu.c:62 -msgid "Bug buddy was not found in your $PATH." -msgstr "Bug-buddy hittades inte i din $PATH." - -#. same as above -#: shell/e-shell-view-menu.c:68 -msgid "Bug buddy could not be run." -msgstr "Bug-buddy kunde inte köras." - -#: shell/e-shell-view-menu.c:111 -msgid "Evolution" -msgstr "Evolution" - -#: shell/e-shell-view-menu.c:113 -msgid "Copyright 1999, 2000 Helix Code, Inc." -msgstr "Copyright 1999, 2000 Helix Code, Inc." - -#: shell/e-shell-view-menu.c:115 -msgid "" -"Evolution is a suite of groupware applications\n" -"for mail, calendaring, and contact management\n" -"within the GNOME desktop environment." -msgstr "" -"Evolution är en svit av grupprogram\n" -"för epost, kalender, och kontakt-hantering\n" -"inom GNOME's skrivbordsmiljö." - -#: shell/e-shell-view-menu.c:185 shell/e-shell-view-menu.c:251 -msgid "_Folder" -msgstr "_Mapp" - -#: shell/e-shell-view-menu.c:189 -msgid "Evolution _Bar Shortcut" -msgstr "Evolution genvägsrad" - -#: shell/e-shell-view-menu.c:195 -msgid "_Mail message" -msgstr "_Posta meddelande" - -#: shell/e-shell-view-menu.c:196 shell/e-shell-view-menu.c:199 -msgid "Composes a new mail message" -msgstr "Skriv ett nytt brev" - -#: shell/e-shell-view-menu.c:198 -msgid "_Appointment" -msgstr "_Möte" - -#: shell/e-shell-view-menu.c:201 -msgid "Meeting Re_quest" -msgstr "Begäran om möte" - -#: shell/e-shell-view-menu.c:204 -msgid "_Contact" -msgstr "_Kontakt" - -#: shell/e-shell-view-menu.c:207 -msgid "_Task" -msgstr "Uppgif_t" - -#: shell/e-shell-view-menu.c:210 -msgid "Task _Request" -msgstr "Uppgiftsbegä_ran" - -#: shell/e-shell-view-menu.c:213 -msgid "_Journal Entry" -msgstr "_Dagbokpost" - -#: shell/e-shell-view-menu.c:216 -msgid "_Note" -msgstr "_Anteckning" - -#: shell/e-shell-view-menu.c:226 -msgid "_Selected Items" -msgstr "_Markerade objekt" - -#: shell/e-shell-view-menu.c:234 -msgid "_New Folder" -msgstr "_Ny mapp" - -#: shell/e-shell-view-menu.c:242 -msgid "_New" -msgstr "_Ny" - -#: shell/e-shell-view-menu.c:243 -msgid "_Open" -msgstr "_Öppna" - -#: shell/e-shell-view-menu.c:244 -msgid "Clos_e All Items" -msgstr "Stäng _alla objekt" - -#: shell/e-shell-view-menu.c:244 -msgid "Closes all the open items" -msgstr "Stänger alla öppna objekt" - -#: shell/e-shell-view-menu.c:265 -#, fuzzy -msgid "Show _Shortcut Bar" -msgstr "_Växla genvägsrad" - -#: shell/e-shell-view-menu.c:266 -#, fuzzy -msgid "Shows the shortcut bar" -msgstr "Växlar genvägsraden" - -#: shell/e-shell-view-menu.c:268 -#, fuzzy -msgid "Show _Treeview" -msgstr "_Växla trädvy" - -#: shell/e-shell-view-menu.c:269 -#, fuzzy -msgid "Shows the tree view" -msgstr "Växlar trädvyn" - -#: shell/e-shell-view-menu.c:284 -msgid "_Submit bug" -msgstr "_Skicka felrapport" - -#: shell/e-shell-view-menu.c:285 -msgid "Submit bug-report via bug-buddy" -msgstr "Skicka felrapport via bug-buddy" - -#. FIXME: add Favorites here -#: shell/e-shell-view-menu.c:300 -msgid "_Tools" -msgstr "_Verktyg" - -#: shell/e-shell-view-menu.c:301 -msgid "_Actions" -msgstr "_Händelser" - -#: shell/e-shell.c:157 -#, c-format -msgid "Cannot set up local storage -- %s" -msgstr "Kan inte lägga upp lokal sparningsplats -- %s" - -#: shell/main.c:100 -msgid "" -"Hi. Thanks for taking the time to download this preview release of\n" -"the Evolution groupware suite.\n" -"\n" -"The Evolution team has worked hard to make Evolution as robust,\n" -"extensible, pretty, fast and well-suited to heavy internet users as\n" -"possible. And we're very tired. But we're not done -- not yet.\n" -"\n" -"As you explore Evolution, please understand that most of our work has\n" -"been focused on the backend engine which drives the entire system and\n" -"not on the user interface. We are just cresting the hill now, though,\n" -"and will be pouring most of our love and attention into the UI from\n" -"here out. But at least you know that you're not using demoware.\n" -"\n" -"So, time for the nerdy disclaimer. Evolution will: crash, lose your\n" -"mail, leave stray processes running, consume 100% CPU, race, lock,\n" -"send HTML mail to random mailing lists, and embarass you in front of\n" -"your friends and co-workers. Use at your own risk.\n" -"\n" -"We hope that you enjoy the results of our hard work, and we eagerly\n" -"await your contributions!\n" -msgstr "" -"Hej. Tack för att du tog tiden att ladda ner den här förhandsversionen av\n" -"Evolution grupprogramsviten.\n" -"\n" -"Evolution-teamet har jobbat hårt för att göra Evolution så robust,\n" -"utbyggbart, snyggt, snabbt och välutrustat för avancerade internetanvändare " -"som\n" -"möjligt. Och vi är väldigt trötta. Men vi är inte klara -- inte än.\n" -"\n" -"Allt eftersom du utforskar Evolution, var vänlig och förstå att det mesta av " -"vårt arbete har\n" -"fokuserats på backgrundsmotorn som kör hela systemet och\n" -"inte användargränssnittet. Vi håller däremot just på att komma upp för " -"kullen,\n" -"och vi kommer att använda nästan all vår kärlek och uppmärksamhet till UI:et " -"från\n" -"och med nu. Men du vet åtminstone att du inte använder ett demo.\n" -"\n" -"Så, dags för den nördiga förnekelsen. Evolution kommer att: krascha, göra av " -"med din\n" -"epost, lämna kvar förvirrade processer, använda 100% CPU, löpa, låsa sig,\n" -"skicka HTML-post till slumpmässiga maillistor, och skämma ut dig framför\n" -"dina vänner och medarbetare. Använd vid egen risk.\n" -"\n" -"Vi hoppas att du trivs med resultatet av vårt hårda arbete, och vi väntar\n" -"irvrigt på dina bidrag!\n" - -#: shell/main.c:129 -msgid "" -"Thanks\n" -"The Evolution Team\n" -msgstr "" -"Tack\n" -"Evolution-teamet\n" - -#: shell/main.c:156 -msgid "Cannot initialize the Evolution shell." -msgstr "Kan inte initialisera Evolution-skalet" - -#: shell/main.c:186 -msgid "Cannot initialize the Bonobo component system." -msgstr "Kan inte initiera Bonobo-komponentsystemet" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: widgets/e-table/e-table-config.glade.h:7 -msgid "Fields" -msgstr "Poster" - -#: widgets/e-table/e-table-config.glade.h:8 -msgid "Grouping" -msgstr "Gruppering" - -#: widgets/e-table/e-table-config.glade.h:9 -msgid "Sort" -msgstr "Sortera" - -#: widgets/e-table/e-table-config.glade.h:10 -msgid "Filter" -msgstr "Filter" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: widgets/e-table/e-table-group.glade.h:7 -msgid "window1" -msgstr "window1" - -#: widgets/e-table/e-table-group.glade.h:8 -msgid "Available fields" -msgstr "Tillgänliga poster" - -#: widgets/e-table/e-table-group.glade.h:9 -msgid "label1" -msgstr "label1" - -#: widgets/e-table/e-table-group.glade.h:10 -msgid "Show in this order" -msgstr "Visa i denna ordningen" - -#: widgets/e-table/e-table-group.glade.h:11 -msgid "label2" -msgstr "label2" - -#: widgets/e-table/e-table-group.glade.h:12 -msgid "Add >>" -msgstr "Lägg till >>" - -#: widgets/e-table/e-table-group.glade.h:13 -msgid "<< Remove" -msgstr "<< Ta bort" - -#~ msgid "" -#~ "This is a development version of Evolution.\n" -#~ "Using the mail component on your mail files\n" -#~ "is extremely hazardous.\n" -#~ "\n" -#~ "Do not run this program on your real mail,\n" -#~ "do not give it access to your real mail server,\n" -#~ "and do not send mail to real people with it.\n" -#~ "\n" -#~ "You have been warned\n" -#~ msgstr "" -#~ "Det här är en utvecklingsversion av Evolution.\n" -#~ "Att använda brevkomponenten till dina brevfiler\n" -#~ "är extremt riskfyllt.\n" -#~ "\n" -#~ "Kör inte det här programmet på din riktiga epost,\n" -#~ "ge den inte tillgång till din riktiga brevserver,\n" -#~ "och skicka inte brev till riktiga människor med den.\n" -#~ "\n" -#~ "Du har blivit varnad\n" - -#~ msgid "A folder containing mail items" -#~ msgstr "En mapp som innehåller mailobjekt" - -#~ msgid "A folder containing contacts" -#~ msgstr "En mapp som innehåller kontakter" - -#~ msgid "A folder containing calendar entries" -#~ msgstr "En mapp som innehåller kalenderposter" - -#~ msgid "A folder containing tasks" -#~ msgstr "En mapp som innehåller uppgifter" - -#~ msgid "Evolution can not create its local folders" -#~ msgstr "Evolution kan inte skapa sina lokala mappar" - -#~ msgid "A service containing mail items" -#~ msgstr "En tjänst som innehåller postobjekt" - -#~ msgid "A service containing contacts" -#~ msgstr "En tjänst som innehåller kontakter" - -#~ msgid "A service containing calendar entries" -#~ msgstr "En tjänst som innehåller kalanderposter" - -#~ msgid "A service containing tasks" -#~ msgstr "En tjänst som innehåller uppgifter" - -#~ msgid "Large Icons" -#~ msgstr "Stora ikoner" - -#~ msgid "Small Icons" -#~ msgstr "Små ikoner" - -#~ msgid "Add New Group" -#~ msgstr "Lägg till en ny grupp" - -#~ msgid "Remove Group" -#~ msgstr "Ta bort grupp" - -#~ msgid "Rename Group" -#~ msgstr "Byt namn på grupp" - -#~ msgid "Add Shortcut" -#~ msgstr "Lägg till genväg" - -#~ msgid "Open Folder" -#~ msgstr "Öppna mapp" - -#~ msgid "Open in New Window" -#~ msgstr "Öppna i ett nytt fönster" - -#~ msgid "Advanced Find" -#~ msgstr "Avancerat sök" - -#~ msgid "Remove From Shortcut Bar" -#~ msgstr "Ta bort från genvägsraden" - -#~ msgid "Rename Shortcut" -#~ msgstr "Byt namn på genväg" - -#~ msgid "Executive Summary" -#~ msgstr "Slutgiltiga summan" - -#~ msgid "Inbox" -#~ msgstr "Inbox" - -#~ msgid "New mail messages" -#~ msgstr "Nya brev" - -#~ msgid "Sent messages" -#~ msgstr "Skickade brev" - -#~ msgid "Sent mail messages" -#~ msgstr "Skickade brev" - -#~ msgid "Drafts" -#~ msgstr "Utkast" - -#~ msgid "Draft mail messages" -#~ msgstr "Icke färdigskriven epost" - -#~ msgid "Calendar" -#~ msgstr "Kalender" - -#~ msgid "Your calendar" -#~ msgstr "Din kalender" - -#~ msgid "Your contacts list" -#~ msgstr "Din kontaktlista" - -#~ msgid "Tasks" -#~ msgstr "Uppgifter" - -#~ msgid "Tasks list" -#~ msgstr "Lista med uppgifter" - -#~ msgid "Main Shortcuts" -#~ msgstr "Huvudgenvägar" - -#~ msgid "Other Shortcuts" -#~ msgstr "Andra genvägar" - -#~ msgid "New group" -#~ msgstr "Ny grupp" - -#~ msgid "Enables some debugging functions" -#~ msgstr "Aktiverar felsökningsfunktioner" - -#~ msgid "LEVEL" -#~ msgstr "NIVÅ" - -#~ msgid "" -#~ "It was not possible to setup the Evolution startup files. Please\n" -#~ "fix the problem, and restart Evolution" -#~ msgstr "" -#~ "Det gick ej att ställa in Evolutions uppstartsfiler. Var vänlig\n" -#~ "och fixa problemet, och starta om Evolution" - -#~ msgid "" -#~ "An exception occured while trying to load data into the component with " -#~ "PersistStream" -#~ msgstr "" -#~ "Ett undantag uppstod vid laddning av data till komponenten med PersistStream" - -#~ msgid "The %s component doesn't support PersistStream!\n" -#~ msgstr "Komponenten %s stöder inte PersistStream!\n" - -#~ msgid "" -#~ "Evolution detected that the file `%s' is a not a directory.\n" -#~ "\n" -#~ "Evolution can rename the file, delete the file or shutdown and\n" -#~ "let you fix the problem." -#~ msgstr "" -#~ "Evolution har upptäckt att filen \"%s\" inte är en katalog.\n" -#~ "\n" -#~ "Evolution kan byta namn på filen, ta bort den eller stänga av och\n" -#~ "låt dig fixa problemet." - -#~ msgid "Online status" -#~ msgstr "Anslutningsstatus" - -#~ msgid "Message status" -#~ msgstr "Meddelandestatus" diff --git a/po/tr.po b/po/tr.po deleted file mode 100644 index 1dbab7f351..0000000000 --- a/po/tr.po +++ /dev/null @@ -1,1011 +0,0 @@ -# ------------------------------------------------------- -# Copyright (C) 2000 Free Software Foundation, Inc. -# Fatih Demir , 2000. -# -msgid "" -msgstr "" -"Project-Id-Version: evolution 0.0.1\n" -"POT-Creation-Date: 2000-05-28 15:30+0200\n" -"PO-Revision-Date: 2000-05-28 22:32+0200\n" -"Last-Translator: Fatih Demir \n" -"Language-Team: Turkish \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=iso-8859-9\n" -"Content-Transfer-Encoding: 8bit\n" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/contact-editor/e-contact-editor-strings.h:7 -msgid "Contact Editor" -msgstr "Tanýk editörü" - -#: addressbook/contact-editor/e-contact-editor-strings.h:8 -msgid "_Full Name..." -msgstr "_Tam isim ..." - -#: addressbook/contact-editor/e-contact-editor-strings.h:9 -msgid "Company:" -msgstr "Þirket :" - -#: addressbook/contact-editor/e-contact-editor-strings.h:10 -msgid "File As:" -msgstr "Farklý kaydet :" - -#: addressbook/contact-editor/e-contact-editor-strings.h:11 -msgid "Web page address:" -msgstr "Web sitesi :" - -#: addressbook/contact-editor/e-contact-editor-strings.h:12 -msgid "Wants to receive _HTML mail" -msgstr "_HTML ePostasý almayý kabul eder" - -#: addressbook/contact-editor/e-contact-editor-strings.h:13 -msgid "Address:" -msgstr "Adres :" - -#: addressbook/contact-editor/e-contact-editor-strings.h:14 -msgid "_Business" -msgstr "_Meslek" - -#: addressbook/contact-editor/e-contact-editor-strings.h:15 -msgid "_Home" -msgstr "_Ev" - -#: addressbook/contact-editor/e-contact-editor-strings.h:16 -msgid "Business _Fax" -msgstr "Mesleki faks" - -#: addressbook/contact-editor/e-contact-editor-strings.h:17 -msgid "_Mobile" -msgstr "_Cep" - -#: addressbook/contact-editor/e-contact-editor-strings.h:18 -msgid "Primary Email" -msgstr "Ilk ePosta adresi" - -#: addressbook/contact-editor/e-contact-editor-strings.h:19 -msgid "Business" -msgstr "Meslek" - -#: addressbook/contact-editor/e-contact-editor-strings.h:20 -msgid "This is the _mailing address" -msgstr "Bu _ePosta adresidir" - -#: addressbook/contact-editor/e-contact-editor-strings.h:21 -msgid "_Contacts..." -msgstr "_Tanýklar ..." - -#: addressbook/contact-editor/e-contact-editor-strings.h:22 -msgid "Ca_tegories..." -msgstr "_Rummuzlar" - -#: addressbook/contact-editor/e-contact-editor-strings.h:23 -msgid "Job Title" -msgstr "Meslek ismi" - -#: addressbook/contact-editor/e-contact-editor-strings.h:24 -msgid "General" -msgstr "Genel" - -#: addressbook/contact-editor/e-contact-editor-strings.h:25 -msgid "Department:" -msgstr "Daire :" - -#: addressbook/contact-editor/e-contact-editor-strings.h:26 -msgid "Office:" -msgstr "Ofis :" - -#: addressbook/contact-editor/e-contact-editor-strings.h:27 -msgid "Profession:" -msgstr "Meslek :" - -#: addressbook/contact-editor/e-contact-editor-strings.h:28 -msgid "Nickname:" -msgstr "Lakap :" - -#: addressbook/contact-editor/e-contact-editor-strings.h:29 -msgid "Spouse:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:30 -msgid "Birthday:" -msgstr "Doðum günü :" - -#: addressbook/contact-editor/e-contact-editor-strings.h:31 -msgid "Assistant's name:" -msgstr "Yardýmcý ismi :" - -#: addressbook/contact-editor/e-contact-editor-strings.h:32 -msgid "Manager's Name:" -msgstr "Menajer ismi :" - -#: addressbook/contact-editor/e-contact-editor-strings.h:33 -msgid "Anniversary:" -msgstr "Yýl dönümü :" - -#: addressbook/contact-editor/e-contact-editor-strings.h:34 -msgid "Notes:" -msgstr "Notlar :" - -#: addressbook/contact-editor/e-contact-editor-strings.h:35 -msgid "Details" -msgstr "Ince bilgiler" - -#: addressbook/contact-editor/e-contact-editor-strings.h:36 -#: addressbook/contact-editor/e-contact-editor-strings.h:41 -msgid "Add" -msgstr "Ekle" - -#: addressbook/contact-editor/e-contact-editor-strings.h:37 -#: mail/folder-browser-factory.c:50 -msgid "Delete" -msgstr "Sil" - -#: addressbook/contact-editor/e-contact-editor-strings.h:38 -msgid "Phone Types" -msgstr "Telefon tipleri" - -#: addressbook/contact-editor/e-contact-editor-strings.h:39 -#: addressbook/contact-editor/e-contact-editor-strings.h:40 -msgid "New phone type" -msgstr "Yeni telefon tipi" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/contact-editor/fullname-strings.h:7 -msgid "Check Full Name" -msgstr "Tam ismi tara" - -#: addressbook/contact-editor/fullname-strings.h:8 -msgid "_Title:" -msgstr "_Ünvan :" - -#: addressbook/contact-editor/fullname-strings.h:9 -msgid "_First:" -msgstr "_Ad :" - -#: addressbook/contact-editor/fullname-strings.h:10 -msgid "_Middle:" -msgstr "_Orta :" - -#: addressbook/contact-editor/fullname-strings.h:11 -msgid "_Last:" -msgstr "_Soyad :" - -#: addressbook/contact-editor/fullname-strings.h:12 -msgid "_Suffix:" -msgstr "Sone_k :" - -#: addressbook/contact-editor/fullname-strings.h:13 -msgid "" -"\n" -"Mr.\n" -"Mrs.\n" -"Dr.\n" -msgstr "" -"\n" -"Bay\n" -"Bayan\n" -"Dr.\n" - -#: addressbook/contact-editor/fullname-strings.h:18 -msgid "" -"\n" -"Sr.\n" -"Jr.\n" -"I\n" -"II\n" -"III\n" -"Esq.\n" -msgstr "" -"\n" -"Büyük\n" -"Küçük\n" -"I.nci\n" -"II.nci\n" -"III.ncü\n" -"Esq.\n" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/gui/component/ldap-server-dialog.glade.h:7 -#: composer/e-msg-composer-attachment.glade.h:8 -msgid "Description:" -msgstr "Anlatým :" - -#: addressbook/gui/component/ldap-server-dialog.glade.h:8 -msgid "LDAP Server:" -msgstr "LDAP sunucusu :" - -#: addressbook/gui/component/ldap-server-dialog.glade.h:9 -msgid "Port Number:" -msgstr "Kapý no. :" - -#: addressbook/gui/component/ldap-server-dialog.glade.h:10 -msgid "Root DN:" -msgstr "Kök DN :" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/printing/e-contact-print.glade.h:7 -msgid "Page Setup:" -msgstr "Sayfa kurulumu :" - -#: addressbook/printing/e-contact-print.glade.h:8 -msgid "Style name:" -msgstr "Stil adý :" - -#: addressbook/printing/e-contact-print.glade.h:9 -msgid "Preview:" -msgstr "Önizleme :" - -#: addressbook/printing/e-contact-print.glade.h:10 -msgid "Options" -msgstr "Seçenekeler" - -#: addressbook/printing/e-contact-print.glade.h:11 -msgid "Include:" -msgstr "Içer :" - -#: addressbook/printing/e-contact-print.glade.h:12 -msgid "Sections:" -msgstr "Bölümler :" - -#: addressbook/printing/e-contact-print.glade.h:13 -msgid "Immediately follow each other" -msgstr "Daimi biribirini takip et" - -#: addressbook/printing/e-contact-print.glade.h:14 -msgid "Letter tabs on side" -msgstr "Kenarda mektup tab'lerini içer" - -#: addressbook/printing/e-contact-print.glade.h:15 -msgid "Headings for each letter" -msgstr "Her mektup için baþlýklarý içer" - -#: addressbook/printing/e-contact-print.glade.h:16 -msgid "Start on a new page" -msgstr "Yeni bir sayfayla baþla" - -#: addressbook/printing/e-contact-print.glade.h:17 -msgid "Number of columns:" -msgstr "Sütunlar sayýsý :" - -#: addressbook/printing/e-contact-print.glade.h:18 -msgid "Blank forms at end:" -msgstr "Sonda boþ birimler :" - -#: addressbook/printing/e-contact-print.glade.h:19 -msgid "Fonts" -msgstr "Yazý tipleri" - -#: addressbook/printing/e-contact-print.glade.h:20 -#: addressbook/printing/e-contact-print.glade.h:21 -#: addressbook/printing/e-contact-print.glade.h:51 -#: addressbook/printing/e-contact-print.glade.h:54 -msgid "Font..." -msgstr "Yazý tipi ..." - -#: addressbook/printing/e-contact-print.glade.h:22 -msgid "Headings" -msgstr "Baþlýklar" - -#: addressbook/printing/e-contact-print.glade.h:23 -msgid "10 pt. Tahoma" -msgstr "10 nokta Tahoma" - -#: addressbook/printing/e-contact-print.glade.h:24 -msgid "Body" -msgstr "Ileti" - -#: addressbook/printing/e-contact-print.glade.h:25 -msgid "8 pt. Tahoma" -msgstr "8 nokta Tahoma" - -#: addressbook/printing/e-contact-print.glade.h:26 -msgid "Shading" -msgstr "Gölgeleme" - -#: addressbook/printing/e-contact-print.glade.h:27 -msgid "Print using gray shading" -msgstr "Gri gölgelemeyle beraber yazdýr" - -#: addressbook/printing/e-contact-print.glade.h:28 -msgid "Format" -msgstr "Þekil" - -#: addressbook/printing/e-contact-print.glade.h:29 -#: addressbook/printing/e-contact-print.glade.h:50 -msgid "Paper" -msgstr "Kadýt" - -#: addressbook/printing/e-contact-print.glade.h:30 -msgid "Type:" -msgstr "Tip :" - -#: addressbook/printing/e-contact-print.glade.h:31 -#: addressbook/printing/e-contact-print.glade.h:43 -msgid "label26" -msgstr "yafta 26" - -#: addressbook/printing/e-contact-print.glade.h:32 -#: addressbook/printing/e-contact-print.glade.h:44 -msgid "Dimensions:" -msgstr "Boyutlar :" - -#: addressbook/printing/e-contact-print.glade.h:33 -#: addressbook/printing/e-contact-print.glade.h:45 -msgid "Width:" -msgstr "En :" - -#: addressbook/printing/e-contact-print.glade.h:34 -#: addressbook/printing/e-contact-print.glade.h:46 -msgid "Height:" -msgstr "Yükseklik :" - -#: addressbook/printing/e-contact-print.glade.h:35 -msgid "Paper source:" -msgstr "Kaðýt kaynaðý :" - -#: addressbook/printing/e-contact-print.glade.h:36 -msgid "Margins" -msgstr "Kenarlar" - -#: addressbook/printing/e-contact-print.glade.h:37 -msgid "Top:" -msgstr "Üst :" - -#: addressbook/printing/e-contact-print.glade.h:38 -msgid "Bottom:" -msgstr "Dip :" - -#: addressbook/printing/e-contact-print.glade.h:39 -msgid "Left:" -msgstr "Sol :" - -#: addressbook/printing/e-contact-print.glade.h:40 -msgid "Right:" -msgstr "Sað :" - -#: addressbook/printing/e-contact-print.glade.h:41 -msgid "Page" -msgstr "Sayfa" - -#: addressbook/printing/e-contact-print.glade.h:42 -msgid "Size:" -msgstr "Boyut :" - -#: addressbook/printing/e-contact-print.glade.h:47 -msgid "Orientation" -msgstr "Taraflama" - -#: addressbook/printing/e-contact-print.glade.h:48 -msgid "Portrait" -msgstr "Prtre" - -#: addressbook/printing/e-contact-print.glade.h:49 -msgid "Landscape" -msgstr "Manzara" - -#: addressbook/printing/e-contact-print.glade.h:52 -msgid "Header" -msgstr "Baþlýk" - -#: addressbook/printing/e-contact-print.glade.h:53 -msgid "Footer:" -msgstr "Son :" - -#: addressbook/printing/e-contact-print.glade.h:55 -msgid "Reverse on even pages" -msgstr "Tekli sayfalarý ters çevir" - -#: addressbook/printing/e-contact-print.glade.h:56 -msgid "Header/Footer" -msgstr "Baþlýk/Son" - -#: composer/e-msg-composer-address-dialog.c:183 composer/e-msg-composer.c:533 -msgid "Cut" -msgstr "Kes" - -#: composer/e-msg-composer-address-dialog.c:184 -msgid "Cut selected item into clipboard" -msgstr "Seçili birimi arabelleðe kes" - -#: composer/e-msg-composer-address-dialog.c:187 composer/e-msg-composer.c:534 -msgid "Copy" -msgstr "Kopyala" - -#: composer/e-msg-composer-address-dialog.c:188 -msgid "Copy selected item into clipboard" -msgstr "Seçili birimi arabelleðe kopyala" - -#: composer/e-msg-composer-address-dialog.c:191 -#: composer/e-msg-composer-address-dialog.c:199 composer/e-msg-composer.c:535 -msgid "Paste" -msgstr "Yapýþtýr" - -#: composer/e-msg-composer-address-dialog.c:192 -#: composer/e-msg-composer-address-dialog.c:200 -msgid "Paste item from clipboard" -msgstr "Birimi arabellekten yapýþtýr" - -#: composer/e-msg-composer-address-dialog.c:528 -msgid "Select recipients' addresses" -msgstr "Gönderilecek adresleri belirle" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: composer/e-msg-composer-address-dialog.glade.h:7 -msgid "Recipient list:" -msgstr "Alýcýlar listesi :" - -#: composer/e-msg-composer-address-dialog.glade.h:8 -msgid "Name:" -msgstr "Isim :" - -#: composer/e-msg-composer-address-dialog.glade.h:9 -msgid "Search..." -msgstr "Ara ..." - -#: composer/e-msg-composer-address-dialog.glade.h:10 -msgid "Name" -msgstr "Isim" - -#: composer/e-msg-composer-address-dialog.glade.h:11 -msgid "Address" -msgstr "Adres" - -#: composer/e-msg-composer-address-dialog.glade.h:12 -msgid "Properties..." -msgstr "Özellikler ..." - -#: composer/e-msg-composer-address-dialog.glade.h:13 -msgid "Add..." -msgstr "Ekle ..." - -#: composer/e-msg-composer-address-dialog.glade.h:14 -msgid "To: >>" -msgstr "Gönderilen: >>" - -#: composer/e-msg-composer-address-dialog.glade.h:15 -msgid "Cc: >>" -msgstr "Cc: >>" - -#: composer/e-msg-composer-address-dialog.glade.h:16 -msgid "Bcc: >>" -msgstr "Bcc: >>" - -#: composer/e-msg-composer-address-dialog.glade.h:17 -msgid "label9" -msgstr "yafta 9" - -#: composer/e-msg-composer-address-dialog.glade.h:18 -msgid "label7" -msgstr "yafta 7" - -#: composer/e-msg-composer-address-dialog.glade.h:19 -msgid "label8" -msgstr "yafta 8" - -#: composer/e-msg-composer-attachment-bar.c:76 -msgid "1 byte" -msgstr "1 bayt" - -#: composer/e-msg-composer-attachment-bar.c:78 -#, c-format -msgid "%u bytes" -msgstr "%u bayt" - -#: composer/e-msg-composer-attachment-bar.c:85 -#, c-format -msgid "%.1fK" -msgstr "%.1f bin bayt" - -#: composer/e-msg-composer-attachment-bar.c:89 -#, c-format -msgid "%.1fM" -msgstr "%.1f milyon bayt" - -#: composer/e-msg-composer-attachment-bar.c:93 -#, c-format -msgid "%.1fG" -msgstr "%.1f milyar bayt" - -#: composer/e-msg-composer-attachment-bar.c:307 -msgid "Add attachment" -msgstr "Eklem ekle" - -#: composer/e-msg-composer-attachment-bar.c:364 -msgid "Remove" -msgstr "Sil" - -#: composer/e-msg-composer-attachment-bar.c:365 -msgid "Remove selected items from the attachment list" -msgstr "Seçili birimleri eklemler listesinden sil" - -#: composer/e-msg-composer-attachment-bar.c:396 -msgid "Add attachment..." -msgstr "Eklem ekle ..." - -#: composer/e-msg-composer-attachment-bar.c:397 -msgid "Attach a file to the message" -msgstr "Iletiyi bir dosya ekle" - -#: composer/e-msg-composer-attachment.c:259 -msgid "Select attachment" -msgstr "Eklemi seç" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: composer/e-msg-composer-attachment.glade.h:7 -msgid "Attachment properties" -msgstr "Eklenti özellikleri" - -#: composer/e-msg-composer-attachment.glade.h:9 -msgid "MIME type:" -msgstr "MIME türü :" - -#: composer/e-msg-composer-attachment.glade.h:10 -msgid "File name:" -msgstr "Dosya adý :" - -#: composer/e-msg-composer-attachment.glade.h:11 -msgid "Browse..." -msgstr "Gez ..." - -#: composer/e-msg-composer-hdrs.c:89 -msgid "Click here for the address book" -msgstr "Adres defteri için buraya týkla" - -#: composer/e-msg-composer-hdrs.c:124 -msgid "To:" -msgstr "Gn:" - -#: composer/e-msg-composer-hdrs.c:125 -msgid "Enter the recipients of the message" -msgstr "Iletinin gönderildiði kiþiler" - -#: composer/e-msg-composer-hdrs.c:129 -msgid "Cc:" -msgstr "Cc:" - -#: composer/e-msg-composer-hdrs.c:130 -msgid "Enter the addresses that will receive a carbon copy of the message" -msgstr "Iletinin kopyasýnýn gönderilecek olunduðu adresler" - -#: composer/e-msg-composer-hdrs.c:135 -msgid "Bcc:" -msgstr "Bcc:" - -#: composer/e-msg-composer-hdrs.c:136 -msgid "" -"Enter the addresses that will receive a carbon copy of the message without " -"appearing in the recipient list of the message." -msgstr "" -"Iletinin \"kür\" kopyalarýnýn gönderilecek olunduðu adresleri ver ; bunlar " -"kendilerini iletinin gönderildiði kiþiler arasýn da görmeyecektir ." - -#: composer/e-msg-composer-hdrs.c:142 -msgid "Subject:" -msgstr "Konu :" - -#: composer/e-msg-composer-hdrs.c:143 -msgid "Enter the subject of the mail" -msgstr "Iletinin konusunu ver" - -#: composer/e-msg-composer.c:491 -msgid "Save in _folder..." -msgstr "_Dizinde kaydet ..." - -#: composer/e-msg-composer.c:491 -msgid "Save the message in a specified folder" -msgstr "Iletiyi belirlenen dizinde kaydet" - -#: composer/e-msg-composer.c:494 composer/e-msg-composer.c:531 -#: mail/folder-browser-factory.c:36 -msgid "Send" -msgstr "Gönder" - -#: composer/e-msg-composer.c:494 -msgid "Send the message" -msgstr "Iletiyi gönder" - -#: composer/e-msg-composer.c:502 -msgid "View _attachments" -msgstr "_Eklemleri göster" - -#: composer/e-msg-composer.c:502 -msgid "View/hide attachments" -msgstr "Eklemleri göster/gizle" - -#: composer/e-msg-composer.c:531 -msgid "Send this message" -msgstr "Bu iletiyi gönder" - -#: composer/e-msg-composer.c:533 -msgid "Cut selected region into the clipboard" -msgstr "Seçili bölgeyi arabelleðe kes" - -#: composer/e-msg-composer.c:534 -msgid "Copy selected region into the clipboard" -msgstr "Seçili bölgeyi arabelleðe kopyala" - -#: composer/e-msg-composer.c:535 -msgid "Paste selected region into the clipboard" -msgstr "Seçili bölgeyi arabelleðe yapýþtýr" - -#: composer/e-msg-composer.c:536 -msgid "Undo" -msgstr "Gerit" - -#: composer/e-msg-composer.c:536 -msgid "Undo last operation" -msgstr "Son eylemi geri al" - -#: composer/e-msg-composer.c:538 -msgid "Attach" -msgstr "Ekle" - -#: composer/e-msg-composer.c:538 -msgid "Attach a file" -msgstr "Bir dosya ekle" - -#: mail/folder-browser-factory.c:35 -msgid "Get mail" -msgstr "ePosta'yý al" - -#: mail/folder-browser-factory.c:35 -msgid "Check for new mail" -msgstr "Yeni ePosta için bak" - -#: mail/folder-browser-factory.c:36 -msgid "Send a new message" -msgstr "Yeni bir iletiyi gönder" - -#: mail/folder-browser-factory.c:37 -msgid "Find" -msgstr "Bul" - -#: mail/folder-browser-factory.c:37 -msgid "Find messages" -msgstr "Iletileri bul" - -#: mail/folder-browser-factory.c:41 -msgid "Reply" -msgstr "Cevapla" - -#: mail/folder-browser-factory.c:41 -msgid "Reply to the sender of this message" -msgstr "Iletiyi gönderene cevap ver" - -#: mail/folder-browser-factory.c:42 -msgid "Reply to All" -msgstr "Hepsine cevapla" - -#: mail/folder-browser-factory.c:42 -msgid "Reply to all recipients of this message" -msgstr "Iletinin yekin alýcýlarýna cevap ver" - -#: mail/folder-browser-factory.c:44 -msgid "Forward" -msgstr "Ilet" - -#: mail/folder-browser-factory.c:44 -msgid "Forward this message" -msgstr "Bu iletiyi ilet" - -#: mail/folder-browser-factory.c:48 -msgid "Print" -msgstr "Yazdýr" - -#: mail/folder-browser-factory.c:48 -msgid "Print the selected message" -msgstr "Seçili iletiyi yazdýr" - -#: mail/folder-browser-factory.c:50 -msgid "Delete this message" -msgstr "Bu iletiyi sil" - -#: mail/folder-browser-factory.c:67 -msgid "_Expunge" -msgstr "_Temizle" - -#: mail/folder-browser-factory.c:73 -msgid "_Filter Druid ..." -msgstr "_Filtra sihirbazý ..." - -#: mail/folder-browser-factory.c:79 -msgid "_Vfolder Druid ..." -msgstr "_Sanal dizin sihirbazý ..." - -#: mail/folder-browser-factory.c:193 -msgid "We are sorry, Evolution's Folder Browser can not be initialized." -msgstr "Özür dileriz, amma Evolution'un Dizin Gezgini baþlatýlanamadý ." - -#: mail/folder-browser.c:232 -msgid "The URI that the Folder Browser will display" -msgstr "Dizin Gezginini gösterecek olan URI" - -#: mail/folder-browser.c:235 -msgid "Whether a message preview should be shown" -msgstr "Ileti önizlemesinin gösterilmesini belirtir" - -#: mail/main.c:58 -msgid "Mail Component: I could not initialize Bonobo" -msgstr "ePosta parçasý : Bonobo'yu baþlatamadým" - -#: mail/message-list.c:476 -msgid "Priority" -msgstr "Önem" - -#: mail/message-list.c:490 -msgid "From" -msgstr "Gönderen" - -#: mail/message-list.c:497 -msgid "Subject" -msgstr "Konu" - -#: mail/message-list.c:504 -msgid "Sent" -msgstr "Gönderildi" - -#: mail/message-list.c:511 -msgid "Receive" -msgstr "Al" - -#: mail/message-list.c:518 -msgid "To" -msgstr "Gn:" - -#: mail/message-list.c:525 -msgid "Size" -msgstr "Boyut" - -#. you might have to call gnome_dialog_run() on the -#. * dialog returned here, I don't remember... -#. -#: shell/e-shell-view-menu.c:62 -msgid "Bug buddy was not found in your $PATH." -msgstr "Bug-buddy $PATH dizinlenmende bulunamadý." - -#. same as above -#: shell/e-shell-view-menu.c:68 -msgid "Bug buddy could not be run." -msgstr "Bug-buddy çalýþtýrýlýnamadý." - -#: shell/e-shell-view-menu.c:111 -msgid "Evolution" -msgstr "Evolution" - -#: shell/e-shell-view-menu.c:113 -msgid "Copyright 1999, 2000 Helix Code, Inc." -msgstr "Tel'if hakký (C) 1999, 2000 Helix Code, Inc." - -#: shell/e-shell-view-menu.c:115 -msgid "" -"Evolution is a suite of groupware applications\n" -"for mail, calendaring, and contact management\n" -"within the GNOME desktop environment." -msgstr "" -"Evolution GNOME masaüstü için acaip bir ePosta, \n" -"takvim ve tanýklar yönetim uygulamasý\n" -"idir." - -#: shell/e-shell-view-menu.c:185 shell/e-shell-view-menu.c:251 -msgid "_Folder" -msgstr "_Dizin" - -#: shell/e-shell-view-menu.c:189 -msgid "Evolution _Bar Shortcut" -msgstr "Evolution araç çubuðu basamý" - -#: shell/e-shell-view-menu.c:195 -msgid "_Mail message" -msgstr "e_Posta iletisi" - -#: shell/e-shell-view-menu.c:196 shell/e-shell-view-menu.c:199 -msgid "Composes a new mail message" -msgstr "Yeni bir ePosta iletisini yazar" - -#: shell/e-shell-view-menu.c:198 -msgid "_Appointment" -msgstr "T_oplantý" - -#: shell/e-shell-view-menu.c:201 -msgid "Meeting Re_quest" -msgstr "Toplantý is_teði" - -#: shell/e-shell-view-menu.c:204 -msgid "_Contact" -msgstr "_Tanýk" - -#: shell/e-shell-view-menu.c:207 -msgid "_Task" -msgstr "_Görev" - -#: shell/e-shell-view-menu.c:210 -msgid "Task _Request" -msgstr "Görev _isteði" - -#: shell/e-shell-view-menu.c:213 -msgid "_Journal Entry" -msgstr "Gü_nlük birimi" - -#: shell/e-shell-view-menu.c:216 -msgid "_Note" -msgstr "_Not" - -#: shell/e-shell-view-menu.c:226 -msgid "_Selected Items" -msgstr "_Seçili birimler" - -#: shell/e-shell-view-menu.c:234 -msgid "_New Folder" -msgstr "_Yeni dizin" - -#: shell/e-shell-view-menu.c:242 -msgid "_New" -msgstr "_Yeni" - -#: shell/e-shell-view-menu.c:243 -msgid "_Open" -msgstr "_Aç" - -#: shell/e-shell-view-menu.c:244 -msgid "Clos_e All Items" -msgstr "_Yekin birimleri kapat" - -#: shell/e-shell-view-menu.c:244 -msgid "Closes all the open items" -msgstr "Yekin açýk birimleri kapatýr" - -#: shell/e-shell-view-menu.c:265 -msgid "Show _Shortcut Bar" -msgstr "_Kýsayol çubuðunu göster" - -#: shell/e-shell-view-menu.c:266 -msgid "Shows the shortcut bar" -msgstr "Kýsayol çubuðunu gösterir" - -#: shell/e-shell-view-menu.c:268 -msgid "Show _Treeview" -msgstr "_Aðaç bakýþýný göster" - -#: shell/e-shell-view-menu.c:269 -msgid "Shows the tree view" -msgstr "Aðaç bakýþýný gösterir" - -#: shell/e-shell-view-menu.c:284 -msgid "_Submit bug" -msgstr "Hata raporunu _gönder" - -#: shell/e-shell-view-menu.c:285 -msgid "Submit bug-report via bug-buddy" -msgstr "bug-buddy desteðiyle bir hata raporunu gönder" - -#. FIXME: add Favorites here -#: shell/e-shell-view-menu.c:300 -msgid "_Tools" -msgstr "_Çerezler" - -#: shell/e-shell-view-menu.c:301 -msgid "_Actions" -msgstr "E_ylemler" - -#: shell/e-shell.c:157 -#, c-format -msgid "Cannot set up local storage -- %s" -msgstr "Yerel kaydý kuramadým -- %s" - -#: shell/main.c:100 -msgid "" -"Hi. Thanks for taking the time to download this preview release of\n" -"the Evolution groupware suite.\n" -"\n" -"The Evolution team has worked hard to make Evolution as robust,\n" -"extensible, pretty, fast and well-suited to heavy internet users as\n" -"possible. And we're very tired. But we're not done -- not yet.\n" -"\n" -"As you explore Evolution, please understand that most of our work has\n" -"been focused on the backend engine which drives the entire system and\n" -"not on the user interface. We are just cresting the hill now, though,\n" -"and will be pouring most of our love and attention into the UI from\n" -"here out. But at least you know that you're not using demoware.\n" -"\n" -"So, time for the nerdy disclaimer. Evolution will: crash, lose your\n" -"mail, leave stray processes running, consume 100% CPU, race, lock,\n" -"send HTML mail to random mailing lists, and embarass you in front of\n" -"your friends and co-workers. Use at your own risk.\n" -"\n" -"We hope that you enjoy the results of our hard work, and we eagerly\n" -"await your contributions!\n" -msgstr "" - -#: shell/main.c:129 -msgid "" -"Thanks\n" -"The Evolution Team\n" -msgstr "" -"Teþekkürler\n" -"Evolution Takýmý\n" - -#: shell/main.c:156 -msgid "Cannot initialize the Evolution shell." -msgstr "Evolution komutasýný baþlatamadým ." - -#: shell/main.c:186 -msgid "Cannot initialize the Bonobo component system." -msgstr "Bonobo parçalar sistemini baþlatamadým." - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: widgets/e-table/e-table-config.glade.h:7 -msgid "Fields" -msgstr "Veriyler" - -#: widgets/e-table/e-table-config.glade.h:8 -msgid "Grouping" -msgstr "Kitleleþme" - -#: widgets/e-table/e-table-config.glade.h:9 -msgid "Sort" -msgstr "Sýralama" - -#: widgets/e-table/e-table-config.glade.h:10 -msgid "Filter" -msgstr "Filtra" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: widgets/e-table/e-table-group.glade.h:7 -msgid "window1" -msgstr "pencere1" - -#: widgets/e-table/e-table-group.glade.h:8 -msgid "Available fields" -msgstr "Eriþilir veriyler" - -#: widgets/e-table/e-table-group.glade.h:9 -msgid "label1" -msgstr "yafta 1" - -#: widgets/e-table/e-table-group.glade.h:10 -msgid "Show in this order" -msgstr "Bu sýralamada göster" - -#: widgets/e-table/e-table-group.glade.h:11 -msgid "label2" -msgstr "yafta 2" - -#: widgets/e-table/e-table-group.glade.h:12 -msgid "Add >>" -msgstr "Ekle >>" - -#: widgets/e-table/e-table-group.glade.h:13 -msgid "<< Remove" -msgstr "<< Sil" diff --git a/po/uk.po b/po/uk.po deleted file mode 100644 index 91f5c26110..0000000000 --- a/po/uk.po +++ /dev/null @@ -1,1171 +0,0 @@ -# Ukrainian translation of evolution. -# Copyright (C) 2000 Free Software Foundation, Inc. -# Yuri Syrota , 2000. -# -msgid "" -msgstr "" -"Project-Id-Version: evolution 0.1\n" -"POT-Creation-Date: 2000-05-27 20:01+0100\n" -"PO-Revision-Date: 2000-04-04 15:25+0200\n" -"Last-Translator: Yuri Syrota \n" -"Language-Team: Ukrainian \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=koi8-u\n" -"Content-Transfer-Encoding: 8-bit\n" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/contact-editor/e-contact-editor-strings.h:7 -#, fuzzy -msgid "Contact Editor" -msgstr "ëÏÎÔÁËÔ" - -#: addressbook/contact-editor/e-contact-editor-strings.h:8 -msgid "_Full Name..." -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:9 -#, fuzzy -msgid "Company:" -msgstr "óËÏЦÀ×ÁÔÉ" - -#: addressbook/contact-editor/e-contact-editor-strings.h:10 -msgid "File As:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:11 -msgid "Web page address:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:12 -msgid "Wants to receive _HTML mail" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:13 -msgid "Address:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:14 -msgid "_Business" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:15 -#, fuzzy -msgid "_Home" -msgstr "îÏÔÁÔËÁ" - -#: addressbook/contact-editor/e-contact-editor-strings.h:16 -msgid "Business _Fax" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:17 -#, fuzzy -msgid "_Mobile" -msgstr "ðÏÛÔÁ" - -#: addressbook/contact-editor/e-contact-editor-strings.h:18 -msgid "Primary Email" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:19 -msgid "Business" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:20 -msgid "This is the _mailing address" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:21 -#, fuzzy -msgid "_Contacts..." -msgstr "ëÏÎÔÁËÔ" - -#: addressbook/contact-editor/e-contact-editor-strings.h:22 -msgid "Ca_tegories..." -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:23 -msgid "Job Title" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:24 -msgid "General" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:25 -msgid "Department:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:26 -msgid "Office:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:27 -msgid "Profession:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:28 -msgid "Nickname:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:29 -msgid "Spouse:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:30 -msgid "Birthday:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:31 -msgid "Assistant's name:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:32 -msgid "Manager's Name:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:33 -msgid "Anniversary:" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:34 -#, fuzzy -msgid "Notes:" -msgstr "îÏÔÁÔËÁ" - -#: addressbook/contact-editor/e-contact-editor-strings.h:35 -msgid "Details" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:36 -#: addressbook/contact-editor/e-contact-editor-strings.h:41 -msgid "Add" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:37 -#: mail/folder-browser-factory.c:50 -msgid "Delete" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:38 -msgid "Phone Types" -msgstr "" - -#: addressbook/contact-editor/e-contact-editor-strings.h:39 -#: addressbook/contact-editor/e-contact-editor-strings.h:40 -msgid "New phone type" -msgstr "" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/contact-editor/fullname-strings.h:7 -msgid "Check Full Name" -msgstr "" - -#: addressbook/contact-editor/fullname-strings.h:8 -msgid "_Title:" -msgstr "" - -#: addressbook/contact-editor/fullname-strings.h:9 -msgid "_First:" -msgstr "" - -#: addressbook/contact-editor/fullname-strings.h:10 -#, fuzzy -msgid "_Middle:" -msgstr "ðÏÛÔÁ" - -#: addressbook/contact-editor/fullname-strings.h:11 -msgid "_Last:" -msgstr "" - -#: addressbook/contact-editor/fullname-strings.h:12 -msgid "_Suffix:" -msgstr "" - -#: addressbook/contact-editor/fullname-strings.h:13 -msgid "" -"\n" -"Mr.\n" -"Mrs.\n" -"Dr.\n" -msgstr "" - -#: addressbook/contact-editor/fullname-strings.h:18 -msgid "" -"\n" -"Sr.\n" -"Jr.\n" -"I\n" -"II\n" -"III\n" -"Esq.\n" -msgstr "" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/gui/component/ldap-server-dialog.glade.h:7 -#: composer/e-msg-composer-attachment.glade.h:8 -msgid "Description:" -msgstr "" - -#: addressbook/gui/component/ldap-server-dialog.glade.h:8 -msgid "LDAP Server:" -msgstr "" - -#: addressbook/gui/component/ldap-server-dialog.glade.h:9 -msgid "Port Number:" -msgstr "" - -#: addressbook/gui/component/ldap-server-dialog.glade.h:10 -msgid "Root DN:" -msgstr "" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: addressbook/printing/e-contact-print.glade.h:7 -msgid "Page Setup:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:8 -msgid "Style name:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:9 -msgid "Preview:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:10 -#, fuzzy -msgid "Options" -msgstr "䦧" - -#: addressbook/printing/e-contact-print.glade.h:11 -msgid "Include:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:12 -#, fuzzy -msgid "Sections:" -msgstr "䦧" - -#: addressbook/printing/e-contact-print.glade.h:13 -msgid "Immediately follow each other" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:14 -msgid "Letter tabs on side" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:15 -msgid "Headings for each letter" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:16 -msgid "Start on a new page" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:17 -msgid "Number of columns:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:18 -msgid "Blank forms at end:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:19 -#, fuzzy -msgid "Fonts" -msgstr "ëÏÎÔÁËÔÉ" - -#: addressbook/printing/e-contact-print.glade.h:20 -#: addressbook/printing/e-contact-print.glade.h:21 -#: addressbook/printing/e-contact-print.glade.h:51 -#: addressbook/printing/e-contact-print.glade.h:54 -msgid "Font..." -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:22 -msgid "Headings" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:23 -msgid "10 pt. Tahoma" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:24 -#, fuzzy -msgid "Body" -msgstr "óØÏÇÏÄΦ" - -#: addressbook/printing/e-contact-print.glade.h:25 -msgid "8 pt. Tahoma" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:26 -msgid "Shading" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:27 -msgid "Print using gray shading" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:28 -#, fuzzy -msgid "Format" -msgstr "÷¦Ä" - -#: addressbook/printing/e-contact-print.glade.h:29 -#: addressbook/printing/e-contact-print.glade.h:50 -#, fuzzy -msgid "Paper" -msgstr "÷ÓÔÁ×ÉÔÉ" - -#: addressbook/printing/e-contact-print.glade.h:30 -msgid "Type:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:31 -#: addressbook/printing/e-contact-print.glade.h:43 -msgid "label26" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:32 -#: addressbook/printing/e-contact-print.glade.h:44 -msgid "Dimensions:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:33 -#: addressbook/printing/e-contact-print.glade.h:45 -msgid "Width:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:34 -#: addressbook/printing/e-contact-print.glade.h:46 -msgid "Height:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:35 -msgid "Paper source:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:36 -msgid "Margins" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:37 -#, fuzzy -msgid "Top:" -msgstr "äÏ:" - -#: addressbook/printing/e-contact-print.glade.h:38 -msgid "Bottom:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:39 -msgid "Left:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:40 -msgid "Right:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:41 -#, fuzzy -msgid "Page" -msgstr "÷ÓÔÁ×ÉÔÉ" - -#: addressbook/printing/e-contact-print.glade.h:42 -#, fuzzy -msgid "Size:" -msgstr "òÏÚͦÒ" - -#: addressbook/printing/e-contact-print.glade.h:47 -msgid "Orientation" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:48 -#, fuzzy -msgid "Portrait" -msgstr "ðÒÉÏÒ¦ÔÅÔ" - -#: addressbook/printing/e-contact-print.glade.h:49 -msgid "Landscape" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:52 -msgid "Header" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:53 -msgid "Footer:" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:55 -msgid "Reverse on even pages" -msgstr "" - -#: addressbook/printing/e-contact-print.glade.h:56 -msgid "Header/Footer" -msgstr "" - -#: composer/e-msg-composer-address-dialog.c:183 composer/e-msg-composer.c:533 -msgid "Cut" -msgstr "÷ÉÒ¦ÚÁÔÉ" - -#: composer/e-msg-composer-address-dialog.c:184 -msgid "Cut selected item into clipboard" -msgstr "÷ÉÒ¦ÚÁÔÉ ×ÉÂÒÁÎÉÊ ÅÌÅÍÅÎÔ × ÂÕÆÅÒ ÏÂͦÎÕ" - -#: composer/e-msg-composer-address-dialog.c:187 composer/e-msg-composer.c:534 -msgid "Copy" -msgstr "óËÏЦÀ×ÁÔÉ" - -#: composer/e-msg-composer-address-dialog.c:188 -msgid "Copy selected item into clipboard" -msgstr "óËÏЦÀ×ÁÔÉ ×ÉÂÒÁÎÉÊ ÅÌÅÍÅÎÔ × ÂÕÆÅÒ ÏÂͦÎÕ" - -#: composer/e-msg-composer-address-dialog.c:191 -#: composer/e-msg-composer-address-dialog.c:199 composer/e-msg-composer.c:535 -msgid "Paste" -msgstr "÷ÓÔÁ×ÉÔÉ" - -#: composer/e-msg-composer-address-dialog.c:192 -#: composer/e-msg-composer-address-dialog.c:200 -msgid "Paste item from clipboard" -msgstr "÷ÓÔÁ×ÉÔÉ ÅÌÅÍÅÎÔ Ú ÂÕÆÅÒÕ ÏÂͦÎÕ" - -#: composer/e-msg-composer-address-dialog.c:528 -msgid "Select recipients' addresses" -msgstr "÷ÉÂÒÁÔÉ ÁÄÒÅÓÉ ÁÄÒÅÓÁÔ¦×" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: composer/e-msg-composer-address-dialog.glade.h:7 -msgid "Recipient list:" -msgstr "" - -#: composer/e-msg-composer-address-dialog.glade.h:8 -msgid "Name:" -msgstr "" - -#: composer/e-msg-composer-address-dialog.glade.h:9 -msgid "Search..." -msgstr "" - -#: composer/e-msg-composer-address-dialog.glade.h:10 -msgid "Name" -msgstr "" - -#: composer/e-msg-composer-address-dialog.glade.h:11 -msgid "Address" -msgstr "" - -#: composer/e-msg-composer-address-dialog.glade.h:12 -#, fuzzy -msgid "Properties..." -msgstr "÷ÌÁÓÔÉ×ÏÓÔ¦" - -#: composer/e-msg-composer-address-dialog.glade.h:13 -msgid "Add..." -msgstr "" - -#: composer/e-msg-composer-address-dialog.glade.h:14 -#, fuzzy -msgid "To: >>" -msgstr "äÏ:" - -#: composer/e-msg-composer-address-dialog.glade.h:15 -#, fuzzy -msgid "Cc: >>" -msgstr "Cc:" - -#: composer/e-msg-composer-address-dialog.glade.h:16 -#, fuzzy -msgid "Bcc: >>" -msgstr "Bcc:" - -#: composer/e-msg-composer-address-dialog.glade.h:17 -msgid "label9" -msgstr "" - -#: composer/e-msg-composer-address-dialog.glade.h:18 -msgid "label7" -msgstr "" - -#: composer/e-msg-composer-address-dialog.glade.h:19 -msgid "label8" -msgstr "" - -#: composer/e-msg-composer-attachment-bar.c:76 -msgid "1 byte" -msgstr "1 ÂÁÊÔ" - -#: composer/e-msg-composer-attachment-bar.c:78 -#, c-format -msgid "%u bytes" -msgstr "%u ÂÁÊÔ¦×" - -#: composer/e-msg-composer-attachment-bar.c:85 -#, c-format -msgid "%.1fK" -msgstr "%.1fë" - -#: composer/e-msg-composer-attachment-bar.c:89 -#, c-format -msgid "%.1fM" -msgstr "%.1fí" - -#: composer/e-msg-composer-attachment-bar.c:93 -#, c-format -msgid "%.1fG" -msgstr "%.1fç" - -#: composer/e-msg-composer-attachment-bar.c:307 -msgid "Add attachment" -msgstr "äÏÌÕÞÉÔÉ" - -#: composer/e-msg-composer-attachment-bar.c:364 -msgid "Remove" -msgstr "÷ÉÄÁÌÉÔÉ" - -#: composer/e-msg-composer-attachment-bar.c:365 -msgid "Remove selected items from the attachment list" -msgstr "÷ÉÄÁÌÉÔÉ ×ÉÂÒÁΦ ÅÌÅÍÅÎÔÉ Ú ÓÐÉÓËÕ ÄÏÌÕÞÅÎÎÑ" - -#: composer/e-msg-composer-attachment-bar.c:396 -msgid "Add attachment..." -msgstr "äÏÌÕÞÉÔÉ..." - -#: composer/e-msg-composer-attachment-bar.c:397 -msgid "Attach a file to the message" -msgstr "äÏÌÕÞÉÔÉ ÆÁÊÌ ÄÏ ÐÏצÄÏÍÌÅÎÎÑ" - -#: composer/e-msg-composer-attachment.c:259 -msgid "Select attachment" -msgstr "÷ÉÂÒÁÔÉ ÄÏÌÕÞÅÎÎÑ" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: composer/e-msg-composer-attachment.glade.h:7 -#, fuzzy -msgid "Attachment properties" -msgstr "äÏÌÕÞÅÎÎÑ" - -#: composer/e-msg-composer-attachment.glade.h:9 -msgid "MIME type:" -msgstr "" - -#: composer/e-msg-composer-attachment.glade.h:10 -msgid "File name:" -msgstr "" - -#: composer/e-msg-composer-attachment.glade.h:11 -msgid "Browse..." -msgstr "" - -#: composer/e-msg-composer-hdrs.c:89 -msgid "Click here for the address book" -msgstr "ëÌÁÃΦÔØ ÔÕÔ ÝÏ ×ÉËÌÉËÁÔÉ ÁÄÒÅÓÎÕ ËÎÉÇÕ" - -#: composer/e-msg-composer-hdrs.c:124 -msgid "To:" -msgstr "äÏ:" - -#: composer/e-msg-composer-hdrs.c:125 -msgid "Enter the recipients of the message" -msgstr "÷×ÅĦÔØ ÁÄÒÅÓÁÔ¦× ÐÏצÄÏÍÌÅÎÎÑ" - -#: composer/e-msg-composer-hdrs.c:129 -msgid "Cc:" -msgstr "Cc:" - -#: composer/e-msg-composer-hdrs.c:130 -msgid "Enter the addresses that will receive a carbon copy of the message" -msgstr "÷×ÅĦÔØ ÁÄÒÅÓÁÔ¦×, ÝÏ ÏÔÒÉÍÁÀÔØ ËÏЦÀ ÐÏצÄÏÍÌÅÎÎÑ" - -#: composer/e-msg-composer-hdrs.c:135 -msgid "Bcc:" -msgstr "Bcc:" - -#: composer/e-msg-composer-hdrs.c:136 -msgid "" -"Enter the addresses that will receive a carbon copy of the message without " -"appearing in the recipient list of the message." -msgstr "" -"÷×ÅĦÔØ ÁÄÒÅÓÁÔ¦×, ÝÏ ÏÔÒÉÍÁÀÔØ ËÏЦÀ ÐÏצÄÏÍÌÅÎÎÑ ÎÅ ÐÏÐÁ×ÛÉ × ÓÐÉÓÏË " -"ÏÔÒÉÍÕ×ÁÞ¦×." - -#: composer/e-msg-composer-hdrs.c:142 -msgid "Subject:" -msgstr "ôÅÍÁ:" - -#: composer/e-msg-composer-hdrs.c:143 -msgid "Enter the subject of the mail" -msgstr "÷×ÅĦÔØ ÔÅÍÕ ÐÏÓÌÁÎÎÑ" - -#: composer/e-msg-composer.c:491 -msgid "Save in _folder..." -msgstr "úÂÅÒÅÇÔÉ Õ ÆÏÌÄÅÒ..." - -#: composer/e-msg-composer.c:491 -msgid "Save the message in a specified folder" -msgstr "úÂÅÒÅÇÔÉ ÐÏצÄÏÍÌÅÎÎÑ Õ ×ËÁÚÁÎÉÊ ÆÏÌÄÅÒ" - -#: composer/e-msg-composer.c:494 composer/e-msg-composer.c:531 -#: mail/folder-browser-factory.c:36 -msgid "Send" -msgstr "÷¦Ä¦ÓÌÁÔÉ" - -#: composer/e-msg-composer.c:494 -msgid "Send the message" -msgstr "÷¦Ä¦ÓÌÁÔÉ ÐÏצÄÏÍÌÅÎÎÑ" - -#: composer/e-msg-composer.c:502 -msgid "View _attachments" -msgstr "ðÏËÁÚÁÔÉ ÄÏÌÕÞÅÎÎÑ" - -#: composer/e-msg-composer.c:502 -msgid "View/hide attachments" -msgstr "ðÏËÁÚÁÔÉ/ÐÒÉÂÒÁÔÉ ÄÏÌÕÞÅÎÎÑ" - -#: composer/e-msg-composer.c:531 -msgid "Send this message" -msgstr "÷¦Ä¦ÓÌÁÔÉ ÃÅ ÐÏצÄÏÍÌÅÎÎÑ" - -#: composer/e-msg-composer.c:533 -msgid "Cut selected region into the clipboard" -msgstr "÷ÉÒ¦ÚÁÔÉ ×ÉÂÒÁÎÕ ÞÁÓÔÉÎÕ Õ ÂÕÆÅÒ ÏÂͦÎÕ" - -#: composer/e-msg-composer.c:534 -msgid "Copy selected region into the clipboard" -msgstr "óËÏЦÀ×ÁÔÉ ×ÉÂÒÁÎÕ ÞÁÓÔÉÎÕ Õ ÂÕÆÅÒ ÏÂͦÎÕ" - -#: composer/e-msg-composer.c:535 -msgid "Paste selected region into the clipboard" -msgstr "÷ÓÔÁ×ÉÔÉ ×ÉÂÒÁÎÕ ÞÁÓÔÉÎÕ × ÂÕÆÅÒ ÏÂͦÎÕ" - -#: composer/e-msg-composer.c:536 -msgid "Undo" -msgstr "÷¦ÄͦÎÉÔÉ" - -#: composer/e-msg-composer.c:536 -msgid "Undo last operation" -msgstr "÷¦ÄͦÎÉÔÉ ÏÓÔÁÎÎÀ ÏÐÅÒÁæÀ" - -#: composer/e-msg-composer.c:538 -msgid "Attach" -msgstr "äÏÌÕÞÉÔÉ" - -#: composer/e-msg-composer.c:538 -msgid "Attach a file" -msgstr "äÏÌÕÞÉÔÉ ÆÁÊÌ" - -#: mail/folder-browser-factory.c:35 -msgid "Get mail" -msgstr "" - -#: mail/folder-browser-factory.c:35 -msgid "Check for new mail" -msgstr "" - -#: mail/folder-browser-factory.c:36 -#, fuzzy -msgid "Send a new message" -msgstr "÷¦Ä¦ÓÌÁÔÉ ÐÏצÄÏÍÌÅÎÎÑ" - -#: mail/folder-browser-factory.c:37 -msgid "Find" -msgstr "" - -#: mail/folder-browser-factory.c:37 -#, fuzzy -msgid "Find messages" -msgstr "÷¦Ä¦ÓÌÁΦ ÐÏצÄÏÍÌÅÎÎÑ" - -#: mail/folder-browser-factory.c:41 -msgid "Reply" -msgstr "" - -#: mail/folder-browser-factory.c:41 -#, fuzzy -msgid "Reply to the sender of this message" -msgstr "÷×ÅĦÔØ ÁÄÒÅÓÁÔ¦× ÐÏצÄÏÍÌÅÎÎÑ" - -#: mail/folder-browser-factory.c:42 -msgid "Reply to All" -msgstr "" - -#: mail/folder-browser-factory.c:42 -#, fuzzy -msgid "Reply to all recipients of this message" -msgstr "÷×ÅĦÔØ ÁÄÒÅÓÁÔ¦× ÐÏצÄÏÍÌÅÎÎÑ" - -#: mail/folder-browser-factory.c:44 -msgid "Forward" -msgstr "" - -#: mail/folder-browser-factory.c:44 -#, fuzzy -msgid "Forward this message" -msgstr "÷¦Ä¦ÓÌÁÔÉ ÃÅ ÐÏצÄÏÍÌÅÎÎÑ" - -#: mail/folder-browser-factory.c:48 -#, fuzzy -msgid "Print" -msgstr "ðÒÉÏÒ¦ÔÅÔ" - -#: mail/folder-browser-factory.c:48 -#, fuzzy -msgid "Print the selected message" -msgstr "÷×ÅĦÔØ ÁÄÒÅÓÁÔ¦× ÐÏצÄÏÍÌÅÎÎÑ" - -#: mail/folder-browser-factory.c:50 -#, fuzzy -msgid "Delete this message" -msgstr "÷¦Ä¦ÓÌÁÔÉ ÃÅ ÐÏצÄÏÍÌÅÎÎÑ" - -#: mail/folder-browser-factory.c:67 -msgid "_Expunge" -msgstr "" - -#: mail/folder-browser-factory.c:73 -msgid "_Filter Druid" -msgstr "" - -#: mail/folder-browser-factory.c:186 -msgid "We are sorry, Evolution's Folder Browser can not be initialized." -msgstr "ðÅÒÅÇÌÑÄÁÞ ÔÅËÉ Evolution ÎÅÍÏÖÌÉ×Ï ¦Î¦Ã¦Á̦ÚÕ×ÁÔÉ." - -#: mail/folder-browser.c:208 -msgid "The URI that the Folder Browser will display" -msgstr "URI ÔÅËÉ, ÝÏ ÂÕÄŠצÄÏÂÒÁÖÅÎÏ ÐÅÒÅÇÌÑÄÁÞÅÍ" - -#: mail/folder-browser.c:211 -msgid "Whether a message preview should be shown" -msgstr "ëÏÌÉ ÍÁ¤ ÐÏËÁÚÕ×ÁÔÉÓØ ÐÏÐÅÒÅÄÎ¦Ê ÐÅÒÅÇÌÑÄ ÐÏצÄÏÍÌÅÎÎÑ" - -#: mail/main.c:58 -msgid "Mail Component: I could not initialize Bonobo" -msgstr "ðÏÛÔÏ×ÉÊ ËÏÍÐÏÎÅÎÔ: ÎÅ ×ÄÁÌÏÓØ ¦Î¦Ã¦Á̦ÚÕ×ÁÔÉ Bonobo" - -#: mail/message-list.c:464 -msgid "Priority" -msgstr "ðÒÉÏÒ¦ÔÅÔ" - -#: mail/message-list.c:478 -msgid "From" -msgstr "÷¦Ä" - -#: mail/message-list.c:485 -msgid "Subject" -msgstr "ôÅÍÁ" - -#: mail/message-list.c:492 -msgid "Sent" -msgstr "÷¦Ä¦ÓÌÁÎÏ" - -#: mail/message-list.c:499 -msgid "Receive" -msgstr "ïÔÒÉÍÁÎÏ" - -#: mail/message-list.c:506 -msgid "To" -msgstr "äÏ" - -#: mail/message-list.c:513 -msgid "Size" -msgstr "òÏÚͦÒ" - -#. you might have to call gnome_dialog_run() on the -#. * dialog returned here, I don't remember... -#. -#: shell/e-shell-view-menu.c:62 -msgid "Bug buddy was not found in your $PATH." -msgstr "" - -#. same as above -#: shell/e-shell-view-menu.c:68 -msgid "Bug buddy could not be run." -msgstr "" - -#: shell/e-shell-view-menu.c:111 -msgid "Evolution" -msgstr "" - -#: shell/e-shell-view-menu.c:113 -msgid "Copyright 1999, 2000 Helix Code, Inc." -msgstr "" - -#: shell/e-shell-view-menu.c:115 -msgid "" -"Evolution is a suite of groupware applications\n" -"for mail, calendaring, and contact management\n" -"within the GNOME desktop environment." -msgstr "" - -#: shell/e-shell-view-menu.c:185 shell/e-shell-view-menu.c:251 -msgid "_Folder" -msgstr "æÏÌÄÅÒ" - -#: shell/e-shell-view-menu.c:189 -msgid "Evolution _Bar Shortcut" -msgstr "ì¦Î¦ÊËÁ ÑÒÌÉË¦× Evolution" - -#: shell/e-shell-view-menu.c:195 -msgid "_Mail message" -msgstr "÷¦Ä¦ÓÌÁÔÉ ÐÏצÄÏÍÌÅÎÎÑ" - -#: shell/e-shell-view-menu.c:196 shell/e-shell-view-menu.c:199 -msgid "Composes a new mail message" -msgstr "ð¦ÄÇÏÔÕ×ÁÔÉ ÎÏ×Å ÐÏÛÔÏ×Å ÐÏצÄÏÍÌÅÎÎÑ" - -#: shell/e-shell-view-menu.c:198 -msgid "_Appointment" -msgstr "úÕÓÔÒ¦Þ" - -#: shell/e-shell-view-menu.c:201 -msgid "Meeting Re_quest" -msgstr "úÁÐÉÔ ÚÕÓÔÒ¦Þ¦" - -#: shell/e-shell-view-menu.c:204 -msgid "_Contact" -msgstr "ëÏÎÔÁËÔ" - -#: shell/e-shell-view-menu.c:207 -msgid "_Task" -msgstr "úÁ×ÄÁÎÎÑ" - -#: shell/e-shell-view-menu.c:210 -msgid "Task _Request" -msgstr "úÁÐÉÔ ÚÁ×ÄÁÎÎÑ" - -#: shell/e-shell-view-menu.c:213 -msgid "_Journal Entry" -msgstr "öÕÒÎÁÌØÎÉÊ ÒÑÄÏË" - -#: shell/e-shell-view-menu.c:216 -msgid "_Note" -msgstr "îÏÔÁÔËÁ" - -#: shell/e-shell-view-menu.c:226 -msgid "_Selected Items" -msgstr "÷ÉÂÒÁΦ ÅÌÅÍÅÎÔÉ" - -#: shell/e-shell-view-menu.c:234 -msgid "_New Folder" -msgstr "îÏ×ÉÊ ÆÏÌÄÅÒ" - -#: shell/e-shell-view-menu.c:242 -msgid "_New" -msgstr "îÏ×ÉÊ" - -#: shell/e-shell-view-menu.c:243 -msgid "_Open" -msgstr "÷¦ÄËÒÉÔÉ" - -#: shell/e-shell-view-menu.c:244 -msgid "Clos_e All Items" -msgstr "úÁËÒÉÔÉ ×Ó¦ ÅÌÅÍÅÎÔÉ" - -#: shell/e-shell-view-menu.c:244 -msgid "Closes all the open items" -msgstr "úÁËÒÉ×Á¤ ×Ó¦ צÄËÒÉÔ¦ ÅÌÅÍÅÎÔÉ" - -#: shell/e-shell-view-menu.c:265 -#, fuzzy -msgid "Show _Shortcut Bar" -msgstr "÷ÉÌÕÞÉÔÉ Ú ÐÁÎÅ̦ ̦ΦÊËÉ" - -#: shell/e-shell-view-menu.c:266 -msgid "Shows the shortcut bar" -msgstr "" - -#: shell/e-shell-view-menu.c:268 -msgid "Show _Treeview" -msgstr "" - -#: shell/e-shell-view-menu.c:269 -msgid "Shows the tree view" -msgstr "" - -#: shell/e-shell-view-menu.c:284 -msgid "_Submit bug" -msgstr "" - -#: shell/e-shell-view-menu.c:285 -msgid "Submit bug-report via bug-buddy" -msgstr "" - -#. FIXME: add Favorites here -#: shell/e-shell-view-menu.c:300 -msgid "_Tools" -msgstr "¶ÎÓÔÒÕÍÅÎÔÉ" - -#: shell/e-shell-view-menu.c:301 -msgid "_Actions" -msgstr "䦧" - -#: shell/e-shell.c:157 -#, c-format -msgid "Cannot set up local storage -- %s" -msgstr "" - -#: shell/main.c:100 -msgid "" -"Hi. Thanks for taking the time to download this preview release of\n" -"the Evolution groupware suite.\n" -"\n" -"The Evolution team has worked hard to make Evolution as robust,\n" -"extensible, pretty, fast and well-suited to heavy internet users as\n" -"possible. And we're very tired. But we're not done -- not yet.\n" -"\n" -"As you explore Evolution, please understand that most of our work has\n" -"been focused on the backend engine which drives the entire system and\n" -"not on the user interface. We are just cresting the hill now, though,\n" -"and will be pouring most of our love and attention into the UI from\n" -"here out. But at least you know that you're not using demoware.\n" -"\n" -"So, time for the nerdy disclaimer. Evolution will: crash, lose your\n" -"mail, leave stray processes running, consume 100% CPU, race, lock,\n" -"send HTML mail to random mailing lists, and embarass you in front of\n" -"your friends and co-workers. Use at your own risk.\n" -"\n" -"We hope that you enjoy the results of our hard work, and we eagerly\n" -"await your contributions!\n" -msgstr "" - -#: shell/main.c:129 -msgid "" -"Thanks\n" -"The Evolution Team\n" -msgstr "" - -#: shell/main.c:156 -msgid "Cannot initialize the Evolution shell." -msgstr "" - -#: shell/main.c:186 -#, fuzzy -msgid "Cannot initialize the Bonobo component system." -msgstr "îÅ ×ÄÁÌÏÓÑ ¦Î¦Ã¦Á̦ÚÕ×ÁÔÉ ËÏÍÐÏÎÅÎÔÎÕ ÓÉÓÔÅÍÕ Bonobo" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: widgets/e-table/e-table-config.glade.h:7 -msgid "Fields" -msgstr "" - -#: widgets/e-table/e-table-config.glade.h:8 -msgid "Grouping" -msgstr "" - -#: widgets/e-table/e-table-config.glade.h:9 -msgid "Sort" -msgstr "" - -#: widgets/e-table/e-table-config.glade.h:10 -#, fuzzy -msgid "Filter" -msgstr "æÏÌÄÅÒ" - -#. -#. * Translatable strings file generated by Glade. -#. * Add this file to your project's POTFILES.in. -#. * DO NOT compile it as part of your application. -#. -#: widgets/e-table/e-table-group.glade.h:7 -msgid "window1" -msgstr "" - -#: widgets/e-table/e-table-group.glade.h:8 -msgid "Available fields" -msgstr "" - -#: widgets/e-table/e-table-group.glade.h:9 -msgid "label1" -msgstr "" - -#: widgets/e-table/e-table-group.glade.h:10 -msgid "Show in this order" -msgstr "" - -#: widgets/e-table/e-table-group.glade.h:11 -msgid "label2" -msgstr "" - -#: widgets/e-table/e-table-group.glade.h:12 -msgid "Add >>" -msgstr "" - -#: widgets/e-table/e-table-group.glade.h:13 -#, fuzzy -msgid "<< Remove" -msgstr "÷ÉÄÁÌÉÔÉ" - -#~ msgid "" -#~ "Evolution detected that the file `%s' is a not a directory.\n" -#~ "\n" -#~ "Evolution can rename the file, delete the file or shutdown and\n" -#~ "let you fix the problem." -#~ msgstr "" -#~ "ðÒÏÇÒÁÍÁ Evolution ×ÉÑ×ÉÌÁ ÝÏ ÆÁÊÌ \"%s\" ÎÅ ¤ ËÁÔÁÌÏÇÏÍ.\n" -#~ "\n" -#~ "íÏÖÎÁ ÐÅÒÅÊÍÅÎÕ×ÁÔÉ ÆÁÊÌ, ×ÉÄÁÌÉÔÉ ÊÏÇÏ ÁÂÏ ×¦ÄËÌÀÞÉÔÉÓÑ ¦\n" -#~ "ÄÏÚ×ÏÌÉÔÉ ×ÁÍ ×ÉÒ¦Û¦ÔÉ ÐÒÏÂÌÅÍÕ." - -#~ msgid "" -#~ "This is a development version of Evolution.\n" -#~ " Using the mail component on your mail files\n" -#~ " is extremely hazardous.\n" -#~ "Please backup all your mails before trying\n" -#~ " this program. \n" -#~ " You have been warned\n" -#~ msgstr "" -#~ " ãÑ ×ÅÒÓ¦Ñ Evolution ÚÎÁÈÏÄÉÔØÓÑ × ÒÏÚÒÏÂæ.\n" -#~ " ÷ÉËÏÒÉÓÔÁÎÎÑ ÐÏÛÔÏ×ÏÇÏ ËÏÍÐÏÎÅÎÔÕ ÎÁ ×ÁÛÉÈ ÆÁÊÌÁÈ ÐÏÛÔÉ\n" -#~ "¤ ÄÕÖÅ ÎÅÂÅÚÐÅÞÎÉÍ.\n" -#~ " úÒϦÔØ ÒÅÚÅÒ×ÎÕ ËÏЦÀ ×Ó¦¤§ ×ÁÛϧ ÐÏÛÔÉ ÐÅÒÅÄ ×ÉÐÒÏÂÕ×ÁÎÎÑÍ\n" -#~ "椧 ÐÒÏÇÒÁÍÉ. \n" -#~ " ÷ÁÓ ÂÕÌÏ ÐÏÐÅÒÅÄÖÅÎÏ\n" - -#~ msgid "" -#~ "An exception occured while trying to load data into the component with " -#~ "PersistStream" -#~ msgstr "" -#~ "îÁ ÓÐÒϦ ÚÁ×ÁÎÔÁÖÉÔÉ ÄÁΦ × ËÏÍÐÏÎÅÎÔ Ú PersistStream ×ÉÎÉËÌÏ ×ÉËÌÀÞÅÎÎÑ" - -#~ msgid "The %s component doesn't support PersistStream!\n" -#~ msgstr "ëÏÍÐÏÎÅÎÔ %s ΊЦÄÔÒÉÍÕ¤ PersistStream!\n" - -#~ msgid "Online status" -#~ msgstr "óÔÁÎ ÎÁ ̦Φ§" - -#~ msgid "Message status" -#~ msgstr "óÔÁÎ ÐÏצÄÏÍÌÅÎÎÑ" - -#~ msgid "A folder containing mail items" -#~ msgstr "ðÏÛÔÏ×Á ÔÅËÁ" - -#~ msgid "A folder containing contacts" -#~ msgstr "ôÅËÁ Ú ËÏÎÔÁËÔÁÍÉ" - -#~ msgid "A folder containing calendar entries" -#~ msgstr "ôÅËÁ Ú ËÁÌÅÎÄÁÒÎÉÍÉ ÚÁÐÉÓÁÍÉ" - -#~ msgid "A folder containing tasks" -#~ msgstr "ôÅËÁ ¦Ú ÚÁ×ÄÁÎÎÑÍÉ" - -#~ msgid "Evolution can not create its local folders" -#~ msgstr "Evolution ÎÅ ÍÏÖÅ ÓÔ×ÏÒÉÔÉ ÃÀ ÌÏËÁÌØÎÕ ÔÅËÕ" - -#~ msgid "A service containing mail items" -#~ msgstr "ðÏÛÔÏ×Á ÓÌÕÖÂÁ" - -#~ msgid "A service containing contacts" -#~ msgstr "óÌÕÖÂÁ ËÏÎÔÁËÔ¦×" - -#~ msgid "A service containing calendar entries" -#~ msgstr "óÌÕÖÂÁ ËÁÌÅÎÄÁÒÎÉÈ ÚÁÐÉÓ¦×" - -#~ msgid "A service containing tasks" -#~ msgstr "óÌÕÖÂÁ ÚÁ×ÄÁÎØ" - -#~ msgid "Large Icons" -#~ msgstr "÷ÅÌÉ˦ ЦËÔÏÇÒÁÍÉ" - -#~ msgid "Small Icons" -#~ msgstr "íÁ̦ ЦËÔÏÇÒÁÍÉ" - -#~ msgid "Add New Group" -#~ msgstr "äÏÄÁÔÉ ÎÏ×Õ ÇÒÕÐÕ" - -#~ msgid "Remove Group" -#~ msgstr "÷ÉÄÁÌÉÔÉ ÇÒÕÐÕ" - -#~ msgid "Rename Group" -#~ msgstr "ðÅÒÅÊÍÅÎÕ×ÁÔÉ ÇÒÕÐÕ" - -#~ msgid "Add Shortcut" -#~ msgstr "äÏÄÁÔÉ ÓËÏÒÏÞÅÎÎÑ" - -#~ msgid "Open Folder" -#~ msgstr "÷¦ÄËÒÉÔÉ ÆÏÌÄÅÒ" - -#~ msgid "Open in New Window" -#~ msgstr "÷¦ÄËÒÉÔÉ × ÎÏ×ÏÍÕ ×¦ËΦ" - -#~ msgid "Advanced Find" -#~ msgstr "òÏÚÛÉÒÅÎÉÊ ÐÏÛÕË" - -#~ msgid "Rename Shortcut" -#~ msgstr "ðÅÒŦÍÅÎÕ×ÁÔÉ ÑÒÌÉË" - -#~ msgid "Executive Summary" -#~ msgstr "÷ÉËÏÎÁ×ÞÅ Ú×ÅÄÅÎÎÑ" - -#~ msgid "Inbox" -#~ msgstr "÷ȦÄΦ" - -#~ msgid "New mail messages" -#~ msgstr "îÏצ ÐÏÛÔÏצ ÐÏצÄÏÍÌÅÎÎÑ" - -#~ msgid "Sent mail messages" -#~ msgstr "÷¦Ä¦ÓÌÁΦ ÐÏÛÔÏצ ÐÏצÄÏÍÌÅÎÎÑ" - -#~ msgid "Drafts" -#~ msgstr "þÏÒÎÏ×ÉËÉ" - -#~ msgid "Draft mail messages" -#~ msgstr "þÏÒÎÏ×ÉËÉ ÐÏÛÔÏ×ÉÈ ÐÏצÄÏÍÌÅÎØ" - -#~ msgid "Calendar" -#~ msgstr "ëÁÌÅÎÄÁÒ" - -#~ msgid "Your calendar" -#~ msgstr "÷ÁÛ ËÁÌÅÎÄÁÒ" - -#~ msgid "Your contacts list" -#~ msgstr "÷ÁÛ ËÏÎÔÁËÔÎÉÊ ÓÐÉÓÏË" - -#~ msgid "Tasks" -#~ msgstr "úÁ×ÄÁÎÎÑ" - -#~ msgid "Tasks list" -#~ msgstr "óÐÉÓÏË ÚÁ×ÄÁÎØ" - -#~ msgid "Main Shortcuts" -#~ msgstr "ïÓÎÏ×Φ ÓËÏÒÏÞÅÎÎÑ" - -#~ msgid "Other Shortcuts" -#~ msgstr "¶ÎÛ¦ ÓËÏÒÏÞÅÎÎÑ" - -#~ msgid "New group" -#~ msgstr "îÏ×Á ÇÒÕÐÁ" - -#~ msgid "Enables some debugging functions" -#~ msgstr "÷ÍÉËÁ¤ ÄÅÑ˦ ÆÕÎËæ§ ÎÁÌÁÇÏÄÖÅÎÎÑ" - -#~ msgid "LEVEL" -#~ msgstr "ò¶÷åîø" diff --git a/po/update.sh b/po/update.sh deleted file mode 100755 index 74dca77b27..0000000000 --- a/po/update.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh - -PACKAGE="evolution" - -if [ "x$1" = "x--help" ]; then - -echo Usage: ./update.sh langcode -echo --help display this help and exit -echo -echo Examples of use: -echo ./update.sh ----- just creates a new pot file from the source -echo ./update.sh da -- created new pot file and updated the da.po file - -elif [ "x$1" = "x" ]; then - -echo "Building the $PACKAGE.pot ..." - -xgettext --default-domain=$PACKAGE --directory=.. \ - --add-comments --keyword=_ --keyword=N_ \ - --files-from=./POTFILES.in \ -&& test ! -f $PACKAGE.po \ - || ( rm -f ./$PACKAGE.pot \ -&& mv $PACKAGE.po ./$PACKAGE.pot ); - -else - -xgettext --default-domain=$PACKAGE --directory=.. \ - --add-comments --keyword=_ --keyword=N_ \ - --files-from=./POTFILES.in \ -&& test ! -f $PACKAGE.po \ - || ( rm -f ./PACKAGE.pot \ -&& mv $PACKAGE.po ./$PACKAGE.pot ); - -echo "Building the $PACKAGE.pot ..." -echo "Now merging $1.po with $PACKAGE.pot, and creating an updated $1.po ..." - -mv $1.po $1.po.old && msgmerge $1.po.old $PACKAGE.pot -o $1.po \ -&& rm $1.po.old; - -msgfmt --statistics $1.po - -fi; diff --git a/shell/.cvsignore b/shell/.cvsignore deleted file mode 100644 index 417b3c6bcf..0000000000 --- a/shell/.cvsignore +++ /dev/null @@ -1,11 +0,0 @@ -.deps -.libs -.pure -evolution -evolution.pure -Makefile.in -Makefile -Evolution-stubs.c -Evolution-skels.c -Evolution-common.c -Evolution.h diff --git a/shell/ChangeLog b/shell/ChangeLog deleted file mode 100644 index 6f0e3a89fb..0000000000 --- a/shell/ChangeLog +++ /dev/null @@ -1,893 +0,0 @@ -2000-05-28 Dan Winship - - * main.c (main): Remove extra free of evolution_directory. - -2000-05-28 Ettore Perazzoli - - * evolution-storage.c (evolution_storage_register): Use the - storage's name when registering. - -2000-05-26 Matt Loper - - * e-shell-view-menu.c (command_about_box): Make authorlist more - alphabetical. - (command_show_treeview): New function; shows the treeview, when it - has been hidden. - (command_show_shortcut_bar): New function; shows the shortcut bar, - when it's been hidden. - -2000-05-26 Ettore Perazzoli - - * e-corba-storage.c (impl_StorageListener_new_folder): Set the - physical URI on the folder using `e_folder_set_physical_uri()'. - - * e-local-folder.c (get_physical_uri): Removed. - (construct_loading_metadata): Use EFolder's `physical_uri' field - instead of ours, which is gone. - (save_metadata): Likewise. - (destroy): Don't free. - - * e-local-folder.h: Removed `physical_uri' from `ELocalFolder'. - - * e-folder.c: New member `physical_uri' in `EFolderPrivate'. - (init): Initialize to NULL. - (destroy): Free it. - (get_physical_uri): Removed. - (e_folder_set_physical_uri): New function. - - * e-storage-set.c (e_storage_set_get_folder): Fix off-by-one error - in extracting the base name. - - * e-storage.c: New member `path' in `Folder'. - (folder_destroy): Free it. - (folder_new): New arg. Initialize `path' from it. - (e_storage_construct): Updated accordingly. - (e_storage_new_folder): Likewise. - (e_storage_remove_folder): Remove the folder from the hash. - - * e-storage-set-view.c (remove_node): New function. - (removed_storage_cb): Use it. - (new_folder_cb): New function, callback for the "new_folder" - signal on the EStorageSet. - (removed_folder_cb): New function, callback for the - "removed_folder" signal on the EStorageSet. - (e_storage_set_view_construct): Connect these signal handlers to - the respective signals on our model storage. - - * e-storage-set.c (storage_new_folder_cb): New function, callback - for the "new_folder" signal on the storages. - (storage_removed_folder_cb): New function, callback for the - "removed_folder" signal on the storages. - (e_storage_set_add_storage): Connect them to the signals of the - storage being added. - - * e-corba-storage-registry.c - (impl_StorageRegistry_register_storage): Throw an exception if - `e_storage_set_add_storage()' returns false. - - * e-shell.c (setup_storages): Unref the local storage after adding - to the storage set. - - * e-corba-storage-registry.c - (impl_StorageRegistry_register_storage): Unref the storage after - adding to the storage set. - - * e-storage-set.c: New hash table `name_to_named_storage' in - `EStorageSetPrivate'. - (named_storage_new): New helper function. - (named_storage_destroy): New helper function. - (e_storage_set_add_storage): Use the hash table. Return value - changed to `gboolean'. Return FALSE if there is a storage with - that name already. Also, ref the storage. - (e_storage_set_remove_storage): Likewise [but of course don't ref - the storage]. - (e_storage_set_get_storage): Use the `name_to_named_storage' hash - table. - (destroy): Destroy the `name_to_named_storage' hash. - - * e-storage-set.h: New signals "new_folder", "removed_folder". - - * e-storage.c (e_storage_get_watcher_for_path): Removed. - (get_watcher_for_path): Removed. - (class_init): Install signals "new_folder" and "removed_folder". - (e_storage_remove_folder): Emit "removed_folder". - (e_storage_new_folder): Emit "new_folder". - - * e-storage.h: Removed method `get_watcher_for_path'. New signals - "new_folder", "removed_folder". - - * e-storage-watcher.c: Removed. - * e-storage-watcher.h: Removed. - - * e-corba-storage-registry.c (corba_class_init): Set the - Bonobo_Unknown evp parts. - - * evolution-storage.c: New. - * evolution-storage.h: New. - - * evolution-shell-component.c - (evolution_shell_component_get_owner): New. - - * e-storage-set-view.c (new_storage_cb): New function. - (e_storage_set_view_construct): Connect to the "new_storage" - signal on the EStorageSet. - (removed_storage_cb): New function. - (e_storage_set_view_construct): Connect to the "removed_storage" - signal on the EStorageSet. - - * e-storage-set-view.c (e_storage_set_view_construct): Make this - always look pretty, with Helix GNOME or without. - -2000-05-25 Christopher James Lahey - - * e-storage-set-view.c: Make this always look pretty, with Helix - GNOME or without. - -2000-05-25 Ettore Perazzoli - - * e-storage-set-view.c (e_storage_set_view_construct): Set the - dotted line type again. Dotted is less butt-ugly than continuous. - - * e-shell-view.c (show_error): Display page zero in the notebook. - - * main.c (idle_cb): Renamed from `new_view_idle_cb'. Create the - EShell object here, because now the shell depends on the GLib loop - to be running for correct operation. - (main): Don't create the EShell here. - - * e-storage-set-view.c (get_pixmap_and_mask_for_folder): If the - icon is not found, set the returned pixmap and mask to NULL. - - * e-shell.c (e_shell_construct): Added precondition: @corba_object - must be non-nil. - (e_shell_new): Added precondition: @local_direcory must be - non-null. - - * evolution-shell-component.c: New. - * evolution-shell-component.h: New. - - * e-shell.c: New member `component_registry' in `EShellPrivate'. - (init): Initialize to NULL. - (destroy): Unref it. - (setup_components): New function to set up the compnent registry - and initialize the mail, calendar and addressbook components. - (e_shell_construct): Call it. - - * e-storage-set.c: Updated to use EFolderTypeRegistry. - * e-storage-set.h: Likewise. - * e-shortcuts.c: Likewise. - * e-shortcuts.h: Likewise. - * e-shell.c: Likewise. - - * e-shell.h: Likewise. - * e-shell-view.c: Likewise. - * e-shortcuts-view.c: Likewise. - * e-storage-set-view.c: Likewise. - - * e-component-registry.c: New. - * e-component-registry.h: New. - - * e-folder-type-registry.c: New. - * e-folder-type-registry.h: New. - - * e-folder-type-repository.c: Removed. - * e-folder-type-repository.h: Removed. - - * Evolution-ShellComponent.idl: New struct `FolderType'; new type - `FolderTypeList'. New attribute `supported_types'. - (ShellComponent::set_owner): Renamed from `set_shell'. - (ShellComponent::create_view): New. - -2000-05-24 Christopher James Lahey - - * e-shell-view.c: Was using the wrong include here. - - * e-storage-set-view.c: Got rid of the lines in the tree view. - -2000-05-24 Christopher James Lahey - - * Makefile.am: Added libepaned.a. - - * e-shell-view.c: Switched from GtkPaned to EPaned. - -2000-05-23 Ettore Perazzoli - - * e-shell.c: New member `corba_storage_registry' in - `EShellPrivate'. - (init): Initialize it to NULL. - (destroy): Unref it if not NULL. - (setup_corba_storages): New function to set up the CORBA storage - registry and `bonobo_object_add_interface()' it to the shell. - (setup_storages): Call it from here. - - * e-shell.h, e-shell.c: Derive EShell from BonoboObject instead of - GtkObject. - - * e-storage.c (e_storage_remove_folder): Return value changed into - `gboolean'; return false if an error occurs, true otherwise. - (e_storage_new_folder): Likewise. - - * e-corba-storage-registry.c: New. - * e-corba-storage-registry.h: New. - - * e-corba-storage.c: New. - * e-corba-storage.h: New. - - * Evolution.idl: Include the new IDLs, but no - `evolution-service-repository.idl' anymore. - - * Evolution-Shell.idl: New. - * Evolution-ShellComponent.idl: New. - * Evolution-Storage.idl: New. - - * evolution-service-repository.idl: Removed. - * evolution-service-repository.c: Removed. - * evolution-service-repository.h: Removed. - - * e-folder-type-repository.c (folder_type_new): Free `icon_path'. - -2000-05-18 Dan Winship - - * main.c (new_view_idle_cb): add development_warning (moved from - mail component) - -2000-05-16 Ettore Perazzoli - - * e-storage-set-view.c: Get rid of the `ICON_WIDTH' and - `ICON_HEIGHT' #defines. - (get_pixmap_and_mask_for_folder): Get the mini icon instead of the - big one. Use `E_SHELL_MINI_ICON_SIZE' instead of `ICON_WIDTH' and - `ICON_HEIGHT'. - - * e-folder-type-repository.c: New member `mini_icon_pixbuf' in - `FolderType'. - (folder_type_new): Initialize `mini_icon_pixbuf' by loading the - mini icon if possible. If the mini icon is not found, resort to - the big one. - (folder_type_free): Unref the mini icon. - (e_folder_type_repository_get_icon_for_type): New arg @mini. If - true, return the mini icon instead of the standard one. - - * e-shell-view.c (set_icon): Get the mini icon instead of the big - one by using `e_shell_get_icon_path's @try_mini arg. - - * e-shell-constants.h: New file. - - * e-shell-utils.c - (e_shell_get_icon_path): New arg @try_mini. If true, look for the - mini version [whose name ends in `-mini']. - - * e-folder-type-repository.c - (folder_type_new): Free string returned by - `e_shell_get_icon_path()'. - -2000-05-16 Ettore Perazzoli - - * e-shell-view.c: New members `storage_set_view_box', - `shortcut_bar_box', `hpaned1_position', `hpaned2_position' in - `EShellViewPrivate'. - (init): Initialize them. - (setup_widgets): Add title bars to the tree and shortcut views. - (shortcuts_view_close_button_clicked_cb): New callback function. - (setup_widgets): Connect to the "close_button_clicked" signal of - the shortcut view's title bar. - (storage_set_view_close_button_clicked_cb): New callback function. - (setup_widgets): Connect to the "close_button_clicked" signal of - the storage set view's title bar. - (e_shell_view_show_shortcuts): New function. - (e_shell_view_show_folders): New function. - - * e-shell-view.c: New members `hpaned1', `hpaned2' in - `EShellViewPrivate'. - (init): Initialize both to NULL. - (setup_widgets): Invert the parenting order for the GtkHPaneds and - store them into the private `hpaned' and `hpaned2' members. - - * Makefile.am (evolution_LDADD): Link with `libemiscwidgets.a'. - -2000-05-15 Ettore Perazzoli - - * e-shortcuts.c - (load_shortcuts_into_view): Removed. - (e_shortcuts_new_view): Don't set up the shortcut bar manually - here anymore, and don't set the icon callback either. The - `EShortcutsView' object is now able to do this by itself. - - * e-shortcuts-view.c - (icon_callback): Moved here from `e-shortcuts.c'. - (load_group): New function. - (load_all_shortcuts): New function. - (e_shortcuts_view_construct): Call it to load the shortcuts from - the `EShortcuts' object. Also, set `icon_callback' as the icon - callback. - - * e-storage-set-view.c - (button_press_event): Add/remove grab with `gtk_grab_add' and - `gtk_grab_remove'. - (button_release_event): Call `gtk_grab_remove' when removing the - grab. - - * e-shortcuts.c: New member `title_to_group' in - `EShortcutsPrivate'. - (init): Initialize here. - (destroy): Destroy here. - (unload_shortcuts): Destroy and recreate here. - (load_shortcuts): Avoid inserting multiple groups with the same - title, and insert the groups into the `title_to_group' hash table. - Also, avoid leaking the return value from `xmlNodeListGetString'. - (e_shortcuts_get_group_titles): New function. - (e_shortcuts_get_shortcuts_in_group): New function. - (e_shortcuts_get_storage_set): New function. - - * e-storage-set-view.c - (e_storage_set_view_set_current_folder): Emit the - "folder_selected" signal. - - * e-local-folder.c - (get_string_value): Return a `char *' to be deallocated by the - caller instead of a `const char *' that does not need to be - deallocated. - (construct_loading_metadata): Free values returned from - `get_string_value'. - -2000-05-15 Ettore Perazzoli - - * e-storage-set-view.c: New members `dragged_row_path', - `selected_row_path_before_click' in `EStorageSetViewPrivate'. - (init): Initialize them to NULL. - (motion_notify_event): Set `dragged_row_path' from - `selected_row_path'. - (button_press_event): Initialize `selected_row_path_before_click' - from `selected_row_path'. - (button_release_event): Set `selected_row_path_before_click' to - NULL. - (drag_end): Restore the current selection from - `selected_row_path_before_click'; then set both `dragged_row_path' - to NULL. - -2000-05-15 Ettore Perazzoli - - * e-storage-set-view.c: New members `in_drag' and `drag_button' in - `EStorageSetViewPrivate'. New static variables `drag_types', - `num_drag_types', `target_list'. - (class_init): Create the `target_list'. - (init): Initialize the private `in_drag' member to false. - Initialize the private `drag_button' member to zero. - (button_release_event): Set it to false. - (motion_notify_event): New function, implementation of - `GtkWidget::motion_notify_event'. If `in_drag' is false, set it - to true and set ourselves up as a drag source. - (button_press_event): New function, implementation of - `GtkWidget::button_press_event'. Set `drag_button' to the event's - button number and then chain to the implementation in the parent - class. - (drag_end): New function, implementation of `GtkWidget::drag_end'. - (drag_data_get): New function, implementation of - `GtkWidget::drag_data_get'. - (set_e_shortcut_selection): New function, helper for `drag_data_get'. - (set_uri_list_selection): New function, helper for `drag_data_get'. - (class_init): Install these method implementations. - - * e-storage-set-view.c: New member `selected_row_path' in - `EStorageSetViewPrivate'. - (init): Initialize it to NULL. - (tree_select_row): Set it to the path of the selected row. Don't - emit "folder_selected" yet. Also, keep the grab. - (button_release_event): New function, implementation of - `GtkWidget::button_release_event'. If `selected_row_path' is not - NULL, emit the "folder_selected" signal with `selected_row_path' - as the parameter and then set `selected_row_path' to NULL again. - (class_init): Install `button_release_event'. - - * e-storage-set-view.c: Made `ICON_WIDTH' and `ICON_HEIGHT' global - #defines. - (e_storage_set_view_construct): Set the row height to - `ICON_HEIGHT'. Alos, set the selection mode to - `GTK_SELECTION_BROWSE'. - -2000-05-15 Iain Holmes - - * e-local-folder.c (get_string_value): Use the correct function to - get the node's contents. - - * e-shortcuts.c (load_shortcuts): Same as above. - -2000-05-14 Ettore Perazzoli - - * e-folder-type-repository.c - (e_folder_type_repository_get_control_id_for_type): Protect - against non-existing types. - (e_folder_type_repository_get_icon_for_type): Likewise. - -2000-05-14 Ettore Perazzoli - - * e-storage-set-view.c - (folder_compare_cb): Callback comparison function for comparing - folders based on their names. - (insert_folders): Use it to sort the folder list before using it. - -2000-05-14 Ettore Perazzoli - - * e-shell.c - (setup_storages): Pass the pointer to the folder type repository. - (e_shell_construct): Initialize the folder type repository before - everything else. - - * e-storage-set.c: New member `folder_type_repository' in - `EStorageSetPrivate'. - (init): Initialize it to NULL. - (destroy): Unref it. - (e_storage_set_construct): New arg @folder_type_repository. - Initialize the corresponding member in the private struct through - it. - (e_storage_set_new): New arg @folder_type_repository. - (e_storage_set_get_folder_type_repository): New function. - - * e-shortcuts.c (icon_callback): Just use [the new version of] - `e_folder_type_repository_get_icon_for_type()' instead of loading - the image manually. - - * e-folder-type-repository.c: New member `icon_pixbuf' in - `FolderType'. - (folder_type_new): Load the pixbuf. - (folder_type_free): Unref the pixbuf. - (e_folder_type_repository_get_icon_name_for_type): Renamed from - `e_folder_type_repository_get_icon_for_type'. - (e_folder_type_repository_get_icon_for_type): New function, now - returning a `GdkPixbuf *'. - - * e-shortcuts.c - (icon_callback): Use `e_shell_get_icon_name()'. - - * e-shell-view.c: New member `storage_set_view' in - `EShellViewPrivate'. - (init): Initialize it to NULL. - (e_shell_view_construct): Create an EStorageSetView for the - shell's EStorageSet and put it into a scrolled window. Also, put - the scrolled window into the EShellView with some - [temporary] GtkPaned action. Store the pointer to the - EStorageSetView to `priv->storage_set_view'. - (set_icon): Get an EShellView and an EFolder instead of an - EShellView and a URI. Also, don't leak. - (update_for_current_uir): New helper function. Call `set_icon'. - (show_error): Call it. - (folder_selected_cb): New function. - (setup_widgets): Connect it to the "folder_selected" signal of the - storage set view. - - * e-storage-set-view.c: New file. - * e-storage-set-view.h: New file. - - * e-shell-utils.c: New file. - * e-shell-utils.h: New file. - -2000-05-10 Christopher James Lahey - - * e-shell-view-menu.c: Added an about box. - -2000-05-10 Christopher James Lahey - - * e-shell-view.c: Set the icons when changing between components. - - * main.c: Set the default icon. (The change in e-shell-view.c - doesn't work unless we do this.) - -2000-05-09 Matt Loper - - * e-shell-view-menu.c (command_run_bugbuddy): New function; allows - users to submit a bug. - (command_run_bugbuddy): Implemented with jacob's patch. - -2000-05-09 Ettore Perazzoli - - * e-shell.c (e_shell_new_view): Display the specified @uri in the - view. - - * e-shell-view.c (e_shell_view_construct): Removed arg @uri. - (e_shell_view_new): Likewise. - - * main.c: New string constant `STARTUP_URI', specifying the URI to - show in the startup view. - (new_view_idle_cb): New callback function to create a new view for - `STARTUP_URI' in the idle loop. We need to do this in the idle - loop because the CORBA stuff cannot work until the loop starts - running. - (main): Set `new_view_idle_cb' up as the idle callback instead of - creating the view right away. - -2000-05-09 Ettore Perazzoli - - * e-shell.c (setup_storages): Woops. Don't free the path before - the warning message, as we need to print it. - -2000-05-08 Ettore Perazzoli - - * main.c (destroy_cb): New function. - (main): Connect it to the `destroy' signal on the shell. - -2000-05-08 Ettore Perazzoli - - * e-shortcuts.c (load_shortcuts): Const fix. - -2000-05-08 Larry Ewing - - * e-shortcuts.c (load_shortcuts_into_view): xmlFree the return - value of xmlGetProp. - -2000-05-07 Ettore Perazzoli - - * e-shortcuts-view.c (e_shortcuts_view_construct): Use - correct cast. - -2000-05-07 Ettore Perazzoli - - * main.c (main): Connect to "no_views_left", not "destroy". - - * e-shell.c (view_destroy_cb): Grmpf. - -2000-05-07 Ettore Perazzoli - - * e-shell.c (e_shell_construct): Output a warning message if the - shortcut file is not found. - (setup_storages): Output a warning message if the local storage - cannot be initialized. - (destroy): Destroy all the views. - - * e-shell-view.c - (e_shell_view_construct): Ref the shell. - - * e-shortcuts-view.c - (e_shortcuts_view_construct): Ref the shortcuts. - - * e-shell.c: Create the "no_views_left" signal. New member - `views' in `EShellPrivate'. - (init): Initialize `views' to NULL. - (view_destroy_cb): Destroy handler for a view: remove the view - from `views', and emit the "no_views_left" signal if this was the - last view. - (e_shell_new_view): Add the new view to `views' and connect the - "destroy" signal to `view_destroy_cb'. - (destroy): Destroy the views. - - * e-shell.h: New signal "no_views_left". - - * e-shell-view-menu.c (command_quit): New function, implementation - of the "quit" command. - - * e-shell-view.c (e_shell_view_get_shell): New function. - - * e-shell.c (e_shell_quit): New function. - - * main.c (main): If it is not possible to create the shell for - some reason, pop up an error message. - (shell_destroy_cb): New function, signal handler for "destroy" on - the shell object. - (main): Connect it. - -2000-05-06 Ettore Perazzoli - - * e-shortcuts.c (destroy): Be safer about NULL objects. - - * e-shell.c (destroy): Be safer about NULL objects. - - * e-local-storage.c (load_folders): Use `readdir()', not - `readdir_r()'. - -2000-05-06 Ettore Perazzoli - - * main.c (init_corba) [! USING_OAF]: We have no options no - popt context. - -2000-05-06 Ettore Perazzoli - - * All files: Reorganized and redone a lot of the shell. New - features: internal URI namespace, extensible storage/folder - mechanism, configurable shortcuts. - -2000-05-03 Damon Chaplin - - * e-shell-view.c (e_shell_view_new): turned the notebook border off. - The calendar looks better without it. If any of the views want a - border they should create it themselves, shouldn't they? - -2000-05-04 Ettore Perazzoli - - * e-shortcut.c (shell_icon_cb): Type of @url changed from `gchar - *' to `const gchar *'; new arg @data. - (e_shortcut_bar_view_new): Pass NULL as the closure value for - `e_shortcut_bar_set_icon_callback()'. - -2000-05-02 Ettore Perazzoli - - * e-folder-mail.c: Removed. - - * e-folder-mail.h: Removed. - - * eshell-types.h: Removed. - - * e-folder.h: Don't #include "eshell-types.h". - -2000-05-02 Ettore Perazzoli - - * e-folder.h: Removed member `eservice' from `EFolder'. - - * e-service.c: Removed. - - * e-service.h: Removed. - -2000-05-02 Matt Loper - - * Makefile.am: set G_LOG_DOMAIN. - -2000-05-01 Dan Winship - - * e-shell-view.c (e_shell_view_set_view): Turn off control frame - autoactivation, so the toolbars work correctly. This may actually - be a bug in Bonobo, but we'll kludge around it here for now. - -2000-04-27 Ettore Perazzoli - - * e-shell-view.c: OAFized. - (get_view): If `bonobo_widget_new_control()' fails for the - calendar, don't try to get the property bag and stuff and thus - prevent a segfault. - - * main.c - (corba_init): Removed Bonobo initialization. Implemented OAF - version for the case in which `USING_OAF' is #defined. - (init_bonob): New function. - (main): Call `init_bonobo()'. - -2000-04-26 Matt Loper - - * e-shell-view.c (bonobo_widget_is_dead): Helper function to see - whether a bonobo widget is a zombie (ie the remote bonobo control - died). - (e_shell_view_set_view): Try to respawn dead widgets. - -2000-04-25 Dan Winship - - * Makefile.am: include -I$(datadir)/idl in orbit-idl arguments so - that you can have bonobo installed in the same prefix as - evolution, when that isn't the same prefix is gnome-libs, which a - lot of people seem to be doing. - (CLEANFILES): add EVOLUTION_CORBA_GENERATED - -2000-04-24 Christopher James Lahey - - * idl/folder.idl: Made some functions syncronous that didn't need - to be asyncronous. - -2000-04-24 Matt Loper - - * e-shell-view.h: Added hpaned and treeview widgets to - EShellView. Added e_shell_view_toggle_shortcut_bar() and - e_shell_view_toggle_treeview(). - - * e-shell-view.c (e_shell_view_setup_shortcut_display): Use EPaned - widget to house our shortcut bar. - (e_shell_view_toggle_shortcut_bar): New function; toggles whether - the shortcut bar is showing. - (e_shell_view_toggle_treeview): Same, for the treeview (NYI). - (e_shell_view_new): Put the notebook view in our EPaned widget. - - * e-shell-view-menu.c (esv_cmd_toggle_shortcut_bar): New function; - toggles whether the shortcut bar is viewed. - (esv_cmd_toggle_treeview): Same, but with the treeview. Added - menuitems in the "view" menu to allow access to the above. - -2000-04-19 Seth Alves - - * e-shell-view.c (get_view): set calendar's uri with a property bag - -2000-04-19 Christopher James Lahey - - * idl/folder.idl: New idl file. Still unused. - -2000-04-14 Christopher James Lahey - - * e-shell-view.c: Made the left pane of the shell view not - autoresize. - -2000-04-09 Matt Loper - - * e-shell-view.c (e_shell_view_setup): Set the default height - bigger, to 600, so that everything in the shortcut-bar shows up. - -2000-04-07 Matt Loper - - * e-shell-view.c (destroy_folder_view): New function; - Bonobo_Unknown_unref's the controls that have the views in them. - (esv_destroy): Calls the above for each folder_view in the - hashtable. - (get_view): unref the ServiceRepository interface of the control - when we're done with it. - -2000-04-06 Miguel de Icaza - - * shell/e-shortcut.c (shell_icon_cb): Append a slash here. - (shell_icons): Only list the filenames. - - * shell/main.c (evolution_boot): Be less rude. - -2000-04-06 Matt Loper - - * shell/main.c (evolution_boot): Make sure our data directory is - available with e_setup_base_dir (). - -2000-04-06 Miguel de Icaza - - * shell/e-shortcut.c (shell_icon_cb): Load the icons from the - installation path, not form the GNOME-libs installation prefix. - (shell_icon_cb): Memory leak fix. - - * shell/Makefile.am (imagesdir): Pass the EVOLUTION_IMAGES - installation directory here. - -2000-04-05 Seth Alves - - * shell/e-shell-view.c (get_view): hook up control:calendar - -2000-03-31 Dan Winship - - * shell/e-shortcut.c (e_shortcut_bar_view_new, shell_icon_cb): - Update for shortcut bar changes. - - * shell/e-folder.h: add E_FOLDER_SUMMARY - * shell/e-shell.c (e_shell_setup_default_folders): make the - "Today" icon be of type E_FOLDER_SUMMARY, not E_FOLDER_MAIL. - -2000-03-30 Dan Winship - - * shell/e-shell-view.c (e_shell_view_set_view): Hold off on - deactivating the "outgoing" control until after setting up the - "incoming" control. That way if the new control takes a few - seconds to load, there won't be an ugly empty spot where the - toolbar used to be while the new control loads. - -2000-03-29 Dan Winship - - * shell/e-shell-view.c (e_shell_view_set_view): Call - bonobo_control_frame_activate on the folder_view every time it - is displayed, and bonobo_control_frame_deactivate every time it is - hidden. - -2000-03-25 Matt Loper - - * shell/e-shell-view.c (get_view): Move CORBA_Environment to - different scope. - -2000-03-22 Matt Loper - - * shell/main.c (evolution_boot): gtk_signal_connect'ed "destroy" - to gtk_main_quit, so that the shell dies when you want it to. - - * shell/e-shell-view.c (get_view): Reorganized, and added - assertions. - (e_shell_view_set_view): Added assertions. - -2000-03-20 Matt Loper - - * shell/e-shell-view.h: New private field in EShellView added, - which contains the notebook and a hashtable of folders to views. - - * shell/e-shell-view.c (e_shell_view_set_view): Instead of - creating a new control every time we set the view, we now keep our - controls in a notebook. This function now switches to the correct - notebook page, or creates a new page/control as necessary. - (e_shell_view_new): Creates and inserts the notebook into the - shell. - -2000-03-13 Christopher James Lahey - - * shell/e-shell-view.c: Added an E_FOLDER_CONTACTS section to the - get_view function. - -2000-03-13 bertrand - - * shell/e-shell.c (EShell_register_service): - test implementation. Show the uri and the type - of service that has just been registered. - - * shell/e-shell-view.c (get_view): - once we have the bonobo control widget, - disable the autoactivation and activate - the control frame. - (get_view): added a parameter to have - a reference to the EShellView. - (get_view): In the case of the mail component - use the Evolution_ServiceRepository to - give the component a reference to the - Shell server. - -2000-03-12 bertrand - - * shell/e-shell-view.c (get_view): name change - - - * shell/e-folder.c (e_folder_get_folder_type): added the - get_e_folder_type function. - - * shell/evolution-service-repository.c: - (evolution_service_repository_new): creates an - Evolution_ServiceRepository object. - (create_evolution_service_repository): - create the corresponding servant. - (evolution_service_repository_construct): set - the closure as well as the virtual functions. - -2000-03-12 bertrand - - * shell/evolution-service-repository.c: - * shell/evolution-service-repository.h: - Implementation of the service repository interface - as a bonobo object. - - * shell/evolution-service-repository.idl: - new file. Contains the definition for the service - repository interface. - - * shell/Shell.idl: move the shell related stuff - here - -2000-03-12 bertrand - - * shell/e-folder.h: add a field refering to a - service associated to the efolder. In the case of - distant folders, it is generally a server. - - * shell/e-service.c: New class. Models a service. - A service is an object with an URI and a root folder. - It genreally reporesents a distant folder. - A service is generally a ressource shared amongst - several folders. - * shell/e-service.h: - -2000-03-07 bertrand - - * shell/e-shell-shortcut.c (shortcut_bar_item_selected): - removed a test that prevented the standard menu - to be shown. - -2000-03-01 Ettore Perazzoli - - * shell/Makefile.am (INCLUDES): use `top_srcdir' instead of - `srcdir'. Also, add `$(top_srcdir)'. And put the srcdir includes - before everything else. - (evolution_LDADD): `libeutil.la', not `libeutil.a'. - -2000-02-22 bertrand - - * shell/Makefile.am (evolution_LDADD): - add libetext.a. - -2000-02-08 Iain Holmes - - * shell/Makefile.am: Changed the order of the compilation, so the CORBA - stuff was generated before it was needed. - -2000-01-15 Miguel de Icaza - - * shell/e-shell.c: Construct the default folders - - * shell/e-shell-view.c (e_shell_view_new): Setup the main GnomeApp - application, load the shortcut, internal api. - - * shell/e-folder.c (e_folder_get_type_name): Return description - here; Change of policy; We now know about all of the possible - types that can be displayed on Evolution. - -2000-01-15 Miguel de Icaza - - * shell/e-folder.c: Renamed signal. - - * widgets/shortcut-bar/e-shortcut-bar.c (e_shortcut_bar_add_item): - Use e_bar_set_item_data. - - Drop item_url; Require image argument; Require user data - argument. - -2000-01-05 Miguel de Icaza - - * shell/Makefile.am: New file. - diff --git a/shell/Evolution-Shell.idl b/shell/Evolution-Shell.idl deleted file mode 100644 index 496fdd8a27..0000000000 --- a/shell/Evolution-Shell.idl +++ /dev/null @@ -1,18 +0,0 @@ -/* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * Interface for the Evolution shell. - * - * Authors: - * Ettore Perazzoli - * - * Copyright (C) 2000 Helix Code, Inc. - */ - -#include - -module Evolution { - interface Shell : Bonobo::Unknown { - /* Nothing for now. */ - void dummy_method (); - }; -}; diff --git a/shell/Evolution-ShellComponent.idl b/shell/Evolution-ShellComponent.idl deleted file mode 100644 index 2e67b18c17..0000000000 --- a/shell/Evolution-ShellComponent.idl +++ /dev/null @@ -1,35 +0,0 @@ -/* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * Interface for the Evolution components. - * - * Authors: - * Ettore Perazzoli - * - * Copyright (C) 2000 Helix Code, Inc. - */ - -#include - -module Evolution { - interface Shell; - - struct FolderType { - string name; - string icon_name; - }; - - typedef sequence FolderTypeList; - - interface ShellComponent : Bonobo::Unknown { - readonly attribute FolderTypeList supported_types; - - /* FIXME can we use an attribute here? */ - exception AlreadyOwned {}; - void set_owner (in Shell shell) - raises (AlreadyOwned); - - exception NotFound {}; - Bonobo::Control create_view (in string physical_uri) - raises (NotFound); - }; -}; diff --git a/shell/Evolution-Storage.idl b/shell/Evolution-Storage.idl deleted file mode 100644 index 4e35e859bf..0000000000 --- a/shell/Evolution-Storage.idl +++ /dev/null @@ -1,51 +0,0 @@ -/* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * Storage interface for the Evolution shell. - * - * Authors: - * Ettore Perazzoli - * - * Copyright (C) 2000 Helix Code, Inc. - */ - -#include - -module Evolution { - struct Folder { - string type; - string description; - string name; - string physical_uri; - }; - - interface Storage; - interface StorageListener; - - interface Storage : Bonobo::Unknown { - attribute string name; - }; - - interface StorageListener { - exception Exists {}; - exception NotFound {}; - - void destroyed (); - - void new_folder (in string path, in Folder folder) - raises (Exists); - - void removed_folder (in string path) - raises (NotFound); - }; - - interface StorageRegistry : Bonobo::Unknown { - exception Exists {}; - exception NotFound {}; - - StorageListener register_storage (in Storage storage, in string name) - raises (Exists); - - void unregister_storage (in string name) - raises (NotFound); - }; -}; diff --git a/shell/Evolution.idl b/shell/Evolution.idl deleted file mode 100644 index 80a45eedc1..0000000000 --- a/shell/Evolution.idl +++ /dev/null @@ -1,15 +0,0 @@ -/* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * CORBA interface for the Evolution shell. - * - * Authors: - * Ettore Perazzoli - * - * Copyright (C) 2000 Helix Code, Inc. - */ - -#include - -#include -#include -#include diff --git a/shell/Makefile.am b/shell/Makefile.am deleted file mode 100644 index 19134e59b8..0000000000 --- a/shell/Makefile.am +++ /dev/null @@ -1,97 +0,0 @@ -imagesdir = $(datadir)/images/evolution - -bin_PROGRAMS = evolution - -INCLUDES = \ - -I$(top_srcdir)/widgets \ - -I$(top_srcdir)/widgets/misc \ - -I$(top_srcdir) \ - $(BONOBO_GNOME_CFLAGS) \ - -DEVOLUTION_IMAGES=\""$(imagesdir)"\" \ - -DEVOLUTION_VERSION=\""$(VERSION)"\" \ - -DEVOLUTION_LOCALEDIR=\""$(datadir)/locale"\" \ - -DEVOLUTION_DATADIR=\""$(datadir)"\" \ - -DG_LOG_DOMAIN=\"evolution-shell\" - -EVOLUTION_CORBA_GENERATED = \ - Evolution.h \ - Evolution-common.c \ - Evolution-skels.c \ - Evolution-stubs.c - -CLEANFILES = $(EVOLUTION_CORBA_GENERATED) - -IDLS = \ - Evolution.idl \ - Evolution-Shell.idl \ - Evolution-ShellComponent.idl \ - Evolution-Storage.idl - -evolution_SOURCES = \ - $(EVOLUTION_CORBA_GENERATED) \ - e-corba-storage.c \ - e-corba-storage.h \ - e-corba-storage-registry.c \ - e-corba-storage-registry.h \ - e-folder-type-registry.c \ - e-folder-type-registry.h \ - e-folder.c \ - e-folder.h \ - e-local-folder.c \ - e-local-folder.h \ - e-local-storage.c \ - e-local-storage.h \ - e-setup.c \ - e-setup.h \ - e-component-registry.h \ - e-component-registry.c \ - e-shell-constants.h \ - e-shell-utils.c \ - e-shell-utils.h \ - e-shell-view-menu.c \ - e-shell-view-menu.h \ - e-shell-view.c \ - e-shell-view.h \ - e-shell.c \ - e-shell.h \ - e-shortcuts-view.c \ - e-shortcuts-view.h \ - e-shortcuts.c \ - e-shortcuts.h \ - e-storage-set-view.c \ - e-storage-set-view.h \ - e-storage-set.c \ - e-storage-set.h \ - e-storage.c \ - e-storage.h \ - evolution-shell-component.c \ - evolution-shell-component.h \ - evolution-storage.c \ - evolution-storage.h \ - main.c - -Evolution-impl.o: Evolution.h - -$(EVOLUTION_CORBA_GENERATED): $(IDLS) - $(ORBIT_IDL) -I$(datadir)/idl -I`$(GNOME_CONFIG) --datadir`/idl -I$(srcdir) $(srcdir)/Evolution.idl - -evolution_LDADD = \ - $(top_builddir)/widgets/shortcut-bar/libshortcut-bar.a \ - $(top_builddir)/widgets/e-paned/libepaned.a \ - $(top_builddir)/widgets/e-text/libetext.a \ - $(top_builddir)/widgets/misc/libemiscwidgets.a \ - $(top_builddir)/e-util/libeutil.la \ - $(BONOBO_GNOME_LIBS) - -EXTRA_DIST = $(IDLS) - -if ENABLE_PURIFY -PLINK = $(LIBTOOL) --mode=link $(PURIFY) $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ - -all-local: evolution.pure - -evolution.pure: evolution - @rm -f evolution.pure - $(PLINK) $(evolution_LDFLAGS) $(evolution_OBJECTS) $(evolution_LDADD) $(LIBS) - -endif diff --git a/shell/Shell.idl b/shell/Shell.idl deleted file mode 100644 index 07dfbbf191..0000000000 --- a/shell/Shell.idl +++ /dev/null @@ -1,45 +0,0 @@ -/* - * CORBA interface for the Evolution shell - * - * Authors: - * Miguel de Icaza (miguel@kernel.org) - * - * (C) 2000 Helix Code, Inc. - */ -#include - - -module Evolution { - interface Shell : Bonobo::Unknown { - enum NewType { - APPOINTMENT, - MEETING_REQUEST, - TASK, - TASK_REQUEST, - CONTACT, - MAIL_MESSAGE, - DISTRIBUTION_LIST, - JOURNAL_ENTRY, - NOTE - }; - - enum ServiceType { - MAIL_STORE, - MAIL_TRANSPORT - }; - - void new (in NewType type); - - /** - * register_service : register a service into the shell - * - * @type : type of the service - * @uri : uri of the service, uniquely determine the service. - * - */ - void register_service (in ServiceType type, - in string uri); - - - }; -}; diff --git a/shell/e-component-registry.c b/shell/e-component-registry.c deleted file mode 100644 index 15e5204569..0000000000 --- a/shell/e-component-registry.c +++ /dev/null @@ -1,283 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-component-registry.c - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include -#include - -#include "e-util/e-util.h" -#include "e-shell-utils.h" - -#include "Evolution.h" - -#include "e-component-registry.h" - - -#define PARENT_TYPE GTK_TYPE_OBJECT -static GtkObjectClass *parent_class = NULL; - -typedef struct _Component Component; - -struct _Component { - char *id; - - BonoboObjectClient *client; - - /* Names of the folder types we support (normal ASCII strings). */ - GList *folder_type_names; -}; - -struct _EComponentRegistryPrivate { - EShell *shell; - - GHashTable *component_id_to_component; -}; - - -/* Component information handling. */ - -static Component * -component_new (const char *id, - BonoboObjectClient *client) -{ - Component *new; - - bonobo_object_ref (BONOBO_OBJECT (client)); - - new = g_new (Component, 1); - new->id = g_strdup (id); - new->folder_type_names = NULL; - new->client = client; - - return new; -} - -static void -component_free (Component *component) -{ - g_free (component->id); - bonobo_object_unref (BONOBO_OBJECT (component->client)); - - e_free_string_list (component->folder_type_names); - - g_free (component); -} - -static gboolean -register_type (EComponentRegistry *component_registry, - const char *name, - const char *icon_name, - Component *handler) -{ - EComponentRegistryPrivate *priv; - EFolderTypeRegistry *folder_type_registry; - - priv = component_registry->priv; - - folder_type_registry = e_shell_get_folder_type_registry (priv->shell); - g_assert (folder_type_registry != NULL); - - if (! e_folder_type_registry_register_type (folder_type_registry, name, icon_name)) { - g_warning ("Trying to register duplicate folder type -- %s", name); - return FALSE; - } - - e_folder_type_registry_set_handler_for_type (folder_type_registry, name, handler->client); - - return TRUE; -} - -static gboolean -register_component (EComponentRegistry *component_registry, - const char *id) -{ - EComponentRegistryPrivate *priv; - Evolution_ShellComponent component_corba_interface; - Evolution_Shell shell_corba_interface; - Evolution_FolderTypeList *supported_types; - Component *component; - BonoboObjectClient *client; - CORBA_Environment ev; - CORBA_unsigned_long i; - - priv = component_registry->priv; - - if (g_hash_table_lookup (priv->component_id_to_component, id) != NULL) { - g_warning ("Trying to register component twice -- %s", id); - return FALSE; - } - - client = bonobo_object_activate (id, 0); - if (client == NULL) - return FALSE; - - CORBA_exception_init (&ev); - - component_corba_interface = bonobo_object_corba_objref (BONOBO_OBJECT (client)); - shell_corba_interface = bonobo_object_corba_objref (BONOBO_OBJECT (priv->shell)); - - Evolution_ShellComponent_set_owner (component_corba_interface, shell_corba_interface, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - bonobo_object_unref (BONOBO_OBJECT (client)); - CORBA_exception_free (&ev); - return FALSE; - } - - supported_types = Evolution_ShellComponent__get_supported_types (component_corba_interface, &ev); - if (ev._major != CORBA_NO_EXCEPTION || supported_types->_length == 0) { - bonobo_object_unref (BONOBO_OBJECT (client)); - CORBA_exception_free (&ev); - return FALSE; - } - - CORBA_exception_free (&ev); - - component = component_new (id, client); - g_hash_table_insert (priv->component_id_to_component, component->id, component); - - for (i = 0; i < supported_types->_length; i++) { - const Evolution_FolderType *type; - - type = supported_types->_buffer + i; - - if (! register_type (component_registry, type->name, type->icon_name, component)) { - g_warning ("Cannot register type `%s' for component %s", - type->name, component->id); - } else { - g_print ("Registered type for component -- (%s) %s\n", - type->name, component->id); - } - } - - CORBA_free (supported_types); - - return TRUE; -} - - -/* GtkObject methods. */ - -static void -component_id_foreach_free (void *key, - void *value, - void *user_data) -{ - Component *component; - - component = (Component *) value; - component_free (component); -} - -static void -destroy (GtkObject *object) -{ - EComponentRegistry *component_registry; - EComponentRegistryPrivate *priv; - - component_registry = E_COMPONENT_REGISTRY (object); - priv = component_registry->priv; - - bonobo_object_unref (BONOBO_OBJECT (priv->shell)); - - g_hash_table_foreach (priv->component_id_to_component, component_id_foreach_free, NULL); - g_hash_table_destroy (priv->component_id_to_component); - - g_free (priv); -} - - -static void -class_init (EComponentRegistryClass *klass) -{ - GtkObjectClass *object_class; - - object_class = GTK_OBJECT_CLASS (klass); - object_class->destroy = destroy; - - parent_class = gtk_type_class (gtk_object_get_type ()); -} - - -static void -init (EComponentRegistry *component_registry) -{ - EComponentRegistryPrivate *priv; - - priv = g_new (EComponentRegistryPrivate, 1); - priv->shell = NULL; - priv->component_id_to_component = g_hash_table_new (g_str_hash, g_str_equal); - - component_registry->priv = priv; -} - - -void -e_component_registry_construct (EComponentRegistry *component_registry, - EShell *shell) -{ - EComponentRegistryPrivate *priv; - - g_return_if_fail (component_registry != NULL); - g_return_if_fail (E_IS_COMPONENT_REGISTRY (component_registry)); - g_return_if_fail (shell != NULL); - g_return_if_fail (E_IS_SHELL (shell)); - - priv = component_registry->priv; - - bonobo_object_ref (BONOBO_OBJECT (shell)); - priv->shell = shell; -} - -EComponentRegistry * -e_component_registry_new (EShell *shell) -{ - EComponentRegistry *component_registry; - - g_return_val_if_fail (shell != NULL, NULL); - g_return_val_if_fail (E_IS_SHELL (shell), NULL); - - component_registry = gtk_type_new (e_component_registry_get_type ()); - e_component_registry_construct (component_registry, shell); - - return component_registry; -} - - -gboolean -e_component_registry_register_component (EComponentRegistry *component_registry, - const char *id) -{ - g_return_val_if_fail (component_registry != NULL, FALSE); - g_return_val_if_fail (E_IS_COMPONENT_REGISTRY (component_registry), FALSE); - g_return_val_if_fail (id != NULL, FALSE); - - return register_component (component_registry, id); -} - - -E_MAKE_TYPE (e_component_registry, "EComponentRegistry", EComponentRegistry, - class_init, init, PARENT_TYPE) diff --git a/shell/e-component-registry.h b/shell/e-component-registry.h deleted file mode 100644 index 298b756391..0000000000 --- a/shell/e-component-registry.h +++ /dev/null @@ -1,74 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-component-registry.h - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -#ifndef __E_COMPONENT_REGISTRY_H__ -#define __E_COMPONENT_REGISTRY_H__ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include - -#include "e-shell.h" - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus */ - -#define E_TYPE_COMPONENT_REGISTRY (e_component_registry_get_type ()) -#define E_COMPONENT_REGISTRY(obj) (GTK_CHECK_CAST ((obj), E_TYPE_COMPONENT_REGISTRY, EComponentRegistry)) -#define E_COMPONENT_REGISTRY_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_COMPONENT_REGISTRY, EComponentRegistryClass)) -#define E_IS_COMPONENT_REGISTRY(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_COMPONENT_REGISTRY)) -#define E_IS_COMPONENT_REGISTRY_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_COMPONENT_REGISTRY)) - - -typedef struct _EComponentRegistry EComponentRegistry; -typedef struct _EComponentRegistryPrivate EComponentRegistryPrivate; -typedef struct _EComponentRegistryClass EComponentRegistryClass; - -struct _EComponentRegistry { - GtkObject parent; - - EComponentRegistryPrivate *priv; -}; - -struct _EComponentRegistryClass { - GtkObjectClass parent_class; -}; - - -GtkType e_component_registry_get_type (void); -void e_component_registry_construct (EComponentRegistry *component_registry, - EShell *shell); -EComponentRegistry *e_component_registry_new (EShell *shell); - -gboolean e_component_registry_register_component (EComponentRegistry *component_registry, - const char *id); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* __E_COMPONENT_REGISTRY_H__ */ diff --git a/shell/e-corba-storage-registry.c b/shell/e-corba-storage-registry.c deleted file mode 100644 index c3b259bb71..0000000000 --- a/shell/e-corba-storage-registry.c +++ /dev/null @@ -1,246 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-corba-storage-registry.c - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include "e-util/e-util.h" - -#include "e-corba-storage.h" - -#include "e-corba-storage-registry.h" - - -#define PARENT_TYPE BONOBO_OBJECT_TYPE -static BonoboObjectClass *parent_class = NULL; - -struct _ECorbaStorageRegistryPrivate { - EStorageSet *storage_set; -}; - - -/* CORBA interface implementation. */ - -static POA_Evolution_StorageRegistry__vepv storage_registry_vepv; - -static POA_Evolution_StorageRegistry * -create_servant (void) -{ - POA_Evolution_StorageRegistry *servant; - CORBA_Environment ev; - - servant = (POA_Evolution_StorageRegistry *) g_new0 (BonoboObjectServant, 1); - servant->vepv = &storage_registry_vepv; - - CORBA_exception_init (&ev); - - POA_Evolution_StorageRegistry__init ((PortableServer_Servant) servant, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_free (servant); - CORBA_exception_free (&ev); - return NULL; - } - - CORBA_exception_free (&ev); - - return servant; -} - -static Evolution_StorageListener -impl_StorageRegistry_register_storage (PortableServer_Servant servant, - const Evolution_Storage storage_interface, - const CORBA_char *name, - CORBA_Environment *ev) -{ - BonoboObject *bonobo_object; - ECorbaStorageRegistry *storage_registry; - ECorbaStorageRegistryPrivate *priv; - EStorage *storage; - Evolution_StorageListener listener_interface; - - g_print ("Shell: Registering storage -- %s\n", name); - - bonobo_object = bonobo_object_from_servant (servant); - storage_registry = E_CORBA_STORAGE_REGISTRY (bonobo_object); - priv = storage_registry->priv; - - storage = e_corba_storage_new (storage_interface, name); - - if (! e_storage_set_add_storage (priv->storage_set, storage)) { - CORBA_exception_set (ev, - CORBA_USER_EXCEPTION, - ex_Evolution_StorageRegistry_Exists, - NULL); - return CORBA_OBJECT_NIL; - } - - gtk_object_unref (GTK_OBJECT (storage)); - - listener_interface = CORBA_Object_duplicate (e_corba_storage_get_StorageListener - (E_CORBA_STORAGE (storage)), ev); - - return listener_interface; -} - -static void -impl_StorageRegistry_unregister_storage (PortableServer_Servant servant, - const CORBA_char *name, - CORBA_Environment *ev) -{ - BonoboObject *bonobo_object; - ECorbaStorageRegistry *storage_registry; - ECorbaStorageRegistryPrivate *priv; - EStorage *storage; - - bonobo_object = bonobo_object_from_servant (servant); - storage_registry = E_CORBA_STORAGE_REGISTRY (bonobo_object); - priv = storage_registry->priv; - - storage = e_storage_set_get_storage (priv->storage_set, name); - if (storage == NULL) { - CORBA_exception_set (ev, CORBA_USER_EXCEPTION, - ex_Evolution_StorageRegistry_NotFound, - NULL); - return; - } - - /* FIXME: Yucky to get the storage by name and then remove it. */ - /* FIXME: Check failure. */ - e_storage_set_remove_storage (priv->storage_set, storage); -} - - -/* GtkObject methods. */ - -static void -destroy (GtkObject *object) -{ - ECorbaStorageRegistry *corba_storage_registry; - ECorbaStorageRegistryPrivate *priv; - - corba_storage_registry = E_CORBA_STORAGE_REGISTRY (object); - priv = corba_storage_registry->priv; - - if (priv->storage_set != NULL) - gtk_object_unref (GTK_OBJECT (priv->storage_set)); - g_free (priv); - - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); -} - - -/* Initialization. */ - -static void -corba_class_init (void) -{ - POA_Evolution_StorageRegistry__vepv *vepv; - POA_Evolution_StorageRegistry__epv *epv; - PortableServer_ServantBase__epv *base_epv; - - base_epv = g_new0 (PortableServer_ServantBase__epv, 1); - base_epv->_private = NULL; - base_epv->finalize = NULL; - base_epv->default_POA = NULL; - - epv = g_new0 (POA_Evolution_StorageRegistry__epv, 1); - epv->register_storage = impl_StorageRegistry_register_storage; - epv->unregister_storage = impl_StorageRegistry_unregister_storage; - - vepv = &storage_registry_vepv; - vepv->_base_epv = base_epv; - vepv->Bonobo_Unknown_epv = bonobo_object_get_epv (); - vepv->Evolution_StorageRegistry_epv = epv; -} - -static void -class_init (ECorbaStorageRegistryClass *klass) -{ - GtkObjectClass *object_class; - - object_class = GTK_OBJECT_CLASS (klass); - object_class->destroy = destroy; - - parent_class = gtk_type_class (PARENT_TYPE); - - corba_class_init (); -} - -static void -init (ECorbaStorageRegistry *corba_storage_registry) -{ - ECorbaStorageRegistryPrivate *priv; - - priv = g_new (ECorbaStorageRegistryPrivate, 1); - priv->storage_set = NULL; - - corba_storage_registry->priv = priv; -} - - -void -e_corba_storage_registry_construct (ECorbaStorageRegistry *corba_storage_registry, - Evolution_StorageRegistry corba_object, - EStorageSet *storage_set) -{ - ECorbaStorageRegistryPrivate *priv; - - g_return_if_fail (corba_storage_registry != NULL); - g_return_if_fail (E_IS_CORBA_STORAGE_REGISTRY (corba_storage_registry)); - g_return_if_fail (corba_object != CORBA_OBJECT_NIL); - - bonobo_object_construct (BONOBO_OBJECT (corba_storage_registry), corba_object); - - priv = corba_storage_registry->priv; - - gtk_object_ref (GTK_OBJECT (storage_set)); - priv->storage_set = storage_set; -} - -ECorbaStorageRegistry * -e_corba_storage_registry_new (EStorageSet *storage_set) -{ - ECorbaStorageRegistry *corba_storage_registry; - POA_Evolution_StorageRegistry *servant; - Evolution_StorageRegistry corba_object; - - g_return_val_if_fail (storage_set != NULL, NULL); - g_return_val_if_fail (E_IS_STORAGE_SET (storage_set), NULL); - - servant = create_servant (); - if (servant == NULL) - return NULL; - - corba_storage_registry = gtk_type_new (e_corba_storage_registry_get_type ()); - - corba_object = bonobo_object_activate_servant (BONOBO_OBJECT (corba_storage_registry), - servant); - - e_corba_storage_registry_construct (corba_storage_registry, corba_object, storage_set); - - return corba_storage_registry; -} - - -E_MAKE_TYPE (e_corba_storage_registry, "ECorbaStorageRegistry", ECorbaStorageRegistry, class_init, init, PARENT_TYPE) diff --git a/shell/e-corba-storage-registry.h b/shell/e-corba-storage-registry.h deleted file mode 100644 index baf689c551..0000000000 --- a/shell/e-corba-storage-registry.h +++ /dev/null @@ -1,73 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-corba-storage-registry.h - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -#ifndef __E_CORBA_STORAGE_REGISTRY_H__ -#define __E_CORBA_STORAGE_REGISTRY_H__ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include - -#include "Evolution.h" -#include "e-storage-set.h" - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus */ - -#define E_TYPE_CORBA_STORAGE_REGISTRY (e_corba_storage_registry_get_type ()) -#define E_CORBA_STORAGE_REGISTRY(obj) (GTK_CHECK_CAST ((obj), E_TYPE_CORBA_STORAGE_REGISTRY, ECorbaStorageRegistry)) -#define E_CORBA_STORAGE_REGISTRY_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_CORBA_STORAGE_REGISTRY, ECorbaStorageRegistryClass)) -#define E_IS_CORBA_STORAGE_REGISTRY(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_CORBA_STORAGE_REGISTRY)) -#define E_IS_CORBA_STORAGE_REGISTRY_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_CORBA_STORAGE_REGISTRY)) - - -typedef struct _ECorbaStorageRegistry ECorbaStorageRegistry; -typedef struct _ECorbaStorageRegistryPrivate ECorbaStorageRegistryPrivate; -typedef struct _ECorbaStorageRegistryClass ECorbaStorageRegistryClass; - -struct _ECorbaStorageRegistry { - BonoboObject parent; - - ECorbaStorageRegistryPrivate *priv; -}; - -struct _ECorbaStorageRegistryClass { - BonoboObjectClass parent_class; -}; - - -GtkType e_corba_storage_registry_get_type (void); -void e_corba_storage_registry_construct (ECorbaStorageRegistry *corba_storage_registry, - Evolution_StorageRegistry corba_object, - EStorageSet *storage_set); -ECorbaStorageRegistry *e_corba_storage_registry_new (EStorageSet *storage_set); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* __E_CORBA_STORAGE_REGISTRY_H__ */ diff --git a/shell/e-corba-storage.c b/shell/e-corba-storage.c deleted file mode 100644 index 00f1c575b0..0000000000 --- a/shell/e-corba-storage.c +++ /dev/null @@ -1,354 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-corba-storage.c - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include - -#include "e-util/e-util.h" - -#include "Evolution.h" - -#include "e-corba-storage.h" - - -#define PARENT_TYPE E_TYPE_STORAGE -static EStorageClass *parent_class = NULL; - -typedef struct _StorageListenerServant StorageListenerServant; - -struct _ECorbaStoragePrivate { - char *name; - - Evolution_Storage storage_interface; - - /* The Evolution::StorageListener interface we expose. */ - - Evolution_StorageListener storage_listener_interface; - StorageListenerServant *storage_listener_servant; -}; - - -/* Implementation of the CORBA Evolution::StorageListener interface. */ - -static POA_Evolution_StorageListener__vepv storage_listener_vepv; - -struct _StorageListenerServant { - POA_Evolution_StorageListener servant; - EStorage *storage; -}; - -static StorageListenerServant * -storage_listener_servant_new (ECorbaStorage *corba_storage) -{ - StorageListenerServant *servant; - - servant = g_new0 (StorageListenerServant, 1); - - servant->servant.vepv = &storage_listener_vepv; - - gtk_object_ref (GTK_OBJECT (corba_storage)); - servant->storage = E_STORAGE (corba_storage); - - return servant; -} - -static void -storage_listener_servant_free (StorageListenerServant *servant) -{ - gtk_object_unref (GTK_OBJECT (servant->storage)); - - g_free (servant); -} - -#if 0 -static void -impl_StorageListener_destroy (PortableServer_Servant servant, - CORBA_Environment *ev) -{ - /* FIXME */ -} -#endif - -static void -impl_StorageListener_new_folder (PortableServer_Servant servant, - const CORBA_char *path, - const Evolution_Folder *folder, - CORBA_Environment *ev) -{ - StorageListenerServant *storage_listener_servant; - EStorage *storage; - EFolder *e_folder; - - storage_listener_servant = (StorageListenerServant *) servant; - storage = storage_listener_servant->storage; - - e_folder = e_folder_new (folder->name, - folder->type, - folder->description); - - e_folder_set_physical_uri (e_folder, folder->physical_uri); - - if (! e_storage_new_folder (storage, path, e_folder)) { - g_print ("Cannot register folder -- %s %s\n", path, folder->name); - CORBA_exception_set (ev, - CORBA_USER_EXCEPTION, - ex_Evolution_StorageListener_Exists, - NULL); - gtk_object_unref (GTK_OBJECT (e_folder)); - } - - g_print ("Folder registered successfully -- %s %s\n", path, folder->name); -} - -static void -impl_StorageListener_removed_folder (PortableServer_Servant servant, - const CORBA_char *path, - CORBA_Environment *ev) -{ - StorageListenerServant *storage_listener_servant; - EStorage *storage; - - storage_listener_servant = (StorageListenerServant *) servant; - storage = storage_listener_servant->storage; - - if (! e_storage_remove_folder (storage, path)) - CORBA_exception_set (ev, - CORBA_USER_EXCEPTION, - ex_Evolution_StorageListener_NotFound, - NULL); -} - - -static gboolean -setup_storage_listener (ECorbaStorage *corba_storage) -{ - StorageListenerServant *servant; - ECorbaStoragePrivate *priv; - Evolution_StorageListener storage_listener_interface; - CORBA_Environment ev; - - priv = corba_storage->priv; - - servant = storage_listener_servant_new (corba_storage); - - CORBA_exception_init (&ev); - - POA_Evolution_StorageListener__init (servant, &ev); - if (ev._major != CORBA_NO_EXCEPTION) - goto error; - - CORBA_free (PortableServer_POA_activate_object (bonobo_poa (), servant, &ev)); - if (ev._major != CORBA_NO_EXCEPTION) - goto error; - - storage_listener_interface = PortableServer_POA_servant_to_reference (bonobo_poa (), - servant, &ev); - if (ev._major != CORBA_NO_EXCEPTION) - goto error; - - priv->storage_listener_interface = storage_listener_interface; - priv->storage_listener_servant = servant; - - return TRUE; - - error: - storage_listener_servant_free (servant); - CORBA_exception_free (&ev); - return FALSE; -} - - -/* GtkObject methods. */ - -static void -destroy (GtkObject *object) -{ - CORBA_Environment ev; - ECorbaStorage *corba_storage; - ECorbaStoragePrivate *priv; - - corba_storage = E_CORBA_STORAGE (object); - priv = corba_storage->priv; - - g_free (priv->name); - - CORBA_exception_init (&ev); - - if (priv->storage_interface != CORBA_OBJECT_NIL) { - Bonobo_Unknown_unref (priv->storage_interface, &ev); - CORBA_Object_release (priv->storage_interface, &ev); - } - - if (priv->storage_listener_interface != CORBA_OBJECT_NIL) - CORBA_Object_release (priv->storage_listener_interface, &ev); - - if (priv->storage_listener_servant != NULL) { - PortableServer_ObjectId *object_id; - - object_id = PortableServer_POA_servant_to_id (bonobo_poa (), priv->storage_listener_servant, - &ev); - PortableServer_POA_deactivate_object (bonobo_poa (), object_id, &ev); - - POA_Evolution_StorageListener__fini (priv->storage_listener_servant, &ev); - CORBA_free (object_id); - } - - CORBA_exception_free (&ev); - - g_free (priv); - - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); -} - - -/* EStorage methods. */ - -static const char * -get_name (EStorage *storage) -{ - ECorbaStorage *corba_storage; - ECorbaStoragePrivate *priv; - - corba_storage = E_CORBA_STORAGE (storage); - priv = corba_storage->priv; - - return priv->name; -} - - -static void -corba_class_init (void) -{ - POA_Evolution_StorageListener__vepv *vepv; - POA_Evolution_StorageListener__epv *epv; - PortableServer_ServantBase__epv *base_epv; - - base_epv = g_new0 (PortableServer_ServantBase__epv, 1); - base_epv->_private = NULL; - base_epv->finalize = NULL; - base_epv->default_POA = NULL; - - epv = g_new0 (POA_Evolution_StorageListener__epv, 1); - epv->new_folder = impl_StorageListener_new_folder; - epv->removed_folder = impl_StorageListener_removed_folder; - - vepv = &storage_listener_vepv; - vepv->_base_epv = base_epv; - vepv->Evolution_StorageListener_epv = epv; -} - -static void -class_init (ECorbaStorageClass *klass) -{ - GtkObjectClass *object_class; - EStorageClass *storage_class; - - object_class = GTK_OBJECT_CLASS (klass); - object_class->destroy = destroy; - - storage_class = E_STORAGE_CLASS (klass); - storage_class->get_name = get_name; - - corba_class_init (); - - parent_class = gtk_type_class (PARENT_TYPE); -} - -static void -init (ECorbaStorage *corba_storage) -{ - ECorbaStoragePrivate *priv; - - priv = g_new (ECorbaStoragePrivate, 1); - priv->name = NULL; - priv->storage_interface = CORBA_OBJECT_NIL; - - corba_storage->priv = priv; -} - - -/* FIXME: OK to have a boolean construct function? */ -void -e_corba_storage_construct (ECorbaStorage *corba_storage, - const Evolution_Storage storage_interface, - const char *name) -{ - ECorbaStoragePrivate *priv; - CORBA_Environment ev; - - g_return_if_fail (corba_storage != NULL); - g_return_if_fail (E_IS_CORBA_STORAGE (corba_storage)); - g_return_if_fail (storage_interface != CORBA_OBJECT_NIL); - g_return_if_fail (name != NULL); - - e_storage_construct (E_STORAGE (corba_storage)); - - priv = corba_storage->priv; - - priv->name = g_strdup (name); - - CORBA_exception_init (&ev); - - Bonobo_Unknown_ref (storage_interface, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("%s -- Cannot reference Bonobo object", __FUNCTION__); - } else { - priv->storage_interface = CORBA_Object_duplicate (storage_interface, &ev); - } - - CORBA_exception_free (&ev); - - setup_storage_listener (corba_storage); -} - -EStorage * -e_corba_storage_new (const Evolution_Storage storage_interface, - const char *name) -{ - EStorage *new; - - g_return_val_if_fail (storage_interface != CORBA_OBJECT_NIL, NULL); - g_return_val_if_fail (name != NULL, NULL); - - new = gtk_type_new (e_corba_storage_get_type ()); - - e_corba_storage_construct (E_CORBA_STORAGE (new), storage_interface, name); - - return new; -} - - -const Evolution_StorageListener -e_corba_storage_get_StorageListener (ECorbaStorage *corba_storage) -{ - g_return_val_if_fail (corba_storage != NULL, NULL); - g_return_val_if_fail (E_IS_CORBA_STORAGE (corba_storage), NULL); - - return corba_storage->priv->storage_listener_interface; -} - - -E_MAKE_TYPE (e_corba_storage, "ECorbaStorage", ECorbaStorage, class_init, init, PARENT_TYPE) diff --git a/shell/e-corba-storage.h b/shell/e-corba-storage.h deleted file mode 100644 index 99ab23e97e..0000000000 --- a/shell/e-corba-storage.h +++ /dev/null @@ -1,76 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-corba-storage.h - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -#ifndef __E_CORBA_STORAGE_H__ -#define __E_CORBA_STORAGE_H__ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include "e-storage.h" - -#include "Evolution.h" - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus */ - -#define E_TYPE_CORBA_STORAGE (e_corba_storage_get_type ()) -#define E_CORBA_STORAGE(obj) (GTK_CHECK_CAST ((obj), E_TYPE_CORBA_STORAGE, ECorbaStorage)) -#define E_CORBA_STORAGE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_CORBA_STORAGE, ECorbaStorageClass)) -#define E_IS_CORBA_STORAGE(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_CORBA_STORAGE)) -#define E_IS_CORBA_STORAGE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_CORBA_STORAGE)) - - -typedef struct _ECorbaStorage ECorbaStorage; -typedef struct _ECorbaStoragePrivate ECorbaStoragePrivate; -typedef struct _ECorbaStorageClass ECorbaStorageClass; - -struct _ECorbaStorage { - EStorage parent; - - ECorbaStoragePrivate *priv; -}; - -struct _ECorbaStorageClass { - EStorageClass parent_class; -}; - - -GtkType e_corba_storage_get_type (void); -void e_corba_storage_construct (ECorbaStorage *corba_storage, - const Evolution_Storage storage_interface, - const char *name); -EStorage *e_corba_storage_new (const Evolution_Storage storage_interface, - const char *name); - -/* FIXME: I don't like this call. */ -const Evolution_StorageListener e_corba_storage_get_StorageListener (ECorbaStorage *corba_storage); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* __E_CORBA_STORAGE_H__ */ diff --git a/shell/e-folder-type-registry.c b/shell/e-folder-type-registry.c deleted file mode 100644 index e5447ca54d..0000000000 --- a/shell/e-folder-type-registry.c +++ /dev/null @@ -1,336 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-folder-type-registry.c - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include - -#include "e-util/e-util.h" - -#include "e-shell-utils.h" - -#include "e-folder-type-registry.h" - - -#define PARENT_TYPE GTK_TYPE_OBJECT -static GtkObjectClass *parent_class = NULL; - -struct _FolderType { - char *name; - char *icon_name; - - BonoboObjectClient *handler; - - /* The icon, standard (48x48) and mini (16x16) versions. */ - GdkPixbuf *icon_pixbuf; - GdkPixbuf *mini_icon_pixbuf; -}; -typedef struct _FolderType FolderType; - -struct _EFolderTypeRegistryPrivate { - GHashTable *name_to_type; -}; - - -/* FolderType handling. */ - -static FolderType * -folder_type_new (const char *name, - const char *icon_name) -{ - FolderType *new; - char *icon_path; - - new = g_new (FolderType, 1); - - new->name = g_strdup (name); - new->icon_name = g_strdup (icon_name); - new->handler = NULL; - - icon_path = e_shell_get_icon_path (icon_name, FALSE); - if (icon_path == NULL) - new->icon_pixbuf = NULL; - else - new->icon_pixbuf = gdk_pixbuf_new_from_file (icon_path); - - g_free (icon_path); - - icon_path = e_shell_get_icon_path (icon_name, TRUE); - if (icon_path != NULL) { - new->mini_icon_pixbuf = gdk_pixbuf_new_from_file (icon_path); - } else { - if (new->icon_pixbuf != NULL) - new->mini_icon_pixbuf = gdk_pixbuf_ref (new->icon_pixbuf); - else - new->mini_icon_pixbuf = NULL; - } - - g_free (icon_path); - - return new; -} - -static void -folder_type_free (FolderType *folder_type) -{ - g_free (folder_type->name); - g_free (folder_type->icon_name); - - if (folder_type->icon_pixbuf != NULL) - gdk_pixbuf_unref (folder_type->icon_pixbuf); - if (folder_type->mini_icon_pixbuf != NULL) - gdk_pixbuf_unref (folder_type->mini_icon_pixbuf); - - if (folder_type->handler != NULL) - bonobo_object_unref (BONOBO_OBJECT (folder_type->handler)); - - g_free (folder_type); -} - -static FolderType * -get_folder_type (EFolderTypeRegistry *folder_type_registry, - const char *type_name) -{ - EFolderTypeRegistryPrivate *priv; - - priv = folder_type_registry->priv; - - return g_hash_table_lookup (priv->name_to_type, type_name); -} - -static gboolean -register_folder_type (EFolderTypeRegistry *folder_type_registry, - const char *name, - const char *icon_name) -{ - EFolderTypeRegistryPrivate *priv; - FolderType *folder_type; - - priv = folder_type_registry->priv; - - /* Make sure we don't add the same type twice. */ - if (get_folder_type (folder_type_registry, name) != NULL) - return FALSE; - - folder_type = folder_type_new (name, icon_name); - g_hash_table_insert (priv->name_to_type, folder_type->name, folder_type); - - return TRUE; -} - -static gboolean -set_handler (EFolderTypeRegistry *folder_type_registry, - const char *name, - BonoboObjectClient *handler) -{ - EFolderTypeRegistryPrivate *priv; - FolderType *folder_type; - - priv = folder_type_registry->priv; - - folder_type = get_folder_type (folder_type_registry, name); - if (folder_type == NULL) - return FALSE; - if (folder_type->handler != NULL) { - g_warning ("Folder type already has a handler -- %s", folder_type->name); - return FALSE; - } - - bonobo_object_ref (BONOBO_OBJECT (handler)); - folder_type->handler = handler; - - return TRUE; -} - - -/* GtkObject methods. */ - -static void -hash_forall_free_folder_type (gpointer key, - gpointer value, - gpointer data) -{ - FolderType *folder_type; - - folder_type = (FolderType *) value; - folder_type_free (folder_type); -} - -static void -destroy (GtkObject *object) -{ - EFolderTypeRegistry *folder_type_registry; - EFolderTypeRegistryPrivate *priv; - - folder_type_registry = E_FOLDER_TYPE_REGISTRY (object); - priv = folder_type_registry->priv; - - g_hash_table_foreach (priv->name_to_type, hash_forall_free_folder_type, NULL); - g_hash_table_destroy (priv->name_to_type); - - g_free (priv); - - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); -} - - -static void -class_init (EFolderTypeRegistryClass *class) -{ - GtkObjectClass *object_class; - - object_class = GTK_OBJECT_CLASS (class); - object_class->destroy = destroy; - - parent_class = gtk_type_class (gtk_object_get_type ()); -} - -static void -init (EFolderTypeRegistry *folder_type_registry) -{ - EFolderTypeRegistryPrivate *priv; - - priv = g_new (EFolderTypeRegistryPrivate, 1); - priv->name_to_type = g_hash_table_new (g_str_hash, g_str_equal); - - folder_type_registry->priv = priv; -} - - -void -e_folder_type_registry_construct (EFolderTypeRegistry *folder_type_registry) -{ - g_return_if_fail (folder_type_registry != NULL); - g_return_if_fail (E_IS_FOLDER_TYPE_REGISTRY (folder_type_registry)); - - GTK_OBJECT_UNSET_FLAGS (GTK_OBJECT (folder_type_registry), GTK_FLOATING); -} - -EFolderTypeRegistry * -e_folder_type_registry_new (void) -{ - EFolderTypeRegistry *new; - - new = gtk_type_new (e_folder_type_registry_get_type ()); - - e_folder_type_registry_construct (new); - - return new; -} - - -gboolean -e_folder_type_registry_register_type (EFolderTypeRegistry *folder_type_registry, - const char *type_name, - const char *icon_name) -{ - g_return_val_if_fail (folder_type_registry != NULL, FALSE); - g_return_val_if_fail (E_IS_FOLDER_TYPE_REGISTRY (folder_type_registry), FALSE); - g_return_val_if_fail (type_name != NULL, FALSE); - g_return_val_if_fail (icon_name != NULL, FALSE); - - return register_folder_type (folder_type_registry, type_name, icon_name); -} - -gboolean -e_folder_type_registry_set_handler_for_type (EFolderTypeRegistry *folder_type_registry, - const char *type_name, - BonoboObjectClient *handler) -{ - g_return_val_if_fail (folder_type_registry != NULL, FALSE); - g_return_val_if_fail (E_IS_FOLDER_TYPE_REGISTRY (folder_type_registry), FALSE); - g_return_val_if_fail (handler != NULL, FALSE); - g_return_val_if_fail (BONOBO_IS_OBJECT_CLIENT (handler), FALSE); - - return set_handler (folder_type_registry, type_name, handler); -} - - - -const char * -e_folder_type_registry_get_icon_name_for_type (EFolderTypeRegistry *folder_type_registry, - const char *type_name) -{ - const FolderType *folder_type; - - g_return_val_if_fail (folder_type_registry != NULL, NULL); - g_return_val_if_fail (E_IS_FOLDER_TYPE_REGISTRY (folder_type_registry), NULL); - g_return_val_if_fail (type_name != NULL, NULL); - - folder_type = get_folder_type (folder_type_registry, type_name); - if (folder_type == NULL) { - g_warning ("%s: Unknown type -- %s", __FUNCTION__, type_name); - return NULL; - } - - return folder_type->icon_name; -} - -GdkPixbuf * -e_folder_type_registry_get_icon_for_type (EFolderTypeRegistry *folder_type_registry, - const char *type_name, - gboolean mini) -{ - const FolderType *folder_type; - - g_return_val_if_fail (folder_type_registry != NULL, NULL); - g_return_val_if_fail (E_IS_FOLDER_TYPE_REGISTRY (folder_type_registry), NULL); - g_return_val_if_fail (type_name != NULL, NULL); - - folder_type = get_folder_type (folder_type_registry, type_name); - if (folder_type == NULL) { - g_warning ("%s: Unknown type -- %s", __FUNCTION__, type_name); - return NULL; - } - - if (mini) - return folder_type->mini_icon_pixbuf; - else - return folder_type->icon_pixbuf; -} - -BonoboObjectClient * -e_folder_type_registry_get_handler_for_type (EFolderTypeRegistry *folder_type_registry, - const char *type_name) -{ - const FolderType *folder_type; - - g_return_val_if_fail (folder_type_registry != NULL, NULL); - g_return_val_if_fail (E_IS_FOLDER_TYPE_REGISTRY (folder_type_registry), NULL); - g_return_val_if_fail (type_name != NULL, NULL); - - folder_type = get_folder_type (folder_type_registry, type_name); - if (folder_type == NULL) { - g_warning ("%s: Unknown type -- %s", __FUNCTION__, type_name); - return NULL; - } - - return folder_type->handler; -} - - -E_MAKE_TYPE (e_folder_type_registry, "EFolderTypeRegistry", EFolderTypeRegistry, - class_init, init, PARENT_TYPE) diff --git a/shell/e-folder-type-registry.h b/shell/e-folder-type-registry.h deleted file mode 100644 index 0297633007..0000000000 --- a/shell/e-folder-type-registry.h +++ /dev/null @@ -1,86 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-folder-type-registry.h - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -#ifndef _E_FOLDER_TYPE_REGISTRY_H_ -#define _E_FOLDER_TYPE_REGISTRY_H_ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include - -#include - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus */ - -#define E_TYPE_FOLDER_TYPE_REGISTRY (e_folder_type_registry_get_type ()) -#define E_FOLDER_TYPE_REGISTRY(obj) (GTK_CHECK_CAST ((obj), E_TYPE_FOLDER_TYPE_REGISTRY, EFolderTypeRegistry)) -#define E_FOLDER_TYPE_REGISTRY_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_FOLDER_TYPE_REGISTRY, EFolderTypeRegistryClass)) -#define E_IS_FOLDER_TYPE_REGISTRY(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_FOLDER_TYPE_REGISTRY)) -#define E_IS_FOLDER_TYPE_REGISTRY_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_FOLDER_TYPE_REGISTRY)) - - -typedef struct _EFolderTypeRegistry EFolderTypeRegistry; -typedef struct _EFolderTypeRegistryPrivate EFolderTypeRegistryPrivate; -typedef struct _EFolderTypeRegistryClass EFolderTypeRegistryClass; - -struct _EFolderTypeRegistry { - GtkObject parent; - - EFolderTypeRegistryPrivate *priv; -}; - -struct _EFolderTypeRegistryClass { - GtkObjectClass parent_class; -}; - - -GtkType e_folder_type_registry_get_type (void); -void e_folder_type_registry_construct (EFolderTypeRegistry *folder_type_registry); -EFolderTypeRegistry *e_folder_type_registry_new (void); - -gboolean e_folder_type_registry_register_type (EFolderTypeRegistry *folder_type_registry, - const char *type_name, - const char *icon_name); -gboolean e_folder_type_registry_set_handler_for_type (EFolderTypeRegistry *folder_type_registry, - const char *type_name, - BonoboObjectClient *handler); - -GdkPixbuf *e_folder_type_registry_get_icon_for_type (EFolderTypeRegistry *folder_type_registry, - const char *type_name, - gboolean mini); -const char *e_folder_type_registry_get_icon_name_for_type (EFolderTypeRegistry *folder_type_registry, - const char *type_name); -BonoboObjectClient *e_folder_type_registry_get_handler_for_type (EFolderTypeRegistry *folder_type_registry, - const char *type_name); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* _E_FOLDER_TYPE_REGISTRY_H_ */ diff --git a/shell/e-folder-type-repository.c b/shell/e-folder-type-repository.c deleted file mode 100644 index a1892657de..0000000000 --- a/shell/e-folder-type-repository.c +++ /dev/null @@ -1,305 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-folder-type-repository.c - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include - -#include "e-util/e-util.h" - -#include "e-shell-utils.h" - -#include "e-folder-type-repository.h" - - -#define PARENT_TYPE GTK_TYPE_OBJECT -static GtkObjectClass *parent_class = NULL; - -struct _FolderType { - char *name; - char *icon_name; - char *control_id; - - /* The icon, standard (48x48) and mini (16x16) versions. */ - GdkPixbuf *icon_pixbuf; - GdkPixbuf *mini_icon_pixbuf; -}; -typedef struct _FolderType FolderType; - -struct _EFolderTypeRepositoryPrivate { - GHashTable *name_to_type; -}; - - -/* FIXME these are hardcoded for now. */ - -#ifdef USING_OAF -# define CALENDAR_CONTROL_ID "OAFIID:control:calendar:dd34ddae-25c6-486b-a8a8-3e8f0286b54c" -# define CONTACTS_CONTROL_ID "OAFIID:control:addressbook:851f883b-2fe7-4c94-a1e3-a1f2a7a03c49" -# define MAIL_CONTROL_ID "OAFIID:control:evolution-mail:833d5a71-a201-4a0e-b7e6-5475c5c4cb45" -#else -# define CALENDAR_CONTROL_ID "control:calendar" -# define CONTACTS_CONTROL_ID "control:addressbook" -# define MAIL_CONTROL_ID "control:evolution-mail" -#endif - - -/* FolderType handling. */ - -static FolderType * -folder_type_new (const char *name, - const char *icon_name, - const char *control_id) -{ - FolderType *new; - char *icon_path; - - new = g_new (FolderType, 1); - - new->name = g_strdup (name); - new->icon_name = g_strdup (icon_name); - new->control_id = g_strdup (control_id); - - icon_path = e_shell_get_icon_path (icon_name, FALSE); - if (icon_path == NULL) - new->icon_pixbuf = NULL; - else - new->icon_pixbuf = gdk_pixbuf_new_from_file (icon_path); - - g_free (icon_path); - - icon_path = e_shell_get_icon_path (icon_name, TRUE); - if (icon_path != NULL) { - new->mini_icon_pixbuf = gdk_pixbuf_new_from_file (icon_path); - } else { - if (new->icon_pixbuf != NULL) - new->mini_icon_pixbuf = gdk_pixbuf_ref (new->icon_pixbuf); - else - new->mini_icon_pixbuf = NULL; - } - - g_free (icon_path); - - return new; -} - -static void -folder_type_free (FolderType *folder_type) -{ - g_free (folder_type->name); - g_free (folder_type->icon_name); - g_free (folder_type->control_id); - - if (folder_type->icon_pixbuf != NULL) - gdk_pixbuf_unref (folder_type->icon_pixbuf); - if (folder_type->mini_icon_pixbuf != NULL) - gdk_pixbuf_unref (folder_type->mini_icon_pixbuf); - - g_free (folder_type); -} - -static const FolderType * -get_folder_type (EFolderTypeRepository *folder_type_repository, - const char *type_name) -{ - EFolderTypeRepositoryPrivate *priv; - - priv = folder_type_repository->priv; - - return g_hash_table_lookup (priv->name_to_type, type_name); -} - -static gboolean -add_folder_type (EFolderTypeRepository *folder_type_repository, - const char *name, - const char *icon_name, - const char *control_id) -{ - EFolderTypeRepositoryPrivate *priv; - FolderType *folder_type; - - priv = folder_type_repository->priv; - - /* Make sure we don't add the same type twice. */ - if (get_folder_type (folder_type_repository, name) != NULL) - return FALSE; - - folder_type = folder_type_new (name, icon_name, control_id); - g_hash_table_insert (priv->name_to_type, folder_type->name, folder_type); - - return TRUE; -} - - -/* GtkObject methods. */ - -static void -hash_forall_free_folder_type (gpointer key, - gpointer value, - gpointer data) -{ - FolderType *folder_type; - - folder_type = (FolderType *) value; - folder_type_free (folder_type); -} - -static void -destroy (GtkObject *object) -{ - EFolderTypeRepository *folder_type_repository; - EFolderTypeRepositoryPrivate *priv; - - folder_type_repository = E_FOLDER_TYPE_REPOSITORY (object); - priv = folder_type_repository->priv; - - g_hash_table_foreach (priv->name_to_type, hash_forall_free_folder_type, NULL); - g_hash_table_destroy (priv->name_to_type); - - g_free (priv); - - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); -} - - -static void -class_init (EFolderTypeRepositoryClass *class) -{ - GtkObjectClass *object_class; - - object_class = GTK_OBJECT_CLASS (class); - object_class->destroy = destroy; - - parent_class = gtk_type_class (gtk_object_get_type ()); -} - -static void -init (EFolderTypeRepository *folder_type_repository) -{ - EFolderTypeRepositoryPrivate *priv; - - priv = g_new (EFolderTypeRepositoryPrivate, 1); - priv->name_to_type = g_hash_table_new (g_str_hash, g_str_equal); - - folder_type_repository->priv = priv; -} - - -void -e_folder_type_repository_construct (EFolderTypeRepository *folder_type_repository) -{ - g_return_if_fail (folder_type_repository != NULL); - g_return_if_fail (E_IS_FOLDER_TYPE_REPOSITORY (folder_type_repository)); - - GTK_OBJECT_UNSET_FLAGS (GTK_OBJECT (folder_type_repository), GTK_FLOATING); - - /* FIXME these are hardcoded for now. */ - - add_folder_type (folder_type_repository, - "mail", "evolution-inbox.png", MAIL_CONTROL_ID); - add_folder_type (folder_type_repository, - "calendar", "evolution-calendar.png", CALENDAR_CONTROL_ID); - add_folder_type (folder_type_repository, - "contacts", "evolution-contacts.png", CONTACTS_CONTROL_ID); -} - -EFolderTypeRepository * -e_folder_type_repository_new (void) -{ - EFolderTypeRepository *new; - - new = gtk_type_new (e_folder_type_repository_get_type ()); - - e_folder_type_repository_construct (new); - - return new; -} - - -const char * -e_folder_type_repository_get_icon_name_for_type (EFolderTypeRepository *folder_type_repository, - const char *type_name) -{ - const FolderType *folder_type; - - g_return_val_if_fail (folder_type_repository != NULL, NULL); - g_return_val_if_fail (E_IS_FOLDER_TYPE_REPOSITORY (folder_type_repository), NULL); - g_return_val_if_fail (type_name != NULL, NULL); - - folder_type = get_folder_type (folder_type_repository, type_name); - if (folder_type == NULL) { - g_warning ("%s: Unknown type -- %s", __FUNCTION__, type_name); - return NULL; - } - - return folder_type->icon_name; -} - -GdkPixbuf * -e_folder_type_repository_get_icon_for_type (EFolderTypeRepository *folder_type_repository, - const char *type_name, - gboolean mini) -{ - const FolderType *folder_type; - - g_return_val_if_fail (folder_type_repository != NULL, NULL); - g_return_val_if_fail (E_IS_FOLDER_TYPE_REPOSITORY (folder_type_repository), NULL); - g_return_val_if_fail (type_name != NULL, NULL); - - folder_type = get_folder_type (folder_type_repository, type_name); - if (folder_type == NULL) { - g_warning ("%s: Unknown type -- %s", __FUNCTION__, type_name); - return NULL; - } - - if (mini) - return folder_type->mini_icon_pixbuf; - else - return folder_type->icon_pixbuf; -} - -const char * -e_folder_type_repository_get_control_id_for_type (EFolderTypeRepository *folder_type_repository, - const char *type_name) -{ - const FolderType *folder_type; - - g_return_val_if_fail (folder_type_repository != NULL, NULL); - g_return_val_if_fail (E_IS_FOLDER_TYPE_REPOSITORY (folder_type_repository), NULL); - g_return_val_if_fail (type_name != NULL, NULL); - - folder_type = get_folder_type (folder_type_repository, type_name); - if (folder_type == NULL) { - g_warning ("%s: Unknown type -- %s", __FUNCTION__, type_name); - return NULL; - } - - return folder_type->control_id; -} - - -E_MAKE_TYPE (e_folder_type_repository, "EFolderTypeRepository", EFolderTypeRepository, - class_init, init, PARENT_TYPE) diff --git a/shell/e-folder-type-repository.h b/shell/e-folder-type-repository.h deleted file mode 100644 index fe2b06eaf6..0000000000 --- a/shell/e-folder-type-repository.h +++ /dev/null @@ -1,77 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-folder-type-repository.h - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -#ifndef _E_FOLDER_TYPE_REPOSITORY_H_ -#define _E_FOLDER_TYPE_REPOSITORY_H_ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus */ - -#define E_TYPE_FOLDER_TYPE_REPOSITORY (e_folder_type_repository_get_type ()) -#define E_FOLDER_TYPE_REPOSITORY(obj) (GTK_CHECK_CAST ((obj), E_TYPE_FOLDER_TYPE_REPOSITORY, EFolderTypeRepository)) -#define E_FOLDER_TYPE_REPOSITORY_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_FOLDER_TYPE_REPOSITORY, EFolderTypeRepositoryClass)) -#define E_IS_FOLDER_TYPE_REPOSITORY(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_FOLDER_TYPE_REPOSITORY)) -#define E_IS_FOLDER_TYPE_REPOSITORY_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_FOLDER_TYPE_REPOSITORY)) - - -typedef struct _EFolderTypeRepository EFolderTypeRepository; -typedef struct _EFolderTypeRepositoryPrivate EFolderTypeRepositoryPrivate; -typedef struct _EFolderTypeRepositoryClass EFolderTypeRepositoryClass; - -struct _EFolderTypeRepository { - GtkObject parent; - - EFolderTypeRepositoryPrivate *priv; -}; - -struct _EFolderTypeRepositoryClass { - GtkObjectClass parent_class; -}; - - -GtkType e_folder_type_repository_get_type (void); -void e_folder_type_repository_construct (EFolderTypeRepository *folder_type_repository); -EFolderTypeRepository *e_folder_type_repository_new (void); - -GdkPixbuf *e_folder_type_repository_get_icon_for_type (EFolderTypeRepository *folder_type_repository, - const char *type_name, - gboolean mini); -const char *e_folder_type_repository_get_icon_name_for_type (EFolderTypeRepository *folder_type_repository, - const char *type_name); -const char *e_folder_type_repository_get_control_id_for_type (EFolderTypeRepository *folder_type_repository, - const char *type_name); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* _E_FOLDER_TYPE_REPOSITORY_H_ */ diff --git a/shell/e-folder.c b/shell/e-folder.c deleted file mode 100644 index 2e16c0896e..0000000000 --- a/shell/e-folder.c +++ /dev/null @@ -1,290 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-folder.c - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include - -#include "e-util/e-util.h" - -#include "e-folder.h" - - -#define PARENT_TYPE GTK_TYPE_OBJECT -static GtkObjectClass *parent_class = NULL; - -struct _EFolderPrivate { - char *name; - char *type; - char *description; - char *physical_uri; -}; - -#define EF_CLASS(obj) \ - E_FOLDER_CLASS (GTK_OBJECT (obj)->klass) - - -enum { - CHANGED, - LAST_SIGNAL -}; - -static guint signals[LAST_SIGNAL] = { 0 }; - - -/* EFolder methods. */ - -static gboolean -save_info (EFolder *folder) -{ - g_warning ("`%s' does not implement `EFolder::save_info()'", - gtk_type_name (GTK_OBJECT_TYPE (folder))); - return FALSE; -} - -static gboolean -load_info (EFolder *folder) -{ - g_warning ("`%s' does not implement `EFolder::load_info()'", - gtk_type_name (GTK_OBJECT_TYPE (folder))); - return FALSE; -} - -static gboolean -remove (EFolder *folder) -{ - g_warning ("`%s' does not implement `EFolder::remove()'", - gtk_type_name (GTK_OBJECT_TYPE (folder))); - return FALSE; -} - -static const char * -get_physical_uri (EFolder *folder) -{ - return folder->priv->physical_uri; -} - - -/* GtkObject methods. */ - -static void -destroy (GtkObject *object) -{ - EFolder *folder; - EFolderPrivate *priv; - - folder = E_FOLDER (object); - priv = folder->priv; - - g_free (priv->name); - g_free (priv->type); - g_free (priv->description); - g_free (priv->physical_uri); - - g_free (priv); - - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); -} - - -static void -class_init (EFolderClass *klass) -{ - GtkObjectClass *object_class; - - parent_class = gtk_type_class (gtk_object_get_type ()); - - object_class = GTK_OBJECT_CLASS (klass); - object_class->destroy = destroy; - - signals[CHANGED] = gtk_signal_new ("changed", - GTK_RUN_FIRST, - object_class->type, - GTK_SIGNAL_OFFSET (EFolderClass, changed), - gtk_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); - - gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); - - klass->save_info = save_info; - klass->load_info = load_info; - klass->remove = remove; - klass->get_physical_uri = get_physical_uri; -} - -static void -init (EFolder *folder) -{ - EFolderPrivate *priv; - - priv = g_new (EFolderPrivate, 1); - priv->type = NULL; - priv->name = NULL; - priv->description = NULL; - priv->physical_uri = NULL; - - folder->priv = priv; -} - - -void -e_folder_construct (EFolder *folder, - const char *name, - const char *type, - const char *description) -{ - EFolderPrivate *priv; - - g_return_if_fail (folder != NULL); - g_return_if_fail (E_IS_FOLDER (folder)); - g_return_if_fail (name != NULL); - g_return_if_fail (type != NULL); - g_return_if_fail (description != NULL); - - GTK_OBJECT_UNSET_FLAGS (GTK_OBJECT (folder), GTK_FLOATING); - - priv = folder->priv; - - priv->name = g_strdup (name); - priv->type = g_strdup (type); - priv->description = g_strdup (description); -} - -EFolder * -e_folder_new (const char *name, - const char *type, - const char *description) -{ - EFolder *folder; - - g_return_val_if_fail (name != NULL, NULL); - g_return_val_if_fail (type != NULL, NULL); - g_return_val_if_fail (description != NULL, NULL); - - folder = gtk_type_new (E_TYPE_FOLDER); - - e_folder_construct (folder, name, type, description); - - return folder; -} - - -const char * -e_folder_get_name (EFolder *folder) -{ - g_return_val_if_fail (folder != NULL, NULL); - g_return_val_if_fail (E_IS_FOLDER (folder), NULL); - - return folder->priv->name; -} - -const char * -e_folder_get_type_string (EFolder *folder) -{ - g_return_val_if_fail (folder != NULL, NULL); - g_return_val_if_fail (E_IS_FOLDER (folder), NULL); - - return folder->priv->type; -} - -const char * -e_folder_get_description (EFolder *folder) -{ - g_return_val_if_fail (folder != NULL, NULL); - g_return_val_if_fail (E_IS_FOLDER (folder), NULL); - - return folder->priv->description; -} - - -void -e_folder_set_name (EFolder *folder, - const char *name) -{ - g_return_if_fail (folder != NULL); - g_return_if_fail (E_IS_FOLDER (folder)); - g_return_if_fail (name != NULL); - - g_free (folder->priv->name); - folder->priv->name = g_strdup (name); - - gtk_signal_emit (GTK_OBJECT (folder), signals[CHANGED]); -} - -void -e_folder_set_type_string (EFolder *folder, - const char *type) -{ - g_return_if_fail (folder != NULL); - g_return_if_fail (E_IS_FOLDER (folder)); - g_return_if_fail (type != NULL); - - g_free (folder->priv->type); - folder->priv->type = g_strdup (type); - - gtk_signal_emit (GTK_OBJECT (folder), signals[CHANGED]); -} - -void -e_folder_set_description (EFolder *folder, - const char *description) -{ - g_return_if_fail (folder != NULL); - g_return_if_fail (E_IS_FOLDER (folder)); - g_return_if_fail (description != NULL); - - g_free (folder->priv->description); - folder->priv->description = g_strdup (description); - - gtk_signal_emit (GTK_OBJECT (folder), signals[CHANGED]); -} - -void -e_folder_set_physical_uri (EFolder *folder, - const char *physical_uri) -{ - g_return_if_fail (folder != NULL); - g_return_if_fail (E_IS_FOLDER (folder)); - g_return_if_fail (physical_uri != NULL); - - g_free (folder->priv->physical_uri); - folder->priv->physical_uri = g_strdup (physical_uri); - - gtk_signal_emit (GTK_OBJECT (folder), signals[CHANGED]); -} - - -const char * -e_folder_get_physical_uri (EFolder *folder) -{ - g_return_val_if_fail (folder != NULL, NULL); - g_return_val_if_fail (E_IS_FOLDER (folder), NULL); - - return folder->priv->physical_uri; -} - - -E_MAKE_TYPE (e_folder, "EFolder", EFolder, class_init, init, PARENT_TYPE) diff --git a/shell/e-folder.h b/shell/e-folder.h deleted file mode 100644 index d7bbd6ba9e..0000000000 --- a/shell/e-folder.h +++ /dev/null @@ -1,93 +0,0 @@ - /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-folder.h - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -#ifndef _E_FOLDER_H_ -#define _E_FOLDER_H_ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus */ - -#define E_TYPE_FOLDER (e_folder_get_type ()) -#define E_FOLDER(obj) (GTK_CHECK_CAST ((obj), E_TYPE_FOLDER, EFolder)) -#define E_FOLDER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_FOLDER, EFolderClass)) -#define E_IS_FOLDER(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_FOLDER)) -#define E_IS_FOLDER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_FOLDER)) - - -typedef struct _EFolder EFolder; -typedef struct _EFolderPrivate EFolderPrivate; -typedef struct _EFolderClass EFolderClass; - -struct _EFolder { - GtkObject parent; - - EFolderPrivate *priv; -}; - -struct _EFolderClass { - GtkObjectClass parent_class; - - /* Virtual methods. */ - gboolean (* save_info) (EFolder *folder); - gboolean (* load_info) (EFolder *folder); - gboolean (* remove) (EFolder *folder); - const char * (* get_physical_uri) (EFolder *folder); - - /* Signals. */ - void (* changed) (EFolder *folder); -}; - - -GtkType e_folder_get_type (void); -void e_folder_construct (EFolder *folder, - const char *name, - const char *type, - const char *description); -EFolder *e_folder_new (const char *name, - const char *type, - const char *description); - -const char *e_folder_get_physical_uri (EFolder *folder); - -const char *e_folder_get_name (EFolder *folder); -const char *e_folder_get_type_string (EFolder *folder); -const char *e_folder_get_description (EFolder *folder); - -void e_folder_set_name (EFolder *folder, const char *name); -void e_folder_set_type_string (EFolder *folder, const char *type); -void e_folder_set_description (EFolder *folder, const char *description); -void e_folder_set_physical_uri (EFolder *folder, const char *physical_uri); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* _E_FOLDER_H_ */ diff --git a/shell/e-init.c b/shell/e-init.c deleted file mode 100644 index 34ccdbcfc3..0000000000 --- a/shell/e-init.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * e-init.c: Initializes Evolution for first time users - * - */ -#include -#include -#include "e-init.h" -#include -#include -#include -#include -#include "e-util/e-gui-utils.h" - -char *evolution_base_dir; - -static void -e_init_local (void) -{ - evolution_base_dir = g_concat_dir_and_file (g_get_home_dir (), "Evolution"); - - if (g_file_exists (evolution_base_dir)) - return; - - if (-1 == mkdir (evolution_base_dir, 0755)){ - e_notice (NULL, GNOME_MESSAGE_BOX_ERROR, _("Evolution can not create its local folders")); - exit (0); - } -} - -void -e_init (void) -{ - e_init_local (); -} diff --git a/shell/e-init.h b/shell/e-init.h deleted file mode 100644 index 5684f87b44..0000000000 --- a/shell/e-init.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef E_INIT_H -#define E_INIT_H - -extern char *evolution_base_dir; - -void e_init (void); - -#endif /* E_INIT_H */ diff --git a/shell/e-local-folder.c b/shell/e-local-folder.c deleted file mode 100644 index 23cd106390..0000000000 --- a/shell/e-local-folder.c +++ /dev/null @@ -1,219 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-local-folder.c - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -/* The metafile goes like this: - - - - mail - This is the folder where I store mail from my gf - http://www.somewhere.net - - - FIXME: Do we want to use a namespace for this? - FIXME: Do we want to have an internationalized description? - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include - -#include "e-util/e-util.h" -#include "e-util/e-xml-utils.h" - -#include "e-local-folder.h" - - -#define PARENT_TYPE E_TYPE_FOLDER -static EFolderClass *parent_class = NULL; - -#define URI_PREFIX "file://" -#define URI_PREFIX_LEN 7 - -#define METADATA_FILE_NAME "folder-metadata.xml" -#define METADATA_FILE_NAME_LEN 19 - -struct _ELocalFolderPrivate { - int dummy; -}; - - -static char * -get_string_value (xmlNode *node, - const char *name) -{ - xmlNode *p; - xmlChar *xml_string; - char *retval; - - p = e_xml_get_child_by_name (node, (xmlChar *) name); - if (p == NULL) - return NULL; - - p = e_xml_get_child_by_name (p, (xmlChar *) "text"); - if (p == NULL) - return NULL; - - xml_string = xmlNodeListGetString (node->doc, p, 1); - retval = g_strdup ((char *) xml_string); - xmlFree (xml_string); - - return retval; -} - -static gboolean -construct_loading_metadata (ELocalFolder *local_folder, - const char *path) -{ - EFolder *folder; - xmlDoc *doc; - xmlNode *root; - char *type; - char *description; - char *metadata_path; - char *physical_uri; - - folder = E_FOLDER (local_folder); - - metadata_path = g_concat_dir_and_file (path, METADATA_FILE_NAME); - - doc = xmlParseFile (metadata_path); - if (doc == NULL) { - g_free (metadata_path); - return FALSE; - } - - root = xmlDocGetRootElement (doc); - if (root == NULL || strcmp (root->name, "efolder") != 0) { - g_free (metadata_path); - xmlFreeDoc (doc); - return FALSE; - } - - type = get_string_value (root, "type"); - description = get_string_value (root, "description"); - - e_folder_construct (folder, g_basename (path), type, description); - - g_free (type); - g_free (description); - - xmlFreeDoc (doc); - - physical_uri = g_strconcat (URI_PREFIX, path, NULL); - e_folder_set_physical_uri (folder, physical_uri); - g_free (physical_uri); - - g_free (metadata_path); - - return TRUE; -} - -static gboolean -save_metadata (ELocalFolder *local_folder) -{ - EFolder *folder; - xmlDoc *doc; - xmlNode *root; - const char *physical_path; - - folder = E_FOLDER (local_folder); - - doc = xmlNewDoc ((xmlChar *) "1.0"); - root = xmlNewDocNode (doc, NULL, (xmlChar *) "efolder", NULL); - xmlDocSetRootElement (doc, root); - - xmlNewChild (root, NULL, (xmlChar *) "type", (xmlChar *) e_folder_get_type_string (folder)); - xmlNewChild (root, NULL, (xmlChar *) "description", (xmlChar *) e_folder_get_description (folder)); - - physical_path = e_folder_get_physical_uri (folder) + URI_PREFIX_LEN - 1; - - if (xmlSaveFile (physical_path, doc) < 0) { - xmlFreeDoc (doc); - return FALSE; - } - - xmlFreeDoc (doc); - return TRUE; -} - - -/* GtkObject methods. */ - -static void -destroy (GtkObject *object) -{ - /* No ELocalFolder-specific data to free. */ - - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); -} - - -static void -class_init (ELocalFolderClass *klass) -{ - GtkObjectClass *object_class; - - parent_class = gtk_type_class (e_folder_get_type ()); - - object_class = GTK_OBJECT_CLASS (klass); - object_class->destroy = destroy; -} - -static void -init (ELocalFolder *local_folder) -{ -} - - -EFolder * -e_local_folder_new_from_path (const char *path) -{ - EFolder *folder; - - g_return_val_if_fail (g_path_is_absolute (path), NULL); - - folder = gtk_type_new (e_local_folder_get_type ()); - - if (! construct_loading_metadata (E_LOCAL_FOLDER (folder), path)) { - gtk_object_unref (GTK_OBJECT (folder)); - return NULL; - } - - return folder; -} - -gboolean -e_local_folder_save (ELocalFolder *local_folder) -{ - g_return_val_if_fail (local_folder != NULL, FALSE); - g_return_val_if_fail (E_IS_LOCAL_FOLDER (local_folder), FALSE); - - return save_metadata (local_folder); -} - - -E_MAKE_TYPE (e_local_folder, "ELocalFolder", ELocalFolder, class_init, init, PARENT_TYPE) diff --git a/shell/e-local-folder.h b/shell/e-local-folder.h deleted file mode 100644 index b30a9f2a5c..0000000000 --- a/shell/e-local-folder.h +++ /dev/null @@ -1,66 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-local-folder.h - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -#ifndef _E_LOCAL_FOLDER_H_ -#define _E_LOCAL_FOLDER_H_ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include - -#include "e-folder.h" - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus */ - -#define E_TYPE_LOCAL_FOLDER (e_local_folder_get_type ()) -#define E_LOCAL_FOLDER(obj) (GTK_CHECK_CAST ((obj), E_TYPE_LOCAL_FOLDER, ELocalFolder)) -#define E_LOCAL_FOLDER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_LOCAL_FOLDER, ELocalFolderClass)) -#define E_IS_LOCAL_FOLDER(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_LOCAL_FOLDER)) -#define E_IS_LOCAL_FOLDER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_LOCAL_FOLDER)) - -typedef struct _ELocalFolder ELocalFolder; -typedef struct _ELocalFolderClass ELocalFolderClass; - -struct _ELocalFolder { - EFolder parent; -}; - -struct _ELocalFolderClass { - EFolderClass parent_class; -}; - - -GtkType e_local_folder_get_type (void); -EFolder *e_local_folder_new_from_path (const char *physical_path); -gboolean e_local_folder_save (ELocalFolder *local_folder); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* __E_LOCAL_FOLDER_H__ */ diff --git a/shell/e-local-storage.c b/shell/e-local-storage.c deleted file mode 100644 index f559d30f34..0000000000 --- a/shell/e-local-storage.c +++ /dev/null @@ -1,337 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-local-storage.c - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -/* FIXMEs: - * - * - If we have `.' or `..' as path elements, we lose. - * - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#define _POSIX_SOURCE /* Yuck. */ -#include - -#include -#include -#include -#include - -#include - -#include "e-util/e-util.h" -#include "e-local-folder.h" - -#include "e-local-storage.h" - - -#define PARENT_TYPE E_TYPE_STORAGE -static EStorageClass *parent_class = NULL; - -#define SUBFOLDER_DIR_NAME "subfolders" -#define SUBFOLDER_DIR_NAME_LEN 10 - -struct _ELocalStoragePrivate { - char *base_path; -}; - - -/* Utility functions. */ - -#if 0 -/* Translate a storage path into a real path on the file system. */ -static char * -get_real_path (ELocalStorage *local_storage, - const char *path) -{ - EStorage *storage; - ELocalStoragePrivate *priv; - const char *p, *newp; - char *dp; - char *real_path; - int real_path_len; - int base_path_len; - - storage = E_STORAGE (local_storage); - priv = local_storage->priv; - - /* @path is always absolute, so it starts with a slash. The base class should - make sure this is the case; if not, it's broken. */ - g_assert (*path != G_DIR_SEPARATOR); - path++; - - /* Calculate the length of the real path. */ - - real_path_len = strlen (path); - real_path_len++; /* For the ending zero. */ - - base_path_len = strlen (priv->base_path); - real_path_len += base_path_len; - real_path_len++; /* For the separating slash. */ - - /* Take account for the fact that we need to translate every separator into - `children/'. */ - p = path; - while (1) { - newp = strchr (p, G_DIR_SEPARATOR); - if (newp == NULL) - break; - - real_path_len += SUBFOLDER_DIR_NAME_LEN; - real_path_len++; /* For the separating slash. */ - - /* Skip consecutive slashes. */ - while (*newp == G_DIR_SEPARATOR) - newp++; - - p = newp; - }; - - real_path = g_malloc (real_path_len); - dp = real_path; - - memcpy (dp, priv->base_path, base_path_len); - dp += base_path_len; - *(dp++) = G_DIR_SEPARATOR; - - /* Copy the mangled path. */ - p = path; - while (1) { - newp = strchr (p, G_DIR_SEPARATOR); - if (newp == NULL) - break; - - memcpy (dp, p, newp - p + 1); /* `+ 1' to copy the slash too. */ - dp += newp - p + 1; - - memcpy (dp, SUBFOLDER_DIR_NAME, SUBFOLDER_DIR_NAME_LEN); - dp += SUBFOLDER_DIR_NAME_LEN; - - *(dp++) = G_DIR_SEPARATOR; - - /* Skip consecutive slashes. */ - while (*newp == G_DIR_SEPARATOR) - newp++; - - p = newp; - } - - return real_path; -} -#endif - -static gboolean -load_folders (ELocalStorage *local_storage, - const char *parent_path, - const char *path, - const char *physical_path) -{ - DIR *dir; - char *subfolder_directory_path; - - if (parent_path == NULL) { - /* On the top level, we don't have any folders and, consequently, no - subfolder directory. */ - - subfolder_directory_path = g_strdup (physical_path); - } else { - EFolder *folder; - - /* Otherwise, we have to load the corresponding folder. */ - - folder = e_local_folder_new_from_path (physical_path); - if (folder == NULL) - return FALSE; - - e_storage_new_folder (E_STORAGE (local_storage), parent_path, folder); - - subfolder_directory_path = g_concat_dir_and_file (physical_path, SUBFOLDER_DIR_NAME); - } - - /* Now scan the subfolders and load them. The subfolders are represented by - directories under the "SUBFOLDER_DIR_NAME" directory. */ - - dir = opendir (subfolder_directory_path); - - if (dir == NULL) { - g_free (subfolder_directory_path); - return FALSE; - } - - while (1) { - struct stat file_stat; - struct dirent *dirent; - char *file_path; - char *new_path; - - dirent = readdir (dir); - if (dirent == NULL) - break; - - if (strcmp (dirent->d_name, ".") == 0 || strcmp (dirent->d_name, "..") == 0) - continue; - - file_path = g_concat_dir_and_file (subfolder_directory_path, - dirent->d_name); - - if (stat (file_path, &file_stat) < 0) { - g_free (file_path); - continue; - } - if (! S_ISDIR (file_stat.st_mode)) { - g_free (file_path); - continue; - } - - new_path = g_concat_dir_and_file (path, dirent->d_name); - - load_folders (local_storage, path, new_path, file_path); - - g_free (file_path); - g_free (new_path); - } - - closedir (dir); - g_free (subfolder_directory_path); - - return TRUE; -} - -static gboolean -load_all_folders (ELocalStorage *local_storage) -{ - const char *base_path; - - base_path = e_local_storage_get_base_path (local_storage); - - return load_folders (local_storage, NULL, G_DIR_SEPARATOR_S, base_path); -} - - -/* GtkObject methods. */ - -static void -destroy (GtkObject *object) -{ - ELocalStorage *local_storage; - ELocalStoragePrivate *priv; - - local_storage = E_LOCAL_STORAGE (object); - priv = local_storage->priv; - - g_free (priv->base_path); - g_free (priv); - - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); -} - - -/* EStorage methods. */ - -static const char * -get_name (EStorage *storage) -{ - /* FIXME this sucks. */ - return "local"; -} - - -/* Initialization. */ - -static void -class_init (ELocalStorageClass *class) -{ - EStorageClass *storage_class; - GtkObjectClass *object_class; - - parent_class = gtk_type_class (e_storage_get_type ()); - - object_class = GTK_OBJECT_CLASS (class); - object_class->destroy = destroy; - - storage_class = E_STORAGE_CLASS (class); - storage_class->get_name = get_name; -} - -static void -init (ELocalStorage *local_storage) -{ - ELocalStoragePrivate *priv; - - priv = g_new (ELocalStoragePrivate, 1); - - priv->base_path = NULL; - - local_storage->priv = priv; -} - - -static gboolean -construct (ELocalStorage *local_storage, - const char *base_path) -{ - int base_path_len; - - e_storage_construct (E_STORAGE (local_storage)); - - base_path_len = strlen (base_path); - while (base_path_len > 0 && base_path[base_path_len - 1] == G_DIR_SEPARATOR) - base_path_len--; - - g_return_val_if_fail (base_path_len != 0, FALSE); - - local_storage->priv->base_path = g_strndup (base_path, base_path_len); - - return load_all_folders (local_storage); -} - -EStorage * -e_local_storage_open (const char *base_path) -{ - EStorage *new; - - g_return_val_if_fail (base_path != NULL, NULL); - - new = gtk_type_new (e_local_storage_get_type ()); - - if (! construct (E_LOCAL_STORAGE (new), base_path)) { - gtk_object_unref (GTK_OBJECT (new)); - return NULL; - } - - return new; -} - -const char * -e_local_storage_get_base_path (ELocalStorage *local_storage) -{ - g_return_val_if_fail (local_storage != NULL, NULL); - g_return_val_if_fail (E_IS_LOCAL_STORAGE (local_storage), NULL); - - return local_storage->priv->base_path; -} - - -E_MAKE_TYPE (e_local_storage, "ELocalStorage", ELocalStorage, class_init, init, PARENT_TYPE) diff --git a/shell/e-local-storage.h b/shell/e-local-storage.h deleted file mode 100644 index 569216941e..0000000000 --- a/shell/e-local-storage.h +++ /dev/null @@ -1,67 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-local-storage.h - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -#ifndef _E_LOCAL_STORAGE_H_ -#define _E_LOCAL_STORAGE_H_ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include "e-storage.h" - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus */ - -#define E_TYPE_LOCAL_STORAGE (e_local_storage_get_type ()) -#define E_LOCAL_STORAGE(obj) (GTK_CHECK_CAST ((obj), E_TYPE_LOCAL_STORAGE, ELocalStorage)) -#define E_LOCAL_STORAGE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_LOCAL_STORAGE, ELocalStorageClass)) -#define E_IS_LOCAL_STORAGE(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_LOCAL_STORAGE)) -#define E_IS_LOCAL_STORAGE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_LOCAL_STORAGE)) - -typedef struct _ELocalStorage ELocalStorage; -typedef struct _ELocalStoragePrivate ELocalStoragePrivate; -typedef struct _ELocalStorageClass ELocalStorageClass; - -struct _ELocalStorage { - EStorage parent; - - ELocalStoragePrivate *priv; -}; - -struct _ELocalStorageClass { - EStorageClass parent_class; -}; - - -GtkType e_local_storage_get_type (void); -EStorage *e_local_storage_open (const char *base_path); -const char *e_local_storage_get_base_path (ELocalStorage *storage); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* __E_LOCAL_STORAGE_H__ */ diff --git a/shell/e-setup.c b/shell/e-setup.c deleted file mode 100644 index 366022493e..0000000000 --- a/shell/e-setup.c +++ /dev/null @@ -1,115 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-setup.c - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - */ - -/* This needs to be a lot better. */ - -#include -#include - -#include -#include - -#include "e-util/e-gui-utils.h" - -#include "e-setup.h" - - -static gboolean -copy_default_stuff (const char *evolution_directory) -{ - GtkWidget *dialog; - GtkWidget *label1; - GtkWidget *label2; - GtkWidget *label3; - gboolean retval; - char *command; - int result; - - dialog = gnome_dialog_new (_("Evolution installation"), - GNOME_STOCK_BUTTON_OK, GNOME_STOCK_BUTTON_CANCEL, - NULL); - - label1 = gtk_label_new (_("This seems to be the first time you run Evolution.")); - label2 = gtk_label_new (_("Please click \"OK\" to install the Evolution user files under")); - label3 = gtk_label_new (evolution_directory); - - gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), label1, TRUE, TRUE, 0); - gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), label2, TRUE, TRUE, 0); - gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), label3, TRUE, TRUE, 0); - - gtk_widget_show (label1); - gtk_widget_show (label2); - gtk_widget_show (label3); - - result = gnome_dialog_run_and_close (GNOME_DIALOG (dialog)); - if (result != 0) - return FALSE; - - if (mkdir (evolution_directory, 0700)) { - e_notice (NULL, GNOME_MESSAGE_BOX_ERROR, - _("Cannot create the directory\n%s\nError: %s"), - evolution_directory, - g_strerror (errno)); - return FALSE; - } - - command = g_strconcat ("cp -r ", - EVOLUTION_DATADIR, - "/evolution/default_user/* ", - evolution_directory, - NULL); - - if (system (command) != 0) { - /* FIXME: Give more help. */ - e_notice (NULL, GNOME_MESSAGE_BOX_ERROR, - _("Cannot copy files into\n`%s'."), evolution_directory); - retval = FALSE; - } else { - e_notice (NULL, GNOME_MESSAGE_BOX_INFO, - _("Evolution files successfully installed.")); - retval = TRUE; - } - - g_free (command); - - return retval; -} - - -gboolean -e_setup (const char *evolution_directory) -{ - struct stat statinfo; - - if (stat (evolution_directory, &statinfo) != 0) - return copy_default_stuff (evolution_directory); - - if (! S_ISDIR (statinfo.st_mode)) { - e_notice (NULL, GNOME_MESSAGE_BOX_ERROR, - _("The file `%s' is not a directory.\n" - "Please remove it in order to allow installation\n" - "of the Evolution user files.")); - return FALSE; - } - - return TRUE; -} diff --git a/shell/e-setup.h b/shell/e-setup.h deleted file mode 100644 index a69d216b94..0000000000 --- a/shell/e-setup.h +++ /dev/null @@ -1,31 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-setup.h - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -#ifndef _E_SETUP_H -#define _E_SETUP_H - -#include - -gboolean e_setup (const char *evolution_directory); - -#endif /* _E_SETUP_H */ diff --git a/shell/e-shell-constants.h b/shell/e-shell-constants.h deleted file mode 100644 index 70986144d0..0000000000 --- a/shell/e-shell-constants.h +++ /dev/null @@ -1,36 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-shell-utils.h - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -#ifndef E_SHELL_CONSTANTS_H -#define E_SHELL_CONSTANTS_H - -#define E_SHELL_URI_PREFIX "evolution:" -#define E_SHELL_URI_PREFIX_LEN 10 - -#define E_SHELL_MINI_ICON_SUFFIX "-mini" -#define E_SHELL_MINI_ICON_SUFFIX_LEN 5 - -#define E_SHELL_ICON_SIZE 48 -#define E_SHELL_MINI_ICON_SIZE 16 - -#endif diff --git a/shell/e-shell-utils.c b/shell/e-shell-utils.c deleted file mode 100644 index 9065fc224c..0000000000 --- a/shell/e-shell-utils.c +++ /dev/null @@ -1,107 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-shell-utils.c - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include - -#include "e-shell-constants.h" - -#include "e-shell-utils.h" - - -static char * -get_icon_path (const char *icon_name) -{ - char *icon_path; - - if (g_path_is_absolute (icon_name)) { - icon_path = g_strdup (icon_name); - } else { - icon_path = gnome_pixmap_file (icon_name); - - if (icon_path == NULL) - icon_path = g_concat_dir_and_file (EVOLUTION_IMAGES, - icon_name); - } - - if (g_file_exists (icon_path)) { - return icon_path; - } else { - g_free (icon_path); - return NULL; - } -} - -static char * -get_mini_name (const char *icon_name) -{ - const char *dot_ptr; - const char *basename; - char *name_without_extension; - char *mini_name; - - basename = g_basename (icon_name); - if (basename == NULL) - return NULL; - - dot_ptr = strrchr (basename, '.'); - - if (dot_ptr == NULL) { - /* No extension. */ - return g_strconcat (icon_name, E_SHELL_MINI_ICON_SUFFIX, NULL); - } - - name_without_extension = g_strndup (icon_name, dot_ptr - icon_name); - mini_name = g_strconcat (name_without_extension, E_SHELL_MINI_ICON_SUFFIX, - dot_ptr, NULL); - g_free (name_without_extension); - - return mini_name; -} - - -char * -e_shell_get_icon_path (const char *icon_name, - gboolean try_mini) -{ - if (try_mini) { - char *path; - char *mini_name; - - mini_name = get_mini_name (icon_name); - if (mini_name == NULL) { - path = NULL; - } else { - path = get_icon_path (mini_name); - g_free (mini_name); - } - - if (path != NULL) - return path; - } - - return get_icon_path (icon_name); -} diff --git a/shell/e-shell-utils.h b/shell/e-shell-utils.h deleted file mode 100644 index a701dd38eb..0000000000 --- a/shell/e-shell-utils.h +++ /dev/null @@ -1,30 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-shell-utils.h - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -#ifndef E_SHELL_UTILS_H -#define E_SHELL_UTILS_H - -char *e_shell_get_icon_path (const char *icon_name, - gboolean try_mini); - -#endif diff --git a/shell/e-shell-view-menu.c b/shell/e-shell-view-menu.c deleted file mode 100644 index b8836dad97..0000000000 --- a/shell/e-shell-view-menu.c +++ /dev/null @@ -1,307 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-shell-view.c - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Authors: - * Miguel de Icaza - * Ettore Perazzoli - */ - -#include -#include - -#include "e-shell-view.h" -#include "e-shell-view-menu.h" - - -static void -command_quit (GtkWidget *widget, - gpointer data) -{ - EShellView *shell_view; - EShell *shell; - - shell_view = E_SHELL_VIEW (data); - - shell = e_shell_view_get_shell (shell_view); - e_shell_quit (shell); -} - -static void -command_run_bugbuddy (GtkWidget *menuitem, gpointer data) -{ - int pid; - char *args[] = { - "bug-buddy", - "--sm-disable", - "--package=evolution", - "--package-ver="VERSION, - NULL - }; - args[0] = gnome_is_program_in_path ("bug-buddy"); - if (!args[0]) { - /* you might have to call gnome_dialog_run() on the - * dialog returned here, I don't remember... - */ - gnome_error_dialog (_("Bug buddy was not found in your $PATH.")); - } - pid = gnome_execute_async (NULL, 4, args); - g_free (args[0]); - if (pid == -1) { - /* same as above */ - gnome_error_dialog (_("Bug buddy could not be run.")); - } -} - -static void -zero_pointer(GtkObject *object, void **pointer) -{ - *pointer = NULL; -} - -static void -command_about_box (GtkWidget *menuitem, gpointer data) -{ - static GtkWidget *about_box = NULL; - - if (about_box) - gdk_window_raise(GTK_WIDGET(about_box)->window); - else { - const gchar *authors[] = { - "Seth Alves", - "Anders Carlsson", - "Damon Chaplin", - "Clifford R. Conover", - "Miguel de Icaza", - "Radek Doulik", - "Arturo Espinoza", - "Larry Ewing", - "Nat Friedman", - "Bertrand Guiheneuf", - "Tuomas Kuosmanen", - "Christopher J. Lahey", - "Matthew Loper", - "Federico Mena", - "Eskil Heyn Olsen", - "Ettore Perazzoli", - "Russell Steinthal", - "Peter Teichman", - "Chris Toshok", - "Dan Winship", - "Michael Zucchi", - "Jeffrey Stedfast", - NULL}; - - about_box = gnome_about_new(_("Evolution"), - VERSION, - _("Copyright 1999, 2000 Helix Code, Inc."), - authors, - _("Evolution is a suite of groupware applications\n" - "for mail, calendaring, and contact management\n" - "within the GNOME desktop environment."), - NULL); - gtk_signal_connect(GTK_OBJECT(about_box), "destroy", - GTK_SIGNAL_FUNC(zero_pointer), &about_box); - gtk_widget_show(about_box); - } -} - -static void -command_show_treeview (GtkWidget* widget, gpointer data) -{ - EShellView* shell_view; - - g_assert (E_IS_SHELL_VIEW (data)); - - shell_view = E_SHELL_VIEW (data); - e_shell_view_show_folders (shell_view, TRUE); -} - -static void -command_show_shortcut_bar (GtkWidget* widget, gpointer data) -{ - EShellView* shell_view; - - g_assert (E_IS_SHELL_VIEW (data)); - - shell_view = E_SHELL_VIEW (data); - e_shell_view_show_shortcuts (shell_view, TRUE); -} - - - - -/* Unimplemented commands. */ - - - -#define DEFINE_UNIMPLEMENTED(func) \ -static void \ -func (GtkWidget *widget, gpointer data) \ -{ \ - g_warning ("EShellView: %s: not implemented.", __FUNCTION__); \ -} \ - -DEFINE_UNIMPLEMENTED (command_new_folder) -DEFINE_UNIMPLEMENTED (command_new_shortcut) -DEFINE_UNIMPLEMENTED (command_new_mail_message) -DEFINE_UNIMPLEMENTED (command_new_meeting_request) -DEFINE_UNIMPLEMENTED (command_new_contact) -DEFINE_UNIMPLEMENTED (command_new_task) -DEFINE_UNIMPLEMENTED (command_new_task_request) -DEFINE_UNIMPLEMENTED (command_new_journal_entry) -DEFINE_UNIMPLEMENTED (command_new_note) -DEFINE_UNIMPLEMENTED (command_open_selected_items) -DEFINE_UNIMPLEMENTED (command_save_as) -DEFINE_UNIMPLEMENTED (command_close_open_items) - - -/* - * FIXME - * - * This menu is actually pretty dynamic, it changes de values of various entries - * depending on the current data being displayed - * - * This is currently only a placeholder. We need to figure what to do about this. - */ -static GnomeUIInfo menu_file_new [] = { - - { GNOME_APP_UI_ITEM, N_("_Folder"), - NULL, command_new_folder, NULL, - NULL, 0, 0, 'e', GDK_CONTROL_MASK | GDK_SHIFT_MASK }, - - { GNOME_APP_UI_ITEM, N_("Evolution _Bar Shortcut"), - NULL, command_new_shortcut, NULL, - NULL, 0, 0, 'e', GDK_CONTROL_MASK | GDK_SHIFT_MASK }, - - GNOMEUIINFO_SEPARATOR, - - { GNOME_APP_UI_ITEM, N_("_Mail message"), - N_("Composes a new mail message"), command_new_mail_message, NULL, - NULL, 0, 0, 'n', GDK_CONTROL_MASK | GDK_SHIFT_MASK }, - { GNOME_APP_UI_ITEM, N_("_Appointment"), - N_("Composes a new mail message"), command_new_mail_message, NULL, - NULL, 0, 0, 'a', GDK_CONTROL_MASK | GDK_SHIFT_MASK }, - { GNOME_APP_UI_ITEM, N_("Meeting Re_quest"), NULL, - command_new_meeting_request, NULL, - NULL, 0, 0, 'q', GDK_CONTROL_MASK | GDK_SHIFT_MASK }, - { GNOME_APP_UI_ITEM, N_("_Contact"), NULL, - command_new_contact, NULL, - NULL, 0, 0, 'c', GDK_CONTROL_MASK | GDK_SHIFT_MASK }, - { GNOME_APP_UI_ITEM, N_("_Task"), NULL, - command_new_task, NULL, - NULL, 0, 0, 'k', GDK_CONTROL_MASK | GDK_SHIFT_MASK }, - { GNOME_APP_UI_ITEM, N_("Task _Request"), NULL, - command_new_task_request, NULL, - NULL, 0, 0, 'u', GDK_CONTROL_MASK | GDK_SHIFT_MASK }, - { GNOME_APP_UI_ITEM, N_("_Journal Entry"), NULL, - command_new_journal_entry, NULL, - NULL, 0, 0, 'j', GDK_CONTROL_MASK | GDK_SHIFT_MASK }, - { GNOME_APP_UI_ITEM, N_("_Note"), NULL, - command_new_note, NULL, - NULL, 0, 0, 'o', GDK_CONTROL_MASK | GDK_SHIFT_MASK }, - - GNOMEUIINFO_SEPARATOR, - - GNOMEUIINFO_END -}; - -static GnomeUIInfo menu_file_open [] = { - { GNOME_APP_UI_ITEM, N_("_Selected Items"), NULL, - command_open_selected_items, NULL, - NULL, 0, 0, 'o', GDK_CONTROL_MASK }, - - GNOMEUIINFO_END -}; - -static GnomeUIInfo menu_folder [] = { - { GNOME_APP_UI_ITEM, N_("_New Folder"), NULL, - command_new_folder, NULL, - NULL, 0, 0, 'e', GDK_CONTROL_MASK | GDK_SHIFT_MASK }, - - GNOMEUIINFO_END -}; - -static GnomeUIInfo menu_file [] = { - GNOMEUIINFO_SUBTREE_STOCK (N_("_New"), menu_file_new, GNOME_STOCK_MENU_NEW), - GNOMEUIINFO_SUBTREE_STOCK (N_("_Open"), menu_file_open, GNOME_STOCK_MENU_NEW), - GNOMEUIINFO_ITEM_NONE (N_("Clos_e All Items"), N_("Closes all the open items"), command_close_open_items), - GNOMEUIINFO_SEPARATOR, - - GNOMEUIINFO_MENU_SAVE_AS_ITEM (command_save_as, NULL), - - GNOMEUIINFO_SEPARATOR, - - GNOMEUIINFO_SUBTREE (N_("_Folder"), menu_folder), - - GNOMEUIINFO_SEPARATOR, - - GNOMEUIINFO_MENU_EXIT_ITEM(command_quit, NULL), - - GNOMEUIINFO_END -}; - -static GnomeUIInfo menu_edit [] = { - GNOMEUIINFO_END -}; - -static GnomeUIInfo menu_view [] = { - { GNOME_APP_UI_ITEM, N_("Show _Shortcut Bar"), - N_("Shows the shortcut bar"), command_show_shortcut_bar, NULL, - NULL, 0, 0, 'n', GDK_CONTROL_MASK | GDK_SHIFT_MASK }, - { GNOME_APP_UI_ITEM, N_("Show _Treeview"), - N_("Shows the tree view"), command_show_treeview, NULL, - NULL, 0, 0, 'n', GDK_CONTROL_MASK | GDK_SHIFT_MASK }, - GNOMEUIINFO_END -}; - -static GnomeUIInfo menu_tools [] = { - GNOMEUIINFO_END -}; - -static GnomeUIInfo menu_actions [] = { - GNOMEUIINFO_END -}; - -static GnomeUIInfo menu_help [] = { - GNOMEUIINFO_MENU_ABOUT_ITEM(command_about_box, NULL), - { GNOME_APP_UI_ITEM, N_("_Submit bug"), - N_("Submit bug-report via bug-buddy"), command_run_bugbuddy, NULL, - NULL, 0, 0, 'n', GDK_CONTROL_MASK | GDK_SHIFT_MASK }, - GNOMEUIINFO_END -}; - - -/* Menu bar. */ - -GnomeUIInfo e_shell_view_menu [] = { - GNOMEUIINFO_MENU_FILE_TREE (menu_file), - GNOMEUIINFO_MENU_EDIT_TREE (menu_edit), - GNOMEUIINFO_MENU_VIEW_TREE (menu_view), - - /* FIXME: add Favorites here */ - - { GNOME_APP_UI_SUBTREE, N_("_Tools"), NULL, menu_tools }, - { GNOME_APP_UI_SUBTREE, N_("_Actions"), NULL, menu_actions }, - GNOMEUIINFO_MENU_HELP_TREE (menu_help), - - /* FIXME: Should provide a help menu here; Bonobo needs it. */ - - GNOMEUIINFO_END -}; diff --git a/shell/e-shell-view-menu.h b/shell/e-shell-view-menu.h deleted file mode 100644 index 52526c4187..0000000000 --- a/shell/e-shell-view-menu.h +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-shell-view.c - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Authors: - * Miguel de Icaza - * Ettore Perazzoli - */ - -#ifndef E_SHELL_VIEW_MENU_H -#define E_SHELL_VIEW_MENU_H - -#include - -extern GnomeUIInfo e_shell_view_menu[]; - -#endif diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c deleted file mode 100644 index c2b6816a25..0000000000 --- a/shell/e-shell-view.c +++ /dev/null @@ -1,829 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-shell-view.c - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Authors: - * Ettore Perazzoli - * Miguel de Icaza - * Matt Loper - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include -#include - -#include "e-shell-utils.h" -#include "e-shell.h" -#include "e-shortcuts-view.h" -#include "e-storage-set-view.h" -#include "e-title-bar.h" -#include "e-util/e-util.h" - -#include "e-shell-view.h" -#include "e-shell-view-menu.h" - -#include - - -#define PARENT_TYPE gnome_app_get_type () /* Losing GnomeApp does not define GNOME_TYPE_APP. */ -static GnomeAppClass *parent_class = NULL; - -struct _EShellViewPrivate { - /* The shell. */ - EShell *shell; - - /* The UI handler. */ - BonoboUIHandler *uih; - - /* Currently displayed URI. */ - char *uri; - - /* The widgetry. */ - GtkWidget *hpaned1; - GtkWidget *hpaned2; - GtkWidget *contents; - GtkWidget *notebook; - GtkWidget *shortcut_bar; - GtkWidget *shortcut_bar_box; - GtkWidget *storage_set_view; - GtkWidget *storage_set_view_box; - - /* The view we have already open. */ - GHashTable *uri_to_control; - - /* Position of the handles in the paneds, to be restored when we show elements - after hiding them. */ - unsigned int hpaned1_position; - unsigned int hpaned2_position; -}; - -/* FIXME this should probably go somewhere else. */ -#define EVOLUTION_URI_PREFIX "evolution:" -#define EVOLUTION_URI_PREFIX_LEN 10 - -#define DEFAULT_SHORTCUT_BAR_WIDTH 100 -#define DEFAULT_TREE_WIDTH 100 - -#define DEFAULT_WIDTH 600 -#define DEFAULT_HEIGHT 600 - - -static GtkWidget * -create_label_for_empty_page (void) -{ - GtkWidget *label; - - label = gtk_label_new (_("(No folder displayed)")); - gtk_widget_show (label); - - return label; -} - -static void -setup_menus (EShellView *shell_view) -{ - BonoboUIHandlerMenuItem *list; - EShellViewPrivate *priv; - - priv = shell_view->priv; - - priv->uih = bonobo_ui_handler_new (); - bonobo_ui_handler_set_app (priv->uih, GNOME_APP (shell_view)); - bonobo_ui_handler_create_menubar (priv->uih); - - list = bonobo_ui_handler_menu_parse_uiinfo_list_with_data (e_shell_view_menu, shell_view); - bonobo_ui_handler_menu_add_list (priv->uih, "/", list); - bonobo_ui_handler_menu_free_list (list); -} - -static gboolean -bonobo_widget_is_dead (BonoboWidget *bonobo_widget) -{ - BonoboControlFrame *control_frame; - CORBA_Object corba_object; - CORBA_Environment ev; - gboolean is_dead; - - control_frame = bonobo_widget_get_control_frame (bonobo_widget); - corba_object = bonobo_control_frame_get_control (control_frame); - - CORBA_exception_init (&ev); - is_dead = CORBA_Object_non_existent (corba_object, &ev); - CORBA_exception_free (&ev); - - return is_dead; -} - - -/* Callbacks. */ - -/* Callback called when an icon on the shortcut bar gets clicked. */ -static void -activate_shortcut_cb (EShortcutsView *shortcut_view, - EShortcuts *shortcuts, - const char *uri, - gpointer data) -{ - EShellView *shell_view; - - shell_view = E_SHELL_VIEW (data); - - e_shell_view_display_uri (shell_view, uri); -} - -/* Callback called when a folder on the tree view gets clicked. */ -static void -folder_selected_cb (EStorageSetView *storage_set_view, - const char *path, - gpointer data) -{ - EShellView *shell_view; - char *uri; - - shell_view = E_SHELL_VIEW (data); - - uri = g_strconcat (EVOLUTION_URI_PREFIX, path, NULL); - e_shell_view_display_uri (shell_view, uri); - g_free (uri); -} - -/* Callback called when the close button on the tree's title bar is clicked. */ -static void -storage_set_view_close_button_clicked_cb (ETitleBar *title_bar, - gpointer data) -{ - EShellView *shell_view; - - shell_view = E_SHELL_VIEW (data); - - e_shell_view_show_folders (shell_view, FALSE); -} - -/* Callback called when the close button on the shorcut bar's title bar is clicked. */ -static void -shortcut_bar_close_button_clicked_cb (ETitleBar *title_bar, - gpointer data) -{ - EShellView *shell_view; - - shell_view = E_SHELL_VIEW (data); - - e_shell_view_show_shortcuts (shell_view, FALSE); -} - - -static void -setup_widgets (EShellView *shell_view) -{ - EShellViewPrivate *priv; - GtkWidget *shortcut_bar_title_bar; - GtkWidget *storage_set_view_title_bar; - GtkWidget *storage_set_view_scrolled_window; - - priv = shell_view->priv; - - /* The shortcut bar. */ - - priv->shortcut_bar = e_shortcuts_new_view (e_shell_get_shortcuts (priv->shell)); - gtk_signal_connect (GTK_OBJECT (priv->shortcut_bar), "activate_shortcut", - GTK_SIGNAL_FUNC (activate_shortcut_cb), shell_view); - - priv->shortcut_bar_box = gtk_vbox_new (FALSE, 0); - - shortcut_bar_title_bar = e_title_bar_new (_("Shortcuts")); - gtk_widget_show (shortcut_bar_title_bar); - - gtk_box_pack_start (GTK_BOX (priv->shortcut_bar_box), shortcut_bar_title_bar, - FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (priv->shortcut_bar_box), priv->shortcut_bar, - TRUE, TRUE, 0); - - gtk_signal_connect (GTK_OBJECT (shortcut_bar_title_bar), "close_button_clicked", - GTK_SIGNAL_FUNC (shortcut_bar_close_button_clicked_cb), shell_view); - - /* The storage set view. */ - - priv->storage_set_view = e_storage_set_view_new (e_shell_get_storage_set (priv->shell)); - gtk_signal_connect (GTK_OBJECT (priv->storage_set_view), "folder_selected", - GTK_SIGNAL_FUNC (folder_selected_cb), shell_view); - - storage_set_view_scrolled_window = gtk_scrolled_window_new (NULL, NULL); - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (storage_set_view_scrolled_window), - GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); - - gtk_container_add (GTK_CONTAINER (storage_set_view_scrolled_window), - priv->storage_set_view); - - priv->storage_set_view_box = gtk_vbox_new (FALSE, 0); - storage_set_view_title_bar = e_title_bar_new (_("Folders")); - - gtk_box_pack_start (GTK_BOX (priv->storage_set_view_box), storage_set_view_title_bar, - FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (priv->storage_set_view_box), storage_set_view_scrolled_window, - TRUE, TRUE, 0); - - gtk_signal_connect (GTK_OBJECT (storage_set_view_title_bar), "close_button_clicked", - GTK_SIGNAL_FUNC (storage_set_view_close_button_clicked_cb), shell_view); - - /* The tabless notebook which we used to contain the views. */ - - priv->notebook = gtk_notebook_new (); - gtk_notebook_set_show_border (GTK_NOTEBOOK (priv->notebook), FALSE); - gtk_notebook_set_show_tabs (GTK_NOTEBOOK (priv->notebook), FALSE); - - /* Page for "No URL displayed" message. */ - - gtk_notebook_append_page (GTK_NOTEBOOK (priv->notebook), create_label_for_empty_page (), NULL); - - /* Put things into a paned and the paned into the GnomeApp. */ - - priv->hpaned2 = e_hpaned_new (); - e_paned_add1 (E_PANED (priv->hpaned2), priv->storage_set_view_box); - e_paned_add2 (E_PANED (priv->hpaned2), priv->notebook); - e_paned_set_position (E_PANED (priv->hpaned2), DEFAULT_SHORTCUT_BAR_WIDTH); - - priv->hpaned1 = e_hpaned_new (); - e_paned_add1 (E_PANED (priv->hpaned1), priv->shortcut_bar_box); - e_paned_add2 (E_PANED (priv->hpaned1), priv->hpaned2); - e_paned_set_position (E_PANED (priv->hpaned1), DEFAULT_SHORTCUT_BAR_WIDTH); - - gtk_container_set_border_width (GTK_CONTAINER (priv->hpaned1), 0); - gtk_container_set_border_width (GTK_CONTAINER (priv->hpaned2), 0); - - gnome_app_set_contents (GNOME_APP (shell_view), priv->hpaned1); - - /* Show stuff. */ - - gtk_widget_show (priv->shortcut_bar); - gtk_widget_show (priv->shortcut_bar_box); - gtk_widget_show (priv->storage_set_view); - gtk_widget_show (priv->storage_set_view_box); - gtk_widget_show (storage_set_view_scrolled_window); - gtk_widget_show (storage_set_view_title_bar); - gtk_widget_show (priv->notebook); - gtk_widget_show (priv->hpaned1); - gtk_widget_show (priv->hpaned2); - - /* FIXME: Session management and stuff? */ - gtk_window_set_default_size (GTK_WINDOW (shell_view), DEFAULT_WIDTH, DEFAULT_HEIGHT); -} - - -/* GtkObject methods. */ - -static void -hash_forall_destroy_control (gpointer name, - gpointer value, - gpointer data) -{ - CORBA_Object corba_control; - CORBA_Environment ev; - BonoboObject *bonobo_object; - BonoboWidget *bonobo_widget; - - bonobo_widget = BONOBO_WIDGET (value); - bonobo_object = BONOBO_OBJECT (bonobo_widget_get_server (bonobo_widget)); - corba_control = bonobo_object_corba_objref (bonobo_object); - - g_return_if_fail (corba_control != CORBA_OBJECT_NIL); - - CORBA_exception_init (&ev); - Bonobo_Unknown_unref (corba_control, &ev); - CORBA_exception_free (&ev); - - g_free (name); -} - -static void -destroy (GtkObject *object) -{ - EShellView *shell_view; - EShellViewPrivate *priv; - - shell_view = E_SHELL_VIEW (object); - priv = shell_view->priv; - - g_hash_table_foreach (priv->uri_to_control, hash_forall_destroy_control, NULL); - g_hash_table_destroy (priv->uri_to_control); - - g_free (priv); - - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); -} - - -/* Initialization. */ - -static void -class_init (EShellViewClass *klass) -{ - GtkObjectClass *object_class; - - object_class = GTK_OBJECT_CLASS (klass); - object_class->destroy = destroy; - - parent_class = gtk_type_class (gnome_app_get_type ()); -} - -static void -init (EShellView *shell_view) -{ - EShellViewPrivate *priv; - - priv = g_new (EShellViewPrivate, 1); - - priv->shell = NULL; - priv->uih = NULL; - priv->uri = NULL; - priv->hpaned1 = NULL; - priv->hpaned2 = NULL; - priv->contents = NULL; - priv->notebook = NULL; - priv->storage_set_view = NULL; - priv->storage_set_view_box = NULL; - priv->shortcut_bar = NULL; - priv->shortcut_bar_box = NULL; - - priv->hpaned1_position = 0; - priv->hpaned2_position = 0; - - priv->uri_to_control = g_hash_table_new (g_str_hash, g_str_equal); - - shell_view->priv = priv; -} - - -void -e_shell_view_construct (EShellView *shell_view, - EShell *shell) -{ - EShellViewPrivate *priv; - - g_return_if_fail (shell_view != NULL); - g_return_if_fail (E_IS_SHELL_VIEW (shell_view)); - g_return_if_fail (shell != NULL); - g_return_if_fail (E_IS_SHELL (shell)); - - gnome_app_construct (GNOME_APP (shell_view), "evolution", "Evolution"); - - priv = shell_view->priv; - - gtk_object_ref (GTK_OBJECT (shell)); - priv->shell = shell; - - setup_widgets (shell_view); - setup_menus (shell_view); -} - -GtkWidget * -e_shell_view_new (EShell *shell) -{ - GtkWidget *new; - - g_return_val_if_fail (shell != NULL, NULL); - g_return_val_if_fail (E_IS_SHELL (shell), NULL); - - new = gtk_type_new (e_shell_view_get_type ()); - e_shell_view_construct (E_SHELL_VIEW (new), shell); - - return new; -} - - -static const char * -get_storage_set_path_from_uri (const char *uri) -{ - const char *colon; - - if (g_path_is_absolute (uri)) - return NULL; - - colon = strchr (uri, ':'); - if (colon == NULL || colon == uri || colon[1] == '\0') - return NULL; - - if (! g_path_is_absolute (colon + 1)) - return NULL; - - if (g_strncasecmp (uri, EVOLUTION_URI_PREFIX, colon - uri) != 0) - return NULL; - - return colon + 1; -} - -static void -set_icon (EShellView *shell_view, - EFolder *folder) -{ - EShellViewPrivate *priv; - const char *type; - const char *icon_name; - char *icon_path; - - priv = shell_view->priv; - - type = e_folder_get_type_string (folder); - if (type == NULL) { - icon_path = NULL; - } else { - EFolderTypeRegistry *folder_type_registry; - - folder_type_registry = e_shell_get_folder_type_registry (priv->shell); - icon_name = e_folder_type_registry_get_icon_name_for_type (folder_type_registry, type); - if (icon_name == NULL) - icon_path = NULL; - else - icon_path = e_shell_get_icon_path (icon_name, TRUE); - } - - if (icon_path == NULL) { - gnome_window_icon_set_from_default (GTK_WINDOW (shell_view)); - } else { - gnome_window_icon_set_from_file (GTK_WINDOW (shell_view), icon_path); - g_free (icon_path); - } -} - -static void -update_for_current_uri (EShellView *shell_view) -{ - EShellViewPrivate *priv; - EFolder *folder; - const char *folder_name; - const char *path; - char *window_title; - - priv = shell_view->priv; - - path = get_storage_set_path_from_uri (priv->uri); - - if (path == NULL) - folder = NULL; - else - folder = e_storage_set_get_folder (e_shell_get_storage_set (priv->shell), - path); - - if (folder == NULL) - folder_name = _("None"); - else - folder_name = e_folder_get_name (folder); - - window_title = g_strdup_printf (_("Evolution - %s"), folder_name); - gtk_window_set_title (GTK_WINDOW (shell_view), window_title); - g_free (window_title); - - set_icon (shell_view, folder); - - gtk_signal_handler_block_by_func (GTK_OBJECT (priv->storage_set_view), - GTK_SIGNAL_FUNC (folder_selected_cb), - shell_view); - e_storage_set_view_set_current_folder (E_STORAGE_SET_VIEW (priv->storage_set_view), - path); - gtk_signal_handler_unblock_by_func (GTK_OBJECT (priv->storage_set_view), - GTK_SIGNAL_FUNC (folder_selected_cb), - shell_view); -} - -/* This displays the specified page, doing the appropriate Bonobo activation/deactivation - magic to make sure things work nicely. FIXME: Crappy way to solve the issue. */ -static void -set_current_notebook_page (EShellView *shell_view, - int page_num) -{ - EShellViewPrivate *priv; - GtkNotebook *notebook; - GtkWidget *current; - BonoboControlFrame *control_frame; - int current_page; - - priv = shell_view->priv; - notebook = GTK_NOTEBOOK (priv->notebook); - - current_page = gtk_notebook_get_current_page (notebook); - if (current_page == page_num) - return; - - if (current_page != -1 && current_page != 0) { - current = gtk_notebook_get_nth_page (notebook, current_page); - control_frame = bonobo_widget_get_control_frame (BONOBO_WIDGET (current)); - - bonobo_control_frame_set_autoactivate (control_frame, FALSE); - bonobo_control_frame_control_deactivate (control_frame); - } - - gtk_notebook_set_page (notebook, page_num); - - if (page_num == -1 || page_num == 0) - return; - - current = gtk_notebook_get_nth_page (notebook, page_num); - control_frame = bonobo_widget_get_control_frame (BONOBO_WIDGET (current)); - - bonobo_control_frame_set_autoactivate (control_frame, FALSE); - bonobo_control_frame_control_activate (control_frame); -} - -static void -show_error (EShellView *shell_view, - const char *uri) -{ - EShellViewPrivate *priv; - GtkWidget *label; - GtkNotebook *notebook; - char *s; - - priv = shell_view->priv; - - s = g_strdup_printf (_("Cannot open location: %s\n"), uri); - label = gtk_label_new (s); - g_free (s); - - gtk_widget_show (label); - - notebook = GTK_NOTEBOOK (priv->notebook); - - gtk_notebook_remove_page (notebook, 0); - gtk_notebook_prepend_page (notebook, label, NULL); - gtk_notebook_set_page (notebook, 0); -} - -/* Create a new view for @uri with @control. It assumes a view for @uri does not exist yet. */ -static GtkWidget * -get_control_for_uri (EShellView *shell_view, - const char *uri) -{ - EShellViewPrivate *priv; - EFolderTypeRegistry *folder_type_registry; - EStorageSet *storage_set; - EFolder *folder; - Bonobo_UIHandler corba_uih; - BonoboObjectClient *handler_client; - Bonobo_Control corba_control; - Evolution_ShellComponent handler; - const char *path; - const char *folder_type; - GtkWidget *control; - CORBA_Environment ev; - - priv = shell_view->priv; - - path = strchr (uri, ':'); - if (path == NULL) - return NULL; - - path++; - if (*path == '\0') - return NULL; - - storage_set = e_shell_get_storage_set (priv->shell); - folder_type_registry = e_shell_get_folder_type_registry (priv->shell); - - folder = e_storage_set_get_folder (storage_set, path); - if (folder == NULL) - return NULL; - - folder_type = e_folder_get_type_string (folder); - if (folder_type == NULL) - return NULL; - - handler_client = e_folder_type_registry_get_handler_for_type (folder_type_registry, folder_type); - if (handler_client == NULL) - return NULL; - - handler = bonobo_object_corba_objref (BONOBO_OBJECT (handler_client)); - if (handler_client == CORBA_OBJECT_NIL) - return NULL; - - CORBA_exception_init (&ev); - - corba_control = Evolution_ShellComponent_create_view (handler, e_folder_get_physical_uri (folder), &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - CORBA_exception_free (&ev); - return NULL; - } - - CORBA_exception_free (&ev); - - corba_uih = bonobo_object_corba_objref (BONOBO_OBJECT (priv->uih)); - control = bonobo_widget_new_control_from_objref (corba_control, corba_uih); - - return control; -} - -static gboolean -show_existing_view (EShellView *shell_view, - const char *uri, - GtkWidget *control) -{ - EShellViewPrivate *priv; - int notebook_page; - - g_print ("Already have view for %s\n", uri); - - priv = shell_view->priv; - - notebook_page = gtk_notebook_page_num (GTK_NOTEBOOK (priv->notebook), control); - g_assert (notebook_page != -1); - - /* A BonoboWidget can be a "zombie" in the sense that its actual - control is dead; if it's zombie, we have to recreate it. */ - if (bonobo_widget_is_dead (BONOBO_WIDGET (control))) { - GtkWidget *parent; - Bonobo_UIHandler uih; - - parent = control->parent; - uih = bonobo_object_corba_objref (BONOBO_OBJECT (priv->uih)); - - /* Out with the old. */ - gtk_container_remove (GTK_CONTAINER (parent), control); - g_hash_table_remove (priv->uri_to_control, uri); - - /* In with the new. */ - control = get_control_for_uri (shell_view, uri); - if (control == NULL) - return FALSE; - - gtk_container_add (GTK_CONTAINER (parent), control); - g_hash_table_insert (priv->uri_to_control, g_strdup (uri), control); - - /* Show. */ - gtk_widget_show (control); - } - - set_current_notebook_page (shell_view, notebook_page); - - return TRUE; -} - -static gboolean -create_new_view_for_uri (EShellView *shell_view, - const char *uri) -{ - GtkWidget *control; - EShellViewPrivate *priv; - int page_num; - - priv = shell_view->priv; - - control = get_control_for_uri (shell_view, uri); - if (control == NULL) { - show_error (shell_view, uri); - return FALSE; - } - - gtk_widget_show (control); - - gtk_notebook_append_page (GTK_NOTEBOOK (priv->notebook), control, NULL); - - page_num = gtk_notebook_page_num (GTK_NOTEBOOK (priv->notebook), control); - g_assert (page_num != -1); - set_current_notebook_page (shell_view, page_num); - - g_hash_table_insert (priv->uri_to_control, g_strdup (uri), control); - - return TRUE; -} - -gboolean -e_shell_view_display_uri (EShellView *shell_view, - const char *uri) -{ - EShellViewPrivate *priv; - GtkWidget *control; - gboolean retval; - - g_return_val_if_fail (shell_view != NULL, FALSE); - g_return_val_if_fail (E_IS_SHELL_VIEW (shell_view), FALSE); - - priv = shell_view->priv; - - if (uri == NULL) { - gtk_notebook_remove_page (GTK_NOTEBOOK (priv->notebook), 0); - gtk_notebook_prepend_page (GTK_NOTEBOOK (priv->notebook), - create_label_for_empty_page (), NULL); - - set_current_notebook_page (shell_view, 0); - - if (priv->uri != NULL) { - g_free (priv->uri); - priv->uri = NULL; - } - - retval = TRUE; - goto end; - } - - g_free (priv->uri); - priv->uri = g_strdup (uri); - - if (strncmp (uri, EVOLUTION_URI_PREFIX, EVOLUTION_URI_PREFIX_LEN) != 0) { - show_error (shell_view, uri); - return FALSE; - } - - control = g_hash_table_lookup (priv->uri_to_control, uri); - if (control != NULL) { - g_assert (GTK_IS_WIDGET (control)); - show_existing_view (shell_view, uri, control); - retval = TRUE; - goto end; - } - - if (! create_new_view_for_uri (shell_view, uri)) { - show_error (shell_view, uri); - retval = FALSE; - goto end; - } - - retval = TRUE; - - end: - update_for_current_uri (shell_view); - return retval; -} - - -void -e_shell_view_show_shortcuts (EShellView *shell_view, - gboolean show) -{ - EShellViewPrivate *priv; - - g_return_if_fail (shell_view != NULL); - g_return_if_fail (E_IS_SHELL_VIEW (shell_view)); - - priv = shell_view->priv; - - if (show) { - if (! GTK_WIDGET_VISIBLE (priv->shortcut_bar_box)) { - gtk_widget_show (priv->shortcut_bar_box); - e_paned_set_position (E_PANED (priv->hpaned1), priv->hpaned1_position); - } - } else { - if (GTK_WIDGET_VISIBLE (priv->shortcut_bar_box)) { - gtk_widget_hide (priv->shortcut_bar_box); - /* FIXME this is a private field! */ - priv->hpaned1_position = E_PANED (priv->hpaned1)->child1_size; - e_paned_set_position (E_PANED (priv->hpaned1), 0); - } - } -} - -void -e_shell_view_show_folders (EShellView *shell_view, - gboolean show) -{ - EShellViewPrivate *priv; - - g_return_if_fail (shell_view != NULL); - g_return_if_fail (E_IS_SHELL_VIEW (shell_view)); - - priv = shell_view->priv; - - if (show) { - if (! GTK_WIDGET_VISIBLE (priv->storage_set_view_box)) { - gtk_widget_show (priv->storage_set_view_box); - e_paned_set_position (E_PANED (priv->hpaned2), priv->hpaned2_position); - } - } else { - if (GTK_WIDGET_VISIBLE (priv->storage_set_view_box)) { - gtk_widget_hide (priv->storage_set_view_box); - /* FIXME this is a private field! */ - priv->hpaned2_position = E_PANED (priv->hpaned2)->child1_size; - e_paned_set_position (E_PANED (priv->hpaned2), 0); - } - } -} - - -EShell * -e_shell_view_get_shell (EShellView *shell_view) -{ - g_return_val_if_fail (shell_view != NULL, NULL); - g_return_val_if_fail (E_IS_SHELL_VIEW (shell_view), NULL); - - return shell_view->priv->shell; -} - - -E_MAKE_TYPE (e_shell_view, "EShellView", EShellView, class_init, init, PARENT_TYPE) diff --git a/shell/e-shell-view.h b/shell/e-shell-view.h deleted file mode 100644 index 10745b5c62..0000000000 --- a/shell/e-shell-view.h +++ /dev/null @@ -1,81 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-shell-view.h - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -#ifndef _E_SHELL_VIEW_H_ -#define _E_SHELL_VIEW_H_ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include - -#include "e-shell.h" - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus */ - - -#define E_TYPE_SHELL_VIEW (e_shell_view_get_type ()) -#define E_SHELL_VIEW(obj) (GTK_CHECK_CAST ((obj), E_TYPE_SHELL_VIEW, EShellView)) -#define E_SHELL_VIEW_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_SHELL_VIEW, EShellViewClass)) -#define E_IS_SHELL_VIEW(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_SHELL_VIEW)) -#define E_IS_SHELL_VIEW_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_SHELL_VIEW)) - -typedef struct _EShellView EShellView; -typedef struct _EShellViewPrivate EShellViewPrivate; -typedef struct _EShellViewClass EShellViewClass; - -struct _EShellView { - GnomeApp parent; - - EShellViewPrivate *priv; -}; - -struct _EShellViewClass { - GnomeAppClass parent_class; -}; - - -GtkType e_shell_view_get_type (void); -void e_shell_view_construct (EShellView *shell_view, - EShell *shell); -GtkWidget *e_shell_view_new (EShell *shell); - -gboolean e_shell_view_display_uri (EShellView *shell_view, - const char *uri); - -void e_shell_view_show_shortcuts (EShellView *shell_view, - gboolean show); -void e_shell_view_show_folders (EShellView *shell_view, - gboolean show); - -EShell *e_shell_view_get_shell (EShellView *shell_view); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* _E_SHELL_VIEW_H_ */ diff --git a/shell/e-shell.c b/shell/e-shell.c deleted file mode 100644 index ec61116534..0000000000 --- a/shell/e-shell.c +++ /dev/null @@ -1,460 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-shell.c - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include - -#include "Evolution.h" - -#include "e-util/e-util.h" - -#include "e-component-registry.h" -#include "e-corba-storage-registry.h" -#include "e-folder-type-registry.h" -#include "e-local-storage.h" -#include "e-shell-view.h" -#include "e-shortcuts.h" -#include "e-storage-set.h" - -#include "e-shell.h" - - -#define PARENT_TYPE BONOBO_OBJECT_TYPE -static BonoboObjectClass *parent_class = NULL; - -struct _EShellPrivate { - char *local_directory; - - GList *views; - - EStorageSet *storage_set; - EShortcuts *shortcuts; - EFolderTypeRegistry *folder_type_registry; - - EComponentRegistry *component_registry; - - ECorbaStorageRegistry *corba_storage_registry; -}; - - -/* Constants. */ - -#define SHORTCUTS_FILE_NAME "shortcuts.xml" -#define LOCAL_STORAGE_DIRECTORY "local" - -#ifdef USING_OAF -#define MAIL_COMPONENT_ID "OAFIID:evolution-shell-component:evolution-mail:d3cb3ed6-a654-4337-8aa0-f443751d6d1b" -#define CALENDAR_COMPONENT_ID "OAFIID:evolution-shell-component:evolution-calendar:2eb9eb63-d305-4918-9c35-faae5db19e51" -#define ADDRESSBOOK_COMPONENT_ID "OAFIID:evolution-shell-component:addressbook:b7a26547-7014-4bb5-98ab-2bcac2bb55ca" -#else -#define MAIL_COMPONENT_ID "evolution-shell-component:evolution-mail" -#define CALENDAR_COMPONENT_ID "evolution-shell-component:evolution-calendar" -#define ADDRESSBOOK_COMPONENT_ID "evolution-shell-component:addressbook" -#endif - - -enum { - NO_VIEWS_LEFT, - LAST_SIGNAL -}; - -static guint signals[LAST_SIGNAL] = { 0 }; - - -/* CORBA interface implementation. */ - -static POA_Evolution_Shell__vepv shell_vepv; - -static POA_Evolution_Shell * -create_servant (void) -{ - POA_Evolution_Shell *servant; - CORBA_Environment ev; - - servant = (POA_Evolution_Shell *) g_new0 (BonoboObjectServant, 1); - servant->vepv = &shell_vepv; - - CORBA_exception_init (&ev); - - POA_Evolution_Shell__init ((PortableServer_Servant) servant, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_free (servant); - CORBA_exception_free (&ev); - return NULL; - } - - CORBA_exception_free (&ev); - - return servant; -} - -static void -impl_Shell_dummy_method (PortableServer_Servant servant, - CORBA_Environment *ev) -{ - g_print ("Evolution::Shell::dummy_method invoked!\n"); -} - - -/* Initialization of the storages. */ - -static gboolean -setup_corba_storages (EShell *shell) -{ - EShellPrivate *priv; - - priv = shell->priv; - - g_assert (priv->storage_set != NULL); - priv->corba_storage_registry = e_corba_storage_registry_new (priv->storage_set); - - if (priv->corba_storage_registry == NULL) - return FALSE; - - bonobo_object_add_interface (BONOBO_OBJECT (shell), - BONOBO_OBJECT (priv->corba_storage_registry)); - - return TRUE; -} - -static gboolean -setup_storages (EShell *shell) -{ - EStorage *local_storage; - EShellPrivate *priv; - gchar *local_storage_path; - - priv = shell->priv; - - local_storage_path = g_concat_dir_and_file (priv->local_directory, - LOCAL_STORAGE_DIRECTORY); - local_storage = e_local_storage_open (local_storage_path); - if (local_storage == NULL) { - g_warning (_("Cannot set up local storage -- %s"), local_storage_path); - g_free (local_storage_path); - return FALSE; - } - g_free (local_storage_path); - - g_assert (shell->priv->folder_type_registry); - - priv->storage_set = e_storage_set_new (shell->priv->folder_type_registry); - e_storage_set_add_storage (priv->storage_set, local_storage); - - gtk_object_unref (GTK_OBJECT (local_storage)); - - return setup_corba_storages (shell); -} - - -/* Initialization of the components. */ - -static void -setup_components (EShell *shell) -{ - EShellPrivate *priv; - - priv = shell->priv; - - priv->component_registry = e_component_registry_new (shell); - - /* FIXME: Hardcoded for now. */ - - if (! e_component_registry_register_component (priv->component_registry, MAIL_COMPONENT_ID)) - g_warning ("Cannot activate mail component -- %s", MAIL_COMPONENT_ID); - - if (! e_component_registry_register_component (priv->component_registry, CALENDAR_COMPONENT_ID)) - g_warning ("Cannot activate calendar component -- %s", CALENDAR_COMPONENT_ID); - - if (! e_component_registry_register_component (priv->component_registry, ADDRESSBOOK_COMPONENT_ID)) - g_warning ("Cannot activate addressbook component -- %s", ADDRESSBOOK_COMPONENT_ID); -} - - -/* EShellView destruction callback. */ - -static void -view_destroy_cb (GtkObject *object, - gpointer data) -{ - EShell *shell; - - g_assert (E_IS_SHELL_VIEW (object)); - - shell = E_SHELL (data); - shell->priv->views = g_list_remove (shell->priv->views, object); - - if (shell->priv->views == NULL) - gtk_signal_emit (GTK_OBJECT (shell), signals[NO_VIEWS_LEFT]); -} - - -/* GtkObject methods. */ - -static void -destroy (GtkObject *object) -{ - EShell *shell; - EShellPrivate *priv; - GList *p; - - shell = E_SHELL (object); - priv = shell->priv; - - if (priv->storage_set != NULL) - gtk_object_unref (GTK_OBJECT (priv->storage_set)); - - if (priv->shortcuts != NULL) - gtk_object_unref (GTK_OBJECT (priv->shortcuts)); - - if (priv->folder_type_registry != NULL) - gtk_object_unref (GTK_OBJECT (priv->folder_type_registry)); - - if (priv->component_registry != NULL) - gtk_object_unref (GTK_OBJECT (priv->component_registry)); - - for (p = priv->views; p != NULL; p = p->next) { - EShellView *view; - - view = E_SHELL_VIEW (p->data); - - gtk_signal_disconnect_by_func (GTK_OBJECT (view), - GTK_SIGNAL_FUNC (view_destroy_cb), shell); - gtk_object_destroy (GTK_OBJECT (view)); - } - - g_list_free (priv->views); - - if (priv->corba_storage_registry != NULL) - bonobo_object_unref (BONOBO_OBJECT (priv->corba_storage_registry)); - - g_free (priv); - - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); -} - - -/* Initialization. */ - -static void -corba_class_init (void) -{ - POA_Evolution_Shell__vepv *vepv; - POA_Evolution_Shell__epv *epv; - PortableServer_ServantBase__epv *base_epv; - - base_epv = g_new0 (PortableServer_ServantBase__epv, 1); - base_epv->_private = NULL; - base_epv->finalize = NULL; - base_epv->default_POA = NULL; - - epv = g_new0 (POA_Evolution_Shell__epv, 1); - epv->dummy_method = impl_Shell_dummy_method; - - vepv = &shell_vepv; - vepv->Bonobo_Unknown_epv = bonobo_object_get_epv (); - vepv->Evolution_Shell_epv = epv; -} - -static void -class_init (EShellClass *klass) -{ - GtkObjectClass *object_class; - - parent_class = gtk_type_class (PARENT_TYPE); - - object_class = GTK_OBJECT_CLASS (klass); - object_class->destroy = destroy; - - signals[NO_VIEWS_LEFT] = - gtk_signal_new ("no_views_left", - GTK_RUN_LAST, - object_class->type, - GTK_SIGNAL_OFFSET (EShellClass, no_views_left), - gtk_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); - - gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); - - corba_class_init (); -} - -static void -init (EShell *shell) -{ - EShellPrivate *priv; - - priv = g_new (EShellPrivate, 1); - - priv->views = NULL; - - priv->local_directory = NULL; - priv->storage_set = NULL; - priv->shortcuts = NULL; - priv->component_registry = NULL; - priv->folder_type_registry = NULL; - priv->corba_storage_registry = NULL; - - shell->priv = priv; -} - - -void -e_shell_construct (EShell *shell, - Evolution_Shell corba_object, - const char *local_directory) -{ - EShellPrivate *priv; - gchar *shortcut_path; - - g_return_if_fail (shell != NULL); - g_return_if_fail (E_IS_SHELL (shell)); - g_return_if_fail (corba_object != CORBA_OBJECT_NIL); - g_return_if_fail (local_directory != NULL); - g_return_if_fail (g_path_is_absolute (local_directory)); - - bonobo_object_construct (BONOBO_OBJECT (shell), corba_object); - - priv = shell->priv; - - priv->local_directory = g_strdup (local_directory); - priv->folder_type_registry = e_folder_type_registry_new (); - - /* Storages must be set up before the components, because otherwise components - cannot register their own storages. */ - if (! setup_storages (shell)) - return; - - setup_components (shell); - - priv->shortcuts = e_shortcuts_new (priv->storage_set, priv->folder_type_registry); - - shortcut_path = g_concat_dir_and_file (local_directory, "shortcuts.xml"); - - if (! e_shortcuts_load (priv->shortcuts, shortcut_path)) { - gtk_object_unref (GTK_OBJECT (priv->shortcuts)); - priv->shortcuts = NULL; - - g_warning ("Cannot load shortcuts -- %s", shortcut_path); - } - - g_free (shortcut_path); -} - -EShell * -e_shell_new (const char *local_directory) -{ - EShell *new; - EShellPrivate *priv; - Evolution_Shell corba_object; - POA_Evolution_Shell *servant; - - g_return_val_if_fail (local_directory != NULL, NULL); - g_return_val_if_fail (*local_directory != '\0', NULL); - - servant = create_servant (); - if (servant == NULL) - return NULL; - - new = gtk_type_new (e_shell_get_type ()); - - corba_object = bonobo_object_activate_servant (BONOBO_OBJECT (new), servant); - e_shell_construct (new, corba_object, local_directory); - - priv = new->priv; - - if (priv->shortcuts == NULL || priv->storage_set == NULL) { - bonobo_object_unref (BONOBO_OBJECT (new)); - return NULL; - } - - return new; -} - - -GtkWidget * -e_shell_new_view (EShell *shell, - const char *uri) -{ - GtkWidget *view; - - g_return_val_if_fail (shell != NULL, NULL); - g_return_val_if_fail (E_IS_SHELL (shell), NULL); - - view = e_shell_view_new (shell); - - gtk_widget_show (view); - gtk_signal_connect (GTK_OBJECT (view), "destroy", GTK_SIGNAL_FUNC (view_destroy_cb), shell); - - if (uri != NULL) - e_shell_view_display_uri (E_SHELL_VIEW (view), uri); - - shell->priv->views = g_list_prepend (shell->priv->views, view); - - return view; -} - - -EShortcuts * -e_shell_get_shortcuts (EShell *shell) -{ - g_return_val_if_fail (shell != NULL, NULL); - g_return_val_if_fail (E_IS_SHELL (shell), NULL); - - return shell->priv->shortcuts; -} - -EStorageSet * -e_shell_get_storage_set (EShell *shell) -{ - g_return_val_if_fail (shell != NULL, NULL); - g_return_val_if_fail (E_IS_SHELL (shell), NULL); - - return shell->priv->storage_set; -} - -EFolderTypeRegistry * -e_shell_get_folder_type_registry (EShell *shell) -{ - g_return_val_if_fail (shell != NULL, NULL); - g_return_val_if_fail (E_IS_SHELL (shell), NULL); - - return shell->priv->folder_type_registry; -} - - -void -e_shell_quit (EShell *shell) -{ - g_return_if_fail (shell != NULL); - g_return_if_fail (E_IS_SHELL (shell)); - - bonobo_object_unref (BONOBO_OBJECT (shell)); -} - - -E_MAKE_TYPE (e_shell, "EShell", EShell, class_init, init, PARENT_TYPE) diff --git a/shell/e-shell.h b/shell/e-shell.h deleted file mode 100644 index cf29daad9b..0000000000 --- a/shell/e-shell.h +++ /dev/null @@ -1,84 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-shell.h - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -#ifndef _E_SHELL_H_ -#define _E_SHELL_H_ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include - -#include "Evolution.h" -#include "e-shortcuts.h" - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus */ - -#define E_TYPE_SHELL (e_shell_get_type ()) -#define E_SHELL(obj) (GTK_CHECK_CAST ((obj), E_TYPE_SHELL, EShell)) -#define E_SHELL_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_SHELL, EShellClass)) -#define E_IS_SHELL(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_SHELL)) -#define E_IS_SHELL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_SHELL)) - - -typedef struct _EShell EShell; -typedef struct _EShellPrivate EShellPrivate; -typedef struct _EShellClass EShellClass; - -struct _EShell { - BonoboObject parent; - - EShellPrivate *priv; -}; - -struct _EShellClass { - BonoboObjectClass parent_class; - - void (* no_views_left) (EShell *shell); -}; - - -GtkType e_shell_get_type (void); -void e_shell_construct (EShell *shell, - Evolution_Shell corba_object, - const char *local_directory); - -EShell *e_shell_new (const char *local_directory); -GtkWidget *e_shell_new_view (EShell *shell, - const char *uri); - -EShortcuts *e_shell_get_shortcuts (EShell *shell); -EStorageSet *e_shell_get_storage_set (EShell *shell); -EFolderTypeRegistry *e_shell_get_folder_type_registry (EShell *shell); - -void e_shell_quit (EShell *shell); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* _E_SHELL_H_ */ diff --git a/shell/e-shortcut.c b/shell/e-shortcut.c deleted file mode 100644 index 532f38b175..0000000000 --- a/shell/e-shortcut.c +++ /dev/null @@ -1,499 +0,0 @@ -/* - * Shortcut.c: implements shortcuts and shortcut group models - * - * Author: - * Miguel de Icaza (miguel@kernel.org) - * - * (C) 2000 Helix Code, Inc. - * - */ -#include -#include -#include -#include -#include "e-util/e-util.h" -#include "e-shortcut.h" -#include "shortcut-bar/e-shortcut-bar.h" -#include "shortcut-bar/e-clipped-label.h" - -#define SHORTCUT_PARENT_TYPE gtk_object_get_type () -#define SHORTCUT_BAR_MODEL_PARENT_TYPE gtk_object_get_type () -#define SHORTCUT_GROUP_PARENT_TYPE gtk_object_get_type () - -static GtkObjectClass *shortcut_parent_class; -static GtkObjectClass *shortcut_group_parent_class; -static GtkObjectClass *shortcut_bar_model_parent_class; - -enum { - STRUCTURE_CHANGED, - LAST_SIGNAL -}; - -static void -es_destroy (GtkObject *object) -{ - EShortcut *ef = E_SHORTCUT (object); - - if (ef->efolder != NULL) - gtk_object_unref (GTK_OBJECT (ef->efolder)); - - shortcut_parent_class->destroy (object); -} - -static void -e_shortcut_class_init (GtkObjectClass *object_class) -{ - object_class->destroy = es_destroy; - shortcut_parent_class = gtk_type_class (SHORTCUT_PARENT_TYPE); -} - -static void -esg_destroy (GtkObject *object) -{ - EShortcutGroup *efg = E_SHORTCUT_GROUP (object); - const int shortcut_count = efg->shortcuts->len; - int i; - - g_free (efg->title); - - for (i = 0; i < shortcut_count; i++){ - EShortcut *es = g_array_index (efg->shortcuts, EShortcut *, i); - - if (es != NULL) - gtk_object_unref (GTK_OBJECT (es)); - } - - g_array_free (efg->shortcuts, TRUE); - efg->model = NULL; - - shortcut_group_parent_class->destroy (object); -} - -static void -e_shortcut_group_class_init (GtkObjectClass *object_class) -{ - object_class->destroy = esg_destroy; - shortcut_parent_class = gtk_type_class (SHORTCUT_GROUP_PARENT_TYPE); -} - -static void -e_shortcut_group_init (GtkObject *object) -{ - EShortcutGroup *esg = E_SHORTCUT_GROUP (object); - - GTK_OBJECT_UNSET_FLAGS (GTK_OBJECT (object), GTK_FLOATING); - - esg->shortcuts = g_array_new (FALSE, FALSE, sizeof (EShortcut *)); -} - -EShortcut * -e_shortcut_new (EFolder *efolder) -{ - EShortcut *shortcut = gtk_type_new (e_shortcut_get_type ()); - - shortcut->efolder = efolder; - gtk_object_ref (GTK_OBJECT (efolder)); - - return shortcut; -} - -EShortcutGroup * -e_shortcut_group_new (const char *title, EIconBarViewType type) -{ - EShortcutGroup *shortcut_group = gtk_type_new (e_shortcut_group_get_type ()); - - shortcut_group->title = g_strdup (title); - shortcut_group->type = type; - return shortcut_group; -} - -void -e_shortcut_group_append (EShortcutGroup *sg, EShortcut *shortcut) -{ - g_return_if_fail (sg != NULL); - g_return_if_fail (E_IS_SHORTCUT_GROUP (sg)); - g_return_if_fail (shortcut != NULL); - g_return_if_fail (E_IS_SHORTCUT (shortcut)); - - gtk_object_ref (GTK_OBJECT (shortcut)); - gtk_object_sink (GTK_OBJECT (shortcut)); - - g_array_append_val (sg->shortcuts, shortcut); - - /* FIXME: Broadcast change */ -} - -void -e_shortcut_group_remove (EShortcutGroup *sg, EShortcut *shortcut) -{ - g_return_if_fail (sg != NULL); - g_return_if_fail (E_IS_SHORTCUT_GROUP (sg)); - g_return_if_fail (shortcut != NULL); - g_return_if_fail (E_IS_SHORTCUT (sg)); - - { - const int len = sg->shortcuts->len; - int i; - - for (i = 0; i < len; i++){ - EShortcut *es = g_array_index (sg->shortcuts, EShortcut *, i); - - if (es == shortcut){ - g_array_remove_index (sg->shortcuts, i); - /* FIXME: Broadcast change */ - return; - } - } - } -} - -void -e_shortcut_group_move (EShortcutGroup *sg, int from, int to) -{ - EShortcut *t; - - g_return_if_fail (sg != NULL); - g_return_if_fail (E_IS_SHORTCUT_GROUP (sg)); - - g_return_if_fail (from < sg->shortcuts->len); - g_return_if_fail (to < sg->shortcuts->len); - g_return_if_fail (from >= 0); - g_return_if_fail (to >= 0); - - if (from == to) - return; - - t = g_array_index (sg->shortcuts, EShortcut *, from); - g_array_index (sg->shortcuts, EShortcut *, from) = - g_array_index (sg->shortcuts, EShortcut *, to); - g_array_index (sg->shortcuts, EShortcut *, to) = t; - - /* FIXME: Broadcast change */ -} - -void -e_shortcut_group_rename (EShortcutGroup *sg, const char *text) -{ - GSList *l; - int id; - - g_return_if_fail (sg != NULL); - g_return_if_fail (E_IS_SHORTCUT_GROUP (sg)); - - id = e_group_num_from_group_ptr (sg->model, sg); - for (l = sg->model->views; l; l = l->next){ - EShortcutBar *shortcut_bar = l->data; - GtkWidget *label; - - label = e_clipped_label_new (text); - - gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0.5); - gtk_widget_show (label); - - e_group_bar_set_group_button_label ( - E_GROUP_BAR (shortcut_bar), id, label); - } -} - -static void -esb_destroy (GtkObject *object) -{ - EShortcutBarModel *esb = E_SHORTCUT_BAR_MODEL (object); - const int count = esb->groups->len; - int i; - - for (i = 0; i < count; i++){ - EShortcutGroup *esg = g_array_index (esb->groups, EShortcutGroup *, i); - - gtk_object_destroy (GTK_OBJECT (esg)); - } - - g_array_free (esb->groups, TRUE); - shortcut_bar_model_parent_class->destroy (object); -} - -static void -e_shortcut_bar_model_class_init (GtkObjectClass *object_class) -{ - object_class->destroy = esb_destroy; - shortcut_bar_model_parent_class = gtk_type_class (SHORTCUT_BAR_MODEL_PARENT_TYPE); -} - -static void -e_shortcut_bar_model_init (GtkObject *object) -{ - EShortcutBarModel *esb = E_SHORTCUT_BAR_MODEL (object); - - /* The shortcut bar model is self owned */ - GTK_OBJECT_UNSET_FLAGS (object, GTK_FLOATING); - - esb->groups = g_array_new (FALSE, FALSE, sizeof (EShortcutGroup *)); -} - -EShortcutBarModel * -e_shortcut_bar_model_new (void) -{ - EShortcutBarModel *bm; - - bm = gtk_type_new (e_shortcut_bar_model_get_type ()); - - return bm; -} - -void -e_shortcut_bar_model_append (EShortcutBarModel *bm, EShortcutGroup *sg) -{ - g_return_if_fail (bm != NULL); - g_return_if_fail (sg != NULL); - g_return_if_fail (E_IS_SHORTCUT_BAR_MODEL (bm)); - g_return_if_fail (E_IS_SHORTCUT_GROUP (sg)); - - gtk_object_ref (GTK_OBJECT (sg)); - gtk_object_sink (GTK_OBJECT (sg)); - - sg->model = bm; - - g_array_append_val (bm->groups, sg); -} - -EShortcutGroup * -e_shortcut_group_from_pos (EShortcutBarModel *bm, int group_num) -{ - EShortcutGroup *group; - - if (group_num == -1) - return NULL; - - group = g_array_index (bm->groups, EShortcutGroup *, group_num); - return group; -} - -EShortcut * -e_shortcut_from_pos (EShortcutGroup *group, int item_num) -{ - EShortcut *shortcut; - - g_return_val_if_fail (group != NULL, NULL); - g_return_val_if_fail (E_IS_SHORTCUT_GROUP (group), NULL); - - if (item_num == -1) - return NULL; - - g_return_val_if_fail (item_num < group->shortcuts->len, NULL); - - shortcut = g_array_index (group->shortcuts, EShortcut *, item_num); - return shortcut; -} - -static void -populate_group (EShortcutBarModel *bm, EShortcutGroup *esg, EShortcutBar *shortcut_bar) -{ - int group_num, i; - const int items = esg->shortcuts->len; - - group_num = e_shortcut_bar_add_group (shortcut_bar, esg->title); - e_shortcut_bar_set_view_type (shortcut_bar, group_num, esg->type); - - for (i = 0; i < items; i++){ - EShortcut *shortcut = E_SHORTCUT (g_array_index (esg->shortcuts, EShortcut *, i)); - EFolder *folder = shortcut->efolder; - char *type = NULL; - - switch (folder->type){ - case E_FOLDER_SUMMARY: - type = "summary:"; - break; - - case E_FOLDER_MAIL: - type = "mail:"; - break; - - case E_FOLDER_CONTACTS: - type = "contacts:"; - break; - - case E_FOLDER_CALENDAR: - type = "calendar:"; - break; - - case E_FOLDER_TASKS: - type = "todo:"; - break; - - case E_FOLDER_OTHER: - type = "file:"; - break; - - default: - g_assert_not_reached (); - } - - e_shortcut_bar_add_item (shortcut_bar, group_num, type, folder->name); - } -} - -static void -populate_from_model (EShortcutBarModel *bm, EShortcutBar *shortcut_bar) -{ - const int groups = bm->groups->len; - int i; - - for (i = 0; i < groups; i++){ - EShortcutGroup *esg; - - esg = g_array_index (bm->groups, EShortcutGroup *, i); - - populate_group (bm, esg, shortcut_bar); - } - -} - -static struct { - char *prefix, *path; - GdkPixbuf *image; -} shell_icons[] = { - { "summary:", "evolution-today.png", NULL }, - { "mail:", "evolution-inbox.png", NULL }, - { "calendar:", "evolution-calendar.png", NULL }, - { "contacts:", "evolution-contacts.png", NULL }, - { "notes:", "evolution-notes.png", NULL }, - { "todo:", "evolution-tasks.png", NULL } -}; -#define NSHELL_ICONS (sizeof (shell_icons) / sizeof (shell_icons[0])) - -static GdkPixbuf * -shell_icon_cb (EShortcutBar *shortcut_bar, const gchar *url, gpointer data) -{ - int i; - - for (i = 0; i < NSHELL_ICONS; i++) { - if (!strncmp (shell_icons[i].prefix, url, - strlen (shell_icons[i].prefix))) { - if (!shell_icons[i].image) { - char *pixmap_path; - - pixmap_path = g_strconcat (EVOLUTION_IMAGES "/", shell_icons[i].path, NULL); - if (pixmap_path) - shell_icons[i].image = gdk_pixbuf_new_from_file (pixmap_path); - else { - g_warning ("Couldn't find image: %s", - pixmap_path); - } - g_free (pixmap_path); - } - return shell_icons[i].image; - } - } - - return NULL; -} - -static void -view_destroyed (EShortcutBar *shortcut_bar, EShortcutBarModel *bm) -{ - bm->views = g_slist_remove (bm->views, shortcut_bar); -} - -GtkWidget * -e_shortcut_bar_view_new (EShortcutBarModel *bm) -{ - GtkWidget *shortcut_bar; - - gtk_widget_push_visual (gdk_rgb_get_visual ()); - gtk_widget_push_colormap (gdk_rgb_get_cmap ()); - - shortcut_bar = e_shortcut_bar_new (); - e_shortcut_bar_set_icon_callback (E_SHORTCUT_BAR (shortcut_bar), - shell_icon_cb, NULL); - - gtk_widget_pop_visual (); - gtk_widget_pop_colormap (); - - populate_from_model (bm, E_SHORTCUT_BAR (shortcut_bar)); - - bm->views = g_slist_prepend (bm->views, shortcut_bar); - gtk_signal_connect (GTK_OBJECT (shortcut_bar), "destroy", GTK_SIGNAL_FUNC (view_destroyed), bm); - - return shortcut_bar; -} - -int -e_group_num_from_group_ptr (EShortcutBarModel *bm, EShortcutGroup *group) -{ - const int n = bm->groups->len; - int i; - - for (i = 0; i < n; i++) - if (g_array_index (bm->groups, EShortcutGroup *, i) == group) - return i; - return -1; -} - -/* - * Sets the view mode in all the views - */ -void -e_shortcut_group_set_view_type (EShortcutGroup *group, EIconBarViewType type) -{ - GSList *l; - int group_num; - - g_return_if_fail (group != NULL); - g_return_if_fail (E_IS_SHORTCUT_GROUP (group)); - - group_num = e_group_num_from_group_ptr (group->model, group); - - g_assert (group_num != -1); - - group->type = type; - - for (l = group->model->views; l ; l = l->next){ - EShortcutBar *shortcut_bar = l->data; - - e_shortcut_bar_set_view_type (shortcut_bar, group_num, type); - } -} - -gint -e_shortcut_bar_model_add_group (EShortcutBarModel *model) -{ - int id = -1; - GSList *l = NULL; - - g_return_val_if_fail (model != NULL, -1); - g_return_val_if_fail (E_IS_SHORTCUT_BAR_MODEL (model), -1); - - for (l = model->views; l; l = l->next){ - EShortcutBar *shortcut_bar = l->data; - - id = e_shortcut_bar_add_group (shortcut_bar, _("New group")); - } - - return id; -} - -void -e_shortcut_bar_model_remove_group (EShortcutBarModel *model, EShortcutGroup *sg) -{ - GSList *l = NULL; - int group_num; - - g_return_if_fail (model != NULL); - g_return_if_fail (E_IS_SHORTCUT_BAR_MODEL (model)); - g_return_if_fail (sg != NULL); - g_return_if_fail (E_IS_SHORTCUT_GROUP (sg)); - - group_num = e_group_num_from_group_ptr (model, sg); - - for (l = model->views; l; l = l->next){ - EShortcutBar *shortcut_bar = l->data; - - e_shortcut_bar_remove_group (shortcut_bar, group_num); - } - -} - -E_MAKE_TYPE (e_shortcut, "EShortcut", EShortcut, e_shortcut_class_init, NULL, SHORTCUT_PARENT_TYPE); -E_MAKE_TYPE (e_shortcut_group, "EShortcutGroup", EShortcutGroup, e_shortcut_group_class_init, e_shortcut_group_init, SHORTCUT_GROUP_PARENT_TYPE); -E_MAKE_TYPE (e_shortcut_bar_model, "EShortcutBarModel", EShortcutBarModel, e_shortcut_bar_model_class_init, e_shortcut_bar_model_init, SHORTCUT_BAR_MODEL_PARENT_TYPE); - diff --git a/shell/e-shortcut.h b/shell/e-shortcut.h deleted file mode 100644 index e7dde69124..0000000000 --- a/shell/e-shortcut.h +++ /dev/null @@ -1,102 +0,0 @@ -#ifndef SHELL_SHORTCUT_H -#define SHELL_SHORTCUT_H - -#include -#include "e-folder.h" -#include "shortcut-bar/e-icon-bar.h" - -typedef struct _EShortcut EShortcut; -typedef struct _EShortcutGroup EShortcutGroup; -typedef struct _EShortcutBarModel EShortcutBarModel; - -#define E_SHORTCUT_TYPE (e_shortcut_get_type ()) -#define E_SHORTCUT(o) (GTK_CHECK_CAST ((o), E_SHORTCUT_TYPE, EShortcut)) -#define E_SHORTCUT_CLASS(k) (GTK_CHECK_CLASS_CAST((k), E_SHORTCUT_TYPE, EShortcutClass)) -#define E_IS_SHORTCUT(o) (GTK_CHECK_TYPE ((o), E_SHORTCUT_TYPE)) -#define E_IS_SHORTCUT_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_SHORTCUT_TYPE)) - -struct _EShortcut { - GtkObject object; - EFolder *efolder; -}; - -typedef struct { - GtkObjectClass parent_class; -} EShortcutClass; - -#define E_SHORTCUT_GROUP_TYPE (e_shortcut_group_get_type ()) -#define E_SHORTCUT_GROUP(o) (GTK_CHECK_CAST ((o), E_SHORTCUT_GROUP_TYPE, EShortcutGroup)) -#define E_SHORTCUT_GROUP_CLASS(k) (GTK_CHECK_CLASS_CAST((k), E_SHORTCUT_GROUP_TYPE, EShortcutGroupClass)) -#define E_IS_SHORTCUT_GROUP(o) (GTK_CHECK_TYPE ((o), E_SHORTCUT_GROUP_TYPE)) -#define E_IS_SHORTCUT_GROUP_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_SHORTCUT_GROUP_TYPE)) - -struct _EShortcutGroup { - GtkObject object; - EShortcutBarModel *model; - char *group_name; - GArray *shortcuts; - char *title; - EIconBarViewType type; -}; - -typedef struct { - GtkObjectClass parent_class; -} EShortcutGroupClass; - -GtkType e_shortcut_get_type (void); -EShortcut *e_shortcut_new (EFolder *efolder); - -GtkType e_shortcut_group_get_type (void); -EShortcutGroup *e_shortcut_group_new (const char *name, EIconBarViewType type); -void e_shortcut_group_append (EShortcutGroup *sg, EShortcut *shortcut); -void e_shortcut_group_destroy (EShortcutGroup *sg); -void e_shortcut_group_remove (EShortcutGroup *sg, EShortcut *shortcut); -void e_shortcut_group_move (EShortcutGroup *sg, int from, int to); -void e_shortcut_group_set_view_type (EShortcutGroup *sg, EIconBarViewType type); -void e_shortcut_group_rename (EShortcutGroup *sg, const char *text); - -#define E_SHORTCUT_BAR_MODEL_TYPE (e_shortcut_bar_model_get_type ()) -#define E_SHORTCUT_BAR_MODEL(o) (GTK_CHECK_CAST ((o), E_SHORTCUT_BAR_MODEL_TYPE, EShortcutBarModel)) -#define E_SHORTCUT_BAR_MODEL_CLASS(k) (GTK_CHECK_CLASS_CAST((k), E_SHORTCUT_BAR_MODEL_TYPE, EShortcutBarMNodelClass)) -#define E_IS_SHORTCUT_BAR_MODEL(o) (GTK_CHECK_TYPE ((o), E_SHORTCUT_BAR_MODEL_TYPE)) -#define E_IS_SHORTCUT_BAR_MODEL_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_SHORTCUT_BAR_MODEL_TYPE)) - -struct _EShortcutBarModel { - GtkObject object; - - GArray *groups; - GSList *views; -}; - -typedef struct { - GtkObjectClass object_class; -} EShortcutBarModelClass; - -GtkType e_shortcut_bar_model_get_type (void); -EShortcutBarModel *e_shortcut_bar_model_new (void); -void e_shortcut_bar_model_append (EShortcutBarModel *shortcut_bar, - EShortcutGroup *group); -int e_shortcut_bar_model_add_group (EShortcutBarModel *shortcut_bar); -void e_shortcut_bar_model_remove_group - (EShortcutBarModel *model, - EShortcutGroup *sg); - -/* Ugly api name */ -int e_group_num_from_group_ptr (EShortcutBarModel *bm, - EShortcutGroup *group); - -/* - * Produces a new view of the Shortcut Bar model - */ -GtkWidget *e_shortcut_bar_view_new (EShortcutBarModel *bm); - -/* - * Locating objects - */ -EShortcutGroup *e_shortcut_group_from_pos (EShortcutBarModel *bm, - int group_num); -EShortcut *e_shortcut_from_pos (EShortcutGroup *group, - int item_num); - -#endif - diff --git a/shell/e-shortcuts-view.c b/shell/e-shortcuts-view.c deleted file mode 100644 index c9fa17653c..0000000000 --- a/shell/e-shortcuts-view.c +++ /dev/null @@ -1,294 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-shortcuts-view.c - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include - -#include "e-util/e-util.h" - -#include "e-shortcuts-view.h" - - -#define PARENT_TYPE E_TYPE_SHORTCUT_BAR -static EShortcutBarClass *parent_class = NULL; - -struct _EShortcutsViewPrivate { - EShortcuts *shortcuts; -}; - -enum { - ACTIVATE_SHORTCUT, - LAST_SIGNAL -}; - -static guint signals[LAST_SIGNAL] = { 0 }; - - -/* View initialization. */ - -static const char * -get_storage_set_path_from_uri (const char *uri) -{ - const char *colon; - - if (g_path_is_absolute (uri)) - return NULL; - - colon = strchr (uri, ':'); - if (colon == NULL || colon == uri || colon[1] == '\0') - return NULL; - - if (! g_path_is_absolute (colon + 1)) - return NULL; - - if (g_strncasecmp (uri, "evolution", colon - uri) != 0) - return NULL; - - return colon + 1; -} - -static void -load_group (EShortcutsView *shortcuts_view, - const char *group_title, - int group_num) -{ - EShortcutsViewPrivate *priv; - EShortcuts *shortcuts; - EStorageSet *storage_set; - GList *shortcut_list; - GList *p; - - priv = shortcuts_view->priv; - shortcuts = priv->shortcuts; - - storage_set = e_shortcuts_get_storage_set (shortcuts); - g_assert (storage_set != NULL); - - shortcut_list = e_shortcuts_get_shortcuts_in_group (shortcuts, group_title); - if (shortcut_list == NULL) - return; - - for (p = shortcut_list; p != NULL; p = p->next) { - EFolder *folder; - const char *path; - const char *uri; - const char *name; - - uri = (const char *) p->data; - path = get_storage_set_path_from_uri (uri); - if (path != NULL) - folder = e_storage_set_get_folder (storage_set, path); - - if (path == NULL || folder == NULL) { - /* FIXME */ - g_warning ("Invalid link while loading shortcut bar view -- %s\n", - uri); - continue; - } - - name = e_folder_get_name (folder); - e_shortcut_bar_add_item (E_SHORTCUT_BAR (shortcuts_view), group_num, uri, name); - } - - e_free_string_list (shortcut_list); -} - -static void -load_all_shortcuts (EShortcutsView *shortcuts_view) -{ - EShortcutsViewPrivate *priv; - EShortcuts *shortcuts; - GList *group_titles; - GList *p; - int group_num; - - priv = shortcuts_view->priv; - shortcuts = priv->shortcuts; - - group_titles = e_shortcuts_get_group_titles (shortcuts); - - for (p = group_titles; p != NULL; p = p->next) { - const char *group_title; - - group_title = (const char *) p->data; - group_num = e_shortcut_bar_add_group (E_SHORTCUT_BAR (shortcuts_view), - group_title); - - load_group (shortcuts_view, group_title, group_num); - } - - e_free_string_list (group_titles); -} - -/* Icon callback for the shortcut bar. */ -static GdkPixbuf * -icon_callback (EShortcutBar *shortcut_bar, - const char *uri, - gpointer data) -{ - EFolderTypeRegistry *folder_type_registry; - EShortcuts *shortcuts; - EStorageSet *storage_set; - EFolder *folder; - GdkPixbuf *pixbuf; - const char *type; - - shortcuts = E_SHORTCUTS (data); - - storage_set = e_shortcuts_get_storage_set (shortcuts); - folder_type_registry = e_storage_set_get_folder_type_registry (storage_set); - - folder = e_storage_set_get_folder (storage_set, - get_storage_set_path_from_uri (uri)); - - if (folder == NULL) - return NULL; - - type = e_folder_get_type_string (folder); - if (type == NULL) - return NULL; - - /* FIXME mini icons? */ - pixbuf = e_folder_type_registry_get_icon_for_type (folder_type_registry, type, FALSE); - if (pixbuf != NULL) - gdk_pixbuf_ref (pixbuf); - - return pixbuf; -} - - -static void -destroy (GtkObject *object) -{ - EShortcutsViewPrivate *priv; - EShortcutsView *shortcuts_view; - - shortcuts_view = E_SHORTCUTS_VIEW (object); - - priv = shortcuts_view->priv; - g_free (priv); - - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); -} - - -static void -selected_item (EShortcutBar *shortcut_bar, - GdkEvent *event, - int group_num, - int item_num) -{ - EShortcuts *shortcuts; - const char *uri; - - shortcuts = E_SHORTCUTS_VIEW (shortcut_bar)->priv->shortcuts; - - uri = e_shortcuts_get_uri (shortcuts, group_num, item_num); - - /* Lame EShortcutBar. This can happen. */ - if (uri == NULL) - return; - - gtk_signal_emit (GTK_OBJECT (shortcut_bar), signals[ACTIVATE_SHORTCUT], - shortcuts, uri); -} - - -static void -class_init (EShortcutsViewClass *klass) -{ - GtkObjectClass *object_class; - EShortcutBarClass *shortcut_bar_class; - - object_class = GTK_OBJECT_CLASS (klass); - object_class->destroy = destroy; - - shortcut_bar_class = E_SHORTCUT_BAR_CLASS (klass); - shortcut_bar_class->selected_item = selected_item; - - parent_class = gtk_type_class (e_shortcut_bar_get_type ()); - - signals[ACTIVATE_SHORTCUT] = - gtk_signal_new ("activate_shortcut", - GTK_RUN_LAST | GTK_RUN_ACTION, - object_class->type, - GTK_SIGNAL_OFFSET (EShortcutsViewClass, activate_shortcut), - gtk_marshal_NONE__POINTER_POINTER, - GTK_TYPE_NONE, 2, - GTK_TYPE_POINTER, - GTK_TYPE_STRING); - - gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); -} - -static void -init (EShortcutsView *shortcuts_view) -{ - EShortcutsViewPrivate *priv; - - priv = g_new (EShortcutsViewPrivate, 1); - priv->shortcuts = NULL; - - shortcuts_view->priv = priv; -} - - -void -e_shortcuts_view_construct (EShortcutsView *shortcuts_view, - EShortcuts *shortcuts) -{ - EShortcutsViewPrivate *priv; - - g_return_if_fail (shortcuts != NULL); - g_return_if_fail (E_IS_SHORTCUTS (shortcuts)); - - priv = shortcuts_view->priv; - - gtk_object_ref (GTK_OBJECT (shortcuts)); - priv->shortcuts = shortcuts; - - e_shortcut_bar_set_icon_callback (E_SHORTCUT_BAR (shortcuts_view), icon_callback, - shortcuts); - - load_all_shortcuts (shortcuts_view); -} - -GtkWidget * -e_shortcuts_view_new (EShortcuts *shortcuts) -{ - GtkWidget *new; - - g_return_val_if_fail (shortcuts != NULL, NULL); - g_return_val_if_fail (E_IS_SHORTCUTS (shortcuts), NULL); - - new = gtk_type_new (e_shortcuts_view_get_type ()); - e_shortcuts_view_construct (E_SHORTCUTS_VIEW (new), shortcuts); - - return new; -} - - -E_MAKE_TYPE (e_shortcuts_view, "EShortcutsView", EShortcutsView, class_init, init, PARENT_TYPE) diff --git a/shell/e-shortcuts-view.h b/shell/e-shortcuts-view.h deleted file mode 100644 index 8f6f8cb0af..0000000000 --- a/shell/e-shortcuts-view.h +++ /dev/null @@ -1,76 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-shortcuts-view.h - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -#ifndef _E_SHORTCUTS_VIEW_H_ -#define _E_SHORTCUTS_VIEW_H_ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include - -#include "shortcut-bar/e-shortcut-bar.h" -#include "e-shortcuts.h" - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus */ - -#define E_TYPE_SHORTCUTS_VIEW (e_shortcuts_view_get_type ()) -#define E_SHORTCUTS_VIEW(obj) (GTK_CHECK_CAST ((obj), E_TYPE_SHORTCUTS_VIEW, EShortcutsView)) -#define E_SHORTCUTS_VIEW_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_SHORTCUTS_VIEW, EShortcutsViewClass)) -#define E_IS_SHORTCUTS_VIEW(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_SHORTCUTS_VIEW)) -#define E_IS_SHORTCUTS_VIEW_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_SHORTCUTS_VIEW)) - - -typedef struct _EShortcutsView EShortcutsView; -typedef struct _EShortcutsViewPrivate EShortcutsViewPrivate; -typedef struct _EShortcutsViewClass EShortcutsViewClass; - -struct _EShortcutsView { - EShortcutBar parent; - - EShortcutsViewPrivate *priv; -}; - -struct _EShortcutsViewClass { - EShortcutBarClass parent_class; - - void (* activate_shortcut) (EShortcutsView *view, - EShortcuts *shortcuts, - const char *uri); -}; - - -GtkType e_shortcuts_view_get_type (void); -void e_shortcuts_view_construct (EShortcutsView *shortcuts_view, - EShortcuts *shortcuts); -GtkWidget *e_shortcuts_view_new (EShortcuts *shortcuts); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* _E_SHORTCUTS_VIEW_H_ */ diff --git a/shell/e-shortcuts.c b/shell/e-shortcuts.c deleted file mode 100644 index c6d8a77107..0000000000 --- a/shell/e-shortcuts.c +++ /dev/null @@ -1,477 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-shortcuts.c - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -/* The shortcut list goes this: - - - - - evolution:/local/Inbox - evolution:/local/Trash - evolution:/local/Calendar - - - - evolution:/local/Personal - - - - FIXME: Do we want to use a namespace for this? - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include - -#include -#include - -#include - -#include "e-util/e-util.h" -#include "e-util/e-xml-utils.h" - -#include "shortcut-bar/e-shortcut-bar.h" -#include "e-shortcuts-view.h" - -#include "e-shortcuts.h" - - -#define PARENT_TYPE GTK_TYPE_OBJECT -static GtkObjectClass *parent_class = NULL; - -struct _ShortcutGroup { - /* Title of the group. */ - char *title; - - /* A list of strings with the URI for the shortcut. */ - GList *shortcuts; -}; -typedef struct _ShortcutGroup ShortcutGroup; - -struct _EShortcutsPrivate { - /* The storage set to which these shortcuts are associated. */ - EStorageSet *storage_set; - - /* The folder type registry. */ - EFolderTypeRegistry *folder_type_registry; - - /* A list of ShortcutGroups. */ - GList *groups; - - /* A list of ShortcutViews. */ - GList *views; - - /* A hash table to get a group given its name. */ - GHashTable *title_to_group; -}; - - -static void -unload_shortcuts (EShortcuts *shortcuts) -{ - EShortcutsPrivate *priv; - GList *p, *q; - - priv = shortcuts->priv; - - for (p = priv->groups; p != NULL; p = p->next) { - ShortcutGroup *group; - - group = (ShortcutGroup *) p->data; - g_free (group->title); - - for (q = group->shortcuts; q != NULL; q = q->next) - g_free (q->data); - - g_list_free (group->shortcuts); - } - - if (priv->groups != NULL) - g_list_free (priv->groups); - - priv->groups = NULL; - - g_hash_table_destroy (priv->title_to_group); - priv->title_to_group = g_hash_table_new (g_str_hash, g_str_equal); - - /* FIXME update the views. */ -} - -static gboolean -load_shortcuts (EShortcuts *shortcuts, - const char *path) -{ - EShortcutsPrivate *priv; - xmlDoc *doc; - xmlNode *root; - xmlNode *p, *q; - - priv = shortcuts->priv; - - doc = xmlParseFile (path); - if (doc == NULL) - return FALSE; - - root = xmlDocGetRootElement (doc); - if (root == NULL || strcmp (root->name, "shortcuts") != 0) { - xmlFreeDoc (doc); - return FALSE; - } - - unload_shortcuts (shortcuts); - - for (p = root->childs; p != NULL; p = p->next) { - ShortcutGroup *shortcut_group; - char *shortcut_group_title; - - if (strcmp ((char *) p->name, "group") != 0) - continue; - - shortcut_group_title = (char *) xmlGetProp (p, "title"); - if (shortcut_group_title == NULL) - continue; - - shortcut_group = g_hash_table_lookup (priv->title_to_group, - shortcut_group_title); - if (shortcut_group != NULL) { - g_warning ("Duplicate shortcut title -- %s", - shortcut_group_title); - xmlFree (shortcut_group_title); - continue; - } - - shortcut_group = g_new (ShortcutGroup, 1); - shortcut_group->title = g_strdup (shortcut_group_title); - xmlFree (shortcut_group_title); - - shortcut_group->shortcuts = NULL; - for (q = p->childs; q != NULL; q = q->next) { - char *content; - - if (strcmp ((char *) q->name, "item") != 0) - continue; - - content = xmlNodeListGetString (doc, q->childs, 1); - shortcut_group->shortcuts = g_list_prepend (shortcut_group->shortcuts, - g_strdup (content)); - xmlFree (content); - } - shortcut_group->shortcuts = g_list_reverse (shortcut_group->shortcuts); - - priv->groups = g_list_prepend (priv->groups, shortcut_group); - g_hash_table_insert (priv->title_to_group, shortcut_group->title, shortcut_group); - } - - priv->groups = g_list_reverse (priv->groups); - - xmlFreeDoc (doc); - - return TRUE; -} - -static gboolean -save_shortcuts (EShortcuts *shortcuts, - const char *path) -{ - EShortcutsPrivate *priv; - xmlDoc *doc; - xmlNode *root; - GList *p, *q; - - priv = shortcuts->priv; - - doc = xmlNewDoc ((xmlChar *) "1.0"); - root = xmlNewDocNode (doc, NULL, (xmlChar *) "shortcuts", NULL); - xmlDocSetRootElement (doc, root); - - for (p = priv->groups; p != NULL; p = p->next) { - ShortcutGroup *group; - xmlNode *group_node; - - group = (ShortcutGroup *) p->data; - group_node = xmlNewChild (root, NULL, (xmlChar *) "group", NULL); - - xmlSetProp (group_node, (xmlChar *) "title", group->title); - - for (q = group->shortcuts; q != NULL; q = q->next) { - const char *shortcut; - - shortcut = (const char *) q->data; - xmlNewChild (group_node, NULL, (xmlChar *) "item", (xmlChar *) shortcut); - } - } - - if (xmlSaveFile (path, doc) < 0) { - xmlFreeDoc (doc); - return FALSE; - } - - xmlFreeDoc (doc); - return TRUE; -} - - -/* Signal handlers for the views. */ - -static void -view_destroyed_cb (GtkObject *object, - gpointer data) -{ - EShortcuts *shortcuts; - EShortcutsPrivate *priv; - - shortcuts = E_SHORTCUTS (data); - priv = shortcuts->priv; - - priv->views = g_list_remove (priv->views, object); -} - - -/* GtkObject methods. */ - -static void -destroy (GtkObject *object) -{ - EShortcuts *shortcuts; - EShortcutsPrivate *priv; - - shortcuts = E_SHORTCUTS (object); - priv = shortcuts->priv; - - if (priv->storage_set != NULL) - gtk_object_unref (GTK_OBJECT (priv->storage_set)); - - if (priv->folder_type_registry != NULL) - gtk_object_unref (GTK_OBJECT (priv->folder_type_registry)); - - unload_shortcuts (shortcuts); - - g_hash_table_destroy (priv->title_to_group); - - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); -} - - -static void -class_init (EShortcutsClass *klass) -{ - GtkObjectClass *object_class; - - object_class = (GtkObjectClass*) klass; - object_class->destroy = destroy; - - parent_class = gtk_type_class (gtk_object_get_type ()); -} - - -static void -init (EShortcuts *shortcuts) -{ - EShortcutsPrivate *priv; - - priv = g_new (EShortcutsPrivate, 1); - - priv->storage_set = NULL; - priv->groups = NULL; - priv->views = NULL; - priv->title_to_group = g_hash_table_new (g_str_hash, g_str_equal); - - shortcuts->priv = priv; -} - - -void -e_shortcuts_construct (EShortcuts *shortcuts, - EStorageSet *storage_set, - EFolderTypeRegistry *folder_type_registry) -{ - EShortcutsPrivate *priv; - - g_return_if_fail (shortcuts != NULL); - g_return_if_fail (E_IS_SHORTCUTS (shortcuts)); - g_return_if_fail (storage_set != NULL); - g_return_if_fail (E_IS_STORAGE_SET (storage_set)); - - GTK_OBJECT_UNSET_FLAGS (GTK_OBJECT (storage_set), GTK_FLOATING); - - priv = shortcuts->priv; - - gtk_object_ref (GTK_OBJECT (storage_set)); - priv->storage_set = storage_set; - - gtk_object_ref (GTK_OBJECT (folder_type_registry)); - priv->folder_type_registry = folder_type_registry; -} - -EShortcuts * -e_shortcuts_new (EStorageSet *storage_set, - EFolderTypeRegistry *folder_type_registry) -{ - EShortcuts *new; - - g_return_val_if_fail (storage_set != NULL, NULL); - g_return_val_if_fail (E_IS_STORAGE_SET (storage_set), NULL); - - new = gtk_type_new (e_shortcuts_get_type ()); - e_shortcuts_construct (new, storage_set, folder_type_registry); - - return new; -} - - -GList * -e_shortcuts_get_group_titles (EShortcuts *shortcuts) -{ - EShortcutsPrivate *priv; - ShortcutGroup *group; - GList *list; - GList *p; - - g_return_val_if_fail (shortcuts != NULL, NULL); - g_return_val_if_fail (E_IS_SHORTCUTS (shortcuts), NULL); - - priv = shortcuts->priv; - - list = NULL; - - for (p = priv->groups; p != NULL; p = p->next) { - group = (ShortcutGroup *) p->data; - list = g_list_prepend (list, g_strdup (group->title)); - } - - return g_list_reverse (list); -} - -GList * -e_shortcuts_get_shortcuts_in_group (EShortcuts *shortcuts, - const char *group_title) -{ - EShortcutsPrivate *priv; - ShortcutGroup *shortcut_group; - GList *list; - GList *p; - - priv = shortcuts->priv; - - g_return_val_if_fail (shortcuts != NULL, NULL); - g_return_val_if_fail (E_IS_SHORTCUTS (shortcuts), NULL); - g_return_val_if_fail (group_title != NULL, NULL); - - shortcut_group = g_hash_table_lookup (priv->title_to_group, group_title); - if (shortcut_group == NULL) - return NULL; - - list = NULL; - - for (p = shortcut_group->shortcuts; p != NULL; p = p->next) - list = g_list_prepend (list, g_strdup ((const char *) p->data)); - - return g_list_reverse (list); -} - - -EStorageSet * -e_shortcuts_get_storage_set (EShortcuts *shortcuts) -{ - g_return_val_if_fail (shortcuts != NULL, NULL); - g_return_val_if_fail (E_IS_SHORTCUTS (shortcuts), NULL); - - return shortcuts->priv->storage_set; -} - - -GtkWidget * -e_shortcuts_new_view (EShortcuts *shortcuts) -{ - EShortcutsPrivate *priv; - GtkWidget *new; - - g_return_val_if_fail (shortcuts != NULL, NULL); - g_return_val_if_fail (E_IS_SHORTCUTS (shortcuts), NULL); - - priv = shortcuts->priv; - - new = e_shortcuts_view_new (shortcuts); - priv->views = g_list_prepend (priv->views, new); - - gtk_signal_connect (GTK_OBJECT (new), "destroy", view_destroyed_cb, shortcuts); - - return new; -} - - -gboolean -e_shortcuts_load (EShortcuts *shortcuts, - const char *path) -{ - g_return_val_if_fail (shortcuts != NULL, FALSE); - g_return_val_if_fail (E_IS_SHORTCUTS (shortcuts), FALSE); - g_return_val_if_fail (path != NULL, FALSE); - g_return_val_if_fail (g_path_is_absolute (path), FALSE); - - return load_shortcuts (shortcuts, path); -} - -gboolean -e_shortcuts_save (EShortcuts *shortcuts, - const char *path) -{ - g_return_val_if_fail (shortcuts != NULL, FALSE); - g_return_val_if_fail (E_IS_SHORTCUTS (shortcuts), FALSE); - g_return_val_if_fail (path != NULL, FALSE); - g_return_val_if_fail (g_path_is_absolute (path), FALSE); - - return save_shortcuts (shortcuts, path); -} - - -const char * -e_shortcuts_get_uri (EShortcuts *shortcuts, int group_num, int num) -{ - EShortcutsPrivate *priv; - ShortcutGroup *group; - GList *shortcut_element; - - g_return_val_if_fail (shortcuts != NULL, NULL); - g_return_val_if_fail (E_IS_SHORTCUTS (shortcuts), NULL); - - priv = shortcuts->priv; - - group = g_list_nth (priv->groups, group_num)->data; - if (group == NULL) - return NULL; - - shortcut_element = g_list_nth (group->shortcuts, num); - if (shortcut_element == NULL) - return NULL; - - return shortcut_element->data; -} - - -E_MAKE_TYPE (e_shortcuts, "EShortcuts", EShortcuts, class_init, init, PARENT_TYPE) - diff --git a/shell/e-shortcuts.h b/shell/e-shortcuts.h deleted file mode 100644 index 63c897ece0..0000000000 --- a/shell/e-shortcuts.h +++ /dev/null @@ -1,88 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-shortcuts.h - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -#ifndef _E_SHORTCUTS_H_ -#define _E_SHORTCUTS_H_ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include - -#include "e-folder-type-registry.h" -#include "e-storage-set.h" - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus */ - -#define E_TYPE_SHORTCUTS (e_shortcuts_get_type ()) -#define E_SHORTCUTS(obj) (GTK_CHECK_CAST ((obj), E_TYPE_SHORTCUTS, EShortcuts)) -#define E_SHORTCUTS_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_SHORTCUTS, EShortcutsClass)) -#define E_IS_SHORTCUTS(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_SHORTCUTS)) -#define E_IS_SHORTCUTS_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_SHORTCUTS)) - - -typedef struct _EShortcuts EShortcuts; -typedef struct _EShortcutsPrivate EShortcutsPrivate; -typedef struct _EShortcutsClass EShortcutsClass; - -struct _EShortcuts { - GtkObject parent; - - EShortcutsPrivate *priv; -}; - -struct _EShortcutsClass { - GtkObjectClass parent_class; -}; - - -GtkType e_shortcuts_get_type (void); -void e_shortcuts_construct (EShortcuts *shortcuts, - EStorageSet *storage_set, - EFolderTypeRegistry *folder_type_registry); -EShortcuts *e_shortcuts_new (EStorageSet *storage_set, - EFolderTypeRegistry *folder_type_registry); - -GList *e_shortcuts_get_group_titles (EShortcuts *shortcuts); -GList *e_shortcuts_get_shortcuts_in_group (EShortcuts *shortcuts, - const char *group_title); -EStorageSet *e_shortcuts_get_storage_set (EShortcuts *shortcuts); -GtkWidget *e_shortcuts_new_view (EShortcuts *shortcuts); -gboolean e_shortcuts_load (EShortcuts *shortcuts, - const char *path); -gboolean e_shortcuts_save (EShortcuts *shortcuts, - const char *path); - -const char *e_shortcuts_get_uri (EShortcuts *shortcuts, - int group_num, - int num); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* _E_SHORTCUTS_H_ */ diff --git a/shell/e-storage-set-view.c b/shell/e-storage-set-view.c deleted file mode 100644 index 95559e184a..0000000000 --- a/shell/e-storage-set-view.c +++ /dev/null @@ -1,838 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-storage-set-view.c - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include - -#include "e-util/e-util.h" -#include "e-shell-constants.h" - -#include "e-storage-set-view.h" - - -#define PARENT_TYPE GTK_TYPE_CTREE -static GtkCTreeClass *parent_class = NULL; - -struct _EStorageSetViewPrivate { - EStorageSet *storage_set; - - /* These tables must always be kept in sync, and one cannot exist - without the other, as they share the dynamically allocated path. */ - GHashTable *ctree_node_to_path; - GHashTable *path_to_ctree_node; - - /* Path of the row selected by the latest "tree_select_row" signal. */ - const char *selected_row_path; - - /* Path of the row currently being dragged. */ - const char *dragged_row_path; - - /* Path of the row that was selected before the latest click. */ - const char *selected_row_path_before_click; - - /* Whether we are currently performing a drag from this view. */ - int in_drag : 1; - - /* Button used for the drag. This is initialized in the `button_press_event' - handler. */ - int drag_button; -}; - - -enum { - FOLDER_SELECTED, - LAST_SIGNAL -}; - -static guint signals[LAST_SIGNAL] = { 0 }; - - -/* DND stuff. */ - -enum _DndTargetType { - DND_TARGET_TYPE_URI_LIST, - DND_TARGET_TYPE_E_SHORTCUT -}; -typedef enum _DndTargetType DndTargetType; - -#define URI_LIST_TYPE "text/uri-list" -#define E_SHORTCUT_TYPE "E-SHORTCUT" - -static GtkTargetEntry drag_types [] = { - { URI_LIST_TYPE, 0, DND_TARGET_TYPE_URI_LIST }, - { E_SHORTCUT_TYPE, 0, DND_TARGET_TYPE_E_SHORTCUT } -}; -static const int num_drag_types = sizeof (drag_types) / sizeof (drag_types[0]); - -static GtkTargetList *target_list; - - -/* Helper functions. */ - -static gboolean -add_node_to_hashes (EStorageSetView *storage_set_view, - const char *path, - GtkCTreeNode *node) -{ - EStorageSetViewPrivate *priv; - char *hash_path; - - g_return_val_if_fail (g_path_is_absolute (path), FALSE); - - priv = storage_set_view->priv; - - if (g_hash_table_lookup (priv->path_to_ctree_node, path) != NULL) { - g_warning ("EStorageSetView: Node already existing while adding -- %s", path); - return FALSE; - } - - g_print ("EStorageSetView: Adding -- %s\n", path); - - hash_path = g_strdup (path); - - g_hash_table_insert (priv->path_to_ctree_node, hash_path, node); - g_hash_table_insert (priv->ctree_node_to_path, node, hash_path); - - return TRUE; -} - -static GtkCTreeNode * -remove_node_from_hashes (EStorageSetView *storage_set_view, - const char *path) -{ - EStorageSetViewPrivate *priv; - GtkCTreeNode *node; - char *hash_path; - - priv = storage_set_view->priv; - - node = g_hash_table_lookup (priv->path_to_ctree_node, path); - if (node == NULL) { - g_warning ("EStorageSetView: Node not found while removing -- %s", path); - return NULL; - } - - g_print ("EStorageSetView: Removing -- %s\n", path); - - hash_path = g_hash_table_lookup (priv->ctree_node_to_path, node); - g_free (hash_path); - - g_hash_table_remove (priv->ctree_node_to_path, node); - g_hash_table_remove (priv->path_to_ctree_node, path); - - return node; -} - -static void -get_pixmap_and_mask_for_folder (EStorageSetView *storage_set_view, - EFolder *folder, - GdkPixmap **pixmap_return, - GdkBitmap **mask_return) -{ - EFolderTypeRegistry *folder_type_registry; - EStorageSet *storage_set; - const char *type_name; - GdkPixbuf *icon_pixbuf; - GdkPixbuf *scaled_pixbuf; - GdkVisual *visual; - GdkGC *gc; - - storage_set = storage_set_view->priv->storage_set; - folder_type_registry = e_storage_set_get_folder_type_registry (storage_set); - - type_name = e_folder_get_type_string (folder); - icon_pixbuf = e_folder_type_registry_get_icon_for_type (folder_type_registry, - type_name, TRUE); - - if (icon_pixbuf == NULL) { - *pixmap_return = NULL; - *mask_return = NULL; - return; - } - - scaled_pixbuf = gdk_pixbuf_new (gdk_pixbuf_get_colorspace (icon_pixbuf), - gdk_pixbuf_get_has_alpha (icon_pixbuf), - gdk_pixbuf_get_bits_per_sample (icon_pixbuf), - E_SHELL_MINI_ICON_SIZE, E_SHELL_MINI_ICON_SIZE); - - gdk_pixbuf_scale (icon_pixbuf, scaled_pixbuf, - 0, 0, E_SHELL_MINI_ICON_SIZE, E_SHELL_MINI_ICON_SIZE, - 0.0, 0.0, - (double) E_SHELL_MINI_ICON_SIZE / gdk_pixbuf_get_width (icon_pixbuf), - (double) E_SHELL_MINI_ICON_SIZE / gdk_pixbuf_get_height (icon_pixbuf), - GDK_INTERP_HYPER); - - visual = gdk_rgb_get_visual (); - *pixmap_return = gdk_pixmap_new (NULL, - E_SHELL_MINI_ICON_SIZE, E_SHELL_MINI_ICON_SIZE, - visual->depth); - - gc = gdk_gc_new (*pixmap_return); - gdk_pixbuf_render_to_drawable (scaled_pixbuf, *pixmap_return, gc, 0, 0, 0, 0, - E_SHELL_MINI_ICON_SIZE, E_SHELL_MINI_ICON_SIZE, - GDK_RGB_DITHER_NORMAL, 0, 0); - gdk_gc_unref (gc); - - *mask_return = gdk_pixmap_new (NULL, E_SHELL_MINI_ICON_SIZE, E_SHELL_MINI_ICON_SIZE, 1); - gdk_pixbuf_render_threshold_alpha (scaled_pixbuf, *mask_return, - 0, 0, 0, 0, - E_SHELL_MINI_ICON_SIZE, E_SHELL_MINI_ICON_SIZE, - 0x7f); - - gdk_pixbuf_unref (scaled_pixbuf); -} - - -/* GtkObject methods. */ - -static void -hash_foreach_free_path (gpointer key, - gpointer value, - gpointer data) -{ - g_free (value); -} - -static void -destroy (GtkObject *object) -{ - EStorageSetView *storage_set_view; - EStorageSetViewPrivate *priv; - - storage_set_view = E_STORAGE_SET_VIEW (object); - priv = storage_set_view->priv; - - gtk_object_unref (GTK_OBJECT (priv->storage_set)); - - g_hash_table_foreach (priv->ctree_node_to_path, hash_foreach_free_path, NULL); - g_hash_table_destroy (priv->ctree_node_to_path); - g_hash_table_destroy (priv->path_to_ctree_node); - - g_free (priv); - - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); -} - - -/* GtkWidget methods. */ - -static int -button_press_event (GtkWidget *widget, - GdkEventButton *event) -{ - EStorageSetView *storage_set_view; - EStorageSetViewPrivate *priv; - - storage_set_view = E_STORAGE_SET_VIEW (widget); - priv = storage_set_view->priv; - - priv->selected_row_path_before_click = priv->selected_row_path; - - (* GTK_WIDGET_CLASS (parent_class)->button_press_event) (widget, event); - - if (priv->in_drag) - return FALSE; - - priv->drag_button = event->button; - - /* KLUDGE ALERT. So look at this. We need to grab the pointer now, to check for - motion events and maybe start a drag operation. And GtkCTree seems to do it - already in the `button_press_event'. *But* for some reason something is very - broken somewhere and the grab misbehaves when done by GtkCTree's - `button_press_event'. So we have to ungrab the pointer and re-grab it our way. - Weee! */ - - gdk_pointer_ungrab (GDK_CURRENT_TIME); - gdk_flush (); - gtk_grab_remove (widget); - - gdk_pointer_grab (GTK_CLIST (widget)->clist_window, FALSE, - GDK_POINTER_MOTION_MASK | GDK_BUTTON_RELEASE_MASK, - NULL, NULL, event->time); - gtk_grab_add (widget); - - return TRUE; -} - -static int -motion_notify_event (GtkWidget *widget, - GdkEventMotion *event) -{ - EStorageSetView *storage_set_view; - EStorageSetViewPrivate *priv; - - if (event->window != GTK_CLIST (widget)->clist_window) - return (* GTK_WIDGET_CLASS (parent_class)->motion_notify_event) (widget, event); - - storage_set_view = E_STORAGE_SET_VIEW (widget); - priv = storage_set_view->priv; - - if (priv->in_drag || priv->drag_button == 0) - return FALSE; - - priv->in_drag = TRUE; - priv->dragged_row_path = priv->selected_row_path; - - gtk_drag_begin (widget, target_list, GDK_ACTION_MOVE, - priv->drag_button, (GdkEvent *) event); - - return TRUE; -} - -static int -button_release_event (GtkWidget *widget, - GdkEventButton *event) -{ - EStorageSetView *storage_set_view; - EStorageSetViewPrivate *priv; - - if (event->window != GTK_CLIST (widget)->clist_window) - return (* GTK_WIDGET_CLASS (parent_class)->button_release_event) (widget, event); - - storage_set_view = E_STORAGE_SET_VIEW (widget); - priv = storage_set_view->priv; - - if (! priv->in_drag && priv->selected_row_path != NULL) { - gdk_pointer_ungrab (GDK_CURRENT_TIME); - gtk_grab_remove (widget); - gdk_flush (); - - gtk_signal_emit (GTK_OBJECT (widget), signals[FOLDER_SELECTED], - priv->selected_row_path); - priv->selected_row_path = NULL; - } - - priv->selected_row_path_before_click = NULL; - - return TRUE; -} - -static void -drag_end (GtkWidget *widget, - GdkDragContext *context) -{ - EStorageSetView *storage_set_view; - EStorageSetViewPrivate *priv; - - storage_set_view = E_STORAGE_SET_VIEW (widget); - priv = storage_set_view->priv; - - if (priv->dragged_row_path != NULL) - e_storage_set_view_set_current_folder (storage_set_view, - priv->selected_row_path_before_click); - - priv->in_drag = FALSE; - priv->drag_button = 0; - priv->dragged_row_path = NULL; -} - -static void -set_uri_list_selection (EStorageSetView *storage_set_view, - GtkSelectionData *selection_data) -{ - EStorageSetViewPrivate *priv; - char *uri_list; - - priv = storage_set_view->priv; - - /* FIXME: Get `evolution:' from somewhere instead of hardcoding it here. */ - uri_list = g_strconcat ("evolution:", priv->selected_row_path, "\n", NULL); - gtk_selection_data_set (selection_data, selection_data->target, - 8, (guchar *) uri_list, strlen (uri_list)); - g_free (uri_list); -} - -static void -set_e_shortcut_selection (EStorageSetView *storage_set_view, - GtkSelectionData *selection_data) -{ - EStorageSetViewPrivate *priv; - int shortcut_len; - char *shortcut; - const char *trailing_slash; - const char *name; - - priv = storage_set_view->priv; - - trailing_slash = strrchr (priv->selected_row_path, '/'); - if (trailing_slash == NULL) - name = NULL; - else - name = trailing_slash + 1; - - /* FIXME: Get `evolution:' from somewhere instead of hardcoding it here. */ - - if (name != NULL) - shortcut_len = strlen (name); - else - shortcut_len = 0; - - shortcut_len ++; /* Separating zero. */ - - shortcut_len += strlen ("evolution:"); - shortcut_len += strlen (priv->selected_row_path); - shortcut_len ++; /* Trailing zero. */ - - shortcut = g_malloc (shortcut_len); - - if (name == NULL) - sprintf (shortcut, "%cevolution:%s", '\0', priv->selected_row_path); - else - sprintf (shortcut, "%s%cevolution:%s", name, '\0', priv->selected_row_path); - - gtk_selection_data_set (selection_data, selection_data->target, - 8, (guchar *) shortcut, shortcut_len); - - g_free (shortcut); -} - -static void -drag_data_get (GtkWidget *widget, - GdkDragContext *context, - GtkSelectionData *selection_data, - guint info, - guint32 time) -{ - EStorageSetView *storage_set_view; - - storage_set_view = E_STORAGE_SET_VIEW (widget); - - switch (info) { - case DND_TARGET_TYPE_URI_LIST: - set_uri_list_selection (storage_set_view, selection_data); - break; - case DND_TARGET_TYPE_E_SHORTCUT: - set_e_shortcut_selection (storage_set_view, selection_data); - break; - default: - g_assert_not_reached (); - } -} - - -/* StorageSet signal handling. */ - -static void -new_storage_cb (EStorageSet *storage_set, - EStorage *storage, - void *data) -{ - EStorageSetView *storage_set_view; - EStorageSetViewPrivate *priv; - GtkCTreeNode *node; - char *text[2]; - char *path; - - storage_set_view = E_STORAGE_SET_VIEW (data); - priv = storage_set_view->priv; - - path = g_strconcat (G_DIR_SEPARATOR_S, e_storage_get_name (storage), NULL); - - text[0] = (char *) e_storage_get_name (storage); /* Yuck. */ - text[1] = NULL; - - node = gtk_ctree_insert_node (GTK_CTREE (storage_set_view), NULL, NULL, - text, 3, NULL, NULL, NULL, NULL, FALSE, TRUE); - - if (! add_node_to_hashes (storage_set_view, path, node)) { - g_free (path); - gtk_ctree_remove_node (GTK_CTREE (storage_set_view), node); - return; - } - - g_free (path); - - /* FIXME: We want a more specialized sort, e.g. the local folders should always be - on top. */ - gtk_ctree_sort_node (GTK_CTREE (storage_set_view), NULL); -} - -static void -removed_storage_cb (EStorageSet *storage_set, - EStorage *storage, - void *data) -{ - EStorageSetView *storage_set_view; - EStorageSetViewPrivate *priv; - GtkCTreeNode *node; - char *path; - - storage_set_view = E_STORAGE_SET_VIEW (data); - priv = storage_set_view->priv; - - path = g_strconcat (G_DIR_SEPARATOR_S, e_storage_get_name (storage), NULL); - node = remove_node_from_hashes (storage_set_view, path); - g_free (path); - - gtk_ctree_remove_node (GTK_CTREE (storage_set_view), node); -} - -static void -new_folder_cb (EStorageSet *storage_set, - const char *path, - void *data) -{ - EStorageSetView *storage_set_view; - EStorageSetViewPrivate *priv; - GtkCTreeNode *parent_node; - GtkCTreeNode *node; - GdkPixmap *pixmap; - GdkBitmap *mask; - char *text[2]; - const char *last_separator; - char *parent_path; - - g_return_if_fail (g_path_is_absolute (path)); - - storage_set_view = E_STORAGE_SET_VIEW (data); - priv = storage_set_view->priv; - - last_separator = strrchr (path, G_DIR_SEPARATOR); - - parent_path = g_strndup (path, last_separator - path); - parent_node = g_hash_table_lookup (priv->path_to_ctree_node, parent_path); - if (parent_node == NULL) { - g_print ("EStorageSetView: EStorageSet reported new subfolder for non-existing folder -- %s\n", - parent_path); - g_free (parent_path); - return; - } - - g_free (parent_path); - - if (parent_node == NULL) - return; - - text[0] = (char *) last_separator + 1; /* Yuck. */ - text[1] = NULL; - - get_pixmap_and_mask_for_folder (storage_set_view, - e_storage_set_get_folder (storage_set, path), - &pixmap, &mask); - node = gtk_ctree_insert_node (GTK_CTREE (storage_set_view), - parent_node, NULL, - text, 3, - pixmap, mask, pixmap, mask, - FALSE, TRUE); - - if (! add_node_to_hashes (storage_set_view, path, node)) { - gtk_ctree_remove_node (GTK_CTREE (storage_set_view), node); - return; - } - - gtk_ctree_sort_node (GTK_CTREE (storage_set_view), parent_node); -} - -static void -removed_folder_cb (EStorageSet *storage_set, - const char *path, - void *data) -{ - EStorageSetView *storage_set_view; - GtkCTreeNode *node; - - storage_set_view = E_STORAGE_SET_VIEW (data); - - node = remove_node_from_hashes (storage_set_view, path); - gtk_ctree_remove_node (GTK_CTREE (storage_set_view), node); -} - - -/* GtkCTree methods. */ - -static void -tree_select_row (GtkCTree *ctree, - GtkCTreeNode *row, - gint column) -{ - EStorageSetView *storage_set_view; - EStorageSetViewPrivate *priv; - const char *path; - - (* GTK_CTREE_CLASS (parent_class)->tree_select_row) (ctree, row, column); - - storage_set_view = E_STORAGE_SET_VIEW (ctree); - priv = storage_set_view->priv; - - path = g_hash_table_lookup (storage_set_view->priv->ctree_node_to_path, row); - if (path == NULL) - return; - - priv->selected_row_path = path; -} - - -static void -class_init (EStorageSetViewClass *klass) -{ - GtkObjectClass *object_class; - GtkWidgetClass *widget_class; - GtkCTreeClass *ctree_class; - - parent_class = gtk_type_class (gtk_ctree_get_type ()); - - object_class = GTK_OBJECT_CLASS (klass); - object_class->destroy = destroy; - - widget_class = GTK_WIDGET_CLASS (klass); - widget_class->button_press_event = button_press_event; - widget_class->motion_notify_event = motion_notify_event; - widget_class->button_release_event = button_release_event; - widget_class->drag_end = drag_end; - widget_class->drag_data_get = drag_data_get; - - ctree_class = GTK_CTREE_CLASS (klass); - ctree_class->tree_select_row = tree_select_row; - - signals[FOLDER_SELECTED] - = gtk_signal_new ("folder_selected", - GTK_RUN_FIRST, - object_class->type, - GTK_SIGNAL_OFFSET (EStorageSetViewClass, folder_selected), - gtk_marshal_NONE__STRING, - GTK_TYPE_NONE, 1, - GTK_TYPE_STRING); - - gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); - - /* Set up DND. */ - - target_list = gtk_target_list_new (drag_types, num_drag_types); - g_assert (target_list != NULL); -} - -static void -init (EStorageSetView *storage_set_view) -{ - EStorageSetViewPrivate *priv; - - /* Avoid GtkCTree's broken focusing behavior. FIXME: Other ways? */ - GTK_WIDGET_UNSET_FLAGS (storage_set_view, GTK_CAN_FOCUS); - - priv = g_new (EStorageSetViewPrivate, 1); - - priv->storage_set = NULL; - priv->ctree_node_to_path = g_hash_table_new (g_direct_hash, g_direct_equal); - priv->path_to_ctree_node = g_hash_table_new (g_str_hash, g_str_equal); - priv->selected_row_path = NULL; - priv->dragged_row_path = NULL; - priv->selected_row_path_before_click = NULL; - priv->in_drag = FALSE; - - storage_set_view->priv = priv; -} - - -static int -folder_compare_cb (gconstpointer a, gconstpointer b) -{ - EFolder *folder_a; - EFolder *folder_b; - const char *name_a; - const char *name_b; - - folder_a = E_FOLDER (a); - folder_b = E_FOLDER (b); - - name_a = e_folder_get_name (folder_a); - name_b = e_folder_get_name (folder_b); - - return strcmp (name_a, name_b); -} - -static void -insert_folders (EStorageSetView *storage_set_view, - GtkCTreeNode *parent, - EStorage *storage, - const char *path, - int level) -{ - EStorageSetViewPrivate *priv; - GtkCTree *ctree; - GtkCTreeNode *node; - GList *folder_list; - GList *p; - const char *storage_name; - - ctree = GTK_CTREE (storage_set_view); - priv = storage_set_view->priv; - - storage_name = e_storage_get_name (storage); - - folder_list = e_storage_list_folders (storage, path); - if (folder_list == NULL) - return; - - folder_list = g_list_sort (folder_list, folder_compare_cb); - - for (p = folder_list; p != NULL; p = p->next) { - EFolder *folder; - const char *folder_name; - char *text[2]; - char *subpath; - char *full_path; - GdkPixmap *pixmap; - GdkBitmap *mask; - - folder = E_FOLDER (p->data); - folder_name = e_folder_get_name (folder); - - text[0] = (char *) folder_name; /* Yuck. */ - text[1] = NULL; - - get_pixmap_and_mask_for_folder (storage_set_view, folder, &pixmap, &mask); - node = gtk_ctree_insert_node (ctree, parent, NULL, - text, 3, - pixmap, mask, pixmap, mask, - FALSE, TRUE); - - subpath = g_concat_dir_and_file (path, folder_name); - insert_folders (storage_set_view, node, storage, subpath, level + 1); - - full_path = g_strconcat("/", storage_name, subpath, NULL); - g_hash_table_insert (priv->ctree_node_to_path, node, full_path); - g_hash_table_insert (priv->path_to_ctree_node, full_path, node); - - g_free (subpath); - } - - e_free_object_list (folder_list); -} - -void -e_storage_set_view_construct (EStorageSetView *storage_set_view, - EStorageSet *storage_set) -{ - EStorageSetViewPrivate *priv; - GtkCTreeNode *parent; - GtkCTree *ctree; - EStorage *storage; - GList *storage_list; - GList *p; - const char *name; - char *text[2]; - char *path; - - g_return_if_fail (storage_set_view != NULL); - g_return_if_fail (E_IS_STORAGE_SET_VIEW (storage_set_view)); - g_return_if_fail (storage_set != NULL); - g_return_if_fail (E_IS_STORAGE_SET (storage_set)); - - ctree = GTK_CTREE (storage_set_view); - - /* Set up GtkCTree/GtkCList parameters. */ - gtk_ctree_construct (ctree, 1, 0, NULL); - - gtk_ctree_set_line_style (ctree, GTK_CTREE_LINES_DOTTED); - gtk_ctree_set_expander_style (ctree, GTK_CTREE_EXPANDER_SQUARE); - gtk_clist_set_selection_mode (GTK_CLIST (ctree), GTK_SELECTION_BROWSE); - gtk_clist_set_row_height (GTK_CLIST (ctree), E_SHELL_MINI_ICON_SIZE); - - priv = storage_set_view->priv; - - gtk_object_ref (GTK_OBJECT (storage_set)); - priv->storage_set = storage_set; - - gtk_signal_connect (GTK_OBJECT (storage_set), "new_storage", - GTK_SIGNAL_FUNC (new_storage_cb), storage_set_view); - gtk_signal_connect (GTK_OBJECT (storage_set), "removed_storage", - GTK_SIGNAL_FUNC (removed_storage_cb), storage_set_view); - gtk_signal_connect (GTK_OBJECT (storage_set), "new_folder", - GTK_SIGNAL_FUNC (new_folder_cb), storage_set_view); - gtk_signal_connect (GTK_OBJECT (storage_set), "removed_folder", - GTK_SIGNAL_FUNC (removed_folder_cb), storage_set_view); - - storage_list = e_storage_set_get_storage_list (storage_set); - - text[1] = NULL; - - for (p = storage_list; p != NULL; p = p->next) { - storage = E_STORAGE (p->data); - - name = e_storage_get_name (storage); - text[0] = (char *) name; /* Yuck. */ - - parent = gtk_ctree_insert_node (ctree, NULL, NULL, - text, 3, - NULL, NULL, NULL, NULL, - FALSE, TRUE); - - path = g_strconcat ("/", name, NULL); - g_hash_table_insert (priv->ctree_node_to_path, parent, path); - g_hash_table_insert (priv->path_to_ctree_node, parent, path); - - insert_folders (storage_set_view, parent, storage, "/", 1); - } - - e_free_object_list (storage_list); -} - -GtkWidget * -e_storage_set_view_new (EStorageSet *storage_set) -{ - GtkWidget *new; - - g_return_val_if_fail (storage_set != NULL, NULL); - g_return_val_if_fail (E_IS_STORAGE_SET (storage_set), NULL); - - new = gtk_type_new (e_storage_set_view_get_type ()); - e_storage_set_view_construct (E_STORAGE_SET_VIEW (new), storage_set); - - return new; -} - - -void -e_storage_set_view_set_current_folder (EStorageSetView *storage_set_view, - const char *path) -{ - EStorageSetViewPrivate *priv; - GtkCTreeNode *node; - - g_return_if_fail (storage_set_view != NULL); - g_return_if_fail (E_IS_STORAGE_SET_VIEW (storage_set_view)); - g_return_if_fail (path == NULL || g_path_is_absolute (path)); - - priv = storage_set_view->priv; - - if (path == NULL) { - gtk_clist_unselect_all (GTK_CLIST (storage_set_view)); - return; - } - - node = g_hash_table_lookup (priv->path_to_ctree_node, path); - if (node == NULL) { - gtk_clist_unselect_all (GTK_CLIST (storage_set_view)); - return; - } - - gtk_ctree_select (GTK_CTREE (storage_set_view), node); - - gtk_signal_emit (GTK_OBJECT (storage_set_view), signals[FOLDER_SELECTED], path); -} - - -E_MAKE_TYPE (e_storage_set_view, "EStorageSetView", EStorageSetView, class_init, init, PARENT_TYPE) diff --git a/shell/e-storage-set-view.h b/shell/e-storage-set-view.h deleted file mode 100644 index d865eb426c..0000000000 --- a/shell/e-storage-set-view.h +++ /dev/null @@ -1,78 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-storage-set-view.h - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -#ifndef __E_STORAGE_SET_VIEW_H__ -#define __E_STORAGE_SET_VIEW_H__ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include "e-storage-set.h" - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus */ - -#define E_TYPE_STORAGE_SET_VIEW (e_storage_set_view_get_type ()) -#define E_STORAGE_SET_VIEW(obj) (GTK_CHECK_CAST ((obj), E_TYPE_STORAGE_SET_VIEW, EStorageSetView)) -#define E_STORAGE_SET_VIEW_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_STORAGE_SET_VIEW, EStorageSetViewClass)) -#define E_IS_STORAGE_SET_VIEW(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_STORAGE_SET_VIEW)) -#define E_IS_STORAGE_SET_VIEW_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_STORAGE_SET_VIEW)) - - -typedef struct _EStorageSetView EStorageSetView; -typedef struct _EStorageSetViewPrivate EStorageSetViewPrivate; -typedef struct _EStorageSetViewClass EStorageSetViewClass; - -struct _EStorageSetView { - GtkCTree parent; - - EStorageSetViewPrivate *priv; -}; - -struct _EStorageSetViewClass { - GtkCTreeClass parent_class; - - /* Signals. */ - - void (* folder_selected) (EStorageSetView *storage_set_view, - const char *uri); -}; - - -GtkType e_storage_set_view_get_type (void); -GtkWidget *e_storage_set_view_new (EStorageSet *storage_set); -void e_storage_set_view_construct (EStorageSetView *storage_set_view, - EStorageSet *storage_set); -void e_storage_set_view_set_current_folder (EStorageSetView *storage_set_view, - const char *path); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -#endif /* __E_STORAGE_SET_VIEW_H__ */ diff --git a/shell/e-storage-set.c b/shell/e-storage-set.c deleted file mode 100644 index 7a71f518fe..0000000000 --- a/shell/e-storage-set.c +++ /dev/null @@ -1,424 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-storage-set.c - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include -#include - -#include - -#include "e-util/e-util.h" - -#include "e-storage-set-view.h" -#include "e-storage-set.h" - - -#define PARENT_TYPE GTK_TYPE_OBJECT - -static GtkObjectClass *parent_class = NULL; - -/* This is just to make GHashTable happy. */ -struct _NamedStorage { - char *name; - EStorage *storage; -}; -typedef struct _NamedStorage NamedStorage; - -struct _EStorageSetPrivate { - GList *storages; - GHashTable *name_to_named_storage; - - EFolderTypeRegistry *folder_type_registry; -}; - -enum { - NEW_STORAGE, - REMOVED_STORAGE, - NEW_FOLDER, - REMOVED_FOLDER, - LAST_SIGNAL -}; - -static guint signals[LAST_SIGNAL] = { 0 }; - - -static NamedStorage * -named_storage_new (EStorage *storage) -{ - NamedStorage *new; - - new = g_new (NamedStorage, 1); - new->name = g_strdup (e_storage_get_name (storage)); - new->storage = storage; - - return new; -} - -static void -named_storage_destroy (NamedStorage *named_storage) -{ - g_free (named_storage->name); - g_free (named_storage); -} - - -/* Handling for signals coming from the EStorages. */ - -static char * -make_full_path (EStorage *storage, - const char *path) -{ - const char *storage_name; - char *full_path; - - storage_name = e_storage_get_name (storage); - - if (! g_path_is_absolute (path)) - full_path = g_strconcat (G_DIR_SEPARATOR_S, storage_name, - G_DIR_SEPARATOR_S, path, NULL); - else - full_path = g_strconcat (G_DIR_SEPARATOR_S, storage_name, - path, NULL); - - return full_path; -} - -static void -storage_new_folder_cb (EStorage *storage, - const char *path, - void *data) -{ - EStorageSet *storage_set; - char *full_path; - - storage_set = E_STORAGE_SET (data); - - full_path = make_full_path (storage, path); - g_print ("EStorageSet: New folder -- %s\n", full_path); - gtk_signal_emit (GTK_OBJECT (storage_set), signals[NEW_FOLDER], full_path); - g_free (full_path); -} - -static void -storage_removed_folder_cb (EStorage *storage, - const char *path, - void *data) -{ - EStorageSet *storage_set; - char *full_path; - - storage_set = E_STORAGE_SET (data); - - full_path = make_full_path (storage, path); - g_print ("EStorageSet: Removed folder -- %s\n", full_path); - gtk_signal_emit (GTK_OBJECT (storage_set), signals[REMOVED_FOLDER], full_path); - g_free (full_path); -} - - -/* GtkObject methods. */ - -static void -destroy (GtkObject *object) -{ - EStorageSet *storage_set; - EStorageSetPrivate *priv; - - storage_set = E_STORAGE_SET (object); - priv = storage_set->priv; - - e_free_object_list (priv->storages); - - gtk_object_unref (GTK_OBJECT (priv->folder_type_registry)); - - g_hash_table_foreach (priv->name_to_named_storage, (GHFunc) named_storage_destroy, NULL); - g_hash_table_destroy (priv->name_to_named_storage); - - g_free (priv); - - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); -} - - -static void -class_init (EStorageSetClass *klass) -{ - GtkObjectClass *object_class; - - parent_class = gtk_type_class (gtk_object_get_type ()); - - object_class = (GtkObjectClass*) klass; - - object_class->destroy = destroy; - - signals[NEW_STORAGE] = - gtk_signal_new ("new_storage", - GTK_RUN_FIRST, - object_class->type, - GTK_SIGNAL_OFFSET (EStorageSetClass, new_storage), - gtk_marshal_NONE__POINTER, - GTK_TYPE_NONE, 1, - GTK_TYPE_POINTER); - signals[REMOVED_STORAGE] = - gtk_signal_new ("removed_storage", - GTK_RUN_FIRST, - object_class->type, - GTK_SIGNAL_OFFSET (EStorageSetClass, removed_storage), - gtk_marshal_NONE__POINTER, - GTK_TYPE_NONE, 1, - GTK_TYPE_POINTER); - signals[NEW_FOLDER] = - gtk_signal_new ("new_folder", - GTK_RUN_FIRST, - object_class->type, - GTK_SIGNAL_OFFSET (EStorageSetClass, new_folder), - gtk_marshal_NONE__STRING, - GTK_TYPE_NONE, 1, - GTK_TYPE_STRING); - signals[REMOVED_FOLDER] = - gtk_signal_new ("removed_folder", - GTK_RUN_FIRST, - object_class->type, - GTK_SIGNAL_OFFSET (EStorageSetClass, removed_folder), - gtk_marshal_NONE__STRING, - GTK_TYPE_NONE, 1, - GTK_TYPE_STRING); - - gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); -} - -static void -init (EStorageSet *storage_set) -{ - EStorageSetPrivate *priv; - - priv = g_new (EStorageSetPrivate, 1); - priv->storages = NULL; - priv->name_to_named_storage = g_hash_table_new (g_str_hash, g_str_equal); - priv->folder_type_registry = NULL; - - storage_set->priv = priv; -} - - -void -e_storage_set_construct (EStorageSet *storage_set, - EFolderTypeRegistry *folder_type_registry) -{ - g_return_if_fail (storage_set != NULL); - g_return_if_fail (E_IS_STORAGE_SET (storage_set)); - - GTK_OBJECT_UNSET_FLAGS (storage_set, GTK_FLOATING); - - gtk_object_ref (GTK_OBJECT (folder_type_registry)); - storage_set->priv->folder_type_registry = folder_type_registry; -} - -EStorageSet * -e_storage_set_new (EFolderTypeRegistry *folder_type_registry) -{ - EStorageSet *new; - - new = gtk_type_new (e_storage_set_get_type ()); - - e_storage_set_construct (new, folder_type_registry); - - return new; -} - - -GList * -e_storage_set_get_storage_list (EStorageSet *storage_set) -{ - EStorageSetPrivate *priv; - GList *list; - GList *p; - - g_return_val_if_fail (storage_set != NULL, NULL); - g_return_val_if_fail (E_IS_STORAGE_SET (storage_set), NULL); - - priv = storage_set->priv; - - list = NULL; - for (p = priv->storages; p != NULL; p = p->next) { - gtk_object_ref (GTK_OBJECT (p->data)); - list = g_list_prepend (list, p->data); - } - - return g_list_reverse (list); /* Lame. */ -} - -/** - * e_storage_set_add_storage: - * @storage_set: - * @storage: - * - * Add @storage to @storage_set. Notice that will ref the storage. - **/ -gboolean -e_storage_set_add_storage (EStorageSet *storage_set, - EStorage *storage) -{ - EStorageSetPrivate *priv; - const char *storage_name; - NamedStorage *named_storage; - - g_return_val_if_fail (storage_set != NULL, FALSE); - g_return_val_if_fail (E_IS_STORAGE_SET (storage_set), FALSE); - g_return_val_if_fail (storage != NULL, FALSE); - g_return_val_if_fail (E_IS_STORAGE (storage), FALSE); - - priv = storage_set->priv; - - storage_name = e_storage_get_name (storage); - if (g_hash_table_lookup (priv->name_to_named_storage, storage_name) != NULL) - return FALSE; - - gtk_object_ref (GTK_OBJECT (storage)); - - gtk_signal_connect (GTK_OBJECT (storage), "new_folder", - GTK_SIGNAL_FUNC (storage_new_folder_cb), storage_set); - gtk_signal_connect (GTK_OBJECT (storage), "removed_folder", - GTK_SIGNAL_FUNC (storage_removed_folder_cb), storage_set); - - priv->storages = g_list_append (priv->storages, storage); - - named_storage = named_storage_new (storage); - g_hash_table_insert (priv->name_to_named_storage, named_storage->name, named_storage); - - gtk_signal_emit (GTK_OBJECT (storage_set), signals[NEW_STORAGE], storage); - - return TRUE; -} - -gboolean -e_storage_set_remove_storage (EStorageSet *storage_set, - EStorage *storage) -{ - EStorageSetPrivate *priv; - NamedStorage *named_storage; - - g_return_val_if_fail (storage_set != NULL, FALSE); - g_return_val_if_fail (E_IS_STORAGE_SET (storage_set), FALSE); - g_return_val_if_fail (storage != NULL, FALSE); - g_return_val_if_fail (E_IS_STORAGE (storage), FALSE); - - priv = storage_set->priv; - - named_storage = g_hash_table_lookup (priv->name_to_named_storage, - e_storage_get_name (storage)); - if (named_storage == NULL) - return FALSE; - - g_hash_table_remove (priv->name_to_named_storage, named_storage->name); - named_storage_destroy (named_storage); - - priv->storages = g_list_remove (priv->storages, storage); - - gtk_signal_emit (GTK_OBJECT (storage_set), signals[REMOVED_STORAGE], storage); - gtk_object_unref (GTK_OBJECT (storage)); - - return TRUE; -} - -EStorage * -e_storage_set_get_storage (EStorageSet *storage_set, - const char *name) -{ - EStorageSetPrivate *priv; - NamedStorage *named_storage; - - g_return_val_if_fail (storage_set != NULL, NULL); - g_return_val_if_fail (E_IS_STORAGE_SET (storage_set), NULL); - g_return_val_if_fail (name != NULL, NULL); - - priv = storage_set->priv; - - named_storage = g_hash_table_lookup (priv->name_to_named_storage, name); - if (named_storage == NULL) - return NULL; - else - return named_storage->storage; -} - -EFolder * -e_storage_set_get_folder (EStorageSet *storage_set, - const char *path) -{ - EStorage *storage; - const char *first_separator; - char *storage_name; - - g_return_val_if_fail (storage_set != NULL, NULL); - g_return_val_if_fail (E_IS_STORAGE_SET (storage_set), NULL); - g_return_val_if_fail (path != NULL, NULL); - g_return_val_if_fail (g_path_is_absolute (path), NULL); - - /* Skip initial separator. */ - path++; - - first_separator = strchr (path, G_DIR_SEPARATOR); - - if (first_separator == NULL || first_separator == path || first_separator[1] == 0) - return NULL; - - storage_name = g_strndup (path, first_separator - path); - storage = e_storage_set_get_storage (storage_set, storage_name); - g_free (storage_name); - - if (storage == NULL) - return NULL; - - return e_storage_get_folder (storage, first_separator); -} - - -GtkWidget * -e_storage_set_new_view (EStorageSet *storage_set) -{ - GtkWidget *storage_set_view; - - g_return_val_if_fail (storage_set != NULL, NULL); - g_return_val_if_fail (E_IS_STORAGE_SET (storage_set), NULL); - - storage_set_view = e_storage_set_view_new (storage_set); - - return storage_set_view; -} - - -EFolderTypeRegistry * -e_storage_set_get_folder_type_registry (EStorageSet *storage_set) -{ - g_return_val_if_fail (storage_set != NULL, NULL); - g_return_val_if_fail (E_IS_STORAGE_SET (storage_set), NULL); - - return storage_set->priv->folder_type_registry; -} - - -E_MAKE_TYPE (e_storage_set, "EStorageSet", EStorageSet, class_init, init, PARENT_TYPE) diff --git a/shell/e-storage-set.h b/shell/e-storage-set.h deleted file mode 100644 index e41471764d..0000000000 --- a/shell/e-storage-set.h +++ /dev/null @@ -1,94 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-storage-set.h - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -#ifndef _E_STORAGE_SET_H_ -#define _E_STORAGE_SET_H_ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include - -#include "e-folder-type-registry.h" -#include "e-storage.h" - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus */ - -#define E_TYPE_STORAGE_SET (e_storage_set_get_type ()) -#define E_STORAGE_SET(obj) (GTK_CHECK_CAST ((obj), E_TYPE_STORAGE_SET, EStorageSet)) -#define E_STORAGE_SET_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_STORAGE_SET, EStorageSetClass)) -#define E_IS_STORAGE_SET(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_STORAGE_SET)) -#define E_IS_STORAGE_SET_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_STORAGE_SET)) - - -typedef struct _EStorageSet EStorageSet; -typedef struct _EStorageSetPrivate EStorageSetPrivate; -typedef struct _EStorageSetClass EStorageSetClass; - -struct _EStorageSet { - GtkObject parent; - - EStorageSetPrivate *priv; -}; - -struct _EStorageSetClass { - GtkObjectClass parent_class; - - /* Signals. */ - - void (* new_storage) (EStorageSet *storage_set, EStorage *storage); - void (* removed_storage) (EStorageSet *storage_set, EStorage *storage); - /* FIXME? Inconsistency between storage and folders. */ - void (* new_folder) (EStorageSet *storage_set, const char *path); - void (* removed_folder) (EStorageSet *storage_set, const char *path); -}; - - -GtkType e_storage_set_get_type (void); -void e_storage_set_construct (EStorageSet *storage_set, - EFolderTypeRegistry *folder_type_registry); -EStorageSet *e_storage_set_new (EFolderTypeRegistry *folder_type_registry); - -gboolean e_storage_set_add_storage (EStorageSet *storage_set, - EStorage *storage); -gboolean e_storage_set_remove_storage (EStorageSet *storage_set, - EStorage *storage); - -GList *e_storage_set_get_storage_list (EStorageSet *storage_set); -EStorage *e_storage_set_get_storage (EStorageSet *storage_set, - const char *storage_name); -EFolder *e_storage_set_get_folder (EStorageSet *storage_set, - const char *path); -GtkWidget *e_storage_set_new_view (EStorageSet *storage_set); - -EFolderTypeRegistry *e_storage_set_get_folder_type_registry (EStorageSet *storage_set); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* _E_STORAGE_SET_H_ */ diff --git a/shell/e-storage-watcher.c b/shell/e-storage-watcher.c deleted file mode 100644 index 8312273d27..0000000000 --- a/shell/e-storage-watcher.c +++ /dev/null @@ -1,188 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-storage-watcher.c - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include - -#include "e-util/e-util.h" - -#include "e-storage-watcher.h" - - -#define PARENT_TYPE gtk_object_get_type () -static GtkObjectClass *parent_class = NULL; - -struct _EStorageWatcherPrivate { - EStorage *storage; - char *path; -}; - - -enum { - NEW_FOLDER, - REMOVED_FOLDER, - LAST_SIGNAL -}; - -static guint signals[LAST_SIGNAL] = { 0 }; - - -/* GtkObject methods. */ - -static void -destroy (GtkObject *object) -{ - EStorageWatcher *storage_watcher; - EStorageWatcherPrivate *priv; - - storage_watcher = E_STORAGE_WATCHER (object); - priv = storage_watcher->priv; - - g_free (priv->path); - g_free (priv); - - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); -} - - -/* Initialization. */ - -static void -class_init (EStorageWatcherClass *klass) -{ - GtkObjectClass *object_class; - - object_class = (GtkObjectClass*) klass; - object_class->destroy = destroy; - - parent_class = gtk_type_class (gtk_object_get_type ()); - - signals[NEW_FOLDER] = - gtk_signal_new ("new_folder", - GTK_RUN_FIRST, - object_class->type, - GTK_SIGNAL_OFFSET (EStorageWatcherClass, new_folder), - gtk_marshal_NONE__POINTER_STRING_STRING, - GTK_TYPE_NONE, 2, - GTK_TYPE_STRING, - GTK_TYPE_STRING); - signals[REMOVED_FOLDER] = - gtk_signal_new ("removed_folder", - GTK_RUN_FIRST, - object_class->type, - GTK_SIGNAL_OFFSET (EStorageWatcherClass, removed_folder), - gtk_marshal_NONE__POINTER_STRING_STRING, - GTK_TYPE_NONE, 2, - GTK_TYPE_STRING, - GTK_TYPE_STRING); - - gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); -} - -static void -init (EStorageWatcher *storage_watcher) -{ - EStorageWatcherPrivate *priv; - - priv = g_new (EStorageWatcherPrivate, 1); - priv->storage = NULL; - priv->path = NULL; - - storage_watcher->priv = priv; -} - - -/* Initialization. */ - -void -e_storage_watcher_construct (EStorageWatcher *watcher, - EStorage *storage, - const char *path) -{ - EStorageWatcherPrivate *priv; - - g_return_if_fail (watcher != NULL); - g_return_if_fail (E_IS_STORAGE_WATCHER (watcher)); - g_return_if_fail (path != NULL); - - GTK_OBJECT_UNSET_FLAGS (GTK_OBJECT (watcher), GTK_FLOATING); - - priv = watcher->priv; - - priv->storage = storage; - priv->path = g_strdup (path); -} - -EStorageWatcher * -e_storage_watcher_new (EStorage *storage, - const char *path) -{ - EStorageWatcher *watcher; - - g_return_val_if_fail (path != NULL, NULL); - - watcher = gtk_type_new (e_storage_watcher_get_type ()); - - e_storage_watcher_construct (watcher, storage, path); - - return watcher; -} - - -const char * -e_storage_watcher_get_path (EStorageWatcher *storage_watcher) -{ - g_return_val_if_fail (storage_watcher != NULL, NULL); - g_return_val_if_fail (E_IS_STORAGE_WATCHER (storage_watcher), NULL); - - return storage_watcher->priv->path; -} - - -void -e_storage_watcher_emit_new_folder (EStorageWatcher *storage_watcher, - const char *name) -{ - g_return_if_fail (storage_watcher != NULL); - g_return_if_fail (E_IS_STORAGE_WATCHER (storage_watcher)); - g_return_if_fail (name != NULL); - - gtk_signal_emit (GTK_OBJECT (storage_watcher), signals[NEW_FOLDER], name); -} - -void -e_storage_watcher_emit_removed_folder (EStorageWatcher *storage_watcher, - const char *name) -{ - g_return_if_fail (storage_watcher != NULL); - g_return_if_fail (E_IS_STORAGE_WATCHER (storage_watcher)); - g_return_if_fail (name != NULL); - - gtk_signal_emit (GTK_OBJECT (storage_watcher), signals[REMOVED_FOLDER], name); -} - - -E_MAKE_TYPE (e_storage_watcher, "EStorageWatcher", EStorageWatcher, class_init, init, PARENT_TYPE) diff --git a/shell/e-storage-watcher.h b/shell/e-storage-watcher.h deleted file mode 100644 index 26c6edffaf..0000000000 --- a/shell/e-storage-watcher.h +++ /dev/null @@ -1,93 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-storage-watcher.h - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -#ifndef _E_STORAGE_WATCHER_H_ -#define _E_STORAGE_WATCHER_H_ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus */ - -#define E_TYPE_STORAGE_WATCHER (e_storage_watcher_get_type ()) -#define E_STORAGE_WATCHER(obj) (GTK_CHECK_CAST ((obj), E_TYPE_STORAGE_WATCHER, EStorageWatcher)) -#define E_STORAGE_WATCHER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_STORAGE_WATCHER, EStorageWatcherClass)) -#define E_IS_STORAGE_WATCHER(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_STORAGE_WATCHER)) -#define E_IS_STORAGE_WATCHER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_STORAGE_WATCHER)) - - -typedef struct _EStorageWatcher EStorageWatcher; -typedef struct _EStorageWatcherPrivate EStorageWatcherPrivate; -typedef struct _EStorageWatcherClass EStorageWatcherClass; - -#include "e-storage.h" - -struct _EStorageWatcher { - GtkObject parent; - - EStorageWatcherPrivate *priv; -}; - -struct _EStorageWatcherClass -{ - GtkObjectClass parent_class; - - /* Signals. */ - - void (* new_folder) (EStorageWatcher *storage_watcher, - EStorage *storage, - const char *path, - const char *name); - - void (* removed_folder) (EStorageWatcher *storage_watcher, - EStorage *storage, - const char *path, - const char *name); -}; - - -GtkType e_storage_watcher_get_type (void); -void e_storage_watcher_construct (EStorageWatcher *watcher, - EStorage *storage, - const char *path); -EStorageWatcher *e_storage_watcher_new (EStorage *storage, - const char *path); - -const char *e_storage_watcher_get_path (EStorageWatcher *storage_watcher); - -void e_storage_watcher_emit_new_folder (EStorageWatcher *storage_watcher, - const char *name); -void e_storage_watcher_emit_removed_folder (EStorageWatcher *storage_watcher, - const char *name); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* __E_STORAGE_WATCHER_H__ */ diff --git a/shell/e-storage.c b/shell/e-storage.c deleted file mode 100644 index 98ce48da70..0000000000 --- a/shell/e-storage.c +++ /dev/null @@ -1,405 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-storage.c - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include - -#include - -#include "e-util/e-util.h" - -#include "e-storage.h" - - -#define PARENT_TYPE GTK_TYPE_OBJECT -static GtkObjectClass *parent_class = NULL; - -#define ES_CLASS(obj) \ - E_STORAGE_CLASS (GTK_OBJECT (obj)->klass) - -/* This describes a folder and its children. */ -struct _Folder { - struct _Folder *parent; - - char *path; - EFolder *e_folder; - GList *subfolders; -}; -typedef struct _Folder Folder; - -struct _EStoragePrivate { - GHashTable *path_to_folder; /* Folder */ -}; - -enum { - NEW_FOLDER, - REMOVED_FOLDER, - LAST_SIGNAL -}; - -static guint signals[LAST_SIGNAL] = { 0 }; - - -static Folder * -folder_new (EFolder *e_folder, - const char *path) -{ - Folder *folder; - - folder = g_new (Folder, 1); - folder->path = g_strdup (path); - folder->parent = NULL; - folder->e_folder = e_folder; - folder->subfolders = NULL; - - return folder; -} - -static void -folder_remove_subfolder (Folder *folder, Folder *subfolder) -{ - g_list_remove (folder->subfolders, folder); -} - -static void -folder_add_subfolder (Folder *folder, Folder *subfolder) -{ - folder->subfolders = g_list_prepend (folder->subfolders, subfolder); - subfolder->parent = folder; -} - -static void -folder_destroy (Folder *folder) -{ - GList *p; - - if (folder->parent != NULL) - folder_remove_subfolder (folder->parent, folder); - - g_free (folder->path); - - gtk_object_unref (GTK_OBJECT (folder->e_folder)); - - for (p = folder->subfolders; p != NULL; p = p->next) - folder_destroy (p->data); - - g_free (folder); -} - -static void -free_private (EStorage *storage) -{ - EStoragePrivate *priv; - - priv = storage->priv; - - g_hash_table_foreach (priv->path_to_folder, (GHFunc) folder_destroy, NULL); - - g_hash_table_destroy (priv->path_to_folder); - - g_free (priv); -} - - -/* EStorage methods. */ - -static GList * -list_folders (EStorage *storage, - const char *path) -{ - Folder *folder; - Folder *subfolder; - GList *list; - GList *p; - - folder = g_hash_table_lookup (storage->priv->path_to_folder, path); - if (folder == NULL) - return NULL; - - list = NULL; - for (p = folder->subfolders; p != NULL; p = p->next) { - subfolder = (Folder *) p->data; - - gtk_object_ref (GTK_OBJECT (subfolder->e_folder)); - list = g_list_prepend (list, subfolder->e_folder); - } - - return list; -} - -static EFolder * -get_folder (EStorage *storage, - const char *path) -{ - EStoragePrivate *priv; - Folder *folder; - - priv = storage->priv; - - folder = g_hash_table_lookup (priv->path_to_folder, path); - if (folder == NULL) - return NULL; - - return folder->e_folder; -} - -static const char * -get_name (EStorage *storage) -{ - return "(No name)"; -} - - -/* GtkObject methods. */ - -static void -destroy (GtkObject *object) -{ - EStorage *storage; - - storage = E_STORAGE (object); - - free_private (storage); - - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); -} - - -/* Initialization. */ - -static void -class_init (EStorageClass *class) -{ - GtkObjectClass *object_class; - - object_class = GTK_OBJECT_CLASS (class); - parent_class = gtk_type_class (gtk_object_get_type ()); - - object_class->destroy = destroy; - - class->list_folders = list_folders; - class->get_folder = get_folder; - class->get_name = get_name; - - signals[NEW_FOLDER] = - gtk_signal_new ("new_folder", - GTK_RUN_FIRST, - object_class->type, - GTK_SIGNAL_OFFSET (EStorageClass, new_folder), - gtk_marshal_NONE__STRING, - GTK_TYPE_NONE, 1, - GTK_TYPE_STRING); - signals[REMOVED_FOLDER] = - gtk_signal_new ("removed_folder", - GTK_RUN_FIRST, - object_class->type, - GTK_SIGNAL_OFFSET (EStorageClass, removed_folder), - gtk_marshal_NONE__STRING, - GTK_TYPE_NONE, 1, - GTK_TYPE_STRING); - - gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); -} - -static void -init (EStorage *storage) -{ - EStoragePrivate *priv; - - priv = g_new (EStoragePrivate, 1); - priv->path_to_folder = g_hash_table_new (g_str_hash, g_str_equal); - - storage->priv = priv; -} - - -/* Creation. */ - -void -e_storage_construct (EStorage *storage) -{ - Folder *root_folder; - - g_return_if_fail (storage != NULL); - g_return_if_fail (E_IS_STORAGE (storage)); - - GTK_OBJECT_UNSET_FLAGS (GTK_OBJECT (storage), GTK_FLOATING); - - root_folder = folder_new (NULL, G_DIR_SEPARATOR_S); - g_hash_table_insert (storage->priv->path_to_folder, root_folder->path, root_folder); -} - -EStorage * -e_storage_new (void) -{ - EStorage *new; - - new = gtk_type_new (e_storage_get_type ()); - - e_storage_construct (new); - - return new; -} - - -gboolean -e_storage_path_is_absolute (const char *path) -{ - g_return_val_if_fail (path != NULL, FALSE); - - return *path == G_DIR_SEPARATOR; -} - -gboolean -e_storage_path_is_relative (const char *path) -{ - g_return_val_if_fail (path != NULL, FALSE); - - return *path != G_DIR_SEPARATOR; -} - - -GList * -e_storage_list_folders (EStorage *storage, - const char *path) -{ - g_return_val_if_fail (storage != NULL, NULL); - g_return_val_if_fail (E_IS_STORAGE (storage), NULL); - g_return_val_if_fail (path != NULL, NULL); - g_return_val_if_fail (g_path_is_absolute (path), NULL); - - return (* ES_CLASS (storage)->list_folders) (storage, path); -} - -EFolder * -e_storage_get_folder (EStorage *storage, - const char *path) -{ - g_return_val_if_fail (storage != NULL, NULL); - g_return_val_if_fail (E_IS_STORAGE (storage), NULL); - g_return_val_if_fail (path != NULL, NULL); - g_return_val_if_fail (e_storage_path_is_absolute (path), NULL); - - return (* ES_CLASS (storage)->get_folder) (storage, path); -} - -const char * -e_storage_get_name (EStorage *storage) -{ - g_return_val_if_fail (storage != NULL, NULL); - g_return_val_if_fail (E_IS_STORAGE (storage), NULL); - - return (* ES_CLASS (storage)->get_name) (storage); -} - - -/* These functions are used by subclasses to add and remove folders from the - state stored in the storage object. */ - -gboolean -e_storage_new_folder (EStorage *storage, - const char *path, - EFolder *e_folder) -{ - EStoragePrivate *priv; - Folder *folder; - Folder *parent_folder; - const char *name; - char *full_path; - - g_return_val_if_fail (storage != NULL, FALSE); - g_return_val_if_fail (E_IS_STORAGE (storage), FALSE); - g_return_val_if_fail (path != NULL, FALSE); - g_return_val_if_fail (g_path_is_absolute (path), FALSE); - g_return_val_if_fail (e_folder != NULL, FALSE); - g_return_val_if_fail (E_IS_FOLDER (e_folder), FALSE); - - priv = storage->priv; - - parent_folder = g_hash_table_lookup (priv->path_to_folder, path); - if (parent_folder == NULL) { - g_warning ("%s: Trying to add a subfolder to a path that does not exist yet -- %s", - __FUNCTION__, path); - return FALSE; - } - - name = e_folder_get_name (e_folder); - g_assert (name != NULL); - g_return_val_if_fail (*name != G_DIR_SEPARATOR, FALSE); - - full_path = g_concat_dir_and_file (path, name); - - folder = g_hash_table_lookup (priv->path_to_folder, full_path); - if (folder != NULL) { - g_warning ("%s: Trying to add a subfolder for a path that already exists -- %s", - __FUNCTION__, full_path); - return FALSE; - } - - folder = folder_new (e_folder, full_path); - folder_add_subfolder (parent_folder, folder); - - g_hash_table_insert (priv->path_to_folder, folder->path, folder); - - g_print ("EStorage: New folder -- %s\n", folder->path); - gtk_signal_emit (GTK_OBJECT (storage), signals[NEW_FOLDER], folder->path); - - g_free (full_path); - - return TRUE; -} - -gboolean -e_storage_remove_folder (EStorage *storage, - const char *path) -{ - EStoragePrivate *priv; - Folder *folder; - - g_return_val_if_fail (storage != NULL, FALSE); - g_return_val_if_fail (E_IS_STORAGE (storage), FALSE); - g_return_val_if_fail (path != NULL, FALSE); - g_return_val_if_fail (g_path_is_absolute (path), FALSE); - - priv = storage->priv; - - folder = g_hash_table_lookup (priv->path_to_folder, path); - if (folder == NULL) { - g_warning ("%s: Folder not found -- %s", __FUNCTION__, path); - return FALSE; - } - - gtk_signal_emit (GTK_OBJECT (storage), signals[REMOVED_FOLDER], path); - - g_hash_table_remove (priv->path_to_folder, path); - folder_destroy (folder); - - return TRUE; -} - - -E_MAKE_TYPE (e_storage, "EStorage", EStorage, class_init, init, PARENT_TYPE) diff --git a/shell/e-storage.h b/shell/e-storage.h deleted file mode 100644 index 478feef5a6..0000000000 --- a/shell/e-storage.h +++ /dev/null @@ -1,91 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-storage.h - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -#ifndef _E_STORAGE_H_ -#define _E_STORAGE_H_ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus */ - -#define E_TYPE_STORAGE (e_storage_get_type ()) -#define E_STORAGE(obj) (GTK_CHECK_CAST ((obj), E_TYPE_STORAGE, EStorage)) -#define E_STORAGE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_STORAGE, EStorageClass)) -#define E_IS_STORAGE(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_STORAGE)) -#define E_IS_STORAGE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_STORAGE)) - - -typedef struct _EStorage EStorage; -typedef struct _EStoragePrivate EStoragePrivate; -typedef struct _EStorageClass EStorageClass; - -#include "e-folder.h" - -struct _EStorage { - GtkObject parent; - - EStoragePrivate *priv; -}; - -struct _EStorageClass { - GtkObjectClass parent_class; - - /* Signals. */ - void * (* new_folder) (EStorage *storage, const char *path); - void * (* removed_folder) (EStorage *storage, const char *path); - - /* Virtual methods. */ - GList * (* list_folders) (EStorage *storage, const char *path); - EFolder * (* get_folder) (EStorage *storage, const char *path); - const char * (* get_name) (EStorage *storage); -}; - - -GtkType e_storage_get_type (void); -void e_storage_construct (EStorage *storage); -EStorage *e_storage_new (void); - -gboolean e_storage_path_is_relative (const char *path); -gboolean e_storage_path_is_absolute (const char *path); - -GList *e_storage_list_folders (EStorage *storage, const char *path); -EFolder *e_storage_get_folder (EStorage *storage, const char *path); - -const char *e_storage_get_name (EStorage *storage); - -/* Protected. C++ anyone? */ -gboolean e_storage_new_folder (EStorage *storage, const char *path, EFolder *folder); -gboolean e_storage_remove_folder (EStorage *storage, const char *path); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* _E_STORAGE_H_ */ diff --git a/shell/evolution-directory.idl b/shell/evolution-directory.idl deleted file mode 100644 index 76dc184528..0000000000 --- a/shell/evolution-directory.idl +++ /dev/null @@ -1,89 +0,0 @@ -/* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * evolution-directory.idl - * - * Copyright (C) 1999 Helix Code, Inc. - * - * This interface is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -module Evolution { - struct FolderInfo { - /* Name of the folder, i.e. the last part of the path. */ - string name; - - /* Name of the service handling this folder, e.g. "mail" - or "calendar" or "contacts". */ - string service_name; - }; - - /* Listener interface associated to the directory. */ - interface DirectoryListener { - enum Result { - SUCCESS, - IN_PROGRESS, - NOT_FOUND, - OVERWRITING - }; - - typedef int ListenerHandle; - - /* You get this when you first open a path in the directory. */ - void open_result (in string path, in ListenerHandle handle); - - /* This is called to inform the listener that there is a new folder in the - specified path. */ - void new_folder (in string path, in FolderInfo info); - - /* This informs the listener that a folder does not exist anymore. */ - void removed_folder (in string path, in string name); - - /* These report result of the corresponding operation. If this implies a - change in the directory, the listener will also get `new_folder' and - `removed_folder' calls appropriately. */ - void remove_folder_result (in string path, in Result result); - void create_folder_result (in string path, in Result result); - void copy_folder_result (in string old_path, in string new_path, in Result result); - void move_folder_result (in string old_path, in string new_path, in Result result); - - /* This reports the result for a `get_folder' operation. */ - void get_folder_result (in string path, in Result, in FolderInfo info); - }; - - interface Directory { - /* Open a subpath in the directory. @listener will be updated of all the - changes in it. */ - void open (in string path, in DirectoryListener listener); - - /* This removes a listener. @handle is passed through `open_result' after - the initial `open' call. */ - void close (in ListenerHandle handle); - - /* These calls create/remove a folder in the folder specified by @path. - An empty @path corresponds to the root of the directory. */ - void create_folder (in string path, in FolderInfo info); - void remove_folder (in string path, in string name); - - /* These are used to copy or move folders around. */ - void copy_folder (in string old_path, in string new_path); - void move_folder (in string old_path, in string new_path); - - /* This call retrieves information for a folder. */ - void get_folder (in string path); - }; -}; diff --git a/shell/evolution-shell-component.c b/shell/evolution-shell-component.c deleted file mode 100644 index 71952d4300..0000000000 --- a/shell/evolution-shell-component.c +++ /dev/null @@ -1,342 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* evolution-shell-component.c - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include - -#include "Evolution.h" - -#include "e-util/e-util.h" - -#include "evolution-shell-component.h" - - -#define PARENT_TYPE BONOBO_OBJECT_TYPE -static BonoboObjectClass *parent_class = NULL; - -struct _EvolutionShellComponentPrivate { - GList *folder_types; /* EvolutionShellComponentFolderType */ - - EvolutionShellComponentCreateViewFn create_view_fn; - Evolution_Shell corba_owner; - void *closure; -}; - -enum { - OWNER_SET, - LAST_SIGNAL -}; - -static guint signals[LAST_SIGNAL] = { 0 }; - - -/* CORBA interface implementation. */ - -static POA_Evolution_ShellComponent__vepv ShellComponent_vepv; - -static POA_Evolution_ShellComponent * -create_servant (void) -{ - POA_Evolution_ShellComponent *servant; - CORBA_Environment ev; - - servant = (POA_Evolution_ShellComponent *) g_new0 (BonoboObjectServant, 1); - servant->vepv = &ShellComponent_vepv; - - CORBA_exception_init (&ev); - - POA_Evolution_ShellComponent__init ((PortableServer_Servant) servant, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_free (servant); - CORBA_exception_free (&ev); - return NULL; - } - - CORBA_exception_free (&ev); - - return servant; -} - -static Evolution_FolderTypeList * -impl_ShellComponent__get_supported_types (PortableServer_Servant servant, - CORBA_Environment *ev) -{ - BonoboObject *bonobo_object; - EvolutionShellComponent *shell_component; - EvolutionShellComponentPrivate *priv; - Evolution_FolderTypeList *folder_type_list; - unsigned int i; - GList *p; - - bonobo_object = bonobo_object_from_servant (servant); - shell_component = EVOLUTION_SHELL_COMPONENT (bonobo_object); - priv = shell_component->priv; - - folder_type_list = Evolution_FolderTypeList__alloc (); - folder_type_list->_length = g_list_length (priv->folder_types); - folder_type_list->_maximum = folder_type_list->_length; - folder_type_list->_buffer = CORBA_sequence_Evolution_FolderType_allocbuf (folder_type_list->_maximum); - - for (p = priv->folder_types, i = 0; p != NULL; p = p->next, i++) { - Evolution_FolderType *corba_folder_type; - EvolutionShellComponentFolderType *folder_type; - - folder_type = (EvolutionShellComponentFolderType *) p->data; - - corba_folder_type = folder_type_list->_buffer + i; - corba_folder_type->name = CORBA_string_dup (folder_type->name); - corba_folder_type->icon_name = CORBA_string_dup (folder_type->icon_name); - } - - return folder_type_list; -} - -static void -impl_ShellComponent_set_owner (PortableServer_Servant servant, - const Evolution_Shell shell, - CORBA_Environment *ev) -{ - BonoboObject *bonobo_object; - EvolutionShellComponent *shell_component; - EvolutionShellComponentPrivate *priv; - - bonobo_object = bonobo_object_from_servant (servant); - shell_component = EVOLUTION_SHELL_COMPONENT (bonobo_object); - priv = shell_component->priv; - - if (priv->corba_owner != CORBA_OBJECT_NIL) { - CORBA_exception_set (ev, CORBA_USER_EXCEPTION, - ex_Evolution_ShellComponent_AlreadyOwned, NULL); - return; - } - - Bonobo_Unknown_ref (shell, ev); - priv->corba_owner = CORBA_Object_duplicate (shell, ev); - - gtk_signal_emit (GTK_OBJECT (shell_component), signals[OWNER_SET], priv->corba_owner); -} - -static Bonobo_Control -impl_ShellComponent_create_view (PortableServer_Servant servant, - const CORBA_char *physical_uri, - CORBA_Environment *ev) -{ - BonoboObject *bonobo_object; - EvolutionShellComponent *shell_component; - EvolutionShellComponentPrivate *priv; - BonoboControl *control; - - bonobo_object = bonobo_object_from_servant (servant); - shell_component = EVOLUTION_SHELL_COMPONENT (bonobo_object); - priv = shell_component->priv; - - control = (* priv->create_view_fn) (shell_component, physical_uri, priv->closure); - - if (control == NULL) { - CORBA_exception_set (ev, CORBA_USER_EXCEPTION, - ex_Evolution_ShellComponent_NotFound, - NULL); - return CORBA_OBJECT_NIL; - } - - return bonobo_object_corba_objref (BONOBO_OBJECT (control)); -} - - -/* GtkObject methods. */ - -static void -destroy (GtkObject *object) -{ - EvolutionShellComponent *shell_component; - EvolutionShellComponentPrivate *priv; - CORBA_Environment ev; - GList *p; - - shell_component = EVOLUTION_SHELL_COMPONENT (object); - - priv = shell_component->priv; - - CORBA_exception_init (&ev); - - if (priv->corba_owner != NULL) { - Bonobo_Unknown_unref (priv->corba_owner, &ev); - CORBA_Object_release (priv->corba_owner, &ev); - } - - CORBA_exception_free (&ev); - - for (p = priv->folder_types; p != NULL; p = p->next) { - EvolutionShellComponentFolderType *folder_type; - - folder_type = (EvolutionShellComponentFolderType *) p->data; - - g_free (folder_type->name); - g_free (folder_type->icon_name); - g_free (folder_type); - } - g_list_free (priv->folder_types); - - g_free (priv); -} - - -/* Initialization. */ - -static void -corba_class_init (void) -{ - POA_Evolution_ShellComponent__vepv *vepv; - POA_Evolution_ShellComponent__epv *epv; - PortableServer_ServantBase__epv *base_epv; - - base_epv = g_new0 (PortableServer_ServantBase__epv, 1); - base_epv->_private = NULL; - base_epv->finalize = NULL; - base_epv->default_POA = NULL; - - epv = g_new0 (POA_Evolution_ShellComponent__epv, 1); - epv->_get_supported_types = impl_ShellComponent__get_supported_types; - epv->set_owner = impl_ShellComponent_set_owner; - epv->create_view = impl_ShellComponent_create_view; - - vepv = &ShellComponent_vepv; - vepv->_base_epv = base_epv; - vepv->Bonobo_Unknown_epv = bonobo_object_get_epv (); - vepv->Evolution_ShellComponent_epv = epv; -} - -static void -class_init (EvolutionShellComponentClass *klass) -{ - GtkObjectClass *object_class; - - object_class = GTK_OBJECT_CLASS (klass); - object_class->destroy = destroy; - - signals[OWNER_SET] = gtk_signal_new ("owner_set", - GTK_RUN_FIRST, - object_class->type, - GTK_SIGNAL_OFFSET (EvolutionShellComponentClass, owner_set), - gtk_marshal_NONE__POINTER, - GTK_TYPE_NONE, 1, - GTK_TYPE_POINTER); - - gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); - - parent_class = gtk_type_class (PARENT_TYPE); - - corba_class_init (); -} - -static void -init (EvolutionShellComponent *shell_component) -{ - EvolutionShellComponentPrivate *priv; - - priv = g_new (EvolutionShellComponentPrivate, 1); - - priv->folder_types = NULL; - priv->create_view_fn = NULL; - priv->closure = NULL; - priv->corba_owner = CORBA_OBJECT_NIL; - - shell_component->priv = priv; -} - - -void -evolution_shell_component_construct (EvolutionShellComponent *shell_component, - const EvolutionShellComponentFolderType folder_types[], - Evolution_ShellComponent corba_object, - EvolutionShellComponentCreateViewFn create_view_fn, - void *closure) -{ - EvolutionShellComponentPrivate *priv; - int i; - - g_return_if_fail (shell_component != NULL); - g_return_if_fail (corba_object != CORBA_OBJECT_NIL); - - bonobo_object_construct (BONOBO_OBJECT (shell_component), corba_object); - - priv = shell_component->priv; - - priv->create_view_fn = create_view_fn; - priv->closure = closure; - - for (i = 0; folder_types[i].name != NULL; i++) { - EvolutionShellComponentFolderType *new; - - if (folder_types[i].icon_name == NULL - || folder_types[i].name[0] == '\0' - || folder_types[i].icon_name[0] == '\0') - continue; - - new = g_new (EvolutionShellComponentFolderType, 1); - new->name = g_strdup (folder_types[i].name); - new->icon_name = g_strdup (folder_types[i].icon_name); - - priv->folder_types = g_list_prepend (priv->folder_types, new); - } - - if (priv->folder_types == NULL) - g_warning ("No valid folder types constructing EShellComponent %p", shell_component); -} - -EvolutionShellComponent * -evolution_shell_component_new (const EvolutionShellComponentFolderType folder_types[], - EvolutionShellComponentCreateViewFn create_view_fn, - void *closure) -{ - EvolutionShellComponent *new; - POA_Evolution_ShellComponent *servant; - Evolution_ShellComponent corba_object; - - servant = create_servant (); - if (servant == NULL) - return NULL; - - new = gtk_type_new (evolution_shell_component_get_type ()); - - corba_object = bonobo_object_activate_servant (BONOBO_OBJECT (new), servant); - evolution_shell_component_construct (new, folder_types, corba_object, create_view_fn, closure); - - return new; -} - -Evolution_Shell -evolution_shell_component_get_owner (EvolutionShellComponent *shell_component) -{ - g_return_val_if_fail (shell_component != NULL, CORBA_OBJECT_NIL); - g_return_val_if_fail (EVOLUTION_IS_SHELL_COMPONENT (shell_component), CORBA_OBJECT_NIL); - - return shell_component->priv->corba_owner; -} - - -E_MAKE_TYPE (evolution_shell_component, "EvolutionShellComponent", EvolutionShellComponent, - class_init, init, PARENT_TYPE) diff --git a/shell/evolution-shell-component.h b/shell/evolution-shell-component.h deleted file mode 100644 index 4b00f5df0a..0000000000 --- a/shell/evolution-shell-component.h +++ /dev/null @@ -1,91 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* evolution-shell-component.h - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -#ifndef __EVOLUTION_SHELL_COMPONENT_H__ -#define __EVOLUTION_SHELL_COMPONENT_H__ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include "Evolution.h" - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus */ - -#define EVOLUTION_TYPE_SHELL_COMPONENT (evolution_shell_component_get_type ()) -#define EVOLUTION_SHELL_COMPONENT(obj) (GTK_CHECK_CAST ((obj), EVOLUTION_TYPE_SHELL_COMPONENT, EvolutionShellComponent)) -#define EVOLUTION_SHELL_COMPONENT_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), EVOLUTION_TYPE_SHELL_COMPONENT, EvolutionShellComponentClass)) -#define EVOLUTION_IS_SHELL_COMPONENT(obj) (GTK_CHECK_TYPE ((obj), EVOLUTION_TYPE_SHELL_COMPONENT)) -#define EVOLUTION_IS_SHELL_COMPONENT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), EVOLUTION_TYPE_SHELL_COMPONENT)) - - -typedef struct _EvolutionShellComponent EvolutionShellComponent; -typedef struct _EvolutionShellComponentPrivate EvolutionShellComponentPrivate; -typedef struct _EvolutionShellComponentClass EvolutionShellComponentClass; - -typedef BonoboControl * (* EvolutionShellComponentCreateViewFn) (EvolutionShellComponent *shell_component, - const char *physical_uri, - void *closure); - -struct _EvolutionShellComponentFolderType { - char *name; - char *icon_name; -}; -typedef struct _EvolutionShellComponentFolderType EvolutionShellComponentFolderType; - -struct _EvolutionShellComponent { - BonoboObject parent; - - EvolutionShellComponentPrivate *priv; -}; - -struct _EvolutionShellComponentClass { - BonoboObjectClass parent_class; - - /* Signals. */ - - void (* owner_set) (EvolutionShellComponent *shell_component, - Evolution_Shell shell_interface); -}; - - -GtkType evolution_shell_component_get_type (void); -void evolution_shell_component_construct (EvolutionShellComponent *shell_component, - const EvolutionShellComponentFolderType folder_types[], - Evolution_ShellComponent corba_object, - EvolutionShellComponentCreateViewFn create_view_fn, - void *closure); -EvolutionShellComponent *evolution_shell_component_new (const EvolutionShellComponentFolderType folder_types[], - EvolutionShellComponentCreateViewFn create_view_fn, - void *closure); -Evolution_Shell evolution_shell_component_get_owner (EvolutionShellComponent *shell_component); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* __EVOLUTION_SHELL_COMPONENT_H__ */ diff --git a/shell/evolution-storage.c b/shell/evolution-storage.c deleted file mode 100644 index 7a96fa9c07..0000000000 --- a/shell/evolution-storage.c +++ /dev/null @@ -1,395 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* evolution-storage.c - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include - -#include "Evolution.h" - -#include "e-util/e-util.h" - -#include "evolution-storage.h" - - -#define PARENT_TYPE BONOBO_OBJECT_TYPE -static BonoboObjectClass *parent_class = NULL; - -struct _EvolutionStoragePrivate { - char *name; - - Evolution_StorageRegistry corba_storage_registry; - Evolution_StorageListener corba_storage_listener; -}; - - -/* CORBA interface implementation. */ - -static POA_Evolution_Storage__vepv Storage_vepv; - -static POA_Evolution_Storage * -create_servant (void) -{ - POA_Evolution_Storage *servant; - CORBA_Environment ev; - - servant = (POA_Evolution_Storage *) g_new0 (BonoboObjectServant, 1); - servant->vepv = &Storage_vepv; - - CORBA_exception_init (&ev); - - POA_Evolution_Storage__init ((PortableServer_Servant) servant, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_free (servant); - CORBA_exception_free (&ev); - return NULL; - } - - CORBA_exception_free (&ev); - - return servant; -} - -static CORBA_char * -impl_Storage__get_name (PortableServer_Servant servant, - CORBA_Environment *ev) -{ - BonoboObject *bonobo_object; - EvolutionStorage *storage; - EvolutionStoragePrivate *priv; - - bonobo_object = bonobo_object_from_servant (servant); - storage = EVOLUTION_STORAGE (bonobo_object); - priv = storage->priv; - - return CORBA_string_dup (priv->name); -} - - -/* GtkObject methods. */ - -static void -destroy (GtkObject *object) -{ - EvolutionStorage *storage; - EvolutionStoragePrivate *priv; - CORBA_Environment ev; - - storage = EVOLUTION_STORAGE (object); - priv = storage->priv; - - g_free (priv->name); - - CORBA_exception_init (&ev); - - if (priv->corba_storage_registry != CORBA_OBJECT_NIL) { - Bonobo_Unknown_unref (priv->corba_storage_registry, &ev); - CORBA_Object_release (priv->corba_storage_registry, &ev); - } - - if (priv->corba_storage_listener != CORBA_OBJECT_NIL) { - /* (This is not a Bonobo object, so no unref.) */ - CORBA_Object_release (priv->corba_storage_listener, &ev); - } - - CORBA_exception_free (&ev); - - g_free (priv); -} - - -static void -corba_class_init (void) -{ - POA_Evolution_Storage__vepv *vepv; - POA_Evolution_Storage__epv *epv; - PortableServer_ServantBase__epv *base_epv; - - base_epv = g_new0 (PortableServer_ServantBase__epv, 1); - base_epv->_private = NULL; - base_epv->finalize = NULL; - base_epv->default_POA = NULL; - - epv = g_new0 (POA_Evolution_Storage__epv, 1); - epv->_get_name = impl_Storage__get_name; - - vepv = &Storage_vepv; - vepv->Bonobo_Unknown_epv = bonobo_object_get_epv (); - vepv->Evolution_Storage_epv = epv; -} - -static void -class_init (EvolutionStorageClass *klass) -{ - GtkObjectClass *object_class; - - object_class = GTK_OBJECT_CLASS (klass); - object_class->destroy = destroy; - - parent_class = gtk_type_class (bonobo_object_get_type ()); - - corba_class_init (); -} - -static void -init (EvolutionStorage *storage) -{ - EvolutionStoragePrivate *priv; - - priv = g_new (EvolutionStoragePrivate, 1); - priv->name = NULL; - priv->corba_storage_listener = NULL; - - storage->priv = priv; -} - - -void -evolution_storage_construct (EvolutionStorage *storage, - Evolution_Storage corba_object, - const char *name) -{ - EvolutionStoragePrivate *priv; - - g_return_if_fail (storage != NULL); - g_return_if_fail (EVOLUTION_IS_STORAGE (storage)); - g_return_if_fail (corba_object != CORBA_OBJECT_NIL); - g_return_if_fail (name != NULL); - g_return_if_fail (name[0] != '\0'); - - bonobo_object_construct (BONOBO_OBJECT (storage), corba_object); - - priv = storage->priv; - priv->name = g_strdup (name); -} - -EvolutionStorage * -evolution_storage_new (const char *name) -{ - EvolutionStorage *new; - POA_Evolution_Storage *servant; - Evolution_Storage corba_object; - - g_return_val_if_fail (name != NULL, NULL); - g_return_val_if_fail (name[0] != '\0', NULL); - - servant = create_servant (); - if (servant == NULL) - return NULL; - - new = gtk_type_new (evolution_storage_get_type ()); - - corba_object = bonobo_object_activate_servant (BONOBO_OBJECT (new), servant); - evolution_storage_construct (new, corba_object, name); - - return new; -} - -EvolutionStorageResult -evolution_storage_register (EvolutionStorage *evolution_storage, - Evolution_StorageRegistry corba_storage_registry) -{ - EvolutionStorageResult result; - Evolution_StorageListener corba_storage_listener; - Evolution_Storage corba_storage; - EvolutionStoragePrivate *priv; - CORBA_Environment ev; - - g_return_val_if_fail (evolution_storage != NULL, - EVOLUTION_STORAGE_ERROR_INVALIDPARAMETER); - g_return_val_if_fail (EVOLUTION_IS_STORAGE (evolution_storage), - EVOLUTION_STORAGE_ERROR_INVALIDPARAMETER); - g_return_val_if_fail (corba_storage_registry != CORBA_OBJECT_NIL, - EVOLUTION_STORAGE_ERROR_INVALIDPARAMETER); - - priv = evolution_storage->priv; - - if (priv->corba_storage_listener != CORBA_OBJECT_NIL) - return EVOLUTION_STORAGE_ERROR_ALREADYREGISTERED; - - CORBA_exception_init (&ev); - - corba_storage = bonobo_object_corba_objref (BONOBO_OBJECT (evolution_storage)); - corba_storage_listener = Evolution_StorageRegistry_register_storage (corba_storage_registry, - corba_storage, - priv->name, &ev); - - if (ev._major == CORBA_NO_EXCEPTION) { - Bonobo_Unknown_ref (corba_storage_registry, &ev); - priv->corba_storage_registry = CORBA_Object_duplicate (corba_storage_registry, &ev); - - priv->corba_storage_listener = corba_storage_listener; - - result = EVOLUTION_STORAGE_OK; - } else { - if (ev._major != CORBA_USER_EXCEPTION) - result = EVOLUTION_STORAGE_ERROR_CORBA; - else if (strcmp (CORBA_exception_id (&ev), ex_Evolution_StorageRegistry_Exists) == 0) - result = EVOLUTION_STORAGE_ERROR_EXISTS; - else - result = EVOLUTION_STORAGE_ERROR_GENERIC; - } - - CORBA_exception_free (&ev); - - return result; -} - -EvolutionStorageResult -evolution_storage_register_on_shell (EvolutionStorage *evolution_storage, - Evolution_Shell corba_shell) -{ - Evolution_StorageRegistry corba_storage_registry; - EvolutionStorageResult result; - CORBA_Environment ev; - - g_return_val_if_fail (evolution_storage != NULL, - EVOLUTION_STORAGE_ERROR_INVALIDPARAMETER); - g_return_val_if_fail (EVOLUTION_IS_STORAGE (evolution_storage), - EVOLUTION_STORAGE_ERROR_INVALIDPARAMETER); - g_return_val_if_fail (corba_shell != CORBA_OBJECT_NIL, - EVOLUTION_STORAGE_ERROR_INVALIDPARAMETER); - - CORBA_exception_init (&ev); - - corba_storage_registry = Bonobo_Unknown_query_interface (corba_shell, - "IDL:Evolution/StorageRegistry:1.0", - &ev); - if (corba_storage_registry == CORBA_OBJECT_NIL || ev._major != CORBA_NO_EXCEPTION) { - CORBA_exception_free (&ev); - return EVOLUTION_STORAGE_ERROR_NOREGISTRY; - } - - result = evolution_storage_register (evolution_storage, corba_storage_registry); - - Bonobo_Unknown_unref (corba_storage_registry, &ev); - CORBA_Object_release (corba_storage_registry, &ev); - - CORBA_exception_free (&ev); - - return result; -} - -EvolutionStorageResult -evolution_storage_new_folder (EvolutionStorage *evolution_storage, - const char *path, - const char *type, - const char *physical_uri, - const char *description) -{ - EvolutionStorageResult result; - EvolutionStoragePrivate *priv; - Evolution_Folder corba_folder; - CORBA_Environment ev; - const char *path_basename; - char *parent_path; - - g_return_val_if_fail (evolution_storage != NULL, - EVOLUTION_STORAGE_ERROR_INVALIDPARAMETER); - g_return_val_if_fail (EVOLUTION_IS_STORAGE (evolution_storage), - EVOLUTION_STORAGE_ERROR_INVALIDPARAMETER); - g_return_val_if_fail (path != NULL, EVOLUTION_STORAGE_ERROR_INVALIDPARAMETER); - g_return_val_if_fail (g_path_is_absolute (path), EVOLUTION_STORAGE_ERROR_INVALIDPARAMETER); - g_return_val_if_fail (description != NULL, EVOLUTION_STORAGE_ERROR_INVALIDPARAMETER); - g_return_val_if_fail (type != NULL, EVOLUTION_STORAGE_ERROR_INVALIDPARAMETER); - g_return_val_if_fail (physical_uri != NULL, EVOLUTION_STORAGE_ERROR_INVALIDPARAMETER); - - priv = evolution_storage->priv; - - path_basename = g_basename (path); - - /* Yuck. */ - corba_folder.name = (CORBA_char *) path_basename; - corba_folder.description = (CORBA_char *) description; - corba_folder.type = (CORBA_char *) type; - corba_folder.physical_uri = (CORBA_char *) physical_uri; - - if (path_basename - path > 1) { - parent_path = g_strndup (path, path_basename - path - 1); - } else { - parent_path = g_strdup (G_DIR_SEPARATOR_S); - } - - CORBA_exception_init (&ev); - - Evolution_StorageListener_new_folder (priv->corba_storage_listener, parent_path, - &corba_folder, &ev); - - if (ev._major == CORBA_NO_EXCEPTION) - result = EVOLUTION_STORAGE_OK; - else if (ev._major != CORBA_USER_EXCEPTION) - result = EVOLUTION_STORAGE_ERROR_CORBA; - else if (strcmp (CORBA_exception_id (&ev), ex_Evolution_StorageListener_Exists) == 0) - result = EVOLUTION_STORAGE_ERROR_EXISTS; - else - result = EVOLUTION_STORAGE_ERROR_GENERIC; - - CORBA_exception_free (&ev); - - g_free (parent_path); - - return result; -} - -EvolutionStorageResult -evolution_storage_removed_folder (EvolutionStorage *evolution_storage, - const char *path) -{ - EvolutionStorageResult result; - EvolutionStoragePrivate *priv; - CORBA_Environment ev; - - g_return_val_if_fail (evolution_storage != NULL, - EVOLUTION_STORAGE_ERROR_INVALIDPARAMETER); - g_return_val_if_fail (EVOLUTION_IS_STORAGE (evolution_storage), - EVOLUTION_STORAGE_ERROR_INVALIDPARAMETER); - g_return_val_if_fail (path != NULL, EVOLUTION_STORAGE_ERROR_INVALIDPARAMETER); - g_return_val_if_fail (g_path_is_absolute (path), EVOLUTION_STORAGE_ERROR_INVALIDPARAMETER); - - priv = evolution_storage->priv; - - if (priv->corba_storage_listener == CORBA_OBJECT_NIL) - return EVOLUTION_STORAGE_ERROR_NOTREGISTERED; - - CORBA_exception_init (&ev); - - Evolution_StorageListener_removed_folder (priv->corba_storage_listener, path, &ev); - - if (ev._major == CORBA_NO_EXCEPTION) - result = EVOLUTION_STORAGE_OK; - else if (ev._major != CORBA_USER_EXCEPTION) - result = EVOLUTION_STORAGE_ERROR_CORBA; - else if (strcmp (CORBA_exception_id (&ev), ex_Evolution_StorageListener_NotFound) == 0) - result = EVOLUTION_STORAGE_ERROR_NOTFOUND; - else - result = EVOLUTION_STORAGE_ERROR_GENERIC; - - CORBA_exception_free (&ev); - - return result; -} - - -E_MAKE_TYPE (evolution_storage, "EvolutionStorage", EvolutionStorage, class_init, init, PARENT_TYPE) diff --git a/shell/evolution-storage.h b/shell/evolution-storage.h deleted file mode 100644 index 40e678dd57..0000000000 --- a/shell/evolution-storage.h +++ /dev/null @@ -1,96 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* evolution-storage.h - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -#ifndef __EVOLUTION_STORAGE_H__ -#define __EVOLUTION_STORAGE_H__ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus */ - -#define EVOLUTION_TYPE_STORAGE (evolution_storage_get_type ()) -#define EVOLUTION_STORAGE(obj) (GTK_CHECK_CAST ((obj), EVOLUTION_TYPE_STORAGE, EvolutionStorage)) -#define EVOLUTION_STORAGE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), EVOLUTION_TYPE_STORAGE, EvolutionStorageClass)) -#define EVOLUTION_IS_STORAGE(obj) (GTK_CHECK_TYPE ((obj), EVOLUTION_TYPE_STORAGE)) -#define EVOLUTION_IS_STORAGE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), EVOLUTION_TYPE_STORAGE)) - - -typedef struct _EvolutionStorage EvolutionStorage; -typedef struct _EvolutionStoragePrivate EvolutionStoragePrivate; -typedef struct _EvolutionStorageClass EvolutionStorageClass; - -enum _EvolutionStorageResult { - EVOLUTION_STORAGE_OK, - EVOLUTION_STORAGE_ERROR_ALREADYREGISTERED, - EVOLUTION_STORAGE_ERROR_NOTREGISTERED, - EVOLUTION_STORAGE_ERROR_NOREGISTRY, - EVOLUTION_STORAGE_ERROR_CORBA, - EVOLUTION_STORAGE_ERROR_EXISTS, - EVOLUTION_STORAGE_ERROR_INVALIDPARAMETER, - EVOLUTION_STORAGE_ERROR_NOTFOUND, - EVOLUTION_STORAGE_ERROR_GENERIC -}; -typedef enum _EvolutionStorageResult EvolutionStorageResult; - -struct _EvolutionStorage { - BonoboObject parent; - - EvolutionStoragePrivate *priv; -}; - -struct _EvolutionStorageClass { - BonoboObjectClass parent_class; -}; - - -GtkType evolution_storage_get_type (void); -void evolution_storage_construct (EvolutionStorage *storage, - Evolution_Storage corba_object, - const char *name); -EvolutionStorage *evolution_storage_new (const char *name); - -EvolutionStorageResult evolution_storage_register (EvolutionStorage *storage, - Evolution_StorageRegistry corba_registry); -EvolutionStorageResult evolution_storage_register_on_shell (EvolutionStorage *evolution_storage, - Evolution_Shell corba_shell); - -EvolutionStorageResult evolution_storage_new_folder (EvolutionStorage *evolution_storage, - const char *path, - const char *type, - const char *physical_uri, - const char *description); -EvolutionStorageResult evolution_storage_removed_folder (EvolutionStorage *evolution_storage, - const char *path); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* __EVOLUTION_STORAGE_H__ */ diff --git a/shell/idl/folder.idl b/shell/idl/folder.idl deleted file mode 100644 index 4a9850a468..0000000000 --- a/shell/idl/folder.idl +++ /dev/null @@ -1,87 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * folder.idl - * Copyright (C) 2000 Helix Code, Inc. - * Author: Christopher James Lahey - * - * Based on original from Matt Loper. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -module Evolution { - - interface FolderListener { - - enum CallStatus { - Success, - RepositoryOffline, - PermissionDenied, - WrongFolderType, - WrongFolderDomain, - FolderNotFound - }; - - void folder_listener_ready (in CallStatus status, - in Folder folder); - - void respond_add_subfolder (in CallStatus status, - in Folder folder); - void respond_move_subfolder (in CallStatus status); - void respond_delete_subfolder (in CallStatus status); - - /* This signals that some piece of data has changed. - The name or icon has changed. */ - void signal_name_changed(in Folder folder); - void signal_icon_changed(in Folder folder); - - /* This says a child/children has been added. */ - void signal_subfolder_added(in FolderList folders); - /* This says a child has been removed. */ - void signal_subfolder_removed(in Folder folder); - }; - - interface Folder { - void set_listener (in FolderListener listener); - - /* - * get a bonobo control for this view; a client won't - * use the goad_id gathered in the above function, b/c - * only the wombat knows how to do that, by surfing - * the physical evolution directory structure - */ - Bonobo::control get_control(); - - /* - * You must know what interface to query_interface() - * for once you get a data source! - */ - Bonobo::Unknown get_data_source(); - - char *get_name(); - char *get_icon(); - - void add_subfolder (in string data_source_id, - in string control_id, - in string viewable_name); - void move_subfolder (in Folder subfolder); - void delete_subfolder (in Folder subfolder); - }; - - interface Wombat { - void get_root_folder(FolderListener listener); - }; -}; diff --git a/shell/main.c b/shell/main.c deleted file mode 100644 index 4444ac223b..0000000000 --- a/shell/main.c +++ /dev/null @@ -1,203 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* .c - * - * Copyright (C) 2000 Helix Code, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Ettore Perazzoli - */ - -#include -#include -#include - -#include "e-util/e-gui-utils.h" -#include "e-setup.h" - -#include "e-shell.h" - - -#define STARTUP_URI "evolution:/local/Inbox" - -static EShell *shell; - - -static void -no_views_left_cb (EShell *shell, gpointer data) -{ - gtk_main_quit (); -} - -static void -destroy_cb (GtkObject *object, gpointer data) -{ - gtk_main_quit (); -} - - -#ifdef USING_OAF - -#include - -static void -init_corba (int *argc, char **argv) -{ - gnome_init_with_popt_table ("Evolution", VERSION, *argc, argv, oaf_popt_options, 0, NULL); - - oaf_init (*argc, argv); -} - -#else /* USING_OAF */ - -#include - -static void -init_corba (int *argc, char **argv) -{ - CORBA_Environment ev; - - CORBA_exception_init (&ev); - - gnome_CORBA_init_with_popt_table ("Evolution", VERSION, argc, argv, - NULL, 0, NULL, - GNORBA_INIT_SERVER_FUNC, &ev); - - if (ev._major != CORBA_NO_EXCEPTION) - g_error ("Cannot initialize GNOME"); - - CORBA_exception_free (&ev); -} - -#endif /* USING_OAF */ - - -static void -development_warning () -{ - GtkWidget *label, *warning_dialog; - - warning_dialog = gnome_dialog_new ( - "Evolution 0.0", - GNOME_STOCK_BUTTON_OK, - NULL); - - label = gtk_label_new ( - _( - "Hi. Thanks for taking the time to download this preview release of\n" - "the Evolution groupware suite.\n" - "\n" - "The Evolution team has worked hard to make Evolution as robust,\n" - "extensible, pretty, fast and well-suited to heavy internet users as\n" - "possible. And we're very tired. But we're not done -- not yet.\n" - "\n" - "As you explore Evolution, please understand that most of our work has\n" - "been focused on the backend engine which drives the entire system and\n" - "not on the user interface. We are just cresting the hill now, though,\n" - "and will be pouring most of our love and attention into the UI from\n" - "here out. But at least you know that you're not using demoware.\n" - "\n" - "So, time for the nerdy disclaimer. Evolution will: crash, lose your\n" - "mail, leave stray processes running, consume 100% CPU, race, lock,\n" - "send HTML mail to random mailing lists, and embarass you in front of\n" - "your friends and co-workers. Use at your own risk.\n" - "\n" - "We hope that you enjoy the results of our hard work, and we eagerly\n" - "await your contributions!\n" - )); - gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); - gtk_widget_show (label); - - gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (warning_dialog)->vbox), - label, TRUE, TRUE, 0); - - label = gtk_label_new ( - _( - "Thanks\n" - "The Evolution Team\n" - )); - gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_RIGHT); - gtk_misc_set_alignment(GTK_MISC(label), 1, .5); - gtk_widget_show (label); - - gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (warning_dialog)->vbox), - label, TRUE, TRUE, 0); - - gnome_dialog_run (GNOME_DIALOG (warning_dialog)); - - gtk_object_destroy (GTK_OBJECT (warning_dialog)); -} - -static gint -idle_cb (gpointer data) -{ - char *evolution_directory; - - evolution_directory = (char *) data; - - shell = e_shell_new (evolution_directory); - g_free (evolution_directory); - - if (shell == NULL) { - e_notice (NULL, GNOME_MESSAGE_BOX_ERROR, - _("Cannot initialize the Evolution shell.")); - exit (1); - } - - gtk_signal_connect (GTK_OBJECT (shell), "no_views_left", - GTK_SIGNAL_FUNC (no_views_left_cb), NULL); - gtk_signal_connect (GTK_OBJECT (shell), "destroy", - GTK_SIGNAL_FUNC (destroy_cb), NULL); - - e_shell_new_view (shell, STARTUP_URI); - - if (!getenv ("EVOLVE_ME_HARDER")) - development_warning (); - - return FALSE; -} - - -int -main (int argc, char **argv) -{ - char *evolution_directory; - - init_corba (&argc, argv); - - gnome_window_icon_set_default_from_file (EVOLUTION_IMAGES "/evolution-inbox.png"); - - - if (! bonobo_init (CORBA_OBJECT_NIL, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL)) { - e_notice (NULL, GNOME_MESSAGE_BOX_ERROR, - _("Cannot initialize the Bonobo component system.")); - exit (1); - } - - /* FIXME */ - evolution_directory = g_concat_dir_and_file (g_get_home_dir (), "evolution"); - - if (! e_setup (evolution_directory)) { - g_free (evolution_directory); - exit (1); - } - - gtk_idle_add (idle_cb, evolution_directory); - - bonobo_main (); - - return 0; -} diff --git a/stamp.h.in b/stamp.h.in deleted file mode 100644 index 8b13789179..0000000000 --- a/stamp.h.in +++ /dev/null @@ -1 +0,0 @@ - diff --git a/tests/.cvsignore b/tests/.cvsignore deleted file mode 100644 index 1ad18182a2..0000000000 --- a/tests/.cvsignore +++ /dev/null @@ -1,24 +0,0 @@ -test1 -test2 -test3 -test4 -test5 -test6 -test7 -test8 -test9 -test10 -test11 -test12 -test13 -Makefile.in -Makefile -.deps -.libs -.pure -mail1.test -mail2.test -test-formatter -test-movemail -test-url - diff --git a/tests/Makefile.am b/tests/Makefile.am deleted file mode 100644 index 8ce3cffb3d..0000000000 --- a/tests/Makefile.am +++ /dev/null @@ -1,78 +0,0 @@ -# process this file with automake to create Makefile.in - -INCLUDES = -I$(top_srcdir)/intl -I$(top_srcdir) -I$(top_srcdir)/camel \ - -I$(includedir) -I$(top_srcdir)/camel/providers/pop3 \ - -I$(top_srcdir)/camel/providers/mbox -I$(top_srcdir)/camel/providers/nntp \ - -DG_LOG_DOMAIN=\"evolution-tests\" - -LDADD = \ - $(top_builddir)/camel/libcamel.la \ - $(top_builddir)/e-util/libeutil.la \ - $(top_builddir)/libibex/libibex.la \ - $(GNOME_LIBDIR) \ - $(GNOMEUI_LIBS) $(INTLLIBS) $(EXTRA_GNOME_LIBS) -# $(BONOBO_LIBS) - - - - -#test4_LDADD = \ -# $(top_builddir)/camel/libcamel.la \ -# $(top_builddir)/camel/providers/MH/libcamelmh.la \ -# $(GNOME_LIBDIR) \ -# $(GNOMEUI_LIBS) $(INTLLIBS) $(PTHREAD_LIB) - -#test11_LDADD = \ -# $(LDADD) \ -# $(top_builddir)/filter/libfilter.la \ -# $(top_builddir)/libibex/libibex.a - -#test9_LDADD = \ -# $(top_builddir)/camel/libcamel.la \ -# $(top_builddir)/camel/providers/mbox/libcamelmbox.la \ -# $(top_builddir)/libibex/libibex.la \ -# $(GNOME_LIBDIR) \ -# $(GNOMEUI_LIBS) $(INTLLIBS) $(EXTRA_GNOME_LIBS) - -test14_LDADD = \ - $(top_builddir)/camel/providers/vee/libcamelvee.la \ - $(top_builddir)/camel/libcamel.la \ - $(top_builddir)/libibex/libibex.la \ - $(GNOME_LIBDIR) \ - $(GNOMEUI_LIBS) $(INTLLIBS) $(EXTRA_GNOME_LIBS) - -#test12_LDADD = \ -# $(top_builddir)/camel/libcamel.la \ -# $(top_builddir)/camel/providers/nntp/libcamelnntp.la \ -# $(top_builddir)/libibex/libibex.la \ -# $(GNOME_LIBDIR) \ -# $(GNOMEUI_LIBS) $(INTLLIBS) $(EXTRA_GNOME_LIBS) - -test_movemail_LDADD = \ - $(top_builddir)/camel/libcamel.la \ - $(top_builddir)/e-util/libeutil.la \ - $(top_builddir)/libibex/libibex.la \ - $(GNOME_LIBDIR) \ - $(GNOMEUI_LIBS) $(INTLLIBS) $(EXTRA_GNOME_LIBS) - -if ENABLE_THREADS -THREAD_RELATED_TESTS=test8 -else -THREAD_RELATED_TESTS= -endif - - -noinst_PROGRAMS = \ - test1 \ - test2 \ - test10 \ - test11 \ - test13 \ - test14 \ - test-movemail \ - test-url \ - $(THREAD_RELATED_TESTS) - -# test3 \ -# test12 \ -# test-formatter diff --git a/tests/test-movemail.c b/tests/test-movemail.c deleted file mode 100644 index bcd5334b5a..0000000000 --- a/tests/test-movemail.c +++ /dev/null @@ -1,164 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -#include -#include - -static char * -auth_callback (char *prompt, gboolean secret, CamelService *service, - char *item, CamelException *ex) -{ - char buf[80]; - - printf ("%s\n", prompt); - if (secret) - printf ("(Warning: your input will be displayed)\n"); - if (fgets (buf, sizeof (buf), stdin) == NULL) { - camel_exception_set (ex, CAMEL_EXCEPTION_USER_CANCEL, - "User cancelled input."); - return NULL; - } - return g_strdup (buf); -} - -extern char *evolution_folders_dir; - -int main (int argc, char **argv) -{ - CamelSession *session; - CamelException *ex; - CamelStore *store, *outstore; - CamelFolder *folder, *outfolder; - int nmsgs, i; - CamelMimeMessage *msg; - char *url; - gboolean delete = FALSE; - - gtk_init (&argc, &argv); - camel_init (); - - if (argc == 3) { - if (!strcmp (argv[1], "--delete") || - !strcmp (argv[1], "-d")) { - delete = TRUE; - argc--; - argv++; - } - } - if (argc != 2) { - fprintf (stderr, "Usage: test-movemail [--delete] url\n"); - exit (1); - } - e_setup_base_dir (); - session = camel_session_new (auth_callback); - - ex = camel_exception_new (); - store = camel_session_get_store (session, argv[1], ex); - if (!store) { - fprintf(stderr, "Could not open store %s:\n%s\n", argv[1], - camel_exception_get_description (ex)); - exit (1); - } - camel_service_connect_with_url (CAMEL_SERVICE (store), argv[1], ex); - if (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE) { - printf ("Couldn't connect to %s:\n%s\n", argv[1], - camel_exception_get_description (ex)); - exit (1); - } - - folder = camel_store_get_folder (store, "inbox", ex); - if (!folder) { - fprintf(stderr, "Could not get inbox:\n%s\n", - camel_exception_get_description (ex)); - exit (1); - } - camel_folder_open (folder, FOLDER_OPEN_READ, ex); - if (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE) { - printf ("Couldn't open folder: %s\n", - camel_exception_get_description (ex)); - exit (1); - } - - nmsgs = camel_folder_get_message_count (folder, ex); - if (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE) { - printf ("Couldn't get message count: %s\n", - camel_exception_get_description (ex)); - exit (1); - } - printf ("Inbox contains %d messages.\n", nmsgs); - -#ifdef DISPLAY_ONLY - stdout_stream = camel_stream_fs_new_with_fd (1); -#else - url = g_strdup_printf ("mbox://%s", evolution_folders_dir); - outstore = camel_session_get_store (session, url, ex); - g_free (url); - if (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE) { - printf ("Couldn't open output store: %s\n", - camel_exception_get_description (ex)); - exit (1); - } - outfolder = camel_store_get_folder (outstore, "inbox", ex); - if (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE) { - printf ("Couldn't make output folder: %s\n", - camel_exception_get_description (ex)); - exit (1); - } - camel_folder_open (outfolder, FOLDER_OPEN_WRITE, ex); - if (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE) { - printf ("Couldn't open output folder: %s\n", - camel_exception_get_description (ex)); - exit (1); - } -#endif - - for (i = 1; i <= nmsgs; i++) { - msg = camel_folder_get_message_by_number (folder, i, ex); - if (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE) { - printf ("Couldn't get message: %s\n", - camel_exception_get_description (ex)); - exit (1); - } - -#ifdef DISPLAY_ONLY - camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (msg), - stdout_stream); -#else - camel_folder_append_message (outfolder, msg, ex); - if (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE) { - printf ("Couldn't write message: %s\n", - camel_exception_get_description (ex)); - exit (1); - } - - if (delete) { - camel_folder_delete_message_by_number (folder, i, ex); - if (camel_exception_get_id (ex) != - CAMEL_EXCEPTION_NONE) { - printf ("Couldn't delete message: %s\n", - camel_exception_get_description (ex)); - exit (1); - } - } -#endif - } - -#ifndef DISPLAY_ONLY - camel_folder_close (outfolder, FALSE, ex); -#endif - camel_folder_close (folder, TRUE, ex); - - camel_service_disconnect (CAMEL_SERVICE (store), ex); - if (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE) { - printf ("Couldn't disconnect: %s\n", - camel_exception_get_description (ex)); - exit (1); - } - - return 0; -} - -void -gratuitous_dependency_generator() -{ - xmlSetProp(); -} diff --git a/tests/test-url.c b/tests/test-url.c deleted file mode 100644 index 5d8d75951b..0000000000 --- a/tests/test-url.c +++ /dev/null @@ -1,37 +0,0 @@ -#include - -int main (int argc, char **argv) -{ - CamelURL *url; - CamelException *ex; - - if (argc != 2) { - fprintf (stderr, "Usage: test-url URL\n"); - exit (1); - } - - ex = camel_exception_new (); - url = camel_url_new (argv[1], ex); - if (!url) { - fprintf (stderr, "Could not parse URL:\n%s", - camel_exception_get_description (ex)); - exit (1); - } - - printf ("URL : %s\n\n", camel_url_to_string (url, TRUE)); - printf ("Protocol: %s\n", url->protocol); - if (url->user) - printf ("User : %s\n", url->user); - if (url->authmech) - printf ("Authmech: %s\n", url->authmech); - if (url->passwd) - printf ("Password: %s\n", url->passwd); - if (url->host) - printf ("Host : %s\n", url->host); - if (url->port) - printf ("Port : %d\n", url->port); - if (url->path) - printf ("Path : %s\n", url->path); - - return 0; -} diff --git a/tests/test1.c b/tests/test1.c deleted file mode 100644 index c21cfd371b..0000000000 --- a/tests/test1.c +++ /dev/null @@ -1,136 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -#include - -#include "camel-mime-message.h" -#include "camel-multipart.h" -#include "camel-stream.h" -#include "camel-stream-fs.h" -#include "camel-data-wrapper.h" -#include "camel.h" - -int -main (int argc, char**argv) -{ - CamelMimeMessage *message; - CamelMultipart *multipart; - CamelMimePart *body_part; - CamelMimePart *attachment_part; - CamelStream *attachment_stream; - CamelStream *stream; - CamelException *ex = camel_exception_new (); - - gtk_init (&argc, &argv); - camel_init (); - - if (argc < 2) { - attachment_stream = NULL; - } else { - if (argc == 2) { - attachment_stream = camel_stream_fs_new_with_name (argv[1], O_RDONLY, 0, ex); - if (attachment_stream == NULL) { - fprintf (stderr, "Cannot open `%s': %s\n", - argv[1], - camel_exception_get_description (ex)); - return 1; - } - } else { - fprintf (stderr, "Usage: %s []\n", - argv[0]); - return 1; - } - } - - message = camel_mime_message_new (); - - camel_mime_part_set_description (CAMEL_MIME_PART (message), "a test"); - - camel_medium_add_header (CAMEL_MEDIUM (message), "X-test1", "the value of a test"); - camel_medium_add_header (CAMEL_MEDIUM (message), "X-test2", "the value of another test"); - /*camel_mime_part_add_content_language (CAMEL_MIME_PART (message), g_string_new ("es-ca"));*/ - - camel_mime_message_set_date (message, CAMEL_MESSAGE_DATE_CURRENT, 0); - camel_mime_message_set_subject (message, g_strdup ("A test message")); - camel_mime_message_set_reply_to (message, g_strdup ("toto@toto.com")); - camel_mime_message_set_from (message, g_strdup ("Bertrand.Guiheneuf@aful.org")); - - camel_mime_message_add_recipient (message, CAMEL_RECIPIENT_TYPE_TO, - "Franck DeChamps", "franck.dechamps@alseve.fr"); - camel_mime_message_add_recipient (message, CAMEL_RECIPIENT_TYPE_TO, - NULL, "mc@alseve.fr"); - camel_mime_message_add_recipient (message, CAMEL_RECIPIENT_TYPE_TO, - "Richo", "richard.lengagne@inria.fr"); - camel_mime_message_add_recipient (message, CAMEL_RECIPIENT_TYPE_CC, - "Frank", "Francois.fleuret@inria.fr"); - camel_mime_message_add_recipient (message, CAMEL_RECIPIENT_TYPE_CC, - NULL, "maury@justmagic.com"); - camel_mime_message_add_recipient (message, CAMEL_RECIPIENT_TYPE_BCC, - "Bertie", "Bertrand.Guiheneuf@aful.org"); - - multipart = camel_multipart_new (); - body_part = camel_mime_part_new (); - camel_mime_part_set_content (CAMEL_MIME_PART (body_part), "This is a test.\nThis is only a test.\n", - strlen("This is a test.\nThis is only a test.\n"), "text/plain"); - camel_multipart_add_part (multipart, body_part); - - if (attachment_stream == NULL) { - attachment_part = NULL; - } else { - CamelDataWrapper *attachment_wrapper; - - /*CamelDataWrapper *stream_wrapper; - - stream_wrapper = camel_stream_data_wrapper_new - (attachment_stream); - - attachment_part = camel_mime_body_part_new (); - camel_mime_part_set_encoding (CAMEL_MIME_PART (attachment_part), - CAMEL_MIME_PART_ENCODING_BASE64); - camel_medium_set_content_object (CAMEL_MEDIUM (attachment_part), - stream_wrapper); - camel_multipart_add_part (multipart, attachment_part); - - gtk_object_unref (GTK_OBJECT (stream_wrapper));*/ - - attachment_wrapper = camel_data_wrapper_new (); - camel_data_wrapper_construct_from_stream (attachment_wrapper, - attachment_stream); - - attachment_part = camel_mime_part_new (); - camel_mime_part_set_encoding (CAMEL_MIME_PART (attachment_part), - CAMEL_MIME_PART_ENCODING_BASE64); - camel_medium_set_content_object (CAMEL_MEDIUM (attachment_part), - attachment_wrapper); - camel_multipart_add_part (multipart, attachment_part); - } - - camel_medium_set_content_object (CAMEL_MEDIUM (message), CAMEL_DATA_WRAPPER (multipart)); - - stream = camel_stream_fs_new_with_name ("mail1.test", O_WRONLY|O_TRUNC|O_CREAT, 0600, ex); - if (!stream) { - printf ("Could not open output file: %s\n", - camel_exception_get_description (ex)); - exit(2); - } - - camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (message), - stream, ex); - camel_stream_flush (stream, ex); - gtk_object_unref (GTK_OBJECT (stream)); - if (camel_exception_is_set (ex)) { - printf ("Oops. Failed. %s\n", - camel_exception_get_description (ex)); - exit (1); - } - - gtk_object_unref (GTK_OBJECT (message)); - gtk_object_unref (GTK_OBJECT (multipart)); - gtk_object_unref (GTK_OBJECT (body_part)); - - if (attachment_part != NULL) - gtk_object_unref (GTK_OBJECT (attachment_part)); - - printf ("Test1 finished\n"); - return 1; -} - diff --git a/tests/test10.c b/tests/test10.c deleted file mode 100644 index efe069242a..0000000000 --- a/tests/test10.c +++ /dev/null @@ -1,127 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - - -#include "camel.h" -#include "camel-mbox-folder.h" -#include "camel-exception.h" -#include "md5-utils.h" -#include -#include -#include -#include -#include -#include -#include - - -static CamelMimeMessage * -create_sample_mime_message () -{ - CamelMimeMessage *message; - CamelMimePart *body_part; - CamelMultipart *multipart; - - - message = camel_mime_message_new (); - - camel_mime_part_set_description (CAMEL_MIME_PART (message), "a test"); - - camel_medium_add_header (CAMEL_MEDIUM (message), "X-test1", "the value of a test"); - camel_medium_add_header (CAMEL_MEDIUM (message), "X-test2", "the value of another test"); - - camel_mime_message_set_date (message, time(0), 200); - camel_mime_message_set_subject (message, "A test message"); - camel_mime_message_set_reply_to (message, "toto@toto.com"); - camel_mime_message_set_from (message, "Bertrand.Guiheneuf@aful.org"); - - camel_mime_message_add_recipient (message, CAMEL_RECIPIENT_TYPE_TO, - "Franck DeChamps", "franck.dechamps@alseve.fr"); - camel_mime_message_add_recipient (message, CAMEL_RECIPIENT_TYPE_TO, - NULL, "mc@alseve.fr"); - camel_mime_message_add_recipient (message, CAMEL_RECIPIENT_TYPE_TO, - "Richo", "richard.lengagne@inria.fr"); - camel_mime_message_add_recipient (message, CAMEL_RECIPIENT_TYPE_CC, - "Frank", "Francois.fleuret@inria.fr"); - camel_mime_message_add_recipient (message, CAMEL_RECIPIENT_TYPE_CC, - NULL, "maury@justmagic.com"); - camel_mime_message_add_recipient (message, CAMEL_RECIPIENT_TYPE_BCC, - "Bertie", "Bertrand.Guiheneuf@aful.org"); - - multipart = camel_multipart_new (); - body_part = camel_mime_part_new (); - camel_mime_part_set_content (CAMEL_MIME_PART (body_part), "This is a test.\nThis is only a test.\n", - strlen("This is a test.\nThis is only a test.\n"), "text/plain"); - camel_multipart_add_part (multipart, body_part); - camel_medium_set_content_object (CAMEL_MEDIUM (message), CAMEL_DATA_WRAPPER (multipart)); - - return message; -} - -static char * -auth_callback(char *prompt, gboolean secret, - CamelService *service, char *item, - CamelException *ex) -{ - printf ("auth_callback called: %s\n", prompt); - return NULL; -} - - - - -int -main (int argc, char**argv) -{ - CamelSession *session; - CamelException *ex; - CamelStore *store; - gchar *store_url = "mbox:///tmp/evmail"; - CamelFolder *folder; - CamelMimeMessage *message; - GList *uid_list; - - gtk_init (&argc, &argv); - camel_init (); - ex = camel_exception_new (); - - session = camel_session_new (auth_callback); - store = camel_session_get_store (session, store_url, ex); - if (camel_exception_get_id (ex)) { - printf ("Exception caught in camel_session_get_store\n" - "Full description : %s\n", camel_exception_get_description (ex)); - return -1; - } - - folder = camel_store_get_folder (store, "Inbox", ex); - if (camel_exception_get_id (ex)) { - printf ("Exception caught in camel_store_get_folder\n" - "Full description : %s\n", camel_exception_get_description (ex)); - return -1; - } - - camel_folder_open (folder, FOLDER_OPEN_RW, ex); - if (camel_exception_get_id (ex)) { - printf ("Exception caught when trying to open the folder\n" - "Full description : %s\n", camel_exception_get_description (ex)); - return -1; - } - - message = create_sample_mime_message (); - camel_folder_append_message (folder, message, ex); - if (camel_exception_get_id (ex)) { - printf ("Exception caught when trying to append a message to the folder\n" - "Full description : %s\n", camel_exception_get_description (ex)); - return -1; - } - - uid_list = camel_folder_get_uid_list (folder, ex); - - - camel_folder_get_message_by_uid (folder, (gchar *)uid_list->data, ex); - camel_folder_close (folder, FALSE, ex); - return 1; -} - - - - diff --git a/tests/test11.c b/tests/test11.c deleted file mode 100644 index 1323a5f90b..0000000000 --- a/tests/test11.c +++ /dev/null @@ -1,136 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -/* - Test search api - */ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static char * -auth_callback(char *prompt, gboolean secret, - CamelService *service, char *item, - CamelException *ex) -{ - printf ("auth_callback called: %s\n", prompt); - return NULL; -} - -int -main (int argc, char**argv) -{ - CamelSession *session; - CamelException *ex; - CamelStore *store; - gchar *store_url = "mbox:///tmp/evmail"; - CamelFolder *folder, *outbox; - GList *n, *matches; - - gtk_init (&argc, &argv); - camel_init (); - ex = camel_exception_new (); - - session = camel_session_new (auth_callback); - - camel_provider_load (session, "../camel/providers/mbox/.libs/libcamelmbox.so.0", ex); - if (camel_exception_get_id (ex)) { - printf ("Exceptions suck: %s\n", camel_exception_get_description (ex)); - return 1; - } - - store = camel_session_get_store (session, store_url, ex); - if (camel_exception_get_id (ex)) { - printf ("Exception caught in camel_session_get_store\n" - "Full description : %s\n", camel_exception_get_description (ex)); - return -1; - } - - printf("get folder\n"); - - folder = camel_store_get_folder (store, "Inbox", ex); - if (camel_exception_get_id (ex)) { - printf ("Exception caught in camel_store_get_folder\n" - "Full description : %s\n", camel_exception_get_description (ex)); - return -1; - } - - printf("open folder\n"); - - camel_folder_open (folder, FOLDER_OPEN_READ, ex); - if (camel_exception_get_id (ex)) { - printf ("Exception caught when trying to open the folder\n" - "Full description : %s\n", camel_exception_get_description (ex)); - return -1; - } - - printf("create output folder ...\n"); - outbox = camel_store_get_folder (store, "Gnome", ex); - if (!camel_folder_exists(outbox, ex)) { - camel_folder_create(outbox, ex); - } - - camel_folder_open (outbox, FOLDER_OPEN_WRITE, ex); - - printf("Search for messages\n"); - - matches = camel_folder_search_by_expression (folder, -/* "(match-all (header-contains \"subject\" \"gnome\"))",*/ - "(body-contains \"gnome\")", - ex); - - printf("search found matches:\n"); - n = matches; - while (n) { - CamelMimeMessage *m; - - printf("uid: %s\n", (char *) n->data); - m = camel_folder_get_message_by_uid(folder, n->data, ex); - - if (camel_exception_get_id (ex)) { - printf ("Cannot get message\n" - "Full description : %s\n", camel_exception_get_description (ex)); - camel_exception_init(ex); - } else { - -#if 1 - - camel_folder_append_message(outbox, m, ex); - - if (camel_exception_get_id (ex)) { - printf ("Cannot save message\n" - "Full description : %s\n", camel_exception_get_description (ex)); - } - - printf("Removing matching message from source folder?\n"); - camel_mime_message_set_flags(m, CAMEL_MESSAGE_DELETED, CAMEL_MESSAGE_DELETED); -/* camel_mime_message_set_flags(m, CAMEL_MESSAGE_ANSWERED, CAMEL_MESSAGE_ANSWERED);*/ -#endif - - } - if (m) - gtk_object_unref(m); - n = g_list_next(n); - } - - camel_folder_close (outbox, TRUE, ex); - camel_folder_close (folder, TRUE, ex); - - gtk_object_unref((GtkObject *)outbox); - gtk_object_unref((GtkObject *)folder); - - return 0; -} - - - - diff --git a/tests/test12.c b/tests/test12.c deleted file mode 100644 index 223eb980a8..0000000000 --- a/tests/test12.c +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -#include - -#include "camel.h" -#include "camel-nntp-store.h" -#include "camel-session.h" -#include "camel-exception.h" - -static char* -authenticator (char *prompt, gboolean secret, CamelService *service, char *item, - CamelException *ex) -{ -} - -static void -print_name(gpointer data, gpointer foo) -{ - printf ("%s\n", (char*)data); -} - -int -main (int argc, char **argv) -{ - CamelSession *session; - CamelException *ex; - CamelStore *store; - CamelFolder *n_p_m_a; - GList *groups; - const gchar *news_url = "news://news.mozilla.org"; - - gtk_init (&argc, &argv); - camel_init (); - ex = camel_exception_new (); - - g_assert (camel_provider_register_as_module ("/usr/local/lib/evolution/camel-providers/0.0.1/libcamelnntp.so")); - - session = camel_session_new (authenticator); - store = camel_session_get_store (session, news_url, ex); - - g_assert (store); - - camel_nntp_store_subscribe_group (store, "netscape.public.mozilla.announce"); - - printf ("subscribed groups on %s\n", news_url); - - groups = camel_nntp_store_list_subscribed_groups (store); - - g_list_foreach(groups, print_name, NULL); - - n_p_m_a = camel_store_get_folder (store, "netscape.public.mozilla.announce", ex); - - camel_folder_open(n_p_m_a, FOLDER_OPEN_READ, ex); - - camel_folder_close(n_p_m_a, FALSE, ex); -} diff --git a/tests/test13.c b/tests/test13.c deleted file mode 100644 index 3e191eddf5..0000000000 --- a/tests/test13.c +++ /dev/null @@ -1,123 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* tests mime message file parsing */ -#include "stdio.h" -#include "camel-mime-message.h" -#include "camel-mime-part.h" -#include "camel-stream.h" -#include "camel-stream-fs.h" -#include "camel.h" - - -static void -dump_message_content(CamelDataWrapper *object) -{ - CamelDataWrapper *containee; - CamelStream *stream; - int parts, i; - int len; - int left; - char buffer[128]; - - printf("Dumping message ..."); - - containee = camel_medium_get_content_object(CAMEL_MEDIUM(object)); - - if (containee) { - char *type = gmime_content_field_get_mime_type(containee->mime_type); - - printf("type = %s\n", type); - - if (CAMEL_IS_MULTIPART(containee)) { - parts = camel_multipart_get_number (CAMEL_MULTIPART(containee)); - printf("multipart message, scanning contents %d parts ...\n", parts); - for (i=0;i 0) { - fwrite(buffer, len, 1, stdout); - } - printf("\n"); - } else { - g_warning("cannot get stream for message?"); - } - } - - g_free(type); - } else { - printf("no containee?\n"); - } -} - -int -main (int argc, char**argv) -{ - CamelMimeMessage *message; - CamelStream *input_stream, *output_stream; - CamelMimeParser *parser; - - gtk_init (&argc, &argv); - camel_init (); - -/* should have another program to test all this internationalisation/header parsing stuff */ -#if 0 - { - char *s, *o; - s = "This is a test, simple ascii text"; - o = header_encode_string(s); - printf("%s -> %s\n", s, o); - s = "To: Markus \"DÃ…hr\" "; - o = header_encode_string(s); - printf("%s -> %s\n", s, o); - - s = "From: =?iso-8859-1?Q?Kenneth_ll=E9phaane_Christiansen?= "; - o = header_encode_string(s); - printf("%s -> %s\n", s, o); - - printf("decoding ... \n"); - s = "From: =?iso-8859-1?Q?Kenneth_ll=E9phaane_Christiansen?= "; - o = header_decode_string(s); - printf("%s -> %s\n", s, o); - - printf("reencoded\n"); - s = header_encode_string(o); - printf("%s -> %s\n", o, s); - return 0; - } -#endif - - message = camel_mime_message_new (); - - - input_stream = camel_stream_fs_new_with_name ("mail.test", O_RDONLY, 0, NULL); - if (!input_stream) { - perror ("could not open input file\n"); - printf ("You must create the file mail.test before running this test\n"); - exit(2); - } - - printf("creating parser to create message\n"); - parser = camel_mime_parser_new(); - camel_mime_parser_init_with_stream(parser, input_stream); - camel_mime_part_construct_from_parser(CAMEL_MIME_PART (message), - parser); - - dump_message_content(CAMEL_DATA_WRAPPER (message)); - - gtk_object_unref (GTK_OBJECT (input_stream)); - - output_stream = camel_stream_fs_new_with_name ("mail2.test", O_WRONLY|O_CREAT|O_TRUNC, 0600, NULL); - camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (message), output_stream, NULL); - camel_stream_flush (output_stream, NULL); - gtk_object_unref (GTK_OBJECT (output_stream)); - - //gtk_object_unref (GTK_OBJECT (message)); - return 0; - -} diff --git a/tests/test14.c b/tests/test14.c deleted file mode 100644 index 80963415db..0000000000 --- a/tests/test14.c +++ /dev/null @@ -1,177 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -/* - Test vfolder. - */ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static void -dump_message_content(CamelDataWrapper *object) -{ - CamelDataWrapper *containee; - CamelStream *stream; - int parts, i; - int len; - int left; - char buffer[128]; - - printf("Dumping message ..."); - - containee = camel_medium_get_content_object(CAMEL_MEDIUM(object)); - - if (containee) { - char *type = gmime_content_field_get_mime_type(containee->mime_type); - - printf("type = %s\n", type); - - if (CAMEL_IS_MULTIPART(containee)) { - parts = camel_multipart_get_number (CAMEL_MULTIPART(containee)); - printf("multipart message, scanning contents %d parts ...\n", parts); - for (i=0;i 0) { - fwrite(buffer, len, 1, stdout); - } - printf("\n"); - } else { - g_warning("cannot get stream for message?"); - } - } - - g_free(type); - } else { - printf("no containee?\n"); - } -} - - -static char * -auth_callback(char *prompt, gboolean secret, - CamelService *service, char *item, - CamelException *ex) -{ - printf ("auth_callback called: %s\n", prompt); - return NULL; -} - -int -main (int argc, char**argv) -{ - CamelSession *session; - CamelException *ex; - CamelStore *store; - gchar *store_url = "vfolder:"; - CamelFolder *folder; - GList *n, *matches; - - gtk_init (&argc, &argv); - camel_init (); - ex = camel_exception_new (); - - session = camel_session_new (auth_callback); - - camel_provider_load (session, "../camel/providers/vee/.libs/libcamelvee.so.0", ex); - if (camel_exception_get_id (ex)) { - printf ("Exceptions suck: %s\n", camel_exception_get_description (ex)); - return 1; - } - - store = camel_session_get_store (session, store_url, ex); - if (camel_exception_get_id (ex)) { - printf ("Exception caught in camel_session_get_store\n" - "Full description : %s\n", camel_exception_get_description (ex)); - return -1; - } - - printf("get folder\n"); - - folder = camel_store_get_folder (store, "gnome_email?(match-all (header-contains \"subject\" \"gnome\"))", ex); - if (camel_exception_get_id (ex)) { - printf ("Exception caught in camel_store_get_folder\n" - "Full description : %s\n", camel_exception_get_description (ex)); - return -1; - } - - /* setup searched folders */ - { - CamelFolder *subfolder; - CamelStore *substore; - - substore = camel_session_get_store (session, "mbox:///home/notzed/evolution/local/Inbox", ex); - subfolder = camel_store_get_folder(substore, "mbox", ex); - camel_folder_open (subfolder, FOLDER_OPEN_READ, ex); - camel_vee_folder_add_folder(folder, subfolder); - - if (camel_exception_get_id (ex)) { - printf ("Exception caught in camel_store_get_folder\n" - "Full description : %s\n", camel_exception_get_description (ex)); - return -1; - } - - substore = camel_session_get_store (session, "mbox:///home/notzed/evolution/local/Outbox", ex); - subfolder = camel_store_get_folder(substore, "mbox", ex); - camel_folder_open (subfolder, FOLDER_OPEN_READ, ex); - camel_vee_folder_add_folder(folder, subfolder); - - if (camel_exception_get_id (ex)) { - printf ("Exception caught in camel_store_get_folder\n" - "Full description : %s\n", camel_exception_get_description (ex)); - return -1; - } - } - - printf("open folder\n"); - - camel_folder_open (folder, FOLDER_OPEN_READ, ex); - if (camel_exception_get_id (ex)) { - printf ("Exception caught when trying to open the folder\n" - "Full description : %s\n", camel_exception_get_description (ex)); - return -1; - } - - printf("vfolder's uid's:\n"); - n = camel_folder_get_uid_list(folder, ex); - while (n) { - CamelMimeMessage *m; - - printf("uid: %s\n", (char *) n->data); - - m = camel_folder_get_message_by_uid(folder, n->data, ex); - if (m) { - dump_message_content(m); - gtk_object_unref(m); - } - n = g_list_next(n); - } - - camel_folder_close (folder, TRUE, ex); - - gtk_object_unref((GtkObject *)folder); - - return 0; -} - - - - diff --git a/tests/test2.c b/tests/test2.c deleted file mode 100644 index a6299357cb..0000000000 --- a/tests/test2.c +++ /dev/null @@ -1,48 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* tests mime message file parsing */ -#include "stdio.h" -#include "camel-mime-message.h" -#include "camel-mime-part.h" -#include "camel-stream.h" -#include "camel-stream-fs.h" -#include "camel.h" - -int -main (int argc, char**argv) -{ - CamelMimeMessage *message; - CamelStream *input_stream; - CamelException *ex = camel_exception_new (); - - gtk_init (&argc, &argv); - camel_init (); - - message = camel_mime_message_new (); - - - input_stream = camel_stream_fs_new_with_name ("mail.test", O_RDONLY, 0, ex); - if (!input_stream) { - perror ("could not open input file\n"); - printf ("You must create the file mail.test before running this test\n"); - exit(2); - } - - - camel_data_wrapper_construct_from_stream ( CAMEL_DATA_WRAPPER (message), input_stream); - - camel_medium_get_content_object (CAMEL_MEDIUM (message)); - -#if 0 - camel_stream_close (input_stream); - gtk_object_unref (GTK_OBJECT (input_stream)); - - output_stream = camel_stream_fs_new_with_name ("mail2.test", O_WRONLY|O_TRUNC|O_CREAT, 0600); - camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (message), output_stream); - camel_stream_close (output_stream); - gtk_object_unref (GTK_OBJECT (output_stream)); - - //gtk_object_unref (GTK_OBJECT (message)); -#endif - return 0; - -} diff --git a/tests/test3.c b/tests/test3.c deleted file mode 100644 index 9893e2e507..0000000000 --- a/tests/test3.c +++ /dev/null @@ -1,29 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -#include "camel.h" - -int -main (int argc, char**argv) -{ - GtkType type; - - gtk_init (&argc, &argv); - camel_init (); - - printf ("Test 3 : data wrapper repository\n"); - - printf ("\nMime type : \"multipart\"\n"); - type = data_wrapper_repository_get_data_wrapper_type ("multipart"); - printf ("Type found %s\n", gtk_type_name (type) ); - - printf ("\nMime type : \"multipart/alternative\"\n"); - type = data_wrapper_repository_get_data_wrapper_type ("multipart/alternative"); - printf ("Type found %s\n", gtk_type_name (type) ); - - printf ("\nMime type : \"toto/titi\"\n"); - type = data_wrapper_repository_get_data_wrapper_type ("toto/titi"); - printf ("Type found %s\n", gtk_type_name (type) ); - - printf ("Test3 finished\n"); - return 1; -} - diff --git a/tests/test4.c b/tests/test4.c deleted file mode 100644 index bc9eef71d1..0000000000 --- a/tests/test4.c +++ /dev/null @@ -1,65 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -/* testing mh providers - do not use CamelMhFolder and CamelMhStore directly. - We do it here for test purpose only */ - - - -#include "camel-folder.h" -#include "camel-mh-folder.h" -#include "camel-mh-store.h" -#include "camel.h" - -int -main (int argc, char**argv) -{ - CamelStore *store; - CamelFolder *inbox_folder; - CamelFolder *root_mh_folder; - GList *mh_subfolders_name; - CamelMimeMessage *message_1; - gboolean inbox_exists; - - gtk_init (&argc, &argv); - camel_init (); - - - store = gtk_type_new (CAMEL_MH_STORE_TYPE); - camel_store_init (store, (CamelSession *)NULL, g_strdup ("mh:///root/Mail")); - - root_mh_folder = camel_store_get_folder (store, ""); - mh_subfolders_name = camel_folder_list_subfolders (root_mh_folder, NULL); - - printf ("\n------------- Listing root Mh folder subfolders --------\n"); - while (mh_subfolders_name) { - printf ("\t\"%s\"\n", (gchar *)mh_subfolders_name->data); - mh_subfolders_name = mh_subfolders_name->next; - } - printf ("--------------------------------------------------------\n\n"); - - inbox_folder = camel_store_get_folder (store, "inbox"); - if (!inbox_folder) { - printf ("** Error: could not get inbox folder from store\n"); - return 1; - } - - /* test existence */ - inbox_exists = camel_folder_exists (inbox_folder, NULL); - if (inbox_exists) - printf ("MH folder inbox exists, continuing tests\n"); - else { - printf ("MH folder inbox does not exist. Stopping \n"); - return 1; - } - - printf ("\n Inbox folder contains %d messages\n", camel_folder_get_message_count (inbox_folder, NULL)); - printf ("\n------------- Gettting message numer 3 in inbox --------\n"); - message_1 = camel_folder_get_message (inbox_folder, 3, NULL); - printf ("--------------------------------------------------------\n\n"); - - - return 1; - - -} diff --git a/tests/test5.c b/tests/test5.c deleted file mode 100644 index 81c5e2256a..0000000000 --- a/tests/test5.c +++ /dev/null @@ -1,59 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -/* test for the RFC 2047 decoder */ - -#include -#include - -#include "gmime-utils.h" -#include "stdio.h" -#include "camel-mime-message.h" -#include "camel-mime-part.h" -#include "camel-stream.h" -#include "camel-stream-fs.h" -#include "camel.h" -#include "gmime-rfc2047.h" - -#define TERMINAL_CHARSET "UTF-8" - -/* - * Info on many unicode issues, including, utf-8 xterms from : - * - * http://www.cl.cam.ac.uk/~mgk/unicode.html - * - */ - -const char *tests[] = -{ -/* these strings come from RFC 2047. Ought to add a few torture cases here. */ - "=?US-ASCII?Q?Keith_Moore?= ", - "=?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?= ", - "=?ISO-8859-1?Q?Andr=E9?= Pirard ", - "=?ISO-8859-1?B?SWYgeW91IGNhbiByZWFkIHRoaXMgeW8=?= =?ISO-8859-2?B?dSB1bmRlcnN0YW5kIHRoZSBleGFtcGxlLg==?=", - "=?ISO-8859-1?Q?Olle_J=E4rnefors?= ", - "=?ISO-8859-1?Q?Patrik_F=E4ltstr=F6m?= ", - "Nathaniel Borenstein (=?iso-8859-8?b?7eXs+SDv4SDp7Oj08A==?=)", - "", - "(=?ISO-8859-1?Q?a?=)", /* should be displayed as (a) */ - "(=?ISO-8859-1?Q?a?= b)", /* (a b) */ - "(=?ISO-8859-1?Q?a?= =?ISO-8859-1?Q?b?=)", /* (ab) */ - "(=?ISO-8859-1?Q?a?= =?ISO-8859-1?Q?b?=)", /* (ab) */ - "(=?ISO-8859-1?Q?a?= \n=?ISO-8859-1?Q?b?=)", /* (ab) */ - "(=?ISO-8859-1?Q?a_b?=)", /* (a b) */ - "(=?ISO-8859-1?Q?a?= =?ISO-8859-2?Q?_b?=)", /* (ab) */ - NULL -}; - - -int -main (int argc, char**argv) -{ - const char **b = tests; - while (*b) { - printf("%s\n", gmime_rfc2047_decode(*b, TERMINAL_CHARSET)); - b++; - } - - return 0; - -} diff --git a/tests/test6.c b/tests/test6.c deleted file mode 100644 index c2883d89c0..0000000000 --- a/tests/test6.c +++ /dev/null @@ -1,49 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -/* test for the RFC 2047 encoder */ - -#include -#include - -#include "gmime-utils.h" -#include "stdio.h" -#include "camel-mime-message.h" -#include "camel-mime-part.h" -#include "camel-stream.h" -#include "camel-stream-fs.h" -#include "camel.h" -#include "gmime-rfc2047.h" - -#define TERMINAL_CHARSET "UTF-8" - -/* - * Info on many unicode issues, including, utf-8 xterms from : - * - * http://www.cl.cam.ac.uk/~mgk25/unicode.html - * - */ - -const char *tests[] = -{ - "Ðis is a test", "ISO-8859-1", - "Iñtérñàtiönælîçation", "ISO-8859-1", - "ΚαλημέÏα κόσμε", "UTF-8", - "コンニãƒãƒ", "UTF-8", - "ði ıntəˈnæʃənÉ™l fəˈnÉ›tık É™soÊŠsiˈeıʃn", "UTF-8", - NULL -}; - - -int -main (int argc, char**argv) -{ - const char **b = tests; - while (*b) { - char *e = gmime_rfc2047_encode(b[0], b[1]); - printf("%s\t%s\n", e, gmime_rfc2047_decode(e, TERMINAL_CHARSET)); - b+=2; - } - - return 0; - -} diff --git a/tests/test8.c b/tests/test8.c deleted file mode 100644 index aa7debdba9..0000000000 --- a/tests/test8.c +++ /dev/null @@ -1,75 +0,0 @@ -/* test posix thread folder proxy */ - - -#include "camel.h" - -CamelThreadProxy *proxy; -CamelFuncDef *func_def; - - -void -test_sync_func (int num) -{ - printf ("Sync function number %d\n", num); - printf ("Sync function : current thread : %d\n", pthread_self ()); - -} - - -void -test_async_cb (int num) -{ - printf ("Callback number %d\n", num); - printf ("Callback : current thread : %d\n", pthread_self ()); -} - -void -test_async_func (int num) -{ - CamelOp *cb; - - printf ("Async function number %d\n", num); - printf ("Async function : current thread : %d\n", pthread_self ()); - sleep (1); - cb = camel_marshal_create_op (func_def, test_async_cb, num); - camel_thread_proxy_push_cb (proxy, cb); - - -} - -int -main (int argc, char **argv) -{ - int i; - CamelOp *op; - - camel_init (); - - func_def = - camel_func_def_new (camel_marshal_NONE__INT, - 1, - GTK_TYPE_INT); - - printf ("--== Testing Simple marshalling system ==--\n"); - for (i=0; i<5; i++) { - printf ("Iterration number %d\n", i); - op = camel_marshal_create_op (func_def, test_sync_func, i); - camel_op_run (op); - camel_op_free (op); - - } - printf ("\n\n"); - - proxy = camel_thread_proxy_new (); - - printf ("--== Testing Asynchronous Operation System ==--\n"); - for (i=0; i<5; i++) { - printf ("Pushing async operation number %d for execution\n", i); - op = camel_marshal_create_op (func_def, test_async_func, i); - camel_thread_proxy_push_op (proxy, op); - } - printf ("\n\n"); - printf ("--== Operations execution planned ==--\n"); - gtk_main (); -} - diff --git a/tests/test9.c b/tests/test9.c deleted file mode 100644 index 7fbbee8b8a..0000000000 --- a/tests/test9.c +++ /dev/null @@ -1,80 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -#include "camel.h" -#include "camel-mbox-folder.h" -#include "camel-mbox-parser.h" -#include "camel-mbox-utils.h" -#include "camel-mbox-summary.h" -#include "camel-exception.h" -#include -#include -#include -#include -#include -#include -#include - -int -main (int argc, char**argv) -{ - GArray *message_info_array; - gint test_file_fd; - CamelException *ex; - CamelMboxSummary *sum1, *sum2; - GArray *mbox_summary_info; - CamelMboxSummaryInformation *msg_info; - int i; - guint32 next_uid; - guint32 mbox_file_size; - - gtk_init (&argc, &argv); - camel_init (); - - ex = camel_exception_new (); - test_file_fd = open (argv[1], O_RDONLY); - message_info_array = camel_mbox_parse_file (test_file_fd, - "From ", - 0, - &mbox_file_size, - &next_uid, - TRUE, - NULL, - 0, - ex); - - close (test_file_fd); -#warning This test is no longer valid. -#if 0 - /* needs a folder to work with (indexing) */ - camel_mbox_write_xev (argv[1], message_info_array, &mbox_file_size, 1, ex); -#endif - if (camel_exception_get_id (ex)) { - printf ("Exception caught in camel_mbox_write_xev : %s\n", camel_exception_get_description (ex)); - } - - - mbox_summary_info = - parsed_information_to_mbox_summary (message_info_array); - sum1 = CAMEL_MBOX_SUMMARY (gtk_object_new (camel_mbox_summary_get_type (), NULL)); - - sum1->nb_message = mbox_summary_info->len; - - sum1->message_info = mbox_summary_info; - - camel_mbox_summary_save (sum1, "ev-summary.mbox", ex); - - sum2 = camel_mbox_summary_load ("ev-summary.mbox", ex); - - for (i=0; inb_message; i++) { - - msg_info = (CamelMboxSummaryInformation *)(sum1->message_info->data) + i; - printf ("Message %d :\n" - " From : %s\n", i, msg_info->headers.sender); - } - - return 1; - -} - - - diff --git a/tests/ui-tests/.cvsignore b/tests/ui-tests/.cvsignore deleted file mode 100644 index 84c2937bdc..0000000000 --- a/tests/ui-tests/.cvsignore +++ /dev/null @@ -1,8 +0,0 @@ -Makefile.in -Makefile -.deps -.libs -store_listing -msg-composer-test -message-browser -filter \ No newline at end of file diff --git a/tests/ui-tests/Makefile.am b/tests/ui-tests/Makefile.am deleted file mode 100644 index e61a054093..0000000000 --- a/tests/ui-tests/Makefile.am +++ /dev/null @@ -1,39 +0,0 @@ -# process this file with automake to create Makefile.in - -INCLUDES = \ - -I$(top_srcdir)/intl \ - -I$(top_srcdir)/camel \ - -I$(includedir) \ - -I$(top_srcdir)/camel/providers/MH \ - -I$(top_srcdir)/widgets \ - -I$(top_srcdir)/filter \ - $(EXTRA_GNOME_CFLAGS) $(BONOBO_GNOME_CFLAGS) \ - -DG_LOG_DOMAIN=\"evolution-ui-tests\" - -LDADD = \ - $(top_builddir)/widgets/libevolutionwidgets.la \ - $(top_builddir)/camel/libcamel.la \ - $(INTLLIBS) \ - $(EXTRA_GNOME_LIBS) \ - $(PTHREAD_LIB) - -message_browser_LDADD = \ - $(top_builddir)/camel/libcamel.la \ - $(INTLLIBS) \ - $(EXTRA_GNOME_LIBS) \ - $(PTHREAD_LIB) \ - $(EXTRA_GNOME_LIBS) \ - -lgtkhtml -lgnomeprint ../../mail/html-stream.o $(BONOBO_GNOME_LIBS) - -filter_LDADD = \ - $(top_builddir)/camel/libcamel.la \ - $(INTLLIBS) \ - $(EXTRA_GNOME_LIBS) \ - $(PTHREAD_LIB) \ - $(EXTRA_GNOME_LIBS) \ - $(top_builddir)/filter/libfilter.la \ - -lgtkhtml -lgnomeprint - -noinst_PROGRAMS = \ - message-browser \ - filter diff --git a/tests/ui-tests/filter.c b/tests/ui-tests/filter.c deleted file mode 100644 index 3ff6a1b1ae..0000000000 --- a/tests/ui-tests/filter.c +++ /dev/null @@ -1,30 +0,0 @@ - -#include -#include "filter-editor.h" - -int main(int argc, char **argv) -{ - GList *rules, *options, *options2; - xmlDocPtr doc, out, optionset, filteroptions; - GString *s; - GtkWidget *w; - - gnome_init("Test", "0.0", argc, argv); - gdk_rgb_init (); - gtk_widget_set_default_colormap (gdk_rgb_get_cmap ()); - gtk_widget_set_default_visual (gdk_rgb_get_visual ()); - - w = filter_editor_new(); - - doc = xmlParseFile("filterdescription.xml"); - rules = filter_load_ruleset(doc); - options = filter_load_optionset(doc, rules); - options2 = options; - out = xmlParseFile("saveoptions.xml"); - options = filter_load_optionset(out, rules); - - filter_editor_set_rules(w, rules, options2, options); - - gtk_widget_show(w); - gtk_main(); -} diff --git a/tests/ui-tests/filterdescription.xml b/tests/ui-tests/filterdescription.xml deleted file mode 100644 index 07c392aa70..0000000000 --- a/tests/ui-tests/filterdescription.xml +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - (match-all (header-contains "From" ${sender})) - - The From address matches sender(s). - - - - - (match-all (header-contains "To" ${receipient})) - - The To address matches receipients. - - - - - (match-all (header-contains "CC" ${self-email})) - - I am in the cc list. - - - - - (& (> message-size (size-lower size-range)) - (< message-size (size-uppwer size-range))) - - The message is a certain size. - - - - - - - (copy-to ${folder}) - - Send a copy to folder. - - - - (forward-to ${address}) - - Forward the message to people. - - - - (delete) - - Delete message. - - - - (stop) - - Stop processing further rules for this message. - - - - - - - (match-all (not (header-contains "To" "zucchi@zedzone"))) - - When I am the receipient. - - - - - - - - -